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

Additional debugger features #4

Open
12 of 17 tasks
drhelius opened this issue Jan 14, 2024 · 11 comments
Open
12 of 17 tasks

Additional debugger features #4

drhelius opened this issue Jan 14, 2024 · 11 comments

Comments

@drhelius
Copy link
Owner

drhelius commented Jan 14, 2024

  • Improve debugger scroll
  • RAM search
  • Memory watch
  • Memory find
  • Step Into / Out
  • Audio debugger
  • Logger (emu logs, state of CPU, current instruction)
  • Break on cycles/instructions passed
  • Run to address
  • Address bookmarks in debugger and memory editor
  • Simplify breakpoints (read, write, execute)
  • Copy paste from memory
  • Save disassembly to text file
  • Add new debug symbols from debugger window
  • Breakpoints for VRAM, palette, registers
  • Editable registers
  • Option to initialize memory, registers, MPRs, etc with 0x00, 0xFF or random
@ToughkidDev
Copy link

There doesn't seem to be a way to directly change register values ​​while debugging.
This would be very useful.

@drhelius
Copy link
Owner Author

Added to the list

@ToughkidDev
Copy link

Since I have decided to participate, I will actively share my opinions.
When saving code as a text file, it seems that the OPCODE is missing.
Could you add it? Including OPCODE as comments, as displayed in Windows, would be very useful when analyzing the text file.
Your emulator is a blessing even from a developer's perspective.

@drhelius
Copy link
Owner Author

drhelius commented Jan 9, 2025

Thanks for your comments.

Yes, it's very easy to add.

@ToughkidDev
Copy link

I'm really glad that it has been extremely useful.
Thank you.

@jbrandwood
Copy link

What .sym file format(s) do you support, from which assembler(s)?

This doesn't seem to be documented, and the source code for add_symbol() in gui_debug_disassembler.cpp doesn't contain any comments that would help.

@drhelius
Copy link
Owner Author

What .sym file format(s) do you support, from which assembler(s)?

This doesn't seem to be documented, and the source code for add_symbol() in gui_debug_disassembler.cpp doesn't contain any comments that would help.

Thanks for bringing this to my attention.
It supports PCEAS, wla-dx and vasm symbol files. Added it to the readme.
If you feel that anything is missing or not working properly let me know.

@drhelius drhelius marked this as a duplicate of #12 Jan 30, 2025
@jbrandwood
Copy link

Thanks for bringing this to my attention. It supports PCEAS, wla-dx and vasm symbol files. Added it to the readme. If you feel that anything is missing or not working properly let me know.

I'll try a test soon, I'm just writing a new test ROM to confirm some of the edge cases of the VDC's DMA behavior for Mesen2's author.

I don't know if you saw, but PCEAS's "classic" .sym file format changed slightly a few months ago, and it now also supports a modified form of wla-dx's .sym file format so that it can provide source-level-debugging information to Mesen2.

I don't know if you plan to add source-level-debugging to Geargrafx, but even if not, you may wish to support the new .sym format if only to be able to read things like the size or is-a-function information for the symbols.

Best wishes,

John

@drhelius
Copy link
Owner Author

drhelius commented Jan 30, 2025

I don't know if you saw, but PCEAS's "classic" .sym file format changed slightly a few months ago, and it now also supports a modified form of wla-dx's .sym file format so that it can provide source-level-debugging information to Mesen2.

Source-level debugging is not planned for now. As in my other emus this is just a project for fun and learning. I usually focus on the emulation part and Geargrafx still lacks a lot of work on it.

But I will check the changes in PCEAS .sym format. Could you point me to where it is discussed?

@jbrandwood
Copy link

Source-level debugging is not planned for now. As in my other emus this is just a project for fun and learning. I usually focus on the emulation part and Geargrafx still lacks a lot of work on it.

There are some small quirks in the VDC access timings and when and just how long the CPU is stalled that will break certain games if you don't get the VCE -> VDC -> CPU interactions just right. Good luck!

But I will check the changes in PCEAS .sym format. Could you point me to where it is discussed?

The details haven't been publicly discussed as such, only the results.

Here's a summary of the format that I'll clean up a bit more and add to the HuC/HuCC/PCEAS repository, as you'll see, it's basically inspired by wla-dx, but with all of the block names changed because the contents are just a little bit different ...

; Generated by PCEAS

[information]
version 1

[source-files]
0001 "sgx_test.lst" ; IgnoreColumns=30
0002 "sgx_test.s"
0003 "..\..\..\include\hucc\hucc.asm"
...

    i.e.
    <filenumber> <filename>


[definitions]
00000000 SUPPORT_ADPCM
00000001 USING_MPR7
00000010 SGX_VDC_OFFSET
...

    i.e.
    <value> <symbolname>


[symbols]
00:4000 80000000 0001:000001e2:00 core_boot
00:e021 80000000 0001:00000233:00 core_hw_reset
00:e18c 80000000 0001:000006cb:00 _farpeekw.1
00:eaf0 80000000 0001:0000309d:00 _sgx_spr_get_y
00:ff13 c0000000 0001:00003109:00 _load_map.6
00:fff4 00000002 0001:000001b6:00 core_version
...

    i.e.
    <bank:address> <size> <filenumber:linenumber:columnnumber> <symbolname>

    n.b.
    <size> is OR'd with $80000000 for CODE, or $c0000000 for FUNC


[bank-to-source]
00:4000 80000003 0001:000001e2:00
00:4003 00000003 0001:000001ef:00
00:e04b 80000001 0001:0000024e:00
00:ff4f c000000a 0001:0000220e:00
00:ff59 c000000a 0001:000022bd:00
01:6000 00000008 0001:00001f48:00
01:cd17 80000003 0001:00002f1f:00
...

    i.e.
    <bank:address> <size> <filenumber:linenumber:columnnumber>

    n.b.
    <size> is OR'd with $80000000 for CODE, or $c0000000 for FUNC

Please note that the "classic" PCEAS symbols use this format for symbols in Street Fighter II banks ...

1:40	6000	SAZ_VDC_DATA			
1:40	6000	saz_vdc				
2:7f	6000	SAZ_VCE_DATA			
2:7f	6000	saz_vce				

... where the first number before the ':' marks the 512KByte overlay number.

In the new Mesen2 .sym format, extra Street Fighter II 512KByte banks are just shown as banks >= $100, in blocks of 64 banks.

100:6000 00000000 0002:00000127:00 SAZ_VDC_DATA
100:6000 0000160b 0002:00000129:00 saz_vdc
17f:6000 00000000 0002:0000013e:00 SAZ_VCE_DATA
17f:6000 0000006a 0002:00000148:00 saz_vce

@drhelius
Copy link
Owner Author

Here's a summary of the format that I'll clean up a bit more and add to the HuC/HuCC/PCEAS repository

Thanks a lot for the information!

drhelius added a commit that referenced this issue Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants