Jump to content
IGNORED

Commodore Vic 20 Game Development Tools/Utilities


MoonTurtle

Recommended Posts

Not to long ago I came across a topic talking about how difficult it was to program for the Commodore Vic 20. I've heard this before, not just on this forum, but on other sites,

 

So, wanting an answer to this myself, (I also wanted to program game for the system) I decided to start this topic, so I, was well as others could learn how to properly code their own homebrew games for the Vic-20 from more experienced programmers/developers,

 

But before you unleash your curiosity, you should first know a few things if you want to get into programming for this machine;

 

Operating System(s): Commodore Kernel-Commodore Basic 2.0

 

Graphics/Sound: handled by the VIC (Video Interface Chip) aka MOS Technology 6560

 

Memory: 20 kb ROM, 5 kb RAM, (default)

 

(NOTE: Both the graphics and RAM were changed in some way by the Super Expander Cartridge, like increasing the graphics from 178x184 to 160x160, and increasing the RAM from 5kb to 15kb. though it was the nly cartridge to do this for the Vic 20,)

 

if any of this info above is incorrect, please let me know, I would be happy to change it to be correct.

 

But anyway, we will discuss things like:

 

How to View/edit sprites

How to create/edit Music/SFX for Vic 20

How to properly compile the code for your program/game

What is the best programming language fore the Vic 20?

and many more!

 

Now, let's begin! :)

 

 

Link to comment
Share on other sites

The Super Expander contains a 3K memory expansion, plus commands for setting up a simulated bitmap screen. It doesn't improve graphics in any way, just makes it easier to access them. By enabling one of the unique VIC-I features that makes each logical character 8x16 pixels on screen, you can setup a bitmap using custom characters, and by adding memory for your programs, you can use all the internal RAM for graphics.

 

Coincidentally, I made a such program for the +8K expanded VIC-20 just the other week. It creates a bitmap screen 192x160 pixels entirely in BASIC, so slow as ****. It would work as well with the +3K expanded VIC, with a few changes of addresses. The screen is centered for PAL, so the values for 36864 and 36865 would need to be changed for NTSC but that is trivial.

 

1. Enable +8K or more.
2. Set up pointers: poke 642,32:sys58232
 
10 v=36864:pokev,10:pokev+1,44:pokev+2,24:pokev+3,21:pokev+5,204
15 pokev+15,27:fori=0to239:poke4096+i,i+16:poke37888+i,0:next
17 fori=0to3839:poke4352+i,0:next
20 fori=0to191:j=int(80+sin(pi*i/96)*50)
25 a=4352+int(j/16)*384+int(i/8)*16+(jand15):pokea,peek(a)or2^((7-i)and7):next
35 pokev+15,238
40 goto40
Note that "pi" should be replaced by the Pi symbol which on the emulator might be found on Shift + Delete.

 

Regarding your points of discussion, here are some input:

 

* The VIC-20 doesn't have any hardware sprites, which means you either have to stick with character aligned movement or implement your own software sprites using dynamically updated custom characters. Many people have do that with varying results, but it isn't for the absolute beginner.

 

* Sound and music is easier, as you could either just use DATA statements from BASIC, or use a ML routine supplied by a program like Fisichella, VIC Tracker or some other routine.

 

* Cross development is the way to go for most programming languages: tokenized BASIC, assembly language, compiled C or whatever language you may find. I'm unsure if there is a cross development environment for Forth.

Edited by carlsson
  • Like 1
Link to comment
Share on other sites

MoonTurtle thank you for building this thread.. I read the other one and downloaded Arthur Jordison CBM prg Studio and it looks pretty great.

 

I have just started learning 6502 Assembly and I think this thread might be pretty useful.

 

It was not too hard to figure out but I do get a program crash when I open the SID Tool.. I hope he continues to develop this tool, the Sprite maker and the SID Music maker looks great, even a scene editor..

 

The whole package kind of reminds me of the great Gary Kitchen's Gamemaker, an amazing program..

 

 

 

Link to comment
Share on other sites

MoonTurtle thank you for building this thread.. I read the other one and downloaded Arthur Jordison CBM prg Studio and it looks pretty great.

 

I have just started learning 6502 Assembly and I think this thread might be pretty useful.

 

It was not too hard to figure out but I do get a program crash when I open the SID Tool.. I hope he continues to develop this tool, the Sprite maker and the SID Music maker looks great, even a scene editor..

 

