mirror of
https://github.com/digarok/gsplus.git
synced 2025-02-17 11:31:11 +00:00
debugger - new WANTS_BRK bit. setting it will cause BRKS to invoke the debugger instead of being handled within the 65816.
This commit is contained in:
parent
dccb965631
commit
68260dcf6a
@ -81,7 +81,7 @@
|
||||
#define FPLUS_PLUS_3 0x10
|
||||
#define FPLUS_PLUS_X_M1 0x18
|
||||
|
||||
#define RET_BREAK 0x1
|
||||
#define RET_BRK 0x1
|
||||
#define RET_COP 0x2
|
||||
#define RET_WDM 0x3
|
||||
#define RET_MVP 0x4
|
||||
@ -100,6 +100,7 @@
|
||||
#define FLAG_IGNORE_MP 0x01
|
||||
#define FLAG_IGNORE_BP 0x02
|
||||
#define FLAG_STEP 0x04
|
||||
#define FLAG_WANT_BRK 0x08
|
||||
|
||||
#define MODE_BORDER 0
|
||||
#define MODE_TEXT 1
|
||||
|
@ -1026,15 +1026,16 @@ int enter_engine(Engine_reg *engine_ptr) {
|
||||
word32 addr_latch;
|
||||
word32 tmp1, tmp2;
|
||||
|
||||
word32 flags = 0;
|
||||
word32 saved_pc = 0;
|
||||
word32 saved_psr = 0;
|
||||
|
||||
word32 abort_support = g_num_mp_breakpoints ? 1 : 0;
|
||||
word32 kpc_support = g_num_bp_breakpoints ? 1 : 0;
|
||||
|
||||
|
||||
if (engine_ptr->flags & FLAG_IGNORE_MP) abort_support = 0;
|
||||
if (engine_ptr->flags & FLAG_IGNORE_BP) kpc_support = 0;
|
||||
flags = engine_ptr->flags;
|
||||
if (flags & FLAG_IGNORE_MP) abort_support = 0;
|
||||
if (flags & FLAG_IGNORE_BP) kpc_support = 0;
|
||||
|
||||
|
||||
tmp_pc_ptr = 0;
|
||||
|
@ -71,16 +71,17 @@ brk_testing_SYM
|
||||
DEC_KPC2;
|
||||
CYCLES_PLUS_2
|
||||
b dispatch_done
|
||||
depi RET_BREAK,3,4,ret0
|
||||
depi RET_BRK,3,4,ret0
|
||||
|
||||
#else
|
||||
GET_1BYTE_ARG;
|
||||
if(g_testing) {
|
||||
|
||||
if(flags & FLAG_WANT_BRK) {
|
||||
CYCLES_PLUS_2;
|
||||
FINISH(RET_BREAK, arg);
|
||||
FINISH(RET_BRK, arg);
|
||||
}
|
||||
g_num_brk++;
|
||||
INC_KPC_2;
|
||||
g_num_brk++;
|
||||
|
||||
psr = psr & (~0x82);
|
||||
psr |= (neg << 7);
|
||||
|
@ -2239,9 +2239,6 @@ void handle_action(word32 ret) {
|
||||
|
||||
type = EXTRU(ret,3,4);
|
||||
switch(type) {
|
||||
case RET_BREAK:
|
||||
do_break(ret & 0xff);
|
||||
break;
|
||||
case RET_COP:
|
||||
do_cop(ret & 0xff);
|
||||
break;
|
||||
@ -2279,6 +2276,7 @@ void handle_action(word32 ret) {
|
||||
break;
|
||||
case RET_BP:
|
||||
case RET_MP:
|
||||
case RET_BRK:
|
||||
/* handled elsewhere */
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user