static void pitfighb_cheap_slapstic_init(void) { /* install a read handler */ bslapstic_base = install_mem_read16_handler(0, 0x038000, 0x03ffff, pitfighb_cheap_slapstic_r); /* allocate memory for a copy of bank 0 */ bslapstic_bank0 = auto_malloc(0x2000); if (bslapstic_bank0) memcpy(bslapstic_bank0, bslapstic_base, 0x2000); /* not primed by default */ bslapstic_primed = 0; }
static void init_thndzone(void) { const data8_t *src = memory_region(REGION_GFX1); data8_t *dst = memory_region(REGION_GFX2); data8_t *tmp = (data8_t *)malloc(0x80000); /* Playfield 4 also has access to the char graphics, make things easier by just copying the chars to both banks (if I just used a different gfx bank then the colours would be wrong). */ memcpy(tmp+0x000000,dst+0x80000,0x80000); memcpy(dst+0x090000,tmp+0x00000,0x80000); memcpy(dst+0x080000,src+0x00000,0x10000); memcpy(dst+0x110000,src+0x10000,0x10000); free(tmp); /* Save time waiting on vblank bit */ install_mem_read16_handler(0, 0x3f8000, 0x3f8001, thndzone_main_skip); }
ROM_END /************************************* * * Driver initialization * *************************************/ void init_exterm(void) { memcpy(exterm_code_rom, memory_region(REGION_USER1), code_rom_size); /* install speedups */ exterm_master_speedup = install_mem_read16_handler(0, TOBYTE(0x00c800e0), TOBYTE(0x00c800ef), exterm_master_speedup_r); exterm_slave_speedup = install_mem_write16_handler(1, TOBYTE(0xfffffb90), TOBYTE(0xfffffb9f), exterm_slave_speedup_w); install_mem_read_handler(2, 0x0007, 0x0007, exterm_sound_dac_speedup_r); install_mem_read_handler(3, 0x02b6, 0x02b6, exterm_sound_ym2151_speedup_r); /* set up mirrored ROM access */ cpu_setbank(1, exterm_code_rom); cpu_setbank(2, exterm_code_rom); }