The whole package kind of reminds me of the great Gary Kitchen's Gamemaker, an amazing program..

 

 

 

You're welcome.

 

If you want to lean 6502 Assembly Language, I suggest you go here: http://www.6502.org/tutorials/

 

This link will take you to list of tutorials you may find useful, Enjoy!

Link to comment
Share on other sites

  • 3 years later...

I think the largest hurdle to get started developing for the Vic 20 is the bit of documentation needed to understand the memory layout and the Vic chip, but otherwise the Vic 20 has got to be one of the simplest machines to code for. There's little built in hardware to complicate matters, everything is programmable via memory addresses and its got some surprising flexibility waiting to be discovered.

 

Support for developing has improved quite a bit since 2018 too. My favourite dev tool, which I have really go into ... to the point of helping extend it (mostly for Vic 20 support) is Turbo Rascal. It's a Pascal/Assembler hybrid langauge with a lot of support for the Vic (and other 8-bit/16-bit systems). You can break out to assembler at any time but for most things you can use the 'Rascal' language which is optimised quite nicely to 6502 at build time. It won't always be quite as good as rolling your own assembler code because it is not possible for the compiler to make some assumptions on flags, state etc that you can do yourself, but it makes devloping very easy, does make good 6502 output and as said allows you to break out into assembler where you want to roll your own. I tend to do this for routines that need to be tight, such as rendering software sprites.

 

On that subject, I have extened Turbo Rascal to have a 'Vic Bitmap Mode' or VBM for short. It uses the principles of creating a full screen character bitmap in memory as seen in games like Omega Race and the Super Expander Cartridge. I have added routines for fast software sprites, text, tiles, tilemaps and many more routines useful for making games or graphical projects. There's several tutorial examples and my Cheesy Trials game source code to examine. I published a short video earlier in the year to get an insight in how to use sprites: https://youtu.be/ZwA7P4r1l7c

 

I'm currently working on two new graphical libraries, one focusing on local bitmaps for sprites and another on PETSCII graphics.

 

Anyway, hope this is of some use, several years on from the original post, and that it might entice some to have a go with a bit of Vic 20 development with Turbo Rascal.

 
  • Like 1
Link to comment
Share on other sites

4 hours ago, AndyH said:

I think the largest hurdle to get started developing for the Vic 20 is the bit of documentation needed to understand the memory layout and the Vic chip, but otherwise the Vic 20 has got to be one of the simplest machines to code for. There's little built in hardware to complicate matters, everything is programmable via memory addresses and its got some surprising flexibility waiting to be discovered.

 

Support for developing has improved quite a bit since 2018 too. My favourite dev tool, which I have really go into ... to the point of helping extend it (mostly for Vic 20 support) is Turbo Rascal. It's a Pascal/Assembler hybrid langauge with a lot of support for the Vic (and other 8-bit/16-bit systems). You can break out to assembler at any time but for most things you can use the 'Rascal' language which is optimised quite nicely to 6502 at build time. It won't always be quite as good as rolling your own assembler code because it is not possible for the compiler to make some assumptions on flags, state etc that you can do yourself, but it makes devloping very easy, does make good 6502 output and as said allows you to break out into assembler where you want to roll your own. I tend to do this for routines that need to be tight, such as rendering software sprites.

 

On that subject, I have extened Turbo Rascal to have a 'Vic Bitmap Mode' or VBM for short. It uses the principles of creating a full screen character bitmap in memory as seen in games like Omega Race and the Super Expander Cartridge. I have added routines for fast software sprites, text, tiles, tilemaps and many more routines useful for making games or graphical projects. There's several tutorial examples and my Cheesy Trials game source code to examine. I published a short video earlier in the year to get an insight in how to use sprites: https://youtu.be/ZwA7P4r1l7c

 

I'm currently working on two new graphical libraries, one focusing on local bitmaps for sprites and another on PETSCII graphics.

 

Anyway, hope this is of some use, several years on from the original post, and that it might entice some to have a go with a bit of Vic 20 development with Turbo Rascal.

 

I started using Turbo Rascal and think it might be the best advancement in retro programming.  I think it is a godsend to those of us learning.  I just wish there was a beginner book I can use to learn. The demos are great however and the samples work as great tutorials.

 

I just have not used Pascal since high school so it seems like relearning all over again. haha 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...