Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 14 Dec 2018, 01:23
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Getting BASIC programs compiled in Puppy?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 4 [50 Posts]   Goto page: 1, 2, 3, 4 Next
Author Message
Puppyt

Joined: 09 May 2008
Posts: 843
Location: Gatton, Queensland

PostPosted: Tue 25 Jul 2017, 04:57    Post subject:  Getting BASIC programs compiled in Puppy?
Subject description: Is there a quick recipe for getting old games going in Puppy Linux?
 

OK so I'm a tragic from the '80's era when type-in-yourself BASIC software was to be found in most computer magazines. I still have a treasured first-edition copy of David Ahls' "More BASIC Computer Games". But I haven't really done anything programming-wise since.

My question to the forum is: What is the most elegant way to resurrect the games - line numbers and all - to play in Puppy?
a) PuppyBasic? (MU's reworking of wxBasic http://puppylinux.org/wikka/PuppyBasic) Pets not working in XenialPup 7.0.4.

b) FreeBasic? https://www.freebasic.net/ Seems to have installed without drama but I can't start it up from console

c) BaCon 3.5.4 somehow, cut'n'paste into Geany and save as the text file as an excecutable?http://www.basic-converter.org/ Perhaps some versions of Puppy, such as Wary, might be best suited to such an exercise OOTB. I use XenialPup32 mostly nowadays, so I guess I would have to install BaCon,

