Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Mar 23, 2017 1:19 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Tue Feb 26, 2013 8:30 am 
Offline

Joined: Fri Sep 30, 2005 1:53 pm
Posts: 914
Location: Philadelphia, PA
Board games (e.g., chess) , adventure, simulation, dice games, artificial intelligence (e.g., Eliza) , brain games (e.g., "FasterMind") : the code for all these and much more is readily available for the BASIC's of the 1980's (see, for example, Tim Hartnell's books of computer games, 1983-1985).

And the BASIC of the 1980's is, er, well, BASIC, especially when the programs are written (as in the case of Hartnell's books) "in the most general version of BASIC," intended to run on the Texas Instruments 99/4A, Commodore 64, Apple II, and other popular home computers of the time.

Aaron Ballman has written utilities so that people can take programs written for Visual Basic and run them on computers in REALbasic. Has anyone done anything like that so that programs written for the BASICs of the 1980's can run in REALbasic?

Theoretically, it should not be that difficult to do. The list of BASIC keywords is rather small: PRINT, INPUT, IF, THEN, ELSE, FOR, NEXT, READ, DATA, GOTO, GOSUB, RETURN, and perhaps a few others.

Some of the process would be simple, e.g., removing unneeded BASIC line numbers and changing needed ones to REALbasic line labels. Some of the process would not be as simple, e.g., for the sake of the screen scrolling, 1980's BASIC's PRINT would probably have to utilize a large TextArea (or perhaps a large ListBox).

When I was younger, I modified the entirety of Thomas C. McIntire's A-Z Book of Computer Games so that the 26 programs (Tic Tac Toe, Nim, Blackjack, Poker, etc.) would all run on a TI-99/4A home computer. Such books show that the BASICs of the 1980's were capable of handling complex programs in spite of a limited amount of space and a limited list of BASIC keywords.

The combination of complexity and simplicity would seem to be something that should be valued today. One possible way I see of NOT losing the value of such programs is having a program written in REALbasic that can take a 80's BASIC program as input and produce an equivalent program that will run in today's RB.

Has anyone done anything like this?

Barry Traver


Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Tue Feb 26, 2013 11:00 am 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
Interesting idea....
would require a "framework" to provide a "terminal class" to support the PRINT and INPUT routines
plus IF/THEN is a bit trickier in OLD STYLE as you can have multiple statements on a line (so your END IF is implied, not explicit)
ON GOTO, and ON GOSUB would have to be converted to SELECT type statements

Perhaps instead of a program to TRANSLATE "Old Style" basic to "New Style".... an Interpeter would be another idea.

Of course all for the sake of "seeing if I can do it", as there is no commerical value, plus there are dozens of similar programs out there

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Tue Feb 26, 2013 3:26 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
I suppose I could add support to the "Convert It!" program... at the moment it's built into the Real Studio Developer's Interface.. I've redesigned the interface (to be released)...and have added support to convert from VB3,4,5,6,.NET/JAVA/and convert 60% of c/c++ code to Realbasic... I don't see why adding BASIC support wouldn't be possible...just requires reading through the functions/subs/and commands of QBasic and replacing them with RB equivalents using Regular Expressions to ensure proper format of the code lines. Perhaps I will break out the old QBasic open it up in Dosbox and do some 'transposing' today :-) You could always use an interpreter written in Visual Basic 6 (as found at planet-source-code.com) and use my converting utility to make it a Realbasic application?

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Thu Feb 28, 2013 12:02 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
Just as a "Wonder if I can do that" type exercise....
I have started to write a BASIC interpeter similar to TRS80 Level II (except with a 80x25 screen)

It will be a "Terminal Like" interface... exactly like the "old" machines were... complete with a line based editor
It consists on ONE RealStudio control... A Canvas... everything else is code.

When I get the "editor" working (that is all indirect commands (EDIT, LIST etc) work) I will post a demo.. At that point it won't RUN the BASIC you enter.... but hopefully will do everything else.

