SNES memory mapping questions

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
SNES memory mapping questions
by on (#142003)
Hey guys, i'm trying to wrap my head around how to adjust where things are sitting on the SNES memory.

For example, if something is normally read from 0x3F0000, how would you change the wiring in the cart to get it to be read from 0x4F0000 instead? I'm assuming it's just how the decoder is wired up...but I can't figure what needs to be changed.
Re: SNES memory mapping questions
by on (#142005)
With that 74'139 as set, the half on the left calculates the following:

/G1=/ROMSEL and A1=A20 and B1=A21
Therefore, ROM/OE is low when all of /G1, A1, and B1 are low, or, ROM is decoded when the address bus is $0x8xxx-$0xFxxxx, $4xxxxx, $8x8xxx-$8xFxxx, or $Cxxxxx.
Pin 5 (passthrough) is low when /G1 and B1 are low, but A1 is high, or, passthrough is enabled when the address bus is $1x8xxx-$1xFxxx, $5xxxxx, $9x8xxx-$9xFxxx, or $Dxxxxx.

/G2 = passthrough, A2=A19, and B2=/RESET
Therefore, DSP/CS is low when passthrough is low, and A2 and B2 are high, or, the DSP is selected when the address bus is $188xxx-$1FFxxx, $58xxxx-$5Fxxxx, $988xxx-9FFxxx, or $D8xxxx-$DFxxxx, and the SNES is not being reset.

To be honest, I'm not clear on how this was supposed to properly decode the DSP-1 in the first place.
Re: SNES memory mapping questions
by on (#142052)
lidnariq wrote:
With that 74'139 as set, the half on the left calculates the following:

/G1=/ROMSEL and A1=A20 and B1=A21
Therefore, ROM/OE is low when all of /G1, A1, and B1 are low, or, ROM is decoded when the address bus is $0x8xxx-$0xFxxxx, $4xxxxx, $8x8xxx-$8xFxxx, or $Cxxxxx.
Pin 5 (passthrough) is low when /G1 and B1 are low, but A1 is high, or, passthrough is enabled when the address bus is $1x8xxx-$1xFxxx, $5xxxxx, $9x8xxx-$9xFxxx, or $Dxxxxx.

/G2 = passthrough, A2=A19, and B2=/RESET
Therefore, DSP/CS is low when passthrough is low, and A2 and B2 are high, or, the DSP is selected when the address bus is $188xxx-$1FFxxx, $58xxxx-$5Fxxxx, $988xxx-9FFxxx, or $D8xxxx-$DFxxxx, and the SNES is not being reset.

To be honest, I'm not clear on how this was supposed to properly decode the DSP-1 in the first place.


See last post
Re: SNES memory mapping questions
by on (#142065)
Hm. Fullsnes says that the address lines you gave are off by one. In which case, suddenly everything makes sense.

The left half of the demultiplexer decodes $0x8xxx-$1xFxxx and $8x8xxx-$9xFxxx for the ROM, and $2x8xxx-$3xFxxx and $Ax8xxx-$BxFxxx for the DSP-1.
The right half of the demultiplexer then decodes $3x8xxx-$3xFxxx (and $Bx8xxx-$BxFxxx) while /RESET is high for the DSP-1.

To move it to $4x8xxx, change the passthrough to instead be connected from /1Y2 (pin 6), which will decode $4xxxxx-$5xxxxx, and then move DSP/CS to instead /2Y2 (pin 10), which will decode $4xxxxx.
Re: SNES memory mapping questions
by on (#142078)
lidnariq wrote:
Hm. Fullsnes says that the address lines you gave are off by one.


As my CSET professor loves to say, there are only 2 hard things in programming. Naming things, cache invalidation, and off-by-one errors.
Re: SNES memory mapping questions
by on (#142130)
lidnariq wrote:
Hm. Fullsnes says that the address lines you gave are off by one.


Yeah I was listing it as a LoROM, so I skipped A15, and just shifted. I should've specified that first sorry!

Thanks for the clarification, I will give this a try.