2004-06-28 01:24:09 +00:00
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// MM MM 6666 555555 0000 2222
|
|
|
|
// MMMM MMMM 66 66 55 00 00 22 22
|
|
|
|
// MM MMM MM 66 55 00 00 22
|
|
|
|
// MM M MM 66666 55555 00 00 22222 -- "A 6502 Microprocessor Emulator"
|
|
|
|
// MM MM 66 66 55 00 00 22
|
|
|
|
// MM MM 66 66 55 55 00 00 22
|
|
|
|
// MM MM 6666 5555 0000 222222
|
|
|
|
//
|
2019-12-31 17:18:56 +00:00
|
|
|
// Copyright (c) 1995-2020 by Bradford W. Mott, Stephen Anthony
|
2010-04-10 21:37:23 +00:00
|
|
|
// and the Stella Team
|
2004-06-28 01:24:09 +00:00
|
|
|
//
|
2010-01-10 03:23:32 +00:00
|
|
|
// See the file "License.txt" for information on usage and redistribution of
|
2004-06-28 01:24:09 +00:00
|
|
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
//============================================================================
|
|
|
|
|
2016-12-30 00:00:30 +00:00
|
|
|
/**
|
2009-05-17 19:30:10 +00:00
|
|
|
Code and cases to emulate each of the 6502 instructions.
|
|
|
|
|
|
|
|
Recompile with the following:
|
|
|
|
'm4 M6502.m4 > M6502.ins'
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2010-11-10 14:35:50 +00:00
|
|
|
@author Bradford W. Mott and Stephen Anthony
|
2004-06-28 01:24:09 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NOTSAMEPAGE
|
|
|
|
#define NOTSAMEPAGE(_addr1, _addr2) (((_addr1) ^ (_addr2)) & 0xff00)
|
|
|
|
#endif
|
|
|
|
|
2010-10-11 15:11:10 +00:00
|
|
|
#ifndef SET_LAST_PEEK
|
2010-10-11 23:06:37 +00:00
|
|
|
#ifdef DEBUGGER_SUPPORT
|
2010-11-08 22:25:19 +00:00
|
|
|
#define SET_LAST_PEEK(_addr1, _addr2) _addr1 = _addr2;
|
2010-10-11 23:06:37 +00:00
|
|
|
#else
|
2010-11-08 22:25:19 +00:00
|
|
|
#define SET_LAST_PEEK(_addr1, _addr2)
|
2010-10-11 23:06:37 +00:00
|
|
|
#endif
|
2010-10-11 15:11:10 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CLEAR_LAST_PEEK
|
2010-10-11 23:06:37 +00:00
|
|
|
#ifdef DEBUGGER_SUPPORT
|
2017-10-13 09:17:53 +00:00
|
|
|
#define CLEAR_LAST_PEEK(_addr) _addr = -1;
|
2010-10-11 23:06:37 +00:00
|
|
|
#else
|
|
|
|
#define CLEAR_LAST_PEEK(_addr)
|
|
|
|
#endif
|
2010-10-11 15:11:10 +00:00
|
|
|
#endif
|
|
|
|
|
2010-10-21 21:01:00 +00:00
|
|
|
#ifndef SET_LAST_POKE
|
2010-10-11 23:06:37 +00:00
|
|
|
#ifdef DEBUGGER_SUPPORT
|
2010-10-21 21:01:00 +00:00
|
|
|
#define SET_LAST_POKE(_addr) myDataAddressForPoke = _addr;
|
2010-10-11 23:06:37 +00:00
|
|
|
#else
|
2010-10-21 21:01:00 +00:00
|
|
|
#define SET_LAST_POKE(_addr)
|
2010-10-11 23:06:37 +00:00
|
|
|
#endif
|
2010-10-11 15:11:10 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 03:03:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// ADC
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x69:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x65:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x75:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress += X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x6d:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x7d:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + X);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + X) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2017-10-13 09:17:53 +00:00
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2010-10-11 00:44:25 +00:00
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x79:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x61:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x71:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// ASR
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x4b:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A &= operand;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = A & 0x01;
|
|
|
|
|
2018-08-27 14:47:22 +00:00
|
|
|
A >>= 1;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = A;
|
2018-08-27 16:17:22 +00:00
|
|
|
N = false;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// ANC
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x0b:
|
|
|
|
case 0x2b:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A &= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
C = N;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// AND
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x29:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A &= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x25:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A &= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x35:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress += X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A &= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x2d:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A &= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x3d:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + X);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + X) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2017-10-13 09:17:53 +00:00
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2010-10-11 00:44:25 +00:00
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A &= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x39:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A &= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x21:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A &= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x31:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A &= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// ANE
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x8b:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// NOTE: The implementation of this instruction is based on
|
|
|
|
// information from the 64doc.txt file. This instruction is
|
|
|
|
// reported to be unstable!
|
|
|
|
A = (A | 0xee) & X & operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// ARR
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x6b:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// NOTE: The implementation of this instruction is based on
|
|
|
|
// information from the 64doc.txt file. There are mixed
|
|
|
|
// reports on its operation!
|
|
|
|
if(!D)
|
|
|
|
{
|
|
|
|
A &= operand;
|
|
|
|
A = ((A >> 1) & 0x7f) | (C ? 0x80 : 0x00);
|
|
|
|
|
|
|
|
C = A & 0x40;
|
|
|
|
V = (A & 0x40) ^ ((A & 0x20) << 1);
|
|
|
|
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
uInt8 value = A & operand;
|
|
|
|
|
|
|
|
A = ((value >> 1) & 0x7f) | (C ? 0x80 : 0x00);
|
|
|
|
N = C;
|
|
|
|
notZ = A;
|
|
|
|
V = (value ^ A) & 0x40;
|
|
|
|
|
|
|
|
if(((value & 0x0f) + (value & 0x01)) > 0x05)
|
|
|
|
{
|
|
|
|
A = (A & 0xf0) | ((A + 0x06) & 0x0f);
|
|
|
|
}
|
2016-12-30 00:00:30 +00:00
|
|
|
|
|
|
|
if(((value & 0xf0) + (value & 0x10)) > 0x50)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
2018-08-27 16:17:22 +00:00
|
|
|
A += 0x60;
|
|
|
|
C = true;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-08-27 16:17:22 +00:00
|
|
|
C = false;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// ASL
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x0a:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the left-most bit in A
|
|
|
|
C = A & 0x80;
|
|
|
|
|
|
|
|
A <<= 1;
|
|
|
|
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x06:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the left-most bit in value
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand <<= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
|
|
|
N = operand & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x16:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the left-most bit in value
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand <<= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
|
|
|
N = operand & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x0e:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the left-most bit in value
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand <<= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
|
|
|
N = operand & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x1e:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the left-most bit in value
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand <<= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
|
|
|
N = operand & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// BIT
|
|
|
|
case 0x24:
|
|
|
|
{
|
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
|
|
|
{
|
|
|
|
notZ = (A & operand);
|
|
|
|
N = operand & 0x80;
|
|
|
|
V = operand & 0x40;
|
|
|
|
}
|
|
|
|
break;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
case 0x2C:
|
|
|
|
{
|
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
|
|
|
{
|
|
|
|
notZ = (A & operand);
|
|
|
|
N = operand & 0x80;
|
|
|
|
V = operand & 0x40;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// Branches
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x90:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(!C)
|
|
|
|
{
|
2010-10-24 14:55:42 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 address = PC + Int8(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
if(NOTSAMEPAGE(PC, address))
|
2010-10-24 14:55:42 +00:00
|
|
|
peek((PC & 0xFF00) | (address & 0x00FF), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
PC = address;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0xb0:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(C)
|
|
|
|
{
|
2010-10-24 14:55:42 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 address = PC + Int8(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
if(NOTSAMEPAGE(PC, address))
|
2010-10-24 14:55:42 +00:00
|
|
|
peek((PC & 0xFF00) | (address & 0x00FF), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
PC = address;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0xf0:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(!notZ)
|
|
|
|
{
|
2010-10-24 14:55:42 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 address = PC + Int8(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
if(NOTSAMEPAGE(PC, address))
|
2010-10-24 14:55:42 +00:00
|
|
|
peek((PC & 0xFF00) | (address & 0x00FF), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
PC = address;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0x30:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(N)
|
|
|
|
{
|
2010-10-24 14:55:42 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 address = PC + Int8(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
if(NOTSAMEPAGE(PC, address))
|
2010-10-24 14:55:42 +00:00
|
|
|
peek((PC & 0xFF00) | (address & 0x00FF), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
PC = address;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0xD0:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(notZ)
|
|
|
|
{
|
2010-10-24 14:55:42 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 address = PC + Int8(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
if(NOTSAMEPAGE(PC, address))
|
2010-10-24 14:55:42 +00:00
|
|
|
peek((PC & 0xFF00) | (address & 0x00FF), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
PC = address;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0x10:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(!N)
|
|
|
|
{
|
2010-10-24 14:55:42 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 address = PC + Int8(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
if(NOTSAMEPAGE(PC, address))
|
2010-10-24 14:55:42 +00:00
|
|
|
peek((PC & 0xFF00) | (address & 0x00FF), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
PC = address;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0x50:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(!V)
|
|
|
|
{
|
2010-10-24 14:55:42 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 address = PC + Int8(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
if(NOTSAMEPAGE(PC, address))
|
2010-10-24 14:55:42 +00:00
|
|
|
peek((PC & 0xFF00) | (address & 0x00FF), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
PC = address;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0x70:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
if(V)
|
|
|
|
{
|
2010-10-24 14:55:42 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 address = PC + Int8(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
if(NOTSAMEPAGE(PC, address))
|
2010-10-24 14:55:42 +00:00
|
|
|
peek((PC & 0xFF00) | (address & 0x00FF), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
PC = address;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// BRK
|
|
|
|
case 0x00:
|
|
|
|
{
|
|
|
|
peek(PC++, DISASM_NONE);
|
|
|
|
|
|
|
|
B = true;
|
|
|
|
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(0x0100 + SP--, PC >> 8, DISASM_WRITE);
|
|
|
|
poke(0x0100 + SP--, PC & 0x00ff, DISASM_WRITE);
|
|
|
|
poke(0x0100 + SP--, PS(), DISASM_WRITE);
|
2017-09-15 12:56:54 +00:00
|
|
|
|
|
|
|
I = true;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
PC = peek(0xfffe, DISASM_DATA);
|
|
|
|
PC |= (uInt16(peek(0xffff, DISASM_DATA)) << 8);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// CLC
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x18:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
C = false;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// CLD
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xd8:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
D = false;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// CLI
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x58:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
I = false;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// CLV
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xb8:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
V = false;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// CMP
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xc9:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(A) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xc5:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(A) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xd5:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress += X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(A) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xcd:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(A) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xdd:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + X);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + X) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2017-10-13 09:17:53 +00:00
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2010-10-11 00:44:25 +00:00
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(A) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xd9:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(A) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xc1:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(A) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xd1:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(A) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// CPX
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xe0:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(X) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xe4:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(X) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xec:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(X) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// CPY
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xc0:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(Y) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xc4:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(Y) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xcc:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(Y) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x0080;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// DCP
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xcf:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand - 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value2 = uInt16(A) - uInt16(value);
|
2004-06-28 01:24:09 +00:00
|
|
|
notZ = value2;
|
|
|
|
N = value2 & 0x0080;
|
|
|
|
C = !(value2 & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xdf:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand - 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value2 = uInt16(A) - uInt16(value);
|
2004-06-28 01:24:09 +00:00
|
|
|
notZ = value2;
|
|
|
|
N = value2 & 0x0080;
|
|
|
|
C = !(value2 & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xdb:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand - 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value2 = uInt16(A) - uInt16(value);
|
2004-06-28 01:24:09 +00:00
|
|
|
notZ = value2;
|
|
|
|
N = value2 & 0x0080;
|
|
|
|
C = !(value2 & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xc7:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand - 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value2 = uInt16(A) - uInt16(value);
|
2004-06-28 01:24:09 +00:00
|
|
|
notZ = value2;
|
|
|
|
N = value2 & 0x0080;
|
|
|
|
C = !(value2 & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xd7:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand - 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value2 = uInt16(A) - uInt16(value);
|
2004-06-28 01:24:09 +00:00
|
|
|
notZ = value2;
|
|
|
|
N = value2 & 0x0080;
|
|
|
|
C = !(value2 & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xc3:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand - 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value2 = uInt16(A) - uInt16(value);
|
2004-06-28 01:24:09 +00:00
|
|
|
notZ = value2;
|
|
|
|
N = value2 & 0x0080;
|
|
|
|
C = !(value2 & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xd3:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand - 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value2 = uInt16(A) - uInt16(value);
|
2004-06-28 01:24:09 +00:00
|
|
|
notZ = value2;
|
|
|
|
N = value2 & 0x0080;
|
|
|
|
C = !(value2 & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// DEC
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xc6:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand - 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xd6:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand - 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xce:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand - 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xde:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand - 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// DEX
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xca:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
X--;
|
|
|
|
|
|
|
|
notZ = X;
|
|
|
|
N = X & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// DEY
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x88:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
Y--;
|
|
|
|
|
|
|
|
notZ = Y;
|
|
|
|
N = Y & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// EOR
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x49:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x45:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x55:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress += X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x4d:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x5d:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + X);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + X) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2017-10-13 09:17:53 +00:00
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2010-10-11 00:44:25 +00:00
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x59:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x41:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x51:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// INC
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xe6:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand + 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xf6:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand + 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xee:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand + 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xfe:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = operand + 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = value;
|
|
|
|
N = value & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// INX
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xe8:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
X++;
|
|
|
|
notZ = X;
|
|
|
|
N = X & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// INY
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xc8:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
Y++;
|
|
|
|
notZ = Y;
|
|
|
|
N = Y & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// ISB
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xef:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
operand = operand + 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xff:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
operand = operand + 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xfb:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
operand = operand + 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xe7:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
operand = operand + 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xf7:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
operand = operand + 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xe3:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
operand = operand + 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xf3:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
operand = operand + 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// JMP
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x4c:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
PC = operandAddress;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x6c:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 addr = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
addr |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
// Simulate the error in the indirect addressing mode!
|
|
|
|
uInt16 high = NOTSAMEPAGE(addr, addr + 1) ? (addr & 0xff00) : (addr + 1);
|
|
|
|
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(addr, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(high, DISASM_DATA)) << 8);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
PC = operandAddress;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// JSR
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x20:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 low = peek(PC++, DISASM_CODE);
|
Added rule for recompiling the M6502.m4 script to the Makefile, because I'm
tired of doing it manually every time it changes.
Tweaked the handling of JSR, RTI and RTS commands, so they don't erroneously
mark associated addresses as CODE when in fact they're never actually
executed.
Several parts of the Distella code were marking areas as DATA, even though
it depending on knowing the values for the X and Y registers (which it
doesn't, as it's a static analysis). As such, these areas are now marked
as ROW instead, since that's as precise as a static analysis can do. The
processing blocks are left there, though, in case Distella is improved in
a future release.
All the above changes allow for better disassembly with less
'false positives' (ie, areas marked as CODE or DATA when they really aren't).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2172 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-07 22:52:42 +00:00
|
|
|
peek(0x0100 + SP, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
// It seems that the 650x does not push the address of the next instruction
|
|
|
|
// on the stack it actually pushes the address of the next instruction
|
|
|
|
// minus one. This is compensated for in the RTS instruction
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(0x0100 + SP--, PC >> 8, DISASM_WRITE);
|
|
|
|
poke(0x0100 + SP--, PC & 0xff, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
PC = (low | (uInt16(peek(PC, DISASM_CODE)) << 8));
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// LAS
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xbb:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
A = X = SP = SP & operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
2010-11-08 22:25:19 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// LAX
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xaf:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
|
|
|
SET_LAST_PEEK(myLastSrcAddressX, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
X = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xbf:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
|
|
|
SET_LAST_PEEK(myLastSrcAddressX, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
X = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xa7:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
|
|
|
SET_LAST_PEEK(myLastSrcAddressX, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
X = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xb7:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress += Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress) // TODO - check this
|
|
|
|
SET_LAST_PEEK(myLastSrcAddressX, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
X = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xa3:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
|
|
|
SET_LAST_PEEK(myLastSrcAddressX, intermediateAddress) // TODO - check this
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
X = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xb3:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
|
|
|
SET_LAST_PEEK(myLastSrcAddressX, intermediateAddress) // TODO - check this
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
X = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
2010-11-08 22:25:19 +00:00
|
|
|
//////////////////////////////////////////////////
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
|
2010-10-11 00:44:25 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// LDA
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xa9:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-10-21 21:01:00 +00:00
|
|
|
CLEAR_LAST_PEEK(myLastSrcAddressA)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xa5:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xb5:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress += X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xad:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xbd:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + X);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + X) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2017-10-13 09:17:53 +00:00
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2010-10-11 00:44:25 +00:00
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xb9:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xa1:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xb1:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
2010-10-11 00:44:25 +00:00
|
|
|
//////////////////////////////////////////////////
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
|
2010-10-11 00:44:25 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// LDX
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xa2:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-10-21 21:01:00 +00:00
|
|
|
CLEAR_LAST_PEEK(myLastSrcAddressX)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
X = operand;
|
|
|
|
notZ = X;
|
|
|
|
N = X & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xa6:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressX, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
X = operand;
|
|
|
|
notZ = X;
|
|
|
|
N = X & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xb6:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress += Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressX, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
X = operand;
|
|
|
|
notZ = X;
|
|
|
|
N = X & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xae:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressX, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
X = operand;
|
|
|
|
notZ = X;
|
|
|
|
N = X & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xbe:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressX, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
X = operand;
|
|
|
|
notZ = X;
|
|
|
|
N = X & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
2010-10-11 00:44:25 +00:00
|
|
|
//////////////////////////////////////////////////
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
|
2010-10-11 00:44:25 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// LDY
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xa0:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-10-21 21:01:00 +00:00
|
|
|
CLEAR_LAST_PEEK(myLastSrcAddressY)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
Y = operand;
|
|
|
|
notZ = Y;
|
|
|
|
N = Y & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xa4:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressY, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
Y = operand;
|
|
|
|
notZ = Y;
|
|
|
|
N = Y & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xb4:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress += X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressY, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
Y = operand;
|
|
|
|
notZ = Y;
|
|
|
|
N = Y & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xac:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressY, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
Y = operand;
|
|
|
|
notZ = Y;
|
|
|
|
N = Y & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xbc:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + X);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + X) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2017-10-13 09:17:53 +00:00
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2010-10-11 00:44:25 +00:00
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressY, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
Y = operand;
|
|
|
|
notZ = Y;
|
|
|
|
N = Y & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
2010-10-11 00:44:25 +00:00
|
|
|
//////////////////////////////////////////////////
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// LSR
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x4a:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = A & 0x01;
|
|
|
|
|
2018-08-27 14:47:22 +00:00
|
|
|
A >>= 1;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = A;
|
2018-08-27 16:17:22 +00:00
|
|
|
N = false;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0x46:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the right-most bit in value
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
2018-08-27 14:47:22 +00:00
|
|
|
operand >>= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
2018-08-27 16:17:22 +00:00
|
|
|
N = false;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x56:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the right-most bit in value
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
2018-08-27 14:47:22 +00:00
|
|
|
operand >>= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
2018-08-27 16:17:22 +00:00
|
|
|
N = false;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x4e:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the right-most bit in value
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
2018-08-27 14:47:22 +00:00
|
|
|
operand >>= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
2018-08-27 16:17:22 +00:00
|
|
|
N = false;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x5e:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the right-most bit in value
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
2018-08-27 14:47:22 +00:00
|
|
|
operand >>= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
2018-08-27 16:17:22 +00:00
|
|
|
N = false;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// LXA
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xab:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// NOTE: The implementation of this instruction is based on
|
|
|
|
// information from the 64doc.txt file. This instruction is
|
|
|
|
// reported to be very unstable!
|
|
|
|
A = X = (A | 0xee) & operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// NOP
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x1a:
|
|
|
|
case 0x3a:
|
|
|
|
case 0x5a:
|
|
|
|
case 0x7a:
|
|
|
|
case 0xda:
|
|
|
|
case 0xea:
|
|
|
|
case 0xfa:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x80:
|
|
|
|
case 0x82:
|
|
|
|
case 0x89:
|
|
|
|
case 0xc2:
|
|
|
|
case 0xe2:
|
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x04:
|
|
|
|
case 0x44:
|
|
|
|
case 0x64:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x14:
|
|
|
|
case 0x34:
|
|
|
|
case 0x54:
|
|
|
|
case 0x74:
|
|
|
|
case 0xd4:
|
|
|
|
case 0xf4:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress += X;
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x0c:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x1c:
|
|
|
|
case 0x3c:
|
|
|
|
case 0x5c:
|
|
|
|
case 0x7c:
|
|
|
|
case 0xdc:
|
|
|
|
case 0xfc:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + X);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + X) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + X;
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_DATA);
|
2017-10-13 09:17:53 +00:00
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_DATA);
|
2010-10-11 00:44:25 +00:00
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
2010-11-10 14:01:41 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// ORA
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x09:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-10 14:01:41 +00:00
|
|
|
CLEAR_LAST_PEEK(myLastSrcAddressA)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x05:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-10 14:01:41 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x15:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress += X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-10 14:01:41 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x0d:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-10 14:01:41 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x1d:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + X);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + X) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2017-10-13 09:17:53 +00:00
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2010-10-11 00:44:25 +00:00
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-10 14:01:41 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x19:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-10 14:01:41 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x01:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-10 14:01:41 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x11:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-10 14:01:41 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, intermediateAddress)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
2010-11-10 14:01:41 +00:00
|
|
|
//////////////////////////////////////////////////
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// PHA
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x48:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2018-12-28 11:36:00 +00:00
|
|
|
SET_LAST_POKE(myLastSrcAddressA)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(0x0100 + SP--, A, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// PHP
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x08:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
// TODO - add tracking for this opcode
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(0x0100 + SP--, PS(), DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// PLA
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x68:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
// TODO - add tracking for this opcode
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(0x0100 + SP++, DISASM_NONE);
|
2017-09-16 15:38:37 +00:00
|
|
|
A = peek(0x0100 + SP, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// PLP
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x28:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
// TODO - add tracking for this opcode
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(0x0100 + SP++, DISASM_NONE);
|
2017-09-16 15:38:37 +00:00
|
|
|
PS(peek(0x0100 + SP, DISASM_DATA));
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// RLA
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x2f:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = (operand << 1) | (C ? 1 : 0);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A &= value;
|
|
|
|
C = operand & 0x80;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x3f:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = (operand << 1) | (C ? 1 : 0);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A &= value;
|
|
|
|
C = operand & 0x80;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x3b:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = (operand << 1) | (C ? 1 : 0);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A &= value;
|
|
|
|
C = operand & 0x80;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x27:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = (operand << 1) | (C ? 1 : 0);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A &= value;
|
|
|
|
C = operand & 0x80;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x37:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = (operand << 1) | (C ? 1 : 0);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A &= value;
|
|
|
|
C = operand & 0x80;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x23:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = (operand << 1) | (C ? 1 : 0);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A &= value;
|
|
|
|
C = operand & 0x80;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x33:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
uInt8 value = (operand << 1) | (C ? 1 : 0);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, value, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A &= value;
|
|
|
|
C = operand & 0x80;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// ROL
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x2a:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the left-most bit
|
|
|
|
C = A & 0x80;
|
|
|
|
|
|
|
|
A = (A << 1) | (oldC ? 1 : 0);
|
|
|
|
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x26:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the left-most bit in operand
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand = (operand << 1) | (oldC ? 1 : 0);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
|
|
|
N = operand & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x36:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the left-most bit in operand
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand = (operand << 1) | (oldC ? 1 : 0);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
|
|
|
N = operand & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x2e:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the left-most bit in operand
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand = (operand << 1) | (oldC ? 1 : 0);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
|
|
|
N = operand & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x3e:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the left-most bit in operand
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand = (operand << 1) | (oldC ? 1 : 0);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
|
|
|
N = operand & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// ROR
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x6a:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = A & 0x01;
|
|
|
|
|
|
|
|
A = ((A >> 1) & 0x7f) | (oldC ? 0x80 : 0x00);
|
|
|
|
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x66:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = ((operand >> 1) & 0x7f) | (oldC ? 0x80 : 0x00);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
|
|
|
N = operand & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x76:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = ((operand >> 1) & 0x7f) | (oldC ? 0x80 : 0x00);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
|
|
|
N = operand & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x6e:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = ((operand >> 1) & 0x7f) | (oldC ? 0x80 : 0x00);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
|
|
|
N = operand & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x7e:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = ((operand >> 1) & 0x7f) | (oldC ? 0x80 : 0x00);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
notZ = operand;
|
|
|
|
N = operand & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// RRA
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x6f:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = ((operand >> 1) & 0x7f) | (oldC ? 0x80 : 0x00);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x7f:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = ((operand >> 1) & 0x7f) | (oldC ? 0x80 : 0x00);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x7b:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = ((operand >> 1) & 0x7f) | (oldC ? 0x80 : 0x00);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x67:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = ((operand >> 1) & 0x7f) | (oldC ? 0x80 : 0x00);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x77:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = ((operand >> 1) & 0x7f) | (oldC ? 0x80 : 0x00);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x63:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = ((operand >> 1) & 0x7f) | (oldC ? 0x80 : 0x00);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x73:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
bool oldC = C;
|
|
|
|
|
|
|
|
// Set carry flag according to the right-most bit
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = ((operand >> 1) & 0x7f) | (oldC ? 0x80 : 0x00);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 sum = A + operand + (C ? 1 : 0);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
|
|
|
C = sum & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) + (operand & 0x0f) + (C ? 1 : 0);
|
|
|
|
Int32 hi = (A & 0xf0) + (operand & 0xf0);
|
|
|
|
notZ = (lo+hi) & 0xff;
|
|
|
|
if(lo > 0x09)
|
|
|
|
{
|
|
|
|
hi += 0x10;
|
|
|
|
lo += 0x06;
|
|
|
|
}
|
|
|
|
N = hi & 0x80;
|
|
|
|
V = ~(A ^ operand) & (A ^ hi) & 0x80;
|
|
|
|
if(hi > 0x90)
|
|
|
|
hi += 0x60;
|
|
|
|
C = hi & 0xff00;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) + (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// RTI
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x40:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
Added rule for recompiling the M6502.m4 script to the Makefile, because I'm
tired of doing it manually every time it changes.
Tweaked the handling of JSR, RTI and RTS commands, so they don't erroneously
mark associated addresses as CODE when in fact they're never actually
executed.
Several parts of the Distella code were marking areas as DATA, even though
it depending on knowing the values for the X and Y registers (which it
doesn't, as it's a static analysis). As such, these areas are now marked
as ROW instead, since that's as precise as a static analysis can do. The
processing blocks are left there, though, in case Distella is improved in
a future release.
All the above changes allow for better disassembly with less
'false positives' (ie, areas marked as CODE or DATA when they really aren't).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2172 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-07 22:52:42 +00:00
|
|
|
peek(0x0100 + SP++, DISASM_NONE);
|
|
|
|
PS(peek(0x0100 + SP++, DISASM_NONE));
|
|
|
|
PC = peek(0x0100 + SP++, DISASM_NONE);
|
2015-09-14 21:33:50 +00:00
|
|
|
PC |= (uInt16(peek(0x0100 + SP, DISASM_NONE)) << 8);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// RTS
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x60:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
Added rule for recompiling the M6502.m4 script to the Makefile, because I'm
tired of doing it manually every time it changes.
Tweaked the handling of JSR, RTI and RTS commands, so they don't erroneously
mark associated addresses as CODE when in fact they're never actually
executed.
Several parts of the Distella code were marking areas as DATA, even though
it depending on knowing the values for the X and Y registers (which it
doesn't, as it's a static analysis). As such, these areas are now marked
as ROW instead, since that's as precise as a static analysis can do. The
processing blocks are left there, though, in case Distella is improved in
a future release.
All the above changes allow for better disassembly with less
'false positives' (ie, areas marked as CODE or DATA when they really aren't).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2172 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-07 22:52:42 +00:00
|
|
|
peek(0x0100 + SP++, DISASM_NONE);
|
|
|
|
PC = peek(0x0100 + SP++, DISASM_NONE);
|
2015-09-14 21:33:50 +00:00
|
|
|
PC |= (uInt16(peek(0x0100 + SP, DISASM_NONE)) << 8);
|
2017-09-13 14:04:54 +00:00
|
|
|
peek(PC++, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// SAX
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x8f:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A & X, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x87:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A & X, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x97:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + Y) & 0xFF;
|
|
|
|
}
|
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A & X, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x83:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A & X, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// SBC
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xe9:
|
|
|
|
case 0xeb:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xe5:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xf5:
|
|
|
|
{
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-21 21:16:55 +00:00
|
|
|
intermediateAddress += X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xed:
|
|
|
|
{
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xfd:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + X);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + X) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + X;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2017-10-13 09:17:53 +00:00
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2010-10-11 00:44:25 +00:00
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xf9:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xe1:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
intermediateAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2010-10-11 00:44:25 +00:00
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0xf1:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
|
|
|
intermediateAddress = high | uInt8(low + Y);
|
2004-06-28 01:24:09 +00:00
|
|
|
if((low + Y) > 0xFF)
|
2010-10-11 00:44:25 +00:00
|
|
|
{
|
2019-12-23 03:03:20 +00:00
|
|
|
peek(intermediateAddress, DISASM_NONE);
|
2010-10-11 00:44:25 +00:00
|
|
|
intermediateAddress = (high | low) + Y;
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2017-09-15 12:56:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
operand = peek(intermediateAddress, DISASM_DATA);
|
|
|
|
}
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
// N, V, Z, C flags are the same in either mode (C calculated at the end)
|
|
|
|
Int32 sum = A - operand - (C ? 0 : 1);
|
|
|
|
N = sum & 0x80;
|
|
|
|
V = (A ^ operand) & (A ^ sum) & 0x80;
|
|
|
|
notZ = sum & 0xff;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
if(!D)
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
A = uInt8(sum);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-20 15:03:13 +00:00
|
|
|
Int32 lo = (A & 0x0f) - (operand & 0x0f) - (C ? 0 : 1);
|
|
|
|
Int32 hi = (A & 0xf0) - (operand & 0xf0);
|
|
|
|
if(lo & 0x10)
|
|
|
|
{
|
|
|
|
lo -= 6;
|
|
|
|
hi--;
|
|
|
|
}
|
|
|
|
if(hi & 0x0100)
|
|
|
|
hi -= 0x60;
|
2004-06-28 01:24:09 +00:00
|
|
|
|
2009-04-20 15:03:13 +00:00
|
|
|
A = (lo & 0x0f) | (hi & 0xf0);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2009-04-20 15:03:13 +00:00
|
|
|
C = (sum & 0xff00) == 0;
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// SBX
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xcb:
|
|
|
|
{
|
2010-10-21 21:01:00 +00:00
|
|
|
operand = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 value = uInt16(X & A) - uInt16(operand);
|
2004-06-28 01:24:09 +00:00
|
|
|
X = (value & 0xff);
|
|
|
|
|
|
|
|
notZ = X;
|
|
|
|
N = X & 0x80;
|
|
|
|
C = !(value & 0x0100);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// SEC
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x38:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
C = true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// SED
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xf8:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
D = true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// SEI
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x78:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
I = true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// SHA
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x9f:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
// NOTE: There are mixed reports on the actual operation
|
|
|
|
// of this instruction!
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A & X & (((operandAddress >> 8) & 0xff) + 1), DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x93:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
// NOTE: There are mixed reports on the actual operation
|
|
|
|
// of this instruction!
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A & X & (((operandAddress >> 8) & 0xff) + 1), DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// SHS
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x9b:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
// NOTE: There are mixed reports on the actual operation
|
|
|
|
// of this instruction!
|
|
|
|
SP = A & X;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A & X & (((operandAddress >> 8) & 0xff) + 1), DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// SHX
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x9e:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
// NOTE: There are mixed reports on the actual operation
|
|
|
|
// of this instruction!
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, X & (((operandAddress >> 8) & 0xff) + 1), DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// SHY
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x9c:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
// NOTE: There are mixed reports on the actual operation
|
|
|
|
// of this instruction!
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, Y & (((operandAddress >> 8) & 0xff) + 1), DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// SLO
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x0f:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the left-most bit in value
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand <<= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x1f:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the left-most bit in value
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand <<= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x1b:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the left-most bit in value
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand <<= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x07:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the left-most bit in value
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand <<= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x17:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the left-most bit in value
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand <<= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x03:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the left-most bit in value
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand <<= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x13:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the left-most bit in value
|
|
|
|
C = operand & 0x80;
|
|
|
|
|
|
|
|
operand <<= 1;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A |= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-15 12:56:54 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// SRE
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x4f:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the right-most bit in value
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = (operand >> 1) & 0x7f;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x5f:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the right-most bit in value
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = (operand >> 1) & 0x7f;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x5b:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the right-most bit in value
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = (operand >> 1) & 0x7f;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x47:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the right-most bit in value
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = (operand >> 1) & 0x7f;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x57:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the right-most bit in value
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = (operand >> 1) & 0x7f;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x43:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the right-most bit in value
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = (operand >> 1) & 0x7f;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x53:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operand = peek(operandAddress, DISASM_DATA);
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set carry flag according to the right-most bit in value
|
|
|
|
C = operand & 0x01;
|
|
|
|
|
|
|
|
operand = (operand >> 1) & 0x7f;
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, operand, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
A ^= operand;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
2010-10-11 00:44:25 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// STA
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x85:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-10-21 21:01:00 +00:00
|
|
|
SET_LAST_POKE(myLastSrcAddressA)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x95:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
|
|
|
}
|
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x8d:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2018-12-28 11:36:00 +00:00
|
|
|
SET_LAST_POKE(myLastSrcAddressA)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x9d:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + X), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + X;
|
|
|
|
}
|
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x99:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt16 low = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
|
|
|
}
|
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x81:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(pointer, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
pointer += X;
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x91:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
uInt8 pointer = peek(PC++, DISASM_CODE);
|
|
|
|
uInt16 low = peek(pointer++, DISASM_DATA);
|
2015-09-14 21:33:50 +00:00
|
|
|
uInt16 high = (uInt16(peek(pointer, DISASM_DATA)) << 8);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(high | uInt8(low + Y), DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (high | low) + Y;
|
|
|
|
}
|
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, A, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
2010-10-11 00:44:25 +00:00
|
|
|
//////////////////////////////////////////////////
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
|
2010-10-11 00:44:25 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// STX
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x86:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-10-21 21:01:00 +00:00
|
|
|
SET_LAST_POKE(myLastSrcAddressX)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, X, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x96:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + Y) & 0xFF;
|
|
|
|
}
|
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, X, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x8e:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2018-12-28 11:36:00 +00:00
|
|
|
SET_LAST_POKE(myLastSrcAddressX)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, X, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
2010-10-11 00:44:25 +00:00
|
|
|
//////////////////////////////////////////////////
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
|
2010-10-11 00:44:25 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// STY
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0x84:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-10-21 21:01:00 +00:00
|
|
|
SET_LAST_POKE(myLastSrcAddressY)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, Y, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x94:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2017-09-15 12:56:54 +00:00
|
|
|
peek(operandAddress, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
operandAddress = (operandAddress + X) & 0xFF;
|
|
|
|
}
|
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, Y, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x8c:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
operandAddress = peek(PC++, DISASM_CODE);
|
2015-09-14 21:33:50 +00:00
|
|
|
operandAddress |= (uInt16(peek(PC++, DISASM_CODE)) << 8);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2018-12-28 11:36:00 +00:00
|
|
|
SET_LAST_POKE(myLastSrcAddressY)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
2017-09-16 20:37:19 +00:00
|
|
|
poke(operandAddress, Y, DISASM_WRITE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
|
|
|
break;
|
2010-10-11 00:44:25 +00:00
|
|
|
//////////////////////////////////////////////////
|
2004-06-28 01:24:09 +00:00
|
|
|
|
|
|
|
|
2010-11-08 22:25:19 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// Remaining MOVE opcodes
|
2004-06-28 01:24:09 +00:00
|
|
|
case 0xaa:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressX, myLastSrcAddressA)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
X = A;
|
|
|
|
notZ = X;
|
|
|
|
N = X & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0xa8:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressY, myLastSrcAddressA)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
Y = A;
|
|
|
|
notZ = Y;
|
|
|
|
N = Y & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0xba:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-10 14:01:41 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressX, myLastSrcAddressS)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
X = SP;
|
|
|
|
notZ = X;
|
|
|
|
N = X & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0x8a:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, myLastSrcAddressX)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = X;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0x9a:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-10 14:01:41 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressS, myLastSrcAddressX)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
SP = X;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0x98:
|
|
|
|
{
|
The emulation core now tracks access to DATA areas (currently, any address
used as a peek operand). Still TODO is deal with poke areas, which would
be relevant in carts with extended RAM.
The interaction between the internal tracking and Distella is now much
tighter, in that knowledge gained by Distella is used in the core code,
and vice versa. This allows the best of both worlds, where the internal
tracking finds stuff at runtime (that couldn't be found in a static
analysis), and Distella tracks potential paths (that haven't occurred at
runtime yet).
Added 'type' debugger prompt command, which basically queries an address
for its disassembly type (CODE/GFX/DATA, etc).
Added debugger commands to query the last address used in an operation
for various registers, but they're only stubs at the moment.
Updated the bankswitch schemes to deal with accesses in and around the
hotspot areas. Previously, peek accesses in these areas weren't being
recorded as DATA areas.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-10-10 20:24:22 +00:00
|
|
|
peek(PC, DISASM_NONE);
|
2004-06-28 01:24:09 +00:00
|
|
|
}
|
2010-11-08 22:25:19 +00:00
|
|
|
SET_LAST_PEEK(myLastSrcAddressA, myLastSrcAddressY)
|
2004-06-28 01:24:09 +00:00
|
|
|
{
|
|
|
|
A = Y;
|
|
|
|
notZ = A;
|
|
|
|
N = A & 0x80;
|
|
|
|
}
|
|
|
|
break;
|
2010-11-08 22:25:19 +00:00
|
|
|
//////////////////////////////////////////////////
|