Mercurial > repos > blastem
diff m68k_core.c @ 2350:f8b5142c06aa
Allow 68K to return mid-instruction. Adjust how 68K interrupt ack works so int2 busy flag timing is more correct. Fix some other SCD timing issues
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 16 Oct 2023 23:30:04 -0700 |
parents | 0111c8344477 |
children | 66b3f2eda0c8 |
line wrap: on
line diff
--- a/m68k_core.c Fri Oct 13 22:44:36 2023 -0700 +++ b/m68k_core.c Mon Oct 16 23:30:04 2023 -0700 @@ -1206,7 +1206,9 @@ void resume_68k(m68k_context *context) { code_ptr addr = context->resume_pc; - context->resume_pc = NULL; + if (!context->stack_storage_count) { + context->resume_pc = NULL; + } m68k_options * options = context->options; context->should_return = 0; options->start_context(addr, context); @@ -1220,6 +1222,8 @@ //switching from user to system mode so swap stack pointers context->aregs[8] = context->aregs[7]; } + context->resume_pc = NULL; + context->stack_storage_count = 0; context->status = 0x27; context->aregs[7] = ((uint32_t)reset_vec[0]) << 16 | reset_vec[1]; uint32_t address = ((uint32_t)reset_vec[2]) << 16 | reset_vec[3];