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
Dizzy
Posts: 91
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 » Tue Jan 22, 2019 10:22 pm

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?
0 x
All software to-date

Current Projects:
Currently working on ZX Adventure Designer, which lets one create point-and-click graphic adventures for a 48K Spectrum.

serbalgi
Berk
Posts: 26
Joined: Sat Jan 06, 2018 11:13 am

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

Post by serbalgi » Tue Jan 22, 2019 11:08 pm

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
1 x

User avatar
PROSM
Dizzy
Posts: 91
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 » Wed Jan 23, 2019 5:26 pm

Thanks @serbalgi! This worked a treat :D
0 x
All software to-date

Current Projects:
Currently working on ZX Adventure Designer, which lets one create point-and-click graphic adventures for a 48K Spectrum.

Post Reply