diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/memmap.c | 6 | ||||
-rw-r--r-- | src/port.h | 18 | ||||
-rw-r--r-- | src/sa1.c | 59 |
3 files changed, 44 insertions, 39 deletions
diff --git a/src/memmap.c b/src/memmap.c index d72cea0..03e2e9a 100644 --- a/src/memmap.c +++ b/src/memmap.c @@ -299,10 +299,10 @@ bool8_32 LoadROM (const char *filename) STREAM ROMFile;
bool8_32 Interleaved = FALSE;
bool8_32 Tales = FALSE;
- char dir [_MAX_DIR + 1];
+ char dir [_MAX_PATH + 1];
char drive [_MAX_DRIVE + 1];
- char name [_MAX_FNAME + 1];
- char ext [_MAX_EXT + 1];
+ char name [_MAX_PATH + 1];
+ char ext [_MAX_PATH + 1];
char fname [_MAX_PATH + 1];
int i;
@@ -95,13 +95,17 @@ typedef short int16_32; #endif //Path Defines -#undef _MAX_PATH -#define _MAX_DIR PATH_MAX -#define _MAX_DRIVE 1 -#define _MAX_FNAME PATH_MAX -#define _MAX_EXT PATH_MAX -//#define PATH_MAX 1024 -#define _MAX_PATH PATH_MAX +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + +#ifndef _MAX_DRIVE +#define _MAX_DRIVE 1 +#endif + +#ifndef _MAX_PATH +#define _MAX_PATH PATH_MAX +#endif //True/False Defines #define TRUE 1 @@ -402,39 +402,40 @@ void S9xSetSA1MemMap(uint32 which1, uint8 map) uint8 S9xGetSA1(uint32 address)
{
- if ((address < 0x2300) && (address > 0x230d)) return (Memory.FillRAM [address]);
- switch (address)
- {
- case 0x2300:
- return ((uint8)((Memory.FillRAM [0x2209] & 0x5f) |
- (CPU.IRQActive & (SA1_IRQ_SOURCE | SA1_DMA_IRQ_SOURCE))));
- case 0x2301:
- return ((Memory.FillRAM [0x2200] & 0xf) |
- (Memory.FillRAM [0x2301] & 0xf0));
- case 0x2306:
- return ((uint8) SA1.sum);
- case 0x2307:
- return ((uint8)(SA1.sum >> 8));
- case 0x2308:
- return ((uint8)(SA1.sum >> 16));
- case 0x2309:
- return ((uint8)(SA1.sum >> 24));
- case 0x230a:
- return ((uint8)(SA1.sum >> 32));
- case 0x230b:
+ if ((address < 0x2300) && (address > 0x230d))
return (Memory.FillRAM [address]);
- case 0x230c:
- return (Memory.FillRAM [0x230c]);
- case 0x230d:
+
+ switch (address)
{
- uint8 byte = Memory.FillRAM [0x230d];
+ case 0x2300:
+ return ((uint8)((Memory.FillRAM [0x2209] & 0x5f) |
+ (CPU.IRQActive & (SA1_IRQ_SOURCE | SA1_DMA_IRQ_SOURCE))));
+ case 0x2301:
+ return ((Memory.FillRAM [0x2200] & 0xf) |
+ (Memory.FillRAM [0x2301] & 0xf0));
+ case 0x2306:
+ return ((uint8) SA1.sum);
+ case 0x2307:
+ return ((uint8)(SA1.sum >> 8));
+ case 0x2308:
+ return ((uint8)(SA1.sum >> 16));
+ case 0x2309:
+ return ((uint8)(SA1.sum >> 24));
+ case 0x230a:
+ return ((uint8)(SA1.sum >> 32));
+ case 0x230b:
+ return (Memory.FillRAM [address]);
+ case 0x230c:
+ return (Memory.FillRAM [0x230c]);
+ case 0x230d:
+ {
+ uint8 byte = Memory.FillRAM [0x230d];
- if (Memory.FillRAM [0x2258] & 0x80)
- S9xSA1ReadVariableLengthData(TRUE, FALSE);
- return (byte);
- }
+ if (Memory.FillRAM [0x2258] & 0x80)
+ S9xSA1ReadVariableLengthData(TRUE, FALSE);
+ return (byte);
+ }
}
-
}
void S9xSetSA1(uint8 byte, uint32 address)
|