| |
rupy
Registered: Mar 2020 Posts: 27 |
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.... |
| |
S.E.S.
Registered: Apr 2010 Posts: 19 |
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 |
| |
rupy
Registered: Mar 2020 Posts: 27 |
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. |
| |
S.E.S.
Registered: Apr 2010 Posts: 19 |
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). |
| |
Silver Dream !
Registered: Nov 2005 Posts: 107 |
Quoting rupyThanks 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. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11100 |
would be interesting to know what kind of tool the original author used - so you can avoid it =P |
| |
hedning
Registered: Mar 2009 Posts: 4586 |
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 [compiled]. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11100 |
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* |
| |
hedning
Registered: Mar 2009 Posts: 4586 |
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. |
| |
TWW
Registered: Jul 2009 Posts: 541 |
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. |
| |
Adam
Registered: Jul 2009 Posts: 321 |
>C:0800 @zha@.2076 austrospeed 1e
Austro Speed Compiler
? |
Previous - 1 | 2 - Next |