Jump to content
IGNORED

[AQUARIUS] BASIC Programming on the Aquarius


jaybird3rd

Recommended Posts

Here is something to get you started (from an Aquarius User magazine).

Thanks for posting those listings! I had forgotten that Erik posted them on GeekVintage. I took the liberty of repackaging them as a ZIP archive, in case anyone who wants to use them doesn't have any RAR tools installed:

 

TypeIns.zip

  • Like 2
Link to comment
Share on other sites

Can you inject assembly routines from BASIC?

Yes! Aquaman already linked to Martin's example hand controller code, and there are other routines that would be much faster to implement in assembly as well (such as changing the screen color). Of course, using assembly in a BASIC program could cause problems when the program is converted to ROM format, since the code is being relocated in the process, but that might not matter if the assembly code uses only relative addressing. (Martin provided clarification on the use of Assembly in BASIC a few posts down. Thanks, Martin!)

 

Getting back to Extended BASIC (and the 1541 version of Extended BASIC in the Aquaricart): it's important to remember that everything that can be done with the commands added by these versions of BASIC can also be done in Regular BASIC, with the use of assembly (they're all written in assembly, after all). Perhaps it would be a good idea to prepare a "library" of useful assembly routines that can be dropped into any Aquarius BASIC program.

  • Like 2
Link to comment
Share on other sites

II have the follwoing in my collection: "The Aquarius and how to get the most of it" by Ian Sinclair, "30 Dynamic Games for the Aquarius by Tim hardwell" and finally "The Aquarius program book" by Peter Goode. There should be one out there named "Mattel Aquarius Ideabook" by David H. Ahl, but I have never seen anyone having it?

Good collection of books! I am missing the 30 Dynamic games, maybe you were the one who snatched it from the ebay auction several years ago :)

I have heared about the ideabook, but I haven't seen it.

I do have a French book called "Jouez avec Aquarius" (Playing with Aquarius), which seems to contains BASIC listenings printed on an Aquarius printer. The back is glued, but it looks that it will fall apart when you open the pages.

 

Your best guess is to look into Aquarius user magazine.

I have put some scanned images on the net a while ago at http://www.vdsteenoven.com/aquarius/books.php but I just noticed that it is not working correctly on an Internet Explorer (Firefox will work)

 

Regs,

Martin

Edited by mvdsteenoven
  • Like 1
Link to comment
Share on other sites

 

Good collection of books! I am missing the 30 Dynamic games, maybe you were the one who snatched it from the ebay auction several years ago :)

I have heared about the ideabook, but I haven't seen it.

I do have a French book called "Jouez avec Aquarius" (Playing with Aquarius), which seems to contains BASIC listenings printed on an Aquarius printer. The back is glued, but it looks that it will fall apart when you open the pages.

 

Your best guess is to look into Aquarius user magazine.

I have put some scanned images on the net a while ago at http://www.vdsteenoven.com/aquarius/books.php but I just noticed that it is not working correctly on an Internet Explorer (Firefox will work)

 

Regs,

Martin

 

Not Found

The requested URL /aquarius/books.php but I just noticed that it is not working correctly on an Internet Explorer (Firefox will work) was not found on this server.

 

 

 

That's the message I got from your link using Waterfox (64-bit derivative of Firefox.)

Link to comment
Share on other sites

Getting back to Extended BASIC (and the 1541 version of Extended BASIC in the Aquaricart): it's important to remember that everything that can be done with the commands added by these versions of BASIC can also be done in Regular BASIC, with the use of assembly (they're all written in assembly, after all). Perhaps it would be a good idea to prepare a "library" of useful assembly routines that can be dropped into any Aquarius BASIC program.

I really like that idea, because Basic is in most cases sufficient, but some things just can't be done or not fast enough!
Link to comment
Share on other sites

That makes me wonder, if the conversion still would work when parts of the programming is being done in assembly? (Martin could you please answer this?)

Sorry, I did not saw your question earlier.

