minor additions

This commit is contained in:
Dagen Brock 2016-10-19 12:04:01 -05:00
parent 39de1da525
commit 2beff689d0
3 changed files with 10 additions and 4 deletions

View File

@ -60,6 +60,7 @@ void U_STACK_TRACE();
#define DRECIP_DCYCS_IN_16MS (1.0 / (DCYCS_IN_16MS)) #define DRECIP_DCYCS_IN_16MS (1.0 / (DCYCS_IN_16MS))
#ifdef GSPLUS_LITTLE_ENDIAN #ifdef GSPLUS_LITTLE_ENDIAN
// @todo: look at using <byteswap.h> for fastest platform implementations
# define BIGEND(a) ((((a) >> 24) & 0xff) + \ # define BIGEND(a) ((((a) >> 24) & 0xff) + \
(((a) >> 8) & 0xff00) + \ (((a) >> 8) & 0xff00) + \
(((a) << 8) & 0xff0000) + \ (((a) << 8) & 0xff0000) + \

View File

@ -33,6 +33,8 @@ extern byte *g_memory_ptr;
extern byte *g_slow_memory_ptr; extern byte *g_slow_memory_ptr;
extern int halt_sim; extern int halt_sim;
extern int enter_debug; extern int enter_debug;
extern int g_dbg_step; //debug.c
extern int timeout; //debug.c
extern int g_c068_statereg; extern int g_c068_statereg;
extern word32 stop_run_at; extern word32 stop_run_at;
extern int Verbose; extern int Verbose;
@ -595,14 +597,13 @@ do_blank()
} }
} }
/* also called by do_step */
void void
do_go() do_go()
{ {
/* also called by do_step */
g_config_control_panel = 0; g_config_control_panel = 0;
clear_halt(); clear_halt();
run_prog(); run_prog();
show_regs(); show_regs();
g_config_control_panel = 1; g_config_control_panel = 1;
@ -614,16 +615,20 @@ do_step()
int size; int size;
int size_mem_imm, size_x_imm; int size_mem_imm, size_x_imm;
// run an instruction
do_go(); do_go();
// check accumulator size
size_mem_imm = 2; size_mem_imm = 2;
if(engine.psr & 0x20) { if(engine.psr & 0x20) {
size_mem_imm = 1; size_mem_imm = 1;
} }
// check xy size
size_x_imm = 2; size_x_imm = 2;
if(engine.psr & 0x10) { if(engine.psr & 0x10) {
size_x_imm = 1; size_x_imm = 1;
} }
// then disassemble
size = do_dis(stdout, engine.kpc, size_mem_imm, size_x_imm, 0, 0); size = do_dis(stdout, engine.kpc, size_mem_imm, size_x_imm, 0, 0);
} }
@ -701,7 +706,6 @@ read_line(char *buf, int len)
#ifdef _WIN32 #ifdef _WIN32
ret = win_nonblock_read_stdin(0, buf, 1); ret = win_nonblock_read_stdin(0, buf, 1);
#elif defined(__OS2__) #elif defined(__OS2__)
#else #else
/* Unix */ /* Unix */
ret = read(0, buf, 1); ret = read(0, buf, 1);

View File

@ -221,6 +221,7 @@ void show_bp(void);
void delete_bp(word32 addr); void delete_bp(word32 addr);
void do_blank(void); void do_blank(void);
void do_go(void); void do_go(void);
void do_go_debug(void); // socket debug ver
void do_step(void); void do_step(void);
void xam_mem(int count); void xam_mem(int count);
void show_hex_mem(int startbank, word32 start, int endbank, word32 end, int count); void show_hex_mem(int startbank, word32 start, int endbank, word32 end, int count);