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


Forums > C64 Coding > Compile basic program to .prg
2020-09-08 01:30
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....
 
2020-09-08 08:47
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
2020-09-08 11:04
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.
2020-09-08 11:33
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).
2020-09-08 13:22
Silver Dream !

Registered: Nov 2005
Posts: 107
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
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
2020-09-08 13:51
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].
2020-09-08 15:20
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*
2020-09-08 20:31
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.
2020-09-08 21:11
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.
2020-09-09 09:27
Adam

Registered: Jul 2009
Posts: 321
>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
E$G/hOKUtO fOrcE
CA$H/TRiAD
HBH.ZTH/Abnormal
Guests online: 77
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.056 sec.