better support for iowrite.readbyte()

This commit is contained in:
gocha 2011-02-14 13:21:28 +00:00
parent 9cc4ee1d77
commit daf1b10074
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,7 @@ static INLINE uint8 RdMem(unsigned int A)
//normal memory write //normal memory write
static INLINE void WrMem(unsigned int A, uint8 V) static INLINE void WrMem(unsigned int A, uint8 V)
{ {
IOWriteLog[A] = V;
BWrite[A](A,V); BWrite[A](A,V);
#ifdef _S9XLUA_H #ifdef _S9XLUA_H
CallRegisteredLuaMemHook(A, 1, V, LUAMEMHOOK_WRITE); CallRegisteredLuaMemHook(A, 1, V, LUAMEMHOOK_WRITE);
@ -80,6 +81,7 @@ uint8 X6502_DMR(uint32 A)
void X6502_DMW(uint32 A, uint8 V) void X6502_DMW(uint32 A, uint8 V)
{ {
ADDCYC(1); ADDCYC(1);
IOWriteLog[A] = V;
BWrite[A](A,V); BWrite[A](A,V);
#ifdef _S9XLUA_H #ifdef _S9XLUA_H
CallRegisteredLuaMemHook(A, 1, V, LUAMEMHOOK_WRITE); CallRegisteredLuaMemHook(A, 1, V, LUAMEMHOOK_WRITE);