Some questions about cartridges...

For anything related to cart (SRAM, SF2 mapper, audio, CD mode 1, ...)

Moderator: BigEvilCorporation

eteream
Very interested
Posts: 81
Joined: Tue Dec 22, 2009 2:13 pm

Some questions about cartridges...

Post by eteream » Tue Feb 02, 2010 5:09 pm

1) How mirroring works on 3 Megabytes carts?
The 4rt megabyte is a mirror of the 1st or is a mirror of the 3rd mega? I think it has to be the third... but I don't know for sure.

2) A 4-megabyte cartridge memory can save games (SRAM, flash or whatever)? How?

I hope this time are more specific questions.
Greetings!

Mask of Destiny
Very interested
Posts: 572
Joined: Thu Nov 30, 2006 6:30 am

Re: Some questions about cartridges...

Post by Mask of Destiny » Tue Feb 02, 2010 6:20 pm

eteream wrote:1) How mirroring works on 3 Megabytes carts?
The 4rt megabyte is a mirror of the 1st or is a mirror of the 3rd mega? I think it has to be the third... but I don't know for sure.
It depends on how the cart is set up, but I would guess that nothing would be mapped in the range from 3MB to 4MB. The simplest way to make such a cart would use either one 2MB (1MBx16) and one 1MB(512Kx16) chip or 3 1MB(512Kx16) chips and a 2 to 4 line decoder to translate the appropriate address lines into chip select signals. You could OR the extra output from the decoder with one of the others so that you mirror a portion of the ROM in the last MB, but it would seem simpler to just leave it disconnected.

Not sure how it works internally in a mask ROM, but I imagine the setup is similar.
eteream wrote:2) A 4-megabyte cartridge memory can save games (SRAM, flash or whatever)? How?
The !TIME signal on the cart slot allows you to map something in the $A13XXX address range (or maybe just $A130XX, not sure). You can use this to either map a small bit of RAM, bankswitch hardware or a serial EEPROM.

User avatar
TmEE co.(TM)
Very interested
Posts: 2316
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Tue Feb 02, 2010 6:35 pm

3 MByte carts got 2MB + 1MB ROM, and IIRC a simple 74HC00 selector, so top 2MB is full of that 1MB (2MB ROM + 1MB ROM + 1MB ROM).
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen


eteream
Very interested
Posts: 81
Joined: Tue Dec 22, 2009 2:13 pm

Post by eteream » Wed Feb 03, 2010 6:11 pm

Ok, thanks!

Just to clarify about mirror question:

Image

This is the cheapest solution, so this must go.

Note: I don't care if there are 3 roms of 1Mb each or 1x2 + 1x1 Mb each, I only want to write 3Mb in a 4Mb EPROM.
Last edited by eteream on Wed Feb 03, 2010 11:43 pm, edited 1 time in total.

Chilly Willy
Very interested
Posts: 2591
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Wed Feb 03, 2010 7:45 pm

Just to be clear, roms don't NEED to mirror at all on the Genesis. There's no requirement for it at all. A rom only needs to present an exception table at 0, and the word "SEGA" at 0x100 for TMSS. Anything else is up to the developer - if your rom doesn't mirror, don't try to access the mirror area. It's that simple.

User avatar
TmEE co.(TM)
Very interested
Posts: 2316
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Feb 04, 2010 12:16 am

eteream wrote:Note: I don't care if there are 3 roms of 1Mb each or 1x2 + 1x1 Mb each, I only want to write 3Mb in a 4Mb EPROM.
in the case of writing 3MB into a 4MB EPROM you'll have $FF(if you don't program those bytes) in the last 1Mbyte, no mirroring goes on... 1 wasted Mbyte...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

eteream
Very interested
Posts: 81
Joined: Tue Dec 22, 2009 2:13 pm

Post by eteream » Thu Feb 04, 2010 1:38 pm

Chilly Willy, as long as I know mirroring in not a feature, is a side effect.
TmEE co.(TM) wrote: in the case of writing 3MB into a 4MB EPROM you'll have $FF(if you don't program those bytes) in the last 1Mbyte, no mirroring goes on... 1 wasted Mbyte...
Yes, what I will do is to double the last megabyte to simulate the mirrored one.

