Mercurial > repos > blastem
diff gdb_remote.c @ 2500:d44fe974fb85
Get blastem compiling with new 68K core
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 30 Apr 2024 22:32:08 -0700 |
parents | d74d3998482c |
children | 7e86ec94c899 |
line wrap: on
line diff
--- a/gdb_remote.c Tue Apr 30 00:02:14 2024 -0700 +++ b/gdb_remote.c Tue Apr 30 22:32:08 2024 -0700 @@ -107,22 +107,30 @@ uint32_t calc_status(m68k_context * context) { uint32_t status = context->status << 3; +#ifdef NEW_CORE + //TODO: implement me +#else for (int i = 0; i < 5; i++) { status <<= 1; status |= context->flags[i]; } +#endif return status; } void update_status(m68k_context * context, uint16_t value) { context->status = value >> 8; +#ifdef NEW_CORE + //TODO: implement me +#else for (int i = 4; i >= 0; i--) { context->flags[i] = value & 1; value >>= 1; } +#endif } static uint8_t m68k_read_byte(m68k_context *context, uint32_t address) @@ -184,6 +192,7 @@ //TODO: implement resuming at an arbitrary address goto not_impl; } +#ifndef NEW_CORE m68kinst inst; genesis_context *gen = context->system; uint32_t after = m68k_decode(m68k_instruction_fetch, context, &inst, pc & 0xFFFFFF); @@ -206,6 +215,7 @@ } } insert_breakpoint(context, after, gdb_debug_enter); +#endif cont = 1; expect_break_response = 1; @@ -441,6 +451,7 @@ break; case 's': case 'S': { +#ifndef NEW_CORE m68kinst inst; genesis_context *gen = context->system; uint32_t after = m68k_decode(m68k_instruction_fetch, context, &inst, pc & 0xFFFFFF); @@ -463,6 +474,7 @@ } } insert_breakpoint(context, after, gdb_debug_enter); +#endif cont = 1; expect_break_response = 1;