Skip to content

Commit

Permalink
Debugger v0.2
Browse files Browse the repository at this point in the history
    Debugger v0.2

    - Windows: Disasm, copper, blitter, custom regs, scr_graph, console;
    - Shortcuts, Actions, Log, Console, messages;
    - Debug trace: Step-In, Step Copper, Skip N scanlines;
    - Separate thread for UAE
    - Update imgui docking to latest ver 1.91.3
    - and many, many ..
  • Loading branch information
dartfnm committed Nov 27, 2024
1 parent 04f0d8a commit 3d5482f
Show file tree
Hide file tree
Showing 98 changed files with 13,230 additions and 4,109 deletions.
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": "x64-Debug"
}
10 changes: 10 additions & 0 deletions .vs/tasks.vs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version": "0.2.1",
"tasks": [
{
"taskLabel": "task-CMakeLists",
"appliesTo": "CMakeLists.txt",
"type": "launch"
}
]
}
16 changes: 13 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Minimum CMake version requirement
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.6)

option(ENABLE_CODE_GENERATION "Enable code generation" OFF)

Expand Down Expand Up @@ -34,6 +34,7 @@ if (WIN32)
string(REGEX REPLACE "/Z[iI7]" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /ZI")
add_link_options("/INCREMENTAL")
add_compile_options("/MP") # multiprocessor build
endif()
endif()

Expand Down Expand Up @@ -96,7 +97,7 @@ if (ENABLE_CODE_GENERATION)
gen_blitter(../uae_src/blittable.cpp t)
endif()

add_executable(quaesar
set(UAE_SOURCE_LIST
uae_src/aros.rom.cpp
uae_src/akiko.cpp
uae_src/amax.cpp
Expand Down Expand Up @@ -207,12 +208,18 @@ add_executable(quaesar
uae_src/jit/comptbl.h
uae_src/blit.h
)
add_executable(quaesar ${UAE_SOURCE_LIST})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${UAE_SOURCE_LIST})

# Recursively glob for all .cpp files in the src directory
file(GLOB_RECURSE CROSS_FILES "src/*.cpp")
file(GLOB_RECURSE QUAE_HEADERS "src/*.h")
target_sources(quaesar PRIVATE ${CROSS_FILES} ${QUAE_HEADERS})

# Create the source groups for source tree with root at CMAKE_CURRENT_SOURCE_DIR.
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${QUAE_HEADERS} ${CROSS_FILES} ${SDL2_INCLUDE_DIRS})

if (APPLE OR LINUX OR UNIX)
target_compile_options(quaesar PRIVATE -DUAE=1 -D_cdecl= -DFILEFLAG_WRITE=1 -DOS_NAME=\"linux\")
target_compile_options(quaesar PRIVATE -DUSHORT=uint16_t -DHWND=uint32_t -DHRESULT=uint32_t -DWPARAM=uint16_t -DLPARAM=uint32_t)
Expand All @@ -225,11 +232,14 @@ if (WIN32)
target_include_directories(quaesar PRIVATE "${CMAKE_SOURCE_DIR}/external/sdl2/include")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
target_link_libraries(quaesar PRIVATE "${CMAKE_SOURCE_DIR}/external/sdl2/x64/sdl2.lib")
target_link_libraries(quaesar PRIVATE "${CMAKE_SOURCE_DIR}/external/sdl2/x64/SDL2main.lib")
else()
target_link_libraries(quaesar PRIVATE "${CMAKE_SOURCE_DIR}/external/sdl2/win32/sdl2.lib")
target_link_libraries(quaesar PRIVATE "${CMAKE_SOURCE_DIR}/external/sdl2/win32/SDL2main.lib")
endif()
target_link_libraries(quaesar PRIVATE Ws2_32.lib Winmm.lib Version.lib Imm32.lib Setupapi.lib)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT quaesar)
set_target_properties(quaesar PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT quaesar) # makes startup project
endif()

if (APPLE)
Expand Down
15 changes: 15 additions & 0 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
}
]
}
102 changes: 71 additions & 31 deletions bin/install/default_layout.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,67 @@ Collapsed=0

[Window][Disassembly]
Pos=8,42
Size=320,670
Size=334,670
Collapsed=0
DockId=0x00000001,0
DockId=0x00000002,0

[Window][Registers]
Pos=1011,42
Size=261,495
Pos=343,42
Size=245,244
Collapsed=0
DockId=0x0000000A,0
DockId=0x00000005,0

[Window][Console]
Pos=330,539
Size=942,173
Pos=589,490
Size=683,222
Collapsed=0
DockId=0x00000003,1
DockId=0x00000008,1

[Window][Screen]
Pos=330,42
Size=679,495
Pos=589,42
Size=683,447
Collapsed=0
DockId=0x00000009,0
DockId=0x00000007,1

[Window][Palette]
Pos=1011,42
Size=261,495
Pos=343,42
Size=245,244
Collapsed=0
DockId=0x0000000A,1
DockId=0x00000005,1

[Window][Memory graph]
Pos=330,42
Size=679,495
Pos=589,42
Size=683,447
Collapsed=0
DockId=0x00000009,1
DockId=0x00000007,0

[Window][Memory]
Pos=330,539
Size=942,173
Pos=589,490
Size=683,222
Collapsed=0
DockId=0x00000003,0
DockId=0x00000008,0

[Table][0x6038E043,3]
RefScale=13
Column 0 Width=70
Column 1 Width=84
Column 2 Width=175
[Window][Custom regs]
Pos=343,287
Size=245,425
Collapsed=0
DockId=0x00000006,0

