libretro / mame

MAME - Multiple Arcade Machine Emulator
Other
63 stars 74 forks source link

MameDEV needs debugger enabled #30

Open jvook opened 7 years ago

jvook commented 7 years ago

Mamedev would prefer that the debugger be accessible in Retroarch. I believe this is for bug reporting purposes. I've asked them to elaborate as necessary here.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/45538679-mamedev-needs-debugger-enabled?utm_campaign=plugin&utm_content=tracker%2F48210062&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F48210062&utm_medium=issues&utm_source=github).
rb6502 commented 7 years ago

A few reasons: 1) It's used for advanced cheat finding 2) It's used by people who hack games (e.g. the gender-swap Donkey Kong that everyone loves) 3) It's used by home-brew developers for both the arcade platforms and the various computers and consoles (there's one guy that's developed several new VIC-20 games using MAME and the debugger to debug them) 4) It's used all the time by MAMEdev, so if you have any hopes of getting us to run RA or a libretro-compliant frontend, it needs to be included

And if you aren't running with it enabled there's no performance drop.

r-type commented 7 years ago

@jvook @rb6502 yes it's a big lack in the current implementation , and we have to fill it.

for all you stated before and also because it's a upstream feature and this fork don't aim to be a castrated version (but a shallow fork with minimal changes to support the Libretro API backend , in my point of view ).

I'll look at try to find a way to deal with it.

rb6502 commented 7 years ago

Thanks, I appreciate you guys looking into this. I understand if it's not enabled for e.g. Android builds where it's not practical, but on the big 3 desktops it shouldn't be too hard.

r-type commented 7 years ago

I have done a little test to force build with USE_QTDEBUG=1. (only tested in linux for now) it works the basis but I encounter 3 problems.

mk1dbg x68kdbg

r-type commented 7 years ago

Getting poc qt windows debugger working too , need to fix the exit debugger crash to go ahead. can take some time but I’m on... I don’t have success with native windows debugger for now when activate it , i'm facing to "Value windows not supported for option debugger - falling back to auto"

on side note I get an retro ogl render module working but don't see any speed improvement over the soft one.

r-type commented 7 years ago

I'm slow but always on this issue !

I try to find an alternative to enable dbg on all platform without heavy dependency like Qt . mamedev debugimgui seem to be a good compromise.

As bgfx is not supported (as it need lots of change in the upstream code to bake an libretro implementation ,and since there is little chance that this will happen) I made (quickly and badly) an imgui software backend to permit debugimgui rendering. it's not perfect but at least it show up some things. (bad rendering , bugs, some finishes...)

I block on a problem because initially wait_for_debugger waits for an action but the rendering does not yet appear (problem inherent to libretro implementation). Therefore I have no choice than force m_running to true. I hope find another way to deal this problem.

dbgimgui_soft1

dbgimgui_soft0

vadosnaprimer commented 7 years ago

I block on a problem because initially wait_for_debugger waits for an action but the rendering does not yet appear (problem inherent to libretro implementation).

You mean the part where retro_load_game() doesn't actually start up mame (that instead happens only in retro_run())?