VIC-20 Part 1 - Meet the 8bit beast
I set myself a naive goal - to develop a game for VIC-20 and port it to at least one other (similar) system, all starting with zero knowledge.
I began this by reading and trying to understand the basics of this 8-bit beast produced by Commodore between the years 1981 and 1985.
VIC-20 is based on the famous MOS 6502 CPU and is equipped with only a few kilobytes of RAM:
- The memory available for developers is below 4kB - exactly 3583 bytes for the program developed in BASIC and slightly more for the program done in assembler (well, this is my guess only with the current state of knowledge).
- Physically there is 5kB RAM, which was originally provided in 10 integrated circuits, each having capacity of 512 bytes static RAM. But part of the memory is used for I/O mapping and Video RAM, so not the entire 5kB is available for the game code.
- I found it interesting that according to Wikipedia each of the 2144 RAM chips used in VIC-20 has 24.576 NMOS transistors which means by layman computation that storing a single bit requires 6 transistors (24.576/512/8).
- There are also two 8 kB ROM chips, one with BASIC V2.0 implementation from Microsoft and one with KERNAL (Commodore "operating system") and 4kB ROM with characters set, so in total VIC-20 has around 25 kB of memory.
The available memory can be extended by RAM cartridges - the 6502 CPU can address up to 64 kB of memory but has only 25kB RAM and ROM combined. However developing a game, which requires a memory expansion cartridge is probably not a good idea since it will limit the user base only to those who own the cartridge.
To overcome memory limitation games were (still are!) distributed mainly on cartridges similar to games on Atari 2600 or NES. On the cartridge, the game is burned on a ROM chip, which can have a larger capacity than the VIC-20 built-in static RAM. It expands the small amount of memory available for the program up to 16kB (or it might be even more - again I do not know that yet), so there is enough space for the game code.
For comparison games that are loaded from cassette or floppy disks have to work not only with less memory but also their initial loading time to memory is much much longer (minutes).
In short, my conclusion is that the cartridge is the correct way to distribute my game on VIC-20 - it not only provides more memory but also instant start time. And its use promises more fun for me because I have no idea how it works and how to put the game on it.
Overall, the VIC-20 machine seems to be a nice playground for learning how to develop some small runner/platform type of game and get a bit skilled in 6502 assembler since the use of the BASIC, which is "native" language distributed in ROM is not only slow (even for programming on much better hardware) but also not usable due to memory restrictions.
At the current moment, I have a vague awareness of not only how to use an assembler, but also how to work the VIC-20 hardware, and even the "Hello world" example seems to be far over the horizon.
But one must start somewhere and have some dreams.
The actual plan is:
- Get some good books about the VIC-20 and 6502.
- Purchase the VIC-20.
- Play some VIC-20 games to get an idea of what hardware limitations allow and what professional developers can do.
- Establish on a desktop a toolchain and game build pipeline, download all tools (emulator, debugger, assembler)
- Read some technical articles and watch some videos on the Internet
- Get basic knowledge about 6502
- Get basic knowledge about VIC-20 hardware, memory map, etc.
- Get basic knowledge about the 6502 assembler
- Program the "Hello World"
- And of course program the game and play it from the cartridge:)
Escape From Rexal (VIC-20)
An attempt to create a game on the VIC-20 without any knowledge
Status | In development |
Author | 8bitsten |
Genre | Platformer |
Tags | VIC-20 |
More posts
- VIC-20 Part 5 - Moving a text: How to wait?Jan 01, 2022
- VIC-20 Part 4 - Inside the cartridgeDec 31, 2021
- VIC-20 Part 3 - Drawing the horizontal lineDec 18, 2021
- VIC-20 Part 2 - Finally somethingDec 12, 2021
Leave a comment
Log in with itch.io to leave a comment.