Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
01781 Debugger Minor Always May 5, 2008, 18:15 May 18, 2008, 17:32
Tester Pugsy View Status Public Platform MAME (Self-compiled)
Assigned To Resolution Fixed OS
Status [?] Resolved Driver
Version 0.125 Fixed in Version Build Debug
Fixed in Git Commit Github Pull Request #
Summary 01781: blazlaz: [debug] Watchpoints on PCE based driver not working as expected
Description Unable to set watchpoints on a small range of memory addresses, however if a massive memory range is specified the watchpoints work as expected
Steps To Reproduce The command "wp 0,1fffff,w" on CPU0 in blazlaz works as expected breaking out at addresses greater than 1F0000.

Yet, the command "wp 1f0000,ffff,w" on CPU0 has no effect whatsoever.
Additional Information
Github Commit
Flags Debug build specific
Regression Version
Affected Sets / Systems blazlaz
Attached Files
png file icon PC-EngineWPSET.png (30,416 bytes) May 15, 2008, 15:53
There are no relationship linked to this issue.
User avatar
May 6, 2008, 02:02
Leaving acknowledged for more input from Devs and others skilled with Debug build operation.
User avatar
May 12, 2008, 00:26
I don't see anything being caught with the "wp 1f0000,ffff,w" command in debug mode. Assuming it's supposed to work as OP describes - the bug is confirmed.
User avatar
May 15, 2008, 15:53
edited on: May 15, 2008, 15:55
In HuC6280, $1F0000 is PHYSICAL. But debug_watchpoint_set() always uses LOGICAL mask and it's 0xFFFF in this CPU (because of 8-bit).
So you can't set the (start) address over $FFFF.
I think this CPU is special case but debugger command doesn't consider it.

But it's no problem because you can set valid watchpoint without any source fix.
(And I have created a lot of cheat codes for PC-Engine games with the debugger)

Use "wpaddr" condition.
For example : R-Type I
The address of a life is $1F1416. So...
wp 0,1fffff,w,wpaddr==1f1416
See screenshot. It works as expected.

If you want to modification simply...

#define ADDR2BYTE_MASKED(val,info,spc) (ADDR2BYTE(val,info,spc) & (info)->space[spc].logbytemask)
#define ADDR2BYTE_MASKED(val,info,spc) (ADDR2BYTE(val,info,spc) & (info)->space[spc].physbytemask)

"wp 1f1416,1,w" will work.
I don't know it's correct and side-effect for other CPUs.

...Is it a "bug"? I think only *ug*y lacks a knowledge of debug command so it's better to set this report as "Acknowledged".
User avatar
May 17, 2008, 10:36
Thanks Shi******, that was actually really helpful. I had't thought of using wpaddr in that manner, though that isn't what it was meant for - nice workaround mind.

I'm glad to see you're are helping out in other ways since your self-imposed exile from the cheat forums and submitting cheats. I do miss your presence and your cheats but like anything it has it benefits.
User avatar
May 18, 2008, 16:18
> *ug*y
Delete my account on your sight.
I NEVER visit your sight. I'm filled with resentment.
I have continued to create the cheat code for MAME/MESS, improve the cheat system and write cheat TIPS on my own right.
User avatar
May 18, 2008, 17:32
Do not carry on a grudge here.