home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Rockford Magazine
/
Rockford_Magazine_033_19xx_-_de_Disk_3_of_5_Side_B.d64
/
15.2
< prev
next >
Wrap
Text File
|
2023-02-26
|
10KB
|
168 lines
spot, to see if it should autostart a cartridge or not. If the Vic20 finds
this *exact* five-byte code, *exactly* where it is supposed to be located in
memory, the Vic20 turns control over to the cartridge. If not, it gives over
control to the user, via the normal, power-up Basic READY prompt screen.
This 8K autostart sequence code is shown below:
AddressHex valueDecimal valueASCII values
$A004 $41 65 Capitol "A"
$A005 $30 48 Digit "zero"
$A006 $C3 195 Reverse "C" character
$A007 $C2 194 Reverse "B" character
$A008 $CD 205 Reverse "M" character
If the computer finds this five-byte sequence exactly as shown, it
turns control over to the machine language program in the cartridge.
To do so, it needs to know where the program begins. There are four
bytes which determine this, as shown below: (Also within the cart.)
AddressWhat this byte of information contains
$A000 Low-byte of a 16-bit "hard start" address (to begin at)
$A001 High-byte of the 16-bit "hard start" address
$A002 Low-byte of 16-bit "warm start" address (restore key)
$A003 High-byte of 16-bit "warm start" address
This is all very important when trying to archive an image of the information
contained on a ROM cartridge. Altering either of the two required parts of
this sequence, causes the cartridge to not autostart, but to be mapped into
memory properly, anyway. Assuming a certain level of technical expertise, a
user can do one of two (or more?) things to achieve this.
One is to move the cartridge's starting location temporarily, so that the
code is present, but not in the right place. This can be done by altering the
physical traces on each cartridge's circuit board. This is undesirable,
except perhaps for self-training purposes, as every single cartridge would
have to be individually modified, archived, then reassembled for normal use.
Permanently modifying the Vic20's internal wiring is also possible, but
hardly desirable, as permanent damage to the Vic20 might also result.
The best way I could recommend for this would be to have a qualified tech
build or wire a cartridge-port pass-through device, where nearly all the
traces re-connected where they are supposed to, except for a critical few.
Using a 44-position card edge connector, some wire and a junk cartridge (or
etched circuit board like a cartridge's pins), this could be done. Most wires
would start at the card edge, where you'd plug the device into the Vic20, and
pass-through harmlessly to the card edge connector, where carts would plug in.
This device reroutes the "BLK 5" trace, preferably by use a "normal/modified"
switch, so that even though the cartridge intends to load at $A000, it loads
to another 8K block of memory instead. Whichever one you wire it to; perhaps
Block 1 or 3. Make the switch(es) act as a simple pass-through, normally, but
disconnect the "Block 5 to ground line" while at the same time connecting the
"Block X line to ground", to remap where the cartridge will temporarily go.
This device would ideally be plug-in-able and removable, like a cartridge, so
as to require no modifications to either the Vic20 or cartridges. A reset
button could also be installed in the device, as well, while you're at it. If
you use an old cartridge as your plug-in on the Vic20 end, cut all traces that
still go to the existing chip(s). Solder wire ends onto the portions that exit
the Vic20, and route them to your external plug-in connector box. If you use
ribbon cable as your wiring, you can probably even sneak the wire out the back
of the existing cartridge's case, as there is a wide slot in most Vic cases!
This method will allow you to temporarily re-map where the cartridge image
will appear in memory, to defeat the autostart feature. Once this is defeated
the technically-inclined user who is familiar enough with Commodore computers
can copy the information to tape or diskette for storage. This takes some
knowledge and expertise, but can be learned. Some help is offered; see below.
The user should understand that if this method (memory relocation) is used to
defeat the autostart feature, and to thereby attempt to archive a cart's ROM,
the work is not over. Once archived to disk, the hard part is done, true, but
when you saved it to diskette, it was saved with a now-incorrect starting
address. Before the image can be used further, this has to be corrected.
This can be changed, fairly easily, by someone who knows how, but it requires
knowledge of using a software tool called a "disk sector editor" to change
the now-incorrect high-byte of the relocated starting address, to the correct
unrelocated high byte: where it would have been, before you moved it. To do
so, you find the first disk sector of the ROM image file, and change the
fourth byte in (not byte $04!) to be $A0, resave the sector, and you're done.
After this modification, your ROM image files will now load where they should,
(into $A000 RAM, if you have it), and are ready for further processing.
Even the common C64 "Fastload" utility cart has a very servicable sector
editor in it, so it isn't as bad as it may have sounded. Still, you need to
know how to use it, and what to change, so it is best left to a professional.
To actually save the block of memory to tape/disk, you either use the memory
save feature of a machine language monitor program (not built in) to save the
8K block of ROM memory temporarily, or you can change certain POKE's in the
Vic20's memory, to tell it your cartridge is located in the Basic program
memory area, so that the normal SAVE command works. The beauty of the latter
is that no additional programs are needed to make this work; just type in four
POKE commands, then tell it to SAVE as it would normally save a Basic program.
For those of you already familiar enough with Commodore's style and memory
arrangement schemes to make sense of this, bytes 43 and 44 (decimal, not hex)
are the pointers to the Start of Basic memory area, and bytes 45 and 46 are
the pointers to the Start of Variables, or in other words, the End of Basic.
Follow this chart, to save a block of memory from these areas via pokes:
Block #Hex AddressPoke 43,xPoke 44, xPoke 45, xPoke 46, x
1 $2000-3fff x = 0 x = 32 x = 255 x = 63
2 $4000-5fff x = 0 x = 64 x = 255 x = 95
3 $6000-7fff x = 0 x = 96 x = 255 x = 127
5 $a000-bfff x = 0 x = 160 x = 255 x = 191
The above is only one possible way to archive an 8K block of Vic20 memory.
However, a second method exists, requiring some Vic20 modifications. A truly
hard-core Vic user could alter the copy of the startup code that is stored in
the Kernal ROM chip, so that no normally-correct autostart sequence code ever
matches it as long as your new Kernal is in place.
Remember, there must always be *two* copies of the start-up code; one in the
cartridge itself and one stored in the computer for comparison. If either of
these two seperate codes are altered, even slightly, it will not autostart!
The cartridge gets mapped into memory at its correct location, but the Basic
"READY" screen comes up instead, giving the user full control. Once you've
achieved this, you simply do four pokes (to change the start and end of BASIC
memory to match where the cart code is), or save the info with an ML monitor.
With some work and an "MCM 68764" 8K EPROM, this can be done. It is not just
a vague theory; the author has done it. It works, as does a similar technique
for doing the same general thing with the Commodore 64 computer. (With the
appropriate changes, of course, to reflect the C64's different architecture
and memory map; the C64 codes are "CBM80" instead of "A0CBM", and the Kernal
expects that code to be in a cartridge at locations $8004-$8008 instead of
$A004-$A008. Starting address is in the same exact format as the Vic's.)
This a much more involved modification, and not for the squeemish or
those who only own one Vic20 (or C64) without any spares to fall back on!
To do it, you need a heck of a lot of computer knowledge specific to the
computer you're working on, an eprom burner, an eprom eraser, and patience.
You have to search in the Kernal's memory image, for the start-up code, and
modify those bytes to be something different than they are, while leaving all
the other bytes just as they are. This alone takes some serious skills, no?
You also need skills and tools in desoldering and removing IC chips, as well
as soldering in IC sockets, and not destroying anything in the process.
I won't go into this much, because I don't imagine many people will bother to
actually attempt this method, since the other has some serious pro's to it,
and since this should be about enough info to go on; if you can't figure out
how to do this modification with this info, you probably should not try it,
until you've progressed enough at a later time. Or, have someone else do it
for you, with these instructions, if you really want it done badly enough.
This way may appeal to some people, but I recommend the other for most folks.
The overly-technical types might be tempted to go ballistic however, and more
power to you! A thought, in parting; one could put 2 copies of the Kernal ROM
chip, one stock and one modified, into one 16K eprom, with an external switch
to flip between the two versions. (Or just go lower tech, and just manually
swap out Kernal chips as needed; most Vic20's seem to have sockets anyway.)
Whatever you do, I hope you've enjoyed this article! Later, all!
Ward Shrake
wardshrake@aol.com
July 1995