Gen cart pinout

For hardware talk only (please avoid ROM dumper stuff)
Mask of Destiny
Very interested
Posts: 615
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Mon Mar 01, 2010 2:58 am

eteream wrote:ok, so the 4MB rom space is a sega restriction, not a hardware restriction (expansion policies, if you let me say so). Then a 8MB cartridge can exist, but it will not be compatible with 32X.
It's a hardware restriction in the sense that the address decoding logic limits a cartridge to the first 4MB of the address space. You can implement your own address decoding logic to get around this, but you'll end up conflicting with other hardware in the system.
eteream wrote:... so all games are mirrored into the 4-8MB space at less... uhmm... forget it, I said nothing...
Nope. Carts are only mapped to 0-4MB. The expansion slot is mapped to the 4-8MB region.

Well, how they're mapped depends on the status of the !CARTIN line on the cartridge port. When !CARTIN is tied to ground (usually by a cartridge), the cart slot is mapped to 0-4MB and the expansion slot is mapped to 4-8MB. When !CARTIN is left disconnected (or brought high), the two slots swap their locations. This is what I depend on for my Sega CD based cart dumping software.

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Mon Mar 01, 2010 3:49 am

eteream wrote:ok, so the 4MB rom space is a sega restriction, not a hardware restriction (expansion policies, if you let me say so). Then a 8MB cartridge can exist, but it will not be compatible with 32X.

... so all games are mirrored into the 4-8MB space at less... uhmm... forget it, I said nothing...
Nobody restrict you to use bank switching or mapper.

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

Post by Chilly Willy » Mon Mar 01, 2010 3:49 am

eteream wrote:Then a 8MB cartridge can exist, but it will not be compatible with 32X.
Tomy (from TotoTek) has a 10 MByte cart, and it's definitely not CD or 32X compatible. :D

I think for 10 MB, you have to provide your own /DTACK to keep the Genesis from hanging, but otherwise it isn't a problem. 10MB is the most you can do on a plain stock Genesis without bank selection.

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

Post by eteream » Wed Mar 03, 2010 4:59 pm

Sorry, I missundertod your earlier messages (I read somewhere extension port only can access a miserable amount of KB... (????)).
Mask of Destiny wrote: It's a hardware restriction in the sense that the address decoding logic limits a cartridge to the first 4MB of the address space. You can implement your own address decoding logic to get around this, but you'll end up conflicting with other hardware in the system.
... you can ignore the CE (or whatever is named here(C_CE maybe...)) signal and be mapped all over the 0-8MB space, but also you are mapping above this, VDP registers for example. So you have to implement your own address logic. Is it right? Also this is not compatible with Sega Mega CD.
Mask of Destiny wrote: Nope. Carts are only mapped to 0-4MB. The expansion slot is mapped to the 4-8MB region.

Well, how they're mapped depends on the status of the !CARTIN line on the cartridge port. When !CARTIN is tied to ground (usually by a cartridge), the cart slot is mapped to 0-4MB and the expansion slot is mapped to 4-8MB. When !CARTIN is left disconnected (or brought high), the two slots swap their locations. This is what I depend on for my Sega CD based cart dumping software.
That´s funny. So you can play with !CARTIN, the CS signals of ROMs chips and with A22 to simulate a 8MB plane cart, changing the !CARTIN according to A22. But, of curse no mirroring here.

It's also not compatible with mega cd.

Can you tiger the !CARTIN signal by software?

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

Post by Mask of Destiny » Wed Mar 03, 2010 6:53 pm

