It is currently Tue Jul 17, 2018 8:18 pm

 All times are UTC - 7 hours

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: MMC1 questionPosted: Mon Jul 25, 2005 12:23 pm
 Formerly Fx3

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3127
Location: Brazil
Regarding this topic...
http://nesdev.com/bbs/viewtopic.php?t=252

...and this quote from Wiki:
Quote:
There are four 5-bit wide registers in the MMC1, loaded by sequentially writing 5 bits of data to a particular memory range. Incoming data is temporarily stored in a 5-bit shift register.

Questions:
-1. Can the MMC1's temporary shift register be reseted prematurely? I mean, with less than 5 writes? There's an old "fix" here that checks the address written; if it changes, so the shift register is reset.

-2. There's only one temporary 5-bit register that transfers its value to one of the 4 registers. Is this correct?

-3. What's the meaning of reg0 |= 0Ch when the reset bit is set?

_________________
Zepper
RockNES developer

Top

 Post subject: Re: MMC1 questionPosted: Mon Jul 25, 2005 12:45 pm

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20258
Location: NE Indiana, USA (NTSC)
Fx3 wrote:
Regarding this topic...
http://nesdev.com/bbs/viewtopic.php?t=252

...and this quote from Wiki:
Quote:
There are four 5-bit wide registers in the MMC1, loaded by sequentially writing 5 bits of data to a particular memory range. Incoming data is temporarily stored in a 5-bit shift register.

Questions:
-1. Can the MMC1's temporary shift register be reseted prematurely?

D7=1 and it can.

Quote:
-2. There's only one temporary 5-bit register that transfers its value to one of the 4 registers. Is this correct?

Yes. As I understand it, there are five registers on the mapper: reg0, reg1, reg2, reg3, and the shift register. Once the shift register is full, the mapper copies its contents to one of the other registers (selected by a demux connected to A14 and A13) and then empties the shift register.

Quote:
What's the meaning of reg0 |= 0Ch when the reset bit is set?

0Ch is an older way of writing \$0C or 0x0C, which mean 01100 binary.

The C expression { reg0 |= 0x0C; } is equivalent to { reg0 = reg0 | 0x0C; } In C, the pipe operator | does a bitwise or, and |= does a read, bitwise or, and write (like 'tsb' on 65C02 and 65C816). This means that bits D3 and D2 of reg0 are set to 1 without affecting D0, D1, and D4.

Top

 Post subject: Posted: Mon Jul 25, 2005 2:08 pm
 Formerly Fx3

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3127
Location: Brazil
Quote:
0Ch is an older way of writing \$0C or 0x0C, which mean 01100 binary.

Hehe, I know that. I want to know the reason for doing OR 0Ch at shift register reset on reg0. ^_^;;

_________________
Zepper
RockNES developer

Top

 Post subject: Posted: Mon Jul 25, 2005 5:43 pm

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20258
Location: NE Indiana, USA (NTSC)
Code:
43210  MMC1 Control Register (CPU\$8000)
|||||
|||++- Mirroring type (0/1: 1-screen; 2: horizontal; 3: vertical)
|++--- 0/1: Swap 32 KB PRG banks
|      2: Hardwire \$8000 and swap \$C000;
|      3: Hardwire \$C000 and swap \$8000
+----- 0: Swap 8 KB CHR banks
1: Swap 4 KB CHR banks

ORing \$0C into reg0 sets the PRG swapping mode to 3, which is most like UNROM.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

 All times are UTC - 7 hours

#### Who is online

Users browsing this forum: Google [Bot] and 4 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ NES / Famicom    NESdev    NESemdev    NES Graphics    NES Music    Homebrew Projects       2018 NESdev Competition       2017 NESdev Competition       2016 NESdev Competition       2014 NESdev Competition       2011 NESdev Competition    Newbie Help Center    NES Hardware and Flash Equipment       Reproduction    NESdev International       FCdev       NESdev China       NESdev Middle East Other    General Stuff    Membler Industries    Other Retro Dev       SNESdev       GBDev    Test Forum Site Issues    phpBB Issues    Web Issues    nesdevWiki