mirror of https://github.com/stella-emu/stella.git
Checking in WIP for Distella integration. Moved the internal text
handling to C++ stringstreams instead of C-style character arrays, which fixed some segfaults (sprintf is evil). First pass at tying the number of banks to the disassembly. The idea is that the startup bank (which is now identified by the cart) always starts at address at 0xfffc, while the other banks are defined by the PC at the first time we enter the debugger. This is still a WIP, since there's no actual checking done yet to see if the current PC is in the current disassembly. Added 'ctrlcombo' commandline argument, which completely disables checking for Control-x key combos. This is useful when playing 2-player games where the 'f', 'r' and 'Control' keys are supposed to be treated separately. Previously, pressing Control and 'r' or 'f' processed some other action (change framerate, reload rom, etc). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1964 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
6de4e358e1
commit
e0310e8f35
|
@ -861,6 +861,15 @@
|
||||||
<td>Stelladaptor 2 emulates specified joystick port.</td>
|
<td>Stelladaptor 2 emulates specified joystick port.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><pre>-ctrlcombo <1|0></pre></td>
|
||||||
|
<td>Use control-x key combos. This is normally enabled, since the
|
||||||
|
Quit command is tied to 'Control-q'. However, there are times when
|
||||||
|
a 2-player game is using either the 'f' or 'r' keys for movement,
|
||||||
|
and pressing Control (for Fire) will perform an unwanted action
|
||||||
|
associated with Control-r or Control-f.</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>-autoslot <1|0></pre></td>
|
<td><pre>-autoslot <1|0></pre></td>
|
||||||
<td>Automatically switch to the next available save state slot after
|
<td>Automatically switch to the next available save state slot after
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "Array.hxx"
|
#include "Array.hxx"
|
||||||
#include "System.hxx"
|
#include "System.hxx"
|
||||||
#include "DiStella.hxx"
|
#include "DiStella.hxx"
|
||||||
|
#include "CpuDebug.hxx"
|
||||||
#include "CartDebug.hxx"
|
#include "CartDebug.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -34,6 +35,20 @@ CartDebug::CartDebug(Debugger& dbg, Console& console, const RamAreaList& areas)
|
||||||
myRamAreas = areas;
|
myRamAreas = areas;
|
||||||
for(RamAreaList::const_iterator i = areas.begin(); i != areas.end(); ++i)
|
for(RamAreaList::const_iterator i = areas.begin(); i != areas.end(); ++i)
|
||||||
addRamArea(i->start, i->size, i->roffset, i->woffset);
|
addRamArea(i->start, i->size, i->roffset, i->woffset);
|
||||||
|
|
||||||
|
// We need a start address for each potential bank
|
||||||
|
myStartAddresses = new uInt16[myConsole.cartridge().bankCount()];
|
||||||
|
for(int i = 0; i < myConsole.cartridge().bankCount(); ++i)
|
||||||
|
myStartAddresses[i] = 0;
|
||||||
|
|
||||||
|
// We know the address for the startup bank right now
|
||||||
|
myStartAddresses[myConsole.cartridge().startBank()] = myDebugger.dpeek(0xfffc);
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
CartDebug::~CartDebug()
|
||||||
|
{
|
||||||
|
delete[] myStartAddresses;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -172,7 +187,6 @@ string CartDebug::toString()
|
||||||
bool CartDebug::disassemble(bool autocode)
|
bool CartDebug::disassemble(bool autocode)
|
||||||
{
|
{
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
|
|
||||||
// Test current disassembly; don't re-disassemble if it hasn't changed
|
// Test current disassembly; don't re-disassemble if it hasn't changed
|
||||||
// ...
|
// ...
|
||||||
changed = true; // FIXME
|
changed = true; // FIXME
|
||||||
|
@ -182,10 +196,26 @@ bool CartDebug::disassemble(bool autocode)
|
||||||
myDisassembly.clear();
|
myDisassembly.clear();
|
||||||
myAddrToLineList.clear();
|
myAddrToLineList.clear();
|
||||||
|
|
||||||
// TODO - add logic to determine correct start address to use
|
// We only use the reset vector when we're actually in the startup bank
|
||||||
// it will depend on the current bank and PC
|
// Otherwise, we look at previous accesses to this bank to begin
|
||||||
uInt16 start = myDebugger.dpeek(0xfffc);
|
// If no previous address exists, use the current program counter
|
||||||
|
uInt16 start = myStartAddresses[getBank()];
|
||||||
|
|
||||||
|
cerr << "start addresses: ";
|
||||||
|
for(int i = 0; i < myConsole.cartridge().bankCount(); ++i) cerr << " " << setw(4) << hex << myStartAddresses[i];
|
||||||
|
cerr << endl;
|
||||||
|
cerr << "current bank = " << getBank() << ", start bank = " << myConsole.cartridge().startBank() << endl
|
||||||
|
<< "reset = " << hex << 0xfffc << ", pc = " << hex << myDebugger.cpuDebug().pc() << endl
|
||||||
|
<< "start = " << hex << start << endl;
|
||||||
|
if(start == 0)
|
||||||
|
start = myStartAddresses[getBank()] = myDebugger.cpuDebug().pc();
|
||||||
|
cerr << "actual start = " << hex << start << endl << endl;
|
||||||
|
|
||||||
|
// For now, DiStella can't handle address space below 0x1000
|
||||||
|
if(!(start & 0x1000))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
autocode = false;
|
||||||
DiStella distella(myDisassembly, start, autocode);
|
DiStella distella(myDisassembly, start, autocode);
|
||||||
|
|
||||||
// Parts of the disassembly will be accessed later in different ways
|
// Parts of the disassembly will be accessed later in different ways
|
||||||
|
|
|
@ -58,6 +58,7 @@ class CartDebug : public DebuggerSystem
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CartDebug(Debugger& dbg, Console& console, const RamAreaList& areas);
|
CartDebug(Debugger& dbg, Console& console, const RamAreaList& areas);
|
||||||
|
virtual ~CartDebug();
|
||||||
|
|
||||||
const DebuggerState& getState();
|
const DebuggerState& getState();
|
||||||
const DebuggerState& getOldState() { return myOldState; }
|
const DebuggerState& getOldState() { return myOldState; }
|
||||||
|
@ -187,8 +188,14 @@ class CartDebug : public DebuggerSystem
|
||||||
private:
|
private:
|
||||||
CartState myState;
|
CartState myState;
|
||||||
CartState myOldState;
|
CartState myOldState;
|
||||||
|
|
||||||
RamAreaList myRamAreas;
|
RamAreaList myRamAreas;
|
||||||
|
|
||||||
|
// A pointer to an array of start addresses for each bank in a cart
|
||||||
|
// The startup bank will normally be 0xfffc, while the others are
|
||||||
|
// determined when the debugger is first opened
|
||||||
|
uInt16* myStartAddresses;
|
||||||
|
|
||||||
// Used for the disassembly display, and mapping from addresses
|
// Used for the disassembly display, and mapping from addresses
|
||||||
// to corresponding lines of text in that display
|
// to corresponding lines of text in that display
|
||||||
DisassemblyList myDisassembly;
|
DisassemblyList myDisassembly;
|
||||||
|
|
|
@ -16,10 +16,6 @@
|
||||||
// $Id$
|
// $Id$
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "Debugger.hxx"
|
#include "Debugger.hxx"
|
||||||
#include "DiStella.hxx"
|
#include "DiStella.hxx"
|
||||||
|
@ -111,11 +107,8 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
uInt32 ad;
|
uInt32 ad;
|
||||||
short amode;
|
short amode;
|
||||||
int bytes=0, labfound=0, addbranch=0;
|
int bytes=0, labfound=0, addbranch=0;
|
||||||
char linebuff[256],nextline[256], nextlinebytes[256];
|
stringstream nextline, nextlinebytes;
|
||||||
strcpy(linebuff,"");
|
myDisasmBuf.str("");
|
||||||
strcpy(nextline,"");
|
|
||||||
strcpy(nextlinebytes,"");
|
|
||||||
myBuf.str("");
|
|
||||||
|
|
||||||
/* pc=myAppData.start; */
|
/* pc=myAppData.start; */
|
||||||
myPC = distart - myOffset;
|
myPC = distart - myOffset;
|
||||||
|
@ -129,13 +122,13 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
else if (pass == 3)
|
else if (pass == 3)
|
||||||
{
|
{
|
||||||
if (check_bit(labels[myPC],REFERENCED))
|
if (check_bit(labels[myPC],REFERENCED))
|
||||||
myBuf << HEX4 << myPC+myOffset << "'L'" << HEX4 << myPC+myOffset << "'";
|
myDisasmBuf << HEX4 << myPC+myOffset << "'L'" << HEX4 << myPC+myOffset << "'";
|
||||||
else
|
else
|
||||||
myBuf << HEX4 << myPC+myOffset << "' '";
|
myDisasmBuf << HEX4 << myPC+myOffset << "' '";
|
||||||
|
|
||||||
myBuf << ".byte $" << HEX2 << (int)Debugger::debugger().peek(myPC+myOffset) << " ; ";
|
myDisasmBuf << ".byte $" << HEX2 << (int)Debugger::debugger().peek(myPC+myOffset) << " ; ";
|
||||||
showgfx(Debugger::debugger().peek(myPC+myOffset));
|
showgfx(Debugger::debugger().peek(myPC+myOffset));
|
||||||
myBuf << " $" << HEX4 << myPC+myOffset;
|
myDisasmBuf << " $" << HEX4 << myPC+myOffset;
|
||||||
addEntry();
|
addEntry();
|
||||||
}
|
}
|
||||||
myPC++;
|
myPC++;
|
||||||
|
@ -147,7 +140,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
bytes = 1;
|
bytes = 1;
|
||||||
myBuf << HEX4 << myPC+myOffset << "'L" << HEX4 << myPC+myOffset << "'.byte "
|
myDisasmBuf << HEX4 << myPC+myOffset << "'L" << HEX4 << myPC+myOffset << "'.byte "
|
||||||
<< "$" << HEX2 << (int)Debugger::debugger().peek(myPC+myOffset);
|
<< "$" << HEX2 << (int)Debugger::debugger().peek(myPC+myOffset);
|
||||||
}
|
}
|
||||||
myPC++;
|
myPC++;
|
||||||
|
@ -161,11 +154,11 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (bytes == 17)
|
if (bytes == 17)
|
||||||
{
|
{
|
||||||
addEntry();
|
addEntry();
|
||||||
myBuf << " ' '.byte $" << HEX2 << (int)Debugger::debugger().peek(myPC+myOffset);
|
myDisasmBuf << " ' '.byte $" << HEX2 << (int)Debugger::debugger().peek(myPC+myOffset);
|
||||||
bytes = 1;
|
bytes = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
myBuf << ",$" << HEX2 << (int)Debugger::debugger().peek(myPC+myOffset);
|
myDisasmBuf << ",$" << HEX2 << (int)Debugger::debugger().peek(myPC+myOffset);
|
||||||
}
|
}
|
||||||
myPC++;
|
myPC++;
|
||||||
}
|
}
|
||||||
|
@ -173,7 +166,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
addEntry();
|
addEntry();
|
||||||
myBuf << " ' ' ";
|
myDisasmBuf << " ' ' ";
|
||||||
addEntry();
|
addEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,9 +179,9 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
else if (pass == 3)
|
else if (pass == 3)
|
||||||
{
|
{
|
||||||
if (check_bit(labels[myPC], REFERENCED))
|
if (check_bit(labels[myPC], REFERENCED))
|
||||||
myBuf << HEX4 << myPC+myOffset << "'L" << HEX4 << myPC+myOffset << "'";
|
myDisasmBuf << HEX4 << myPC+myOffset << "'L" << HEX4 << myPC+myOffset << "'";
|
||||||
else
|
else
|
||||||
myBuf << HEX4 << myPC+myOffset << "' '";
|
myDisasmBuf << HEX4 << myPC+myOffset << "' '";
|
||||||
}
|
}
|
||||||
|
|
||||||
amode = ourLookup[op].addr_mode;
|
amode = ourLookup[op].addr_mode;
|
||||||
|
@ -198,10 +191,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
{
|
{
|
||||||
amode = IMPLIED;
|
amode = IMPLIED;
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
nextline << ".byte $" << HEX2 << (int)op << " ;";
|
||||||
sprintf(linebuff,".byte $%.2X ;",op);
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pass == 1)
|
if (pass == 1)
|
||||||
|
@ -217,10 +207,9 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
}
|
}
|
||||||
else if (pass == 3)
|
else if (pass == 3)
|
||||||
{
|
{
|
||||||
sprintf(linebuff,"%s",ourLookup[op].mnemonic);
|
nextline << ourLookup[op].mnemonic;
|
||||||
strcat(nextline,linebuff);
|
// sprintf(linebuff,"%02X ",op);
|
||||||
sprintf(linebuff,"%02X ",op);
|
nextlinebytes << HEX2 << (int)op << " ";
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myPC >= myAppData.end)
|
if (myPC >= myAppData.end)
|
||||||
|
@ -238,18 +227,18 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
{
|
{
|
||||||
/* Line information is already printed; append .byte since last instruction will
|
/* Line information is already printed; append .byte since last instruction will
|
||||||
put recompilable object larger that original binary file */
|
put recompilable object larger that original binary file */
|
||||||
myBuf << ".byte $" << HEX2 << op;
|
myDisasmBuf << ".byte $" << HEX2 << (int)op;
|
||||||
addEntry();
|
addEntry();
|
||||||
|
|
||||||
if (myPC == myAppData.end)
|
if (myPC == myAppData.end)
|
||||||
{
|
{
|
||||||
if (check_bit(labels[myPC],REFERENCED))
|
if (check_bit(labels[myPC],REFERENCED))
|
||||||
myBuf << HEX4 << myPC+myOffset << "'L" << HEX4 << myPC+myOffset << "'";
|
myDisasmBuf << HEX4 << myPC+myOffset << "'L" << HEX4 << myPC+myOffset << "'";
|
||||||
else
|
else
|
||||||
myBuf << HEX4 << myPC+myOffset << "' '";
|
myDisasmBuf << HEX4 << myPC+myOffset << "' '";
|
||||||
|
|
||||||
op = Debugger::debugger().peek(myPC+myOffset); myPC++;
|
op = Debugger::debugger().peek(myPC+myOffset); myPC++;
|
||||||
myBuf << ".byte $" << HEX2 << (int)op;
|
myDisasmBuf << ".byte $" << HEX2 << (int)op;
|
||||||
addEntry();
|
addEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -269,14 +258,10 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
{
|
{
|
||||||
/* Line information is already printed, but we can remove the
|
/* Line information is already printed, but we can remove the
|
||||||
Instruction (i.e. BMI) by simply clearing the buffer to print */
|
Instruction (i.e. BMI) by simply clearing the buffer to print */
|
||||||
strcpy(nextline,"");
|
myDisasmBuf << ".byte $" << HEX2 << (int)op;
|
||||||
sprintf(linebuff,".byte $%.2X",op);
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
|
|
||||||
myBuf << nextline;
|
|
||||||
addEntry();
|
addEntry();
|
||||||
strcpy(nextline,"");
|
nextline.str("");
|
||||||
strcpy(nextlinebytes,"");
|
nextlinebytes.str("");
|
||||||
}
|
}
|
||||||
myPC++;
|
myPC++;
|
||||||
myPCEnd = myAppData.end + myOffset;
|
myPCEnd = myAppData.end + myOffset;
|
||||||
|
@ -299,7 +284,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
sprintf(linebuff,"\n");
|
sprintf(linebuff,"\n");
|
||||||
strcat(nextline,linebuff);
|
strcat(_nextline,linebuff);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -307,10 +292,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
case ACCUMULATOR:
|
case ACCUMULATOR:
|
||||||
{
|
{
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
nextline << " A";
|
||||||
sprintf(linebuff," A");
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,43 +313,30 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
else if (pass == 3)
|
else if (pass == 3)
|
||||||
{
|
{
|
||||||
if (ad < 0x100)
|
if (ad < 0x100)
|
||||||
{
|
nextline << ".w ";
|
||||||
sprintf(linebuff,".w ");
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
nextline << " ";
|
||||||
sprintf(linebuff," ");
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
if (labfound == 1)
|
if (labfound == 1)
|
||||||
{
|
{
|
||||||
sprintf(linebuff,"L%.4X",ad);
|
nextline << "L" << HEX4 << ad;
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(ad&0xff),(ad>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
else if (labfound == 3)
|
else if (labfound == 3)
|
||||||
{
|
{
|
||||||
sprintf(linebuff,"%s",CartDebug::ourIOMnemonic[ad-0x280]);
|
nextline << CartDebug::ourIOMnemonic[ad-0x280];
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(ad&0xff),(ad>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
else if (labfound == 4)
|
else if (labfound == 4)
|
||||||
{
|
{
|
||||||
int tmp = (ad & myAppData.end)+myOffset;
|
int tmp = (ad & myAppData.end)+myOffset;
|
||||||
sprintf(linebuff,"L%.4X",tmp);
|
nextline << "L" << HEX4 << tmp;
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(tmp&0xff) << " " << HEX2 << (int)(tmp>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(tmp&0xff),(tmp>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(linebuff,"$%.4X",ad);
|
nextline << "$" << HEX4 << ad;
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(ad&0xff),(ad>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -380,18 +349,12 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
if (labfound == 2)
|
if (labfound == 2)
|
||||||
{
|
nextline << " " << (ourLookup[op].rw_mode == READ ?
|
||||||
sprintf(linebuff," %s", ourLookup[op].rw_mode == READ ?
|
|
||||||
CartDebug::ourTIAMnemonicR[d1&0x0f] : CartDebug::ourTIAMnemonicW[d1&0x3f]);
|
CartDebug::ourTIAMnemonicR[d1&0x0f] : CartDebug::ourTIAMnemonicW[d1&0x3f]);
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
nextline << " $" << HEX2 << (int)d1;
|
||||||
sprintf(linebuff," $%.2X ",d1);
|
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)d1;
|
||||||
}
|
|
||||||
sprintf(linebuff,"%02X", d1);
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -401,10 +364,8 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
d1 = Debugger::debugger().peek(myPC+myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC+myOffset); myPC++;
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
sprintf(linebuff," #$%.2X ",d1);
|
nextline << " #$" << HEX2 << (int)d1 << " ";
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)d1;
|
||||||
sprintf(linebuff,"%02X",d1);
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -416,44 +377,30 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
if (ad < 0x100)
|
if (ad < 0x100)
|
||||||
{
|
nextline << ".wx ";
|
||||||
sprintf(linebuff,".wx ");
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
nextline << " ";
|
||||||
sprintf(linebuff," ");
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (labfound == 1)
|
if (labfound == 1)
|
||||||
{
|
{
|
||||||
sprintf(linebuff,"L%.4X,X",ad);
|
nextline << "L" << HEX4 << ad << ",X";
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(ad&0xff),(ad>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
else if (labfound == 3)
|
else if (labfound == 3)
|
||||||
{
|
{
|
||||||
sprintf(linebuff,"%s,X",CartDebug::ourIOMnemonic[ad-0x280]);
|
nextline << CartDebug::ourIOMnemonic[ad-0x280] << ",X";
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(ad&0xff),(ad>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
else if (labfound == 4)
|
else if (labfound == 4)
|
||||||
{
|
{
|
||||||
int tmp = (ad & myAppData.end)+myOffset;
|
int tmp = (ad & myAppData.end)+myOffset;
|
||||||
sprintf(linebuff,"L%.4X,X",tmp);
|
nextline << "L" << HEX4 << tmp << ",X";
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(tmp&0xff) << " " << HEX2 << (int)(tmp>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(tmp&0xff),(tmp>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(linebuff,"$%.4X,X",ad);
|
nextline << "$" << HEX4 << ad << ",X";
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(ad&0xff),(ad>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -466,43 +413,30 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
if (ad < 0x100)
|
if (ad < 0x100)
|
||||||
{
|
nextline << ".wy ";
|
||||||
sprintf(linebuff,".wy ");
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
nextline << " ";
|
||||||
sprintf(linebuff," ");
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
if (labfound == 1)
|
if (labfound == 1)
|
||||||
{
|
{
|
||||||
sprintf(linebuff,"L%.4X,Y",ad);
|
nextline << "L" << HEX4 << ad << ",Y";
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(ad&0xff),(ad>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
else if (labfound == 3)
|
else if (labfound == 3)
|
||||||
{
|
{
|
||||||
sprintf(linebuff,"%s,Y",CartDebug::ourIOMnemonic[ad-0x280]);
|
nextline << CartDebug::ourIOMnemonic[ad-0x280] << ",Y";
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(ad&0xff),(ad>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
else if (labfound == 4)
|
else if (labfound == 4)
|
||||||
{
|
{
|
||||||
int tmp = (ad & myAppData.end)+myOffset;
|
int tmp = (ad & myAppData.end)+myOffset;
|
||||||
sprintf(linebuff,"L%.4X,Y",tmp);
|
nextline << "L" << HEX4 << tmp << ",Y";
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(tmp&0xff) << " " << HEX2 << (int)(tmp>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(tmp&0xff),(tmp>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(linebuff,"$%.4X,Y",ad);
|
nextline << "$" << HEX4 << ad << ",Y";
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(ad&0xff),(ad>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -513,10 +447,8 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
d1 = Debugger::debugger().peek(myPC+myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC+myOffset); myPC++;
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
sprintf(linebuff," ($%.2X,X)",d1);
|
nextline << " ($" << HEX2 << (int)d1 << ",X)";
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)d1;
|
||||||
sprintf(linebuff,"%02X",d1);
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -526,10 +458,8 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
d1 = Debugger::debugger().peek(myPC+myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC+myOffset); myPC++;
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
sprintf(linebuff," ($%.2X),Y",d1);
|
nextline << " ($" << HEX2 << (int)d1 << "),Y";
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)d1;
|
||||||
sprintf(linebuff,"%02X",d1);
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -541,19 +471,13 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
if (labfound == 2)
|
if (labfound == 2)
|
||||||
{
|
nextline << " " << (ourLookup[op].rw_mode == READ ?
|
||||||
sprintf(linebuff," %s,X", ourLookup[op].rw_mode == READ ?
|
CartDebug::ourTIAMnemonicR[d1&0x0f] :
|
||||||
CartDebug::ourTIAMnemonicR[d1&0x0f] : CartDebug::ourTIAMnemonicW[d1&0x3f]);
|
CartDebug::ourTIAMnemonicW[d1&0x3f]) << ",X";
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
nextline << " $" << HEX2 << (int)d1 << ",X";
|
||||||
sprintf(linebuff," $%.2X,X",d1);
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sprintf(linebuff,"%02X",d1);
|
nextlinebytes << HEX2 << (int)d1;
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -564,19 +488,13 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
if (labfound == 2)
|
if (labfound == 2)
|
||||||
{
|
nextline << " " << (ourLookup[op].rw_mode == READ ?
|
||||||
sprintf(linebuff," %s,Y", ourLookup[op].rw_mode == READ ?
|
CartDebug::ourTIAMnemonicR[d1&0x0f] :
|
||||||
CartDebug::ourTIAMnemonicR[d1&0x0f] : CartDebug::ourTIAMnemonicW[d1&0x3f]);
|
CartDebug::ourTIAMnemonicW[d1&0x3f]) << ",Y";
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
nextline << " $" << HEX2 << (int)d1 << ",Y";
|
||||||
sprintf(linebuff," $%.2X,Y",d1);
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sprintf(linebuff,"%02X",d1);
|
nextlinebytes << HEX2 << (int)d1;
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -601,17 +519,11 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
{
|
{
|
||||||
int tmp = myPC+ad+myOffset;
|
int tmp = myPC+ad+myOffset;
|
||||||
if (labfound == 1)
|
if (labfound == 1)
|
||||||
{
|
nextline << " L" << HEX4 << tmp;
|
||||||
sprintf(linebuff," L%.4X",tmp);
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
nextline << " $" << HEX4 << tmp;
|
||||||
sprintf(linebuff," $%.4X",tmp);
|
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(tmp&0xff) << " " << HEX2 << (int)(tmp>>8);
|
||||||
}
|
|
||||||
sprintf(linebuff,"%02X %02X",(tmp&0xff),(tmp>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -623,37 +535,18 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
if (ad < 0x100)
|
if (ad < 0x100)
|
||||||
{
|
nextline << ".ind ";
|
||||||
sprintf(linebuff,".ind ");
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
nextline << " ";
|
||||||
sprintf(linebuff," ");
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (labfound == 1)
|
if (labfound == 1)
|
||||||
{
|
nextline << "(L" << HEX4 << ad << ")";
|
||||||
sprintf(linebuff,"(L%04X)",ad);
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
sprintf(linebuff,"%02X %02X",(ad&0xff),(ad>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
|
||||||
else if (labfound == 3)
|
else if (labfound == 3)
|
||||||
{
|
nextline << "(" << CartDebug::ourIOMnemonic[ad-0x280] << ")";
|
||||||
sprintf(linebuff,"(%s)",CartDebug::ourIOMnemonic[ad-0x280]);
|
|
||||||
strcat(nextline,linebuff);
|
|
||||||
sprintf(linebuff,"%02X %02X",(ad&0xff),(ad>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
nextline << "($" << HEX4 << ad << ")";
|
||||||
sprintf(linebuff,"($%04X)",ad);
|
|
||||||
strcat(nextline,linebuff);
|
nextlinebytes << HEX2 << (int)(ad&0xff) << " " << HEX2 << (int)(ad>>8);
|
||||||
sprintf(linebuff,"%02X %02X",(ad&0xff),(ad>>8));
|
|
||||||
strcat(nextlinebytes,linebuff);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} // end switch
|
} // end switch
|
||||||
|
@ -671,23 +564,24 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
}
|
}
|
||||||
else if (pass == 3)
|
else if (pass == 3)
|
||||||
{
|
{
|
||||||
myBuf << nextline;
|
myDisasmBuf << nextline.str();;
|
||||||
if (strlen(nextline) <= 15)
|
uInt32 nextlinelen = nextline.str().length();
|
||||||
|
if (nextlinelen <= 15)
|
||||||
{
|
{
|
||||||
/* Print spaces to align cycle count data */
|
/* Print spaces to align cycle count data */
|
||||||
for (uInt32 charcnt=0;charcnt<15-strlen(nextline);charcnt++)
|
for (uInt32 charcnt=0;charcnt<15-nextlinelen;charcnt++)
|
||||||
myBuf << " ";
|
myDisasmBuf << " ";
|
||||||
}
|
}
|
||||||
myBuf << ";" << dec << (int)ourLookup[op].cycles << "'" << nextlinebytes;
|
myDisasmBuf << ";" << dec << (int)ourLookup[op].cycles << "'" << nextlinebytes.str();
|
||||||
addEntry();
|
addEntry();
|
||||||
if (op == 0x40 || op == 0x60)
|
if (op == 0x40 || op == 0x60)
|
||||||
{
|
{
|
||||||
myBuf << " ' ' ";
|
myDisasmBuf << " ' ' ";
|
||||||
addEntry();
|
addEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(nextline,"");
|
nextline.str("");
|
||||||
strcpy(nextlinebytes,"");
|
nextlinebytes.str("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} /* while loop */
|
} /* while loop */
|
||||||
|
@ -776,29 +670,29 @@ void DiStella::showgfx(uInt8 c)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
myBuf << "|";
|
myDisasmBuf << "|";
|
||||||
for(i = 0;i < 8; i++)
|
for(i = 0;i < 8; i++)
|
||||||
{
|
{
|
||||||
if (c > 127)
|
if (c > 127)
|
||||||
myBuf << "X";
|
myDisasmBuf << "X";
|
||||||
else
|
else
|
||||||
myBuf << " ";
|
myDisasmBuf << " ";
|
||||||
|
|
||||||
c = c << 1;
|
c = c << 1;
|
||||||
}
|
}
|
||||||
myBuf << "|";
|
myDisasmBuf << "|";
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void DiStella::addEntry()
|
void DiStella::addEntry()
|
||||||
{
|
{
|
||||||
const string& line = myBuf.str();
|
const string& line = myDisasmBuf.str();
|
||||||
CartDebug::DisassemblyTag tag;
|
CartDebug::DisassemblyTag tag;
|
||||||
|
|
||||||
if(line[0] == ' ')
|
if(line[0] == ' ')
|
||||||
tag.address = 0;
|
tag.address = 0;
|
||||||
else
|
else
|
||||||
myBuf >> setw(4) >> hex >> tag.address;
|
myDisasmBuf >> setw(4) >> hex >> tag.address;
|
||||||
|
|
||||||
if(line[5] != ' ')
|
if(line[5] != ' ')
|
||||||
tag.label = line.substr(5, 5);
|
tag.label = line.substr(5, 5);
|
||||||
|
@ -818,7 +712,7 @@ void DiStella::addEntry()
|
||||||
}
|
}
|
||||||
myList.push_back(tag);
|
myList.push_back(tag);
|
||||||
|
|
||||||
myBuf.str("");
|
myDisasmBuf.str("");
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -81,7 +81,7 @@ class DiStella
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CartDebug::DisassemblyList& myList;
|
CartDebug::DisassemblyList& myList;
|
||||||
stringstream myBuf;
|
stringstream myDisasmBuf;
|
||||||
queue<uInt16> myAddressQueue;
|
queue<uInt16> myAddressQueue;
|
||||||
uInt32 myOffset, myPC, myPCBeg, myPCEnd;
|
uInt32 myOffset, myPC, myPCBeg, myPCEnd;
|
||||||
|
|
||||||
|
|
|
@ -222,8 +222,9 @@ string Cartridge::createFromMultiCart(const uInt8*& image, uInt32& size,
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Cartridge::Cartridge()
|
Cartridge::Cartridge()
|
||||||
|
: myStartBank(0),
|
||||||
|
myBankLocked(false)
|
||||||
{
|
{
|
||||||
unlockBank();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -249,6 +250,12 @@ bool Cartridge::save(ofstream& out)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
uInt16 Cartridge::startBank()
|
||||||
|
{
|
||||||
|
return myStartBank;
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Cartridge::registerRamArea(uInt16 start, uInt16 size,
|
void Cartridge::registerRamArea(uInt16 start, uInt16 size,
|
||||||
uInt16 roffset, uInt16 woffset)
|
uInt16 roffset, uInt16 woffset)
|
||||||
|
|
|
@ -40,6 +40,8 @@ typedef Common::Array<RamArea> RamAreaList;
|
||||||
/**
|
/**
|
||||||
A cartridge is a device which contains the machine code for a
|
A cartridge is a device which contains the machine code for a
|
||||||
game and handles any bankswitching performed by the cartridge.
|
game and handles any bankswitching performed by the cartridge.
|
||||||
|
A 'bank' is defined as a 4K block that is visible in the
|
||||||
|
0x1000-0x2000 area (or its mirrors).
|
||||||
|
|
||||||
@author Bradford W. Mott
|
@author Bradford W. Mott
|
||||||
@version $Id$
|
@version $Id$
|
||||||
|
@ -92,6 +94,15 @@ class Cartridge : public Device
|
||||||
void lockBank() { myBankLocked = true; }
|
void lockBank() { myBankLocked = true; }
|
||||||
void unlockBank() { myBankLocked = false; }
|
void unlockBank() { myBankLocked = false; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get the default startup bank for a cart. This is the bank where
|
||||||
|
the system will look at address 0xFFFC to determine where to
|
||||||
|
start running code.
|
||||||
|
|
||||||
|
@return The startup bank
|
||||||
|
*/
|
||||||
|
uInt16 startBank();
|
||||||
|
|
||||||
#ifdef DEBUGGER_SUPPORT
|
#ifdef DEBUGGER_SUPPORT
|
||||||
const RamAreaList& ramAreas() { return myRamAreaList; }
|
const RamAreaList& ramAreas() { return myRamAreaList; }
|
||||||
#endif
|
#endif
|
||||||
|
@ -114,7 +125,12 @@ class Cartridge : public Device
|
||||||
virtual int bank() = 0;
|
virtual int bank() = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Query the number of banks supported by the cartridge.
|
Query the number of banks supported by the cartridge. Note that
|
||||||
|
we're counting the number of 4K 'blocks' that can be swapped into
|
||||||
|
the 4K address space in the 2600. As such, it's possible to have
|
||||||
|
a ROM that is larger than 4K *but* only consists of 1 bank.
|
||||||
|
Such cases occur when pages of ROM can be swapped in and out,
|
||||||
|
yet the 4K image is considered the same.
|
||||||
*/
|
*/
|
||||||
virtual int bankCount() = 0;
|
virtual int bankCount() = 0;
|
||||||
|
|
||||||
|
@ -282,6 +298,9 @@ class Cartridge : public Device
|
||||||
static bool isProbablyX07(const uInt8* image, uInt32 size);
|
static bool isProbablyX07(const uInt8* image, uInt32 size);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
// The startup bank to use (where to look for the reset vector address)
|
||||||
|
uInt16 myStartBank;
|
||||||
|
|
||||||
// If myBankLocked is true, ignore attempts at bankswitching. This is used
|
// If myBankLocked is true, ignore attempts at bankswitching. This is used
|
||||||
// by the debugger, when disassembling/dumping ROM.
|
// by the debugger, when disassembling/dumping ROM.
|
||||||
bool myBankLocked;
|
bool myBankLocked;
|
||||||
|
|
|
@ -27,6 +27,9 @@ Cartridge0840::Cartridge0840(const uInt8* image)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 8192);
|
memcpy(myImage, image, 8192);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -37,8 +40,8 @@ Cartridge0840::~Cartridge0840()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Cartridge0840::reset()
|
void Cartridge0840::reset()
|
||||||
{
|
{
|
||||||
// Upon reset we switch to bank 0
|
// Upon reset we switch to the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -37,6 +37,9 @@ Cartridge3E::Cartridge3E(const uInt8* image, uInt32 size)
|
||||||
// However, it may not be addressable all the time (it may be swapped out)
|
// However, it may not be addressable all the time (it may be swapped out)
|
||||||
// so probably most of the time, the area will point to ROM instead
|
// so probably most of the time, the area will point to ROM instead
|
||||||
registerRamArea(0x1000, 1024, 0x00, 0x400); // 1024 bytes RAM @ 0x1000
|
registerRamArea(0x1000, 1024, 0x00, 0x400); // 1024 bytes RAM @ 0x1000
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -52,8 +55,8 @@ void Cartridge3E::reset()
|
||||||
for(uInt32 i = 0; i < 32768; ++i)
|
for(uInt32 i = 0; i < 32768; ++i)
|
||||||
myRam[i] = mySystem->randGenerator().next();
|
myRam[i] = mySystem->randGenerator().next();
|
||||||
|
|
||||||
// We'll map bank 0 into the first segment upon reset
|
// We'll map the startup bank into the first segment upon reset
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -88,8 +91,8 @@ void Cartridge3E::install(System& system)
|
||||||
mySystem->setPageAccess(j >> shift, access);
|
mySystem->setPageAccess(j >> shift, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install pages for bank 0 into the first segment
|
// Install pages for the startup bank into the first segment
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -226,7 +229,7 @@ int Cartridge3E::bank()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
int Cartridge3E::bankCount()
|
int Cartridge3E::bankCount()
|
||||||
{
|
{
|
||||||
return mySize / 2048;
|
return mySize >> 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -32,6 +32,9 @@ Cartridge3F::Cartridge3F(const uInt8* image, uInt32 size)
|
||||||
|
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, mySize);
|
memcpy(myImage, image, mySize);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -43,7 +46,7 @@ Cartridge3F::~Cartridge3F()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Cartridge3F::reset()
|
void Cartridge3F::reset()
|
||||||
{
|
{
|
||||||
// We'll map bank 0 into the first segment upon reset
|
// We'll map the startup bank into the first segment upon reset
|
||||||
bank(0);
|
bank(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
// TODO - properly handle read from write port functionality
|
// TODO - properly handle read from write port functionality
|
||||||
// Note: do r/w port restrictions even exist for this scheme??
|
// Note: do r/w port restrictions even exist for this scheme??
|
||||||
|
// Port to new CartDebug/disassembler scheme
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Cartridge4A50::Cartridge4A50(const uInt8* image, uInt32 size)
|
Cartridge4A50::Cartridge4A50(const uInt8* image, uInt32 size)
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
#include "System.hxx"
|
#include "System.hxx"
|
||||||
#include "CartAR.hxx"
|
#include "CartAR.hxx"
|
||||||
|
|
||||||
|
// TODO - properly handle read from write port functionality
|
||||||
|
// Note: do r/w port restrictions even exist for this scheme??
|
||||||
|
// Port to new CartDebug/disassembler scheme
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeAR::CartridgeAR(const uInt8* image, uInt32 size,
|
CartridgeAR::CartridgeAR(const uInt8* image, uInt32 size,
|
||||||
const Settings& settings)
|
const Settings& settings)
|
||||||
|
@ -402,6 +406,7 @@ int CartridgeAR::bank()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
int CartridgeAR::bankCount()
|
int CartridgeAR::bankCount()
|
||||||
{
|
{
|
||||||
|
// TODO - this should depend on ROM size
|
||||||
return 32;
|
return 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
// TODO - properly handle read from write port functionality
|
// TODO - properly handle read from write port functionality
|
||||||
// Note: do r/w port restrictions even exist for this scheme??
|
// Note: do r/w port restrictions even exist for this scheme??
|
||||||
|
// Port to new CartDebug/disassembler scheme
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeDPC::CartridgeDPC(const uInt8* image, uInt32 size)
|
CartridgeDPC::CartridgeDPC(const uInt8* image, uInt32 size)
|
||||||
|
@ -52,6 +53,9 @@ CartridgeDPC::CartridgeDPC(const uInt8* image, uInt32 size)
|
||||||
// Initialize the system cycles counter & fractional clock values
|
// Initialize the system cycles counter & fractional clock values
|
||||||
mySystemCycles = 0;
|
mySystemCycles = 0;
|
||||||
myFractionalClocks = 0.0;
|
myFractionalClocks = 0.0;
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -66,8 +70,8 @@ void CartridgeDPC::reset()
|
||||||
mySystemCycles = mySystem->cycles();
|
mySystemCycles = mySystem->cycles();
|
||||||
myFractionalClocks = 0.0;
|
myFractionalClocks = 0.0;
|
||||||
|
|
||||||
// Upon reset we switch to bank 1
|
// Upon reset we switch to the startup bank
|
||||||
bank(1);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
#include "System.hxx"
|
#include "System.hxx"
|
||||||
#include "CartE0.hxx"
|
#include "CartE0.hxx"
|
||||||
|
|
||||||
|
// TODO - Port to new CartDebug/disassembler scheme
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeE0::CartridgeE0(const uInt8* image)
|
CartridgeE0::CartridgeE0(const uInt8* image)
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,6 +22,9 @@
|
||||||
#include "System.hxx"
|
#include "System.hxx"
|
||||||
#include "CartE7.hxx"
|
#include "CartE7.hxx"
|
||||||
|
|
||||||
|
// TODO - Port to new CartDebug/disassembler scheme
|
||||||
|
// I'm not sure patch is working, since it doesn't consider RAM areas
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeE7::CartridgeE7(const uInt8* image)
|
CartridgeE7::CartridgeE7(const uInt8* image)
|
||||||
{
|
{
|
||||||
|
@ -34,6 +37,9 @@ CartridgeE7::CartridgeE7(const uInt8* image)
|
||||||
// so probably most of the time, the area will point to ROM instead
|
// so probably most of the time, the area will point to ROM instead
|
||||||
registerRamArea(0x1000, 1024, 0x400, 0x00); // 1024 bytes RAM @ 0x1000
|
registerRamArea(0x1000, 1024, 0x400, 0x00); // 1024 bytes RAM @ 0x1000
|
||||||
registerRamArea(0x1800, 256, 0x100, 0x00); // 256 bytes RAM @ 0x1800
|
registerRamArea(0x1800, 256, 0x100, 0x00); // 256 bytes RAM @ 0x1800
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -50,7 +56,7 @@ void CartridgeE7::reset()
|
||||||
|
|
||||||
// Install some default banks for the RAM and first segment
|
// Install some default banks for the RAM and first segment
|
||||||
bankRAM(0);
|
bankRAM(0);
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -86,7 +92,7 @@ void CartridgeE7::install(System& system)
|
||||||
|
|
||||||
// Install some default banks for the RAM and first segment
|
// Install some default banks for the RAM and first segment
|
||||||
bankRAM(0);
|
bankRAM(0);
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -27,6 +27,9 @@ CartridgeEF::CartridgeEF(const uInt8* image)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 65536);
|
memcpy(myImage, image, 65536);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -37,8 +40,8 @@ CartridgeEF::~CartridgeEF()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void CartridgeEF::reset()
|
void CartridgeEF::reset()
|
||||||
{
|
{
|
||||||
// Upon reset we switch to bank 1
|
// Upon reset we switch to the startup bank
|
||||||
bank(1);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -61,8 +64,8 @@ void CartridgeEF::install(System& system)
|
||||||
mySystem->setPageAccess(i >> shift, access);
|
mySystem->setPageAccess(i >> shift, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install pages for bank 1
|
// Install pages for the startup bank
|
||||||
bank(1);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -30,6 +30,9 @@ CartridgeEFSC::CartridgeEFSC(const uInt8* image)
|
||||||
|
|
||||||
// This cart contains 128 bytes extended RAM @ 0x1000
|
// This cart contains 128 bytes extended RAM @ 0x1000
|
||||||
registerRamArea(0x1000, 128, 0x80, 0x00);
|
registerRamArea(0x1000, 128, 0x80, 0x00);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -44,8 +47,8 @@ void CartridgeEFSC::reset()
|
||||||
for(uInt32 i = 0; i < 128; ++i)
|
for(uInt32 i = 0; i < 128; ++i)
|
||||||
myRAM[i] = mySystem->randGenerator().next();
|
myRAM[i] = mySystem->randGenerator().next();
|
||||||
|
|
||||||
// Upon reset we switch to bank 1
|
// Upon reset we switch to the startup bank
|
||||||
bank(1);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -86,8 +89,8 @@ void CartridgeEFSC::install(System& system)
|
||||||
mySystem->setPageAccess(k >> shift, access);
|
mySystem->setPageAccess(k >> shift, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install pages for bank 1
|
// Install pages for the startup bank
|
||||||
bank(1);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -27,6 +27,9 @@ CartridgeF0::CartridgeF0(const uInt8* image)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 65536);
|
memcpy(myImage, image, 65536);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -95,7 +98,7 @@ void CartridgeF0::incbank()
|
||||||
if(myBankLocked) return;
|
if(myBankLocked) return;
|
||||||
|
|
||||||
// Remember what bank we're in
|
// Remember what bank we're in
|
||||||
myCurrentBank ++;
|
myCurrentBank++;
|
||||||
myCurrentBank &= 0x0F;
|
myCurrentBank &= 0x0F;
|
||||||
uInt16 offset = myCurrentBank << 12;
|
uInt16 offset = myCurrentBank << 12;
|
||||||
uInt16 shift = mySystem->pageShift();
|
uInt16 shift = mySystem->pageShift();
|
||||||
|
|
|
@ -28,6 +28,9 @@ CartridgeF4::CartridgeF4(const uInt8* image)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 32768);
|
memcpy(myImage, image, 32768);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -38,8 +41,8 @@ CartridgeF4::~CartridgeF4()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void CartridgeF4::reset()
|
void CartridgeF4::reset()
|
||||||
{
|
{
|
||||||
// Upon reset we switch to bank 0
|
// Upon reset we switch to the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -62,8 +65,8 @@ void CartridgeF4::install(System& system)
|
||||||
mySystem->setPageAccess(i >> shift, access);
|
mySystem->setPageAccess(i >> shift, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install pages for bank 0
|
// Install pages for the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -30,6 +30,9 @@ CartridgeF4SC::CartridgeF4SC(const uInt8* image)
|
||||||
|
|
||||||
// This cart contains 128 bytes extended RAM @ 0x1000
|
// This cart contains 128 bytes extended RAM @ 0x1000
|
||||||
registerRamArea(0x1000, 128, 0x80, 0x00);
|
registerRamArea(0x1000, 128, 0x80, 0x00);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -44,8 +47,8 @@ void CartridgeF4SC::reset()
|
||||||
for(uInt32 i = 0; i < 128; ++i)
|
for(uInt32 i = 0; i < 128; ++i)
|
||||||
myRAM[i] = mySystem->randGenerator().next();
|
myRAM[i] = mySystem->randGenerator().next();
|
||||||
|
|
||||||
// Upon reset we switch to bank 0
|
// Upon reset we switch to the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -86,8 +89,8 @@ void CartridgeF4SC::install(System& system)
|
||||||
mySystem->setPageAccess(k >> shift, access);
|
mySystem->setPageAccess(k >> shift, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install pages for bank 0
|
// Install pages for the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -27,6 +27,9 @@ CartridgeF6::CartridgeF6(const uInt8* image)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 16384);
|
memcpy(myImage, image, 16384);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -37,8 +40,8 @@ CartridgeF6::~CartridgeF6()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void CartridgeF6::reset()
|
void CartridgeF6::reset()
|
||||||
{
|
{
|
||||||
// Upon reset we switch to bank 0
|
// Upon reset we switch to the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -61,8 +64,8 @@ void CartridgeF6::install(System& system)
|
||||||
mySystem->setPageAccess(i >> shift, access);
|
mySystem->setPageAccess(i >> shift, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Upon install we'll setup bank 0
|
// Upon install we'll setup the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -30,6 +30,9 @@ CartridgeF6SC::CartridgeF6SC(const uInt8* image)
|
||||||
|
|
||||||
// This cart contains 128 bytes extended RAM @ 0x1000
|
// This cart contains 128 bytes extended RAM @ 0x1000
|
||||||
registerRamArea(0x1000, 128, 0x80, 0x00);
|
registerRamArea(0x1000, 128, 0x80, 0x00);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -44,8 +47,8 @@ void CartridgeF6SC::reset()
|
||||||
for(uInt32 i = 0; i < 128; ++i)
|
for(uInt32 i = 0; i < 128; ++i)
|
||||||
myRAM[i] = mySystem->randGenerator().next();
|
myRAM[i] = mySystem->randGenerator().next();
|
||||||
|
|
||||||
// Upon reset we switch to bank 0
|
// Upon reset we switch to the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -86,8 +89,8 @@ void CartridgeF6SC::install(System& system)
|
||||||
mySystem->setPageAccess(k >> shift, access);
|
mySystem->setPageAccess(k >> shift, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install pages for bank 0
|
// Install pages for the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -30,7 +30,7 @@ CartridgeF8::CartridgeF8(const uInt8* image, bool startlow)
|
||||||
|
|
||||||
// Normally bank 1 is the reset bank, unless we're dealing with ROMs
|
// Normally bank 1 is the reset bank, unless we're dealing with ROMs
|
||||||
// that have been incorrectly created with banks in the opposite order
|
// that have been incorrectly created with banks in the opposite order
|
||||||
myResetBank = startlow ? 0 : 1;
|
myStartBank = startlow ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -42,7 +42,7 @@ CartridgeF8::~CartridgeF8()
|
||||||
void CartridgeF8::reset()
|
void CartridgeF8::reset()
|
||||||
{
|
{
|
||||||
// Upon reset we switch to the reset bank
|
// Upon reset we switch to the reset bank
|
||||||
bank(myResetBank);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -65,8 +65,8 @@ void CartridgeF8::install(System& system)
|
||||||
mySystem->setPageAccess(i >> shift, access);
|
mySystem->setPageAccess(i >> shift, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install pages for bank 1
|
// Install pages for the startup bank
|
||||||
bank(1);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -140,9 +140,6 @@ class CartridgeF8 : public Cartridge
|
||||||
// Indicates which bank is currently active
|
// Indicates which bank is currently active
|
||||||
uInt16 myCurrentBank;
|
uInt16 myCurrentBank;
|
||||||
|
|
||||||
// Indicates the bank to use when resetting
|
|
||||||
uInt16 myResetBank;
|
|
||||||
|
|
||||||
// The 8K ROM image of the cartridge
|
// The 8K ROM image of the cartridge
|
||||||
uInt8 myImage[8192];
|
uInt8 myImage[8192];
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,6 +30,9 @@ CartridgeF8SC::CartridgeF8SC(const uInt8* image)
|
||||||
|
|
||||||
// This cart contains 128 bytes extended RAM @ 0x1000
|
// This cart contains 128 bytes extended RAM @ 0x1000
|
||||||
registerRamArea(0x1000, 128, 0x80, 0x00);
|
registerRamArea(0x1000, 128, 0x80, 0x00);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -44,8 +47,8 @@ void CartridgeF8SC::reset()
|
||||||
for(uInt32 i = 0; i < 128; ++i)
|
for(uInt32 i = 0; i < 128; ++i)
|
||||||
myRAM[i] = mySystem->randGenerator().next();
|
myRAM[i] = mySystem->randGenerator().next();
|
||||||
|
|
||||||
// Upon reset we switch to bank 1
|
// Upon reset we switch to the startup bank
|
||||||
bank(1);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -86,8 +89,8 @@ void CartridgeF8SC::install(System& system)
|
||||||
mySystem->setPageAccess(k >> shift, access);
|
mySystem->setPageAccess(k >> shift, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install pages for bank 1
|
// Install pages for the startup bank
|
||||||
bank(1);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -30,6 +30,9 @@ CartridgeFA::CartridgeFA(const uInt8* image)
|
||||||
|
|
||||||
// This cart contains 256 bytes extended RAM @ 0x1000
|
// This cart contains 256 bytes extended RAM @ 0x1000
|
||||||
registerRamArea(0x1000, 256, 0x100, 0x00);
|
registerRamArea(0x1000, 256, 0x100, 0x00);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -44,8 +47,8 @@ void CartridgeFA::reset()
|
||||||
for(uInt32 i = 0; i < 256; ++i)
|
for(uInt32 i = 0; i < 256; ++i)
|
||||||
myRAM[i] = mySystem->randGenerator().next();
|
myRAM[i] = mySystem->randGenerator().next();
|
||||||
|
|
||||||
// Upon reset we switch to bank 2
|
// Upon reset we switch to the startup bank
|
||||||
bank(2);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -86,8 +89,8 @@ void CartridgeFA::install(System& system)
|
||||||
mySystem->setPageAccess(k >> shift, access);
|
mySystem->setPageAccess(k >> shift, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install pages for bank 2
|
// Install pages for the startup bank
|
||||||
bank(2);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
#include "System.hxx"
|
#include "System.hxx"
|
||||||
#include "CartFE.hxx"
|
#include "CartFE.hxx"
|
||||||
|
|
||||||
|
// TODO - Port to new CartDebug/disassembler scheme
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeFE::CartridgeFE(const uInt8* image)
|
CartridgeFE::CartridgeFE(const uInt8* image)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
// TODO - much more testing of this scheme is required
|
// TODO - much more testing of this scheme is required
|
||||||
// No test ROMs exist as of 2009-11-08, so we can't be sure how
|
// No test ROMs exist as of 2009-11-08, so we can't be sure how
|
||||||
// accurate the emulation is
|
// accurate the emulation is
|
||||||
|
// Port to new CartDebug/disassembler scheme
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeMC::CartridgeMC(const uInt8* image, uInt32 size)
|
CartridgeMC::CartridgeMC(const uInt8* image, uInt32 size)
|
||||||
|
|
|
@ -24,14 +24,16 @@
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeSB::CartridgeSB(const uInt8* image, uInt32 size)
|
CartridgeSB::CartridgeSB(const uInt8* image, uInt32 size)
|
||||||
: mySize(size),
|
: mySize(size)
|
||||||
myLastBank((mySize >> 12) - 1)
|
|
||||||
{
|
{
|
||||||
// Allocate array for the ROM image
|
// Allocate array for the ROM image
|
||||||
myImage = new uInt8[mySize];
|
myImage = new uInt8[mySize];
|
||||||
|
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, mySize);
|
memcpy(myImage, image, mySize);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = (mySize >> 12) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -43,8 +45,8 @@ CartridgeSB::~CartridgeSB()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void CartridgeSB::reset()
|
void CartridgeSB::reset()
|
||||||
{
|
{
|
||||||
// Upon reset we switch to the last bank
|
// Upon reset we switch to the startup bank
|
||||||
bank(myLastBank);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -79,7 +81,7 @@ void CartridgeSB::install(System& system)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install pages for startup bank
|
// Install pages for startup bank
|
||||||
bank(myLastBank);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -89,7 +91,7 @@ uInt8 CartridgeSB::peek(uInt16 address)
|
||||||
|
|
||||||
// Switch banks if necessary
|
// Switch banks if necessary
|
||||||
if ((address & 0x1800) == 0x0800)
|
if ((address & 0x1800) == 0x0800)
|
||||||
bank(address & myLastBank);
|
bank(address & myStartBank);
|
||||||
|
|
||||||
if(!(address & 0x1000))
|
if(!(address & 0x1000))
|
||||||
{
|
{
|
||||||
|
@ -109,7 +111,7 @@ void CartridgeSB::poke(uInt16 address, uInt8 value)
|
||||||
|
|
||||||
// Switch banks if necessary
|
// Switch banks if necessary
|
||||||
if((address & 0x1800) == 0x0800)
|
if((address & 0x1800) == 0x0800)
|
||||||
bank(address & myLastBank);
|
bank(address & myStartBank);
|
||||||
|
|
||||||
if(!(address & 0x1000))
|
if(!(address & 0x1000))
|
||||||
{
|
{
|
||||||
|
|
|
@ -141,9 +141,6 @@ class CartridgeSB : public Cartridge
|
||||||
// Indicates which bank is currently active
|
// Indicates which bank is currently active
|
||||||
uInt16 myCurrentBank;
|
uInt16 myCurrentBank;
|
||||||
|
|
||||||
// Indicates the last bank
|
|
||||||
uInt16 myLastBank;
|
|
||||||
|
|
||||||
// Previous Device's page access
|
// Previous Device's page access
|
||||||
System::PageAccess myHotSpotPageAccess[8];
|
System::PageAccess myHotSpotPageAccess[8];
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,6 +27,9 @@ CartridgeUA::CartridgeUA(const uInt8* image)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 8192);
|
memcpy(myImage, image, 8192);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -37,8 +40,8 @@ CartridgeUA::~CartridgeUA()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void CartridgeUA::reset()
|
void CartridgeUA::reset()
|
||||||
{
|
{
|
||||||
// Upon reset we switch to bank 0
|
// Upon reset we switch to the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -63,8 +66,8 @@ void CartridgeUA::install(System& system)
|
||||||
mySystem->setPageAccess(0x0220 >> shift, access);
|
mySystem->setPageAccess(0x0220 >> shift, access);
|
||||||
mySystem->setPageAccess(0x0240 >> shift, access);
|
mySystem->setPageAccess(0x0240 >> shift, access);
|
||||||
|
|
||||||
// Install pages for bank 0
|
// Install pages for the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -29,6 +29,9 @@ CartridgeX07::CartridgeX07(const uInt8* image)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 65536);
|
memcpy(myImage, image, 65536);
|
||||||
|
|
||||||
|
// Remember startup bank
|
||||||
|
myStartBank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -39,8 +42,8 @@ CartridgeX07::~CartridgeX07()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void CartridgeX07::reset()
|
void CartridgeX07::reset()
|
||||||
{
|
{
|
||||||
// Upon reset we switch to bank 0
|
// Upon reset we switch to the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -65,8 +68,8 @@ void CartridgeX07::install(System& system)
|
||||||
mySystem->setPageAccess(i >> shift, access);
|
mySystem->setPageAccess(i >> shift, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install pages for bank 0
|
// Install pages for the startup bank
|
||||||
bank(0);
|
bank(myStartBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -150,6 +150,7 @@ void EventHandler::initialize()
|
||||||
setActionMappings(kMenuMode);
|
setActionMappings(kMenuMode);
|
||||||
|
|
||||||
myGrabMouseFlag = myOSystem->settings().getBool("grabmouse");
|
myGrabMouseFlag = myOSystem->settings().getBool("grabmouse");
|
||||||
|
myUseCtrlKeyFlag = myOSystem->settings().getBool("ctrlcombo");
|
||||||
|
|
||||||
Joystick::setDeadZone(myOSystem->settings().getInt("joydeadzone"));
|
Joystick::setDeadZone(myOSystem->settings().getInt("joydeadzone"));
|
||||||
Paddles::setDigitalSpeed(myOSystem->settings().getInt("pspeed"));
|
Paddles::setDigitalSpeed(myOSystem->settings().getInt("pspeed"));
|
||||||
|
@ -480,7 +481,7 @@ void EventHandler::poll(uInt64 time)
|
||||||
else
|
else
|
||||||
handled = false;
|
handled = false;
|
||||||
}
|
}
|
||||||
else if(kbdControl(mod) && state)
|
else if(kbdControl(mod) && state && myUseCtrlKeyFlag)
|
||||||
{
|
{
|
||||||
// These keys work in all states
|
// These keys work in all states
|
||||||
if(key == SDLK_q)
|
if(key == SDLK_q)
|
||||||
|
|
|
@ -483,6 +483,12 @@ class EventHandler
|
||||||
// Indicates whether or not we're in frying mode
|
// Indicates whether or not we're in frying mode
|
||||||
bool myFryingFlag;
|
bool myFryingFlag;
|
||||||
|
|
||||||
|
// Indicates whether the key-combos tied to the Control key are
|
||||||
|
// being used or not (since Ctrl by default is the fire button,
|
||||||
|
// pressing it with a movement key could inadvertantly activate
|
||||||
|
// a Ctrl combo when it isn't wanted)
|
||||||
|
bool myUseCtrlKeyFlag;
|
||||||
|
|
||||||
// Indicates which paddle the mouse currently emulates
|
// Indicates which paddle the mouse currently emulates
|
||||||
Int8 myPaddleMode;
|
Int8 myPaddleMode;
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,7 @@ Settings::Settings(OSystem* osystem)
|
||||||
setInternal("pspeed", "6");
|
setInternal("pspeed", "6");
|
||||||
setInternal("sa1", "left");
|
setInternal("sa1", "left");
|
||||||
setInternal("sa2", "right");
|
setInternal("sa2", "right");
|
||||||
|
setInternal("ctrlcombo", "true");
|
||||||
|
|
||||||
// Snapshot options
|
// Snapshot options
|
||||||
setInternal("ssdir", "");
|
setInternal("ssdir", "");
|
||||||
|
@ -361,6 +362,7 @@ void Settings::usage()
|
||||||
<< " -pspeed <number> Speed of digital emulated paddle movement (1-15)\n"
|
<< " -pspeed <number> Speed of digital emulated paddle movement (1-15)\n"
|
||||||
<< " -sa1 <left|right> Stelladaptor 1 emulates specified joystick port\n"
|
<< " -sa1 <left|right> Stelladaptor 1 emulates specified joystick port\n"
|
||||||
<< " -sa2 <left|right> Stelladaptor 2 emulates specified joystick port\n"
|
<< " -sa2 <left|right> Stelladaptor 2 emulates specified joystick port\n"
|
||||||
|
<< " -ctrlcombo <1|0> Use key combos involving the Control key (Control-Q for quit may be disabled!)\n"
|
||||||
<< " -autoslot <1|0> Automatically switch to next save slot when state saving\n"
|
<< " -autoslot <1|0> Automatically switch to next save slot when state saving\n"
|
||||||
<< " -md5instate <1|0> ROM MD5 information is saved in a state file, tying the state file to the ROM\n"
|
<< " -md5instate <1|0> ROM MD5 information is saved in a state file, tying the state file to the ROM\n"
|
||||||
<< " -audiofirst <1|0> Initial audio before video (required for some ATI video cards)\n"
|
<< " -audiofirst <1|0> Initial audio before video (required for some ATI video cards)\n"
|
||||||
|
|
Loading…
Reference in New Issue