notaz.gp2x.de
/
fceu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gp2x_test added, cli removed
[fceu.git]
/
mappers
/
6.c
diff --git
a/mappers/6.c
b/mappers/6.c
index
015aa9c
..
c6c5bf5
100644
(file)
--- a/
mappers/6.c
+++ b/
mappers/6.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
@@
-20,6
+20,7
@@
#include "mapinc.h"
#include "mapinc.h"
+static uint8 FFEmode;
#define FVRAM_BANK8(A,V) {VPage[0]=VPage[1]=VPage[2]=VPage[3]=VPage[4]=VPage[5]=VPage[6]=VPage[7]=V?&MapperExRAM[(V)<<13]-(A):&CHRRAM[(V)<<13]-(A);CHRBankList[0]=((V)<<3);CHRBankList[1]=((V)<<3)+1;CHRBankList[2]=((V)<<3)+2;CHRBankList[3]=((V)<<3)+3;CHRBankList[4]=((V)<<3)+4;CHRBankList[5]=((V)<<3)+5;CHRBankList[6]=((V)<<3)+6;CHRBankList[7]=((V)<<3)+7;PPUCHRRAM=0xFF;}
#define FVRAM_BANK8(A,V) {VPage[0]=VPage[1]=VPage[2]=VPage[3]=VPage[4]=VPage[5]=VPage[6]=VPage[7]=V?&MapperExRAM[(V)<<13]-(A):&CHRRAM[(V)<<13]-(A);CHRBankList[0]=((V)<<3);CHRBankList[1]=((V)<<3)+1;CHRBankList[2]=((V)<<3)+2;CHRBankList[3]=((V)<<3)+3;CHRBankList[4]=((V)<<3)+4;CHRBankList[5]=((V)<<3)+5;CHRBankList[6]=((V)<<3)+6;CHRBankList[7]=((V)<<3)+7;PPUCHRRAM=0xFF;}
@@
-30,7
+31,7
@@
static void FP_FASTAPASS(1) FFEIRQHook(int a)
IRQCount+=a;
if(IRQCount>=0x10000)
{
IRQCount+=a;
if(IRQCount>=0x10000)
{
-
TriggerIRQ(
);
+
X6502_IRQBegin(FCEU_IQEXT
);
IRQa=0;
IRQCount=0;
}
IRQa=0;
IRQCount=0;
}
@@
-43,14
+44,18
@@
DECLFW(Mapper6_write)
{
switch(A){
case 0x42FF:MIRROR_SET((V>>4)&1);break;
{
switch(A){
case 0x42FF:MIRROR_SET((V>>4)&1);break;
- case 0x42FE:onemir((V>>3)&2);break;
- case 0x4501:IRQa=0;break;
+ case 0x42FE:onemir((V>>3)&2);
FFEmode=V&0x80;
break;
+ case 0x4501:IRQa=0;
X6502_IRQEnd(FCEU_IQEXT);
break;
case 0x4502:IRQCount&=0xFF00;IRQCount|=V;break;
case 0x4503:IRQCount&=0xFF;IRQCount|=V<<8;IRQa=1;break;
}
} else {
case 0x4502:IRQCount&=0xFF00;IRQCount|=V;break;
case 0x4503:IRQCount&=0xFF;IRQCount|=V<<8;IRQa=1;break;
}
} else {
- ROM_BANK16(0x8000,V>>2);
- FVRAM_BANK8(0x0000,V&3);
+ switch (FFEmode)
+ {
+ case 0x80: setchr8(V); break;
+ default: ROM_BANK16(0x8000,V>>2);
+ FVRAM_BANK8(0x0000,V&3);
+ }
}
}
void Mapper6_StateRestore(int version)
}
}
void Mapper6_StateRestore(int version)
@@
-73,4
+78,3
@@
SetWriteHandler(0x4020,0x5fff,Mapper6_write);
SetWriteHandler(0x8000,0xffff,Mapper6_write);
MapStateRestore=Mapper6_StateRestore;
}
SetWriteHandler(0x8000,0xffff,Mapper6_write);
MapStateRestore=Mapper6_StateRestore;
}
-