again.... this is a BRAIN exercise..... I realize there is zero commerical benefit.... and probably not much educational benefit for anyone but me.... but who knows.... perhaps we can start a RETRO-BASIC resurgance :)

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Thu Feb 28, 2013 6:47 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
Here is the beginning of my "RETRO BASIC"

Currently it does NOT execute any program you enter.....
only these commands currently work
CLS - clear screen
EDIT n - edit line #n
LIST [l1][-][l2] list program code with optional start end line #s
LOAD filename
NEW - clears current program
SAVE filename

So you can write a program just like on an old TRS-80, and load/save it

Execution of that code is the next phase :)

FYI... when Editting a line of code...

Left/Right Arrows move cursor
Up Arrow toggles Insert Mode on/off (changes cursor from BLOCK to UNDERLINE)
BackSpace deletes character
Enter/Return either inserts code into the buffer, or attempts to execute it if no line #

Load/Save stores file in a DESKTOP folder called "Basic Programs"

http://www.rdsisemore.com/retrobasic.app.zip

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Sat Mar 09, 2013 2:45 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
My "RetroBasic" experiment is coming along quite nicely (yes I know... there are others out there... so what?)



Commands implemented so far :
CLEAR, CLS, CONT, DATA, DEFDBL, DEFINT, DEFSNG, DEFSTR, DELETE, DIM, EDIT , END, ERROR, GOTO :oops: ,
INPUT, LET, LIST, LOAD, NEW, ON GOTO :oops: , PRINT, READ, RESTORE, SAVE, STOP, TRON, TROFF
and SET, RESET, GOSUB :oops: and RETURN

It supports 16bit Integer (A%), Single (B!) , Double (C#) and String (D$), as well as 2 dimensional arrays of any of those types

It is loosely based on Radio Shack (Tandy) TRS-80 Level II Basic circa 1979. But supports both 64x16 as well as 80x25 terminal screen... complete with the original TRS-80 block graphics.

This is a BASIC Simulator... it is not a TRS-80 EMULATOR (ie. it will NOT execute Z80 machine code)

Once I have this perfected, and have added the LEVEL III Disk Basic operations, I plan to use the knowledge gained from this exercise to either create a "RetroBasic" to Real Studio Syntax translator, or maybe even a compiler for RetroBasic to iOS..... haven't decided ... heck I may get bored, and move on to something totally different :)


Image

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Thu Mar 14, 2013 10:22 am 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
kind of surprised non of the other "from the 70's/80's" developers here have shown any interest ... if just from a nostalgia point of view :)

It actually is a fun process.... and a heck of a learning experience in the subject of "interpeters"

I have the code editor working, it can DIM variables and arrays, all string and math functions are working... now on to the control structures (FOR/NEXT etc)

When completed it will run a super-set of Radio Shack TRS-80 Basic Level II... soon after to be upgraded to the equiv of "Disk Basic" at which time is should be able to execute the source code for any BASIC program written for the TRS-80 Model I, III or IV as long as it did not use any Z80 assembly functions (this is a SIMULATOR, not an EMULATOR)

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Tue Mar 19, 2013 2:04 am 
Offline

Joined: Fri Nov 16, 2007 10:18 pm
Posts: 195
Location: Portland, OR
DaveS wrote:
kind of surprised non of the other "from the 70's/80's" developers here have shown any interest ... if just from a nostalgia point of view :)


I've actually been impressed by how quickly you have done this. I've played with building a databasic interpreter off an on over the years. No where near as complete as this.

_________________
Windows: Win7 64bit sp1, Vista 32bit sp2, WinXP 32bit SP3
Linux: RH EL6
Mac: Died in 2011 and took 2 months to notice.

RealStudio: 2012r2


Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Tue Mar 19, 2013 8:13 am 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
Thanks... I've decided to take it up a notch... and will not only be TRS80 Basic, but am adding elements of MBasic (Basic-80)
In some ways its nostalgic to see what we used to use.... and sometimes pityful to see how limited we were.

IF/THEN [else] is next to be implemented
FOR/NEXT/STEP
WHILE/WEND [not part of TRS80]