eteream wrote:Sorry, I missundertod your earlier messages (I read somewhere extension port only can access a miserable amount of KB... (????)).
The expansion port only exposes 17 of the address lines. Add in the virtual a0, and you get an 18-bit address which lets you address 256KB. However, there is more than one chip select so you can address more than that (I think there are 2 main ones which gives you 512KB total plus one that lets you map a small space for registers). Whatever the total amount, the individual sections are mirrored such that the the whole 4MB of address space allocated to it is filled even though you can't address 4MB of distinct memory.
eteream wrote:
Mask of Destiny wrote: It's a hardware restriction in the sense that the address decoding logic limits a cartridge to the first 4MB of the address space. You can implement your own address decoding logic to get around this, but you'll end up conflicting with other hardware in the system.
... you can ignore the CE (or whatever is named here(C_CE maybe...)) signal and be mapped all over the 0-8MB space, but also you are mapping above this, VDP registers for example. So you have to implement your own address logic. Is it right? Also this is not compatible with Sega Mega CD.
Well if you completely ignore !CE0 (I think that's the right signal) and just tie the chip select line on your ROM to ground, you'll be mapped to the entire 16MB address space and interfere with all the hardware in the system. The 68K might freeze when accessing certain addresses unless you implement !DTACK, but it will be mapped to all addresses at least. If you tied your chip select line to A23 (assuming an active low chip select input), your ROM would be mapped to the first 8MB which will work fine unless a Mega CD is attached.
Mask of Destiny wrote: Nope. Carts are only mapped to 0-4MB. The expansion slot is mapped to the 4-8MB region.
eteream wrote:Well, how they're mapped depends on the status of the !CARTIN line on the cartridge port. When !CARTIN is tied to ground (usually by a cartridge), the cart slot is mapped to 0-4MB and the expansion slot is mapped to 4-8MB. When !CARTIN is left disconnected (or brought high), the two slots swap their locations. This is what I depend on for my Sega CD based cart dumping software.
That´s funny. So you can play with !CARTIN, the CS signals of ROMs chips and with A22 to simulate a 8MB plane cart, changing the !CARTIN according to A22. But, of curse no mirroring here.

It's also not compatible with mega cd.

Can you tiger the !CARTIN signal by software?
!CARTIN is an input to the address decode logic from the cartridge port, not an output to be used by the cartridge. It's how the system senses that a game cartridge is plugged in as opposed to something like the BRAM cart. It's not useful for making a big 8MB cart, but you can do that just by implementing your own address decoding logic as I mentioned above.

This pin is controlled by the cart so it's generally not controllable via software though in theory a cart could have hardware to make it software controllable. I imagine the Mega-Cart flash cart does. For dumping purposes, you can just put a piece of tape on the appropriate portion of the cart to effectively disconnect !CARTIN or you can make a small modification to your Megadrive/Genesis to add a switch.

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

Post by Chilly Willy » Wed Mar 03, 2010 7:33 pm

Mask of Destiny wrote:For dumping purposes, you can just put a piece of tape on the appropriate portion of the cart to effectively disconnect !CARTIN or you can make a small modification to your Megadrive/Genesis to add a switch.
That's exactly what I did to one of my Atari 400s back in the good old days to dump carts. Set the switch so that DOS boots, flip the switch, then just do a BSAVE to write the cart to a floppy. It was a great way to dump carts that used the "diagnostic" init to try to prevent users from copying the carts. Pitfall II needed to be dumped that way.

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

Post by eteream » Fri Mar 05, 2010 9:58 pm

Mask of Destiny wrote: !CARTIN is an input to the address decode logic from the cartridge port, not an output to be used by the cartridge. It's how the system senses that a game cartridge is plugged in as opposed to something like the BRAM cart. It's not useful for making a big 8MB cart, but you can do that just by implementing your own address decoding logic as I mentioned above.
I don-t understand it at all. Ok, !CARTIN is a input signal, but you can change dynamically to be mapped on 0-4 or 4-8MB space according with your needs, in this case, according to A22 (in the case you want to do a 8MB cart).

So, in the case you have two ROMs of 4MB each:

If A22 is 1, then set !CARTIN and the CE of the second ROM to 1, and the CE of the first ROM to 0.
If A22 is 0, then set !CARTIN and the CE of the second ROM to 0, and the CE of the first ROM to 1.

May be I missed something...

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

Post by Mask of Destiny » Fri Mar 05, 2010 10:42 pm

eteream wrote:
Mask of Destiny wrote: !CARTIN is an input to the address decode logic from the cartridge port, not an output to be used by the cartridge. It's how the system senses that a game cartridge is plugged in as opposed to something like the BRAM cart. It's not useful for making a big 8MB cart, but you can do that just by implementing your own address decoding logic as I mentioned above.
I don-t understand it at all. Ok, !CARTIN is a input signal, but you can change dynamically to be mapped on 0-4 or 4-8MB space according with your needs, in this case, according to A22 (in the case you want to do a 8MB cart).
Well this isn't really how the signal is intended to be used. Presumably Sega intended it to be "fixed" at startup time, but changing it while the system is running works fine. I'm not sure whether changing it based on A22 would work though. Depends on when the built-in address decode logic latches the bit from the !CARTIN line.
eteream wrote:So, in the case you have two ROMs of 4MB each:

If A22 is 1, then set !CARTIN and the CE of the second ROM to 1, and the CE of the first ROM to 0.
If A22 is 0, then set !CARTIN and the CE of the second ROM to 0, and the CE of the first ROM to 1.
Assuming this kind of crazy scheme could work at all you would need a slightly different setup or else your ROMs will stomp over the upper 8MB of address space.

Something like: (!CS_R0 is the active low chip select for ROM #0)
!CARTIN = A22 (!CARTIN is active low)
!CS_R0 = A22 | !CE0 (!CE0 is the chip enable signal from the cartridge port)
!CS_R1 = !A22 | !CE0

That said you're probably better off just using bank-switch hardware if you need more than 4MB. Might be able to get it to work in emulators and maybe even certain off the shelf flash carts that way.

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

Post by eteream » Fri Mar 05, 2010 10:53 pm

Yeah... it depends on the speed at which circuitry stabilizes, and you have to deal with a23 or !CE0 too.

But I think is much better the first approach (ignoring !CE0) than the bank-switch method, because it-s simpler.
(From what I can see now it needs no extra chip (in the worst case only one))

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

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

BTW, in MD2, there is 2 more address lines on the exp connector, giving you 1Mbyte range....
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

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Sat Mar 06, 2010 5:15 am

I'm remind you my early post with one diagramm:
Image
So, use !ASEL and get 8MB ROM in solid piece. As for using 8 and 9 segments you should use your own address decoder and generate !DTACK signal manually. And you will get 10MB ROM as one piece.

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

Post by TmEE co.(TM) » Sat Mar 06, 2010 6:30 am

Also, if one decides to do manual address decoding (i.e to get a 10MB access strobe) then I advise not to use the !AS in the decoding process as it seems that DMA transfers do not assert !AS (I got garbage instead of tiles when making my own strobe when using !AS too)...
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

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Sat Mar 06, 2010 7:44 am

TmEE co.(TM) wrote:Also, if one decides to do manual address decoding (i.e to get a 10MB access strobe) then I advise not to use the !AS in the decoding process as it seems that DMA transfers do not assert !AS (I got garbage instead of tiles when making my own strobe when using !AS too)...
!AS generated by M68K and it's output, acording M68K User Manual:
Address Strobe (AS).
This three-state signal indicates that the information on the address bus is a valid
address. Output.
So, DMA can not use it when it got the bus.

Post Reply