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

Further debugging tools #65

Open
kaithar opened this issue Feb 10, 2025 · 3 comments
Open

Further debugging tools #65

kaithar opened this issue Feb 10, 2025 · 3 comments

Comments

@kaithar
Copy link

kaithar commented Feb 10, 2025

I've taken a brief scan over the way the CPU is advanced, if I'm following correctly this part of the code primarily works by batching cycle advance into advancing N cycles per loop rather than guaranteeing a certain number of instructions or instruction completion...

For working with ROMs I would ideally like an instruction granular debugger, some something that would allow CPU tracing, breakpoints and single step. With the way memory is handled it seems like memory inspection is trivial enough but how realistic would it be to implement a debugger mechanic like that? My naive approach would be to start from SyncM68k, use another thread for the debugger and freeze the emulator with a spinlock... I have no idea if that would work with the overall design though.

FWIW, I'm currently using Blastem's builtin debugger, which is nice at single stepping but is really rough. Ares and bizhawk have good CPU IOP tracing but they're really frame advance only and Ares has questionable memory inspection. Higan and Gens are discarded for inactivity, Exodus looks really cool but isn't portable. Mednafen is actually pretty close to doing what I need but this project would be preferable for a number of reasons.

Hope all that's not coming off as too needy 😅

@Clownacy
Copy link
Owner

I have been meaning to make it so that the emulator core can be advanced by an arbitrary number of cycles. That way, the whole emulator can be single-stepped a cycle (or instruction) at a time. That is waiting on an overhaul of the synchronisation system however, so that feature may not arrive for a while.

@kaithar
Copy link
Author

kaithar commented Feb 12, 2025

Mmm, synchronisation as in locking or as in making different parts appear to emulate at the same time so cycles are synced up?

@Clownacy
Copy link
Owner

The latter: I mean the part that detects when to update components, determines the number of cycles to do, and then batch-updates them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants