Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user LoWLiFe ! (Registered 2020-09-17) You are not logged in 
CSDb User Forums


Forums > C64 Coding > Compile basic program to .prg
2020-09-08 01:30
rupy

Registered: Mar 2020
Posts: 10
Compile basic program to .prg

I'm trying to google but I can't find any simple solutions on how to convert/compile a basic program into a .prg?

I just want to add joystick to this release and compile it into a .prg I can send over codenet to my C64:

https://zapakitul.itch.io/fallen-a-basic-roguelike-for-the-c64

I'm trying with MOSpeed and it's not going so great!
 
... 1 post hidden. Click here to view all posts....
 
2020-09-08 08:47
S.E.S.

Registered: Apr 2010
Posts: 18
If you've got a basic program in a text file and you just want to convert that text file into a real C64 basic .prg file, you can use petcat. petcat is part of Vice (WinVice):
https://vice-emu.sourceforge.io/vice_15.html#SEC289
2020-09-08 11:04
rupy

Registered: Mar 2020
Posts: 10
Thanks for the replies, but no cigar.

The basic is very particular: http://move.rupy.se/file/fallen.txt

bbcompile gives a tiny .prg that does nothing.

petcat gives a larger file that doesn't work either...

I think it's time for me to either roll up my sleeves and rewrite everything from scratch or abandon ship.
2020-09-08 11:33
S.E.S.

Registered: Apr 2010
Posts: 18
I just tried it myself: petcat does work when I used:
petcat -w2 -o fallen.prg fallen.txt
The thing is, the input file "fallen.txt" has some quirks that percat cannot handle.
Some examples:
- In "fallen.txt" in line 1, there is a questionmark "?" used as the abbrevation for print. Somehow, petcat doesn't recognize this and keeps the questionmark instead of using the print token.
- In several lines in "fallen.txt", the variables used are in uppercase letters. For instance: CM%, GM$, CN$, PH, and maybe more. petcat thinks that these uppercase letters are tokens of basic commands. Uppercase letter variables wouldn't work when you enter them on a regular C64 keyboard either, so all occurences of these would have to be replaced by corresponding lowercase variables.
- In several lines, the function "int" is written as "INT". Again, that should be lowercase.
So, if you patch the input file somewhat, it should work with petcat.
-- Edit: I patched the input file myself, and after several tries I think I've found and replaced all uppercase variables at last. There were several more, including single letter "T" and "X" variables that I missed before.
Also there were some occurences of "TO" (as in FOR ... = ... TO ...) that I had to convert to lowercase. Now the game works and I was able to play it (in WinVice).
2020-09-08 13:22
Silver Dream !

Registered: Nov 2005
Posts: 41
Quoting rupy
Thanks for the replies, but no cigar.
The basic is very particular: http://move.rupy.se/file/fallen.txt


And not much of a surprise that things don't go too well with it. Putting aside that there are lines longer than 80 chars even with abbreviated keywords (which makes editing on the C64 a nono), there are uppercase variable names (another nono). Rewriting without uppercase variables would be a bare minimum to try but I'd also drop the keyword abbreviations on the way. It should then tokenise correctly.
2020-09-08 13:32
Groepaz

Registered: Dec 2001
Posts: 9532
would be interesting to know what kind of tool the original author used - so you can avoid it =P
2020-09-08 13:51
hedning

Registered: Mar 2009
Posts: 2917
Quote: would be interesting to know what kind of tool the original author used - so you can avoid it =P

The whole backstory and process is told in the full docs, that you get when you buy the game, but its is also added in Fallen +2D.
2020-09-08 15:20
Groepaz

Registered: Dec 2001
Posts: 9532
unfortunately the only hint regarding tools is "I've setup the CBM Prg development environment and grabbed me a copy of Vice". Perhaps that means "CBM PRG Studio"? *shrug*
2020-09-08 20:31
hedning

Registered: Mar 2009
Posts: 2917
rupy also failed to mention that he would like to add joystick controls and compile it because he wants to sell it (?!). I read that on Lemon. Wtf..

Well the author does not seem to care, but that makes me not wanna help out.

Good luck rupy.
2020-09-08 21:11
TWW

Registered: Jul 2009
Posts: 476
For fun I copied over the basic program in the link above into c64 studio, upper cased it, expanded tokens and fixed the long lines. ran like a charm. Doubt it would tak long to replace the keyboard buffer reader with a joyport reader. You guys in GP already "cracked it" so why not add a patch for the original game or re-release it with joy support in addition to your bugfixes. Guess the sales prognosis would look pretty grim for Mr rupy then...

The original author can get in touch if he wanted to expand his game to assembler. I've tinkered with the code for my own dungeon crawler (yeah with joystick support this time^^) but way to lazy to design levels so perhaps these level algorithm could be integrated there for a more varied and full game experience.
2020-09-09 09:27
Adam

Registered: Jul 2009
Posts: 270
>C:0800 @zha@.2076 austrospeed 1e

Austro Speed Compiler
?
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
iAN CooG/HVSC
j0x
ZeSmasher/F4CG
DemongerX/Style
pyksy
tlr
Guests online: 57
Top Demos
1 Uncensored  (9.7)
2 Coma Light 13  (9.7)
3 Edge of Disgrace  (9.6)
4 Comaland 100%  (9.6)
5 Unboxed  (9.6)
6 The Shores of Reflec..  (9.6)
7 Lunatico  (9.6)
8 Remains  (9.5)
9 C=Bit 18  (9.5)
10 D50  (9.5)
Top onefile Demos
1 Cuarentenauta  (9.5)
2 Listen to Your Eyes  (9.5)
3 Dawnfall V1.1  (9.5)
4 Rewind  (9.5)
5 Instinct  (9.5)
6 Daah, Those Acid Pil..  (9.5)
7 Crystal Gazer  (9.5)
8 Smile to the Sky  (9.5)
9 The Tuneful Eight [u..  (9.5)
10 Bad Boy  (9.5)
Top Groups
1 Fossil  (9.4)
2 PriorArt  (9.4)
3 Booze Design  (9.4)
4 Censor Design  (9.3)
5 Performers  (9.3)
Top Diskmag Editors
1 hedning  (9.8)
2 Jazzcat  (9.5)
3 Newscopy  (9.4)
4 A Life in Hell  (9.2)
5 Peter  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2020
Page generated in: 0.266 sec.