notaz.gp2x.de
/
fceu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge mapper code from FCEUX
[fceu.git]
/
mappers
/
41.c
diff --git
a/mappers/41.c
b/mappers/41.c
index
ce63408
..
84aed5d
100644
(file)
--- a/
mappers/41.c
+++ b/
mappers/41.c
@@
-1,7
+1,7
@@
/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
- * Copyright (C) 2002
Ben Parnel
l
+ * Copyright (C) 2002
Xodnize
l
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-15,7
+15,7
@@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 5
9 Temple Place, Suite 330, Boston, MA 02111-1307
USA
+ * Foundation, Inc., 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
*/
#include "mapinc.h"
*/
#include "mapinc.h"
@@
-28,24
+28,29
@@
DECLFW(Mapper41_write)
{
if(A<0x8000)
{
{
if(A<0x8000)
{
- ROM_BANK32(A&7);
- X6502_Rebase();
- MIRROR_SET((A>>5)&1);
- calreg=A;
- calchr&=0x3;
- calchr|=(A>>1)&0xC;
- VROM_BANK8(calchr);
+ ROM_BANK32(A&7);
+ MIRROR_SET((A>>5)&1);
+ calreg=A;
+ calchr&=0x3;
+ calchr|=(A>>1)&0xC;
+ VROM_BANK8(calchr);
}
else if(calreg&0x4)
{
}
else if(calreg&0x4)
{
- calchr&=0xC;
- calchr|=A&3;
- VROM_BANK8(calchr);
+
calchr&=0xC;
+
calchr|=A&3;
+
VROM_BANK8(calchr);
}
}
}
}
+static void M41Reset(void)
+{
+ calreg=calchr=0;
+}
+
void Mapper41_init(void)
{
void Mapper41_init(void)
{
+ MapperReset=M41Reset;
ROM_BANK32(0);
SetWriteHandler(0x8000,0xffff,Mapper41_write);
SetWriteHandler(0x6000,0x67ff,Mapper41_write);
ROM_BANK32(0);
SetWriteHandler(0x8000,0xffff,Mapper41_write);
SetWriteHandler(0x6000,0x67ff,Mapper41_write);