M468: Cleanups and bugfixes
This commit is contained in:
@@ -34,17 +34,16 @@ static void UNROM_sync () {
|
||||
}
|
||||
|
||||
static DECLFW(DISCRETE_writeLatch) {
|
||||
if (mapper ==0x09 && mapperFlags ==0xE && A ==0xA000 && V ==0x00)
|
||||
V =0x06; // UNROM: Strange hack, needed to get #282 "Portopia Serial Murder Case" on 852-in-1 running
|
||||
latch =V;
|
||||
sync();
|
||||
}
|
||||
|
||||
static DECLFW(GNROM_writeLatch) {
|
||||
if (~prgOR &0x2000 || mapper ==0x1C || mapper==0x1D)
|
||||
V =V >>4 &0xF | V <<4 &0xF0; // Color Dreams: swap nibbles to mimic GNROM
|
||||
latch =V;
|
||||
sync();
|
||||
static DECLFW(Portopia_writeLatch) {
|
||||
DISCRETE_writeLatch(A, A ==0xA000 && V ==0x00? 0x06: V); /* Strange hack, needed to get #282 "Portopia Serial Murder Case" on 852-in-1 running */
|
||||
}
|
||||
|
||||
static DECLFW(ColorDreams_writeLatch) {
|
||||
DISCRETE_writeLatch(A, V >>4 &0xF | V <<4 &0xF0); /* Sswap nibbles to mimic GNROM */
|
||||
}
|
||||
|
||||
|
||||
@@ -59,15 +58,15 @@ void ANROM_BNROM_reset(uint8 clearRegs) {
|
||||
void GNROM_reset(uint8 clearRegs) {
|
||||
sync =GNROM_sync;
|
||||
prgAND =mapperFlags &8? 0x07: 0x0F;
|
||||
SetWriteHandler(0x8000, 0xFFFF, GNROM_writeLatch);
|
||||
SetWriteHandler(0x8000, 0xFFFF, misc &0x10 && mapper &~0x10? DISCRETE_writeLatch: ColorDreams_writeLatch);
|
||||
latch =0;
|
||||
sync();
|
||||
}
|
||||
|
||||
void UNROM_reset(uint8 clearRegs) {
|
||||
sync =UNROM_sync;
|
||||
prgAND =mapper ==0x0B || mapper ==0x17 &&~mapperFlags &8? 0x3F: mapperFlags &2? 0x0F: 0x1F;
|
||||
SetWriteHandler(0x8000, 0xFFFF, DISCRETE_writeLatch);
|
||||
prgAND =mapper ==0x0B || misc2 &0x10? 0x3F: mapperFlags &2? 0x0F: 0x1F;
|
||||
SetWriteHandler(0x8000, 0xFFFF, mapper ==0x09 && mapperFlags ==0xE? Portopia_writeLatch: DISCRETE_writeLatch);
|
||||
sync();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user