Cleaned up formatting in Thumb ARM emulation code.

Wrapped THUMB ARM emulation in a define, so that it can be excluded
from builds.  To enable it, the 'THUMB_SUPPORT' directive must be
included in the build process.  This has been added to the OSX
project files, but is still TODO for Linux and Windows.

Removed some obsolete include paths from the OSX project files,
dating back about 5 years or so.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2215 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2011-04-16 16:53:41 +00:00
parent bcb8dfbc2b
commit 72185d0848
6 changed files with 1120 additions and 1067 deletions

View File

@ -62,9 +62,11 @@ CartridgeDPCPlus::CartridgeDPCPlus(const uInt8* image, uInt32 size,
myFrequencyImage += offset;
}
#ifdef THUMB_SUPPORT
// Create Thumbulator ARM emulator
myThumbEmulator = new Thumbulator((uInt16*)(myProgramImage-0xC00),
(uInt16*)myDPCRAM);
#endif
// Copy DPC display data to Harmony RAM
memcpy(myDisplayImage, myProgramImage + 0x6000, 0x1000);
@ -89,7 +91,9 @@ CartridgeDPCPlus::~CartridgeDPCPlus()
delete[] myImage;
delete[] myDPCRAM;
#ifdef THUMB_SUPPORT
delete myThumbEmulator;
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -177,7 +181,7 @@ inline void CartridgeDPCPlus::updateMusicModeDataFetchers()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
inline void CartridgeDPCPlus::callFunction(uInt8 value)
{
// myParameter
// myParameter
uInt16 ROMdata = (myParameter[1] << 8) + myParameter[0];
switch (value)
{
@ -194,12 +198,13 @@ inline void CartridgeDPCPlus::callFunction(uInt8 value)
myDisplayImage[myCounters[myParameter[2]]+i] = myParameter[0];
myParameterPointer = 0;
break;
#ifdef THUMB_SUPPORT
case 254:
case 255: // Call user writen ARM code (most likely be C compiled for ARM).
// ARM code not supported by Stella at this time.
case 255:
// Call user written ARM code (most likely be C compiled for ARM)
myThumbEmulator->run();
break;
#endif
// reserved
}
}

View File

@ -21,7 +21,9 @@
#define CARTRIDGE_DPC_PLUS_HXX
class System;
#ifdef THUMB_SUPPORT
class Thumbulator;
#endif
#include "bspf.hxx"
#include "Cart.hxx"
@ -182,8 +184,10 @@ class CartridgeDPCPlus : public Cartridge
// Pointer to the DPC 8k RAM image
uInt8* myDPCRAM;
#ifdef THUMB_SUPPORT
// Pointer to the Thumb ARM emulator object
Thumbulator* myThumbEmulator;
#endif
// Pointer to the 1K frequency table
uInt8* myFrequencyImage;

File diff suppressed because it is too large Load Diff

View File

@ -24,6 +24,8 @@
// Code is public domain and used with the author's consent
//============================================================================
#ifdef THUMB_SUPPORT
#include "bspf.hxx"
#define ROMADDMASK 0x7FFF
@ -110,3 +112,5 @@ class Thumbulator
Int32 DBUG; // dump detailed execution trace
Int32 DISS; // dump Thumb instruction trace
};
#endif

View File

@ -1765,23 +1765,20 @@
DISPLAY_OPENGL,
CHEATCODE_SUPPORT,
DEBUGGER_SUPPORT,
THUMB_SUPPORT,
HAVE_GETTIMEOFDAY,
BSPF_MAC_OSX,
HAVE_INTTYPES,
);
HEADER_SEARCH_PATHS = (
./SDL.framework/Headers,
../emucore,
../emucore/m6502/src/bspf/src,
../emucore/m6502/src,
../ui/sound,
../cheat,
../common,
../debugger,
../debugger/gui,
../yacc,
../../../../debugger,
./gui,
../emucore,
../gui,
../yacc,
.,
);
INFOPLIST_FILE = "Info-Stella.plist";
@ -1822,23 +1819,20 @@
DISPLAY_OPENGL,
CHEATCODE_SUPPORT,
DEBUGGER_SUPPORT,
THUMB_SUPPORT,
HAVE_GETTIMEOFDAY,
BSPF_MAC_OSX,
HAVE_INTTYPES,
);
HEADER_SEARCH_PATHS = (
./SDL.framework/Headers,
../emucore,
../emucore/m6502/src/bspf/src,
../emucore/m6502/src,
../ui/sound,
../cheat,
../common,
../debugger,
../debugger/gui,
../yacc,
../../../../debugger,
./gui,
../emucore,
../gui,
../yacc,
.,
);
INFOPLIST_FILE = "Info-Stella.plist";
@ -1878,23 +1872,20 @@
DISPLAY_OPENGL,
CHEATCODE_SUPPORT,
DEBUGGER_SUPPORT,
THUMB_SUPPORT,
HAVE_GETTIMEOFDAY,
BSPF_MAC_OSX,
HAVE_INTTYPES,
);
HEADER_SEARCH_PATHS = (
./SDL.framework/Headers,
../emucore,
../emucore/m6502/src/bspf/src,
../emucore/m6502/src,
../ui/sound,
../cheat,
../common,
../debugger,
../debugger/gui,
../yacc,
../../../../debugger,
./gui,
../emucore,
../gui,
../yacc,
.,
);
INFOPLIST_FILE = "Info-Stella.plist";

View File

@ -1753,23 +1753,20 @@
DISPLAY_OPENGL,
CHEATCODE_SUPPORT,
DEBUGGER_SUPPORT,
THUMB_SUPPORT,
HAVE_GETTIMEOFDAY,
BSPF_MAC_OSX,
HAVE_INTTYPES,
);
HEADER_SEARCH_PATHS = (
./SDL.framework/Headers,
../emucore,
../emucore/m6502/src/bspf/src,
../emucore/m6502/src,
../ui/sound,
../cheat,
../common,
../debugger,
../debugger/gui,
../yacc,
../../../../debugger,
./gui,
../emucore,
../gui,
../yacc,
.,
);
INFOPLIST_FILE = "Info-Stella.plist";
@ -1810,23 +1807,20 @@
DISPLAY_OPENGL,
CHEATCODE_SUPPORT,
DEBUGGER_SUPPORT,
THUMB_SUPPORT,
HAVE_GETTIMEOFDAY,
BSPF_MAC_OSX,
HAVE_INTTYPES,
);
HEADER_SEARCH_PATHS = (
./SDL.framework/Headers,
../emucore,
../emucore/m6502/src/bspf/src,
../emucore/m6502/src,
../ui/sound,
../cheat,
../common,
../debugger,
../debugger/gui,
../yacc,
../../../../debugger,
./gui,
../emucore,
../gui,
../yacc,
.,
);
INFOPLIST_FILE = "Info-Stella.plist";
@ -1866,23 +1860,20 @@
DISPLAY_OPENGL,
CHEATCODE_SUPPORT,
DEBUGGER_SUPPORT,
THUMB_SUPPORT,
HAVE_GETTIMEOFDAY,
BSPF_MAC_OSX,
HAVE_INTTYPES,
);
HEADER_SEARCH_PATHS = (
./SDL.framework/Headers,
../emucore,
../emucore/m6502/src/bspf/src,
../emucore/m6502/src,
../ui/sound,
../cheat,
../common,
../debugger,
../debugger/gui,
../yacc,
../../../../debugger,
./gui,
../emucore,
../gui,
../yacc,
.,
);
INFOPLIST_FILE = "Info-Stella.plist";