MMC1 SXROM 32kB WRAM Banking

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
sdm
Posts: 306
Joined: Tue Apr 11, 2006 4:08 am
Location: Poland

MMC1 SXROM 32kB WRAM Banking

Post by sdm » Tue Jun 25, 2019 12:29 pm

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?

lidnariq
Posts: 9411
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: MMC1 SXROM 32kB WRAM Banking

Post by lidnariq » Tue Jun 25, 2019 12:36 pm

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?

sdm
Posts: 306
Joined: Tue Apr 11, 2006 4:08 am
Location: Poland

Re: MMC1 SXROM 32kB WRAM Banking

Post by sdm » Wed Jun 26, 2019 12:42 am

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?

??
Last edited by sdm on Wed Jun 26, 2019 7:12 am, edited 1 time in total.

tepples
Posts: 21981
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: MMC1 SXROM 32kB WRAM Banking

Post by tepples » Wed Jun 26, 2019 5:23 am

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.

sdm
Posts: 306
Joined: Tue Apr 11, 2006 4:08 am
Location: Poland

Re: MMC1 SXROM 32kB WRAM Banking

Post by sdm » Wed Jun 26, 2019 7:15 am

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?

tepples
Posts: 21981
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: MMC1 SXROM 32kB WRAM Banking

Post by tepples » Wed Jun 26, 2019 7:36 am

Correct, though this also changes to the first 256 KiB bank of a PRG ROM larger than 256 KiB.

Post Reply