Mercurial > repos > blastem
diff blastem.c @ 280:9ee64039ddeb
Fix bank register update
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 03 May 2013 21:09:48 -0700 |
parents | 6be6056735a9 |
children | a8ee7934a1f8 |
line wrap: on
line diff
--- a/blastem.c Fri May 03 20:18:28 2013 -0700 +++ b/blastem.c Fri May 03 21:09:48 2013 -0700 @@ -133,7 +133,7 @@ uint8_t busack = 0; uint32_t busack_cycle = CYCLE_NEVER; uint8_t new_busack = 0; -#define DO_DEBUG_PRINT +//#define DO_DEBUG_PRINT #ifdef DO_DEBUG_PRINT #define dprintf printf #define dputs puts @@ -403,11 +403,13 @@ } else { if (busreq) { dputs("releasing z80 bus"); + #ifdef DO_DEBUG_PRINT char fname[20]; sprintf(fname, "zram-%d", zram_counter++); FILE * f = fopen(fname, "wb"); fwrite(z80_ram, 1, sizeof(z80_ram), f); fclose(f); + #endif z80_context * z_context = context->next_cpu; //TODO: Add necessary delay between release of busreq and resumption of execution z_context->current_cycle = (context->current_cycle * MCLKS_PER_68K) / MCLKS_PER_Z80; @@ -492,11 +494,13 @@ } else { if (busreq) { dprintf("releasing Z80 bus @ %d\n", (context->current_cycle * MCLKS_PER_68K) / MCLKS_PER_Z80); + #ifdef DO_DEBUG_PRINT char fname[20]; sprintf(fname, "zram-%d", zram_counter++); FILE * f = fopen(fname, "wb"); fwrite(z80_ram, 1, sizeof(z80_ram), f); fclose(f); + #endif z80_context * z_context = context->next_cpu; //TODO: Add necessary delay between release of busreq and resumption of execution z_context->current_cycle = (context->current_cycle * MCLKS_PER_68K) / MCLKS_PER_Z80;