Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger #119

Merged
merged 40 commits into from
Sep 19, 2024
Merged

Debugger #119

merged 40 commits into from
Sep 19, 2024

Conversation

alloncm
Copy link
Owner

@alloncm alloncm commented Apr 1, 2023

Add a cli debugger to magenboy sdl frontend

Todo:

  • Consider adding more features
    • Memory watch point
    • PPU info
    • PPU layers viewer
    • Disassembler / Hex view of the current program counter
  • Document the debugger commands
  • Clean code and spell check

Copy link
Owner Author

@alloncm alloncm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review

lib_gb/src/machine/gameboy.rs Outdated Show resolved Hide resolved
lib_gb/src/machine/gameboy.rs Outdated Show resolved Hide resolved
lib_gb/src/machine/debugger.rs Outdated Show resolved Hide resolved
lib_gb/src/machine/debugger.rs Outdated Show resolved Hide resolved
lib_gb/src/machine/debugger.rs Outdated Show resolved Hide resolved
gb/src/terminal_debugger.rs Outdated Show resolved Hide resolved
@alloncm alloncm marked this pull request as draft April 1, 2023 20:05
@alloncm alloncm added the enhancement New feature or request label Jun 11, 2023
Rename gb -> sdl, lib_gb -> core

Move image_inter into common

rename std feature to os
Conflicts:
	README.md
	core/src/machine/gameboy.rs
	gb/Cargo.toml
	gb/src/main.rs
	lib_gb/src/machine/gameboy.rs
core/src/utils/mod.rs Outdated Show resolved Hide resolved
core/src/utils/stack_string.rs Outdated Show resolved Hide resolved
core/src/utils/fixed_size_set.rs Outdated Show resolved Hide resolved
core/src/mmu/gb_mmu.rs Outdated Show resolved Hide resolved
core/src/machine/gameboy.rs Outdated Show resolved Hide resolved
sdl/src/terminal_debugger.rs Show resolved Hide resolved
sdl/src/terminal_debugger.rs Outdated Show resolved Hide resolved
sdl/src/terminal_debugger.rs Outdated Show resolved Hide resolved
@alloncm
Copy link
Owner Author

alloncm commented Jul 13, 2023

https://stackoverflow.com/questions/76173195/my-rust-project-is-broken-all-of-the-sudden

This broke the project cause I used indirectly ntapi crate

Imolemented as an external impl for gameboy since it needs all its state
Also add a verbose command name for the commands
core/Cargo.toml Outdated Show resolved Hide resolved
core/src/cpu/disassembler.rs Outdated Show resolved Hide resolved
core/src/mmu/gb_mmu.rs Outdated Show resolved Hide resolved
core/src/machine/gameboy.rs Show resolved Hide resolved
core/src/debugger/mod.rs Outdated Show resolved Hide resolved
core/src/debugger/mod.rs Show resolved Hide resolved
core/src/machine/gameboy.rs Outdated Show resolved Hide resolved
…osed

First of all allow the ppu layer windows to be closed by managing them in the main thread

Also have been calling SDL_PumpEvents in the incorrect thread + managed the windows not in the video subsystem initializing thread.
@alloncm alloncm marked this pull request as ready for review July 20, 2024 20:26
@alloncm
Copy link
Owner Author

alloncm commented Jul 27, 2024

https://nullprogram.com/blog/2023/01/08/

Maybe fix the accelerated issue they mention here?

@alloncm
Copy link
Owner Author

alloncm commented Sep 14, 2024

Currently crash with stack overflow on debug builds

Consider make magenboy_core depend on std if dbg feature is activated

The debugger now uses std in order to simplify the usage
and since only the sdl frontend uses it
there is no reason to have no_std debugger
@alloncm alloncm merged commit 6694eac into master Sep 19, 2024
1 check passed
@alloncm alloncm deleted the feature/dbg branch September 19, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant