MMC1 SXROM 32kB WRAM Banking

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
MMC1 SXROM 32kB WRAM Banking
by on (#240135)
How does 32 kB WRAM work in MMC1 SXROM? It's about access to the whole 32kB - do you have to control four banks of 8kb each ($ 6000-7FFF), or maybe switching $ 8000-FFFF between ROM and RAM?
Re: MMC1 SXROM 32kB WRAM Banking
by on (#240136)
sdm wrote:
do you have to control four banks of 8kb each ($ 6000-7FFF)
This.

Is the wiki page on MMC1 unclear? If so, how can we improve it?
Re: MMC1 SXROM 32kB WRAM Banking
by on (#240147)
lidnariq wrote:
Is the wiki page on MMC1 unclear? If so, how can we improve it?


In addition, not everyone knows English perfectly, which in the case of technical matters is also more difficult.

I would like to make sure - that is 32kB are four banks of 8kB each, switched by bits 2-3 of the C000-DFFF register?

00 - first bank
01 - second
10 - third
11 - last

example:

lda 00001100
sta C000
= select last 8kb bank of 32kB SXROM WRAM?

??
Re: MMC1 SXROM 32kB WRAM Banking
by on (#240155)
Usually, if you're using large ROM or large SRAM with MMC1 (SOROM, SUROM, SXROM), you set 8K CHR mode in $8000 and write the bank number to $A000. You also write the bank number serially, one bit at a time for five bits.
Re: MMC1 SXROM 32kB WRAM Banking
by on (#240157)
switch to last 8kb bank of 32kB SXROM WRAM:

lda #%00001100
sta $A000
lsr a
sta $A000
lsr a
sta $A000
lsr a
sta $A000
lsr a
sta $A000

correct?
Re: MMC1 SXROM 32kB WRAM Banking
by on (#240158)
Correct, though this also changes to the first 256 KiB bank of a PRG ROM larger than 256 KiB.