I assume that you are talking about converting your BASIC program to a ROM cartridge?

Yes, the assembly would still work. The conversion will only place your BASIC program into the ROM memory area and execute it from there. Useally one would put his machine code into a fixed memory address in RAM, somewhere after the program but still with enough space for the BASIC variables that your program uses.

But when you convert your BASIC program you will have more RAM available so you can also use a lower address to store your machine code. This way a 16k program should even work on a standard Aquarius.

 

Note: you cannot use two ROM cartridges in one mini expander, so you cannot use the bootloader together with the 1541 ROM. Even if you would use it in an Aquarius II (which has Extended Basic build in) then the bootloader will become the primary ROM and Extended Basic commands will be disabled.

 

Regs,

Martin

  • Like 1
Link to comment
Share on other sites

Indeed there are a few books available. At the time I got my Aquarius in the earlie eighties I didn't have more than the basic manual, but at this point I have the follwoing in my collection: "The Aquarius and how to get the most of it" by Ian Sinclair, "30 Dynamic Games for the Aquarius by Tim hardwell" and finally "The Aquarius program book" by Peter Goode. There should be one out there named "Mattel Aquarius Ideabook" by David H. Ahl, but I have never seen anyone having it? I have a scanned version of the first book "The Aquarius and how to get the most of it" for you if you want, but because of the size I cannot post it here. So if you want it I can send it to you by general E-mail. Furthermore I would recommend you to become a member of the Mattel Aquarius Yahoo user group, because in the file segment, there is also a lot to be found which may come in handy!

 

 

OK kewl I will pm my email. Im a bit confuse about extended basic. Is that already apart of aquarius emulator or something different? I was wondering about other commands that may not have been listed in the aquarius guide book. I was comparing the functions and commands of ms basic and found a few commands I couldnt find in the guide book, and I wasnt sure if it was in the extended basic manual, wish I dont have and i am not sure if its part of the emulator I downloaded.

 

Thanks

Link to comment
Share on other sites

Perhaps it would be a good idea to prepare a "library" of useful assembly routines that can be dropped into any Aquarius BASIC program.

I really like that idea, because Basic is in most cases sufficient, but some things just can't be done or not fast enough!

I could incorporate some of the 1541 commands into the bootloader, but this will decrease the size of the BASIC program that you can store in the ROM area.

 

Regs,

Martin

  • Like 1
Link to comment
Share on other sites

I was comparing the functions and commands of ms basic and found a few commands I couldnt find in the guide book, and I wasnt sure if it was in the extended basic manual, wish I dont have and i am not sure if its part of the emulator I downloaded.

The Aquarius set of BASIC commands is very limited, even with the Extended Basic. You can find the Extended Basic manual also at Yahoo! Groups

By default the virtual aquarius starts without Extended Basic, you will have to insert the cartridge which you can find in the ROM area of the emulator. Try the command CLS; without Extended Basic it will give a syntax error, if EB is active it will clear the screen.

 

Regs,

Martin

  • Like 1
Link to comment
Share on other sites

I could incorporate some of the 1541 commands into the bootloader, but this will decrease the size of the BASIC program that you can store in the ROM area.

Thanks, Martin (thanks also for the clarification about assembly and the relocation of BASIC code to the cartridge). I don't want the bootloader to become a maintenance headache for you (requests for additional features, and so forth), so perhaps it's best to keep it as simple and as small as possible. I'm sure that small bits of inline assembly would do the job for the most common tasks: clearing the screen, changing the screen colors, using the PSG and hand controllers, etc.

 

