Cartridge ROM mapping

Discuss the games, programs, utilities... and vaporware!
Post Reply
User avatar
@username@
Posts: 202
Joined: Tue Oct 22, 2013 6:59 pm
Location: Glasgow, Scotland

Cartridge ROM mapping

Post by @username@ » Sun Feb 14, 2021 10:58 pm

From looking at the BASIC 12KB ROMs, they appear to use $A000-$BFFF(ROM1) and $7000-$7FFF(ROM2). An anomoly in BASIC82A and B, is that the first 256 bytes of ROM2 are also available at $4000.

In the emulator - this is easily handled with a software AND mask.

However, I wondered if perhaps the original cartridge had another means of mapping the address lines.

Reading the "Circuit 1" PDF, it's eay to follow ROM 0/1/2 through the 74LS139 decoder B. So is it safe to assume that any 4K ROM on the other side of ROM2 enable can be read from $4000/$5000/$6000/$7000? Is there a mapping connection on the physical cartridge to facilitate this?

If you look at Planet Defender 6K against Planet Defender 8K - you will see that the difference is just the lower 2K at $A000 is repeated at $A800. Otherwise these dumps are binary identical - which would indicate the 8K dump is unnecessary - as the main routines read from $A200.

So is this the cartridge itself doing this translation to mirror the same 2K block when read?

Look forward to the hw guys letting me know the answers!
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı

The creatiVision Emulator 16.04.24
Salora Manager / Laser 2001 BLOAD utility 0.9
CSL Cartridge middleware
http://sourceforge.net/projects/creativisionemulator
User avatar
MADrigal
Site Admin
Posts: 1021
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Re: Cartridge ROM mapping

Post by MADrigal » Thu Feb 25, 2021 8:29 pm

Mate, unfortunately I do not own the BASIC cartridge with the BASIC 82 roms anymore, so I cannot help you with that.
But one thing I can tell you for sure: all dumps were done on actual EPROMs not from the cartridge w/connectors to an EPROM programmer.
So whatever you see in the dumps, is the actual content of the EPROM chips.
Some 6K ROMs saved in a 8K EPROMs have mirrored 2K, but from memory, a few 8K EPROMs had the 2K blanked (full of 00 or FF). Again I think this is quite random and there are probably different dump types around.
And also there is a 16K version of BASIC83 (or was it VTL V1 BASIC, I dont remember) - which I found on cartridge once only, hence extremely rare. I think that also has some mirroring and blank spaces
User avatar
@username@
Posts: 202
Joined: Tue Oct 22, 2013 6:59 pm
Location: Glasgow, Scotland

Re: Cartridge ROM mapping

Post by @username@ » Sun Apr 25, 2021 10:31 am

OK - I think we can say that there is no mirroring required for any 4K ROM.

This is backed up by VTech with AirSea and Sonic Invaders. They are just load to $B000 and run on Salora Manager and Laser 2001.

So the "mirroring" at $8000,$9000,$A000 is nonsense and completely unnecessary.
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı

The creatiVision Emulator 16.04.24
Salora Manager / Laser 2001 BLOAD utility 0.9
CSL Cartridge middleware
http://sourceforge.net/projects/creativisionemulator
User avatar
MADrigal
Site Admin
Posts: 1021
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Re: Cartridge ROM mapping

Post by MADrigal » Sun Apr 25, 2021 10:40 am

The games do work in their 4k space but because of the way the cartridge PCB pinouts are designed, the 4k are repeated (mirrored) within their Rom space, filling it. Unnecessary but that's how the real console "sees" the game.
User avatar
Scouter3d
Posts: 371
Joined: Mon Jun 28, 2010 7:02 am
Location: Wien
Contact:

Re: Cartridge ROM mapping

Post by Scouter3d » Sun Apr 25, 2021 6:08 pm

The "mirroring" is mostly a byproduct of using smaller ROMs in a bigger ROMspace, you use one of the higher (or possible the highest) adresslines as Chipselect, the PCB con hold different chips (16K, 8K, 4k or 2k per bank) ... so somtimes 2k EPROMS are enabled as 4k or 8K, as they miss the higher Addresslines of their bigger brothers they repeat / mirror the same content a few times over their bank.

Sometimes when you burn an EPROM and you use a bigger EPROM than you need (e.g. 8K instead of 4k) it is common to burn the content 2 times into the rom, so you can either set the highest Addressline to 0 or 1 and both will deliver the same data...
User avatar
@username@
Posts: 202
Joined: Tue Oct 22, 2013 6:59 pm
Location: Glasgow, Scotland

Re: Cartridge ROM mapping

Post by @username@ » Sun Apr 25, 2021 6:57 pm

Yes - the address lines make sense, if you consider a 4K rom only needs 12 bits, so anything above that will give the same data from $8000,$9000,$A000 or $B000.

My question is why bother when the actual code does not look outside of itself?

What is the value add?

Why not just do an AND mask?

One interesting thing of this review, is that my understanding of the 6K-8K roms was a little off. Tank Attack should load at $A800 for 2K, then $B000 for 4k.

I had always assumed ALL 6K roms needed to be loaded to $A000, then mirrored - which is not the case. Tennis, Deep Sea and Planet Defender need to be loaded to $A000 2k then $B000 for 4k.

Interestingly, a single bit change in both Deep Sea and Planet Defender render the 2K at $A800 useless too.
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı

The creatiVision Emulator 16.04.24
Salora Manager / Laser 2001 BLOAD utility 0.9
CSL Cartridge middleware
http://sourceforge.net/projects/creativisionemulator
Post Reply