notaz.gp2x.de
/
fceu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compat hacks for this old version of fceu
[fceu.git]
/
boards
/
8157.c
diff --git
a/boards/8157.c
b/boards/8157.c
index
3c4a4fb
..
ef42558
100644
(file)
--- a/
boards/8157.c
+++ b/
boards/8157.c
@@
-21,9
+21,11
@@
#include "mapinc.h"
\r
\r
static uint16 cmdreg;
\r
#include "mapinc.h"
\r
\r
static uint16 cmdreg;
\r
+static uint8 invalid_data;
\r
static SFORMAT StateRegs[]=
\r
{
\r
static SFORMAT StateRegs[]=
\r
{
\r
- {&cmdreg, 2, "CMDREG"},
\r
+ {&invalid_data, 1, "INVD"},
\r
+ {&cmdreg, 2, "CREG"},
\r
{0}
\r
};
\r
\r
{0}
\r
};
\r
\r
@@
-36,7
+38,7
@@
static void Sync(void)
\r
static DECLFR(UNL8157Read)
\r
{
\r
\r
static DECLFR(UNL8157Read)
\r
{
\r
- if(cmdreg&0x100)
\r
+ if(
invalid_data&&
cmdreg&0x100)
\r
return 0xFF;
\r
else
\r
return CartBR(A);
\r
return 0xFF;
\r
else
\r
return CartBR(A);
\r
@@
-53,13
+55,15
@@
static void UNL8157Power(void)
setchr8(0);
\r
SetWriteHandler(0x8000,0xFFFF,UNL8157Write);
\r
SetReadHandler(0x8000,0xFFFF,UNL8157Read);
\r
setchr8(0);
\r
SetWriteHandler(0x8000,0xFFFF,UNL8157Write);
\r
SetReadHandler(0x8000,0xFFFF,UNL8157Read);
\r
- cmdreg=0;
\r
+ cmdreg=0x200;
\r
+ invalid_data=1;
\r
Sync();
\r
}
\r
\r
static void UNL8157Reset(void)
\r
{
\r
cmdreg=0;
\r
Sync();
\r
}
\r
\r
static void UNL8157Reset(void)
\r
{
\r
cmdreg=0;
\r
+ invalid_data^=1;
\r
Sync();
\r
}
\r
\r
Sync();
\r
}
\r
\r