As the EPROMs 4 megs are cheaper than the smaller capacity...

Chilly Willy
Very interested
Posts: 2591
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Thu Feb 04, 2010 6:31 pm

eteream wrote:Chilly Willy, as long as I know mirroring in not a feature, is a side effect.
TmEE co.(TM) wrote: in the case of writing 3MB into a 4MB EPROM you'll have $FF(if you don't program those bytes) in the last 1Mbyte, no mirroring goes on... 1 wasted Mbyte...
Yes, what I will do is to double the last megabyte to simulate the mirrored one.

As the EPROMs 4 megs are cheaper than the smaller capacity...
You still don't get it - just write 3MB to the 4MB EPROM and SCREW the final MB! :roll:

You DON'T have to write it. Writing the final MB will take extra time and doesn't gain you anything more than simulated mirroring, which isn't needed.

eteream
Very interested
Posts: 81
Joined: Tue Dec 22, 2009 2:13 pm

Post by eteream » Thu Feb 04, 2010 10:27 pm

Chilly, I understand what you say, as the program does not access the mirrored memory, is not necessary to take this into account.

BUT:

Do you fully know the code? I know nothing.
You can be 100% sure it's the same with mirrored memory than without it?

In one hand we have a 100% sure that everything worked while in the other one we have a 99.9999% sure.

What you choose a 99% or 100%? The difference between 100% and 99% is great, think about it.

Another thing, the games have bugs, and these are corrected only if they have unwanted effects and are visible, you can be sure at 100% that the game has no bug that has relationship with mirrored memory?

The cost of doing it is 30 seconds while I'm doing another things. With that 30 seconds I lost near nothing while I get the 100% sure.

:)

Chilly Willy
Very interested
Posts: 2591
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri Feb 05, 2010 3:54 am

I see - you're worried that a GAME you are trying to burn deliberately uses mirroring. I don't think I've ever heard of such a thing - all 3MB games are dumped and run as 3MB. You would think if it were an issue, there'd be reports of those games failing in emulators or flash carts.

notaz
Very interested
Posts: 178
Joined: Mon Feb 04, 2008 11:58 pm
Location: Lithuania

Post by notaz » Fri Feb 05, 2010 1:49 pm

Yeah, I don't think any emus are doing mirroring and there is no known games that would need it.

Eke
Very interested
Posts: 823
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Fri Feb 05, 2010 3:23 pm

The thing is that it completely depends on the way the original cartridge was designed and Mask ROMs(s) mapped, simulating mirroring might be accurate for some games but completely wrong for others, so no, it's not "100% sure" to do it by default.

Anyway, as others said, no games should really be relying on this.

The only game I know that is actually using mirroring is Sonic & Knuckles but this is because of the way lock-on works: it actually access the plugged game by reading the $200000-$300000 area which should return mirrored ROM data from $000000-$100000 in the plugged cartridge.
That's why, when you plug a game larger than 2MB, it (generally) doesn't detect any valid header and boot S&K by default instead of showing the default "now way" screen.

eteream
Very interested
Posts: 81
Joined: Tue Dec 22, 2009 2:13 pm

Post by eteream » Fri Feb 05, 2010 7:11 pm

Years ago, when I made my emulator these things were taken into account in the very firsts steps, I'm surprised...
Eke wrote:The thing is that it completely depends on the way the original cartridge was designed and Mask ROMs(s) mapped, simulating mirroring might be accurate for some games but completely wrong for others, so no, it's not "100% sure" to do it by default.
And what else a cart designer can do?

Maybe I misunderstood it, but for example Sonic 1 is mirrored since pins A19-A23 (of cart pinout) are connected to nowhere. Well, there is no assurance at all, but most of 512k roms (without save feature) will go in the same way.

User avatar
TmEE co.(TM)
Very interested
Posts: 2316
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sat Feb 06, 2010 2:48 am

Things will be mirrored, but no game makes any attempts at data access from above its own address area... only some copy protected Taiwanese games might do it...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest