VIC IDE
Moderator: Moderators
- Pedro Lambrini
- Vic 20 Scientist
- Posts: 1132
- Joined: Mon Dec 01, 2008 11:36 am
VIC IDE
I enjoy writing bits of tat in BASIC but I'm now spoiled by decent text editors and the like with insertion and cutting & pasting etc and I get frustrated trying to edit on the Vic so my programming stints run short.
So, I was wondering... Is there some kind of IDE for writing Vic games in BASIC? The C16/+4 has Plus4IDE and the C64 has the wonderful C64 PRG Gen. I vaguely remember something for the Vic from years ago but I can't find it (can't remember what it was called!) and I don't remember it being greatly useable...
So, I was wondering... Is there some kind of IDE for writing Vic games in BASIC? The C16/+4 has Plus4IDE and the C64 has the wonderful C64 PRG Gen. I vaguely remember something for the Vic from years ago but I can't find it (can't remember what it was called!) and I don't remember it being greatly useable...
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Thus far I haven't tried C64 PRG Gen. But VIC-20, and C64 have - for all intents and purposes - the same BASIC V2 under the hood. You might try writing a program in the IDE, and transferring it to the VIC, or VICE.
There's no need to worry about different loading addresses. When BASIC programs are loaded with ',8' (not ',8,1'!), they are loaded to the BASIC start, and internal pointers are adjusted automatically.
Michael
There's no need to worry about different loading addresses. When BASIC programs are loaded with ',8' (not ',8,1'!), they are loaded to the BASIC start, and internal pointers are adjusted automatically.
Michael
I believe the program you remember is BasEdit by Schlowski:
http://sleepingelephant.com/ipw-web/bul ... .php?t=395
Otherwise you can use your favorite text editor plus an external tokenizer like the command line tool petcat which comes with the VICE emulator package. It is a bit dificult to enter control codes and character graphics, but otherwise you get a very nice environment. If you use a powerful editor like Emacs you may even bind a key combination to "compile" the Basic text to a tokenized PRG.
http://sleepingelephant.com/ipw-web/bul ... .php?t=395
Otherwise you can use your favorite text editor plus an external tokenizer like the command line tool petcat which comes with the VICE emulator package. It is a bit dificult to enter control codes and character graphics, but otherwise you get a very nice environment. If you use a powerful editor like Emacs you may even bind a key combination to "compile" the Basic text to a tokenized PRG.
Anders Carlsson