(I'm speaking only for myself in this, of course.)

  • Like 1
Link to comment
Share on other sites

im curious is this a possibility. I know with a commodore i was able fool the computer into making game levels. so lets say a game is made with one level and you have just enough memory for that one level. With the commodore i remember that I could add a special code at the end of the source code and it would automatically load from the floopy drive level two and run it. I noticed that with the aquarius if i put run with out any numbers at the beggining of the source code it runs the code. but not sure if there is a way to make it load new code on the emulator automatically, with out having to manually do it. I can kind of visualize doing it on a cassette, by giving the person a que when to hit play on the cassette player, but i cant see how to do it on the emulator.

Edited by voltron
  • Like 1
Link to comment
Share on other sites

im curious is this a possibility. I know with a commodore i was able fool the computer into making game levels. so lets say a game is made with one level and you have just enough memory for that one level. With the commodore i remember that I could add a special code at the end of the source code and it would automatically load from the floopy drive level two and run it. I noticed that with the aquarius if i put run with out any numbers at the beggining of the source code it runs the code. but not sure if there is a way to make it load new code on the emulator automatically, with out having to manually do it. I can kind of visualize doing it on a cassette, by giving the person a que when to hit play on the cassette player, but i cant see how to do it on the emulator.

If I understand what you're after (loading the program and then loading additional data later), it can't easily be done with "quick typing", which is really meant to load an entire program at once. You'd need to use a recognized storage device that you can access from BASIC, like the cassette (which is emulated in Virtual Aquarius). If you look at the cassette game images provided with Virtual Aquarius, you'll see that many of them are in two parts: a BASIC "bootstrap" program which starts the loading process, and an "array" of machine language code (the "main body" of the game) which is loaded into RAM by the BASIC program and then executed. So it's certainly possible to load content into RAM from the cassette within a BASIC program. I wouldn't worry about that, though, until your programs get too large to fit into 16K of RAM.

 

Regarding line numbers: you can run a simple program entirely in "immediate mode" without using line numbers, but you won't be able to do any branching or looping. Remember also that every statement in your program will require line numbers; BASIC won't allow you to use numbers with some lines but not with others.

  • Like 1
Link to comment
Share on other sites

I could incorporate some of the 1541 commands into the bootloader, but this will decrease the size of the BASIC program that you can store in the ROM area.

 

Regs,

Martin

I would certainly love to have these into the bootloader if possible, these features (Joystick, sound and maybe screen colour) are in my opinion necesities for making good games!

We wouldn't need extended basic then and I am sure there will still be a sufficient amount of RAM to program the general game process.

Link to comment
Share on other sites

Thanks, Martin (thanks also for the clarification about assembly and the relocation of BASIC code to the cartridge). I don't want the bootloader to become a maintenance headache for you (requests for additional features, and so forth), so perhaps it's best to keep it as simple and as small as possible. I'm sure that small bits of inline assembly would do the job for the most common tasks: clearing the screen, changing the screen colors, using the PSG and hand controllers, etc.

I don't want the bootloader to be a maintenance headache either, so after the 1541 features (which should have been possible in the first place) the rest should indeed being done by small bits of inline assembly. A kind of assembly database(in basic data) were everyone can put in his programmed features, would be nice though! Edited by Aquaman
  • Like 1
Link to comment
Share on other sites

I think Yahoo requires a phone number for a new account these days, so everyone might not be hip to the old Yahoo group.

 

Here's the Aquarius Extended Basic Manual PDF

I'll try to keep this hosted. But grab it while you can and make it available.

 

The Get and Put graphics commands were the very beginnings of cut/paste and sprites.

Extended Basic had a some great potential.

Edited by Pset
  • Like 2
Link to comment
Share on other sites

For the end-user how would this work? I would use the Extended BASIC cart and save the .CAS file as usual. Then, by your magic the .CAS to ROM convertor would handle those extra commands?

Just as Aquaman suggested, I was thinking about some 1541 commands like PSG, JOYPAD and FILL. The Extended Basic commands can easilly be done with standard Basic(except def fn, but these are hard to port anyway).

You would develop using the virtual aquarius with the 1541 rom (optional) and you could use the 3 additional commands.

Next, convert .caq to rom as useall.

 

But I might be able to create an easier solution. Let me fiddle a bit.....

 

Regs,

Martin

  • Like 3
Link to comment
Share on other sites

Didn't know that! Why is this? By the way, welcome to Atari Age and the Aquarius thread!!

Its pretty recent, Yahoo says its for account security and password retrieval.

Anyway, back to programming, another topical item from the yahoo group.

 

Here's a maze generator from James L. Dean from back 1995.

Seems to need at least 16k for RAM to run. Really shows the speed of the Aquarius.

You'll think its not working, but it is just taking a long time.

 

Fgo745I.png

 

BASIC Code is in the >>

 

10 REM DISPLAY A MAZE.    
20 REM SEED WILL PRODUCE A DIFFERENT MAZE.
30 REM posted to comp.lang.basic.misc  1995/06/23
40 REM WRITTEN BY JAMES L. DEAN
50 REM http://www.geocities.com/jdean284/
60 REM
70 REM DEFINT A-Z command not available on Aquarius
80 PRINT
90 PRINT "Number of columns";
100 INPUT C
110 IF C > 1 THEN 140
120 PRINT "? The number of columns must be at least 2"
130 GOTO 90
140 PRINT
150 O=2*C
160 P=O+1
170 PRINT "Number of rows";
180 INPUT R
190 IF R > 1 THEN 220
200 PRINT "? The number of rows must be at least 2"
210 GOTO 170
220 PRINT
230 W=2*R+1
240 DIM Z(P*W+2*C*R+200)
250 PRINT "Seed";
260 INPUT S
270 PRINT
280 S=ABS(S)
290 FOR T=1 TO 8
300 G=INT(S/29)
310 H=S-29*G
320 S=G
330 IF H <> 0 THEN 350
340 H=19
350 Z(T)=H
360 NEXT T
370 Z(9)=-1
380 Z(105)=0
390 Z(10)=0
400 Z(106)=1
410 Z(11)=1
420 Z(107)=0
430 Z(12)=0
440 Z(108)=-1
450 V=8
460 N=104
470 FOR A=1 TO 4
480   FOR B=1 TO 4
490     IF A = B THEN 690
500       FOR D=1 TO 4
510         IF A = D THEN 680
520         IF B = D THEN 680
530           FOR E=1 TO 4
540             IF A = E THEN 670
550             IF B = E THEN 670
560             IF D = E THEN 670
570               Z(A+V)=Z(9)
580               Z(A+N)=Z(105)
590               Z(B+V)=Z(10)
600               Z(B+N)=Z(106)
610               Z(D+V)=Z(11)
620               Z(D+N)=Z(107)
630               Z(E+V)=Z(12)
640               Z(E+N)=Z(108)
650               N=N+4
660               V=V+4
670           NEXT E
680       NEXT D
690   NEXT B
700 NEXT A
710 T=201
720 FOR U=1 TO W
730   FOR M=1 TO P
740     Z(T)=1
750     T=T+1
760   NEXT M
770 NEXT U
780 T=INT(C/2)
790 T=C-2*T
800 IF T <> 0 THEN 830
810   X=C
820 GOTO 840
830 X=C+1
840 T=INT(R/2)
850 T=R-2*T
860 IF T <> 0 THEN 890
870   Y=R
880 GOTO 900
890 Y=R+1
900 V=200+P*W
910 F=V
920 GOTO 1300
930 Z(202)=0
940 Z(200+P*(W-1)+O)=0
950 PRINT ". ";
960 T=1
970 FOR M=3 TO P
980   IF T = 0 THEN 1010
990     PRINT ".";
1000   GOTO 1020
1010     PRINT "_";
1020   T=1-T
1030 NEXT M
1040 PRINT
1050 U=3
1060 V=200+P
1070 N=V+P
1080 IF U > W THEN 1760
1090   T=1
1100   FOR M=1 TO P
1110     N=N+1
1120     V=V+1
1130     IF T <> 0 THEN 1190
1140       IF Z(N) = 1 THEN 1170
1150         PRINT " ";
1160       GOTO 1230
1170         PRINT "_";
1180     GOTO 1230
1190       IF Z(V) = 1 THEN 1220
1200         PRINT ".";
1210       GOTO 1230
1220         PRINT "!";
1230     T=1-T
1240   NEXT M
1250   PRINT
1260   U=U+2
1270   N=N+P
1280   V=V+P
1290 GOTO 1080
1300 Z(200+P*(Y-1)+X)=0
1310 I=1
1320   J=Z(1)
1330   G=1
1340   FOR H=2 TO 8
1350     T=Z(H)
1360     Z(G)=T
1370     J=J+T
1380     IF J <= 29 THEN 1400
1390       J=J-29
1400     G=H
1410   NEXT H
1420   Z(=J
1430 IF J > 24 THEN 1320
1440 IF I > 4 THEN 1700
1450   N=I+4*(J-1)
1460   K=X+2*Z(8+N)
1470   IF K <= 1 THEN 1680
1480   IF K >= P THEN 1680
1490     Q=Y+2*Z(104+N)
1500     IF Q <= 1 THEN 1680
1510     IF Q >= W THEN 1680
1520       IF Z(200+P*(Q-1)+K) <> 1 THEN 1680
1530         IF X <> K THEN 1560
1540           Z(200+P*(((Y+Q)/2)-1)+K)=0
1550         GOTO 1570
1560           Z(200+P*(Q-1)+(X+K)/2)=0
1570         X=K
1580         Y=Q
1590         V=V+1
1600         Z(V)=I
1610         V=V+1
1620         Z(V)=J
1630         GOTO 1300
1640         N=I+4*(J-1)
1650         X=X-2*Z(8+N)
1660         Y=Y-2*Z(104+N)
1670 GOTO 1440
1680   I=I+1
1690 GOTO 1440
1700   J=Z(V)
1710   V=V-1
1720   I=Z(V)
1730   V=V-1
1740   IF F = V THEN 930
1750 GOTO 1640
1760 END
1760 END

 

 

 

Have fun.

 

Link to comment
Share on other sites

I think Yahoo requires a phone number for a new account these days, so everyone might not be hip to the old Yahoo group.

 

Here's the Aquarius Extended Basic Manual PDF

I'll try to keep this hosted. But grab it while you can and make it available.

 

The Get and Put graphics commands were the very beginnings of cut/paste and sprites.

Extended Basic had a some great potential.

 

 

Yeah. I tried to get James the Animal Tamer's OK to use his Aquarius font. I think the Yahoo group was the last known contact point. Unbeknownst to me posting is blocked on my account. Probably wants more details like blood type, toe fungus, etc..

Link to comment
Share on other sites

Yeah. I tried to get James the Animal Tamer's OK to use his Aquarius font. I think the Yahoo group was the last known contact point. Unbeknownst to me posting is blocked on my account. Probably wants more details like blood type, toe fungus, etc..

So this E-Mail address is also not working anymore: emucompboy@yahoo.com ?
Link to comment
Share on other sites

First is the most recent version of the Virtual Aquarius emulator for Windows, version 0.72a:

 

attachicon.gifVirtualAquarius.zip

 

This distribution archive includes the emulator itself, the OS ROM, several cartridge and cassette images, and a few sample BASIC programs in ASCII text format to get you started (more on these later). This is the primary emulator that I will be writing my instructions for in this thread, since it has a few features which are especially useful for BASIC programming but which other Aquarius emulators (such as MESS) presently lack.

 

(There is no "installer" for this emulator; just unpack the ZIP archive into a folder, move the folder to a convenient place, and open the "aquarius.exe" executable inside the folder to start the emulator. It's a few years old now, but I've used Virtual Aquarius under every version of Windows from XP through Windows 8 (in Desktop mode), and it appeared to function perfectly.)

This is indeed a very good emulator! However it's also a pity James lost interest to bring out a new and improved version, which removes some of the bugs that are still inside or even incorporates the original character rom image for that matter!

Edited by Aquaman
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...