My acid test will be when it can execute SUPER STAR TREK from its original code :)


//
// WORKING KEYWORDS
//
AND,CLS,CLEAR,CLOAD,CONT,CSAVE,DATA,DEFDBL,DEFINT,DEFSNG,DEFSTR,DELETE,DIM,EDIT,END,ERL,ERR,MEM,ERROR,GOSUB,
GOTO,INPUT,LET,LINE INPUT,LIST,LLIST,LOAD,MERGE,NEW,ON,OR,POS,PRINT,READ,REM,RESTORE,RESUME,RETURN,RND,RUN,
SAVE,SET,RESET,STOP,TAB,TIME$,TRUE,FALSE,TROFF,TRON,POINT,IF,THEN
//
// Working Functions
//
ABS,ASC,ATN,CDBL,CHR$,CINT,COS,CSNG,EXP,FIX,FRE,HEX,INT,LEFT$,LEN,LOG,MID$,OCT$,RIGHT$,SGN,SIN,SQR,STR$,
STRING$,SPACE$,TAN,VAL,POINT

//
// NOT WORKING Keywords
//
AUTO,CLOSE,DEF FN,FIELD,FN,FILES,FOR,GET,INKEY$,KILL,LSET,NAME,NEXT,NOT,OPEN,PUT,RANDOM,
RSET,STEP,TO,USING,WHILE,WEND,WIDTH,WRITE

//
// Not Working Functions
//
CVD,CVI,CVS,EOF,INPUT$,INSTR,LOC,LOF,LPOS,MKD$,MKI$,MKS$

//
// Will Not be Supported
//
CALL,CHAIN,COMMON,OUT,CMD,ERASE,INP,USR,PEEK,POKE,SWAP,SYSTEM,WAIT,VARPTR,ELSE

EDIT : got IF/THEN working... but discovered that SUBTRACTION doesn't (problem with detecting subtract vs. negative)

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Last edited by DaveS on Wed Mar 20, 2013 8:34 am, edited 3 times in total.

Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Tue Mar 19, 2013 8:46 am 
Offline

Joined: Fri Sep 30, 2005 1:53 pm
Posts: 914
Location: Philadelphia, PA
Dave S.,

What are your plans for your "RETRO BASIC"? Will you be making it available to those who are interested? If so, what will be the cost? Also, would source code be available?

I'm glad that I began this message thread. It sounds like you've accomplished a lot more than I could have hoped to do.

Barry Traver


Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Tue Mar 19, 2013 9:07 am 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
Don't really know at the moment...... first thing is to get it finished :)
For now, I am NOT going to enable most of the disk features ... especially since supporting block based random files is a pain....

I WILL be using what I learned to create some sort of more modern something..... a Basic-to-C translator.... an iOS compiler... don't know yet

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Tue Mar 19, 2013 10:18 am 
Offline

Joined: Mon Oct 13, 2008 4:26 am
Posts: 63
DaveS wrote:
In some ways its nostalgic to see what we used to use.... and sometimes pityful to see how limited we were.


Yet I was as just as immersed in text based adventuring then as I am in anything available now. :D


Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Wed Mar 20, 2013 12:03 am 
Offline

Joined: Sun Mar 06, 2011 6:37 pm
Posts: 15
RetroBasic is looking great! It really brings back memories from the 'ol Tandy days.

Kudos! :mrgreen:


Top
 Profile  
 
 Post subject: Re: Games, BASIC's of the 1980's, and REALbasic
PostPosted: Sat Mar 23, 2013 4:37 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
FOR/NEXT/STEP working..... which is pretty much the last TRS-80 related command

However, not yet met my goal of running "Super Star Trek", as this code is BASIC-80 (aka MBasic) and has DEF FN commands.... SOOOooo... guess I'm going to implement those too.

And WHILE/WEND while I'm at it.

This is giving me great education, and lots of code to use as the basis for an iOS type compiler.. (actually a "Basic" to "Xcode" translator...), where my biggest issue was insuring that all expressions were syntax valid BEFORE outputting the "C" code version....

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group