- Pedro Lambrini
- Vic 20 Scientist
- Posts: 1132
- Joined: Mon Dec 01, 2008 11:36 am
Aha! BasEdit was the program I was thinking of. Unfortunately I only have access to Vista and it doesn't work (runtime errors...).
As far as petcat goes I didn't even know what it was and I can't seem to find docs on how to use it. Also, I use quite a lot of character graphics so I'm unsure how to add them in a standar text editor...
@Mike: I hadn't thought to try C64 PRG Gen with a VIc program so I gave it a bash but the compiler won't compile it (says it's not a C64 BASIC 2.0 program...). Thanks for the idea though!
As far as petcat goes I didn't even know what it was and I can't seem to find docs on how to use it. Also, I use quite a lot of character graphics so I'm unsure how to add them in a standar text editor...

@Mike: I hadn't thought to try C64 PRG Gen with a VIc program so I gave it a bash but the compiler won't compile it (says it's not a C64 BASIC 2.0 program...). Thanks for the idea though!

"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
Perhaps it checks the range of POKEs?
C64 PRG Gen wrote:Haha! I see you're trying to fool me with a VIC-20 program! There won't be any such things going on here, Mister!
You know, you tried to POKE 36879. That is just another byte of Basic RAM which usually is meaningless to specifically POKE to.. unless you are programming for another computer than the C64.
Remember this is a C64 PRG generator. Consider this a warning! The next time I spot you trying something like this, I will format C:. And I'm not kidding about it neither!
Anders Carlsson






For our PaperSoft Project I use BasText (the 1.04 fixed version)
It produces files for C64/C16/C128 but can be used for the Vic too, just pruduce files for C64 (same basic v.2 of the Vic) and like Mike said, load the generated file with ",8" not ",8,1" then for a full vic program from the Vice just save it normally SAVE"GAMENAME",8 so you can load it using ",8,1" too (Automatic Vice startup for example).
On the PaperSoft's HowTo Page there is an Italian PDF guide the "NEW GENERATION" method that explain how to use BasText, very handy (For Italian guys
).
It produces files for C64/C16/C128 but can be used for the Vic too, just pruduce files for C64 (same basic v.2 of the Vic) and like Mike said, load the generated file with ",8" not ",8,1" then for a full vic program from the Vice just save it normally SAVE"GAMENAME",8 so you can load it using ",8,1" too (Automatic Vice startup for example).
On the PaperSoft's HowTo Page there is an Italian PDF guide the "NEW GENERATION" method that explain how to use BasText, very handy (For Italian guys

Mega-Cart: the cartridge you plug in once and for all.
- Pedro Lambrini
- Vic 20 Scientist
- Posts: 1132
- Joined: Mon Dec 01, 2008 11:36 am
BasText uses a {mnemonic} field for any vic strange key not just the key code ex: {196}.carlsson wrote:Oh, BasText was originally written by a study mate of mine, Peter Krefting (nee Karlsson). I'm not sure what benefits it has over petcat. I would think they're both quite similar in strengths and usage?
In the zip file of BasText 1.04 there is a pseudotokens.txt file with all substitutions, examples:
Commodore+C = {cm c}
Shift+* = {sh asterisk}
down 15 times = {down*15}
<- = {arrow left}
etc etc
In our "NEW GENERATION" guide there is a full table of comparison.
Mega-Cart: the cartridge you plug in once and for all.
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Yeah, sure. This kind of jokes usually is reserved for April, 1st.Pedro Lambrini wrote:@ Mike: Carlsson's correct. I tried using pokes that the program didn't like...I'll have a look at this BasText though.

Anyway, the whole complex of transferring BASIC programs in text form to *.prg file, and ultimately the VIC-20, or VICE already had started some hot discussions. I use a method, that works for me - if you're so inclined, find a method that works for you.

- Pedro Lambrini
- Vic 20 Scientist
- Posts: 1132
- Joined: Mon Dec 01, 2008 11:36 am
^
I'm sorry, have I offended you somehow? To clarify my point regarding the pokes here is the code I type:
10 print"S"
20 fora=0to255
30 poke36879,a
40 fort=1to100
50 nextt
60 nexta
70 goto10
As you can see it has a poke only really pertinent to the Vic...
I'm sorry, have I offended you somehow? To clarify my point regarding the pokes here is the code I type:
10 print"S"
20 fora=0to255
30 poke36879,a
40 fort=1to100
50 nextt
60 nexta
70 goto10
As you can see it has a poke only really pertinent to the Vic...

"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
No, but we had the discussion before about which ways it can be done and whichever is the "best" way to do it. IIRC Mike is fond of loading text files into CBM Basic and let the built-in tokenizer handle them.
Obviously there are several ways to get an executable Basic program, the big question is how to type it in. Those custom editors which let you enter control codes and graphics data have their advantages, but depending on what program you type in, regular text editors may have advantages too, e.g. built in search and replace, sorting (reorder) lines, familiarity (sp?) with the GUI and so on. That is the good thing, everyone get to choose their own way to do the same task.
By the way, does the improved BasText allow inclusion of binary files at the end of the listing? I believe that would be one of the big changes that puts one program ahead of others. Imagine being able to include a character set, a ML program or other data, even specify at what offset they should be loaded. In the best of worlds, the tokenizer would even add a line 0 that changes Basic pointers (42/43, 44/45 ... 51/52 .. 55/56) in order to not have variables overwriting the included data.
Pedro: Have you tried to convert all the keywords into UPPER CASE and adding spaces around variable names? I don't know if it is required, but it would be the first thing I try. Then I would remove one row after the other until it parses. I would think there is a parser bug somewhere, the program not tokenizing things right.
Obviously there are several ways to get an executable Basic program, the big question is how to type it in. Those custom editors which let you enter control codes and graphics data have their advantages, but depending on what program you type in, regular text editors may have advantages too, e.g. built in search and replace, sorting (reorder) lines, familiarity (sp?) with the GUI and so on. That is the good thing, everyone get to choose their own way to do the same task.
By the way, does the improved BasText allow inclusion of binary files at the end of the listing? I believe that would be one of the big changes that puts one program ahead of others. Imagine being able to include a character set, a ML program or other data, even specify at what offset they should be loaded. In the best of worlds, the tokenizer would even add a line 0 that changes Basic pointers (42/43, 44/45 ... 51/52 .. 55/56) in order to not have variables overwriting the included data.
Pedro: Have you tried to convert all the keywords into UPPER CASE and adding spaces around variable names? I don't know if it is required, but it would be the first thing I try. Then I would remove one row after the other until it parses. I would think there is a parser bug somewhere, the program not tokenizing things right.
Anders Carlsson





