How to make cartridge ROMs work on a real VIC?

Discuss anything related to the VIC
Post Reply
User avatar
orion70
VICtalian
Posts: 4272
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

How to make cartridge ROMs work on a real VIC?

Post by orion70 »

Hello everyone.
I am new here (have been lurking for a while before) and pretty new to the wonderful world of our beloved VIC. I bought one because I think playing with the real thing is much better than with the emulator :wink: .
My problem is about prices of cartridges getting too high - some of the best are just too expensive for me. I usually deal with floppies full of prgs downloaded from the Internet, but I realized that cart ROMs do not work if you simply load them from a disk. I read somewhere that you can plug in a 32k RAM expansion, load the prg, and reset the VIC with a SYS. This works with the emulator, but unfortunately I don't have the real 32K RAM expansion :roll: .
Having recently found a 16K RAM on Ebay, and knowing that most carts are 4, 8 or 16K games, I tried this "load and reset" method, but I failed.
The question is: is there a way to make these ROMs work on a real VIC with (16+3)K RAM, e.g. issuing some POKEs? Please, make this humble VIC newbie the happiest retro-gamer in the world!

Cheers and keep up the good work.
Alex
User avatar
Schema
factor
Posts: 1436
Joined: Tue Mar 23, 2004 7:07 am
Website: http://www.jammingsignal.com
Location: Toronto, Ontario

Post by Schema »

Welcome!

One of the VIC's most frustrating quirks is its patchy memory map. I was having trouble figuring it out myself at first, so I made this little diagram here:

http://www.jammingsignal.com/vic20/vicmemory.pdf

So to load a cartridge game, you first need to know where in memory it is supposed to go. The first two bytes of the file are (usually) the location where it goes in memory, in low/high order. i.e. 00 A0 means it goes at $A000, aka Block 5.

So, that particular game would require 8K memory in Block 5. Only certain memory expanders let you put RAM in block 5, however.

Another caveat is that some games are in two parts - say, Block 5 and Block 3. But I think you can check the file addresses individually and they'll tell you which one goes where.

One other thing to watch for is copy-protected cartridges - they try to overwrite themselves, which wouldn't work in a cartridge but does work in RAM. But if they work in an emulator you're probably OK.

Hope that made sense! :wink:
User avatar
orion70
VICtalian
Posts: 4272
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Carts and RAM

Post by orion70 »

Thank you very much Schema!

Looks like it's not so simple... I will try and find a switchable RAM module in order to force its RAM in block 5 (or whatever).

Could it be an alternative solution to change with a ML monitor the first two bytes to hex 1200, where the user BASIC begins according to the diagram? If so, can I do (and test) it in VICE before burning the floppy?

Be patient with my questions, as I'm an absolute ignorant with memory locations and hex numbers :oops: !

Thanks again.
Alex
User avatar
Schema
factor
Posts: 1436
Joined: Tue Mar 23, 2004 7:07 am
Website: http://www.jammingsignal.com
Location: Toronto, Ontario

Post by Schema »

Unfortunately, it's not so simple :wink: The entire program likely makes many references and jumps to specific memory locations inside itself, so all of those would have to be changed too.

But it is possible - I remember on here someone once rewrote Omega Race to run in a different block, but it took several days to do!
User avatar
orion70
VICtalian
Posts: 4272
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Too difficult...

Post by orion70 »

I've got the complete picture now... Gosh, it's sooo complicated I guess I will look for a switchable RAM 8)

Read you soon,
Alex
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

If you have a 16K cartridge and are a bit handy with soldering iron, you can modify it to become switchable or at least hard-wire it to a different memory block. At least Commodore's own 16K cartridges are possible to do this to, and I suppose other would work as well. Each memory block is assigned its own pin on the cartridge port. Someone with better technical skills can follow up exactly how to do it.
Anders Carlsson

Image Image Image Image Image
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Yes, Commodore's 16K Cartridges are really easy to make switchable. Take a look here:
http://sleepingelephant.com/ipw-web/bul ... .php?t=194

And Commodore's 8K cartridges ARE switchable allready even if they don't appear to. If you open one up, there are the switches.

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
orion70
VICtalian
Posts: 4272
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Post by orion70 »

Thank you very much everyone, I already have a Commodore 16k RAM cart and will pay a visit to my dearest friend, who happens to be an electronic engineer :mrgreen:

I think that the previous topic "8k cart. for a 16k cart" will make sense for him. We'll have fun trying the hack.
Post Reply