## how mapped memory?

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
• For making cartridges of your Super NES games, see Reproduction.
skarstoker
Posts: 43
Joined: Thu Aug 08, 2013 2:14 pm

### how mapped memory?

hello friends

I'm trying to understand how memory is mapped

invent this table to check if IP routing is similar to snes mapping

someone can explain how memory is addressed

example: (2 ROM of 32 Mbits)

00-3F in bank 8000-FFFF (1 ROM) and C0-FF in bank 8000-FFFF (2 ROM)

regards.

koitsu
Posts: 4218
Joined: Sun Sep 19, 2004 9:28 pm

### Re: how mapped memory?

"2 ROM of 32mbits" means 64mbit.

Mode 21 does not have enough addressing space for a 64mbit ROM. The maximum ROM addressing space available with mode 21 is 32mbit. The only solutions to this:

1. Use what's called a "mapper", which is a chip that can let software dynamically swap portions of ROM around (change address lines and where they go). There are are only a handful of games which use this on the SNES/SFC (mode 21 with a special mapper chip),

2. Use mode 25, which supports up to 63mbit (not 64mbit!) of addressing space. The reason it doesn't support up to 64mbit is because, again, of the memory map (see attached picture). There are two main areas for ROM (the others are mirrors):

* Area 1: Banks \$c0-ff (64 banks), address ranges \$0000-ffff (64KB). Simple math: 64 * 65536 = 4,194,304 bytes
* Area 2: Banks \$40-7d (62 banks), address ranges \$0000-ffff (64KB). Simple math: 62 * 65536 = 4,063,232 bytes
* Area 3: Banks \$3e-3f (2 banks), address ranges \$8000-ffff (32KB). Simple math: 2 * 32768 = 65,536 bytes

Thusly, 4,194,304 + 4,063,232 + 65,536 = 8,323,072 bytes, which is just short of 64mbit (8,388,608 bytes).

Make sense?

Also: what is your native language? I ask because this forum is extremely diverse, we have people who speak Russian, Spanish, Chinese, Japanese, Swedish, and Portuguese who reside here. It may be more beneficial if someone explained this in your native tongue.

(2019/02/26 Edit: attachments removed.)
Last edited by koitsu on Tue Feb 26, 2019 8:24 pm, edited 1 time in total.

skarstoker
Posts: 43
Joined: Thu Aug 08, 2013 2:14 pm

### Re: how mapped memory?

koitsu wrote: "2 ROM of 32mbits" means 64mbit.
Mode 21 does not have enough addressing space for a 64mbit ROM. The maximum ROM addressing space available with mode 21 is 32mbit.
mode21 (HIGH ROM), without SRAM or decoder can only handle 32 Mbit?

koitsu wrote: The only solutions to this:

1. Use what's called a "mapper", which is a chip that can let software dynamically swap portions of ROM around (change address lines and where they go). There are are only a handful of games which use this on the SNES/SFC (mode 21 with a special mapper chip),
you mean a memory decoder, like 74LS139 or MAD-1

YEAH, I now understand better, the memory are not static towards a direction, in other words, when access is required to MASKROM 1, it is placed in a position, and when it requires access to MASKROM 2, then, the MASKROM 1 is erased from memory, and places the MASKROM 2...
koitsu wrote: 2. Use mode 25, which supports up to 63mbit (not 64mbit!) of addressing space. The reason it doesn't support up to 64mbit is because, again, of the memory map (see attached picture). There are two main areas for ROM (the others are mirrors):

* Area 1: Banks \$c0-ff (64 banks), address ranges \$0000-ffff (64KB). Simple math: 64 * 65536 = 4,194,304 bytes
* Area 2: Banks \$40-7d (62 banks), address ranges \$0000-ffff (64KB). Simple math: 62 * 65536 = 4,063,232 bytes
* Area 3: Banks \$3e-3f (2 banks), address ranges \$8000-ffff (32KB). Simple math: 2 * 32768 = 65,536 bytes

Thusly, 4,194,304 + 4,063,232 + 65,536 = 8,323,072 bytes, which is just short of 64mbit (8,388,608 bytes).
Make sense?
thank you very much for this information, thanks for your time and thank your willingness

koitsu wrote:
no problem, however, mention something I found
kyuusaku wrote: I've come up with a REALLY easy 96M ROM + SRAM decoder using the 139 already in many SNES carts:

Clever huh? It doesn't look like SRAM will conflict with anything but I'm going by internet memory maps.
where A14 and A13 are HIGH
I think it means this (according to my table):

A14 -------> 004000
A13 -------> 002000

004000 + 002000 = 006000

but not as calculating addresses 00-3F.

kyuusaku wrote: Also: what is your native language? I ask because this forum is extremely diverse, we have people who speak Russian, Spanish, Chinese, Japanese, Swedish, and Portuguese who reside here. It may be more beneficial if someone explained this in your native tongue.
I'm Chilean, my language is Spanish, but, I understand English, however, I have trouble writing.

thanks for all estimated