mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-22 20:30:22 +00:00
debugger is mandatory, you *will* like it!
This commit is contained in:
parent
e71efa3acd
commit
d5c5654931
30
src/cpu.S
30
src/cpu.S
@ -75,7 +75,6 @@
|
||||
(,EffectiveAddr_E,8); \
|
||||
|
||||
/* h means hooked */
|
||||
#ifdef DEBUGGER
|
||||
#define GetFromEA_Bh orb $1, SN(cpu65_debug)+3; \
|
||||
GetFromEA_B
|
||||
|
||||
@ -87,12 +86,6 @@
|
||||
* is zero, and is inserted into Continue */
|
||||
#define ZeroOp mov %al, SN(cpu65_debug)+3;
|
||||
|
||||
#else /* !DEBUGGER */
|
||||
#define GetFromEA_Bh GetFromEA_B
|
||||
#define PutToEA_Bh PutToEA_B
|
||||
#define ZeroOp
|
||||
#endif /* !DEBUGGER */
|
||||
|
||||
/* The OR actually functions as a move, but we
|
||||
* want to set the flags and we know %ah is zero */
|
||||
#define Continue movl SN(cpu65_delay), %eax; \
|
||||
@ -2470,8 +2463,6 @@ op_XMA_imm:
|
||||
|
||||
/* Exception handler */
|
||||
|
||||
#ifdef DEBUGGER
|
||||
|
||||
exception: cmpb $RebootSig, %ah
|
||||
jz ex_reboot
|
||||
cmpb $ResetSig, %ah
|
||||
@ -2507,24 +2498,6 @@ ex_reset: movb $0, SN(cpu65__signal)
|
||||
GetFromPC_B
|
||||
jmp *cpu65__opcodes(,%eax,4)
|
||||
|
||||
#else /* !DEBUGGER */
|
||||
|
||||
exception: cmpb $RebootSig, %ah
|
||||
jz ex_reboot
|
||||
ex_reset: movb $0, SN(cpu65__signal)
|
||||
movw $0xfffc, EffectiveAddr
|
||||
GetFromEA_W
|
||||
movw %ax, PC_Reg
|
||||
xorb %ah, %ah
|
||||
GetFromPC_B
|
||||
jmp *cpu65__opcodes(,%eax,4)
|
||||
|
||||
ex_reboot: popal
|
||||
movb $0, SN(cpu65__signal)
|
||||
ret;
|
||||
|
||||
#endif /* !DEBUGGER */
|
||||
|
||||
/* -----------------------------------------------------------------
|
||||
* Begin emulation.
|
||||
* ----------------------------------------------------------------- */
|
||||
@ -2542,8 +2515,6 @@ E(cpu65_run)
|
||||
movl $0x1FF, %edx # Stack pointer
|
||||
jmp ex_reset
|
||||
|
||||
#ifdef DEBUGGER
|
||||
|
||||
E (cpu65_direct_write)
|
||||
/* NB: dependent on register choices */
|
||||
pushl %edi
|
||||
@ -2562,7 +2533,6 @@ E(cpu65_step)
|
||||
ReplaceState
|
||||
GetFromPC_B
|
||||
jmp *cpu65__opcodes(,%eax,4)
|
||||
#endif
|
||||
|
||||
|
||||
/* Tables */
|
||||
|
@ -14,7 +14,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef DEBUGGER
|
||||
#include "debug.h"
|
||||
#include "misc.h"
|
||||
#include "keys.h"
|
||||
@ -1132,4 +1131,3 @@ void c_do_debugging() {
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* DEBUGGER */
|
||||
|
@ -30,11 +30,8 @@
|
||||
/* from misc.c */
|
||||
extern uid_t user, privileged;
|
||||
|
||||
#ifdef DEBUGGER
|
||||
/* from debugger.c */
|
||||
extern void c_do_debugging();
|
||||
#endif
|
||||
|
||||
|
||||
/* parameters for generic and keyboard-simulated joysticks */
|
||||
short joy_x = 127;
|
||||
@ -254,11 +251,9 @@ void c_periodic_update(int dummysig) {
|
||||
case kF5:
|
||||
c_interface_keyboard_layout();
|
||||
break;
|
||||
#ifdef DEBUGGER
|
||||
case kF7:
|
||||
cpu65_interrupt(EnterDebugSig);
|
||||
break;
|
||||
#endif
|
||||
#if 0
|
||||
case kF8:
|
||||
c_interface_words();
|
||||
@ -350,7 +345,6 @@ void c_periodic_update(int dummysig) {
|
||||
joy_x = joy_y = 256;
|
||||
}
|
||||
|
||||
#ifdef DEBUGGER
|
||||
/* Called from cpu code. Perhaps should be moved to misc.c, but was
|
||||
* abstracted from function above...
|
||||
*/
|
||||
@ -360,7 +354,6 @@ void enter_debugger(void)
|
||||
c_do_debugging();
|
||||
setitimer(ITIMER_VIRTUAL,&timer_on,0);
|
||||
}
|
||||
#endif /* DEBUGGER */
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
void c_read_raw_key() : handle a scancode
|
||||
|
@ -28,9 +28,7 @@
|
||||
#include "disk.h"
|
||||
#include "interface.h"
|
||||
#include "keys.h"
|
||||
#ifdef DEBUGGER
|
||||
#include "debug.h"
|
||||
#endif
|
||||
#include "cpu.h"
|
||||
#include "glue.h"
|
||||
#include "prefs.h"
|
||||
@ -47,12 +45,10 @@ static unsigned char apple_ii_rom[12288];
|
||||
static unsigned char apple_iie_rom[32768]; /* //e */
|
||||
#endif
|
||||
|
||||
#ifdef DEBUGGER
|
||||
/* in debugger.c */
|
||||
extern int breakpoints[];
|
||||
extern int watchpoints[];
|
||||
extern int op_breakpoints[256];
|
||||
#endif
|
||||
|
||||
GLUE_FIXED_READ(read_ram_default,apple_ii_64k)
|
||||
GLUE_FIXED_WRITE(write_ram_default,apple_ii_64k)
|
||||
@ -658,7 +654,6 @@ static void reinitialize(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
#ifdef DEBUGGER
|
||||
/* reset the watchpoints and breakpoints */
|
||||
for (i=0; i<MAX_BRKPTS; i++) {
|
||||
breakpoints[i] = -1;
|
||||
@ -667,7 +662,6 @@ static void reinitialize(void)
|
||||
for (i=0; i<0x100; i++) {
|
||||
op_breakpoints[(unsigned char)i] = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
c_initialize_vm();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user