Page 1 of 1

MMC1 SXROM 32kB WRAM Banking

Posted: Tue Jun 25, 2019 12:29 pm
by sdm
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

Posted: Tue Jun 25, 2019 12:36 pm
by lidnariq
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

Posted: Wed Jun 26, 2019 12:42 am
by sdm
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

Posted: Wed Jun 26, 2019 5:23 am
by tepples
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

Posted: Wed Jun 26, 2019 7:15 am
by sdm
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

Posted: Wed Jun 26, 2019 7:36 am
by tepples
Correct, though this also changes to the first 256 KiB bank of a PRG ROM larger than 256 KiB.