In 2000, a Vic-20 was for sale on a flea market for 50 FIM, approximately €8.40. I already had two, so I gave it to Juha Kouri, who did not have one. He wanted to have a flash memory cartridge that would hold some games. Being a hardware guy, he suggested the simple idea of storing cartridge images in uncompressed format. Being a software guy, I suggested compressing the images with PuCrunch and extracting them to a 32 KiB RAM expansion. That approach would work with arbitrary-sized programs, without wasting a single byte to memory alignment.
Fast forward to 2010. The Vic Flash Plugin is finally here. You can try it in VICE, starting with release 2.2.5.
$4000‒$7fff) are always mapped$a000‒$bfff) can be disabledThe menu software automatically selects the correct RAM expansion type for program images. The selection can be overridden at image creation time.
By holding a key during hardware reset or pressing a key in the menu, you can enter the Commodore BASIC interpreter in different memory configurations:
| key | memory configuration |
|---|---|
| STOP | unexpanded (3583 bytes free) |
| 3 | 3 KiB memory expansion (6655 bytes free) |
| 8 | 24 KiB memory expansion (28159 bytes free;
compatible with 8 KiB and 16 KiB) |
Because the menu software skips the slow memory test, it will exit to BASIC instantaneously.
If you additionally hold the SHIFT key, you can hide the configuration registers until hardware reset, for maximum compatibility with programs that write to normally unmapped address space.
The menu software is accessed by the keyboard as follows.
| key | memory configuration |
|---|---|
| a‒z | jump to the next item starting with the letter |
| A‒Z | jump to the previous item starting with the letter |
| CRSR⇅ | line down |
| SHIFT+CRSR⇅ | line up |
| CRSR⇆ | page down |
| SHIFT+CRSR⇆ | page up |
| HOME | first item |
| SHIFT+HOME | last item |
| RETURN | activate the selected item |
| SHIFT+RETURN | activate the selected item, hiding the configuration registers |
The machine language software has been translated with
the XA (xa65) cross-assembler.
xvic -cartfp menu-s.bin.gz
(in VICE
2.2.5 or later). The source code is in vfp.zip.This section will be updated once the first production
batch
of circuit boards has been completed.
By 2002, I had written a menu software that would decompress the
images to memory. The first hardware prototype had 512 KiB of Flash,
and all images were in a single directory that had to fit in the first
8 KiB bank. To save that precious memory window, I devised a menu
entry format comprising a 10-byte file
name [A-Z.'()-]{16} and a 3-byte start address. With
about 2 KiB of menu software, that would leave room for 472
titles. Having that many entries in a single directory could make
navigation difficult. Besides, there are more than one thousand
Vic-20 titles, comprising more than 3 MiB in compressed format.
To address these limitations, another prototype was built, with the
biggest 5-volt flash memory device that is available,
the AMD Am29F032B,
4 MiB. I also started reworking the menu software to something that
would support subdirectories stored anywhere in the flash memory, and
full PETSCII file names. The last mile
was the image generator
software that I should rewrite to support the new format. This
lingered for some six years, as I was busy looking after my sons.
Finally, they started getting addicted to a different type of
Flash games, and I had to get my act together.
In December 2009, I implemented the hardware emulation in VICE and
made some design simplifications in the image generator software. Gone
were the file system abstraction layer and a configuration file
grammar (XML-based
even?) for specifying directory trees. In the end, the
implemented parser
does little beyond lexical analysis.
Instead of enforcing a tree topology for subdirectories, it allows
arbitrary pointers to menu entries (not just to the start of a menu).
After completing the menu software, the image generator and the flash programming software and having Juha Kouri revise the VHDL code, I submitted my patch to VICE and prepared the software for release.
I would like to express my thanks to the following people:
reference implementationsof bank-switched memory expansions