Add mapper 581.
This commit is contained in:
@@ -39,11 +39,11 @@ static void sync () {
|
||||
setmirror(Latch_address &0x02? MI_H: MI_V);
|
||||
}
|
||||
|
||||
void protectLatchBits (uint16 *address, uint8 *newValue, uint8 romValue) { /* Once bit 9 is set, only the inner bank bits can be modified. */
|
||||
if (Latch_address &0x200) *address = *address &0x01C | Latch_address &~0x01C;
|
||||
static void trapLatchWrite (uint16 *newAddress, uint8 *newValue, uint8 romValue) { /* Once bit 9 is set, only the inner bank bits can be modified. */
|
||||
if (Latch_address &0x200) *newAddress = *newAddress &0x01C | Latch_address &~0x01C;
|
||||
}
|
||||
|
||||
void Mapper579_Init (CartInfo *info) {
|
||||
Latch_init(info, sync, 0x8000, 0xFFFF, protectLatchBits);
|
||||
Latch_init(info, sync, 0x8000, 0xFFFF, trapLatchWrite);
|
||||
info->Reset = Latch_power;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user