HomeForumsWhat's newResources 
 
 
Help with cartridge signals an ROM with RAM
krank - Aug 25, 2024
 krank Aug 25, 2024
Hello,
I am new here so hello to all!

I would like to make my own cartridge. I just need to clarify a few signals. So far as I understand if I only want a 2MB rom plus ram then I simply hook everything to the address and data lines (and control) and decode the addresses above 0x200000 to enable the ram and below that address to the rom. Is this correct so far?

Now if I would like to have a 4MB rom and no ram I can simply hook it up to the address and data lines and thats it.
But if I would like to have 4MB rom and also some ram then the memory addresses above (and equal) 0x200000 are overlapping. To switch between the rom or ram the mega drive (or genesis) sets the data D0 to either 1 or 0 and then pulses the /Time signal. Is this correct?

Thanks a lot
Kind regards

 DamageX Aug 27, 2024
That is how existing games do it. For instance, Phantasy Star 4 does a write to $A130F1 (which causes /Time to go low) to switch between ROM and SRAM.

 krank Aug 27, 2024
Thanks for the reply. So I suppose the actual address does not matter as long as it is in the $A13000 to $A130FF space. Is that correct?

One more question to clarify something. When I look at the address space then there is A1 to A23. Taking A0 in account that is a space of 8MB from which only 4MB are used. But there is nothing to decode if the upper bit is 0 or 1. So how does the rom know that the A23 is low or high. This would mean that the rom could collide with anything that had the same address but also A23 is 1. Or am I missing something here?

 DamageX Aug 27, 2024
Yes, anything in $A13000 to $A130FF

A1~A23 allows the cartridge bus to address 16MB of space. A0 is absent because the 68000 normally accesses 16-bit words. (If it needs to write a byte individually it uses /LWR or /UWR.) Cartridges can ignore A22 and A23 though, because the /CE_0 signal is only active for the first 4MB.

So a 4MB cart with SRAM should be using D0~D15, A1~A21, /CAS_0, /CE_0, /LWR, and /TIME

 krank Aug 28, 2024
@DamageX...: Thanks a lot for the details.

 krank Nov 13, 2024
Just a short info that my cartridge works. I made it with a 2MB Flash IC and a 8KB FRAM and a 3D printed caseing. The second 5V line on the cartridge is used for /WE on the flash IC. Also made my own USB flasher for it with a nice little GUI. The cart works fine with SGDK and an original MegaDrive.