From 57852aabc20acdba60bc3c8604ef9635acd2121e Mon Sep 17 00:00:00 2001 From: Sapphire Becker Date: Tue, 3 Mar 2026 22:28:32 -0800 Subject: [PATCH 1/5] C updates, epson ASM opcodes --- platform/debug/CPUWindow.c | 424 ++--- platform/debug/CPUWindow.h | 4 +- platform/debug/ExternalWindow.c | 2 +- platform/debug/FileAssociation.c | 2 +- platform/debug/HardIOWindow.c | 44 +- platform/debug/IRQWindow.c | 60 +- platform/debug/MemWindow.c | 74 +- platform/debug/MiscWindow.c | 50 +- platform/debug/PRCMapWindow.c | 64 +- platform/debug/PRCSprWindow.c | 98 +- platform/debug/PRCTilesWindow.c | 118 +- platform/debug/PalEditWindow.c | 12 +- platform/debug/SymbWindow.c | 68 +- platform/debug/TimersWindow.c | 50 +- platform/debug/TraceWindow.c | 56 +- platform/debug/makefile.win | 2 +- platform/win32/VC2022/PokeMini.sln | 20 + platform/win32/VC2022/PokeMini.vcxproj | 212 +++ .../win32/VC2022/PokeMini.vcxproj.filters | 343 ++++ platform/win32/VC2022/PokeMini.vcxproj.user | 3 + platform/win32/VC2022/PokeMini_Win32.rc | 479 ++++++ platform/win32/VC2022/Resource.h | 235 +++ platform/win32/VC2022/afxres.h | 5 + platform/win32/VC2022/winxp.manifest | 20 + source/CommandLine.c | 8 +- source/CommandLine.h | 2 +- sourcex/HelpSupport.c | 2 +- sourcex/InstructionInfo.c | 1524 ++++++++--------- sourcex/SGtkXDrawingView.c | 4 +- tools/color_mapper/color_mapper.c | 12 +- 30 files changed, 2651 insertions(+), 1346 deletions(-) create mode 100644 platform/win32/VC2022/PokeMini.sln create mode 100644 platform/win32/VC2022/PokeMini.vcxproj create mode 100644 platform/win32/VC2022/PokeMini.vcxproj.filters create mode 100644 platform/win32/VC2022/PokeMini.vcxproj.user create mode 100644 platform/win32/VC2022/PokeMini_Win32.rc create mode 100644 platform/win32/VC2022/Resource.h create mode 100644 platform/win32/VC2022/afxres.h create mode 100644 platform/win32/VC2022/winxp.manifest diff --git a/platform/debug/CPUWindow.c b/platform/debug/CPUWindow.c index 36372f3..bc19f90 100644 --- a/platform/debug/CPUWindow.c +++ b/platform/debug/CPUWindow.c @@ -1658,7 +1658,7 @@ static void Menu_File_FreeBIOS(GtkWidget *widget, gpointer data) static void Menu_File_Autorun(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); clc_autorun = index; } @@ -1824,7 +1824,7 @@ static void Menu_Capt_Sound(GtkWidget *widget, gpointer data) static void Menu_Recent_Run(GtkWidget *widget, gpointer data) { char tmp[PMTMPV]; - int index = (int)data; + int index = GPOINTER_TO_INT(data); if (strlen(dclc_recent[index]) == 0) return; strcpy(tmp, dclc_recent[index]); @@ -1943,7 +1943,7 @@ static void Menu_File_Quit(GtkWidget *widget, gpointer data) static void Menu_Options_Zoom(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); if (clc_zoom != index) { clc_zoom = index; setup_screen(); @@ -1952,7 +1952,7 @@ static void Menu_Options_Zoom(GtkWidget *widget, gpointer data) static void Menu_Options_BPP(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); if (clc_bpp != index) { clc_bpp = index; setup_screen(); @@ -1961,7 +1961,7 @@ static void Menu_Options_BPP(GtkWidget *widget, gpointer data) static void Menu_Options_Palette(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); if (CommandLine.palette != index) { CommandLine.palette = index; PokeMini_VideoPalette_Index(CommandLine.palette, CommandLine.custompal, CommandLine.lcdcontrast, CommandLine.lcdbright); @@ -1970,7 +1970,7 @@ static void Menu_Options_Palette(GtkWidget *widget, gpointer data) static void Menu_Options_LCDMode(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); GtkWidget *widg; if (CommandLine.lcdmode != index) { CommandLine.lcdmode = index; @@ -1985,7 +1985,7 @@ static void Menu_Options_LCDMode(GtkWidget *widget, gpointer data) static void Menu_Options_LCDFilt(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); if (CommandLine.lcdfilter != index) { CommandLine.lcdfilter = index; PokeMini_ApplyChanges(); @@ -1994,7 +1994,7 @@ static void Menu_Options_LCDFilt(GtkWidget *widget, gpointer data) static void Menu_Options_LCDContrast(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); GtkWidget *widg; if (CommandLine.lcdcontrast != index) { if (index == -1) { @@ -2015,7 +2015,7 @@ static void Menu_Options_LCDContrast(GtkWidget *widget, gpointer data) static void Menu_Options_LCDBright(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); GtkWidget *widg; if (CommandLine.lcdbright != index) { if (index == -200) { @@ -2036,7 +2036,7 @@ static void Menu_Options_LCDBright(GtkWidget *widget, gpointer data) static void Menu_Options_RumbleLvl(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); if (CommandLine.rumblelvl != index) { CommandLine.rumblelvl = index; PokeMini_ApplyChanges(); @@ -2045,7 +2045,7 @@ static void Menu_Options_RumbleLvl(GtkWidget *widget, gpointer data) static void Menu_Options_Sound(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); CommandLine.sound = index; if (emumode & EMUMODE_SOUND) enablesound(CommandLine.sound); } @@ -2059,7 +2059,7 @@ static void Menu_Options_PiezoFilter(GtkWidget *widget, gpointer data) static void Menu_Options_SyncCyc(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); CommandLine.synccycles = index; } @@ -2073,7 +2073,7 @@ static void Menu_Options_LowBatt(GtkWidget *widget, gpointer data) static void Menu_Options_RTC(GtkWidget *widget, gpointer data) { if (CPUWindow_InConfigs) return; - CommandLine.updatertc = (int)data; + CommandLine.updatertc = GPOINTER_TO_INT(data); } static void Menu_Options_ShareEEP(GtkWidget *widget, gpointer data) @@ -2085,7 +2085,7 @@ static void Menu_Options_ShareEEP(GtkWidget *widget, gpointer data) static void Menu_Options_Multicart(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); if (CPUWindow_InConfigs) return; if (CommandLine.multicart != index) { CommandLine.multicart = index; @@ -2557,7 +2557,7 @@ static void Menu_View_Trace(GtkWidget *widget, gpointer data) static void Menu_External_Run(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); int ret = ExternalWindow_Launch(dclc_extapp_exec[index], dclc_extapp_atcurrdir[index]); if (ret == 0) { MessageDialog(MainWindow, "File not found, no assoc. or fork error", "Launch failed", GTK_MESSAGE_ERROR, NULL); @@ -2633,7 +2633,7 @@ static void Menu_Refresh_Now(GtkWidget *widget, gpointer data) static void Menu_Refresh(GtkWidget *widget, gpointer data) { - int val, index = (int)data; + int val, index = GPOINTER_TO_INT(data); static int lastrefrindex = -2; if (lastrefrindex == index) return; @@ -2743,258 +2743,258 @@ static void MainWindow_drag_data_received(GtkWidget *widget, GdkDragContext *con // Mod: 0 = None, 1 = Ctrl, 2 = Shift, 4 = Alt TMenu_items_accel Menu_item_accel[] = { - { SDLK_o, 5, Menu_File_ReloadMIN }, - { SDLK_c, 5, Menu_File_ReloadColor }, - { SDLK_q, 1, Menu_File_Quit }, - { SDLK_F5, 0, Menu_Debug_RunFull }, - { SDLK_F5, 2, Menu_Debug_RunDFrameSnd }, - { SDLK_F5, 1, Menu_Debug_RunDFrame }, - { SDLK_F3, 1, Menu_Debug_RunDStep }, - { SDLK_F4, 0, Menu_Debug_SingleFrame }, - { SDLK_F3, 0, Menu_Debug_SingleStep }, - { SDLK_F3, 2, Menu_Debug_StepSkip }, - { SDLK_F2, 0, Menu_Debug_Stop }, - { SDLK_r, 1, Menu_Debug_ResetHard }, - { SDLK_r, 2, Menu_Debug_ResetSoft }, + { SDLK_o, 5, (GtkItemFactoryCallback)Menu_File_ReloadMIN }, + { SDLK_c, 5, (GtkItemFactoryCallback)Menu_File_ReloadColor }, + { SDLK_q, 1, (GtkItemFactoryCallback)Menu_File_Quit }, + { SDLK_F5, 0, (GtkItemFactoryCallback)Menu_Debug_RunFull }, + { SDLK_F5, 2, (GtkItemFactoryCallback)Menu_Debug_RunDFrameSnd }, + { SDLK_F5, 1, (GtkItemFactoryCallback)Menu_Debug_RunDFrame }, + { SDLK_F3, 1, (GtkItemFactoryCallback)Menu_Debug_RunDStep }, + { SDLK_F4, 0, (GtkItemFactoryCallback)Menu_Debug_SingleFrame }, + { SDLK_F3, 0, (GtkItemFactoryCallback)Menu_Debug_SingleStep }, + { SDLK_F3, 2, (GtkItemFactoryCallback)Menu_Debug_StepSkip }, + { SDLK_F2, 0, (GtkItemFactoryCallback)Menu_Debug_Stop }, + { SDLK_r, 1, (GtkItemFactoryCallback)Menu_Debug_ResetHard }, + { SDLK_r, 2, (GtkItemFactoryCallback)Menu_Debug_ResetSoft }, { 0, 0, NULL } }; static GtkItemFactoryEntry CPUWindow_MenuItems[] = { { "/_File", NULL, NULL, 0, "" }, - { "/File/Open _Min...", "O", Menu_File_OpenMIN, 0, "" }, - { "/File/Open _BIOS...", "B", Menu_File_OpenBIOS, 0, "" }, - { "/File/_Reload Min", "O", Menu_File_ReloadMIN, 0, "" }, - { "/File/Use internal _FreeBIOS", NULL, Menu_File_FreeBIOS, 0, "" }, - { "/File/Autorun/Disabled", NULL, Menu_File_Autorun, 0, "" }, - { "/File/Autorun/Run full speed", NULL, Menu_File_Autorun, 1, "/File/Autorun/Disabled" }, - { "/File/Autorun/Debug frames (Sound)", NULL, Menu_File_Autorun, 2, "/File/Autorun/Disabled" }, - { "/File/Autorun/Debug frames", NULL, Menu_File_Autorun, 3, "/File/Autorun/Disabled" }, + { "/File/Open _Min...", "O", (GtkItemFactoryCallback)Menu_File_OpenMIN, 0, "" }, + { "/File/Open _BIOS...", "B", (GtkItemFactoryCallback)Menu_File_OpenBIOS, 0, "" }, + { "/File/_Reload Min", "O", (GtkItemFactoryCallback)Menu_File_ReloadMIN, 0, "" }, + { "/File/Use internal _FreeBIOS", NULL, (GtkItemFactoryCallback)Menu_File_FreeBIOS, 0, "" }, + { "/File/Autorun/Disabled", NULL, (GtkItemFactoryCallback)Menu_File_Autorun, 0, "" }, + { "/File/Autorun/Run full speed", NULL, (GtkItemFactoryCallback)Menu_File_Autorun, 1, "/File/Autorun/Disabled" }, + { "/File/Autorun/Debug frames (Sound)", NULL, (GtkItemFactoryCallback)Menu_File_Autorun, 2, "/File/Autorun/Disabled" }, + { "/File/Autorun/Debug frames", NULL, (GtkItemFactoryCallback)Menu_File_Autorun, 3, "/File/Autorun/Disabled" }, { "/File/sep0", NULL, NULL, 0, "" }, { "/File/_Recent", NULL, NULL, 0, "" }, - { "/File/Recent/ROM0", "1",Menu_Recent_Run, 0, "" }, - { "/File/Recent/ROM1", "2",Menu_Recent_Run, 1, "" }, - { "/File/Recent/ROM2", "3",Menu_Recent_Run, 2, "" }, - { "/File/Recent/ROM3", "4",Menu_Recent_Run, 3, "" }, - { "/File/Recent/ROM4", "5",Menu_Recent_Run, 4, "" }, - { "/File/Recent/ROM5", "6",Menu_Recent_Run, 5, "" }, - { "/File/Recent/ROM6", "7",Menu_Recent_Run, 6, "" }, - { "/File/Recent/ROM7", "8",Menu_Recent_Run, 7, "" }, - { "/File/Recent/ROM8", "9",Menu_Recent_Run, 8, "" }, - { "/File/Recent/ROM9", "0",Menu_Recent_Run, 9, "" }, + { "/File/Recent/ROM0", "1",(GtkItemFactoryCallback)Menu_Recent_Run, 0, "" }, + { "/File/Recent/ROM1", "2",(GtkItemFactoryCallback)Menu_Recent_Run, 1, "" }, + { "/File/Recent/ROM2", "3",(GtkItemFactoryCallback)Menu_Recent_Run, 2, "" }, + { "/File/Recent/ROM3", "4",(GtkItemFactoryCallback)Menu_Recent_Run, 3, "" }, + { "/File/Recent/ROM4", "5",(GtkItemFactoryCallback)Menu_Recent_Run, 4, "" }, + { "/File/Recent/ROM5", "6",(GtkItemFactoryCallback)Menu_Recent_Run, 5, "" }, + { "/File/Recent/ROM6", "7",(GtkItemFactoryCallback)Menu_Recent_Run, 6, "" }, + { "/File/Recent/ROM7", "8",(GtkItemFactoryCallback)Menu_Recent_Run, 7, "" }, + { "/File/Recent/ROM8", "9",(GtkItemFactoryCallback)Menu_Recent_Run, 8, "" }, + { "/File/Recent/ROM9", "0",(GtkItemFactoryCallback)Menu_Recent_Run, 9, "" }, { "/File/Recent/sep1", NULL, NULL, 0, "" }, - { "/File/Recent/Clear List", NULL, Menu_Recent_Clear, 0, "" }, + { "/File/Recent/Clear List", NULL, (GtkItemFactoryCallback)Menu_Recent_Clear, 0, "" }, { "/File/sep1", NULL, NULL, 0, "" }, - { "/File/_Load state...", NULL, Menu_File_LoadState, 0, "" }, - { "/File/_Save state...", NULL, Menu_File_SaveState, 0, "" }, + { "/File/_Load state...", NULL, (GtkItemFactoryCallback)Menu_File_LoadState, 0, "" }, + { "/File/_Save state...", NULL, (GtkItemFactoryCallback)Menu_File_SaveState, 0, "" }, { "/File/sep2", NULL, NULL, 0, "" }, - { "/File/Open _Color Info...", "C",Menu_File_OpenColor, 0, "" }, - { "/File/Reload _Color Info", "C",Menu_File_ReloadColor, 0, "" }, + { "/File/Open _Color Info...", "C",(GtkItemFactoryCallback)Menu_File_OpenColor, 0, "" }, + { "/File/Reload _Color Info", "C",(GtkItemFactoryCallback)Menu_File_ReloadColor, 0, "" }, { "/File/sep3", NULL, NULL, 0, "" }, { "/File/_Capture", NULL, NULL, 0, "" }, - { "/File/Capture/Snapshot 1x preview", NULL, Menu_Capt_Snapshot1x, 0, "" }, - { "/File/Capture/Snapshot from LCD", NULL, Menu_Capt_SnapshotLCD, 0, "" }, - { "/File/Capture/Sound (Start & Stop)", NULL, Menu_Capt_Sound, 0, "" }, - { "/File/Save _Min...", "S", Menu_File_SaveMIN, 0, "" }, - { "/File/Save _BIOS...", NULL, Menu_File_SaveBIOS, 0, "" }, + { "/File/Capture/Snapshot 1x preview", NULL, (GtkItemFactoryCallback)Menu_Capt_Snapshot1x, 0, "" }, + { "/File/Capture/Snapshot from LCD", NULL, (GtkItemFactoryCallback)Menu_Capt_SnapshotLCD, 0, "" }, + { "/File/Capture/Sound (Start & Stop)", NULL, (GtkItemFactoryCallback)Menu_Capt_Sound, 0, "" }, + { "/File/Save _Min...", "S", (GtkItemFactoryCallback)Menu_File_SaveMIN, 0, "" }, + { "/File/Save _BIOS...", NULL, (GtkItemFactoryCallback)Menu_File_SaveBIOS, 0, "" }, { "/File/sep4", NULL, NULL, 0, "" }, - { "/File/_Quit", "Q", Menu_File_Quit, 0, "" }, + { "/File/_Quit", "Q", (GtkItemFactoryCallback)Menu_File_Quit, 0, "" }, { "/_Options", NULL, NULL, 0, "" }, { "/Options/_Zoom", NULL, NULL, 0, "" }, - { "/Options/Zoom/1x (96x64)", NULL, Menu_Options_Zoom, 1, "" }, - { "/Options/Zoom/2x (192x128)", NULL, Menu_Options_Zoom, 2, "/Options/Zoom/1x (96x64)" }, - { "/Options/Zoom/3x (288x192)", NULL, Menu_Options_Zoom, 3, "/Options/Zoom/1x (96x64)" }, - { "/Options/Zoom/4x (384x256)", NULL, Menu_Options_Zoom, 4, "/Options/Zoom/1x (96x64)" }, - { "/Options/Zoom/5x (480x320)", NULL, Menu_Options_Zoom, 5, "/Options/Zoom/1x (96x64)" }, - { "/Options/Zoom/6x (576x384)", NULL, Menu_Options_Zoom, 6, "/Options/Zoom/1x (96x64)" }, + { "/Options/Zoom/1x (96x64)", NULL, (GtkItemFactoryCallback)Menu_Options_Zoom, 1, "" }, + { "/Options/Zoom/2x (192x128)", NULL, (GtkItemFactoryCallback)Menu_Options_Zoom, 2, "/Options/Zoom/1x (96x64)" }, + { "/Options/Zoom/3x (288x192)", NULL, (GtkItemFactoryCallback)Menu_Options_Zoom, 3, "/Options/Zoom/1x (96x64)" }, + { "/Options/Zoom/4x (384x256)", NULL, (GtkItemFactoryCallback)Menu_Options_Zoom, 4, "/Options/Zoom/1x (96x64)" }, + { "/Options/Zoom/5x (480x320)", NULL, (GtkItemFactoryCallback)Menu_Options_Zoom, 5, "/Options/Zoom/1x (96x64)" }, + { "/Options/Zoom/6x (576x384)", NULL, (GtkItemFactoryCallback)Menu_Options_Zoom, 6, "/Options/Zoom/1x (96x64)" }, { "/Options/_Bits-Per-Pixel", NULL, NULL, 0, "" }, - { "/Options/Bits-Per-Pixel/16 bpp", NULL, Menu_Options_BPP, 16, "" }, - { "/Options/Bits-Per-Pixel/32 bpp", NULL, Menu_Options_BPP, 32, "/Options/Bits-Per-Pixel/16 bpp" }, + { "/Options/Bits-Per-Pixel/16 bpp", NULL, (GtkItemFactoryCallback)Menu_Options_BPP, 16, "" }, + { "/Options/Bits-Per-Pixel/32 bpp", NULL, (GtkItemFactoryCallback)Menu_Options_BPP, 32, "/Options/Bits-Per-Pixel/16 bpp" }, { "/Options/_Palette", NULL, NULL, 0, "" }, - { "/Options/Palette/Default", NULL, Menu_Options_Palette, 0, "" }, - { "/Options/Palette/Old", NULL, Menu_Options_Palette, 1, "/Options/Palette/Default" }, - { "/Options/Palette/Black & White", NULL, Menu_Options_Palette, 2, "/Options/Palette/Default" }, - { "/Options/Palette/Green Palette", NULL, Menu_Options_Palette, 3, "/Options/Palette/Default" }, - { "/Options/Palette/Green Vector", NULL, Menu_Options_Palette, 4, "/Options/Palette/Default" }, - { "/Options/Palette/Red Palette", NULL, Menu_Options_Palette, 5, "/Options/Palette/Default" }, - { "/Options/Palette/Red Vector", NULL, Menu_Options_Palette, 6, "/Options/Palette/Default" }, - { "/Options/Palette/Blue LCD", NULL, Menu_Options_Palette, 7, "/Options/Palette/Default" }, - { "/Options/Palette/LED Backlight", NULL, Menu_Options_Palette, 8, "/Options/Palette/Default" }, - { "/Options/Palette/Girl Power", NULL, Menu_Options_Palette, 9, "/Options/Palette/Default" }, - { "/Options/Palette/Blue Palette", NULL, Menu_Options_Palette, 10, "/Options/Palette/Default" }, - { "/Options/Palette/Blue Vector", NULL, Menu_Options_Palette, 11, "/Options/Palette/Default" }, - { "/Options/Palette/Sepia", NULL, Menu_Options_Palette, 12, "/Options/Palette/Default" }, - { "/Options/Palette/Inverted B&W", NULL, Menu_Options_Palette, 13, "/Options/Palette/Default" }, - { "/Options/Palette/Custom 1", NULL, Menu_Options_Palette, 14, "/Options/Palette/Default" }, - { "/Options/Palette/Custom 2", NULL, Menu_Options_Palette, 15, "/Options/Palette/Default" }, + { "/Options/Palette/Default", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 0, "" }, + { "/Options/Palette/Old", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 1, "/Options/Palette/Default" }, + { "/Options/Palette/Black & White", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 2, "/Options/Palette/Default" }, + { "/Options/Palette/Green Palette", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 3, "/Options/Palette/Default" }, + { "/Options/Palette/Green Vector", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 4, "/Options/Palette/Default" }, + { "/Options/Palette/Red Palette", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 5, "/Options/Palette/Default" }, + { "/Options/Palette/Red Vector", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 6, "/Options/Palette/Default" }, + { "/Options/Palette/Blue LCD", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 7, "/Options/Palette/Default" }, + { "/Options/Palette/LED Backlight", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 8, "/Options/Palette/Default" }, + { "/Options/Palette/Girl Power", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 9, "/Options/Palette/Default" }, + { "/Options/Palette/Blue Palette", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 10, "/Options/Palette/Default" }, + { "/Options/Palette/Blue Vector", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 11, "/Options/Palette/Default" }, + { "/Options/Palette/Sepia", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 12, "/Options/Palette/Default" }, + { "/Options/Palette/Inverted B&W", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 13, "/Options/Palette/Default" }, + { "/Options/Palette/Custom 1", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 14, "/Options/Palette/Default" }, + { "/Options/Palette/Custom 2", NULL, (GtkItemFactoryCallback)Menu_Options_Palette, 15, "/Options/Palette/Default" }, { "/Options/_LCD Mode", NULL, NULL, 0, "" }, - { "/Options/LCD Mode/Analog", NULL, Menu_Options_LCDMode, 0, "" }, - { "/Options/LCD Mode/3-Shades", NULL, Menu_Options_LCDMode, 1, "/Options/LCD Mode/Analog" }, - { "/Options/LCD Mode/2-Shades", NULL, Menu_Options_LCDMode, 2, "/Options/LCD Mode/Analog" }, - { "/Options/LCD Mode/Colors*", NULL, Menu_Options_LCDMode, 3, "/Options/LCD Mode/Analog" }, + { "/Options/LCD Mode/Analog", NULL, (GtkItemFactoryCallback)Menu_Options_LCDMode, 0, "" }, + { "/Options/LCD Mode/3-Shades", NULL, (GtkItemFactoryCallback)Menu_Options_LCDMode, 1, "/Options/LCD Mode/Analog" }, + { "/Options/LCD Mode/2-Shades", NULL, (GtkItemFactoryCallback)Menu_Options_LCDMode, 2, "/Options/LCD Mode/Analog" }, + { "/Options/LCD Mode/Colors*", NULL, (GtkItemFactoryCallback)Menu_Options_LCDMode, 3, "/Options/LCD Mode/Analog" }, { "/Options/LCD _Filter", NULL, NULL, 0, "" }, - { "/Options/LCD Filter/None", NULL, Menu_Options_LCDFilt, 0, "" }, - { "/Options/LCD Filter/Dot-Matrix", NULL, Menu_Options_LCDFilt, 1, "/Options/LCD Filter/None" }, - { "/Options/LCD Filter/50% Scanline", NULL, Menu_Options_LCDFilt, 2, "/Options/LCD Filter/None" }, + { "/Options/LCD Filter/None", NULL, (GtkItemFactoryCallback)Menu_Options_LCDFilt, 0, "" }, + { "/Options/LCD Filter/Dot-Matrix", NULL, (GtkItemFactoryCallback)Menu_Options_LCDFilt, 1, "/Options/LCD Filter/None" }, + { "/Options/LCD Filter/50% Scanline", NULL, (GtkItemFactoryCallback)Menu_Options_LCDFilt, 2, "/Options/LCD Filter/None" }, { "/Options/LCD _Contrast", NULL, NULL, 0, "" }, - { "/Options/LCD Contrast/Default", NULL, Menu_Options_LCDContrast, 64, "" }, - { "/Options/LCD Contrast/Lowest", NULL, Menu_Options_LCDContrast, 0, "/Options/LCD Contrast/Default" }, - { "/Options/LCD Contrast/Low", NULL, Menu_Options_LCDContrast, 25, "/Options/LCD Contrast/Default" }, - { "/Options/LCD Contrast/Medium", NULL, Menu_Options_LCDContrast, 50, "/Options/LCD Contrast/Default" }, - { "/Options/LCD Contrast/High", NULL, Menu_Options_LCDContrast, 75, "/Options/LCD Contrast/Default" }, - { "/Options/LCD Contrast/Highest", NULL, Menu_Options_LCDContrast, 100, "/Options/LCD Contrast/Default" }, - { "/Options/LCD Contrast/Custom...", NULL, Menu_Options_LCDContrast, -1, "" }, + { "/Options/LCD Contrast/Default", NULL, (GtkItemFactoryCallback)Menu_Options_LCDContrast, 64, "" }, + { "/Options/LCD Contrast/Lowest", NULL, (GtkItemFactoryCallback)Menu_Options_LCDContrast, 0, "/Options/LCD Contrast/Default" }, + { "/Options/LCD Contrast/Low", NULL, (GtkItemFactoryCallback)Menu_Options_LCDContrast, 25, "/Options/LCD Contrast/Default" }, + { "/Options/LCD Contrast/Medium", NULL, (GtkItemFactoryCallback)Menu_Options_LCDContrast, 50, "/Options/LCD Contrast/Default" }, + { "/Options/LCD Contrast/High", NULL, (GtkItemFactoryCallback)Menu_Options_LCDContrast, 75, "/Options/LCD Contrast/Default" }, + { "/Options/LCD Contrast/Highest", NULL, (GtkItemFactoryCallback)Menu_Options_LCDContrast, 100, "/Options/LCD Contrast/Default" }, + { "/Options/LCD Contrast/Custom...", NULL, (GtkItemFactoryCallback)Menu_Options_LCDContrast, -1, "" }, { "/Options/LCD _Brightness", NULL, NULL, 0, "" }, - { "/Options/LCD Brightness/Default", NULL, Menu_Options_LCDBright, 0, "" }, - { "/Options/LCD Brightness/Lighter", NULL, Menu_Options_LCDBright, 24, "/Options/LCD Brightness/Default" }, - { "/Options/LCD Brightness/Light", NULL, Menu_Options_LCDBright, 12, "/Options/LCD Brightness/Default" }, - { "/Options/LCD Brightness/Dark", NULL, Menu_Options_LCDBright, -12, "/Options/LCD Brightness/Default" }, - { "/Options/LCD Brightness/Darker", NULL, Menu_Options_LCDBright, -24, "/Options/LCD Brightness/Default" }, - { "/Options/LCD Brightness/Custom...", NULL, Menu_Options_LCDBright, -200, "" }, + { "/Options/LCD Brightness/Default", NULL, (GtkItemFactoryCallback)Menu_Options_LCDBright, 0, "" }, + { "/Options/LCD Brightness/Lighter", NULL, (GtkItemFactoryCallback)Menu_Options_LCDBright, 24, "/Options/LCD Brightness/Default" }, + { "/Options/LCD Brightness/Light", NULL, (GtkItemFactoryCallback)Menu_Options_LCDBright, 12, "/Options/LCD Brightness/Default" }, + { "/Options/LCD Brightness/Dark", NULL, (GtkItemFactoryCallback)Menu_Options_LCDBright, -12, "/Options/LCD Brightness/Default" }, + { "/Options/LCD Brightness/Darker", NULL, (GtkItemFactoryCallback)Menu_Options_LCDBright, -24, "/Options/LCD Brightness/Default" }, + { "/Options/LCD Brightness/Custom...", NULL, (GtkItemFactoryCallback)Menu_Options_LCDBright, -200, "" }, { "/Options/_Rumble Level", NULL, NULL, 0, "" }, - { "/Options/Rumble Level/None", NULL, Menu_Options_RumbleLvl, 0, "" }, - { "/Options/Rumble Level/Weak", NULL, Menu_Options_RumbleLvl, 1, "/Options/Rumble Level/None" }, - { "/Options/Rumble Level/Medium", NULL, Menu_Options_RumbleLvl, 2, "/Options/Rumble Level/None" }, - { "/Options/Rumble Level/Strong", NULL, Menu_Options_RumbleLvl, 3, "/Options/Rumble Level/None" }, + { "/Options/Rumble Level/None", NULL, (GtkItemFactoryCallback)Menu_Options_RumbleLvl, 0, "" }, + { "/Options/Rumble Level/Weak", NULL, (GtkItemFactoryCallback)Menu_Options_RumbleLvl, 1, "/Options/Rumble Level/None" }, + { "/Options/Rumble Level/Medium", NULL, (GtkItemFactoryCallback)Menu_Options_RumbleLvl, 2, "/Options/Rumble Level/None" }, + { "/Options/Rumble Level/Strong", NULL, (GtkItemFactoryCallback)Menu_Options_RumbleLvl, 3, "/Options/Rumble Level/None" }, { "/Options/sep1", NULL, NULL, 0, "" }, { "/Options/_Sound", NULL, NULL, 0, "" }, - { "/Options/Sound/Disabled", NULL, Menu_Options_Sound, 0, "" }, - { "/Options/Sound/Generated", NULL, Menu_Options_Sound, 1, "/Options/Sound/Disabled" }, - { "/Options/Sound/Direct", NULL, Menu_Options_Sound, 2, "/Options/Sound/Disabled" }, - { "/Options/Sound/Emulated", NULL, Menu_Options_Sound, 3, "/Options/Sound/Disabled" }, - { "/Options/Sound/Direct PWM", NULL, Menu_Options_Sound, 4, "/Options/Sound/Disabled" }, - { "/Options/Pie_zo Filter", NULL, Menu_Options_PiezoFilter, 0, "" }, + { "/Options/Sound/Disabled", NULL, (GtkItemFactoryCallback)Menu_Options_Sound, 0, "" }, + { "/Options/Sound/Generated", NULL, (GtkItemFactoryCallback)Menu_Options_Sound, 1, "/Options/Sound/Disabled" }, + { "/Options/Sound/Direct", NULL, (GtkItemFactoryCallback)Menu_Options_Sound, 2, "/Options/Sound/Disabled" }, + { "/Options/Sound/Emulated", NULL, (GtkItemFactoryCallback)Menu_Options_Sound, 3, "/Options/Sound/Disabled" }, + { "/Options/Sound/Direct PWM", NULL, (GtkItemFactoryCallback)Menu_Options_Sound, 4, "/Options/Sound/Disabled" }, + { "/Options/Pie_zo Filter", NULL, (GtkItemFactoryCallback)Menu_Options_PiezoFilter, 0, "" }, { "/Options/sep2", NULL, NULL, 0, "" }, { "/Options/_Sync Cycles", NULL, NULL, 0, "" }, - { "/Options/Sync Cycles/ 8 (Accurancy)", NULL, Menu_Options_SyncCyc, 8, "" }, - { "/Options/Sync Cycles/ 16", NULL, Menu_Options_SyncCyc, 16, "/Options/Sync Cycles/ 8 (Accurancy)" }, - { "/Options/Sync Cycles/ 32", NULL, Menu_Options_SyncCyc, 32, "/Options/Sync Cycles/ 8 (Accurancy)" }, - { "/Options/Sync Cycles/ 64 (Performance)", NULL, Menu_Options_SyncCyc, 64, "/Options/Sync Cycles/ 8 (Accurancy)" }, + { "/Options/Sync Cycles/ 8 (Accurancy)", NULL, (GtkItemFactoryCallback)Menu_Options_SyncCyc, 8, "" }, + { "/Options/Sync Cycles/ 16", NULL, (GtkItemFactoryCallback)Menu_Options_SyncCyc, 16, "/Options/Sync Cycles/ 8 (Accurancy)" }, + { "/Options/Sync Cycles/ 32", NULL, (GtkItemFactoryCallback)Menu_Options_SyncCyc, 32, "/Options/Sync Cycles/ 8 (Accurancy)" }, + { "/Options/Sync Cycles/ 64 (Performance)", NULL, (GtkItemFactoryCallback)Menu_Options_SyncCyc, 64, "/Options/Sync Cycles/ 8 (Accurancy)" }, { "/Options/sep3", NULL, NULL, 0, "" }, - { "/Options/_Low Battery", NULL, Menu_Options_LowBatt, 0, "" }, + { "/Options/_Low Battery", NULL, (GtkItemFactoryCallback)Menu_Options_LowBatt, 0, "" }, { "/Options/_RTC", NULL, NULL, 0, "" }, - { "/Options/RTC/No RTC", NULL, Menu_Options_RTC, 0, "" }, - { "/Options/RTC/State time difference", NULL, Menu_Options_RTC, 1, "/Options/RTC/No RTC" }, - { "/Options/RTC/RTC from Host", NULL, Menu_Options_RTC, 2, "/Options/RTC/No RTC" }, - { "/Options/Share _EEPROM", NULL, Menu_Options_ShareEEP, 0, "" }, + { "/Options/RTC/No RTC", NULL, (GtkItemFactoryCallback)Menu_Options_RTC, 0, "" }, + { "/Options/RTC/State time difference", NULL, (GtkItemFactoryCallback)Menu_Options_RTC, 1, "/Options/RTC/No RTC" }, + { "/Options/RTC/RTC from Host", NULL, (GtkItemFactoryCallback)Menu_Options_RTC, 2, "/Options/RTC/No RTC" }, + { "/Options/Share _EEPROM", NULL, (GtkItemFactoryCallback)Menu_Options_ShareEEP, 0, "" }, { "/Options/_Multicart", NULL, NULL, 0, "" }, - { "/Options/Multicart/Disabled", NULL, Menu_Options_Multicart, 0, "" }, - { "/Options/Multicart/Flash 512KB (AM29LV040B)", NULL, Menu_Options_Multicart, 1, "/Options/Multicart/Disabled" }, - { "/Options/Multicart/Lupin 512KB (AM29LV040B)", NULL, Menu_Options_Multicart, 2, "/Options/Multicart/Disabled" }, - { "/Options/Multicart/Ditto 2048KB (SST39VF1681)",NULL, Menu_Options_Multicart, 3, "/Options/Multicart/Disabled" }, - { "/Options/Force Free_BIOS", NULL, Menu_Options_FreeBIOS, 0, "" }, + { "/Options/Multicart/Disabled", NULL, (GtkItemFactoryCallback)Menu_Options_Multicart, 0, "" }, + { "/Options/Multicart/Flash 512KB (AM29LV040B)", NULL, (GtkItemFactoryCallback)Menu_Options_Multicart, 1, "/Options/Multicart/Disabled" }, + { "/Options/Multicart/Lupin 512KB (AM29LV040B)", NULL, (GtkItemFactoryCallback)Menu_Options_Multicart, 2, "/Options/Multicart/Disabled" }, + { "/Options/Multicart/Ditto 2048KB (SST39VF1681)",NULL, (GtkItemFactoryCallback)Menu_Options_Multicart, 3, "/Options/Multicart/Disabled" }, + { "/Options/Force Free_BIOS", NULL, (GtkItemFactoryCallback)Menu_Options_FreeBIOS, 0, "" }, { "/Options/sep3", NULL, NULL, 0, "" }, { "/Options/File association", NULL, NULL, 0, "" }, - { "/Options/File association/Register", NULL, Menu_FileAss_Reg, 0, "" }, - { "/Options/File association/Unregister", NULL, Menu_FileAss_Unreg, 0, "" }, + { "/Options/File association/Register", NULL, (GtkItemFactoryCallback)Menu_FileAss_Reg, 0, "" }, + { "/Options/File association/Unregister", NULL, (GtkItemFactoryCallback)Menu_FileAss_Unreg, 0, "" }, { "/Options/sep4", NULL, NULL, 0, "" }, - { "/Options/_Custom Palette Edit...", NULL, Menu_Options_PalEdit, 0, "" }, - { "/Options/Define _Keyboard...", NULL, Menu_Options_DefKeyboard, 0, "" }, - { "/Options/Define _Joystick...", NULL, Menu_Options_DefJoystick, 0, "" }, - { "/Options/_Update EEPROM", NULL, Menu_Options_UpdEEPROM, 0, "" }, + { "/Options/_Custom Palette Edit...", NULL, (GtkItemFactoryCallback)Menu_Options_PalEdit, 0, "" }, + { "/Options/Define _Keyboard...", NULL, (GtkItemFactoryCallback)Menu_Options_DefKeyboard, 0, "" }, + { "/Options/Define _Joystick...", NULL, (GtkItemFactoryCallback)Menu_Options_DefJoystick, 0, "" }, + { "/Options/_Update EEPROM", NULL, (GtkItemFactoryCallback)Menu_Options_UpdEEPROM, 0, "" }, { "/_Debugger", NULL, NULL, 0, "" }, - { "/Debugger/_Run full speed", "F5", Menu_Debug_RunFull, 0, "" }, - { "/Debugger/Run debug frames (_Sound)", "F5", Menu_Debug_RunDFrameSnd, 0, "" }, - { "/Debugger/Run debug _frames", "F5", Menu_Debug_RunDFrame, 0, "" }, - { "/Debugger/Run debug _steps", "F3", Menu_Debug_RunDStep, 0, "" }, - { "/Debugger/Single _frame", "F4", Menu_Debug_SingleFrame, 0, "" }, - { "/Debugger/Single _step", "F3", Menu_Debug_SingleStep, 0, "" }, - { "/Debugger/Step s_kip", "F3", Menu_Debug_StepSkip, 0, "" }, - { "/Debugger/_Stop", "F2", Menu_Debug_Stop, 0, "" }, + { "/Debugger/_Run full speed", "F5", (GtkItemFactoryCallback)Menu_Debug_RunFull, 0, "" }, + { "/Debugger/Run debug frames (_Sound)", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrameSnd, 0, "" }, + { "/Debugger/Run debug _frames", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrame, 0, "" }, + { "/Debugger/Run debug _steps", "F3", (GtkItemFactoryCallback)Menu_Debug_RunDStep, 0, "" }, + { "/Debugger/Single _frame", "F4", (GtkItemFactoryCallback)Menu_Debug_SingleFrame, 0, "" }, + { "/Debugger/Single _step", "F3", (GtkItemFactoryCallback)Menu_Debug_SingleStep, 0, "" }, + { "/Debugger/Step s_kip", "F3", (GtkItemFactoryCallback)Menu_Debug_StepSkip, 0, "" }, + { "/Debugger/_Stop", "F2", (GtkItemFactoryCallback)Menu_Debug_Stop, 0, "" }, { "/Debugger/sep1", NULL, NULL, 0, "" }, - { "/Debugger/_Physical range", "P", Menu_Debug_FullRange, 0, "" }, - { "/Debugger/_Follow PC", "F", Menu_Debug_FollowPC, 0, "" }, - { "/Debugger/_Follow SP", "F", Menu_Debug_FollowSP, 0, "" }, - { "/Debugger/_Go to program address...", "G", Menu_Debug_GotoProgAddr, 0, "" }, - { "/Debugger/_Go to RAM address...", "G", Menu_Debug_GotoRAMAddr, 0, "" }, - { "/Debugger/_Go to BIOS IRQ...", NULL, Menu_Debug_GotoBIOSIRQ, 0, "" }, - { "/Debugger/_Go to cartridge IRQ...", "G", Menu_Debug_GotoCartIRQ, 0, "" }, - { "/Debugger/Go to _PC", "P", Menu_Debug_GotoPC, 0, "" }, - { "/Debugger/Go to _SP", "S", Menu_Debug_GotoSP, 0, "" }, + { "/Debugger/_Physical range", "P", (GtkItemFactoryCallback)Menu_Debug_FullRange, 0, "" }, + { "/Debugger/_Follow PC", "F", (GtkItemFactoryCallback)Menu_Debug_FollowPC, 0, "" }, + { "/Debugger/_Follow SP", "F", (GtkItemFactoryCallback)Menu_Debug_FollowSP, 0, "" }, + { "/Debugger/_Go to program address...", "G", (GtkItemFactoryCallback)Menu_Debug_GotoProgAddr, 0, "" }, + { "/Debugger/_Go to RAM address...", "G", (GtkItemFactoryCallback)Menu_Debug_GotoRAMAddr, 0, "" }, + { "/Debugger/_Go to BIOS IRQ...", NULL, (GtkItemFactoryCallback)Menu_Debug_GotoBIOSIRQ, 0, "" }, + { "/Debugger/_Go to cartridge IRQ...", "G", (GtkItemFactoryCallback)Menu_Debug_GotoCartIRQ, 0, "" }, + { "/Debugger/Go to _PC", "P", (GtkItemFactoryCallback)Menu_Debug_GotoPC, 0, "" }, + { "/Debugger/Go to _SP", "S", (GtkItemFactoryCallback)Menu_Debug_GotoSP, 0, "" }, { "/Debugger/sep2", NULL, NULL, 0, "" }, { "/Debugger/_PRC", NULL, NULL, 0, "" }, - { "/Debugger/PRC/Show _Background", NULL, Menu_DebPRC_ShowBG, 0, "" }, - { "/Debugger/PRC/Show _Sprites", NULL, Menu_DebPRC_ShowSpr, 0, "" }, - { "/Debugger/PRC/Stall _CPU", NULL, Menu_DebPRC_StallCPU, 0, "" }, - { "/Debugger/PRC/Stall _Cycles...", NULL, Menu_DebPRC_StallCycles, 0, "" }, - { "/Debugger/_IRQ call...", NULL, Menu_Debug_IRQCall, 0, "" }, + { "/Debugger/PRC/Show _Background", NULL, (GtkItemFactoryCallback)Menu_DebPRC_ShowBG, 0, "" }, + { "/Debugger/PRC/Show _Sprites", NULL, (GtkItemFactoryCallback)Menu_DebPRC_ShowSpr, 0, "" }, + { "/Debugger/PRC/Stall _CPU", NULL, (GtkItemFactoryCallback)Menu_DebPRC_StallCPU, 0, "" }, + { "/Debugger/PRC/Stall _Cycles...", NULL, (GtkItemFactoryCallback)Menu_DebPRC_StallCycles, 0, "" }, + { "/Debugger/_IRQ call...", NULL, (GtkItemFactoryCallback)Menu_Debug_IRQCall, 0, "" }, { "/Debugger/_Reset", NULL, NULL, 0, "" }, - { "/Debugger/Reset/_Soft (Partial)", "R", Menu_Debug_ResetSoft, 0, "" }, - { "/Debugger/Reset/_Hard (Full)", "R", Menu_Debug_ResetHard, 0, "" }, + { "/Debugger/Reset/_Soft (Partial)", "R", (GtkItemFactoryCallback)Menu_Debug_ResetSoft, 0, "" }, + { "/Debugger/Reset/_Hard (Full)", "R", (GtkItemFactoryCallback)Menu_Debug_ResetHard, 0, "" }, { "/_Break", NULL, NULL, 0, "" }, - { "/Break/_Enable breakpoints", "B",Menu_Break_EnableBP, 0, "" }, - { "/Break/_Add breakpoint at...", "B", Menu_Break_AddBPAt, 0, "" }, - { "/Break/_Delete breakpoint at...", "B",Menu_Break_DelBPAt, 0, "" }, - { "/Break/_Delete all breakpoints", NULL, Menu_Break_DelAllBP, 0, "" }, + { "/Break/_Enable breakpoints", "B",(GtkItemFactoryCallback)Menu_Break_EnableBP, 0, "" }, + { "/Break/_Add breakpoint at...", "B", (GtkItemFactoryCallback)Menu_Break_AddBPAt, 0, "" }, + { "/Break/_Delete breakpoint at...", "B",(GtkItemFactoryCallback)Menu_Break_DelBPAt, 0, "" }, + { "/Break/_Delete all breakpoints", NULL, (GtkItemFactoryCallback)Menu_Break_DelAllBP, 0, "" }, { "/Break/sep1", NULL, NULL, 0, "" }, - { "/Break/_Enable watchpoints", "W",Menu_Break_EnableWP, 0, "" }, - { "/Break/_Add Watchpoint at...", "W", Menu_Break_AddWPAt, 0, "" }, - { "/Break/_Delete all watchpoints", NULL, Menu_Break_DelAllWP, 0, "" }, + { "/Break/_Enable watchpoints", "W",(GtkItemFactoryCallback)Menu_Break_EnableWP, 0, "" }, + { "/Break/_Add Watchpoint at...", "W", (GtkItemFactoryCallback)Menu_Break_AddWPAt, 0, "" }, + { "/Break/_Delete all watchpoints", NULL, (GtkItemFactoryCallback)Menu_Break_DelAllWP, 0, "" }, { "/Break/sep1", NULL, NULL, 0, "" }, - { "/Break/_Enable exceptions", NULL, Menu_Break_EnableEx, 0, "" }, - { "/Break/_Enable HALT break", NULL, Menu_Break_EnableHalt, 0, "" }, - { "/Break/_Enable STOP break", NULL, Menu_Break_EnableStop, 0, "" }, + { "/Break/_Enable exceptions", NULL, (GtkItemFactoryCallback)Menu_Break_EnableEx, 0, "" }, + { "/Break/_Enable HALT break", NULL, (GtkItemFactoryCallback)Menu_Break_EnableHalt, 0, "" }, + { "/Break/_Enable STOP break", NULL, (GtkItemFactoryCallback)Menu_Break_EnableStop, 0, "" }, { "/_Viewers", NULL, NULL, 0, "" }, - { "/Viewers/_Memory View", "1", Menu_View_Memory, 0, "" }, - { "/Viewers/_PRC Tiles View", "2", Menu_View_PRCTiles, 0, "" }, - { "/Viewers/_PRC Map View", "3", Menu_View_PRCMap, 0, "" }, - { "/Viewers/_PRC Sprites View", "4", Menu_View_PRCSpr, 0, "" }, - { "/Viewers/_Timers View", "5", Menu_View_Timers, 0, "" }, - { "/Viewers/_Hardware IO View", "6", Menu_View_HardIO, 0, "" }, - { "/Viewers/_IRQ View", "7", Menu_View_IRQ, 0, "" }, - { "/Viewers/_Misc. View", "8", Menu_View_Misc, 0, "" }, - { "/Viewers/_Symbols List View", "9", Menu_View_Symb, 0, "" }, - { "/Viewers/_Run Trace View", "0", Menu_View_Trace, 0, "" }, + { "/Viewers/_Memory View", "1", (GtkItemFactoryCallback)Menu_View_Memory, 0, "" }, + { "/Viewers/_PRC Tiles View", "2", (GtkItemFactoryCallback)Menu_View_PRCTiles, 0, "" }, + { "/Viewers/_PRC Map View", "3", (GtkItemFactoryCallback)Menu_View_PRCMap, 0, "" }, + { "/Viewers/_PRC Sprites View", "4", (GtkItemFactoryCallback)Menu_View_PRCSpr, 0, "" }, + { "/Viewers/_Timers View", "5", (GtkItemFactoryCallback)Menu_View_Timers, 0, "" }, + { "/Viewers/_Hardware IO View", "6", (GtkItemFactoryCallback)Menu_View_HardIO, 0, "" }, + { "/Viewers/_IRQ View", "7", (GtkItemFactoryCallback)Menu_View_IRQ, 0, "" }, + { "/Viewers/_Misc. View", "8", (GtkItemFactoryCallback)Menu_View_Misc, 0, "" }, + { "/Viewers/_Symbols List View", "9", (GtkItemFactoryCallback)Menu_View_Symb, 0, "" }, + { "/Viewers/_Run Trace View", "0", (GtkItemFactoryCallback)Menu_View_Trace, 0, "" }, { "/_External", NULL, NULL, 0, "" }, - { "/External/App1", "1", Menu_External_Run, 0, "" }, - { "/External/App2", "2", Menu_External_Run, 1, "" }, - { "/External/App3", "3", Menu_External_Run, 2, "" }, - { "/External/App4", "4", Menu_External_Run, 3, "" }, - { "/External/App5", "5", Menu_External_Run, 4, "" }, - { "/External/App6", "6", Menu_External_Run, 5, "" }, - { "/External/App7", "7", Menu_External_Run, 6, "" }, - { "/External/App8", "8", Menu_External_Run, 7, "" }, - { "/External/App9", "9", Menu_External_Run, 8, "" }, - { "/External/App10", "0", Menu_External_Run, 9, "" }, + { "/External/App1", "1", (GtkItemFactoryCallback)Menu_External_Run, 0, "" }, + { "/External/App2", "2", (GtkItemFactoryCallback)Menu_External_Run, 1, "" }, + { "/External/App3", "3", (GtkItemFactoryCallback)Menu_External_Run, 2, "" }, + { "/External/App4", "4", (GtkItemFactoryCallback)Menu_External_Run, 3, "" }, + { "/External/App5", "5", (GtkItemFactoryCallback)Menu_External_Run, 4, "" }, + { "/External/App6", "6", (GtkItemFactoryCallback)Menu_External_Run, 5, "" }, + { "/External/App7", "7", (GtkItemFactoryCallback)Menu_External_Run, 6, "" }, + { "/External/App8", "8", (GtkItemFactoryCallback)Menu_External_Run, 7, "" }, + { "/External/App9", "9", (GtkItemFactoryCallback)Menu_External_Run, 8, "" }, + { "/External/App10", "0", (GtkItemFactoryCallback)Menu_External_Run, 9, "" }, { "/External/sep1", NULL, NULL, 0, "" }, - { "/External/Configure...", NULL, Menu_External_Conf, 0, "" }, + { "/External/Configure...", NULL, (GtkItemFactoryCallback)Menu_External_Conf, 0, "" }, { "/Messages/Enable _messages", NULL, NULL, 0, "" }, - { "/Messages/Enable messages/Breakpoints",NULL, Menu_Messages_BPMsg, 0, "" }, - { "/Messages/Enable messages/Watchpoints",NULL, Menu_Messages_WPMsg, 0, "" }, - { "/Messages/Enable messages/Exceptions", NULL, Menu_Messages_ExMsg, 0, "" }, - { "/Messages/Enable messages/HALT break", NULL, Menu_Messages_HaltMsg, 0, "" }, - { "/Messages/Enable messages/STOP break", NULL, Menu_Messages_StopMsg, 0, "" }, + { "/Messages/Enable messages/Breakpoints",NULL, (GtkItemFactoryCallback)Menu_Messages_BPMsg, 0, "" }, + { "/Messages/Enable messages/Watchpoints",NULL, (GtkItemFactoryCallback)Menu_Messages_WPMsg, 0, "" }, + { "/Messages/Enable messages/Exceptions", NULL, (GtkItemFactoryCallback)Menu_Messages_ExMsg, 0, "" }, + { "/Messages/Enable messages/HALT break", NULL, (GtkItemFactoryCallback)Menu_Messages_HaltMsg, 0, "" }, + { "/Messages/Enable messages/STOP break", NULL, (GtkItemFactoryCallback)Menu_Messages_StopMsg, 0, "" }, { "/Messages/sep1", NULL, NULL, 0, "" }, - { "/Messages/_Enable debug output", NULL, Menu_Messages_EnableDbgOut, 0, "" }, - { "/Messages/_Auto-open debug output", NULL, Menu_Messages_AutoDbgOut, 0, "" }, + { "/Messages/_Enable debug output", NULL, (GtkItemFactoryCallback)Menu_Messages_EnableDbgOut, 0, "" }, + { "/Messages/_Auto-open debug output", NULL, (GtkItemFactoryCallback)Menu_Messages_AutoDbgOut, 0, "" }, { "/Messages/sep2", NULL, NULL, 0, "" }, - { "/Messages/Clear _messages", NULL, Menu_Messages_ClearMsgs, 0, "" }, - { "/Messages/Clear debug _output", NULL, Menu_Messages_ClearDebugOut, 0, "" }, + { "/Messages/Clear _messages", NULL, (GtkItemFactoryCallback)Menu_Messages_ClearMsgs, 0, "" }, + { "/Messages/Clear debug _output", NULL, (GtkItemFactoryCallback)Menu_Messages_ClearDebugOut, 0, "" }, { "/_Refresh", NULL, NULL, 0, "" }, - { "/Refresh/Now!", NULL, Menu_Refresh_Now, 0, "" }, + { "/Refresh/Now!", NULL, (GtkItemFactoryCallback)Menu_Refresh_Now, 0, "" }, { "/Refresh/sep1", NULL, NULL, 0, "" }, - { "/Refresh/100% 72fps", NULL, Menu_Refresh, 0, "" }, - { "/Refresh/ 50% 36fps", NULL, Menu_Refresh, 1, "/Refresh/100% 72fps" }, - { "/Refresh/ 33% 24fps", NULL, Menu_Refresh, 2, "/Refresh/100% 72fps" }, - { "/Refresh/ 25% 18fps", NULL, Menu_Refresh, 3, "/Refresh/100% 72fps" }, - { "/Refresh/ 17% 12fps", NULL, Menu_Refresh, 5, "/Refresh/100% 72fps" }, - { "/Refresh/ 12% 9fps", NULL, Menu_Refresh, 7, "/Refresh/100% 72fps" }, - { "/Refresh/ 8% 6fps", NULL, Menu_Refresh, 11, "/Refresh/100% 72fps" }, - { "/Refresh/ 3% 2fps", NULL, Menu_Refresh, 35, "/Refresh/100% 72fps" }, - { "/Refresh/ 1% 1fps", NULL, Menu_Refresh, 71, "/Refresh/100% 72fps" }, - { "/Refresh/Custom...", NULL, Menu_Refresh, -1, "/Refresh/100% 72fps" }, + { "/Refresh/100% 72fps", NULL, (GtkItemFactoryCallback)Menu_Refresh, 0, "" }, + { "/Refresh/ 50% 36fps", NULL, (GtkItemFactoryCallback)Menu_Refresh, 1, "/Refresh/100% 72fps" }, + { "/Refresh/ 33% 24fps", NULL, (GtkItemFactoryCallback)Menu_Refresh, 2, "/Refresh/100% 72fps" }, + { "/Refresh/ 25% 18fps", NULL, (GtkItemFactoryCallback)Menu_Refresh, 3, "/Refresh/100% 72fps" }, + { "/Refresh/ 17% 12fps", NULL, (GtkItemFactoryCallback)Menu_Refresh, 5, "/Refresh/100% 72fps" }, + { "/Refresh/ 12% 9fps", NULL, (GtkItemFactoryCallback)Menu_Refresh, 7, "/Refresh/100% 72fps" }, + { "/Refresh/ 8% 6fps", NULL, (GtkItemFactoryCallback)Menu_Refresh, 11, "/Refresh/100% 72fps" }, + { "/Refresh/ 3% 2fps", NULL, (GtkItemFactoryCallback)Menu_Refresh, 35, "/Refresh/100% 72fps" }, + { "/Refresh/ 1% 1fps", NULL, (GtkItemFactoryCallback)Menu_Refresh, 71, "/Refresh/100% 72fps" }, + { "/Refresh/Custom...", NULL, (GtkItemFactoryCallback)Menu_Refresh, -1, "/Refresh/100% 72fps" }, { "/_Help", NULL, NULL, 0, "" }, - { "/Help/_Documentation", "F1", Menu_Help_Documentation, 0, "" }, - { "/Help/_Visit website", NULL, Menu_Help_VisitWebsite, 0, "" }, + { "/Help/_Documentation", "F1", (GtkItemFactoryCallback)Menu_Help_Documentation, 0, "" }, + { "/Help/_Visit website", NULL, (GtkItemFactoryCallback)Menu_Help_VisitWebsite, 0, "" }, { "/Help/sep1", NULL, NULL, 0, "" }, - { "/Help/_Command-line switches...", NULL, Menu_Help_CommandLine, 0, "" }, - { "/Help/_About...", NULL, Menu_Help_About, 0, "" }, + { "/Help/_Command-line switches...", NULL, (GtkItemFactoryCallback)Menu_Help_CommandLine, 0, "" }, + { "/Help/_About...", NULL, (GtkItemFactoryCallback)Menu_Help_About, 0, "" }, }; static gint CPUWindow_MenuItemsNum = sizeof(CPUWindow_MenuItems) / sizeof(*CPUWindow_MenuItems); @@ -3004,7 +3004,7 @@ int ProcessMenuItemAccel(int key, int modifier, TMenu_items_accel *list) if (!list) return 0; while (list->callback) { if ((list->key == key) && (list->modifier == modifier)) { - list->callback(NULL, NULL); + ((void (*)(GtkWidget *, gpointer)) list->callback)(NULL, NULL); return 1; } list++; diff --git a/platform/debug/CPUWindow.h b/platform/debug/CPUWindow.h index 277b605..a8d6eae 100644 --- a/platform/debug/CPUWindow.h +++ b/platform/debug/CPUWindow.h @@ -79,10 +79,10 @@ void StackView_GotoSP(void); void RAMView_GotoAddr(uint32_t addr, int highlight); // Disassembler with color codes -TSOpcDec CDisAsm_SOpcDec; +extern TSOpcDec CDisAsm_SOpcDec; // Any view trap colors -uint32_t AnyView_TrapColor[8]; +extern uint32_t AnyView_TrapColor[8]; // Any view new value custom dialog extern GtkXCustomDialog AnyView_NewValue_CD[]; diff --git a/platform/debug/ExternalWindow.c b/platform/debug/ExternalWindow.c index b39932c..e7f06c2 100644 --- a/platform/debug/ExternalWindow.c +++ b/platform/debug/ExternalWindow.c @@ -89,7 +89,7 @@ static int RunCmdNoWait(const char *runcmd, int atcurrdir) #ifdef _WIN32 // Shell execute - res = (int)ShellExecute(NULL, "open", argv[0], argpars, launchdir, SW_SHOW) > 32; + res = (INT_PTR)ShellExecute(NULL, "open", argv[0], argpars, launchdir, SW_SHOW) > 32; #else // Fork and execute i = fork(); diff --git a/platform/debug/FileAssociation.c b/platform/debug/FileAssociation.c index 867f39b..7a9e282 100644 --- a/platform/debug/FileAssociation.c +++ b/platform/debug/FileAssociation.c @@ -55,7 +55,7 @@ int FileAssociation_DoRegister(void) const char *tenam5 = "debug"; const char *tenam6 = "&Debug"; const char *tenam7 = "&Color map"; - char tmp[PMTMPV]; + char tmp[PMTMPV + 24]; char tmp2[PMTMPV]; char argv0[PMTMPV]; int i; diff --git a/platform/debug/HardIOWindow.c b/platform/debug/HardIOWindow.c index c786af6..730ad82 100644 --- a/platform/debug/HardIOWindow.c +++ b/platform/debug/HardIOWindow.c @@ -918,7 +918,7 @@ static void ComboReg_changed(GtkComboBox *widget, gpointer data) static void CheckRegData_toggled(GtkToggleButton *widget, gpointer data) { - int mask = 1 << (int)data; + int mask = 1 << GPOINTER_TO_INT(data); uint8_t din; if (HardIOWindow_InConfigs) return; @@ -944,7 +944,7 @@ static void HardIOW_RefreshNow(GtkWidget *widget, gpointer data) static void HardIOW_Refresh(GtkWidget *widget, gpointer data) { - int val, index = (int)data; + int val, index = GPOINTER_TO_INT(data); static int lastrefrindex = -2; if (lastrefrindex == index) return; @@ -976,28 +976,28 @@ static gboolean HardIOWindow_state_event(GtkWidget *widget, GdkEventWindowState static GtkItemFactoryEntry HardIOWindow_MenuItems[] = { { "/_Debugger", NULL, NULL, 0, "" }, - { "/Debugger/Run full speed", "F5", Menu_Debug_RunFull, 0, "" }, - { "/Debugger/Run debug frames (Sound)", "F5", Menu_Debug_RunDFrameSnd, 0, "" }, - { "/Debugger/Run debug frames", "F5", Menu_Debug_RunDFrame, 0, "" }, - { "/Debugger/Run debug steps", "F3", Menu_Debug_RunDStep, 0, "" }, - { "/Debugger/Single frame", "F4", Menu_Debug_SingleFrame, 0, "" }, - { "/Debugger/Single step", "F3", Menu_Debug_SingleStep, 0, "" }, - { "/Debugger/Step skip", "F3", Menu_Debug_StepSkip, 0, "" }, - { "/Debugger/Stop", "F2", Menu_Debug_Stop, 0, "" }, + { "/Debugger/Run full speed", "F5", (GtkItemFactoryCallback)Menu_Debug_RunFull, 0, "" }, + { "/Debugger/Run debug frames (Sound)", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrameSnd, 0, "" }, + { "/Debugger/Run debug frames", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrame, 0, "" }, + { "/Debugger/Run debug steps", "F3", (GtkItemFactoryCallback)Menu_Debug_RunDStep, 0, "" }, + { "/Debugger/Single frame", "F4", (GtkItemFactoryCallback)Menu_Debug_SingleFrame, 0, "" }, + { "/Debugger/Single step", "F3", (GtkItemFactoryCallback)Menu_Debug_SingleStep, 0, "" }, + { "/Debugger/Step skip", "F3", (GtkItemFactoryCallback)Menu_Debug_StepSkip, 0, "" }, + { "/Debugger/Stop", "F2", (GtkItemFactoryCallback)Menu_Debug_Stop, 0, "" }, { "/_Refresh", NULL, NULL, 0, "" }, - { "/Refresh/Now!", NULL, HardIOW_RefreshNow, 0, "" }, + { "/Refresh/Now!", NULL, (GtkItemFactoryCallback)HardIOW_RefreshNow, 0, "" }, { "/Refresh/sep1", NULL, NULL, 0, "" }, - { "/Refresh/100% 72fps", NULL, HardIOW_Refresh, 0, "" }, - { "/Refresh/ 50% 36fps", NULL, HardIOW_Refresh, 1, "/Refresh/100% 72fps" }, - { "/Refresh/ 33% 24fps", NULL, HardIOW_Refresh, 2, "/Refresh/100% 72fps" }, - { "/Refresh/ 25% 18fps", NULL, HardIOW_Refresh, 3, "/Refresh/100% 72fps" }, - { "/Refresh/ 17% 12fps", NULL, HardIOW_Refresh, 5, "/Refresh/100% 72fps" }, - { "/Refresh/ 12% 9fps", NULL, HardIOW_Refresh, 7, "/Refresh/100% 72fps" }, - { "/Refresh/ 8% 6fps", NULL, HardIOW_Refresh, 11, "/Refresh/100% 72fps" }, - { "/Refresh/ 3% 2fps", NULL, HardIOW_Refresh, 35, "/Refresh/100% 72fps" }, - { "/Refresh/ 1% 1fps", NULL, HardIOW_Refresh, 71, "/Refresh/100% 72fps" }, - { "/Refresh/Custom...", NULL, HardIOW_Refresh, -1, "/Refresh/100% 72fps" }, + { "/Refresh/100% 72fps", NULL, (GtkItemFactoryCallback)HardIOW_Refresh, 0, "" }, + { "/Refresh/ 50% 36fps", NULL, (GtkItemFactoryCallback)HardIOW_Refresh, 1, "/Refresh/100% 72fps" }, + { "/Refresh/ 33% 24fps", NULL, (GtkItemFactoryCallback)HardIOW_Refresh, 2, "/Refresh/100% 72fps" }, + { "/Refresh/ 25% 18fps", NULL, (GtkItemFactoryCallback)HardIOW_Refresh, 3, "/Refresh/100% 72fps" }, + { "/Refresh/ 17% 12fps", NULL, (GtkItemFactoryCallback)HardIOW_Refresh, 5, "/Refresh/100% 72fps" }, + { "/Refresh/ 12% 9fps", NULL, (GtkItemFactoryCallback)HardIOW_Refresh, 7, "/Refresh/100% 72fps" }, + { "/Refresh/ 8% 6fps", NULL, (GtkItemFactoryCallback)HardIOW_Refresh, 11, "/Refresh/100% 72fps" }, + { "/Refresh/ 3% 2fps", NULL, (GtkItemFactoryCallback)HardIOW_Refresh, 35, "/Refresh/100% 72fps" }, + { "/Refresh/ 1% 1fps", NULL, (GtkItemFactoryCallback)HardIOW_Refresh, 71, "/Refresh/100% 72fps" }, + { "/Refresh/Custom...", NULL, (GtkItemFactoryCallback)HardIOW_Refresh, -1, "/Refresh/100% 72fps" }, }; static gint HardIOWindow_MenuItemsNum = sizeof(HardIOWindow_MenuItems) / sizeof(*HardIOWindow_MenuItems); @@ -1054,7 +1054,7 @@ int HardIOWindow_Create(void) gtk_widget_show(GTK_WIDGET(ComboReg)); for (i=0; i<8; i++) { CheckRegData[i] = GTK_TOGGLE_BUTTON(gtk_check_button_new_with_label("???")); - g_signal_connect(CheckRegData[i], "toggled", G_CALLBACK(CheckRegData_toggled), (gpointer)(7-i)); + g_signal_connect(CheckRegData[i], "toggled", G_CALLBACK(CheckRegData_toggled), GINT_TO_POINTER(7-i)); gtk_toggle_button_set_mode(CheckRegData[i], TRUE); gtk_box_pack_start(VBox2, GTK_WIDGET(CheckRegData[i]), FALSE, TRUE, 0); gtk_widget_show(GTK_WIDGET(CheckRegData[i])); diff --git a/platform/debug/IRQWindow.c b/platform/debug/IRQWindow.c index 9fdd30b..984c528 100644 --- a/platform/debug/IRQWindow.c +++ b/platform/debug/IRQWindow.c @@ -148,7 +148,7 @@ static void IRQWindow_Render(int force) static void ComboPri_changed(GtkComboBox *widget, gpointer data) { if (IRQWindow_InConfigs) return; - switch((int)data) { + switch(GPOINTER_TO_INT(data)) { case 0: PMR_IRQ_PRI1 &= ~0xC0; PMR_IRQ_PRI1 |= gtk_combo_box_get_active(ComboPri[0]) << 6; break; @@ -185,7 +185,7 @@ static void CheckEna_toggled(GtkToggleButton *togglebutton, gpointer data) { uint8_t regn, mask; if (IRQWindow_InConfigs) return; - switch ((int)data) { + switch (GPOINTER_TO_INT(data)) { case 0: regn = 1; mask = 0x80; break; case 1: regn = 1; mask = 0x40; break; case 2: regn = 1; mask = 0x20; break; @@ -238,7 +238,7 @@ static void CheckAct_toggled(GtkToggleButton *togglebutton, gpointer data) { uint8_t regn, mask; if (IRQWindow_InConfigs) return; - switch ((int)data) { + switch (GPOINTER_TO_INT(data)) { case 0: regn = 1; mask = 0x80; break; case 1: regn = 1; mask = 0x40; break; case 2: regn = 1; mask = 0x20; break; @@ -351,7 +351,7 @@ static void IRQW_RefreshNow(GtkWidget *widget, gpointer data) static void IRQW_Refresh(GtkWidget *widget, gpointer data) { - int val, index = (int)data; + int val, index = GPOINTER_TO_INT(data); static int lastrefrindex = -2; if (lastrefrindex == index) return; @@ -383,35 +383,35 @@ static gboolean IRQWindow_state_event(GtkWidget *widget, GdkEventWindowState *ev static GtkItemFactoryEntry IRQWindow_MenuItems[] = { { "/_View", NULL, NULL, 0, "" }, - { "/View/IRQ Priority", NULL, IRQW_View_Priority, 0, "" }, - { "/View/IRQ Enable", NULL, IRQW_View_Enable, 0, "" }, - { "/View/IRQ Active", NULL, IRQW_View_Active, 0, "" }, + { "/View/IRQ Priority", NULL, (GtkItemFactoryCallback)IRQW_View_Priority, 0, "" }, + { "/View/IRQ Enable", NULL, (GtkItemFactoryCallback)IRQW_View_Enable, 0, "" }, + { "/View/IRQ Active", NULL, (GtkItemFactoryCallback)IRQW_View_Active, 0, "" }, { "/View/sep1", NULL, NULL, 0, "" }, - { "/View/Frames in single-row", NULL, IRQW_View_Frame1Row, 0, "" }, + { "/View/Frames in single-row", NULL, (GtkItemFactoryCallback)IRQW_View_Frame1Row, 0, "" }, { "/_Debugger", NULL, NULL, 0, "" }, - { "/Debugger/Run full speed", "F5", Menu_Debug_RunFull, 0, "" }, - { "/Debugger/Run debug frames (Sound)", "F5", Menu_Debug_RunDFrameSnd, 0, "" }, - { "/Debugger/Run debug frames", "F5", Menu_Debug_RunDFrame, 0, "" }, - { "/Debugger/Run debug steps", "F3", Menu_Debug_RunDStep, 0, "" }, - { "/Debugger/Single frame", "F4", Menu_Debug_SingleFrame, 0, "" }, - { "/Debugger/Single step", "F3", Menu_Debug_SingleStep, 0, "" }, - { "/Debugger/Step skip", "F3", Menu_Debug_StepSkip, 0, "" }, - { "/Debugger/Stop", "F2", Menu_Debug_Stop, 0, "" }, + { "/Debugger/Run full speed", "F5", (GtkItemFactoryCallback)Menu_Debug_RunFull, 0, "" }, + { "/Debugger/Run debug frames (Sound)", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrameSnd, 0, "" }, + { "/Debugger/Run debug frames", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrame, 0, "" }, + { "/Debugger/Run debug steps", "F3", (GtkItemFactoryCallback)Menu_Debug_RunDStep, 0, "" }, + { "/Debugger/Single frame", "F4", (GtkItemFactoryCallback)Menu_Debug_SingleFrame, 0, "" }, + { "/Debugger/Single step", "F3", (GtkItemFactoryCallback)Menu_Debug_SingleStep, 0, "" }, + { "/Debugger/Step skip", "F3", (GtkItemFactoryCallback)Menu_Debug_StepSkip, 0, "" }, + { "/Debugger/Stop", "F2", (GtkItemFactoryCallback)Menu_Debug_Stop, 0, "" }, { "/_Refresh", NULL, NULL, 0, "" }, - { "/Refresh/Now!", NULL, IRQW_RefreshNow, 0, "" }, + { "/Refresh/Now!", NULL, (GtkItemFactoryCallback)IRQW_RefreshNow, 0, "" }, { "/Refresh/sep1", NULL, NULL, 0, "" }, - { "/Refresh/100% 72fps", NULL, IRQW_Refresh, 0, "" }, - { "/Refresh/ 50% 36fps", NULL, IRQW_Refresh, 1, "/Refresh/100% 72fps" }, - { "/Refresh/ 33% 24fps", NULL, IRQW_Refresh, 2, "/Refresh/100% 72fps" }, - { "/Refresh/ 25% 18fps", NULL, IRQW_Refresh, 3, "/Refresh/100% 72fps" }, - { "/Refresh/ 17% 12fps", NULL, IRQW_Refresh, 5, "/Refresh/100% 72fps" }, - { "/Refresh/ 12% 9fps", NULL, IRQW_Refresh, 7, "/Refresh/100% 72fps" }, - { "/Refresh/ 8% 6fps", NULL, IRQW_Refresh, 11, "/Refresh/100% 72fps" }, - { "/Refresh/ 3% 2fps", NULL, IRQW_Refresh, 35, "/Refresh/100% 72fps" }, - { "/Refresh/ 1% 1fps", NULL, IRQW_Refresh, 71, "/Refresh/100% 72fps" }, - { "/Refresh/Custom...", NULL, IRQW_Refresh, -1, "/Refresh/100% 72fps" }, + { "/Refresh/100% 72fps", NULL, (GtkItemFactoryCallback)IRQW_Refresh, 0, "" }, + { "/Refresh/ 50% 36fps", NULL, (GtkItemFactoryCallback)IRQW_Refresh, 1, "/Refresh/100% 72fps" }, + { "/Refresh/ 33% 24fps", NULL, (GtkItemFactoryCallback)IRQW_Refresh, 2, "/Refresh/100% 72fps" }, + { "/Refresh/ 25% 18fps", NULL, (GtkItemFactoryCallback)IRQW_Refresh, 3, "/Refresh/100% 72fps" }, + { "/Refresh/ 17% 12fps", NULL, (GtkItemFactoryCallback)IRQW_Refresh, 5, "/Refresh/100% 72fps" }, + { "/Refresh/ 12% 9fps", NULL, (GtkItemFactoryCallback)IRQW_Refresh, 7, "/Refresh/100% 72fps" }, + { "/Refresh/ 8% 6fps", NULL, (GtkItemFactoryCallback)IRQW_Refresh, 11, "/Refresh/100% 72fps" }, + { "/Refresh/ 3% 2fps", NULL, (GtkItemFactoryCallback)IRQW_Refresh, 35, "/Refresh/100% 72fps" }, + { "/Refresh/ 1% 1fps", NULL, (GtkItemFactoryCallback)IRQW_Refresh, 71, "/Refresh/100% 72fps" }, + { "/Refresh/Custom...", NULL, (GtkItemFactoryCallback)IRQW_Refresh, -1, "/Refresh/100% 72fps" }, }; static gint IRQWindow_MenuItemsNum = sizeof(IRQWindow_MenuItems) / sizeof(*IRQWindow_MenuItems); @@ -520,7 +520,7 @@ int IRQWindow_Create(void) gtk_table_attach(TablePri, GTK_WIDGET(LabelsPri[i]), 0, 1, i, i+1, GTK_FILL, GTK_FILL, 2, 2); gtk_widget_show(GTK_WIDGET(LabelsPri[i])); ComboPri[i] = GTK_COMBO_BOX(gtk_combo_box_new_text()); - g_signal_connect(ComboPri[i], "changed", G_CALLBACK(ComboPri_changed), (gpointer)i); + g_signal_connect(ComboPri[i], "changed", G_CALLBACK(ComboPri_changed), GINT_TO_POINTER(i)); LoadPriOnCombo(ComboPri[i]); gtk_table_attach(TablePri, GTK_WIDGET(ComboPri[i]), 1, 2, i, i+1, GTK_FILL | GTK_EXPAND, GTK_FILL, 2, 2); gtk_widget_show(GTK_WIDGET(ComboPri[i])); @@ -535,7 +535,7 @@ int IRQWindow_Create(void) gtk_widget_show(GTK_WIDGET(VBoxEna)); for (i=0; i<27; i++) { CheckEna[i] = GTK_TOGGLE_BUTTON(gtk_check_button_new_with_label(IRQEnaAct_Txt[i])); - g_signal_connect(CheckEna[i], "toggled", G_CALLBACK(CheckEna_toggled), (gpointer)i); + g_signal_connect(CheckEna[i], "toggled", G_CALLBACK(CheckEna_toggled), GINT_TO_POINTER(i)); gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(CheckEna[i]), TRUE); gtk_box_pack_start(VBoxEna, GTK_WIDGET(CheckEna[i]), FALSE, TRUE, 0); gtk_widget_show(GTK_WIDGET(CheckEna[i])); @@ -550,7 +550,7 @@ int IRQWindow_Create(void) gtk_widget_show(GTK_WIDGET(VBoxAct)); for (i=0; i<27; i++) { CheckAct[i] = GTK_TOGGLE_BUTTON(gtk_check_button_new_with_label(IRQEnaAct_Txt[i])); - g_signal_connect(CheckAct[i], "toggled", G_CALLBACK(CheckAct_toggled), (gpointer)i); + g_signal_connect(CheckAct[i], "toggled", G_CALLBACK(CheckAct_toggled), GINT_TO_POINTER(i)); gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(CheckAct[i]), TRUE); gtk_box_pack_start(VBoxAct, GTK_WIDGET(CheckAct[i]), FALSE, TRUE, 0); gtk_widget_show(GTK_WIDGET(CheckAct[i])); diff --git a/platform/debug/MemWindow.c b/platform/debug/MemWindow.c index 628d823..3083cb6 100644 --- a/platform/debug/MemWindow.c +++ b/platform/debug/MemWindow.c @@ -287,7 +287,7 @@ static void MemW_Goto_Address(GtkWidget *widget, gpointer data) static void MemW_Goto_SAddress(GtkWidget *widget, gpointer data) { - int addr = (int)data; + int addr = GPOINTER_TO_INT(data); sgtkx_drawing_view_sbvalue(&MemView, addr/16); } @@ -585,7 +585,7 @@ static void MemW_RefreshNow(GtkWidget *widget, gpointer data) static void MemW_Refresh(GtkWidget *widget, gpointer data) { - int val, index = (int)data; + int val, index = GPOINTER_TO_INT(data); static int lastrefrindex = -2; if (lastrefrindex == index) return; @@ -617,52 +617,52 @@ static gboolean MemWindow_state_event(GtkWidget *widget, GdkEventWindowState *ev static GtkItemFactoryEntry MemWindow_MenuItems[] = { { "/_Go to", NULL, NULL, 0, "" }, - { "/Go to/_Address...", "G", MemW_Goto_Address, 0, "" }, - { "/Go to/_BIOS top", "B", MemW_Goto_SAddress, 0x0000, "" }, - { "/Go to/RA_M top", "M", MemW_Goto_SAddress, 0x1000, "" }, - { "/Go to/_Hardware IO top", "H", MemW_Goto_SAddress, 0x2000, "" }, - { "/Go to/Cartridge R_OM top", "O", MemW_Goto_SAddress, 0x2100, "" }, - { "/Go to/Cartridge _Bank n top", "B", MemW_Goto_BAddress, 0, "" }, + { "/Go to/_Address...", "G", (GtkItemFactoryCallback)MemW_Goto_Address, 0, "" }, + { "/Go to/_BIOS top", "B", (GtkItemFactoryCallback)MemW_Goto_SAddress, 0x0000, "" }, + { "/Go to/RA_M top", "M", (GtkItemFactoryCallback)MemW_Goto_SAddress, 0x1000, "" }, + { "/Go to/_Hardware IO top", "H", (GtkItemFactoryCallback)MemW_Goto_SAddress, 0x2000, "" }, + { "/Go to/Cartridge R_OM top", "O", (GtkItemFactoryCallback)MemW_Goto_SAddress, 0x2100, "" }, + { "/Go to/Cartridge _Bank n top", "B", (GtkItemFactoryCallback)MemW_Goto_BAddress, 0, "" }, { "/_Break", NULL, NULL, 0, "" }, - { "/Break/_Add Watchpoint at...", "W", MemW_Break_AddWPAt, 0, "" }, - { "/Break/_Delete all watchpoints", NULL, MemW_Break_DelAllWP, 0, "" }, + { "/Break/_Add Watchpoint at...", "W", (GtkItemFactoryCallback)MemW_Break_AddWPAt, 0, "" }, + { "/Break/_Delete all watchpoints", NULL, (GtkItemFactoryCallback)MemW_Break_DelAllWP, 0, "" }, { "/_Character set", NULL, NULL, 0, "" }, - { "/Character set/_Default", "C", MemW_CharSet_Default, 0, "" }, - { "/Character set/From _ROM...", "C", MemW_CharSet_FromROM, 0, "" }, - { "/Character set/From _file...", "C",MemW_CharSet_FromFile, 0, "" }, + { "/Character set/_Default", "C", (GtkItemFactoryCallback)MemW_CharSet_Default, 0, "" }, + { "/Character set/From _ROM...", "C", (GtkItemFactoryCallback)MemW_CharSet_FromROM, 0, "" }, + { "/Character set/From _file...", "C",(GtkItemFactoryCallback)MemW_CharSet_FromFile, 0, "" }, { "/_Memory data", NULL, NULL, 0, "" }, - { "/Memory data/_Import from file...", "I", MemW_ImportData, 0, "" }, - { "/Memory data/_Export to file...", "E", MemW_ExportData, 0, "" }, - { "/Memory data/_Copy block", "V", MemW_CopyData, 0, "" }, - { "/Memory data/_Fill 8-bits value", "X", MemW_FillData8, 0, "" }, - { "/Memory data/_Fill 16-bits value", "Y", MemW_FillData16, 0, "" }, + { "/Memory data/_Import from file...", "I", (GtkItemFactoryCallback)MemW_ImportData, 0, "" }, + { "/Memory data/_Export to file...", "E", (GtkItemFactoryCallback)MemW_ExportData, 0, "" }, + { "/Memory data/_Copy block", "V", (GtkItemFactoryCallback)MemW_CopyData, 0, "" }, + { "/Memory data/_Fill 8-bits value", "X", (GtkItemFactoryCallback)MemW_FillData8, 0, "" }, + { "/Memory data/_Fill 16-bits value", "Y", (GtkItemFactoryCallback)MemW_FillData16, 0, "" }, { "/_Debugger", NULL, NULL, 0, "" }, - { "/Debugger/Run full speed", "F5", Menu_Debug_RunFull, 0, "" }, - { "/Debugger/Run debug frames (Sound)", "F5", Menu_Debug_RunDFrameSnd, 0, "" }, - { "/Debugger/Run debug frames", "F5", Menu_Debug_RunDFrame, 0, "" }, - { "/Debugger/Run debug steps", "F3", Menu_Debug_RunDStep, 0, "" }, - { "/Debugger/Single frame", "F4", Menu_Debug_SingleFrame, 0, "" }, - { "/Debugger/Single step", "F3", Menu_Debug_SingleStep, 0, "" }, - { "/Debugger/Step skip", "F3", Menu_Debug_StepSkip, 0, "" }, - { "/Debugger/Stop", "F2", Menu_Debug_Stop, 0, "" }, + { "/Debugger/Run full speed", "F5", (GtkItemFactoryCallback)Menu_Debug_RunFull, 0, "" }, + { "/Debugger/Run debug frames (Sound)", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrameSnd, 0, "" }, + { "/Debugger/Run debug frames", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrame, 0, "" }, + { "/Debugger/Run debug steps", "F3", (GtkItemFactoryCallback)Menu_Debug_RunDStep, 0, "" }, + { "/Debugger/Single frame", "F4", (GtkItemFactoryCallback)Menu_Debug_SingleFrame, 0, "" }, + { "/Debugger/Single step", "F3", (GtkItemFactoryCallback)Menu_Debug_SingleStep, 0, "" }, + { "/Debugger/Step skip", "F3", (GtkItemFactoryCallback)Menu_Debug_StepSkip, 0, "" }, + { "/Debugger/Stop", "F2", (GtkItemFactoryCallback)Menu_Debug_Stop, 0, "" }, { "/_Refresh", NULL, NULL, 0, "" }, - { "/Refresh/Now!", NULL, MemW_RefreshNow, 0, "" }, + { "/Refresh/Now!", NULL, (GtkItemFactoryCallback)MemW_RefreshNow, 0, "" }, { "/Refresh/sep1", NULL, NULL, 0, "" }, - { "/Refresh/100% 72fps", NULL, MemW_Refresh, 0, "" }, - { "/Refresh/ 50% 36fps", NULL, MemW_Refresh, 1, "/Refresh/100% 72fps" }, - { "/Refresh/ 33% 24fps", NULL, MemW_Refresh, 2, "/Refresh/100% 72fps" }, - { "/Refresh/ 25% 18fps", NULL, MemW_Refresh, 3, "/Refresh/100% 72fps" }, - { "/Refresh/ 17% 12fps", NULL, MemW_Refresh, 5, "/Refresh/100% 72fps" }, - { "/Refresh/ 12% 9fps", NULL, MemW_Refresh, 7, "/Refresh/100% 72fps" }, - { "/Refresh/ 8% 6fps", NULL, MemW_Refresh, 11, "/Refresh/100% 72fps" }, - { "/Refresh/ 3% 2fps", NULL, MemW_Refresh, 35, "/Refresh/100% 72fps" }, - { "/Refresh/ 1% 1fps", NULL, MemW_Refresh, 71, "/Refresh/100% 72fps" }, - { "/Refresh/Custom...", NULL, MemW_Refresh, -1, "/Refresh/100% 72fps" }, + { "/Refresh/100% 72fps", NULL, (GtkItemFactoryCallback)MemW_Refresh, 0, "" }, + { "/Refresh/ 50% 36fps", NULL, (GtkItemFactoryCallback)MemW_Refresh, 1, "/Refresh/100% 72fps" }, + { "/Refresh/ 33% 24fps", NULL, (GtkItemFactoryCallback)MemW_Refresh, 2, "/Refresh/100% 72fps" }, + { "/Refresh/ 25% 18fps", NULL, (GtkItemFactoryCallback)MemW_Refresh, 3, "/Refresh/100% 72fps" }, + { "/Refresh/ 17% 12fps", NULL, (GtkItemFactoryCallback)MemW_Refresh, 5, "/Refresh/100% 72fps" }, + { "/Refresh/ 12% 9fps", NULL, (GtkItemFactoryCallback)MemW_Refresh, 7, "/Refresh/100% 72fps" }, + { "/Refresh/ 8% 6fps", NULL, (GtkItemFactoryCallback)MemW_Refresh, 11, "/Refresh/100% 72fps" }, + { "/Refresh/ 3% 2fps", NULL, (GtkItemFactoryCallback)MemW_Refresh, 35, "/Refresh/100% 72fps" }, + { "/Refresh/ 1% 1fps", NULL, (GtkItemFactoryCallback)MemW_Refresh, 71, "/Refresh/100% 72fps" }, + { "/Refresh/Custom...", NULL, (GtkItemFactoryCallback)MemW_Refresh, -1, "/Refresh/100% 72fps" }, }; static gint MemWindow_MenuItemsNum = sizeof(MemWindow_MenuItems) / sizeof(*MemWindow_MenuItems); diff --git a/platform/debug/MiscWindow.c b/platform/debug/MiscWindow.c index b3dc133..bb80a77 100644 --- a/platform/debug/MiscWindow.c +++ b/platform/debug/MiscWindow.c @@ -303,7 +303,7 @@ static void MiscW_RefreshNow(GtkWidget *widget, gpointer data) static void MiscW_Refresh(GtkWidget *widget, gpointer data) { - int val, index = (int)data; + int val, index = GPOINTER_TO_INT(data); static int lastrefrindex = -2; if (lastrefrindex == index) return; @@ -335,35 +335,35 @@ static gboolean MiscWindow_state_event(GtkWidget *widget, GdkEventWindowState *e static GtkItemFactoryEntry MiscWindow_MenuItems[] = { { "/_View", NULL, NULL, 0, "" }, - { "/View/PRC Status", NULL, MiscW_View_PRC, 0, "" }, - { "/View/Color PRC Status", NULL, MiscW_View_ColorPRC, 0, "" }, - { "/View/LCD Internals", NULL, MiscW_View_LCD, 0, "" }, - { "/View/EEPROM Internals", NULL, MiscW_View_EEPROM, 0, "" }, - { "/View/Multicart Internals", NULL, MiscW_View_Multicart, 0, "" }, + { "/View/PRC Status", NULL, (GtkItemFactoryCallback)MiscW_View_PRC, 0, "" }, + { "/View/Color PRC Status", NULL, (GtkItemFactoryCallback)MiscW_View_ColorPRC, 0, "" }, + { "/View/LCD Internals", NULL, (GtkItemFactoryCallback)MiscW_View_LCD, 0, "" }, + { "/View/EEPROM Internals", NULL, (GtkItemFactoryCallback)MiscW_View_EEPROM, 0, "" }, + { "/View/Multicart Internals", NULL, (GtkItemFactoryCallback)MiscW_View_Multicart, 0, "" }, { "/_Debugger", NULL, NULL, 0, "" }, - { "/Debugger/Run full speed", "F5", Menu_Debug_RunFull, 0, "" }, - { "/Debugger/Run debug frames (Sound)", "F5", Menu_Debug_RunDFrameSnd, 0, "" }, - { "/Debugger/Run debug frames", "F5", Menu_Debug_RunDFrame, 0, "" }, - { "/Debugger/Run debug steps", "F3", Menu_Debug_RunDStep, 0, "" }, - { "/Debugger/Single frame", "F4", Menu_Debug_SingleFrame, 0, "" }, - { "/Debugger/Single step", "F3", Menu_Debug_SingleStep, 0, "" }, - { "/Debugger/Step skip", "F3", Menu_Debug_StepSkip, 0, "" }, - { "/Debugger/Stop", "F2", Menu_Debug_Stop, 0, "" }, + { "/Debugger/Run full speed", "F5", (GtkItemFactoryCallback)Menu_Debug_RunFull, 0, "" }, + { "/Debugger/Run debug frames (Sound)", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrameSnd, 0, "" }, + { "/Debugger/Run debug frames", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrame, 0, "" }, + { "/Debugger/Run debug steps", "F3", (GtkItemFactoryCallback)Menu_Debug_RunDStep, 0, "" }, + { "/Debugger/Single frame", "F4", (GtkItemFactoryCallback)Menu_Debug_SingleFrame, 0, "" }, + { "/Debugger/Single step", "F3", (GtkItemFactoryCallback)Menu_Debug_SingleStep, 0, "" }, + { "/Debugger/Step skip", "F3", (GtkItemFactoryCallback)Menu_Debug_StepSkip, 0, "" }, + { "/Debugger/Stop", "F2", (GtkItemFactoryCallback)Menu_Debug_Stop, 0, "" }, { "/_Refresh", NULL, NULL, 0, "" }, - { "/Refresh/Now!", NULL, MiscW_RefreshNow, 0, "" }, + { "/Refresh/Now!", NULL, (GtkItemFactoryCallback)MiscW_RefreshNow, 0, "" }, { "/Refresh/sep1", NULL, NULL, 0, "" }, - { "/Refresh/100% 72fps", NULL, MiscW_Refresh, 0, "" }, - { "/Refresh/ 50% 36fps", NULL, MiscW_Refresh, 1, "/Refresh/100% 72fps" }, - { "/Refresh/ 33% 24fps", NULL, MiscW_Refresh, 2, "/Refresh/100% 72fps" }, - { "/Refresh/ 25% 18fps", NULL, MiscW_Refresh, 3, "/Refresh/100% 72fps" }, - { "/Refresh/ 17% 12fps", NULL, MiscW_Refresh, 5, "/Refresh/100% 72fps" }, - { "/Refresh/ 12% 9fps", NULL, MiscW_Refresh, 7, "/Refresh/100% 72fps" }, - { "/Refresh/ 8% 6fps", NULL, MiscW_Refresh, 11, "/Refresh/100% 72fps" }, - { "/Refresh/ 3% 2fps", NULL, MiscW_Refresh, 35, "/Refresh/100% 72fps" }, - { "/Refresh/ 1% 1fps", NULL, MiscW_Refresh, 71, "/Refresh/100% 72fps" }, - { "/Refresh/Custom...", NULL, MiscW_Refresh, -1, "/Refresh/100% 72fps" }, + { "/Refresh/100% 72fps", NULL, (GtkItemFactoryCallback)MiscW_Refresh, 0, "" }, + { "/Refresh/ 50% 36fps", NULL, (GtkItemFactoryCallback)MiscW_Refresh, 1, "/Refresh/100% 72fps" }, + { "/Refresh/ 33% 24fps", NULL, (GtkItemFactoryCallback)MiscW_Refresh, 2, "/Refresh/100% 72fps" }, + { "/Refresh/ 25% 18fps", NULL, (GtkItemFactoryCallback)MiscW_Refresh, 3, "/Refresh/100% 72fps" }, + { "/Refresh/ 17% 12fps", NULL, (GtkItemFactoryCallback)MiscW_Refresh, 5, "/Refresh/100% 72fps" }, + { "/Refresh/ 12% 9fps", NULL, (GtkItemFactoryCallback)MiscW_Refresh, 7, "/Refresh/100% 72fps" }, + { "/Refresh/ 8% 6fps", NULL, (GtkItemFactoryCallback)MiscW_Refresh, 11, "/Refresh/100% 72fps" }, + { "/Refresh/ 3% 2fps", NULL, (GtkItemFactoryCallback)MiscW_Refresh, 35, "/Refresh/100% 72fps" }, + { "/Refresh/ 1% 1fps", NULL, (GtkItemFactoryCallback)MiscW_Refresh, 71, "/Refresh/100% 72fps" }, + { "/Refresh/Custom...", NULL, (GtkItemFactoryCallback)MiscW_Refresh, -1, "/Refresh/100% 72fps" }, }; static gint MiscWindow_MenuItemsNum = sizeof(MiscWindow_MenuItems) / sizeof(*MiscWindow_MenuItems); diff --git a/platform/debug/PRCMapWindow.c b/platform/debug/PRCMapWindow.c index 8992520..9454c30 100644 --- a/platform/debug/PRCMapWindow.c +++ b/platform/debug/PRCMapWindow.c @@ -328,7 +328,7 @@ static void PRCMapW_Negative(GtkWidget *widget, gpointer data) static void PRCMapW_Zoom(GtkWidget *widget, gpointer data) { if (PRCMapWindow_InConfigs) return; - dclc_zoom_prcmap = (int)data; + dclc_zoom_prcmap = GPOINTER_TO_INT(data); FullRedraw = 1; PRCMapWindow_Refresh(1); } @@ -341,7 +341,7 @@ static void PRCMapW_RefreshNow(GtkWidget *widget, gpointer data) static void PRCMapW_Refresh(GtkWidget *widget, gpointer data) { - int val, index = (int)data; + int val, index = GPOINTER_TO_INT(data); static int lastrefrindex = -2; if (lastrefrindex == index) return; @@ -373,42 +373,42 @@ static gboolean PRCMapWindow_state_event(GtkWidget *widget, GdkEventWindowState static GtkItemFactoryEntry PRCMapWindow_MenuItems[] = { { "/_View", NULL, NULL, 0, "" }, - { "/View/Show Visible", NULL, PRCMapW_ShowVisible, 0, "" }, - { "/View/Show Grid", NULL, PRCMapW_ShowGrid, 0, "" }, - { "/View/Show Negative", NULL, PRCMapW_Negative, 0, "" }, + { "/View/Show Visible", NULL, (GtkItemFactoryCallback)PRCMapW_ShowVisible, 0, "" }, + { "/View/Show Grid", NULL, (GtkItemFactoryCallback)PRCMapW_ShowGrid, 0, "" }, + { "/View/Show Negative", NULL, (GtkItemFactoryCallback)PRCMapW_Negative, 0, "" }, { "/View/Zoom", NULL, NULL, 0, "" }, - { "/View/Zoom/100%", NULL, PRCMapW_Zoom, 1, "" }, - { "/View/Zoom/200%", NULL, PRCMapW_Zoom, 2, "/View/Zoom/100%" }, - { "/View/Zoom/300%", NULL, PRCMapW_Zoom, 3, "/View/Zoom/100%" }, - { "/View/Zoom/400%", NULL, PRCMapW_Zoom, 4, "/View/Zoom/100%" }, - { "/View/Zoom/500%", NULL, PRCMapW_Zoom, 5, "/View/Zoom/100%" }, - { "/View/Zoom/600%", NULL, PRCMapW_Zoom, 6, "/View/Zoom/100%" }, - { "/View/Zoom/700%", NULL, PRCMapW_Zoom, 7, "/View/Zoom/100%" }, - { "/View/Zoom/800%", NULL, PRCMapW_Zoom, 8, "/View/Zoom/100%" }, + { "/View/Zoom/100%", NULL, (GtkItemFactoryCallback)PRCMapW_Zoom, 1, "" }, + { "/View/Zoom/200%", NULL, (GtkItemFactoryCallback)PRCMapW_Zoom, 2, "/View/Zoom/100%" }, + { "/View/Zoom/300%", NULL, (GtkItemFactoryCallback)PRCMapW_Zoom, 3, "/View/Zoom/100%" }, + { "/View/Zoom/400%", NULL, (GtkItemFactoryCallback)PRCMapW_Zoom, 4, "/View/Zoom/100%" }, + { "/View/Zoom/500%", NULL, (GtkItemFactoryCallback)PRCMapW_Zoom, 5, "/View/Zoom/100%" }, + { "/View/Zoom/600%", NULL, (GtkItemFactoryCallback)PRCMapW_Zoom, 6, "/View/Zoom/100%" }, + { "/View/Zoom/700%", NULL, (GtkItemFactoryCallback)PRCMapW_Zoom, 7, "/View/Zoom/100%" }, + { "/View/Zoom/800%", NULL, (GtkItemFactoryCallback)PRCMapW_Zoom, 8, "/View/Zoom/100%" }, { "/_Debugger", NULL, NULL, 0, "" }, - { "/Debugger/Run full speed", "F5", Menu_Debug_RunFull, 0, "" }, - { "/Debugger/Run debug frames (Sound)", "F5", Menu_Debug_RunDFrameSnd, 0, "" }, - { "/Debugger/Run debug frames", "F5", Menu_Debug_RunDFrame, 0, "" }, - { "/Debugger/Run debug steps", "F3", Menu_Debug_RunDStep, 0, "" }, - { "/Debugger/Single frame", "F4", Menu_Debug_SingleFrame, 0, "" }, - { "/Debugger/Single step", "F3", Menu_Debug_SingleStep, 0, "" }, - { "/Debugger/Step skip", "F3", Menu_Debug_StepSkip, 0, "" }, - { "/Debugger/Stop", "F2", Menu_Debug_Stop, 0, "" }, + { "/Debugger/Run full speed", "F5", (GtkItemFactoryCallback)Menu_Debug_RunFull, 0, "" }, + { "/Debugger/Run debug frames (Sound)", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrameSnd, 0, "" }, + { "/Debugger/Run debug frames", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrame, 0, "" }, + { "/Debugger/Run debug steps", "F3", (GtkItemFactoryCallback)Menu_Debug_RunDStep, 0, "" }, + { "/Debugger/Single frame", "F4", (GtkItemFactoryCallback)Menu_Debug_SingleFrame, 0, "" }, + { "/Debugger/Single step", "F3", (GtkItemFactoryCallback)Menu_Debug_SingleStep, 0, "" }, + { "/Debugger/Step skip", "F3", (GtkItemFactoryCallback)Menu_Debug_StepSkip, 0, "" }, + { "/Debugger/Stop", "F2", (GtkItemFactoryCallback)Menu_Debug_Stop, 0, "" }, { "/_Refresh", NULL, NULL, 0, "" }, - { "/Refresh/Now!", NULL, PRCMapW_RefreshNow, 0, "" }, + { "/Refresh/Now!", NULL, (GtkItemFactoryCallback)PRCMapW_RefreshNow, 0, "" }, { "/Refresh/sep1", NULL, NULL, 0, "" }, - { "/Refresh/100% 72fps", NULL, PRCMapW_Refresh, 0, "" }, - { "/Refresh/ 50% 36fps", NULL, PRCMapW_Refresh, 1, "/Refresh/100% 72fps" }, - { "/Refresh/ 33% 24fps", NULL, PRCMapW_Refresh, 2, "/Refresh/100% 72fps" }, - { "/Refresh/ 25% 18fps", NULL, PRCMapW_Refresh, 3, "/Refresh/100% 72fps" }, - { "/Refresh/ 17% 12fps", NULL, PRCMapW_Refresh, 5, "/Refresh/100% 72fps" }, - { "/Refresh/ 12% 9fps", NULL, PRCMapW_Refresh, 7, "/Refresh/100% 72fps" }, - { "/Refresh/ 8% 6fps", NULL, PRCMapW_Refresh, 11, "/Refresh/100% 72fps" }, - { "/Refresh/ 3% 2fps", NULL, PRCMapW_Refresh, 35, "/Refresh/100% 72fps" }, - { "/Refresh/ 1% 1fps", NULL, PRCMapW_Refresh, 71, "/Refresh/100% 72fps" }, - { "/Refresh/Custom...", NULL, PRCMapW_Refresh, -1, "/Refresh/100% 72fps" }, + { "/Refresh/100% 72fps", NULL, (GtkItemFactoryCallback)PRCMapW_Refresh, 0, "" }, + { "/Refresh/ 50% 36fps", NULL, (GtkItemFactoryCallback)PRCMapW_Refresh, 1, "/Refresh/100% 72fps" }, + { "/Refresh/ 33% 24fps", NULL, (GtkItemFactoryCallback)PRCMapW_Refresh, 2, "/Refresh/100% 72fps" }, + { "/Refresh/ 25% 18fps", NULL, (GtkItemFactoryCallback)PRCMapW_Refresh, 3, "/Refresh/100% 72fps" }, + { "/Refresh/ 17% 12fps", NULL, (GtkItemFactoryCallback)PRCMapW_Refresh, 5, "/Refresh/100% 72fps" }, + { "/Refresh/ 12% 9fps", NULL, (GtkItemFactoryCallback)PRCMapW_Refresh, 7, "/Refresh/100% 72fps" }, + { "/Refresh/ 8% 6fps", NULL, (GtkItemFactoryCallback)PRCMapW_Refresh, 11, "/Refresh/100% 72fps" }, + { "/Refresh/ 3% 2fps", NULL, (GtkItemFactoryCallback)PRCMapW_Refresh, 35, "/Refresh/100% 72fps" }, + { "/Refresh/ 1% 1fps", NULL, (GtkItemFactoryCallback)PRCMapW_Refresh, 71, "/Refresh/100% 72fps" }, + { "/Refresh/Custom...", NULL, (GtkItemFactoryCallback)PRCMapW_Refresh, -1, "/Refresh/100% 72fps" }, }; static gint PRCMapWindow_MenuItemsNum = sizeof(PRCMapWindow_MenuItems) / sizeof(*PRCMapWindow_MenuItems); diff --git a/platform/debug/PRCSprWindow.c b/platform/debug/PRCSprWindow.c index 2c330fa..6a7211c 100644 --- a/platform/debug/PRCSprWindow.c +++ b/platform/debug/PRCSprWindow.c @@ -501,14 +501,14 @@ static void PRCSprW_Minimalist(GtkWidget *widget, gpointer data) static void PRCSprW_Zoom(GtkWidget *widget, gpointer data) { if (PRCSprWindow_InConfigs) return; - dclc_zoom_prcspr = (int)data; + dclc_zoom_prcspr = GPOINTER_TO_INT(data); FullRedraw = 1; PRCSprWindow_Refresh(1); } static void PRCSprW_Transparency(GtkWidget *widget, gpointer data) { - int number, index = (int)data; + int number, index = GPOINTER_TO_INT(data); static int lasttransindex = -2; if (lasttransindex == index) return; @@ -535,7 +535,7 @@ static void PRCSprW_RefreshNow(GtkWidget *widget, gpointer data) static void PRCSprW_Refresh(GtkWidget *widget, gpointer data) { - int val, index = (int)data; + int val, index = GPOINTER_TO_INT(data); static int lastrefrindex = -2; if (lastrefrindex == index) return; @@ -567,59 +567,59 @@ static gboolean PRCSprWindow_state_event(GtkWidget *widget, GdkEventWindowState static GtkItemFactoryEntry PRCSprWindow_MenuItems[] = { { "/_View", NULL, NULL, 0, "" }, - { "/View/Show hidden sprites", NULL, PRCSprW_ShowHSpr, 0, "" }, - { "/View/Minimalist view", NULL, PRCSprW_Minimalist, 0, "" }, + { "/View/Show hidden sprites", NULL, (GtkItemFactoryCallback)PRCSprW_ShowHSpr, 0, "" }, + { "/View/Minimalist view", NULL, (GtkItemFactoryCallback)PRCSprW_Minimalist, 0, "" }, { "/View/Zoom", NULL, NULL, 0, "" }, - { "/View/Zoom/100%", NULL, PRCSprW_Zoom, 1, "" }, - { "/View/Zoom/200%", NULL, PRCSprW_Zoom, 2, "/View/Zoom/100%" }, - { "/View/Zoom/300%", NULL, PRCSprW_Zoom, 3, "/View/Zoom/100%" }, - { "/View/Zoom/400%", NULL, PRCSprW_Zoom, 4, "/View/Zoom/100%" }, - { "/View/Zoom/500%", NULL, PRCSprW_Zoom, 5, "/View/Zoom/100%" }, - { "/View/Zoom/600%", NULL, PRCSprW_Zoom, 6, "/View/Zoom/100%" }, - { "/View/Zoom/700%", NULL, PRCSprW_Zoom, 7, "/View/Zoom/100%" }, - { "/View/Zoom/800%", NULL, PRCSprW_Zoom, 8, "/View/Zoom/100%" }, + { "/View/Zoom/100%", NULL, (GtkItemFactoryCallback)PRCSprW_Zoom, 1, "" }, + { "/View/Zoom/200%", NULL, (GtkItemFactoryCallback)PRCSprW_Zoom, 2, "/View/Zoom/100%" }, + { "/View/Zoom/300%", NULL, (GtkItemFactoryCallback)PRCSprW_Zoom, 3, "/View/Zoom/100%" }, + { "/View/Zoom/400%", NULL, (GtkItemFactoryCallback)PRCSprW_Zoom, 4, "/View/Zoom/100%" }, + { "/View/Zoom/500%", NULL, (GtkItemFactoryCallback)PRCSprW_Zoom, 5, "/View/Zoom/100%" }, + { "/View/Zoom/600%", NULL, (GtkItemFactoryCallback)PRCSprW_Zoom, 6, "/View/Zoom/100%" }, + { "/View/Zoom/700%", NULL, (GtkItemFactoryCallback)PRCSprW_Zoom, 7, "/View/Zoom/100%" }, + { "/View/Zoom/800%", NULL, (GtkItemFactoryCallback)PRCSprW_Zoom, 8, "/View/Zoom/100%" }, { "/View/Transparency", NULL, NULL, 0, "" }, - { "/View/Transparency/Pink", NULL, PRCSprW_Transparency, 0, "" }, - { "/View/Transparency/Red", NULL, PRCSprW_Transparency, 1, "/View/Transparency/Pink" }, - { "/View/Transparency/Green", NULL, PRCSprW_Transparency, 2, "/View/Transparency/Pink" }, - { "/View/Transparency/Blue", NULL, PRCSprW_Transparency, 3, "/View/Transparency/Pink" }, - { "/View/Transparency/Yellow", NULL, PRCSprW_Transparency, 4, "/View/Transparency/Pink" }, - { "/View/Transparency/Orange", NULL, PRCSprW_Transparency, 5, "/View/Transparency/Pink" }, - { "/View/Transparency/Purple", NULL, PRCSprW_Transparency, 6, "/View/Transparency/Pink" }, - { "/View/Transparency/Bright Red", NULL, PRCSprW_Transparency, 7, "/View/Transparency/Pink" }, - { "/View/Transparency/Bright Green", NULL, PRCSprW_Transparency, 8, "/View/Transparency/Pink" }, - { "/View/Transparency/Bright Blue", NULL, PRCSprW_Transparency, 9, "/View/Transparency/Pink" }, - { "/View/Transparency/Bright Yellow", NULL, PRCSprW_Transparency, 10, "/View/Transparency/Pink" }, - { "/View/Transparency/Cyan", NULL, PRCSprW_Transparency, 11, "/View/Transparency/Pink" }, - { "/View/Transparency/Black", NULL, PRCSprW_Transparency, 12, "/View/Transparency/Pink" }, - { "/View/Transparency/Grey", NULL, PRCSprW_Transparency, 13, "/View/Transparency/Pink" }, - { "/View/Transparency/Silver", NULL, PRCSprW_Transparency, 14, "/View/Transparency/Pink" }, - { "/View/Transparency/White", NULL, PRCSprW_Transparency, 15, "/View/Transparency/Pink" }, - { "/View/Transparency/Custom", NULL, PRCSprW_Transparency, -1, "/View/Transparency/Pink" }, + { "/View/Transparency/Pink", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 0, "" }, + { "/View/Transparency/Red", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 1, "/View/Transparency/Pink" }, + { "/View/Transparency/Green", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 2, "/View/Transparency/Pink" }, + { "/View/Transparency/Blue", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 3, "/View/Transparency/Pink" }, + { "/View/Transparency/Yellow", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 4, "/View/Transparency/Pink" }, + { "/View/Transparency/Orange", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 5, "/View/Transparency/Pink" }, + { "/View/Transparency/Purple", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 6, "/View/Transparency/Pink" }, + { "/View/Transparency/Bright Red", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 7, "/View/Transparency/Pink" }, + { "/View/Transparency/Bright Green", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 8, "/View/Transparency/Pink" }, + { "/View/Transparency/Bright Blue", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 9, "/View/Transparency/Pink" }, + { "/View/Transparency/Bright Yellow", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 10, "/View/Transparency/Pink" }, + { "/View/Transparency/Cyan", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 11, "/View/Transparency/Pink" }, + { "/View/Transparency/Black", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 12, "/View/Transparency/Pink" }, + { "/View/Transparency/Grey", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 13, "/View/Transparency/Pink" }, + { "/View/Transparency/Silver", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 14, "/View/Transparency/Pink" }, + { "/View/Transparency/White", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, 15, "/View/Transparency/Pink" }, + { "/View/Transparency/Custom", NULL, (GtkItemFactoryCallback)PRCSprW_Transparency, -1, "/View/Transparency/Pink" }, { "/_Debugger", NULL, NULL, 0, "" }, - { "/Debugger/Run full speed", "F5", Menu_Debug_RunFull, 0, "" }, - { "/Debugger/Run debug frames (Sound)", "F5", Menu_Debug_RunDFrameSnd, 0, "" }, - { "/Debugger/Run debug frames", "F5", Menu_Debug_RunDFrame, 0, "" }, - { "/Debugger/Run debug steps", "F3", Menu_Debug_RunDStep, 0, "" }, - { "/Debugger/Single frame", "F4", Menu_Debug_SingleFrame, 0, "" }, - { "/Debugger/Single step", "F3", Menu_Debug_SingleStep, 0, "" }, - { "/Debugger/Step skip", "F3", Menu_Debug_StepSkip, 0, "" }, - { "/Debugger/Stop", "F2", Menu_Debug_Stop, 0, "" }, + { "/Debugger/Run full speed", "F5", (GtkItemFactoryCallback)Menu_Debug_RunFull, 0, "" }, + { "/Debugger/Run debug frames (Sound)", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrameSnd, 0, "" }, + { "/Debugger/Run debug frames", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrame, 0, "" }, + { "/Debugger/Run debug steps", "F3", (GtkItemFactoryCallback)Menu_Debug_RunDStep, 0, "" }, + { "/Debugger/Single frame", "F4", (GtkItemFactoryCallback)Menu_Debug_SingleFrame, 0, "" }, + { "/Debugger/Single step", "F3", (GtkItemFactoryCallback)Menu_Debug_SingleStep, 0, "" }, + { "/Debugger/Step skip", "F3", (GtkItemFactoryCallback)Menu_Debug_StepSkip, 0, "" }, + { "/Debugger/Stop", "F2", (GtkItemFactoryCallback)Menu_Debug_Stop, 0, "" }, { "/_Refresh", NULL, NULL, 0, "" }, - { "/Refresh/Now!", NULL, PRCSprW_RefreshNow, 0, "" }, + { "/Refresh/Now!", NULL, (GtkItemFactoryCallback)PRCSprW_RefreshNow, 0, "" }, { "/Refresh/sep1", NULL, NULL, 0, "" }, - { "/Refresh/100% 72fps", NULL, PRCSprW_Refresh, 0, "" }, - { "/Refresh/ 50% 36fps", NULL, PRCSprW_Refresh, 1, "/Refresh/100% 72fps" }, - { "/Refresh/ 33% 24fps", NULL, PRCSprW_Refresh, 2, "/Refresh/100% 72fps" }, - { "/Refresh/ 25% 18fps", NULL, PRCSprW_Refresh, 3, "/Refresh/100% 72fps" }, - { "/Refresh/ 17% 12fps", NULL, PRCSprW_Refresh, 5, "/Refresh/100% 72fps" }, - { "/Refresh/ 12% 9fps", NULL, PRCSprW_Refresh, 7, "/Refresh/100% 72fps" }, - { "/Refresh/ 8% 6fps", NULL, PRCSprW_Refresh, 11, "/Refresh/100% 72fps" }, - { "/Refresh/ 3% 2fps", NULL, PRCSprW_Refresh, 35, "/Refresh/100% 72fps" }, - { "/Refresh/ 1% 1fps", NULL, PRCSprW_Refresh, 71, "/Refresh/100% 72fps" }, - { "/Refresh/Custom...", NULL, PRCSprW_Refresh, -1, "/Refresh/100% 72fps" }, + { "/Refresh/100% 72fps", NULL, (GtkItemFactoryCallback)PRCSprW_Refresh, 0, "" }, + { "/Refresh/ 50% 36fps", NULL, (GtkItemFactoryCallback)PRCSprW_Refresh, 1, "/Refresh/100% 72fps" }, + { "/Refresh/ 33% 24fps", NULL, (GtkItemFactoryCallback)PRCSprW_Refresh, 2, "/Refresh/100% 72fps" }, + { "/Refresh/ 25% 18fps", NULL, (GtkItemFactoryCallback)PRCSprW_Refresh, 3, "/Refresh/100% 72fps" }, + { "/Refresh/ 17% 12fps", NULL, (GtkItemFactoryCallback)PRCSprW_Refresh, 5, "/Refresh/100% 72fps" }, + { "/Refresh/ 12% 9fps", NULL, (GtkItemFactoryCallback)PRCSprW_Refresh, 7, "/Refresh/100% 72fps" }, + { "/Refresh/ 8% 6fps", NULL, (GtkItemFactoryCallback)PRCSprW_Refresh, 11, "/Refresh/100% 72fps" }, + { "/Refresh/ 3% 2fps", NULL, (GtkItemFactoryCallback)PRCSprW_Refresh, 35, "/Refresh/100% 72fps" }, + { "/Refresh/ 1% 1fps", NULL, (GtkItemFactoryCallback)PRCSprW_Refresh, 71, "/Refresh/100% 72fps" }, + { "/Refresh/Custom...", NULL, (GtkItemFactoryCallback)PRCSprW_Refresh, -1, "/Refresh/100% 72fps" }, }; static gint PRCSprWindow_MenuItemsNum = sizeof(PRCSprWindow_MenuItems) / sizeof(*PRCSprWindow_MenuItems); diff --git a/platform/debug/PRCTilesWindow.c b/platform/debug/PRCTilesWindow.c index 4635888..87fecc9 100644 --- a/platform/debug/PRCTilesWindow.c +++ b/platform/debug/PRCTilesWindow.c @@ -473,13 +473,13 @@ static void PRCTilesW_Negative(GtkWidget *widget, gpointer data) static void PRCTilesW_Zoom(GtkWidget *widget, gpointer data) { if (PRCTilesWindow_InConfigs) return; - dclc_zoom_prctiles = (int)data; + dclc_zoom_prctiles = GPOINTER_TO_INT(data); PRCTilesWindow_Refresh(1); } static void PRCTilesW_Transparency(GtkWidget *widget, gpointer data) { - int number, index = (int)data; + int number, index = GPOINTER_TO_INT(data); static int lasttransindex = -2; if (lasttransindex == index) return; @@ -537,7 +537,7 @@ static void PRCTilesW_Goto_SpriteTB(GtkWidget *widget, gpointer data) static void PRCTilesW_Follow(GtkWidget *widget, gpointer data) { - Follow = (int)data; + Follow = GPOINTER_TO_INT(data); PRCTilesWindow_Refresh(1); } @@ -548,7 +548,7 @@ static void PRCTilesW_RefreshNow(GtkWidget *widget, gpointer data) static void PRCTilesW_Refresh(GtkWidget *widget, gpointer data) { - int val, index = (int)data; + int val, index = GPOINTER_TO_INT(data); static int lastrefreshindex = -2; if (lastrefreshindex == index) return; @@ -580,72 +580,72 @@ static gboolean PRCTilesWindow_state_event(GtkWidget *widget, GdkEventWindowStat static GtkItemFactoryEntry PRCTilesWindow_MenuItems[] = { { "/_View", NULL, NULL, 0, "" }, - { "/View/Sprite Mode", NULL, PRCTilesW_SpriteMode, 0, "" }, - { "/View/Show Grid", NULL, PRCTilesW_ShowGrid, 0, "" }, - { "/View/Show Negative", NULL, PRCTilesW_Negative, 0, "" }, + { "/View/Sprite Mode", NULL, (GtkItemFactoryCallback)PRCTilesW_SpriteMode, 0, "" }, + { "/View/Show Grid", NULL, (GtkItemFactoryCallback)PRCTilesW_ShowGrid, 0, "" }, + { "/View/Show Negative", NULL, (GtkItemFactoryCallback)PRCTilesW_Negative, 0, "" }, { "/View/Zoom", NULL, NULL, 0, "" }, - { "/View/Zoom/100%", NULL, PRCTilesW_Zoom, 1, "" }, - { "/View/Zoom/200%", NULL, PRCTilesW_Zoom, 2, "/View/Zoom/100%" }, - { "/View/Zoom/300%", NULL, PRCTilesW_Zoom, 3, "/View/Zoom/100%" }, - { "/View/Zoom/400%", NULL, PRCTilesW_Zoom, 4, "/View/Zoom/100%" }, - { "/View/Zoom/500%", NULL, PRCTilesW_Zoom, 5, "/View/Zoom/100%" }, - { "/View/Zoom/600%", NULL, PRCTilesW_Zoom, 6, "/View/Zoom/100%" }, - { "/View/Zoom/700%", NULL, PRCTilesW_Zoom, 7, "/View/Zoom/100%" }, - { "/View/Zoom/800%", NULL, PRCTilesW_Zoom, 8, "/View/Zoom/100%" }, + { "/View/Zoom/100%", NULL, (GtkItemFactoryCallback)PRCTilesW_Zoom, 1, "" }, + { "/View/Zoom/200%", NULL, (GtkItemFactoryCallback)PRCTilesW_Zoom, 2, "/View/Zoom/100%" }, + { "/View/Zoom/300%", NULL, (GtkItemFactoryCallback)PRCTilesW_Zoom, 3, "/View/Zoom/100%" }, + { "/View/Zoom/400%", NULL, (GtkItemFactoryCallback)PRCTilesW_Zoom, 4, "/View/Zoom/100%" }, + { "/View/Zoom/500%", NULL, (GtkItemFactoryCallback)PRCTilesW_Zoom, 5, "/View/Zoom/100%" }, + { "/View/Zoom/600%", NULL, (GtkItemFactoryCallback)PRCTilesW_Zoom, 6, "/View/Zoom/100%" }, + { "/View/Zoom/700%", NULL, (GtkItemFactoryCallback)PRCTilesW_Zoom, 7, "/View/Zoom/100%" }, + { "/View/Zoom/800%", NULL, (GtkItemFactoryCallback)PRCTilesW_Zoom, 8, "/View/Zoom/100%" }, { "/View/Transparency", NULL, NULL, 0, "" }, - { "/View/Transparency/Pink", NULL, PRCTilesW_Transparency, 0, "" }, - { "/View/Transparency/Red", NULL, PRCTilesW_Transparency, 1, "/View/Transparency/Pink" }, - { "/View/Transparency/Green", NULL, PRCTilesW_Transparency, 2, "/View/Transparency/Pink" }, - { "/View/Transparency/Blue", NULL, PRCTilesW_Transparency, 3, "/View/Transparency/Pink" }, - { "/View/Transparency/Yellow", NULL, PRCTilesW_Transparency, 4, "/View/Transparency/Pink" }, - { "/View/Transparency/Orange", NULL, PRCTilesW_Transparency, 5, "/View/Transparency/Pink" }, - { "/View/Transparency/Purple", NULL, PRCTilesW_Transparency, 6, "/View/Transparency/Pink" }, - { "/View/Transparency/Bright Red", NULL, PRCTilesW_Transparency, 7, "/View/Transparency/Pink" }, - { "/View/Transparency/Bright Green", NULL, PRCTilesW_Transparency, 8, "/View/Transparency/Pink" }, - { "/View/Transparency/Bright Blue", NULL, PRCTilesW_Transparency, 9, "/View/Transparency/Pink" }, - { "/View/Transparency/Bright Yellow", NULL, PRCTilesW_Transparency, 10, "/View/Transparency/Pink" }, - { "/View/Transparency/Cyan", NULL, PRCTilesW_Transparency, 11, "/View/Transparency/Pink" }, - { "/View/Transparency/Black", NULL, PRCTilesW_Transparency, 12, "/View/Transparency/Pink" }, - { "/View/Transparency/Grey", NULL, PRCTilesW_Transparency, 13, "/View/Transparency/Pink" }, - { "/View/Transparency/Silver", NULL, PRCTilesW_Transparency, 14, "/View/Transparency/Pink" }, - { "/View/Transparency/White", NULL, PRCTilesW_Transparency, 15, "/View/Transparency/Pink" }, - { "/View/Transparency/Custom", NULL, PRCTilesW_Transparency, -1, "/View/Transparency/Pink" }, + { "/View/Transparency/Pink", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 0, "" }, + { "/View/Transparency/Red", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 1, "/View/Transparency/Pink" }, + { "/View/Transparency/Green", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 2, "/View/Transparency/Pink" }, + { "/View/Transparency/Blue", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 3, "/View/Transparency/Pink" }, + { "/View/Transparency/Yellow", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 4, "/View/Transparency/Pink" }, + { "/View/Transparency/Orange", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 5, "/View/Transparency/Pink" }, + { "/View/Transparency/Purple", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 6, "/View/Transparency/Pink" }, + { "/View/Transparency/Bright Red", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 7, "/View/Transparency/Pink" }, + { "/View/Transparency/Bright Green", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 8, "/View/Transparency/Pink" }, + { "/View/Transparency/Bright Blue", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 9, "/View/Transparency/Pink" }, + { "/View/Transparency/Bright Yellow", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 10, "/View/Transparency/Pink" }, + { "/View/Transparency/Cyan", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 11, "/View/Transparency/Pink" }, + { "/View/Transparency/Black", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 12, "/View/Transparency/Pink" }, + { "/View/Transparency/Grey", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 13, "/View/Transparency/Pink" }, + { "/View/Transparency/Silver", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 14, "/View/Transparency/Pink" }, + { "/View/Transparency/White", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, 15, "/View/Transparency/Pink" }, + { "/View/Transparency/Custom", NULL, (GtkItemFactoryCallback)PRCTilesW_Transparency, -1, "/View/Transparency/Pink" }, { "/_Go to", NULL, NULL, 0, "" }, - { "/Go to/_Address...", "G", PRCTilesW_Goto_Address, 0, "" }, - { "/Go to/_Tile...", "T", PRCTilesW_Goto_Tile, 0, "" }, - { "/Go to/_Framebuffer Base", "F", PRCTilesW_Goto_FrameTB, 0, "" }, - { "/Go to/_Map Tile Base", "M", PRCTilesW_Goto_MapTB, 0, "" }, - { "/Go to/_Sprite Tile Base", "S", PRCTilesW_Goto_SpriteTB, 0, "" }, + { "/Go to/_Address...", "G", (GtkItemFactoryCallback)PRCTilesW_Goto_Address, 0, "" }, + { "/Go to/_Tile...", "T", (GtkItemFactoryCallback)PRCTilesW_Goto_Tile, 0, "" }, + { "/Go to/_Framebuffer Base", "F", (GtkItemFactoryCallback)PRCTilesW_Goto_FrameTB, 0, "" }, + { "/Go to/_Map Tile Base", "M", (GtkItemFactoryCallback)PRCTilesW_Goto_MapTB, 0, "" }, + { "/Go to/_Sprite Tile Base", "S", (GtkItemFactoryCallback)PRCTilesW_Goto_SpriteTB, 0, "" }, { "/_Follow", NULL, NULL, 0, "" }, - { "/Follow/Don't follow", NULL, PRCTilesW_Follow, 0, "" }, - { "/Follow/Follow Map Tile Base", NULL, PRCTilesW_Follow, 1, "/Follow/Don't follow" }, - { "/Follow/Follow Sprite Tile Base", NULL, PRCTilesW_Follow, 2, "/Follow/Don't follow" }, + { "/Follow/Don't follow", NULL, (GtkItemFactoryCallback)PRCTilesW_Follow, 0, "" }, + { "/Follow/Follow Map Tile Base", NULL, (GtkItemFactoryCallback)PRCTilesW_Follow, 1, "/Follow/Don't follow" }, + { "/Follow/Follow Sprite Tile Base", NULL, (GtkItemFactoryCallback)PRCTilesW_Follow, 2, "/Follow/Don't follow" }, { "/_Debugger", NULL, NULL, 0, "" }, - { "/Debugger/Run full speed", "F5", Menu_Debug_RunFull, 0, "" }, - { "/Debugger/Run debug frames (Sound)", "F5", Menu_Debug_RunDFrameSnd, 0, "" }, - { "/Debugger/Run debug frames", "F5", Menu_Debug_RunDFrame, 0, "" }, - { "/Debugger/Run debug steps", "F3", Menu_Debug_RunDStep, 0, "" }, - { "/Debugger/Single frame", "F4", Menu_Debug_SingleFrame, 0, "" }, - { "/Debugger/Single step", "F3", Menu_Debug_SingleStep, 0, "" }, - { "/Debugger/Step skip", "F3", Menu_Debug_StepSkip, 0, "" }, - { "/Debugger/Stop", "F2", Menu_Debug_Stop, 0, "" }, + { "/Debugger/Run full speed", "F5", (GtkItemFactoryCallback)Menu_Debug_RunFull, 0, "" }, + { "/Debugger/Run debug frames (Sound)", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrameSnd, 0, "" }, + { "/Debugger/Run debug frames", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrame, 0, "" }, + { "/Debugger/Run debug steps", "F3", (GtkItemFactoryCallback)Menu_Debug_RunDStep, 0, "" }, + { "/Debugger/Single frame", "F4", (GtkItemFactoryCallback)Menu_Debug_SingleFrame, 0, "" }, + { "/Debugger/Single step", "F3", (GtkItemFactoryCallback)Menu_Debug_SingleStep, 0, "" }, + { "/Debugger/Step skip", "F3", (GtkItemFactoryCallback)Menu_Debug_StepSkip, 0, "" }, + { "/Debugger/Stop", "F2", (GtkItemFactoryCallback)Menu_Debug_Stop, 0, "" }, { "/_Refresh", NULL, NULL, 0, "" }, - { "/Refresh/Now!", NULL, PRCTilesW_RefreshNow, 0, "" }, + { "/Refresh/Now!", NULL, (GtkItemFactoryCallback)PRCTilesW_RefreshNow, 0, "" }, { "/Refresh/sep1", NULL, NULL, 0, "" }, - { "/Refresh/100% 72fps", NULL, PRCTilesW_Refresh, 0, "" }, - { "/Refresh/ 50% 36fps", NULL, PRCTilesW_Refresh, 1, "/Refresh/100% 72fps" }, - { "/Refresh/ 33% 24fps", NULL, PRCTilesW_Refresh, 2, "/Refresh/100% 72fps" }, - { "/Refresh/ 25% 18fps", NULL, PRCTilesW_Refresh, 3, "/Refresh/100% 72fps" }, - { "/Refresh/ 17% 12fps", NULL, PRCTilesW_Refresh, 5, "/Refresh/100% 72fps" }, - { "/Refresh/ 12% 9fps", NULL, PRCTilesW_Refresh, 7, "/Refresh/100% 72fps" }, - { "/Refresh/ 8% 6fps", NULL, PRCTilesW_Refresh, 11, "/Refresh/100% 72fps" }, - { "/Refresh/ 3% 2fps", NULL, PRCTilesW_Refresh, 35, "/Refresh/100% 72fps" }, - { "/Refresh/ 1% 1fps", NULL, PRCTilesW_Refresh, 71, "/Refresh/100% 72fps" }, - { "/Refresh/Custom...", NULL, PRCTilesW_Refresh, -1, "/Refresh/100% 72fps" }, + { "/Refresh/100% 72fps", NULL, (GtkItemFactoryCallback)PRCTilesW_Refresh, 0, "" }, + { "/Refresh/ 50% 36fps", NULL, (GtkItemFactoryCallback)PRCTilesW_Refresh, 1, "/Refresh/100% 72fps" }, + { "/Refresh/ 33% 24fps", NULL, (GtkItemFactoryCallback)PRCTilesW_Refresh, 2, "/Refresh/100% 72fps" }, + { "/Refresh/ 25% 18fps", NULL, (GtkItemFactoryCallback)PRCTilesW_Refresh, 3, "/Refresh/100% 72fps" }, + { "/Refresh/ 17% 12fps", NULL, (GtkItemFactoryCallback)PRCTilesW_Refresh, 5, "/Refresh/100% 72fps" }, + { "/Refresh/ 12% 9fps", NULL, (GtkItemFactoryCallback)PRCTilesW_Refresh, 7, "/Refresh/100% 72fps" }, + { "/Refresh/ 8% 6fps", NULL, (GtkItemFactoryCallback)PRCTilesW_Refresh, 11, "/Refresh/100% 72fps" }, + { "/Refresh/ 3% 2fps", NULL, (GtkItemFactoryCallback)PRCTilesW_Refresh, 35, "/Refresh/100% 72fps" }, + { "/Refresh/ 1% 1fps", NULL, (GtkItemFactoryCallback)PRCTilesW_Refresh, 71, "/Refresh/100% 72fps" }, + { "/Refresh/Custom...", NULL, (GtkItemFactoryCallback)PRCTilesW_Refresh, -1, "/Refresh/100% 72fps" }, }; static gint PRCTilesWindow_MenuItemsNum = sizeof(PRCTilesWindow_MenuItems) / sizeof(*PRCTilesWindow_MenuItems); diff --git a/platform/debug/PalEditWindow.c b/platform/debug/PalEditWindow.c index 62209b7..2c89c35 100644 --- a/platform/debug/PalEditWindow.c +++ b/platform/debug/PalEditWindow.c @@ -60,7 +60,7 @@ static gint PalEditWindow_delete_event(GtkWidget *widget, GdkEvent *event, gpoin static gboolean ColorPrev_exposure(GtkWidget *widget, GdkEventExpose *event, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); uint32_t color; cairo_t *cr; @@ -92,7 +92,7 @@ static gboolean ColorPrev_exposure(GtkWidget *widget, GdkEventExpose *event, gpo static void ColorComp_Adj_changed(GtkAdjustment *adj, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); int r, g, b, ix, ic; if (PalEditWindow_InConfigs) return; @@ -112,7 +112,7 @@ static void ColorComp_Adj_changed(GtkAdjustment *adj, gpointer data) static gchar *ColorComp_formatvalue(GtkScale *scale, gdouble value, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); switch (index) { case 0: return g_strdup_printf("Red: %i", (int)value); case 1: return g_strdup_printf("Green: %i", (int)value); @@ -171,14 +171,14 @@ int PalEditWindow_Create(void) gtk_widget_show(GTK_WIDGET(ColorLabel[y])); ColorPrev[y] = GTK_DRAWING_AREA(gtk_drawing_area_new()); gtk_widget_set_size_request(GTK_WIDGET(ColorPrev[y]), 32, 32); - g_signal_connect(GTK_WIDGET(ColorPrev[y]), "expose_event", G_CALLBACK(ColorPrev_exposure), (gpointer)y); + g_signal_connect(GTK_WIDGET(ColorPrev[y]), "expose_event", G_CALLBACK(ColorPrev_exposure), GINT_TO_POINTER(y)); gtk_table_attach(CTable, GTK_WIDGET(ColorPrev[y]), 0, 3, y*3+1, y*3+2, GTK_FILL | GTK_EXPAND, GTK_FILL, 12, 2); gtk_widget_show(GTK_WIDGET(ColorPrev[y])); for (x=0; x<3; x++) { ColorComp_Adj[y][x] = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, 255.0, 1.0, 16.0, 0.0)); - g_signal_connect(ColorComp_Adj[y][x], "value_changed", G_CALLBACK(ColorComp_Adj_changed), (gpointer)(y*4+x)); + g_signal_connect(ColorComp_Adj[y][x], "value_changed", G_CALLBACK(ColorComp_Adj_changed), GINT_TO_POINTER(y*4+x)); ColorComp[x][y] = GTK_SCALE(gtk_hscale_new(ColorComp_Adj[y][x])); - g_signal_connect(ColorComp[x][y], "format-value", G_CALLBACK(ColorComp_formatvalue), (gpointer)(y*4+x)); + g_signal_connect(ColorComp[x][y], "format-value", G_CALLBACK(ColorComp_formatvalue), GINT_TO_POINTER(y*4+x)); gtk_table_attach(CTable, GTK_WIDGET(ColorComp[x][y]), x, x+1, y*3+2, y*3+3, GTK_FILL | GTK_EXPAND, GTK_FILL, 12, 2); gtk_widget_show(GTK_WIDGET(ColorComp[x][y])); } diff --git a/platform/debug/SymbWindow.c b/platform/debug/SymbWindow.c index 1e0d8ba..15b096b 100644 --- a/platform/debug/SymbWindow.c +++ b/platform/debug/SymbWindow.c @@ -375,7 +375,7 @@ int SymbItemsSaveToFile(char *filename) void SymbWindow_Reload(void) { - char tmp[PMTMPV]; + char tmp[PMTMPV + 1]; if (!strlen(pmsymbfile)) SymbsModified = 0; sprintf(tmp, "%c%s", (SymbsModified) ? '*' : ' ', pmsymbfile); gtk_label_set_text(PMSymbFile, tmp); @@ -718,7 +718,9 @@ static int DataView_buttonpress(SGtkXDrawingView *widg, int button, int press, i } SymbView_NewValue_CD[3].number = PMD_TrapPoints[item->addr] & TRAPPOINT_WATCHREAD; SymbView_NewValue_CD[4].number = PMD_TrapPoints[item->addr] & TRAPPOINT_WATCHWRITE; - sprintf(SymbView_NewValue_CD[0].text, "Set new value for $%04X (%s):", item->addr, item->name); + char tmp[128 - 31 + 1]; + strncpy(tmp, item->name, 128 - 31); + sprintf(SymbView_NewValue_CD[0].text, "Set new value for $%04X (%s):", item->addr, tmp); result = CustomDialog(SymbWindow, "Change memory", SymbView_NewValue_CD); if (result == 1) { val = atoi_Ex(SymbView_NewValue_CD[1].text, 0); @@ -960,7 +962,7 @@ static void SymbW_RefreshNow(GtkWidget *widget, gpointer data) static void SymbW_Refresh(GtkWidget *widget, gpointer data) { - int val, index = (int)data; + int val, index = GPOINTER_TO_INT(data); static int lastrefrindex = -2; if (lastrefrindex == index) return; @@ -993,46 +995,46 @@ static gboolean SymbWindow_state_event(GtkWidget *widget, GdkEventWindowState *e static GtkItemFactoryEntry SymbWindow_MenuItems[] = { { "/_File", NULL, NULL, 0, "" }, - { "/File/_Import sym...", "I", SymbW_ImportSym, 0, "" }, - { "/File/_Load pmsymbols...", "L", SymbW_LoadPMSymbols, 0, "" }, - { "/File/_Save pmsymbols", "S", SymbW_SavePMSymbols, 0, "" }, - { "/File/S_ave pmsymbols as...", "S", SymbW_SaveAsPMSymbols, 0, "" }, + { "/File/_Import sym...", "I", (GtkItemFactoryCallback)SymbW_ImportSym, 0, "" }, + { "/File/_Load pmsymbols...", "L", (GtkItemFactoryCallback)SymbW_LoadPMSymbols, 0, "" }, + { "/File/_Save pmsymbols", "S", (GtkItemFactoryCallback)SymbW_SavePMSymbols, 0, "" }, + { "/File/S_ave pmsymbols as...", "S", (GtkItemFactoryCallback)SymbW_SaveAsPMSymbols, 0, "" }, { "/File/sep1", NULL, NULL, 0, "" }, - { "/File/Auto read .sym", NULL, SymbW_AutoReadSym, 0, "" }, - { "/File/Auto rw .pmsymbols", NULL, SymbW_AutoRWPMSym, 0, "" }, + { "/File/Auto read .sym", NULL, (GtkItemFactoryCallback)SymbW_AutoReadSym, 0, "" }, + { "/File/Auto rw .pmsymbols", NULL, (GtkItemFactoryCallback)SymbW_AutoRWPMSym, 0, "" }, { "/_Symbols", NULL, NULL, 0, "" }, - { "/Symbols/Add code symbol...", "C", SymbW_AddSetCode, 0, "" }, - { "/Symbols/Add data symbol...", "D", SymbW_AddSetData, 0, "" }, + { "/Symbols/Add code symbol...", "C", (GtkItemFactoryCallback)SymbW_AddSetCode, 0, "" }, + { "/Symbols/Add data symbol...", "D", (GtkItemFactoryCallback)SymbW_AddSetData, 0, "" }, { "/Symbols/sep1", NULL, NULL, 0, "" }, { "/Symbols/Clear all", NULL, NULL, 0, "" }, - { "/Symbols/Clear all/Code symbols", NULL, SymbW_ClrAllCode, 0, "" }, - { "/Symbols/Clear all/Data symbols", NULL, SymbW_ClrAllData, 0, "" }, - { "/Symbols/Clear all/Code and data", NULL, SymbW_ClrAll, 0, "" }, + { "/Symbols/Clear all/Code symbols", NULL, (GtkItemFactoryCallback)SymbW_ClrAllCode, 0, "" }, + { "/Symbols/Clear all/Data symbols", NULL, (GtkItemFactoryCallback)SymbW_ClrAllData, 0, "" }, + { "/Symbols/Clear all/Code and data", NULL, (GtkItemFactoryCallback)SymbW_ClrAll, 0, "" }, { "/_Debugger", NULL, NULL, 0, "" }, - { "/Debugger/Run full speed", "F5", Menu_Debug_RunFull, 0, "" }, - { "/Debugger/Run debug frames (Sound)", "F5", Menu_Debug_RunDFrameSnd, 0, "" }, - { "/Debugger/Run debug frames", "F5", Menu_Debug_RunDFrame, 0, "" }, - { "/Debugger/Run debug steps", "F3", Menu_Debug_RunDStep, 0, "" }, - { "/Debugger/Single frame", "F4", Menu_Debug_SingleFrame, 0, "" }, - { "/Debugger/Single step", "F3", Menu_Debug_SingleStep, 0, "" }, - { "/Debugger/Step skip", "F3", Menu_Debug_StepSkip, 0, "" }, - { "/Debugger/Stop", "F2", Menu_Debug_Stop, 0, "" }, + { "/Debugger/Run full speed", "F5", (GtkItemFactoryCallback)Menu_Debug_RunFull, 0, "" }, + { "/Debugger/Run debug frames (Sound)", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrameSnd, 0, "" }, + { "/Debugger/Run debug frames", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrame, 0, "" }, + { "/Debugger/Run debug steps", "F3", (GtkItemFactoryCallback)Menu_Debug_RunDStep, 0, "" }, + { "/Debugger/Single frame", "F4", (GtkItemFactoryCallback)Menu_Debug_SingleFrame, 0, "" }, + { "/Debugger/Single step", "F3", (GtkItemFactoryCallback)Menu_Debug_SingleStep, 0, "" }, + { "/Debugger/Step skip", "F3", (GtkItemFactoryCallback)Menu_Debug_StepSkip, 0, "" }, + { "/Debugger/Stop", "F2", (GtkItemFactoryCallback)Menu_Debug_Stop, 0, "" }, { "/_Refresh", NULL, NULL, 0, "" }, - { "/Refresh/Now!", NULL, SymbW_RefreshNow, 0, "" }, + { "/Refresh/Now!", NULL, (GtkItemFactoryCallback)SymbW_RefreshNow, 0, "" }, { "/Refresh/sep1", NULL, NULL, 0, "" }, - { "/Refresh/100% 72fps", NULL, SymbW_Refresh, 0, "" }, - { "/Refresh/ 50% 36fps", NULL, SymbW_Refresh, 1, "/Refresh/100% 72fps" }, - { "/Refresh/ 33% 24fps", NULL, SymbW_Refresh, 2, "/Refresh/100% 72fps" }, - { "/Refresh/ 25% 18fps", NULL, SymbW_Refresh, 3, "/Refresh/100% 72fps" }, - { "/Refresh/ 17% 12fps", NULL, SymbW_Refresh, 5, "/Refresh/100% 72fps" }, - { "/Refresh/ 12% 9fps", NULL, SymbW_Refresh, 7, "/Refresh/100% 72fps" }, - { "/Refresh/ 8% 6fps", NULL, SymbW_Refresh, 11, "/Refresh/100% 72fps" }, - { "/Refresh/ 3% 2fps", NULL, SymbW_Refresh, 35, "/Refresh/100% 72fps" }, - { "/Refresh/ 1% 1fps", NULL, SymbW_Refresh, 71, "/Refresh/100% 72fps" }, - { "/Refresh/Custom...", NULL, SymbW_Refresh, -1, "/Refresh/100% 72fps" }, + { "/Refresh/100% 72fps", NULL, (GtkItemFactoryCallback)SymbW_Refresh, 0, "" }, + { "/Refresh/ 50% 36fps", NULL, (GtkItemFactoryCallback)SymbW_Refresh, 1, "/Refresh/100% 72fps" }, + { "/Refresh/ 33% 24fps", NULL, (GtkItemFactoryCallback)SymbW_Refresh, 2, "/Refresh/100% 72fps" }, + { "/Refresh/ 25% 18fps", NULL, (GtkItemFactoryCallback)SymbW_Refresh, 3, "/Refresh/100% 72fps" }, + { "/Refresh/ 17% 12fps", NULL, (GtkItemFactoryCallback)SymbW_Refresh, 5, "/Refresh/100% 72fps" }, + { "/Refresh/ 12% 9fps", NULL, (GtkItemFactoryCallback)SymbW_Refresh, 7, "/Refresh/100% 72fps" }, + { "/Refresh/ 8% 6fps", NULL, (GtkItemFactoryCallback)SymbW_Refresh, 11, "/Refresh/100% 72fps" }, + { "/Refresh/ 3% 2fps", NULL, (GtkItemFactoryCallback)SymbW_Refresh, 35, "/Refresh/100% 72fps" }, + { "/Refresh/ 1% 1fps", NULL, (GtkItemFactoryCallback)SymbW_Refresh, 71, "/Refresh/100% 72fps" }, + { "/Refresh/Custom...", NULL, (GtkItemFactoryCallback)SymbW_Refresh, -1, "/Refresh/100% 72fps" }, }; static gint SymbWindow_MenuItemsNum = sizeof(SymbWindow_MenuItems) / sizeof(*SymbWindow_MenuItems); diff --git a/platform/debug/TimersWindow.c b/platform/debug/TimersWindow.c index 8ecd2f9..a0933cb 100644 --- a/platform/debug/TimersWindow.c +++ b/platform/debug/TimersWindow.c @@ -416,7 +416,7 @@ static void TimersW_RefreshNow(GtkWidget *widget, gpointer data) static void TimersW_Refresh(GtkWidget *widget, gpointer data) { - int val, index = (int)data; + int val, index = GPOINTER_TO_INT(data); static int lastrefrindex = -2; if (lastrefrindex == index) return; @@ -448,35 +448,35 @@ static gboolean TimersWindow_state_event(GtkWidget *widget, GdkEventWindowState static GtkItemFactoryEntry TimersWindow_MenuItems[] = { { "/_View", NULL, NULL, 0, "" }, - { "/View/Oscillators", NULL, TimersW_View_Osc, 0, "" }, - { "/View/Fixed Timers", NULL, TimersW_View_TmrF, 0, "" }, - { "/View/Timer 1", NULL, TimersW_View_Tmr1, 0, "" }, - { "/View/Timer 2", NULL, TimersW_View_Tmr2, 0, "" }, - { "/View/Timer 3 + Sound", NULL, TimersW_View_Tmr3, 0, "" }, + { "/View/Oscillators", NULL, (GtkItemFactoryCallback)TimersW_View_Osc, 0, "" }, + { "/View/Fixed Timers", NULL, (GtkItemFactoryCallback)TimersW_View_TmrF, 0, "" }, + { "/View/Timer 1", NULL, (GtkItemFactoryCallback)TimersW_View_Tmr1, 0, "" }, + { "/View/Timer 2", NULL, (GtkItemFactoryCallback)TimersW_View_Tmr2, 0, "" }, + { "/View/Timer 3 + Sound", NULL, (GtkItemFactoryCallback)TimersW_View_Tmr3, 0, "" }, { "/_Debugger", NULL, NULL, 0, "" }, - { "/Debugger/Run full speed", "F5", Menu_Debug_RunFull, 0, "" }, - { "/Debugger/Run debug frames (Sound)", "F5", Menu_Debug_RunDFrameSnd, 0, "" }, - { "/Debugger/Run debug frames", "F5", Menu_Debug_RunDFrame, 0, "" }, - { "/Debugger/Run debug steps", "F3", Menu_Debug_RunDStep, 0, "" }, - { "/Debugger/Single frame", "F4", Menu_Debug_SingleFrame, 0, "" }, - { "/Debugger/Single step", "F3", Menu_Debug_SingleStep, 0, "" }, - { "/Debugger/Step skip", "F3", Menu_Debug_StepSkip, 0, "" }, - { "/Debugger/Stop", "F2", Menu_Debug_Stop, 0, "" }, + { "/Debugger/Run full speed", "F5", (GtkItemFactoryCallback)Menu_Debug_RunFull, 0, "" }, + { "/Debugger/Run debug frames (Sound)", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrameSnd, 0, "" }, + { "/Debugger/Run debug frames", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrame, 0, "" }, + { "/Debugger/Run debug steps", "F3", (GtkItemFactoryCallback)Menu_Debug_RunDStep, 0, "" }, + { "/Debugger/Single frame", "F4", (GtkItemFactoryCallback)Menu_Debug_SingleFrame, 0, "" }, + { "/Debugger/Single step", "F3", (GtkItemFactoryCallback)Menu_Debug_SingleStep, 0, "" }, + { "/Debugger/Step skip", "F3", (GtkItemFactoryCallback)Menu_Debug_StepSkip, 0, "" }, + { "/Debugger/Stop", "F2", (GtkItemFactoryCallback)Menu_Debug_Stop, 0, "" }, { "/_Refresh", NULL, NULL, 0, "" }, - { "/Refresh/Now!", NULL, TimersW_RefreshNow, 0, "" }, + { "/Refresh/Now!", NULL, (GtkItemFactoryCallback)TimersW_RefreshNow, 0, "" }, { "/Refresh/sep1", NULL, NULL, 0, "" }, - { "/Refresh/100% 72fps", NULL, TimersW_Refresh, 0, "" }, - { "/Refresh/ 50% 36fps", NULL, TimersW_Refresh, 1, "/Refresh/100% 72fps" }, - { "/Refresh/ 33% 24fps", NULL, TimersW_Refresh, 2, "/Refresh/100% 72fps" }, - { "/Refresh/ 25% 18fps", NULL, TimersW_Refresh, 3, "/Refresh/100% 72fps" }, - { "/Refresh/ 17% 12fps", NULL, TimersW_Refresh, 5, "/Refresh/100% 72fps" }, - { "/Refresh/ 12% 9fps", NULL, TimersW_Refresh, 7, "/Refresh/100% 72fps" }, - { "/Refresh/ 8% 6fps", NULL, TimersW_Refresh, 11, "/Refresh/100% 72fps" }, - { "/Refresh/ 3% 2fps", NULL, TimersW_Refresh, 35, "/Refresh/100% 72fps" }, - { "/Refresh/ 1% 1fps", NULL, TimersW_Refresh, 71, "/Refresh/100% 72fps" }, - { "/Refresh/Custom...", NULL, TimersW_Refresh, -1, "/Refresh/100% 72fps" }, + { "/Refresh/100% 72fps", NULL, (GtkItemFactoryCallback)TimersW_Refresh, 0, "" }, + { "/Refresh/ 50% 36fps", NULL, (GtkItemFactoryCallback)TimersW_Refresh, 1, "/Refresh/100% 72fps" }, + { "/Refresh/ 33% 24fps", NULL, (GtkItemFactoryCallback)TimersW_Refresh, 2, "/Refresh/100% 72fps" }, + { "/Refresh/ 25% 18fps", NULL, (GtkItemFactoryCallback)TimersW_Refresh, 3, "/Refresh/100% 72fps" }, + { "/Refresh/ 17% 12fps", NULL, (GtkItemFactoryCallback)TimersW_Refresh, 5, "/Refresh/100% 72fps" }, + { "/Refresh/ 12% 9fps", NULL, (GtkItemFactoryCallback)TimersW_Refresh, 7, "/Refresh/100% 72fps" }, + { "/Refresh/ 8% 6fps", NULL, (GtkItemFactoryCallback)TimersW_Refresh, 11, "/Refresh/100% 72fps" }, + { "/Refresh/ 3% 2fps", NULL, (GtkItemFactoryCallback)TimersW_Refresh, 35, "/Refresh/100% 72fps" }, + { "/Refresh/ 1% 1fps", NULL, (GtkItemFactoryCallback)TimersW_Refresh, 71, "/Refresh/100% 72fps" }, + { "/Refresh/Custom...", NULL, (GtkItemFactoryCallback)TimersW_Refresh, -1, "/Refresh/100% 72fps" }, }; static gint TimersWindow_MenuItemsNum = sizeof(TimersWindow_MenuItems) / sizeof(*TimersWindow_MenuItems); diff --git a/platform/debug/TraceWindow.c b/platform/debug/TraceWindow.c index 9f03f10..5d5c589 100644 --- a/platform/debug/TraceWindow.c +++ b/platform/debug/TraceWindow.c @@ -87,7 +87,7 @@ static void TraceWindow_Render(void) static void TmrEna_toggled(GtkToggleButton *togglebutton, gpointer data) { if (TraceWindow_InConfigs) return; - switch ((int)data) { + switch (GPOINTER_TO_INT(data)) { case 0: CYCTmr1Ena = gtk_toggle_button_get_active(togglebutton); break; case 1: CYCTmr2Ena = gtk_toggle_button_get_active(togglebutton); break; case 2: CYCTmr3Ena = gtk_toggle_button_get_active(togglebutton); break; @@ -96,7 +96,7 @@ static void TmrEna_toggled(GtkToggleButton *togglebutton, gpointer data) static void TmrClear_clicked(GtkWidget *widget, gpointer data) { - switch ((int)data) { + switch (GPOINTER_TO_INT(data)) { case 0: CYCTmr1Cnt = 0; break; case 1: CYCTmr2Cnt = 0; break; case 2: CYCTmr3Cnt = 0; break; @@ -108,7 +108,7 @@ static void TmrClipCopy_clicked(GtkWidget *widget, gpointer data) { char txt[PMTMPV]; txt[0] = 0; - switch ((int)data) { + switch (GPOINTER_TO_INT(data)) { case 0: sprintf(txt, "%i", CYCTmr1Cnt); break; case 1: sprintf(txt, "%i", CYCTmr2Cnt); break; case 2: sprintf(txt, "%i", CYCTmr3Cnt); break; @@ -121,7 +121,7 @@ static void TmrClipPaste_clicked(GtkWidget *widget, gpointer data) { gchar *clip = gtk_clipboard_wait_for_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD)); if (clip == NULL) return; - switch ((int)data) { + switch (GPOINTER_TO_INT(data)) { case 0: CYCTmr1Cnt = atoi(clip); break; case 1: CYCTmr2Cnt = atoi(clip); break; case 2: CYCTmr3Cnt = atoi(clip); break; @@ -254,7 +254,7 @@ static void TraceW_RefreshNow(GtkWidget *widget, gpointer data) static void TraceW_Refresh(GtkWidget *widget, gpointer data) { - int val, index = (int)data; + int val, index = GPOINTER_TO_INT(data); static int lastrefrindex = -2; if (lastrefrindex == index) return; @@ -287,28 +287,28 @@ static gboolean TraceWindow_state_event(GtkWidget *widget, GdkEventWindowState * static GtkItemFactoryEntry TraceWindow_MenuItems[] = { { "/_Debugger", NULL, NULL, 0, "" }, - { "/Debugger/Run full speed", "F5", Menu_Debug_RunFull, 0, "" }, - { "/Debugger/Run debug frames (Sound)", "F5", Menu_Debug_RunDFrameSnd, 0, "" }, - { "/Debugger/Run debug frames", "F5", Menu_Debug_RunDFrame, 0, "" }, - { "/Debugger/Run debug steps", "F3", Menu_Debug_RunDStep, 0, "" }, - { "/Debugger/Single frame", "F4", Menu_Debug_SingleFrame, 0, "" }, - { "/Debugger/Single step", "F3", Menu_Debug_SingleStep, 0, "" }, - { "/Debugger/Step skip", "F3", Menu_Debug_StepSkip, 0, "" }, - { "/Debugger/Stop", "F2", Menu_Debug_Stop, 0, "" }, + { "/Debugger/Run full speed", "F5", (GtkItemFactoryCallback)Menu_Debug_RunFull, 0, "" }, + { "/Debugger/Run debug frames (Sound)", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrameSnd, 0, "" }, + { "/Debugger/Run debug frames", "F5", (GtkItemFactoryCallback)Menu_Debug_RunDFrame, 0, "" }, + { "/Debugger/Run debug steps", "F3", (GtkItemFactoryCallback)Menu_Debug_RunDStep, 0, "" }, + { "/Debugger/Single frame", "F4", (GtkItemFactoryCallback)Menu_Debug_SingleFrame, 0, "" }, + { "/Debugger/Single step", "F3", (GtkItemFactoryCallback)Menu_Debug_SingleStep, 0, "" }, + { "/Debugger/Step skip", "F3", (GtkItemFactoryCallback)Menu_Debug_StepSkip, 0, "" }, + { "/Debugger/Stop", "F2", (GtkItemFactoryCallback)Menu_Debug_Stop, 0, "" }, { "/_Refresh", NULL, NULL, 0, "" }, - { "/Refresh/Now!", NULL, TraceW_RefreshNow, 0, "" }, + { "/Refresh/Now!", NULL, (GtkItemFactoryCallback)TraceW_RefreshNow, 0, "" }, { "/Refresh/sep1", NULL, NULL, 0, "" }, - { "/Refresh/100% 72fps", NULL, TraceW_Refresh, 0, "" }, - { "/Refresh/ 50% 36fps", NULL, TraceW_Refresh, 1, "/Refresh/100% 72fps" }, - { "/Refresh/ 33% 24fps", NULL, TraceW_Refresh, 2, "/Refresh/100% 72fps" }, - { "/Refresh/ 25% 18fps", NULL, TraceW_Refresh, 3, "/Refresh/100% 72fps" }, - { "/Refresh/ 17% 12fps", NULL, TraceW_Refresh, 5, "/Refresh/100% 72fps" }, - { "/Refresh/ 12% 9fps", NULL, TraceW_Refresh, 7, "/Refresh/100% 72fps" }, - { "/Refresh/ 8% 6fps", NULL, TraceW_Refresh, 11, "/Refresh/100% 72fps" }, - { "/Refresh/ 3% 2fps", NULL, TraceW_Refresh, 35, "/Refresh/100% 72fps" }, - { "/Refresh/ 1% 1fps", NULL, TraceW_Refresh, 71, "/Refresh/100% 72fps" }, - { "/Refresh/Custom...", NULL, TraceW_Refresh, -1, "/Refresh/100% 72fps" }, + { "/Refresh/100% 72fps", NULL, (GtkItemFactoryCallback)TraceW_Refresh, 0, "" }, + { "/Refresh/ 50% 36fps", NULL, (GtkItemFactoryCallback)TraceW_Refresh, 1, "/Refresh/100% 72fps" }, + { "/Refresh/ 33% 24fps", NULL, (GtkItemFactoryCallback)TraceW_Refresh, 2, "/Refresh/100% 72fps" }, + { "/Refresh/ 25% 18fps", NULL, (GtkItemFactoryCallback)TraceW_Refresh, 3, "/Refresh/100% 72fps" }, + { "/Refresh/ 17% 12fps", NULL, (GtkItemFactoryCallback)TraceW_Refresh, 5, "/Refresh/100% 72fps" }, + { "/Refresh/ 12% 9fps", NULL, (GtkItemFactoryCallback)TraceW_Refresh, 7, "/Refresh/100% 72fps" }, + { "/Refresh/ 8% 6fps", NULL, (GtkItemFactoryCallback)TraceW_Refresh, 11, "/Refresh/100% 72fps" }, + { "/Refresh/ 3% 2fps", NULL, (GtkItemFactoryCallback)TraceW_Refresh, 35, "/Refresh/100% 72fps" }, + { "/Refresh/ 1% 1fps", NULL, (GtkItemFactoryCallback)TraceW_Refresh, 71, "/Refresh/100% 72fps" }, + { "/Refresh/Custom...", NULL, (GtkItemFactoryCallback)TraceW_Refresh, -1, "/Refresh/100% 72fps" }, }; static gint TraceWindow_MenuItemsNum = sizeof(TraceWindow_MenuItems) / sizeof(*TraceWindow_MenuItems); @@ -383,26 +383,26 @@ int TraceWindow_Create(void) // Enable checkbox TmrEna[i] = GTK_TOGGLE_BUTTON(gtk_check_button_new_with_label("Enable")); - g_signal_connect(TmrEna[i], "toggled", G_CALLBACK(TmrEna_toggled), (gpointer)i); + g_signal_connect(TmrEna[i], "toggled", G_CALLBACK(TmrEna_toggled), GINT_TO_POINTER(i)); gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(TmrEna[i]), TRUE); gtk_box_pack_start(VBox2[i], GTK_WIDGET(TmrEna[i]), FALSE, TRUE, 0); gtk_widget_show(GTK_WIDGET(TmrEna[i])); // Timer clear button TmrClear[i] = GTK_BUTTON(gtk_button_new_with_label("Clear")); - g_signal_connect(TmrClear[i], "clicked", G_CALLBACK(TmrClear_clicked), (gpointer)i); + g_signal_connect(TmrClear[i], "clicked", G_CALLBACK(TmrClear_clicked), GINT_TO_POINTER(i)); gtk_box_pack_start(VBox2[i], GTK_WIDGET(TmrClear[i]), FALSE, TRUE, 0); gtk_widget_show(GTK_WIDGET(TmrClear[i])); // Timer clipboard copy button TmrClipCopy[i] = GTK_BUTTON(gtk_button_new_with_label("Copy")); - g_signal_connect(TmrClipCopy[i], "clicked", G_CALLBACK(TmrClipCopy_clicked), (gpointer)i); + g_signal_connect(TmrClipCopy[i], "clicked", G_CALLBACK(TmrClipCopy_clicked), GINT_TO_POINTER(i)); gtk_box_pack_start(VBox2[i], GTK_WIDGET(TmrClipCopy[i]), FALSE, TRUE, 0); gtk_widget_show(GTK_WIDGET(TmrClipCopy[i])); // Timer clipboard copy button TmrClipPaste[i] = GTK_BUTTON(gtk_button_new_with_label("Paste")); - g_signal_connect(TmrClipPaste[i], "clicked", G_CALLBACK(TmrClipPaste_clicked), (gpointer)i); + g_signal_connect(TmrClipPaste[i], "clicked", G_CALLBACK(TmrClipPaste_clicked), GINT_TO_POINTER(i)); gtk_box_pack_start(VBox2[i], GTK_WIDGET(TmrClipPaste[i]), FALSE, TRUE, 0); gtk_widget_show(GTK_WIDGET(TmrClipPaste[i])); } diff --git a/platform/debug/makefile.win b/platform/debug/makefile.win index 571c3b0..12d35a8 100644 --- a/platform/debug/makefile.win +++ b/platform/debug/makefile.win @@ -9,7 +9,7 @@ WINTARGET = PokeMiniD.exe WINRES_TRG = $(BUILD)/pokemini_rc.o WINRES_SRC = $(POKEROOT)resource/pokemini.rc -CFLAGS = -O -Wall `$(SDL_BASE)sdl-config --cflags` `pkg-config --cflags gtk+-2.0` $(INCLUDE) +CFLAGS = -O -Wall -Wno-deprecated-declarations `$(SDL_BASE)sdl-config --cflags` `pkg-config --cflags gtk+-2.0` $(INCLUDE) SLFLAGS = -O `$(SDL_BASE)sdl-config --libs` `pkg-config --libs gtk+-2.0` -lm -lz RELEASE_DIR = ../../release diff --git a/platform/win32/VC2022/PokeMini.sln b/platform/win32/VC2022/PokeMini.sln new file mode 100644 index 0000000..6adb50a --- /dev/null +++ b/platform/win32/VC2022/PokeMini.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PokeMini", "PokeMini.vcxproj", "{A9E4D423-8C5B-4F1B-AE80-DA4F848ECBA9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A9E4D423-8C5B-4F1B-AE80-DA4F848ECBA9}.Debug|Win32.ActiveCfg = Debug|Win32 + {A9E4D423-8C5B-4F1B-AE80-DA4F848ECBA9}.Debug|Win32.Build.0 = Debug|Win32 + {A9E4D423-8C5B-4F1B-AE80-DA4F848ECBA9}.Release|Win32.ActiveCfg = Release|Win32 + {A9E4D423-8C5B-4F1B-AE80-DA4F848ECBA9}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/platform/win32/VC2022/PokeMini.vcxproj b/platform/win32/VC2022/PokeMini.vcxproj new file mode 100644 index 0000000..4dccfda --- /dev/null +++ b/platform/win32/VC2022/PokeMini.vcxproj @@ -0,0 +1,212 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {A9E4D423-8C5B-4F1B-AE80-DA4F848ECBA9} + PokeMini + Win32Proj + + + + Application + NotSet + true + v143 + + + Application + NotSet + v143 + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + .;..\..\..\freebios;..\..\..\source;..\..\..\sourcex;..\..\..\resource;..\..\..\dependencies\minizip;..\..\..\dependencies\zlib;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;NO_SCANDIRS;NO_DIRECTDRAW;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + comctl32.lib;winmm.lib;ddraw.lib;d3d9.lib;dxguid.lib;dsound.lib;dinput8.lib;%(AdditionalDependencies) + $(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories) + true + Windows + MachineX86 + + + + + .;..\..\..\freebios;..\..\..\source;..\..\..\sourcex;..\..\..\resource;..\..\..\dependencies\minizip;..\..\..\dependencies\zlib;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;NO_SCANDIRS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + + + comctl32.lib;winmm.lib;ddraw.lib;d3d9.lib;dxguid.lib;dsound.lib;dinput8.lib;%(AdditionalDependencies) + $(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories) + true + Windows + true + true + MachineX86 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ..\..\..\resource;..\..\..\source;%(AdditionalIncludeDirectories) + ..\..\..\resource;..\..\..\source;%(AdditionalIncludeDirectories) + + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform/win32/VC2022/PokeMini.vcxproj.filters b/platform/win32/VC2022/PokeMini.vcxproj.filters new file mode 100644 index 0000000..f9422ea --- /dev/null +++ b/platform/win32/VC2022/PokeMini.vcxproj.filters @@ -0,0 +1,343 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {571bc8f9-b349-4534-9eb4-e141c5e8c3bc} + + + {8e0a3a2f-3589-4830-acb3-c987e839d5c4} + + + {6c15f83e-2182-462b-8905-eec550aa87bf} + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {a2d75a63-a488-4d0c-bf3a-890349020d6d} + + + {79869ec3-1e73-45d3-b2f3-4ddc24e1562e} + + + {59393cca-9d79-4f3a-b116-ad2f2ed71397} + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Source + + + Source Files\Zip + + + Source Files\Zip + + + Source Files\Zip + + + Source Files\Zip + + + Source Files\Zip + + + Source Files\Zip + + + Source Files\Zip + + + Source Files\Zip + + + Source Files\Misc + + + Source Files\Misc + + + Source Files\Source + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Source + + + Header Files\Misc + + + Header Files\Misc + + + Header Files\Zip + + + Header Files\Zip + + + Header Files + + + + + Resource Files + + + + + + + + Resource Files + + + Resource Files + + + Resource Files + + + \ No newline at end of file diff --git a/platform/win32/VC2022/PokeMini.vcxproj.user b/platform/win32/VC2022/PokeMini.vcxproj.user new file mode 100644 index 0000000..695b5c7 --- /dev/null +++ b/platform/win32/VC2022/PokeMini.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/platform/win32/VC2022/PokeMini_Win32.rc b/platform/win32/VC2022/PokeMini_Win32.rc new file mode 100644 index 0000000..5ac0274 --- /dev/null +++ b/platform/win32/VC2022/PokeMini_Win32.rc @@ -0,0 +1,479 @@ +// Microsoft Visual C++ generated resource script. +// +#include "Resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" +#include "pokemini.rc" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "Icon_PkBl_48.ico" + +IDI_ICON2 ICON "Icon_Min1_48.ico" + +IDI_ICON3 ICON "Icon_Min2_48.ico" + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "Resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "#include ""pokemini.rc""\r\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MENU MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open Min...\tCtrl+O", ID_FILE_OPENMIN + POPUP "Recent" + BEGIN + MENUITEM "---\tCtrl+F1", ID_RECENT0 + MENUITEM "---\tCtrl+F2", ID_RECENT1 + MENUITEM "---\tCtrl+F3", ID_RECENT2 + MENUITEM "---\tCtrl+F4", ID_RECENT3 + MENUITEM "---\tCtrl+F5", ID_RECENT4 + MENUITEM "---\tCtrl+F6", ID_RECENT5 + MENUITEM "---\tCtrl+F7", ID_RECENT6 + MENUITEM "---\tCtrl+F8", ID_RECENT7 + MENUITEM "---\tCtrl+F9", ID_RECENT8 + MENUITEM "---\tCtrl+F10", ID_RECENT9 + MENUITEM SEPARATOR + MENUITEM "Clear List", ID_RECENT_CLEARLIST + END + MENUITEM SEPARATOR + MENUITEM "&Load State...\tCtrl+L", ID_FILE_LOADSTATE + MENUITEM "&Save State...\tCtrl+K", ID_FILE_SAVESTATE + MENUITEM SEPARATOR + POPUP "Capture" + BEGIN + MENUITEM "Snapshot 1x preview", ID_CAPTURE_SNAPSHOT1XPREVIEW + MENUITEM "Snapshot from LCD", ID_CAPTURE_SNAPSHOTFROMLCD + END + MENUITEM SEPARATOR + MENUITEM "&Quit\tCtrl+Q", ID_FILE_QUIT + END + POPUP "&Options" + BEGIN + POPUP "&Zoom" + BEGIN + MENUITEM "1x (96x64)", ID_ZOOM_1X + MENUITEM "2x (192x128)", ID_ZOOM_2X + MENUITEM "3x (288x192)", ID_ZOOM_3X + MENUITEM "4x (384x256)", ID_ZOOM_4X + MENUITEM "5x (480x320)", ID_ZOOM_5X + MENUITEM "6x (576x384)", ID_ZOOM_6X + END + POPUP "&Palette" + BEGIN + MENUITEM "Original", ID_PALETTE_0 + MENUITEM "Old PokeMini", ID_PALETTE_1 + MENUITEM "Black && White", ID_PALETTE_2 + MENUITEM "Green Palette", ID_PALETTE_3 + MENUITEM "Green Vector", ID_PALETTE_4 + MENUITEM "Red Palette", ID_PALETTE_5 + MENUITEM "Red Vector", ID_PALETTE_6 + MENUITEM "Blue LCD", ID_PALETTE_7 + MENUITEM "LED Backlight", ID_PALETTE_8 + MENUITEM "Girlish", ID_PALETTE_9 + MENUITEM "Blue Palette", ID_PALETTE_10 + MENUITEM "Blue Vector", ID_PALETTE_11 + MENUITEM "Sepia", ID_PALETTE_12 + MENUITEM "Inverted B&&W", ID_PALETTE_13 + MENUITEM "Custom 1", ID_PALETTE_14 + MENUITEM "Custom 2", ID_PALETTE_15 + END + POPUP "&LCD Mode" + BEGIN + MENUITEM "Analog", ID_LCDMODE_ANALOG + MENUITEM "3-Shades", ID_LCDMODE_3SHADES + MENUITEM "2-Shades", ID_LCDMODE_2SHADES + MENUITEM "Colors*", ID_LCDMODE_COLORS + END + POPUP "LCD &Filter" + BEGIN + MENUITEM "None", ID_LCDFILTER_NONE + MENUITEM "Dot-Matrix / High", ID_LCDFILTER_MATRIX + MENUITEM "50% Scanline", ID_LCDFILTER_SCANLINE + END + POPUP "LCD Contrast" + BEGIN + MENUITEM "Default", ID_LCDCONTRAST_DEFAULT + MENUITEM "Lowest", ID_LCDCONTRAST_LOWEST + MENUITEM "Low", ID_LCDCONTRAST_LOW + MENUITEM "Medium", ID_LCDCONTRAST_MEDIUM + MENUITEM "High", ID_LCDCONTRAST_HIGH + MENUITEM "Highest", ID_LCDCONTRAST_HIGHEST + MENUITEM "Custom...", ID_LCDCONTRAST_CUSTOM + END + POPUP "LCD Brightness" + BEGIN + MENUITEM "Default", ID_LCDBRIGHT_DEFAULT + MENUITEM "Lighter", ID_LCDBRIGHT_LIGHTER + MENUITEM "Light", ID_LCDBRIGHT_LIGHT + MENUITEM "Dark", ID_LCDBRIGHT_DARK + MENUITEM "Darker", ID_LCDBRIGHT_DARKER + MENUITEM "Custom...", ID_LCDBRIGHT_CUSTOM + END + POPUP "Rumble Level" + BEGIN + MENUITEM "None", ID_RUMBLELEVEL_0 + MENUITEM "Weak", ID_RUMBLELEVEL_1 + MENUITEM "Medium", ID_RUMBLELEVEL_2 + MENUITEM "Strong", ID_RUMBLELEVEL_3 + END + MENUITEM "Fullscreen\tF10", ID_OPTIONS_FULLSCREEN + MENUITEM SEPARATOR + POPUP "&Sound" + BEGIN + MENUITEM "Disabled", ID_SOUND_DISABLED + MENUITEM "Generated", ID_SOUND_GENERATED + MENUITEM "Direct", ID_SOUND_DIRECT + MENUITEM "Emulated", ID_SOUND_EMULATED + MENUITEM "Direct PWM", ID_SOUND_DIRECTPWM + END + MENUITEM "Pie&zo Filter", ID_OPTIONS_PIEZOFILTER + MENUITEM SEPARATOR + POPUP "&Sync Cycles" + BEGIN + MENUITEM "8 (Accurancy)", ID_SYNCCYCLES_8 + MENUITEM "16", ID_SYNCCYCLES_16 + MENUITEM "32", ID_SYNCCYCLES_32 + MENUITEM "64 (Performance)", ID_SYNCCYCLES_64 + MENUITEM "128 (Not recommended)", ID_SYNCCYCLES_128 + MENUITEM "256 (Not recommended)", ID_SYNCCYCLES_256 + MENUITEM "512 (Not recommended)", ID_SYNCCYCLES_512 + END + MENUITEM SEPARATOR + MENUITEM "&Low Battery", ID_OPTIONS_LOWBATTERY + POPUP "&RTC" + BEGIN + MENUITEM "No RTC", ID_RTC_NORTC + MENUITEM "State time difference", ID_RTC_STATE + MENUITEM "RTC from Host", ID_RTC_HOST + END + MENUITEM "Share &EEPROM", ID_OPTIONS_SHAREEEPROM + POPUP "&Multicart" + BEGIN + MENUITEM "Disabled", ID_MULTICART_DISABLED + MENUITEM "Flash 512KB (AM29LV040B)", ID_MULTICART_FLASH512KB + MENUITEM "Lupin 512KB (AM29LV040B)", ID_MULTICART_LUPIN512KB + MENUITEM "Ditto 2048KB (SST39VF1681)", ID_MULTICART_DITTO2048KB + END + MENUITEM "Force Free&BIOS", ID_OPTIONS_FORCEFREEBIOS + MENUITEM SEPARATOR + POPUP "File association" + BEGIN + MENUITEM "Register", ID_FILEASSOCIATION_REGISTER + MENUITEM "Unregister", ID_FILEASSOCIATION_UNREGISTER + END + MENUITEM SEPARATOR + MENUITEM "&Custom Palette Edit...", ID_OPTIONS_CUSTOMPALETTEEDIT + MENUITEM "Define &Keyboard...", ID_OPTIONS_DEFINEKEYBOARD + MENUITEM "Define &Joystick...", ID_OPTIONS_DEFINEJOYSTICK + MENUITEM "&Update EEPROM", ID_OPTIONS_UPDATEEEPROM + END + POPUP "&Emulator" + BEGIN + MENUITEM "Start\tF5", ID_EMULATOR_START + MENUITEM "Stop\tF2", ID_EMULATOR_STOP + MENUITEM SEPARATOR + POPUP "&Reset" + BEGIN + MENUITEM "&Soft (Partial)\tShift+R", ID_RESET_SOFT + MENUITEM "&Hard (Full)\tCtrl+R", ID_RESET_HARD + END + POPUP "Video" + BEGIN + MENUITEM "GDI", ID_VIDEO_GDI + MENUITEM "DirectDraw", ID_VIDEO_DIRECTDRAW + MENUITEM "Direct3D", ID_VIDEO_DIRECT3D + END + MENUITEM "Autorun", ID_EMULATOR_AUTORUN + MENUITEM "Pause when inactive", ID_EMULATOR_PAUSEWHENINACTIVE + END + POPUP "&Help" + BEGIN + MENUITEM "Visit website", ID_HELP_VISITWEBSITE + MENUITEM SEPARATOR + MENUITEM "&Command-Line switches...", ID_HELP_COMMANDLINE + MENUITEM "&About", ID_HELP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// RT_MANIFEST +// + +IDR_WINXP RT_MANIFEST "winxp.manifest" + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_ACCELERATOR ACCELERATORS +BEGIN + VK_F5, ID_EMULATOR_START, VIRTKEY, NOINVERT + VK_F2, ID_EMULATOR_STOP, VIRTKEY, NOINVERT + "O", ID_FILE_OPENMIN, VIRTKEY, CONTROL, NOINVERT + "Q", ID_FILE_QUIT, VIRTKEY, CONTROL, NOINVERT + VK_F10, ID_OPTIONS_FULLSCREEN, VIRTKEY, NOINVERT + "R", ID_RESET_HARD, VIRTKEY, CONTROL, NOINVERT + "R", ID_RESET_SOFT, VIRTKEY, SHIFT, NOINVERT + VK_F1, ID_RECENT0, VIRTKEY, CONTROL, NOINVERT + VK_F2, ID_RECENT1, VIRTKEY, CONTROL, NOINVERT + VK_F3, ID_RECENT2, VIRTKEY, CONTROL, NOINVERT + VK_F4, ID_RECENT3, VIRTKEY, CONTROL, NOINVERT + VK_F5, ID_RECENT4, VIRTKEY, CONTROL, NOINVERT + VK_F6, ID_RECENT5, VIRTKEY, CONTROL, NOINVERT + VK_F7, ID_RECENT6, VIRTKEY, CONTROL, NOINVERT + VK_F8, ID_RECENT7, VIRTKEY, CONTROL, NOINVERT + VK_F9, ID_RECENT8, VIRTKEY, CONTROL, NOINVERT + VK_F10, ID_RECENT9, VIRTKEY, CONTROL, NOINVERT + "L", ID_FILE_LOADSTATE, VIRTKEY, CONTROL, NOINVERT + "K", ID_FILE_SAVESTATE, VIRTKEY, CONTROL, NOINVERT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_KEYDEF DIALOGEX 0, 0, 267, 185 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Define Keyboard" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,157,164,50,14 + PUSHBUTTON "Cancel",IDCANCEL,210,164,50,14 + RTEXT "Key Menu:",IDC_KEYL_MENU,7,7,40,10,SS_CENTERIMAGE + RTEXT "Key A:",IDC_KEYL_A,7,22,40,10,SS_CENTERIMAGE + RTEXT "Key B:",IDC_KEYL_B,7,37,40,10,SS_CENTERIMAGE + RTEXT "Key C:",IDC_KEYL_C,7,52,40,10,SS_CENTERIMAGE + RTEXT "Key Up:",IDC_KEYL_UP,7,67,40,10,SS_CENTERIMAGE + RTEXT "Key Down:",IDC_KEYL_DOWN,7,82,40,10,SS_CENTERIMAGE + RTEXT "Key Left:",IDC_KEYL_LEFT,7,97,40,10,SS_CENTERIMAGE + RTEXT "Key Right:",IDC_KEYL_RIGHT,7,112,40,10,SS_CENTERIMAGE + RTEXT "Key Power:",IDC_KEYL_POWER,7,127,40,10,SS_CENTERIMAGE + RTEXT "Key Shake:",IDC_KEYL_SHAKE,7,142,40,10,SS_CENTERIMAGE + COMBOBOX IDC_KEYC1_MENU,56,7,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC2_MENU,160,7,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_A,56,22,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC2_A,160,22,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_B,56,37,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC2_B,160,37,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_C,56,52,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC2_C,160,52,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_UP,56,67,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC2_UP,160,67,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_DOWN,56,82,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC2_DOWN,160,82,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_LEFT,56,97,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC2_LEFT,160,97,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_RIGHT,56,112,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC2_RIGHT,160,112,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_POWER,56,127,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC2_POWER,160,127,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_SHAKE,56,142,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC2_SHAKE,160,142,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP +END + +IDD_JOYDEF DIALOGEX 0, 0, 163, 262 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Define Joystick" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,53,241,50,14 + PUSHBUTTON "Cancel",IDCANCEL,106,241,50,14 + CONTROL "Enable Joystick",IDC_ENABLEJOY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,65,10 + COMBOBOX IDC_JOYDEVSELECT,56,20,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + RTEXT "Device:",IDC_JOYDEVLABEL,7,23,40,10,SS_CENTERIMAGE + CONTROL "Axis as D-Pad",IDC_AXISASDPAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,55,60,10 + CONTROL "Hats as D-Pad",IDC_HATSASDPAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,68,61,10 + RTEXT "Key Menu:",IDC_KEYL_MENU,7,84,40,10,SS_CENTERIMAGE + RTEXT "Key A:",IDC_KEYL_A,7,100,40,10,SS_CENTERIMAGE + RTEXT "Key B:",IDC_KEYL_B,7,115,40,10,SS_CENTERIMAGE + RTEXT "Key C:",IDC_KEYL_C,7,130,40,10,SS_CENTERIMAGE + RTEXT "Key Up:",IDC_KEYL_UP,7,145,40,10,SS_CENTERIMAGE + RTEXT "Key Down:",IDC_KEYL_DOWN,7,160,40,10,SS_CENTERIMAGE + RTEXT "Key Left:",IDC_KEYL_LEFT,7,175,40,10,SS_CENTERIMAGE + RTEXT "Key Right:",IDC_KEYL_RIGHT,7,190,40,10,SS_CENTERIMAGE + RTEXT "Key Power:",IDC_KEYL_POWER,7,205,40,10,SS_CENTERIMAGE + RTEXT "Key Shake:",IDC_KEYL_SHAKE,7,220,40,10,SS_CENTERIMAGE + COMBOBOX IDC_KEYC1_MENU,56,85,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_A,56,100,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_B,56,115,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_C,56,130,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_UP,56,145,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_DOWN,56,160,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_LEFT,56,175,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_RIGHT,56,190,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_POWER,56,205,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_KEYC1_SHAKE,56,220,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Force-Feedback for Rumble",IDC_FORCEFEEDBACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,42,104,10 +END + +IDD_CUSTOMPALEDIT DIALOGEX 0, 0, 190, 330 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Custom Palette Edit..." +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,78,309,50,14 + PUSHBUTTON "Cancel",IDCANCEL,131,309,50,14 + CTEXT "Custom 1 (Light Pixel):",IDC_STATIC,7,7,174,8 + CONTROL "Custom 1 (Light Pixel)",IDC_CUSTOM1LIGHTP, + "POKEMINI_cpaledit",WS_TABSTOP,7,17,174,24 + CONTROL "",IDC_CUSTOM1LIGHTRS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,7,42,58,16 + CONTROL "",IDC_CUSTOM1LIGHTGS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,65,42,58,16 + CONTROL "",IDC_CUSTOM1LIGHTBS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,123,42,58,16 + CTEXT "Red: 255",IDC_CUSTOM1LIGHTRL,7,60,58,16 + CTEXT "Green: 255",IDC_CUSTOM1LIGHTGL,65,60,58,16 + CTEXT "Blue: 255",IDC_CUSTOM1LIGHTBL,123,60,58,16 + CTEXT "Custom 1 (Dark Pixel):",IDC_STATIC,7,83,174,8 + CONTROL "Custom 1 (Dark Pixel)",IDC_CUSTOM1DARKP, + "POKEMINI_cpaledit",WS_TABSTOP,7,93,174,24 + CONTROL "",IDC_CUSTOM1DARKRS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,7,118,58,16 + CONTROL "",IDC_CUSTOM1DARKGS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,65,118,58,16 + CONTROL "",IDC_CUSTOM1DARKBS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,123,118,58,16 + CTEXT "Red: 255",IDC_CUSTOM1DARKRL,7,136,58,16 + CTEXT "Green: 255",IDC_CUSTOM1DARKGL,65,136,58,16 + CTEXT "Blue: 255",IDC_CUSTOM1DARKBL,123,136,58,16 + CTEXT "Custom 2 (Light Pixel):",IDC_STATIC,7,158,174,8 + CONTROL "Custom 2 (Light Pixel)",IDC_CUSTOM2LIGHTP, + "POKEMINI_cpaledit",WS_TABSTOP,7,167,174,24 + CONTROL "",IDC_CUSTOM2LIGHTRS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,7,193,58,16 + CONTROL "",IDC_CUSTOM2LIGHTGS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,65,193,58,16 + CONTROL "",IDC_CUSTOM2LIGHTBS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,123,193,58,16 + CTEXT "Red: 255",IDC_CUSTOM2LIGHTRL,7,210,58,16 + CTEXT "Green: 255",IDC_CUSTOM2LIGHTGL,65,210,58,16 + CTEXT "Blue: 255",IDC_CUSTOM2LIGHTBL,123,210,58,16 + CTEXT "Custom 2 (Dark Pixel):",IDC_STATIC,7,233,174,8 + CONTROL "Custom 1 (Dark Pixel)",IDC_CUSTOM2DARKP, + "POKEMINI_cpaledit",WS_TABSTOP,7,242,174,24 + CONTROL "",IDC_CUSTOM2DARKRS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,7,267,58,16 + CONTROL "",IDC_CUSTOM2DARKGS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,65,267,58,16 + CONTROL "",IDC_CUSTOM2DARKBS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,123,267,58,16 + CTEXT "Red: 255",IDC_CUSTOM2DARKRL,7,286,58,16 + CTEXT "Green: 255",IDC_CUSTOM2DARKGL,65,286,58,16 + CTEXT "Blue: 255",IDC_CUSTOM2DARKBL,123,286,58,16 +END + +IDD_CUSTOMSLIDER DIALOGEX 0, 0, 186, 49 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Set custom value..." +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,75,28,50,14 + PUSHBUTTON "Cancel",IDCANCEL,129,28,50,14 + CONTROL "",IDC_CUSTOMSLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,7,7,172,15 + CTEXT "Value: 0",IDC_CUSTOMSLIDERT,7,26,58,16 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_KEYDEF, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 260 + TOPMARGIN, 7 + BOTTOMMARGIN, 178 + END + + IDD_JOYDEF, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 156 + TOPMARGIN, 7 + BOTTOMMARGIN, 255 + END + + IDD_CUSTOMPALEDIT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 181 + TOPMARGIN, 7 + BOTTOMMARGIN, 323 + END + + IDD_CUSTOMSLIDER, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 42 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/platform/win32/VC2022/Resource.h b/platform/win32/VC2022/Resource.h new file mode 100644 index 0000000..9e588fb --- /dev/null +++ b/platform/win32/VC2022/Resource.h @@ -0,0 +1,235 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by PokeMini_Win32.rc +// +#define IDI_ICON1 100 +#define IDI_ICON2 101 +#define IDI_ICON3 102 +#define IDR_MENU 103 +#define IDR_WINXP 104 +#define IDR_ACCELERATOR 105 +#define IDD_KEYDEF 106 +#define IDD_JOYDEF 107 +#define IDD_CUSTOMPALEDIT 108 +#define IDD_CUSTOMSLIDER 109 +#define IDC_STATUSBAR 120 +#define IDC_KEYL_C 120 +#define IDC_TITLETIMER 121 +#define IDC_KEYL_MENU 1001 +#define IDC_KEYC1_MENU 1002 +#define IDC_KEYL_A 1003 +#define IDC_KEYL_B 1004 +#define IDC_KEYL_UP 1006 +#define IDC_KEYL_DOWN 1007 +#define IDC_KEYL_LEFT 1008 +#define IDC_KEYL_RIGHT 1009 +#define IDC_KEYL_POWER 1010 +#define IDC_KEYL_SHAKE 1011 +#define IDC_KEYC2_MENU 1012 +#define IDC_JOYDEVLABEL 1012 +#define IDC_KEYC1_A 1013 +#define IDC_KEYC2_A 1014 +#define IDC_KEYC1_B 1015 +#define IDC_KEYC2_B 1016 +#define IDC_KEYC1_C 1017 +#define IDC_KEYC2_C 1018 +#define IDC_KEYC1_UP 1019 +#define IDC_KEYC2_UP 1020 +#define IDC_KEYC1_DOWN 1021 +#define IDC_COMBO12 1022 +#define IDC_KEYC2_DOWN 1022 +#define IDC_KEYC1_LEFT 1023 +#define IDC_KEYC2_LEFT 1024 +#define IDC_KEYC1_RIGHT 1025 +#define IDC_KEYC2_RIGHT 1026 +#define IDC_KEYC1_POWER 1027 +#define IDC_KEYC2_POWER 1028 +#define IDC_KEYC1_SHAKE 1029 +#define IDC_COMBO8 1030 +#define IDC_KEYC2_SHAKE 1030 +#define IDC_ENABLEJOY 1031 +#define IDC_JOYDEVSELECT 1032 +#define IDC_AXISASDPAD 1033 +#define IDC_CHECK3 1034 +#define IDC_HATSASDPAD 1034 +#define IDC_CHECK1 1035 +#define IDC_FORCEFEEDBACK 1035 +#define IDC_CUSTOM1LIGHT 1036 +#define IDC_CUSTOM1DARK 1036 +#define IDC_CUSTOM1LIGHTP 1036 +#define IDC_CUSTOM1LIGHTRS 1037 +#define IDC_CUSTOM1LIGHTGS 1038 +#define IDC_SLIDER3 1039 +#define IDC_CUSTOM1LIGHTBS 1039 +#define IDC_CUSTOM1LIGHTRL 1040 +#define IDC_CUSTOM1LIGHTGL 1041 +#define IDC_CUSTOM1LIGHTBL 1042 +#define IDC_CUSTOM1LIGHT2 1043 +#define IDC_CUSTOM1DARKP 1043 +#define IDC_CUSTOM1DARKRS 1044 +#define IDC_CUSTOM1DARKGS 1045 +#define IDC_CUSTOM1DARKBS 1046 +#define IDC_CUSTOM1DARKRL 1047 +#define IDC_CUSTOM1DARKGL 1048 +#define IDC_CUSTOM1LIGHTBL2 1049 +#define IDC_CUSTOM1DARKBL 1049 +#define IDC_CUSTOMSLIDER 1052 +#define IDC_CUSTOMSLIDERL 1053 +#define IDC_CUSTOMSLIDERT 1053 +#define IDC_CUSTOM2LIGHTP 1057 +#define IDC_CUSTOM2LIGHTRS 1058 +#define IDC_CUSTOM2LIGHTGS 1059 +#define IDC_CUSTOM2LIGHTBS 1060 +#define IDC_CUSTOM2LIGHTRL 1061 +#define IDC_CUSTOM2LIGHTGL 1062 +#define IDC_CUSTOM2LIGHTBL 1063 +#define IDC_CUSTOM2DARKP 1071 +#define IDC_CUSTOM2DARKRS 1072 +#define IDC_CUSTOM2DARKGS 1073 +#define IDC_CUSTOM2DARKBS 1074 +#define IDC_CUSTOM2DARKRL 1075 +#define IDC_CUSTOM2DARKGL 1076 +#define IDC_CUSTOM1DARKBL2 1077 +#define IDC_CUSTOM2DARKBL 1077 +#define ID_FILE_OPENMIN 40001 +#define ID_FILE_OPENBIOS 40002 +#define ID_FILE_RELOADMIN 40003 +#define ID_FILE_LOADSTATE 40005 +#define ID_FILE_SAVESTATE 40006 +#define ID_FILE_QUIT 40007 +#define ID_FILE_FREEBIOS 40008 +#define ID_ZOOM_1X 40010 +#define ID_ZOOM_2X 40011 +#define ID_ZOOM_3X 40012 +#define ID_ZOOM_4X 40013 +#define ID_ZOOM_5X 40014 +#define ID_ZOOM_6X 40015 +#define ID_PALETTE_0 40033 +#define ID_PALETTE_1 40034 +#define ID_PALETTE_2 40035 +#define ID_PALETTE_3 40036 +#define ID_PALETTE_4 40037 +#define ID_PALETTE_5 40038 +#define ID_PALETTE_6 40039 +#define ID_PALETTE_7 40040 +#define ID_PALETTE_8 40041 +#define ID_PALETTE_9 40042 +#define ID_PALETTE_10 40043 +#define ID_PALETTE_11 40044 +#define ID_PALETTE_12 40045 +#define ID_PALETTE_13 40046 +#define ID_PALETTE_14 40047 +#define ID_PALETTE_15 40048 +#define ID_LCDMODE_ANALOG 40050 +#define ID_LCDMODE_COLORS 40053 +#define ID_LCDMODE_3SHADES 40054 +#define ID_LCDMODE_2SHADES 40055 +#define ID_LCDFILTER_NONE 40057 +#define ID_LCDFILTER_MATRIX 40059 +#define ID_SOUND_DISABLED 40061 +#define ID_SOUND_DIRECT 40062 +#define ID_SOUND_EMULATED 40063 +#define ID_SOUND_GENERATED 40064 +#define ID_SOUND_DIRECTPWM 40065 +#define ID_OPTIONS_PIEZOFILTER 40066 +#define ID_SYNCCYCLES_8 40068 +#define ID_SYNCCYCLES_16 40069 +#define ID_SYNCCYCLES_32 40070 +#define ID_SYNCCYCLES_64 40071 +#define ID_SYNCCYCLES_128 40072 +#define ID_SYNCCYCLES_256 40073 +#define ID_SYNCCYCLES_512 40074 +#define ID_OPTIONS_LOWBATTERY 40075 +#define ID_RTC_NORTC 40077 +#define ID_RTC_STATE 40080 +#define ID_RTC_HOST 40081 +#define ID_OPTIONS_SHAREEEPROM 40082 +#define ID_MULTICART_DISABLED 40084 +#define ID_MULTICART_FLASH512KB 40085 +#define ID_MULTICART_LUPIN512KB 40086 +#define ID_OPTIONS_FORCEFREEBIOS 40087 +#define ID_OPTIONS_UPDATEEEPROM 40088 +#define ID_OPTIONS_SAVEOPTIONS 40089 +#define ID_RESET_HARD 40091 +#define ID_RESET_SOFT 40092 +#define ID_HELP_ABOUT 40094 +#define ID_HELP_COMMANDLINE 40095 +#define ID_EMULATOR_START 40098 +#define ID_EMULATOR_STOP 40099 +#define ID_BPP_16BPP 40103 +#define ID_BPP_32BPP 40104 +#define ID_EMULATOR_AUTORUN 40105 +#define ID_EMULATOR_VIDEO 40106 +#define ID_VIDEO_GDI 40107 +#define ID_VIDEO_DIRECTDRAW 40108 +#define ID_VIDEO_DIRECT3D 40109 +#define ID_OPTIONS_FULLSCREEN 40118 +#define ID_OPTIONS_DEFINEKEYBOARD 40119 +#define ID_OPTIONS_DEFINEJOYSTICK 40120 +#define ID_OPTIONS_CUSTOMPALETTEEDIT 40121 +#define ID_HELP_VISITWEBSITE 40122 +#define ID_FILE_CAPTURE 40123 +#define ID_CAPTURE_SNAPSHOT1XPREVIEW 40124 +#define ID_CAPTURE_SNAPSHOTFROMLCD 40125 +#define ID_LCDFILTER_50 40126 +#define ID_LCDFILTER_SCANLINE 40127 +#define ID_FILE_RECENT 40128 +#define ID_RECENT_CLEARLIST 40129 +#define ID_RECENT_ 40130 +#define ID_RECENT0 40131 +#define ID_RECENT1 40132 +#define ID_RECENT2 40133 +#define ID_RECENT3 40134 +#define ID_RECENT4 40135 +#define ID_RECENT5 40136 +#define ID_RECENT6 40137 +#define ID_RECENT7 40138 +#define ID_RECENT8 40139 +#define ID_RECENT9 40140 +#define ID_EMULATOR_PAUSEWHENINACTIVE 40145 +#define ID_EMULATOR_FILEASSOCIATION 40146 +#define ID_FILEASSOCIATION_REGISTER 40147 +#define ID_FILEASSOCIATION_UNREGISTER 40148 +#define ID_OPTIONS_RUMBLEAMOUNT 40149 +#define ID_OPTIONS_RUMBLELEVEL 40150 +#define ID_RUMBLELEVEL_NONE 40151 +#define ID_RUMBLELEVEL_WEAK 40152 +#define ID_RUMBLELEVEL_MEDIUM 40153 +#define ID_RUMBLELEVEL_STRONG 40154 +#define ID_RUMBLELEVEL_0 40155 +#define ID_RUMBLELEVEL_1 40156 +#define ID_RUMBLELEVEL_2 40157 +#define ID_RUMBLELEVEL_3 40158 +#define ID_OPTIONS_LCDCONTRAST 40159 +#define ID_LCDCONTRAST_DEFAULT 40160 +#define ID_LCDCONTRAST_LOWEST 40161 +#define ID_LCDCONTRAST_HIGHEST 40162 +#define ID_LCDCONTRAST_CUSTOM 40163 +#define ID_OPTIONS_LCDBRIGHTNESS 40164 +#define ID_LCDBRIGHTNESS_DEFAULT 40165 +#define ID_LCDBRIGHTNESS_LIGHTER 40166 +#define ID_LCDBRIGHTNESS_LIGHT 40167 +#define ID_LCDBRIGHTNESS_DARK 40168 +#define ID_LCDBRIGHTNESS_DARKER 40169 +#define ID_LCDBRIGHTNESS_CUSTOM 40170 +#define ID_LCDCONTRAST_MEDIUM 40171 +#define ID_LCDBRIGHT_DEFAULT 40172 +#define ID_LCDBRIGHT_LIGHTER 40173 +#define ID_LCDBRIGHT_LIGHT 40174 +#define ID_LCDBRIGHT_DARK 40175 +#define ID_LCDBRIGHT_DARKER 40176 +#define ID_LCDBRIGHT_CUSTOM 40177 +#define ID_LCDCONTRAST_LOW 40178 +#define ID_LCDCONTRAST_HIGH 40179 +#define ID_MULTICART_DITTO2048KB 40180 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 110 +#define _APS_NEXT_COMMAND_VALUE 40181 +#define _APS_NEXT_CONTROL_VALUE 1054 +#define _APS_NEXT_SYMED_VALUE 103 +#endif +#endif diff --git a/platform/win32/VC2022/afxres.h b/platform/win32/VC2022/afxres.h new file mode 100644 index 0000000..6f31730 --- /dev/null +++ b/platform/win32/VC2022/afxres.h @@ -0,0 +1,5 @@ +#pragma once +#include +#include + +#define IDC_STATIC -1 diff --git a/platform/win32/VC2022/winxp.manifest b/platform/win32/VC2022/winxp.manifest new file mode 100644 index 0000000..049540b --- /dev/null +++ b/platform/win32/VC2022/winxp.manifest @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/source/CommandLine.c b/source/CommandLine.c index 706ef2a..e5d157c 100644 --- a/source/CommandLine.c +++ b/source/CommandLine.c @@ -111,7 +111,7 @@ int CommandLineCustomArgs(int argc, char **argv, int *extra, const TCommandLineC if ((!custom) || (!extra)) return 0; *extra = 0; for (i = 0; custom[i].type != COMMANDLINE_EOL; i++) { - if ((argc > 0) && custom[i].name) { + if ((argc > 0) && custom[i].name[0]) { if (!strcasecmp(*argv, custom[i].name)) { if (custom[i].type == COMMANDLINE_BOOL) { if (--argc && custom[i].ref) *custom[i].ref = Str2Bool(*++argv); @@ -206,7 +206,7 @@ int CommandLineCustomConfFile(char *key, char *value, const TCommandLineCustom * int i; if (!custom) return 0; for (i = 0; custom[i].type != COMMANDLINE_EOL; i++) { - if (custom[i].name) { + if (custom[i].name[0]) { if (!strcasecmp(key, custom[i].name)) { if (custom[i].type == COMMANDLINE_BOOL) { if (custom[i].ref) *custom[i].ref = Str2Bool(value); @@ -477,7 +477,7 @@ int CommandLineConfSave(void) fprintf(fo, "# Platform options\n"); custom = CommandLine.confcustom; for (i = 0; custom[i].type != COMMANDLINE_EOL; i++) { - if (custom[i].name) { + if (custom[i].name[0]) { if (custom[i].type == COMMANDLINE_BOOL) { fprintf(fo, "%s=%s\n", custom[i].name, *custom[i].ref ? "yes" : "no"); } else if (custom[i].type == COMMANDLINE_INT) { @@ -544,7 +544,7 @@ int CustomConfSave(const char *filename, const TCommandLineCustom *custom, const fprintf(fo, "# Generated by PokeMini %s\n", PokeMini_Version); fprintf(fo, "# %s\n", description); for (i = 0; custom[i].type != COMMANDLINE_EOL; i++) { - if (custom[i].name) { + if (custom[i].name[0]) { if (custom[i].type == COMMANDLINE_BOOL) { fprintf(fo, "%s=%s\n", custom[i].name, *custom[i].ref ? "yes" : "no"); } else if (custom[i].type == COMMANDLINE_INT) { diff --git a/source/CommandLine.h b/source/CommandLine.h index 7bc3ae3..51f7028 100644 --- a/source/CommandLine.h +++ b/source/CommandLine.h @@ -40,7 +40,7 @@ enum { typedef struct { int forcefreebios; - char min_file[PMTMPV]; + char min_file[PMTMPV - 4]; // remove 4 to fit .eep char bios_file[PMTMPV]; char eeprom_file[PMTMPV]; char state_file[PMTMPV]; diff --git a/sourcex/HelpSupport.c b/sourcex/HelpSupport.c index 7d22787..c0ccfa1 100644 --- a/sourcex/HelpSupport.c +++ b/sourcex/HelpSupport.c @@ -40,7 +40,7 @@ void HelpLaunchURL(const char *url) void HelpLaunchDoc(const char *sid) { - char tmp[PMTMPV]; + char tmp[7 + PMTMPV + 5 + strlen(sid) + 5]; #ifdef _WIN32 sprintf(tmp, "%s\\doc\\%s.html", PokeMini_ExecDir, sid); ShellExecuteA(NULL, "open", tmp, "", NULL, SW_SHOWNORMAL); diff --git a/sourcex/InstructionInfo.c b/sourcex/InstructionInfo.c index 64fae10..0e06c77 100644 --- a/sourcex/InstructionInfo.c +++ b/sourcex/InstructionInfo.c @@ -1,5 +1,5 @@ /* - PokeMini - Pokémon-Mini Emulator + PokeMini - Pok�mon-Mini Emulator Copyright (C) 2009-2012 JustBurn This program is free software: you can redistribute it and/or modify @@ -22,7 +22,7 @@ char *DebugCPUInstructions_Opcode[] = { ".DB", // 0 (No instruction) "NOP", // 1 - "MOV", // 2 + "LD", // 2 "EXPAND", // 3 "ADD", // 4 "ADC", // 5 @@ -30,94 +30,52 @@ char *DebugCPUInstructions_Opcode[] = { "SBC", // 7 "AND", // 8 "OR", // 9 - "CMP", // 10 + "CP", // 10 "XOR", // 11 "INC", // 12 "DEC", // 13 - "TST", // 14 + "BIT", // 14 "EX", // 15 "PUSH", // 16 "POP", // 17 - "PUSHX", // 18 - "POPX", // 19 - "XCHG", // 20 + "CPL", // 18 + "NEG", // 19 + "EX", // 20 "PACK", // 21 - "UNPACK", // 22 + "UPCK", // 22 "SWAP", // 23 - "CALLC", // 24 - "CALLNC", // 25 - "CALLZ", // 26 - "CALLNZ", // 27 - "JC", // 28 - "JNC", // 29 - "JZ", // 30 - "JNZ", // 31 - "CALL", // 32 - "JMP", // 33 - "JDBNZ", // 34 + "CARS", // 24 + "CARL", // 25 + "CALL", // 26 + "JRS", // 27 + "JRL", // 28 + "DJR", // 29 + "JP", // 30 + "HALT", // 31 + "SLP", // 32 + "MLT", // 33 + "DIV", // 34 "RET", // 35 - "RETI", // 36 - "RETSKIP", // 37 - "CINT", // 38 - "JINT", // 39 - "SAL", // 40 - "SHL", // 41 - "SAR", // 42 - "SHR", // 43 - "ROLC", // 44 - "ROL", // 45 - "RORC", // 46 - "ROR", // 47 - "NOT", // 48 - "NEG", // 49 - "MUL", // 50 - "DIV", // 51 - "PUSHA", // 52 - "PUSHAX", // 53 - "POPA", // 54 - "POPAX", // 55 - "JL", // 56 - "JLE", // 57 - "JG", // 58 - "JGE", // 59 - "JO", // 60 - "JNO", // 61 - "JNS", // 62 - "JS", // 63 - "JNX0", // 64 - "JNX1", // 65 - "JNX2", // 66 - "JNX3", // 67 - "JX0", // 68 - "JX1", // 69 - "JX2", // 70 - "JX3", // 71 - "CALLL", // 72 - "CALLLE", // 73 - "CALLG", // 74 - "CALLGE", // 75 - "CALLO", // 76 - "CALLNO", // 77 - "CALLNS", // 78 - "CALLS", // 79 - "CALLNX0", // 80 - "CALLNX1", // 81 - "CALLNX2", // 82 - "CALLNX3", // 83 - "CALLX0", // 84 - "CALLX1", // 85 - "CALLX2", // 86 - "CALLX3", // 87 - "STOP", // 88 - "HALT", // 89 + "RETE", // 36 + "RETS", // 37 + "INT", // 38 + "SEP", // 39 + "SLA", // 40 + "SLL", // 41 + "SRA", // 42 + "SRL", // 43 + "RL", // 44 + "RLC", // 45 + "RR", // 46 + "RRC", // 47 NULL }; char *DebugCPUInstructions_Operand[] = { - "", // 0 (No operand) + "", // 0 (No operand) "%j", // 1 "%J", // 2 - "%i", // 3 + "%EP", // 3 "%u", // 4 "%U", // 5 "%s", // 6 @@ -126,33 +84,61 @@ char *DebugCPUInstructions_Operand[] = { "B", // 9 "%u", // 10 "[HL]", // 11 - "[N+%u]", // 12 + "[BR:%u]", // 12 "[%U]", // 13 - "[X]", // 14 - "[Y]", // 15 + "[IX]", // 14 + "[IY]", // 15 "L", // 16 "H", // 17 - "N", // 18 + "BR", // 18 "SP", // 19 "BA", // 20 "HL", // 21 - "X", // 22 - "Y", // 23 - "F", // 24 - "I", // 25 - "XI", // 26 - "YI", // 27 - "[X+%s]", // 28 - "[Y+%s]", // 29 - "[X+L]", // 30 - "[Y+L]", // 31 - "U", // 32 - "V", // 33 - "XI", // 34 - "YI", // 35 + "IX", // 22 + "IY", // 23 + "SC", // 24 + "EP", // 25 + "XP", // 26 + "YP", // 27 + "[IX+%s]", // 28 + "[IY+%s]", // 29 + "[IX+L]", // 30 + "[IY+L]", // 31 + "NB", // 32 + "NB", // 33 + "XP", // 34 + "YP", // 35 "[SP+%s]", // 36 "PC", // 37 "%h", // 38 + // PUSH / POP + "ALL", // 39 + "ALE", // 40 + // JRS / JRL / DJR / CARS / CARL + "C", // 41 + "NC", // 42 + "Z", // 43 + "NZ", // 44 + "LT", // 45 + "LE", // 46 + "GT", // 47 + "GE", // 48 + "V", // 49 + "NV", // 50 + "P", // 51 + "M", // 52 + "F0", // 53 + "F1", // 54 + "F2", // 55 + "F3", // 56 + "NF0", // 57 + "NF1", // 58 + "NF2", // 59 + "NF3", // 60 + // PUSH + "IP", // 61 + // Illegal + "#%u:L", // 62 NULL }; @@ -162,7 +148,7 @@ char *DebugCPUInstructions_Operand[] = { // %S = Signed 16-Bits // %j = Relative jump (8-Bits) // %J = Relative jump (16-Bits) -// %i = Interrupt +// %EP = Interrupt InstructionInfo DebugCPUInstructions_DX[8] = { {0x00, 1, 0, 0, 4, 0, 0, 0}, // ".DB %u" @@ -178,372 +164,372 @@ InstructionInfo DebugCPUInstructions_DX[8] = { InstructionInfo DebugCPUInstructions_XX[256] = { {0x00, 1, 4, 0, 8, 0, 8, 0}, // 00 __ "ADD A, A" {0x00, 1, 4, 0, 8, 0, 9, 0}, // 01 __ "ADD A, B" - {0x00, 2, 4, 0, 8, 0,10, 1}, // 02 __ "ADD A, %u" + {0x00, 2, 4, 0, 8, 0,10, 1}, // 02 __ "ADD A, #%u" {0x00, 1, 4, 0, 8, 0,11, 0}, // 03 __ "ADD A, [HL]" - {0x00, 2, 4, 0, 8, 0,12, 1}, // 04 __ "ADD A, [N+%u]" + {0x00, 2, 4, 0, 8, 0,12, 1}, // 04 __ "ADD A, [BR:%u]" {0x00, 3, 4, 0, 8, 0,13, 1}, // 05 __ "ADD A, [%U]" - {0x00, 1, 4, 0, 8, 0,14, 0}, // 06 __ "ADD A, [X]" - {0x00, 1, 4, 0, 8, 0,15, 0}, // 07 __ "ADD A, [Y]" + {0x00, 1, 4, 0, 8, 0,14, 0}, // 06 __ "ADD A, [IX]" + {0x00, 1, 4, 0, 8, 0,15, 0}, // 07 __ "ADD A, [IY]" {0x00, 1, 5, 0, 8, 0, 8, 0}, // 08 __ "ADC A, A" {0x00, 1, 5, 0, 8, 0, 9, 0}, // 09 __ "ADC A, B" - {0x00, 2, 5, 0, 8, 0,10, 1}, // 0A __ "ADC A, %u" + {0x00, 2, 5, 0, 8, 0,10, 1}, // 0A __ "ADC A, #%u" {0x00, 1, 5, 0, 8, 0,11, 0}, // 0B __ "ADC A, [HL]" - {0x00, 2, 5, 0, 8, 0,12, 1}, // 0C __ "ADC A, [N+%u]" + {0x00, 2, 5, 0, 8, 0,12, 1}, // 0C __ "ADC A, [BR:%u]" {0x00, 3, 5, 0, 8, 0,13, 1}, // 0D __ "ADC A, [%U]" - {0x00, 1, 5, 0, 8, 0,14, 0}, // 0E __ "ADC A, [X]" - {0x00, 1, 5, 0, 8, 0,15, 0}, // 0F __ "ADC A, [Y]" + {0x00, 1, 5, 0, 8, 0,14, 0}, // 0E __ "ADC A, [IX]" + {0x00, 1, 5, 0, 8, 0,15, 0}, // 0F __ "ADC A, [IY]" {0x00, 1, 6, 0, 8, 0, 8, 0}, // 10 __ "SUB A, A" {0x00, 1, 6, 0, 8, 0, 9, 0}, // 11 __ "SUB A, B" - {0x00, 2, 6, 0, 8, 0,10, 1}, // 12 __ "SUB A, %u" + {0x00, 2, 6, 0, 8, 0,10, 1}, // 12 __ "SUB A, #%u" {0x00, 1, 6, 0, 8, 0,11, 0}, // 13 __ "SUB A, [HL]" - {0x00, 2, 6, 0, 8, 0,12, 1}, // 14 __ "SUB A, [N+%u]" + {0x00, 2, 6, 0, 8, 0,12, 1}, // 14 __ "SUB A, [BR:%u]" {0x00, 3, 6, 0, 8, 0,13, 1}, // 15 __ "SUB A, [%U]" - {0x00, 1, 6, 0, 8, 0,14, 0}, // 16 __ "SUB A, [X]" - {0x00, 1, 6, 0, 8, 0,15, 0}, // 17 __ "SUB A, [Y]" + {0x00, 1, 6, 0, 8, 0,14, 0}, // 16 __ "SUB A, [IX]" + {0x00, 1, 6, 0, 8, 0,15, 0}, // 17 __ "SUB A, [IY]" {0x00, 1, 7, 0, 8, 0, 8, 0}, // 18 __ "SBC A, A" {0x00, 1, 7, 0, 8, 0, 9, 0}, // 19 __ "SBC A, B" - {0x00, 2, 7, 0, 8, 0,10, 1}, // 1A __ "SBC A, %u" + {0x00, 2, 7, 0, 8, 0,10, 1}, // 1A __ "SBC A, #%u" {0x00, 1, 7, 0, 8, 0,11, 0}, // 1B __ "SBC A, [HL]" - {0x00, 2, 7, 0, 8, 0,12, 1}, // 1C __ "SBC A, [N+%u]" + {0x00, 2, 7, 0, 8, 0,12, 1}, // 1C __ "SBC A, [BR:%u]" {0x00, 3, 7, 0, 8, 0,13, 1}, // 1D __ "SBC A, [%U]" - {0x00, 1, 7, 0, 8, 0,14, 0}, // 1E __ "SBC A, [X]" - {0x00, 1, 7, 0, 8, 0,15, 0}, // 1F __ "SBC A, [Y]" + {0x00, 1, 7, 0, 8, 0,14, 0}, // 1E __ "SBC A, [IX]" + {0x00, 1, 7, 0, 8, 0,15, 0}, // 1F __ "SBC A, [IY]" {0x00, 1, 8, 0, 8, 0, 8, 0}, // 20 __ "AND A, A" {0x00, 1, 8, 0, 8, 0, 9, 0}, // 21 __ "AND A, B" - {0x00, 2, 8, 0, 8, 0,10, 1}, // 22 __ "AND A, %u" + {0x00, 2, 8, 0, 8, 0,10, 1}, // 22 __ "AND A, #%u" {0x00, 1, 8, 0, 8, 0,11, 0}, // 23 __ "AND A, [HL]" - {0x00, 2, 8, 0, 8, 0,12, 1}, // 24 __ "AND A, [N+%u]" + {0x00, 2, 8, 0, 8, 0,12, 1}, // 24 __ "AND A, [BR:%u]" {0x00, 3, 8, 0, 8, 0,13, 1}, // 25 __ "AND A, [%U]" - {0x00, 1, 8, 0, 8, 0,14, 0}, // 26 __ "AND A, [X]" - {0x00, 1, 8, 0, 8, 0,15, 0}, // 27 __ "AND A, [Y]" + {0x00, 1, 8, 0, 8, 0,14, 0}, // 26 __ "AND A, [IX]" + {0x00, 1, 8, 0, 8, 0,15, 0}, // 27 __ "AND A, [IY]" {0x00, 1, 9, 0, 8, 0, 8, 0}, // 28 __ "OR A, A" {0x00, 1, 9, 0, 8, 0, 9, 0}, // 29 __ "OR A, B" - {0x00, 2, 9, 0, 8, 0,10, 1}, // 2A __ "OR A, %u" + {0x00, 2, 9, 0, 8, 0,10, 1}, // 2A __ "OR A, #%u" {0x00, 1, 9, 0, 8, 0,11, 0}, // 2B __ "OR A, [HL]" - {0x00, 2, 9, 0, 8, 0,12, 1}, // 2C __ "OR A, [N+%u]" + {0x00, 2, 9, 0, 8, 0,12, 1}, // 2C __ "OR A, [BR:%u]" {0x00, 3, 9, 0, 8, 0,13, 1}, // 2D __ "OR A, [%U]" - {0x00, 1, 9, 0, 8, 0,14, 0}, // 2E __ "OR A, [X]" - {0x00, 1, 9, 0, 8, 0,15, 0}, // 2F __ "OR A, [Y]" - {0x00, 1,10, 0, 8, 0, 8, 0}, // 30 __ "CMP A, A" - {0x00, 1,10, 0, 8, 0, 9, 0}, // 31 __ "CMP A, B" - {0x00, 2,10, 0, 8, 0,10, 1}, // 32 __ "CMP A, %u" - {0x00, 1,10, 0, 8, 0,11, 0}, // 33 __ "CMP A, [HL]" - {0x00, 2,10, 0, 8, 0,12, 1}, // 34 __ "CMP A, [N+%u]" - {0x00, 3,10, 0, 8, 0,13, 1}, // 35 __ "CMP A, [%U]" - {0x00, 1,10, 0, 8, 0,14, 0}, // 36 __ "CMP A, [X]" - {0x00, 1,10, 0, 8, 0,15, 0}, // 37 __ "CMP A, [Y]" + {0x00, 1, 9, 0, 8, 0,14, 0}, // 2E __ "OR A, [IX]" + {0x00, 1, 9, 0, 8, 0,15, 0}, // 2F __ "OR A, [IY]" + {0x00, 1,10, 0, 8, 0, 8, 0}, // 30 __ "CP A, A" + {0x00, 1,10, 0, 8, 0, 9, 0}, // 31 __ "CP A, B" + {0x00, 2,10, 0, 8, 0,10, 1}, // 32 __ "CP A, #%u" + {0x00, 1,10, 0, 8, 0,11, 0}, // 33 __ "CP A, [HL]" + {0x00, 2,10, 0, 8, 0,12, 1}, // 34 __ "CP A, [BR:%u]" + {0x00, 3,10, 0, 8, 0,13, 1}, // 35 __ "CP A, [%U]" + {0x00, 1,10, 0, 8, 0,14, 0}, // 36 __ "CP A, [IX]" + {0x00, 1,10, 0, 8, 0,15, 0}, // 37 __ "CP A, [IY]" {0x00, 1,11, 0, 8, 0, 8, 0}, // 38 __ "XOR A, A" {0x00, 1,11, 0, 8, 0, 9, 0}, // 39 __ "XOR A, B" - {0x00, 2,11, 0, 8, 0,10, 1}, // 3A __ "XOR A, %u" + {0x00, 2,11, 0, 8, 0,10, 1}, // 3A __ "XOR A, #%u" {0x00, 1,11, 0, 8, 0,11, 0}, // 3B __ "XOR A, [HL]" - {0x00, 2,11, 0, 8, 0,12, 1}, // 3C __ "XOR A, [N+%u]" + {0x00, 2,11, 0, 8, 0,12, 1}, // 3C __ "XOR A, [BR:%u]" {0x00, 3,11, 0, 8, 0,13, 1}, // 3D __ "XOR A, [%U]" - {0x00, 1,11, 0, 8, 0,14, 0}, // 3E __ "XOR A, [X]" - {0x00, 1,11, 0, 8, 0,15, 0}, // 3F __ "XOR A, [Y]" - {0x00, 1, 2, 0, 8, 0, 8, 0}, // 40 __ "MOV A, A" - {0x00, 1, 2, 0, 8, 0, 9, 0}, // 41 __ "MOV A, B" - {0x00, 1, 2, 0, 8, 0,16, 0}, // 42 __ "MOV A, L" - {0x00, 1, 2, 0, 8, 0,17, 0}, // 43 __ "MOV A, H" - {0x00, 2, 2, 0, 8, 0,12, 1}, // 44 __ "MOV A, [N+%u]" - {0x00, 1, 2, 0, 8, 0,11, 0}, // 45 __ "MOV A, [HL]" - {0x00, 1, 2, 0, 8, 0,14, 0}, // 46 __ "MOV A, [X]" - {0x00, 1, 2, 0, 8, 0,15, 0}, // 47 __ "MOV A, [Y]" - {0x00, 1, 2, 0, 9, 0, 8, 0}, // 48 __ "MOV B, A" - {0x00, 1, 2, 0, 9, 0, 9, 0}, // 49 __ "MOV B, B" - {0x00, 1, 2, 0, 9, 0,16, 0}, // 4A __ "MOV B, L" - {0x00, 1, 2, 0, 9, 0,17, 0}, // 4B __ "MOV B, H" - {0x00, 2, 2, 0, 9, 0,12, 1}, // 4C __ "MOV B, [N+%u]" - {0x00, 1, 2, 0, 9, 0,11, 0}, // 4D __ "MOV B, [HL]" - {0x00, 1, 2, 0, 9, 0,14, 0}, // 4E __ "MOV B, [X]" - {0x00, 1, 2, 0, 9, 0,15, 0}, // 4F __ "MOV B, [Y]" - {0x00, 1, 2, 0,16, 0, 8, 0}, // 50 __ "MOV L, A" - {0x00, 1, 2, 0,16, 0, 9, 0}, // 51 __ "MOV L, B" - {0x00, 1, 2, 0,16, 0,16, 0}, // 52 __ "MOV L, L" - {0x00, 1, 2, 0,16, 0,17, 0}, // 53 __ "MOV L, H" - {0x00, 2, 2, 0,16, 0,12, 1}, // 54 __ "MOV L, [N+%u]" - {0x00, 1, 2, 0,16, 0,11, 0}, // 55 __ "MOV L, [HL]" - {0x00, 1, 2, 0,16, 0,14, 0}, // 56 __ "MOV L, [X]" - {0x00, 1, 2, 0,16, 0,15, 0}, // 57 __ "MOV L, [Y]" - {0x00, 1, 2, 0,17, 0, 8, 0}, // 58 __ "MOV H, A" - {0x00, 1, 2, 0,17, 0, 9, 0}, // 59 __ "MOV H, B" - {0x00, 1, 2, 0,17, 0,16, 0}, // 5A __ "MOV H, L" - {0x00, 1, 2, 0,17, 0,17, 0}, // 5B __ "MOV H, H" - {0x00, 2, 2, 0,17, 0,12, 1}, // 5C __ "MOV H, [N+%u]" - {0x00, 1, 2, 0,17, 0,11, 0}, // 5D __ "MOV H, [HL]" - {0x00, 1, 2, 0,17, 0,14, 0}, // 5E __ "MOV H, [X]" - {0x00, 1, 2, 0,17, 0,15, 0}, // 5F __ "MOV H, [Y]" - {0x00, 1, 2, 0,14, 0, 8, 0}, // 60 __ "MOV [X], A" - {0x00, 1, 2, 0,14, 0, 9, 0}, // 61 __ "MOV [X], B" - {0x00, 1, 2, 0,14, 0,16, 0}, // 62 __ "MOV [X], L" - {0x00, 1, 2, 0,14, 0,17, 0}, // 63 __ "MOV [X], H" - {0x00, 2, 2, 0,14, 0,12, 1}, // 64 __ "MOV [X], [N+%u]" - {0x00, 1, 2, 0,14, 0,11, 0}, // 65 __ "MOV [X], [HL]" - {0x00, 1, 2, 0,14, 0,14, 0}, // 66 __ "MOV [X], [X]" - {0x00, 1, 2, 0,14, 0,15, 0}, // 67 __ "MOV [X], [Y]" - {0x00, 1, 2, 0,11, 0, 8, 0}, // 68 __ "MOV [HL], A" - {0x00, 1, 2, 0,11, 0, 9, 0}, // 69 __ "MOV [HL], B" - {0x00, 1, 2, 0,11, 0,16, 0}, // 6A __ "MOV [HL], L" - {0x00, 1, 2, 0,11, 0,17, 0}, // 6B __ "MOV [HL], H" - {0x00, 2, 2, 0,11, 0,12, 1}, // 6C __ "MOV [HL], [N+%u]" - {0x00, 1, 2, 0,11, 0,11, 0}, // 6D __ "MOV [HL], [HL]" - {0x00, 1, 2, 0,11, 0,14, 0}, // 6E __ "MOV [HL], [X]" - {0x00, 1, 2, 0,11, 0,15, 0}, // 6F __ "MOV [HL], [Y]" - {0x00, 1, 2, 0,15, 0, 8, 0}, // 70 __ "MOV [Y], A" - {0x00, 1, 2, 0,15, 0, 9, 0}, // 71 __ "MOV [Y], B" - {0x00, 1, 2, 0,15, 0,16, 0}, // 72 __ "MOV [Y], L" - {0x00, 1, 2, 0,15, 0,17, 0}, // 73 __ "MOV [Y], H" - {0x00, 2, 2, 0,15, 0,12, 1}, // 74 __ "MOV [Y], [N+%u]" - {0x00, 1, 2, 0,15, 0,11, 0}, // 75 __ "MOV [Y], [HL]" - {0x00, 1, 2, 0,15, 0,14, 0}, // 76 __ "MOV [Y], [X]" - {0x00, 1, 2, 0,15, 0,15, 0}, // 77 __ "MOV [Y], [Y]" - {0x00, 2, 2, 0,12, 1, 8, 0}, // 78 __ "MOV [N+%u], A" - {0x00, 2, 2, 0,12, 1, 9, 0}, // 79 __ "MOV [N+%u], B" - {0x00, 2, 2, 0,12, 1,16, 0}, // 7A __ "MOV [N+%u], L" - {0x00, 2, 2, 0,12, 1,17, 0}, // 7B __ "MOV [N+%u], H" + {0x00, 1,11, 0, 8, 0,14, 0}, // 3E __ "XOR A, [IX]" + {0x00, 1,11, 0, 8, 0,15, 0}, // 3F __ "XOR A, [IY]" + {0x00, 1, 2, 0, 8, 0, 8, 0}, // 40 __ "LD A, A" + {0x00, 1, 2, 0, 8, 0, 9, 0}, // 41 __ "LD A, B" + {0x00, 1, 2, 0, 8, 0,16, 0}, // 42 __ "LD A, L" + {0x00, 1, 2, 0, 8, 0,17, 0}, // 43 __ "LD A, H" + {0x00, 2, 2, 0, 8, 0,12, 1}, // 44 __ "LD A, [BR:%u]" + {0x00, 1, 2, 0, 8, 0,11, 0}, // 45 __ "LD A, [HL]" + {0x00, 1, 2, 0, 8, 0,14, 0}, // 46 __ "LD A, [IX]" + {0x00, 1, 2, 0, 8, 0,15, 0}, // 47 __ "LD A, [IY]" + {0x00, 1, 2, 0, 9, 0, 8, 0}, // 48 __ "LD B, A" + {0x00, 1, 2, 0, 9, 0, 9, 0}, // 49 __ "LD B, B" + {0x00, 1, 2, 0, 9, 0,16, 0}, // 4A __ "LD B, L" + {0x00, 1, 2, 0, 9, 0,17, 0}, // 4B __ "LD B, H" + {0x00, 2, 2, 0, 9, 0,12, 1}, // 4C __ "LD B, [BR:%u]" + {0x00, 1, 2, 0, 9, 0,11, 0}, // 4D __ "LD B, [HL]" + {0x00, 1, 2, 0, 9, 0,14, 0}, // 4E __ "LD B, [IX]" + {0x00, 1, 2, 0, 9, 0,15, 0}, // 4F __ "LD B, [IY]" + {0x00, 1, 2, 0,16, 0, 8, 0}, // 50 __ "LD L, A" + {0x00, 1, 2, 0,16, 0, 9, 0}, // 51 __ "LD L, B" + {0x00, 1, 2, 0,16, 0,16, 0}, // 52 __ "LD L, L" + {0x00, 1, 2, 0,16, 0,17, 0}, // 53 __ "LD L, H" + {0x00, 2, 2, 0,16, 0,12, 1}, // 54 __ "LD L, [BR:%u]" + {0x00, 1, 2, 0,16, 0,11, 0}, // 55 __ "LD L, [HL]" + {0x00, 1, 2, 0,16, 0,14, 0}, // 56 __ "LD L, [IX]" + {0x00, 1, 2, 0,16, 0,15, 0}, // 57 __ "LD L, [IY]" + {0x00, 1, 2, 0,17, 0, 8, 0}, // 58 __ "LD H, A" + {0x00, 1, 2, 0,17, 0, 9, 0}, // 59 __ "LD H, B" + {0x00, 1, 2, 0,17, 0,16, 0}, // 5A __ "LD H, L" + {0x00, 1, 2, 0,17, 0,17, 0}, // 5B __ "LD H, H" + {0x00, 2, 2, 0,17, 0,12, 1}, // 5C __ "LD H, [BR:%u]" + {0x00, 1, 2, 0,17, 0,11, 0}, // 5D __ "LD H, [HL]" + {0x00, 1, 2, 0,17, 0,14, 0}, // 5E __ "LD H, [IX]" + {0x00, 1, 2, 0,17, 0,15, 0}, // 5F __ "LD H, [IY]" + {0x00, 1, 2, 0,14, 0, 8, 0}, // 60 __ "LD [IX], A" + {0x00, 1, 2, 0,14, 0, 9, 0}, // 61 __ "LD [IX], B" + {0x00, 1, 2, 0,14, 0,16, 0}, // 62 __ "LD [IX], L" + {0x00, 1, 2, 0,14, 0,17, 0}, // 63 __ "LD [IX], H" + {0x00, 2, 2, 0,14, 0,12, 1}, // 64 __ "LD [IX], [BR:%u]" + {0x00, 1, 2, 0,14, 0,11, 0}, // 65 __ "LD [IX], [HL]" + {0x00, 1, 2, 0,14, 0,14, 0}, // 66 __ "LD [IX], [IX]" + {0x00, 1, 2, 0,14, 0,15, 0}, // 67 __ "LD [IX], [IY]" + {0x00, 1, 2, 0,11, 0, 8, 0}, // 68 __ "LD [HL], A" + {0x00, 1, 2, 0,11, 0, 9, 0}, // 69 __ "LD [HL], B" + {0x00, 1, 2, 0,11, 0,16, 0}, // 6A __ "LD [HL], L" + {0x00, 1, 2, 0,11, 0,17, 0}, // 6B __ "LD [HL], H" + {0x00, 2, 2, 0,11, 0,12, 1}, // 6C __ "LD [HL], [BR:%u]" + {0x00, 1, 2, 0,11, 0,11, 0}, // 6D __ "LD [HL], [HL]" + {0x00, 1, 2, 0,11, 0,14, 0}, // 6E __ "LD [HL], [IX]" + {0x00, 1, 2, 0,11, 0,15, 0}, // 6F __ "LD [HL], [IY]" + {0x00, 1, 2, 0,15, 0, 8, 0}, // 70 __ "LD [IY], A" + {0x00, 1, 2, 0,15, 0, 9, 0}, // 71 __ "LD [IY], B" + {0x00, 1, 2, 0,15, 0,16, 0}, // 72 __ "LD [IY], L" + {0x00, 1, 2, 0,15, 0,17, 0}, // 73 __ "LD [IY], H" + {0x00, 2, 2, 0,15, 0,12, 1}, // 74 __ "LD [IY], [BR:%u]" + {0x00, 1, 2, 0,15, 0,11, 0}, // 75 __ "LD [IY], [HL]" + {0x00, 1, 2, 0,15, 0,14, 0}, // 76 __ "LD [IY], [IX]" + {0x00, 1, 2, 0,15, 0,15, 0}, // 77 __ "LD [IY], [IY]" + {0x00, 2, 2, 0,12, 1, 8, 0}, // 78 __ "LD [BR:%u], A" + {0x00, 2, 2, 0,12, 1, 9, 0}, // 79 __ "LD [BR:%u], B" + {0x00, 2, 2, 0,12, 1,16, 0}, // 7A __ "LD [BR:%u], L" + {0x00, 2, 2, 0,12, 1,17, 0}, // 7B __ "LD [BR:%u], H" {0x00, 2, 0, 0, 4, 0, 4, 0}, // 7C __ ".DB $7C,%u" - {0x00, 2, 2, 0,12, 1,11, 0}, // 7D __ "MOV [N+%u], [HL]" - {0x00, 2, 2, 0,12, 1,14, 0}, // 7E __ "MOV [N+%u], [X]" - {0x00, 2, 2, 0,12, 1,15, 0}, // 7F __ "MOV [N+%u], [Y]" + {0x00, 2, 2, 0,12, 1,11, 0}, // 7D __ "LD [BR:%u], [HL]" + {0x00, 2, 2, 0,12, 1,14, 0}, // 7E __ "LD [BR:%u], [IX]" + {0x00, 2, 2, 0,12, 1,15, 0}, // 7F __ "LD [BR:%u], [IY]" {0x00, 1,12, 0, 8, 0, 0, 0}, // 80 __ "INC A" {0x00, 1,12, 0, 9, 0, 0, 0}, // 81 __ "INC B" {0x00, 1,12, 0,16, 0, 0, 0}, // 82 __ "INC L" {0x00, 1,12, 0,17, 0, 0, 0}, // 83 __ "INC H" - {0x00, 1,12, 0,18, 0, 0, 0}, // 84 __ "INC N" - {0x00, 2,12, 0,12, 1, 0, 0}, // 85 __ "INC [N+%u]" + {0x00, 1,12, 0,18, 0, 0, 0}, // 84 __ "INC BR" + {0x00, 2,12, 0,12, 1, 0, 0}, // 85 __ "INC [BR:%u]" {0x00, 1,12, 0,11, 0, 0, 0}, // 86 __ "INC [HL]" {0x00, 1,12, 0,19, 0, 0, 0}, // 87 __ "INC SP" {0x00, 1,13, 0, 8, 0, 0, 0}, // 88 __ "DEC A" {0x00, 1,13, 0, 9, 0, 0, 0}, // 89 __ "DEC B" {0x00, 1,13, 0,16, 0, 0, 0}, // 8A __ "DEC L" {0x00, 1,13, 0,17, 0, 0, 0}, // 8B __ "DEC H" - {0x00, 1,13, 0,18, 0, 0, 0}, // 8C __ "DEC N" - {0x00, 2,13, 0,12, 1, 0, 0}, // 8D __ "DEC [N+%u]" + {0x00, 1,13, 0,18, 0, 0, 0}, // 8C __ "DEC BR" + {0x00, 2,13, 0,12, 1, 0, 0}, // 8D __ "DEC [BR:%u]" {0x00, 1,13, 0,11, 0, 0, 0}, // 8E __ "DEC [HL]" {0x00, 1,13, 0,19, 0, 0, 0}, // 8F __ "DEC SP" {0x00, 1,12, 0,20, 0, 0, 0}, // 90 __ "INC BA" {0x00, 1,12, 0,21, 0, 0, 0}, // 91 __ "INC HL" - {0x00, 1,12, 0,22, 0, 0, 0}, // 92 __ "INC X" - {0x00, 1,12, 0,23, 0, 0, 0}, // 93 __ "INC Y" - {0x00, 1,14, 0, 8, 0, 9, 0}, // 94 __ "TST A, B" - {0x00, 2,14, 0,11, 0, 4, 1}, // 95 __ "TST [HL], %u" - {0x00, 2,14, 0, 8, 0, 4, 1}, // 96 __ "TST A, %u" - {0x00, 2,14, 0, 9, 0, 4, 1}, // 97 __ "TST B, %u" + {0x00, 1,12, 0,22, 0, 0, 0}, // 92 __ "INC IX" + {0x00, 1,12, 0,23, 0, 0, 0}, // 93 __ "INC IY" + {0x00, 1,14, 0, 8, 0, 9, 0}, // 94 __ "BIT A, B" + {0x00, 2,14, 0,11, 0, 4, 1}, // 95 __ "BIT [HL], #%u" + {0x00, 2,14, 0, 8, 0, 4, 1}, // 96 __ "BIT A, #%u" + {0x00, 2,14, 0, 9, 0, 4, 1}, // 97 __ "BIT B, #%u" {0x00, 1,13, 0,20, 0, 0, 0}, // 98 __ "DEC BA" {0x00, 1,13, 0,21, 0, 0, 0}, // 99 __ "DEC HL" - {0x00, 1,13, 0,22, 0, 0, 0}, // 9A __ "DEC X" - {0x00, 1,13, 0,23, 0, 0, 0}, // 9B __ "DEC Y" - {0x00, 2, 8, 0,24, 0, 4, 1}, // 9C __ "AND F, %u" - {0x00, 2, 9, 0,24, 0, 4, 1}, // 9D __ "OR F, %u" - {0x00, 2,11, 0,24, 0, 4, 1}, // 9E __ "XOR F, %u" - {0x00, 2, 2, 0,24, 0, 4, 1}, // 9F __ "MOV F, %u" + {0x00, 1,13, 0,22, 0, 0, 0}, // 9A __ "DEC IX" + {0x00, 1,13, 0,23, 0, 0, 0}, // 9B __ "DEC IY" + {0x00, 2, 8, 0,24, 0, 4, 1}, // 9C __ "AND SC, #%u" + {0x00, 2, 9, 0,24, 0, 4, 1}, // 9D __ "OR SC, #%u" + {0x00, 2,11, 0,24, 0, 4, 1}, // 9E __ "XOR SC, #%u" + {0x00, 2, 2, 0,24, 0, 4, 1}, // 9F __ "LD SC, #%u" {0x00, 1,16, 0,20, 0, 0, 0}, // A0 __ "PUSH BA" {0x00, 1,16, 0,21, 0, 0, 0}, // A1 __ "PUSH HL" - {0x00, 1,16, 0,22, 0, 0, 0}, // A2 __ "PUSH X" - {0x00, 1,16, 0,23, 0, 0, 0}, // A3 __ "PUSH Y" - {0x00, 1,16, 0,18, 0, 0, 0}, // A4 __ "PUSH N" - {0x00, 1,16, 0,25, 0, 0, 0}, // A5 __ "PUSH I" - {0x00, 1,18, 0, 0, 0, 0, 0}, // A6 __ "PUSHX" - {0x00, 1,16, 0,24, 0, 0, 0}, // A7 __ "PUSH F" + {0x00, 1,16, 0,22, 0, 0, 0}, // A2 __ "PUSH IX" + {0x00, 1,16, 0,23, 0, 0, 0}, // A3 __ "PUSH IY" + {0x00, 1,16, 0,18, 0, 0, 0}, // A4 __ "PUSH BR" + {0x00, 1,16, 0,25, 0, 0, 0}, // A5 __ "PUSH EP" + {0x00, 1,16, 0,61, 0, 0, 0}, // A6 __ "PUSH IP" + {0x00, 1,16, 0,24, 0, 0, 0}, // A7 __ "PUSH SC" {0x00, 1,17, 0,20, 0, 0, 0}, // A8 __ "POP BA" {0x00, 1,17, 0,21, 0, 0, 0}, // A9 __ "POP HL" - {0x00, 1,17, 0,22, 0, 0, 0}, // AA __ "POP X" - {0x00, 1,17, 0,23, 0, 0, 0}, // AB __ "POP Y" - {0x00, 1,17, 0,18, 0, 0, 0}, // AC __ "POP N" - {0x00, 1,17, 0,25, 0, 0, 0}, // AD __ "POP I" - {0x00, 1,19, 0, 0, 0, 0, 0}, // AE __ "POPX" - {0x00, 1,17, 0,24, 0, 0, 0}, // AF __ "POP F" - {0x00, 2, 2, 0, 8, 0, 4, 1}, // B0 __ "MOV A, %u" - {0x00, 2, 2, 0, 9, 0, 4, 1}, // B1 __ "MOV B, %u" - {0x00, 2, 2, 0,16, 0, 4, 1}, // B2 __ "MOV L, %u" - {0x00, 2, 2, 0,17, 0, 4, 1}, // B3 __ "MOV H, %u" - {0x00, 2, 2, 0,18, 0, 4, 1}, // B4 __ "MOV N, %u" - {0x00, 2, 2, 0,11, 0, 4, 1}, // B5 __ "MOV [HL], %u" - {0x00, 2, 2, 0,14, 0, 4, 1}, // B6 __ "MOV [X], %u" - {0x00, 2, 2, 0,15, 0, 4, 1}, // B7 __ "MOV [Y], %u" - {0x00, 3, 2, 0,20, 0,13, 1}, // B8 __ "MOV BA, [%U]" - {0x00, 3, 2, 0,21, 0,13, 1}, // B9 __ "MOV HL, [%U]" - {0x00, 3, 2, 0,22, 0,13, 1}, // BA __ "MOV X, [%U]" - {0x00, 3, 2, 0,23, 0,13, 1}, // BB __ "MOV Y, [%U]" - {0x00, 3, 2, 0,13, 1,20, 0}, // BC __ "MOV [%U], BA" - {0x00, 3, 2, 0,13, 1,21, 0}, // BD __ "MOV [%U], HL" - {0x00, 3, 2, 0,13, 1,22, 0}, // BE __ "MOV [%U], X" - {0x00, 3, 2, 0,13, 1,23, 0}, // BF __ "MOV [%U], Y" - {0x00, 3, 4, 0,20, 0, 5, 1}, // C0 __ "ADD BA, %U" - {0x00, 3, 4, 0,21, 0, 5, 1}, // C1 __ "ADD HL, %U" - {0x00, 3, 4, 0,22, 0, 5, 1}, // C2 __ "ADD X, %U" - {0x00, 3, 4, 0,23, 0, 5, 1}, // C3 __ "ADD Y, %U" - {0x00, 3, 2, 0,20, 0, 5, 1}, // C4 __ "MOV BA, %U" - {0x00, 3, 2, 0,21, 0, 5, 1}, // C5 __ "MOV HL, %U" - {0x00, 3, 2, 0,22, 0, 5, 1}, // C6 __ "MOV X, %U" - {0x00, 3, 2, 0,23, 0, 5, 1}, // C7 __ "MOV Y, %U" - {0x00, 1,20, 0,20, 0,21, 0}, // C8 __ "XCHG BA, HL" - {0x00, 1,20, 0,20, 0,22, 0}, // C9 __ "XCHG BA, X" - {0x00, 1,20, 0,20, 0,23, 0}, // CA __ "XCHG BA, Y" - {0x00, 1,20, 0,20, 0,19, 0}, // CB __ "XCHG BA, SP" - {0x00, 1,20, 0, 8, 0, 9, 0}, // CC __ "XCHG A, B" - {0x00, 1,20, 0, 8, 0,11, 0}, // CD __ "XCHG A, [HL]" + {0x00, 1,17, 0,22, 0, 0, 0}, // AA __ "POP IX" + {0x00, 1,17, 0,23, 0, 0, 0}, // AB __ "POP IY" + {0x00, 1,17, 0,18, 0, 0, 0}, // AC __ "POP BR" + {0x00, 1,17, 0,25, 0, 0, 0}, // AD __ "POP EP" + {0x00, 1,17, 0,61, 0, 0, 0}, // AE __ "POP IP" + {0x00, 1,17, 0,24, 0, 0, 0}, // AF __ "POP SC" + {0x00, 2, 2, 0, 8, 0, 4, 1}, // B0 __ "LD A, #%u" + {0x00, 2, 2, 0, 9, 0, 4, 1}, // B1 __ "LD B, #%u" + {0x00, 2, 2, 0,16, 0, 4, 1}, // B2 __ "LD L, #%u" + {0x00, 2, 2, 0,17, 0, 4, 1}, // B3 __ "LD H, #%u" + {0x00, 2, 2, 0,18, 0, 4, 1}, // B4 __ "LD BR, #%u" + {0x00, 2, 2, 0,11, 0, 4, 1}, // B5 __ "LD [HL], #%u" + {0x00, 2, 2, 0,14, 0, 4, 1}, // B6 __ "LD [IX], #%u" + {0x00, 2, 2, 0,15, 0, 4, 1}, // B7 __ "LD [IY], #%u" + {0x00, 3, 2, 0,20, 0,13, 1}, // B8 __ "LD BA, [%U]" + {0x00, 3, 2, 0,21, 0,13, 1}, // B9 __ "LD HL, [%U]" + {0x00, 3, 2, 0,22, 0,13, 1}, // BA __ "LD IX, [%U]" + {0x00, 3, 2, 0,23, 0,13, 1}, // BB __ "LD IY, [%U]" + {0x00, 3, 2, 0,13, 1,20, 0}, // BC __ "LD [%U], BA" + {0x00, 3, 2, 0,13, 1,21, 0}, // BD __ "LD [%U], HL" + {0x00, 3, 2, 0,13, 1,22, 0}, // BE __ "LD [%U], IX" + {0x00, 3, 2, 0,13, 1,23, 0}, // BF __ "LD [%U], IY" + {0x00, 3, 4, 0,20, 0, 5, 1}, // C0 __ "ADD BA, #%U" + {0x00, 3, 4, 0,21, 0, 5, 1}, // C1 __ "ADD HL, #%U" + {0x00, 3, 4, 0,22, 0, 5, 1}, // C2 __ "ADD IX, #%U" + {0x00, 3, 4, 0,23, 0, 5, 1}, // C3 __ "ADD IY, #%U" + {0x00, 3, 2, 0,20, 0, 5, 1}, // C4 __ "LD BA, #%U" + {0x00, 3, 2, 0,21, 0, 5, 1}, // C5 __ "LD HL, #%U" + {0x00, 3, 2, 0,22, 0, 5, 1}, // C6 __ "LD IX, #%U" + {0x00, 3, 2, 0,23, 0, 5, 1}, // C7 __ "LD IY, #%U" + {0x00, 1,20, 0,20, 0,21, 0}, // C8 __ "EX BA, HL" + {0x00, 1,20, 0,20, 0,22, 0}, // C9 __ "EX BA, IX" + {0x00, 1,20, 0,20, 0,23, 0}, // CA __ "EX BA, IY" + {0x00, 1,20, 0,20, 0,19, 0}, // CB __ "EX BA, SP" + {0x00, 1,20, 0, 8, 0, 9, 0}, // CC __ "EX A, B" + {0x00, 1,20, 0, 8, 0,11, 0}, // CD __ "EX A, [HL]" {0x00, 2, 3, 0, 8, 0, 4, 1}, // CE __ EXPAND CE {0x00, 2, 3, 0, 9, 0, 4, 1}, // CF __ EXPAND CF - {0x00, 3, 6, 0,20, 0, 5, 1}, // D0 __ "SUB BA, %U" - {0x00, 3, 6, 0,21, 0, 5, 1}, // D1 __ "SUB HL, %U" - {0x00, 3, 6, 0,22, 0, 5, 1}, // D2 __ "SUB X, %U" - {0x00, 3, 6, 0,23, 0, 5, 1}, // D3 __ "SUB Y, %U" - {0x00, 3,10, 0,20, 0, 5, 1}, // D4 __ "CMP BA, %U" - {0x00, 3,10, 0,21, 0, 5, 1}, // D5 __ "CMP HL, %U" - {0x00, 3,10, 0,22, 0, 5, 1}, // D6 __ "CMP X, %U" - {0x00, 3,10, 0,23, 0, 5, 1}, // D7 __ "CMP Y, %U" - {0x00, 3, 8, 0,12, 1, 4, 2}, // D8 __ "AND [N+%u], %u" - {0x00, 3, 9, 0,12, 1, 4, 2}, // D9 __ "OR [N+%u], %u" - {0x00, 3,11, 0,12, 1, 4, 2}, // DA __ "XOR [N+%u], %u" - {0x00, 3,10, 0,12, 1, 4, 2}, // DB __ "CMP [N+%u], %u" - {0x00, 3,14, 0,12, 1, 4, 2}, // DC __ "TST [N+%u], %u" - {0x00, 3, 2, 0,12, 1, 4, 2}, // DD __ "MOV [N+%u], %u" + {0x00, 3, 6, 0,20, 0, 5, 1}, // D0 __ "SUB BA, #%u" + {0x00, 3, 6, 0,21, 0, 5, 1}, // D1 __ "SUB HL, #%u" + {0x00, 3, 6, 0,22, 0, 5, 1}, // D2 __ "SUB IX, #%u" + {0x00, 3, 6, 0,23, 0, 5, 1}, // D3 __ "SUB IY, #%u" + {0x00, 3,10, 0,20, 0, 5, 1}, // D4 __ "CP BA, #%u" + {0x00, 3,10, 0,21, 0, 5, 1}, // D5 __ "CP HL, #%u" + {0x00, 3,10, 0,22, 0, 5, 1}, // D6 __ "CP IX, #%u" + {0x00, 3,10, 0,23, 0, 5, 1}, // D7 __ "CP IY, #%u" + {0x00, 3, 8, 0,12, 1, 4, 2}, // D8 __ "AND [BR:%u], #%u" + {0x00, 3, 9, 0,12, 1, 4, 2}, // D9 __ "OR [BR:%u], #%u" + {0x00, 3,11, 0,12, 1, 4, 2}, // DA __ "XOR [BR:%u], #%u" + {0x00, 3,10, 0,12, 1, 4, 2}, // DB __ "CP [BR:%u], #%u" + {0x00, 3,14, 0,12, 1, 4, 2}, // DC __ "BIT [BR:%u], #%u" + {0x00, 3, 2, 0,12, 1, 4, 2}, // DD __ "LD [BR:%u], #%u" {0x00, 1,21, 0, 0, 0, 0, 0}, // DE __ "PACK" - {0x00, 1,22, 0, 0, 0, 0, 0}, // DF __ "UNPACK" - {0x00, 2,24, 1, 1, 1, 0, 0}, // E0 __ "CALLCb %j" - {0x00, 2,25, 1, 1, 1, 0, 0}, // E1 __ "CALLNCb %j" - {0x00, 2,26, 1, 1, 1, 0, 0}, // E2 __ "CALLZb %j" - {0x00, 2,27, 1, 1, 1, 0, 0}, // E3 __ "CALLNZb %j" - {0x00, 2,28, 1, 1, 1, 0, 0}, // E4 __ "JCb %j" - {0x00, 2,29, 1, 1, 1, 0, 0}, // E5 __ "JNCb %j" - {0x00, 2,30, 1, 1, 1, 0, 0}, // E6 __ "JZb %j" - {0x00, 2,31, 1, 1, 1, 0, 0}, // E7 __ "JNZb %j" - {0x00, 3,24, 2, 2, 1, 0, 0}, // E8 __ "CALLCw %J" - {0x00, 3,25, 2, 2, 1, 0, 0}, // E9 __ "CALLNCw %J" - {0x00, 3,26, 2, 2, 1, 0, 0}, // EA __ "CALLZw %J" - {0x00, 3,27, 2, 2, 1, 0, 0}, // EB __ "CALLNZw %J" - {0x00, 3,28, 2, 2, 1, 0, 0}, // EC __ "JCw %J" - {0x00, 3,29, 2, 2, 1, 0, 0}, // ED __ "JNCw %J" - {0x00, 3,30, 2, 2, 1, 0, 0}, // EE __ "JZw %J" - {0x00, 3,31, 2, 2, 1, 0, 0}, // EF __ "JNZw %J" - {0x00, 2,32, 1, 1, 1, 0, 0}, // F0 __ "CALLb %j" - {0x00, 2,33, 1, 1, 1, 0, 0}, // F1 __ "JMPb %j" - {0x00, 3,32, 2, 2, 1, 0, 0}, // F2 __ "CALLw %J" - {0x00, 3,33, 2, 2, 1, 0, 0}, // F3 __ "JMPw %J" - {0x00, 1,33, 0,21, 0, 0, 0}, // F4 __ "JMP HL" - {0x00, 2,34, 0, 1, 1, 0, 0}, // F5 __ "JDBNZ %j" + {0x00, 1,22, 0, 0, 0, 0, 0}, // DF __ "UPCK" + {0x00, 2,24, 1,41, 0, 1, 1}, // E0 __ "CARS C, %j" + {0x00, 2,24, 1,42, 0, 1, 1}, // E1 __ "CARS NC, %j" + {0x00, 2,24, 1,43, 0, 1, 1}, // E2 __ "CARS Z, %j" + {0x00, 2,24, 1,44, 0, 1, 1}, // E3 __ "CARS NZ, %j" + {0x00, 2,27, 1,41, 0, 1, 1}, // E4 __ "JRS C, %j" + {0x00, 2,27, 1,42, 0, 1, 1}, // E5 __ "JRS NC, %j" + {0x00, 2,27, 1,43, 0, 1, 1}, // E6 __ "JRS Z, %j" + {0x00, 2,27, 1,44, 0, 1, 1}, // E7 __ "JRS NZ, %j" + {0x00, 3,25, 2,41, 0, 2, 1}, // E8 __ "CARL C, %J" + {0x00, 3,25, 2,42, 0, 2, 1}, // E9 __ "CARL NC, %J" + {0x00, 3,25, 2,43, 0, 2, 1}, // EA __ "CARL Z, %J" + {0x00, 3,25, 2,44, 0, 2, 1}, // EB __ "CARL NZ, %J" + {0x00, 3,28, 2,41, 0, 2, 1}, // EC __ "JRL C, %J" + {0x00, 3,28, 2,42, 0, 2, 1}, // ED __ "JRL NC, %J" + {0x00, 3,28, 2,43, 0, 2, 1}, // EE __ "JRL Z, %J" + {0x00, 3,28, 2,44, 0, 2, 1}, // EF __ "JRL NZ, %J" + {0x00, 2,24, 1, 1, 1, 0, 0}, // F0 __ "CARS %j" + {0x00, 2,27, 1, 1, 1, 0, 0}, // F1 __ "JRS %j" + {0x00, 3,25, 2, 2, 1, 0, 0}, // F2 __ "CARL %J" + {0x00, 3,28, 2, 2, 1, 0, 0}, // F3 __ "JRL %J" + {0x00, 1,30, 0,21, 0, 0, 0}, // F4 __ "JP HL" + {0x00, 2,29, 0,44, 0, 1, 1}, // F5 __ "DJR NZ, %j" {0x00, 1,23, 0, 8, 0, 0, 0}, // F6 __ "SWAP A" {0x00, 1,23, 0,11, 0, 0, 0}, // F7 __ "SWAP [HL]" {0x00, 1,35, 0, 0, 0, 0, 0}, // F8 __ "RET" - {0x00, 1,36, 0, 0, 0, 0, 0}, // F9 __ "RETI" - {0x00, 1,37, 0, 0, 0, 0, 0}, // FA __ "RETSKIP" - {0x00, 3,32, 0, 5, 1, 0, 0}, // FB __ "CALL [%U]" - {0x00, 2,38, 0, 3, 1, 0, 0}, // FC __ "CINT %i" - {0x00, 2,39, 0, 3, 1, 0, 0}, // FD __ "JINT %i" + {0x00, 1,36, 0, 0, 0, 0, 0}, // F9 __ "RETE" + {0x00, 1,37, 0, 0, 0, 0, 0}, // FA __ "RETS" + {0x00, 3,26, 0, 5, 1, 0, 0}, // FB __ "CALL [%U]" + {0x00, 2,38, 0, 3, 1, 0, 0}, // FC __ "INT %EP" + {0x00, 2,30, 0, 3, 1, 0, 0}, // FD __ "JP [%EP]" {0x00, 1, 0, 0, 4, 0, 0, 0}, // FE __ ".DB $FE" {0x00, 1, 1, 0, 0, 0, 0, 0}, // FF __ "NOP" }; InstructionInfo DebugCPUInstructions_CE[256] = { - {0x00, 3, 4, 0, 8, 0,28, 2}, // CE 00 "ADD A, [X+%s]" - {0x00, 3, 4, 0, 8, 0,29, 2}, // CE 01 "ADD A, [Y+%s]" - {0x00, 2, 4, 0, 8, 0,30, 0}, // CE 02 "ADD A, [X+L]" - {0x00, 2, 4, 0, 8, 0,31, 0}, // CE 03 "ADD A, [Y+L]" + {0x00, 3, 4, 0, 8, 0,28, 2}, // CE 00 "ADD A, [IX+%s]" + {0x00, 3, 4, 0, 8, 0,29, 2}, // CE 01 "ADD A, [IY+%s]" + {0x00, 2, 4, 0, 8, 0,30, 0}, // CE 02 "ADD A, [IX+L]" + {0x00, 2, 4, 0, 8, 0,31, 0}, // CE 03 "ADD A, [IY+L]" {0x00, 2, 4, 0,11, 0, 8, 0}, // CE 04 "ADD [HL], A" - {0x00, 3, 4, 0,11, 0, 4, 2}, // CE 05 "ADD [HL], %u" - {0x00, 2, 4, 0,11, 0,14, 0}, // CE 06 "ADD [HL], [X]" - {0x00, 2, 4, 0,11, 0,15, 0}, // CE 07 "ADD [HL], [Y]" - {0x00, 3, 5, 0, 8, 0,28, 2}, // CE 08 "ADC A, [X+%s]" - {0x00, 3, 5, 0, 8, 0,29, 2}, // CE 09 "ADC A, [Y+%s]" - {0x00, 2, 5, 0, 8, 0,30, 0}, // CE 0A "ADC A, [X+L]" - {0x00, 2, 5, 0, 8, 0,31, 0}, // CE 0B "ADC A, [Y+L]" + {0x00, 3, 4, 0,11, 0, 4, 2}, // CE 05 "ADD [HL], #%u" + {0x00, 2, 4, 0,11, 0,14, 0}, // CE 06 "ADD [HL], [IX]" + {0x00, 2, 4, 0,11, 0,15, 0}, // CE 07 "ADD [HL], [IY]" + {0x00, 3, 5, 0, 8, 0,28, 2}, // CE 08 "ADC A, [IX+%s]" + {0x00, 3, 5, 0, 8, 0,29, 2}, // CE 09 "ADC A, [IY+%s]" + {0x00, 2, 5, 0, 8, 0,30, 0}, // CE 0A "ADC A, [IX+L]" + {0x00, 2, 5, 0, 8, 0,31, 0}, // CE 0B "ADC A, [IY+L]" {0x00, 2, 5, 0,11, 0, 8, 0}, // CE 0C "ADC [HL], A" - {0x00, 3, 5, 0,11, 0, 4, 2}, // CE 0D "ADC [HL], %u" - {0x00, 2, 5, 0,11, 0,14, 0}, // CE 0E "ADC [HL], [X]" - {0x00, 2, 5, 0,11, 0,15, 0}, // CE 0F "ADC [HL], [Y]" - {0x00, 3, 6, 0, 8, 0,28, 2}, // CE 10 "SUB A, [X+%s]" - {0x00, 3, 6, 0, 8, 0,29, 2}, // CE 11 "SUB A, [Y+%s]" - {0x00, 2, 6, 0, 8, 0,30, 0}, // CE 12 "SUB A, [X+L]" - {0x00, 2, 6, 0, 8, 0,31, 0}, // CE 13 "SUB A, [Y+L]" + {0x00, 3, 5, 0,11, 0, 4, 2}, // CE 0D "ADC [HL], #%u" + {0x00, 2, 5, 0,11, 0,14, 0}, // CE 0E "ADC [HL], [IX]" + {0x00, 2, 5, 0,11, 0,15, 0}, // CE 0F "ADC [HL], [IY]" + {0x00, 3, 6, 0, 8, 0,28, 2}, // CE 10 "SUB A, [IX+%s]" + {0x00, 3, 6, 0, 8, 0,29, 2}, // CE 11 "SUB A, [IY+%s]" + {0x00, 2, 6, 0, 8, 0,30, 0}, // CE 12 "SUB A, [IX+L]" + {0x00, 2, 6, 0, 8, 0,31, 0}, // CE 13 "SUB A, [IY+L]" {0x00, 2, 6, 0,11, 0, 8, 0}, // CE 14 "SUB [HL], A" - {0x00, 3, 6, 0,11, 0, 4, 2}, // CE 15 "SUB [HL], %u" - {0x00, 2, 6, 0,11, 0,14, 0}, // CE 16 "SUB [HL], [X]" - {0x00, 2, 6, 0,11, 0,15, 0}, // CE 17 "SUB [HL], [Y]" - {0x00, 3, 7, 0, 8, 0,28, 2}, // CE 18 "SBC A, [X+%s]" - {0x00, 3, 7, 0, 8, 0,29, 2}, // CE 19 "SBC A, [Y+%s]" - {0x00, 2, 7, 0, 8, 0,30, 0}, // CE 1A "SBC A, [X+L]" - {0x00, 2, 7, 0, 8, 0,31, 0}, // CE 1B "SBC A, [Y+L]" + {0x00, 3, 6, 0,11, 0, 4, 2}, // CE 15 "SUB [HL], #%u" + {0x00, 2, 6, 0,11, 0,14, 0}, // CE 16 "SUB [HL], [IX]" + {0x00, 2, 6, 0,11, 0,15, 0}, // CE 17 "SUB [HL], [IY]" + {0x00, 3, 7, 0, 8, 0,28, 2}, // CE 18 "SBC A, [IX+%s]" + {0x00, 3, 7, 0, 8, 0,29, 2}, // CE 19 "SBC A, [IY+%s]" + {0x00, 2, 7, 0, 8, 0,30, 0}, // CE 1A "SBC A, [IX+L]" + {0x00, 2, 7, 0, 8, 0,31, 0}, // CE 1B "SBC A, [IY+L]" {0x00, 2, 7, 0,11, 0, 8, 0}, // CE 1C "SBC [HL], A" - {0x00, 3, 7, 0,11, 0, 4, 2}, // CE 1D "SBC [HL], %u" - {0x00, 2, 7, 0,11, 0,14, 0}, // CE 1E "SBC [HL], [X]" - {0x00, 2, 7, 0,11, 0,15, 0}, // CE 1F "SBC [HL], [Y]" - {0x00, 3, 8, 0, 8, 0,28, 2}, // CE 20 "AND A, [X+%s]" - {0x00, 3, 8, 0, 8, 0,29, 2}, // CE 21 "AND A, [Y+%s]" - {0x00, 2, 8, 0, 8, 0,30, 0}, // CE 22 "AND A, [X+L]" - {0x00, 2, 8, 0, 8, 0,31, 0}, // CE 23 "AND A, [Y+L]" + {0x00, 3, 7, 0,11, 0, 4, 2}, // CE 1D "SBC [HL], #%u" + {0x00, 2, 7, 0,11, 0,14, 0}, // CE 1E "SBC [HL], [IX]" + {0x00, 2, 7, 0,11, 0,15, 0}, // CE 1F "SBC [HL], [IY]" + {0x00, 3, 8, 0, 8, 0,28, 2}, // CE 20 "AND A, [IX+%s]" + {0x00, 3, 8, 0, 8, 0,29, 2}, // CE 21 "AND A, [IY+%s]" + {0x00, 2, 8, 0, 8, 0,30, 0}, // CE 22 "AND A, [IX+L]" + {0x00, 2, 8, 0, 8, 0,31, 0}, // CE 23 "AND A, [IY+L]" {0x00, 2, 8, 0,11, 0, 8, 0}, // CE 24 "AND [HL], A" - {0x00, 3, 8, 0,11, 0, 4, 2}, // CE 25 "AND [HL], %u" - {0x00, 2, 8, 0,11, 0,14, 0}, // CE 26 "AND [HL], [X]" - {0x00, 2, 8, 0,11, 0,15, 0}, // CE 27 "AND [HL], [Y]" - {0x00, 3, 9, 0, 8, 0,28, 2}, // CE 28 "OR A, [X+%s]" - {0x00, 3, 9, 0, 8, 0,29, 2}, // CE 29 "OR A, [Y+%s]" - {0x00, 2, 9, 0, 8, 0,30, 0}, // CE 2A "OR A, [X+L]" - {0x00, 2, 9, 0, 8, 0,31, 0}, // CE 2B "OR A, [Y+L]" + {0x00, 3, 8, 0,11, 0, 4, 2}, // CE 25 "AND [HL], #%u" + {0x00, 2, 8, 0,11, 0,14, 0}, // CE 26 "AND [HL], [IX]" + {0x00, 2, 8, 0,11, 0,15, 0}, // CE 27 "AND [HL], [IY]" + {0x00, 3, 9, 0, 8, 0,28, 2}, // CE 28 "OR A, [IX+%s]" + {0x00, 3, 9, 0, 8, 0,29, 2}, // CE 29 "OR A, [IY+%s]" + {0x00, 2, 9, 0, 8, 0,30, 0}, // CE 2A "OR A, [IX+L]" + {0x00, 2, 9, 0, 8, 0,31, 0}, // CE 2B "OR A, [IY+L]" {0x00, 2, 9, 0,11, 0, 8, 0}, // CE 2C "OR [HL], A" - {0x00, 3, 9, 0,11, 0, 4, 2}, // CE 2D "OR [HL], %u" - {0x00, 2, 9, 0,11, 0,14, 0}, // CE 2E "OR [HL], [X]" - {0x00, 2, 9, 0,11, 0,15, 0}, // CE 2F "OR [HL], [Y]" - {0x00, 3,10, 0, 8, 0,28, 2}, // CE 30 "CMP A, [X+%s]" - {0x00, 3,10, 0, 8, 0,29, 2}, // CE 31 "CMP A, [Y+%s]" - {0x00, 2,10, 0, 8, 0,30, 0}, // CE 32 "CMP A, [X+L]" - {0x00, 2,10, 0, 8, 0,31, 0}, // CE 33 "CMP A, [Y+L]" - {0x00, 2,10, 0,11, 0, 8, 0}, // CE 34 "CMP [HL], A" - {0x00, 3,10, 0,11, 0, 4, 2}, // CE 35 "CMP [HL], %u" - {0x00, 2,10, 0,11, 0,14, 0}, // CE 36 "CMP [HL], [X]" - {0x00, 2,10, 0,11, 0,15, 0}, // CE 37 "CMP [HL], [Y]" - {0x00, 3,10, 0, 8, 0,28, 2}, // CE 38 "XOR A, [X+%s]" - {0x00, 3,10, 0, 8, 0,29, 2}, // CE 39 "XOR A, [Y+%s]" - {0x00, 2,10, 0, 8, 0,30, 0}, // CE 3A "XOR A, [X+L]" - {0x00, 2,10, 0, 8, 0,31, 0}, // CE 3B "XOR A, [Y+L]" + {0x00, 3, 9, 0,11, 0, 4, 2}, // CE 2D "OR [HL], #%u" + {0x00, 2, 9, 0,11, 0,14, 0}, // CE 2E "OR [HL], [IX]" + {0x00, 2, 9, 0,11, 0,15, 0}, // CE 2F "OR [HL], [IY]" + {0x00, 3,10, 0, 8, 0,28, 2}, // CE 30 "CP A, [IX+%s]" + {0x00, 3,10, 0, 8, 0,29, 2}, // CE 31 "CP A, [IY+%s]" + {0x00, 2,10, 0, 8, 0,30, 0}, // CE 32 "CP A, [IX+L]" + {0x00, 2,10, 0, 8, 0,31, 0}, // CE 33 "CP A, [IY+L]" + {0x00, 2,10, 0,11, 0, 8, 0}, // CE 34 "CP [HL], A" + {0x00, 3,10, 0,11, 0, 4, 2}, // CE 35 "CP [HL], #%u" + {0x00, 2,10, 0,11, 0,14, 0}, // CE 36 "CP [HL], [IX]" + {0x00, 2,10, 0,11, 0,15, 0}, // CE 37 "CP [HL], [IY]" + {0x00, 3,10, 0, 8, 0,28, 2}, // CE 38 "XOR A, [IX+%s]" + {0x00, 3,10, 0, 8, 0,29, 2}, // CE 39 "XOR A, [IY+%s]" + {0x00, 2,10, 0, 8, 0,30, 0}, // CE 3A "XOR A, [IX+L]" + {0x00, 2,10, 0, 8, 0,31, 0}, // CE 3B "XOR A, [IY+L]" {0x00, 2,10, 0,11, 0, 8, 0}, // CE 3C "XOR [HL], A" - {0x00, 3,10, 0,11, 0, 4, 2}, // CE 3D "XOR [HL], %u" - {0x00, 2,10, 0,11, 0,14, 0}, // CE 3E "XOR [HL], [X]" - {0x00, 2,10, 0,11, 0,15, 0}, // CE 3F "XOR [HL], [Y]" - {0x00, 3, 2, 0, 8, 0,28, 2}, // CE 40 "MOV A, [X+%s]" - {0x00, 3, 2, 0, 8, 0,29, 2}, // CE 41 "MOV A, [Y+%s]" - {0x00, 2, 2, 0, 8, 0,30, 0}, // CE 42 "MOV A, [X+L]" - {0x00, 2, 2, 0, 8, 0,31, 0}, // CE 43 "MOV A, [Y+L]" - {0x00, 3, 2, 0,28, 2, 8, 0}, // CE 44 "MOV [X+%s], A" - {0x00, 3, 2, 0,29, 2, 8, 0}, // CE 45 "MOV [Y+%s], A" - {0x00, 2, 2, 0,30, 0, 8, 0}, // CE 46 "MOV [X+L], A" - {0x00, 2, 2, 0,31, 0, 8, 0}, // CE 47 "MOV [Y+L], A" - {0x00, 3, 2, 0, 9, 0,28, 2}, // CE 48 "MOV B, [X+%s]" - {0x00, 3, 2, 0, 9, 0,29, 2}, // CE 49 "MOV B, [Y+%s]" - {0x00, 2, 2, 0, 9, 0,30, 0}, // CE 4A "MOV B, [X+L]" - {0x00, 2, 2, 0, 9, 0,31, 0}, // CE 4B "MOV B, [Y+L]" - {0x00, 3, 2, 0,28, 2, 9, 0}, // CE 4C "MOV [X+%s], B" - {0x00, 3, 2, 0,29, 2, 9, 0}, // CE 4D "MOV [Y+%s], B" - {0x00, 2, 2, 0,30, 0, 9, 0}, // CE 4E "MOV [X+L], B" - {0x00, 2, 2, 0,31, 0, 9, 0}, // CE 4F "MOV [Y+L], B" - {0x00, 3, 2, 0,16, 0,28, 2}, // CE 50 "MOV L, [X+%s]" - {0x00, 3, 2, 0,16, 0,29, 2}, // CE 51 "MOV L, [Y+%s]" - {0x00, 2, 2, 0,16, 0,30, 0}, // CE 52 "MOV L, [X+L]" - {0x00, 2, 2, 0,16, 0,31, 0}, // CE 53 "MOV L, [Y+L]" - {0x00, 3, 2, 0,28, 2,16, 0}, // CE 54 "MOV [X+%s], L" - {0x00, 3, 2, 0,29, 2,16, 0}, // CE 55 "MOV [Y+%s], L" - {0x00, 2, 2, 0,30, 0,16, 0}, // CE 56 "MOV [X+L], L" - {0x00, 2, 2, 0,31, 0,16, 0}, // CE 57 "MOV [Y+L], L" - {0x00, 3, 2, 0,17, 0,28, 2}, // CE 58 "MOV H, [X+%s]" - {0x00, 3, 2, 0,17, 0,29, 2}, // CE 59 "MOV H, [Y+%s]" - {0x00, 2, 2, 0,17, 0,30, 0}, // CE 5A "MOV H, [X+L]" - {0x00, 2, 2, 0,17, 0,31, 0}, // CE 5B "MOV H, [Y+L]" - {0x00, 3, 2, 0,28, 2,17, 0}, // CE 5C "MOV [X+%s], H" - {0x00, 3, 2, 0,29, 2,17, 0}, // CE 5D "MOV [Y+%s], H" - {0x00, 2, 2, 0,30, 0,17, 0}, // CE 5E "MOV [X+L], H" - {0x00, 2, 2, 0,31, 0,17, 0}, // CE 5F "MOV [Y+L], H" - {0x00, 3, 2, 0,11, 0,28, 2}, // CE 60 "MOV [HL], [X+%s]" - {0x00, 3, 2, 0,11, 0,29, 2}, // CE 61 "MOV [HL], [Y+%s]" - {0x00, 2, 2, 0,11, 0,30, 0}, // CE 62 "MOV [HL], [X+L]" - {0x00, 2, 2, 0,11, 0,31, 0}, // CE 63 "MOV [HL], [Y+L]" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 64 ".DB $CE,$65,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 65 ".DB $CE,$66,%u,%u" - {0x00, 3, 0, 0, 4, 0, 4, 0}, // CE 66 ".DB $CE,$67,%u" - {0x00, 3, 0, 0, 4, 0, 4, 0}, // CE 67 ".DB $CE,$68,%u" - {0x00, 3, 2, 0,14, 0,28, 2}, // CE 68 "MOV [X], [X+%s]" - {0x00, 3, 2, 0,14, 0,29, 2}, // CE 69 "MOV [X], [Y+%s]" - {0x00, 2, 2, 0,14, 0,30, 0}, // CE 6A "MOV [X], [X+L]" - {0x00, 2, 2, 0,14, 0,31, 0}, // CE 6B "MOV [X], [Y+L]" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 6C ".DB $CE,$6C,%u,%u" + {0x00, 3,10, 0,11, 0, 4, 2}, // CE 3D "XOR [HL], #%u" + {0x00, 2,10, 0,11, 0,14, 0}, // CE 3E "XOR [HL], [IX]" + {0x00, 2,10, 0,11, 0,15, 0}, // CE 3F "XOR [HL], [IY]" + {0x00, 3, 2, 0, 8, 0,28, 2}, // CE 40 "LD A, [IX+%s]" + {0x00, 3, 2, 0, 8, 0,29, 2}, // CE 41 "LD A, [IY+%s]" + {0x00, 2, 2, 0, 8, 0,30, 0}, // CE 42 "LD A, [IX+L]" + {0x00, 2, 2, 0, 8, 0,31, 0}, // CE 43 "LD A, [IY+L]" + {0x00, 3, 2, 0,28, 2, 8, 0}, // CE 44 "LD [IX+%s], A" + {0x00, 3, 2, 0,29, 2, 8, 0}, // CE 45 "LD [IY+%s], A" + {0x00, 2, 2, 0,30, 0, 8, 0}, // CE 46 "LD [IX+L], A" + {0x00, 2, 2, 0,31, 0, 8, 0}, // CE 47 "LD [IY+L], A" + {0x00, 3, 2, 0, 9, 0,28, 2}, // CE 48 "LD B, [IX+%s]" + {0x00, 3, 2, 0, 9, 0,29, 2}, // CE 49 "LD B, [IY+%s]" + {0x00, 2, 2, 0, 9, 0,30, 0}, // CE 4A "LD B, [IX+L]" + {0x00, 2, 2, 0, 9, 0,31, 0}, // CE 4B "LD B, [IY+L]" + {0x00, 3, 2, 0,28, 2, 9, 0}, // CE 4C "LD [IX+%s], B" + {0x00, 3, 2, 0,29, 2, 9, 0}, // CE 4D "LD [IY+%s], B" + {0x00, 2, 2, 0,30, 0, 9, 0}, // CE 4E "LD [IX+L], B" + {0x00, 2, 2, 0,31, 0, 9, 0}, // CE 4F "LD [IY+L], B" + {0x00, 3, 2, 0,16, 0,28, 2}, // CE 50 "LD L, [IX+%s]" + {0x00, 3, 2, 0,16, 0,29, 2}, // CE 51 "LD L, [IY+%s]" + {0x00, 2, 2, 0,16, 0,30, 0}, // CE 52 "LD L, [IX+L]" + {0x00, 2, 2, 0,16, 0,31, 0}, // CE 53 "LD L, [IY+L]" + {0x00, 3, 2, 0,28, 2,16, 0}, // CE 54 "LD [IX+%s], L" + {0x00, 3, 2, 0,29, 2,16, 0}, // CE 55 "LD [IY+%s], L" + {0x00, 2, 2, 0,30, 0,16, 0}, // CE 56 "LD [IX+L], L" + {0x00, 2, 2, 0,31, 0,16, 0}, // CE 57 "LD [IY+L], L" + {0x00, 3, 2, 0,17, 0,28, 2}, // CE 58 "LD H, [IX+%s]" + {0x00, 3, 2, 0,17, 0,29, 2}, // CE 59 "LD H, [IY+%s]" + {0x00, 2, 2, 0,17, 0,30, 0}, // CE 5A "LD H, [IX+L]" + {0x00, 2, 2, 0,17, 0,31, 0}, // CE 5B "LD H, [IY+L]" + {0x00, 3, 2, 0,28, 2,17, 0}, // CE 5C "LD [IX+%s], H" + {0x00, 3, 2, 0,29, 2,17, 0}, // CE 5D "LD [IY+%s], H" + {0x00, 2, 2, 0,30, 0,17, 0}, // CE 5E "LD [IX+L], H" + {0x00, 2, 2, 0,31, 0,17, 0}, // CE 5F "LD [IY+L], H" + {0x00, 3, 2, 0,11, 0,28, 2}, // CE 60 "LD [HL], [IX+%s]" + {0x00, 3, 2, 0,11, 0,29, 2}, // CE 61 "LD [HL], [IY+%s]" + {0x00, 2, 2, 0,11, 0,30, 0}, // CE 62 "LD [HL], [IX+L]" + {0x00, 2, 2, 0,11, 0,31, 0}, // CE 63 "LD [HL], [IY+L]" + {0x01, 4, 5, 0,20, 0, 5, 2}, // CE 65 "*ADC BA, #%U" + {0x01, 4, 5, 0,21, 0, 5, 2}, // CE 64 "*ADC HL, #%U" + {0x01, 3, 5, 0,21, 0,62, 1}, // CE 66 "*ADC BA, #%u:L" + {0x01, 3, 5, 0,21, 0,62, 1}, // CE 67 "*ADC HL, #%u:L" + {0x00, 3, 2, 0,14, 0,28, 2}, // CE 68 "LD [IX], [IX+%s]" + {0x00, 3, 2, 0,14, 0,29, 2}, // CE 69 "LD [IX], [IY+%s]" + {0x00, 2, 2, 0,14, 0,30, 0}, // CE 6A "LD [IX], [IX+L]" + {0x00, 2, 2, 0,14, 0,31, 0}, // CE 6B "LD [IX], [IY+L]" + {0x01, 4, 4, 0,19, 0, 5, 2}, // CE 6C "*ADD SP, #%U" {0x00, 3, 0, 0, 4, 0, 4, 0}, // CE 6D ".DB $CE,$6D,%u" {0x00, 3, 0, 0, 4, 0, 4, 0}, // CE 6E ".DB $CE,$6E,%u" {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 6F ".DB $CE,$6F" @@ -555,399 +541,399 @@ InstructionInfo DebugCPUInstructions_CE[256] = { {0x00, 3, 0, 0, 4, 0, 4, 0}, // CE 75 ".DB $CE,$75,%u" {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 76 ".DB $CE,$76" {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 77 ".DB $CE,$77" - {0x00, 3, 2, 0,15, 0,28, 2}, // CE 78 "MOV [Y], [X+%s]" - {0x00, 3, 2, 0,15, 0,29, 2}, // CE 79 "MOV [Y], [Y+%s]" - {0x00, 2, 2, 0,15, 0,30, 0}, // CE 7A "MOV [Y], [X+L]" - {0x00, 2, 2, 0,15, 0,31, 0}, // CE 7B "MOV [Y], [Y+L]" + {0x00, 3, 2, 0,15, 0,28, 2}, // CE 78 "LD [IY], [IX+%s]" + {0x00, 3, 2, 0,15, 0,29, 2}, // CE 79 "LD [IY], [IY+%s]" + {0x00, 2, 2, 0,15, 0,30, 0}, // CE 7A "LD [IY], [IX+L]" + {0x00, 2, 2, 0,15, 0,31, 0}, // CE 7B "LD [IY], [IY+L]" {0x00, 3, 0, 0, 4, 0, 4, 0}, // CE 7C ".DB $CE,$7C,%u" {0x00, 3, 0, 0, 4, 0, 4, 0}, // CE 7D ".DB $CE,$7D,%u" {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 7E ".DB $CE,$7E" {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 7F ".DB $CE,$7F" - {0x00, 2,40, 0, 8, 0, 0, 0}, // CE 80 "SAL A" - {0x00, 2,40, 0, 9, 0, 0, 0}, // CE 81 "SAL B" - {0x00, 3,40, 0,12, 2, 0, 0}, // CE 82 "SAL [N+%u]" - {0x00, 2,40, 0,11, 0, 0, 0}, // CE 83 "SAL [HL]" - {0x00, 2,41, 0, 8, 0, 0, 0}, // CE 84 "SHL A" - {0x00, 2,41, 0, 9, 0, 0, 0}, // CE 85 "SHL B" - {0x00, 3,41, 0,12, 2, 0, 0}, // CE 86 "SHL [N+%u]" - {0x00, 2,41, 0,11, 0, 0, 0}, // CE 87 "SHL [HL]" - {0x00, 2,42, 0, 8, 0, 0, 0}, // CE 88 "SAR A" - {0x00, 2,42, 0, 9, 0, 0, 0}, // CE 89 "SAR B" - {0x00, 3,42, 0,12, 2, 0, 0}, // CE 8A "SAR [N+%u]" - {0x00, 2,42, 0,11, 0, 0, 0}, // CE 8B "SAR [HL]" - {0x00, 2,43, 0, 8, 0, 0, 0}, // CE 8C "SHR A" - {0x00, 2,43, 0, 9, 0, 0, 0}, // CE 8D "SHR B" - {0x00, 3,43, 0,12, 2, 0, 0}, // CE 8E "SHR [N+%u]" - {0x00, 2,43, 0,11, 0, 0, 0}, // CE 8F "SHR [HL]" - {0x00, 2,44, 0, 8, 0, 0, 0}, // CE 90 "ROLC A" - {0x00, 2,44, 0, 9, 0, 0, 0}, // CE 91 "ROLC B" - {0x00, 3,44, 0,12, 2, 0, 0}, // CE 92 "ROLC [N+%u]" - {0x00, 2,44, 0,11, 0, 0, 0}, // CE 93 "ROLC [HL]" - {0x00, 2,45, 0, 8, 0, 0, 0}, // CE 94 "ROL A" - {0x00, 2,45, 0, 9, 0, 0, 0}, // CE 95 "ROL B" - {0x00, 3,45, 0,12, 2, 0, 0}, // CE 96 "ROL [N+%u]" - {0x00, 2,45, 0,11, 0, 0, 0}, // CE 97 "ROL [HL]" - {0x00, 2,46, 0, 8, 0, 0, 0}, // CE 98 "RORC A" - {0x00, 2,46, 0, 9, 0, 0, 0}, // CE 99 "RORC B" - {0x00, 3,46, 0,12, 2, 0, 0}, // CE 9A "RORC [N+%u]" - {0x00, 2,46, 0,11, 0, 0, 0}, // CE 9B "RORC [HL]" - {0x00, 2,47, 0, 8, 0, 0, 0}, // CE 9C "ROR A" - {0x00, 2,47, 0, 9, 0, 0, 0}, // CE 9D "ROR B" - {0x00, 3,47, 0,12, 2, 0, 0}, // CE 9E "ROR [N+%u]" - {0x00, 2,47, 0,11, 0, 0, 0}, // CE 9F "ROR [HL]" - {0x00, 2,48, 0, 8, 0, 0, 0}, // CE A0 "NOT A" - {0x00, 2,48, 0, 9, 0, 0, 0}, // CE A1 "NOT B" - {0x00, 3,48, 0,12, 2, 0, 0}, // CE A2 "NOT [N+%u]" - {0x00, 2,48, 0,11, 0, 0, 0}, // CE A3 "NOT [HL]" - {0x00, 2,49, 0, 8, 0, 0, 0}, // CE A4 "NEG A" - {0x00, 2,49, 0, 9, 0, 0, 0}, // CE A5 "NEG B" - {0x00, 3,49, 0,12, 2, 0, 0}, // CE A6 "NEG [N+%u]" - {0x00, 2,49, 0,11, 0, 0, 0}, // CE A7 "NEG [HL]" - {0x00, 2,15, 0,20, 0, 8, 0}, // CE A8 "EX BA, A" + {0x00, 2,40, 0, 8, 0, 0, 0}, // CE 80 "SLA A" + {0x00, 2,40, 0, 9, 0, 0, 0}, // CE 81 "SLA B" + {0x00, 3,40, 0,12, 2, 0, 0}, // CE 82 "SLA [BR:%u]" + {0x00, 2,40, 0,11, 0, 0, 0}, // CE 83 "SLA [HL]" + {0x00, 2,41, 0, 8, 0, 0, 0}, // CE 84 "SLL A" + {0x00, 2,41, 0, 9, 0, 0, 0}, // CE 85 "SLL B" + {0x00, 3,41, 0,12, 2, 0, 0}, // CE 86 "SLL [BR:%u]" + {0x00, 2,41, 0,11, 0, 0, 0}, // CE 87 "SLL [HL]" + {0x00, 2,42, 0, 8, 0, 0, 0}, // CE 88 "SRA A" + {0x00, 2,42, 0, 9, 0, 0, 0}, // CE 89 "SRA B" + {0x00, 3,42, 0,12, 2, 0, 0}, // CE 8A "SRA [BR:%u]" + {0x00, 2,42, 0,11, 0, 0, 0}, // CE 8B "SRA [HL]" + {0x00, 2,43, 0, 8, 0, 0, 0}, // CE 8C "SRL A" + {0x00, 2,43, 0, 9, 0, 0, 0}, // CE 8D "SRL B" + {0x00, 3,43, 0,12, 2, 0, 0}, // CE 8E "SRL [BR:%u]" + {0x00, 2,43, 0,11, 0, 0, 0}, // CE 8F "SRL [HL]" + {0x00, 2,44, 0, 8, 0, 0, 0}, // CE 90 "RL A" + {0x00, 2,44, 0, 9, 0, 0, 0}, // CE 91 "RL B" + {0x00, 3,44, 0,12, 2, 0, 0}, // CE 92 "RL [BR:%u]" + {0x00, 2,44, 0,11, 0, 0, 0}, // CE 93 "RL [HL]" + {0x00, 2,45, 0, 8, 0, 0, 0}, // CE 94 "RLC A" + {0x00, 2,45, 0, 9, 0, 0, 0}, // CE 95 "RLC B" + {0x00, 3,45, 0,12, 2, 0, 0}, // CE 96 "RLC [BR:%u]" + {0x00, 2,45, 0,11, 0, 0, 0}, // CE 97 "RLC [HL]" + {0x00, 2,46, 0, 8, 0, 0, 0}, // CE 98 "RR A" + {0x00, 2,46, 0, 9, 0, 0, 0}, // CE 99 "RR B" + {0x00, 3,46, 0,12, 2, 0, 0}, // CE 9A "RR [BR:%u]" + {0x00, 2,46, 0,11, 0, 0, 0}, // CE 9B "RR [HL]" + {0x00, 2,47, 0, 8, 0, 0, 0}, // CE 9C "RRC A" + {0x00, 2,47, 0, 9, 0, 0, 0}, // CE 9D "RRC B" + {0x00, 3,47, 0,12, 2, 0, 0}, // CE 9E "RRC [BR:%u]" + {0x00, 2,47, 0,11, 0, 0, 0}, // CE 9F "RRC [HL]" + {0x00, 2,18, 0, 8, 0, 0, 0}, // CE A0 "CPL A" + {0x00, 2,18, 0, 9, 0, 0, 0}, // CE A1 "CPL B" + {0x00, 3,18, 0,12, 2, 0, 0}, // CE A2 "CPL [BR:%u]" + {0x00, 2,18, 0,11, 0, 0, 0}, // CE A3 "CPL [HL]" + {0x00, 2,19, 0, 8, 0, 0, 0}, // CE A4 "NEG A" + {0x00, 2,19, 0, 9, 0, 0, 0}, // CE A5 "NEG B" + {0x00, 3,19, 0,12, 2, 0, 0}, // CE A6 "NEG [BR:%u]" + {0x00, 2,19, 0,11, 0, 0, 0}, // CE A7 "NEG [HL]" + {0x00, 2,39, 0, 0, 0, 0, 0}, // CE A8 "SEP" {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE A9 ".DB $CE,$A9" {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE AA ".DB $CE,$AA" {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE AB ".DB $CE,$AB" {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE AC ".DB $CE,$AC" {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE AD ".DB $CE,$AD" - {0x00, 2,89, 0, 0, 0, 0, 0}, // CE AE "HALT" - {0x00, 2,88, 0, 0, 0, 0, 0}, // CE AF "STOP" - {0x00, 3, 8, 0, 9, 0,10, 2}, // CE B0 "AND B, %u" - {0x00, 3, 8, 0,16, 0,10, 2}, // CE B1 "AND L, %u" - {0x00, 3, 8, 0,17, 0,10, 2}, // CE B2 "AND H, %u" + {0x00, 2,31, 0, 0, 0, 0, 0}, // CE AE "HALT" + {0x00, 2,32, 0, 0, 0, 0, 0}, // CE AF "SLP" + {0x00, 3, 8, 0, 9, 0,10, 2}, // CE B0 "AND B, #%u" + {0x00, 3, 8, 0,16, 0,10, 2}, // CE B1 "AND L, #%u" + {0x00, 3, 8, 0,17, 0,10, 2}, // CE B2 "AND H, #%u" {0x00, 2, 0, 0, 0, 0, 0, 0}, // CE B3 ".DB $CE,$B3" - {0x00, 3, 9, 0, 9, 0,10, 2}, // CE B4 "OR B, %u" - {0x00, 3, 9, 0,16, 0,10, 2}, // CE B5 "OR L, %u" - {0x00, 3, 9, 0,17, 0,10, 2}, // CE B6 "OR H, %u" + {0x00, 3, 9, 0, 9, 0,10, 2}, // CE B4 "OR B, #%u" + {0x00, 3, 9, 0,16, 0,10, 2}, // CE B5 "OR L, #%u" + {0x00, 3, 9, 0,17, 0,10, 2}, // CE B6 "OR H, #%u" {0x00, 2, 0, 0, 0, 0, 0, 0}, // CE B7 ".DB $CE,$B7" - {0x00, 3,11, 0, 9, 0,10, 2}, // CE B8 "XOR B, %u" - {0x00, 3,11, 0,16, 0,10, 2}, // CE B9 "XOR L, %u" - {0x00, 3,11, 0,17, 0,10, 2}, // CE BA "XOR H, %u" + {0x00, 3,11, 0, 9, 0,10, 2}, // CE B8 "XOR B, #%u" + {0x00, 3,11, 0,16, 0,10, 2}, // CE B9 "XOR L, #%u" + {0x00, 3,11, 0,17, 0,10, 2}, // CE BA "XOR H, #%u" {0x00, 2, 0, 0, 0, 0, 0, 0}, // CE BB ".DB $CE,$B3" - {0x00, 3,10, 0, 9, 0,10, 2}, // CE BC "CMP B, %u" - {0x00, 3,10, 0,16, 0,10, 2}, // CE BD "CMP L, %u" - {0x00, 3,10, 0,17, 0,10, 2}, // CE BE "CMP H, %u" - {0x00, 3,10, 0,18, 0,10, 2}, // CE BF "CMP N, %u" - {0x00, 2, 2, 0, 8, 0,18, 0}, // CE C0 "MOV A, N" - {0x00, 2, 2, 0, 8, 0,24, 0}, // CE C1 "MOV A, F" - {0x00, 2, 2, 0,18, 0, 8, 0}, // CE C2 "MOV N, A" - {0x00, 2, 2, 0,24, 0, 8, 0}, // CE C3 "MOV F, A" - {0x00, 3, 2, 0,32, 0, 4, 2}, // CE C4 "MOV U, %u" - {0x00, 3, 2, 0,25, 0, 4, 2}, // CE C5 "MOV I, %u" - {0x00, 3, 2, 0,34, 0, 4, 2}, // CE C6 "MOV XI, %u" - {0x00, 3, 2, 0,35, 0, 4, 2}, // CE C7 "MOV YI, %u" - {0x00, 2, 2, 0, 8, 0,33, 0}, // CE C8 "MOV A, V" - {0x00, 2, 2, 0, 8, 0,25, 0}, // CE C9 "MOV A, I" - {0x00, 2, 2, 0, 8, 0,34, 0}, // CE CA "MOV A, XI" - {0x00, 2, 2, 0, 8, 0,35, 0}, // CE CB "MOV A, YI" - {0x00, 2, 2, 0,32, 0, 8, 0}, // CE CC "MOV U, A" - {0x00, 2, 2, 0,25, 0, 8, 0}, // CE CD "MOV I, A" - {0x00, 2, 2, 0,34, 0, 8, 0}, // CE CE "MOV XI, A" - {0x00, 2, 2, 0,35, 0, 8, 0}, // CE CF "MOV YI, A" - {0x00, 4, 2, 0, 8, 0,13, 2}, // CE D0 "MOV A, [%U]" - {0x00, 4, 2, 0, 9, 0,13, 2}, // CE D1 "MOV B, [%U]" - {0x00, 4, 2, 0,16, 0,13, 2}, // CE D2 "MOV L, [%U]" - {0x00, 4, 2, 0,17, 0,13, 2}, // CE D3 "MOV H, [%U]" - {0x00, 4, 2, 0,13, 2, 8, 0}, // CE D4 "MOV [%U], A" - {0x00, 4, 2, 0,13, 2, 9, 0}, // CE D5 "MOV [%U], B" - {0x00, 4, 2, 0,13, 2,16, 0}, // CE D6 "MOV [%U], L" - {0x00, 4, 2, 0,13, 2,17, 0}, // CE D7 "MOV [%U], H" - {0x00, 2,50, 0,16, 0, 8, 0}, // CE D8 "MUL L, A" - {0x00, 2,51, 0,21, 0, 8, 0}, // CE D9 "DIV HL, A" + {0x00, 3,10, 0, 9, 0,10, 2}, // CE BC "CP B, #%u" + {0x00, 3,10, 0,16, 0,10, 2}, // CE BD "CP L, #%u" + {0x00, 3,10, 0,17, 0,10, 2}, // CE BE "CP H, #%u" + {0x00, 3,10, 0,18, 0,10, 2}, // CE BF "CP BR, #%u" + {0x00, 2, 2, 0, 8, 0,18, 0}, // CE C0 "LD A, BR" + {0x00, 2, 2, 0, 8, 0,24, 0}, // CE C1 "LD A, SC" + {0x00, 2, 2, 0,18, 0, 8, 0}, // CE C2 "LD BR, A" + {0x00, 2, 2, 0,24, 0, 8, 0}, // CE C3 "LD SC, A" + {0x00, 3, 2, 0,32, 0, 4, 2}, // CE C4 "LD NB, #%u" + {0x00, 3, 2, 0,25, 0, 4, 2}, // CE C5 "LD EP, #%u" + {0x00, 3, 2, 0,34, 0, 4, 2}, // CE C6 "LD XP, #%u" + {0x00, 3, 2, 0,35, 0, 4, 2}, // CE C7 "LD YP, #%u" + {0x00, 2, 2, 0, 8, 0,33, 0}, // CE C8 "LD A, NB" + {0x00, 2, 2, 0, 8, 0,25, 0}, // CE C9 "LD A, EP" + {0x00, 2, 2, 0, 8, 0,34, 0}, // CE CA "LD A, XP" + {0x00, 2, 2, 0, 8, 0,35, 0}, // CE CB "LD A, YP" + {0x00, 2, 2, 0,32, 0, 8, 0}, // CE CC "LD NB, A" + {0x00, 2, 2, 0,25, 0, 8, 0}, // CE CD "LD EP, A" + {0x00, 2, 2, 0,34, 0, 8, 0}, // CE CE "LD XP, A" + {0x00, 2, 2, 0,35, 0, 8, 0}, // CE CF "LD YP, A" + {0x00, 4, 2, 0, 8, 0,13, 2}, // CE D0 "LD A, [%U]" + {0x00, 4, 2, 0, 9, 0,13, 2}, // CE D1 "LD B, [%U]" + {0x00, 4, 2, 0,16, 0,13, 2}, // CE D2 "LD L, [%U]" + {0x00, 4, 2, 0,17, 0,13, 2}, // CE D3 "LD H, [%U]" + {0x00, 4, 2, 0,13, 2, 8, 0}, // CE D4 "LD [%U], A" + {0x00, 4, 2, 0,13, 2, 9, 0}, // CE D5 "LD [%U], B" + {0x00, 4, 2, 0,13, 2,16, 0}, // CE D6 "LD [%U], L" + {0x00, 4, 2, 0,13, 2,17, 0}, // CE D7 "LD [%U], H" + {0x00, 2,33, 0, 0, 0, 0, 0}, // CE D8 "MLT" + {0x00, 2,34, 0, 0, 0, 0, 0}, // CE D9 "DIV" {0x00, 3, 0, 0, 4, 0, 4, 0}, // CE DA ".DB $CE,$DA,%u" {0x00, 3, 0, 0, 4, 0, 4, 0}, // CE DB ".DB $CE,$DB,%u" {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE DC ".DB $CE,$DC" {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE DD ".DB $CE,$DD" {0x00, 3, 0, 0, 4, 0, 4, 0}, // CE DE ".DB $CE,$DE,%u" {0x00, 3, 0, 0, 4, 0, 4, 0}, // CE DF ".DB $CE,$DF,%u" - {0x00, 3,56, 0,38, 2, 0, 0}, // CE E0 "JL %h" - {0x00, 3,57, 0,38, 2, 0, 0}, // CE E1 "JLE %h" - {0x00, 3,58, 0,38, 2, 0, 0}, // CE E2 "JG %h" - {0x00, 3,59, 0,38, 2, 0, 0}, // CE E3 "JGE %h" - {0x00, 3,60, 0,38, 2, 0, 0}, // CE E4 "JO %h" - {0x00, 3,61, 0,38, 2, 0, 0}, // CE E5 "JNO %h" - {0x00, 3,62, 0,38, 2, 0, 0}, // CE E6 "JNS %h" - {0x00, 3,63, 0,38, 2, 0, 0}, // CE E7 "JS %h" - {0x00, 3,64, 0,38, 2, 0, 0}, // CE E8 "JNX0 %h" - {0x00, 3,65, 0,38, 2, 0, 0}, // CE E9 "JNX1 %h" - {0x00, 3,66, 0,38, 2, 0, 0}, // CE EA "JNX2 %h" - {0x00, 3,67, 0,38, 2, 0, 0}, // CE EB "JNX3 %h" - {0x00, 3,68, 0,38, 2, 0, 0}, // CE EC "JX0 %h" - {0x00, 2,69, 0,38, 2, 0, 0}, // CE ED "JX1 %h" - {0x00, 3,70, 0,38, 2, 0, 0}, // CE EE "JX2 %h" - {0x00, 3,71, 0,38, 2, 0, 0}, // CE EF "JX3 %h" - {0x00, 3,72, 0,38, 2, 0, 0}, // CE F0 "CALLL %h" - {0x00, 3,73, 0,38, 2, 0, 0}, // CE F1 "CALLLE %h" - {0x00, 3,74, 0,38, 2, 0, 0}, // CE F2 "CALLG %h" - {0x00, 3,75, 0,38, 2, 0, 0}, // CE F3 "CALLGE %h" - {0x00, 3,76, 0,38, 2, 0, 0}, // CE F4 "CALLO %h" - {0x00, 3,77, 0,38, 2, 0, 0}, // CE F5 "CALLNO %h" - {0x00, 3,78, 0,38, 2, 0, 0}, // CE F6 "CALLNS %h" - {0x00, 3,79, 0,38, 2, 0, 0}, // CE F7 "CALLS %h" - {0x00, 3,80, 0,38, 2, 0, 0}, // CE F8 "CALLNX0 %h" - {0x00, 3,81, 0,38, 2, 0, 0}, // CE F9 "CALLNX1 %h" - {0x00, 3,82, 0,38, 2, 0, 0}, // CE FA "CALLNX2 %h" - {0x00, 3,83, 0,38, 2, 0, 0}, // CE FB "CALLNX3 %h" - {0x00, 3,84, 0,38, 2, 0, 0}, // CE FC "CALLX0 %h" - {0x00, 3,85, 0,38, 2, 0, 0}, // CE FD "CALLX1 %h" - {0x00, 3,86, 0,38, 2, 0, 0}, // CE FE "CALLX2 %h" - {0x00, 3,87, 0,38, 2, 0, 0} // CE FF "CALLX3 %h" + {0x00, 3,27, 0,45, 0,38, 2}, // CE E0 "JRS LT, %h" + {0x00, 3,27, 0,46, 0,38, 2}, // CE E1 "JRS LE, %h" + {0x00, 3,27, 0,47, 0,38, 2}, // CE E2 "JRS GT, %h" + {0x00, 3,27, 0,48, 0,38, 2}, // CE E3 "JRS GE, %h" + {0x00, 3,27, 0,49, 0,38, 2}, // CE E4 "JRS V, %h" + {0x00, 3,27, 0,50, 0,38, 2}, // CE E5 "JRS NV, %h" + {0x00, 3,27, 0,51, 0,38, 2}, // CE E6 "JRS P, %h" + {0x00, 3,27, 0,52, 0,38, 2}, // CE E7 "JRS M, %h" + {0x00, 3,27, 0,53, 0,38, 2}, // CE E8 "JRS F0, %h" + {0x00, 3,27, 0,54, 0,38, 2}, // CE E9 "JRS F1, %h" + {0x00, 3,27, 0,55, 0,38, 2}, // CE EA "JRS F2, %h" + {0x00, 3,27, 0,56, 0,38, 2}, // CE EB "JRS F3, %h" + {0x00, 3,27, 0,57, 0,38, 2}, // CE EC "JRS NF0, %h" + {0x00, 2,27, 0,58, 0,38, 2}, // CE ED "JRS NF1, %h" + {0x00, 3,27, 0,59, 0,38, 2}, // CE EE "JRS NF2, %h" + {0x00, 3,27, 0,60, 0,38, 2}, // CE EF "JRS NF3, %h" + {0x00, 3,72, 0,45, 0,38, 2}, // CE F0 "CARS LT, %h" + {0x00, 3,73, 0,46, 0,38, 2}, // CE F1 "CARS LE, %h" + {0x00, 3,74, 0,47, 0,38, 2}, // CE F2 "CARS GT, %h" + {0x00, 3,75, 0,48, 0,38, 2}, // CE F3 "CARS GE, %h" + {0x00, 3,76, 0,49, 0,38, 2}, // CE F4 "CARS V, %h" + {0x00, 3,77, 0,50, 0,38, 2}, // CE F5 "CARS NV, %h" + {0x00, 3,78, 0,51, 0,38, 2}, // CE F6 "CARS P, %h" + {0x00, 3,79, 0,52, 0,38, 2}, // CE F7 "CARS M, %h" + {0x00, 3,80, 0,53, 0,38, 2}, // CE F8 "CARS F0, %h" + {0x00, 3,81, 0,54, 0,38, 2}, // CE F9 "CARS F1, %h" + {0x00, 3,82, 0,55, 0,38, 2}, // CE FA "CARS F2, %h" + {0x00, 3,83, 0,56, 0,38, 2}, // CE FB "CARS F3, %h" + {0x00, 3,84, 0,57, 0,38, 2}, // CE FC "CARS NF0, %h" + {0x00, 3,85, 0,58, 0,38, 2}, // CE FD "CARS NF1, %h" + {0x00, 3,86, 0,59, 0,38, 2}, // CE FE "CARS NF2, %h" + {0x00, 3,87, 0,60, 0,38, 2} // CE FF "CARS NF3, %h" }; InstructionInfo DebugCPUInstructions_CF[256] = { - {0x00, 2, 4, 0,20, 0,20, 0}, // CE 00 "ADD BA, BA" - {0x00, 2, 4, 0,20, 0,21, 0}, // CE 01 "ADD BA, HL" - {0x00, 2, 4, 0,20, 0,22, 0}, // CE 02 "ADD BA, X" - {0x00, 2, 4, 0,20, 0,23, 0}, // CE 03 "ADD BA, Y" - {0x00, 2, 5, 0,20, 0,20, 0}, // CE 04 "ADC BA, BA" - {0x00, 2, 5, 0,20, 0,21, 0}, // CE 05 "ADC BA, HL" - {0x00, 2, 5, 0,20, 0,22, 0}, // CE 06 "ADC BA, X" - {0x00, 2, 5, 0,20, 0,23, 0}, // CE 07 "ADC BA, Y" - {0x00, 2, 6, 0,20, 0,20, 0}, // CE 08 "SUB BA, BA" - {0x00, 2, 6, 0,20, 0,21, 0}, // CE 09 "SUB BA, HL" - {0x00, 2, 6, 0,20, 0,22, 0}, // CE 0A "SUB BA, X" - {0x00, 2, 6, 0,20, 0,23, 0}, // CE 0B "SUB BA, Y" - {0x00, 2, 7, 0,20, 0,20, 0}, // CE 0C "SBC BA, BA" - {0x00, 2, 7, 0,20, 0,21, 0}, // CE 0D "SBC BA, HL" - {0x00, 2, 7, 0,20, 0,22, 0}, // CE 0E "SBC BA, X" - {0x00, 2, 7, 0,20, 0,23, 0}, // CE 0F "SBC BA, Y" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 10 ".DB $CF,$10" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 11 ".DB $CF,$11" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 12 ".DB $CF,$12" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 13 ".DB $CF,$13" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 14 ".DB $CF,$14" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 15 ".DB $CF,$15" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 16 ".DB $CF,$16" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 17 ".DB $CF,$17" - {0x00, 2,10, 0,20, 0,20, 0}, // CE 18 "CMP BA, BA" - {0x00, 2,10, 0,20, 0,21, 0}, // CE 19 "CMP BA, HL" - {0x00, 2,10, 0,20, 0,22, 0}, // CE 1A "CMP BA, X" - {0x00, 2,10, 0,20, 0,23, 0}, // CE 1B "CMP BA, Y" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 1C ".DB $CF,$1C" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 1D ".DB $CF,$1D" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 1E ".DB $CF,$1E" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 1F ".DB $CF,$1F" - {0x00, 2, 4, 0,21, 0,20, 0}, // CE 20 "ADD HL, BA" - {0x00, 2, 4, 0,21, 0,21, 0}, // CE 21 "ADD HL, HL" - {0x00, 2, 4, 0,21, 0,22, 0}, // CE 22 "ADD HL, X" - {0x00, 2, 4, 0,21, 0,23, 0}, // CE 23 "ADD HL, Y" - {0x00, 2, 5, 0,21, 0,20, 0}, // CE 24 "ADC HL, BA" - {0x00, 2, 5, 0,21, 0,21, 0}, // CE 25 "ADC HL, HL" - {0x00, 2, 5, 0,21, 0,22, 0}, // CE 26 "ADC HL, X" - {0x00, 2, 5, 0,21, 0,23, 0}, // CE 27 "ADC HL, Y" - {0x00, 2, 6, 0,21, 0,20, 0}, // CE 28 "SUB HL, BA" - {0x00, 2, 6, 0,21, 0,21, 0}, // CE 29 "SUB HL, HL" - {0x00, 2, 6, 0,21, 0,22, 0}, // CE 2A "SUB HL, X" - {0x00, 2, 6, 0,21, 0,23, 0}, // CE 2B "SUB HL, Y" - {0x00, 2, 7, 0,21, 0,20, 0}, // CE 2C "SBC HL, BA" - {0x00, 2, 7, 0,21, 0,21, 0}, // CE 2D "SBC HL, HL" - {0x00, 2, 7, 0,21, 0,22, 0}, // CE 2E "SBC HL, X" - {0x00, 2, 7, 0,21, 0,23, 0}, // CE 2F "SBC HL, Y" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 30 ".DB $CF,$30" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 31 ".DB $CF,$31" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 32 ".DB $CF,$32" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 33 ".DB $CF,$33" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 34 ".DB $CF,$34" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 35 ".DB $CF,$35" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 36 ".DB $CF,$36" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 37 ".DB $CF,$37" - {0x00, 2,10, 0,21, 0,20, 0}, // CE 38 "CMP HL, BA" - {0x00, 2,10, 0,21, 0,21, 0}, // CE 39 "CMP HL, HL" - {0x00, 2,10, 0,21, 0,22, 0}, // CE 3A "CMP HL, X" - {0x00, 2,10, 0,21, 0,23, 0}, // CE 3B "CMP HL, Y" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 3C ".DB $CF,$3C" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 3D ".DB $CF,$3D" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 3E ".DB $CF,$3E" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 3F ".DB $CF,$3F" - {0x00, 2, 4, 0,22, 0,20, 0}, // CE 40 "ADD X, BA" - {0x00, 2, 4, 0,22, 0,21, 0}, // CE 41 "ADD X, HL" - {0x00, 2, 4, 0,23, 0,20, 0}, // CE 42 "ADD Y, BA" - {0x00, 2, 4, 0,23, 0,21, 0}, // CE 43 "ADD Y, HL" - {0x00, 2, 4, 0,19, 0,20, 0}, // CE 44 "ADD SP, BA" - {0x00, 2, 4, 0,19, 0,21, 0}, // CE 45 "ADD SP, HL" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 46 ".DB $CF,$46" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 47 ".DB $CF,$47" - {0x00, 2, 6, 0,22, 0,20, 0}, // CE 48 "SUB X, BA" - {0x00, 2, 6, 0,22, 0,21, 0}, // CE 49 "SUB X, HL" - {0x00, 2, 6, 0,23, 0,20, 0}, // CE 4A "SUB Y, BA" - {0x00, 2, 6, 0,23, 0,21, 0}, // CE 4B "SUB Y, HL" - {0x00, 2, 6, 0,19, 0,20, 0}, // CE 4C "SUB SP, BA" - {0x00, 2, 6, 0,19, 0,21, 0}, // CE 4D "SUB SP, HL" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 4E ".DB $CF,$4E" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 4F ".DB $CF,$4F" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 50 ".DB $CF,$50" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 51 ".DB $CF,$51" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 52 ".DB $CF,$52" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 53 ".DB $CF,$53" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 54 ".DB $CF,$54" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 55 ".DB $CF,$55" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 56 ".DB $CF,$56" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 57 ".DB $CF,$57" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 58 ".DB $CF,$58" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 59 ".DB $CF,$59" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 5A ".DB $CF,$5A" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 5B ".DB $CF,$5B" - {0x00, 2,10, 0,19, 0,20, 0}, // CE 5C "CMP SP, BA" - {0x00, 2,10, 0,19, 0,21, 0}, // CE 5D "CMP SP, HL" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 5E ".DB $CF,$5E" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 5F ".DB $CF,$5F" - {0x00, 4, 5, 0,20, 0, 5, 2}, // CE 60 "ADC BA, %U" - {0x00, 4, 5, 0,21, 0, 5, 2}, // CE 61 "ADC HL, %U" - {0x00, 4, 7, 0,20, 0, 5, 2}, // CE 62 "SBC BA, %U" - {0x00, 4, 7, 0,21, 0, 5, 2}, // CE 63 "SBC HL, %U" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 64 ".DB $CF,$64" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 65 ".DB $CF,$65" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 66 ".DB $CF,$66" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 67 ".DB $CF,$67" - {0x00, 4, 4, 0,19, 0, 5, 2}, // CE 68 "ADD SP, %U" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 69 ".DB $CF,$69" - {0x00, 4, 6, 0,19, 0, 5, 2}, // CE 6A "SUB SP, %U" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 6B ".DB $CF,$6B" - {0x00, 4,10, 0,19, 0, 5, 2}, // CE 6C "CMP SP, %U" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 6D ".DB $CF,$6D" - {0x00, 4, 2, 0,19, 0, 5, 2}, // CE 6E "MOV SP, %U" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE 6F ".DB $CF,$6F" - {0x00, 3, 2, 0,20, 0,36, 2}, // CE 70 "MOV BA, [SP+%s]" - {0x00, 3, 2, 0,21, 0,36, 2}, // CE 71 "MOV HL, [SP+%s]" - {0x00, 3, 2, 0,22, 0,36, 2}, // CE 72 "MOV X, [SP+%s]" - {0x00, 3, 2, 0,23, 0,36, 2}, // CE 73 "MOV Y, [SP+%s]" - {0x00, 3, 2, 0,36, 2,20, 0}, // CE 74 "MOV [SP+%s], BA" - {0x00, 3, 2, 0,36, 2,21, 0}, // CE 75 "MOV [SP+%s], HL" - {0x00, 3, 2, 0,36, 2,22, 0}, // CE 76 "MOV [SP+%s], X" - {0x00, 3, 2, 0,36, 2,23, 0}, // CE 77 "MOV [SP+%s], Y" - {0x00, 4, 2, 0,19, 0,13, 2}, // CE 78 "MOV SP, [%U]" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 79 ".DB $CF,$79,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 7A ".DB $CF,$7A,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 7B ".DB $CF,$7B,%u,%u" - {0x00, 4, 2, 0,13, 2,19, 0}, // CE 7C "MOV [%U], SP" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 7D ".DB $CF,$7D,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 7E ".DB $CF,$7E,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 7F ".DB $CF,$7F,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 80 ".DB $CF,$80,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 81 ".DB $CF,$81,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 82 ".DB $CF,$82,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 83 ".DB $CF,$83,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 84 ".DB $CF,$84,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 85 ".DB $CF,$85,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 86 ".DB $CF,$86,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 87 ".DB $CF,$87,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 88 ".DB $CF,$88,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 89 ".DB $CF,$89,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 8A ".DB $CF,$8A,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 8B ".DB $CF,$8B,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 8C ".DB $CF,$8C,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 8D ".DB $CF,$8D,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 8E ".DB $CF,$8E,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 8F ".DB $CF,$8F,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 90 ".DB $CF,$90,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 91 ".DB $CF,$91,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 92 ".DB $CF,$92,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 93 ".DB $CF,$93,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 94 ".DB $CF,$94,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 95 ".DB $CF,$95,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 96 ".DB $CF,$96,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 97 ".DB $CF,$97,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 98 ".DB $CF,$98,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 99 ".DB $CF,$99,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 9A ".DB $CF,$9A,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 9B ".DB $CF,$9B,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 9C ".DB $CF,$9C,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 9D ".DB $CF,$9D,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 9E ".DB $CF,$9E,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE 9F ".DB $CF,$9F,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE A0 ".DB $CF,$A0,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE A1 ".DB $CF,$A1,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE A2 ".DB $CF,$A2,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE A3 ".DB $CF,$A3,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE A4 ".DB $CF,$A4,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE A5 ".DB $CF,$A5,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE A6 ".DB $CF,$A6,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE A7 ".DB $CF,$A7,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE A8 ".DB $CF,$A8,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE A9 ".DB $CF,$A9,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE AA ".DB $CF,$AA,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE AB ".DB $CF,$AB,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE AC ".DB $CF,$AC,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE AD ".DB $CF,$AD,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE AE ".DB $CF,$AE,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE AF ".DB $CF,$AF,%u,%u" - {0x00, 2,16, 0, 8, 0, 0, 0}, // CE B0 "PUSH A" - {0x00, 2,16, 0, 9, 0, 0, 0}, // CE B1 "PUSH B" - {0x00, 2,16, 0,16, 0, 0, 0}, // CE B2 "PUSH L" - {0x00, 2,16, 0,17, 0, 0, 0}, // CE B3 "PUSH H" - {0x00, 2,17, 0, 8, 0, 0, 0}, // CE B4 "POP A" - {0x00, 2,17, 0, 9, 0, 0, 0}, // CE B5 "POP B" - {0x00, 2,17, 0,16, 0, 0, 0}, // CE B6 "POP L" - {0x00, 2,17, 0,17, 0, 0, 0}, // CE B7 "POP H" - {0x00, 2,52, 0, 0, 0, 0, 0}, // CE B8 "PUSHA" - {0x00, 2,53, 0, 0, 0, 0, 0}, // CE B9 "PUSHAX" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE BA ".DB $CF,$BA,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE BB ".DB $CF,$BB,%u,%u" - {0x00, 2,54, 0, 0, 0, 0, 0}, // CE BC "POPA" - {0x00, 2,55, 0, 0, 0, 0, 0}, // CE BD "POPAX" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE BE ".DB $CF,$BE,%u,%u" - {0x00, 4, 0, 0, 4, 0, 4, 0}, // CE BF ".DB $CF,$BF,%u,%u" - {0x00, 2, 2, 0,20, 0,11, 0}, // CE C0 "MOV BA, [HL]" - {0x00, 2, 2, 0,21, 0,11, 0}, // CE C1 "MOV HL, [HL]" - {0x00, 2, 2, 0,22, 0,11, 0}, // CE C2 "MOV X, [HL]" - {0x00, 2, 2, 0,23, 0,11, 0}, // CE C3 "MOV Y, [HL]" - {0x00, 2, 2, 0,11, 0,20, 0}, // CE C4 "MOV [HL], BA" - {0x00, 2, 2, 0,11, 0,21, 0}, // CE C5 "MOV [HL], HL" - {0x00, 2, 2, 0,11, 0,22, 0}, // CE C6 "MOV [HL], X" - {0x00, 2, 2, 0,11, 0,23, 0}, // CE C7 "MOV [HL], Y" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE C8 ".DB $CF,$C8" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE C9 ".DB $CF,$C9" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE CA ".DB $CF,$CA" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE CB ".DB $CF,$CB" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE CC ".DB $CF,$CC" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE CD ".DB $CF,$CD" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE CE ".DB $CF,$CE" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE CF ".DB $CF,$CF" - {0x00, 2, 2, 0,20, 0,14, 0}, // CE D0 "MOV BA, [X]" - {0x00, 2, 2, 0,21, 0,14, 0}, // CE D1 "MOV HL, [X]" - {0x00, 2, 2, 0,22, 0,14, 0}, // CE D2 "MOV X, [X]" - {0x00, 2, 2, 0,23, 0,14, 0}, // CE D3 "MOV Y, [X]" - {0x00, 2, 2, 0,14, 0,20, 0}, // CE D4 "MOV [X], BA" - {0x00, 2, 2, 0,14, 0,21, 0}, // CE D5 "MOV [X], HL" - {0x00, 2, 2, 0,14, 0,22, 0}, // CE D6 "MOV [X], X" - {0x00, 2, 2, 0,14, 0,23, 0}, // CE D7 "MOV [X], Y" - {0x00, 2, 2, 0,20, 0,15, 0}, // CE D8 "MOV BA, [Y]" - {0x00, 2, 2, 0,21, 0,15, 0}, // CE D9 "MOV HL, [Y]" - {0x00, 2, 2, 0,22, 0,15, 0}, // CE DA "MOV X, [Y]" - {0x00, 2, 2, 0,23, 0,15, 0}, // CE DB "MOV Y, [Y]" - {0x00, 2, 2, 0,15, 0,20, 0}, // CE DC "MOV [Y], BA" - {0x00, 2, 2, 0,15, 0,21, 0}, // CE DD "MOV [Y], HL" - {0x00, 2, 2, 0,15, 0,22, 0}, // CE DE "MOV [Y], X" - {0x00, 2, 2, 0,15, 0,23, 0}, // CE DF "MOV [Y], Y" - {0x00, 2, 2, 0,20, 0,20, 0}, // CE E0 "MOV BA, BA" - {0x00, 2, 2, 0,20, 0,21, 0}, // CE E1 "MOV BA, HL" - {0x00, 2, 2, 0,20, 0,22, 0}, // CE E2 "MOV BA, X" - {0x00, 2, 2, 0,20, 0,23, 0}, // CE E3 "MOV BA, Y" - {0x00, 2, 2, 0,21, 0,20, 0}, // CE E4 "MOV HL, BA" - {0x00, 2, 2, 0,21, 0,21, 0}, // CE E5 "MOV HL, HL" - {0x00, 2, 2, 0,21, 0,22, 0}, // CE E6 "MOV HL, X" - {0x00, 2, 2, 0,21, 0,23, 0}, // CE E7 "MOV HL, Y" - {0x00, 2, 2, 0,22, 0,20, 0}, // CE E8 "MOV X, BA" - {0x00, 2, 2, 0,22, 0,21, 0}, // CE E9 "MOV X, HL" - {0x00, 2, 2, 0,22, 0,22, 0}, // CE EA "MOV X, X" - {0x00, 2, 2, 0,20, 0,23, 0}, // CE EB "MOV X, Y" - {0x00, 2, 2, 0,23, 0,20, 0}, // CE EC "MOV Y, BA" - {0x00, 2, 2, 0,23, 0,21, 0}, // CE ED "MOV Y, HL" - {0x00, 2, 2, 0,23, 0,22, 0}, // CE EE "MOV Y, X" - {0x00, 2, 2, 0,23, 0,23, 0}, // CE EF "MOV Y, Y" - {0x00, 2, 2, 0,19, 0,20, 0}, // CE F0 "MOV SP, BA" - {0x00, 2, 2, 0,19, 0,21, 0}, // CE F1 "MOV SP, HL" - {0x00, 2, 2, 0,19, 0,22, 0}, // CE F2 "MOV SP, X" - {0x00, 2, 2, 0,19, 0,23, 0}, // CE F3 "MOV SP, Y" - {0x00, 2, 2, 0,21, 0,19, 0}, // CE F4 "MOV HL, SP" - {0x00, 2, 2, 0,21, 0,37, 0}, // CE F5 "MOV HL, PC" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE F6 ".DB $CF,$F6" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE F7 ".DB $CF,$F7" - {0x00, 2, 2, 0,20, 0,19, 0}, // CE F8 "MOV BA, SP" - {0x00, 2, 2, 0,20, 0,37, 0}, // CE F9 "MOV BA, PC" - {0x00, 2, 2, 0,22, 0,19, 0}, // CE FA "MOV X, SP" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE FB ".DB $CF,$FB" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE FC ".DB $CF,$FC" - {0x00, 2, 0, 0, 4, 0, 4, 0}, // CE FD ".DB $CF,$FD" - {0x00, 2, 2, 0,23, 0,19, 0}, // CE FE "MOV Y, SP" - {0x00, 2, 0, 0, 4, 0, 4, 0} // CE FF ".DB $CF,$FF" + {0x00, 2, 4, 0,20, 0,20, 0}, // CF 00 "ADD BA, BA" + {0x00, 2, 4, 0,20, 0,21, 0}, // CF 01 "ADD BA, HL" + {0x00, 2, 4, 0,20, 0,22, 0}, // CF 02 "ADD BA, IX" + {0x00, 2, 4, 0,20, 0,23, 0}, // CF 03 "ADD BA, IY" + {0x00, 2, 5, 0,20, 0,20, 0}, // CF 04 "ADC BA, BA" + {0x00, 2, 5, 0,20, 0,21, 0}, // CF 05 "ADC BA, HL" + {0x00, 2, 5, 0,20, 0,22, 0}, // CF 06 "ADC BA, IX" + {0x00, 2, 5, 0,20, 0,23, 0}, // CF 07 "ADC BA, IY" + {0x00, 2, 6, 0,20, 0,20, 0}, // CF 08 "SUB BA, BA" + {0x00, 2, 6, 0,20, 0,21, 0}, // CF 09 "SUB BA, HL" + {0x00, 2, 6, 0,20, 0,22, 0}, // CF 0A "SUB BA, IX" + {0x00, 2, 6, 0,20, 0,23, 0}, // CF 0B "SUB BA, IY" + {0x00, 2, 7, 0,20, 0,20, 0}, // CF 0C "SBC BA, BA" + {0x00, 2, 7, 0,20, 0,21, 0}, // CF 0D "SBC BA, HL" + {0x00, 2, 7, 0,20, 0,22, 0}, // CF 0E "SBC BA, IX" + {0x00, 2, 7, 0,20, 0,23, 0}, // CF 0F "SBC BA, IY" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 10 ".DB $CF,$10" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 11 ".DB $CF,$11" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 12 ".DB $CF,$12" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 13 ".DB $CF,$13" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 14 ".DB $CF,$14" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 15 ".DB $CF,$15" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 16 ".DB $CF,$16" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 17 ".DB $CF,$17" + {0x00, 2,10, 0,20, 0,20, 0}, // CF 18 "CP BA, BA" + {0x00, 2,10, 0,20, 0,21, 0}, // CF 19 "CP BA, HL" + {0x00, 2,10, 0,20, 0,22, 0}, // CF 1A "CP BA, IX" + {0x00, 2,10, 0,20, 0,23, 0}, // CF 1B "CP BA, IY" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 1C ".DB $CF,$1C" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 1D ".DB $CF,$1D" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 1E ".DB $CF,$1E" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 1F ".DB $CF,$1F" + {0x00, 2, 4, 0,21, 0,20, 0}, // CF 20 "ADD HL, BA" + {0x00, 2, 4, 0,21, 0,21, 0}, // CF 21 "ADD HL, HL" + {0x00, 2, 4, 0,21, 0,22, 0}, // CF 22 "ADD HL, IX" + {0x00, 2, 4, 0,21, 0,23, 0}, // CF 23 "ADD HL, IY" + {0x00, 2, 5, 0,21, 0,20, 0}, // CF 24 "ADC HL, BA" + {0x00, 2, 5, 0,21, 0,21, 0}, // CF 25 "ADC HL, HL" + {0x00, 2, 5, 0,21, 0,22, 0}, // CF 26 "ADC HL, IX" + {0x00, 2, 5, 0,21, 0,23, 0}, // CF 27 "ADC HL, IY" + {0x00, 2, 6, 0,21, 0,20, 0}, // CF 28 "SUB HL, BA" + {0x00, 2, 6, 0,21, 0,21, 0}, // CF 29 "SUB HL, HL" + {0x00, 2, 6, 0,21, 0,22, 0}, // CF 2A "SUB HL, IX" + {0x00, 2, 6, 0,21, 0,23, 0}, // CF 2B "SUB HL, IY" + {0x00, 2, 7, 0,21, 0,20, 0}, // CF 2C "SBC HL, BA" + {0x00, 2, 7, 0,21, 0,21, 0}, // CF 2D "SBC HL, HL" + {0x00, 2, 7, 0,21, 0,22, 0}, // CF 2E "SBC HL, IX" + {0x00, 2, 7, 0,21, 0,23, 0}, // CF 2F "SBC HL, IY" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 30 ".DB $CF,$30" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 31 ".DB $CF,$31" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 32 ".DB $CF,$32" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 33 ".DB $CF,$33" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 34 ".DB $CF,$34" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 35 ".DB $CF,$35" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 36 ".DB $CF,$36" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 37 ".DB $CF,$37" + {0x00, 2,10, 0,21, 0,20, 0}, // CF 38 "CP HL, BA" + {0x00, 2,10, 0,21, 0,21, 0}, // CF 39 "CP HL, HL" + {0x00, 2,10, 0,21, 0,22, 0}, // CF 3A "CP HL, IX" + {0x00, 2,10, 0,21, 0,23, 0}, // CF 3B "CP HL, IY" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 3C ".DB $CF,$3C" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 3D ".DB $CF,$3D" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 3E ".DB $CF,$3E" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 3F ".DB $CF,$3F" + {0x00, 2, 4, 0,22, 0,20, 0}, // CF 40 "ADD IX, BA" + {0x00, 2, 4, 0,22, 0,21, 0}, // CF 41 "ADD IX, HL" + {0x00, 2, 4, 0,23, 0,20, 0}, // CF 42 "ADD IY, BA" + {0x00, 2, 4, 0,23, 0,21, 0}, // CF 43 "ADD IY, HL" + {0x00, 2, 4, 0,19, 0,20, 0}, // CF 44 "ADD SP, BA" + {0x00, 2, 4, 0,19, 0,21, 0}, // CF 45 "ADD SP, HL" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 46 ".DB $CF,$46" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 47 ".DB $CF,$47" + {0x00, 2, 6, 0,22, 0,20, 0}, // CF 48 "SUB IX, BA" + {0x00, 2, 6, 0,22, 0,21, 0}, // CF 49 "SUB IX, HL" + {0x00, 2, 6, 0,23, 0,20, 0}, // CF 4A "SUB IY, BA" + {0x00, 2, 6, 0,23, 0,21, 0}, // CF 4B "SUB IY, HL" + {0x00, 2, 6, 0,19, 0,20, 0}, // CF 4C "SUB SP, BA" + {0x00, 2, 6, 0,19, 0,21, 0}, // CF 4D "SUB SP, HL" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 4E ".DB $CF,$4E" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 4F ".DB $CF,$4F" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 50 ".DB $CF,$50" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 51 ".DB $CF,$51" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 52 ".DB $CF,$52" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 53 ".DB $CF,$53" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 54 ".DB $CF,$54" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 55 ".DB $CF,$55" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 56 ".DB $CF,$56" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 57 ".DB $CF,$57" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 58 ".DB $CF,$58" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 59 ".DB $CF,$59" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 5A ".DB $CF,$5A" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 5B ".DB $CF,$5B" + {0x00, 2,10, 0,19, 0,20, 0}, // CF 5C "CP SP, BA" + {0x00, 2,10, 0,19, 0,21, 0}, // CF 5D "CP SP, HL" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 5E ".DB $CF,$5E" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 5F ".DB $CF,$5F" + {0x00, 4, 5, 0,20, 0, 5, 2}, // CF 60 "ADC BA, #%U" + {0x00, 4, 5, 0,21, 0, 5, 2}, // CF 61 "ADC HL, #%U" + {0x00, 4, 7, 0,20, 0, 5, 2}, // CF 62 "SBC BA, #%U" + {0x00, 4, 7, 0,21, 0, 5, 2}, // CF 63 "SBC HL, #%U" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 64 ".DB $CF,$64" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 65 ".DB $CF,$65" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 66 ".DB $CF,$66" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 67 ".DB $CF,$67" + {0x00, 4, 4, 0,19, 0, 5, 2}, // CF 68 "ADD SP, #%U" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 69 ".DB $CF,$69" + {0x00, 4, 6, 0,19, 0, 5, 2}, // CF 6A "SUB SP, #%U" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 6B ".DB $CF,$6B" + {0x00, 4,10, 0,19, 0, 5, 2}, // CF 6C "CP SP, #%U" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 6D ".DB $CF,$6D" + {0x00, 4, 2, 0,19, 0, 5, 2}, // CF 6E "LD SP, #%U" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF 6F ".DB $CF,$6F" + {0x00, 3, 2, 0,20, 0,36, 2}, // CF 70 "LD BA, [SP+%s]" + {0x00, 3, 2, 0,21, 0,36, 2}, // CF 71 "LD HL, [SP+%s]" + {0x00, 3, 2, 0,22, 0,36, 2}, // CF 72 "LD IX, [SP+%s]" + {0x00, 3, 2, 0,23, 0,36, 2}, // CF 73 "LD IY, [SP+%s]" + {0x00, 3, 2, 0,36, 2,20, 0}, // CF 74 "LD [SP+%s], BA" + {0x00, 3, 2, 0,36, 2,21, 0}, // CF 75 "LD [SP+%s], HL" + {0x00, 3, 2, 0,36, 2,22, 0}, // CF 76 "LD [SP+%s], IX" + {0x00, 3, 2, 0,36, 2,23, 0}, // CF 77 "LD [SP+%s], IY" + {0x00, 4, 2, 0,19, 0,13, 2}, // CF 78 "LD SP, [%U]" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 79 ".DB $CF,$79,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 7A ".DB $CF,$7A,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 7B ".DB $CF,$7B,%u,%u" + {0x00, 4, 2, 0,13, 2,19, 0}, // CF 7C "LD [%U], SP" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 7D ".DB $CF,$7D,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 7E ".DB $CF,$7E,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 7F ".DB $CF,$7F,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 80 ".DB $CF,$80,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 81 ".DB $CF,$81,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 82 ".DB $CF,$82,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 83 ".DB $CF,$83,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 84 ".DB $CF,$84,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 85 ".DB $CF,$85,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 86 ".DB $CF,$86,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 87 ".DB $CF,$87,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 88 ".DB $CF,$88,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 89 ".DB $CF,$89,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 8A ".DB $CF,$8A,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 8B ".DB $CF,$8B,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 8C ".DB $CF,$8C,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 8D ".DB $CF,$8D,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 8E ".DB $CF,$8E,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 8F ".DB $CF,$8F,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 90 ".DB $CF,$90,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 91 ".DB $CF,$91,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 92 ".DB $CF,$92,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 93 ".DB $CF,$93,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 94 ".DB $CF,$94,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 95 ".DB $CF,$95,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 96 ".DB $CF,$96,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 97 ".DB $CF,$97,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 98 ".DB $CF,$98,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 99 ".DB $CF,$99,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 9A ".DB $CF,$9A,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 9B ".DB $CF,$9B,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 9C ".DB $CF,$9C,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 9D ".DB $CF,$9D,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 9E ".DB $CF,$9E,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF 9F ".DB $CF,$9F,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF A0 ".DB $CF,$A0,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF A1 ".DB $CF,$A1,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF A2 ".DB $CF,$A2,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF A3 ".DB $CF,$A3,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF A4 ".DB $CF,$A4,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF A5 ".DB $CF,$A5,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF A6 ".DB $CF,$A6,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF A7 ".DB $CF,$A7,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF A8 ".DB $CF,$A8,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF A9 ".DB $CF,$A9,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF AA ".DB $CF,$AA,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF AB ".DB $CF,$AB,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF AC ".DB $CF,$AC,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF AD ".DB $CF,$AD,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF AE ".DB $CF,$AE,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF AF ".DB $CF,$AF,%u,%u" + {0x00, 2,16, 0, 8, 0, 0, 0}, // CF B0 "PUSH A" + {0x00, 2,16, 0, 9, 0, 0, 0}, // CF B1 "PUSH B" + {0x00, 2,16, 0,16, 0, 0, 0}, // CF B2 "PUSH L" + {0x00, 2,16, 0,17, 0, 0, 0}, // CF B3 "PUSH H" + {0x00, 2,17, 0, 8, 0, 0, 0}, // CF B4 "POP A" + {0x00, 2,17, 0, 9, 0, 0, 0}, // CF B5 "POP B" + {0x00, 2,17, 0,16, 0, 0, 0}, // CF B6 "POP L" + {0x00, 2,17, 0,17, 0, 0, 0}, // CF B7 "POP H" + {0x00, 2,16, 0,39, 0, 0, 0}, // CF B8 "PUSH ALL" + {0x00, 2,16, 0,40, 0, 0, 0}, // CF B9 "PUSH ALE" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF BA ".DB $CF,$BA,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF BB ".DB $CF,$BB,%u,%u" + {0x00, 2,17, 0,39, 0, 0, 0}, // CF BC "POP ALL" + {0x00, 2,17, 0,40, 0, 0, 0}, // CF BD "POP ALE" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF BE ".DB $CF,$BE,%u,%u" + {0x00, 4, 0, 0, 4, 0, 4, 0}, // CF BF ".DB $CF,$BF,%u,%u" + {0x00, 2, 2, 0,20, 0,11, 0}, // CF C0 "LD BA, [HL]" + {0x00, 2, 2, 0,21, 0,11, 0}, // CF C1 "LD HL, [HL]" + {0x00, 2, 2, 0,22, 0,11, 0}, // CF C2 "LD IX, [HL]" + {0x00, 2, 2, 0,23, 0,11, 0}, // CF C3 "LD IY, [HL]" + {0x00, 2, 2, 0,11, 0,20, 0}, // CF C4 "LD [HL], BA" + {0x00, 2, 2, 0,11, 0,21, 0}, // CF C5 "LD [HL], HL" + {0x00, 2, 2, 0,11, 0,22, 0}, // CF C6 "LD [HL], IX" + {0x00, 2, 2, 0,11, 0,23, 0}, // CF C7 "LD [HL], IY" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF C8 ".DB $CF,$C8" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF C9 ".DB $CF,$C9" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF CA ".DB $CF,$CA" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF CB ".DB $CF,$CB" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF CC ".DB $CF,$CC" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF CD ".DB $CF,$CD" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF CE ".DB $CF,$CE" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF CF ".DB $CF,$CF" + {0x00, 2, 2, 0,20, 0,14, 0}, // CF D0 "LD BA, [IX]" + {0x00, 2, 2, 0,21, 0,14, 0}, // CF D1 "LD HL, [IX]" + {0x00, 2, 2, 0,22, 0,14, 0}, // CF D2 "LD IX, [IX]" + {0x00, 2, 2, 0,23, 0,14, 0}, // CF D3 "LD IY, [IX]" + {0x00, 2, 2, 0,14, 0,20, 0}, // CF D4 "LD [IX], BA" + {0x00, 2, 2, 0,14, 0,21, 0}, // CF D5 "LD [IX], HL" + {0x00, 2, 2, 0,14, 0,22, 0}, // CF D6 "LD [IX], IX" + {0x00, 2, 2, 0,14, 0,23, 0}, // CF D7 "LD [IX], IY" + {0x00, 2, 2, 0,20, 0,15, 0}, // CF D8 "LD BA, [IY]" + {0x00, 2, 2, 0,21, 0,15, 0}, // CF D9 "LD HL, [IY]" + {0x00, 2, 2, 0,22, 0,15, 0}, // CF DA "LD IX, [IY]" + {0x00, 2, 2, 0,23, 0,15, 0}, // CF DB "LD IY, [IY]" + {0x00, 2, 2, 0,15, 0,20, 0}, // CF DC "LD [IY], BA" + {0x00, 2, 2, 0,15, 0,21, 0}, // CF DD "LD [IY], HL" + {0x00, 2, 2, 0,15, 0,22, 0}, // CF DE "LD [IY], IX" + {0x00, 2, 2, 0,15, 0,23, 0}, // CF DF "LD [IY], IY" + {0x00, 2, 2, 0,20, 0,20, 0}, // CF E0 "LD BA, BA" + {0x00, 2, 2, 0,20, 0,21, 0}, // CF E1 "LD BA, HL" + {0x00, 2, 2, 0,20, 0,22, 0}, // CF E2 "LD BA, IX" + {0x00, 2, 2, 0,20, 0,23, 0}, // CF E3 "LD BA, IY" + {0x00, 2, 2, 0,21, 0,20, 0}, // CF E4 "LD HL, BA" + {0x00, 2, 2, 0,21, 0,21, 0}, // CF E5 "LD HL, HL" + {0x00, 2, 2, 0,21, 0,22, 0}, // CF E6 "LD HL, IX" + {0x00, 2, 2, 0,21, 0,23, 0}, // CF E7 "LD HL, IY" + {0x00, 2, 2, 0,22, 0,20, 0}, // CF E8 "LD IX, BA" + {0x00, 2, 2, 0,22, 0,21, 0}, // CF E9 "LD IX, HL" + {0x00, 2, 2, 0,22, 0,22, 0}, // CF EA "LD IX, IX" + {0x00, 2, 2, 0,20, 0,23, 0}, // CF EB "LD IX, IY" + {0x00, 2, 2, 0,23, 0,20, 0}, // CF EC "LD IY, BA" + {0x00, 2, 2, 0,23, 0,21, 0}, // CF ED "LD IY, HL" + {0x00, 2, 2, 0,23, 0,22, 0}, // CF EE "LD IY, IX" + {0x00, 2, 2, 0,23, 0,23, 0}, // CF EF "LD IY, IY" + {0x00, 2, 2, 0,19, 0,20, 0}, // CF F0 "LD SP, BA" + {0x00, 2, 2, 0,19, 0,21, 0}, // CF F1 "LD SP, HL" + {0x00, 2, 2, 0,19, 0,22, 0}, // CF F2 "LD SP, IX" + {0x00, 2, 2, 0,19, 0,23, 0}, // CF F3 "LD SP, IY" + {0x00, 2, 2, 0,21, 0,19, 0}, // CF F4 "LD HL, SP" + {0x00, 2, 2, 0,21, 0,37, 0}, // CF F5 "LD HL, PC" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF F6 ".DB $CF,$F6" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF F7 ".DB $CF,$F7" + {0x00, 2, 2, 0,20, 0,19, 0}, // CF F8 "LD BA, SP" + {0x00, 2, 2, 0,20, 0,37, 0}, // CF F9 "LD BA, PC" + {0x00, 2, 2, 0,22, 0,19, 0}, // CF FA "LD IX, SP" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF FB ".DB $CF,$FB" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF FC ".DB $CF,$FC" + {0x00, 2, 0, 0, 4, 0, 4, 0}, // CF FD ".DB $CF,$FD" + {0x00, 2, 2, 0,23, 0,19, 0}, // CF FE "LD IY, SP" + {0x00, 2, 0, 0, 4, 0, 4, 0} // CF FF ".DB $CF,$FF" }; diff --git a/sourcex/SGtkXDrawingView.c b/sourcex/SGtkXDrawingView.c index ea53055..83fe57c 100644 --- a/sourcex/SGtkXDrawingView.c +++ b/sourcex/SGtkXDrawingView.c @@ -260,7 +260,7 @@ int sgtkx_drawing_view_new(SGtkXDrawingView *widg, int scrollbar) // Scroll bar adjustment widg->sba = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, 0.0, 1.0, 16.0, 0.0)); - g_signal_connect(widg->sba, "value_changed", G_CALLBACK(sgtkx_drawing_view_sbachanged), (gpointer)widg); + g_signal_connect(widg->sba, "value_changed", G_CALLBACK(sgtkx_drawing_view_sbachanged), GINT_TO_POINTER(widg)); if (!widg->sba) return 0; widg->sboffset = 0; @@ -334,5 +334,5 @@ static gboolean sgtkx_drawing_view_repaint_NOW(gpointer user_data) void sgtkx_drawing_view_repaint_after(SGtkXDrawingView *widg, int milisec) { - g_timeout_add(milisec, sgtkx_drawing_view_repaint_NOW, (gpointer)widg); + g_timeout_add(milisec, sgtkx_drawing_view_repaint_NOW, GINT_TO_POINTER(widg)); } diff --git a/tools/color_mapper/color_mapper.c b/tools/color_mapper/color_mapper.c index ce3e40d..c088b55 100644 --- a/tools/color_mapper/color_mapper.c +++ b/tools/color_mapper/color_mapper.c @@ -263,7 +263,7 @@ void Menu_File_SaveColor(GtkWidget *widget, gpointer data) void Menu_File_Export(GtkWidget *widget, gpointer data) { int x, y, z, htiles, vtiles, vsingle; - int monorender = (int)data; + int monorender = GPOINTER_TO_INT(data); cairo_surface_t *tmpimg; uint32_t *ptr; char tmp[256]; @@ -642,8 +642,8 @@ gboolean ComboZoom_enter(GtkWidget *widget, GdkEvent *event, gpointer user_data) void Menu_Edit_Zoom(GtkWidget *widget, gpointer data) { - if ((int)data != Zoom) { - Zoom = (int)data; + if (GPOINTER_TO_INT(data) != Zoom) { + Zoom = GPOINTER_TO_INT(data); gtkx_colormapper_setzoom(ColorMapper, Zoom); // Update other components gtk_combo_box_set_active(ComboZoom, Zoom - 1); @@ -652,7 +652,7 @@ void Menu_Edit_Zoom(GtkWidget *widget, gpointer data) void Menu_Mark_GetMark(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); CurrAddr = MarkAddr[index]; gtk_adjustment_set_value(VScroll1_Adj, (double)CurrAddr); gtkx_colormapper_settileoff(ColorMapper, CurrAddr); @@ -660,7 +660,7 @@ void Menu_Mark_GetMark(GtkWidget *widget, gpointer data) void Menu_Mark_SetMark(GtkWidget *widget, gpointer data) { - int index = (int)data; + int index = GPOINTER_TO_INT(data); MarkAddr[index] = CurrAddr; if (index == 0) gtkx_colormapper_settileblendoff(ColorMapper, MarkAddr[0]); } @@ -736,7 +736,7 @@ static const uint32_t TransparencyColor[16] = { void Menu_Transparency(GtkWidget *widget, gpointer data) { - int number, index = (int)data; + int number, index = GPOINTER_TO_INT(data); static int lasttransindex = -2; if (lasttransindex == index) return; From 17cb076604375da9d2cb61b4258eb1169470b00a Mon Sep 17 00:00:00 2001 From: Sapphire Becker Date: Wed, 4 Mar 2026 16:06:46 -0800 Subject: [PATCH 2/5] fix display in debugger, fix registers & comments --- platform/debug/CPUWindow.c | 119 +++++++++--- source/MinxCPU.h | 18 +- source/MinxCPU_CE.c | 314 +++++++++++++++---------------- source/MinxCPU_CF.c | 248 ++++++++++++------------ source/MinxCPU_XX.c | 374 ++++++++++++++++++------------------- sourcex/InstructionInfo.c | 4 +- sourcex/InstructionProc.c | 16 +- 7 files changed, 575 insertions(+), 518 deletions(-) diff --git a/platform/debug/CPUWindow.c b/platform/debug/CPUWindow.c index bc19f90..e921d37 100644 --- a/platform/debug/CPUWindow.c +++ b/platform/debug/CPUWindow.c @@ -329,16 +329,73 @@ void Add_DebugOutputFixed8_8(unsigned char num, int reg) // ------ static char *ColDCPUInstructions_Operand[] = { - "", - "\e234%j", "\e234%J", "\e234%i", "\e234%u", "\e234%U", "\e234%s", "\e234%S", - "\e240A", "\e240B", "\e234%u", "\e203[HL]", - "\e203[N+\e234%u\e203]", "\e203[\e234%U\e203]", "\e203[X]", "\e203[Y]", - "\e240L", "\e240H", "\e240N", "\e240SP", - "\e240BA", "\e240HL", "\e240X", "\e240Y", - "\e240F", "\e240I", "\e240XI", "\e240YI", - "\e203[X+\e234%s\e203]", "\e203[Y+\e234%s\e203]", "\e203[X+L]", "\e203[Y+L]", - "\e240U", "\e240V", "\e240XI", "\e240YI", - "\e203[SP+\e234%s\e203]", "\e240PC", "\e234%h", + "", // 0 + "\e234%j", // 1 + "\e234%J", // 2 + "\e234%i", // 3 + "\e234%u", // 4 + "\e234%U", // 5 + "\e234%s", // 6 + "\e234%S", // 7 + "\e240A", // 8 + "\e240B", // 9 + "\e234%u", // 10 + "\e203[\e240HL\e203]", // 11 + "\e203[\e240BR\e203:\e234%u\e203]", // 12 + "\e203[\e234%U\e203]", // 13 + "\e203[\e240IX\e203]", // 14 + "\e203[\e240IY\e203]", // 15 + "\e240L", // 16 + "\e240H", // 17 + "\e240BR", // 18 + "\e240SP", // 19 + "\e240BA", // 20 + "\e240HL", // 21 + "\e240IX", // 22 + "\e240IY", // 23 + "\e240SC", // 24 + "\e240EP", // 25 + "\e240XP", // 26 + "\e240YP", // 27 + "\e203[\e240IX\e203+\e234%s\e203]", // 28 + "\e203[\e240IY\e203+\e234%s\e203]", // 29 + "\e203[\e240IX\e203+\e240L\e203]", // 30 + "\e203[\e240IY\e203+\e240L\e203]", // 31 + "\e240NB", // 32 + "\e240CB", // 33 + "\e240XP", // 34 + "\e240YP", // 35 + "\e203[\e240SP+\e234%s\e203]", // 36 + "\e240PC", // 37 + "\e234%h", // 38 + // PUSH / POP + "\e352ALL", // 39 + "\e352ALE", // 40 + // JRS / JRL / DJR / CARS / CARL + "\e352C", // 41 + "\e352NC", // 42 + "\e352Z", // 43 + "\e352NZ", // 44 + "\e352LT", // 45 + "\e352LE", // 46 + "\e352GT", // 47 + "\e352GE", // 48 + "\e352V", // 49 + "\e352NV", // 50 + "\e352P", // 51 + "\e352M", // 52 + "\e352F0", // 53 + "\e352F1", // 54 + "\e352F2", // 55 + "\e352F3", // 56 + "\e352NF0", // 57 + "\e352NF1", // 58 + "\e352NF2", // 59 + "\e352NF3", // 60 + // PUSH + "\e352IP", // 61 + // Illegal + "#\e234%u\e203:\e240L", // 62 NULL }; @@ -702,25 +759,25 @@ static int RegistersView_exposure(SGtkXDrawingView *widg, int width, int height, y += 12; sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "HL = $\e345%02X\e003%04X,%i", (int)MinxCPU.HL.B.I, (int)MinxCPU.HL.W.L, (int)MinxCPU.HL.W.L); y += 12; - sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, " X = $\e345%02X\e003%04X,%i", (int)MinxCPU.X.B.I, (int)MinxCPU.X.W.L, (int)MinxCPU.X.W.L); + sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "IX = $\e345%02X\e003%04X,%i", (int)MinxCPU.X.B.I, (int)MinxCPU.X.W.L, (int)MinxCPU.X.W.L); y += 12; - sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, " Y = $\e345%02X\e003%04X,%i", (int)MinxCPU.Y.B.I, (int)MinxCPU.Y.W.L, (int)MinxCPU.Y.W.L); + sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "IY = $\e345%02X\e003%04X,%i", (int)MinxCPU.Y.B.I, (int)MinxCPU.Y.W.L, (int)MinxCPU.Y.W.L); y += 12; sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "SP = $%04X,%i", (int)MinxCPU.SP.W.L, (int)MinxCPU.SP.W.L); y += 12; sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "PC = \e345%02X\e003$%04X,%i", (int)MinxCPU.PC.B.I, (int)MinxCPU.PC.W.L, (int)MinxCPU.PC.W.L); y += 12; - sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, " U = $%02X->$%02X (%i)", (int)MinxCPU.U1, (int)MinxCPU.U2, (int)MinxCPU.Shift_U); + sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "NB = $%02X->$%02X (%i)", (int)MinxCPU.U1, (int)MinxCPU.U2, (int)MinxCPU.Shift_U); y += 12; - sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, " V = $%02X,%i", (int)MinxCPU.PC.B.I, (int)MinxCPU.PC.B.I); + sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "CB = $%02X,%i", (int)MinxCPU.PC.B.I, (int)MinxCPU.PC.B.I); y += 12; - sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, " N = $%02X,%i", (int)MinxCPU.N.B.H, (int)MinxCPU.N.B.H); + sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "BR = $%02X,%i", (int)MinxCPU.N.B.H, (int)MinxCPU.N.B.H); y += 12; - sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, " I = $%02X,%i", (int)MinxCPU.HL.B.I, (int)MinxCPU.HL.B.I); + sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "EP = $%02X,%i", (int)MinxCPU.HL.B.I, (int)MinxCPU.HL.B.I); y += 12; - sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "XI = $%02X,%i", (int)MinxCPU.X.B.I, (int)MinxCPU.X.B.I); + sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "XP = $%02X,%i", (int)MinxCPU.X.B.I, (int)MinxCPU.X.B.I); y += 12; - sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "YI = $%02X,%i", (int)MinxCPU.Y.B.I, (int)MinxCPU.Y.B.I); + sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "YP = $%02X,%i", (int)MinxCPU.Y.B.I, (int)MinxCPU.Y.B.I); y += 12; sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, " A = $%02X,%i", (int)MinxCPU.BA.B.L, (int)MinxCPU.BA.B.L); y += 12; @@ -730,10 +787,10 @@ static int RegistersView_exposure(SGtkXDrawingView *widg, int width, int height, y += 12; sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, " H = $%02X,%i", (int)MinxCPU.HL.B.H, (int)MinxCPU.HL.B.H); y += 12; - sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, " F = $%02X,%i", (int)MinxCPU.F, (int)MinxCPU.F); + sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "SC = $%02X,%i", (int)MinxCPU.F, (int)MinxCPU.F); y += 12; if (emumode != EMUMODE_RUNFULL) { - sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "\e%sI.D. \e%sI.F. \e%sNib. \e%sBCD", + sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "\e%sI1 \e%sI0 \e%sUpk. \e%sBCD", (MinxCPU.F & 0x80) ? "003" : "766", (MinxCPU.F & 0x40) ? "003" : "766", (MinxCPU.F & 0x20) ? "003" : "766", @@ -746,7 +803,7 @@ static int RegistersView_exposure(SGtkXDrawingView *widg, int width, int height, (MinxCPU.F & 0x01) ? "003" : "766"); y += 12; } else { - sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "\e%sI.D. \e%sI.F. \e%sNib. \e%sBCD", + sgtkx_drawing_view_drawtext(widg, 4, y, 0x00004C, "\e%sI1 \e%sI0 \e%sUpk. \e%sBCD", (MinxCPU.F & 0x80) ? "003" : "433", (MinxCPU.F & 0x40) ? "003" : "433", (MinxCPU.F & 0x20) ? "003" : "433", @@ -806,9 +863,9 @@ static int RegistersView_buttonpress(SGtkXDrawingView *widg, int button, int pre break; case 1: result = EnterNumberDialog(MainWindow, "Change register", "Set HL value:", &val, (int)MinxCPU.HL.W.L, 4, 1, -65535, 65535); break; - case 2: result = EnterNumberDialog(MainWindow, "Change register", "Set X value:", &val, (int)MinxCPU.X.W.L, 4, 1, -65535, 65535); + case 2: result = EnterNumberDialog(MainWindow, "Change register", "Set IX value:", &val, (int)MinxCPU.X.W.L, 4, 1, -65535, 65535); break; - case 3: result = EnterNumberDialog(MainWindow, "Change register", "Set Y value:", &val, (int)MinxCPU.Y.W.L, 4, 1, -65535, 65535); + case 3: result = EnterNumberDialog(MainWindow, "Change register", "Set IY value:", &val, (int)MinxCPU.Y.W.L, 4, 1, -65535, 65535); break; case 4: result = EnterNumberDialog(MainWindow, "Change register", "Set SP value:", &val, (int)MinxCPU.SP.W.L, 4, 1, -65535, 65535); break; @@ -819,15 +876,15 @@ static int RegistersView_buttonpress(SGtkXDrawingView *widg, int button, int pre RegistersView_Uregister[5].number = (int)MinxCPU.Shift_U; result = CustomDialog(MainWindow, "Change register", RegistersView_Uregister); break; - case 7: result = EnterNumberDialog(MainWindow, "Change register", "Set V value:", &val, (int)MinxCPU.PC.B.I, 2, 1, -255, 255); + case 7: result = EnterNumberDialog(MainWindow, "Change register", "Set CB value:", &val, (int)MinxCPU.PC.B.I, 2, 1, -255, 255); break; - case 8: result = EnterNumberDialog(MainWindow, "Change register", "Set N value:", &val, (int)MinxCPU.N.B.H, 2, 1, -255, 255); + case 8: result = EnterNumberDialog(MainWindow, "Change register", "Set BR value:", &val, (int)MinxCPU.N.B.H, 2, 1, -255, 255); break; - case 9: result = EnterNumberDialog(MainWindow, "Change register", "Set I value:", &val, (int)MinxCPU.HL.B.I, 2, 1, -255, 255); + case 9: result = EnterNumberDialog(MainWindow, "Change register", "Set EP value:", &val, (int)MinxCPU.HL.B.I, 2, 1, -255, 255); break; - case 10:result = EnterNumberDialog(MainWindow, "Change register", "Set XI value:", &val, (int)MinxCPU.X.B.I, 2, 1, -255, 255); + case 10:result = EnterNumberDialog(MainWindow, "Change register", "Set XP value:", &val, (int)MinxCPU.X.B.I, 2, 1, -255, 255); break; - case 11:result = EnterNumberDialog(MainWindow, "Change register", "Set YI value:", &val, (int)MinxCPU.Y.B.I, 2, 1, -255, 255); + case 11:result = EnterNumberDialog(MainWindow, "Change register", "Set YP value:", &val, (int)MinxCPU.Y.B.I, 2, 1, -255, 255); break; case 12:result = EnterNumberDialog(MainWindow, "Change register", "Set A value:", &val, (int)MinxCPU.BA.B.L, 2, 1, -255, 255); break; @@ -837,7 +894,7 @@ static int RegistersView_buttonpress(SGtkXDrawingView *widg, int button, int pre break; case 15:result = EnterNumberDialog(MainWindow, "Change register", "Set H value:", &val, (int)MinxCPU.HL.B.H, 2, 1, -255, 255); break; - case 16:result = EnterNumberDialog(MainWindow, "Change register", "Set F value:", &val, (int)MinxCPU.F, 2, 1, -255, 255); + case 16:result = EnterNumberDialog(MainWindow, "Change register", "Set SC value:", &val, (int)MinxCPU.F, 2, 1, -255, 255); break; case 17:if (xs == 0) MinxCPU.F ^= 0x80; if (xs == 1) MinxCPU.F ^= 0x40; @@ -2259,7 +2316,7 @@ static void Menu_Debug_GotoCartIRQ(GtkWidget *widget, gpointer data) if (aoff++ == 6) break; } } else if (dat == 0xF1) { - // JMPb @nn + // JRS @nn laddr = MinxCPU_OnRead(0, addr + aoff); if (aoff++ == 6) break; if (laddr & 0x80) laddr |= 0xFF00; @@ -2267,7 +2324,7 @@ static void Menu_Debug_GotoCartIRQ(GtkWidget *widget, gpointer data) addr = (haddr << 16) | laddr; break; } else if (dat == 0xF3) { - // JMPw @nnnn + // JRL @nnnn laddr = MinxCPU_OnRead(0, addr + aoff); if (aoff++ == 6) break; laddr |= MinxCPU_OnRead(0, addr + aoff) << 8; diff --git a/source/MinxCPU.h b/source/MinxCPU.h index 1cc90fe..1c23661 100644 --- a/source/MinxCPU.h +++ b/source/MinxCPU.h @@ -112,18 +112,18 @@ static inline uint16_t S8_TO_16(int8_t a) typedef struct { // Registers MinxRegx BA; // Registers A, B - MinxRegx HL; // Registers L, H, I - MinxRegx X; // Registers X, XI - MinxRegx Y; // Registers Y, YI + MinxRegx HL; // Registers L, H, EP + MinxRegx X; // Registers IX, XP + MinxRegx Y; // Registers IY, YP MinxRegx SP; // Register SP - MinxRegx PC; // Registers PC, V - MinxRegx N; // for [N+#nn], I is written here too - uint8_t U1; // V Shadow 1 - uint8_t U2; // V Shadow 2 - uint8_t F; // Flags + MinxRegx PC; // Registers PC, CB + MinxRegx N; // for [BR:#nn], EP is written here too + uint8_t U1; // CB Shadow 1 + uint8_t U2; // CB Shadow 2 + uint8_t F; // Flags (SC) uint8_t E; // Exception uint8_t IR; // Last Instruction Register (for open-bus) - uint8_t Shift_U; // Shift U, set to 2 when: U modify, branch, return + uint8_t Shift_U; // Shift NB, set to 2 when: NB modify, branch, return uint8_t Status; // CPU Status (0 = Normal, 1 = Halt, 2 = Stoped, 3 = IRQ) uint8_t IRQ_Vector; // IRQ Vector when Status is IRQ uint8_t Reserved[28]; // Reserved bytes diff --git a/source/MinxCPU_CE.c b/source/MinxCPU_CE.c index 3d6dcaf..5bb56ea 100644 --- a/source/MinxCPU_CE.c +++ b/source/MinxCPU_CE.c @@ -31,21 +31,21 @@ int MinxCPU_ExecCE(void) // Process instruction switch(MinxCPU.IR) { - case 0x00: // ADD A, [X+#ss] + case 0x00: // ADD A, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = ADD8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x01: // ADD A, [Y+#ss] + case 0x01: // ADD A, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = ADD8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; - case 0x02: // ADD A, [X+L] + case 0x02: // ADD A, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = ADD8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x03: // ADD A, [Y+L] + case 0x03: // ADD A, [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = ADD8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; @@ -57,28 +57,28 @@ int MinxCPU_ExecCE(void) I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.HL.D, ADD8(MinxCPU_OnRead(1, MinxCPU.HL.D), I8A)); return 20; - case 0x06: // ADD [HL], [X] + case 0x06: // ADD [HL], [IX] MinxCPU_OnWrite(1, MinxCPU.HL.D, ADD8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.X.D))); return 20; - case 0x07: // ADD [HL], [Y] + case 0x07: // ADD [HL], [IY] MinxCPU_OnWrite(1, MinxCPU.HL.D, ADD8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.Y.D))); return 20; - case 0x08: // ADC A, [X+#ss] + case 0x08: // ADC A, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = ADC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x09: // ADC A, [Y+#ss] + case 0x09: // ADC A, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = ADC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; - case 0x0A: // ADC A, [X+L] + case 0x0A: // ADC A, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = ADC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x0B: // ADC A, [Y+L] + case 0x0B: // ADC A, [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = ADC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; @@ -90,28 +90,28 @@ int MinxCPU_ExecCE(void) I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.HL.D, ADC8(MinxCPU_OnRead(1, MinxCPU.HL.D), I8A)); return 20; - case 0x0E: // ADC [HL], [X] + case 0x0E: // ADC [HL], [IX] MinxCPU_OnWrite(1, MinxCPU.HL.D, ADC8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.X.D))); return 20; - case 0x0F: // ADC [HL], [Y] + case 0x0F: // ADC [HL], [IY] MinxCPU_OnWrite(1, MinxCPU.HL.D, ADC8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.Y.D))); return 20; - case 0x10: // SUB A, [X+#ss] + case 0x10: // SUB A, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x11: // SUB A, [Y+#ss] + case 0x11: // SUB A, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; - case 0x12: // SUB A, [X+L] + case 0x12: // SUB A, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x13: // SUB A, [Y+L] + case 0x13: // SUB A, [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; @@ -123,28 +123,28 @@ int MinxCPU_ExecCE(void) I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.HL.D, SUB8(MinxCPU_OnRead(1, MinxCPU.HL.D), I8A)); return 20; - case 0x16: // SUB [HL], [X] + case 0x16: // SUB [HL], [IX] MinxCPU_OnWrite(1, MinxCPU.HL.D, SUB8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.X.D))); return 20; - case 0x17: // SUB [HL], [Y] + case 0x17: // SUB [HL], [IY] MinxCPU_OnWrite(1, MinxCPU.HL.D, SUB8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.Y.D))); return 20; - case 0x18: // SBC A, [X+#ss] + case 0x18: // SBC A, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = SBC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x19: // SBC A, [Y+#ss] + case 0x19: // SBC A, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = SBC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; - case 0x1A: // SBC A, [X+L] + case 0x1A: // SBC A, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = SBC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x1B: // SBC A, [Y+L] + case 0x1B: // SBC A, [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = SBC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; @@ -156,28 +156,28 @@ int MinxCPU_ExecCE(void) I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.HL.D, SBC8(MinxCPU_OnRead(1, MinxCPU.HL.D), I8A)); return 20; - case 0x1E: // SBC [HL], [X] + case 0x1E: // SBC [HL], [IX] MinxCPU_OnWrite(1, MinxCPU.HL.D, SBC8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.X.D))); return 20; - case 0x1F: // SBC [HL], [Y] + case 0x1F: // SBC [HL], [IY] MinxCPU_OnWrite(1, MinxCPU.HL.D, SBC8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.Y.D))); return 20; - case 0x20: // AND A, [X+#ss] + case 0x20: // AND A, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = AND8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x21: // AND A, [Y+#ss] + case 0x21: // AND A, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = AND8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; - case 0x22: // AND A, [X+L] + case 0x22: // AND A, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = AND8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x23: // AND A, [Y+L] + case 0x23: // AND A, [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = AND8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; @@ -189,28 +189,28 @@ int MinxCPU_ExecCE(void) I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.HL.D, AND8(MinxCPU_OnRead(1, MinxCPU.HL.D), I8A)); return 20; - case 0x26: // AND [HL], [X] + case 0x26: // AND [HL], [IX] MinxCPU_OnWrite(1, MinxCPU.HL.D, AND8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.X.D))); return 20; - case 0x27: // AND [HL], [Y] + case 0x27: // AND [HL], [IY] MinxCPU_OnWrite(1, MinxCPU.HL.D, AND8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.Y.D))); return 20; - case 0x28: // OR A, [X+#ss] + case 0x28: // OR A, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = OR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x29: // OR A, [Y+#ss] + case 0x29: // OR A, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = OR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; - case 0x2A: // OR A, [X+L] + case 0x2A: // OR A, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = OR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x2B: // OR A, [Y+L] + case 0x2B: // OR A, [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = OR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; @@ -222,61 +222,61 @@ int MinxCPU_ExecCE(void) I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.HL.D, OR8(MinxCPU_OnRead(1, MinxCPU.HL.D), I8A)); return 20; - case 0x2E: // OR [HL], [X] + case 0x2E: // OR [HL], [IX] MinxCPU_OnWrite(1, MinxCPU.HL.D, OR8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.X.D))); return 20; - case 0x2F: // OR [HL], [Y] + case 0x2F: // OR [HL], [IY] MinxCPU_OnWrite(1, MinxCPU.HL.D, OR8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.Y.D))); return 20; - case 0x30: // CMP A, [X+#ss] + case 0x30: // CP A, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x31: // CMP A, [Y+#ss] + case 0x31: // CP A, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; - case 0x32: // CMP A, [X+L] + case 0x32: // CP A, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x33: // CMP A, [Y+L] + case 0x33: // CP A, [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; - case 0x34: // CMP [HL], A + case 0x34: // CP [HL], A SUB8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU.BA.B.L); return 16; - case 0x35: // CMP [HL], #nn + case 0x35: // CP [HL], #nn I8A = Fetch8(); SUB8(MinxCPU_OnRead(1, MinxCPU.HL.D), I8A); return 20; - case 0x36: // CMP [HL], [X] + case 0x36: // CP [HL], [IX] SUB8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.X.D)); return 20; - case 0x37: // CMP [HL], [Y] + case 0x37: // CP [HL], [IY] SUB8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.Y.D)); return 20; - case 0x38: // XOR A, [X+#ss] + case 0x38: // XOR A, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = XOR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x39: // XOR A, [Y+#ss] + case 0x39: // XOR A, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = XOR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; - case 0x3A: // XOR A, [X+L] + case 0x3A: // XOR A, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = XOR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 16; - case 0x3B: // XOR A, [Y+L] + case 0x3B: // XOR A, [IY+L] I16 = MinxCPU.Y.W.L+ S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = XOR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 16; @@ -288,180 +288,180 @@ int MinxCPU_ExecCE(void) I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.HL.D, XOR8(MinxCPU_OnRead(1, MinxCPU.HL.D), I8A)); return 20; - case 0x3E: // XOR [HL], [X] + case 0x3E: // XOR [HL], [IX] MinxCPU_OnWrite(1, MinxCPU.HL.D, XOR8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.X.D))); return 20; - case 0x3F: // XOR [HL], [Y] + case 0x3F: // XOR [HL], [IY] MinxCPU_OnWrite(1, MinxCPU.HL.D, XOR8(MinxCPU_OnRead(1, MinxCPU.HL.D), MinxCPU_OnRead(1, MinxCPU.Y.D))); return 20; - case 0x40: // MOV A, [X+#ss] + case 0x40: // LD A, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 16; - case 0x41: // MOV A, [Y+#ss] + case 0x41: // LD A, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 16; - case 0x42: // MOV A, [X+L] + case 0x42: // LD A, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 16; - case 0x43: // MOV A, [Y+L] + case 0x43: // LD A, [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 16; - case 0x44: // MOV [X+#ss], A + case 0x44: // LD [IX+#ss], A I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16, MinxCPU.BA.B.L); return 16; - case 0x45: // MOV [Y+#ss], A + case 0x45: // LD [IY+#ss], A I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16, MinxCPU.BA.B.L); return 16; - case 0x46: // MOV [X+L], A + case 0x46: // LD [IX+L], A I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16, MinxCPU.BA.B.L); return 16; - case 0x47: // MOV [Y+L], A + case 0x47: // LD [IY+L], A I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16, MinxCPU.BA.B.L); return 16; - case 0x48: // MOV B, [X+#ss] + case 0x48: // LD B, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU.BA.B.H = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 16; - case 0x49: // MOV B, [Y+#ss] + case 0x49: // LD B, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU.BA.B.H = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 16; - case 0x4A: // MOV B, [X+L] + case 0x4A: // LD B, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.H = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 16; - case 0x4B: // MOV B, [Y+L] + case 0x4B: // LD B, [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.H = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 16; - case 0x4C: // MOV [X+#ss], B + case 0x4C: // LD [IX+#ss], B I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16, MinxCPU.BA.B.H); return 16; - case 0x4D: // MOV [Y+#ss], B + case 0x4D: // LD [IY+#ss], B I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16, MinxCPU.BA.B.H); return 16; - case 0x4E: // MOV [X+L], B + case 0x4E: // LD [IX+L], B I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16, MinxCPU.BA.B.H); return 16; - case 0x4F: // MOV [Y+L], B + case 0x4F: // LD [IY+L], B I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16, MinxCPU.BA.B.H); return 16; - case 0x50: // MOV L, [X+#ss] + case 0x50: // LD L, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU.HL.B.L = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 16; - case 0x51: // MOV L, [Y+#ss] + case 0x51: // LD L, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU.HL.B.L = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 16; - case 0x52: // MOV L, [X+L] + case 0x52: // LD L, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.HL.B.L = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 16; - case 0x53: // MOV L, [Y+L] + case 0x53: // LD L, [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.HL.B.L = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 16; - case 0x54: // MOV [X+#ss], L + case 0x54: // LD [IX+#ss], L I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16, MinxCPU.HL.B.L); return 16; - case 0x55: // MOV [Y+#ss], L + case 0x55: // LD [IY+#ss], L I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16, MinxCPU.HL.B.L); return 16; - case 0x56: // MOV [X+L], L + case 0x56: // LD [IX+L], L I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16, MinxCPU.HL.B.L); return 16; - case 0x57: // MOV [Y+L], L + case 0x57: // LD [IY+L], L I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16, MinxCPU.HL.B.L); return 16; - case 0x58: // MOV H, [X+#ss] + case 0x58: // LD H, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU.HL.B.H = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 16; - case 0x59: // MOV H, [Y+#ss] + case 0x59: // LD H, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU.HL.B.H = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 16; - case 0x5A: // MOV H, [X+L] + case 0x5A: // LD H, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.HL.B.H = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 16; - case 0x5B: // MOV H, [Y+L] + case 0x5B: // LD H, [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.HL.B.H = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 16; - case 0x5C: // MOV [X+#ss], H + case 0x5C: // LD [IX+#ss], H I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16, MinxCPU.HL.B.H); return 16; - case 0x5D: // MOV [Y+#ss], H + case 0x5D: // LD [IY+#ss], H I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16, MinxCPU.HL.B.H); return 16; - case 0x5E: // MOV [X+L], H + case 0x5E: // LD [IX+L], H I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16, MinxCPU.HL.B.H); return 16; - case 0x5F: // MOV [Y+L], H + case 0x5F: // LD [IY+L], H I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16, MinxCPU.HL.B.H); return 16; - case 0x60: // MOV [HL], [X+#ss] + case 0x60: // LD [HL], [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 20; - case 0x61: // MOV [HL], [Y+#ss] + case 0x61: // LD [HL], [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 20; - case 0x62: // MOV [HL], [X+L] + case 0x62: // LD [HL], [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 20; - case 0x63: // MOV [HL], [Y+L] + case 0x63: // LD [HL], [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 20; @@ -484,21 +484,21 @@ int MinxCPU_ExecCE(void) MinxCPU.HL.W.L = ADC16(MinxCPU.HL.W.L, (I8A << 8) | MinxCPU.HL.B.L); return 24; - case 0x68: // MOV [X], [X+#ss] + case 0x68: // LD [IX], [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, MinxCPU.X.D, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 20; - case 0x69: // MOV [X], [Y+#ss] + case 0x69: // LD [IX], [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, MinxCPU.X.D, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 20; - case 0x6A: // MOV [X], [X+L] + case 0x6A: // LD [IX], [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, MinxCPU.X.D, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 20; - case 0x6B: // MOV [X], [Y+L] + case 0x6B: // LD [IX], [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, MinxCPU.X.D, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 20; @@ -532,40 +532,40 @@ int MinxCPU_ExecCE(void) case 0x73: // NOTHING return 64; - case 0x74: // *MOV A, [X+#ss] + case 0x74: // *LD A, [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 64; - case 0x75: // *MOV L, [Y+#ss] + case 0x75: // *LD L, [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU.HL.B.L = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 64; - case 0x76: // *MOV A, [X+L] + case 0x76: // *LD A, [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.BA.B.L = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 64; - case 0x77: // *MOV L, [Y+L] + case 0x77: // *LD L, [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU.HL.B.L = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 64; - case 0x78: // MOV [Y], [X+#ss] + case 0x78: // LD [IY], [IX+#ss] I8A = Fetch8(); I16 = MinxCPU.X.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, MinxCPU.Y.D, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 20; - case 0x79: // MOV [Y], [Y+#ss] + case 0x79: // LD [IY], [IY+#ss] I8A = Fetch8(); I16 = MinxCPU.Y.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, MinxCPU.Y.D, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 20; - case 0x7A: // MOV [Y], [X+L] + case 0x7A: // LD [IY], [IX+L] I16 = MinxCPU.X.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, MinxCPU.Y.D, MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16)); return 20; - case 0x7B: // MOV [Y], [Y+L] + case 0x7B: // LD [IY], [IY+L] I16 = MinxCPU.Y.W.L + S8_TO_16(MinxCPU.HL.B.L); MinxCPU_OnWrite(1, MinxCPU.Y.D, MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16)); return 20; @@ -587,7 +587,7 @@ int MinxCPU_ExecCE(void) case 0x81: // SAL B MinxCPU.BA.B.H = SAL(MinxCPU.BA.B.H); return 12; - case 0x82: // SAL [N+#nn] + case 0x82: // SAL [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D | I8A, SAL(MinxCPU_OnRead(1, MinxCPU.N.D | I8A))); return 20; @@ -601,7 +601,7 @@ int MinxCPU_ExecCE(void) case 0x85: // SHL B MinxCPU.BA.B.H = SHL(MinxCPU.BA.B.H); return 12; - case 0x86: // SHL [N+#nn] + case 0x86: // SHL [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D | I8A, SHL(MinxCPU_OnRead(1, MinxCPU.N.D | I8A))); return 20; @@ -615,7 +615,7 @@ int MinxCPU_ExecCE(void) case 0x89: // SAR B MinxCPU.BA.B.H = SAR(MinxCPU.BA.B.H); return 12; - case 0x8A: // SAR [N+#nn] + case 0x8A: // SAR [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D | I8A, SAR(MinxCPU_OnRead(1, MinxCPU.N.D | I8A))); return 20; @@ -629,7 +629,7 @@ int MinxCPU_ExecCE(void) case 0x8D: // SHR B MinxCPU.BA.B.H = SHR(MinxCPU.BA.B.H); return 12; - case 0x8E: // SHR [N+#nn] + case 0x8E: // SHR [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D | I8A, SHR(MinxCPU_OnRead(1, MinxCPU.N.D | I8A))); return 20; @@ -643,7 +643,7 @@ int MinxCPU_ExecCE(void) case 0x91: // ROLC B MinxCPU.BA.B.H = ROLC(MinxCPU.BA.B.H); return 12; - case 0x92: // ROLC [N+#nn] + case 0x92: // ROLC [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D | I8A, ROLC(MinxCPU_OnRead(1, MinxCPU.N.D | I8A))); return 20; @@ -657,7 +657,7 @@ int MinxCPU_ExecCE(void) case 0x95: // ROL B MinxCPU.BA.B.H = ROL(MinxCPU.BA.B.H); return 12; - case 0x96: // ROL [N+#nn] + case 0x96: // ROL [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D | I8A, ROL(MinxCPU_OnRead(1, MinxCPU.N.D | I8A))); return 20; @@ -671,7 +671,7 @@ int MinxCPU_ExecCE(void) case 0x99: // RORC B MinxCPU.BA.B.H = RORC(MinxCPU.BA.B.H); return 12; - case 0x9A: // RORC [N+#nn] + case 0x9A: // RORC [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D | I8A, RORC(MinxCPU_OnRead(1, MinxCPU.N.D | I8A))); return 20; @@ -685,7 +685,7 @@ int MinxCPU_ExecCE(void) case 0x9D: // ROR B MinxCPU.BA.B.H = ROR(MinxCPU.BA.B.H); return 12; - case 0x9E: // ROR [N+#nn] + case 0x9E: // ROR [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D | I8A, ROR(MinxCPU_OnRead(1, MinxCPU.N.D | I8A))); return 20; @@ -699,7 +699,7 @@ int MinxCPU_ExecCE(void) case 0xA1: // NOT B MinxCPU.BA.B.H = NOT(MinxCPU.BA.B.H); return 12; - case 0xA2: // NOT [N+#nn] + case 0xA2: // NOT [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D | I8A, NOT(MinxCPU_OnRead(1, MinxCPU.N.D | I8A))); return 20; @@ -713,7 +713,7 @@ int MinxCPU_ExecCE(void) case 0xA5: // NEG B MinxCPU.BA.B.H = NEG(MinxCPU.BA.B.H); return 12; - case 0xA6: // NEG [N+#nn] + case 0xA6: // NEG [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D | I8A, NEG(MinxCPU_OnRead(1, MinxCPU.N.D | I8A))); return 20; @@ -759,7 +759,7 @@ int MinxCPU_ExecCE(void) I8A = Fetch8(); MinxCPU.HL.B.H = AND8(MinxCPU.HL.B.H, I8A); return 12; - case 0xB3: // MOV H, V + case 0xB3: // LD H, CB (TODO: test NB vs CB) MinxCPU.HL.B.H = MinxCPU.PC.B.I; return 12; @@ -775,7 +775,7 @@ int MinxCPU_ExecCE(void) I8A = Fetch8(); MinxCPU.HL.B.H = OR8(MinxCPU.HL.B.H, I8A); return 12; - case 0xB7: // ??? X + case 0xB7: // ??? IX MinxCPU.X.B.H = MinxCPU.PC.B.I; return 12; @@ -791,125 +791,125 @@ int MinxCPU_ExecCE(void) I8A = Fetch8(); MinxCPU.HL.B.H = XOR8(MinxCPU.HL.B.H, I8A); return 12; - case 0xBB: // ??? Y + case 0xBB: // ??? IY MinxCPU.Y.B.H = MinxCPU.PC.B.I; return 12; - case 0xBC: // CMP B, #nn + case 0xBC: // CP B, #nn I8A = Fetch8(); SUB8(MinxCPU.BA.B.H, I8A); return 12; - case 0xBD: // CMP L, #nn + case 0xBD: // CP L, #nn I8A = Fetch8(); SUB8(MinxCPU.HL.B.L, I8A); return 12; - case 0xBE: // CMP H, #nn + case 0xBE: // CP H, #nn I8A = Fetch8(); SUB8(MinxCPU.HL.B.H, I8A); return 12; - case 0xBF: // CMP N, #nn + case 0xBF: // CP BR, #nn I8A = Fetch8(); SUB8(MinxCPU.N.B.H, I8A); return 12; - case 0xC0: // MOV A, N + case 0xC0: // LD A, BR MinxCPU.BA.B.L = MinxCPU.N.B.H; return 8; - case 0xC1: // MOV A, F + case 0xC1: // LD A, SC MinxCPU.BA.B.L = MinxCPU.F; return 8; - case 0xC2: // MOV N, A + case 0xC2: // LD BR, A MinxCPU.N.B.H = MinxCPU.BA.B.L; return 8; - case 0xC3: // MOV F, A + case 0xC3: // LD SC, A MinxCPU.F = MinxCPU.BA.B.L; MinxCPU_OnIRQHandle(MinxCPU.F, MinxCPU.Shift_U); return 8; - case 0xC4: // MOV U, #nn + case 0xC4: // LD NB, #nn I8A = Fetch8(); Set_U(I8A); return 16; - case 0xC5: // MOV I, #nn + case 0xC5: // LD EP, #nn I8A = Fetch8(); MinxCPU.HL.B.I = I8A; MinxCPU.N.B.I = MinxCPU.HL.B.I; return 12; - case 0xC6: // MOV XI, #nn + case 0xC6: // LD XP, #nn I8A = Fetch8(); MinxCPU.X.B.I = I8A; return 12; - case 0xC7: // MOV YI, #nn + case 0xC7: // LD YP, #nn I8A = Fetch8(); MinxCPU.Y.B.I = I8A; return 12; - case 0xC8: // MOV A, V + case 0xC8: // LD A, NB (TODO: test NB vs CB) MinxCPU.BA.B.L = MinxCPU.PC.B.I; return 8; - case 0xC9: // MOV A, I + case 0xC9: // LD A, EP MinxCPU.BA.B.L = MinxCPU.HL.B.I; return 8; - case 0xCA: // MOV A, XI + case 0xCA: // LD A, XP MinxCPU.BA.B.L = MinxCPU.X.B.I; return 8; - case 0xCB: // MOV A, YI + case 0xCB: // LD A, YP MinxCPU.BA.B.L = MinxCPU.Y.B.I; return 8; - case 0xCC: // MOV U, A + case 0xCC: // LD NB, A Set_U(MinxCPU.BA.B.L); return 8; - case 0xCD: // MOV I, A + case 0xCD: // LD EP, A MinxCPU.HL.B.I = MinxCPU.BA.B.L; MinxCPU.N.B.I = MinxCPU.HL.B.I; return 8; - case 0xCE: // MOV XI, A + case 0xCE: // LD XP, A MinxCPU.X.B.I = MinxCPU.BA.B.L; return 8; - case 0xCF: // MOV YI, A + case 0xCF: // LD YP, A MinxCPU.Y.B.I = MinxCPU.BA.B.L; return 8; - case 0xD0: // MOV A, [#nnnn] + case 0xD0: // LD A, [#nnnn] I16 = Fetch16(); MinxCPU.BA.B.L = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); return 20; - case 0xD1: // MOV B, [#nnnn] + case 0xD1: // LD B, [#nnnn] I16 = Fetch16(); MinxCPU.BA.B.H = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); return 20; - case 0xD2: // MOV L, [#nnnn] + case 0xD2: // LD L, [#nnnn] I16 = Fetch16(); MinxCPU.HL.B.L = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); return 20; - case 0xD3: // MOV H, [#nnnn] + case 0xD3: // LD H, [#nnnn] I16 = Fetch16(); MinxCPU.HL.B.H = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); return 20; - case 0xD4: // MOV [#nnnn], A + case 0xD4: // LD [#nnnn], A I16 = Fetch16(); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.BA.B.L); return 20; - case 0xD5: // MOV [#nnnn], B + case 0xD5: // LD [#nnnn], B I16 = Fetch16(); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.BA.B.H); return 20; - case 0xD6: // MOV [#nnnn], L + case 0xD6: // LD [#nnnn], L I16 = Fetch16(); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.HL.B.L); return 20; - case 0xD7: // MOV [#nnnn], H + case 0xD7: // LD [#nnnn], H I16 = Fetch16(); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.HL.B.H); return 20; - case 0xD8: // MUL L, A + case 0xD8: // MUL MUL(); return 48; - case 0xD9: // DIV HL, A + case 0xD9: // DIV DIV(); return 52; @@ -1025,100 +1025,100 @@ int MinxCPU_ExecCE(void) } return 12; - case 0xF0: // CALLL #ss + case 0xF0: // CARS LT, #ss I8A = Fetch8(); if ( ((MinxCPU.F & MINX_FLAG_OVERFLOW)!=0) != ((MinxCPU.F & MINX_FLAG_SIGN)!=0) ) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xF1: // CALLLE #ss + case 0xF1: // CARS LE, #ss I8A = Fetch8(); if ( (((MinxCPU.F & MINX_FLAG_OVERFLOW)==0) != ((MinxCPU.F & MINX_FLAG_SIGN)==0)) || ((MinxCPU.F & MINX_FLAG_ZERO)!=0) ) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xF2: // CALLG #ss + case 0xF2: // CARS GT, #ss I8A = Fetch8(); if ( (((MinxCPU.F & MINX_FLAG_OVERFLOW)!=0) == ((MinxCPU.F & MINX_FLAG_SIGN)!=0)) && ((MinxCPU.F & MINX_FLAG_ZERO)==0) ) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xF3: // CALLGE #ss + case 0xF3: // CARS GE, #ss I8A = Fetch8(); if ( ((MinxCPU.F & MINX_FLAG_OVERFLOW)==0) == ((MinxCPU.F & MINX_FLAG_SIGN)==0) ) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xF4: // CALLO #ss + case 0xF4: // CARS V, #ss I8A = Fetch8(); if (MinxCPU.F & MINX_FLAG_OVERFLOW) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xF5: // CALLNO #ss + case 0xF5: // CARS NV, #ss I8A = Fetch8(); if (!(MinxCPU.F & MINX_FLAG_OVERFLOW)) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xF6: // CALLNS #ss + case 0xF6: // CARS P, #ss I8A = Fetch8(); if (!(MinxCPU.F & MINX_FLAG_SIGN)) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xF7: // CALLS #ss + case 0xF7: // CARS M, #ss I8A = Fetch8(); if (MinxCPU.F & MINX_FLAG_SIGN) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xF8: // CALLNX0 #ss + case 0xF8: // CARS F0, #ss I8A = Fetch8(); if (!(MinxCPU.E & 0x01)) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xF9: // CALLNX1 #ss + case 0xF9: // CARS F1, #ss I8A = Fetch8(); if (!(MinxCPU.E & 0x02)) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xFA: // CALLNX2 #ss + case 0xFA: // CARS F2, #ss I8A = Fetch8(); if (!(MinxCPU.E & 0x04)) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xFB: // CALLNX3 #ss + case 0xFB: // CARS F3, #ss I8A = Fetch8(); if (!(MinxCPU.E & 0x08)) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xFC: // CALLX0 #ss + case 0xFC: // CARS NF0, #ss I8A = Fetch8(); if (MinxCPU.E & 0x01) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xFD: // CALLX1 #ss + case 0xFD: // CARS NF1, #ss I8A = Fetch8(); if (MinxCPU.E & 0x02) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xFE: // CALLX2 #ss + case 0xFE: // CARS NF2, #ss I8A = Fetch8(); if (MinxCPU.E & 0x04) { CALLS(S8_TO_16(I8A)); } return 12; - case 0xFF: // CALLX3 #ss + case 0xFF: // CARS NF3, #ss I8A = Fetch8(); if (MinxCPU.E & 0x08) { CALLS(S8_TO_16(I8A)); diff --git a/source/MinxCPU_CF.c b/source/MinxCPU_CF.c index fd13933..4d6db58 100644 --- a/source/MinxCPU_CF.c +++ b/source/MinxCPU_CF.c @@ -36,10 +36,10 @@ int MinxCPU_ExecCF(void) case 0x01: // ADD BA, HL MinxCPU.BA.W.L = ADD16(MinxCPU.BA.W.L, MinxCPU.HL.W.L); return 16; - case 0x02: // ADD BA, X + case 0x02: // ADD BA, IX MinxCPU.BA.W.L = ADD16(MinxCPU.BA.W.L, MinxCPU.X.W.L); return 16; - case 0x03: // ADD BA, Y + case 0x03: // ADD BA, IY MinxCPU.BA.W.L = ADD16(MinxCPU.BA.W.L, MinxCPU.Y.W.L); return 16; @@ -49,10 +49,10 @@ int MinxCPU_ExecCF(void) case 0x05: // ADC BA, HL MinxCPU.BA.W.L = ADC16(MinxCPU.BA.W.L, MinxCPU.HL.W.L); return 16; - case 0x06: // ADC BA, X + case 0x06: // ADC BA, IX MinxCPU.BA.W.L = ADC16(MinxCPU.BA.W.L, MinxCPU.X.W.L); return 16; - case 0x07: // ADC BA, Y + case 0x07: // ADC BA, IY MinxCPU.BA.W.L = ADC16(MinxCPU.BA.W.L, MinxCPU.Y.W.L); return 16; @@ -62,10 +62,10 @@ int MinxCPU_ExecCF(void) case 0x09: // SUB BA, HL MinxCPU.BA.W.L = SUB16(MinxCPU.BA.W.L, MinxCPU.HL.W.L); return 16; - case 0x0A: // SUB BA, X + case 0x0A: // SUB BA, IX MinxCPU.BA.W.L = SUB16(MinxCPU.BA.W.L, MinxCPU.X.W.L); return 16; - case 0x0B: // SUB BA, Y + case 0x0B: // SUB BA, IY MinxCPU.BA.W.L = SUB16(MinxCPU.BA.W.L, MinxCPU.Y.W.L); return 16; @@ -75,10 +75,10 @@ int MinxCPU_ExecCF(void) case 0x0D: // SBC BA, HL MinxCPU.BA.W.L = SBC16(MinxCPU.BA.W.L, MinxCPU.HL.W.L); return 16; - case 0x0E: // SBC BA, X + case 0x0E: // SBC BA, IX MinxCPU.BA.W.L = SBC16(MinxCPU.BA.W.L, MinxCPU.X.W.L); return 16; - case 0x0F: // SBC BA, Y + case 0x0F: // SBC BA, IY MinxCPU.BA.W.L = SBC16(MinxCPU.BA.W.L, MinxCPU.Y.W.L); return 16; @@ -88,10 +88,10 @@ int MinxCPU_ExecCF(void) case 0x11: // *ADD BA, HL MinxCPU.BA.W.L = ADD16(MinxCPU.BA.W.L, MinxCPU.HL.W.L); return 16; - case 0x12: // *ADD BA, X + case 0x12: // *ADD BA, IX MinxCPU.BA.W.L = ADD16(MinxCPU.BA.W.L, MinxCPU.X.W.L); return 16; - case 0x13: // *ADD BA, Y + case 0x13: // *ADD BA, IY MinxCPU.BA.W.L = ADD16(MinxCPU.BA.W.L, MinxCPU.Y.W.L); return 16; @@ -101,23 +101,23 @@ int MinxCPU_ExecCF(void) case 0x15: // *ADC BA, HL MinxCPU.BA.W.L = ADC16(MinxCPU.BA.W.L, MinxCPU.HL.W.L); return 16; - case 0x16: // *ADC BA, X + case 0x16: // *ADC BA, IX MinxCPU.BA.W.L = ADC16(MinxCPU.BA.W.L, MinxCPU.X.W.L); return 16; - case 0x17: // *ADC BA, Y + case 0x17: // *ADC BA, IY MinxCPU.BA.W.L = ADC16(MinxCPU.BA.W.L, MinxCPU.Y.W.L); return 16; - case 0x18: // CMP BA, BA + case 0x18: // CP BA, BA SUB16(MinxCPU.BA.W.L, MinxCPU.BA.W.L); return 16; - case 0x19: // CMP BA, HL + case 0x19: // CP BA, HL SUB16(MinxCPU.BA.W.L, MinxCPU.HL.W.L); return 16; - case 0x1A: // CMP BA, X + case 0x1A: // CP BA, IX SUB16(MinxCPU.BA.W.L, MinxCPU.X.W.L); return 16; - case 0x1B: // CMP BA, Y + case 0x1B: // CP BA, IY SUB16(MinxCPU.BA.W.L, MinxCPU.Y.W.L); return 16; @@ -127,10 +127,10 @@ int MinxCPU_ExecCF(void) case 0x1D: // *SBC BA, HL MinxCPU.BA.W.L = SBC16(MinxCPU.BA.W.L, MinxCPU.HL.W.L); return 16; - case 0x1E: // *SBC BA, X + case 0x1E: // *SBC BA, IX MinxCPU.BA.W.L = SBC16(MinxCPU.BA.W.L, MinxCPU.X.W.L); return 16; - case 0x1F: // *SBC BA, Y + case 0x1F: // *SBC BA, IY MinxCPU.BA.W.L = SBC16(MinxCPU.BA.W.L, MinxCPU.Y.W.L); return 16; @@ -140,10 +140,10 @@ int MinxCPU_ExecCF(void) case 0x21: // ADD HL, HL MinxCPU.HL.W.L = ADD16(MinxCPU.HL.W.L, MinxCPU.HL.W.L); return 16; - case 0x22: // ADD HL, X + case 0x22: // ADD HL, IX MinxCPU.HL.W.L = ADD16(MinxCPU.HL.W.L, MinxCPU.X.W.L); return 16; - case 0x23: // ADD HL, Y + case 0x23: // ADD HL, IY MinxCPU.HL.W.L = ADD16(MinxCPU.HL.W.L, MinxCPU.Y.W.L); return 16; @@ -153,10 +153,10 @@ int MinxCPU_ExecCF(void) case 0x25: // ADC HL, HL MinxCPU.HL.W.L = ADC16(MinxCPU.HL.W.L, MinxCPU.HL.W.L); return 16; - case 0x26: // ADC HL, X + case 0x26: // ADC HL, IX MinxCPU.HL.W.L = ADC16(MinxCPU.HL.W.L, MinxCPU.X.W.L); return 16; - case 0x27: // ADC HL, Y + case 0x27: // ADC HL, IY MinxCPU.HL.W.L = ADC16(MinxCPU.HL.W.L, MinxCPU.Y.W.L); return 16; @@ -166,10 +166,10 @@ int MinxCPU_ExecCF(void) case 0x29: // SUB HL, HL MinxCPU.HL.W.L = SUB16(MinxCPU.HL.W.L, MinxCPU.HL.W.L); return 16; - case 0x2A: // SUB HL, X + case 0x2A: // SUB HL, IX MinxCPU.HL.W.L = SUB16(MinxCPU.HL.W.L, MinxCPU.X.W.L); return 16; - case 0x2B: // SUB HL, Y + case 0x2B: // SUB HL, IY MinxCPU.HL.W.L = SUB16(MinxCPU.HL.W.L, MinxCPU.Y.W.L); return 16; @@ -179,10 +179,10 @@ int MinxCPU_ExecCF(void) case 0x2D: // SBC HL, HL MinxCPU.HL.W.L = SBC16(MinxCPU.HL.W.L, MinxCPU.HL.W.L); return 16; - case 0x2E: // SBC HL, X + case 0x2E: // SBC HL, IX MinxCPU.HL.W.L = SBC16(MinxCPU.HL.W.L, MinxCPU.X.W.L); return 16; - case 0x2F: // SBC HL, Y + case 0x2F: // SBC HL, IY MinxCPU.HL.W.L = SBC16(MinxCPU.HL.W.L, MinxCPU.Y.W.L); return 16; @@ -192,10 +192,10 @@ int MinxCPU_ExecCF(void) case 0x31: // *ADD BA, HL MinxCPU.HL.W.L = ADD16(MinxCPU.HL.W.L, MinxCPU.HL.W.L); return 16; - case 0x32: // *ADD BA, X + case 0x32: // *ADD BA, IX MinxCPU.HL.W.L = ADD16(MinxCPU.HL.W.L, MinxCPU.X.W.L); return 16; - case 0x33: // *ADD BA, Y + case 0x33: // *ADD BA, IY MinxCPU.HL.W.L = ADD16(MinxCPU.HL.W.L, MinxCPU.Y.W.L); return 16; @@ -205,23 +205,23 @@ int MinxCPU_ExecCF(void) case 0x35: // *ADC HL, HL MinxCPU.HL.W.L = ADC16(MinxCPU.HL.W.L, MinxCPU.HL.W.L); return 16; - case 0x36: // *ADC HL, X + case 0x36: // *ADC HL, IX MinxCPU.HL.W.L = ADC16(MinxCPU.HL.W.L, MinxCPU.X.W.L); return 16; - case 0x37: // *ADC HL, Y + case 0x37: // *ADC HL, IY MinxCPU.HL.W.L = ADC16(MinxCPU.HL.W.L, MinxCPU.Y.W.L); return 16; - case 0x38: // CMP HL, BA + case 0x38: // CP HL, BA SUB16(MinxCPU.HL.W.L, MinxCPU.BA.W.L); return 16; - case 0x39: // CMP HL, HL + case 0x39: // CP HL, HL SUB16(MinxCPU.HL.W.L, MinxCPU.HL.W.L); return 16; - case 0x3A: // CMP HL, X + case 0x3A: // CP HL, IX SUB16(MinxCPU.HL.W.L, MinxCPU.X.W.L); return 16; - case 0x3B: // CMP HL, Y + case 0x3B: // CP HL, IY SUB16(MinxCPU.HL.W.L, MinxCPU.Y.W.L); return 16; @@ -231,23 +231,23 @@ int MinxCPU_ExecCF(void) case 0x3D: // *SBC BA, HL MinxCPU.BA.W.L = SBC16(MinxCPU.BA.W.L, MinxCPU.HL.W.L); return 16; - case 0x3E: // *SBC BA, X + case 0x3E: // *SBC BA, IX MinxCPU.BA.W.L = SBC16(MinxCPU.BA.W.L, MinxCPU.X.W.L); return 16; - case 0x3F: // *SBC BA, Y + case 0x3F: // *SBC BA, IY MinxCPU.BA.W.L = SBC16(MinxCPU.BA.W.L, MinxCPU.Y.W.L); return 16; - case 0x40: // ADD X, BA + case 0x40: // ADD IX, BA MinxCPU.X.W.L = ADD16(MinxCPU.X.W.L, MinxCPU.BA.W.L); return 16; - case 0x41: // ADD X, HL + case 0x41: // ADD IX, HL MinxCPU.X.W.L = ADD16(MinxCPU.X.W.L, MinxCPU.HL.W.L); return 16; - case 0x42: // ADD Y, BA + case 0x42: // ADD IY, BA MinxCPU.Y.W.L = ADD16(MinxCPU.Y.W.L, MinxCPU.BA.W.L); return 16; - case 0x43: // ADD Y, HL + case 0x43: // ADD IY, HL MinxCPU.Y.W.L = ADD16(MinxCPU.Y.W.L, MinxCPU.HL.W.L); return 16; case 0x44: // ADD SP, BA @@ -263,16 +263,16 @@ int MinxCPU_ExecCF(void) MinxCPU_OnException(EXCEPTION_CRASH_INSTRUCTION, 0x47CF); return 16; - case 0x48: // SUB X, BA + case 0x48: // SUB IX, BA MinxCPU.X.W.L = SUB16(MinxCPU.X.W.L, MinxCPU.BA.W.L); return 16; - case 0x49: // SUB X, HL + case 0x49: // SUB IX, HL MinxCPU.X.W.L = SUB16(MinxCPU.X.W.L, MinxCPU.HL.W.L); return 16; - case 0x4A: // SUB Y, BA + case 0x4A: // SUB IY, BA MinxCPU.Y.W.L = SUB16(MinxCPU.Y.W.L, MinxCPU.BA.W.L); return 16; - case 0x4B: // SUB Y, HL + case 0x4B: // SUB IY, HL MinxCPU.Y.W.L = SUB16(MinxCPU.Y.W.L, MinxCPU.HL.W.L); return 16; case 0x4C: // SUB SP, BA @@ -288,16 +288,16 @@ int MinxCPU_ExecCF(void) MinxCPU_OnException(EXCEPTION_CRASH_INSTRUCTION, 0x4FCF); return 16; - case 0x50: // *ADD X, BA + case 0x50: // *ADD IX, BA MinxCPU.X.W.L = ADD16(MinxCPU.X.W.L, MinxCPU.BA.W.L); return 16; - case 0x51: // *ADD X, HL + case 0x51: // *ADD IX, HL MinxCPU.X.W.L = ADD16(MinxCPU.X.W.L, MinxCPU.HL.W.L); return 16; - case 0x52: // *ADD Y, BA + case 0x52: // *ADD IY, BA MinxCPU.Y.W.L = ADD16(MinxCPU.Y.W.L, MinxCPU.BA.W.L); return 16; - case 0x53: // *ADD Y, HL + case 0x53: // *ADD IY, HL MinxCPU.Y.W.L = ADD16(MinxCPU.Y.W.L, MinxCPU.HL.W.L); return 16; case 0x54: // *ADD SP, BA @@ -313,22 +313,22 @@ int MinxCPU_ExecCF(void) MinxCPU_OnException(EXCEPTION_CRASH_INSTRUCTION, 0x57CF); return 16; - case 0x58: // *SUB X, BA + case 0x58: // *SUB IX, BA MinxCPU.X.W.L = SUB16(MinxCPU.X.W.L, MinxCPU.BA.W.L); return 16; - case 0x59: // *SUB X, HL + case 0x59: // *SUB IX, HL MinxCPU.X.W.L = SUB16(MinxCPU.X.W.L, MinxCPU.HL.W.L); return 16; - case 0x5A: // *SUB Y, BA + case 0x5A: // *SUB IY, BA MinxCPU.Y.W.L = SUB16(MinxCPU.Y.W.L, MinxCPU.BA.W.L); return 16; - case 0x5B: // *SUB Y, HL + case 0x5B: // *SUB IY, HL MinxCPU.Y.W.L = SUB16(MinxCPU.Y.W.L, MinxCPU.HL.W.L); return 16; - case 0x5C: // CMP SP, BA + case 0x5C: // CP SP, BA SUB16(MinxCPU.SP.W.L, MinxCPU.BA.W.L); return 16; - case 0x5D: // CMP SP, HL + case 0x5D: // CP SP, HL SUB16(MinxCPU.SP.W.L, MinxCPU.HL.W.L); return 16; case 0x5E: // CRASH @@ -384,7 +384,7 @@ int MinxCPU_ExecCF(void) MinxCPU_OnException(EXCEPTION_UNSTABLE_INSTRUCTION, 0x6BCF); return 16; - case 0x6C: // CMP SP, #nnnn + case 0x6C: // CP SP, #nnnn I16 = Fetch16(); SUB16(MinxCPU.SP.W.L, I16); return 16; @@ -392,7 +392,7 @@ int MinxCPU_ExecCF(void) MinxCPU_OnException(EXCEPTION_UNSTABLE_INSTRUCTION, 0x6DCF); return 16; - case 0x6E: // MOV SP, #nnnn + case 0x6E: // LD SP, #nnnn I16 = Fetch16(); MinxCPU.SP.W.L = I16; return 16; @@ -400,57 +400,57 @@ int MinxCPU_ExecCF(void) MinxCPU_OnException(EXCEPTION_UNSTABLE_INSTRUCTION, 0x6FCF); return 16; - case 0x70: // MOV BA, [SP+#ss] + case 0x70: // LD BA, [SP+#ss] I8A = Fetch8(); I16 = MinxCPU.SP.W.L + S8_TO_16(I8A); MinxCPU.BA.B.L = MinxCPU_OnRead(1, I16++); MinxCPU.BA.B.H = MinxCPU_OnRead(1, I16); return 24; - case 0x71: // MOV HL, [SP+#ss] + case 0x71: // LD HL, [SP+#ss] I8A = Fetch8(); I16 = MinxCPU.SP.W.L + S8_TO_16(I8A); MinxCPU.HL.B.L = MinxCPU_OnRead(1, I16++); MinxCPU.HL.B.H = MinxCPU_OnRead(1, I16); return 24; - case 0x72: // MOV X, [SP+#ss] + case 0x72: // LD IX, [SP+#ss] I8A = Fetch8(); I16 = MinxCPU.SP.W.L + S8_TO_16(I8A); MinxCPU.X.B.L = MinxCPU_OnRead(1, I16++); MinxCPU.X.B.H = MinxCPU_OnRead(1, I16); return 24; - case 0x73: // MOV Y, [SP+#ss] + case 0x73: // LD IY, [SP+#ss] I8A = Fetch8(); I16 = MinxCPU.SP.W.L + S8_TO_16(I8A); MinxCPU.Y.B.L = MinxCPU_OnRead(1, I16++); MinxCPU.Y.B.H = MinxCPU_OnRead(1, I16); return 24; - case 0x74: // MOV [SP+#ss], BA + case 0x74: // LD [SP+#ss], BA I8A = Fetch8(); I16 = MinxCPU.SP.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, I16++, MinxCPU.BA.B.L); MinxCPU_OnWrite(1, I16, MinxCPU.BA.B.H); return 24; - case 0x75: // MOV [SP+#ss], HL + case 0x75: // LD [SP+#ss], HL I8A = Fetch8(); I16 = MinxCPU.SP.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, I16++, MinxCPU.HL.B.L); MinxCPU_OnWrite(1, I16, MinxCPU.HL.B.H); return 24; - case 0x76: // MOV [SP+#ss], X + case 0x76: // LD [SP+#ss], IX I8A = Fetch8(); I16 = MinxCPU.SP.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, I16++, MinxCPU.X.B.L); MinxCPU_OnWrite(1, I16, MinxCPU.X.B.H); return 24; - case 0x77: // MOV [SP+#ss], Y + case 0x77: // LD [SP+#ss], IY I8A = Fetch8(); I16 = MinxCPU.SP.W.L + S8_TO_16(I8A); MinxCPU_OnWrite(1, I16++, MinxCPU.Y.B.L); MinxCPU_OnWrite(1, I16, MinxCPU.Y.B.H); return 24; - case 0x78: // MOV SP, [#nnnn] + case 0x78: // LD SP, [#nnnn] I16 = Fetch16(); MinxCPU.SP.B.L = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16++); MinxCPU.SP.B.H = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); @@ -461,7 +461,7 @@ int MinxCPU_ExecCF(void) case 0x7B: // ??? #nn return MinxCPU_ExecSPCF(); - case 0x7C: // MOV [#nnnn], SP + case 0x7C: // LD [#nnnn], SP I16 = Fetch16(); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16++, MinxCPU.SP.B.L); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.SP.B.H); @@ -507,7 +507,7 @@ int MinxCPU_ExecCF(void) case 0xB7: // POP H MinxCPU.HL.B.H = POP(); return 12; - case 0xB8: // PUSHA + case 0xB8: // PUSH ALL PUSH(MinxCPU.BA.B.H); PUSH(MinxCPU.BA.B.L); PUSH(MinxCPU.HL.B.H); @@ -518,7 +518,7 @@ int MinxCPU_ExecCF(void) PUSH(MinxCPU.Y.B.L); PUSH(MinxCPU.N.B.H); return 48; - case 0xB9: // PUSHAX + case 0xB9: // PUSH ALE PUSH(MinxCPU.BA.B.H); PUSH(MinxCPU.BA.B.L); PUSH(MinxCPU.HL.B.H); @@ -536,7 +536,7 @@ int MinxCPU_ExecCF(void) case 0xBA: case 0xBB: // ??? #n return MinxCPU_ExecSPCF(); - case 0xBC: // POPA + case 0xBC: // POP ALL MinxCPU.N.B.H = POP(); MinxCPU.Y.B.L = POP(); MinxCPU.Y.B.H = POP(); @@ -548,7 +548,7 @@ int MinxCPU_ExecCF(void) MinxCPU.BA.B.H = POP(); return 44; - case 0xBD: // POPAX + case 0xBD: // POP ALE MinxCPU.Y.B.I = POP(); MinxCPU.X.B.I = POP(); MinxCPU.HL.B.I = POP(); @@ -567,230 +567,230 @@ int MinxCPU_ExecCF(void) case 0xBE: case 0xBF: // ??? #n return MinxCPU_ExecSPCF(); - case 0xC0: // MOV BA, [HL] + case 0xC0: // LD BA, [HL] I16 = MinxCPU.HL.W.L; MinxCPU.BA.B.L = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16++); MinxCPU.BA.B.H = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); return 20; - case 0xC1: // MOV HL, [HL] + case 0xC1: // LD HL, [HL] I16 = MinxCPU.HL.W.L; MinxCPU.HL.B.L = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16++); MinxCPU.HL.B.H = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); return 20; - case 0xC2: // MOV X, [HL] + case 0xC2: // LD IX, [HL] I16 = MinxCPU.HL.W.L; MinxCPU.X.B.L = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16++); MinxCPU.X.B.H = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); return 20; - case 0xC3: // MOV Y, [HL] + case 0xC3: // LD IY, [HL] I16 = MinxCPU.HL.W.L; MinxCPU.Y.B.L = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16++); MinxCPU.Y.B.H = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); return 20; - case 0xC4: // MOV [HL], BA + case 0xC4: // LD [HL], BA I16 = MinxCPU.HL.W.L; MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16++, MinxCPU.BA.B.L); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.BA.B.H); return 20; - case 0xC5: // MOV [HL], HL + case 0xC5: // LD [HL], HL I16 = MinxCPU.HL.W.L; MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16++, MinxCPU.HL.B.L); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.HL.B.H); return 20; - case 0xC6: // MOV [HL], X + case 0xC6: // LD [HL], IX I16 = MinxCPU.HL.W.L; MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16++, MinxCPU.X.B.L); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.X.B.H); return 20; - case 0xC7: // MOV [HL], Y + case 0xC7: // LD [HL], IY I16 = MinxCPU.HL.W.L; MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16++, MinxCPU.Y.B.L); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.Y.B.H); return 20; - case 0xC8: case 0xC9: case 0xCA: case 0xCB: // MOV B, V + case 0xC8: case 0xC9: case 0xCA: case 0xCB: // LD B, V case 0xCC: case 0xCD: case 0xCE: case 0xCF: MinxCPU.BA.B.H = MinxCPU.PC.B.I; return 12; - case 0xD0: // MOV BA, [X] + case 0xD0: // LD BA, [IX] I16 = MinxCPU.X.W.L; MinxCPU.BA.B.L = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16++); MinxCPU.BA.B.H = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 20; - case 0xD1: // MOV HL, [X] + case 0xD1: // LD HL, [IX] I16 = MinxCPU.X.W.L; MinxCPU.HL.B.L = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16++); MinxCPU.HL.B.H = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 20; - case 0xD2: // MOV X, [X] + case 0xD2: // LD IX, [IX] I16 = MinxCPU.X.W.L; MinxCPU.X.B.L = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16++); MinxCPU.X.B.H = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 20; - case 0xD3: // MOV Y, [X] + case 0xD3: // LD IY, [IX] I16 = MinxCPU.X.W.L; MinxCPU.Y.B.L = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16++); MinxCPU.Y.B.H = MinxCPU_OnRead(1, (MinxCPU.X.B.I << 16) | I16); return 20; - case 0xD4: // MOV [X], BA + case 0xD4: // LD [IX], BA I16 = MinxCPU.X.W.L; MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16++, MinxCPU.BA.B.L); MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16, MinxCPU.BA.B.H); return 20; - case 0xD5: // MOV [X], HL + case 0xD5: // LD [IX], HL I16 = MinxCPU.X.W.L; MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16++, MinxCPU.HL.B.L); MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16, MinxCPU.HL.B.H); return 20; - case 0xD6: // MOV [X], X + case 0xD6: // LD [IX], IX I16 = MinxCPU.X.W.L; MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16++, MinxCPU.X.B.L); MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16, MinxCPU.X.B.H); return 20; - case 0xD7: // MOV [X], Y + case 0xD7: // LD [IX], IY I16 = MinxCPU.X.W.L; MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16++, MinxCPU.Y.B.L); MinxCPU_OnWrite(1, (MinxCPU.X.B.I << 16) | I16, MinxCPU.Y.B.H); return 20; - case 0xD8: // MOV BA, [Y] + case 0xD8: // LD BA, [IY] I16 = MinxCPU.Y.W.L; MinxCPU.BA.B.L = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16++); MinxCPU.BA.B.H = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 20; - case 0xD9: // MOV HL, [Y] + case 0xD9: // LD HL, [IY] I16 = MinxCPU.Y.W.L; MinxCPU.HL.B.L = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16++); MinxCPU.HL.B.H = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 20; - case 0xDA: // MOV X, [Y] + case 0xDA: // LD IX, [IY] I16 = MinxCPU.Y.W.L; MinxCPU.X.B.L = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16++); MinxCPU.X.B.H = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 20; - case 0xDB: // MOV Y, [Y] + case 0xDB: // LD IY, [IY] I16 = MinxCPU.Y.W.L; MinxCPU.Y.B.L = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16++); MinxCPU.Y.B.H = MinxCPU_OnRead(1, (MinxCPU.Y.B.I << 16) | I16); return 20; - case 0xDC: // MOV [Y], BA + case 0xDC: // LD [IY], BA I16 = MinxCPU.Y.W.L; MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16++, MinxCPU.BA.B.L); MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16, MinxCPU.BA.B.H); return 20; - case 0xDD: // MOV [Y], HL + case 0xDD: // LD [IY], HL I16 = MinxCPU.Y.W.L; MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16++, MinxCPU.HL.B.L); MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16, MinxCPU.HL.B.H); return 20; - case 0xDE: // MOV [Y], X + case 0xDE: // LD [IY], IX I16 = MinxCPU.Y.W.L; MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16++, MinxCPU.X.B.L); MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16, MinxCPU.X.B.H); return 20; - case 0xDF: // MOV [Y], Y + case 0xDF: // LD [IY], IY I16 = MinxCPU.Y.W.L; MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16++, MinxCPU.Y.B.L); MinxCPU_OnWrite(1, (MinxCPU.Y.B.I << 16) | I16, MinxCPU.Y.B.H); return 20; - case 0xE0: // MOV BA, BA + case 0xE0: // LD BA, BA return 8; - case 0xE1: // MOV BA, HL + case 0xE1: // LD BA, HL MinxCPU.BA.W.L = MinxCPU.HL.W.L; return 8; - case 0xE2: // MOV BA, X + case 0xE2: // LD BA, IX MinxCPU.BA.W.L = MinxCPU.X.W.L; return 8; - case 0xE3: // MOV BA, Y + case 0xE3: // LD BA, IY MinxCPU.BA.W.L = MinxCPU.Y.W.L; return 8; - case 0xE4: // MOV HL, BA + case 0xE4: // LD HL, BA MinxCPU.HL.W.L = MinxCPU.BA.W.L; return 8; - case 0xE5: // MOV HL, HL + case 0xE5: // LD HL, HL return 8; - case 0xE6: // MOV HL, X + case 0xE6: // LD HL, IX MinxCPU.HL.W.L = MinxCPU.X.W.L; return 8; - case 0xE7: // MOV HL, Y + case 0xE7: // LD HL, IY MinxCPU.HL.W.L = MinxCPU.Y.W.L; return 8; - case 0xE8: // MOV X, BA + case 0xE8: // LD IX, BA MinxCPU.X.W.L = MinxCPU.BA.W.L; return 8; - case 0xE9: // MOV X, HL + case 0xE9: // LD IX, HL MinxCPU.X.W.L = MinxCPU.HL.W.L; return 8; - case 0xEA: // MOV X, X + case 0xEA: // LD IX, IX return 8; - case 0xEB: // MOV X, Y + case 0xEB: // LD IX, IY MinxCPU.X.W.L = MinxCPU.Y.W.L; return 8; - case 0xEC: // MOV Y, BA + case 0xEC: // LD IY, BA MinxCPU.Y.W.L = MinxCPU.BA.W.L; return 8; - case 0xED: // MOV Y, HL + case 0xED: // LD IY, HL MinxCPU.Y.W.L = MinxCPU.HL.W.L; return 8; - case 0xEE: // MOV Y, X + case 0xEE: // LD IY, IX MinxCPU.Y.W.L = MinxCPU.X.W.L; return 8; - case 0xEF: // MOV Y, Y + case 0xEF: // LD IY, IY return 8; - case 0xF0: // MOV SP, BA + case 0xF0: // LD SP, BA MinxCPU.SP.W.L = MinxCPU.BA.W.L; return 8; - case 0xF1: // MOV SP, HL + case 0xF1: // LD SP, HL MinxCPU.SP.W.L = MinxCPU.HL.W.L; return 8; - case 0xF2: // MOV SP, X + case 0xF2: // LD SP, IX MinxCPU.SP.W.L = MinxCPU.X.W.L; return 8; - case 0xF3: // MOV SP, Y + case 0xF3: // LD SP, IY MinxCPU.SP.W.L = MinxCPU.Y.W.L; return 8; - case 0xF4: // MOV HL, SP + case 0xF4: // LD HL, SP MinxCPU.HL.W.L = MinxCPU.SP.W.L; return 8; - case 0xF5: // MOV HL, PC + case 0xF5: // LD HL, PC MinxCPU.HL.W.L = MinxCPU.PC.W.L; return 8; - case 0xF6: // ??? X + case 0xF6: // ??? IX MinxCPU.X.B.H = MinxCPU.PC.B.I; return 12; - case 0xF7: // ??? Y + case 0xF7: // ??? IY MinxCPU.Y.B.H = MinxCPU.PC.B.I; return 12; - case 0xF8: // MOV BA, SP + case 0xF8: // LD BA, SP MinxCPU.BA.W.L = MinxCPU.SP.W.L; return 8; - case 0xF9: // MOV BA, PC + case 0xF9: // LD BA, PC MinxCPU.BA.W.L = MinxCPU.PC.W.L; return 8; - case 0xFA: // MOV X, SP + case 0xFA: // LD IX, SP MinxCPU.X.W.L = MinxCPU.SP.W.L; return 8; case 0xFB: // NOTHING case 0xFC: // NOTHING return 12; - case 0xFD: // MOV A, E + case 0xFD: // LD A, E MinxCPU.BA.B.L = MinxCPU.E; return 12; - case 0xFE: // MOV Y, SP + case 0xFE: // LD IY, SP MinxCPU.Y.W.L = MinxCPU.SP.W.L; return 8; diff --git a/source/MinxCPU_XX.c b/source/MinxCPU_XX.c index 1b23685..fa5af4f 100644 --- a/source/MinxCPU_XX.c +++ b/source/MinxCPU_XX.c @@ -63,7 +63,7 @@ int MinxCPU_Exec(void) case 0x03: // ADD A, [HL] MinxCPU.BA.B.L = ADD8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.HL.D)); return 8; - case 0x04: // ADD A, [N+#nn] + case 0x04: // ADD A, [BR:#nn] I8A = Fetch8(); MinxCPU.BA.B.L = ADD8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.N.D + I8A)); return 12; @@ -71,10 +71,10 @@ int MinxCPU_Exec(void) I16 = Fetch16(); MinxCPU.BA.B.L = ADD8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16)); return 16; - case 0x06: // ADD A, [X] + case 0x06: // ADD A, [IX] MinxCPU.BA.B.L = ADD8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.X.D)); return 8; - case 0x07: // ADD A, [Y] + case 0x07: // ADD A, [IY] MinxCPU.BA.B.L = ADD8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.Y.D)); return 8; @@ -91,7 +91,7 @@ int MinxCPU_Exec(void) case 0x0B: // ADC A, [HL] MinxCPU.BA.B.L = ADC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.HL.D)); return 8; - case 0x0C: // ADC A, [N+#nn] + case 0x0C: // ADC A, [BR:#nn] I8A = Fetch8(); MinxCPU.BA.B.L = ADC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.N.D + I8A)); return 12; @@ -99,10 +99,10 @@ int MinxCPU_Exec(void) I16 = Fetch16(); MinxCPU.BA.B.L = ADC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16)); return 16; - case 0x0E: // ADC A, [X] + case 0x0E: // ADC A, [IX] MinxCPU.BA.B.L = ADC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.X.D)); return 8; - case 0x0F: // ADC A, [Y] + case 0x0F: // ADC A, [IY] MinxCPU.BA.B.L = ADC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.Y.D)); return 8; @@ -119,7 +119,7 @@ int MinxCPU_Exec(void) case 0x13: // SUB A, [HL] MinxCPU.BA.B.L = SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.HL.D)); return 8; - case 0x14: // SUB A, [N+#nn] + case 0x14: // SUB A, [BR:#nn] I8A = Fetch8(); MinxCPU.BA.B.L = SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.N.D + I8A)); return 12; @@ -127,10 +127,10 @@ int MinxCPU_Exec(void) I16 = Fetch16(); MinxCPU.BA.B.L = SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16)); return 16; - case 0x16: // SUB A, [X] + case 0x16: // SUB A, [IX] MinxCPU.BA.B.L = SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.X.D)); return 8; - case 0x17: // SUB A, [Y] + case 0x17: // SUB A, [IY] MinxCPU.BA.B.L = SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.Y.D)); return 8; @@ -147,7 +147,7 @@ int MinxCPU_Exec(void) case 0x1B: // SBC A, [HL] MinxCPU.BA.B.L = SBC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.HL.D)); return 8; - case 0x1C: // SBC A, [N+#nn] + case 0x1C: // SBC A, [BR:#nn] I8A = Fetch8(); MinxCPU.BA.B.L = SBC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.N.D + I8A)); return 12; @@ -155,10 +155,10 @@ int MinxCPU_Exec(void) I16 = Fetch16(); MinxCPU.BA.B.L = SBC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16)); return 16; - case 0x1E: // SBC A, [X] + case 0x1E: // SBC A, [IX] MinxCPU.BA.B.L = SBC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.X.D)); return 8; - case 0x1F: // SBC A, [Y] + case 0x1F: // SBC A, [IY] MinxCPU.BA.B.L = SBC8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.Y.D)); return 8; @@ -175,7 +175,7 @@ int MinxCPU_Exec(void) case 0x23: // AND A, [HL] MinxCPU.BA.B.L = AND8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.HL.D)); return 8; - case 0x24: // AND A, [N+#nn] + case 0x24: // AND A, [BR:#nn] I8A = Fetch8(); MinxCPU.BA.B.L = AND8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.N.D + I8A)); return 12; @@ -183,10 +183,10 @@ int MinxCPU_Exec(void) I16 = Fetch16(); MinxCPU.BA.B.L = AND8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16)); return 16; - case 0x26: // AND A, [X] + case 0x26: // AND A, [IX] MinxCPU.BA.B.L = AND8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.X.D)); return 8; - case 0x27: // AND A, [Y] + case 0x27: // AND A, [IY] MinxCPU.BA.B.L = AND8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.Y.D)); return 8; @@ -203,7 +203,7 @@ int MinxCPU_Exec(void) case 0x2B: // OR A, [HL] MinxCPU.BA.B.L = OR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.HL.D)); return 8; - case 0x2C: // OR A, [N+#nn] + case 0x2C: // OR A, [BR:#nn] I8A = Fetch8(); MinxCPU.BA.B.L = OR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.N.D + I8A)); return 12; @@ -211,38 +211,38 @@ int MinxCPU_Exec(void) I16 = Fetch16(); MinxCPU.BA.B.L = OR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16)); return 16; - case 0x2E: // OR A, [X] + case 0x2E: // OR A, [IX] MinxCPU.BA.B.L = OR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.X.D)); return 8; - case 0x2F: // OR A, [Y] + case 0x2F: // OR A, [IY] MinxCPU.BA.B.L = OR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.Y.D)); return 8; - case 0x30: // CMP A, A + case 0x30: // CP A, A SUB8(MinxCPU.BA.B.L, MinxCPU.BA.B.L); return 8; - case 0x31: // CMP A, B + case 0x31: // CP A, B SUB8(MinxCPU.BA.B.L, MinxCPU.BA.B.H); return 8; - case 0x32: // CMP A, #nn + case 0x32: // CP A, #nn I8A = Fetch8(); SUB8(MinxCPU.BA.B.L, I8A); return 8; - case 0x33: // CMP A, [HL] + case 0x33: // CP A, [HL] SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.HL.D)); return 8; - case 0x34: // CMP A, [N+#nn] + case 0x34: // CP A, [BR:#nn] I8A = Fetch8(); SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.N.D + I8A)); return 12; - case 0x35: // CMP A, [#nnnn] + case 0x35: // CP A, [#nnnn] I16 = Fetch16(); SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16)); return 16; - case 0x36: // CMP A, [X] + case 0x36: // CP A, [IX] SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.X.D)); return 8; - case 0x37: // CMP A, [Y] + case 0x37: // CP A, [IY] SUB8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.Y.D)); return 8; @@ -259,7 +259,7 @@ int MinxCPU_Exec(void) case 0x3B: // XOR A, [HL] MinxCPU.BA.B.L = XOR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.HL.D)); return 8; - case 0x3C: // XOR A, [N+#nn] + case 0x3C: // XOR A, [BR:#nn] I8A = Fetch8(); MinxCPU.BA.B.L = XOR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.N.D + I8A)); return 12; @@ -267,219 +267,219 @@ int MinxCPU_Exec(void) I16 = Fetch16(); MinxCPU.BA.B.L = XOR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16)); return 16; - case 0x3E: // XOR A, [X] + case 0x3E: // XOR A, [IX] MinxCPU.BA.B.L = XOR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.X.D)); return 8; - case 0x3F: // XOR A, [Y] + case 0x3F: // XOR A, [IY] MinxCPU.BA.B.L = XOR8(MinxCPU.BA.B.L, MinxCPU_OnRead(1, MinxCPU.Y.D)); return 8; - case 0x40: // MOV A, A + case 0x40: // LD A, A return 4; - case 0x41: // MOV A, B + case 0x41: // LD A, B MinxCPU.BA.B.L = MinxCPU.BA.B.H; return 4; - case 0x42: // MOV A, L + case 0x42: // LD A, L MinxCPU.BA.B.L = MinxCPU.HL.B.L; return 4; - case 0x43: // MOV A, H + case 0x43: // LD A, H MinxCPU.BA.B.L = MinxCPU.HL.B.H; return 4; - case 0x44: // MOV A, [N+#nn] + case 0x44: // LD A, [BR:#nn] I8A = Fetch8(); MinxCPU.BA.B.L = MinxCPU_OnRead(1, MinxCPU.N.D + I8A); return 12; - case 0x45: // MOV A, [HL] + case 0x45: // LD A, [HL] MinxCPU.BA.B.L = MinxCPU_OnRead(1, MinxCPU.HL.D); return 8; - case 0x46: // MOV A, [X] + case 0x46: // LD A, [IX] MinxCPU.BA.B.L = MinxCPU_OnRead(1, MinxCPU.X.D); return 8; - case 0x47: // MOV A, [Y] + case 0x47: // LD A, [IY] MinxCPU.BA.B.L = MinxCPU_OnRead(1, MinxCPU.Y.D); return 8; - case 0x48: // MOV B, A + case 0x48: // LD B, A MinxCPU.BA.B.H = MinxCPU.BA.B.L; return 4; - case 0x49: // MOV B, B + case 0x49: // LD B, B return 4; - case 0x4A: // MOV B, L + case 0x4A: // LD B, L MinxCPU.BA.B.H = MinxCPU.HL.B.L; return 4; - case 0x4B: // MOV B, H + case 0x4B: // LD B, H MinxCPU.BA.B.H = MinxCPU.HL.B.H; return 4; - case 0x4C: // MOV B, [N+#nn] + case 0x4C: // LD B, [BR:#nn] I8A = Fetch8(); MinxCPU.BA.B.H = MinxCPU_OnRead(1, MinxCPU.N.D + I8A); return 12; - case 0x4D: // MOV B, [HL] + case 0x4D: // LD B, [HL] MinxCPU.BA.B.H = MinxCPU_OnRead(1, MinxCPU.HL.D); return 8; - case 0x4E: // MOV B, [X] + case 0x4E: // LD B, [IX] MinxCPU.BA.B.H = MinxCPU_OnRead(1, MinxCPU.X.D); return 8; - case 0x4F: // MOV B, [Y] + case 0x4F: // LD B, [IY] MinxCPU.BA.B.H = MinxCPU_OnRead(1, MinxCPU.Y.D); return 8; - case 0x50: // MOV L, A + case 0x50: // LD L, A MinxCPU.HL.B.L = MinxCPU.BA.B.L; return 4; - case 0x51: // MOV L, B + case 0x51: // LD L, B MinxCPU.HL.B.L = MinxCPU.BA.B.H; return 4; - case 0x52: // MOV L, L + case 0x52: // LD L, L return 4; - case 0x53: // MOV L, H + case 0x53: // LD L, H MinxCPU.HL.B.L = MinxCPU.HL.B.H; return 4; - case 0x54: // MOV L, [N+#nn] + case 0x54: // LD L, [BR:#nn] I8A = Fetch8(); MinxCPU.HL.B.L = MinxCPU_OnRead(1, MinxCPU.N.D + I8A); return 12; - case 0x55: // MOV L, [HL] + case 0x55: // LD L, [HL] MinxCPU.HL.B.L = MinxCPU_OnRead(1, MinxCPU.HL.D); return 8; - case 0x56: // MOV L, [X] + case 0x56: // LD L, [IX] MinxCPU.HL.B.L = MinxCPU_OnRead(1, MinxCPU.X.D); return 8; - case 0x57: // MOV L, [Y] + case 0x57: // LD L, [IY] MinxCPU.HL.B.L = MinxCPU_OnRead(1, MinxCPU.Y.D); return 8; - case 0x58: // MOV H, A + case 0x58: // LD H, A MinxCPU.HL.B.H = MinxCPU.BA.B.L; return 4; - case 0x59: // MOV H, B + case 0x59: // LD H, B MinxCPU.HL.B.H = MinxCPU.BA.B.H; return 4; - case 0x5A: // MOV H, L + case 0x5A: // LD H, L MinxCPU.HL.B.H = MinxCPU.HL.B.L; return 4; - case 0x5B: // MOV H, H + case 0x5B: // LD H, H return 4; - case 0x5C: // MOV H, [N+#nn] + case 0x5C: // LD H, [BR:#nn] I8A = Fetch8(); MinxCPU.HL.B.H = MinxCPU_OnRead(1, MinxCPU.N.D + I8A); return 12; - case 0x5D: // MOV H, [HL] + case 0x5D: // LD H, [HL] MinxCPU.HL.B.H = MinxCPU_OnRead(1, MinxCPU.HL.D); return 8; - case 0x5E: // MOV H, [X] + case 0x5E: // LD H, [IX] MinxCPU.HL.B.H = MinxCPU_OnRead(1, MinxCPU.X.D); return 8; - case 0x5F: // MOV H, [Y] + case 0x5F: // LD H, [IY] MinxCPU.HL.B.H = MinxCPU_OnRead(1, MinxCPU.Y.D); return 8; - case 0x60: // MOV [X], A + case 0x60: // LD [IX], A MinxCPU_OnWrite(1, MinxCPU.X.D, MinxCPU.BA.B.L); return 8; - case 0x61: // MOV [X], B + case 0x61: // LD [IX], B MinxCPU_OnWrite(1, MinxCPU.X.D, MinxCPU.BA.B.H); return 8; - case 0x62: // MOV [X], L + case 0x62: // LD [IX], L MinxCPU_OnWrite(1, MinxCPU.X.D, MinxCPU.HL.B.L); return 8; - case 0x63: // MOV [X], H + case 0x63: // LD [IX], H MinxCPU_OnWrite(1, MinxCPU.X.D, MinxCPU.HL.B.H); return 8; - case 0x64: // MOV [X], [N+#nn] + case 0x64: // LD [IX], [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.X.D, MinxCPU_OnRead(1, MinxCPU.N.D + I8A)); return 16; - case 0x65: // MOV [X], [HL] + case 0x65: // LD [IX], [HL] MinxCPU_OnWrite(1, MinxCPU.X.D, MinxCPU_OnRead(1, MinxCPU.HL.D)); return 12; - case 0x66: // MOV [X], [X] + case 0x66: // LD [IX], [IX] MinxCPU_OnWrite(1, MinxCPU.X.D, MinxCPU_OnRead(1, MinxCPU.X.D)); return 12; - case 0x67: // MOV [X], [Y] + case 0x67: // LD [IX], [IY] MinxCPU_OnWrite(1, MinxCPU.X.D, MinxCPU_OnRead(1, MinxCPU.Y.D)); return 12; - case 0x68: // MOV [HL], A + case 0x68: // LD [HL], A MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU.BA.B.L); return 8; - case 0x69: // MOV [HL], B + case 0x69: // LD [HL], B MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU.BA.B.H); return 8; - case 0x6A: // MOV [HL], L + case 0x6A: // LD [HL], L MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU.HL.B.L); return 8; - case 0x6B: // MOV [HL], H + case 0x6B: // LD [HL], H MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU.HL.B.H); return 8; - case 0x6C: // MOV [HL], [N+#nn] + case 0x6C: // LD [HL], [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU_OnRead(1, MinxCPU.N.D + I8A)); return 16; - case 0x6D: // MOV [HL], [HL] + case 0x6D: // LD [HL], [HL] MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU_OnRead(1, MinxCPU.HL.D)); return 12; - case 0x6E: // MOV [HL], [X] + case 0x6E: // LD [HL], [IX] MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU_OnRead(1, MinxCPU.X.D)); return 12; - case 0x6F: // MOV [HL], [Y] + case 0x6F: // LD [HL], [IY] MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU_OnRead(1, MinxCPU.Y.D)); return 12; - case 0x70: // MOV [Y], A + case 0x70: // LD [IY], A MinxCPU_OnWrite(1, MinxCPU.Y.D, MinxCPU.BA.B.L); return 8; - case 0x71: // MOV [Y], B + case 0x71: // LD [IY], B MinxCPU_OnWrite(1, MinxCPU.Y.D, MinxCPU.BA.B.H); return 8; - case 0x72: // MOV [Y], L + case 0x72: // LD [IY], L MinxCPU_OnWrite(1, MinxCPU.Y.D, MinxCPU.HL.B.L); return 8; - case 0x73: // MOV [Y], H + case 0x73: // LD [IY], H MinxCPU_OnWrite(1, MinxCPU.Y.D, MinxCPU.HL.B.H); return 8; - case 0x74: // MOV [Y], [N+#nn] + case 0x74: // LD [IY], [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.Y.D, MinxCPU_OnRead(1, MinxCPU.N.D + I8A)); return 16; - case 0x75: // MOV [Y], [HL] + case 0x75: // LD [IY], [HL] MinxCPU_OnWrite(1, MinxCPU.Y.D, MinxCPU_OnRead(1, MinxCPU.HL.D)); return 12; - case 0x76: // MOV [Y], [X] + case 0x76: // LD [IY], [IX] MinxCPU_OnWrite(1, MinxCPU.Y.D, MinxCPU_OnRead(1, MinxCPU.X.D)); return 12; - case 0x77: // MOV [Y], [Y] + case 0x77: // LD [IY], [IY] MinxCPU_OnWrite(1, MinxCPU.Y.D, MinxCPU_OnRead(1, MinxCPU.Y.D)); return 12; - case 0x78: // MOV [N+#nn], A + case 0x78: // LD [BR:#nn], A I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, MinxCPU.BA.B.L); return 8; - case 0x79: // MOV [N+#nn], B + case 0x79: // LD [BR:#nn], B I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, MinxCPU.BA.B.H); return 8; - case 0x7A: // MOV [N+#nn], L + case 0x7A: // LD [BR:#nn], L I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, MinxCPU.HL.B.L); return 8; - case 0x7B: // MOV [N+#nn], H + case 0x7B: // LD [BR:#nn], H I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, MinxCPU.HL.B.H); return 8; case 0x7C: // NOTHING #nn I8A = Fetch8(); return 64; - case 0x7D: // MOV [N+#nn], [HL] + case 0x7D: // LD [BR:#nn], [HL] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, MinxCPU_OnRead(1, MinxCPU.HL.D)); return 16; - case 0x7E: // MOV [N+#nn], [X] + case 0x7E: // LD [BR:#nn], [IX] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, MinxCPU_OnRead(1, MinxCPU.X.D)); return 16; - case 0x7F: // MOV [N+#nn], [Y] + case 0x7F: // LD [BR:#nn], [IY] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, MinxCPU_OnRead(1, MinxCPU.Y.D)); return 16; @@ -496,10 +496,10 @@ int MinxCPU_Exec(void) case 0x83: // INC H MinxCPU.HL.B.H = INC8(MinxCPU.HL.B.H); return 8; - case 0x84: // INC N + case 0x84: // INC BR MinxCPU.N.B.H = INC8(MinxCPU.N.B.H); return 8; - case 0x85: // INC [N+#nn] + case 0x85: // INC [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, INC8(MinxCPU_OnRead(1, MinxCPU.N.D + I8A))); return 16; @@ -522,10 +522,10 @@ int MinxCPU_Exec(void) case 0x8B: // DEC H MinxCPU.HL.B.H = DEC8(MinxCPU.HL.B.H); return 8; - case 0x8C: // DEC N + case 0x8C: // DEC BR MinxCPU.N.B.H = DEC8(MinxCPU.N.B.H); return 8; - case 0x8D: // DEC [N+#nn] + case 0x8D: // DEC [BR:#nn] I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, DEC8(MinxCPU_OnRead(1, MinxCPU.N.D + I8A))); return 16; @@ -542,25 +542,25 @@ int MinxCPU_Exec(void) case 0x91: // INC HL MinxCPU.HL.W.L = INC16(MinxCPU.HL.W.L); return 8; - case 0x92: // INC X + case 0x92: // INC IX MinxCPU.X.W.L = INC16(MinxCPU.X.W.L); return 8; - case 0x93: // INC Y + case 0x93: // INC IY MinxCPU.Y.W.L = INC16(MinxCPU.Y.W.L); return 8; - case 0x94: // TST A, B + case 0x94: // BIT A, B AND8(MinxCPU.BA.B.L, MinxCPU.BA.B.H); return 8; - case 0x95: // TST [HL], #nn + case 0x95: // BIT [HL], #nn I8A = Fetch8(); AND8(MinxCPU_OnRead(1, MinxCPU.HL.D), I8A); return 12; - case 0x96: // TST A, #nn + case 0x96: // BIT A, #nn I8A = Fetch8(); AND8(MinxCPU.BA.B.L, I8A); return 8; - case 0x97: // TST B, #nn + case 0x97: // BIT B, #nn I8A = Fetch8(); AND8(MinxCPU.BA.B.H, I8A); return 8; @@ -571,29 +571,29 @@ int MinxCPU_Exec(void) case 0x99: // DEC HL MinxCPU.HL.W.L = DEC16(MinxCPU.HL.W.L); return 8; - case 0x9A: // DEC X + case 0x9A: // DEC IX MinxCPU.X.W.L = DEC16(MinxCPU.X.W.L); return 8; - case 0x9B: // DEC Y + case 0x9B: // DEC IY MinxCPU.Y.W.L = DEC16(MinxCPU.Y.W.L); return 8; - case 0x9C: // AND F, #nn + case 0x9C: // AND SC, #nn I8A = Fetch8(); MinxCPU.F = MinxCPU.F & I8A; MinxCPU_OnIRQHandle(MinxCPU.F, MinxCPU.Shift_U); return 12; - case 0x9D: // OR F, #nn + case 0x9D: // OR SC, #nn I8A = Fetch8(); MinxCPU.F = MinxCPU.F | I8A; MinxCPU_OnIRQHandle(MinxCPU.F, MinxCPU.Shift_U); return 12; - case 0x9E: // XOR F, #nn + case 0x9E: // XOR SC, #nn I8A = Fetch8(); MinxCPU.F = MinxCPU.F ^ I8A; MinxCPU_OnIRQHandle(MinxCPU.F, MinxCPU.Shift_U); return 12; - case 0x9F: // MOV F, #nn + case 0x9F: // LD SC, #nn I8A = Fetch8(); MinxCPU.F = I8A; MinxCPU_OnIRQHandle(MinxCPU.F, MinxCPU.Shift_U); @@ -607,25 +607,25 @@ int MinxCPU_Exec(void) PUSH(MinxCPU.HL.B.H); PUSH(MinxCPU.HL.B.L); return 16; - case 0xA2: // PUSH X + case 0xA2: // PUSH IX PUSH(MinxCPU.X.B.H); PUSH(MinxCPU.X.B.L); return 16; - case 0xA3: // PUSH Y + case 0xA3: // PUSH IY PUSH(MinxCPU.Y.B.H); PUSH(MinxCPU.Y.B.L); return 16; - case 0xA4: // PUSH N + case 0xA4: // PUSH BR PUSH(MinxCPU.N.B.H); return 12; - case 0xA5: // PUSH I + case 0xA5: // PUSH EP PUSH(MinxCPU.HL.B.I); return 12; - case 0xA6: // PUSHX + case 0xA6: // PUSH IP PUSH(MinxCPU.X.B.I); PUSH(MinxCPU.Y.B.I); return 16; - case 0xA7: // PUSH F + case 0xA7: // PUSH SC PUSH(MinxCPU.F); return 12; @@ -637,100 +637,100 @@ int MinxCPU_Exec(void) MinxCPU.HL.B.L = POP(); MinxCPU.HL.B.H = POP(); return 12; - case 0xAA: // POP X + case 0xAA: // POP IX MinxCPU.X.B.L = POP(); MinxCPU.X.B.H = POP(); return 12; - case 0xAB: // POP Y + case 0xAB: // POP IY MinxCPU.Y.B.L = POP(); MinxCPU.Y.B.H = POP(); return 12; - case 0xAC: // POP N + case 0xAC: // POP BR MinxCPU.N.B.H = POP(); return 8; - case 0xAD: // POP I + case 0xAD: // POP EP MinxCPU.HL.B.I = POP(); MinxCPU.N.B.I = MinxCPU.HL.B.I; return 8; - case 0xAE: // POPX + case 0xAE: // POP IP MinxCPU.Y.B.I = POP(); MinxCPU.X.B.I = POP(); return 12; - case 0xAF: // POP F + case 0xAF: // POP SC MinxCPU.F = POP(); MinxCPU_OnIRQHandle(MinxCPU.F, MinxCPU.Shift_U); return 8; - case 0xB0: // MOV A, #nn + case 0xB0: // LD A, #nn I8A = Fetch8(); MinxCPU.BA.B.L = I8A; return 8; - case 0xB1: // MOV B, #nn + case 0xB1: // LD B, #nn I8A = Fetch8(); MinxCPU.BA.B.H = I8A; return 8; - case 0xB2: // MOV L, #nn + case 0xB2: // LD L, #nn I8A = Fetch8(); MinxCPU.HL.B.L = I8A; return 8; - case 0xB3: // MOV H, #nn + case 0xB3: // LD H, #nn I8A = Fetch8(); MinxCPU.HL.B.H = I8A; return 8; - case 0xB4: // MOV N, #nn + case 0xB4: // LD N, #nn I8A = Fetch8(); MinxCPU.N.B.H = I8A; return 8; - case 0xB5: // MOV [HL], #nn + case 0xB5: // LD [HL], #nn I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.HL.D, I8A); return 12; - case 0xB6: // MOV [X], #nn + case 0xB6: // LD [IX], #nn I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.X.D, I8A); return 12; - case 0xB7: // MOV [Y], #nn + case 0xB7: // LD [IY], #nn I8A = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.Y.D, I8A); return 12; - case 0xB8: // MOV BA, [#nnnn] + case 0xB8: // LD BA, [#nnnn] I16 = Fetch16(); MinxCPU.BA.B.L = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16++); MinxCPU.BA.B.H = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); return 20; - case 0xB9: // MOV HL, [#nnnn] + case 0xB9: // LD HL, [#nnnn] I16 = Fetch16(); MinxCPU.HL.B.L = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16++); MinxCPU.HL.B.H = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); return 20; - case 0xBA: // MOV X, [#nnnn] + case 0xBA: // LD IX, [#nnnn] I16 = Fetch16(); MinxCPU.X.B.L = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16++); MinxCPU.X.B.H = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); return 20; - case 0xBB: // MOV Y, [#nnnn] + case 0xBB: // LD IY, [#nnnn] I16 = Fetch16(); MinxCPU.Y.B.L = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16++); MinxCPU.Y.B.H = MinxCPU_OnRead(1, (MinxCPU.HL.B.I << 16) | I16); return 20; - case 0xBC: // MOV [#nnnn], BA + case 0xBC: // LD [#nnnn], BA I16 = Fetch16(); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16++, MinxCPU.BA.B.L); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.BA.B.H); return 20; - case 0xBD: // MOV [#nnnn], HL + case 0xBD: // LD [#nnnn], HL I16 = Fetch16(); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16++, MinxCPU.HL.B.L); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.HL.B.H); return 20; - case 0xBE: // MOV [#nnnn], X + case 0xBE: // LD [#nnnn], IX I16 = Fetch16(); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16++, MinxCPU.X.B.L); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.X.B.H); return 20; - case 0xBF: // MOV [#nnnn], Y + case 0xBF: // LD [#nnnn], IY I16 = Fetch16(); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16++, MinxCPU.Y.B.L); MinxCPU_OnWrite(1, (MinxCPU.HL.B.I << 16) | I16, MinxCPU.Y.B.H); @@ -744,59 +744,59 @@ int MinxCPU_Exec(void) I16 = Fetch16(); MinxCPU.HL.W.L = ADD16(MinxCPU.HL.W.L, I16); return 12; - case 0xC2: // ADD X, #nnnn + case 0xC2: // ADD IX, #nnnn I16 = Fetch16(); MinxCPU.X.W.L = ADD16(MinxCPU.X.W.L, I16); return 12; - case 0xC3: // ADD Y, #nnnn + case 0xC3: // ADD IY, #nnnn I16 = Fetch16(); MinxCPU.Y.W.L = ADD16(MinxCPU.Y.W.L, I16); return 12; - case 0xC4: // MOV BA, #nnnn + case 0xC4: // LD BA, #nnnn I16 = Fetch16(); MinxCPU.BA.W.L = I16; return 12; - case 0xC5: // MOV HL, #nnnn + case 0xC5: // LD HL, #nnnn I16 = Fetch16(); MinxCPU.HL.W.L = I16; return 12; - case 0xC6: // MOV X, #nnnn + case 0xC6: // LD IX, #nnnn I16 = Fetch16(); MinxCPU.X.W.L = I16; return 12; - case 0xC7: // MOV Y, #nnnn + case 0xC7: // LD IY, #nnnn I16 = Fetch16(); MinxCPU.Y.W.L = I16; return 12; - case 0xC8: // XCHG BA, HL + case 0xC8: // EX BA, HL I16 = MinxCPU.HL.W.L; MinxCPU.HL.W.L = MinxCPU.BA.W.L; MinxCPU.BA.W.L = I16; return 12; - case 0xC9: // XCHG BA, X + case 0xC9: // EX BA, IX I16 = MinxCPU.X.W.L; MinxCPU.X.W.L = MinxCPU.BA.W.L; MinxCPU.BA.W.L = I16; return 12; - case 0xCA: // XCHG BA, Y + case 0xCA: // EX BA, IY I16 = MinxCPU.Y.W.L; MinxCPU.Y.W.L = MinxCPU.BA.W.L; MinxCPU.BA.W.L = I16; return 12; - case 0xCB: // XCHG BA, SP + case 0xCB: // EX BA, SP I16 = MinxCPU.SP.W.L; MinxCPU.SP.W.L = MinxCPU.BA.W.L; MinxCPU.BA.W.L = I16; return 12; - case 0xCC: // XCHG A, B + case 0xCC: // EX A, B I8A = MinxCPU.BA.B.H; MinxCPU.BA.B.H = MinxCPU.BA.B.L; MinxCPU.BA.B.L = I8A; return 8; - case 0xCD: // XCHG A, [HL] + case 0xCD: // EX A, [HL] I8A = MinxCPU_OnRead(1, MinxCPU.HL.D); MinxCPU_OnWrite(1, MinxCPU.HL.D, MinxCPU.BA.B.L); MinxCPU.BA.B.L = I8A; @@ -816,58 +816,58 @@ int MinxCPU_Exec(void) I16 = Fetch16(); MinxCPU.HL.W.L = SUB16(MinxCPU.HL.W.L, I16); return 12; - case 0xD2: // SUB X, #nnnn + case 0xD2: // SUB IX, #nnnn I16 = Fetch16(); MinxCPU.X.W.L = SUB16(MinxCPU.X.W.L, I16); return 12; - case 0xD3: // SUB Y, #nnnn + case 0xD3: // SUB IY, #nnnn I16 = Fetch16(); MinxCPU.Y.W.L = SUB16(MinxCPU.Y.W.L, I16); return 12; - case 0xD4: // CMP BA, #nnnn + case 0xD4: // CP BA, #nnnn I16 = Fetch16(); SUB16(MinxCPU.BA.W.L, I16); return 12; - case 0xD5: // CMP HL, #nnnn + case 0xD5: // CP HL, #nnnn I16 = Fetch16(); SUB16(MinxCPU.HL.W.L, I16); return 12; - case 0xD6: // CMP X, #nnnn + case 0xD6: // CP IX, #nnnn I16 = Fetch16(); SUB16(MinxCPU.X.W.L, I16); return 12; - case 0xD7: // CMP Y, #nnnn + case 0xD7: // CP IY, #nnnn I16 = Fetch16(); SUB16(MinxCPU.Y.W.L, I16); return 12; - case 0xD8: // AND [N+#nn], #nn + case 0xD8: // AND [BR:#nn], #nn I8A = Fetch8(); I8B = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, AND8(MinxCPU_OnRead(1, MinxCPU.N.D + I8A), I8B)); return 20; - case 0xD9: // OR [N+#nn], #nn + case 0xD9: // OR [BR:#nn], #nn I8A = Fetch8(); I8B = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, OR8(MinxCPU_OnRead(1, MinxCPU.N.D + I8A), I8B)); return 20; - case 0xDA: // XOR [N+#nn], #nn + case 0xDA: // XOR [BR:#nn], #nn I8A = Fetch8(); I8B = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, XOR8(MinxCPU_OnRead(1, MinxCPU.N.D + I8A), I8B)); return 20; - case 0xDB: // CMP [N+#nn], #nn + case 0xDB: // CP [BR:#nn], #nn I8A = Fetch8(); I8B = Fetch8(); SUB8(MinxCPU_OnRead(1, MinxCPU.N.D + I8A), I8B); return 16; - case 0xDC: // TST [N+#nn], #nn + case 0xDC: // BIT [BR:#nn], #nn I8A = Fetch8(); I8B = Fetch8(); AND8(MinxCPU_OnRead(1, MinxCPU.N.D + I8A), I8B); return 16; - case 0xDD: // MOV [N+#nn], #nn + case 0xDD: // LD [BR:#nn], #nn I8A = Fetch8(); I8B = Fetch8(); MinxCPU_OnWrite(1, MinxCPU.N.D + I8A, I8B); @@ -877,33 +877,33 @@ int MinxCPU_Exec(void) MinxCPU.BA.B.L = (MinxCPU.BA.B.L & 0x0F) | (MinxCPU.BA.B.H << 4); return 8; - case 0xDF: // UNPACK + case 0xDF: // UPCK MinxCPU.BA.B.H = (MinxCPU.BA.B.L >> 4); MinxCPU.BA.B.L = MinxCPU.BA.B.L & 0x0F; return 8; - case 0xE0: // CALLC #ss + case 0xE0: // CARS C, #ss I8A = Fetch8(); if (MinxCPU.F & MINX_FLAG_CARRY) { CALLS(S8_TO_16(I8A)); return 20; } return 8; - case 0xE1: // CALLNC #ss + case 0xE1: // CARS NC, #ss I8A = Fetch8(); if (!(MinxCPU.F & MINX_FLAG_CARRY)) { CALLS(S8_TO_16(I8A)); return 20; } return 8; - case 0xE2: // CALLZ #ss + case 0xE2: // CARS Z, #ss I8A = Fetch8(); if (MinxCPU.F & MINX_FLAG_ZERO) { CALLS(S8_TO_16(I8A)); return 20; } return 8; - case 0xE3: // CALLNZ #ss + case 0xE3: // CARS NZ, #ss I8A = Fetch8(); if (!(MinxCPU.F & MINX_FLAG_ZERO)) { CALLS(S8_TO_16(I8A)); @@ -911,53 +911,53 @@ int MinxCPU_Exec(void) } return 8; - case 0xE4: // JC #ss + case 0xE4: // JRS C, #ss I8A = Fetch8(); if (MinxCPU.F & MINX_FLAG_CARRY) { JMPS(S8_TO_16(I8A)); } return 8; - case 0xE5: // JNC #ss + case 0xE5: // JRS NC, #ss I8A = Fetch8(); if (!(MinxCPU.F & MINX_FLAG_CARRY)) { JMPS(S8_TO_16(I8A)); } return 8; - case 0xE6: // JZ #ss + case 0xE6: // JRS Z, #ss I8A = Fetch8(); if (MinxCPU.F & MINX_FLAG_ZERO) { JMPS(S8_TO_16(I8A)); } return 8; - case 0xE7: // JNZ #ss + case 0xE7: // JRS NZ, #ss I8A = Fetch8(); if (!(MinxCPU.F & MINX_FLAG_ZERO)) { JMPS(S8_TO_16(I8A)); } return 8; - case 0xE8: // CALLC #ssss + case 0xE8: // CARL C, #ssss I16 = Fetch16(); if (MinxCPU.F & MINX_FLAG_CARRY) { CALLS(I16); return 24; } return 12; - case 0xE9: // CALLNC #ssss + case 0xE9: // CARL NC, #ssss I16 = Fetch16(); if (!(MinxCPU.F & MINX_FLAG_CARRY)) { CALLS(I16); return 24; } return 12; - case 0xEA: // CALLZ #ssss + case 0xEA: // CARL Z, #ssss I16 = Fetch16(); if (MinxCPU.F & MINX_FLAG_ZERO) { CALLS(I16); return 24; } return 12; - case 0xEB: // CALLNZ #ssss + case 0xEB: // CARL NZ, #ssss I16 = Fetch16(); if (!(MinxCPU.F & MINX_FLAG_ZERO)) { CALLS(I16); @@ -965,53 +965,53 @@ int MinxCPU_Exec(void) } return 12; - case 0xEC: // JC #ssss + case 0xEC: // JRS C, #ssss I16 = Fetch16(); if (MinxCPU.F & MINX_FLAG_CARRY) { JMPS(I16); } return 12; - case 0xED: // JNC #ssss + case 0xED: // JRS NC, #ssss I16 = Fetch16(); if (!(MinxCPU.F & MINX_FLAG_CARRY)) { JMPS(I16); } return 12; - case 0xEE: // JZ #ssss + case 0xEE: // JRS Z, #ssss I16 = Fetch16(); if (MinxCPU.F & MINX_FLAG_ZERO) { JMPS(I16); } return 12; - case 0xEF: // JNZ #ssss + case 0xEF: // JRS NZ, #ssss I16 = Fetch16(); if (!(MinxCPU.F & MINX_FLAG_ZERO)) { JMPS(I16); } return 12; - case 0xF0: // CALL #ss + case 0xF0: // CARS #ss I8A = Fetch8(); CALLS(S8_TO_16(I8A)); return 20; - case 0xF1: // JMP #ss + case 0xF1: // JRS #ss I8A = Fetch8(); JMPS(S8_TO_16(I8A)); return 8; - case 0xF2: // CALL #ssss + case 0xF2: // CARL #ssss I16 = Fetch16(); CALLS(I16); return 24; - case 0xF3: // JMP #ssss + case 0xF3: // JRL #ssss I16 = Fetch16(); JMPS(I16); return 12; - case 0xF4: // JMP HL + case 0xF4: // JP HL JMPU(MinxCPU.HL.W.L); return 8; - case 0xF5: // JDBNZ #ss + case 0xF5: // DJR NZ, #ss I8A = Fetch8(); JDBNZ(S8_TO_16(I8A)); return 16; @@ -1026,10 +1026,10 @@ int MinxCPU_Exec(void) case 0xF8: // RET RET(); return 16; - case 0xF9: // RETI + case 0xF9: // RETE RETI(); return 16; - case 0xFA: // RETSKIP + case 0xFA: // RETS RET(); MinxCPU.PC.W.L = MinxCPU.PC.W.L + 2; return 16; @@ -1038,11 +1038,11 @@ int MinxCPU_Exec(void) I16 = Fetch16(); CALLX(I16); return 20; - case 0xFC: // CINT #nn + case 0xFC: // INT [#nn] I16 = Fetch8(); CALLI(I16); return 20; - case 0xFD: // JINT #nn + case 0xFD: // JP [#nn] I16 = Fetch8(); JMPI(I16); return 8; diff --git a/sourcex/InstructionInfo.c b/sourcex/InstructionInfo.c index 0e06c77..d58955a 100644 --- a/sourcex/InstructionInfo.c +++ b/sourcex/InstructionInfo.c @@ -1,5 +1,5 @@ /* - PokeMini - Pok�mon-Mini Emulator + PokeMini - Pokémon-Mini Emulator Copyright (C) 2009-2012 JustBurn This program is free software: you can redistribute it and/or modify @@ -75,7 +75,7 @@ char *DebugCPUInstructions_Operand[] = { "", // 0 (No operand) "%j", // 1 "%J", // 2 - "%EP", // 3 + "%i", // 3 "%u", // 4 "%U", // 5 "%s", // 6 diff --git a/sourcex/InstructionProc.c b/sourcex/InstructionProc.c index 0eec99d..61b5f17 100644 --- a/sourcex/InstructionProc.c +++ b/sourcex/InstructionProc.c @@ -334,8 +334,8 @@ int DisasmSingleOpcode(InstructionInfo *opcode, uint32_t addr, uint8_t *data, ch // Instruction strcpy(sout, sopcdec->opcode_pre); strcpy(sout, sopcdec->opcode_dict[opcode->opc]); - if (opcode->opclen == 1) strcat(sout, "b"); - if (opcode->opclen == 2) strcat(sout, "w"); + // if (opcode->opclen == 1) strcat(sout, "b"); + // if (opcode->opclen == 2) strcat(sout, "w"); if (opcode->p1) { strcat(sout, sopcdec->opcode_post); if (!ParseOperandStringDec(sopcdec->operand_dict[opcode->p1], addr, (uint8_t *)data + opcode->p1off, tmp, sopcdec)) return 0; @@ -457,8 +457,8 @@ InstructionInfo *AsmSingleOpcode(char *sin, uint32_t addr, uint8_t *data, TSOpcD // XX Opcode opcode = (InstructionInfo *)&DebugCPUInstructions_XX[i]; strcpy(tmp, sopcdec->opcode_dict[opcode->opc]); - if (opcode->opclen == 1) strcat(tmp, "b"); - if (opcode->opclen == 2) strcat(tmp, "w"); + // if (opcode->opclen == 1) strcat(tmp, "b"); + // if (opcode->opclen == 2) strcat(tmp, "w"); if ((!strcasecmp(opcname, tmp)) || (!strcasecmp(opcname, sopcdec->opcode_dict[opcode->opc]))) { data[0] = i; if (opcode->p1 == 0) return opcode; @@ -473,8 +473,8 @@ InstructionInfo *AsmSingleOpcode(char *sin, uint32_t addr, uint8_t *data, TSOpcD // CE Opcode opcode = (InstructionInfo *)&DebugCPUInstructions_CE[i]; strcpy(tmp, sopcdec->opcode_dict[opcode->opc]); - if (opcode->opclen == 1) strcat(tmp, "b"); - if (opcode->opclen == 2) strcat(tmp, "w"); + // if (opcode->opclen == 1) strcat(tmp, "b"); + // if (opcode->opclen == 2) strcat(tmp, "w"); if ((!strcasecmp(opcname, tmp)) || (!strcasecmp(opcname, sopcdec->opcode_dict[opcode->opc]))) { data[0] = 0xCE; data[1] = i; @@ -490,8 +490,8 @@ InstructionInfo *AsmSingleOpcode(char *sin, uint32_t addr, uint8_t *data, TSOpcD // CF Opcode opcode = (InstructionInfo *)&DebugCPUInstructions_CF[i]; strcpy(tmp, sopcdec->opcode_dict[opcode->opc]); - if (opcode->opclen == 1) strcat(tmp, "b"); - if (opcode->opclen == 2) strcat(tmp, "w"); + // if (opcode->opclen == 1) strcat(tmp, "b"); + // if (opcode->opclen == 2) strcat(tmp, "w"); if ((!strcasecmp(opcname, tmp)) || (!strcasecmp(opcname, sopcdec->opcode_dict[opcode->opc]))) { data[0] = 0xCF; data[1] = i; From 1ece88f5da0fdc06231e8323b21b52b382c30196 Mon Sep 17 00:00:00 2001 From: Sapphire Becker Date: Wed, 11 Mar 2026 17:21:54 -0700 Subject: [PATCH 3/5] clear more warnings --- dependencies/minizip/ioapi.c | 3 +-- platform/debug/PokeMini_Debug.c | 3 ++- platform/dingux/PokeMini_Dingux.c | 3 ++- platform/dreamcast/PokeMini_DC.c | 3 ++- platform/gamecube/PokeMini_GC.c | 3 ++- platform/microsdl/PokeMini_uSDL.c | 3 ++- platform/nds/PokeMini_NDS.c | 4 ++-- platform/psp/PokeMini_PSP.c | 3 ++- platform/sdl/PokeMini_SDL.c | 3 ++- platform/sdl/makefile | 3 +-- platform/sdl2/PokeMini_SDL2.c | 3 ++- platform/uwiz/PokeMini_uWIZ.c | 3 ++- platform/wii/PokeMini_Wii.c | 3 ++- platform/win32/PokeMini_Win32.c | 3 ++- platform/wizsdl/PokeMini_WIZ.c | 3 ++- source/PMCommon.c | 12 +++++++++--- source/PMCommon.h | 2 +- source/UI.c | 29 +++++++++++++++++++---------- sourcex/InstructionInfo.c | 6 +++--- tools/color_mapper/color_mapper.c | 3 ++- 20 files changed, 62 insertions(+), 36 deletions(-) diff --git a/dependencies/minizip/ioapi.c b/dependencies/minizip/ioapi.c index 06d88c5..d3bead8 100644 --- a/dependencies/minizip/ioapi.c +++ b/dependencies/minizip/ioapi.c @@ -215,8 +215,7 @@ static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream) return ret; } -void fill_fopen_filefunc (pzlib_filefunc_def) - zlib_filefunc_def* pzlib_filefunc_def; +void fill_fopen_filefunc (zlib_filefunc_def* pzlib_filefunc_def) { pzlib_filefunc_def->zopen_file = fopen_file_func; pzlib_filefunc_def->zread_file = fread_file_func; diff --git a/platform/debug/PokeMini_Debug.c b/platform/debug/PokeMini_Debug.c index 63dec7c..58bd8c5 100644 --- a/platform/debug/PokeMini_Debug.c +++ b/platform/debug/PokeMini_Debug.c @@ -576,7 +576,8 @@ int main(int argc, char **argv) int AutoRun = 0; // Get current directory - PokeMini_InitDirs(argv[0], argv0); + if(!PokeMini_InitDirs(argv[0], argv0)) + return 1; // Change to executable directory PokeMini_GotoExecDir(); diff --git a/platform/dingux/PokeMini_Dingux.c b/platform/dingux/PokeMini_Dingux.c index 63cb6da..f737b38 100644 --- a/platform/dingux/PokeMini_Dingux.c +++ b/platform/dingux/PokeMini_Dingux.c @@ -216,7 +216,8 @@ int main(int argc, char **argv) // Process arguments printf("%s\n\n", AppName); - PokeMini_InitDirs(argv[0], NULL); + if(!PokeMini_InitDirs(argv[0], NULL)) + return 1; CommandLineInit(); CommandLineConfFile("pokemini.cfg", NULL, NULL); if (!CommandLineArgs(argc, argv, NULL)) { diff --git a/platform/dreamcast/PokeMini_DC.c b/platform/dreamcast/PokeMini_DC.c index 1891b4a..52e194e 100644 --- a/platform/dreamcast/PokeMini_DC.c +++ b/platform/dreamcast/PokeMini_DC.c @@ -584,7 +584,8 @@ int main(int argc, char **argv) // Process no arguments printf("%s\n\n", AppName); - PokeMini_InitDirs("/cd/PokeMini", NULL); + if (!PokeMini_InitDirs("/cd/PokeMini", NULL)) + return 1; CommandLineInit(); CommandLineConfFile("/ram/PokeMini.cfg", "/ram/PokeMini.cDC", CustomConf); CommandLine.sound = CommandLine.sound ? 1 : 0; diff --git a/platform/gamecube/PokeMini_GC.c b/platform/gamecube/PokeMini_GC.c index 9a6abbd..2f68260 100644 --- a/platform/gamecube/PokeMini_GC.c +++ b/platform/gamecube/PokeMini_GC.c @@ -459,7 +459,8 @@ int main(int argc, char **argv) // Process arguments printf("%s\n\n", AppName); - PokeMini_InitDirs("/PokeMini", NULL); + if (!PokeMini_InitDirs("/PokeMini", NULL)) + return 1; CommandLineInit(); CommandLineConfFile("pokemini.cfg", "pokemini_gc.cfg", CustomConf); JoystickSetup("GC", 0, 30000, GC_KeysNames, 13, GC_KeysMapping); diff --git a/platform/microsdl/PokeMini_uSDL.c b/platform/microsdl/PokeMini_uSDL.c index f7c1ea4..b2f9209 100644 --- a/platform/microsdl/PokeMini_uSDL.c +++ b/platform/microsdl/PokeMini_uSDL.c @@ -125,7 +125,8 @@ int main(int argc, char **argv) // Process arguments printf("%s\n\n", AppName); - PokeMini_InitDirs(argv[0], NULL); + if (!PokeMini_InitDirs(argv[0], NULL)) + return 1; CommandLineInit(); CommandLineConfFile("pokemini.cfg", NULL, NULL); if (!CommandLineArgs(argc, argv, NULL)) { diff --git a/platform/nds/PokeMini_NDS.c b/platform/nds/PokeMini_NDS.c index a808bee..390b212 100644 --- a/platform/nds/PokeMini_NDS.c +++ b/platform/nds/PokeMini_NDS.c @@ -306,8 +306,8 @@ int main(int argc, char **argv) // Init video printf("%s\n\n", AppName); - if (argv) PokeMini_InitDirs(argv[0], NULL); - else PokeMini_InitDirs("/", NULL); + if (argv) if (!PokeMini_InitDirs(argv[0], NULL)) return 1; + else if (!PokeMini_InitDirs("/", NULL)) return 1; CommandLineInit(); //CommandLine.low_battery = 2; // NDS can report battery status CommandLine.lcdfilter = 0; // Disable LCD filtering diff --git a/platform/psp/PokeMini_PSP.c b/platform/psp/PokeMini_PSP.c index 73fd17a..b76c06a 100644 --- a/platform/psp/PokeMini_PSP.c +++ b/platform/psp/PokeMini_PSP.c @@ -269,7 +269,8 @@ int main(int argc, char **argv) // Init video PokeDPrint(POKEMSG_OUT, "%s\n\n", AppName); - PokeMini_InitDirs(argv[0], NULL); + if (!PokeMini_InitDirs(argv[0], NULL)) + return 1; CommandLineInit(); CommandLine.low_battery = 2; // PSP can report battery status CommandLineConfFile("pokemini.cfg", "pokemini_psp.cfg", CustomConf); diff --git a/platform/sdl/PokeMini_SDL.c b/platform/sdl/PokeMini_SDL.c index 23cd415..157fa2d 100644 --- a/platform/sdl/PokeMini_SDL.c +++ b/platform/sdl/PokeMini_SDL.c @@ -387,7 +387,8 @@ int main(int argc, char **argv) // Process arguments printf("%s\n\n", AppName); - PokeMini_InitDirs(argv[0], NULL); + if (!PokeMini_InitDirs(argv[0], NULL)) + return 1; CommandLineInit(); CommandLineConfFile("pokemini.cfg", "pokemini_sdl.cfg", CustomConf); if (!CommandLineArgs(argc, argv, CustomArgs)) { diff --git a/platform/sdl/makefile b/platform/sdl/makefile index 16c8171..314f5e0 100644 --- a/platform/sdl/makefile +++ b/platform/sdl/makefile @@ -120,5 +120,4 @@ win: make -f makefile.win clean: - -rm -f $(BUILDOBJS) $(TARGET) $(WINTARGET) $(WINRES_TRG) - -rmdir --ignore-fail-on-non-empty $(BUILD) + -rm -rf $(BUILDOBJS) $(TARGET) $(WINTARGET) $(WINRES_TRG) $(BUILD) diff --git a/platform/sdl2/PokeMini_SDL2.c b/platform/sdl2/PokeMini_SDL2.c index 2918dba..882254b 100644 --- a/platform/sdl2/PokeMini_SDL2.c +++ b/platform/sdl2/PokeMini_SDL2.c @@ -433,7 +433,8 @@ int main(int argc, char **argv) // Process arguments printf("%s\n\n", AppName); - PokeMini_InitDirs(argv[0], NULL); + if (!PokeMini_InitDirs(argv[0], NULL)) + return 1; CommandLineInit(); CommandLineConfFile("pokemini.cfg", "pokemini_sdl2.cfg", CustomConf); if (!CommandLineArgs(argc, argv, CustomArgs)) { diff --git a/platform/uwiz/PokeMini_uWIZ.c b/platform/uwiz/PokeMini_uWIZ.c index 7e92280..b5ac0b7 100644 --- a/platform/uwiz/PokeMini_uWIZ.c +++ b/platform/uwiz/PokeMini_uWIZ.c @@ -193,7 +193,8 @@ int main(int argc, char **argv) // Process arguments printf("%s\n\n", AppName); - PokeMini_InitDirs(argv[0], NULL); + if (!PokeMini_InitDirs(argv[0], NULL)) + return 1; CommandLineInit(); CommandLine.low_battery = 2; // libuwiz can report battery status CommandLineConfFile("pokemini.cfg", "pokemini_uwiz.cfg", CustomConf); diff --git a/platform/wii/PokeMini_Wii.c b/platform/wii/PokeMini_Wii.c index fc37ff5..b171e7f 100644 --- a/platform/wii/PokeMini_Wii.c +++ b/platform/wii/PokeMini_Wii.c @@ -469,7 +469,8 @@ int main(int argc, char **argv) // Process arguments printf("%s\n\n", AppName); - PokeMini_InitDirs("/PokeMini", NULL); + if (!PokeMini_InitDirs("/PokeMini", NULL)) + return 1; CommandLineInit(); CommandLineConfFile("pokemini.cfg", "pokemini_wii.cfg", CustomConf); JoystickSetup("WII", 0, 30000, Wii_KeysNames, 32, Wii_KeysMapping); diff --git a/platform/win32/PokeMini_Win32.c b/platform/win32/PokeMini_Win32.c index 36f9dc5..95ebbf4 100644 --- a/platform/win32/PokeMini_Win32.c +++ b/platform/win32/PokeMini_Win32.c @@ -1141,7 +1141,8 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL LocalFree(pathnam); // Process arguments - PokeMini_InitDirs(argv[0], NULL); + if (!PokeMini_InitDirs(argv[0], NULL)) + return 1; CommandLineInit(); CommandLineConfFile("pokemini.cfg", "pokemini_win32.cfg", CustomConf); if (!CommandLineArgs(argc, argv, CustomArgs)) { diff --git a/platform/wizsdl/PokeMini_WIZ.c b/platform/wizsdl/PokeMini_WIZ.c index f0554fb..27a6ba0 100644 --- a/platform/wizsdl/PokeMini_WIZ.c +++ b/platform/wizsdl/PokeMini_WIZ.c @@ -193,7 +193,8 @@ int main(int argc, char **argv) // Process arguments printf("%s\n\n", AppName); - PokeMini_InitDirs(argv[0], NULL); + if (!PokeMini_InitDirs(argv[0], NULL)) + return 1; CommandLineInit(); CommandLineConfFile("pokemini.cfg", NULL, NULL); if (!CommandLineArgs(argc, argv, NULL)) { diff --git a/source/PMCommon.c b/source/PMCommon.c index 46cc3be..7dd7f52 100644 --- a/source/PMCommon.c +++ b/source/PMCommon.c @@ -435,7 +435,7 @@ char PokeMini_ExecDir[PMTMPV]; // Executable directory char PokeMini_CurrDir[PMTMPV]; // Current directory // Initialize directories -void PokeMini_InitDirs(char *argv0, char *exec) +int PokeMini_InitDirs(char *argv0, char *exec) { // Get current directory PokeMini_GetCurrentDir(); @@ -449,15 +449,21 @@ void PokeMini_InitDirs(char *argv0, char *exec) ExtractPath(PokeMini_ExecDir, 1); } else { // Not an absolute path + if (strlen(PokeMini_CurrDir) + strlen(argv0) + 1 > sizeof(PokeMini_ExecDir)) { + return 0; + } + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wformat-overflow" if (HasLastSlash(PokeMini_CurrDir)) sprintf(PokeMini_ExecDir, "%s%s", PokeMini_CurrDir, argv0); else sprintf(PokeMini_ExecDir, "%s/%s", PokeMini_CurrDir, argv0); + #pragma GCC diagnostic pop if (exec) strcpy(exec, PokeMini_ExecDir); ExtractPath(PokeMini_ExecDir, 1); } } else { strcpy(PokeMini_ExecDir, PokeMini_CurrDir); } - + return 1; } // Get current directory and save on parameter @@ -509,7 +515,7 @@ void PokeMini_GotoExecDir(void) #else -void PokeMini_InitDirs(char *execdir) {} +int PokeMini_InitDirs(char *execdir) {} void PokeMini_GetCurrentDir(void) {} void PokeMini_GotoCurrentDir(void) {} void PokeMini_GotoExecDir(void) {} diff --git a/source/PMCommon.h b/source/PMCommon.h index bfe9565..76fc288 100644 --- a/source/PMCommon.h +++ b/source/PMCommon.h @@ -133,7 +133,7 @@ int SeparateAtChars(char *s, char *chs, char **key, char **value); int GetArgument(const char *runcmd, int args, char *out, int len, char **runcmd_found); // Directories -void PokeMini_InitDirs(char *argv0, char *exec); +int PokeMini_InitDirs(char *argv0, char *exec); void PokeMini_GetCustomDir(char *dir, int max); void PokeMini_SetCurrentDir(const char *dir); void PokeMini_GotoCustomDir(const char *dir); diff --git a/source/UI.c b/source/UI.c index fd8a66e..dd328c1 100644 --- a/source/UI.c +++ b/source/UI.c @@ -354,7 +354,7 @@ void UIMenu_SwapEntries(int a, int b) int UIMenu_ReadDir(char *dirname) { int i, j, cmp, hasslash, isdir, items = 0; - char file[PMTMPV]; + char file[PMTMPV * 2 + 2]; // Clear all cache for (i=0; iname[0] == '.') continue; UIMenu_FileListCache[items].stats = 1; strcpy(UIMenu_FileListCache[items].name, de->name); - if (hasslash) sprintf(file, "%s%s", dirname, de->name); - else sprintf(file, "%s/%s", dirname, de->name); + if (hasslash) sprintf(file, "%s%.255s", dirname, de->name); + else sprintf(file, "%s/%.255s", dirname, de->name); isdir = (de->size < 0); if (isdir) { // Directory @@ -420,8 +420,8 @@ int UIMenu_ReadDir(char *dirname) continue; } else { // Current directory, file or directory - if (hasslash) sprintf(file, "%s%s", dirname, dirEntry->d_name); - else sprintf(file, "%s/%s", dirname, dirEntry->d_name); + if (hasslash) sprintf(file, "%s%.255s", dirname, dirEntry->d_name); + else sprintf(file, "%s/%.255s", dirname, dirEntry->d_name); if (stat(file, &Stat) == -1) { PokeDPrint(POKEMSG_ERR, "stat('%s') error\n", file); continue; @@ -470,16 +470,16 @@ int UIMenu_ReadDir(char *dirname) void UIMenu_GotoRelativeDir(char *newdir) { - char file[PMTMPV]; + char file[PMTMPV * 2 + 2]; int hasslash; hasslash = HasLastSlash(PokeMini_CurrDir); if (newdir) { if (hasslash) - sprintf(file, "%s%s", PokeMini_CurrDir, newdir); + sprintf(file, "%s%.255s", PokeMini_CurrDir, newdir); else - sprintf(file, "%s/%s", PokeMini_CurrDir, newdir); + sprintf(file, "%s/%.255s", PokeMini_CurrDir, newdir); #ifdef FS_DC chdir(file); #else @@ -1251,7 +1251,7 @@ int UIMenu_Process(void) void UIMenu_Display_32(uint32_t *screen, int pitchW) { int padd, i, j; - char text[PMTMPV]; + char text[PMTMPV + 5]; if (UIMenu_Width >= 288) padd = 10; else padd = 8; // Padding need to be small for small resolutions @@ -1410,7 +1410,16 @@ void UIMenu_Display_16(uint16_t *screen, int pitchW) UIDraw_Icon_16(screen, pitchW, 2, 20 + (UIMenu_Cur-UIMenu_MOff)*12, ((UIMenu_Ani>>2) & 3)); // Loaded ROM - sprintf(text, "ROM: %s", CommandLine.min_file); + if (strlen(CommandLine.min_file) > sizeof(text) - 6) { + memmove(text, "ROM: ...", 9); + memmove(text + 8, + CommandLine.min_file + + strlen(CommandLine.min_file) + - sizeof(text) + 9, + sizeof(text) - 8); + } + else + sprintf(text, "ROM: %.122s", CommandLine.min_file); text[(UIMenu_Width/padd)-1] = 0; // Avoid string going out of the screen UIDraw_String_16(screen, pitchW, 2, 20 + (UIMenu_MMax+1)*12, padd, text, UI_Font1_Pal16); } diff --git a/sourcex/InstructionInfo.c b/sourcex/InstructionInfo.c index d58955a..f5b81f7 100644 --- a/sourcex/InstructionInfo.c +++ b/sourcex/InstructionInfo.c @@ -148,7 +148,7 @@ char *DebugCPUInstructions_Operand[] = { // %S = Signed 16-Bits // %j = Relative jump (8-Bits) // %J = Relative jump (16-Bits) -// %EP = Interrupt +// %i = Interrupt InstructionInfo DebugCPUInstructions_DX[8] = { {0x00, 1, 0, 0, 4, 0, 0, 0}, // ".DB %u" @@ -414,8 +414,8 @@ InstructionInfo DebugCPUInstructions_XX[256] = { {0x00, 1,36, 0, 0, 0, 0, 0}, // F9 __ "RETE" {0x00, 1,37, 0, 0, 0, 0, 0}, // FA __ "RETS" {0x00, 3,26, 0, 5, 1, 0, 0}, // FB __ "CALL [%U]" - {0x00, 2,38, 0, 3, 1, 0, 0}, // FC __ "INT %EP" - {0x00, 2,30, 0, 3, 1, 0, 0}, // FD __ "JP [%EP]" + {0x00, 2,38, 0, 4, 1, 0, 0}, // FC __ "INT %u" + {0x00, 2,30, 0, 4, 1, 0, 0}, // FD __ "JP [%u]" {0x00, 1, 0, 0, 4, 0, 0, 0}, // FE __ ".DB $FE" {0x00, 1, 1, 0, 0, 0, 0, 0}, // FF __ "NOP" }; diff --git a/tools/color_mapper/color_mapper.c b/tools/color_mapper/color_mapper.c index c088b55..962f94f 100644 --- a/tools/color_mapper/color_mapper.c +++ b/tools/color_mapper/color_mapper.c @@ -955,7 +955,8 @@ int main(int argc, char **argv) int i; gtk_init (&argc, &argv); - PokeMini_InitDirs(argv[0], NULL); + if (!PokeMini_InitDirs(argv[0], NULL)) + return 1; PokeMini_GetCurrentDir(); PokeMini_GotoExecDir(); CustomConfFile("colormapper.cfg", CustomConf, NULL); From f19d3fc3f61b77e7c3a32cebb5eab2a8e8aba2d4 Mon Sep 17 00:00:00 2001 From: Sapphire Becker Date: Wed, 11 Mar 2026 21:27:50 -0700 Subject: [PATCH 4/5] add gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b4223cd --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +Build +PokeMini.exe +PokeMiniD.exe From 65e01dff48c42a830ee3029ef2a14f819037d503 Mon Sep 17 00:00:00 2001 From: Sapphire Becker Date: Wed, 11 Mar 2026 21:28:20 -0700 Subject: [PATCH 5/5] fix some instructions --- sourcex/InstructionInfo.c | 48 +++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sourcex/InstructionInfo.c b/sourcex/InstructionInfo.c index f5b81f7..19fda37 100644 --- a/sourcex/InstructionInfo.c +++ b/sourcex/InstructionInfo.c @@ -477,14 +477,14 @@ InstructionInfo DebugCPUInstructions_CE[256] = { {0x00, 3,10, 0,11, 0, 4, 2}, // CE 35 "CP [HL], #%u" {0x00, 2,10, 0,11, 0,14, 0}, // CE 36 "CP [HL], [IX]" {0x00, 2,10, 0,11, 0,15, 0}, // CE 37 "CP [HL], [IY]" - {0x00, 3,10, 0, 8, 0,28, 2}, // CE 38 "XOR A, [IX+%s]" - {0x00, 3,10, 0, 8, 0,29, 2}, // CE 39 "XOR A, [IY+%s]" - {0x00, 2,10, 0, 8, 0,30, 0}, // CE 3A "XOR A, [IX+L]" - {0x00, 2,10, 0, 8, 0,31, 0}, // CE 3B "XOR A, [IY+L]" - {0x00, 2,10, 0,11, 0, 8, 0}, // CE 3C "XOR [HL], A" - {0x00, 3,10, 0,11, 0, 4, 2}, // CE 3D "XOR [HL], #%u" - {0x00, 2,10, 0,11, 0,14, 0}, // CE 3E "XOR [HL], [IX]" - {0x00, 2,10, 0,11, 0,15, 0}, // CE 3F "XOR [HL], [IY]" + {0x00, 3,11, 0, 8, 0,28, 2}, // CE 38 "XOR A, [IX+%s]" + {0x00, 3,11, 0, 8, 0,29, 2}, // CE 39 "XOR A, [IY+%s]" + {0x00, 2,11, 0, 8, 0,30, 0}, // CE 3A "XOR A, [IX+L]" + {0x00, 2,11, 0, 8, 0,31, 0}, // CE 3B "XOR A, [IY+L]" + {0x00, 2,11, 0,11, 0, 8, 0}, // CE 3C "XOR [HL], A" + {0x00, 3,11, 0,11, 0, 4, 2}, // CE 3D "XOR [HL], #%u" + {0x00, 2,11, 0,11, 0,14, 0}, // CE 3E "XOR [HL], [IX]" + {0x00, 2,11, 0,11, 0,15, 0}, // CE 3F "XOR [HL], [IY]" {0x00, 3, 2, 0, 8, 0,28, 2}, // CE 40 "LD A, [IX+%s]" {0x00, 3, 2, 0, 8, 0,29, 2}, // CE 41 "LD A, [IY+%s]" {0x00, 2, 2, 0, 8, 0,30, 0}, // CE 42 "LD A, [IX+L]" @@ -661,22 +661,22 @@ InstructionInfo DebugCPUInstructions_CE[256] = { {0x00, 2,27, 0,58, 0,38, 2}, // CE ED "JRS NF1, %h" {0x00, 3,27, 0,59, 0,38, 2}, // CE EE "JRS NF2, %h" {0x00, 3,27, 0,60, 0,38, 2}, // CE EF "JRS NF3, %h" - {0x00, 3,72, 0,45, 0,38, 2}, // CE F0 "CARS LT, %h" - {0x00, 3,73, 0,46, 0,38, 2}, // CE F1 "CARS LE, %h" - {0x00, 3,74, 0,47, 0,38, 2}, // CE F2 "CARS GT, %h" - {0x00, 3,75, 0,48, 0,38, 2}, // CE F3 "CARS GE, %h" - {0x00, 3,76, 0,49, 0,38, 2}, // CE F4 "CARS V, %h" - {0x00, 3,77, 0,50, 0,38, 2}, // CE F5 "CARS NV, %h" - {0x00, 3,78, 0,51, 0,38, 2}, // CE F6 "CARS P, %h" - {0x00, 3,79, 0,52, 0,38, 2}, // CE F7 "CARS M, %h" - {0x00, 3,80, 0,53, 0,38, 2}, // CE F8 "CARS F0, %h" - {0x00, 3,81, 0,54, 0,38, 2}, // CE F9 "CARS F1, %h" - {0x00, 3,82, 0,55, 0,38, 2}, // CE FA "CARS F2, %h" - {0x00, 3,83, 0,56, 0,38, 2}, // CE FB "CARS F3, %h" - {0x00, 3,84, 0,57, 0,38, 2}, // CE FC "CARS NF0, %h" - {0x00, 3,85, 0,58, 0,38, 2}, // CE FD "CARS NF1, %h" - {0x00, 3,86, 0,59, 0,38, 2}, // CE FE "CARS NF2, %h" - {0x00, 3,87, 0,60, 0,38, 2} // CE FF "CARS NF3, %h" + {0x00, 3,24, 0,45, 0,38, 2}, // CE F0 "CARS LT, %h" + {0x00, 3,24, 0,46, 0,38, 2}, // CE F1 "CARS LE, %h" + {0x00, 3,24, 0,47, 0,38, 2}, // CE F2 "CARS GT, %h" + {0x00, 3,24, 0,48, 0,38, 2}, // CE F3 "CARS GE, %h" + {0x00, 3,24, 0,49, 0,38, 2}, // CE F4 "CARS V, %h" + {0x00, 3,24, 0,50, 0,38, 2}, // CE F5 "CARS NV, %h" + {0x00, 3,24, 0,51, 0,38, 2}, // CE F6 "CARS P, %h" + {0x00, 3,24, 0,52, 0,38, 2}, // CE F7 "CARS M, %h" + {0x00, 3,24, 0,53, 0,38, 2}, // CE F8 "CARS F0, %h" + {0x00, 3,24, 0,54, 0,38, 2}, // CE F9 "CARS F1, %h" + {0x00, 3,24, 0,55, 0,38, 2}, // CE FA "CARS F2, %h" + {0x00, 3,24, 0,56, 0,38, 2}, // CE FB "CARS F3, %h" + {0x00, 3,24, 0,57, 0,38, 2}, // CE FC "CARS NF0, %h" + {0x00, 3,24, 0,58, 0,38, 2}, // CE FD "CARS NF1, %h" + {0x00, 3,24, 0,59, 0,38, 2}, // CE FE "CARS NF2, %h" + {0x00, 3,24, 0,60, 0,38, 2} // CE FF "CARS NF3, %h" }; InstructionInfo DebugCPUInstructions_CF[256] = {