It is currently Mon Oct 16, 2017 7:18 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: MMC1 question
PostPosted: Mon Jul 25, 2005 12:23 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
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
 Profile  
 
 Post subject: Re: MMC1 question
PostPosted: Mon Jul 25, 2005 12:45 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19084
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
 Profile  
 
 Post subject:
PostPosted: Mon Jul 25, 2005 2:08 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
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
 Profile  
 
 Post subject:
PostPosted: Mon Jul 25, 2005 5:43 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19084
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
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 9 guests


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group