mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-05 23:31:17 +00:00
2.7.0.0 Released with Applewin 1.19.1.x
.9 Fixed: Renamed ambigious command 'DL' to 'B' to list all bytes being treated as data Renamed command: 'B' to 'Z' as an alias to treat byte(s) as data .8 Fixed: Define Code 'X' wasn't removing entries .7 Fixed: DATA1 was using call win setup for code, not data. .6 Cleanup of command table to have the proper internal command enum. D // CMD_MEM_MINI_DUMP_HEX_1 moved to alias section M1 // CMD_MEM_MINI_DUMP_HEX_1 moved to alias section M2 // CMD_MEM_MINI_DUMP_HEX_2 moved to alias section TEXT81 // CMD_VIEW_TEXT81 <- CMD_VIEW_TEXT8X TEXT82 // CMD_VIEW_TEXT82 <- CMD_VIEW_TEXT8X W // CMD_WATCH <- CMD_WATCH_ADD .5 Added: Internal consistency checking for commands and their internal command enum. .4 Fixed: Added customer assembler type and debugger disassembly display uses variable instead of always being hard-coded to Merlin directives. .5 Fixed: Data disassembler help -- was using wrong command help offset due to wrong order of commands. .3 Fixed: Assembler now accepts lower-case mnemonics
This commit is contained in:
parent
a9509d54dc
commit
95e42b736e
@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#define ALLOW_INPUT_LOWERCASE 1
|
||||
|
||||
// See Debugger_Changelong.txt for full details
|
||||
const int DEBUGGER_VERSION = MAKE_VERSION(2,6,3,0);
|
||||
const int DEBUGGER_VERSION = MAKE_VERSION(2,7,0,0);
|
||||
|
||||
|
||||
// Public _________________________________________________________________________________________
|
||||
@ -116,34 +116,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
// Setting function to NULL, allows g_aCommands arguments to be safely listed here
|
||||
// Commands should be listed alphabetically per category.
|
||||
// For the list sorted by category, check Commands_e
|
||||
// NOTE: Commands_e and g_aCommands[] must be kept in sync! Aliases are listed at the end.
|
||||
// NOTE: Keep in sync Commands_e and g_aCommands[] ! Aliases are listed at the end.
|
||||
Command_t g_aCommands[] =
|
||||
{
|
||||
// Assembler
|
||||
{TEXT("A") , CmdAssemble , CMD_ASSEMBLE , "Assemble instructions" },
|
||||
// Disassembler Data
|
||||
{TEXT("B") , CmdDisasmDataDefByte1 , CMD_DISASM_DATA , "Treat byte [range] as data" },
|
||||
{TEXT("X") , CmdDisasmDataDefCode , CMD_DISASM_CODE , "Treat byte [range] as code" },
|
||||
{TEXT("DL") , CmdDisasmDataList , CMD_DISASM_LIST , "List all byte ranges treated as data" },
|
||||
// without symbol lookup
|
||||
{TEXT("DB") , CmdDisasmDataDefByte1 , CMD_DEFINE_DATA_BYTE1, "Define byte (array)" },
|
||||
{TEXT("DB2") , CmdDisasmDataDefByte2 , CMD_DEFINE_DATA_BYTE2, "Define byte array, display 2 bytes/line" },
|
||||
{TEXT("DB4") , CmdDisasmDataDefByte4 , CMD_DEFINE_DATA_BYTE4, "Define byte array, display 4 bytes/line" },
|
||||
{TEXT("DB8") , CmdDisasmDataDefByte8 , CMD_DEFINE_DATA_BYTE8, "Define byte array, display 8 bytes/line" },
|
||||
{TEXT("DW") , CmdDisasmDataDefWord1 , CMD_DEFINE_DATA_WORD1, "Define address array" },
|
||||
{TEXT("DW2") , CmdDisasmDataDefWord2 , CMD_DEFINE_DATA_WORD2, "Define address array, display 2 words/line" },
|
||||
{TEXT("DW4") , CmdDisasmDataDefWord4 , CMD_DEFINE_DATA_WORD4, "Define address array, display 4 words/line" },
|
||||
{TEXT("DS") , CmdDisasmDataDefString , CMD_DEFINE_DATA_STR , "Define string" },
|
||||
// {TEXT("DF") , CmdDisasmDataDefFloat , CMD_DEFINE_DATA_FLOAT, "Define AppleSoft (packed) Float" },
|
||||
// {TEXT("DFX") , CmdDisasmDataDefFloatUnpack , CMD_DEFINE_DATA_FLOAT2,"Define AppleSoft (unpacked) Float" },
|
||||
// with symbol lookup
|
||||
// {TEXT("DA<>") , CmdDisasmDataDefAddress8HL , CMD_DEFINE_ADDR_8_HL , "Define split array of addresses, high byte section followed by low byte section" },
|
||||
// {TEXT("DA><") , CmdDisasmDataDefAddress8LH , CMD_DEFINE_ADDR_8_LH , "Define split array of addresses, low byte section followed by high byte section" },
|
||||
// {TEXT("DA<") , CmdDisasmDataDefAddress8H , CMD_DEFINE_ADDR_BYTE_H , "Define array of high byte addresses" },
|
||||
// {TEXT("DB>") , CmdDisasmDataDefAddress8L , CMD_DEFINE_ADDR_BYTE_L , "Define array of low byte addresses" }
|
||||
{TEXT(".DA") , CmdDisasmDataDefAddress16 , CMD_DEFINE_ADDR_WORD , "Define array of word addresses" },
|
||||
// TODO: Rename config cmd: DISASM
|
||||
// {TEXT("UA") , CmdDisasmDataSmart , CMD_SMART_DISASSEMBLE, "Analyze opcodes to determine if code or data" },
|
||||
// CPU (Main)
|
||||
{TEXT(".") , CmdCursorJumpPC , CMD_CURSOR_JUMP_PC , "Locate the cursor in the disasm window" }, // centered
|
||||
{TEXT("=") , CmdCursorSetPC , CMD_CURSOR_SET_PC , "Sets the PC to the current instruction" },
|
||||
@ -155,14 +132,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
{TEXT("JSR") , CmdJSR , CMD_JSR , "Call sub-routine" },
|
||||
{TEXT("NOP") , CmdNOP , CMD_NOP , "Zap the current instruction with a NOP" },
|
||||
{TEXT("OUT") , CmdOut , CMD_OUT , "Output byte to IO $C0xx" },
|
||||
// CPU - Meta Info
|
||||
{TEXT("PROFILE") , CmdProfile , CMD_PROFILE , "List/Save 6502 profiling" },
|
||||
{TEXT("R") , CmdRegisterSet , CMD_REGISTER_SET , "Set register" },
|
||||
// CPU - Stack
|
||||
{TEXT("POP") , CmdStackPop , CMD_STACK_POP },
|
||||
{TEXT("PPOP") , CmdStackPopPseudo , CMD_STACK_POP_PSEUDO },
|
||||
{TEXT("PUSH") , CmdStackPop , CMD_STACK_PUSH },
|
||||
// {TEXT("RTS") , CmdStackReturn , CMD_STACK_RETURN },
|
||||
{TEXT("P") , CmdStepOver , CMD_STEP_OVER , "Step current instruction" },
|
||||
{TEXT("RTS") , CmdStepOut , CMD_STEP_OUT , "Step out of subroutine" },
|
||||
// CPU - Meta Info
|
||||
{TEXT("T") , CmdTrace , CMD_TRACE , "Trace current instruction" },
|
||||
{TEXT("TF") , CmdTraceFile , CMD_TRACE_FILE , "Save trace to filename" },
|
||||
{TEXT("TL") , CmdTraceLine , CMD_TRACE_LINE , "Trace (with cycle counting)" },
|
||||
@ -215,10 +195,35 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
{TEXT("PAGEDN" ) , CmdCursorPageDown , CMD_CURSOR_PAGE_DOWN , "Scroll down one scren" },
|
||||
{TEXT("PAGEDOWN256") , CmdCursorPageDown256 , CMD_CURSOR_PAGE_DOWN_256 , "Scroll down 256 bytes" }, // Shift
|
||||
{TEXT("PAGEDOWN4K" ) , CmdCursorPageDown4K , CMD_CURSOR_PAGE_DOWN_4K , "Scroll down 4096 bytes" }, // Ctrl
|
||||
// Disassembler Data
|
||||
{TEXT("Z") , CmdDisasmDataDefByte1 , CMD_DISASM_DATA , "Treat byte [range] as data" },
|
||||
{TEXT("X") , CmdDisasmDataDefCode , CMD_DISASM_CODE , "Treat byte [range] as code" },
|
||||
// TODO: Conflicts with monitor command #L -> 000DL
|
||||
{TEXT("B") , CmdDisasmDataList , CMD_DISASM_LIST , "List all byte ranges treated as data" },
|
||||
// without symbol lookup
|
||||
{TEXT("DB") , CmdDisasmDataDefByte1 , CMD_DEFINE_DATA_BYTE1, "Define byte(s)" },
|
||||
{TEXT("DB2") , CmdDisasmDataDefByte2 , CMD_DEFINE_DATA_BYTE2, "Define byte array, display 2 bytes/line" },
|
||||
{TEXT("DB4") , CmdDisasmDataDefByte4 , CMD_DEFINE_DATA_BYTE4, "Define byte array, display 4 bytes/line" },
|
||||
{TEXT("DB8") , CmdDisasmDataDefByte8 , CMD_DEFINE_DATA_BYTE8, "Define byte array, display 8 bytes/line" },
|
||||
{TEXT("DW") , CmdDisasmDataDefWord1 , CMD_DEFINE_DATA_WORD1, "Define address array" },
|
||||
{TEXT("DW2") , CmdDisasmDataDefWord2 , CMD_DEFINE_DATA_WORD2, "Define address array, display 2 words/line" },
|
||||
{TEXT("DW4") , CmdDisasmDataDefWord4 , CMD_DEFINE_DATA_WORD4, "Define address array, display 4 words/line" },
|
||||
{TEXT("DS") , CmdDisasmDataDefString , CMD_DEFINE_DATA_STR , "Define string" },
|
||||
// {TEXT("DF") , CmdDisasmDataDefFloat , CMD_DEFINE_DATA_FLOAT, "Define AppleSoft (packed) Float" },
|
||||
// {TEXT("DFX") , CmdDisasmDataDefFloatUnpack , CMD_DEFINE_DATA_FLOAT2,"Define AppleSoft (unpacked) Float" },
|
||||
// with symbol lookup
|
||||
// {TEXT("DA<>") , CmdDisasmDataDefAddress8HL , CMD_DEFINE_ADDR_8_HL , "Define split array of addresses, high byte section followed by low byte section" },
|
||||
// {TEXT("DA><") , CmdDisasmDataDefAddress8LH , CMD_DEFINE_ADDR_8_LH , "Define split array of addresses, low byte section followed by high byte section" },
|
||||
// {TEXT("DA<") , CmdDisasmDataDefAddress8H , CMD_DEFINE_ADDR_BYTE_H , "Define array of high byte addresses" },
|
||||
// {TEXT("DB>") , CmdDisasmDataDefAddress8L , CMD_DEFINE_ADDR_BYTE_L , "Define array of low byte addresses" }
|
||||
{TEXT(".DA") , CmdDisasmDataDefAddress16 , CMD_DEFINE_ADDR_WORD , "Define array of word addresses" },
|
||||
// TODO: Rename config cmd: DISASM
|
||||
// {TEXT("UA") , CmdDisasmDataSmart , CMD_SMART_DISASSEMBLE, "Analyze opcodes to determine if code or data" },
|
||||
// Disk
|
||||
{TEXT("DISK") , CmdDisk , CMD_DISK , "Access Disk Drive Functions" },
|
||||
// Flags
|
||||
// {TEXT("FC") , CmdFlag , CMD_FLAG_CLEAR , "Clear specified Flag" }, // NVRBDIZC see AW_CPU.cpp AF_*
|
||||
// TODO: Conflicts with monitor command #L -> 000CL
|
||||
{TEXT("CL") , CmdFlag , CMD_FLAG_CLEAR , "Clear specified Flag" }, // NVRBDIZC see AW_CPU.cpp AF_*
|
||||
|
||||
{TEXT("CLC") , CmdFlagClear , CMD_FLAG_CLR_C , "Clear Flag Carry" }, // 0 // Legacy
|
||||
@ -249,11 +254,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
// Memory
|
||||
{TEXT("MC") , CmdMemoryCompare , CMD_MEMORY_COMPARE },
|
||||
|
||||
{TEXT("D") , CmdMemoryMiniDumpHex , CMD_MEM_MINI_DUMP_HEX_1 , "Hex dump in the mini memory area 1" }, // FIXME: Must also work in DATA screen
|
||||
{TEXT("MD1") , CmdMemoryMiniDumpHex , CMD_MEM_MINI_DUMP_HEX_1 , "Hex dump in the mini memory area 1" },
|
||||
{TEXT("MD2") , CmdMemoryMiniDumpHex , CMD_MEM_MINI_DUMP_HEX_2 , "Hex dump in the mini memory area 2" },
|
||||
{TEXT("M1") , CmdMemoryMiniDumpHex , CMD_MEM_MINI_DUMP_HEX_1 }, // alias
|
||||
{TEXT("M2") , CmdMemoryMiniDumpHex , CMD_MEM_MINI_DUMP_HEX_2 }, // alias
|
||||
|
||||
{TEXT("MA1") , CmdMemoryMiniDumpAscii,CMD_MEM_MINI_DUMP_ASCII_1, "ASCII text in mini memory area 1" },
|
||||
{TEXT("MA2") , CmdMemoryMiniDumpAscii,CMD_MEM_MINI_DUMP_ASCII_2, "ASCII text in mini memory area 2" },
|
||||
@ -312,8 +314,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
{TEXT("TEXT1") , CmdViewOutput_Text41 , CMD_VIEW_TEXT41, "View Text screen Page 1" },
|
||||
{TEXT("TEXT2") , CmdViewOutput_Text42 , CMD_VIEW_TEXT42, "View Text screen Page 2" },
|
||||
{TEXT("TEXT80") , CmdViewOutput_Text8X , CMD_VIEW_TEXT8X, "View 80-col Text screen (current page)" },
|
||||
{TEXT("TEXT81") , CmdViewOutput_Text81 , CMD_VIEW_TEXT8X, "View 80-col Text screen Page 1" },
|
||||
{TEXT("TEXT82") , CmdViewOutput_Text82 , CMD_VIEW_TEXT8X, "View 80-col Text screen Page 2" },
|
||||
{TEXT("TEXT81") , CmdViewOutput_Text81 , CMD_VIEW_TEXT81, "View 80-col Text screen Page 1" },
|
||||
{TEXT("TEXT82") , CmdViewOutput_Text82 , CMD_VIEW_TEXT82, "View 80-col Text screen Page 2" },
|
||||
{TEXT("GR") , CmdViewOutput_GRX , CMD_VIEW_GRX , "View Lo-Res screen (current page)" },
|
||||
{TEXT("GR1") , CmdViewOutput_GR1 , CMD_VIEW_GR1 , "View Lo-Res screen Page 1" },
|
||||
{TEXT("GR2") , CmdViewOutput_GR2 , CMD_VIEW_GR2 , "View Lo-Res screen Page 2" },
|
||||
@ -327,7 +329,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
{TEXT("DHGR1") , CmdViewOutput_DHGR1 , CMD_VIEW_DHGR1 , "View Double Hi-res Page 1" },
|
||||
{TEXT("DHGR2") , CmdViewOutput_DHGR2 , CMD_VIEW_DHGR2 , "View Double Hi-res Page 2" },
|
||||
// Watch
|
||||
{TEXT("W") , CmdWatch , CMD_WATCH_ADD , "Alias for WA (Watch Add)" },
|
||||
{TEXT("W") , CmdWatch , CMD_WATCH , "Alias for WA (Watch Add)" },
|
||||
{TEXT("WA") , CmdWatchAdd , CMD_WATCH_ADD , "Add/Update address or symbol to watch" },
|
||||
{TEXT("WC") , CmdWatchClear , CMD_WATCH_CLEAR , "Clear (remove) watch" },
|
||||
{TEXT("WD") , CmdWatchDisable , CMD_WATCH_DISABLE , "Disable specific watch - it is still in the list, just not active" },
|
||||
@ -337,14 +339,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
{TEXT("WSAVE") , CmdWatchSave , CMD_WATCH_SAVE , "Save Watches" }, // due to symbol look-up
|
||||
// Window
|
||||
{TEXT("WIN") , CmdWindow , CMD_WINDOW , "Show specified debugger window" },
|
||||
// TODO: need to rename with data disassembly
|
||||
// CODE 0, CODE 1, CODE 2 ... ???
|
||||
{TEXT("CODE") , CmdWindowViewCode , CMD_WINDOW_CODE , "Switch to full code window" }, // Can't use WC = WatchClear
|
||||
{TEXT("CODE1") , CmdWindowShowCode1 , CMD_WINDOW_CODE_1 , "Show code on top split window" },
|
||||
{TEXT("CODE2") , CmdWindowShowCode2 , CMD_WINDOW_CODE_2 , "Show code on bottom split window" },
|
||||
{TEXT("CONSOLE") , CmdWindowViewConsole , CMD_WINDOW_CONSOLE , "Switch to full console window" },
|
||||
// TODO: need to rename with data disassembly
|
||||
{TEXT("DATA") , CmdWindowViewData , CMD_WINDOW_DATA , "Switch to full data window" },
|
||||
{TEXT("DATA1") , CmdWindowShowCode1 , CMD_WINDOW_CODE_1 , "Show data on top split window" },
|
||||
{TEXT("DATA1") , CmdWindowShowData1 , CMD_WINDOW_DATA_1 , "Show data on top split window" },
|
||||
{TEXT("DATA2") , CmdWindowShowData2 , CMD_WINDOW_DATA_2 , "Show data on bottom split window" },
|
||||
{TEXT("SOURCE1") , CmdWindowShowSource1 , CMD_WINDOW_SOURCE_1, "Show source on top split screen" },
|
||||
{TEXT("SOURCE2") , CmdWindowShowSource2 , CMD_WINDOW_SOURCE_2, "Show source on bottom split screen" },
|
||||
@ -402,6 +403,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
{TEXT("SR") , CmdFlagSet , CMD_FLAG_SET_R , "Clear Flag Reserved" }, // 5
|
||||
{TEXT("SV") , CmdFlagSet , CMD_FLAG_SET_V , "Clear Flag Overflow" }, // 6
|
||||
{TEXT("SN") , CmdFlagSet , CMD_FLAG_SET_N , "Clear Flag Negative" }, // 7
|
||||
// Memory
|
||||
{TEXT("D") , CmdMemoryMiniDumpHex , CMD_MEM_MINI_DUMP_HEX_1 , "Hex dump in the mini memory area 1" }, // FIXME: Must also work in DATA screen
|
||||
{TEXT("M1") , CmdMemoryMiniDumpHex , CMD_MEM_MINI_DUMP_HEX_1 }, // alias
|
||||
{TEXT("M2") , CmdMemoryMiniDumpHex , CMD_MEM_MINI_DUMP_HEX_2 }, // alias
|
||||
|
||||
{TEXT("ME8") , CmdMemoryEnterByte , CMD_MEMORY_ENTER_BYTE }, // changed from EB -- bugfix: EB:## ##
|
||||
{TEXT("ME16") , CmdMemoryEnterWord , CMD_MEMORY_ENTER_WORD },
|
||||
@ -448,112 +453,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
const int NUM_COMMANDS_WITH_ALIASES = sizeof(g_aCommands) / sizeof (Command_t); // Determined at compile-time ;-)
|
||||
|
||||
|
||||
// Color ______________________________________________________________________
|
||||
|
||||
int g_iColorScheme = SCHEME_COLOR;
|
||||
|
||||
// Used when the colors are reset
|
||||
COLORREF gaColorPalette[ NUM_PALETTE ] =
|
||||
{
|
||||
RGB(0,0,0),
|
||||
// NOTE: See _SetupColorRamp() if you want to programmitically set/change
|
||||
RGB(255, 0, 0), RGB(223, 0, 0), RGB(191, 0, 0), RGB(159, 0, 0), RGB(127, 0, 0), RGB( 95, 0, 0), RGB( 63, 0, 0), RGB( 31, 0, 0), // 001 // Red
|
||||
RGB( 0,255, 0), RGB( 0,223, 0), RGB( 0,191, 0), RGB( 0,159, 0), RGB( 0,127, 0), RGB( 0, 95, 0), RGB( 0, 63, 0), RGB( 0, 31, 0), // 010 // Green
|
||||
RGB(255,255, 0), RGB(223,223, 0), RGB(191,191, 0), RGB(159,159, 0), RGB(127,127, 0), RGB( 95, 95, 0), RGB( 63, 63, 0), RGB( 31, 31, 0), // 011 // Yellow
|
||||
RGB( 0, 0,255), RGB( 0, 0,223), RGB( 0, 0,191), RGB( 0, 0,159), RGB( 0, 0,127), RGB( 0, 0, 95), RGB( 0, 0, 63), RGB( 0, 0, 31), // 100 // Blue
|
||||
RGB(255, 0,255), RGB(223, 0,223), RGB(191, 0,191), RGB(159, 0,159), RGB(127, 0,127), RGB( 95, 0, 95), RGB( 63, 0, 63), RGB( 31, 0, 31), // 101 // Magenta
|
||||
RGB( 0,255,255), RGB( 0,223,223), RGB( 0,191,191), RGB( 0,159,159), RGB( 0,127,127), RGB( 0, 95, 95), RGB( 0, 63, 63), RGB( 0, 31, 31), // 110 // Cyan
|
||||
RGB(255,255,255), RGB(223,223,223), RGB(191,191,191), RGB(159,159,159), RGB(127,127,127), RGB( 95, 95, 95), RGB( 63, 63, 63), RGB( 31, 31, 31), // 111 // White/Gray
|
||||
|
||||
// Custom Colors
|
||||
RGB( 80,192,255), // Light Sky Blue // Used for console FG
|
||||
RGB( 0,128,192), // Darker Sky Blue
|
||||
RGB( 0, 64,128), // Deep Sky Blue
|
||||
RGB(255,128, 0), // Orange (Full)
|
||||
RGB(128, 64, 0), // Orange (Half)
|
||||
RGB( 0, 0, 0),
|
||||
RGB( 0, 0, 0),
|
||||
RGB( 0, 0, 0),
|
||||
|
||||
RGB( 0, 0, 0),
|
||||
RGB( 0, 0, 0),
|
||||
RGB( 0, 0, 0),
|
||||
RGB( 0, 0, 0),
|
||||
RGB( 0, 0, 0),
|
||||
RGB( 0, 0, 0),
|
||||
RGB( 0, 0, 0),
|
||||
RGB( 0, 0, 0),
|
||||
};
|
||||
|
||||
// Index into Palette
|
||||
int g_aColorIndex[ NUM_DEBUG_COLORS ] =
|
||||
{
|
||||
K0, W8, // BG_CONSOLE_OUTPUT FG_CONSOLE_OUTPUT (W8)
|
||||
|
||||
B1, COLOR_CUSTOM_01, // BG_CONSOLE_INPUT FG_CONSOLE_INPUT (W8)
|
||||
|
||||
B2, B3, // BG_DISASM_1 BG_DISASM_2
|
||||
|
||||
R8, W8, // BG_DISASM_BP_S_C FG_DISASM_BP_S_C
|
||||
R6, W5, // BG_DISASM_BP_0_C FG_DISASM_BP_0_C
|
||||
|
||||
R7, // FG_DISASM_BP_S_X // Y8 lookes better on Info Cyan // R6
|
||||
W5, // FG_DISASM_BP_0_X
|
||||
|
||||
W8, K0, // BG_DISASM_C FG_DISASM_C // B8 -> K0
|
||||
Y8, K0, // BG_DISASM_PC_C FG_DISASM_PC_C // K8 -> K0
|
||||
Y4, W8, // BG_DISASM_PC_X FG_DISASM_PC_X
|
||||
|
||||
C4, // BG_DISASM_BOOKMARK
|
||||
W8, // FG_DISASM_BOOKMARK
|
||||
|
||||
W8, // FG_DISASM_ADDRESS
|
||||
G192, // FG_DISASM_OPERATOR
|
||||
Y8, // FG_DISASM_OPCODE
|
||||
W8, // FG_DISASM_MNEMONIC
|
||||
COLOR_CUSTOM_04, // FG_DISASM_TARGET (or W8)
|
||||
G8, // FG_DISASM_SYMBOL
|
||||
C8, // FG_DISASM_CHAR
|
||||
G8, // FG_DISASM_BRANCH
|
||||
|
||||
C3, // BG_INFO (C4, C2 too dark)
|
||||
W8, // FG_INFO_TITLE (or W8)
|
||||
Y7, // FG_INFO_BULLET (W8)
|
||||
G192, // FG_INFO_OPERATOR
|
||||
COLOR_CUSTOM_04, // FG_INFO_ADDRESS (was Y8)
|
||||
Y8, // FG_INFO_OPCODE
|
||||
COLOR_CUSTOM_01, // FG_INFO_REG (was orange)
|
||||
|
||||
W8, // BG_INFO_INVERSE
|
||||
C3, // FG_INFO_INVERSE
|
||||
C5, // BG_INFO_CHAR
|
||||
W8, // FG_INFO_CHAR_HI
|
||||
Y8, // FG_INFO_CHAR_LO
|
||||
|
||||
COLOR_CUSTOM_04, // BG_INFO_IO_BYTE
|
||||
COLOR_CUSTOM_04, // FG_INFO_IO_BYTE
|
||||
|
||||
C2, // BG_DATA_1
|
||||
C3, // BG_DATA_2
|
||||
Y8, // FG_DATA_BYTE
|
||||
W8, // FG_DATA_TEXT
|
||||
|
||||
G4, // BG_SYMBOLS_1
|
||||
G3, // BG_SYMBOLS_2
|
||||
W8, // FG_SYMBOLS_ADDRESS
|
||||
M8, // FG_SYMBOLS_NAME
|
||||
|
||||
K0, // BG_SOURCE_TITLE
|
||||
W8, // FG_SOURCE_TITLE
|
||||
W2, // BG_SOURCE_1 // C2 W2 for "Paper Look"
|
||||
W3, // BG_SOURCE_2
|
||||
W8 // FG_SOURCE
|
||||
};
|
||||
|
||||
COLORREF g_aColors[ NUM_COLOR_SCHEMES ][ NUM_DEBUG_COLORS ];
|
||||
|
||||
COLORREF DebuggerGetColor ( int iColor );
|
||||
|
||||
|
||||
// Cursor (Console Input) _____________________________________________________
|
||||
|
||||
@ -885,7 +784,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
void ConfigSave_PrepareHeader ( const Parameters_e eCategory, const Commands_e eCommandClear );
|
||||
|
||||
// Drawing
|
||||
static bool DebuggerSetColor ( const int iScheme, const int iColor, const COLORREF nColor );
|
||||
static void _CmdColorGet ( const int iScheme, const int iColor );
|
||||
|
||||
// Font
|
||||
@ -2685,39 +2583,6 @@ void _CmdColorGet( const int iScheme, const int iColor )
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
inline COLORREF DebuggerGetColor( int iColor )
|
||||
{
|
||||
COLORREF nColor = RGB(0,255,255); // 0xFFFF00; // Hot Pink! -- so we notice errors. Not that there is anything wrong with pink...
|
||||
|
||||
if ((g_iColorScheme < NUM_COLOR_SCHEMES) && (iColor < NUM_DEBUG_COLORS))
|
||||
{
|
||||
nColor = g_aColors[ g_iColorScheme ][ iColor ];
|
||||
}
|
||||
|
||||
return nColor;
|
||||
}
|
||||
|
||||
|
||||
bool DebuggerSetColor( const int iScheme, const int iColor, const COLORREF nColor )
|
||||
{
|
||||
bool bStatus = false;
|
||||
if ((g_iColorScheme < NUM_COLOR_SCHEMES) && (iColor < NUM_DEBUG_COLORS))
|
||||
{
|
||||
g_aColors[ iScheme ][ iColor ] = nColor;
|
||||
bStatus = true;
|
||||
}
|
||||
|
||||
// Propogate to console since it has its own copy of colors
|
||||
if (iColor == FG_CONSOLE_OUTPUT)
|
||||
{
|
||||
COLORREF nConsole = DebuggerGetColor( FG_CONSOLE_OUTPUT );
|
||||
g_anConsoleColor[ CONSOLE_COLOR_x ] = nConsole;
|
||||
}
|
||||
|
||||
return bStatus;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
Update_t CmdConfigColorMono (int nArgs)
|
||||
{
|
||||
@ -2934,8 +2799,8 @@ Update_t CmdConfigSave (int nArgs)
|
||||
nLen = sizeof( nVersion );
|
||||
WriteFile( hFile, pSrc, nLen, &nPut, NULL );
|
||||
|
||||
pSrc = (void *) & gaColorPalette;
|
||||
nLen = sizeof( gaColorPalette );
|
||||
pSrc = (void *) & g_aColorPalette;
|
||||
nLen = sizeof( g_aColorPalette );
|
||||
WriteFile( hFile, pSrc, nLen, &nPut, NULL );
|
||||
|
||||
pSrc = (void *) & g_aColorIndex;
|
||||
@ -7904,7 +7769,7 @@ void _SetupColorRamp( const int iPrimary, int & iColor_ )
|
||||
int nG = bG ? nC : 0;
|
||||
int nB = bB ? nC : 0;
|
||||
DWORD nColor = RGB(nR,nG,nB);
|
||||
gaColorPalette[ iColor_ ] = nColor;
|
||||
g_aColorPalette[ iColor_ ] = nColor;
|
||||
#if DEBUG_COLOR_RAMP
|
||||
wsprintf( sText, TEXT("RGB(%3d,%3d,%3d), "), nR, nG, nB );
|
||||
_tcscat( sRamp, sText );
|
||||
@ -7946,7 +7811,7 @@ void _ConfigColorsReset( BYTE *pPalDst )
|
||||
int iColor;
|
||||
for (iColor = 0; iColor < NUM_DEBUG_COLORS; iColor++ )
|
||||
{
|
||||
COLORREF nColor = gaColorPalette[ g_aColorIndex[ iColor ] ];
|
||||
COLORREF nColor = g_aColorPalette[ g_aColorIndex[ iColor ] ];
|
||||
|
||||
int R = (nColor >> 0) & 0xFF;
|
||||
int G = (nColor >> 8) & 0xFF;
|
||||
@ -8140,7 +8005,7 @@ void DebugInitialize ()
|
||||
int iColor;
|
||||
|
||||
iColor = FG_CONSOLE_OUTPUT;
|
||||
COLORREF nColor = gaColorPalette[ g_aColorIndex[ iColor ] ];
|
||||
COLORREF nColor = g_aColorPalette[ g_aColorIndex[ iColor ] ];
|
||||
g_anConsoleColor[ CONSOLE_COLOR_x ] = nColor;
|
||||
|
||||
/*
|
||||
@ -8191,6 +8056,16 @@ void DebugInitialize ()
|
||||
// ConsoleInputReset(); already called in DebugInitialize()
|
||||
TCHAR sText[ CONSOLE_WIDTH ];
|
||||
|
||||
for (int iCmd = 0; iCmd < NUM_COMMANDS; iCmd++ )
|
||||
{
|
||||
if ( g_aCommands[ iCmd ].iCommand != iCmd)
|
||||
{
|
||||
wsprintf( sText, "*** ERROR *** Enumarted Commands mis-matched!" );
|
||||
MessageBox( g_hFrameWindow, sText, TEXT("ERROR"), MB_OK );
|
||||
PostQuitMessage( 1 );
|
||||
}
|
||||
}
|
||||
|
||||
if (_tcscmp( g_aCommands[ NUM_COMMANDS ].m_sName, TEXT(__COMMANDS_VERIFY_TXT__)))
|
||||
{
|
||||
wsprintf( sText, "*** ERROR *** Commands mis-matched!" );
|
||||
|
@ -149,9 +149,6 @@ using namespace std;
|
||||
}
|
||||
}
|
||||
|
||||
// Color
|
||||
inline COLORREF DebuggerGetColor( int iColor );
|
||||
|
||||
// Source Level Debugging
|
||||
int FindSourceLine( WORD nAddress );
|
||||
LPCTSTR FormatAddress( WORD nAddress, int nBytes );
|
||||
|
@ -293,16 +293,12 @@ Fx BEQ r SBC (d),Y sbc (d) --- --- SBC d,X INC d,X --- SED SBC a,Y
|
||||
|
||||
// Private __________________________________________________________________
|
||||
|
||||
|
||||
// enum Nopcode_t
|
||||
// {
|
||||
// NOPCODE_NONE, // line.iOpcode is valid: [0,0xFF]
|
||||
|
||||
// Acme
|
||||
// NOTE: Keep in sync AsmDirectives_e g_aAssemblerDirectives !
|
||||
AssemblerDirective_t g_aAssemblerDirectives[ NUM_ASM_DIRECTIVES ] =
|
||||
{
|
||||
// NULL n/a
|
||||
{""},
|
||||
// Origin, Target Address, EndProg, Equate, Data, AsciiString,HexString
|
||||
// Acme
|
||||
{"???"},
|
||||
// Big Mac
|
||||
@ -315,7 +311,7 @@ Fx BEQ r SBC (d),Y sbc (d) --- --- SBC d,X INC d,X --- SED SBC a,Y
|
||||
{"ASC"}, // ASC "postive" 'negative'
|
||||
{"DDB"}, // Define Double Byte (Define WORD)
|
||||
{"DFB"}, // DeFine Byte
|
||||
{"DS" }, // Defin Storage
|
||||
{"DS" }, // Define Storage
|
||||
{"HEX"}, // HEX ###### or HEX ##,##,...
|
||||
{"ORG"}, // Origin
|
||||
// MicroSparc
|
||||
@ -334,6 +330,38 @@ Fx BEQ r SBC (d),Y sbc (d) --- --- SBC d,X INC d,X --- SED SBC a,Y
|
||||
{"???"},
|
||||
// Weller
|
||||
{"???"},
|
||||
// User-Defined
|
||||
// NOTE: Keep in sync AsmCustomDirective_e g_aAssemblerDirectives !
|
||||
{"db" }, // ASM_DEFINE_BYTE
|
||||
{"dw" }, // ASM_DEFINE_WORD
|
||||
{"da" }, // ASM_DEFINE_ADDRESS_16
|
||||
// d memory Dump
|
||||
// da Memory Ascii, Define Address
|
||||
// ds S = Ascii (Low),
|
||||
// dt T = Apple (High)
|
||||
// dm M = Mixed (Low,High=EndofString)
|
||||
{"ds" }, // ASM_DEFINE_ASCII_TEXT
|
||||
{"dt" }, // ASM_DEFINE_APPLE_TEXT
|
||||
{"dm" }, // ASM_DEFINE_TEXT_HI_LO
|
||||
|
||||
{"df" }, // ASM_DEFINE_FLOAT
|
||||
{"dfx"}, // ASM_DEFINE_FLOAT_X
|
||||
};
|
||||
|
||||
int g_iAssemblerSyntax = ASM_CUSTOM; // Which assembler syntax to use
|
||||
int g_aAssemblerFirstDirective[ NUM_ASSEMBLERS ] =
|
||||
{
|
||||
FIRST_A_DIRECTIVE,
|
||||
FIRST_B_DIRECTIVE,
|
||||
FIRST_D_DIRECTIVE,
|
||||
FIRST_L_DIRECTIVE,
|
||||
FIRST_M_DIRECTIVE,
|
||||
FIRST_u_DIRECTIVE,
|
||||
FIRST_O_DIRECTIVE,
|
||||
FIRST_S_DIRECTIVE,
|
||||
FIRST_T_DIRECTIVE,
|
||||
FIRST_W_DIRECTIVE,
|
||||
FIRST_Z_DIRECTIVE
|
||||
};
|
||||
|
||||
// Assemblers
|
||||
@ -386,6 +414,10 @@ Fx BEQ r SBC (d),Y sbc (d) --- --- SBC d,X INC d,X --- SED SBC a,Y
|
||||
WORD m_nAsmTargetAddress = 0;
|
||||
WORD m_nAsmTargetValue = 0;
|
||||
|
||||
// Private
|
||||
void AssemblerHashOpcodes ();
|
||||
void AssemblerHashDirectives ();
|
||||
|
||||
// Implementation ___________________________________________________________
|
||||
|
||||
|
||||
@ -773,9 +805,8 @@ static char sText[ 128 ];
|
||||
ConsoleUpdate();
|
||||
}
|
||||
|
||||
// TODO: Change .. AssemblerHashDirectives()
|
||||
//===========================================================================
|
||||
void AssemblerHashMerlinDirectives ()
|
||||
void AssemblerHashDirectives ()
|
||||
{
|
||||
Hash_t nMnemonicHash;
|
||||
int iOpcode;
|
||||
@ -794,7 +825,7 @@ void AssemblerHashMerlinDirectives ()
|
||||
void AssemblerStartup()
|
||||
{
|
||||
AssemblerHashOpcodes();
|
||||
AssemblerHashMerlinDirectives();
|
||||
AssemblerHashDirectives();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -6,11 +6,27 @@
|
||||
// Assemblers
|
||||
// A = Acme
|
||||
// B = Big Mac S= S-C Macro Assembler
|
||||
// K = DOS Tool Kit T = TED II
|
||||
// D = DOS Tool Kit T = TED II
|
||||
// L = Lisa W = Weller's Assembler
|
||||
// M = Merlin
|
||||
// u = MicroSparc
|
||||
// O = ORCA/M
|
||||
enum Assemblers_e
|
||||
{
|
||||
ASM_ACME
|
||||
, ASM_BIG_MAC
|
||||
, ASM_DOS_TOOL_KIT
|
||||
, ASM_LISA
|
||||
, ASM_MERLIN
|
||||
, ASM_MICROSPARC
|
||||
, ASM_ORCA
|
||||
, ASM_SC
|
||||
, ASM_TED
|
||||
, ASM_WELLERS
|
||||
, ASM_CUSTOM
|
||||
,NUM_ASSEMBLERS
|
||||
};
|
||||
|
||||
enum AsmAcmeDirective_e
|
||||
{
|
||||
ASM_A_DEFINE_BYTE
|
||||
@ -25,8 +41,8 @@
|
||||
|
||||
enum AsmDosToolKitDirective_e
|
||||
{
|
||||
ASM_K_DEFINE_BYTE
|
||||
,NUM_ASM_K_DIRECTIVES
|
||||
ASM_D_DEFINE_BYTE
|
||||
,NUM_ASM_D_DIRECTIVES
|
||||
};
|
||||
|
||||
enum AsmLisaDirective_e
|
||||
@ -84,25 +100,42 @@
|
||||
,NUM_ASM_W_DIRECTIVES
|
||||
};
|
||||
|
||||
// NOTE: Must keep in sync: AsmDirectives_e g_aAssemblerDirectives
|
||||
enum AsmCustomDirective_e
|
||||
{
|
||||
ASM_DEFINE_BYTE
|
||||
,ASM_DEFINE_WORD
|
||||
// ,ASM_DEFINE_ADDRESS_8
|
||||
,ASM_DEFINE_ADDRESS_16
|
||||
// String/Text/Ascii
|
||||
,ASM_DEFINE_ASCII_TEXT
|
||||
,ASM_DEFINE_APPLE_TEXT
|
||||
,ASM_DEFINE_TEXT_HI_LO // i.e. Applesoft Basic Tokens
|
||||
// FAC
|
||||
,ASM_DEFINE_FLOAT // Applesoft float
|
||||
,ASM_DEFINE_FLOAT_X // Applesoft float unpacked/expanded
|
||||
,NUM_ASM_Z_DIRECTIVES
|
||||
};
|
||||
|
||||
// NOTE: Keep in sync AsmDirectives_e g_aAssemblerDirectives !
|
||||
enum AsmDirectives_e
|
||||
{
|
||||
FIRST_A_DIRECTIVE = 1,
|
||||
FIRST_B_DIRECTIVE = FIRST_A_DIRECTIVE + NUM_ASM_A_DIRECTIVES, // Acme
|
||||
FIRST_K_DIRECTIVE = FIRST_B_DIRECTIVE + NUM_ASM_B_DIRECTIVES, // Big Mac
|
||||
FIRST_L_DIRECTIVE = FIRST_K_DIRECTIVE + NUM_ASM_K_DIRECTIVES, // DOS Tool Kit
|
||||
FIRST_D_DIRECTIVE = FIRST_B_DIRECTIVE + NUM_ASM_B_DIRECTIVES, // Big Mac
|
||||
FIRST_L_DIRECTIVE = FIRST_D_DIRECTIVE + NUM_ASM_D_DIRECTIVES, // DOS Tool Kit
|
||||
FIRST_M_DIRECTIVE = FIRST_L_DIRECTIVE + NUM_ASM_L_DIRECTIVES, // Lisa
|
||||
FIRST_u_DIRECTIVE = FIRST_M_DIRECTIVE + NUM_ASM_M_DIRECTIVES, // Merlin
|
||||
FIRST_O_DIRECTIVE = FIRST_u_DIRECTIVE + NUM_ASM_u_DIRECTIVES, // MicroSparc
|
||||
FIRST_S_DIRECTIVE = FIRST_O_DIRECTIVE + NUM_ASM_O_DIRECTIVES, // Orca
|
||||
FIRST_T_DIRECTIVE = FIRST_S_DIRECTIVE + NUM_ASM_S_DIRECTIVES, // SC
|
||||
FIRST_W_DIRECTIVE = FIRST_T_DIRECTIVE + NUM_ASM_T_DIRECTIVES, // Ted
|
||||
NUM_ASM_DIRECTIVES= FIRST_W_DIRECTIVE + NUM_ASM_W_DIRECTIVES, // Ted
|
||||
FIRST_Z_DIRECTIVE = FIRST_W_DIRECTIVE + NUM_ASM_W_DIRECTIVES, // Weller
|
||||
NUM_ASM_DIRECTIVES = FIRST_Z_DIRECTIVE + NUM_ASM_Z_DIRECTIVES // Custom
|
||||
|
||||
// NUM_ASM_DIRECTIVES = 1 + // Opcode ... rest are psuedo opcodes
|
||||
// NUM_ASM_A_DIRECTIVES + // Acme
|
||||
// NUM_ASM_B_DIRECTIVES + // Big Mac
|
||||
// NUM_ASM_K_DIRECTIVES + // DOS Tool Kit
|
||||
// NUM_ASM_D_DIRECTIVES + // DOS Tool Kit
|
||||
// NUM_ASM_L_DIRECTIVES + // Lisa
|
||||
// NUM_ASM_M_DIRECTIVES + // Merlin
|
||||
// NUM_ASM_u_DIRECTIVES + // MicroSparc
|
||||
@ -112,6 +145,9 @@
|
||||
// NUM_ASM_W_DIRECTIVES // Weller
|
||||
};
|
||||
|
||||
extern int g_iAssemblerSyntax;
|
||||
extern int g_aAssemblerFirstDirective[ NUM_ASSEMBLERS ];
|
||||
|
||||
// Addressing _____________________________________________________________________________________
|
||||
|
||||
extern AddressingMode_t g_aOpmodes[ NUM_ADDRESSING_MODES ];
|
||||
@ -165,8 +201,6 @@
|
||||
bool _6502_IsOpcodeValid( int nOpcode );
|
||||
|
||||
int AssemblerHashMnemonic ( const TCHAR * pMnemonic );
|
||||
void AssemblerHashOpcodes ();
|
||||
void AssemblerHashMerlinDirectives ();
|
||||
// bool AssemblerGetAddressingMode ( int iArg, int nArgs, WORD nAddress, vector<int> & vOpcodes );
|
||||
void _CmdAssembleHashDump ();
|
||||
|
||||
|
@ -21,6 +21,8 @@ WORD _CmdDefineByteRange(int nArgs,int iArg,DisasmData_t & tData_)
|
||||
WORD nEnd = 0;
|
||||
int nLen = 0;
|
||||
|
||||
memset( (void*) &tData_, 0, sizeof(tData_) );
|
||||
|
||||
if( nArgs < 2 )
|
||||
{
|
||||
nAddress = g_nDisasmCurAddress;
|
||||
@ -47,7 +49,7 @@ WORD _CmdDefineByteRange(int nArgs,int iArg,DisasmData_t & tData_)
|
||||
|
||||
tData_.nStartAddress = nAddress;
|
||||
tData_.nEndAddress = nAddress + nLen;
|
||||
|
||||
// tData_.nArraySize = 0;
|
||||
char *pSymbolName = "";
|
||||
if( nArgs )
|
||||
{
|
||||
@ -91,9 +93,9 @@ Update_t CmdDisasmDataDefCode (int nArgs)
|
||||
DisasmData_t *pData = Disassembly_IsDataAddress( nAddress );
|
||||
if( pData )
|
||||
{
|
||||
// Need to split the data
|
||||
// *pData = tData;
|
||||
Disassembly_AddData( tData );
|
||||
// TODO: Do we need to split the data !?
|
||||
//Disassembly_DelData( tData );
|
||||
pData->iDirective = _NOP_REMOVED;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -134,9 +136,10 @@ Update_t _CmdDisasmDataDefByteX (int nArgs)
|
||||
// DB
|
||||
// DB symbol
|
||||
// DB symbol address
|
||||
// symbol range:range
|
||||
// DB symbol range:range
|
||||
int iCmd = NOP_BYTE_1 - g_aArgs[0].nValue;
|
||||
|
||||
// if ((!nArgs) || (nArgs > 2))
|
||||
if (! ((nArgs <= 2) || (nArgs == 4)))
|
||||
{
|
||||
return Help_Arg_1( CMD_DEFINE_DATA_BYTE1 + iCmd );
|
||||
@ -146,7 +149,10 @@ Update_t _CmdDisasmDataDefByteX (int nArgs)
|
||||
int iArg = 2;
|
||||
WORD nAddress = _CmdDefineByteRange( nArgs, iArg, tData );
|
||||
|
||||
tData.iDirective = FIRST_M_DIRECTIVE + ASM_M_DEFINE_BYTE;
|
||||
// TODO: Allow user to select which assembler to use for displaying directives!
|
||||
// tData.iDirective = FIRST_M_DIRECTIVE + ASM_M_DEFINE_BYTE;
|
||||
tData.iDirective = g_aAssemblerFirstDirective[ g_iAssemblerSyntax ] + ASM_DEFINE_BYTE;
|
||||
|
||||
tData.eElementType = NOP_BYTE_1 + iCmd;
|
||||
tData.bSymbolLookup = false;
|
||||
tData.nTargetAddress = 0;
|
||||
@ -169,7 +175,7 @@ Update_t _CmdDisasmDataDefWordX (int nArgs)
|
||||
// DW
|
||||
// DW symbol
|
||||
// DW symbol address
|
||||
// symbol range:range
|
||||
// DW symbol range:range
|
||||
int iCmd = NOP_WORD_1 - g_aArgs[0].nValue;
|
||||
|
||||
if (! ((nArgs <= 2) || (nArgs == 4)))
|
||||
@ -181,7 +187,9 @@ Update_t _CmdDisasmDataDefWordX (int nArgs)
|
||||
int iArg = 2;
|
||||
WORD nAddress = _CmdDefineByteRange( nArgs, iArg, tData );
|
||||
|
||||
tData.iDirective = FIRST_M_DIRECTIVE + ASM_M_DEFINE_WORD;
|
||||
// tData.iDirective = FIRST_M_DIRECTIVE + ASM_M_DEFINE_WORD;
|
||||
tData.iDirective = g_aAssemblerFirstDirective[ g_iAssemblerSyntax ] + ASM_DEFINE_WORD;
|
||||
|
||||
tData.eElementType = NOP_WORD_1 + iCmd;
|
||||
tData.bSymbolLookup = false;
|
||||
tData.nTargetAddress = 0;
|
||||
@ -304,9 +312,12 @@ DisasmData_t* Disassembly_IsDataAddress ( WORD nAddress )
|
||||
pData = & g_aDisassemblerData[ 0 ];
|
||||
for( int iTarget = 0; iTarget < nDataTargets; iTarget++ )
|
||||
{
|
||||
if( (nAddress >= pData->nStartAddress) && (nAddress < pData->nEndAddress) )
|
||||
if( pData->iDirective != _NOP_REMOVED )
|
||||
{
|
||||
return pData;
|
||||
if( (nAddress >= pData->nStartAddress) && (nAddress < pData->nEndAddress) )
|
||||
{
|
||||
return pData;
|
||||
}
|
||||
}
|
||||
pData++;
|
||||
}
|
||||
@ -315,6 +326,7 @@ DisasmData_t* Disassembly_IsDataAddress ( WORD nAddress )
|
||||
return pData;
|
||||
}
|
||||
|
||||
// Notes: tData.iDirective should not be _NOP_REMOVED !
|
||||
//===========================================================================
|
||||
void Disassembly_AddData( DisasmData_t tData)
|
||||
{
|
||||
@ -363,5 +375,27 @@ void Disassembly_GetData ( WORD nBaseAddress, const DisasmData_t *pData, DisasmL
|
||||
void Disassembly_DelData( DisasmData_t tData)
|
||||
{
|
||||
// g_aDisassemblerData.erase( );
|
||||
WORD nAddress = tData.nStartAddress;
|
||||
|
||||
DisasmData_t *pData = NULL; // bIsNopcode = false
|
||||
int nDataTargets = g_aDisassemblerData.size();
|
||||
|
||||
if( nDataTargets )
|
||||
{
|
||||
// TODO: Replace with binary search -- should store data in sorted order, via start address
|
||||
pData = & g_aDisassemblerData[ 0 ];
|
||||
for( int iTarget = 0; iTarget < nDataTargets; iTarget++ )
|
||||
{
|
||||
if (pData->iDirective != _NOP_REMOVED)
|
||||
{
|
||||
if ((nAddress >= pData->nStartAddress) && (nAddress < pData->nEndAddress))
|
||||
{
|
||||
pData->iDirective = _NOP_REMOVED;
|
||||
}
|
||||
}
|
||||
pData++;
|
||||
}
|
||||
pData = NULL; // bIsNopCode = false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,8 @@
|
||||
|
||||
enum NopcodeType_e
|
||||
{
|
||||
NOP_BYTE_1 // 1 bytes/line
|
||||
_NOP_REMOVED
|
||||
,NOP_BYTE_1 // 1 bytes/line
|
||||
,NOP_BYTE_2 // 2 bytes/line
|
||||
,NOP_BYTE_4 // 4 bytes/line
|
||||
,NOP_BYTE_8 // 8 bytes/line
|
||||
@ -13,10 +14,11 @@
|
||||
,NOP_ADDRESS// 1 word/line
|
||||
,NOP_HEX
|
||||
,NOP_CHAR
|
||||
,NOP_STRING_ASCII
|
||||
,NOP_STRING_APPLE
|
||||
,NOP_STRING_APPLESOFT
|
||||
,NOP_STRING_ASCII // Low Ascii
|
||||
,NOP_STRING_APPLE // High Ascii
|
||||
,NOP_STRING_APPLESOFT // Mixed Low/High
|
||||
,NOP_FAC
|
||||
,NOP_SPRITE
|
||||
,NUM_NOPCODE_TYPES
|
||||
};
|
||||
|
||||
@ -25,16 +27,19 @@
|
||||
struct DisasmData_t
|
||||
{
|
||||
char sSymbol[ MAX_SYMBOLS_LEN+1 ];
|
||||
char eElementType ; // NopcodeType_e
|
||||
WORD iDirective ; // Assembler directive -> nopcode
|
||||
WORD nStartAddress; // link to block [start,end)
|
||||
WORD nEndAddress ;
|
||||
WORD nArraySize ; // Total bytes
|
||||
// WORD nBytePerRow ; // 1, 8
|
||||
char eElementType; //
|
||||
|
||||
// with symbol lookup
|
||||
char bSymbolLookup ;
|
||||
WORD nTargetAddress;
|
||||
|
||||
WORD nSpriteW;
|
||||
WORD nSpriteH;
|
||||
};
|
||||
|
||||
Update_t _CmdDisasmDataDefByteX (int nArgs);
|
||||
|
@ -4,7 +4,7 @@ AppleWin : An Apple //e emulator for Windows
|
||||
Copyright (C) 1994-1996, Michael O'Brien
|
||||
Copyright (C) 1999-2001, Oliver Schmidt
|
||||
Copyright (C) 2002-2005, Tom Charlesworth
|
||||
Copyright (C) 2006-2007, Tom Charlesworth, Michael Pohoreski
|
||||
Copyright (C) 2006-2010, Tom Charlesworth, Michael Pohoreski
|
||||
|
||||
AppleWin is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -1035,10 +1035,10 @@ void DrawBreakpoints ( int line )
|
||||
DebuggerSetColorFG( DebuggerGetColor( iForeground ) );
|
||||
|
||||
#if DEBUG_FORCE_DISPLAY
|
||||
extern COLORREF gaColorPalette[ NUM_PALETTE ];
|
||||
|
||||
|
||||
int iColor = R8 + iBreakpoint;
|
||||
COLORREF nColor = gaColorPalette[ iColor ];
|
||||
COLORREF nColor = g_aColorPalette[ iColor ];
|
||||
if (iBreakpoint >= 8)
|
||||
{
|
||||
DebuggerSetColorBG( DebuggerGetColor( BG_DISASM_BP_S_C ) );
|
||||
@ -1071,7 +1071,7 @@ void DrawBreakpoints ( int line )
|
||||
DebuggerSetColorBG( DebuggerGetColor( iBackground ) );
|
||||
DebuggerSetColorFG( DebuggerGetColor( iForeground ) );
|
||||
#if DEBUG_FORCE_DISPLAY
|
||||
COLORREF nColor = gaColorPalette[ iColor ];
|
||||
COLORREF nColor = g_aColorPalette[ iColor ];
|
||||
if (iBreakpoint >= 8)
|
||||
{
|
||||
nColor = DebuggerGetColor( BG_INFO );
|
||||
@ -1511,7 +1511,7 @@ void FormatNopcodeBytes ( WORD nBaseAddress, DisasmLine_t & line_ )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
void FormatDisassemblyLine( const DisasmLine_t & line, char * sDisassembly, const int nBufferSize )
|
||||
{
|
||||
//> Address Seperator Opcodes Label Mnemonic Target [Immediate] [Branch]
|
||||
@ -1850,6 +1850,8 @@ WORD DrawDisassemblyLine ( int iLine, const WORD nBaseAddress )
|
||||
if( pData )
|
||||
{
|
||||
// pMnemonic = g_aAssemblerDirectives[ line.iNopcode ].sMnemonic;
|
||||
if (! bCursorLine) // Assembler Data Directive
|
||||
DebuggerSetColorFG( DebuggerGetColor( FG_DISASM_DIRECTIVE ) ); // ZZZ TODO: FIXME:
|
||||
pMnemonic = line.sMnemonic;
|
||||
}
|
||||
else
|
||||
|
@ -216,128 +216,7 @@
|
||||
|
||||
// Colors ___________________________________________________________________
|
||||
|
||||
enum Color_Schemes_e
|
||||
{
|
||||
SCHEME_COLOR, // NOTE: MUST match order in CMD_WINDOW_COLOR
|
||||
SCHEME_MONO , // NOTE: MUST match order in CMD_WINDOW_MONOCHROME
|
||||
SCHEME_BW , // NOTE: MUST match order in CMD_WINDOW_BW
|
||||
// SCHEME_CUSTOM
|
||||
NUM_COLOR_SCHEMES
|
||||
};
|
||||
|
||||
// Named, since they are easier to remember.
|
||||
// Ok, maybe RGB + CYMK is a little "too" cute. But what the hell, it works out nicely.
|
||||
enum DebugPalette_e
|
||||
{
|
||||
// mipmap level: 8 7 6 5 4 3 2 1 0
|
||||
// color depth: 256 224 192 160 128 96 64 32 0
|
||||
// +32 +32 +32 +32 +32 +32 +32 +32
|
||||
// NOTE: Levels of black are redundant.
|
||||
// // BGR
|
||||
K0, // --- K
|
||||
R8, R7, R6, R5, R4, R3, R2, R1, // --1 R Red
|
||||
G8, G7, G6, G5, G4, G3, G2, G1, // -1- G Green
|
||||
Y8, Y7, Y6, Y5, Y4, Y3, Y2, Y1, // -11 Y Yellow
|
||||
B8, B7, B6, B5, B4, B3, B2, B1, // 1-- B Blue
|
||||
M8, M7, M6, M5, M4, M3, M2, M1, // 1-1 M Magenta
|
||||
C8, C7, C6, C5, C4, C3, C2, C1, // 11- C Cyan
|
||||
W8, W7, W6, W5, W4, W3, W2, W1, // 111 W White / Gray / Black
|
||||
|
||||
COLOR_CUSTOM_01, COLOR_CUSTOM_02, COLOR_CUSTOM_03, COLOR_CUSTOM_04,
|
||||
COLOR_CUSTOM_05, COLOR_CUSTOM_06, COLOR_CUSTOM_07, COLOR_CUSTOM_08,
|
||||
COLOR_CUSTOM_09, COLOR_CUSTOM_11, CUSTOM_COLOR_11, COLOR_CUSTOM_12,
|
||||
COLOR_CUSTOM_13, COLOR_CUSTOM_14, COLOR_CUSTOM_15, COLOR_CUSTOM_16,
|
||||
|
||||
NUM_PALETTE,
|
||||
|
||||
// Gray Aliases
|
||||
G000 = K0,
|
||||
G032 = W1,
|
||||
G064 = W2,
|
||||
G096 = W3,
|
||||
G128 = W4,
|
||||
G160 = W5,
|
||||
G192 = W6,
|
||||
G224 = W7,
|
||||
G256 = W8
|
||||
};
|
||||
|
||||
// Yeah, this was a PITA to organize.
|
||||
enum DebugColors_e
|
||||
{
|
||||
BG_CONSOLE_OUTPUT // Black Window
|
||||
, FG_CONSOLE_OUTPUT // White
|
||||
, BG_CONSOLE_INPUT // Black Window
|
||||
, FG_CONSOLE_INPUT // Light Blue
|
||||
|
||||
, BG_DISASM_1 // Blue* Odd address
|
||||
, BG_DISASM_2 // Blue* Even address
|
||||
|
||||
, BG_DISASM_BP_S_C // Red Breakpoint Set (cursor)
|
||||
, FG_DISASM_BP_S_C // White Breakpoint Set&Ena (cursor)
|
||||
|
||||
// Note: redundant BG_DISASM_BP_0_C = BG_DISASM_BP_S_C
|
||||
, BG_DISASM_BP_0_C // DimRed Breakpoint Disabled (cursor)
|
||||
, FG_DISASM_BP_0_C // Gray192 Breakpoint Disabled (cursor)
|
||||
|
||||
, FG_DISASM_BP_S_X // Red Set (not cursor)
|
||||
, FG_DISASM_BP_0_X // White Disabled (not cursor)
|
||||
|
||||
, BG_DISASM_C // White (Cursor)
|
||||
, FG_DISASM_C // Blue (Cursor)
|
||||
|
||||
, BG_DISASM_PC_C // Yellow (not cursor)
|
||||
, FG_DISASM_PC_C // White (not cursor)
|
||||
|
||||
, BG_DISASM_PC_X // Dim Yellow (not cursor)
|
||||
, FG_DISASM_PC_X // White (not cursor)
|
||||
|
||||
, BG_DISASM_BOOKMARK // Lite Blue (always)
|
||||
, FG_DISASM_BOOKMARK // White addr (always)
|
||||
|
||||
, FG_DISASM_ADDRESS // White addr
|
||||
, FG_DISASM_OPERATOR // Gray192 : $ (also around instruction addressing g_nAppMode)
|
||||
, FG_DISASM_OPCODE // Yellow xx xx xx
|
||||
, FG_DISASM_MNEMONIC // White LDA
|
||||
, FG_DISASM_TARGET // Orange FAC8
|
||||
, FG_DISASM_SYMBOL // Purple HOME
|
||||
, FG_DISASM_CHAR // Cyan 'c'
|
||||
, FG_DISASM_BRANCH // Green ^ = v
|
||||
|
||||
, BG_INFO // Cyan Regs/Stack/BP/Watch/ZP
|
||||
, FG_INFO_TITLE // White Regs/Stack/BP/Watch/ZP
|
||||
, FG_INFO_BULLET // 1
|
||||
, FG_INFO_OPERATOR // Gray192 : -
|
||||
, FG_INFO_ADDRESS // Orange FA62 FA63 (Yellow -> Orange)
|
||||
, FG_INFO_OPCODE // Yellow xx
|
||||
, FG_INFO_REG // Orange (Breakpoints)
|
||||
, BG_INFO_INVERSE // White
|
||||
, FG_INFO_INVERSE // Cyan
|
||||
, BG_INFO_CHAR // mid Cyan
|
||||
, FG_INFO_CHAR_HI // White
|
||||
, FG_INFO_CHAR_LO // Yellow
|
||||
|
||||
, BG_INFO_IO_BYTE // Orange (high bit)
|
||||
, FG_INFO_IO_BYTE // Orange (non-high bit)
|
||||
|
||||
, BG_DATA_1 // Cyan* Window
|
||||
, BG_DATA_2 // Cyan*
|
||||
, FG_DATA_BYTE // default same as FG_DISASM_OPCODE
|
||||
, FG_DATA_TEXT // default same as FG_DISASM_NMEMONIC
|
||||
|
||||
, BG_SYMBOLS_1 // window
|
||||
, BG_SYMBOLS_2
|
||||
, FG_SYMBOLS_ADDRESS // default same as FG_DISASM_ADDRESS
|
||||
, FG_SYMBOLS_NAME // default same as FG_DISASM_SYMBOL
|
||||
|
||||
, BG_SOURCE_TITLE
|
||||
, FG_SOURCE_TITLE
|
||||
, BG_SOURCE_1 // odd
|
||||
, BG_SOURCE_2 // even
|
||||
, FG_SOURCE
|
||||
|
||||
, NUM_DEBUG_COLORS
|
||||
};
|
||||
#include "Debugger_Color.h"
|
||||
|
||||
// Config _________________________________________________________________________________________
|
||||
|
||||
@ -501,8 +380,8 @@
|
||||
, CMD_DEFINE_DATA_WORD2
|
||||
, CMD_DEFINE_DATA_WORD4
|
||||
, CMD_DEFINE_DATA_STR
|
||||
// , CMD_DEFINE_DATA_FACP
|
||||
// , CMD_DEFINE_DATA_FACU
|
||||
// , CMD_DEFINE_DATA_FACP // FAC Packed
|
||||
// , CMD_DEFINE_DATA_FACU // FAC Unpacked
|
||||
// , CMD_DATA_DEFINE_ADDR_BYTE_L // DB< address symbol
|
||||
// , CMD_DATA_DEFINE_ADDR_BYTE_H // DB> address symbol
|
||||
, CMD_DEFINE_ADDR_WORD // .DA address symbol
|
||||
@ -536,11 +415,8 @@
|
||||
// Memory
|
||||
, CMD_MEMORY_COMPARE
|
||||
|
||||
, _CMD_MEM_MINI_DUMP_HEX_1_1 // Memory Dump
|
||||
, CMD_MEM_MINI_DUMP_HEX_1 // Mini Memory Dump 1
|
||||
, CMD_MEM_MINI_DUMP_HEX_2 // Mini Memory Dump 2
|
||||
, _CMD_MEM_MINI_DUMP_HEX_1_3 // alias M1
|
||||
, _CMD_MEM_MINI_DUMP_HEX_2_1 // alias M2
|
||||
|
||||
, CMD_MEM_MINI_DUMP_ASCII_1 // ASCII
|
||||
, CMD_MEM_MINI_DUMP_ASCII_2
|
||||
@ -610,7 +486,7 @@
|
||||
, CMD_VIEW_DHGR1
|
||||
, CMD_VIEW_DHGR2
|
||||
// Watch
|
||||
, CMD_WATCH
|
||||
, CMD_WATCH // TODO: Deprecated ?
|
||||
, CMD_WATCH_ADD
|
||||
, CMD_WATCH_CLEAR
|
||||
, CMD_WATCH_DISABLE
|
||||
@ -667,6 +543,10 @@
|
||||
, CMD_ZEROPAGE_POINTER_SAVE
|
||||
|
||||
, NUM_COMMANDS
|
||||
|
||||
, _CMD_MEM_MINI_DUMP_HEX_1_1 // Memory Dump
|
||||
, _CMD_MEM_MINI_DUMP_HEX_1_3 // alias M1
|
||||
, _CMD_MEM_MINI_DUMP_HEX_2_1 // alias M2
|
||||
};
|
||||
|
||||
// Assembler
|
||||
|
Loading…
Reference in New Issue
Block a user