Watch for specific value being written to address in FUSE debugger

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
Post Reply
User avatar
PROSM
Manic Miner
Posts: 473
Joined: Fri Nov 17, 2017 7:18 pm
Location: Sunderland, England
Contact:

Watch for specific value being written to address in FUSE debugger

Post by PROSM »

I've been wrestling with the FUSE debugger, and I can't figure out how to make it watch for a specific value being written to an address in memory. I can get the breakpoint to trigger for any write to the address, but I only want execution to stop if this one value is written to memory. I haven't been able to work it out yet using the documentation - does anyone have any ideas?
All software to-date
Working on something, as always.
serbalgi
Drutt
Posts: 27
Joined: Sat Jan 06, 2018 11:13 am

Re: Watch for specific value being written to address in FUSE debugger

Post by serbalgi »

Code: Select all

br{eakpoint} (re{ad}|w{rite}) [address] [if condition]

Square brackets  (`['  and  `]')  can  be  used to dereference a value; for example
`[0x4000]' will give the value of the first byte of the screen.
Not sure if that's possible. You can test the value being overwritten:

Code: Select all

break write 0x5c78 if [0x5c78] == 0x0035
or if you known the new value is stored in a register:

Code: Select all

break write 0x5c78 if z80:HL == 0x0036
User avatar
PROSM
Manic Miner
Posts: 473
Joined: Fri Nov 17, 2017 7:18 pm
Location: Sunderland, England
Contact:

Re: Watch for specific value being written to address in FUSE debugger

Post by PROSM »

Thanks [mention]serbalgi[/mention]! This worked a treat :D
All software to-date
Working on something, as always.
Post Reply