diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-05-28 21:03:55 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-05-28 21:03:55 -0700 |
commit | 127e6e67015b4cedc8b69d5f3ca26b060356e981 (patch) | |
tree | f165777086cf28be6f7bf90529c05b094fab4df0 /vdp.c | |
parent | 7758ccc8febb8b7c8b7c145e1fc582fb3ba159f6 (diff) |
Implemented SMS pause button
Diffstat (limited to 'vdp.c')
-rw-r--r-- | vdp.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1685,6 +1685,9 @@ static void vdp_advance_line(vdp_context *context) if (context->state == PREPARING) { context->state = ACTIVE; } + if (context->vcounter == 0x1FF) { + context->flags2 &= ~FLAG2_PAUSE; + } if (context->state != ACTIVE) { context->hint_counter = context->regs[REG_HINT]; @@ -3383,6 +3386,19 @@ uint32_t vdp_next_vint_z80(vdp_context * context) return context->cycles + cycles_to_vint; } +uint32_t vdp_next_nmi(vdp_context *context) +{ + if (!(context->flags2 & FLAG2_PAUSE)) { + return 0xFFFFFFFF; + } + return context->cycles + vdp_cycles_to_line(context, 0x1FF); +} + +void vdp_pbc_pause(vdp_context *context) +{ + context->flags2 |= FLAG2_PAUSE; +} + void vdp_int_ack(vdp_context * context) { //CPU interrupt acknowledge is only used in Mode 5 |