Intelligentleman Posted October 2, 2021 Share Posted October 2, 2021 (edited) It’s a BASIC game for IBM PCs and Apple II. The description makes it seem like there’s some primitive graphics going on, and I think that might be the barrier for Aquarius. Can anyone look at the code and see if there’s something in there to prohibit this program from working? Edited October 2, 2021 by Intelligentleman Quote Link to comment Share on other sites More sharing options...
carlsson Posted October 2, 2021 Share Posted October 2, 2021 (edited) ID=1 means IBM PC so it uses the LOCATE command. ID=2 means Apple II so it uses the VTAB HTAB commands. How do you position a print on Aquarius? That is the first to find out. I noticed that PRINT AT doesn't work, likewise neither of the other two commands. Same about how to clear the screen - neither of CLS nor HOME seem to match. Regarding the player input, the PC has INKEY$ just like the Aquarius has so in that respect your computer is IBM compatible. Lines 620-630 cause a sound effect. In this case the Aquarius is an Apple, since CHR$(7) rings the bell. Rest of the program looks quite plain, as long as the number of rows and columns match at least 40x24. Edited October 2, 2021 by carlsson 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted October 2, 2021 Share Posted October 2, 2021 Ok, to clear screen is PRINT CHR$(11) which leaves only the method to position a PRINT statement. 1 Quote Link to comment Share on other sites More sharing options...
Intelligentleman Posted October 2, 2021 Author Share Posted October 2, 2021 Sounds like it’s worth a try? Or would you say no? I’m just looking for practice, but would like to have a shot at something that does something. Thank you for your input so far Quote Link to comment Share on other sites More sharing options...
carlsson Posted October 2, 2021 Share Posted October 2, 2021 It definitely sounds doable. I went through the entire manual without finding an obvious answer to the final problem, but anyone who has previous Aquarius experience probably will fill you in with the last details. Quote Link to comment Share on other sites More sharing options...
Intelligentleman Posted October 2, 2021 Author Share Posted October 2, 2021 3 minutes ago, carlsson said: It definitely sounds doable. I went through the entire manual without finding an obvious answer to the final problem, but anyone who has previous Aquarius experience probably will fill you in with the last details. Well, it’s always been my understanding that the Aquarius can’t do programmable graphics. Is that what this command is for? Quote Link to comment Share on other sites More sharing options...
carlsson Posted October 2, 2021 Share Posted October 2, 2021 No, it is only to locate the next PRINT statement to somewhere else than the following line. Essentially you want to be able to print ABC or whatever at any position on the screen. Not all BASIC dialects have commands for that, some don't even have machine routines to do it. 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted October 2, 2021 Share Posted October 2, 2021 Technically you could convert the PRINT statements on lines 170, 180, 190, 270, 310, 390, 410 and 440 to POKE into the screen matrix as the manual explains. Perhaps that is the best way to do it. 1 Quote Link to comment Share on other sites More sharing options...
Intelligentleman Posted October 2, 2021 Author Share Posted October 2, 2021 17 minutes ago, carlsson said: Technically you could convert the PRINT statements on lines 170, 180, 190, 270, 310, 390, 410 and 440 to POKE into the screen matrix as the manual explains. Perhaps that is the best way to do it. But, bottom line, if I type this as-is, it’s not going to work without modifications? Thank you again, I’m new at this Quote Link to comment Share on other sites More sharing options...
carlsson Posted October 2, 2021 Share Posted October 2, 2021 Correct, the BASIC parser will bail out at one point or another even after adjusting the minor details I already observed. 1 Quote Link to comment Share on other sites More sharing options...
Intelligentleman Posted October 2, 2021 Author Share Posted October 2, 2021 (edited) Thank you again, carlsson, in 6th or 7th grade, I remember bringing these magazines to an intro programming class and using up an entire “free” period where we could work on whatever programs we wanted to try and get one of these to work. Never had success. And this was in a computer lab of Apple IIs in the early 90s. i just don’t think I’m ready for that kind of disappointment, even 28 years later ? Edited October 2, 2021 by Intelligentleman Quote Link to comment Share on other sites More sharing options...
Aquaman Posted October 2, 2021 Share Posted October 2, 2021 Aquarius extended basic has the LOCATE and CLS command. https://archive.org/stream/aquariusextendedbasicinstructions/AquariusExtendedBasicManual_djvu.txt On an actual Aquarius you will need the Extended basic cartridge or the Aquaricart which also provides you with extended basic. On an emulator you can load the extended basic rom first to get acces to these additional commands. 2 Quote Link to comment Share on other sites More sharing options...
Intelligentleman Posted October 2, 2021 Author Share Posted October 2, 2021 1 hour ago, Aquaman said: Aquarius extended basic has the LOCATE and CLS command. https://archive.org/stream/aquariusextendedbasicinstructions/AquariusExtendedBasicManual_djvu.txt On an actual Aquarius you will need the Extended basic cartridge or the Aquaricart which also provides you with extended basic. On an emulator you can load the extended basic rom first to get acces to these additional commands. I do have the Aquaricart… 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted October 3, 2021 Share Posted October 3, 2021 Here is the listing, Aquarius-fied (as far as I could tell) for you: 100 sm=12288:sw=40 120 print chr$(11):input"program speed";sp 140 if sp<0 then 120 150 bs=int(rnd(1)*10)+1:bv=int(rnd(1)*10)+1 160 print chr$(11) 170 py=23:px=int(sw/2):i=sm+py*40+px 175 pokei,45:i=i+1:pokei,43:i=i+1:pokei,45 180 py=22:px=px+1:pokesm+py*40+px,111 190 py=24:pokesm+py*40+px,73 200 ta=0:sc=0 210 t=t+1:if t=3200 then t=1 220 bx=int(bs*t):md=int(bx/(2*sw)):bx=bx-(2*sw*md) 230 if bx>=sw then bx=2*sw-bx 240 if bx=0 then bx=1 250 if bx>sw-3 then bx=sw-3 260 by=int(4+(3*sin(t*bv))) 270 px=bx:py=by:i=sm+py*40+px 275 pokei,94:i=i+1:pokei,79:i=i+1:pokei,94 280 b$=inkey$:for x=1 to 15:q$=inkey$:next 285 if b$<>"" and ta=0 then gosub 370 290 if ta=1 then gosub 410 300 for pe=0 to sp*10:next 310 px=bx:py=by:i=sm+py*40+px 315 pokei,32:i=i+1:pokei,32:i=i+1:pokei,32 320 goto210 370 sound(100,50):mt=0:mx=int(sw/2)-1:my=22 380 mv=4:ma=.5:ta=1:sc=sc+1 390 px=mx:py=my:pokesm+py*40+px,77 400 return 410 px=mx:py=my:pokesm+py*40+px,32 420 my=int(my-mv):mv=mv-ma 430 if my>22 then ta=0:return 440 px=mx:py=my:pokesm+py*40+px,77 450 if abs(my-by)>1 then 470 460 if abs(mx-bx)<2 then 480 470 return 480 sound(50,200):printchr$(11);"the parrot got the meatball!" 490 print"you got that in";sc;" tries!" 500 end I removed a bunch of subroutines and replaced with inline code instead, since you don't need to cater for IBM or Apple compatibility when you run Mattel hardware. I don't know how to properly do RANDOMIZE so I left that part out too. The program would have room for quite a few enhancements, like at least use some of the built-in graphics symbols, perhaps add colours (located at sm+1024) and more. 1 Quote Link to comment Share on other sites More sharing options...
Intelligentleman Posted October 3, 2021 Author Share Posted October 3, 2021 2 minutes ago, carlsson said: Here is the listing, Aquarius-fied (as far as I could tell) for you: 100 sm=12288:sw=40 120 print chr$(11):input"program speed";sp 140 if sp<0 then 120 150 bs=int(rnd(1)*10)+1:bv=int(rnd(1)*10)+1 160 print chr$(11) 170 py=23:px=int(sw/2):i=sm+py*40+px 175 pokei,45:i=i+1:pokei,43:i=i+1:pokei,45 180 py=22:px=px+1:pokesm+py*40+px,111 190 py=24:pokesm+py*40+px,73 200 ta=0:sc=0 210 t=t+1:if t=3200 then t=1 220 bx=int(bs*t):md=int(bx/(2*sw)):bx=bx-(2*sw*md) 230 if bx>=sw then bx=2*sw-bx 240 if bx=0 then bx=1 250 if bx>sw-3 then bx=sw-3 260 by=int(4+(3*sin(t*bv))) 270 px=bx:py=by:i=sm+py*40+px 275 pokei,94:i=i+1:pokei,79:i=i+1:pokei,94 280 b$=inkey$:for x=1 to 15:q$=inkey$:next 285 if b$<>"" and ta=0 then gosub 370 290 if ta=1 then gosub 410 300 for pe=0 to sp*10:next 310 px=bx:py=by:i=sm+py*40+px 315 pokei,32:i=i+1:pokei,32:i=i+1:pokei,32 320 goto210 370 sound(100,50):mt=0:mx=int(sw/2)-1:my=22 380 mv=4:ma=.5:ta=1:sc=sc+1 390 px=mx:py=my:pokesm+py*40+px,77 400 return 410 px=mx:py=my:pokesm+py*40+px,32 420 my=int(my-mv):mv=mv-ma 430 if my>22 then ta=0:return 440 px=mx:py=my:pokesm+py*40+px,77 450 if abs(my-by)>1 then 470 460 if abs(mx-bx)<2 then 480 470 return 480 sound(50,200):printchr$(11);"the parrot got the meatball!" 490 print"you got that in";sc;" tries!" 500 end I removed a bunch of subroutines and replaced with inline code instead, since you don't need to cater for IBM or Apple compatibility when you run Mattel hardware. I don't know how to properly do RANDOMIZE so I left that part out too. The program would have room for quite a few enhancements, like at least use some of the built-in graphics symbols, perhaps add colours (located at sm+1024) and more. I know what I’m doing when the kids go to bed! Thanks carlsson 1 Quote Link to comment Share on other sites More sharing options...
Intelligentleman Posted October 3, 2021 Author Share Posted October 3, 2021 (edited) Is it Possible to edit a line for a typo in extended BASIC? Getting there, but forgot a colon in line 175 Edited October 3, 2021 by Intelligentleman Quote Link to comment Share on other sites More sharing options...
Intelligentleman Posted October 3, 2021 Author Share Posted October 3, 2021 (edited) I think it worked? Edited October 3, 2021 by Intelligentleman 1 Quote Link to comment Share on other sites More sharing options...
Aquaman Posted October 4, 2021 Share Posted October 4, 2021 On 10/3/2021 at 4:03 AM, Intelligentleman said: Is it Possible to edit a line for a typo in extended BASIC? Getting there, but forgot a colon in line 175 Yes, with EDIT. But I guess you already figured that out by yourself by now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.