VIC IDE

You need an actual VIC.

Moderator: Moderators

User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

VIC IDE

Post by Pedro Lambrini »

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...
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

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
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

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.
Anders Carlsson

Image Image Image Image Image
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

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! :)
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

How would C64 PRG Gen. be able to tell you were indeed going to write a VIC-20 program? :shock:

Would you be so kind to show the example here?
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

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! :twisted:
Anders Carlsson

Image Image Image Image Image
User avatar
GreyGhost
Vic 20 Nerd
Posts: 527
Joined: Wed Oct 05, 2005 11:10 pm

Post by GreyGhost »

HeHe
Rob
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

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 :wink:).
Mega-Cart: the cartridge you plug in once and for all.
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

carlsson wrote: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! [...] The next time I spot you trying something like this, I will format C:. And I'm not kidding about it neither! :twisted:
:wink:
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

@ Mike: Carlsson's correct. I tried using pokes that the program didn't like...I'll have a look at this BasText though. :)
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

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?
Anders Carlsson

Image Image Image Image Image
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

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?
BasText uses a {mnemonic} field for any vic strange key not just the key code ex: {196}.
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.
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

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. :)
Yeah, sure. This kind of jokes usually is reserved for April, 1st. :?

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. :roll:
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

^
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
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

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.
Anders Carlsson

Image Image Image Image Image
Post Reply