From 0f151264284052e9a3a2b39a2c0772c843069ba4 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Tue, 23 Jun 2015 09:03:50 +0200 Subject: [PATCH] namcos1: Remove direct-update-handler-using optimization, will be done differently later [O. Galibert] --- src/mame/includes/namcos1.h | 4 ---- src/mame/machine/namcos1.c | 31 ------------------------------- 2 files changed, 35 deletions(-) diff --git a/src/mame/includes/namcos1.h b/src/mame/includes/namcos1.h index bd7b320bdb8..8a5296ca76f 100644 --- a/src/mame/includes/namcos1.h +++ b/src/mame/includes/namcos1.h @@ -68,9 +68,6 @@ public: int m_copy_sprites; UINT8 m_drawmode_table[16]; - DECLARE_DIRECT_UPDATE_MEMBER(direct_handler_main); - DECLARE_DIRECT_UPDATE_MEMBER(direct_handler_sub); - DECLARE_WRITE_LINE_MEMBER(subres_w); DECLARE_WRITE8_MEMBER(irq_ack_w); DECLARE_READ8_MEMBER(dsw_r); @@ -138,6 +135,5 @@ public: void init_DACs(); private: - inline offs_t direct_handler(int whichcpu, direct_read_data &direct, offs_t address); inline void get_tile_info(tile_data &tileinfo,int tile_index,UINT8 *info_vram); }; diff --git a/src/mame/machine/namcos1.c b/src/mame/machine/namcos1.c index b4f1d044c42..6c6667bd8b8 100644 --- a/src/mame/machine/namcos1.c +++ b/src/mame/machine/namcos1.c @@ -488,34 +488,6 @@ WRITE8_MEMBER(namcos1_state::sound_bankswitch_w) * * *******************************************************************************/ -// These direct handlers are merely for speed - taking two trips -// through the memory system for every opcode fetch is rather slow - -DIRECT_UPDATE_MEMBER(namcos1_state::direct_handler_main) -{ - return direct_handler(0, direct, address); -} - -DIRECT_UPDATE_MEMBER(namcos1_state::direct_handler_sub) -{ - return direct_handler(1, direct, address); -} - -inline offs_t namcos1_state::direct_handler(int whichcpu, direct_read_data &direct, offs_t address) -{ - offs_t remapped_address = m_c117->remap(whichcpu, address); - - // if not in ROM, return - if (remapped_address < 0x400000) return address; - - // calculate the base of the 8KB ROM page - remapped_address &= 0x3fe000; - - direct.explicit_configure(address & 0xe000, address | 0x1fff, 0x1fff, &m_rom[remapped_address]); - return ~0; -} - - WRITE_LINE_MEMBER(namcos1_state::subres_w) { // logerror("reset control pc=%04x %02x\n",space.device().safe_pc(),data); @@ -641,9 +613,6 @@ void namcos1_state::driver_init() } } - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(namcos1_state::direct_handler_main), this)); - m_subcpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(namcos1_state::direct_handler_sub), this)); - // kludge! see notes m_mcu->space(AS_PROGRAM).install_write_handler(0xc000, 0xc000, write8_delegate(FUNC(namcos1_state::mcu_patch_w), this));