[hatari-devel] Conditional breakpoint code, please comment!
Eero Tamminen
eerot at users.berlios.de
Sat Jul 4 15:21:31 CEST 2009
Hi,
> On Friday 03 July 2009, npomarede at corp.free.fr wrote:
> > I committed a change to handle addresses between 0xff8000 and 0xffffff.
> >
> > In the case of indirect addresses, I also added a mask to only keep the
> > 24 lower bits of the address (when checking value and reading memory).
> > This way $ffff820a is also recognized as io mem $ff820a (which is the
> > same in the 68000).
Btw. Why the masking is done both when checking breakpoints:
--------------------------------
@@ -102,6 +102,8 @@
*/
static Uint32 BreakCond_ReadSTMemory(Uint32 addr, const bc_value_t
*bc_value)
{
+ addr &= 0x00ffffff; /* use a 24 bit address */
+
switch (bc_value->bits) {
case 32:
return STMemory_ReadLong(addr);
--------------------------------
And when parsing them:
--------------------------------
@@ -301,7 +303,9 @@
EXITFUNC(("-> true (DSP)\n"));
return true;
}
- if ((addr > STRamEnd && addr < 0xe00000) || addr > 0xff0000) {
+
+ addr &= 0x00ffffff; /* use a 24 bit address */
+ if ((addr > STRamEnd && addr < 0xe00000) || (addr >= 0xff0000 && addr <
0xff8000)) {
--------------------------------
Why parsing stage shouldn't give a warning if given address is > 0x00ffffff?
(user probably mistyped it and masking it would be misleading?)
- Eero
More information about the hatari-devel
mailing list