Can a0 files be run on a real Vic-20?
- necronom
- Vic 20 Dabbler
- Posts: 91
- Joined: Mon Jul 19, 2010 11:41 am
- Location: Middlesbrough, UK
- Occupation: IT Support
Can a0 files be run on a real Vic-20?
I can play games like Gorf, Radar Rat Race, and Jelly Monsters in VICE, but I want to play them on my real Vic. I've looked at them, and they seem to be "a0" files (cartridges?), and I can't get them to run.
Do I need to find a PRG version (if available), convert them to another format (if possible), or can't I play them without buying a real cart?
Do I need to find a PRG version (if available), convert them to another format (if possible), or can't I play them without buying a real cart?
A .a0 file is (most likely) the same thing as a .prg but without the first two bytes (the loading address). Prg versions of all the carts are available here:
http://www.zimmers.net/anonftp/pub/cbm/ ... index.html
To run them on a real vic, you need ram in the right place (in block 5 for a000-carts) and then do:
load "file",8,1
sys64802
If the .a0 file indeed is a prg with the two first bytes missing, then you can just add them in some editor, add 00 followed by A0 first in the file.
You can also use pokes to load files into different places, for example:
poke 43,0
poke 44,160
load "file",8
I'm not sure if the two first bytes in a cart file are needed. If they aren't then you should be able to do:
poke 43,2
poke 44,160
load "file.a0",8
http://www.zimmers.net/anonftp/pub/cbm/ ... index.html
To run them on a real vic, you need ram in the right place (in block 5 for a000-carts) and then do:
load "file",8,1
sys64802
If the .a0 file indeed is a prg with the two first bytes missing, then you can just add them in some editor, add 00 followed by A0 first in the file.
You can also use pokes to load files into different places, for example:
poke 43,0
poke 44,160
load "file",8
I'm not sure if the two first bytes in a cart file are needed. If they aren't then you should be able to do:
poke 43,2
poke 44,160
load "file.a0",8
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Boray is right, A0 files are simply normal PRG files with first two byte missing.
You can detect it also by looking for exactly filesize is 8192 Bytes.
For running on a real VIC you will need a RAM expansion on $A (block 5). Sometimes you will need a RAM expansion with write protection (ROM emulator) for games with copy protection.
You can also use a MegaCart or a Final Expansion 3 as a block 5 ROM emulator.
You cannot use a normal LOAD command, cause LOAD always use first two bytes as loading address.
Either patch A0 file with a hex editor (insert two bytes: 00 A0) or use a special LOAD command like Final Expansion has.
With Final Expansion you can load A0, 60 and any other ROM file directly with LOAD command. Simply use a SA of 2 to indicate you want to load a ROM file:
LOAD "ANY-A0-FILE",8,2,$A000
You can also use any other address for binary files using other address.
You can detect it also by looking for exactly filesize is 8192 Bytes.
For running on a real VIC you will need a RAM expansion on $A (block 5). Sometimes you will need a RAM expansion with write protection (ROM emulator) for games with copy protection.
You can also use a MegaCart or a Final Expansion 3 as a block 5 ROM emulator.
You cannot use a normal LOAD command, cause LOAD always use first two bytes as loading address.
Either patch A0 file with a hex editor (insert two bytes: 00 A0) or use a special LOAD command like Final Expansion has.
With Final Expansion you can load A0, 60 and any other ROM file directly with LOAD command. Simply use a SA of 2 to indicate you want to load a ROM file:
LOAD "ANY-A0-FILE",8,2,$A000
You can also use any other address for binary files using other address.
These commands do not work for A0 8192 bytes rom image because as Diddl said, the LOAD,8 command skips first 2 bytes and writes with an offset of 2 bytesBoray wrote: poke 43,0
poke 44,160
load "file",8
first 2 bytes of the rom image (3rd and 4th byte of the PRG files) are the execution address of the rom, so it is required.I'm not sure if the two first bytes in a cart file are needed.
These commands puts bytes where they must be without first to bytes of course so the start address will be likely $00 $00 end you will probably get a crash after the SYS64802.If they aren't then you should be able to do:
poke 43,2
poke 44,160
load "file.a0",8
The meaning of the story is, use prg files of 8194 bytes unless you don't use wedge commands.
Mega-Cart: the cartridge you plug in once and for all.
Or you could just write down the two first bytes and poke them into $A000 and $A001 as well.nbla000 wrote:These commands puts bytes where they must be without first to bytes of course so the start address will be likely $00 $00 end you will probably get a crash after the SYS64802.If they aren't then you should be able to do:
poke 43,2
poke 44,160
load "file.a0",8
The meaning of the story is, use prg files of 8194 bytes unless you don't use wedge commands.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Yes of course but how to easily know which value to POKE on $a000 and $a001 ? OPEN etc etcBoray wrote:Or you could just write down the two first bytes and poke them into $A000 and $A001 as well.
better to use a prg
Mega-Cart: the cartridge you plug in once and for all.
- necronom
- Vic 20 Dabbler
- Posts: 91
- Joined: Mon Jul 19, 2010 11:41 am
- Location: Middlesbrough, UK
- Occupation: IT Support
So if I understood that correctly, I still need RAM at block 5 regardless of the file I use, which I can't do with a normal RAM pack (I have a Vixen 16k switchable one).
Hasn't anyone been able to convert them to run in a normal 16k Vic, by changing their address, as at the moment it seems like only people emulating or with special cartridges can run them?
I think I'm just going to have to leave those, and play them in VICE, or look for non-cart versions, if there were any.
Hasn't anyone been able to convert them to run in a normal 16k Vic, by changing their address, as at the moment it seems like only people emulating or with special cartridges can run them?
I think I'm just going to have to leave those, and play them in VICE, or look for non-cart versions, if there were any.
- Mike
- Herr VC
- Posts: 4845
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
I'd like to point out that this method will invoke the BASIC line re-link routine. Even though the cartridge raw binary is loaded to $A002, this applies unpredictable changes up to where 3 consecutive 0's are found, and may even "hang" the VIC-20, if a "line" happens to be longer than 255 bytes. Thus this is a method highly *not* recommended. These files are mainly intended for being burned into an EPROM.Boray wrote:If they aren't then you should be able to do:These commands puts bytes where they must be without first to bytes of course [...]Code: Select all
poke 43,2 poke 44,160 load "file.a0",8
VICE can cope with raw binaries, because you know the load address - and then attach the file as cartridge image at this address. *.prg files with start address are special cased in VICE, when attached as cartridge image, and recognized by their 2-byte over-length - here VICE ignores the first two bytes of the file.
As nbla000 points out, best stick with *.prg files including the load address as first two bytes, when using real hardware.
I've done this with Omega-Race, see this thread.necronom wrote:So if I understood that correctly, I still need RAM at block 5 regardless of the file I use, which I can't do with a normal RAM pack (I have a Vixen 16k switchable one).
Hasn't anyone been able to convert them to run in a normal 16k Vic, by changing their address, as at the moment it seems like only people emulating or with special cartridges can run them?
It is quite hard work. I wouldn't start mass-converting games.
And by following your example I've done the same for:tlr wrote:I've done this with Omega-Race, see this thread.
Centipede (Vic+16k)
Dig Dug (Vic+16k)
Donkey Kong (Vic+16k)
Frogger (Vic+8K)
Pacman (Vic+8K)
Polaris (Vic+8K)
Raid on Fort Knox (Vic+8K)
Grab them here.
Yes I agree, I don't think I will do a similar work in the futuretlr wrote:It is quite hard work. I wouldn't start mass-converting games.
Mega-Cart: the cartridge you plug in once and for all.
yes but you may load also any other 8k cart image by using a standard 8k commodore expansion by opening it and changing the switch to address RAM to BLK5 instead of BLK1 as factory setted:
For example to move 8K to BLK5 move switch 1 up and any other down, the factory settings are switch 4 up and any other down.
By using this tecnique you may have a Vic+32K with 1 standard 16k expansion + 2 standard 8k expansion and a cart port expander of course.
Code: Select all
Commodore 8K Expansion
(Remove the case, Switches inside)
BLK Switch
1 4
2 3
3 2
5 1
By using this tecnique you may have a Vic+32K with 1 standard 16k expansion + 2 standard 8k expansion and a cart port expander of course.
Mega-Cart: the cartridge you plug in once and for all.
I always did that with cartridge files copied on tape as a kid because they didn't have the correct starting address. I guess someone had hacked a vic-20 expander routing block 5 to block 3 to be able to save them without having the game to start. So I always did this:Mike wrote: I'd like to point out that this method will invoke the BASIC line re-link routine. Even though the cartridge raw binary is loaded to $A002, this applies unpredictable changes up to where 3 consecutive 0's are found, and may even "hang" the VIC-20, if a "line" happens to be longer than 255 bytes. Thus this is a method highly *not* recommended.
poke43,0:poke44,160
load
sys64802
And there was never any problems with the games. (Those numbers are deeply engraved in my brain )
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
- Mike
- Herr VC
- Posts: 4845
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Mike wrote:[...] this is a method highly *not* recommended.
You just were very lucky. Please try your method with the *.prg cartridge image of Super Expander. The VIC hangs after displaying the READY prompt.Boray wrote:I always did that with cartridge files copied on tape [...] and there was never any problems with the games.
I didn't know you did so many, impressive!nbla000 wrote:And by following your example I've done the same for:
Centipede (Vic+16k)
Dig Dug (Vic+16k)
Donkey Kong (Vic+16k)
Frogger (Vic+8K)
Pacman (Vic+8K)
Polaris (Vic+8K)
Raid on Fort Knox (Vic+8K)
Grab them here.