Genesis / Megadrive Maximum Memory Map

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Jazzmarazz
Very interested
Posts: 60
Joined: Wed Mar 12, 2014 11:11 pm
Location: Michigan
Contact:

Genesis / Megadrive Maximum Memory Map

Post by Jazzmarazz » Wed Mar 12, 2014 11:14 pm

I can't tell if we discuss the 16-bit Sega Consoles, but I am in need of some direction.

I am trying to design a developer's cart that includes two or four 8-bit EEPROMs and the maximum amount of RAM that the console can access.

Image

I really only need to worry about 1 or 2MBytes of ROM, but I would like to find out how to wire up the maximum amount of RAM.

Is the maximum going to be Serial:

Image

or Parallel:

Image

The cart that I want to make will have all newer parts, so no official carts have to die. Depending on whether parallel or serial can be larger, then I will design the board around that.

For example:

Image

Also, if some of you are aware, the parallel SRAM mapping will normally use the /LDSW pin as the /WE. If I am not mistaken, the /LDSW pin is used as an 8-bit port for writing to certain locations. Can the /UDSW also be used to add a second writable bank of RAM? Theoretically?

Image

Thanks all,
Jazz

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Thu Mar 13, 2014 8:52 am

I think this topic is more indicated in the hardware section of the forum ;)

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

Post by TmEE co.(TM) » Thu Mar 13, 2014 8:55 am

The cart area is 4MB, it is totally up to you how you partition that.

!LWR and !UWR can be used as you mentioned.
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

Jazzmarazz
Very interested
Posts: 60
Joined: Wed Mar 12, 2014 11:11 pm
Location: Michigan
Contact:

Post by Jazzmarazz » Thu Mar 13, 2014 3:27 pm

Stef wrote:I think this topic is more indicated in the hardware section of the forum ;)
I see that now, thanks. :P
TmEE co.(TM) wrote:The cart area is 4MB, it is totally up to you how you partition that.

!LWR and !UWR can be used as you mentioned.
Excellent. Thanks for that assurance.
Now, were the two pins !LWR and !UWR ever used on the same board? I haven't seen any official games to fill the entire map unless it was all ROM space.

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

Post by TmEE co.(TM) » Thu Mar 13, 2014 3:52 pm

No commercial game used SRAM (or equivalent) at the high byte so !UWR is not used by them.

Duke Nukem 3D uses 4MByte ROM and 32KByte SRAM. Standard Sega SRAM mapper is used which allows second 2MBytes to be swapped between ROM and RAM.
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

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Thu Mar 13, 2014 9:21 pm

I don't know what RAM you're talking about.
First, I thought you talking about some RAM to be addition to standard 0xFF0000 - 0xFFFFFF RAM. But now I don't know.
Also, you can use full 8 Megabytes ROM, but it's not compatible with SegaCD (MegaCD) and pirate consoles.
Image

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Thu Mar 13, 2014 11:36 pm

r57shell wrote:I don't know what RAM you're talking about.
First, I thought you talking about some RAM to be addition to standard 0xFF0000 - 0xFFFFFF RAM. But now I don't know.
Also, you can use full 8 Megabytes ROM, but it's not compatible with SegaCD (MegaCD) and pirate consoles.
You can even goes up to 10 MB... but indeed that break addon (sega-cd et 32X) compatibility.

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Fri Mar 14, 2014 12:08 am

How high can you go without breaking compatibility?

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

Post by Mask of Destiny » Fri Mar 14, 2014 12:41 am

4MB is the max without bank switching for Sega CD compatibility. I think somewhere around 8MB is the max when a 32X is installed.

Essentially, a well behaving cartridge should only be on the bus when either !CE0 or !TIME are low. !CE0 covers a 4MB space starting at $0 or $40000 depending on the state of !CART and !TIME covers a 256 byte space at $A13000.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Fri Mar 14, 2014 9:07 am

Actually you can go higher than 4MB but then you need to use a bank switch system.

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Fri Mar 14, 2014 10:45 am

Stef wrote:You can even goes up to 10 MB... but indeed that break addon (sega-cd et 32X) compatibility.
Yes, but it's much harder than 8 MB.

Can I ask a little offtop question?)
How I can add additional RAM (not SRAM) into cart?)
Ofcourse with banking system or other tricks.
This is in case if 65 KB RAM is just not enough :)
Image

Jazzmarazz
Very interested
Posts: 60
Joined: Wed Mar 12, 2014 11:11 pm
Location: Michigan
Contact:

Post by Jazzmarazz » Fri Mar 14, 2014 8:19 pm

r57shell wrote:
Stef wrote:You can even goes up to 10 MB... but indeed that break addon (sega-cd et 32X) compatibility.
Yes, but it's much harder than 8 MB.

Can I ask a little offtop question?)
How I can add additional RAM (not SRAM) into cart?)
Ofcourse with banking system or other tricks.
This is in case if 65 KB RAM is just not enough :)
If I am not mistaken, correct me if I am wrong because it does help, ram can be addressed anywhere inside of the 4MB memory map. The task is setting up the glue logic to access however much you need. Also finding ram ICs that are large enough for your purposes could be a task too.

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Sat Mar 15, 2014 10:16 am

I know how to make logic, but I'm not sure anything related to SRAM and RAM including EEPROM.
Image

Jazzmarazz
Very interested
Posts: 60
Joined: Wed Mar 12, 2014 11:11 pm
Location: Michigan
Contact:

Post by Jazzmarazz » Sat Mar 15, 2014 7:16 pm

r57shell wrote:I know how to make logic, but I'm not sure anything related to SRAM and RAM including EEPROM.
If you know how to make logic, then you should have no problem. All you do is place the ROM and SRAM anywhere inside of the memory map as long as they don't overlap. Most commonly, you will use !CE and the higher Addressing bits inside of the logic and then !OE (!RD) and !WR (!LWR or !UWR) connected directly to the ROM and SRAM control pins.

Try to calculate the hexadecimal address ranges for this setup:

Image

It is quite common in official carts. Also note that "RAM!CS" is from the sram reset ic, which disables the RAM when the console if off.

The Memory range will be between $000000 - $3FFFFF and will have some gaps of emptiness.

I can't really help you with the Serial EEPROMs.

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Sat Mar 15, 2014 10:58 pm

Did I ask help with building logic?
I just don't know any info about how Write Access is done. May be there is different timing? May be something else? May be you can't write words: bytes only. May be you can't write bytes: words only.
Many of EEPROM-s needs to initialize programmable mode. Is they supported? And a lot more questions.

But what about RAM (without S): it's known that RAM in common sense needs to be rewrited frequently to restore data, otherwhise data would be lost. Is it needed for MD? Do I need to add some microcontroller which would update RAM to save data? Is there someone who experemented with RAM (not SRAM)?
This is what I don't know, and not sure. This is why I'm not talking about RAM.

If you want to add SRAM, I can tell you, if you sure that /WR is triggered on whole M68k range (it can be tested), then you can make whole 4MB SRAM and with 4MB ROM too (within same addresses). It can be easily done using /TIME. Just latch lsb value when /TIME is triggered, and make simple switching if latched value is 0 then /CE on ROM and /CE off SRAM, if latched value is 1 then /CE off ROM and /CE on SRAM.
There can be mistakes, because I didn't done it myself. Also, I don't remember what signal active in which state (high or low) thats why I always write in such way /TIME.
Image

Post Reply