diff options
Diffstat (limited to 'src/mame/includes/polepos.h')
-rw-r--r-- | src/mame/includes/polepos.h | 77 |
1 files changed, 40 insertions, 37 deletions
diff --git a/src/mame/includes/polepos.h b/src/mame/includes/polepos.h index b7702b19237..5a3b553864e 100644 --- a/src/mame/includes/polepos.h +++ b/src/mame/includes/polepos.h @@ -37,6 +37,20 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + DECLARE_CUSTOM_INPUT_MEMBER(auto_start_r); + + void init_polepos2(); + + void polepos2bi(machine_config &config); + void topracern(machine_config &config); + void polepos(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_subcpu; required_device<cpu_device> m_subcpu2; @@ -44,6 +58,14 @@ public: optional_device<generic_latch_8_device> m_soundlatch; optional_device<namco_device> m_namco_sound; required_device<ls259_device> m_latch; + required_shared_ptr<uint16_t> m_sprite16_memory; + required_shared_ptr<uint16_t> m_road16_memory; + required_shared_ptr<uint16_t> m_alpha16_memory; + required_shared_ptr<uint16_t> m_view16_memory; + required_device<gfxdecode_device> m_gfxdecode; + required_device<screen_device> m_screen; + required_device<palette_device> m_palette; + uint8_t m_steer_last; uint8_t m_steer_delta; int16_t m_steer_accum; @@ -52,13 +74,6 @@ public: uint8_t m_last_unsigned; int m_adc_input; int m_auto_start_mask; - required_shared_ptr<uint16_t> m_sprite16_memory; - required_shared_ptr<uint16_t> m_road16_memory; - required_shared_ptr<uint16_t> m_alpha16_memory; - required_shared_ptr<uint16_t> m_view16_memory; - required_device<gfxdecode_device> m_gfxdecode; - required_device<screen_device> m_screen; - required_device<palette_device> m_palette; uint16_t m_vertical_position_modifier[256]; uint16_t m_road16_vscroll; @@ -67,33 +82,27 @@ public: int m_chacl; uint16_t m_scroll; uint8_t m_sub_irq_mask; + DECLARE_READ16_MEMBER(polepos2_ic25_r); - DECLARE_READ8_MEMBER(polepos_adc_r); - DECLARE_READ8_MEMBER(polepos_ready_r); + DECLARE_READ8_MEMBER(adc_r); + DECLARE_READ8_MEMBER(ready_r); DECLARE_WRITE_LINE_MEMBER(iosel_w); DECLARE_WRITE_LINE_MEMBER(gasel_w); DECLARE_WRITE_LINE_MEMBER(sb0_w); DECLARE_WRITE_LINE_MEMBER(chacl_w); - template<bool sub1> DECLARE_WRITE16_MEMBER(polepos_z8002_nvi_enable_w); - DECLARE_READ16_MEMBER(polepos_sprite16_r); - DECLARE_WRITE16_MEMBER(polepos_sprite16_w); - DECLARE_READ8_MEMBER(polepos_sprite_r); - DECLARE_WRITE8_MEMBER(polepos_sprite_w); - DECLARE_READ16_MEMBER(polepos_road16_r); - DECLARE_WRITE16_MEMBER(polepos_road16_w); - DECLARE_READ8_MEMBER(polepos_road_r); - DECLARE_WRITE8_MEMBER(polepos_road_w); - DECLARE_WRITE16_MEMBER(polepos_road16_vscroll_w); - DECLARE_READ16_MEMBER(polepos_view16_r); - DECLARE_WRITE16_MEMBER(polepos_view16_w); - DECLARE_READ8_MEMBER(polepos_view_r); - DECLARE_WRITE8_MEMBER(polepos_view_w); - DECLARE_WRITE16_MEMBER(polepos_view16_hscroll_w); - DECLARE_READ16_MEMBER(polepos_alpha16_r); - DECLARE_WRITE16_MEMBER(polepos_alpha16_w); - DECLARE_READ8_MEMBER(polepos_alpha_r); - DECLARE_WRITE8_MEMBER(polepos_alpha_w); - DECLARE_CUSTOM_INPUT_MEMBER(auto_start_r); + template<bool sub1> DECLARE_WRITE16_MEMBER(z8002_nvi_enable_w); + DECLARE_READ8_MEMBER(sprite_r); + DECLARE_WRITE8_MEMBER(sprite_w); + DECLARE_READ8_MEMBER(road_r); + DECLARE_WRITE8_MEMBER(road_w); + DECLARE_WRITE16_MEMBER(road16_vscroll_w); + DECLARE_WRITE16_MEMBER(view16_w); + DECLARE_READ8_MEMBER(view_r); + DECLARE_WRITE8_MEMBER(view_w); + DECLARE_WRITE16_MEMBER(view16_hscroll_w); + DECLARE_WRITE16_MEMBER(alpha16_w); + DECLARE_READ8_MEMBER(alpha_r); + DECLARE_WRITE8_MEMBER(alpha_w); DECLARE_WRITE8_MEMBER(out_0); DECLARE_WRITE8_MEMBER(out_1); DECLARE_READ8_MEMBER(namco_52xx_rom_r); @@ -102,20 +111,14 @@ public: DECLARE_READ8_MEMBER(steering_changed_r); DECLARE_READ8_MEMBER(steering_delta_r); DECLARE_WRITE8_MEMBER(bootleg_soundlatch_w); - void init_polepos2(); TILE_GET_INFO_MEMBER(bg_get_tile_info); TILE_GET_INFO_MEMBER(tx_get_tile_info); - DECLARE_MACHINE_RESET(polepos); - DECLARE_VIDEO_START(polepos); DECLARE_PALETTE_INIT(polepos); - uint32_t screen_update_polepos(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(polepos_scanline); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + TIMER_DEVICE_CALLBACK_MEMBER(scanline); void draw_road(bitmap_ind16 &bitmap); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); void zoom_sprite(bitmap_ind16 &bitmap,int big,uint32_t code,uint32_t color,int flipx,int sx,int sy,int sizex,int sizey); - void polepos2bi(machine_config &config); - void topracern(machine_config &config); - void polepos(machine_config &config); void sound_z80_bootleg_iomap(address_map &map); void sound_z80_bootleg_map(address_map &map); void topracern_io(address_map &map); |