d) some other compiler? PureBasic perhaps https://www.purebasic.com/introduction_linux.php. Trying not to go the WINE route and install GW-Basic, that would do the deed (e.g., https://web-beta.archive.org/web/20161013090801/http://www.gw-basic.com:80/downloads.html [UPDATE: gwbasic (v 3.23 from various sources, just keeps 'dropping out' in Wine v2.1. WineHQ lists it as "garbage". Basica also drops out - I get a flash of a black terminal window only)] . Should I try PC-Basic or other non-GPL routes?
[UPDATE: Followed pcbasic's installation documentation for Linux (Ubuntu) and downloaded/installed extra python dependencies without problem. I've got python2.7 in, but during the install pcbasic insists on returning "Python 2 not found" errors and bailing. Don't know what to do there. Looks like a job for DosBox and gwbasic, at present...]

Essentially I have been a bit of a headless chook about it, and nothing I have attempted has worked. Perhaps I am missing something obvious and straightforward, so would appreciate some fresh eyes on the problem.

No need to type the lines anymore as all the "classic" games and more are available online. Recently even Usborne released their 80's titles for free pdf downloads https://usborne.com/browse-books/features/computer-and-coding-books/, down in the bottom third of the page. To illustrate, here's another example from http://www.atariarchives.org/adventure/software/werewolves.txt - how can I copy this into Geany or whatever, maybe rename as a .BAS file, and run? Any suggestions would be kindly received Smile
P.S. Am aware that a fair bit of history has passed regarding the dropping of line numbers etc from BASIC - even dropping BASIC...

Code:
10 REM WEREWOLVES AND WANDERER
20 GOSUB 2600:REM INITIALISE
30 GOSUB 160
40 IF RO <> 11 THEN 30
50 PRINT:PRINT "YOU'VE DONE IT!!":GOSUB 3520:PRINT "THAT WAS THE EXIT FROM THE CASTLE"
60 GOSUB 3520
70 PRINT:PRINT "YOU HAVE SUCCEEDED, ";N$;"!"
80 PRINT:PRINT "YOU MANAGED TO GET OUT OF THE CASTLE"
90 GOSUB 3520
100 PRINT:PRINT "WELL DONE!"
110 GOSUB 3520
120 PRINT:PRINT "YOUR SCORE IS";
130 PRINT 3*TALLY + 5*STRENGTH + 2*WEALTH + FOOD + 30*MK
140 END
150 REM **********************
160 REM MAJOR HANDLING ROUTINE
170 STRENGTH = STRENGTH - 5
180 IF STRENGTH<10 THEN PRINT "WARNING, ";N$;", YOUR STRENGTH":PRINT "IS RUNNING LOW":PRINT
190 IF STRENGTH < 1 THEN 2300:REM DEATH
200 TALLY = TALLY + 1
210 PRINT N$;", YOUR STRENGTH IS";STRENGTH
220 IF WEALTH > 0 THEN PRINT "YOU HAVE $ ";WEALTH
230 IF FOOD > 0 THEN PRINT "YOUR PROVISIONS SACK HOLDS";FOOD;"UNITS OF FOOD"
240 IF SUIT = 1 THEN PRINT "YOU ARE WEARING ARMOR"
250 IF AXE=0 AND SWORD=0 AND AMULET=0 THEN 320
260 PRINT "YOU ARE CARRYING ";
270 IF AXE=1 THEN PRINT "AN AXE ";
280 IF SWORD=1 THEN PRINT "A SWORD ";
290 IF SWORD + AXE > 0 AND AMULET=1 THEN PRINT "AND ";
300 IF AMULET=1 THEN PRINT "THE MAGIC AMULET"
310 PRINT
320 IF LIGHT=0 THEN PRINT "IT IS TOO DARK TO SEE ANYTHING"
330 IF LIGHT=1 THEN GOSUB 990:REM ROOM DESCRIPTION
340 K = A(RO,7):REM K IS SET TO CONTENTS OF ROOM
350 IF K=0 THEN 440:REM ROOM IS EMPTY
360 IF K>9 THEN PRINT "THERE IS TREASURE HERE WORTH $";K:GOTO 440
370 PRINT:PRINT:PRINT "DANCER...THERE IS A MONSTER HERE....":GOSUB 3520
380 IF K=-1 THEN M$="FEROCIOUS WEREWOLF":FF=5
390 IF K=-2 THEN M$="FANATICAL FLESHGORGER":FF=10
400 IF K=-3 THEN M$="MALOVENTY MALDEMER":FF=15
410 IF K=-4 THEN M$="DEVASTATING ICE-DRAGON":FF=20
420 PRINT:PRINT "IT IS A ";M$
430 PRINT:PRINT "THE DANGER LEVEL IS";FF;"!!"
440 GOSUB 3520
450 PRINT:PRINT:PRINT "WHAT DO YOU WANT TO DO";
460 INPUT A$:A$=LEFT$(A$,1)
470 IF K<0 AND A$<>"F" AND A$<>"R" THEN 460
480 PRINT:PRINT:PRINT "------------------------------------":PRINT
490 IF A$="Q" THEN 120
500 IF A$="N" AND A(RO,1)=0 THEN PRINT "NO EXIT THAT WAY":GOTO 440
510 IF A$="S" AND A(RO,2)=0 THEN PRINT "THERE IS NO EXIT SOUTH":GOTO 440
520 IF A$="E" AN> A(RO,3)=0 THEN PRINT "YOU CANNOT GO IN THAT DIRECTION":GOTO 440
530 IF A$="W" AND A(RO,4)=0 THEN PRINT "YOU CANNOT MOVE THROUGH SOLID STONE":GOTO 440
540 IF A$="U" AND A(RO,5)=0 THEN PRINT "THERE IS NO WAY UP FROM HERE":GOTO 440
550 IF A$="D" AND A(RO,6)=0 THEN PRINT "YOU CANNOT DESCEND FROM HERE":GOTO 440
560 IF A$="R" AND RND(1)>.7 THEN 2420
570 IF A$="R" THEN PRINT "WHICH WAY DO YOU WANT TO FLEE";:GOTO 1160
580 IF A$="F" AND A(RO,7)>-1 THEN PRINT "THERE IS NOTHING TO FIGHT HERE":GOTO 440
590 IF A$="I" THEN GOSUB 3010:RETURN
600 IF A$="C" AND FOOD=0 THEN PRINT "YOU HAVE NO FOOD":GOTO 440
610 IF A$="P" THEN GOSUB 2350:RETURN
620 IF A$="F" THEN 730
630 IF A$="M" THEN RO=INT(RND(1)*19)+1:IF RO=6 OR RO=11 THEN 630 ELSE 710
640 IF A$="C" THEN GOSUB 2480:RETURN
650 IF A$="N" THEN RO=A(RO,1)
660 IF A$="S" THEN RO=A(RO,2)
670 IF A$="E" THEN RO=A(RO,3)
680 IF A$="W" THEN RO=A(RO,4)
690 IF A$="U" THEN RO=A(RO,5)
700 IF A$="D" THEN RO=A(RO,6)
710 RETURN
720 REM ******************************
730 REM FIGHT
740 IF INKEY$<>"" THEN 740
750 PRINT "PRESS ANY KEY TO FIGHT"
760 IF INKEY$="" THEN 760
770 IF SUIT=1 THEN PRINT "YOUR ARMOR INCREASES YOUR CHANCE OF SUCCESS":FF=3*(INT(FF/4)):GOSUB 3520
780 CLS:FOR J=1 TO 6:PRINT "*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*":NEXT J
790 IF AXE=0 AND SWORD=0 THEN PRINT "YOU HAVE NO WEAPONS":PRINT "YOU MUST FIGHT WITH BARE HANDS":FF=INT(FF + FF/5):GOTO 870
800 IF AXE=1 AND SWORD=0 THEN PRINT "YOU HAVE ONLY AN AXE TO FIGHT WITH":FF=4*INT(FF/5):GOTO 870
810 IF AXE=0 AND SWORD=1 THEN PRINT "YOU MUST FIGHT WITH YOUR SWORD":FF=3*INT(FF/4):GOTO 870
820 INPUT "WHICH WEAPON? 1 - AXE, 2 - SWORD";Z
830 IF Z<1 OR Z>2 THEN 820
840 IF Z=1 THEN FF=4*INT(FF/5)
850 IF Z=2 THEN FF=3*INT(FF/4)
860 REM *************************
870 REM THE BATTLE
880 PRINT:PRINT
890 IF RND(1)>.5 THEN PRINT M$;" ATTACKS" ELSE PRINT "YOU ATTACK"
900 GOSUB 3520
910 IF RND(1)>.5 THEN PRINT:PRINT "YOU MANAGE TO WOUND IT":FF=INT(5*FF/6)
920 GOSUB 3520
930 IF RND(1)>.5 THEN PRINT:PRINT "THE MONSTER WOUNDS YOU!":STRENGTH=STRENGTH-5
940 IF RND(1)>.35 THEN 890
950 IF RND(1)*16>FF THEN PRINT:PRINT "AND YOU MANAGED TO KILL THE ";M$:MK=MK+1:GOTO 970
960 PRINT:PRINT "THE ";M$;" DEFEATED YOU":STRENGTH=INT(STRENGTH/2)
970 A(RO,7)=0:GOSUB 3410:PRINT:PRINT:GOSUB 3520:RETURN
980 REM ******************
990 REM ROOM DESCRIPTIONS
1000 PRINT:PRINT "**************************":PRINT:PRINT
1010 ON RO GOSUB 1040,1100,1170,1230,1280,1360,1410,1470,1540,1620,1700,1730,1790,1860,1960,2030,2100,2160,2230
1020 RETURN
1030 REM ************
1040 REM ROOM1
1050 PRINT "YOU ARE IN THE HALLWAY"
1060 PRINT "THERE IS A DOOR TO THE SOUTH"
1070 PRINT "THROUGH WINDOWS TO THE NORTH YOU CAN SEE A SECRET HERB GARDEN"
1080 RETURN
1090 REM ************
1100 REM ROOM 2
1110 PRINT "THIS IS THE AUDIENCE CHAMBER"
1120 PRINT "THERE IS A WINDOW TO THE WEST. BY LOOKING TO THE RIGHT"
1130 PRINT "THROUGH IT YOU CAN SEE THE ENTRANCE TO THE CASTLE."
1140 PRINT "DOORS LEAVE THIS ROOM TO THE NORTH, EAST AND SOUTH"
1150 RETURN
1160 REM ************
1170 REM ROOM 3
1180 PRINT "YOU ARE IN THE GREAT HALL, AN L-SHAPED ROOM"
1190 PRINT "THERE ARE DOORS TO THE EAST AND TO THE NORTH"
1200 PRINT "IN THE ALCOVE IS A DOOR TO THE WEST'
1210 RETURN
1220 REM ************
1230 REM ROOM 4
1240 PRINT "THIS IS THE MONARCH'S PRIVATE MEETING ROOM"
1250 PRINT "THERE IS A SINGLE EXIT TO THE SOUTH"
1260 RETURN
1270 REM ************
1280 REM ROOM 5
1290 PRINT "THIS INNER HALLWAY CONTAINS A DOOR TO THE NORTH,"
1300 PRINT "AND ONE TO THE WEST, AND A CIRCULAR STAIRWELL"
1310 PRINT "PASSES THROUGH THE ROOM"
1320 PRINT "YOU CAN SEE AN ORNAMENTAL LAKE THROUGH THE"
1330 PRINT "WINDOWS TO THE SOUTH"
1340 RETURN
1350 REM ************
1360 REM ROOM 6
1370 PRINT "YOU ARE AT THE ENTRANCE TO A FORBIDDING-LOOKING"
1380 PRINT "STONE CASTLE. YOU ARE FACING EAST"
1390 RETURN
1400 REM ************
1410 REM ROOM 7
1420 PRINT "THIS IS THE CASTLE'S KITCHEN THROUGH WINDOWS IN"
1430 PRINT "THE NORTH WALL YOU CAN SEE A SECRET HERB GARDEN."
1440 PRINT "A DOOR LEAVES THE KITCHEN TO THE SOUTH"
1450 RETURN
1460 REM **************
1470 REM ROOM 8
1480 PRINT "YOU ARE IN THE STORE ROOM, AMIDST SPICES,"
1490 PRINT "VEGETABLES, AND VAST SACKS OF FLOUR AND"
1500 PRINT "OTHER PROVISIONS. THERE IS A DOOR TO THE NORTH"
1510 PRINT "AND ONE TO THE SOUTH"
1520 RETURN
1530 REM **************
1540 REM ROOM 9
1550 PRINT "YOU HAVE ENTERED THE LIFT..."
1560 GOSUB 3520
1570 PRINT "IT SLOWLY DESCENDS..."
1580 GOSUB 3520
1590 RO=10
1600 GOTO 1000
1610 REM ************************
1620 REM ROOM 10
1630 PRINT "YOU ARE IN THE REAR VESTIBULE"
1640 PRINT "THERE ARE WINDOWS TO THE SOUTH FROM WHICH YOU"
1650 PRINT "YOU CAN SEE THE ORNAMENTAL LAKE"
1660 PRINT "THERE IS AN EXIT TO THE EAST AND"
1670 PRINT "ONE TO THE NORTH"
1680 RETURN
1690 REM *****************
1700 REM ROOM 11
1710 RETURN
1720 REM ****************
1730 REM ROOM 12
1740 PRINT "YOU ARE IN THE DANK, DARK DUNGEON"
1750 PRINT "THERE IS A SINGLE EXIT, A SMALL HOLE IN"
1760 PRINT "WALL TOWARDS THE WEST"
1770 RETURN
1780 REM ****************
1790 REM ROOM 13
1800 PRINT "YOU ARE IN THE PRISON GUARDROOM, IN THE"
1810 PRINT "BASEMENT OF THE CASTLE. THE STAIRWELL"
1820 PRINT "ENDS IN THIS ROOM. THERE IS ONE OTHER"
1830 PRINT "EXIT, A SMALL HOLE IN THE EAST WALL"
1840 RETURN
1850 REM ****************
1860 REM ROOM 14
1870 PRINT "YOU ARE IN THE MASTER BEDROOM ON THE UPPER"
1880 PRINT "LEVEL OF THE CASTLE...."
1890 PRINT "LOOKING DOWN FROM THE WINDOW TO THE WEST YOU"
1900 PRINT "CAN SEE THE ENTRANCE TO THE CASTLE, WHILE THE"
1910 PRINT "SECRET HERB GARDEN IS VISIBLE BELOW THE NORTH"
1920 PRINT "WINDOW. THERE ARE DOORS TO THE EAST AND"
1930 PRINT "TO THE SOUTH...."
1940 RETURN
1950 REM ***************
1960 REM ROOM 15
1970 PRINT "THIS IS THE L-SHAPPED UPPER HALLWAY."
1980 PRINT "TO THE NORTH IS A DOOR, AND THERE IS A"
1990 PRINT "STAIRWELL IN THE HALL AS WELL. YOU CAN SEE"
2000 PRINT "THE LAKE THROUGH THE SOUTH WINDOWS"
2010 RETURN
2020 REM ****************
2030 REM ROOM 16
2040 PRINT "THIS ROOM WAS USED AS THE CASTLE TREASURY IN"
2050 PRINT "BY-GONE YEARS...."
2060 PRINT "THERE ARE NO WINDOWS, JUST EXITS TO THE"
2070 PRINT "NORTH AND TO THE EAST"
2080 RETURN
2090 REM **************
2100 REM ROOM 17
2110 PRINT "OOOOH...YOU ARE IN THE CHAMBERMAIDS' BEDROOM"
2120 PRINT "THERE IS AN EXIT TO THE WEST AND A DOOR"
2130 PRINT "TO THE SOUTH...."
2140 RETURN
2150 REM ***************
2160 REM ROOM 18
2170 PRINT "THIS TINY ROOM ON THE UPPER LEVEL IS THE"
2180 PRINT "DRESSING CHAMBER. THERE IS A WINDOW TO THE"
2190 PRINT "NORTH, WITH A VIEW OF THE HERB GARDEN DOWN"
2200 PRINT "BELOW. A DOOR LEAVES TO THE SOUTH"
2210 RETURN
2220 REM ************
2230 REM ROOM 19
2240 PRINT "THIS IS THE SMALL ROOM OUTSIDE THE CASTLE"
2250 PRINT "LIFT WHICH CAN BE ENTERED BY A DOOR TO THE NORTH"
2260 PRINT "ANOTHER DOOR LEADS TO THE WEST. YOU CAN SEE"
2270 PRINT "THE LAKE THROUGH THE SOUTHERN WINDOWS"
2280 RETURN
2290 REM **************
2300 REM DEAD END
2310 PRINT "YOU HAVE DIED........."
2320 GOSUB 3520
2330 GOTO 120
2340 REM **************
2350 REM PICK UP TREASURE
2360 IF A(RO,7)<10 THEN PRINT "THERE IS NO TREASURE TO PICK UP":GOSUB 3520:RETURN
2370 IF LIGHT=0 THEN PRINT "YOU CANNOT SEE WHERE IT IS":GOSUB 3520:RETURN
2380 WEALTH=WEALTH + A(RO,7)
2390 A(RO,7)=0
2400 RETURN
2410 REM **************
2420 REM UNSUCCESSFUL ATTEMPT TO RUN
2430 PRINT "NO YOU MUST STAND AND FIGHT"
2440 A$="F"
2450 GOSUB 3520
2460 GOTO 590
2470 REM **************
2480 REM EAT FOOD
2490 CLS
2500 IF FOOD<1 THEN RETURN
2510 PRINT "YOU HAVE";FOOD;"UNITS OF FOOD"
2520 PRINT "HOW MANY DO YOU WANT TO EAT";
2530 INPUT Z
2540 IF Z>FOOD THEN 2530
2550 FOOD=INT(FOOD-Z)
2560 STRENGTH=INT(STRENGTH+5*Z)
2570 GOSUB 3410:CLS
2580 RETURN
2590 REM ***********
2600 REM INITIALISE
2610 CLS
2620 STRENGTH=100
2630 WEALTH=75
2640 FOOD=0
2650 TALLY=0
2660 MK=0:REM NO. OF MONSTERS KILLED
2670 REM **************
2680 REM SET UP CASTLE
2690 DIM A(19,7)
2700 FOR B=1 TO 19
2710 FOR C=1 TO 7
2720 READ A(B,C)
2730 NEXT C
2740 NEXT B
2750 INPUT "WHAT IS YOUR NAME, EXPLORER";N$
2760 CLS
2770 RO=6:REM STARTING POSITION (RO=ROOM NUMBER)
2780 SWORD=0
2790 AMULET=0
2800 AXE=0
2810 SUIT=0
2820 LIGHT=0
2830 REM **************
2840 REM ALLOT TREASURE
2850 FOR J = 1 TO 4
2860 M=INT(RND(1)*19)+1
2870 IF M=6 OR M=11 OR A(M,7)<>0 THEN 2860
2880 A(M,7)=INT(RND(1)*100)+10
2890 NEXT J
2900 REM **************
2910 REM ALLOT MONSTERS
2920 FOR J = 1 TO 4
2930 M=INT(RND(1)*18)+1
2940 IF M=6 OR M=11 OR A(M,7)<>0 THEN 2930
2950 A(M,7)= -J
2960 NEXT J
2970 A(4,7)=100+INT(RND(1)*100)
2980 A(16,7)=100+INT(RND(1)*100)
2990 RETURN
3000 REM ****************************
3010 REM INVENTORY/PROVISIONS
3020 PRINT "PROVISIONS & INVENTORY"
3030 GOSUB 3260
3040 IF WEALTH<.1 THEN Z=0:GOTO 3130
3050 PRINT "YOU CAN BUY 1 - FLAMING TORCH ($15)"
3060 PRINT "            2 - AXE ($10)"
3070 PRINT "            3 - SWORD ($20)"
3080 PRINT "            4 - FOOD ($2 PER UNIT)"
3090 PRINT "            5 - MAGIC AMULET ($30)"
3100 PRINT "            6 - SUIT OF ARMOR ($50)"
3110 PRINT "            0 - TO CONTINUE ADVENTURE"
3120 INPUT "ENTER NO. OF ITEM REQUIRED";Z
3130 IF Z=0 THEN CLS:RETURN
3140 IF Z=1 THEN LIGHT=1:WEALTH=WEALTH-15
3150 IF Z=2 THEN AXE=1:WEALTH=WEALTH-10
3160 IF Z=3 THEN SWORD=1:WEALTH=WEALTH-20
3170 IF Z=5 THEN AMULET=1:WEALTH=WEALTH-30
3180 IF Z=6 THEN SUIT=1:WEALTH=WEALTH-50
3190 IF WEALTH<0 THEN PRINT "YOU HAVE TRIED TO CHEAT ME!":WEALTH=0:SUIT=0:LIGHT=0:AXE=0:SWORD=0:AMULET=0:FOOD=INT(FOOD/4):GOSUB 3520
3200 IF Z<>4 THEN 3030
3210 INPUT "HOW MANY UNITS OF FOOD";Q:Q=INT(Q)
3220 IF 2*Q>WEALTH THEN PRINT "YOU HAVEN'T GOT ENOUGH MONEY":GOTO 3210
3230 FOOD=FOOD+Q
3240 WEALTH=WEALTH-2*Q
3250 GOTO 3030
3260 IF WEALTH>0 THEN PRINT:PRINT:PRINT "YOU HAVE $";WEALTH
3270 IF WEALTH=0 THEN PRINT "YOU HAVE NO MONEY":GOSUB 3520:RETURN
3280 FOR J=1 TO 4:PRINT:NEXT J
3290 RETURN
3300 REM ******************
3310 DATA 0,2,0,0,0,0,0:REM ROOM 1
3320 DATA 1,3,3,0,0,0,0:REM ROOM 2
3330 DATA 2,0,5,2,0,0,0:REM ROOM 3
3340 DATA 0,5,0,0,0,0,0:REM ROOM 4
3350 DATA 4,0,0,3,15,13,0:REM ROOM 5
3360 DATA 0,0,1,0,0,0,0: REM ROOM 6
3370 DATA 0,8,0,0,0,0,0: REM ROOM 7
3380 DATA 7,10,0,0,0,0,0: REM ROOM 8
3390 DATA 0,19,0,8,0,8,0:REM ROOM 9
3400 DATA 8,0,11,0,0,0,0:REM ROOM 10
3410 DATA 0,0,10,0,0,0,0:REM ROOM 11
3420 DATA 0,0,0,13,0,0,0:REM ROOM 12
3430 DATA 0,0,12,0,5,0,0:REM ROOM 13
3440 DATA 0,15,17,0,0,0,0:REM ROOM 14
3450 DATA 14,0,0,0,0,5,0:REM ROOM 15
3460 DATA 17,0,19,0,0,0,0:REM ROOM 16
3470 DATA 18,16,0,14,0,0,0:REM ROOM 17
3480 DATA 0,17,0,0,0,0,0:REM ROOM 18
3490 DATA 9,0,16,0,0,0,0:REM ROOM 19
3500 REM ******************
3510 REM ADJUST LOOP BELOW TO YOUR SYSTEM
3520 FOR T=1 TO 900:NEXT T
3530 RETURN

_________________
Search engines for Puppy
http://puppylinux.us/psearch.html; Google Custom Search; others TBA...

Last edited by Puppyt on Mon 10 Sep 2018, 07:39; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
6502coder


Joined: 23 Mar 2009
Posts: 492
Location: Western United States

PostPosted: Tue 25 Jul 2017, 13:41    Post subject:  

I can't help you with finding a suitable BASIC that will run in Puppy, but I wanted to point out that Atari BASIC was a very non-standard BASIC, particularly in the way it handled strings, and specifically it was very different from Microsoft BASIC. So it can take a fair amount of work to convert an Atari BASIC program to the kind of generic BASIC used in Ahl's book -- of which I too have a first edition, first printing copy!

And of course graphics commands in Atari BASIC were specific to the unique graphics hardware of the Atari, and would be show-stoppers unless you're running an Atari emulator.
Back to top
View user's profile Send private message 
Puppyt

Joined: 09 May 2008
Posts: 843
Location: Gatton, Queensland

PostPosted: Tue 25 Jul 2017, 19:15    Post subject:  

Thanks 6502coder, and good call on the Atari coding I gave as an example. Admittedly I only glazed over the code when I posted it, later I tested WEREWOLVES on an online compiler (http://www.quitebasic.com/) and had all sorts of headaches from the get-go (Line 170 onwards...)

Congrats too for hanging on to your Ahl volume - the first in the series I see! Ah, heady days... [EDIT: oops I misread - you have the "More" version too, judging from your emphasis also following. Headless Chook strikes again]

Well I had success of sorts after hitting a brick wall with WINE2.1 and GWBASIC3.23, before remembering [EDIT: in another computer project in a galaxy far far away] that I had a variant of BASIC working in DOSBox... struggling with getting the games directory 'mount'ed from the Z, I then recalled that I had it running via DBGL (DOSBox Games Launcher). So spent a few happy hours playing SEABAT for 'ol times sake last night (Gosh - haven't played that since dad bought home the ol' Kaypro I0...). All in all, not a really efficient solution to getting BAS games interpreted, in a Puppy environment.

As it was, I had to debug some typos (e.g, incomplete For-next functions) in some of the games I tried like WUMPUS1, due to 'modifications' someone has made for their particular BASIC version I guess.

Will have to leave my playtime for a while - the T60 I've been working on needs an overhaul, so I might shift my BASIC experiments to computer I have Wary on, and see what gives later on through the week,
Cheers!

_________________
Search engines for Puppy
http://puppylinux.us/psearch.html; Google Custom Search; others TBA...

Last edited by Puppyt on Thu 27 Jul 2017, 02:17; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
6502coder


Joined: 23 Mar 2009
Posts: 492
Location: Western United States

PostPosted: Wed 26 Jul 2017, 16:01    Post subject:  

VintageBasic looks interesting:
http://www.vintage-basic.net/
The author even has a collection of programs from Ahl's FIRST book, "BASIC Computer Games", tweaked to run on Vintage Basic, so this might be right up your alley.
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 492
Location: Western United States

PostPosted: Wed 26 Jul 2017, 19:03    Post subject:  

I downloaded the "Generic Linux" build of VintageBasic. Since it was built for Ubuntu 8.10 I figured it had a good chance of running on my TahrPup 6.0.6 system. The archive file is only about 350K, and includes the User Guide doc.

It turns out the "vintbas" program needs "libgmp.so.3". TahrPup 6.0.6 has /usr/lib/libgmp.so.10.1.3, so I simply cd'd to ~/my-applications/lib and made a symlink:

Code:
$ cd  ~/my-applications/lib
$ ln  -s  /usr/lib/libgmp.so.10.1.3  libgmp.so.3


and I was in business. I wrote and tested a short BASIC program, then successfully ran the "aceyducey.bas" game from the VintageBasic site's game collection. This is looking like a very nice way to get a retro BASIC interpreter running on Puppy, if what you want to run are old "line numbered" BASIC programs and not modern "structured" BASIC programs.
Back to top
View user's profile Send private message 
Puppyt

Joined: 09 May 2008
Posts: 843
Location: Gatton, Queensland

PostPosted: Wed 26 Jul 2017, 20:14    Post subject:  

Cheers 6502coder - I'll give the VintageBASIC a go, and I appreciate your testing very much, thank you! I was headed up the alley of DosBOX+gwbasic and was coming across all sorts of random freezes. Testimony to the hobbyist nature of those BAS game files I was testing I think - mostly Seabat.bas (Seabattle), with their respective modification histories for different Basic variants, and perhaps uncompleted bug-testing.
I note there are compiler/interpreters that claim to manage with and without line numbers, and there was a sourceforge project (Exil) that could strip line numbers, but, like, whatevs Smile I'm crazy, but not that bad... I'm happy with my little piece of line-numbered nostalgia.

Thanks again for taking the time with your instructable, too - encouraging to know that there is a more elegant workaround to BAS file interpreting in Puppy Linux.

P.S. all I need to do now is modify the text colors to replace the white with Osborne-1 amber or Kaypro-10 green screens, and I'm set Smile Who needs MAME cabinets and Atari ROMS ??

_________________
Search engines for Puppy
http://puppylinux.us/psearch.html; Google Custom Search; others TBA...
Back to top
View user's profile Send private message Visit poster's website 
rockedge


Joined: 11 Apr 2012
Posts: 884
Location: Connecticut, United States

PostPosted: Wed 26 Jul 2017, 20:37    Post subject:  

DosBox with QuickBasic 4.5. Works really well on Tahr 6+, Precise and Lucid. I have tried FreeBasic and compiled some Linux binaries which worked..but QB4.5 allows running and debugging in a GUI editor and interpreter and supports compiling.
Back to top
View user's profile Send private message Visit poster's website 
Puppyt

Joined: 09 May 2008
Posts: 843
Location: Gatton, Queensland

PostPosted: Wed 26 Jul 2017, 21:11    Post subject:  

Thanks rockedge for the tips on QB4.5 - glad to see you could get FreeBasic going, I couldn't but I wasn't exhaustive with my diagnostics - similar result for PC-Basic. Sounds like a good weekend project - getting a proper/fresh Puppy install for a dedicated solution. Now you have me thinking I could try QB64 http://www.qb64.net/... Thanks again.
_________________
Search engines for Puppy
http://puppylinux.us/psearch.html; Google Custom Search; others TBA...
Back to top
View user's profile Send private message Visit poster's website 
Puppyt

Joined: 09 May 2008
Posts: 843
Location: Gatton, Queensland

PostPosted: Thu 27 Jul 2017, 00:16    Post subject:  

This thread is another example of me trying to reinvent a third wheel. If I'd actually done a little homework:
QB64 - QuickBasic for Linux, Windows http://www.murga-linux.com/puppy/viewtopic.php?search_id=533034694&t=78278
Is there a Basic (programming language) for Linux? http://www.murga-linux.com/puppy/viewtopic.php?t=80858&search_id=533034694
QB64 a MS Quick Basic clone for Linux http://www.murga-linux.com/puppy/viewtopic.php?t=81497&search_id=533034694

I guess that if any variant of BASIC were to run native in Puppy Linux, we already have BaCon and Geany (FreeBasic IDE support). Actually interpreting ye olde BAS format basic files OOTB? Well that would seem to be a tinkerer's dream.

_________________
Search engines for Puppy
http://puppylinux.us/psearch.html; Google Custom Search; others TBA...
Back to top
View user's profile Send private message Visit poster's website 
8Geee


Joined: 12 May 2008
Posts: 1751
Location: N.E. USA

PostPosted: Thu 27 Jul 2017, 16:53    Post subject:  

@6502Coder

Just wow... reference to "The Bible" with front-cover illustration. I also had a copy of "More" with red cover. From the days of RPN calculator entry.

BTW I see the authors of this BASIC have included "One_Check". A solitaire game that removes all checkers from the board except the last one. You could write David Ahl for the solution(s). IIRC the checkers are around the outer-edge of the board with diagonal jumps only. Quite the brain-teaser.

Regards
8Geee

_________________
Linux user #498913

Some people need to reimagine their thinking.
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 492
Location: Western United States

PostPosted: Thu 27 Jul 2017, 17:55    Post subject:  

@8Geee

RPN calculators...! I had two -- an HP-25, and the very rare Sinclair Scientific; the latter had an accuracy marginally better than a 10" slide rule. Speaking of slide rules, I'd be embarrassed to admit how many of THOSE I've still got.

Back on topic...

I've done some more playing with VintageBasic.

I was able to get Greg Yob's classic WUMPUS working with just a few minor changes. I couldn't find a text file copy of the program in Ahl's book and didn't feel like retyping the whole thing. Luckily, I did find a copy of the Yob's original program as published in Creative Computing: it had only minor differences from the version in Ahl's book, and I was easily able to get it running under VintageBasic.

I was having so much fun that I decided to take on the Werewolves program Puppyt posted. Contrary to my expectations, it wasn't Atari BASIC's string handling that was the problem. Instead, the problems were these:

1. VintageBasic doesn't allow variable names that have keywords embedded in them. Thus a variable name like SWORD is illegal because it contains the keyword OR. So I had to rename a couple of variables.

2. Atari BASIC has an IF-THEN-ELSE construct. VintageBasic, in keeping with most BASICs of the time, does not. I worked around this using GOTOs.

3. Atari BASIC has an INKEY$ function which captures a keystroke, without requiring the user to hit RETURN. VintageBasic has no such function. I substituted an INPUT$, but to be honest, I don't understand why the author of this program was using INKEY$ to begin with.

Actually, all this was less hassle than it sounds. I got Werewolves working under VintageBasic pretty easily, although I'm not 100% sure I didn't break something during the conversion.

For anyone who might be interested, I've attached a zip archive with my versions of WUMPUS and Werewolves converted for VintageBasic.
VintBasProgs.zip
Description  ZIP archive with 2 BASIC programs for VintageBasic
zip

 Download 
Filename  VintBasProgs.zip 
Filesize  7.27 KB 
Downloaded  55 Time(s) 

Last edited by 6502coder on Fri 28 Jul 2017, 16:06; edited 1 time in total
Back to top
View user's profile Send private message 
Puppyt

Joined: 09 May 2008
Posts: 843
Location: Gatton, Queensland

PostPosted: Thu 27 Jul 2017, 18:57    Post subject:  

@8Geee - attached a shot to show that the past is here and now Smile

@6502coder - thank you so *MUCH* for working out on the Werewolf/VintageBasic issue, have downloaded and will test with great interest in my flakey DOSBox+gwbasic combo.

Actually, I am more certain now that the freezes are due to my version of Seabat.bas - it is organised in a very different way to the version published in my volume of "More" - going back to the original Ahl version always seems to be the safest bet. I actually found a few sites with the text file printouts of the Ahl volumes in historic searches, but can't find them so easy now. There are probably copies in my archives on various computers I've archived...

Writing in haste, though am a little clearer now on the main problem - I'm stuck in first-generation (line numbered, unstructured) Basic era nostalgia. A recipe for getting a suite of basic (Ahl?) classics running natively in Puppy might be 1) translate first-gen games into second-gen, 2) use BaCon to automagically compile into... brain hurts - only so much technological advancement in computer languages a bloke can handle on only his second coffee...
Must earn a crust now, but will find time today to test out the Werewolf conversion - cheers 6502coder! Then maybe later, back to WereBasic
morebasic.jpg
 Description   A snapshot in time
 Filesize   76.31 KB
 Viewed   347 Time(s)

morebasic.jpg


_________________
Search engines for Puppy
http://puppylinux.us/psearch.html; Google Custom Search; others TBA...
Back to top
View user's profile Send private message Visit poster's website 
Puppyt

Joined: 09 May 2008
Posts: 843
Location: Gatton, Queensland

PostPosted: Thu 27 Jul 2017, 20:12    Post subject:  

6502coder wrote:
...It turns out the "vintbas" program needs "libgmp.so.3". TahrPup 6.0.6 has /usr/lib/libgmp.so.10.1.3, so I simply cd'd to ~/my-applications/lib and made a symlink:

Code:
$ cd  ~/my-applications/lib
$ ln  -s  /usr/lib/libgmp.so.10.1.3  libgmp.so.3


and I was in business...

Whups I goofed on this one - such a basic (no pun intended) method of calling up waylaid dependencies in Puppy, I thought I had this pat but I don't seem to be understanding/getting your workaround functional. I think I need this either spelled out a bit more, or a link to a tutorial perhaps - does the script have to be named something explicit for vintbas to find libgmp.so.3 ?
I'm currently in Xenialpup 7.0.4 and I've made a symlink in ~/my applications/lib to /usr/lib/libgmp.so.10.3.0, and changed your script accordingly, but still no dice. Sorry 6502coder or anyone else who can set me back on track - I've skipped a crucial step in my Puppy ventures,
Cheers

UPDATE: Well of course I over-engineered the solution - my interpretation of "script" was your sequence of terminal commands, have adjusted to "ln -s /usr/lib/libgmp.so.10.3.0 libgmp.so.3" and voila!
Code:
Usage: vintbas SOURCE_FILE.bas
Script completed hit RETURN to close window.
Tadah!
Code:
root# vintbas wumpus.bas
INSTRUCTIONS (Y-N)?

Hmmmm how would I get working >Set Run Action (e.g., wumpus.bas)>vintbas"$1" ??

_________________
Search engines for Puppy
http://puppylinux.us/psearch.html; Google Custom Search; others TBA...
Back to top
View user's profile Send private message Visit poster's website 
Puppyt

Joined: 09 May 2008
Posts: 843
Location: Gatton, Queensland

PostPosted: Thu 27 Jul 2017, 20:59    Post subject:  

Story of my life Smile
Code:
root# vintbas wumpus.bas
INSTRUCTIONS (Y-N)? y
...
     ATTENTION ALL WUMPUS LOVERS!!!
     THERE ARE NOW TWO ADDITIONS TO THE WUMPUS FAMILY OF PROGRAMS.

     WUMP2:  SOME DIFFERENT CAVE ARRANGEMENTS
     WUMP3:  DIFFERENT HAZARDS

debug: setting up cave
debug: at 240 for loop
debug: at 290 for loop
debug: at 290 for loop
debug: at 290 for loop
debug: at 290 for loop
debug: at 290 for loop
debug: at 290 for loop
HUNT THE WUMPUS

I FEEL A DRAFT
BATS NEARBY!
YOU ARE IN ROOM  13
TUNNELS LEAD TO  12  14  20

SHOOT OR MOVE (S-M)? m
SHOOT OR MOVE (S-M)? M
WHERE TO? 12
YYYIIIIEEEE . . . FELL IN PIT
HA HA HA - YOU LOSE!
SAME SET-UP (Y-N)?

_________________
Search engines for Puppy
http://puppylinux.us/psearch.html; Google Custom Search; others TBA...
Back to top
View user's profile Send private message Visit poster's website 
6502coder


Joined: 23 Mar 2009
Posts: 492
Location: Western United States

PostPosted: Fri 28 Jul 2017, 15:59    Post subject:  

Those "debug" printouts are just stuff I added to help me during the conversion process, when I was diagnosing an infinite loop. You can delete those lines from the program.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 4 [50 Posts]   Goto page: 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

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
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1157s ][ Queries: 12 (0.0237s) ][ GZIP on ]