aboutsummaryrefslogtreecommitdiff
path: root/source/getset.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/getset.h')
-rw-r--r--source/getset.h31
1 files changed, 26 insertions, 5 deletions
diff --git a/source/getset.h b/source/getset.h
index f04bf95..9b94b22 100644
--- a/source/getset.h
+++ b/source/getset.h
@@ -98,10 +98,12 @@
#include "obc1.h"
#include "seta.h"
+#ifndef NO_OPEN_BUS
extern "C"
{
extern uint8 OpenBus;
}
+#endif
uint8 S9xGetByte (uint32 Address)
{
@@ -178,8 +180,11 @@ uint8 S9xGetByte (uint32 Address)
#ifdef DEBUGGER
printf ("DEBUG R(B) %06x\n", Address);
#endif
- return OpenBus;
-
+#ifndef NO_OPEN_BUS
+ return OpenBus;
+#else
+ return 0; // Arbitrarily chosen value [Neb]
+#endif
default:
@@ -193,7 +198,11 @@ uint8 S9xGetByte (uint32 Address)
#ifdef DEBUGGER
printf ("R(B) %06x\n", Address);
#endif
+#ifndef NO_OPEN_BUS
return OpenBus;
+#else
+ return 0; // Arbitrarily chosen value [Neb]
+#endif
}
}
@@ -201,8 +210,13 @@ uint16 S9xGetWord (uint32 Address)
{
if ((Address & 0x0fff) == 0x0fff)
{
- OpenBus=S9xGetByte (Address);
+#ifndef NO_OPEN_BUS
+ OpenBus = S9xGetByte (Address);
return (OpenBus | (S9xGetByte (Address + 1) << 8));
+#else
+ uint8 Split = S9xGetByte (Address);
+ return (Split | (S9xGetByte (Address + 1) << 8));
+#endif
}
int block;
uint8 *GetAddress = Memory.Map [block = (Address >> MEMMAP_SHIFT) & MEMMAP_MASK];
@@ -302,8 +316,11 @@ uint16 S9xGetWord (uint32 Address)
#ifdef DEBUGGER
printf ("DEBUG R(W) %06x\n", Address);
#endif
- return (OpenBus | (OpenBus<<8));
-
+#ifndef NO_OPEN_BUS
+ return (OpenBus | (OpenBus<<8));
+#else
+ return 0; // Arbitrarily chosen value [Neb]
+#endif
default:
case CMemory::MAP_NONE:
@@ -316,7 +333,11 @@ uint16 S9xGetWord (uint32 Address)
#ifdef DEBUGGER
printf ("R(W) %06x\n", Address);
#endif
+#ifndef NO_OPEN_BUS
return (OpenBus | (OpenBus<<8));
+#else
+ return 0; // Arbitrarily chosen value [Neb]
+#endif
}
}