alterus wrote:Ok, so I was able to get the vicmidi program to run.. Just to be explicit, both the vicmidi and vicmidi.prg are "prg" files. I used Dirmaster to put them on the same d64 image. On the disk they are named "vicmidi" and "vicmidi.prg", both prg files.
So my next question is how do we use the Utilimen part of the cart? How do we enable ram? It appears to be very powerful hardware, but I have no idea how to use it or get it setup. Please provide some detailed instructions for making this work... Thanks!
From the forum and elsewhere on this forum:
VIC-MIDI supports the UltiMem VIC-20 memory expansion system. In the default setup, VIC-MIDI sports 512kB of FLASH ROM and 128kB of RAM. Memory is broken into 8kB blocks and can be set to appear in any expansion location in the VIC-20. Those areas are:
RAM1,2,3
BLK1
BLK2
BLK3
BLK5
IO2
IO3
One can place either RAM or ROM at any of these areas, and RAM can be read/write or read/only. There are a few constraints:
RAM1,2,3 can only be enabled/disabled/configured as 1 group of locations. If you want RAM at RAM1, you'll get it at RAM2 and 3 as well
IO2/3 can be independently enabled/disabled, but must map to the same area of memory. If you have RAM at IO2 and IO3, they will both map to the same RAM bank in UltiMem
Memory is mapped on 8kB boundaries at all times. Thus, if memory is mapped to RAM1,2,3 or IO2,IO3, the first memory location stored in UltiMem memory will be at the 8kB based offset of the VIC-20 memory location. For example. If IO2 ($9800) is mapped to a RAM bank, a write to $9800 will be stored at offset $1800 in the RAM bank. Normally, this is of no interest, unless you move the RAM bank. If you store data in a bank of data mapped to $9800 and then map it to BLK1 ($2000), the data will be read from $3800 ($2000 base address + $1800). You can use this to your advantage by mapping RAM1,2,3 and IO2/3 to the same bank of RAM or ROM, as none of them overlap within the 8kB address space ($0400), ($0800), ($0c00), ($1800), ($1c00)
registers are located in the top 16 bytes of IO3 ($9ff0-$9fff). Normally, these registers will prevent storage of data or reading of data from $9ff0-$9fff.
However, the registers can be hidden, which will make the memory under these locations appear.
Registers are defined as:
Register 0 (control). bit 7 = hide registers, bit 6= soft reset, bit 2 = switch 1, bit 1 = switch 0, bit 0 = LED
Register 1 (MEMCTRL1): bit 0-1 = RAM1,2,3 config, bit 2-3 = IO2 config, but 4-5 = IO3 config
Register 2 (MEMCTRL2): bit0-1 = BLK1 config, etc.
Register 3 (ID): $11 for VIC-MIDI
Register 4-5: Low/High bank register for RAM1,2,3
Register 6-7: Low/High bank register for IO2/3
Register 8-9: Low/High bank register for BLK1
Register a-b: Low/High bank register for BLK2
Register c-d: Low/High bank register for BLK3
Register e-f: Low/High bank register for BLK5
MEMCTRL bits are: 00 = off, 01 = R/O RAM, 10 = ROM, 11 = R/W RAM
The LED and switches are for user usage.
On boot, BLK5 is set to ROM bank 0. All other banks are disabled
On boot and reset, holding down switch0 will disable BLK5
On reset, bank registers are set to the following values (RAM = 1, IO = 2, BLK1 = 3, BLK2= 4, BLK3 = 5, BLK5 = 0). This is done to ensure that BLK5 will point to the first bank of memory, and that if someone turn on all RAM, the banks will not collide.
After hiding the registers, one can re-enable them by reading $9f55,$9faa, and then $9f01.
Thus, to check for Ultimem capability, one should read from the 3 locations, and then read $9ff3 and check for $11 or $12 (Ultimem versions).
Do not assume RAM is 128kB. Perform a RAM test
Do not assume FLASH ROM is a AM29F040B nor that it is 512kB. FLASH ROM ICs can be queried for size and capabilities.
Jim