[Window][Copper debug]
Pos=8,42
Size=334,670
Collapsed=0
DockId=0x00000002,1

[Window][Blitter]
Pos=343,42
Size=245,244
Collapsed=0
DockId=0x00000005,2

[Window][Blitter/##LEFT_COL_FF37AB84]
IsChild=1
Size=112,188

[Table][0xF68F8465,4]
RefScale=13
Expand All @@ -63,12 +79,36 @@ Column 1 Width=70
Column 2 Width=14
Column 3 Width=70

[Table][0x6038E043,4]
RefScale=13
Column 0 Width=8
Column 1 Width=53
Column 2 Width=24
Column 3 Width=209

[Table][0xB28A391E,4]
RefScale=13
Column 0 Width=47
Column 1 Width=36
Column 2 Width=47
Column 3 Width=40

[Table][0x2B932F4C,5]
RefScale=13
Column 0 Width=8
Column 1 Width=39
Column 2 Width=63
Column 3 Width=28
Column 4 Width=589

[Docking][Data]
DockSpace ID=0x7A095824 Window=0xBB552D6F Pos=8,42 Size=1264,670 Split=X
DockNode ID=0x00000001 Parent=0x7A095824 SizeRef=320,670 Selected=0x19EDEE42
DockNode ID=0x00000004 Parent=0x7A095824 SizeRef=942,670 Split=Y
DockNode ID=0x00000002 Parent=0x00000004 SizeRef=1264,495 Split=X Selected=0x5B855092
DockNode ID=0x00000009 Parent=0x00000002 SizeRef=679,262 Selected=0x5B855092
DockNode ID=0x0000000A Parent=0x00000002 SizeRef=261,262 Selected=0xEAEE9E08
DockNode ID=0x00000003 Parent=0x00000004 SizeRef=1264,173 CentralNode=1 Selected=0xB2805FDB
DockNode ID=0x00000001 Parent=0x7A095824 SizeRef=580,670 Split=X Selected=0x19EDEE42
DockNode ID=0x00000002 Parent=0x00000001 SizeRef=333,826 Selected=0x19EDEE42
DockNode ID=0x00000003 Parent=0x00000001 SizeRef=245,826 Split=Y Selected=0x13D58281
DockNode ID=0x00000005 Parent=0x00000003 SizeRef=257,301 Selected=0xEAEE9E08
DockNode ID=0x00000006 Parent=0x00000003 SizeRef=257,523 Selected=0x13D58281
DockNode ID=0x00000004 Parent=0x7A095824 SizeRef=865,670 Split=Y Selected=0x35059272
DockNode ID=0x00000007 Parent=0x00000004 SizeRef=923,602 CentralNode=1 Selected=0x35059272
DockNode ID=0x00000008 Parent=0x00000004 SizeRef=923,222 Selected=0xB2805FDB

2 changes: 1 addition & 1 deletion external/dear_imgui/backends/imgui_impl_sdl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ static bool ImGui_ImplSDL2_Init(SDL_Window* window, SDL_Renderer* renderer, void
io.SetClipboardTextFn = ImGui_ImplSDL2_SetClipboardText;
io.GetClipboardTextFn = ImGui_ImplSDL2_GetClipboardText;
io.ClipboardUserData = nullptr;
io.SetPlatformImeDataFn = ImGui_ImplSDL2_SetPlatformImeData;
//io.SetPlatformImeDataFn = ImGui_ImplSDL2_SetPlatformImeData;

// Load mouse cursors
bd->MouseCursors[ImGuiMouseCursor_Arrow] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW);
Expand Down
13 changes: 9 additions & 4 deletions external/dear_imgui/imconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@

//---- Define attributes of all API symbols declarations, e.g. for DLL under Windows
// Using Dear ImGui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility.
// DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
//#define IMGUI_API __declspec( dllexport )
//#define IMGUI_API __declspec( dllimport )
// - Windows DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
//#define IMGUI_API __declspec(dllexport) // MSVC Windows: DLL export
//#define IMGUI_API __declspec(dllimport) // MSVC Windows: DLL import
//#define IMGUI_API __attribute__((visibility("default"))) // GCC/Clang: override visibility when set is hidden

//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to clean your code of obsolete function/names.
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
Expand All @@ -42,13 +43,17 @@
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with non-Visual Studio compilers] Don't implement default IME handler (won't require imm32.lib/.a)
//#define IMGUI_DISABLE_WIN32_FUNCTIONS // [Win32] Won't use and link with any Win32 function (clipboard, IME).
//#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS // [OSX] Implement default OSX clipboard handler (need to link with '-framework ApplicationServices', this is why this is not the default).
//#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS // Don't implement default platform_io.Platform_OpenInShellFn() handler (Win32: ShellExecute(), require shell32.lib/.a, Mac/Linux: use system("")).
//#define IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS // Don't implement ImFormatString/ImFormatStringV so you can implement them yourself (e.g. if you don't want to link with vsnprintf)
//#define IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 so you can implement them yourself.
//#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies)
//#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function.
//#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions().
//#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available

//---- Enable Test Engine / Automation features.
//#define IMGUI_ENABLE_TEST_ENGINE // Enable imgui_test_engine hooks. Generally set automatically by include "imgui_te_config.h", see Test Engine for details.

//---- Include imgui_user.h at the end of imgui.h as a convenience
// May be convenient for some users to only explicitly include vanilla imgui.h and have extra stuff included.
//#define IMGUI_INCLUDE_IMGUI_USER_H
Expand Down
Loading

0 comments on commit 3d5482f

Please sign in to comment.