Fixed some warnings from the previous BUS commit, and added support for Linux/UNIX.

This commit is contained in:
Stephen Anthony 2022-06-11 20:55:43 -02:30
parent c78f9e26b6
commit 0445a20e13
3 changed files with 68 additions and 55 deletions

View File

@ -54,6 +54,10 @@
* Added ARM chip auto detection.
* Extended support for older BUS (experimental) ROMs that worked
with an older, obsolete version of the BUS scheme; special thanks
to SpiceWare for the code.
* Fixed Stella crash due to invalid ZIP files.
* Fixed TV mode auto detection in some ARM ROMs.

View File

@ -20,6 +20,7 @@ MODULE_OBJS := \
src/debugger/gui/CartBFSCWidget.o \
src/debugger/gui/CartBFWidget.o \
src/debugger/gui/CartBUSWidget.o \
src/debugger/gui/CartBUSInfoWidget.o \
src/debugger/gui/CartCDFWidget.o \
src/debugger/gui/CartCDFInfoWidget.o \
src/debugger/gui/CartCMWidget.o \

View File

@ -408,7 +408,10 @@ uInt8 CartridgeBUS::peek(uInt16 address)
{
switch(address)
{
case 0x00 ... 0x0f:
case 0x00: case 0x01: case 0x02: case 0x03:
case 0x04: case 0x05: case 0x06: case 0x07:
case 0x08: case 0x09: case 0x0a: case 0x0b:
case 0x0c: case 0x0d: case 0x0e: case 0x0f:
peekvalue = readFromDatastream(address);
break;
@ -521,14 +524,12 @@ bool CartridgeBUS::poke(uInt16 address, uInt8 value)
}
else
{
uInt32 pointer = 0;
address &= 0x0FFF;
if (myBUSSubtype == BUSSubtype::BUS0)
{
uInt32 index = address & 0x0f;
uInt32 pointer, increment;
uInt32 pointer = 0, increment = 0;
switch(address)
{
@ -559,7 +560,10 @@ bool CartridgeBUS::poke(uInt16 address, uInt8 value)
myMode = 0x0f; // lower nybble f = STUFFOFF in BUS3
break;
case 0x20 ... 0x2f:
case 0x20: case 0x21: case 0x22: case 0x23:
case 0x24: case 0x25: case 0x26: case 0x27:
case 0x28: case 0x29: case 0x2a: case 0x2b:
case 0x2c: case 0x2d: case 0x2e: case 0x2f:
// Pointers are stored as:
// PPPFF---
//
@ -572,7 +576,10 @@ bool CartridgeBUS::poke(uInt16 address, uInt8 value)
setDatastreamPointer(index, pointer);
break;
case 0x30 ... 0x3f: // DSxINC
case 0x30: case 0x31: case 0x32: case 0x33: // DSxINC
case 0x34: case 0x35: case 0x36: case 0x37:
case 0x38: case 0x39: case 0x3a: case 0x3b:
case 0x3c: case 0x3d: case 0x3e: case 0x3f:
// Increments are stored as
// ----IIFF
//
@ -666,6 +673,7 @@ bool CartridgeBUS::poke(uInt16 address, uInt8 value)
}
else if (myBUSSubtype == BUSSubtype::BUS3)
{
uInt32 pointer = 0;
switch(address)
{
case 0xFEE: // AMPLITUDE
@ -706,7 +714,7 @@ bool CartridgeBUS::poke(uInt16 address, uInt8 value)
{
// Get the index of the data fetcher that's being accessed
uInt32 index = address & 0x0f;
uInt32 pointer;
uInt32 pointer = 0;
switch (index)
{