NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectMMC1 Implementation  
Posted by<_Hyde_>
Posted on9/22/03 7:07 PM
From IP66.53.63.7  



There is something wrong with this code... Could any of you guys help me out with this one? Thanks...

if (NESByte & D7) {
MMC_1_tmpRegister = MMC_1_registerBit = 0x00;
MMC_1_register [0] |= 0x0c;
break;
}

MMC_1_tmpRegister |= ((NESByte & 1) << MMC_1_registerBit ++);

if (MMC_1_registerBit == 5) {
if (NESAddress < 0xa000) { // Register 0
MMC_1_register [0] = MMC_1_tmpRegister;
NESROM_setMirroring (MMC_1_tmpRegister & 1);
}
else if (NESAddress < 0xc000) { // Register 1
MMC_1_register [1] = MMC_1_tmpRegister;
if (MMC_1_register [0] & D4) NESVRAM_swap_4K_page (0x0000, MMC_1_tmpRegister & 0x0f);
else NESVRAM_swap_8K_page (MMC_1_tmpRegister & 0x0f);
}
else if (NESAddress < 0xe000) { // Register 2
MMC_1_register [2] = MMC_1_tmpRegister;
if (MMC_1_register [0] & D4) NESVRAM_swap_4K_page (0x1000, MMC_1_tmpRegister & 0x0f);
}
else { // Register 3
MMC_1_register [3] = MMC_1_tmpRegister;
if (MMC_1_register [0] & D3) {
if (MMC_1_register [0] & D2) NESPRGRAM_swap_16K_page (0x0000, NESByte & 0xf);
else NESPRGRAM_swap_16K_page (0x4000, NESByte & 0xf);
}
else NESPRGRAM_swap_32K_page (NESByte & 0x0f);
}
MMC_1_registerBit = 0x00;
MMC_1_tmpRegister = 0;
}


hydesprojects.cjb.net

-
Entire Thread
Subject  Posted byPosted On
.MMC1 Implementation  <_Hyde_>9/22/03 7:07 PM
.*Re: MMC1 Implementation  Hugin9/23/03 3:30 PM
..*Re: MMC1 Implementation  Hugin9/23/03 3:31 PM
...*Re: MMC1 Implementation  quietust9/23/03 6:15 PM
....*Re: MMC1 Implementation  Hugin9/24/03 1:20 PM
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo