diff options
Diffstat (limited to 'src/mame/includes')
208 files changed, 2455 insertions, 1841 deletions
diff --git a/src/mame/includes/s11.h b/src/mame/includes/s11.h index 9c73da17393..4e92c7d9868 100644 --- a/src/mame/includes/s11.h +++ b/src/mame/includes/s11.h @@ -48,6 +48,13 @@ public: , m_digits(*this, "digit%u", 0U) { } + void s11(machine_config &config); + + void init_s11(); + + DECLARE_INPUT_CHANGED_MEMBER(main_nmi); + DECLARE_INPUT_CHANGED_MEMBER(audio_nmi); + DECLARE_READ8_MEMBER(sound_r); DECLARE_WRITE8_MEMBER(bank_w); DECLARE_WRITE8_MEMBER(dig0_w); @@ -57,6 +64,7 @@ public: DECLARE_WRITE8_MEMBER(sol2_w) { }; // solenoids 8-15 DECLARE_WRITE8_MEMBER(sol3_w); // solenoids 0-7 DECLARE_WRITE8_MEMBER(sound_w); + DECLARE_WRITE8_MEMBER(pia2c_pa_w); DECLARE_WRITE8_MEMBER(pia2c_pb_w); DECLARE_WRITE8_MEMBER(pia34_pa_w); @@ -64,9 +72,7 @@ public: DECLARE_WRITE_LINE_MEMBER(pia34_cb2_w); DECLARE_WRITE8_MEMBER(pia40_pb_w); DECLARE_WRITE_LINE_MEMBER(pia40_cb2_w); - DECLARE_READ8_MEMBER(switch_r); - DECLARE_WRITE8_MEMBER(switch_w); - DECLARE_READ8_MEMBER(pia28_w7_r); + DECLARE_WRITE_LINE_MEMBER(pias_ca2_w); DECLARE_WRITE_LINE_MEMBER(pias_cb2_w); DECLARE_WRITE_LINE_MEMBER(pia21_ca2_w); @@ -77,15 +83,17 @@ public: DECLARE_WRITE_LINE_MEMBER(pia30_cb2_w) { }; // dummy to stop error log filling up DECLARE_WRITE_LINE_MEMBER(ym2151_irq_w); DECLARE_WRITE_LINE_MEMBER(pia_irq); - DECLARE_INPUT_CHANGED_MEMBER(main_nmi); - DECLARE_INPUT_CHANGED_MEMBER(audio_nmi); + + DECLARE_READ8_MEMBER(switch_r); + DECLARE_WRITE8_MEMBER(switch_w); + DECLARE_READ8_MEMBER(pia28_w7_r); + +protected: DECLARE_MACHINE_RESET(s11); - void init_s11(); - void s11(machine_config &config); void s11_audio_map(address_map &map); void s11_bg_map(address_map &map); void s11_main_map(address_map &map); -protected: + // devices required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_audiocpu; @@ -114,10 +122,12 @@ protected: void set_segment2(uint32_t s) { m_segment2 = s; } void set_timer(emu_timer* t) { m_irq_timer = t; } - virtual void machine_start() override { m_digits.resolve(); } - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; static const device_timer_id TIMER_IRQ = 0; + private: + virtual void machine_start() override { m_digits.resolve(); } + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + uint8_t m_sound_data; uint8_t m_strobe; uint8_t m_kbdrow; diff --git a/src/mame/includes/s11a.h b/src/mame/includes/s11a.h index 3220a2d0f17..e47e37c8e07 100644 --- a/src/mame/includes/s11a.h +++ b/src/mame/includes/s11a.h @@ -18,19 +18,19 @@ public: : s11_state(mconfig, type, tag) { } + void s11a(machine_config &config); + + void init_s11a(); + DECLARE_WRITE8_MEMBER(bgbank_w); DECLARE_WRITE8_MEMBER(dig0_w); + +private: DECLARE_MACHINE_RESET(s11a); - void init_s11a(); - void s11a(machine_config &config); void s11a_audio_map(address_map &map); void s11a_bg_map(address_map &map); void s11a_main_map(address_map &map); -protected: - -private: - }; #endif // MAME_INCLUDES_S11A_H diff --git a/src/mame/includes/s11b.h b/src/mame/includes/s11b.h index 1ede5d1d446..4eed61422ad 100644 --- a/src/mame/includes/s11b.h +++ b/src/mame/includes/s11b.h @@ -19,6 +19,11 @@ public: , m_bg_hc55516(*this, "hc55516_bg") { } + void s11b(machine_config &config); + + void init_s11b(); + void init_s11b_invert(); + DECLARE_WRITE8_MEMBER(dig1_w); DECLARE_WRITE8_MEMBER(pia2c_pa_w); DECLARE_WRITE8_MEMBER(pia2c_pb_w); @@ -27,23 +32,20 @@ public: DECLARE_WRITE8_MEMBER(bg_speech_clock_w); DECLARE_WRITE8_MEMBER(bg_speech_digit_w); +protected: + void set_invert(bool inv) { m_invert = inv; } + +private: DECLARE_MACHINE_RESET(s11b); - void init_s11b(); - void init_s11b_invert(); - void s11b(machine_config &config); void s11b_audio_map(address_map &map); void s11b_bg_map(address_map &map); void s11b_main_map(address_map &map); -protected: + optional_device<hc55516_device> m_bg_hc55516; - void set_invert(bool inv) { m_invert = inv; } -private: bool m_invert; // later System 11B games start expecting inverted data to the display LED segments. - - }; #endif // MAME_INCLUDES_S11B_H diff --git a/src/mame/includes/s11c.h b/src/mame/includes/s11c.h index 5052ebbfcef..539c01947fb 100644 --- a/src/mame/includes/s11c.h +++ b/src/mame/includes/s11c.h @@ -18,18 +18,16 @@ public: : s11b_state(mconfig, type, tag) { } - DECLARE_MACHINE_RESET(s11c); + void s11c(machine_config &config); + void init_s11c(); - void s11c(machine_config &config); +private: + DECLARE_MACHINE_RESET(s11c); + void s11c_main_map(address_map &map); void s11c_audio_map(address_map &map); void s11c_bg_map(address_map &map); -protected: - -private: - - }; diff --git a/src/mame/includes/sage2.h b/src/mame/includes/sage2.h index 5542a6716ec..ff0259dc7df 100644 --- a/src/mame/includes/sage2.h +++ b/src/mame/includes/sage2.h @@ -47,6 +47,11 @@ public: , m_led(*this, "led0") { } + void sage2(machine_config &config); + + void init_sage2(); + +private: void update_fdc_int(); DECLARE_READ16_MEMBER(rom_r); @@ -63,11 +68,9 @@ public: DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); DECLARE_WRITE_LINE_MEMBER(write_centronics_select); DECLARE_WRITE_LINE_MEMBER(write_centronics_fault); - void sage2(machine_config &config); + void sage2_mem(address_map &map); - void init_sage2(); -protected: virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/samcoupe.h b/src/mame/includes/samcoupe.h index 1490f3c33af..076dbffa3ee 100644 --- a/src/mame/includes/samcoupe.h +++ b/src/mame/includes/samcoupe.h @@ -45,13 +45,6 @@ class samcoupe_state : public driver_device { public: - enum - { - TIMER_IRQ_OFF, - TIMER_MOUSE_RESET, - TIMER_VIDEO_UPDATE - }; - samcoupe_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -90,6 +83,16 @@ public: sam_bank_write_ptr[3] = nullptr; } + void samcoupe(machine_config &config); + +private: + enum + { + TIMER_IRQ_OFF, + TIMER_MOUSE_RESET, + TIMER_VIDEO_UPDATE + }; + virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -200,10 +203,10 @@ public: int m_lpt1_busy; int m_lpt2_busy; - void samcoupe(machine_config &config); + void samcoupe_io(address_map &map); void samcoupe_mem(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/saturn.h b/src/mame/includes/saturn.h index 716da438d50..0d5644f6419 100644 --- a/src/mame/includes/saturn.h +++ b/src/mame/includes/saturn.h @@ -48,6 +48,20 @@ public: { } + DECLARE_WRITE8_MEMBER(scsp_irq); + + // SMPC HLE delegates + DECLARE_WRITE_LINE_MEMBER(master_sh2_reset_w); + DECLARE_WRITE_LINE_MEMBER(master_sh2_nmi_w); + DECLARE_WRITE_LINE_MEMBER(slave_sh2_reset_w); + DECLARE_WRITE_LINE_MEMBER(sound_68k_reset_w); + DECLARE_WRITE_LINE_MEMBER(system_reset_w); + DECLARE_WRITE_LINE_MEMBER(system_halt_w); + DECLARE_WRITE_LINE_MEMBER(dot_select_w); + + DECLARE_WRITE_LINE_MEMBER(m68k_reset_callback); + +protected: required_region_ptr<uint32_t> m_rom; required_shared_ptr<uint32_t> m_workram_l; required_shared_ptr<uint32_t> m_workram_h; @@ -133,7 +147,7 @@ public: DECLARE_WRITE32_MEMBER(saturn_sinit_w); DECLARE_READ8_MEMBER(saturn_backupram_r); DECLARE_WRITE8_MEMBER(saturn_backupram_w); - DECLARE_WRITE8_MEMBER(scsp_irq); + int m_scsp_last_line; DECLARE_READ16_MEMBER ( saturn_vdp1_regs_r ); @@ -424,22 +438,10 @@ public: } stv_rbg_cache_data; - DECLARE_WRITE_LINE_MEMBER(m68k_reset_callback); - // DECLARE_WRITE_LINE_MEMBER(scudsp_end_w); // DECLARE_READ16_MEMBER(scudsp_dma_r); // DECLARE_WRITE16_MEMBER(scudsp_dma_w); - // SMPC HLE delegates - DECLARE_WRITE_LINE_MEMBER(master_sh2_reset_w); - DECLARE_WRITE_LINE_MEMBER(master_sh2_nmi_w); - DECLARE_WRITE_LINE_MEMBER(slave_sh2_reset_w); - DECLARE_WRITE_LINE_MEMBER(sound_68k_reset_w); - DECLARE_WRITE_LINE_MEMBER(system_reset_w); - DECLARE_WRITE_LINE_MEMBER(system_halt_w); - DECLARE_WRITE_LINE_MEMBER(dot_select_w); - - // void debug_scudma_command(int ref, const std::vector<std::string> ¶ms); // void debug_scuirq_command(int ref, const std::vector<std::string> ¶ms); // void debug_help_command(int ref, const std::vector<std::string> ¶ms); diff --git a/src/mame/includes/sauro.h b/src/mame/includes/sauro.h index 00de48f5b9d..4e3f34df336 100644 --- a/src/mame/includes/sauro.h +++ b/src/mame/includes/sauro.h @@ -21,6 +21,14 @@ public: m_videoram2(*this, "videoram2"), m_colorram2(*this, "colorram2") { } + void trckydoc(machine_config &config); + void tecfri(machine_config &config); + void sauro(machine_config &config); + void saurob(machine_config &config); + + void init_tecfri(); + +private: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; @@ -64,7 +72,6 @@ public: TILE_GET_INFO_MEMBER(get_tile_info_bg); TILE_GET_INFO_MEMBER(get_tile_info_fg); - void init_tecfri(); DECLARE_VIDEO_START(trckydoc); DECLARE_VIDEO_START(sauro); @@ -72,10 +79,7 @@ public: uint32_t screen_update_sauro(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void sauro_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); void trckydoc_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void trckydoc(machine_config &config); - void tecfri(machine_config &config); - void sauro(machine_config &config); - void saurob(machine_config &config); + void sauro_io_map(address_map &map); void sauro_map(address_map &map); void sauro_sound_map(address_map &map); diff --git a/src/mame/includes/sbasketb.h b/src/mame/includes/sbasketb.h index e39bc740b4b..0780c076d95 100644 --- a/src/mame/includes/sbasketb.h +++ b/src/mame/includes/sbasketb.h @@ -34,6 +34,12 @@ public: m_palette(*this, "palette") { } + void sbasketb(machine_config &config); + void sbasketbu(machine_config &config); + + void init_sbasketb(); + +private: /* memory pointers */ required_shared_ptr<uint8_t> m_colorram; required_shared_ptr<uint8_t> m_videoram; @@ -65,7 +71,6 @@ public: DECLARE_WRITE8_MEMBER(sbasketb_colorram_w); DECLARE_WRITE_LINE_MEMBER(flipscreen_w); DECLARE_WRITE_LINE_MEMBER(spriteram_select_w); - void init_sbasketb(); uint8_t m_SN76496_latch; DECLARE_WRITE8_MEMBER( konami_SN76496_latch_w ) { m_SN76496_latch = data; }; @@ -76,8 +81,7 @@ public: uint32_t screen_update_sbasketb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void sbasketb(machine_config &config); - void sbasketbu(machine_config &config); + void sbasketb_map(address_map &map); void sbasketb_sound_map(address_map &map); }; diff --git a/src/mame/includes/sbugger.h b/src/mame/includes/sbugger.h index ec4cd6d0290..20a717ded99 100644 --- a/src/mame/includes/sbugger.h +++ b/src/mame/includes/sbugger.h @@ -13,6 +13,9 @@ public: m_videoram_attr(*this, "videoram_attr"), m_videoram(*this, "videoram") { } + void sbugger(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; @@ -30,7 +33,6 @@ public: DECLARE_PALETTE_INIT(sbugger); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void sbugger(machine_config &config); void sbugger_io_map(address_map &map); void sbugger_map(address_map &map); }; diff --git a/src/mame/includes/sderby.h b/src/mame/includes/sderby.h index 2d40e6cea98..8e88291856f 100644 --- a/src/mame/includes/sderby.h +++ b/src/mame/includes/sderby.h @@ -18,6 +18,14 @@ public: m_lamps(*this, "lamp%u", 1U) { } + void spacewin(machine_config &config); + void sderbya(machine_config &config); + void pmroulet(machine_config &config); + void shinygld(machine_config &config); + void sderby(machine_config &config); + void luckboom(machine_config &config); + +private: DECLARE_READ16_MEMBER(sderby_input_r); DECLARE_READ16_MEMBER(sderbya_input_r); DECLARE_READ16_MEMBER(roulette_input_r); @@ -36,12 +44,6 @@ public: uint32_t screen_update_sderby(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_pmroulet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int codeshift); - void spacewin(machine_config &config); - void sderbya(machine_config &config); - void pmroulet(machine_config &config); - void shinygld(machine_config &config); - void sderby(machine_config &config); - void luckboom(machine_config &config); void luckboom_map(address_map &map); void roulette_map(address_map &map); void sderby_map(address_map &map); @@ -49,7 +51,6 @@ public: void shinygld_map(address_map &map); void spacewin_map(address_map &map); -protected: virtual void machine_start() override { m_lamps.resolve(); } virtual void video_start() override; diff --git a/src/mame/includes/segag80r.h b/src/mame/includes/segag80r.h index c20adbc5c98..550c4b2cc1c 100644 --- a/src/mame/includes/segag80r.h +++ b/src/mame/includes/segag80r.h @@ -25,11 +25,6 @@ class sega005_sound_device; class segag80r_state : public segag80snd_common { public: - enum - { - TIMER_VBLANK_LATCH_CLEAR - }; - segag80r_state(const machine_config &mconfig, device_type type, const char *tag) : segag80snd_common(mconfig, type, tag), m_mainram(*this, "mainram"), @@ -49,6 +44,43 @@ public: m_ppi(*this, "ppi8255"), m_decrypted_opcodes(*this, "decrypted_opcodes") { } + void g80r_base(machine_config &config); + void monsterb(machine_config &config); + void sindbadm(machine_config &config); + void astrob(machine_config &config); + void pignewt(machine_config &config); + void monster2(machine_config &config); + void sega005(machine_config &config); + void spaceod(machine_config &config); + void astrob_sound_board(machine_config &config); + void sega005_sound_board(machine_config &config); + void spaceod_sound_board(machine_config &config); + void monsterb_sound_board(machine_config &config); + + void init_spaceod(); + void init_sindbadm(); + void init_pignewt(); + void init_monsterb(); + void init_005(); + void init_monster2(); + void init_astrob(); + + DECLARE_INPUT_CHANGED_MEMBER(service_switch); + + uint8_t m_sound_state[2]; + uint8_t m_sound_rate; + uint16_t m_sound_addr; + uint8_t m_sound_data; + uint8_t m_square_state; + uint8_t m_square_count; + inline void sega005_update_sound_data(); + +private: + enum + { + TIMER_VBLANK_LATCH_CLEAR + }; + required_shared_ptr<uint8_t> m_mainram; required_shared_ptr<uint8_t> m_videoram; @@ -71,12 +103,6 @@ public: offs_t m_scrambled_write_pc; - uint8_t m_sound_state[2]; - uint8_t m_sound_rate; - uint16_t m_sound_addr; - uint8_t m_sound_data; - uint8_t m_square_state; - uint8_t m_square_count; segag80_decrypt_func m_decrypt; uint8_t m_background_pcb; double m_rweights[3]; @@ -123,19 +149,13 @@ public: DECLARE_WRITE8_MEMBER(sindbadm_back_port_w); DECLARE_WRITE8_MEMBER(astrob_sound_w); DECLARE_WRITE8_MEMBER(spaceod_sound_w); - DECLARE_INPUT_CHANGED_MEMBER(service_switch); + DECLARE_WRITE8_MEMBER(usb_ram_w); DECLARE_READ8_MEMBER(sindbadm_sound_data_r); DECLARE_WRITE8_MEMBER(sindbadm_misc_w); DECLARE_WRITE8_MEMBER(sindbadm_sn1_SN76496_w); DECLARE_WRITE8_MEMBER(sindbadm_sn2_SN76496_w); - void init_spaceod(); - void init_sindbadm(); - void init_pignewt(); - void init_monsterb(); - void init_005(); - void init_monster2(); - void init_astrob(); + TILE_GET_INFO_MEMBER(spaceod_get_tile_info); TILEMAP_MAPPER_MEMBER(spaceod_scan_rows); TILE_GET_INFO_MEMBER(bg_get_tile_info); @@ -147,7 +167,7 @@ public: INTERRUPT_GEN_MEMBER(sindbadm_vblank_start); DECLARE_WRITE8_MEMBER(sega005_sound_a_w); DECLARE_WRITE8_MEMBER(sega005_sound_b_w); - inline void sega005_update_sound_data(); + void vblank_latch_set(); void g80_set_palette_entry(int entry, uint8_t data); void spaceod_bg_init_palette(); @@ -159,18 +179,6 @@ public: inline uint8_t demangle(uint8_t d7d6, uint8_t d5d4, uint8_t d3d2, uint8_t d1d0); void monsterb_expand_gfx(const char *region); - void g80r_base(machine_config &config); - void monsterb(machine_config &config); - void sindbadm(machine_config &config); - void astrob(machine_config &config); - void pignewt(machine_config &config); - void monster2(machine_config &config); - void sega005(machine_config &config); - void spaceod(machine_config &config); - void astrob_sound_board(machine_config &config); - void sega005_sound_board(machine_config &config); - void spaceod_sound_board(machine_config &config); - void monsterb_sound_board(machine_config &config); void g80r_opcodes_map(address_map &map); void main_map(address_map &map); void main_portmap(address_map &map); @@ -178,7 +186,7 @@ public: void sega_315_opcodes_map(address_map &map); void sindbadm_portmap(address_map &map); void sindbadm_sound_map(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; emu_timer *m_vblank_latch_clear_timer; }; diff --git a/src/mame/includes/segag80v.h b/src/mame/includes/segag80v.h index 377d5b4263d..1e52864da60 100644 --- a/src/mame/includes/segag80v.h +++ b/src/mame/includes/segag80v.h @@ -29,6 +29,24 @@ public: m_vector(*this, "vector"), m_screen(*this, "screen"){ } + void g80v_base(machine_config &config); + void tacscan(machine_config &config); + void elim2(machine_config &config); + void startrek(machine_config &config); + void zektor(machine_config &config); + void spacfury(machine_config &config); + + void init_zektor(); + void init_startrek(); + void init_elim4(); + void init_elim2(); + void init_tacscan(); + void init_spacfury(); + + DECLARE_INPUT_CHANGED_MEMBER(service_switch); + DECLARE_CUSTOM_INPUT_MEMBER(elim4_joint_coin_r); + +private: required_shared_ptr<uint8_t> m_mainram; required_shared_ptr<uint8_t> m_vectorram; @@ -61,21 +79,16 @@ public: DECLARE_READ8_MEMBER(multiply_r); DECLARE_WRITE8_MEMBER(coin_count_w); DECLARE_WRITE8_MEMBER(unknown_w); - DECLARE_CUSTOM_INPUT_MEMBER(elim4_joint_coin_r); + DECLARE_WRITE8_MEMBER(elim1_sh_w); DECLARE_WRITE8_MEMBER(elim2_sh_w); DECLARE_WRITE8_MEMBER(zektor1_sh_w); DECLARE_WRITE8_MEMBER(zektor2_sh_w); DECLARE_WRITE8_MEMBER(spacfury1_sh_w); DECLARE_WRITE8_MEMBER(spacfury2_sh_w); - DECLARE_INPUT_CHANGED_MEMBER(service_switch); + DECLARE_WRITE8_MEMBER(usb_ram_w); - void init_zektor(); - void init_startrek(); - void init_elim4(); - void init_elim2(); - void init_tacscan(); - void init_spacfury(); + virtual void machine_start() override; virtual void video_start() override; uint32_t screen_update_segag80v(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -83,12 +96,7 @@ public: void sega_generate_vector_list(); offs_t decrypt_offset(address_space &space, offs_t offset); inline uint8_t demangle(uint8_t d7d6, uint8_t d5d4, uint8_t d3d2, uint8_t d1d0); - void g80v_base(machine_config &config); - void tacscan(machine_config &config); - void elim2(machine_config &config); - void startrek(machine_config &config); - void zektor(machine_config &config); - void spacfury(machine_config &config); + void main_map(address_map &map); void opcodes_map(address_map &map); void main_portmap(address_map &map); diff --git a/src/mame/includes/segahang.h b/src/mame/includes/segahang.h index fb5e217b690..8c47ddccb1b 100644 --- a/src/mame/includes/segahang.h +++ b/src/mame/includes/segahang.h @@ -43,6 +43,33 @@ public: , m_lamps(*this, "lamp%u", 0U) { } + void sound_board_2203(machine_config &config); + void sound_board_2203x2(machine_config &config); + void sound_board_2151(machine_config &config); + void shared_base(machine_config &config); + void hangon_base(machine_config &config); + void sharrier_base(machine_config &config); + void enduror_base(machine_config &config); + void endurord_base(machine_config &config); + void endurob2(machine_config &config); + void shangupb(machine_config &config); + void enduror(machine_config &config); + void shangonro(machine_config &config); + void enduror1d(machine_config &config); + void endurord(machine_config &config); + void sharrier(machine_config &config); + void endurobl(machine_config &config); + void enduror1(machine_config &config); + void hangon(machine_config &config); + + // game-specific driver init + void init_generic(); + void init_sharrier(); + void init_enduror(); + void init_endurobl(); + void init_endurob2(); + +private: // PPI read/write callbacks DECLARE_WRITE8_MEMBER( video_lamps_w ); DECLARE_WRITE8_MEMBER( tilemap_sound_w ); @@ -61,34 +88,9 @@ public: // I8751-related VBLANK interrupt handlers INTERRUPT_GEN_MEMBER( i8751_main_cpu_vblank ); - // game-specific driver init - void init_generic(); - void init_sharrier(); - void init_enduror(); - void init_endurobl(); - void init_endurob2(); - // video updates uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void sound_board_2203(machine_config &config); - void sound_board_2203x2(machine_config &config); - void sound_board_2151(machine_config &config); - void shared_base(machine_config &config); - void hangon_base(machine_config &config); - void sharrier_base(machine_config &config); - void enduror_base(machine_config &config); - void endurord_base(machine_config &config); - void endurob2(machine_config &config); - void shangupb(machine_config &config); - void enduror(machine_config &config); - void shangonro(machine_config &config); - void enduror1d(machine_config &config); - void endurord(machine_config &config); - void sharrier(machine_config &config); - void endurobl(machine_config &config); - void enduror1(machine_config &config); - void hangon(machine_config &config); void decrypted_opcodes_map(address_map &map); void fd1094_decrypted_opcodes_map(address_map &map); void hangon_map(address_map &map); @@ -100,7 +102,7 @@ public: void sound_portmap_2203(address_map &map); void sound_portmap_2203x2(address_map &map); void sub_map(address_map &map); -protected: + // internal types typedef delegate<void ()> i8751_sim_delegate; diff --git a/src/mame/includes/segaorun.h b/src/mame/includes/segaorun.h index c9d748429eb..22e32629ecd 100644 --- a/src/mame/includes/segaorun.h +++ b/src/mame/includes/segaorun.h @@ -50,6 +50,23 @@ public: m_bankmotor_delta(0) { } + void shangon_fd1089b(machine_config &config); + void outrun_fd1094(machine_config &config); + void outrundx(machine_config &config); + void shangon(machine_config &config); + void outrun_fd1089a(machine_config &config); + void outrun(machine_config &config); + void outrun_base(machine_config &config); + + // game-specific driver init + void init_generic(); + void init_outrun(); + void init_outrunb(); + void init_shangon(); + + CUSTOM_INPUT_MEMBER( bankmotor_pos_r ); + +private: // PPI read/write handlers DECLARE_READ8_MEMBER( unknown_porta_r ); DECLARE_READ8_MEMBER( unknown_portb_r ); @@ -68,12 +85,6 @@ public: DECLARE_WRITE16_MEMBER( misc_io_w ); DECLARE_WRITE16_MEMBER( nop_w ); - // game-specific driver init - void init_generic(); - void init_outrun(); - void init_outrunb(); - void init_shangon(); - // video updates uint32_t screen_update_outrun(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_shangon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -83,22 +94,14 @@ public: DECLARE_READ16_MEMBER( sega_road_control_0_r ) { return m_segaic16road->segaic16_road_control_0_r(space,offset,mem_mask); }; DECLARE_WRITE16_MEMBER( sega_road_control_0_w ) { m_segaic16road->segaic16_road_control_0_w(space,offset,data,mem_mask); }; - CUSTOM_INPUT_MEMBER( bankmotor_pos_r ); TIMER_DEVICE_CALLBACK_MEMBER(bankmotor_update); - void shangon_fd1089b(machine_config &config); - void outrun_fd1094(machine_config &config); - void outrundx(machine_config &config); - void shangon(machine_config &config); - void outrun_fd1089a(machine_config &config); - void outrun(machine_config &config); - void outrun_base(machine_config &config); void decrypted_opcodes_map(address_map &map); void outrun_map(address_map &map); void sound_map(address_map &map); void sound_portmap(address_map &map); void sub_map(address_map &map); -protected: + // timer IDs enum { diff --git a/src/mame/includes/segas16a.h b/src/mame/includes/segas16a.h index 857b785e827..90804513a4b 100644 --- a/src/mame/includes/segas16a.h +++ b/src/mame/includes/segas16a.h @@ -57,6 +57,30 @@ public: , m_lamps(*this, "lamp%u", 0U) { } + void system16a_no7751(machine_config &config); + void system16a(machine_config &config); + void system16a_fd1089a_no7751(machine_config &config); + void system16a_fd1089b_no7751(machine_config &config); + void system16a_fd1089a(machine_config &config); + void system16a_fd1094(machine_config &config); + void system16a_no7751p(machine_config &config); + void system16a_fd1094_no7751(machine_config &config); + void system16a_i8751(machine_config &config); + void system16a_fd1089b(machine_config &config); + void aceattaca_fd1094(machine_config &config); + + // game-specific driver init + void init_generic(); + void init_dumpmtmt(); + void init_quartet(); + void init_fantzonep(); + void init_sjryukoa(); + void init_aceattaca(); + void init_passsht16a(); + void init_mjleague(); + void init_sdi(); + +private: // PPI read/write callbacks DECLARE_WRITE8_MEMBER( misc_control_w ); DECLARE_WRITE8_MEMBER( tilemap_sound_w ); @@ -86,31 +110,9 @@ public: // I8751-related VBLANK interrupt handlers DECLARE_WRITE_LINE_MEMBER(i8751_main_cpu_vblank_w); - // game-specific driver init - void init_generic(); - void init_dumpmtmt(); - void init_quartet(); - void init_fantzonep(); - void init_sjryukoa(); - void init_aceattaca(); - void init_passsht16a(); - void init_mjleague(); - void init_sdi(); - // video updates uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void system16a_no7751(machine_config &config); - void system16a(machine_config &config); - void system16a_fd1089a_no7751(machine_config &config); - void system16a_fd1089b_no7751(machine_config &config); - void system16a_fd1089a(machine_config &config); - void system16a_fd1094(machine_config &config); - void system16a_no7751p(machine_config &config); - void system16a_fd1094_no7751(machine_config &config); - void system16a_i8751(machine_config &config); - void system16a_fd1089b(machine_config &config); - void aceattaca_fd1094(machine_config &config); void decrypted_opcodes_map(address_map &map); void mcu_io_map(address_map &map); void sound_decrypted_opcodes_map(address_map &map); @@ -118,7 +120,7 @@ public: void sound_no7751_portmap(address_map &map); void sound_portmap(address_map &map); void system16a_map(address_map &map); -protected: + // internal types typedef delegate<void ()> i8751_sim_delegate; typedef delegate<void (uint8_t, uint8_t)> lamp_changed_delegate; @@ -201,7 +203,7 @@ public: DECLARE_CUSTOM_INPUT_MEMBER(afighter_handl_left_r); DECLARE_CUSTOM_INPUT_MEMBER(afighter_handl_right_r); -protected: +private: required_ioport m_accel; required_ioport m_steer; }; diff --git a/src/mame/includes/segas16b.h b/src/mame/includes/segas16b.h index f11f1f995d7..f7fca6b1564 100644 --- a/src/mame/includes/segas16b.h +++ b/src/mame/includes/segas16b.h @@ -68,31 +68,23 @@ public: , m_lamps(*this, "lamp%u", 0U) { } - // memory mapping - void memory_mapper(sega_315_5195_mapper_device &mapper, uint8_t index); - - // main CPU read/write handlers - DECLARE_WRITE16_MEMBER( rom_5704_bank_w ); - DECLARE_READ16_MEMBER( rom_5797_bank_math_r ); - DECLARE_WRITE16_MEMBER( rom_5797_bank_math_w ); - DECLARE_READ16_MEMBER( unknown_rgn2_r ); - DECLARE_WRITE16_MEMBER( unknown_rgn2_w ); - DECLARE_READ16_MEMBER( standard_io_r ); - DECLARE_WRITE16_MEMBER( standard_io_w ); - DECLARE_WRITE16_MEMBER( atomicp_sound_w ); - - DECLARE_READ16_MEMBER( bootleg_custom_io_r ); - DECLARE_WRITE16_MEMBER( bootleg_custom_io_w ); - - // sound CPU read/write handlers - DECLARE_WRITE8_MEMBER( upd7759_control_w ); - DECLARE_READ8_MEMBER( upd7759_status_r ); - DECLARE_WRITE16_MEMBER( sound_w16 ); - - // other callbacks - DECLARE_WRITE_LINE_MEMBER(upd7759_generate_nmi); - INTERRUPT_GEN_MEMBER( i8751_main_cpu_vblank ); - DECLARE_WRITE8_MEMBER(spin_68k_w); + void rom_5797_fragment(machine_config &config); + void system16b_fd1094_5797(machine_config &config); + void fpointbla(machine_config &config); + void atomicp(machine_config &config); + void aceattacb_fd1094(machine_config &config); + void system16b_i8751(machine_config &config); + void system16c(machine_config &config); + void system16b_mc8123(machine_config &config); + void system16b_i8751_5797(machine_config &config); + void system16b_fd1089a(machine_config &config); + void system16b_5797(machine_config &config); + void system16b_split(machine_config &config); + void system16b_fd1089b(machine_config &config); + void system16b(machine_config &config); + void system16b_fd1094(machine_config &config); + void fpointbl(machine_config &config); + void lockonph(machine_config &config); // ROM board-specific driver init void init_generic_5521(); @@ -129,6 +121,33 @@ public: void init_altbeas4_5521(); void init_aliensyn7_5358_small(); +protected: + // memory mapping + void memory_mapper(sega_315_5195_mapper_device &mapper, uint8_t index); + + // main CPU read/write handlers + DECLARE_WRITE16_MEMBER( rom_5704_bank_w ); + DECLARE_READ16_MEMBER( rom_5797_bank_math_r ); + DECLARE_WRITE16_MEMBER( rom_5797_bank_math_w ); + DECLARE_READ16_MEMBER( unknown_rgn2_r ); + DECLARE_WRITE16_MEMBER( unknown_rgn2_w ); + DECLARE_READ16_MEMBER( standard_io_r ); + DECLARE_WRITE16_MEMBER( standard_io_w ); + DECLARE_WRITE16_MEMBER( atomicp_sound_w ); + + DECLARE_READ16_MEMBER( bootleg_custom_io_r ); + DECLARE_WRITE16_MEMBER( bootleg_custom_io_w ); + + // sound CPU read/write handlers + DECLARE_WRITE8_MEMBER( upd7759_control_w ); + DECLARE_READ8_MEMBER( upd7759_status_r ); + DECLARE_WRITE16_MEMBER( sound_w16 ); + + // other callbacks + DECLARE_WRITE_LINE_MEMBER(upd7759_generate_nmi); + INTERRUPT_GEN_MEMBER( i8751_main_cpu_vblank ); + DECLARE_WRITE8_MEMBER(spin_68k_w); + // video updates uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -138,23 +157,6 @@ public: // bootleg stuff void tilemap_16b_fpointbl_fill_latch(int i, uint16_t* latched_pageselect, uint16_t* latched_yscroll, uint16_t* latched_xscroll, uint16_t* textram); - void rom_5797_fragment(machine_config &config); - void system16b_fd1094_5797(machine_config &config); - void fpointbla(machine_config &config); - void atomicp(machine_config &config); - void aceattacb_fd1094(machine_config &config); - void system16b_i8751(machine_config &config); - void system16c(machine_config &config); - void system16b_mc8123(machine_config &config); - void system16b_i8751_5797(machine_config &config); - void system16b_fd1089a(machine_config &config); - void system16b_5797(machine_config &config); - void system16b_split(machine_config &config); - void system16b_fd1089b(machine_config &config); - void system16b(machine_config &config); - void system16b_fd1094(machine_config &config); - void fpointbl(machine_config &config); - void lockonph(machine_config &config); void decrypted_opcodes_map(address_map &map); void decrypted_opcodes_map_fpointbla(address_map &map); void decrypted_opcodes_map_x(address_map &map); @@ -173,7 +175,7 @@ public: void system16b_bootleg_map(address_map &map); void system16b_map(address_map &map); void system16c_map(address_map &map); -protected: + // internal types typedef delegate<void ()> i8751_sim_delegate; @@ -224,7 +226,6 @@ protected: DECLARE_READ16_MEMBER( sjryuko_custom_io_r ); DECLARE_WRITE16_MEMBER( sjryuko_custom_io_w ); -protected: // devices optional_device<sega_315_5195_mapper_device> m_mapper; required_device<m68000_device> m_maincpu; @@ -289,7 +290,7 @@ public: DECLARE_CUSTOM_INPUT_MEMBER(afighter_handl_left_r); DECLARE_CUSTOM_INPUT_MEMBER(afighter_handl_right_r); - protected: +private: required_ioport m_accel; required_ioport m_steer; }; @@ -318,11 +319,14 @@ public: m_rle_byte(0) { } + void isgsm(machine_config &config); + // driver init void init_isgsm(); void init_shinfz(); void init_tetrbx(); +private: // read/write handlers DECLARE_WRITE16_MEMBER( cart_addr_high_w ); DECLARE_WRITE16_MEMBER( cart_addr_low_w ); @@ -342,7 +346,6 @@ public: uint32_t shinfz_security(uint32_t input); uint32_t tetrbx_security(uint32_t input); -//protected: // driver overrides virtual void machine_reset() override; @@ -364,6 +367,5 @@ public: uint8_t m_rle_control_byte; bool m_rle_latched; uint8_t m_rle_byte; - void isgsm(machine_config &config); void isgsm_map(address_map &map); }; diff --git a/src/mame/includes/segas18.h b/src/mame/includes/segas18.h index d94287bc531..d983d93ee2d 100644 --- a/src/mame/includes/segas18.h +++ b/src/mame/includes/segas18.h @@ -51,6 +51,15 @@ public: { } + void wwally(machine_config &config); + void system18(machine_config &config); + void lghost_fd1094(machine_config &config); + void wwally_fd1094(machine_config &config); + void system18_fd1094(machine_config &config); + void system18_fd1094_i8751(machine_config &config); + void lghost(machine_config &config); + void system18_i8751(machine_config &config); + // driver init void init_ddcrew(); void init_lghost(); @@ -60,6 +69,7 @@ public: void init_generic_5987(); void init_hamaway(); +private: // memory mapping void memory_mapper(sega_315_5195_mapper_device &mapper, uint8_t index); @@ -95,21 +105,13 @@ public: DECLARE_WRITE_LINE_MEMBER(set_grayscale); DECLARE_WRITE_LINE_MEMBER(set_vdp_enable); - void wwally(machine_config &config); - void system18(machine_config &config); - void lghost_fd1094(machine_config &config); - void wwally_fd1094(machine_config &config); - void system18_fd1094(machine_config &config); - void system18_fd1094_i8751(machine_config &config); - void lghost(machine_config &config); - void system18_i8751(machine_config &config); void decrypted_opcodes_map(address_map &map); void mcu_io_map(address_map &map); void pcm_map(address_map &map); void sound_map(address_map &map); void sound_portmap(address_map &map); void system18_map(address_map &map); -protected: + // timer IDs enum { diff --git a/src/mame/includes/segas32.h b/src/mame/includes/segas32.h index 02c1bdf6fe6..b16854d4855 100644 --- a/src/mame/includes/segas32.h +++ b/src/mame/includes/segas32.h @@ -24,6 +24,51 @@ class segas32_state : public device_t public: segas32_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + void init_alien3(void); + void init_arescue(int m_hasdsp); + void init_arabfgt(void); + void init_brival(void); + void init_darkedge(void); + void init_dbzvrvs(void); + void init_f1en(void); + void init_f1lap(void); + void init_ga2(void); + void init_harddunk(void); + void init_holo(void); + void init_jpark(void); + void init_orunners(void); + void init_radm(void); + void init_radr(void); + void init_scross(void); + void init_slipstrm(void); + void init_sonic(void); + void init_sonicp(void); + void init_spidman(void); + void init_svf(void); + void init_jleague(void); + void init_titlef(void); + + cpu_device* maincpu() { return m_maincpu; } + + uint32_t screen_update_system32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t screen_update_multi32_left(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t screen_update_multi32_right(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + DECLARE_WRITE_LINE_MEMBER(ym3438_irq_handler); + TIMER_DEVICE_CALLBACK_MEMBER(signal_v60_irq_callback); + INTERRUPT_GEN_MEMBER(start_of_vblank_int); + + DECLARE_WRITE8_MEMBER(misc_output_0_w); + DECLARE_WRITE8_MEMBER(misc_output_1_w); + DECLARE_WRITE8_MEMBER(sw2_output_0_w); + DECLARE_WRITE8_MEMBER(sw2_output_1_w); + DECLARE_WRITE_LINE_MEMBER(display_enable_0_w); + DECLARE_WRITE_LINE_MEMBER(display_enable_1_w); + DECLARE_WRITE8_MEMBER(tilebank_external_w); + +protected: + segas32_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + typedef void (segas32_state::*sys32_output_callback)(int which, uint16_t data); struct layer_info @@ -77,13 +122,7 @@ public: DECLARE_WRITE32_MEMBER(multi32_mixer_1_w); DECLARE_READ8_MEMBER(int_control_r); DECLARE_WRITE8_MEMBER(int_control_w); - DECLARE_WRITE8_MEMBER(misc_output_0_w); - DECLARE_WRITE8_MEMBER(misc_output_1_w); - DECLARE_WRITE8_MEMBER(sw2_output_0_w); - DECLARE_WRITE8_MEMBER(sw2_output_1_w); - DECLARE_WRITE8_MEMBER(tilebank_external_w); - DECLARE_WRITE_LINE_MEMBER(display_enable_0_w); - DECLARE_WRITE_LINE_MEMBER(display_enable_1_w); + DECLARE_WRITE16_MEMBER(random_number_w); DECLARE_READ16_MEMBER(random_number_r); DECLARE_READ8_MEMBER(shared_ram_r); @@ -99,13 +138,10 @@ public: DECLARE_WRITE8_MEMBER(scross_bank_w); TILE_GET_INFO_MEMBER(get_tile_info); - uint32_t screen_update_system32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - uint32_t screen_update_multi32_left(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - uint32_t screen_update_multi32_right(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(start_of_vblank_int); + TIMER_CALLBACK_MEMBER(end_of_vblank_int); TIMER_CALLBACK_MEMBER(update_sprites); - TIMER_DEVICE_CALLBACK_MEMBER(signal_v60_irq_callback); + void common_start(int multi32); void system32_set_vblank(int state); inline uint16_t xBBBBBGGGGGRRRRR_to_xBGRBBBBGGGGRRRR(uint16_t value); @@ -153,36 +189,11 @@ public: void update_tilemap_text(screen_device &screen, struct layer_info *layer, const rectangle &cliprect); void update_bitmap(screen_device &screen, struct layer_info *layer, const rectangle &cliprect); void update_background(struct layer_info *layer, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(ym3438_irq_handler); + void signal_sound_irq(int which); void clear_sound_irq(int which); void darkedge_fd1149_vblank(); void f1lap_fd1149_vblank(); - cpu_device* maincpu() { return m_maincpu; } - - void init_alien3(void); - void init_arescue(int m_hasdsp); - void init_arabfgt(void); - void init_brival(void); - void init_darkedge(void); - void init_dbzvrvs(void); - void init_f1en(void); - void init_f1lap(void); - void init_ga2(void); - void init_harddunk(void); - void init_holo(void); - void init_jpark(void); - void init_orunners(void); - void init_radm(void); - void init_radr(void); - void init_scross(void); - void init_slipstrm(void); - void init_sonic(void); - void init_sonicp(void); - void init_spidman(void); - void init_svf(void); - void init_jleague(void); - void init_titlef(void); void ga2_main_map(address_map &map); void multi32_6player_map(address_map &map); @@ -200,8 +211,6 @@ public: void upd7725_data_map(address_map &map); void upd7725_prg_map(address_map &map); void v25_map(address_map &map); -protected: - segas32_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; diff --git a/src/mame/includes/segasp.h b/src/mame/includes/segasp.h index 0d2754793f8..88ef71f4663 100644 --- a/src/mame/includes/segasp.h +++ b/src/mame/includes/segasp.h @@ -15,9 +15,14 @@ public: : naomi_state(mconfig, type, tag), m_sp_eeprom(*this, "sp_eeprom") { } - required_device<eeprom_serial_93cxx_device> m_sp_eeprom; + + void segasp(machine_config &config); void init_segasp(); + +private: + required_device<eeprom_serial_93cxx_device> m_sp_eeprom; + DECLARE_READ64_MEMBER(sp_eeprom_r); DECLARE_WRITE64_MEMBER(sp_eeprom_w); DECLARE_READ64_MEMBER(sp_rombdflg_r); @@ -28,8 +33,6 @@ public: DECLARE_WRITE64_MEMBER(sp_bank_w); uint16_t m_sp_bank; - void segasp(machine_config &config); void onchip_port(address_map &map); void segasp_map(address_map &map); -protected: }; diff --git a/src/mame/includes/segaxbd.h b/src/mame/includes/segaxbd.h index 11527adca94..915a0848bad 100644 --- a/src/mame/includes/segaxbd.h +++ b/src/mame/includes/segaxbd.h @@ -33,17 +33,15 @@ public: // construction/destruction segaxbd_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // main CPU read/write handlers - DECLARE_READ16_MEMBER(adc_r); - DECLARE_WRITE16_MEMBER(adc_w); - DECLARE_WRITE16_MEMBER(iocontrol_w); + void xboard_base_mconfig(machine_config &config); - // game-specific main CPU read/write handlers - DECLARE_WRITE16_MEMBER(loffire_sync0_w); - DECLARE_READ16_MEMBER(rascot_excs_r); - DECLARE_WRITE16_MEMBER(rascot_excs_w); - DECLARE_READ16_MEMBER(smgp_excs_r); - DECLARE_WRITE16_MEMBER(smgp_excs_w); + void install_aburner2(void); + void install_loffire(void); + void install_smgp(void); + void install_gprider(void); + + // devices + required_device<m68000_device> m_maincpu; // custom I/O DECLARE_READ8_MEMBER(aburner2_motor_r); @@ -53,17 +51,25 @@ public: DECLARE_READ8_MEMBER(lastsurv_port_r); DECLARE_WRITE8_MEMBER(lastsurv_muxer_w); + // game-specific main CPU read/write handlers + DECLARE_WRITE16_MEMBER(loffire_sync0_w); + DECLARE_READ16_MEMBER(rascot_excs_r); + DECLARE_WRITE16_MEMBER(rascot_excs_w); + DECLARE_READ16_MEMBER(smgp_excs_r); + DECLARE_WRITE16_MEMBER(smgp_excs_w); + +protected: + // main CPU read/write handlers + DECLARE_READ16_MEMBER(adc_r); + DECLARE_WRITE16_MEMBER(adc_w); + DECLARE_WRITE16_MEMBER(iocontrol_w); + // video updates uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); // palette helpers DECLARE_WRITE16_MEMBER(paletteram_w); - void install_aburner2(void); - void install_loffire(void); - void install_smgp(void); - void install_gprider(void); - void decrypted_opcodes_map(address_map &map); void main_map(address_map &map); void rascot_z80_map(address_map &map); @@ -77,7 +83,7 @@ public: void sound_map(address_map &map); void sound_portmap(address_map &map); void sub_map(address_map &map); -protected: + // timer IDs enum { @@ -104,9 +110,6 @@ protected: DECLARE_WRITE8_MEMBER(pd_0_w); // devices -public: - required_device<m68000_device> m_maincpu; -protected: required_device<m68000_device> m_subcpu; required_device<z80_device> m_soundcpu; optional_device<z80_device> m_soundcpu2; @@ -131,12 +134,11 @@ protected: // game-specific state uint16_t * m_loffire_sync; uint8_t m_lastsurv_mux; -public: // -- stupid system16.c + // memory pointers required_shared_ptr<uint16_t> m_paletteram; bool m_gprider_hack; -protected: void palette_init(); uint32_t m_palette_entries; // number of palette entries uint8_t m_palette_normal[32]; // RGB translations for normal pixels @@ -149,10 +151,8 @@ protected: optional_ioport_array<4> m_mux_ports; output_finder<4> m_lamps; -protected: virtual void device_start() override; virtual void device_reset() override; - void xboard_base_mconfig(machine_config &config); }; diff --git a/src/mame/includes/segaybd.h b/src/mame/includes/segaybd.h index 2e7cef84730..e96b7d3f3fb 100644 --- a/src/mame/includes/segaybd.h +++ b/src/mame/includes/segaybd.h @@ -42,6 +42,19 @@ public: { } + void yboard_deluxe(machine_config &config); + void yboard_link(machine_config &config); + void yboard(machine_config &config); + + // game-specific driver init + void init_generic(); + void init_pdrift(); + void init_r360(); + void init_gforce2(); + void init_rchase(); + void init_gloc(); + +private: // main CPU read/write handlers DECLARE_WRITE8_MEMBER(output1_w); DECLARE_WRITE8_MEMBER(misc_output_w); @@ -68,20 +81,9 @@ public: void pdrift_output_cb2(uint16_t data); void rchase_output_cb2(uint16_t data); - // game-specific driver init - void init_generic(); - void init_pdrift(); - void init_r360(); - void init_gforce2(); - void init_rchase(); - void init_gloc(); - // video updates uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void yboard_deluxe(machine_config &config); - void yboard_link(machine_config &config); - void yboard(machine_config &config); void link_map(address_map &map); void link_portmap(address_map &map); void main_map(address_map &map); @@ -91,7 +93,7 @@ public: void sound_portmap(address_map &map); void subx_map(address_map &map); void suby_map(address_map &map); -protected: + // internal types typedef delegate<void (uint16_t)> output_delegate; diff --git a/src/mame/includes/seibuspi.h b/src/mame/includes/seibuspi.h index 3f5a9c6b0f0..de3c6e2b051 100644 --- a/src/mame/includes/seibuspi.h +++ b/src/mame/includes/seibuspi.h @@ -30,6 +30,35 @@ public: , m_z80_bank(*this, "z80_bank") { } + void sys386f(machine_config &config); + void sxx2f(machine_config &config); + void rdft2(machine_config &config); + void ejanhs(machine_config &config); + void sys386i(machine_config &config); + void sxx2g(machine_config &config); + void spi(machine_config &config); + void sxx2e(machine_config &config); + + void init_sei252(); + void init_batlball(); + void init_senkyu(); + void init_viprp1(); + void init_viprp1o(); + void init_rdft(); + void init_rfjet(); + void init_senkyua(); + void init_rdft2(); + void init_ejanhs(); + void init_sys386f(); + + DECLARE_CUSTOM_INPUT_MEMBER(ejanhs_encode); + + IRQ_CALLBACK_MEMBER(spi_irq_callback); + INTERRUPT_GEN_MEMBER(spi_interrupt); + + uint32_t screen_update_sys386f(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + +protected: required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_audiocpu; required_shared_ptr<uint32_t> m_mainram; @@ -111,11 +140,7 @@ public: DECLARE_READ32_MEMBER(rf2_speedup_r); DECLARE_READ32_MEMBER(rfjet_speedup_r); - DECLARE_CUSTOM_INPUT_MEMBER(ejanhs_encode); - DECLARE_WRITE_LINE_MEMBER(ymf_irqhandler); - IRQ_CALLBACK_MEMBER(spi_irq_callback); - INTERRUPT_GEN_MEMBER(spi_interrupt); void set_layer_offsets(); void drawgfx_blend(bitmap_rgb32 &bitmap, const rectangle &cliprect, gfx_element *gfx, uint32_t code, uint32_t color, int flipx, int flipy, int sx, int sy, bitmap_ind8 &primap, int primask); @@ -133,21 +158,9 @@ public: TILE_GET_INFO_MEMBER(get_midl_tile_info); TILE_GET_INFO_MEMBER(get_fore_tile_info); uint32_t screen_update_spi(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - uint32_t screen_update_sys386f(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void register_video_state(); void init_spi_common(); - void init_sei252(); - void init_batlball(); - void init_senkyu(); - void init_viprp1(); - void init_viprp1o(); - void init_rdft(); - void init_rfjet(); - void init_senkyua(); - void init_rdft2(); - void init_ejanhs(); - void init_sys386f(); void text_decrypt(uint8_t *rom); void bg_decrypt(uint8_t *rom, int size); @@ -157,14 +170,7 @@ public: void rfjet_text_decrypt(uint8_t *rom); void rfjet_bg_decrypt(uint8_t *rom, int size); - void sys386f(machine_config &config); - void sxx2f(machine_config &config); - void rdft2(machine_config &config); - void ejanhs(machine_config &config); - void sys386i(machine_config &config); - void sxx2g(machine_config &config); - void spi(machine_config &config); - void sxx2e(machine_config &config); + void base_map(address_map &map); void rdft2_map(address_map &map); void rise_map(address_map &map); diff --git a/src/mame/includes/seicross.h b/src/mame/includes/seicross.h index 49bea554df0..8ca54f5d284 100644 --- a/src/mame/includes/seicross.h +++ b/src/mame/includes/seicross.h @@ -23,6 +23,13 @@ public: m_colorram(*this, "colorram"), m_decrypted_opcodes(*this, "decrypted_opcodes") { } + void no_nvram(machine_config &config); + void friskytb(machine_config &config); + void nvram(machine_config &config); + + void init_friskytb(); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_mcu; required_device<dac_byte_interface> m_dac; @@ -56,7 +63,6 @@ public: virtual void machine_reset() override; virtual void video_start() override; DECLARE_PALETTE_INIT(seicross); - void init_friskytb(); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); @@ -64,9 +70,7 @@ public: void nvram_init(nvram_device &nvram, void *data, size_t size); DECLARE_WRITE8_MEMBER(dac_w); - void no_nvram(machine_config &config); - void friskytb(machine_config &config); - void nvram(machine_config &config); + void decrypted_opcodes_map(address_map &map); void main_map(address_map &map); void main_portmap(address_map &map); diff --git a/src/mame/includes/senjyo.h b/src/mame/includes/senjyo.h index 404fa4416fa..f24ca968936 100644 --- a/src/mame/includes/senjyo.h +++ b/src/mame/includes/senjyo.h @@ -34,6 +34,17 @@ public: m_bgstripesram(*this, "bgstripesram"), m_decrypted_opcodes(*this, "decrypted_opcodes") { } + void senjyox_e(machine_config &config); + void senjyo(machine_config &config); + void starforb(machine_config &config); + void senjyox_a(machine_config &config); + + void init_starfora(); + void init_senjyo(); + void init_starfore(); + void init_starforc(); + +private: /* devices */ required_device<cpu_device> m_maincpu; required_device<z80pio_device> m_pio; @@ -90,11 +101,6 @@ public: DECLARE_PALETTE_DECODER(IIBBGGRR); DECLARE_PALETTE_INIT(radar); - void init_starfora(); - void init_senjyo(); - void init_starfore(); - void init_starforc(); - TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(senjyo_bg1_tile_info); TILE_GET_INFO_MEMBER(starforc_bg1_tile_info); @@ -108,10 +114,7 @@ public: void draw_bgbitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_radar(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,int priority); - void senjyox_e(machine_config &config); - void senjyo(machine_config &config); - void starforb(machine_config &config); - void senjyox_a(machine_config &config); + void decrypted_opcodes_map(address_map &map); void senjyo_map(address_map &map); void senjyo_sound_io_map(address_map &map); diff --git a/src/mame/includes/seta.h b/src/mame/includes/seta.h index 5a06334d09c..54829179bd0 100644 --- a/src/mame/includes/seta.h +++ b/src/mame/includes/seta.h @@ -70,6 +70,75 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void keroppij(machine_config &config); + void madshark(machine_config &config); + void jjsquawb(machine_config &config); + void oisipuzl(machine_config &config); + void zingzipbl(machine_config &config); + void eightfrc(machine_config &config); + void gundhara(machine_config &config); + void triplfun(machine_config &config); + void calibr50(machine_config &config); + void blandiap(machine_config &config); + void wits(machine_config &config); + void msgundam(machine_config &config); + void extdwnhl(machine_config &config); + void pairlove(machine_config &config); + void zingzip(machine_config &config); + void wiggie(machine_config &config); + void umanclub(machine_config &config); + void tndrcade(machine_config &config); + void daioh(machine_config &config); + void atehate(machine_config &config); + void usclssic(machine_config &config); + void zombraid(machine_config &config); + void thunderlbl(machine_config &config); + void blockcarb(machine_config &config); + void wrofaero(machine_config &config); + void downtown(machine_config &config); + void blockcar(machine_config &config); + void crazyfgt(machine_config &config); + void keroppi(machine_config &config); + void drgnunit(machine_config &config); + void orbs(machine_config &config); + void daiohp(machine_config &config); + void magspeed(machine_config &config); + void krzybowl(machine_config &config); + void kiwame(machine_config &config); + void qzkklgy2(machine_config &config); + void kamenrid(machine_config &config); + void superbar(machine_config &config); + void jjsquawk(machine_config &config); + void twineagl(machine_config &config); + void blandia(machine_config &config); + void thunderl(machine_config &config); + void metafox(machine_config &config); + void utoukond(machine_config &config); + void rezon(machine_config &config); + + void init_bank6502(); + void init_downtown(); + void init_rezon(); + void init_twineagl(); + void init_crazyfgt(); + void init_metafox(); + void init_arbalest(); + void init_wiggie(); + void init_blandia(); + void init_kiwame(); + void init_eightfrc(); + void init_pairlove(); + + DECLARE_CUSTOM_INPUT_MEMBER(usclssic_trackball_x_r); + DECLARE_CUSTOM_INPUT_MEMBER(usclssic_trackball_y_r); + + DECLARE_PALETTE_INIT(palette_init_RRRRRGGGGGBBBBB_proms); + + SETA001_SPRITE_GFXBANK_CB_MEMBER(setac_gfxbank_callback); + + uint32_t screen_update_seta_layers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + +protected: required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_audiocpu; optional_device<cpu_device> m_subcpu; @@ -146,8 +215,7 @@ public: DECLARE_WRITE16_MEMBER(sub_ctrl_w); DECLARE_READ16_MEMBER(seta_dsw_r); DECLARE_READ16_MEMBER(usclssic_dsw_r); - DECLARE_CUSTOM_INPUT_MEMBER(usclssic_trackball_x_r); - DECLARE_CUSTOM_INPUT_MEMBER(usclssic_trackball_y_r); + DECLARE_WRITE8_MEMBER(usclssic_lockout_w); ADC083X_INPUT_CB(zombraid_adc_cb); DECLARE_READ16_MEMBER(zombraid_gun_r); @@ -181,18 +249,7 @@ public: DECLARE_READ8_MEMBER(dsw1_r); DECLARE_READ8_MEMBER(dsw2_r); DECLARE_READ16_MEMBER(extra_r); - void init_bank6502(); - void init_downtown(); - void init_rezon(); - void init_twineagl(); - void init_crazyfgt(); - void init_metafox(); - void init_arbalest(); - void init_wiggie(); - void init_blandia(); - void init_kiwame(); - void init_eightfrc(); - void init_pairlove(); + TILE_GET_INFO_MEMBER(twineagl_get_tile_info); template<int Layer> TILE_GET_INFO_MEMBER(get_tile_info); DECLARE_VIDEO_START(seta_no_layers); @@ -200,7 +257,7 @@ public: DECLARE_VIDEO_START(twineagl_1_layer); DECLARE_VIDEO_START(seta_1_layer); DECLARE_MACHINE_RESET(calibr50); - DECLARE_PALETTE_INIT(palette_init_RRRRRGGGGGBBBBB_proms); + DECLARE_PALETTE_INIT(usclssic); DECLARE_MACHINE_START(usclssic); DECLARE_VIDEO_START(seta_2_layers); @@ -216,7 +273,7 @@ public: uint32_t screen_update_seta_no_layers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_seta(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_usclssic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_seta_layers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + DECLARE_WRITE_LINE_MEMBER(screen_vblank_seta_buffer_sprites); DECLARE_READ16_MEMBER(ipl0_ack_r); DECLARE_WRITE16_MEMBER(ipl0_ack_w); @@ -241,52 +298,7 @@ public: void uPD71054_timer_init( ); DECLARE_WRITE_LINE_MEMBER(pit_out0); DECLARE_WRITE_LINE_MEMBER(utoukond_ym3438_interrupt); - SETA001_SPRITE_GFXBANK_CB_MEMBER(setac_gfxbank_callback); - void keroppij(machine_config &config); - void madshark(machine_config &config); - void jjsquawb(machine_config &config); - void oisipuzl(machine_config &config); - void zingzipbl(machine_config &config); - void eightfrc(machine_config &config); - void gundhara(machine_config &config); - void triplfun(machine_config &config); - void calibr50(machine_config &config); - void blandiap(machine_config &config); - void wits(machine_config &config); - void msgundam(machine_config &config); - void extdwnhl(machine_config &config); - void pairlove(machine_config &config); - void zingzip(machine_config &config); - void wiggie(machine_config &config); - void umanclub(machine_config &config); - void tndrcade(machine_config &config); - void daioh(machine_config &config); - void atehate(machine_config &config); - void usclssic(machine_config &config); - void zombraid(machine_config &config); - void thunderlbl(machine_config &config); - void blockcarb(machine_config &config); - void wrofaero(machine_config &config); - void downtown(machine_config &config); - void blockcar(machine_config &config); - void crazyfgt(machine_config &config); - void keroppi(machine_config &config); - void drgnunit(machine_config &config); - void orbs(machine_config &config); - void daiohp(machine_config &config); - void magspeed(machine_config &config); - void krzybowl(machine_config &config); - void kiwame(machine_config &config); - void qzkklgy2(machine_config &config); - void kamenrid(machine_config &config); - void superbar(machine_config &config); - void jjsquawk(machine_config &config); - void twineagl(machine_config &config); - void blandia(machine_config &config); - void thunderl(machine_config &config); - void metafox(machine_config &config); - void utoukond(machine_config &config); - void rezon(machine_config &config); + void atehate_map(address_map &map); void blandia_map(address_map &map); void blandiap_map(address_map &map); @@ -349,16 +361,21 @@ public: m_coin_start_cycles(0) { } + void setaroul(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_drop_start); + DECLARE_CUSTOM_INPUT_MEMBER(coin_sensors_r); + DECLARE_CUSTOM_INPUT_MEMBER(hopper_sensors_r); + + DECLARE_WRITE_LINE_MEMBER(screen_vblank); + +private: DECLARE_WRITE16_MEMBER(rtc_w); DECLARE_READ16_MEMBER(rtc_r); DECLARE_READ16_MEMBER(inputs_r); DECLARE_WRITE16_MEMBER(mux_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_drop_start); - DECLARE_CUSTOM_INPUT_MEMBER(coin_sensors_r); - DECLARE_CUSTOM_INPUT_MEMBER(hopper_sensors_r); - DECLARE_WRITE8_MEMBER(pay_w); DECLARE_WRITE8_MEMBER(led_w); @@ -376,12 +393,10 @@ public: DECLARE_PALETTE_INIT(setaroul); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(screen_vblank); TIMER_DEVICE_CALLBACK_MEMBER(interrupt); - void setaroul(machine_config &config); void setaroul_map(address_map &map); -private: + required_device<upd4992_device> m_rtc; // ! Actually D4911C ! required_device<ticket_dispenser_device> m_hopper; required_ioport_array<26> m_bet; @@ -419,6 +434,12 @@ public: m_out(0) { } + void inttoote(machine_config &config); + void jockeyc(machine_config &config); + + void init_inttoote(); + +private: DECLARE_WRITE16_MEMBER(rtc_w); DECLARE_READ16_MEMBER(rtc_r); @@ -440,12 +461,10 @@ public: DECLARE_WRITE16_MEMBER(inttoote_mux_w); DECLARE_WRITE16_MEMBER(inttoote_out_w); DECLARE_READ16_MEMBER(inttoote_700000_r); - void init_inttoote(); - void inttoote(machine_config &config); - void jockeyc(machine_config &config); + void inttoote_map(address_map &map); void jockeyc_map(address_map &map); -private: + required_device<upd4992_device> m_rtc; // ! Actually D4911C ! required_device<ticket_dispenser_device> m_hopper1, m_hopper2; // the 2nd hopper is optional diff --git a/src/mame/includes/seta2.h b/src/mame/includes/seta2.h index ea64b325776..27dad1d9c63 100644 --- a/src/mame/includes/seta2.h +++ b/src/mame/includes/seta2.h @@ -43,6 +43,23 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void seta2(machine_config &config); + void grdians(machine_config &config); + void myangel(machine_config &config); + void penbros(machine_config &config); + void pzlbowl(machine_config &config); + void myangel2(machine_config &config); + void reelquak(machine_config &config); + void ablastb(machine_config &config); + void gundamex(machine_config &config); + void telpacfl(machine_config &config); + void samshoot(machine_config &config); + void namcostr(machine_config &config); + + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + DECLARE_WRITE_LINE_MEMBER(screen_vblank); + DECLARE_WRITE16_MEMBER(spriteram16_word_w); DECLARE_READ16_MEMBER(spriteram16_word_r); DECLARE_WRITE16_MEMBER(vregs_w); @@ -50,6 +67,8 @@ public: DECLARE_WRITE32_MEMBER(oki_write); DECLARE_WRITE16_MEMBER(sound_bank_w); +protected: + DECLARE_WRITE16_MEMBER(grdians_lockout_w); DECLARE_READ16_MEMBER(mj4simai_p1_r); @@ -72,30 +91,15 @@ public: DECLARE_READ16_MEMBER(gundamex_eeprom_r); DECLARE_WRITE16_MEMBER(gundamex_eeprom_w); - DECLARE_VIDEO_START(yoffset); DECLARE_VIDEO_START(xoffset); DECLARE_VIDEO_START(xoffset1); - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(screen_vblank); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); INTERRUPT_GEN_MEMBER(seta2_interrupt); INTERRUPT_GEN_MEMBER(samshoot_interrupt); - void seta2(machine_config &config); - void grdians(machine_config &config); - void myangel(machine_config &config); - void penbros(machine_config &config); - void pzlbowl(machine_config &config); - void myangel2(machine_config &config); - void reelquak(machine_config &config); - void ablastb(machine_config &config); - void gundamex(machine_config &config); - void telpacfl(machine_config &config); - void samshoot(machine_config &config); - void namcostr(machine_config &config); void ablastb_map(address_map &map); void grdians_map(address_map &map); void gundamex_map(address_map &map); @@ -110,7 +114,6 @@ public: void samshoot_map(address_map &map); void telpacfl_map(address_map &map); -protected: virtual void machine_start() override { m_leds.resolve(); m_lamps.resolve(); } virtual void video_start() override; @@ -171,11 +174,10 @@ public: void init_funcube(); void init_funcube2(); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; -private: DECLARE_READ32_MEMBER(funcube_nvram_dword_r); DECLARE_WRITE32_MEMBER(funcube_nvram_dword_w); DECLARE_READ32_MEMBER(funcube_debug_r); @@ -212,6 +214,9 @@ public: } static constexpr feature_type unemulated_features() { return feature::CAMERA | feature::PRINTER; } + void staraudi(machine_config &config); + +private: DECLARE_WRITE16_MEMBER(staraudi_camera_w); DECLARE_WRITE16_MEMBER(staraudi_lamps1_w); DECLARE_WRITE16_MEMBER(staraudi_lamps2_w); @@ -220,14 +225,12 @@ public: uint32_t staraudi_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void staraudi(machine_config &config); void staraudi_map(address_map &map); -protected: + virtual void driver_start() override; void staraudi_debug_outputs(); -private: void draw_rgbram(bitmap_ind16 &bitmap); required_shared_ptr<uint16_t> m_rgbram; diff --git a/src/mame/includes/sf.h b/src/mame/includes/sf.h index ef6e682c981..61dfb063187 100644 --- a/src/mame/includes/sf.h +++ b/src/mame/includes/sf.h @@ -27,6 +27,12 @@ public: m_audiobank(*this, "audiobank") { } + void sfp(machine_config &config); + void sfjp(machine_config &config); + void sfus(machine_config &config); + void sfan(machine_config &config); + +private: /* devices */ required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; @@ -69,10 +75,7 @@ public: inline int invert( int nb ); void draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect ); void write_dword( address_space &space, offs_t offset, uint32_t data ); - void sfp(machine_config &config); - void sfjp(machine_config &config); - void sfus(machine_config &config); - void sfan(machine_config &config); + void sfan_map(address_map &map); void sfjp_map(address_map &map); void sfus_map(address_map &map); diff --git a/src/mame/includes/sg1000.h b/src/mame/includes/sg1000.h index 58d3329265c..eef5b228232 100644 --- a/src/mame/includes/sg1000.h +++ b/src/mame/includes/sg1000.h @@ -36,11 +36,6 @@ class sg1000_state : public driver_device { public: - enum - { - TIMER_LIGHTGUN_TICK - }; - sg1000_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, Z80_TAG), @@ -52,6 +47,17 @@ public: m_pb7(*this, "PB7") { } + void sg1000(machine_config &config); + void omv(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); + +protected: + enum + { + TIMER_LIGHTGUN_TICK + }; + required_device<cpu_device> m_maincpu; required_device<ram_device> m_ram; required_memory_region m_rom; @@ -64,12 +70,10 @@ public: DECLARE_READ8_MEMBER( peripheral_r ); DECLARE_WRITE8_MEMBER( peripheral_w ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); DECLARE_READ8_MEMBER( omv_r ); DECLARE_WRITE8_MEMBER( omv_w ); - void sg1000(machine_config &config); - void omv(machine_config &config); + void omv_io_map(address_map &map); void omv_map(address_map &map); void sc3000_io_map(address_map &map); @@ -85,8 +89,10 @@ public: : sg1000_state(mconfig, type, tag) { } - virtual void machine_start() override; void sc3000(machine_config &config); + +protected: + virtual void machine_start() override; }; class sf7000_state : public sc3000_state @@ -99,6 +105,9 @@ public: m_floppy0(*this, UPD765_TAG ":0:3ssdd") { } + void sf7000(machine_config &config); + +private: required_device<upd765a_device> m_fdc; required_device<centronics_device> m_centronics; required_device<floppy_image_device> m_floppy0; @@ -112,7 +121,6 @@ public: DECLARE_WRITE8_MEMBER( ppi_pc_w ); DECLARE_FLOPPY_FORMATS( floppy_formats ); - void sf7000(machine_config &config); void sf7000_io_map(address_map &map); void sf7000_map(address_map &map); }; diff --git a/src/mame/includes/shadfrce.h b/src/mame/includes/shadfrce.h index 45fe4b4eaeb..c7980da0c2c 100644 --- a/src/mame/includes/shadfrce.h +++ b/src/mame/includes/shadfrce.h @@ -32,6 +32,9 @@ public: m_bg1videoram(*this, "bg1videoram"), m_spvideoram(*this, "spvideoram") { } + void shadfrce(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<okim6295_device> m_oki; @@ -91,7 +94,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); - void shadfrce(machine_config &config); + void shadfrce_map(address_map &map); void shadfrce_sound_map(address_map &map); }; diff --git a/src/mame/includes/shangha3.h b/src/mame/includes/shangha3.h index 75278458b07..0fa2254c788 100644 --- a/src/mame/includes/shangha3.h +++ b/src/mame/includes/shangha3.h @@ -22,6 +22,15 @@ public: m_okibank(*this, "okibank") { } + void shangha3(machine_config &config); + void heberpop(machine_config &config); + void blocken(machine_config &config); + + void init_shangha3(); + void init_heberpop(); + void init_blocken(); + +private: required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_audiocpu; required_device<okim6295_device> m_oki; @@ -59,15 +68,10 @@ public: // blocken specific DECLARE_WRITE8_MEMBER(blocken_coinctrl_w); - void init_shangha3(); - void init_heberpop(); - void init_blocken(); virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void shangha3(machine_config &config); - void heberpop(machine_config &config); - void blocken(machine_config &config); + void blocken_map(address_map &map); void blocken_oki_map(address_map &map); void heberpop_map(address_map &map); diff --git a/src/mame/includes/shangkid.h b/src/mame/includes/shangkid.h index f7467cf1678..0f4a36d1687 100644 --- a/src/mame/includes/shangkid.h +++ b/src/mame/includes/shangkid.h @@ -19,6 +19,15 @@ public: m_spriteram(*this, "spriteram"), m_videoreg(*this, "videoreg") { } + void dynamski(machine_config &config); + void chinhero(machine_config &config); + void shangkid(machine_config &config); + + void init_dynamski(); + void init_shangkid(); + void init_chinhero(); + +private: required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_audiocpu; optional_device<cpu_device> m_bbx; @@ -58,9 +67,6 @@ public: TILE_GET_INFO_MEMBER(get_bg_tile_info); - void init_dynamski(); - void init_shangkid(); - void init_chinhero(); DECLARE_VIDEO_START(shangkid); DECLARE_PALETTE_INIT(dynamski); DECLARE_MACHINE_RESET(shangkid); @@ -71,9 +77,7 @@ public: void shangkid_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); void dynamski_draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); void dynamski_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); - void dynamski(machine_config &config); - void chinhero(machine_config &config); - void shangkid(machine_config &config); + void chinhero_bbx_map(address_map &map); void chinhero_bbx_portmap(address_map &map); void chinhero_main_map(address_map &map); diff --git a/src/mame/includes/shaolins.h b/src/mame/includes/shaolins.h index c6a53353879..ad17681cc51 100644 --- a/src/mame/includes/shaolins.h +++ b/src/mame/includes/shaolins.h @@ -16,6 +16,9 @@ public: m_colorram(*this, "colorram"), m_videoram(*this, "videoram") { } + void shaolins(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; @@ -43,6 +46,5 @@ public: void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(interrupt); - void shaolins(machine_config &config); void shaolins_map(address_map &map); }; diff --git a/src/mame/includes/shisen.h b/src/mame/includes/shisen.h index 9d68584761d..2e20f59a32d 100644 --- a/src/mame/includes/shisen.h +++ b/src/mame/includes/shisen.h @@ -15,6 +15,9 @@ public: m_paletteram(*this, "paletteram"), m_videoram(*this, "videoram") { } + void shisen(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<m72_audio_device> m_audio; required_device<gfxdecode_device> m_gfxdecode; @@ -37,7 +40,7 @@ public: virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void shisen(machine_config &config); + void shisen_io_map(address_map &map); void shisen_map(address_map &map); void shisen_sound_io_map(address_map &map); diff --git a/src/mame/includes/shootout.h b/src/mame/includes/shootout.h index d65164141d5..e0396cb50ac 100644 --- a/src/mame/includes/shootout.h +++ b/src/mame/includes/shootout.h @@ -18,6 +18,15 @@ public: m_textram(*this, "textram"), m_videoram(*this, "videoram") { } + void shootouj(machine_config &config); + void shootouk(machine_config &config); + void shootout(machine_config &config); + + void init_shootout(); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; @@ -41,10 +50,6 @@ public: DECLARE_WRITE8_MEMBER(videoram_w); DECLARE_WRITE8_MEMBER(textram_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - - void init_shootout(); - virtual void machine_reset() override; virtual void video_start() override; @@ -56,9 +61,7 @@ public: uint32_t screen_update_shootout(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_shootouj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_bits ); - void shootouj(machine_config &config); - void shootouk(machine_config &config); - void shootout(machine_config &config); + void shootouj_map(address_map &map); void shootout_map(address_map &map); void shootout_sound_map(address_map &map); diff --git a/src/mame/includes/shuuz.h b/src/mame/includes/shuuz.h index 5764e245f21..dd5295aabce 100644 --- a/src/mame/includes/shuuz.h +++ b/src/mame/includes/shuuz.h @@ -24,7 +24,7 @@ public: void shuuz(machine_config &config); -protected: +private: virtual void update_interrupts() override; DECLARE_WRITE16_MEMBER(latch_w); @@ -39,7 +39,6 @@ protected: void main_map(address_map &map); -private: required_device<atari_vad_device> m_vad; int m_cur[2]; diff --git a/src/mame/includes/sidearms.h b/src/mame/includes/sidearms.h index 785e97afab7..8ae5323143b 100644 --- a/src/mame/includes/sidearms.h +++ b/src/mame/includes/sidearms.h @@ -21,6 +21,16 @@ public: { } + void sidearms(machine_config &config); + void turtship(machine_config &config); + void whizz(machine_config &config); + + void init_dyger(); + void init_sidearms(); + void init_whizz(); + void init_turtship(); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; @@ -63,10 +73,6 @@ public: DECLARE_WRITE8_MEMBER(whizz_bankswitch_w); - void init_dyger(); - void init_sidearms(); - void init_whizz(); - void init_turtship(); virtual void machine_start() override; virtual void video_start() override; @@ -79,9 +85,7 @@ public: void draw_sprites_region(bitmap_ind16 &bitmap, const rectangle &cliprect, int start_offset, int end_offset ); void draw_starfield( bitmap_ind16 &bitmap ); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void sidearms(machine_config &config); - void turtship(machine_config &config); - void whizz(machine_config &config); + void sidearms_map(address_map &map); void sidearms_sound_map(address_map &map); void turtship_map(address_map &map); diff --git a/src/mame/includes/sidepckt.h b/src/mame/includes/sidepckt.h index 14f032d294b..4b3a25f71b7 100644 --- a/src/mame/includes/sidepckt.h +++ b/src/mame/includes/sidepckt.h @@ -24,6 +24,13 @@ public: m_spriteram(*this, "spriteram") { } + void sidepcktb(machine_config &config); + void sidepckt(machine_config &config); + + void init_sidepckt(); + void init_sidepcktj(); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; @@ -50,9 +57,6 @@ public: DECLARE_READ8_MEMBER(scroll_y_r); DECLARE_WRITE8_MEMBER(scroll_y_w); - void init_sidepckt(); - void init_sidepcktj(); - TILE_GET_INFO_MEMBER(get_tile_info); virtual void machine_reset() override; @@ -61,8 +65,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); - void sidepcktb(machine_config &config); - void sidepckt(machine_config &config); + void sidepckt_map(address_map &map); void sidepcktb_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/silkroad.h b/src/mame/includes/silkroad.h index 98c63cfbb8b..79ccb07908e 100644 --- a/src/mame/includes/silkroad.h +++ b/src/mame/includes/silkroad.h @@ -19,6 +19,9 @@ public: m_sprram(*this, "sprram"), m_regs(*this, "regs") { } + void silkroad(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<okim6295_device> m_oki1; required_device<gfxdecode_device> m_gfxdecode; @@ -50,6 +53,5 @@ public: uint32_t screen_update_silkroad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void silkroad(machine_config &config); void cpu_map(address_map &map); }; diff --git a/src/mame/includes/simpl156.h b/src/mame/includes/simpl156.h index 9ed461bc64e..3d36843e90b 100644 --- a/src/mame/includes/simpl156.h +++ b/src/mame/includes/simpl156.h @@ -26,6 +26,20 @@ public: m_sprgen(*this, "spritegen"), m_palette(*this, "palette") { } + void joemacr(machine_config &config); + void magdrop(machine_config &config); + void chainrec(machine_config &config); + void mitchell156(machine_config &config); + void magdropp(machine_config &config); + + void init_simpl156(); + void init_joemacr(); + void init_charlien(); + void init_prtytime(); + void init_osman(); + void init_chainrec(); + +private: /* devices */ required_device<cpu_device> m_maincpu; required_device<deco16ic_device> m_deco_tilegen1; @@ -57,20 +71,11 @@ public: DECLARE_READ32_MEMBER(prtytime_speedup_r); DECLARE_READ32_MEMBER(charlien_speedup_r); DECLARE_READ32_MEMBER(osman_speedup_r); - void init_simpl156(); - void init_joemacr(); - void init_charlien(); - void init_prtytime(); - void init_osman(); - void init_chainrec(); + virtual void video_start() override; uint32_t screen_update_simpl156(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(simpl156_vbl_interrupt); - void joemacr(machine_config &config); - void magdrop(machine_config &config); - void chainrec(machine_config &config); - void mitchell156(machine_config &config); - void magdropp(machine_config &config); + void chainrec_map(address_map &map); void joemacr_map(address_map &map); void magdrop_map(address_map &map); diff --git a/src/mame/includes/simple_st0016.h b/src/mame/includes/simple_st0016.h index b18a181c819..6fb2036dc40 100644 --- a/src/mame/includes/simple_st0016.h +++ b/src/mame/includes/simple_st0016.h @@ -16,6 +16,16 @@ public: m_mainbank(*this, "mainbank") { } + void st0016(machine_config &config); + void renju(machine_config &config); + void mayjinsn(machine_config &config); + + void init_nratechu(); + void init_mayjinsn(); + void init_mayjisn2(); + void init_renju(); + +private: int mux_port; // uint32_t m_st0016_rom_bank; @@ -33,17 +43,12 @@ public: DECLARE_WRITE8_MEMBER(latch8_w); DECLARE_WRITE8_MEMBER(st0016_rom_bank_w); - void init_nratechu(); - void init_mayjinsn(); - void init_mayjisn2(); - void init_renju(); + virtual void machine_start() override; DECLARE_VIDEO_START(st0016); uint32_t screen_update_st0016(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(st0016_int); - void st0016(machine_config &config); - void renju(machine_config &config); - void mayjinsn(machine_config &config); + void renju_mem(address_map &map); void st0016_io(address_map &map); void st0016_m2_io(address_map &map); diff --git a/src/mame/includes/simpsons.h b/src/mame/includes/simpsons.h index e63f769d1d2..65b2e6c93bb 100644 --- a/src/mame/includes/simpsons.h +++ b/src/mame/includes/simpsons.h @@ -9,12 +9,6 @@ class simpsons_state : public driver_device { public: - enum - { - TIMER_NMI, - TIMER_DMAEND - }; - simpsons_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -25,6 +19,15 @@ public: m_k053246(*this, "k053246"), m_k053251(*this, "k053251") { } + void simpsons(machine_config &config); + +private: + enum + { + TIMER_NMI, + TIMER_DMAEND + }; + /* memory pointers */ std::unique_ptr<uint16_t[]> m_spriteram; @@ -64,11 +67,10 @@ public: DECLARE_WRITE8_MEMBER(banking_callback); K053246_CB_MEMBER(sprite_callback); - void simpsons(machine_config &config); void bank0000_map(address_map &map); void bank2000_map(address_map &map); void main_map(address_map &map); void z80_map(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/skullxbo.h b/src/mame/includes/skullxbo.h index ae997b94ea9..b3f71e9d440 100644 --- a/src/mame/includes/skullxbo.h +++ b/src/mame/includes/skullxbo.h @@ -28,10 +28,11 @@ public: m_playfield_latch(-1) { } - void init_skullxbo(); void skullxbo(machine_config &config); -protected: + void init_skullxbo(); + +private: virtual void machine_reset() override; virtual void update_interrupts() override; virtual void scanline_update(screen_device &screen, int scanline) override; @@ -50,7 +51,6 @@ protected: void main_map(address_map &map); -private: required_device<atari_jsa_ii_device> m_jsa; required_device<timer_device> m_scanline_timer; required_device<tilemap_device> m_playfield_tilemap; diff --git a/src/mame/includes/skydiver.h b/src/mame/includes/skydiver.h index eabb57afcd8..fbe3958073d 100644 --- a/src/mame/includes/skydiver.h +++ b/src/mame/includes/skydiver.h @@ -53,7 +53,7 @@ public: void skydiver(machine_config &config); -protected: +private: DECLARE_WRITE_LINE_MEMBER(nmion_w); DECLARE_WRITE8_MEMBER(videoram_w); DECLARE_READ8_MEMBER(wram_r); @@ -84,7 +84,6 @@ protected: INTERRUPT_GEN_MEMBER(interrupt); void skydiver_map(address_map &map); -private: required_device<cpu_device> m_maincpu; required_device<watchdog_timer_device> m_watchdog; required_device<f9334_device> m_latch3; diff --git a/src/mame/includes/skyfox.h b/src/mame/includes/skyfox.h index a3bf37b4f40..a24c20b711e 100644 --- a/src/mame/includes/skyfox.h +++ b/src/mame/includes/skyfox.h @@ -24,6 +24,13 @@ public: m_spriteram(*this, "spriteram") { } + void skyfox(machine_config &config); + + void init_skyfox(); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: /* devices/memory pointers */ required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; @@ -37,8 +44,6 @@ public: int m_bg_ctrl; DECLARE_WRITE8_MEMBER(skyfox_vregs_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - void init_skyfox(); virtual void machine_start() override; virtual void machine_reset() override; DECLARE_PALETTE_INIT(skyfox); @@ -46,7 +51,7 @@ public: INTERRUPT_GEN_MEMBER(skyfox_interrupt); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect); - void skyfox(machine_config &config); + void skyfox_map(address_map &map); void skyfox_sound_map(address_map &map); }; diff --git a/src/mame/includes/skykid.h b/src/mame/includes/skykid.h index f3708f8a264..bcd136b8389 100644 --- a/src/mame/includes/skykid.h +++ b/src/mame/includes/skykid.h @@ -20,6 +20,11 @@ public: , m_leds(*this, "led%u", 0U) { } + void skykid(machine_config &config); + + void init_skykid(); + +private: DECLARE_WRITE8_MEMBER(inputport_select_w); DECLARE_READ8_MEMBER(inputport_r); DECLARE_WRITE8_MEMBER(skykid_led_w); @@ -35,7 +40,6 @@ public: DECLARE_WRITE8_MEMBER(skykid_scroll_x_w); DECLARE_WRITE8_MEMBER(skykid_scroll_y_w); DECLARE_WRITE8_MEMBER(skykid_flipscreen_priority_w); - void init_skykid(); TILEMAP_MAPPER_MEMBER(tx_tilemap_scan); TILE_GET_INFO_MEMBER(tx_get_tile_info); TILE_GET_INFO_MEMBER(bg_get_tile_info); @@ -43,12 +47,10 @@ public: uint32_t screen_update_skykid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); - void skykid(machine_config &config); void mcu_map(address_map &map); void mcu_port_map(address_map &map); void skykid_map(address_map &map); -protected: virtual void machine_start() override; virtual void video_start() override; diff --git a/src/mame/includes/skyraid.h b/src/mame/includes/skyraid.h index de71aa9dfbb..4c546097ac2 100644 --- a/src/mame/includes/skyraid.h +++ b/src/mame/includes/skyraid.h @@ -25,7 +25,7 @@ public: void skyraid(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER(skyraid_port_0_r); DECLARE_WRITE8_MEMBER(skyraid_range_w); DECLARE_WRITE8_MEMBER(skyraid_offset_w); @@ -43,7 +43,6 @@ protected: void skyraid_map(address_map &map); -private: int m_analog_range; int m_analog_offset; diff --git a/src/mame/includes/slapfght.h b/src/mame/includes/slapfght.h index 5722e1846fc..8d44e7b3f95 100644 --- a/src/mame/includes/slapfght.h +++ b/src/mame/includes/slapfght.h @@ -30,6 +30,22 @@ public: m_fixcolorram(*this, "fixcolorram") { } + void tigerhb2(machine_config &config); + void tigerhb1(machine_config &config); + void tigerh(machine_config &config); + void getstarb2(machine_config &config); + void slapfighb2(machine_config &config); + void getstarb1(machine_config &config); + void perfrman(machine_config &config); + void slapfigh(machine_config &config); + void slapfighb1(machine_config &config); + + void init_banks(); + void init_getstarb1(); + void init_slapfigh(); + void init_getstarb2(); + +private: // devices, memory pointers required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; @@ -99,11 +115,6 @@ public: virtual void machine_start() override; virtual void machine_reset() override; - void init_banks(); - void init_getstarb1(); - void init_slapfigh(); - void init_getstarb2(); - TILE_GET_INFO_MEMBER(get_pf_tile_info); TILE_GET_INFO_MEMBER(get_pf1_tile_info); TILE_GET_INFO_MEMBER(get_fix_tile_info); @@ -117,15 +128,7 @@ public: DECLARE_WRITE_LINE_MEMBER(vblank_irq); INTERRUPT_GEN_MEMBER(sound_nmi); - void tigerhb2(machine_config &config); - void tigerhb1(machine_config &config); - void tigerh(machine_config &config); - void getstarb2(machine_config &config); - void slapfighb2(machine_config &config); - void getstarb1(machine_config &config); - void perfrman(machine_config &config); - void slapfigh(machine_config &config); - void slapfighb1(machine_config &config); + void getstar_map(address_map &map); void getstarb1_io_map(address_map &map); void getstarb2_io_map(address_map &map); diff --git a/src/mame/includes/slapshot.h b/src/mame/includes/slapshot.h index 76628e2fd67..bbeed581f16 100644 --- a/src/mame/includes/slapshot.h +++ b/src/mame/includes/slapshot.h @@ -25,11 +25,6 @@ struct slapshot_tempsprite class slapshot_state : public driver_device { public: - enum - { - TIMER_SLAPSHOT_INTERRUPT6 - }; - slapshot_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -42,9 +37,9 @@ public: m_spriteram(*this,"spriteram"), m_spriteext(*this,"spriteext") { } - void opwolf3(machine_config &config); void slapshot(machine_config &config); + void init_slapshot(); protected: @@ -53,6 +48,11 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: + enum + { + TIMER_SLAPSHOT_INTERRUPT6 + }; + /* devices */ required_device<cpu_device> m_maincpu; required_device<tc0140syt_device> m_tc0140syt; diff --git a/src/mame/includes/sms.h b/src/mame/includes/sms.h index 30e3ed66d16..4a89dd91ad8 100644 --- a/src/mame/includes/sms.h +++ b/src/mame/includes/sms.h @@ -73,6 +73,31 @@ public: m_store_cart_selection_data(false) { } + void sms_base(machine_config &config); + void sms_ntsc_base(machine_config &config); + void sms_pal_base(machine_config &config); + void sms_paln_base(machine_config &config); + void sms_br_base(machine_config &config); + void sms3_br(machine_config &config); + void sg1000m3(machine_config &config); + void smsj(machine_config &config); + void sms1_paln(machine_config &config); + void sms1_ntsc(machine_config &config); + void gamegear(machine_config &config); + void gamegeaj(machine_config &config); + void sms3_paln(machine_config &config); + void sms1_pal(machine_config &config); + void sms2_pal(machine_config &config); + void sms2_kr(machine_config &config); + void sms1_br(machine_config &config); + void sms2_ntsc(machine_config &config); + void sms1_kr(machine_config &config); + + DECLARE_WRITE_LINE_MEMBER(sms_pause_callback); + + uint32_t screen_update_sms(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + +protected: void store_post_load(); void store_select_cart(uint8_t data); @@ -105,7 +130,6 @@ public: DECLARE_READ8_MEMBER(sms_sscope_r); DECLARE_WRITE8_MEMBER(sms_sscope_w); - DECLARE_WRITE_LINE_MEMBER(sms_pause_callback); DECLARE_WRITE_LINE_MEMBER(sms_csync_callback); DECLARE_WRITE_LINE_MEMBER(sms_ctrl1_th_input); DECLARE_WRITE_LINE_MEMBER(sms_ctrl2_th_input); @@ -117,7 +141,6 @@ public: DECLARE_VIDEO_START(sms1); DECLARE_VIDEO_RESET(sms1); - uint32_t screen_update_sms(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t screen_update_sms1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t screen_update_sms1_left(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t screen_update_sms1_right(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -125,25 +148,6 @@ public: void screen_gg_sms_mode_scaling(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank_sms1); - void sms_base(machine_config &config); - void sms_ntsc_base(machine_config &config); - void sms_pal_base(machine_config &config); - void sms_paln_base(machine_config &config); - void sms_br_base(machine_config &config); - void sms3_br(machine_config &config); - void sg1000m3(machine_config &config); - void smsj(machine_config &config); - void sms1_paln(machine_config &config); - void sms1_ntsc(machine_config &config); - void gamegear(machine_config &config); - void gamegeaj(machine_config &config); - void sms3_paln(machine_config &config); - void sms1_pal(machine_config &config); - void sms2_pal(machine_config &config); - void sms2_kr(machine_config &config); - void sms1_br(machine_config &config); - void sms2_ntsc(machine_config &config); - void sms1_kr(machine_config &config); void gg_io(address_map &map); void sg1000m3_io(address_map &map); void sms1_mem(address_map &map); @@ -152,7 +156,6 @@ public: void smsj_io(address_map &map); void smskr_io(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; uint8_t read_bus(address_space &space, unsigned int bank, uint16_t base_addr, uint16_t offset); diff --git a/src/mame/includes/sms_bootleg.h b/src/mame/includes/sms_bootleg.h index 4aead1b8730..693e993fd2d 100644 --- a/src/mame/includes/sms_bootleg.h +++ b/src/mame/includes/sms_bootleg.h @@ -2,16 +2,19 @@ class smsbootleg_state : public sms_state { - public: - smsbootleg_state(const machine_config &mconfig, device_type type, const char *tag) - : sms_state(mconfig, type, tag) - {} +public: + smsbootleg_state(const machine_config &mconfig, device_type type, const char *tag) + : sms_state(mconfig, type, tag) + {} + + void sms_supergame(machine_config &config); void init_sms_supergame(); + +private: DECLARE_WRITE8_MEMBER(port08_w); DECLARE_WRITE8_MEMBER(port18_w); - void sms_supergame(machine_config &config); void sms_supergame_io(address_map &map); void sms_supergame_map(address_map &map); }; diff --git a/src/mame/includes/snes.h b/src/mame/includes/snes.h index 82227a3fd1e..e13ed483b38 100644 --- a/src/mame/includes/snes.h +++ b/src/mame/includes/snes.h @@ -299,6 +299,22 @@ struct snes_cart_info class snes_state : public driver_device { public: + snes_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_soundcpu(*this, "soundcpu"), + m_spc700(*this, "spc700"), + m_ppu(*this, "ppu"), + m_screen(*this, "screen") { } + + void init_snes(); + void init_snes_hirom(); + void init_snes_mess(); + void init_snesst(); + + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + +protected: enum { TIMER_NMI_TICK, @@ -311,14 +327,6 @@ public: TIMER_SNES_LAST }; - snes_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_soundcpu(*this, "soundcpu"), - m_spc700(*this, "spc700"), - m_ppu(*this, "ppu"), - m_screen(*this, "screen") { } - /* misc */ uint16_t m_hblank_offset; uint32_t m_wram_address; @@ -374,8 +382,6 @@ public: snes_cart_info m_cart; // used by NSS/SFCBox only! to be moved in a derived class! void rom_map_setup(uint32_t size); - uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - /* devices */ required_device<_5a22_device> m_maincpu; required_device<spc700_device> m_soundcpu; @@ -383,12 +389,6 @@ public: required_device<snes_ppu_device> m_ppu; required_device<screen_device> m_screen; - - void init_snes(); - void init_snes_hirom(); - void init_snes_mess(); - void init_snesst(); - inline int dma_abus_valid(uint32_t address); inline uint8_t abus_read(address_space &space, uint32_t abus); inline void dma_transfer(address_space &space, uint8_t dma, uint32_t abus, uint16_t bbus); @@ -435,7 +435,6 @@ public: virtual void machine_start() override; virtual void machine_reset() override; -protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/snk.h b/src/mame/includes/snk.h index cc25e97241a..dd65349ee81 100644 --- a/src/mame/includes/snk.h +++ b/src/mame/includes/snk.h @@ -35,6 +35,38 @@ public: m_bonus_io(*this, "BONUS") { } + void gwar(machine_config &config); + void psychos(machine_config &config); + void fitegolf(machine_config &config); + void countryc(machine_config &config); + void tdfever2(machine_config &config); + void aso(machine_config &config); + void gwara(machine_config &config); + void tdfever(machine_config &config); + void fitegolf2(machine_config &config); + void jcross(machine_config &config); + void choppera(machine_config &config); + void tnk3(machine_config &config); + void victroad(machine_config &config); + void chopper1(machine_config &config); + void vangrd2(machine_config &config); + void bermudat(machine_config &config); + void hal21(machine_config &config); + void marvins(machine_config &config); + void athena(machine_config &config); + void ikari(machine_config &config); + void sgladiat(machine_config &config); + void madcrush(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(marvins_sound_busy); + DECLARE_CUSTOM_INPUT_MEMBER(snk_sound_busy); + DECLARE_CUSTOM_INPUT_MEMBER(gwar_rotary); + DECLARE_CUSTOM_INPUT_MEMBER(gwarb_rotary); + DECLARE_CUSTOM_INPUT_MEMBER(countryc_trackball_x); + DECLARE_CUSTOM_INPUT_MEMBER(countryc_trackball_y); + DECLARE_CUSTOM_INPUT_MEMBER(snk_bonus_r); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<cpu_device> m_subcpu; @@ -165,13 +197,7 @@ public: DECLARE_WRITE8_MEMBER(gwara_sp_scroll_msb_w); DECLARE_WRITE8_MEMBER(tdfever_sp_scroll_msb_w); DECLARE_WRITE8_MEMBER(tdfever_spriteram_w); - DECLARE_CUSTOM_INPUT_MEMBER(marvins_sound_busy); - DECLARE_CUSTOM_INPUT_MEMBER(snk_sound_busy); - DECLARE_CUSTOM_INPUT_MEMBER(gwar_rotary); - DECLARE_CUSTOM_INPUT_MEMBER(gwarb_rotary); - DECLARE_CUSTOM_INPUT_MEMBER(countryc_trackball_x); - DECLARE_CUSTOM_INPUT_MEMBER(countryc_trackball_y); - DECLARE_CUSTOM_INPUT_MEMBER(snk_bonus_r); + TILEMAP_MAPPER_MEMBER(marvins_tx_scan_cols); TILE_GET_INFO_MEMBER(marvins_get_tx_tile_info); TILE_GET_INFO_MEMBER(ikari_get_tx_tile_info); @@ -213,28 +239,7 @@ public: int turbofront_check(int small, int num); int turbofront_check8(int small, int num); DECLARE_WRITE_LINE_MEMBER(ymirq_callback_1); - void gwar(machine_config &config); - void psychos(machine_config &config); - void fitegolf(machine_config &config); - void countryc(machine_config &config); - void tdfever2(machine_config &config); - void aso(machine_config &config); - void gwara(machine_config &config); - void tdfever(machine_config &config); - void fitegolf2(machine_config &config); - void jcross(machine_config &config); - void choppera(machine_config &config); - void tnk3(machine_config &config); - void victroad(machine_config &config); - void chopper1(machine_config &config); - void vangrd2(machine_config &config); - void bermudat(machine_config &config); - void hal21(machine_config &config); - void marvins(machine_config &config); - void athena(machine_config &config); - void ikari(machine_config &config); - void sgladiat(machine_config &config); - void madcrush(machine_config &config); + void Y8950_sound_map(address_map &map); void YM3526_Y8950_sound_map(address_map &map); void YM3526_YM3526_sound_map(address_map &map); diff --git a/src/mame/includes/snk6502.h b/src/mame/includes/snk6502.h index 7b14c36a46d..f5cfedfda92 100644 --- a/src/mame/includes/snk6502.h +++ b/src/mame/includes/snk6502.h @@ -29,6 +29,16 @@ public: m_charram(*this, "charram") { } + void satansat(machine_config &config); + void vanguard(machine_config &config); + void sasuke(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(sasuke_count_r); + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + + DECLARE_VIDEO_START(pballoon); + +protected: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; @@ -58,9 +68,6 @@ public: DECLARE_WRITE8_MEMBER(satansat_b002_w); DECLARE_WRITE8_MEMBER(satansat_backcolor_w); - DECLARE_CUSTOM_INPUT_MEMBER(sasuke_count_r); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(satansat_get_bg_tile_info); @@ -72,7 +79,6 @@ public: DECLARE_PALETTE_INIT(satansat); DECLARE_VIDEO_START(snk6502); DECLARE_PALETTE_INIT(snk6502); - DECLARE_VIDEO_START(pballoon); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -82,9 +88,7 @@ public: void sasuke_start_counter(); void postload(); - void satansat(machine_config &config); - void vanguard(machine_config &config); - void sasuke(machine_config &config); + void sasuke_map(address_map &map); void satansat_map(address_map &map); void vanguard_map(address_map &map); @@ -103,13 +107,12 @@ public: void nibbler(machine_config &config); void pballoon(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER(fantasy_flipscreen_w); void fantasy_map(address_map &map); void pballoon_map(address_map &map); -private: required_device<fantasy_sound_device> m_sound; }; diff --git a/src/mame/includes/snk68.h b/src/mame/includes/snk68.h index d5911655fe8..c67add4832f 100644 --- a/src/mame/includes/snk68.h +++ b/src/mame/includes/snk68.h @@ -22,6 +22,11 @@ public: m_spriteram(*this, "spriteram") { } + void streetsm(machine_config &config); + void searchar(machine_config &config); + void pow(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_soundcpu; required_device<upd7759_device> m_upd7759; @@ -71,9 +76,6 @@ public: void tile_callback_pow(int &tile, int& fx, int& fy, int& region); void tile_callback_notpow(int &tile, int& fx, int& fy, int& region); - void streetsm(machine_config &config); - void searchar(machine_config &config); - void pow(machine_config &config); void pow_map(address_map &map); void searchar_map(address_map &map); void sound_io_map(address_map &map); diff --git a/src/mame/includes/snookr10.h b/src/mame/includes/snookr10.h index f604c334e9d..9c635db6d9b 100644 --- a/src/mame/includes/snookr10.h +++ b/src/mame/includes/snookr10.h @@ -15,6 +15,12 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void apple10(machine_config &config); + void snookr10(machine_config &config); + void crystalc(machine_config &config); + void tenballs(machine_config &config); + +private: DECLARE_READ8_MEMBER(dsw_port_1_r); DECLARE_READ8_MEMBER(port2000_8_r); DECLARE_WRITE8_MEMBER(output_port_0_w); @@ -30,15 +36,10 @@ public: DECLARE_PALETTE_INIT(apple10); DECLARE_PALETTE_INIT(crystalc); uint32_t screen_update_snookr10(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void apple10(machine_config &config); - void snookr10(machine_config &config); - void crystalc(machine_config &config); - void tenballs(machine_config &config); void crystalc_map(address_map &map); void snookr10_map(address_map &map); void tenballs_map(address_map &map); -protected: virtual void machine_start() override { m_lamps.resolve(); } virtual void video_start() override; diff --git a/src/mame/includes/snowbros.h b/src/mame/includes/snowbros.h index 5777c5516fe..9611cec6dcb 100644 --- a/src/mame/includes/snowbros.h +++ b/src/mame/includes/snowbros.h @@ -23,6 +23,29 @@ public: m_bootleg_spriteram16(*this, "spriteram16b") { } + void _4in1(machine_config &config); + void semiprot(machine_config &config); + void semicom_mcu(machine_config &config); + void yutnori(machine_config &config); + void snowbros(machine_config &config); + void semicom(machine_config &config); + void twinadv(machine_config &config); + void wintbob(machine_config &config); + void honeydol(machine_config &config); + void snowbro3(machine_config &config); + void finalttr(machine_config &config); + + void init_pzlbreak(); + void init_snowbro3(); + void init_cookbib3(); + void init_4in1boot(); + void init_3in1semi(); + void init_cookbib2(); + void init_toto(); + void init_hyperpac(); + void init_yutnori(); + +private: required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_soundcpu; optional_device<okim6295_device> m_oki; @@ -54,15 +77,6 @@ public: DECLARE_WRITE16_MEMBER(sb3_sound_w); DECLARE_READ16_MEMBER(toto_read); - void init_pzlbreak(); - void init_snowbro3(); - void init_cookbib3(); - void init_4in1boot(); - void init_3in1semi(); - void init_cookbib2(); - void init_toto(); - void init_hyperpac(); - void init_yutnori(); DECLARE_MACHINE_RESET(semiprot); DECLARE_MACHINE_RESET(finalttr); @@ -78,17 +92,7 @@ public: void sb3_play_music(int data); void sb3_play_sound(int data); - void _4in1(machine_config &config); - void semiprot(machine_config &config); - void semicom_mcu(machine_config &config); - void yutnori(machine_config &config); - void snowbros(machine_config &config); - void semicom(machine_config &config); - void twinadv(machine_config &config); - void wintbob(machine_config &config); - void honeydol(machine_config &config); - void snowbro3(machine_config &config); - void finalttr(machine_config &config); + void finalttr_map(address_map &map); void honeydol_map(address_map &map); void honeydol_sound_io_map(address_map &map); diff --git a/src/mame/includes/softbox.h b/src/mame/includes/softbox.h index 23b452a8076..18b71aa7523 100644 --- a/src/mame/includes/softbox.h +++ b/src/mame/includes/softbox.h @@ -33,6 +33,9 @@ public: , m_leds(*this, "led%u", 0U) { } + void softbox(machine_config &config); + +private: // device_ieee488_interface overrides virtual void ieee488_ifc(int state); @@ -51,12 +54,10 @@ public: LED_READY }; - void softbox(machine_config &config); void softbox_io(address_map &map); void softbox_mem(address_map &map); int m_ifc; // Tracks previous state of IEEE-488 IFC line -protected: virtual void machine_start() override; virtual void device_reset_after_children() override; diff --git a/src/mame/includes/solomon.h b/src/mame/includes/solomon.h index 8e947d6a927..aad7b75fc90 100644 --- a/src/mame/includes/solomon.h +++ b/src/mame/includes/solomon.h @@ -20,6 +20,9 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void solomon(machine_config &config); + +private: required_shared_ptr<uint8_t> m_spriteram; required_shared_ptr<uint8_t> m_videoram; required_shared_ptr<uint8_t> m_colorram; @@ -49,7 +52,7 @@ public: required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; required_device<generic_latch_8_device> m_soundlatch; - void solomon(machine_config &config); + void main_map(address_map &map); void sound_map(address_map &map); void sound_portmap(address_map &map); diff --git a/src/mame/includes/sonson.h b/src/mame/includes/sonson.h index ade1bd5f319..4656491d16d 100644 --- a/src/mame/includes/sonson.h +++ b/src/mame/includes/sonson.h @@ -21,6 +21,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void sonson(machine_config &config); + +private: /* memory pointers */ required_shared_ptr<uint8_t> m_videoram; required_shared_ptr<uint8_t> m_colorram; @@ -46,7 +49,7 @@ public: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; - void sonson(machine_config &config); + void main_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/sorcerer.h b/src/mame/includes/sorcerer.h index 7db223944cb..ae88c951cf7 100644 --- a/src/mame/includes/sorcerer.h +++ b/src/mame/includes/sorcerer.h @@ -44,13 +44,6 @@ struct cass_data_t { class sorcerer_state : public driver_device { public: - enum - { - TIMER_SERIAL, - TIMER_CASSETTE, - TIMER_RESET - }; - sorcerer_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -68,25 +61,37 @@ public: , m_iop_x(*this, "X.%u", 0) { } + void sorcerer(machine_config &config); + void sorcererd(machine_config &config); + + void init_sorcerer(); + +private: + enum + { + TIMER_SERIAL, + TIMER_CASSETTE, + TIMER_RESET + }; + DECLARE_READ8_MEMBER(sorcerer_fd_r); DECLARE_READ8_MEMBER(sorcerer_fe_r); DECLARE_WRITE8_MEMBER(sorcerer_fd_w); DECLARE_WRITE8_MEMBER(sorcerer_fe_w); DECLARE_WRITE8_MEMBER(sorcerer_ff_w); DECLARE_MACHINE_START(sorcererd); - void init_sorcerer(); + TIMER_CALLBACK_MEMBER(sorcerer_cassette_tc); TIMER_CALLBACK_MEMBER(sorcerer_serial_tc); TIMER_CALLBACK_MEMBER(sorcerer_reset); DECLARE_SNAPSHOT_LOAD_MEMBER( sorcerer ); DECLARE_QUICKLOAD_LOAD_MEMBER( sorcerer); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void sorcerer(machine_config &config); - void sorcererd(machine_config &config); + void sorcerer_io(address_map &map); void sorcerer_mem(address_map &map); void sorcererd_mem(address_map &map); -private: + uint8_t m_fe; uint8_t m_keyboard_line; const uint8_t *m_p_videoram; diff --git a/src/mame/includes/spacefb.h b/src/mame/includes/spacefb.h index a7b90c6f159..279181d514c 100644 --- a/src/mame/includes/spacefb.h +++ b/src/mame/includes/spacefb.h @@ -38,6 +38,15 @@ public: m_screen(*this, "screen"), m_videoram(*this, "videoram") { } + void spacefb(machine_config &config); + void spacefb_audio(machine_config &config); + +private: + enum + { + TIMER_INTERRUPT + }; + required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<samples_device> m_samples; @@ -77,17 +86,9 @@ public: void draw_sprite(offs_t offs, pen_t *pens, bitmap_rgb32 &bitmap, const rectangle &cliprect, int flip); void draw_objects(bitmap_rgb32 &bitmap, const rectangle &cliprect); - void spacefb(machine_config &config); - void spacefb_audio(machine_config &config); void spacefb_audio_map(address_map &map); void spacefb_main_io_map(address_map &map); void spacefb_main_map(address_map &map); -protected: - - enum - { - TIMER_INTERRUPT - }; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/spbactn.h b/src/mame/includes/spbactn.h index d9fb1ba1ff9..221a4d09c6d 100644 --- a/src/mame/includes/spbactn.h +++ b/src/mame/includes/spbactn.h @@ -27,6 +27,10 @@ public: m_extraram2(*this, "extraram2") { } + void spbactn(machine_config &config); + void spbactnp(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; @@ -57,13 +61,10 @@ public: DECLARE_WRITE8_MEMBER(extraram_w); TILE_GET_INFO_MEMBER(get_extra_tile_info); - - bitmap_ind16 m_tile_bitmap_bg; bitmap_ind16 m_tile_bitmap_fg; bitmap_ind16 m_sprite_bitmap; - DECLARE_WRITE16_MEMBER(spbatnp_90006_w); DECLARE_WRITE16_MEMBER(spbatnp_9000a_w); DECLARE_WRITE16_MEMBER(spbatnp_9000c_w); @@ -75,7 +76,6 @@ public: DECLARE_VIDEO_START(spbactn); DECLARE_VIDEO_START(spbactnp); - //virtual void video_start(); uint32_t screen_update_spbactn(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t screen_update_spbactnp(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -86,8 +86,7 @@ public: { return 0xffff; } - void spbactn(machine_config &config); - void spbactnp(machine_config &config); + void spbactn_map(address_map &map); void spbactn_sound_map(address_map &map); void spbactnp_extra_map(address_map &map); diff --git a/src/mame/includes/spcforce.h b/src/mame/includes/spcforce.h index f2f9b5694cf..c5a34668322 100644 --- a/src/mame/includes/spcforce.h +++ b/src/mame/includes/spcforce.h @@ -22,6 +22,10 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void meteors(machine_config &config); + void spcforce(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(SN76496_latch_w); DECLARE_READ8_MEMBER(SN76496_select_r); DECLARE_WRITE8_MEMBER(SN76496_select_w); @@ -40,12 +44,10 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(vblank_irq); - void meteors(machine_config &config); - void spcforce(machine_config &config); + void spcforce_map(address_map &map); void spcforce_sound_map(address_map &map); -protected: virtual void machine_start() override; required_device<cpu_device> m_maincpu; diff --git a/src/mame/includes/spdodgeb.h b/src/mame/includes/spdodgeb.h index 9b59bd0188c..6174ba80ff4 100644 --- a/src/mame/includes/spdodgeb.h +++ b/src/mame/includes/spdodgeb.h @@ -28,6 +28,11 @@ public: m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram") { } + void spdodgeb(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(mcu63705_busy_r); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<msm5205_device> m_msm1; @@ -84,11 +89,9 @@ public: void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); TIMER_DEVICE_CALLBACK_MEMBER(interrupt); - DECLARE_CUSTOM_INPUT_MEMBER(mcu63705_busy_r); void mcu63705_update_inputs(); void spd_adpcm_int(msm5205_device *device, int chip); - void spdodgeb(machine_config &config); void spdodgeb_map(address_map &map); void spdodgeb_sound_map(address_map &map); }; diff --git a/src/mame/includes/special.h b/src/mame/includes/special.h index a88b9ead896..93efa62815d 100644 --- a/src/mame/includes/special.h +++ b/src/mame/includes/special.h @@ -30,12 +30,6 @@ class special_state : public driver_device { public: - enum - { - TIMER_RESET, - TIMER_PIT8253_GATES - }; - special_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -57,6 +51,22 @@ public: m_io_line(*this, "LINE%u", 0U), m_palette(*this, "palette") { } + void special(machine_config &config); + void erik(machine_config &config); + void specimx(machine_config &config); + void specialp(machine_config &config); + void specialm(machine_config &config); + + void init_erik(); + void init_special(); + +private: + enum + { + TIMER_RESET, + TIMER_PIT8253_GATES + }; + DECLARE_WRITE8_MEMBER(specimx_select_bank); DECLARE_WRITE8_MEMBER(video_memory_w); DECLARE_WRITE8_MEMBER(specimx_video_color_w); @@ -76,8 +86,7 @@ public: DECLARE_WRITE8_MEMBER(specialist_8255_porta_w); DECLARE_WRITE8_MEMBER(specialist_8255_portb_w); DECLARE_WRITE8_MEMBER(specialist_8255_portc_w); - void init_erik(); - void init_special(); + DECLARE_MACHINE_RESET(special); DECLARE_VIDEO_START(special); DECLARE_MACHINE_RESET(erik); @@ -95,17 +104,12 @@ public: DECLARE_WRITE_LINE_MEMBER(fdc_drq); DECLARE_FLOPPY_FORMATS( specimx_floppy_formats ); - void special(machine_config &config); - void erik(machine_config &config); - void specimx(machine_config &config); - void specialp(machine_config &config); - void specialm(machine_config &config); void erik_io_map(address_map &map); void erik_mem(address_map &map); void specialist_mem(address_map &map); void specialp_mem(address_map &map); void specimx_mem(address_map &map); -private: + void specimx_set_bank(offs_t i, uint8_t data); void erik_set_bank(); std::unique_ptr<uint8_t[]> m_specimx_colorram; diff --git a/src/mame/includes/spectrum.h b/src/mame/includes/spectrum.h index 2e014a16593..05b96dec6b7 100644 --- a/src/mame/includes/spectrum.h +++ b/src/mame/includes/spectrum.h @@ -65,12 +65,6 @@ struct EVENT_LIST_ITEM class spectrum_state : public driver_device { public: - enum - { - TIMER_IRQ_ON, - TIMER_IRQ_OFF, - TIMER_SCANLINE - }; spectrum_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_video_ram(*this, "video_ram"), @@ -102,6 +96,26 @@ public: m_io_joy1(*this, "JOY1"), m_io_joy2(*this, "JOY2") { } + void spectrum_common(machine_config &config); + void spectrum(machine_config &config); + void ts2068(machine_config &config); + void uk2086(machine_config &config); + void tc2048(machine_config &config); + void spectrum_plus3(machine_config &config); + void spectrum_128(machine_config &config); + + void init_spectrum(); + void init_plus2(); + void init_plus3(); + +protected: + enum + { + TIMER_IRQ_ON, + TIMER_IRQ_OFF, + TIMER_SCANLINE + }; + int m_port_fe_data; int m_port_7ffd_data; int m_port_1ffd_data; /* scorpion and plus3 */ @@ -160,9 +174,6 @@ public: DECLARE_WRITE8_MEMBER(ts2068_port_ff_w); DECLARE_WRITE8_MEMBER(tc2048_port_ff_w); - void init_spectrum(); - void init_plus2(); - void init_plus3(); DECLARE_MACHINE_RESET(spectrum); DECLARE_VIDEO_START(spectrum); DECLARE_PALETTE_INIT(spectrum); @@ -180,7 +191,7 @@ public: INTERRUPT_GEN_MEMBER(spec_interrupt); // for timex cart only - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( timex_cart ); + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(timex_cart); int m_dock_cart_type, m_ram_chunks; memory_region *m_dock_crt; @@ -189,24 +200,17 @@ public: unsigned int m_previous_screen_x, m_previous_screen_y; bitmap_ind16 m_screen_bitmap; - DECLARE_FLOPPY_FORMATS( floppy_formats ); + DECLARE_FLOPPY_FORMATS(floppy_formats); void spectrum_128_update_memory(); void spectrum_plus3_update_memory(); void ts2068_update_memory(); - DECLARE_SNAPSHOT_LOAD_MEMBER( spectrum ); - DECLARE_QUICKLOAD_LOAD_MEMBER( spectrum ); + DECLARE_SNAPSHOT_LOAD_MEMBER(spectrum); + DECLARE_QUICKLOAD_LOAD_MEMBER(spectrum); required_device<cpu_device> m_maincpu; required_device<screen_device> m_screen; - void spectrum_common(machine_config &config); - void spectrum(machine_config &config); - void ts2068(machine_config &config); - void uk2086(machine_config &config); - void tc2048(machine_config &config); - void spectrum_plus3(machine_config &config); - void spectrum_128(machine_config &config); void spectrum_128_io(address_map &map); void spectrum_128_mem(address_map &map); void spectrum_io(address_map &map); @@ -217,7 +221,7 @@ public: void tc2048_mem(address_map &map); void ts2068_io(address_map &map); void ts2068_mem(address_map &map); -protected: + required_device<cassette_image_device> m_cassette; required_device<ram_device> m_ram; required_device<speaker_sound_device> m_speaker; diff --git a/src/mame/includes/speedatk.h b/src/mame/includes/speedatk.h index bb0f220498d..d0ab125e916 100644 --- a/src/mame/includes/speedatk.h +++ b/src/mame/includes/speedatk.h @@ -16,6 +16,9 @@ public: m_videoram(*this, "videoram"), m_colorram(*this, "colorram") { } + void speedatk(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<h46505_device> m_crtc; required_device<gfxdecode_device> m_gfxdecode; @@ -46,7 +49,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint8_t iox_key_matrix_calc(uint8_t p_side); - void speedatk(machine_config &config); + void speedatk_io(address_map &map); void speedatk_mem(address_map &map); }; diff --git a/src/mame/includes/speedbal.h b/src/mame/includes/speedbal.h index 7273349c483..1beb3adbac1 100644 --- a/src/mame/includes/speedbal.h +++ b/src/mame/includes/speedbal.h @@ -17,6 +17,12 @@ public: , m_digits(*this, "digit%u", 0U) { } + void speedbal(machine_config &config); + + void init_speedbal(); + void init_musicbal(); + +private: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; @@ -31,8 +37,6 @@ public: tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; - void init_speedbal(); - void init_musicbal(); virtual void machine_start() override; virtual void video_start() override; @@ -49,7 +53,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void speedbal(machine_config &config); + void main_cpu_io_map(address_map &map); void main_cpu_map(address_map &map); void sound_cpu_io_map(address_map &map); diff --git a/src/mame/includes/speedspn.h b/src/mame/includes/speedspn.h index 325f863a4e9..1e9ab2c243f 100644 --- a/src/mame/includes/speedspn.h +++ b/src/mame/includes/speedspn.h @@ -20,6 +20,9 @@ public: m_okibank(*this, "okibank"), m_attram(*this, "attram") { } + void speedspn(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<okim6295_device> m_oki; @@ -49,7 +52,7 @@ public: virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); - void speedspn(machine_config &config); + void io_map(address_map &map); void oki_map(address_map &map); void program_map(address_map &map); diff --git a/src/mame/includes/splash.h b/src/mame/includes/splash.h index d348da7ecc9..74fcb56a686 100644 --- a/src/mame/includes/splash.h +++ b/src/mame/includes/splash.h @@ -31,6 +31,15 @@ public: m_bitmap_mode(*this, "bitmap_mode") { } + void roldfrog(machine_config &config); + void splash(machine_config &config); + + void init_splash10(); + void init_roldfrog(); + void init_splash(); + void init_rebus(); + +protected: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; optional_device<msm5205_device> m_msm; @@ -81,10 +90,6 @@ public: //roldfrog and funystrp specific DECLARE_WRITE8_MEMBER(sound_bank_w); - void init_splash10(); - void init_roldfrog(); - void init_splash(); - void init_rebus(); virtual void video_start() override; DECLARE_MACHINE_START(splash); DECLARE_MACHINE_START(roldfrog); @@ -99,8 +104,7 @@ public: INTERRUPT_GEN_MEMBER(roldfrog_interrupt); void roldfrog_update_irq( ); - void roldfrog(machine_config &config); - void splash(machine_config &config); + void funystrp_sound_map(address_map &map); void roldfrog_map(address_map &map); void roldfrog_sound_io_map(address_map &map); @@ -122,10 +126,10 @@ public: m_funystrp_ff3cc8_val(0) { } - void init_funystrp(); - void funystrp(machine_config &config); + void init_funystrp(); + protected: virtual void machine_start() override; diff --git a/src/mame/includes/sprint2.h b/src/mame/includes/sprint2.h index 9731bb53e7c..15ad43d5873 100644 --- a/src/mame/includes/sprint2.h +++ b/src/mame/includes/sprint2.h @@ -45,6 +45,17 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + void sprint1(machine_config &config); + void sprint2(machine_config &config); + void dominos4(machine_config &config); + void dominos(machine_config &config); + + void init_sprint1(); + void init_sprint2(); + void init_dominos(); + void init_dominos4(); + +private: int m_steering[2]; int m_gear[2]; int m_game; @@ -70,10 +81,6 @@ public: DECLARE_WRITE8_MEMBER(sprint2_collision_reset2_w); DECLARE_WRITE8_MEMBER(sprint2_video_ram_w); DECLARE_WRITE8_MEMBER(sprint2_noise_reset_w); - void init_sprint1(); - void init_sprint2(); - void init_dominos(); - void init_dominos4(); TILE_GET_INFO_MEMBER(get_tile_info); virtual void video_start() override; DECLARE_PALETTE_INIT(sprint2); @@ -92,10 +99,7 @@ public: required_device<gfxdecode_device> m_gfxdecode; required_device<screen_device> m_screen; required_device<palette_device> m_palette; - void sprint1(machine_config &config); - void sprint2(machine_config &config); - void dominos4(machine_config &config); - void dominos(machine_config &config); + void sprint2_map(address_map &map); }; diff --git a/src/mame/includes/sprint4.h b/src/mame/includes/sprint4.h index f8703bfc48b..2646d78b411 100644 --- a/src/mame/includes/sprint4.h +++ b/src/mame/includes/sprint4.h @@ -29,12 +29,13 @@ public: m_videoram(*this, "videoram") { } + void sprint4(machine_config &config); + DECLARE_CUSTOM_INPUT_MEMBER(get_lever); DECLARE_CUSTOM_INPUT_MEMBER(get_wheel); DECLARE_CUSTOM_INPUT_MEMBER(get_collision); - void sprint4(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER(wram_r); DECLARE_READ8_MEMBER(analog_r); DECLARE_READ8_MEMBER(coin_r); @@ -64,7 +65,6 @@ protected: void sprint4_cpu_map(address_map &map); -private: required_device<cpu_device> m_maincpu; required_device<watchdog_timer_device> m_watchdog; required_device<discrete_device> m_discrete; diff --git a/src/mame/includes/sprint8.h b/src/mame/includes/sprint8.h index c858b1e2c2d..f6af552bb8c 100644 --- a/src/mame/includes/sprint8.h +++ b/src/mame/includes/sprint8.h @@ -29,7 +29,7 @@ public: void sprint8(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER(collision_r); DECLARE_READ8_MEMBER(input_r); DECLARE_WRITE8_MEMBER(lockout_w); @@ -55,7 +55,6 @@ protected: void sprint8_audio(machine_config &config); void sprint8_map(address_map &map); -private: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<screen_device> m_screen; diff --git a/src/mame/includes/spy.h b/src/mame/includes/spy.h index 8db0b067e1c..d5f8c754c64 100644 --- a/src/mame/includes/spy.h +++ b/src/mame/includes/spy.h @@ -25,6 +25,9 @@ public: m_k051960(*this, "k051960"), m_palette(*this, "palette") { } + void spy(machine_config &config); + +private: /* memory pointers */ required_shared_ptr<uint8_t> m_ram; uint8_t m_pmcram[0x800]; @@ -61,7 +64,7 @@ public: DECLARE_WRITE8_MEMBER(volume_callback1); K052109_CB_MEMBER(tile_callback); K051960_CB_MEMBER(sprite_callback); - void spy(machine_config &config); + void spy_map(address_map &map); void spy_sound_map(address_map &map); }; diff --git a/src/mame/includes/srmp2.h b/src/mame/includes/srmp2.h index 72e12c51a14..1ad9f968351 100644 --- a/src/mame/includes/srmp2.h +++ b/src/mame/includes/srmp2.h @@ -24,6 +24,12 @@ public: m_mainbank(*this, "mainbank") { } + void mjyuugi(machine_config &config); + void srmp2(machine_config &config); + void rmgoldyh(machine_config &config); + void srmp3(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<seta001_device> m_seta001; required_device<msm5205_device> m_msm; @@ -80,10 +86,7 @@ public: SETA001_SPRITE_GFXBANK_CB_MEMBER(srmp3_gfxbank_callback); uint8_t iox_key_matrix_calc(uint8_t p_side); - void mjyuugi(machine_config &config); - void srmp2(machine_config &config); - void rmgoldyh(machine_config &config); - void srmp3(machine_config &config); + void mjyuugi_map(address_map &map); void rmgoldyh_io_map(address_map &map); void rmgoldyh_map(address_map &map); diff --git a/src/mame/includes/srumbler.h b/src/mame/includes/srumbler.h index 5862bb28629..e3b5432c514 100644 --- a/src/mame/includes/srumbler.h +++ b/src/mame/includes/srumbler.h @@ -17,6 +17,9 @@ public: m_backgroundram(*this, "backgroundram"), m_foregroundram(*this, "foregroundram") { } + void srumbler(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<buffered_spriteram8_device> m_spriteram; required_device<gfxdecode_device> m_gfxdecode; @@ -45,7 +48,6 @@ public: void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(interrupt); - void srumbler(machine_config &config); void srumbler_map(address_map &map); void srumbler_sound_map(address_map &map); }; diff --git a/src/mame/includes/sshangha.h b/src/mame/includes/sshangha.h index 52cef935b4a..d77b2fdb1b1 100644 --- a/src/mame/includes/sshangha.h +++ b/src/mame/includes/sshangha.h @@ -10,10 +10,10 @@ class sshangha_state : public driver_device public: sshangha_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_deco146(*this, "ioprot"), - m_deco_tilegen1(*this, "tilegen1"), - m_spriteram(*this, "spriteram"), - m_spriteram2(*this, "spriteram2"), + m_deco146(*this, "ioprot"), + m_deco_tilegen1(*this, "tilegen1"), + m_spriteram(*this, "spriteram"), + m_spriteram2(*this, "spriteram2"), m_sound_shared_ram(*this, "sound_shared"), m_pf1_rowscroll(*this, "pf1_rowscroll"), m_pf2_rowscroll(*this, "pf2_rowscroll"), @@ -26,8 +26,15 @@ public: m_sprgen2(*this, "spritegen2"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), - m_palette(*this, "palette") { } + m_palette(*this, "palette") + { } + void sshanghb(machine_config &config); + void sshangha(machine_config &config); + + void init_sshangha(); + +private: optional_device<deco146_device> m_deco146; required_device<deco16ic_device> m_deco_tilegen1; required_shared_ptr<uint16_t> m_spriteram; @@ -50,11 +57,10 @@ public: int m_video_control; DECO16IC_BANK_CB_MEMBER(bank_callback); - DECLARE_READ16_MEMBER( sshangha_protection_region_8_146_r ); - DECLARE_WRITE16_MEMBER( sshangha_protection_region_8_146_w ); - DECLARE_READ16_MEMBER( sshangha_protection_region_d_146_r ); - DECLARE_WRITE16_MEMBER( sshangha_protection_region_d_146_w ); - + DECLARE_READ16_MEMBER(sshangha_protection_region_8_146_r); + DECLARE_WRITE16_MEMBER(sshangha_protection_region_8_146_w); + DECLARE_READ16_MEMBER(sshangha_protection_region_d_146_r); + DECLARE_WRITE16_MEMBER(sshangha_protection_region_d_146_w); DECLARE_READ16_MEMBER(sshanghb_protection16_r); DECLARE_READ16_MEMBER(deco_71_r); @@ -65,7 +71,7 @@ public: DECLARE_WRITE16_MEMBER(paletteram16_xbgr_word_be_tilelow_w); DECLARE_WRITE16_MEMBER(paletteram16_xbgr_word_be_tilehigh_w); DECLARE_WRITE16_MEMBER(sshangha_video_w); - void init_sshangha(); + virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_sshangha(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -73,8 +79,7 @@ public: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<palette_device> m_palette; - void sshanghb(machine_config &config); - void sshangha(machine_config &config); + void sshangha_map(address_map &map); void sshangha_sound_map(address_map &map); void sshanghb_map(address_map &map); diff --git a/src/mame/includes/sslam.h b/src/mame/includes/sslam.h index d89bcf0f7f0..0bb7be28a2a 100644 --- a/src/mame/includes/sslam.h +++ b/src/mame/includes/sslam.h @@ -22,7 +22,13 @@ public: m_regs(*this, "regs"), m_spriteram(*this, "spriteram") { } + void sslam(machine_config &config); + void powerbls(machine_config &config); + + void init_sslam(); + void init_powerbls(); +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<okim6295_device> m_oki; @@ -62,8 +68,7 @@ public: DECLARE_WRITE16_MEMBER(sslam_bg_tileram_w); DECLARE_WRITE16_MEMBER(powerbls_bg_tileram_w); DECLARE_WRITE8_MEMBER(sslam_snd_w); - void init_sslam(); - void init_powerbls(); + TILE_GET_INFO_MEMBER(get_sslam_tx_tile_info); TILE_GET_INFO_MEMBER(get_sslam_md_tile_info); TILE_GET_INFO_MEMBER(get_sslam_bg_tile_info); @@ -75,8 +80,7 @@ public: TIMER_CALLBACK_MEMBER(music_playback); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); void sslam_play(int track, int data); - void sslam(machine_config &config); - void powerbls(machine_config &config); + void powerbls_map(address_map &map); void sslam_program_map(address_map &map); }; diff --git a/src/mame/includes/ssozumo.h b/src/mame/includes/ssozumo.h index 97a32df9e1f..a2affae7b49 100644 --- a/src/mame/includes/ssozumo.h +++ b/src/mame/includes/ssozumo.h @@ -19,6 +19,11 @@ public: m_videoram2(*this, "videoram2"), m_colorram2(*this, "colorram2") { } + void ssozumo(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: DECLARE_WRITE8_MEMBER(sound_nmi_mask_w); DECLARE_WRITE8_MEMBER(videoram_w); DECLARE_WRITE8_MEMBER(colorram_w); @@ -28,8 +33,6 @@ public: DECLARE_WRITE8_MEMBER(scroll_w); DECLARE_WRITE8_MEMBER(flipscreen_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - INTERRUPT_GEN_MEMBER(sound_timer_irq); TILE_GET_INFO_MEMBER(get_bg_tile_info); @@ -38,14 +41,12 @@ public: DECLARE_PALETTE_INIT(ssozumo); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void ssozumo(machine_config &config); void ssozumo_map(address_map &map); void ssozumo_sound_map(address_map &map); -protected: + virtual void machine_start() override; virtual void video_start() override; -private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; diff --git a/src/mame/includes/sspeedr.h b/src/mame/includes/sspeedr.h index 4a895d97568..7cb6bc05184 100644 --- a/src/mame/includes/sspeedr.h +++ b/src/mame/includes/sspeedr.h @@ -14,6 +14,9 @@ public: , m_digits(*this, "digit%u", 0U) { } + void sspeedr(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(sspeedr_int_ack_w); DECLARE_WRITE8_MEMBER(sspeedr_lamp_w); DECLARE_WRITE8_MEMBER(sspeedr_time_w); @@ -34,11 +37,9 @@ public: DECLARE_PALETTE_INIT(sspeedr); uint32_t screen_update_sspeedr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank_sspeedr); - void sspeedr(machine_config &config); void sspeedr_io_map(address_map &map); void sspeedr_map(address_map &map); -private: uint8_t m_led_TIME[2]; uint8_t m_led_SCORE[24]; int m_toggle; diff --git a/src/mame/includes/ssrj.h b/src/mame/includes/ssrj.h index e20f342aa4f..4db0839e211 100644 --- a/src/mame/includes/ssrj.h +++ b/src/mame/includes/ssrj.h @@ -17,6 +17,9 @@ public: m_vram4(*this, "vram4"), m_scrollram(*this, "scrollram") { } + void ssrj(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; @@ -50,6 +53,6 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank); void draw_objects(bitmap_ind16 &bitmap, const rectangle &cliprect ); - void ssrj(machine_config &config); + void ssrj_map(address_map &map); }; diff --git a/src/mame/includes/ssv.h b/src/mame/includes/ssv.h index cfb3ed2ebca..aeedc05b698 100644 --- a/src/mame/includes/ssv.h +++ b/src/mame/includes/ssv.h @@ -38,6 +38,54 @@ public: m_palette(*this, "palette") { } + void ssv(machine_config &config); + void gdfs(machine_config &config); + void dynagear(machine_config &config); + void hypreac2(machine_config &config); + void meosism(machine_config &config); + void drifto94(machine_config &config); + void stmblade(machine_config &config); + void srmp4(machine_config &config); + void srmp7(machine_config &config); + void twineag2(machine_config &config); + void ryorioh(machine_config &config); + void janjans1(machine_config &config); + void eaglshot(machine_config &config); + void survarts(machine_config &config); + void sxyreac2(machine_config &config); + void ultrax(machine_config &config); + void vasara(machine_config &config); + void sxyreact(machine_config &config); + void mslider(machine_config &config); + void jsk(machine_config &config); + void hypreact(machine_config &config); + void keithlcy(machine_config &config); + void cairblad(machine_config &config); + + void init_gdfs(); + void init_sxyreac2(); + void init_hypreac2(); + void init_hypreact(); + void init_dynagear(); + void init_eaglshot(); + void init_srmp4(); + void init_srmp7(); + void init_keithlcy(); + void init_meosism(); + void init_vasara(); + void init_cairblad(); + void init_sxyreact(); + void init_janjans1(); + void init_ryorioh(); + void init_drifto94(); + void init_survarts(); + void init_ultrax(); + void init_stmblade(); + void init_jsk(); + void init_twineag2(); + void init_mslider(); + +private: required_device<cpu_device> m_maincpu; required_device<es5506_device> m_ensoniq; optional_device<eeprom_serial_93cxx_device> m_eeprom; @@ -103,28 +151,6 @@ public: TILE_GET_INFO_MEMBER(get_tile_info_0); - void init_gdfs(); - void init_sxyreac2(); - void init_hypreac2(); - void init_hypreact(); - void init_dynagear(); - void init_eaglshot(); - void init_srmp4(); - void init_srmp7(); - void init_keithlcy(); - void init_meosism(); - void init_vasara(); - void init_cairblad(); - void init_sxyreact(); - void init_janjans1(); - void init_ryorioh(); - void init_drifto94(); - void init_survarts(); - void init_ultrax(); - void init_stmblade(); - void init_jsk(); - void init_twineag2(); - void init_mslider(); virtual void machine_reset() override; virtual void video_start() override; DECLARE_VIDEO_START(gdfs); @@ -148,29 +174,7 @@ public: void init_hypreac2_common(); void init_eaglshot_banking(); - void ssv(machine_config &config); - void gdfs(machine_config &config); - void dynagear(machine_config &config); - void hypreac2(machine_config &config); - void meosism(machine_config &config); - void drifto94(machine_config &config); - void stmblade(machine_config &config); - void srmp4(machine_config &config); - void srmp7(machine_config &config); - void twineag2(machine_config &config); - void ryorioh(machine_config &config); - void janjans1(machine_config &config); - void eaglshot(machine_config &config); - void survarts(machine_config &config); - void sxyreac2(machine_config &config); - void ultrax(machine_config &config); - void vasara(machine_config &config); - void sxyreact(machine_config &config); - void mslider(machine_config &config); - void jsk(machine_config &config); - void hypreact(machine_config &config); - void keithlcy(machine_config &config); - void cairblad(machine_config &config); + void drifto94_map(address_map &map); void dsp_data_map(address_map &map); void dsp_prg_map(address_map &map); @@ -191,7 +195,7 @@ public: void sxyreact_map(address_map &map); void twineag2_map(address_map &map); void ultrax_map(address_map &map); -protected: + optional_ioport_array<4> m_io_key; optional_ioport m_io_service; optional_ioport m_io_paddle; diff --git a/src/mame/includes/ssystem3.h b/src/mame/includes/ssystem3.h index bcbd7c061b8..7a61d7986ac 100644 --- a/src/mame/includes/ssystem3.h +++ b/src/mame/includes/ssystem3.h @@ -51,7 +51,11 @@ public: , m_matrix(*this, "matrix.%u", 0) { } + void ssystem3(machine_config &config); + void init_ssystem3(); + +private: virtual void video_start() override; DECLARE_PALETTE_INIT(ssystem3); uint32_t screen_update_ssystem3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -68,9 +72,8 @@ public: void ssystem3_playfield_write(int reset, int signal); void ssystem3_playfield_read(int *on, int *ready); - void ssystem3(machine_config &config); void ssystem3_map(address_map &map); -private: + uint8_t m_porta; std::unique_ptr<uint8_t[]> m_videoram; playfield_t m_playfield; diff --git a/src/mame/includes/stactics.h b/src/mame/includes/stactics.h index 52cf3013327..c6ed94e64fe 100644 --- a/src/mame/includes/stactics.h +++ b/src/mame/includes/stactics.h @@ -38,15 +38,15 @@ public: m_fake(*this, "FAKE") { } + void stactics(machine_config &config); + DECLARE_CUSTOM_INPUT_MEMBER(get_frame_count_d3); DECLARE_CUSTOM_INPUT_MEMBER(get_shot_standby); DECLARE_CUSTOM_INPUT_MEMBER(get_not_shot_arrive); DECLARE_CUSTOM_INPUT_MEMBER(get_motor_not_ready); DECLARE_CUSTOM_INPUT_MEMBER(get_rng); - void stactics(machine_config &config); - -protected: +private: DECLARE_READ8_MEMBER(vert_pos_r); DECLARE_READ8_MEMBER(horiz_pos_r); DECLARE_WRITE_LINE_MEMBER(coin_lockout_1_w); @@ -83,7 +83,6 @@ protected: void stactics_video(machine_config &config); void main_map(address_map &map); -private: required_device<cpu_device> m_maincpu; required_device<ls259_device> m_outlatch; diff --git a/src/mame/includes/stadhero.h b/src/mame/includes/stadhero.h index 60c21ac4205..547a42ed624 100644 --- a/src/mame/includes/stadhero.h +++ b/src/mame/includes/stadhero.h @@ -19,6 +19,9 @@ public: m_spriteram(*this, "spriteram"), m_pf1_data(*this, "pf1_data") { } + void stadhero(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<deco_bac06_device> m_tilegen1; @@ -38,7 +41,6 @@ public: TILE_GET_INFO_MEMBER(get_pf1_tile_info); uint32_t screen_update_stadhero(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void stadhero(machine_config &config); void audio_map(address_map &map); void main_map(address_map &map); }; diff --git a/src/mame/includes/starcrus.h b/src/mame/includes/starcrus.h index a7caa02b771..ed5181c443f 100644 --- a/src/mame/includes/starcrus.h +++ b/src/mame/includes/starcrus.h @@ -17,6 +17,7 @@ public: void starcrus(machine_config &config); +private: DECLARE_WRITE8_MEMBER(s1_x_w); DECLARE_WRITE8_MEMBER(s1_y_w); DECLARE_WRITE8_MEMBER(s2_x_w); @@ -31,11 +32,9 @@ public: DECLARE_WRITE8_MEMBER(proj_parm_2_w); DECLARE_READ8_MEMBER(coll_det_r); -protected: virtual void machine_start() override; virtual void video_start() override; -private: required_device<cpu_device> m_maincpu; required_device<samples_device> m_samples; required_device<gfxdecode_device> m_gfxdecode; diff --git a/src/mame/includes/starfire.h b/src/mame/includes/starfire.h index 56e5a0fe40a..8dda83c71bd 100644 --- a/src/mame/includes/starfire.h +++ b/src/mame/includes/starfire.h @@ -34,6 +34,13 @@ public: m_maincpu(*this, "maincpu"), m_screen(*this, "screen") { } + void fireone(machine_config &config); + void starfire(machine_config &config); + + void init_starfire(); + void init_fireone(); + +private: required_shared_ptr<uint8_t> m_starfire_colorram; required_shared_ptr<uint8_t> m_starfire_videoram; optional_device<samples_device> m_samples; @@ -62,8 +69,6 @@ public: DECLARE_READ8_MEMBER(starfire_colorram_r); DECLARE_WRITE8_MEMBER(starfire_videoram_w); DECLARE_READ8_MEMBER(starfire_videoram_r); - void init_starfire(); - void init_fireone(); virtual void video_start() override; uint32_t screen_update_starfire(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(starfire_scanline_callback); @@ -71,7 +76,6 @@ public: void get_pens(pen_t *pens); required_device<cpu_device> m_maincpu; required_device<screen_device> m_screen; - void fireone(machine_config &config); - void starfire(machine_config &config); + void main_map(address_map &map); }; diff --git a/src/mame/includes/starshp1.h b/src/mame/includes/starshp1.h index bdf2484f73c..25bbf4ef447 100644 --- a/src/mame/includes/starshp1.h +++ b/src/mame/includes/starshp1.h @@ -63,11 +63,12 @@ public: m_led(*this, "led0") { } + void starshp1(machine_config &config); + DECLARE_CUSTOM_INPUT_MEMBER(starshp1_analog_r); DECLARE_CUSTOM_INPUT_MEMBER(collision_latch_r); - void starshp1(machine_config &config); -protected: +private: virtual void machine_start() override; DECLARE_WRITE8_MEMBER(starshp1_collision_reset_w); DECLARE_WRITE8_MEMBER(starshp1_analog_in_w); diff --git a/src/mame/includes/starwars.h b/src/mame/includes/starwars.h index 98459efcc05..7177faab06d 100644 --- a/src/mame/includes/starwars.h +++ b/src/mame/includes/starwars.h @@ -35,6 +35,15 @@ public: m_slapstic_device(*this, "slapstic") { } + void starwars(machine_config &config); + void esb(machine_config &config); + + void init_esb(); + void init_starwars(); + + DECLARE_CUSTOM_INPUT_MEMBER(matrix_flag_r); + +private: required_device<generic_latch_8_device> m_soundlatch; required_device<generic_latch_8_device> m_mainlatch; required_device<riot6532_device> m_riot; @@ -76,23 +85,21 @@ public: DECLARE_READ8_MEMBER(starwars_div_reh_r); DECLARE_READ8_MEMBER(starwars_div_rel_r); DECLARE_WRITE8_MEMBER(starwars_math_w); - DECLARE_CUSTOM_INPUT_MEMBER(matrix_flag_r); + DECLARE_READ8_MEMBER(starwars_main_ready_flag_r); DECLARE_WRITE_LINE_MEMBER(boost_interleave_hack); DECLARE_WRITE8_MEMBER(starwars_soundrst_w); DECLARE_WRITE8_MEMBER(quad_pokeyn_w); - void init_esb(); - void init_starwars(); virtual void machine_reset() override; TIMER_CALLBACK_MEMBER(math_run_clear); DECLARE_READ8_MEMBER(r6532_porta_r); DECLARE_WRITE8_MEMBER(r6532_porta_w); + void starwars_mproc_init(); void starwars_mproc_reset(); void run_mproc(); void esb_slapstic_tweak(address_space &space, offs_t offset); - void starwars(machine_config &config); - void esb(machine_config &config); + void esb_main_map(address_map &map); void main_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/stfight.h b/src/mame/includes/stfight.h index cab600114d2..f67f715b091 100644 --- a/src/mame/includes/stfight.h +++ b/src/mame/includes/stfight.h @@ -34,12 +34,17 @@ public: { } - DECLARE_WRITE_LINE_MEMBER(stfight_adpcm_int); + void stfight_base(machine_config &config); + void stfight(machine_config &config); + void cshooter(machine_config &config); void init_stfight(); void init_empcity(); void init_cshooter(); +private: + DECLARE_WRITE_LINE_MEMBER(stfight_adpcm_int); + DECLARE_WRITE8_MEMBER(stfight_io_w); DECLARE_READ8_MEMBER(stfight_coin_r); DECLARE_WRITE8_MEMBER(stfight_coin_w); @@ -58,15 +63,12 @@ public: DECLARE_WRITE8_MEMBER(stfight_68705_port_b_w); DECLARE_WRITE8_MEMBER(stfight_68705_port_c_w); - void stfight_base(machine_config &config); - void stfight(machine_config &config); - void cshooter(machine_config &config); void cpu1_map(address_map &map); void cpu2_map(address_map &map); void cshooter_cpu1_map(address_map &map); void decrypted_opcodes_map(address_map &map); void stfight_cpu1_map(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/stlforce.h b/src/mame/includes/stlforce.h index f8faf1966da..6061804005c 100644 --- a/src/mame/includes/stlforce.h +++ b/src/mame/includes/stlforce.h @@ -24,6 +24,13 @@ public: m_spriteram(*this, "spriteram"), m_okibank(*this, "okibank") { } + void stlforce(machine_config &config); + void twinbrat(machine_config &config); + + void init_twinbrat(); + void init_stlforce(); + +private: required_device<cpu_device> m_maincpu; required_device<eeprom_serial_93cxx_device> m_eeprom; required_device<gfxdecode_device> m_gfxdecode; @@ -55,9 +62,6 @@ public: DECLARE_WRITE8_MEMBER(eeprom_w); DECLARE_WRITE8_MEMBER(oki_bank_w); - void init_twinbrat(); - void init_stlforce(); - TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_mlow_tile_info); TILE_GET_INFO_MEMBER(get_mhigh_tile_info); @@ -66,8 +70,7 @@ public: virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); - void stlforce(machine_config &config); - void twinbrat(machine_config &config); + void stlforce_map(address_map &map); void twinbrat_oki_map(address_map &map); }; diff --git a/src/mame/includes/stv.h b/src/mame/includes/stv.h index 8379c27af97..dac9786053f 100644 --- a/src/mame/includes/stv.h +++ b/src/mame/includes/stv.h @@ -27,6 +27,15 @@ public: { } + void stv_slot(machine_config &config); + void stv_cartslot(machine_config &config); + void stv(machine_config &config); + void hopper(machine_config &config); + void batmanfr(machine_config &config); + void stv_5838(machine_config &config); + void stv_5881(machine_config &config); + void stvcd(machine_config &config); + void init_astrass(); void init_batmanfr(); void init_finlarch(); @@ -74,6 +83,7 @@ public: void init_mausuke(); void init_hopper(); +private: DECLARE_READ8_MEMBER(stv_ioga_r); DECLARE_WRITE8_MEMBER(stv_ioga_w); DECLARE_READ8_MEMBER(critcrsh_ioga_r); @@ -144,14 +154,7 @@ public: DECLARE_WRITE8_MEMBER(pdr2_output_w); void stv_select_game(int gameno); uint8_t m_prev_gamebank_select; - void stv_slot(machine_config &config); - void stv_cartslot(machine_config &config); - void stv(machine_config &config); - void hopper(machine_config &config); - void batmanfr(machine_config &config); - void stv_5838(machine_config &config); - void stv_5881(machine_config &config); - void stvcd(machine_config &config); + void sound_mem(address_map &map); void stv_mem(address_map &map); void stvcd_mem(address_map &map); diff --git a/src/mame/includes/sub.h b/src/mame/includes/sub.h index eea664e068c..730597baa07 100644 --- a/src/mame/includes/sub.h +++ b/src/mame/includes/sub.h @@ -36,6 +36,9 @@ public: m_spriteram2(*this, "spriteram2"), m_scrolly(*this, "scrolly") { } + void sub(machine_config &config); + +private: bool m_int_en; bool m_nmi_en; @@ -52,17 +55,14 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(main_irq); INTERRUPT_GEN_MEMBER(sound_irq); - void sub(machine_config &config); void subm_io(address_map &map); void subm_map(address_map &map); void subm_sound_io(address_map &map); void subm_sound_map(address_map &map); -protected: virtual void machine_start() override; virtual void video_start() override; -private: tilemap_t *m_tilemap; required_device<cpu_device> m_maincpu; diff --git a/src/mame/includes/subs.h b/src/mame/includes/subs.h index 6c420fb57fb..f969077d381 100644 --- a/src/mame/includes/subs.h +++ b/src/mame/includes/subs.h @@ -34,6 +34,9 @@ public: m_videoram(*this, "videoram") { } + void subs(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; @@ -68,7 +71,7 @@ public: int steering_1(); int steering_2(); - void subs(machine_config &config); + void main_map(address_map &map); }; diff --git a/src/mame/includes/suna16.h b/src/mame/includes/suna16.h index 4271a960e5f..362f4a4611c 100644 --- a/src/mame/includes/suna16.h +++ b/src/mame/includes/suna16.h @@ -25,6 +25,14 @@ public: , m_leds(*this, "led%u", 0U) { } + void uballoon(machine_config &config); + void sunaq(machine_config &config); + void bssoccer(machine_config &config); + void bestbest(machine_config &config); + + void init_uballoon(); + +private: // common DECLARE_WRITE16_MEMBER(soundlatch_w); DECLARE_READ16_MEMBER(paletteram_r); @@ -51,7 +59,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(bssoccer_interrupt); - void init_uballoon(); virtual void video_start() override; DECLARE_MACHINE_START(bestbest); DECLARE_MACHINE_START(bssoccer); @@ -61,10 +68,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_bestbest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint16_t *sprites, int gfx); - void uballoon(machine_config &config); - void sunaq(machine_config &config); - void bssoccer(machine_config &config); - void bestbest(machine_config &config); + void bestbest_map(address_map &map); void bestbest_pcm_1_iomap(address_map &map); void bestbest_pcm_1_map(address_map &map); @@ -82,7 +86,6 @@ public: void uballoon_pcm_1_map(address_map &map); void uballoon_sound_map(address_map &map); -protected: required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_pcm1; optional_device<cpu_device> m_pcm2; diff --git a/src/mame/includes/suna8.h b/src/mame/includes/suna8.h index 220869dd95c..6b55fe81c88 100644 --- a/src/mame/includes/suna8.h +++ b/src/mame/includes/suna8.h @@ -34,6 +34,29 @@ public: m_leds(*this, "led%u", 0U) { } + void brickzn(machine_config &config); + void starfigh(machine_config &config); + void sparkman(machine_config &config); + void hardhea2b(machine_config &config); + void brickzn11(machine_config &config); + void hardhead(machine_config &config); + void hardhea2(machine_config &config); + void rranger(machine_config &config); + + void init_brickzn_common(); + void init_brickznv5(); + void init_brickznv4(); + void init_starfigh(); + void init_hardhea2(); + void init_hardhea2b(); + void init_hardhedb(); + void init_sparkman(); + void init_brickzn(); + void init_brickzn11(); + void init_hardhead(); + void init_suna8(); + +private: enum GFXBANK_TYPE_T { GFXBANK_TYPE_SPARKMAN, @@ -96,18 +119,6 @@ public: DECLARE_READ8_MEMBER(suna8_banked_spriteram_r); DECLARE_WRITE8_MEMBER(suna8_spriteram_w); DECLARE_WRITE8_MEMBER(suna8_banked_spriteram_w); - void init_brickzn_common(); - void init_brickznv5(); - void init_brickznv4(); - void init_starfigh(); - void init_hardhea2(); - void init_hardhea2b(); - void init_hardhedb(); - void init_sparkman(); - void init_brickzn(); - void init_brickzn11(); - void init_hardhead(); - void init_suna8(); void suna8_vh_start_common(bool has_text, GFXBANK_TYPE_T gfxbank_type); DECLARE_VIDEO_START(suna8_text); @@ -130,14 +141,7 @@ public: void draw_sprites (screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end, int which); void draw_text_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end, int ypos, bool write_mask); uint8_t *brickzn_decrypt(); - void brickzn(machine_config &config); - void starfigh(machine_config &config); - void sparkman(machine_config &config); - void hardhea2b(machine_config &config); - void brickzn11(machine_config &config); - void hardhead(machine_config &config); - void hardhea2(machine_config &config); - void rranger(machine_config &config); + void brickzn11_map(address_map &map); void brickzn_io_map(address_map &map); void brickzn_map(address_map &map); @@ -156,7 +160,6 @@ public: void sparkman_map(address_map &map); void starfigh_map(address_map &map); -protected: virtual void machine_start() override { m_leds.resolve(); } required_device<cpu_device> m_maincpu; diff --git a/src/mame/includes/supbtime.h b/src/mame/includes/supbtime.h index dd48e89d15e..52665b50bb9 100644 --- a/src/mame/includes/supbtime.h +++ b/src/mame/includes/supbtime.h @@ -33,13 +33,13 @@ public: , m_sprgen(*this, "spritegen") { } - void init_tumblep(); - void chinatwn(machine_config &config); void supbtime(machine_config &config); void tumblep(machine_config &config); -protected: + void init_tumblep(); + +private: DECLARE_WRITE_LINE_MEMBER(vblank_w); DECLARE_READ16_MEMBER(vblank_ack_r); uint32_t screen_update_supbtime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -50,7 +50,6 @@ protected: void supbtime_map(address_map &map); void tumblep_map(address_map &map); -private: required_shared_ptr<uint16_t> m_spriteram; required_shared_ptr_array<uint16_t, 2> m_pf_rowscroll; required_device<cpu_device> m_maincpu; diff --git a/src/mame/includes/super6.h b/src/mame/includes/super6.h index 14103e90021..1fecf3ae3aa 100644 --- a/src/mame/includes/super6.h +++ b/src/mame/includes/super6.h @@ -48,7 +48,7 @@ public: void super6(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; @@ -71,7 +71,6 @@ protected: void bankswitch(); -private: required_device<cpu_device> m_maincpu; required_device<z80ctc_device> m_ctc; required_device<z80dart_device> m_dart; diff --git a/src/mame/includes/super80.h b/src/mame/includes/super80.h index 32c8cd00b4e..e5a963ae191 100644 --- a/src/mame/includes/super80.h +++ b/src/mame/includes/super80.h @@ -57,6 +57,16 @@ public: , m_cass_led(*this, "cass_led") { } + void super80m(machine_config &config); + void super80(machine_config &config); + void super80r(machine_config &config); + void super80e(machine_config &config); + void super80d(machine_config &config); + void super80v(machine_config &config); + + void init_super80(); + +private: void machine_start() override; DECLARE_READ8_MEMBER(super80v_low_r); @@ -80,7 +90,6 @@ public: DECLARE_WRITE8_MEMBER(io_write_byte); DECLARE_WRITE8_MEMBER(pio_port_a_w); DECLARE_READ8_MEMBER(pio_port_b_r); - void init_super80(); DECLARE_MACHINE_RESET(super80); DECLARE_MACHINE_RESET(super80r); DECLARE_VIDEO_START(super80); @@ -97,12 +106,7 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(timer_h); TIMER_DEVICE_CALLBACK_MEMBER(timer_k); TIMER_DEVICE_CALLBACK_MEMBER(timer_p); - void super80m(machine_config &config); - void super80(machine_config &config); - void super80r(machine_config &config); - void super80e(machine_config &config); - void super80d(machine_config &config); - void super80v(machine_config &config); + void super80_io(address_map &map); void super80_map(address_map &map); void super80e_io(address_map &map); @@ -110,7 +114,7 @@ public: void super80r_io(address_map &map); void super80v_io(address_map &map); void super80v_map(address_map &map); -private: + uint8_t m_s_options; uint8_t m_portf0; uint8_t m_mc6845_cursor[16]; diff --git a/src/mame/includes/superqix.h b/src/mame/includes/superqix.h index 8f845890b6a..3c93235c4f1 100644 --- a/src/mame/includes/superqix.h +++ b/src/mame/includes/superqix.h @@ -20,6 +20,13 @@ public: m_ay1(*this, "ay1"), m_mcu(*this, "mcu") { } + void init_perestro(); + void init_sqix(); + void init_sqixr0(); + void init_pbillian(); + void init_hotsmash(); + +protected: required_device<cpu_device> m_maincpu; required_shared_ptr<uint8_t> m_spriteram; required_shared_ptr<uint8_t> m_videoram; @@ -51,11 +58,7 @@ public: DECLARE_WRITE8_MEMBER(superqix_bitmapram_w); DECLARE_WRITE8_MEMBER(superqix_bitmapram2_w); DECLARE_WRITE8_MEMBER(superqix_0410_w); - void init_perestro(); - void init_sqix(); - void init_sqixr0(); - void init_pbillian(); - void init_hotsmash(); + TILE_GET_INFO_MEMBER(sqix_get_bg_tile_info); DECLARE_VIDEO_START(superqix); DECLARE_PALETTE_DECODER(BBGGRRII); @@ -63,7 +66,7 @@ public: void superqix_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); void main_map(address_map &map); -protected: + virtual void machine_init_common(); }; @@ -77,6 +80,14 @@ public: { } + void sqix(machine_config &config); + void sqix_8031(machine_config &config); + void sqix_nomcu(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(fromz80_semaphore_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(frommcu_semaphore_input_r); + +private: required_device<ay8910_device> m_ay2; // 8031 and/or 8751 MCU related @@ -96,19 +107,14 @@ public: DECLARE_READ8_MEMBER(z80_ay2_iob_r); DECLARE_WRITE8_MEMBER(z80_ay2_iob_w); DECLARE_WRITE8_MEMBER(bootleg_flipscreen_w); - DECLARE_CUSTOM_INPUT_MEMBER(fromz80_semaphore_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(frommcu_semaphore_input_r); DECLARE_READ8_MEMBER(bootleg_in0_r); INTERRUPT_GEN_MEMBER(sqix_timer_irq); DECLARE_MACHINE_START(superqix); DECLARE_MACHINE_RESET(superqix); - void sqix(machine_config &config); - void sqix_8031(machine_config &config); - void sqix_nomcu(machine_config &config); void sqix_port_map(address_map &map); void sqix_8031_map(address_map &map); -protected: + virtual void machine_init_common() override; TIMER_CALLBACK_MEMBER(z80_semaphore_assert_cb); @@ -139,6 +145,11 @@ public: { } + void pbillian(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(pbillian_semaphore_input_r); + +private: DECLARE_READ8_MEMBER(hotsmash_68705_portA_r); DECLARE_WRITE8_MEMBER(hotsmash_68705_portB_w); DECLARE_WRITE8_MEMBER(hotsmash_68705_portC_w); @@ -147,7 +158,6 @@ public: DECLARE_WRITE8_MEMBER(pbillian_sample_trigger_w); DECLARE_WRITE8_MEMBER(pbillian_0410_w); - DECLARE_CUSTOM_INPUT_MEMBER(pbillian_semaphore_input_r); DECLARE_WRITE_LINE_MEMBER(vblank_irq); @@ -160,9 +170,8 @@ public: u32 screen_update_pbillian(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void pbillian(machine_config &config); void pbillian_port_map(address_map &map); -protected: + virtual void machine_init_common() override; int read_inputs(int player); diff --git a/src/mame/includes/suprloco.h b/src/mame/includes/suprloco.h index d83936072dc..a2b53d6d748 100644 --- a/src/mame/includes/suprloco.h +++ b/src/mame/includes/suprloco.h @@ -18,6 +18,11 @@ public: m_scrollram(*this, "scrollram"), m_decrypted_opcodes(*this, "decrypted_opcodes") { } + void suprloco(machine_config &config); + + void init_suprloco(); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; @@ -40,13 +45,11 @@ public: virtual void video_start() override; DECLARE_PALETTE_INIT(suprloco); - void init_suprloco(); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); inline void draw_pixel(bitmap_ind16 &bitmap,const rectangle &cliprect,int x,int y,int color,int flip); void draw_sprite(bitmap_ind16 &bitmap,const rectangle &cliprect,int spr_number); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void suprloco(machine_config &config); void decrypted_opcodes_map(address_map &map); void main_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/suprnova.h b/src/mame/includes/suprnova.h index d875bb60e9c..9519c775319 100644 --- a/src/mame/includes/suprnova.h +++ b/src/mame/includes/suprnova.h @@ -46,6 +46,36 @@ public: m_main_ram(*this, "main_ram"), m_cache_ram(*this, "cache_ram") { } + void sknsk(machine_config &config); + void sknsu(machine_config &config); + void sknsa(machine_config &config); + void sknsj(machine_config &config); + void sknse(machine_config &config); + void skns(machine_config &config); + + void init_sengekis(); + void init_cyvern(); + void init_puzzloopa(); + void init_teljan(); + void init_panicstr(); + void init_puzzloope(); + void init_sengekij(); + void init_puzzloopj(); + void init_sarukani(); + void init_gutsn(); + void init_jjparad2(); + void init_galpans3(); + void init_jjparads(); + void init_galpans2(); + void init_galpanis(); + void init_puzzloopu(); + void init_senknow(); + void init_galpani4(); + void init_ryouran(); + + DECLARE_CUSTOM_INPUT_MEMBER(paddle_r); + +private: required_device<sh2_device> m_maincpu; required_device<sknsspr_device> m_spritegen; required_device<gfxdecode_device> m_gfxdecode; @@ -122,27 +152,6 @@ public: DECLARE_READ32_MEMBER(sengekis_speedup_r); DECLARE_READ32_MEMBER(sengekij_speedup_r); - DECLARE_CUSTOM_INPUT_MEMBER(paddle_r); - - void init_sengekis(); - void init_cyvern(); - void init_puzzloopa(); - void init_teljan(); - void init_panicstr(); - void init_puzzloope(); - void init_sengekij(); - void init_puzzloopj(); - void init_sarukani(); - void init_gutsn(); - void init_jjparad2(); - void init_galpans3(); - void init_jjparads(); - void init_galpans2(); - void init_galpanis(); - void init_puzzloopu(); - void init_senknow(); - void init_galpani4(); - void init_ryouran(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -166,11 +175,6 @@ public: void hit_recalc(); void init_drc(); void set_drc_pcflush(uint32_t addr); - void sknsk(machine_config &config); - void sknsu(machine_config &config); - void sknsa(machine_config &config); - void sknsj(machine_config &config); - void sknse(machine_config &config); - void skns(machine_config &config); + void skns_map(address_map &map); }; diff --git a/src/mame/includes/suprridr.h b/src/mame/includes/suprridr.h index b304f0a5311..50ff0f28ac2 100644 --- a/src/mame/includes/suprridr.h +++ b/src/mame/includes/suprridr.h @@ -21,8 +21,14 @@ public: m_palette(*this, "palette"), m_fgram(*this, "fgram"), m_bgram(*this, "bgram"), - m_spriteram(*this, "spriteram") { } + m_spriteram(*this, "spriteram") + { } + void suprridr(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(control_r); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<generic_latch_8_device> m_soundlatch; @@ -50,8 +56,6 @@ public: DECLARE_WRITE8_MEMBER(bgram_w); DECLARE_WRITE8_MEMBER(fgram_w); - DECLARE_CUSTOM_INPUT_MEMBER(control_r); - TILE_GET_INFO_MEMBER(get_tile_info); TILE_GET_INFO_MEMBER(get_tile_info2); @@ -64,7 +68,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); int is_screen_flipped(); - void suprridr(machine_config &config); + void main_map(address_map &map); void main_portmap(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/suprslam.h b/src/mame/includes/suprslam.h index b166fd69453..3295c7e08bd 100644 --- a/src/mame/includes/suprslam.h +++ b/src/mame/includes/suprslam.h @@ -30,6 +30,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_soundlatch(*this, "soundlatch") { } + void suprslam(machine_config &config); + +private: /* memory pointers */ required_shared_ptr<uint16_t> m_screen_videoram; required_shared_ptr<uint16_t> m_bg_videoram; @@ -65,7 +68,7 @@ public: virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_suprslam(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void suprslam(machine_config &config); + void sound_io_map(address_map &map); void sound_map(address_map &map); void suprslam_map(address_map &map); diff --git a/src/mame/includes/surpratk.h b/src/mame/includes/surpratk.h index dd946c650f9..dcd942830d4 100644 --- a/src/mame/includes/surpratk.h +++ b/src/mame/includes/surpratk.h @@ -25,6 +25,9 @@ public: m_k053251(*this, "k053251"), m_palette(*this, "palette") { } + void surpratk(machine_config &config); + +private: /* video-related */ int m_layer_colorbase[3]; int m_sprite_colorbase; @@ -48,7 +51,6 @@ public: K05324X_CB_MEMBER(sprite_callback); K052109_CB_MEMBER(tile_callback); DECLARE_WRITE8_MEMBER(banking_callback); - void surpratk(machine_config &config); void bank0000_map(address_map &map); void surpratk_map(address_map &map); }; diff --git a/src/mame/includes/svision.h b/src/mame/includes/svision.h index 2285a7675f8..b595b90b5c7 100644 --- a/src/mame/includes/svision.h +++ b/src/mame/includes/svision.h @@ -54,26 +54,28 @@ public: , m_bank2(*this, "bank2") { } + void svisionp(machine_config &config); + void svisions(machine_config &config); + void tvlinkp(machine_config &config); + void svision(machine_config &config); + void svisionn(machine_config &config); + void svision_base(machine_config &config); + + void init_svisions(); + void init_svision(); + +private: DECLARE_WRITE_LINE_MEMBER(sound_irq_w); DECLARE_READ8_MEMBER(svision_r); DECLARE_WRITE8_MEMBER(svision_w); DECLARE_READ8_MEMBER(tvlink_r); DECLARE_WRITE8_MEMBER(tvlink_w); - void init_svisions(); - void init_svision(); + uint32_t screen_update_svision(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_tvlink(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(frame_int_w); DECLARE_DEVICE_IMAGE_LOAD_MEMBER(svision_cart); - void svisionp(machine_config &config); - void svisions(machine_config &config); - void tvlinkp(machine_config &config); - void svision(machine_config &config); - void svisionn(machine_config &config); - void svision_base(machine_config &config); - -protected: virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/swtpc09.h b/src/mame/includes/swtpc09.h index 6bf76e40628..1a059e59ea3 100644 --- a/src/mame/includes/swtpc09.h +++ b/src/mame/includes/swtpc09.h @@ -50,6 +50,18 @@ public: , m_dat(*this, "dat") { } + void swtpc09_base(machine_config &config); + void swtpc09i(machine_config &config); + void swtpc09d3(machine_config &config); + void swtpc09u(machine_config &config); + void swtpc09(machine_config &config); + + void init_swtpc09(); + void init_swtpc09i(); + void init_swtpc09u(); + void init_swtpc09d3(); + +private: DECLARE_FLOPPY_FORMATS(floppy_formats); DECLARE_READ8_MEMBER(pia0_a_r); @@ -91,25 +103,15 @@ public: DECLARE_READ8_MEMBER(main_r); DECLARE_WRITE8_MEMBER(main_w); - void init_swtpc09(); - void init_swtpc09i(); - void init_swtpc09u(); - void init_swtpc09d3(); - DECLARE_READ8_MEMBER ( m6844_r ); DECLARE_WRITE8_MEMBER ( m6844_w ); - void swtpc09_base(machine_config &config); - void swtpc09i(machine_config &config); - void swtpc09d3(machine_config &config); - void swtpc09u(machine_config &config); - void swtpc09(machine_config &config); void flex_dc4_piaide_mem(address_map &map); void flex_dmf2_mem(address_map &map); void mp09_mem(address_map &map); void uniflex_dmf2_mem(address_map &map); void uniflex_dmf3_mem(address_map &map); -protected: + virtual void machine_start() override; void swtpc09_fdc_dma_transfer(); diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h index 7585724dac5..d757d5268e7 100644 --- a/src/mame/includes/system16.h +++ b/src/mame/includes/system16.h @@ -35,6 +35,56 @@ public: , m_leds(*this, "led%u", 0U) { } + void z80_ym2151(machine_config &config); + void z80_ym2151_upd7759(machine_config &config); + void datsu_ym2151_msm5205(machine_config &config); + void datsu_2x_ym2203_msm5205(machine_config &config); + void system16_base(machine_config &config); + void goldnaxeb_base(machine_config &config); + void passshtb(machine_config &config); + void goldnaxeb2(machine_config &config); + void beautyb(machine_config &config); + void goldnaxeb1(machine_config &config); + void mwalkbl(machine_config &config); + void eswatbl2(machine_config &config); + void ddcrewbl(machine_config &config); + void shdancbla(machine_config &config); + void astormbl(machine_config &config); + void astormb2(machine_config &config); + void passsht4b(machine_config &config); + void wb3bb(machine_config &config); + void shdancbl(machine_config &config); + void shinobi_datsu(machine_config &config); + void bayrouteb1(machine_config &config); + void tetrisbl(machine_config &config); + void eswatbl(machine_config &config); + void dduxbl(machine_config &config); + void bayrouteb2(machine_config &config); + void tturfbl(machine_config &config); + void altbeastbl(machine_config &config); + void system18(machine_config &config); + + void init_passsht(); + void init_wb3bbl(); + void init_fpointbl(); + void init_eswatbl(); + void init_astormbl(); + void init_sys18bl_oki(); + void init_astormb2(); + void init_shdancbl(); + void init_dduxbl(); + void init_altbeastbl(); + void init_goldnaxeb2(); + void init_bayrouteb1(); + void init_beautyb(); + void init_bayrouteb2(); + void init_shinobl(); + void init_tturfbl(); + void init_goldnaxeb1(); + void init_ddcrewbl(); + void init_common(); + +private: DECLARE_WRITE16_MEMBER(sound_command_nmi_w); DECLARE_WRITE16_MEMBER(sound_command_irq_w); DECLARE_READ8_MEMBER(sound_command_irq_r); @@ -82,25 +132,7 @@ public: DECLARE_WRITE16_MEMBER(s16a_bootleg_fgscrollx_w); DECLARE_WRITE16_MEMBER(s16a_bootleg_tilemapselect_w); DECLARE_WRITE8_MEMBER(upd7759_bank_w); - void init_passsht(); - void init_wb3bbl(); - void init_fpointbl(); - void init_eswatbl(); - void init_astormbl(); - void init_sys18bl_oki(); - void init_astormb2(); - void init_shdancbl(); - void init_dduxbl(); - void init_altbeastbl(); - void init_goldnaxeb2(); - void init_bayrouteb1(); - void init_beautyb(); - void init_bayrouteb2(); - void init_shinobl(); - void init_tturfbl(); - void init_goldnaxeb1(); - void init_ddcrewbl(); - void init_common(); + DECLARE_MACHINE_RESET(ddcrewbl); TILEMAP_MAPPER_MEMBER(sys16_bg_map); TILEMAP_MAPPER_MEMBER(sys16_text_map); @@ -132,34 +164,7 @@ public: DECLARE_WRITE_LINE_MEMBER(datsu_msm5205_callback); DECLARE_WRITE_LINE_MEMBER(shdancbl_msm5205_callback); DECLARE_WRITE_LINE_MEMBER(sound_cause_nmi); - void z80_ym2151(machine_config &config); - void z80_ym2151_upd7759(machine_config &config); - void datsu_ym2151_msm5205(machine_config &config); - void datsu_2x_ym2203_msm5205(machine_config &config); - void system16_base(machine_config &config); - void goldnaxeb_base(machine_config &config); - void passshtb(machine_config &config); - void goldnaxeb2(machine_config &config); - void beautyb(machine_config &config); - void goldnaxeb1(machine_config &config); - void mwalkbl(machine_config &config); - void eswatbl2(machine_config &config); - void ddcrewbl(machine_config &config); - void shdancbla(machine_config &config); - void astormbl(machine_config &config); - void astormb2(machine_config &config); - void passsht4b(machine_config &config); - void wb3bb(machine_config &config); - void shdancbl(machine_config &config); - void shinobi_datsu(machine_config &config); - void bayrouteb1(machine_config &config); - void tetrisbl(machine_config &config); - void eswatbl(machine_config &config); - void dduxbl(machine_config &config); - void bayrouteb2(machine_config &config); - void tturfbl(machine_config &config); - void altbeastbl(machine_config &config); - void system18(machine_config &config); + void astormbl_map(address_map &map); void bayrouteb1_map(address_map &map); void bayrouteb2_map(address_map &map); @@ -196,7 +201,6 @@ public: void tturfbl_sound_map(address_map &map); void wb3bbl_map(address_map &map); -protected: virtual void machine_start() override { m_leds.resolve(); } required_shared_ptr<uint16_t> m_textram; diff --git a/src/mame/includes/tagteam.h b/src/mame/includes/tagteam.h index e7984334465..36f93a1d6cc 100644 --- a/src/mame/includes/tagteam.h +++ b/src/mame/includes/tagteam.h @@ -17,6 +17,11 @@ public: m_videoram(*this, "videoram"), m_colorram(*this, "colorram") { } + void tagteam(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; @@ -41,7 +46,6 @@ public: DECLARE_WRITE8_MEMBER(control_w); DECLARE_WRITE8_MEMBER(flipscreen_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); INTERRUPT_GEN_MEMBER(sound_timer_irq); TILE_GET_INFO_MEMBER(get_bg_tile_info); @@ -52,7 +56,6 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void tagteam(machine_config &config); void main_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/tail2nos.h b/src/mame/includes/tail2nos.h index 36562b041cd..3ea1b7e97dd 100644 --- a/src/mame/includes/tail2nos.h +++ b/src/mame/includes/tail2nos.h @@ -27,6 +27,11 @@ public: m_soundlatch(*this, "soundlatch"), m_acia(*this, "acia") { } + void tail2nos(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(analog_in_r); + +private: /* memory pointers */ required_shared_ptr<uint16_t> m_txvideoram; required_shared_ptr<uint16_t> m_spriteram; @@ -48,7 +53,6 @@ public: required_device<generic_latch_8_device> m_soundlatch; required_device<acia6850_device> m_acia; - DECLARE_CUSTOM_INPUT_MEMBER(analog_in_r); DECLARE_WRITE16_MEMBER(tail2nos_txvideoram_w); DECLARE_WRITE16_MEMBER(tail2nos_zoomdata_w); DECLARE_WRITE8_MEMBER(tail2nos_gfxbank_w); @@ -62,7 +66,6 @@ public: void tail2nos_postload(); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); K051316_CB_MEMBER(zoom_callback); - void tail2nos(machine_config &config); void main_map(address_map &map); void sound_map(address_map &map); void sound_port_map(address_map &map); diff --git a/src/mame/includes/taito_b.h b/src/mame/includes/taito_b.h index 8aff84fa865..33b98ae3875 100644 --- a/src/mame/includes/taito_b.h +++ b/src/mame/includes/taito_b.h @@ -35,6 +35,39 @@ public: m_tracky_io(*this, "TRACKY%u", 1U) { } + void spacedx(machine_config &config); + void rambo3(machine_config &config); + void hitice(machine_config &config); + void ashura(machine_config &config); + void silentd(machine_config &config); + void tetrista(machine_config &config); + void spacedxo(machine_config &config); + void rambo3p(machine_config &config); + void rastsag2(machine_config &config); + void qzshowby(machine_config &config); + void sbm(machine_config &config); + void tetrist(machine_config &config); + void pbobble(machine_config &config); + void masterw(machine_config &config); + void ryujin(machine_config &config); + void viofight(machine_config &config); + void crimec(machine_config &config); + void selfeena(machine_config &config); + + void init_taito_b(); + + DECLARE_INPUT_CHANGED_MEMBER(realpunc_sensor); + + DECLARE_VIDEO_START(realpunc); + uint32_t screen_update_realpunc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + DECLARE_WRITE8_MEMBER(player_12_coin_ctrl_w); + + void realpunc_map(address_map &map); + void realpunc_hd63484_map(address_map &map); + void sound_map(address_map &map); + +private: DECLARE_WRITE8_MEMBER(bankswitch_w); template<int Player> DECLARE_READ16_MEMBER(tracky_hi_r); template<int Player> DECLARE_READ16_MEMBER(tracky_lo_r); @@ -43,7 +76,6 @@ public: DECLARE_WRITE16_MEMBER(gain_control_w); DECLARE_READ16_MEMBER(eep_latch_r); DECLARE_WRITE16_MEMBER(eeprom_w); - DECLARE_WRITE8_MEMBER(player_12_coin_ctrl_w); DECLARE_READ16_MEMBER(player_34_coin_ctrl_r); DECLARE_WRITE16_MEMBER(player_34_coin_ctrl_w); DECLARE_WRITE16_MEMBER(spacedxo_tc0220ioc_w); @@ -52,33 +84,11 @@ public: DECLARE_WRITE16_MEMBER(hitice_pixel_scroll_w); DECLARE_WRITE16_MEMBER(realpunc_video_ctrl_w); DECLARE_WRITE8_MEMBER(mb87078_gain_changed); - DECLARE_INPUT_CHANGED_MEMBER(realpunc_sensor); - void init_taito_b(); DECLARE_VIDEO_START(hitice); DECLARE_VIDEO_RESET(hitice); - DECLARE_VIDEO_START(realpunc); DECLARE_VIDEO_START(taitob_core); uint32_t screen_update_taitob(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_realpunc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void spacedx(machine_config &config); - void rambo3(machine_config &config); - void hitice(machine_config &config); - void ashura(machine_config &config); - void silentd(machine_config &config); - void tetrista(machine_config &config); - void spacedxo(machine_config &config); - void rambo3p(machine_config &config); - void rastsag2(machine_config &config); - void qzshowby(machine_config &config); - void sbm(machine_config &config); - void tetrist(machine_config &config); - void pbobble(machine_config &config); - void masterw(machine_config &config); - void ryujin(machine_config &config); - void viofight(machine_config &config); - void crimec(machine_config &config); - void selfeena(machine_config &config); void crimec_map(address_map &map); void hitice_map(address_map &map); void masterw_map(address_map &map); @@ -87,23 +97,20 @@ public: void qzshowby_map(address_map &map); void rambo3_map(address_map &map); void rastsag2_map(address_map &map); - void realpunc_hd63484_map(address_map &map); - void realpunc_map(address_map &map); + void sbm_map(address_map &map); void selfeena_map(address_map &map); void silentd_map(address_map &map); - void sound_map(address_map &map); void spacedx_map(address_map &map); void spacedxo_map(address_map &map); void tetrist_map(address_map &map); void tetrista_map(address_map &map); void viofight_map(address_map &map); void viofight_sound_map(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; -private: /* memory pointers */ optional_shared_ptr<uint16_t> m_pixelram; diff --git a/src/mame/includes/taito_f2.h b/src/mame/includes/taito_f2.h index a318884a82c..6a744fc7bc0 100644 --- a/src/mame/includes/taito_f2.h +++ b/src/mame/includes/taito_f2.h @@ -22,20 +22,6 @@ class taitof2_state : public driver_device { public: - enum - { - TIMER_TAITOF2_INTERRUPT6 - }; - - struct f2_tempsprite - { - int code, color; - int flipx, flipy; - int x, y; - int zoomx, zoomy; - int primask; - }; - taitof2_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_sprite_extension(*this, "sprite_ext"), @@ -59,6 +45,64 @@ public: m_palette(*this, "palette") { } + + void taito_f2_tc0220ioc(machine_config &config); + void taito_f2_tc0510nio(machine_config &config); + void taito_f2_te7750(machine_config &config); + void taito_f2(machine_config &config); + void thundfox(machine_config &config); + void dinorex(machine_config &config); + void mjnquest(machine_config &config); + void cameltrya(machine_config &config); + void koshien(machine_config &config); + void qzchikyu(machine_config &config); + void metalb(machine_config &config); + void yesnoj(machine_config &config); + void quizhq(machine_config &config); + void dondokod(machine_config &config); + void qcrayon2(machine_config &config); + void qtorimon(machine_config &config); + void driftout(machine_config &config); + void solfigtr(machine_config &config); + void qzquest(machine_config &config); + void liquidk(machine_config &config); + void deadconx(machine_config &config); + void ssi(machine_config &config); + void pulirula(machine_config &config); + void growl(machine_config &config); + void ninjak(machine_config &config); + void footchmp(machine_config &config); + void cameltry(machine_config &config); + void finalb(machine_config &config); + void hthero(machine_config &config); + void driveout(machine_config &config); + void gunfront(machine_config &config); + void qcrayon(machine_config &config); + void megab(machine_config &config); + void qjinsei(machine_config &config); + void deadconxj(machine_config &config); + void footchmpbl(machine_config &config); + void yuyugogo(machine_config &config); + + void init_driveout(); + void init_cameltry(); + void init_mjnquest(); + void init_finalb(); + +private: + enum + { + TIMER_TAITOF2_INTERRUPT6 + }; + + struct f2_tempsprite + { + int code, color; + int flipx, flipy; + int x, y; + int zoomx, zoomy; + int primask; + }; /* memory pointers */ optional_shared_ptr<uint16_t> m_sprite_extension; required_shared_ptr<uint16_t> m_spriteram; @@ -141,10 +185,7 @@ public: DECLARE_WRITE16_MEMBER(taitof2_spritebank_w); DECLARE_WRITE16_MEMBER(koshien_spritebank_w); DECLARE_WRITE8_MEMBER(cameltrya_porta_w); - void init_driveout(); - void init_cameltry(); - void init_mjnquest(); - void init_finalb(); + DECLARE_MACHINE_START(f2); DECLARE_VIDEO_START(taitof2_default); DECLARE_MACHINE_START(common); @@ -197,43 +238,6 @@ public: void taito_f2_tc360_spritemixdraw(screen_device &screen, bitmap_ind16 &dest_bmp, const rectangle &clip, gfx_element *gfx, uint32_t code, uint32_t color, int flipx, int flipy, int sx, int sy, int scalex, int scaley ); - void taito_f2_tc0220ioc(machine_config &config); - void taito_f2_tc0510nio(machine_config &config); - void taito_f2_te7750(machine_config &config); - void taito_f2(machine_config &config); - void thundfox(machine_config &config); - void dinorex(machine_config &config); - void mjnquest(machine_config &config); - void cameltrya(machine_config &config); - void koshien(machine_config &config); - void qzchikyu(machine_config &config); - void metalb(machine_config &config); - void yesnoj(machine_config &config); - void quizhq(machine_config &config); - void dondokod(machine_config &config); - void qcrayon2(machine_config &config); - void qtorimon(machine_config &config); - void driftout(machine_config &config); - void solfigtr(machine_config &config); - void qzquest(machine_config &config); - void liquidk(machine_config &config); - void deadconx(machine_config &config); - void ssi(machine_config &config); - void pulirula(machine_config &config); - void growl(machine_config &config); - void ninjak(machine_config &config); - void footchmp(machine_config &config); - void cameltry(machine_config &config); - void finalb(machine_config &config); - void hthero(machine_config &config); - void driveout(machine_config &config); - void gunfront(machine_config &config); - void qcrayon(machine_config &config); - void megab(machine_config &config); - void qjinsei(machine_config &config); - void deadconxj(machine_config &config); - void footchmpbl(machine_config &config); - void yuyugogo(machine_config &config); void cameltry_map(address_map &map); void cameltrya_map(address_map &map); void cameltrya_sound_map(address_map &map); @@ -267,7 +271,7 @@ public: void thundfox_map(address_map &map); void yesnoj_map(address_map &map); void yuyugogo_map(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/taito_f3.h b/src/mame/includes/taito_f3.h index e5353352883..d72543ecff8 100644 --- a/src/mame/includes/taito_f3.h +++ b/src/mame/includes/taito_f3.h @@ -51,11 +51,6 @@ enum { class taito_f3_state : public driver_device { public: - enum - { - TIMER_F3_INTERRUPT3 - }; - taito_f3_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -71,9 +66,65 @@ public: m_input(*this, "IN.%u", 0), m_dial(*this, "DIAL.%u", 0), m_eepromin(*this, "EEPROMIN") - { } + void f3_eeprom(machine_config &config); + void f3(machine_config &config); + void f3_224a(machine_config &config); + void bubsympb(machine_config &config); + void f3_224b(machine_config &config); + void f3_224c(machine_config &config); + void f3_224b_eeprom(machine_config &config); + + void init_commandw(); + void init_pbobble2(); + void init_puchicar(); + void init_intcup94(); + void init_landmakr(); + void init_twinqix(); + void init_elvactr(); + void init_arabianm(); + void init_bubsympb(); + void init_ktiger2(); + void init_lightbr(); + void init_gekirido(); + void init_arkretrn(); + void init_kirameki(); + void init_qtheater(); + void init_popnpop(); + void init_spcinvdj(); + void init_pbobbl2p(); + void init_landmkrp(); + void init_bubblem(); + void init_ridingf(); + void init_gseeker(); + void init_bubsymph(); + void init_hthero95(); + void init_gunlock(); + void init_pbobble4(); + void init_dariusg(); + void init_recalh(); + void init_kaiserkn(); + void init_spcinv95(); + void init_trstaroj(); + void init_ringrage(); + void init_cupfinal(); + void init_quizhuhu(); + void init_pbobble3(); + void init_cleopatr(); + void init_scfinals(); + void init_pbobbl2x(); + + DECLARE_CUSTOM_INPUT_MEMBER(f3_analog_r); + DECLARE_CUSTOM_INPUT_MEMBER(f3_coin_r); + DECLARE_CUSTOM_INPUT_MEMBER(eeprom_read); + +protected: + enum + { + TIMER_F3_INTERRUPT3 + }; + required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_audiocpu; optional_device<taito_en_device> m_taito_en; @@ -260,47 +311,7 @@ public: DECLARE_READ16_MEMBER(f3_lineram_r); DECLARE_WRITE16_MEMBER(f3_lineram_w); DECLARE_WRITE32_MEMBER(f3_palette_24bit_w); - DECLARE_CUSTOM_INPUT_MEMBER(f3_analog_r); - DECLARE_CUSTOM_INPUT_MEMBER(f3_coin_r); - DECLARE_CUSTOM_INPUT_MEMBER(eeprom_read); - void init_commandw(); - void init_pbobble2(); - void init_puchicar(); - void init_intcup94(); - void init_landmakr(); - void init_twinqix(); - void init_elvactr(); - void init_arabianm(); - void init_bubsympb(); - void init_ktiger2(); - void init_lightbr(); - void init_gekirido(); - void init_arkretrn(); - void init_kirameki(); - void init_qtheater(); - void init_popnpop(); - void init_spcinvdj(); - void init_pbobbl2p(); - void init_landmkrp(); - void init_bubblem(); - void init_ridingf(); - void init_gseeker(); - void init_bubsymph(); - void init_hthero95(); - void init_gunlock(); - void init_pbobble4(); - void init_dariusg(); - void init_recalh(); - void init_kaiserkn(); - void init_spcinv95(); - void init_trstaroj(); - void init_ringrage(); - void init_cupfinal(); - void init_quizhuhu(); - void init_pbobble3(); - void init_cleopatr(); - void init_scfinals(); - void init_pbobbl2x(); + TILE_GET_INFO_MEMBER(get_tile_info1); TILE_GET_INFO_MEMBER(get_tile_info2); TILE_GET_INFO_MEMBER(get_tile_info3); @@ -315,16 +326,9 @@ public: DECLARE_WRITE_LINE_MEMBER(screen_vblank_f3); INTERRUPT_GEN_MEMBER(f3_interrupt2); - void f3_eeprom(machine_config &config); - void f3(machine_config &config); - void f3_224a(machine_config &config); - void bubsympb(machine_config &config); - void f3_224b(machine_config &config); - void f3_224c(machine_config &config); - void f3_224b_eeprom(machine_config &config); void bubsympb_map(address_map &map); void f3_map(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -332,7 +336,6 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; virtual void device_post_load(void) override; -private: inline void get_tile_info(tile_data &tileinfo, int tile_index, uint16_t *gfx_base); inline void f3_drawgfx(bitmap_rgb32 &dest_bmp,const rectangle &clip,gfx_element *gfx,int code,int color,int flipx,int flipy,int sx,int sy,uint8_t pri_dst); inline void f3_drawgfxzoom(bitmap_rgb32 &dest_bmp,const rectangle &clip,gfx_element *gfx,int code,int color,int flipx,int flipy,int sx,int sy,int scalex,int scaley,uint8_t pri_dst); diff --git a/src/mame/includes/taito_h.h b/src/mame/includes/taito_h.h index 4decc9bb6fd..a776fd3cd3d 100644 --- a/src/mame/includes/taito_h.h +++ b/src/mame/includes/taito_h.h @@ -23,6 +23,12 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void recordbr(machine_config &config); + void syvalion(machine_config &config); + void dleague(machine_config &config); + void tetristh(machine_config &config); + +private: /* memory pointers */ required_shared_ptr<uint16_t> m_m68000_mainram; @@ -46,10 +52,6 @@ public: void recordbr_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int priority ); void dleague_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int priority ); void taitoh_log_vram(); - void recordbr(machine_config &config); - void syvalion(machine_config &config); - void dleague(machine_config &config); - void tetristh(machine_config &config); void dleague_map(address_map &map); void recordbr_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/taito_l.h b/src/mame/includes/taito_l.h index 8b45f6fa36f..7f9f65498a9 100644 --- a/src/mame/includes/taito_l.h +++ b/src/mame/includes/taito_l.h @@ -25,6 +25,13 @@ public: { } + DECLARE_MACHINE_START(taito_l); + DECLARE_MACHINE_RESET(taito_l); + IRQ_CALLBACK_MEMBER(irq_callback); + + DECLARE_WRITE8_MEMBER(coin_control_w); + +protected: static constexpr size_t SPRITERAM_SIZE = 0x400; /* memory pointers */ @@ -55,7 +62,7 @@ public: DECLARE_READ8_MEMBER(rombankswitch_r); DECLARE_WRITE8_MEMBER(rambankswitch_w); DECLARE_READ8_MEMBER(rambankswitch_r); - DECLARE_WRITE8_MEMBER(coin_control_w); + DECLARE_WRITE8_MEMBER(mcu_control_w); DECLARE_READ8_MEMBER(mcu_control_r); DECLARE_WRITE8_MEMBER(taitol_bankc_w); @@ -65,19 +72,17 @@ public: DECLARE_WRITE8_MEMBER(vram_w); template<int Offset> TILE_GET_INFO_MEMBER(get_tile_info); TILE_GET_INFO_MEMBER(get_tx_tile_info); - DECLARE_MACHINE_START(taito_l); DECLARE_VIDEO_START(taito_l); - DECLARE_MACHINE_RESET(taito_l); u32 screen_update_taitol(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank_taitol); TIMER_DEVICE_CALLBACK_MEMBER(vbl_interrupt); - IRQ_CALLBACK_MEMBER(irq_callback); + void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void l_system_video(machine_config &config); void common_banks_map(address_map &map); void tc0090lvc_map(address_map &map); -protected: + virtual void state_register(); virtual void taito_machine_reset(); diff --git a/src/mame/includes/taito_o.h b/src/mame/includes/taito_o.h index 6b1aab2b42a..15fcd89dceb 100644 --- a/src/mame/includes/taito_o.h +++ b/src/mame/includes/taito_o.h @@ -22,6 +22,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void parentj(machine_config &config); + +private: /* devices */ required_device<cpu_device> m_maincpu; required_device<watchdog_timer_device> m_watchdog; @@ -35,6 +38,5 @@ public: uint32_t screen_update_parentj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(parentj_interrupt); void parentj_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int priority ); - void parentj(machine_config &config); void parentj_map(address_map &map); }; diff --git a/src/mame/includes/taito_x.h b/src/mame/includes/taito_x.h index 6523bf9d600..216a759c194 100644 --- a/src/mame/includes/taito_x.h +++ b/src/mame/includes/taito_x.h @@ -23,6 +23,13 @@ public: m_in_io(*this, "IN%u", 0U) { } + void superman(machine_config &config); + void ballbros(machine_config &config); + void kyustrkr(machine_config &config); + void gigandes(machine_config &config); + void daisenpu(machine_config &config); + +private: DECLARE_READ16_MEMBER(superman_dsw_input_r); DECLARE_WRITE8_MEMBER(superman_counters_w); DECLARE_READ16_MEMBER(daisenpu_input_r); @@ -34,11 +41,6 @@ public: INTERRUPT_GEN_MEMBER(interrupt); TIMER_DEVICE_CALLBACK_MEMBER(cchip_irq_clear_cb); - void superman(machine_config &config); - void ballbros(machine_config &config); - void kyustrkr(machine_config &config); - void gigandes(machine_config &config); - void daisenpu(machine_config &config); void ballbros_map(address_map &map); void daisenpu_map(address_map &map); void daisenpu_sound_map(address_map &map); @@ -48,7 +50,6 @@ public: void superman_map(address_map &map); void taito_x_base_map(address_map &map); -private: optional_device<taito_cchip_device> m_cchip; optional_device<timer_device> m_cchip_irq_clear; required_memory_bank m_z80bank; diff --git a/src/mame/includes/taitoair.h b/src/mame/includes/taitoair.h index 87c9d973176..cf3960d7e37 100644 --- a/src/mame/includes/taitoair.h +++ b/src/mame/includes/taitoair.h @@ -47,6 +47,9 @@ public: m_palette(*this, "palette") { } + void airsys(machine_config &config); + +private: /* memory pointers */ required_shared_ptr<uint16_t> m_m68000_mainram; required_shared_ptr<uint16_t> m_line_ram; @@ -136,7 +139,7 @@ public: void fill_slope( bitmap_ind16 &bitmap, const rectangle &cliprect, uint16_t header, int32_t x1, int32_t x2, int32_t sl1, int32_t sl2, int32_t y1, int32_t y2, int32_t *nx1, int32_t *nx2 ); void fill_poly( bitmap_ind16 &bitmap, const rectangle &cliprect, const struct taitoair_poly *q ); - void airsys(machine_config &config); + void DSP_map_data(address_map &map); void DSP_map_program(address_map &map); void airsys_map(address_map &map); diff --git a/src/mame/includes/taitojc.h b/src/mame/includes/taitojc.h index 71cc7ae7ef0..9625bb89bb2 100644 --- a/src/mame/includes/taitojc.h +++ b/src/mame/includes/taitojc.h @@ -38,6 +38,14 @@ public: m_brake_meter = 0; } + void taitojc(machine_config &config); + void dendego(machine_config &config); + + void init_dendego2(); + void init_dangcurv(); + void init_taitojc(); + +private: // device/memory pointers required_device<cpu_device> m_maincpu; required_device<cpu_device> m_dsp; @@ -129,9 +137,7 @@ public: DECLARE_READ32_MEMBER(taitojc_char_r); DECLARE_WRITE32_MEMBER(taitojc_tile_w); DECLARE_WRITE32_MEMBER(taitojc_char_w); - void init_dendego2(); - void init_dangcurv(); - void init_taitojc(); + TILE_GET_INFO_MEMBER(taitojc_tile_info); virtual void machine_reset() override; virtual void machine_start() override; @@ -141,8 +147,7 @@ public: INTERRUPT_GEN_MEMBER(taitojc_vblank); void draw_object(bitmap_ind16 &bitmap, const rectangle &cliprect, uint32_t w1, uint32_t w2, uint8_t bank_type); void draw_object_bank(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t bank_type, uint8_t pri); - void taitojc(machine_config &config); - void dendego(machine_config &config); + void dendego_map(address_map &map); void hc11_io_map(address_map &map); void hc11_pgm_map(address_map &map); diff --git a/src/mame/includes/taitosj.h b/src/mame/includes/taitosj.h index 5be10d9e654..e1fea20a1c5 100644 --- a/src/mame/includes/taitosj.h +++ b/src/mame/includes/taitosj.h @@ -47,6 +47,20 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + void mcu(machine_config &config); + void nomcu(machine_config &config); + void kikstart(machine_config &config); + + void init_alpinea(); + void init_alpine(); + void init_taitosj(); + void init_junglhbr(); + void init_spacecr(); + + DECLARE_CUSTOM_INPUT_MEMBER(input_port_4_f0_r); + DECLARE_CUSTOM_INPUT_MEMBER(kikstart_gear_r); + +private: required_shared_ptr<uint8_t> m_videoram_1; required_shared_ptr<uint8_t> m_videoram_2; required_shared_ptr<uint8_t> m_videoram_3; @@ -120,16 +134,11 @@ public: DECLARE_WRITE8_MEMBER(taitosj_characterram_w); DECLARE_WRITE8_MEMBER(junglhbr_characterram_w); DECLARE_WRITE8_MEMBER(taitosj_collision_reg_clear_w); - DECLARE_CUSTOM_INPUT_MEMBER(input_port_4_f0_r); - DECLARE_CUSTOM_INPUT_MEMBER(kikstart_gear_r); + DECLARE_WRITE8_MEMBER(taitosj_sndnmi_msk_w); DECLARE_WRITE8_MEMBER(input_port_4_f0_w); DECLARE_WRITE8_MEMBER(taitosj_dacvol_w); - void init_alpinea(); - void init_alpine(); - void init_taitosj(); - void init_junglhbr(); - void init_spacecr(); + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -154,9 +163,7 @@ public: void copy_layer(bitmap_ind16 &bitmap, const rectangle &cliprect,copy_layer_func_t copy_layer_func, int which, int *sprites_on, rectangle *sprite_areas); void copy_layers(bitmap_ind16 &bitmap, const rectangle &cliprect,copy_layer_func_t copy_layer_func, int *sprites_on, rectangle *sprite_areas); int video_update_common(bitmap_ind16 &bitmap, const rectangle &cliprect, copy_layer_func_t copy_layer_func); - void mcu(machine_config &config); - void nomcu(machine_config &config); - void kikstart(machine_config &config); + void kikstart_main_map(address_map &map); void taitosj_audio_map(address_map &map); void taitosj_main_mcu_map(address_map &map); diff --git a/src/mame/includes/tandy2k.h b/src/mame/includes/tandy2k.h index f20f696f1a2..7b9d0d48781 100644 --- a/src/mame/includes/tandy2k.h +++ b/src/mame/includes/tandy2k.h @@ -105,6 +105,10 @@ public: } } + void tandy2k_hd(machine_config &config); + void tandy2k(machine_config &config); + +private: required_device<i80186_cpu_device> m_maincpu; required_device<i8251_device> m_uart; required_device<i8255_device> m_i8255a; @@ -228,8 +232,7 @@ public: int m_centronics_select; int m_centronics_perror; int m_centronics_busy; - void tandy2k_hd(machine_config &config); - void tandy2k(machine_config &config); + void tandy2k_hd_io(address_map &map); void tandy2k_io(address_map &map); void tandy2k_mem(address_map &map); diff --git a/src/mame/includes/tank8.h b/src/mame/includes/tank8.h index 35409db4f6c..88e9dd3f19f 100644 --- a/src/mame/includes/tank8.h +++ b/src/mame/includes/tank8.h @@ -34,11 +34,6 @@ class tank8_state : public driver_device { public: - enum - { - TIMER_COLLISION - }; - tank8_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -53,10 +48,16 @@ public: m_team(*this, "team") { } - void init_decode(); void tank8(machine_config &config); -protected: + void init_decode(); + +private: + enum + { + TIMER_COLLISION + }; + DECLARE_READ8_MEMBER(collision_r); DECLARE_WRITE8_MEMBER(lockout_w); DECLARE_WRITE8_MEMBER(int_reset_w); @@ -86,7 +87,6 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; void tank8_cpu_map(address_map &map); -private: required_device<cpu_device> m_maincpu; required_device<discrete_device> m_discrete; required_device<gfxdecode_device> m_gfxdecode; diff --git a/src/mame/includes/tankbatt.h b/src/mame/includes/tankbatt.h index 57a0b86cb61..16feac15b79 100644 --- a/src/mame/includes/tankbatt.h +++ b/src/mame/includes/tankbatt.h @@ -16,6 +16,11 @@ public: m_bulletsram(*this, "bulletsram"), m_videoram(*this, "videoram") { } + void tankbatt(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: required_device<cpu_device> m_maincpu; required_device<samples_device> m_samples; required_device<gfxdecode_device> m_gfxdecode; @@ -41,9 +46,7 @@ public: DECLARE_WRITE_LINE_MEMBER(coinlockout_w); DECLARE_WRITE8_MEMBER(videoram_w); - INTERRUPT_GEN_MEMBER(interrupt); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); TILE_GET_INFO_MEMBER(get_bg_tile_info); @@ -53,6 +56,5 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect); - void tankbatt(machine_config &config); void main_map(address_map &map); }; diff --git a/src/mame/includes/tankbust.h b/src/mame/includes/tankbust.h index c88230048db..55eb41245bb 100644 --- a/src/mame/includes/tankbust.h +++ b/src/mame/includes/tankbust.h @@ -17,6 +17,9 @@ public: m_colorram(*this, "colorram"), m_spriteram(*this, "spriteram") { } + void tankbust(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_subcpu; required_device<gfxdecode_device> m_gfxdecode; @@ -63,7 +66,7 @@ public: INTERRUPT_GEN_MEMBER(vblank_irq); TIMER_CALLBACK_MEMBER(soundlatch_callback); TIMER_CALLBACK_MEMBER(soundirqline_callback); - void tankbust(machine_config &config); + void main_map(address_map &map); void map_cpu2(address_map &map); void port_map_cpu2(address_map &map); diff --git a/src/mame/includes/taotaido.h b/src/mame/includes/taotaido.h index d25eed1b146..39152c3451a 100644 --- a/src/mame/includes/taotaido.h +++ b/src/mame/includes/taotaido.h @@ -23,6 +23,9 @@ public: m_scrollram(*this, "scrollram"), m_bgram(*this, "bgram") { } + void taotaido(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; @@ -59,7 +62,6 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank); uint32_t tile_callback( uint32_t code ); - void taotaido(machine_config &config); void main_map(address_map &map); void sound_map(address_map &map); void sound_port_map(address_map &map); diff --git a/src/mame/includes/targeth.h b/src/mame/includes/targeth.h index 11dbf403b21..1e5616ebc85 100644 --- a/src/mame/includes/targeth.h +++ b/src/mame/includes/targeth.h @@ -25,6 +25,9 @@ public: m_shareram(*this, "shareram") { } + void targeth(machine_config &config); + +private: DECLARE_WRITE16_MEMBER(OKIM6295_bankswitch_w); DECLARE_WRITE16_MEMBER(output_latch_w); DECLARE_WRITE_LINE_MEMBER(coin1_counter_w); @@ -42,17 +45,15 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void targeth(machine_config &config); void main_map(address_map &map); void mcu_hostmem_map(address_map &map); void oki_map(address_map &map); -protected: + virtual void video_start() override; virtual void machine_start() override; void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); -private: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<screen_device> m_screen; diff --git a/src/mame/includes/tatsumi.h b/src/mame/includes/tatsumi.h index 81c727ca18d..5ab93716a87 100644 --- a/src/mame/includes/tatsumi.h +++ b/src/mame/includes/tatsumi.h @@ -28,6 +28,11 @@ public: , m_subregion(*this, "slave_rom") { } + DECLARE_WRITE8_MEMBER(hd6445_crt_w); + INTERRUPT_GEN_MEMBER(v30_interrupt); + TILE_GET_INFO_MEMBER(get_text_tile_info); + +protected: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<m68000_base_device> m_subcpu; @@ -55,10 +60,8 @@ public: DECLARE_WRITE16_MEMBER(tatsumi_v30_68000_w); DECLARE_READ16_MEMBER(tatsumi_sprite_control_r); DECLARE_WRITE16_MEMBER(tatsumi_sprite_control_w); - TILE_GET_INFO_MEMBER(get_text_tile_info); - INTERRUPT_GEN_MEMBER(v30_interrupt); + DECLARE_READ8_MEMBER(tatsumi_hack_ym2151_r); - DECLARE_WRITE8_MEMBER(hd6445_crt_w); void tatsumi_reset(); template<class _BitmapClass> void draw_sprites(_BitmapClass &bitmap, const rectangle &cliprect, int write_priority_only, int rambank); @@ -67,10 +70,9 @@ public: int scalex, int scaley, int rotate, int write_priority_only ); void update_cluts(int fake_palette_offset, int object_base, int length); -protected: uint8_t m_hd6445_reg[64]; void apply_shadow_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &shadow_bitmap, uint8_t xor_output); -private: + uint8_t m_hd6445_address; }; @@ -87,6 +89,11 @@ public: { } + void apache3(machine_config &config); + + void init_apache3(); + +private: DECLARE_READ16_MEMBER(apache3_bank_r); DECLARE_WRITE16_MEMBER(apache3_bank_w); DECLARE_WRITE16_MEMBER(apache3_z80_ctrl_w); @@ -99,18 +106,16 @@ public: DECLARE_WRITE16_MEMBER(apache3_road_z_w); DECLARE_WRITE8_MEMBER(apache3_road_x_w); - void init_apache3(); DECLARE_MACHINE_RESET(apache3); DECLARE_VIDEO_START(apache3); uint32_t screen_update_apache3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(apache3_68000_reset); - void apache3(machine_config &config); void apache3_68000_map(address_map &map); void apache3_v20_map(address_map &map); void apache3_v30_map(address_map &map); void apache3_z80_map(address_map &map); -private: + void draw_sky(bitmap_rgb32 &bitmap, const rectangle &cliprect, int palette_base, int start_offset); void draw_ground(bitmap_rgb32 &dst, const rectangle &cliprect); @@ -144,6 +149,11 @@ public: { } + void roundup5(machine_config &config); + + void init_roundup5(); + +private: DECLARE_READ16_MEMBER(roundup_v30_z80_r); DECLARE_WRITE16_MEMBER(roundup_v30_z80_w); DECLARE_WRITE16_MEMBER(roundup5_control_w); @@ -152,19 +162,15 @@ public: DECLARE_WRITE8_MEMBER(gfxdata_w); DECLARE_WRITE8_MEMBER(output_w); - void init_roundup5(); DECLARE_VIDEO_START(roundup5); uint32_t screen_update_roundup5(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void roundup5(machine_config &config); void roundup5_68000_map(address_map &map); void roundup5_v30_map(address_map &map); void roundup5_z80_map(address_map &map); -protected: // virtual void machine_reset() override; -private: void draw_road(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_landscape(bitmap_rgb32 &bitmap, const rectangle &cliprect, uint8_t type); @@ -194,6 +200,13 @@ public: { } + + void cyclwarr(machine_config &config); + void bigfight(machine_config &config); + + void init_cyclwarr(); + +private: DECLARE_READ16_MEMBER(cyclwarr_sprite_r); DECLARE_WRITE16_MEMBER(cyclwarr_sprite_w); DECLARE_WRITE16_MEMBER(video_config_w); @@ -207,24 +220,19 @@ public: template<int Bank> DECLARE_READ16_MEMBER(cyclwarr_videoram_r); template<int Bank> DECLARE_WRITE16_MEMBER(cyclwarr_videoram_w); - void init_cyclwarr(); template<int Bank> TILE_GET_INFO_MEMBER(get_tile_info_bigfight); template<int Bank> TILE_GET_INFO_MEMBER(get_tile_info_cyclwarr_road); DECLARE_VIDEO_START(cyclwarr); DECLARE_VIDEO_START(bigfight); uint32_t screen_update_cyclwarr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void cyclwarr(machine_config &config); - void bigfight(machine_config &config); - void common_map(address_map &map); void master_map(address_map &map); void slave_map(address_map &map); void sound_map(address_map &map); -protected: virtual void machine_reset() override; -private: + required_device<generic_latch_8_device> m_soundlatch; required_shared_ptr<uint16_t> m_master_ram; diff --git a/src/mame/includes/taxidriv.h b/src/mame/includes/taxidriv.h index 3e92cc20aeb..0bd8d094315 100644 --- a/src/mame/includes/taxidriv.h +++ b/src/mame/includes/taxidriv.h @@ -21,6 +21,9 @@ public: m_vram7(*this, "vram7"), m_scroll(*this, "scroll") { } + void taxidriv(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; @@ -70,7 +73,6 @@ public: DECLARE_PALETTE_INIT(taxidriv); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void taxidriv(machine_config &config); void cpu2_map(address_map &map); void cpu3_map(address_map &map); void cpu3_port_map(address_map &map); diff --git a/src/mame/includes/tbowl.h b/src/mame/includes/tbowl.h index 3c64f0dc1a0..3aa1070dd3a 100644 --- a/src/mame/includes/tbowl.h +++ b/src/mame/includes/tbowl.h @@ -25,6 +25,9 @@ public: m_spriteram(*this, "spriteram") { } + void tbowl(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<msm5205_device> m_msm1; @@ -83,7 +86,7 @@ public: void adpcm_int(msm5205_device *device, int chip); DECLARE_WRITE_LINE_MEMBER(adpcm_int_1); DECLARE_WRITE_LINE_MEMBER(adpcm_int_2); - void tbowl(machine_config &config); + void _6206A_map(address_map &map); void _6206B_map(address_map &map); void _6206C_map(address_map &map); diff --git a/src/mame/includes/tceptor.h b/src/mame/includes/tceptor.h index ad8261540c6..1b929851b84 100644 --- a/src/mame/includes/tceptor.h +++ b/src/mame/includes/tceptor.h @@ -26,6 +26,9 @@ public: m_shutter(*this, "shutter") { } + void tceptor(machine_config &config); + +private: uint8_t m_m6809_irq_enable; uint8_t m_m68k_irq_enable; uint8_t m_mcu_irq_enable; @@ -98,7 +101,7 @@ public: void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int sprite_priority); inline uint8_t fix_input0(uint8_t in1, uint8_t in2); inline uint8_t fix_input1(uint8_t in1, uint8_t in2); - void tceptor(machine_config &config); + void m6502_a_map(address_map &map); void m6502_b_map(address_map &map); void m6809_map(address_map &map); diff --git a/src/mame/includes/tdv2324.h b/src/mame/includes/tdv2324.h index 87b5832f3cd..634415d962a 100644 --- a/src/mame/includes/tdv2324.h +++ b/src/mame/includes/tdv2324.h @@ -59,6 +59,9 @@ public: m_video_ram(*this, "video_ram") { } + void tdv2324(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_subcpu; required_device<cpu_device> m_fdccpu; @@ -80,7 +83,6 @@ public: // video state required_shared_ptr<uint8_t> m_video_ram; - void tdv2324(machine_config &config); void tdv2324_fdc_mem(address_map &map); void tdv2324_io(address_map &map); void tdv2324_mem(address_map &map); diff --git a/src/mame/includes/tecmo.h b/src/mame/includes/tecmo.h index a7605e6094d..56482d18c51 100644 --- a/src/mame/includes/tecmo.h +++ b/src/mame/includes/tecmo.h @@ -23,6 +23,19 @@ public: m_bgvideoram(*this, "bgvideoram"), m_spriteram(*this, "spriteram") { } + void geminib(machine_config &config); + void backfirt(machine_config &config); + void silkworm(machine_config &config); + void gemini(machine_config &config); + void rygar(machine_config &config); + void silkwormp(machine_config &config); + + void init_silkworm(); + void init_rygar(); + void init_backfirt(); + void init_gemini(); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_soundcpu; optional_device<msm5205_device> m_msm; @@ -62,11 +75,6 @@ public: DECLARE_WRITE8_MEMBER(adpcm_vol_w); DECLARE_WRITE_LINE_MEMBER(adpcm_int); - void init_silkworm(); - void init_rygar(); - void init_backfirt(); - void init_gemini(); - TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(gemini_get_bg_tile_info); @@ -78,12 +86,7 @@ public: virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void geminib(machine_config &config); - void backfirt(machine_config &config); - void silkworm(machine_config &config); - void gemini(machine_config &config); - void rygar(machine_config &config); - void silkwormp(machine_config &config); + void gemini_map(address_map &map); void rygar_map(address_map &map); void rygar_sound_map(address_map &map); diff --git a/src/mame/includes/tecmo16.h b/src/mame/includes/tecmo16.h index 6bd6c36fe98..90421fb19f5 100644 --- a/src/mame/includes/tecmo16.h +++ b/src/mame/includes/tecmo16.h @@ -26,6 +26,11 @@ public: m_spriteram(*this, "spriteram") { } + void ginkun(machine_config &config); + void fstarfrc(machine_config &config); + void riot(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; @@ -80,9 +85,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void save_state(); - void ginkun(machine_config &config); - void fstarfrc(machine_config &config); - void riot(machine_config &config); + void fstarfrc_map(address_map &map); void ginkun_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/tecmosys.h b/src/mame/includes/tecmosys.h index 52f4a2130e9..e8d12358ffe 100644 --- a/src/mame/includes/tecmosys.h +++ b/src/mame/includes/tecmosys.h @@ -39,6 +39,13 @@ public: { } + void tecmosys(machine_config &config); + + void init_tkdensha(); + void init_deroon(); + void init_tkdensho(); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<eeprom_serial_93cxx_device> m_eeprom; @@ -87,9 +94,6 @@ public: DECLARE_READ16_MEMBER(eeprom_r); DECLARE_WRITE16_MEMBER(eeprom_w); - void init_tkdensha(); - void init_deroon(); - void init_tkdensho(); virtual void machine_start() override; virtual void video_start() override; @@ -103,7 +107,7 @@ public: void tilemap_copy_to_compose(uint16_t pri, const rectangle &cliprect); void do_final_mix(bitmap_rgb32 &bitmap, const rectangle &cliprect); void descramble(); - void tecmosys(machine_config &config); + void io_map(address_map &map); void main_map(address_map &map); void oki_map(address_map &map); diff --git a/src/mame/includes/tehkanwc.h b/src/mame/includes/tehkanwc.h index b629b1c6e88..ca1d8fe509e 100644 --- a/src/mame/includes/tehkanwc.h +++ b/src/mame/includes/tehkanwc.h @@ -8,11 +8,6 @@ class tehkanwc_state : public driver_device { public: - enum - { - TIMER_RESET - }; - tehkanwc_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -30,6 +25,17 @@ public: m_digits(*this, "digit%u", 0U) { } + void tehkanwcb(machine_config &config); + void tehkanwc(machine_config &config); + + void init_teedoff(); + +private: + enum + { + TIMER_RESET + }; + required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<cpu_device> m_subcpu; @@ -83,7 +89,6 @@ public: TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); - void init_teedoff(); virtual void machine_start() override; virtual void video_start() override; @@ -91,12 +96,10 @@ public: void gridiron_draw_led(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t led,int player); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void tehkanwcb(machine_config &config); - void tehkanwc(machine_config &config); void main_mem(address_map &map); void sound_mem(address_map &map); void sound_port(address_map &map); void sub_mem(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/tek405x.h b/src/mame/includes/tek405x.h index b1e2d2b154c..9a73e8022d9 100644 --- a/src/mame/includes/tek405x.h +++ b/src/mame/includes/tek405x.h @@ -57,6 +57,9 @@ public: m_lamps(*this, "lamp%u", 1U) { } + void tek4051(machine_config &config); + +private: void bankswitch(uint8_t data); void update_irq(); void update_nmi(); @@ -108,10 +111,8 @@ public: DECLARE_WRITE_LINE_MEMBER( write_acia_clock ); TIMER_DEVICE_CALLBACK_MEMBER(keyboard_tick); - void tek4051(machine_config &config); void tek4051_mem(address_map &map); -protected: virtual void machine_start() override; virtual void video_start() override; @@ -162,9 +163,10 @@ public: { } void tek4052(machine_config &config); + +private: void tek4052_mem(address_map &map); -protected: virtual void machine_start() override; virtual void video_start() override; diff --git a/src/mame/includes/terracre.h b/src/mame/includes/terracre.h index bb1b5b809e6..e4f65be47a8 100644 --- a/src/mame/includes/terracre.h +++ b/src/mame/includes/terracre.h @@ -19,6 +19,14 @@ public: m_bg_videoram(*this, "bg_videoram"), m_fg_videoram(*this, "fg_videoram") { } + void amazon_base(machine_config &config); + void ym2203(machine_config &config); + void ym3526(machine_config &config); + +protected: + void amazon_base_map(address_map &map); + +private: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; @@ -45,10 +53,7 @@ public: DECLARE_PALETTE_INIT(terracre); uint32_t screen_update_amazon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); - void amazon_base(machine_config &config); - void ym2203(machine_config &config); - void ym3526(machine_config &config); - void amazon_base_map(address_map &map); + void sound_2203_io_map(address_map &map); void sound_3526_io_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/tetrisp2.h b/src/mame/includes/tetrisp2.h index 76cf8df8e89..1a02f6b5704 100644 --- a/src/mame/includes/tetrisp2.h +++ b/src/mame/includes/tetrisp2.h @@ -36,6 +36,25 @@ public: m_leds(*this, "led%u", 0U) { } + void rockn2(machine_config &config); + void tetrisp2(machine_config &config); + void nndmseal(machine_config &config); + void rocknms(machine_config &config); + void rockn(machine_config &config); + + void init_rockn2(); + void init_rockn1(); + void init_rockn(); + void init_rockn3(); + void init_rocknms(); + + DECLARE_CUSTOM_INPUT_MEMBER(rocknms_main2sub_status_r); + + TILE_GET_INFO_MEMBER(get_tile_info_bg); + TILE_GET_INFO_MEMBER(stepstag_get_tile_info_fg); + TILE_GET_INFO_MEMBER(get_tile_info_rot); + +protected: DECLARE_WRITE16_MEMBER(rockn_systemregs_w); DECLARE_WRITE16_MEMBER(rocknms_sub_systemregs_w); DECLARE_READ16_MEMBER(rockn_adpcmbank_r); @@ -66,19 +85,13 @@ public: DECLARE_WRITE16_MEMBER(rocknms_sub_vram_bg_w); DECLARE_WRITE16_MEMBER(rocknms_sub_vram_fg_w); DECLARE_WRITE16_MEMBER(rocknms_sub_vram_rot_w); - DECLARE_CUSTOM_INPUT_MEMBER(rocknms_main2sub_status_r); - void init_rockn2(); - void init_rockn1(); - void init_rockn(); - void init_rockn3(); - void init_rocknms(); - TILE_GET_INFO_MEMBER(get_tile_info_bg); + TILE_GET_INFO_MEMBER(get_tile_info_fg); - TILE_GET_INFO_MEMBER(get_tile_info_rot); + TILE_GET_INFO_MEMBER(get_tile_info_rocknms_sub_bg); TILE_GET_INFO_MEMBER(get_tile_info_rocknms_sub_fg); TILE_GET_INFO_MEMBER(get_tile_info_rocknms_sub_rot); - TILE_GET_INFO_MEMBER(stepstag_get_tile_info_fg); + DECLARE_VIDEO_START(tetrisp2); DECLARE_VIDEO_START(nndmseal); DECLARE_VIDEO_START(rockntread); @@ -92,11 +105,7 @@ public: TIMER_CALLBACK_MEMBER(rockn_timer_level1_callback); TIMER_CALLBACK_MEMBER(rockn_timer_sub_level1_callback); void init_rockn_timer(); - void rockn2(machine_config &config); - void tetrisp2(machine_config &config); - void nndmseal(machine_config &config); - void rocknms(machine_config &config); - void rockn(machine_config &config); + void nndmseal_map(address_map &map); void rockn1_map(address_map &map); void rockn2_map(address_map &map); @@ -104,7 +113,6 @@ public: void rocknms_sub_map(address_map &map); void tetrisp2_map(address_map &map); -protected: virtual void machine_start() override { m_leds.resolve(); } required_device<cpu_device> m_maincpu; @@ -177,6 +185,14 @@ public: m_soundlatch(*this, "soundlatch") { } + void stepstag(machine_config &config); + void vjdash(machine_config &config); + + void init_stepstag(); + + DECLARE_VIDEO_START(stepstag); + +private: DECLARE_READ16_MEMBER(stepstag_coins_r); uint16_t vj_upload_idx; bool vj_upload_fini; @@ -194,21 +210,16 @@ public: DECLARE_WRITE16_MEMBER( stepstag_palette_mid_w ); DECLARE_WRITE16_MEMBER( stepstag_palette_right_w ); - void init_stepstag(); - DECLARE_VIDEO_START(stepstag); uint32_t screen_update_stepstag_left(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t screen_update_stepstag_mid(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t screen_update_stepstag_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_stepstag_main(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); // inline int mypal(int x); - void stepstag(machine_config &config); - void vjdash(machine_config &config); - void stepstag_map(address_map &map); void stepstag_sub_map(address_map &map); void vjdash_map(address_map &map); -private: + required_shared_ptr<uint16_t> m_spriteram1; required_shared_ptr<uint16_t> m_spriteram3; optional_device<gfxdecode_device> m_vj_gfxdecode_l; diff --git a/src/mame/includes/thedeep.h b/src/mame/includes/thedeep.h index 8e6dcac6fdd..25e7494bb01 100644 --- a/src/mame/includes/thedeep.h +++ b/src/mame/includes/thedeep.h @@ -26,6 +26,9 @@ public: m_scroll2(*this, "scroll2") { } + void thedeep(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<cpu_device> m_mcu; @@ -75,7 +78,7 @@ public: INTERRUPT_GEN_MEMBER(mcu_irq); TIMER_DEVICE_CALLBACK_MEMBER(interrupt); - void thedeep(machine_config &config); + void audio_map(address_map &map); void main_map(address_map &map); }; diff --git a/src/mame/includes/thepit.h b/src/mame/includes/thepit.h index 2e6c43c96e8..fe746339e94 100644 --- a/src/mame/includes/thepit.h +++ b/src/mame/includes/thepit.h @@ -16,6 +16,15 @@ public: m_attributesram(*this, "attributesram"), m_spriteram(*this, "spriteram") { } + void suprmous(machine_config &config); + void desertdn(machine_config &config); + void intrepid(machine_config &config); + void thepit(machine_config &config); + void fitter(machine_config &config); + + void init_rtriv(); + +private: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; @@ -54,7 +63,6 @@ public: TILE_GET_INFO_MEMBER(solid_get_tile_info); TILE_GET_INFO_MEMBER(get_tile_info); - void init_rtriv(); virtual void machine_start() override; virtual void video_start() override; DECLARE_PALETTE_INIT(thepit); @@ -65,11 +73,7 @@ public: void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority_to_draw); INTERRUPT_GEN_MEMBER(vblank_irq); - void suprmous(machine_config &config); - void desertdn(machine_config &config); - void intrepid(machine_config &config); - void thepit(machine_config &config); - void fitter(machine_config &config); + void audio_io_map(address_map &map); void audio_map(address_map &map); void desertdan_main_map(address_map &map); diff --git a/src/mame/includes/thief.h b/src/mame/includes/thief.h index 8f402726200..fdce1653579 100644 --- a/src/mame/includes/thief.h +++ b/src/mame/includes/thief.h @@ -21,6 +21,15 @@ public: m_tms(*this, "tms"), m_palette(*this, "palette") { } + void natodef(machine_config &config); + void sharkatt(machine_config &config); + void thief(machine_config &config); + + void init_thief(); + + DECLARE_WRITE_LINE_MEMBER(slam_w); + +private: std::unique_ptr<uint8_t[]> m_videoram; uint8_t m_input_select; uint8_t m_read_mask; @@ -41,10 +50,9 @@ public: DECLARE_READ8_MEMBER(thief_coprocessor_r); DECLARE_WRITE8_MEMBER(thief_coprocessor_w); DECLARE_WRITE8_MEMBER(tape_control_w); - void init_thief(); virtual void video_start() override; uint32_t screen_update_thief(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(slam_w); + IRQ_CALLBACK_MEMBER(iack); uint16_t fetch_image_addr( coprocessor_t &thief_coprocessor ); void tape_set_audio( int track, int bOn ); @@ -53,9 +61,7 @@ public: required_device<samples_device> m_samples; required_device<tms9927_device> m_tms; required_device<palette_device> m_palette; - void natodef(machine_config &config); - void sharkatt(machine_config &config); - void thief(machine_config &config); + void io_map(address_map &map); void sharkatt_main_map(address_map &map); void thief_main_map(address_map &map); diff --git a/src/mame/includes/thomson.h b/src/mame/includes/thomson.h index d85f2fa4e37..fc76d33c96e 100644 --- a/src/mame/includes/thomson.h +++ b/src/mame/includes/thomson.h @@ -151,6 +151,52 @@ public: { } + void to9(machine_config &config); + void to7(machine_config &config); + void mo5e(machine_config &config); + void to770a(machine_config &config); + void t9000(machine_config &config); + void to8(machine_config &config); + void pro128(machine_config &config); + void mo6(machine_config &config); + void mo5(machine_config &config); + void to9p(machine_config &config); + void mo5nr(machine_config &config); + void to770(machine_config &config); + void to8d(machine_config &config); + + void to770_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void mo5_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void mo5alt_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void to9_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void bitmap4_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void bitmap4alt_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void bitmap4althalf_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void bitmap16_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void mode80_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void mode80_to9_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void page1_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void page2_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void overlay_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void overlayhalf_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void overlay3_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void to770_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void mo5_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void mo5alt_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void to9_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void bitmap4_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void bitmap4alt_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void bitmap4althalf_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void bitmap16_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void mode80_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void mode80_to9_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void page1_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void page2_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void overlay_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void overlayhalf_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void overlay3_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + +private: DECLARE_FLOPPY_FORMATS(cd90_640_formats); DECLARE_DEVICE_IMAGE_LOAD_MEMBER( to7_cartridge ); @@ -290,36 +336,7 @@ public: DECLARE_WRITE8_MEMBER( mo6_vcart_lo_w ); DECLARE_WRITE8_MEMBER( mo6_vcart_hi_w ); TIMER_CALLBACK_MEMBER( thom_set_init ); - void to770_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void mo5_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void mo5alt_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void to9_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void bitmap4_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void bitmap4alt_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void bitmap4althalf_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void bitmap16_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void mode80_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void mode80_to9_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void page1_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void page2_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void overlay_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void overlayhalf_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void overlay3_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void to770_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void mo5_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void mo5alt_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void to9_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void bitmap4_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void bitmap4alt_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void bitmap4althalf_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void bitmap16_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void mode80_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void mode80_to9_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void page1_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void page2_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void overlay_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void overlayhalf_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void overlay3_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + DECLARE_WRITE_LINE_MEMBER(thom_vblank); DECLARE_VIDEO_START( thom ); @@ -359,19 +376,6 @@ public: MC6854_OUT_FRAME_CB(to7_network_got_frame); - void to9(machine_config &config); - void to7(machine_config &config); - void mo5e(machine_config &config); - void to770a(machine_config &config); - void t9000(machine_config &config); - void to8(machine_config &config); - void pro128(machine_config &config); - void mo6(machine_config &config); - void mo5(machine_config &config); - void to9p(machine_config &config); - void mo5nr(machine_config &config); - void to770(machine_config &config); - void to8d(machine_config &config); void mo5(address_map &map); void mo5nr(address_map &map); void mo6(address_map &map); @@ -380,7 +384,7 @@ public: void to8(address_map &map); void to9(address_map &map); void to9p(address_map &map); -protected: + required_device<cpu_device> m_maincpu; required_device<cassette_image_device> m_cassette; required_device<dac_byte_interface> m_dac; diff --git a/src/mame/includes/thoop2.h b/src/mame/includes/thoop2.h index 4cbcec13893..0008120ce7b 100644 --- a/src/mame/includes/thoop2.h +++ b/src/mame/includes/thoop2.h @@ -24,6 +24,9 @@ public: m_shareram(*this, "shareram") { } + void thoop2(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(OKIM6295_bankswitch_w); DECLARE_WRITE_LINE_MEMBER(coin1_lockout_w); DECLARE_WRITE_LINE_MEMBER(coin2_lockout_w); @@ -38,18 +41,16 @@ public: TILE_GET_INFO_MEMBER(get_tile_info_screen1); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void thoop2(machine_config &config); void mcu_hostmem_map(address_map &map); void oki_map(address_map &map); void thoop2_map(address_map &map); -protected: + virtual void machine_start() override; virtual void video_start() override; void sort_sprites(); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri); -private: int m_sprite_count[5]; std::unique_ptr<int[]> m_sprite_table[5]; tilemap_t *m_pant[2]; diff --git a/src/mame/includes/thunderj.h b/src/mame/includes/thunderj.h index 81379acd6c1..4825b4dfaa0 100644 --- a/src/mame/includes/thunderj.h +++ b/src/mame/includes/thunderj.h @@ -27,10 +27,11 @@ public: m_extra(*this, "extra") { } - void init_thunderj(); void thunderj(machine_config &config); -protected: + void init_thunderj(); + +private: virtual void machine_start() override; DECLARE_WRITE_LINE_MEMBER(scanline_int_write_line); DECLARE_READ16_MEMBER(special_port2_r); @@ -43,7 +44,6 @@ protected: void extra_map(address_map &map); void main_map(address_map &map); -private: required_device<screen_device> m_screen; required_device<atari_jsa_ii_device> m_jsa; required_device<atari_vad_device> m_vad; diff --git a/src/mame/includes/thunderx.h b/src/mame/includes/thunderx.h index 5011083e3ef..aab9dd6805e 100644 --- a/src/mame/includes/thunderx.h +++ b/src/mame/includes/thunderx.h @@ -16,11 +16,6 @@ class thunderx_state : public driver_device { public: - enum - { - TIMER_THUNDERX_FIRQ - }; - thunderx_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -33,6 +28,18 @@ public: m_rombank(*this, "rombank"), m_pmcram(*this, "pmcram") { } + void scontra(machine_config &config); + void gbusters(machine_config &config); + void thunderx(machine_config &config); + + void init_thunderx(); + +private: + enum + { + TIMER_THUNDERX_FIRQ + }; + /* devices */ required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; @@ -67,7 +74,6 @@ public: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; - void init_thunderx(); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(vblank_interrupt); @@ -79,9 +85,6 @@ public: K051960_CB_MEMBER(sprite_callback); DECLARE_WRITE8_MEMBER(banking_callback); - void scontra(machine_config &config); - void gbusters(machine_config &config); - void thunderx(machine_config &config); void gbusters_map(address_map &map); void scontra_bank5800_map(address_map &map); void scontra_map(address_map &map); @@ -89,6 +92,6 @@ public: void thunderx_bank5800_map(address_map &map); void thunderx_map(address_map &map); void thunderx_sound_map(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/ti85.h b/src/mame/includes/ti85.h index d980df29c71..6294bf2416c 100644 --- a/src/mame/includes/ti85.h +++ b/src/mame/includes/ti85.h @@ -69,6 +69,20 @@ public: { } + void ti83(machine_config &config); + void ti82(machine_config &config); + void ti83p(machine_config &config); + void ti81v2(machine_config &config); + void ti73(machine_config &config); + void ti85d(machine_config &config); + void ti83pse(machine_config &config); + void ti84pse(machine_config &config); + void ti86(machine_config &config); + void ti81(machine_config &config); + void ti85(machine_config &config); + void ti84p(machine_config &config); + +private: required_device<cpu_device> m_maincpu; optional_device<ti8x_link_port_device> m_link_port; optional_shared_ptr<uint8_t> m_nvram; @@ -227,18 +241,6 @@ public: ti83pse_timer m_ctimer[3]; - void ti83(machine_config &config); - void ti82(machine_config &config); - void ti83p(machine_config &config); - void ti81v2(machine_config &config); - void ti73(machine_config &config); - void ti85d(machine_config &config); - void ti83pse(machine_config &config); - void ti84pse(machine_config &config); - void ti86(machine_config &config); - void ti81(machine_config &config); - void ti85(machine_config &config); - void ti84p(machine_config &config); void ti81_io(address_map &map); void ti81_mem(address_map &map); void ti81v2_io(address_map &map); diff --git a/src/mame/includes/ti89.h b/src/mame/includes/ti89.h index bab2a627d34..cfe81043df4 100644 --- a/src/mame/includes/ti89.h +++ b/src/mame/includes/ti89.h @@ -31,6 +31,15 @@ public: m_io_bit7(*this, "BIT7") { } + void v200(machine_config &config); + void ti92(machine_config &config); + void ti89(machine_config &config); + void ti92p(machine_config &config); + void ti89t(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(ti68k_on_key); + +private: required_device<cpu_device> m_maincpu; required_device<sharp_unk128mbit_device> m_flash; required_region_ptr<uint16_t> m_rom_base; @@ -84,13 +93,9 @@ public: DECLARE_READ16_MEMBER ( flash_r ); uint64_t m_timer; DECLARE_PALETTE_INIT(ti68k); - DECLARE_INPUT_CHANGED_MEMBER(ti68k_on_key); + TIMER_DEVICE_CALLBACK_MEMBER(ti68k_timer_callback); - void v200(machine_config &config); - void ti92(machine_config &config); - void ti89(machine_config &config); - void ti92p(machine_config &config); - void ti89t(machine_config &config); + void ti89_mem(address_map &map); void ti89t_mem(address_map &map); void ti92_mem(address_map &map); diff --git a/src/mame/includes/tiamc1.h b/src/mame/includes/tiamc1.h index a87f23e8fe7..3788460ebe6 100644 --- a/src/mame/includes/tiamc1.h +++ b/src/mame/includes/tiamc1.h @@ -20,6 +20,10 @@ public: , m_speaker(*this, "speaker") { } + void kot(machine_config &config); + void tiamc1(machine_config &config); + +private: std::unique_ptr<uint8_t[]> m_videoram; uint8_t *m_tileram; uint8_t *m_charram; @@ -62,13 +66,12 @@ public: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; - void kot(machine_config &config); - void tiamc1(machine_config &config); + void kotrybolov_io_map(address_map &map); void kotrybolov_map(address_map &map); void tiamc1_io_map(address_map &map); void tiamc1_map(address_map &map); -private: + optional_device<speaker_sound_device> m_speaker; void update_bg_palette(); }; diff --git a/src/mame/includes/tigeroad.h b/src/mame/includes/tigeroad.h index af10c5a5693..b0cc9813f0e 100644 --- a/src/mame/includes/tigeroad.h +++ b/src/mame/includes/tigeroad.h @@ -36,6 +36,11 @@ public: m_has_coinlock(true) { } + void toramich(machine_config &config); + void tigeroad(machine_config &config); + void f1dream_comad(machine_config &config); + +protected: required_device<buffered_spriteram16_device> m_spriteram; required_shared_ptr<uint16_t> m_videoram; required_shared_ptr<uint16_t> m_ram16; @@ -60,9 +65,6 @@ public: required_device<tigeroad_spr_device> m_spritegen; required_device<generic_latch_8_device> m_soundlatch; - void toramich(machine_config &config); - void tigeroad(machine_config &config); - void f1dream_comad(machine_config &config); void comad_sound_io_map(address_map &map); void comad_sound_map(address_map &map); void main_map(address_map &map); @@ -70,7 +72,6 @@ public: void sample_port_map(address_map &map); void sound_map(address_map &map); void sound_port_map(address_map &map); -protected: /* misc */ bool m_has_coinlock; }; @@ -92,6 +93,10 @@ public: m_has_coinlock = false; } + void pushman(machine_config &config); + void bballs(machine_config &config); + +private: DECLARE_READ16_MEMBER(mcu_comm_r); DECLARE_WRITE16_MEMBER(pushman_mcu_comm_w); DECLARE_WRITE16_MEMBER(bballs_mcu_comm_w); @@ -100,11 +105,9 @@ public: DECLARE_WRITE8_MEMBER(mcu_pb_w); DECLARE_WRITE8_MEMBER(mcu_pc_w); - void pushman(machine_config &config); - void bballs(machine_config &config); void bballs_map(address_map &map); void pushman_map(address_map &map); -protected: + virtual void machine_start() override; required_device<m68705u_device> m_mcu; @@ -126,10 +129,11 @@ public: } void f1dream(machine_config &config); + +private: void f1dream_map(address_map &map); void f1dream_mcu_io(address_map &map); -private: DECLARE_WRITE8_MEMBER(out1_w); DECLARE_WRITE8_MEMBER(out3_w); diff --git a/src/mame/includes/tiki100.h b/src/mame/includes/tiki100.h index 1c28040d7bb..8daff0eff4f 100644 --- a/src/mame/includes/tiki100.h +++ b/src/mame/includes/tiki100.h @@ -68,6 +68,9 @@ public: m_vire(1) { } + void tiki100(machine_config &config); + +private: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_READ8_MEMBER( mrq_r ); @@ -98,10 +101,9 @@ public: DECLARE_WRITE_LINE_MEMBER( busrq_w ); - void tiki100(machine_config &config); void tiki100_io(address_map &map); void tiki100_mem(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/timelimt.h b/src/mame/includes/timelimt.h index 3472071a2a5..0f34c295426 100644 --- a/src/mame/includes/timelimt.h +++ b/src/mame/includes/timelimt.h @@ -16,6 +16,9 @@ public: m_bg_videoram(*this, "bg_videoram"), m_spriteram(*this, "spriteram") { } + void timelimt(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; @@ -51,7 +54,7 @@ public: void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(irq); - void timelimt(machine_config &config); + void main_io_map(address_map &map); void main_map(address_map &map); void sound_io_map(address_map &map); diff --git a/src/mame/includes/timeplt.h b/src/mame/includes/timeplt.h index e4faaf06cfe..9a0044d6a4d 100644 --- a/src/mame/includes/timeplt.h +++ b/src/mame/includes/timeplt.h @@ -28,6 +28,14 @@ public: m_spriteram2(*this, "spriteram2") { } + void timeplt(machine_config &config); + void chkun(machine_config &config); + void psurge(machine_config &config); + void bikkuric(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(chkun_hopper_status_r); + +private: required_device<cpu_device> m_maincpu; optional_device<tc8830f_device> m_tc8830f; required_device<ls259_device> m_mainlatch; @@ -65,7 +73,6 @@ public: DECLARE_READ8_MEMBER(psurge_protection_r); /* chkun */ - DECLARE_CUSTOM_INPUT_MEMBER(chkun_hopper_status_r); DECLARE_WRITE8_MEMBER(chkun_sound_w); TILE_GET_INFO_MEMBER(get_tile_info); @@ -82,10 +89,7 @@ public: void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); DECLARE_WRITE_LINE_MEMBER(vblank_irq); - void timeplt(machine_config &config); - void chkun(machine_config &config); - void psurge(machine_config &config); - void bikkuric(machine_config &config); + void chkun_main_map(address_map &map); void psurge_main_map(address_map &map); void timeplt_main_map(address_map &map); diff --git a/src/mame/includes/tmc2000e.h b/src/mame/includes/tmc2000e.h index 0016bcd6a8a..5e0b84beb41 100644 --- a/src/mame/includes/tmc2000e.h +++ b/src/mame/includes/tmc2000e.h @@ -32,6 +32,9 @@ public: , m_led(*this, "led1") { } + void tmc2000e(machine_config &config); + +private: DECLARE_READ8_MEMBER( vismac_r ); DECLARE_WRITE8_MEMBER( vismac_w ); DECLARE_READ8_MEMBER( floppy_r ); @@ -57,11 +60,9 @@ public: /* keyboard state */ int m_keylatch; /* key latch */ int m_reset; /* reset activated */ - void tmc2000e(machine_config &config); void tmc2000e_io_map(address_map &map); void tmc2000e_map(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/tmc600.h b/src/mame/includes/tmc600.h index 586a9855ba9..79016ee2104 100644 --- a/src/mame/includes/tmc600.h +++ b/src/mame/includes/tmc600.h @@ -46,6 +46,10 @@ public: m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7"}) { } + void tmc600(machine_config &config); + void tmc600_video(machine_config &config); + +private: required_device<cosmac_device> m_maincpu; required_device<cdp1869_device> m_vis; required_device<cdp1852_device> m_bwio; @@ -85,8 +89,7 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(blink_tick); CDP1869_CHAR_RAM_READ_MEMBER(tmc600_char_ram_r); CDP1869_PCB_READ_MEMBER(tmc600_pcb_r); - void tmc600(machine_config &config); - void tmc600_video(machine_config &config); + void cdp1869_page_ram(address_map &map); void tmc600_io_map(address_map &map); void tmc600_map(address_map &map); diff --git a/src/mame/includes/tmnt.h b/src/mame/includes/tmnt.h index f301be85468..98e47c7d786 100644 --- a/src/mame/includes/tmnt.h +++ b/src/mame/includes/tmnt.h @@ -17,11 +17,6 @@ class tmnt_state : public driver_device { public: - enum - { - TIMER_NMI - }; - tmnt_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_spriteram(*this, "spriteram"), @@ -44,6 +39,29 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void cuebrick(machine_config &config); + void blswhstl(machine_config &config); + void ssriders(machine_config &config); + void tmnt2(machine_config &config); + void lgtnfght(machine_config &config); + void thndrx2(machine_config &config); + void prmrsocr(machine_config &config); + void sunsetbl(machine_config &config); + void glfgreat(machine_config &config); + void tmnt(machine_config &config); + void mia(machine_config &config); + void punkshot(machine_config &config); + + void init_mia(); + void init_tmnt(); + void init_cuebrick(); + +private: + enum + { + TIMER_NMI + }; + /* memory pointers */ optional_shared_ptr<uint16_t> m_spriteram; optional_shared_ptr<uint16_t> m_tmnt2_rom; @@ -140,9 +158,7 @@ public: DECLARE_WRITE8_MEMBER(glfgreat_sound_w); DECLARE_WRITE8_MEMBER(tmnt_upd_start_w); DECLARE_READ8_MEMBER(tmnt_upd_busy_r); - void init_mia(); - void init_tmnt(); - void init_cuebrick(); + TILE_GET_INFO_MEMBER(glfgreat_get_roz_tile_info); TILE_GET_INFO_MEMBER(prmrsocr_get_roz_tile_info); DECLARE_MACHINE_START(common); @@ -184,18 +200,6 @@ public: K052109_CB_MEMBER(blswhstl_tile_callback); SAMPLES_START_CB_MEMBER(tmnt_decode_sample); - void cuebrick(machine_config &config); - void blswhstl(machine_config &config); - void ssriders(machine_config &config); - void tmnt2(machine_config &config); - void lgtnfght(machine_config &config); - void thndrx2(machine_config &config); - void prmrsocr(machine_config &config); - void sunsetbl(machine_config &config); - void glfgreat(machine_config &config); - void tmnt(machine_config &config); - void mia(machine_config &config); - void punkshot(machine_config &config); void blswhstl_main_map(address_map &map); void cuebrick_main_map(address_map &map); void glfgreat_audio_map(address_map &map); @@ -216,6 +220,6 @@ public: void tmnt2_main_map(address_map &map); void tmnt_audio_map(address_map &map); void tmnt_main_map(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/tnzs.h b/src/mame/includes/tnzs.h index e3a1aeedf91..a71c95c10d6 100644 --- a/src/mame/includes/tnzs.h +++ b/src/mame/includes/tnzs.h @@ -30,6 +30,12 @@ public: , m_subbank(*this, "subbank") { } + void tnzs_base(machine_config &config); + void tnzs_mainbank(machine_config &config); + + DECLARE_PALETTE_INIT(prompalette); + +protected: virtual void machine_start() override; virtual DECLARE_WRITE8_MEMBER(bankswitch1_w); @@ -39,15 +45,10 @@ public: uint32_t screen_update_tnzs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank_tnzs); - DECLARE_PALETTE_INIT(prompalette); - - void tnzs_base(machine_config &config); - void tnzs_mainbank(machine_config &config); - void base_sub_map(address_map &map); void main_map(address_map &map); void mainbank_map(address_map &map); -protected: + /* devices */ required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_subcpu; @@ -74,6 +75,9 @@ public: , m_lockout_level(lockout_level) { } + void tnzs(machine_config &config); + +protected: virtual DECLARE_WRITE8_MEMBER(bankswitch1_w) override; DECLARE_READ8_MEMBER(mcu_port1_r); @@ -84,9 +88,8 @@ public: DECLARE_READ8_MEMBER(analog_r); - void tnzs(machine_config &config); void tnzs_sub_map(address_map &map); -protected: + required_device<upi41_cpu_device> m_mcu; optional_device<upd4701_device> m_upd4701; @@ -114,6 +117,8 @@ public: { } void extrmatn(machine_config &config); void plumppop(machine_config &config); + +protected: void prompal_main_map(address_map &map); }; @@ -129,6 +134,9 @@ public: , m_in2(*this, "IN2") { } + void arknoid2(machine_config &config); + +private: virtual void machine_start() override; virtual void machine_reset() override; @@ -138,9 +146,8 @@ public: DECLARE_WRITE8_MEMBER(mcu_w); INTERRUPT_GEN_MEMBER(mcu_interrupt); - void arknoid2(machine_config &config); void arknoid2_sub_map(address_map &map); -private: + required_ioport m_coin1; required_ioport m_coin2; required_ioport m_in0; @@ -174,6 +181,11 @@ public: , m_csport_sel(0) { } + void kageki(machine_config &config); + + void init_kageki(); + +private: virtual void machine_start() override; virtual void machine_reset() override; @@ -183,13 +195,11 @@ public: DECLARE_WRITE8_MEMBER(csport_w); DECLARE_MACHINE_RESET(kageki); - void init_kageki(); SAMPLES_START_CB_MEMBER(init_samples); - void kageki(machine_config &config); void kageki_sub_map(address_map &map); -private: + required_device<samples_device> m_samples; required_ioport m_dswa; @@ -210,14 +220,15 @@ public: , m_upd4701(*this, "upd4701") { } + void jpopnics(machine_config &config); + +private: virtual void machine_reset() override; DECLARE_WRITE8_MEMBER(subbankswitch_w); - void jpopnics(machine_config &config); void jpopnics_main_map(address_map &map); void jpopnics_sub_map(address_map &map); -private: required_device<upd4701_device> m_upd4701; }; @@ -228,8 +239,10 @@ public: : tnzs_base_state(mconfig, type, tag) { } - virtual DECLARE_WRITE8_MEMBER(bankswitch1_w) override; void insectx(machine_config &config); + +private: + virtual DECLARE_WRITE8_MEMBER(bankswitch1_w) override; void insectx_sub_map(address_map &map); }; @@ -242,19 +255,21 @@ public: , m_soundlatch(*this, "soundlatch") { } + void tnzsb(machine_config &config); + +protected: DECLARE_WRITE_LINE_MEMBER(ym2203_irqhandler); DECLARE_WRITE8_MEMBER(sound_command_w); virtual DECLARE_WRITE8_MEMBER(bankswitch1_w) override; - void tnzsb(machine_config &config); void tnzsb_base_sub_map(address_map &map); void tnzsb_cpu2_map(address_map &map); void tnzsb_io_map(address_map &map); void tnzsb_main_map(address_map &map); void tnzsb_sub_map(address_map &map); -protected: + required_device<cpu_device> m_audiocpu; required_device<generic_latch_8_device> m_soundlatch; }; @@ -267,14 +282,16 @@ public: , m_audiobank(*this, "audiobank") { } + void kabukiz(machine_config &config); + +private: virtual void machine_start() override; DECLARE_WRITE8_MEMBER(sound_bank_w); - void kabukiz(machine_config &config); void kabukiz_cpu2_map(address_map &map); void kabukiz_sub_map(address_map &map); -protected: + required_memory_bank m_audiobank; }; diff --git a/src/mame/includes/toaplan1.h b/src/mame/includes/toaplan1.h index 551f2f6e024..8a9f37f0b46 100644 --- a/src/mame/includes/toaplan1.h +++ b/src/mame/includes/toaplan1.h @@ -28,6 +28,21 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + void demonwld(machine_config &config); + void samesame(machine_config &config); + void truxton(machine_config &config); + void outzone(machine_config &config); + void vimana(machine_config &config); + void outzonecv(machine_config &config); + void hellfire(machine_config &config); + void zerowing(machine_config &config); + + void init_toaplan1(); + void init_demonwld(); + + DECLARE_MACHINE_RESET(toaplan1); + +protected: required_shared_ptr<uint16_t> m_bgpaletteram; required_shared_ptr<uint16_t> m_fgpaletteram; @@ -83,8 +98,6 @@ public: tilemap_t *m_pf3_tilemap; tilemap_t *m_pf4_tilemap; - - DECLARE_WRITE16_MEMBER(toaplan1_intenable_w); DECLARE_WRITE16_MEMBER(demonwld_dsp_addrsel_w); DECLARE_READ16_MEMBER(demonwld_dsp_r); @@ -130,13 +143,11 @@ public: DECLARE_WRITE8_MEMBER(samesame_sound_done_w); DECLARE_READ8_MEMBER(samesame_cmdavailable_r); - void init_toaplan1(); - void init_demonwld(); TILE_GET_INFO_MEMBER(get_pf1_tile_info); TILE_GET_INFO_MEMBER(get_pf2_tile_info); TILE_GET_INFO_MEMBER(get_pf3_tile_info); TILE_GET_INFO_MEMBER(get_pf4_tile_info); - DECLARE_MACHINE_RESET(toaplan1); + DECLARE_VIDEO_START(toaplan1); DECLARE_MACHINE_RESET(zerowing); DECLARE_MACHINE_RESET(demonwld); @@ -167,14 +178,7 @@ public: required_device<gfxdecode_device> m_gfxdecode; required_device<screen_device> m_screen; required_device<palette_device> m_palette; - void demonwld(machine_config &config); - void samesame(machine_config &config); - void truxton(machine_config &config); - void outzone(machine_config &config); - void vimana(machine_config &config); - void outzonecv(machine_config &config); - void hellfire(machine_config &config); - void zerowing(machine_config &config); + void DSP_io_map(address_map &map); void DSP_program_map(address_map &map); void demonwld_main_map(address_map &map); @@ -206,6 +210,9 @@ public: { } + void rallybik(machine_config &config); + +private: DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_2_w); DECLARE_WRITE_LINE_MEMBER(coin_lockout_1_w); @@ -216,7 +223,6 @@ public: DECLARE_WRITE_LINE_MEMBER(screen_vblank_rallybik); required_device<toaplan_scu_device> m_spritegen; - void rallybik(machine_config &config); void rallybik_main_map(address_map &map); void rallybik_sound_io_map(address_map &map); }; diff --git a/src/mame/includes/toaplan2.h b/src/mame/includes/toaplan2.h index 1b69ce8cef7..41d0644cf5a 100644 --- a/src/mame/includes/toaplan2.h +++ b/src/mame/includes/toaplan2.h @@ -50,6 +50,42 @@ public: , m_okibank(*this, "okibank") { } + void dogyuun(machine_config &config); + void othldrby(machine_config &config); + void snowbro2(machine_config &config); + void bgareggabl(machine_config &config); + void pwrkick(machine_config &config); + void mahoudai(machine_config &config); + void tekipaki(machine_config &config); + void bbakraid(machine_config &config); + void fixeightbl(machine_config &config); + void fixeight(machine_config &config); + void ghox(machine_config &config); + void bgaregga(machine_config &config); + void batrider(machine_config &config); + void shippumd(machine_config &config); + void kbash(machine_config &config); + void pipibibs(machine_config &config); + void pipibibsbl(machine_config &config); + void batsugun(machine_config &config); + void enmadaio(machine_config &config); + void truxton2(machine_config &config); + void vfive(machine_config &config); + void kbash2(machine_config &config); + + void init_bbakraid(); + void init_pipibibsbl(); + void init_dogyuun(); + void init_fixeight(); + void init_bgaregga(); + void init_fixeightbl(); + void init_vfive(); + void init_batrider(); + void init_enmadaio(); + + DECLARE_CUSTOM_INPUT_MEMBER(c2map_r); + +private: optional_shared_ptr<uint8_t> m_shared_ram; // 8 bit RAM shared between 68K and sound CPU optional_shared_ptr<uint16_t> m_paletteram; optional_shared_ptr<uint16_t> m_tx_videoram; @@ -119,18 +155,10 @@ public: DECLARE_WRITE16_MEMBER(batrider_textdata_dma_w); DECLARE_WRITE16_MEMBER(batrider_pal_text_dma_w); DECLARE_WRITE8_MEMBER(batrider_objectbank_w); - DECLARE_CUSTOM_INPUT_MEMBER(c2map_r); + template<int Chip> DECLARE_WRITE8_MEMBER(oki_bankswitch_w); DECLARE_WRITE16_MEMBER(enmadaio_oki_bank_w); - void init_bbakraid(); - void init_pipibibsbl(); - void init_dogyuun(); - void init_fixeight(); - void init_bgaregga(); - void init_fixeightbl(); - void init_vfive(); - void init_batrider(); - void init_enmadaio(); + TILE_GET_INFO_MEMBER(get_text_tile_info); virtual void machine_start() override; DECLARE_MACHINE_RESET(toaplan2); @@ -161,28 +189,8 @@ public: DECLARE_WRITE8_MEMBER(pwrkick_coin_lockout_w); DECLARE_WRITE_LINE_MEMBER(toaplan2_reset); - void dogyuun(machine_config &config); - void othldrby(machine_config &config); - void snowbro2(machine_config &config); - void bgareggabl(machine_config &config); - void pwrkick(machine_config &config); - void mahoudai(machine_config &config); - void tekipaki(machine_config &config); - void bbakraid(machine_config &config); - void fixeightbl(machine_config &config); - void fixeight(machine_config &config); - void ghox(machine_config &config); - void bgaregga(machine_config &config); - void batrider(machine_config &config); - void shippumd(machine_config &config); - void kbash(machine_config &config); - void pipibibs(machine_config &config); - void pipibibsbl(machine_config &config); - void batsugun(machine_config &config); - void enmadaio(machine_config &config); - void truxton2(machine_config &config); - void vfive(machine_config &config); - void kbash2(machine_config &config); + + void batrider_68k_mem(address_map &map); void batrider_dma_mem(address_map &map); void batrider_sound_z80_mem(address_map &map); diff --git a/src/mame/includes/toki.h b/src/mame/includes/toki.h index 7c8b7b0e2fd..eb6601ae660 100644 --- a/src/mame/includes/toki.h +++ b/src/mame/includes/toki.h @@ -28,6 +28,15 @@ public: m_videoram(*this, "videoram"), m_scrollram(*this, "scrollram") { } + void toki(machine_config &config); + void jujuba(machine_config &config); + void tokib(machine_config &config); + + void init_tokib(); + void init_jujuba(); + void init_toki(); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_region_ptr<u8> m_audiocpu_rom; @@ -63,10 +72,6 @@ public: DECLARE_READ8_MEMBER(jujuba_z80_data_decrypt); - void init_tokib(); - void init_jujuba(); - void init_toki(); - TILE_GET_INFO_MEMBER(get_text_tile_info); TILE_GET_INFO_MEMBER(get_back_tile_info); TILE_GET_INFO_MEMBER(get_fore_tile_info); @@ -77,9 +82,7 @@ public: uint32_t screen_update_tokib(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void toki_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); void tokib_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); - void toki(machine_config &config); - void jujuba(machine_config &config); - void tokib(machine_config &config); + void jujuba_audio_map(address_map &map); void jujuba_audio_opcodes_map(address_map &map); void toki_audio_map(address_map &map); diff --git a/src/mame/includes/toobin.h b/src/mame/includes/toobin.h index bf037128724..aeae14d43c5 100644 --- a/src/mame/includes/toobin.h +++ b/src/mame/includes/toobin.h @@ -29,7 +29,7 @@ public: void toobin(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void video_start() override; virtual void update_interrupts() override; @@ -50,7 +50,6 @@ protected: void main_map(address_map &map); -private: required_device<atari_jsa_i_device> m_jsa; required_device<tilemap_device> m_playfield_tilemap; required_device<tilemap_device> m_alpha_tilemap; diff --git a/src/mame/includes/topspeed.h b/src/mame/includes/topspeed.h index 7f804dc208e..9a453de40b6 100644 --- a/src/mame/includes/topspeed.h +++ b/src/mame/includes/topspeed.h @@ -35,6 +35,11 @@ public: , m_msm_rom(*this, "adpcm_%u", 0U) { } + void topspeed(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(pedal_r); + +private: required_shared_ptr<uint16_t> m_spritemap; required_shared_ptr<uint16_t> m_raster_ctrl; required_shared_ptr<uint16_t> m_spriteram; @@ -79,7 +84,6 @@ public: DECLARE_READ8_MEMBER(input_bypass_r); DECLARE_READ16_MEMBER(motor_r); DECLARE_WRITE16_MEMBER(motor_w); - DECLARE_CUSTOM_INPUT_MEMBER(pedal_r); DECLARE_WRITE8_MEMBER(coins_w); DECLARE_WRITE8_MEMBER(msm5205_command_w); @@ -90,7 +94,7 @@ public: // video/topspeed.c void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_topspeed(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void topspeed(machine_config &config); + void cpua_map(address_map &map); void cpub_map(address_map &map); void z80_io(address_map &map); diff --git a/src/mame/includes/tp84.h b/src/mame/includes/tp84.h index 85fadf21534..bcc6a86d53e 100644 --- a/src/mame/includes/tp84.h +++ b/src/mame/includes/tp84.h @@ -31,6 +31,10 @@ public: m_palette(*this, "palette"), m_filter(*this, "filter%u", 1U) { } + void tp84(machine_config &config); + void tp84b(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_subcpu; required_device<cpu_device> m_audiocpu; @@ -73,8 +77,7 @@ public: uint32_t screen_update_tp84(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void tp84(machine_config &config); - void tp84b(machine_config &config); + void audio_map(address_map &map); void cpu2_map(address_map &map); void tp84_cpu1_map(address_map &map); diff --git a/src/mame/includes/trackfld.h b/src/mame/includes/trackfld.h index 2be27ab032e..a27727b5ba6 100644 --- a/src/mame/includes/trackfld.h +++ b/src/mame/includes/trackfld.h @@ -39,16 +39,6 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } - DECLARE_WRITE8_MEMBER(questions_bank_w); - DECLARE_WRITE8_MEMBER(trackfld_videoram_w); - DECLARE_WRITE8_MEMBER(trackfld_colorram_w); - DECLARE_WRITE8_MEMBER(atlantol_gfxbank_w); - DECLARE_READ8_MEMBER(trackfld_SN76496_r); - DECLARE_READ8_MEMBER(trackfld_speech_r); - DECLARE_WRITE8_MEMBER(trackfld_VLM5030_control_w); - DECLARE_WRITE8_MEMBER( konami_SN76496_latch_w ) { m_SN76496_latch = data; }; - DECLARE_WRITE8_MEMBER( konami_SN76496_w ) { m_sn->write(m_SN76496_latch); }; - void reaktor(machine_config &config); void atlantol(machine_config &config); void yieartf(machine_config &config); @@ -64,6 +54,17 @@ public: void init_mastkin(); void init_trackfldnz(); +private: + DECLARE_WRITE8_MEMBER(questions_bank_w); + DECLARE_WRITE8_MEMBER(trackfld_videoram_w); + DECLARE_WRITE8_MEMBER(trackfld_colorram_w); + DECLARE_WRITE8_MEMBER(atlantol_gfxbank_w); + DECLARE_READ8_MEMBER(trackfld_SN76496_r); + DECLARE_READ8_MEMBER(trackfld_speech_r); + DECLARE_WRITE8_MEMBER(trackfld_VLM5030_control_w); + DECLARE_WRITE8_MEMBER( konami_SN76496_latch_w ) { m_SN76496_latch = data; }; + DECLARE_WRITE8_MEMBER( konami_SN76496_w ) { m_sn->write(m_SN76496_latch); }; + void hyprolyb_sound_map(address_map &map); void main_map(address_map &map); void mastkin_map(address_map &map); @@ -74,7 +75,7 @@ public: void wizzquiz_map(address_map &map); void yieartf_map(address_map &map); void hyprolyb_adpcm_map(address_map &map); -private: + /* memory pointers */ required_shared_ptr<uint8_t> m_spriteram2; required_shared_ptr<uint8_t> m_scroll; diff --git a/src/mame/includes/tranz330.h b/src/mame/includes/tranz330.h index e9a9d4a0e6f..ce0aa239ba5 100644 --- a/src/mame/includes/tranz330.h +++ b/src/mame/includes/tranz330.h @@ -44,7 +44,7 @@ public: void tranz330(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; @@ -60,7 +60,6 @@ protected: void tranz330_mem(address_map &map); void tranz330_io(address_map &map); -private: required_device<z80_device> m_cpu; required_device<z80ctc_device> m_ctc; required_device<z80dart_device> m_dart; diff --git a/src/mame/includes/travrusa.h b/src/mame/includes/travrusa.h index 4f4ce8f418f..e30890af45d 100644 --- a/src/mame/includes/travrusa.h +++ b/src/mame/includes/travrusa.h @@ -15,6 +15,15 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void shtrider(machine_config &config); + void travrusa(machine_config &config); + void shtriderb(machine_config &config); + + void init_shtridra(); + void init_motorace(); + void init_shtridrb(); + +private: /* memory pointers */ required_shared_ptr<uint8_t> m_videoram; required_shared_ptr<uint8_t> m_spriteram; @@ -27,9 +36,6 @@ public: DECLARE_WRITE8_MEMBER(travrusa_scroll_x_high_w); DECLARE_WRITE8_MEMBER(travrusa_flipscreen_w); DECLARE_READ8_MEMBER(shtridrb_port11_r); - void init_shtridra(); - void init_motorace(); - void init_shtridrb(); TILE_GET_INFO_MEMBER(get_tile_info); virtual void machine_reset() override; virtual void video_start() override; @@ -41,8 +47,6 @@ public: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; - void shtrider(machine_config &config); - void travrusa(machine_config &config); - void shtriderb(machine_config &config); + void main_map(address_map &map); }; diff --git a/src/mame/includes/triplhnt.h b/src/mame/includes/triplhnt.h index 297a2584681..674d538bdf3 100644 --- a/src/mame/includes/triplhnt.h +++ b/src/mame/includes/triplhnt.h @@ -29,11 +29,6 @@ class triplhnt_state : public driver_device { public: - enum - { - TIMER_HIT - }; - triplhnt_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -52,10 +47,16 @@ public: m_lamp(*this, "lamp0") { } - void init_triplhnt(); void triplhnt(machine_config &config); -protected: + void init_triplhnt(); + +private: + enum + { + TIMER_HIT + }; + DECLARE_WRITE_LINE_MEMBER(ram_2_w); DECLARE_WRITE_LINE_MEMBER(sprite_zoom_w); DECLARE_WRITE_LINE_MEMBER(sprite_bank_w); @@ -80,7 +81,6 @@ protected: virtual void machine_start() override; void triplhnt_map(address_map &map); -private: required_device<cpu_device> m_maincpu; required_device<f9334_device> m_latch; required_device<watchdog_timer_device> m_watchdog; diff --git a/src/mame/includes/trs80.h b/src/mame/includes/trs80.h index 694953285f9..b4fa3970dd8 100644 --- a/src/mame/includes/trs80.h +++ b/src/mame/includes/trs80.h @@ -68,6 +68,25 @@ public: , m_bank19(nullptr) { } + void sys80(machine_config &config); + void trs80(machine_config &config); + void lnw80(machine_config &config); + void model4p(machine_config &config); + void meritum(machine_config &config); + void model3(machine_config &config); + void radionic(machine_config &config); + void model1(machine_config &config); + void ht1080z(machine_config &config); + void cp500(machine_config &config); + void model4(machine_config &config); + + void init_trs80m4(); + void init_trs80l2(); + void init_trs80m4p(); + void init_lnw80(); + void init_trs80(); + +private: DECLARE_FLOPPY_FORMATS(floppy_formats); DECLARE_WRITE8_MEMBER ( trs80_ff_w ); DECLARE_WRITE8_MEMBER ( lnw80_fe_w ); @@ -106,11 +125,7 @@ public: DECLARE_WRITE8_MEMBER( trs80_gfxram_w ); DECLARE_READ8_MEMBER (trs80_wd179x_r); DECLARE_READ8_MEMBER (cp500_a11_flipflop_toggle); - void init_trs80m4(); - void init_trs80l2(); - void init_trs80m4p(); - void init_lnw80(); - void init_trs80(); + INTERRUPT_GEN_MEMBER(trs80_rtc_interrupt); INTERRUPT_GEN_MEMBER(trs80_fdc_interrupt); TIMER_CALLBACK_MEMBER(cassette_data_callback); @@ -127,17 +142,6 @@ public: uint32_t screen_update_radionic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_meritum(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void sys80(machine_config &config); - void trs80(machine_config &config); - void lnw80(machine_config &config); - void model4p(machine_config &config); - void meritum(machine_config &config); - void model3(machine_config &config); - void radionic(machine_config &config); - void model1(machine_config &config); - void ht1080z(machine_config &config); - void cp500(machine_config &config); - void model4(machine_config &config); void cp500_io(address_map &map); void lnw80_io(address_map &map); void lnw80_map(address_map &map); @@ -152,7 +156,7 @@ public: void sys80_io(address_map &map); void trs80_io(address_map &map); void trs80_map(address_map &map); -private: + uint8_t *m_p_gfxram; uint8_t m_model4; uint8_t m_mode; diff --git a/src/mame/includes/truco.h b/src/mame/includes/truco.h index 48ae4bbf182..18a5bcc2a54 100644 --- a/src/mame/includes/truco.h +++ b/src/mame/includes/truco.h @@ -16,6 +16,9 @@ public: m_videoram(*this, "videoram"), m_battery_ram(*this, "battery_ram") { } + void truco(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<watchdog_timer_device> m_watchdog; required_device<dac_bit_interface> m_dac; @@ -38,6 +41,5 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(interrupt); - void truco(machine_config &config); void main_map(address_map &map); }; diff --git a/src/mame/includes/trucocl.h b/src/mame/includes/trucocl.h index 5e6d4750bf6..a8b4ab4580d 100644 --- a/src/mame/includes/trucocl.h +++ b/src/mame/includes/trucocl.h @@ -7,11 +7,6 @@ class trucocl_state : public driver_device { public: - enum - { - TIMER_DAC_IRQ - }; - trucocl_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_videoram(*this, "videoram"), @@ -20,6 +15,16 @@ public: m_dac(*this, "dac"), m_gfxdecode(*this, "gfxdecode") { } + void trucocl(machine_config &config); + + void init_trucocl(); + +private: + enum + { + TIMER_DAC_IRQ + }; + int m_cur_dac_address; int m_cur_dac_address_index; required_shared_ptr<uint8_t> m_videoram; @@ -33,7 +38,6 @@ public: DECLARE_WRITE8_MEMBER(trucocl_videoram_w); DECLARE_WRITE8_MEMBER(trucocl_colorram_w); DECLARE_WRITE8_MEMBER(audio_dac_w); - void init_trucocl(); TILE_GET_INFO_MEMBER(get_bg_tile_info); virtual void video_start() override; DECLARE_PALETTE_INIT(trucocl); @@ -43,10 +47,9 @@ public: required_device<dac_byte_interface> m_dac; required_device<gfxdecode_device> m_gfxdecode; - void trucocl(machine_config &config); void main_map(address_map &map); void main_io(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; virtual void machine_reset() override; }; diff --git a/src/mame/includes/tryout.h b/src/mame/includes/tryout.h index aa907435ee0..27174052d02 100644 --- a/src/mame/includes/tryout.h +++ b/src/mame/includes/tryout.h @@ -19,6 +19,11 @@ public: m_spriteram2(*this, "spriteram2"), m_gfx_control(*this, "gfx_control") { } + void tryout(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; @@ -46,8 +51,6 @@ public: DECLARE_WRITE8_MEMBER(vram_bankswitch_w); DECLARE_WRITE8_MEMBER(flipscreen_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILEMAP_MAPPER_MEMBER(get_fg_memory_offset); @@ -59,7 +62,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); - void tryout(machine_config &config); + void main_cpu(address_map &map); void sound_cpu(address_map &map); }; diff --git a/src/mame/includes/tsamurai.h b/src/mame/includes/tsamurai.h index 70f44a0ff12..812663d8d55 100644 --- a/src/mame/includes/tsamurai.h +++ b/src/mame/includes/tsamurai.h @@ -21,6 +21,13 @@ public: m_bg_videoram(*this, "bg_videoram"), m_spriteram(*this, "spriteram") { } + void tsamurai(machine_config &config); + void m660(machine_config &config); + void vsgongf(machine_config &config); + + void init_the26thz(); + +private: // common DECLARE_WRITE_LINE_MEMBER(nmi_enable_w); DECLARE_WRITE_LINE_MEMBER(coin1_counter_w); @@ -65,7 +72,6 @@ public: DECLARE_VIDEO_START(m660); DECLARE_VIDEO_START(tsamurai); DECLARE_VIDEO_START(vsgongf); - void init_the26thz(); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_vsgongf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -73,9 +79,6 @@ public: DECLARE_WRITE_LINE_MEMBER(vblank_irq); INTERRUPT_GEN_MEMBER(vsgongf_sound_interrupt); - void tsamurai(machine_config &config); - void m660(machine_config &config); - void vsgongf(machine_config &config); void m660_map(address_map &map); void main_map(address_map &map); void sound1_m660_map(address_map &map); @@ -89,11 +92,10 @@ public: void vsgongf_map(address_map &map); void z80_io_map(address_map &map); void z80_m660_io_map(address_map &map); -protected: + virtual void machine_start() override; virtual void video_start() override; -private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; optional_device<cpu_device> m_audio2; diff --git a/src/mame/includes/tsispch.h b/src/mame/includes/tsispch.h index 3789b64de03..a5b14f86691 100644 --- a/src/mame/includes/tsispch.h +++ b/src/mame/includes/tsispch.h @@ -29,25 +29,28 @@ public: { } + void prose2k(machine_config &config); + + void init_prose2k(); + +private: DECLARE_READ8_MEMBER(dsw_r); DECLARE_WRITE8_MEMBER(peripheral_w); DECLARE_READ16_MEMBER(dsp_data_r); DECLARE_WRITE16_MEMBER(dsp_data_w); DECLARE_READ16_MEMBER(dsp_status_r); DECLARE_WRITE16_MEMBER(dsp_status_w); - void init_prose2k(); DECLARE_WRITE_LINE_MEMBER(i8251_rxrdy_int); DECLARE_WRITE_LINE_MEMBER(i8251_txempty_int); DECLARE_WRITE_LINE_MEMBER(i8251_txrdy_int); DECLARE_WRITE_LINE_MEMBER(dsp_to_8086_p0_w); DECLARE_WRITE_LINE_MEMBER(dsp_to_8086_p1_w); - void prose2k(machine_config &config); void dsp_data_map(address_map &map); void dsp_prg_map(address_map &map); void i8086_io(address_map &map); void i8086_mem(address_map &map); -protected: + virtual void machine_reset() override; required_device<cpu_device> m_maincpu; diff --git a/src/mame/includes/tubep.h b/src/mame/includes/tubep.h index d42bcc1e9fc..e96866ee2e4 100644 --- a/src/mame/includes/tubep.h +++ b/src/mame/includes/tubep.h @@ -7,13 +7,6 @@ class tubep_state : public driver_device { public: - enum - { - TIMER_TUBEP_SCANLINE, - TIMER_RJAMMER_SCANLINE, - TIMER_SPRITE - }; - tubep_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_textram(*this, "textram"), @@ -27,6 +20,18 @@ public: m_msm(*this, "msm"), m_screen(*this, "screen") { } + void tubepb(machine_config &config); + void tubep(machine_config &config); + void rjammer(machine_config &config); + +private: + enum + { + TIMER_TUBEP_SCANLINE, + TIMER_RJAMMER_SCANLINE, + TIMER_SPRITE + }; + uint8_t m_sound_latch; uint8_t m_ls74; uint8_t m_ls377; @@ -110,10 +115,6 @@ public: optional_device<msm5205_device> m_msm; required_device<screen_device> m_screen; - - void tubepb(machine_config &config); - void tubep(machine_config &config); - void rjammer(machine_config &config); void nsc_map(address_map &map); void rjammer_main_map(address_map &map); void rjammer_main_portmap(address_map &map); @@ -126,7 +127,7 @@ public: void tubep_second_map(address_map &map); void tubep_second_portmap(address_map &map); void tubep_sound_map(address_map &map); - void tubep_sound_portmap(address_map &map); -protected: + void tubep_sound_portmap(address_map &map); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/tumbleb.h b/src/mame/includes/tumbleb.h index 0e97631c75a..29a683e5b1b 100644 --- a/src/mame/includes/tumbleb.h +++ b/src/mame/includes/tumbleb.h @@ -25,6 +25,36 @@ public: m_soundlatch(*this, "soundlatch") { } + void tumblepb(machine_config &config); + void bcstory(machine_config &config); + void pangpang(machine_config &config); + void semibase(machine_config &config); + void tumbleb2(machine_config &config); + void cookbib(machine_config &config); + void metlsavr(machine_config &config); + void fncywld(machine_config &config); + void suprtrio(machine_config &config); + void htchctch(machine_config &config); + void sdfight(machine_config &config); + void chokchok(machine_config &config); + void cookbib_mcu(machine_config &config); + void jumpkids(machine_config &config); + + void init_dquizgo(); + void init_jumpkids(); + void init_htchctch(); + void init_wlstar(); + void init_suprtrio(); + void init_tumblepb(); + void init_tumblepba(); + void init_bcstory(); + void init_wondl96(); + void init_tumbleb2(); + void init_chokchok(); + void init_fncywld(); + void init_carket(); + +private: /* memory pointers */ optional_shared_ptr<uint16_t> m_mainram; required_shared_ptr<uint16_t> m_spriteram; @@ -80,19 +110,7 @@ public: DECLARE_WRITE16_MEMBER(pangpang_pf1_data_w); DECLARE_WRITE16_MEMBER(pangpang_pf2_data_w); DECLARE_WRITE16_MEMBER(tumbleb2_soundmcu_w); - void init_dquizgo(); - void init_jumpkids(); - void init_htchctch(); - void init_wlstar(); - void init_suprtrio(); - void init_tumblepb(); - void init_tumblepba(); - void init_bcstory(); - void init_wondl96(); - void init_tumbleb2(); - void init_chokchok(); - void init_fncywld(); - void init_carket(); + TILEMAP_MAPPER_MEMBER(tumblep_scan); TILE_GET_INFO_MEMBER(get_bg1_tile_info); TILE_GET_INFO_MEMBER(get_bg2_tile_info); @@ -135,20 +153,7 @@ public: void tumblepb_gfx_rearrange(int rgn); void suprtrio_decrypt_code(); void suprtrio_decrypt_gfx(); - void tumblepb(machine_config &config); - void bcstory(machine_config &config); - void pangpang(machine_config &config); - void semibase(machine_config &config); - void tumbleb2(machine_config &config); - void cookbib(machine_config &config); - void metlsavr(machine_config &config); - void fncywld(machine_config &config); - void suprtrio(machine_config &config); - void htchctch(machine_config &config); - void sdfight(machine_config &config); - void chokchok(machine_config &config); - void cookbib_mcu(machine_config &config); - void jumpkids(machine_config &config); + void fncywld_main_map(address_map &map); void htchctch_main_map(address_map &map); void jumpkids_main_map(address_map &map); diff --git a/src/mame/includes/tunhunt.h b/src/mame/includes/tunhunt.h index d710da265fb..06a178fb293 100644 --- a/src/mame/includes/tunhunt.h +++ b/src/mame/includes/tunhunt.h @@ -26,7 +26,7 @@ public: void tunhunt(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER(control_w); DECLARE_READ8_MEMBER(button_r); DECLARE_WRITE8_MEMBER(videoram_w); @@ -50,7 +50,6 @@ protected: int hposition,int vstart,int vstop,int vstretch,int hstretch); void main_map(address_map &map); -private: required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<screen_device> m_screen; diff --git a/src/mame/includes/turbo.h b/src/mame/includes/turbo.h index 91986395736..04ea44546a5 100644 --- a/src/mame/includes/turbo.h +++ b/src/mame/includes/turbo.h @@ -45,6 +45,18 @@ public: , m_lamp(*this, "lamp") { } + void turbo(machine_config &config); + void buckrog(machine_config &config); + void buckroge(machine_config &config); + void buckrogu(machine_config &config); + void subroc3d(machine_config &config); + void turbo_samples(machine_config &config); + void subroc3d_samples(machine_config &config); + void buckrog_samples(machine_config &config); + + void init_turbo_enc(); + void init_turbo_noenc(); + private: /* device/memory pointers */ required_device<z80_device> m_maincpu; @@ -132,7 +144,6 @@ private: uint32_t step[8]; /* stepping value */ }; -public: DECLARE_WRITE8_MEMBER(scanlines_w); DECLARE_WRITE8_MEMBER(digit_w); DECLARE_READ8_MEMBER(turbo_collision_r); @@ -164,8 +175,7 @@ public: DECLARE_WRITE8_MEMBER(buckrog_i8255_0_w); DECLARE_READ8_MEMBER(spriteram_r); DECLARE_WRITE8_MEMBER(spriteram_w); - void init_turbo_enc(); - void init_turbo_noenc(); + TILE_GET_INFO_MEMBER(get_fg_tile_info); DECLARE_VIDEO_START(turbo); DECLARE_PALETTE_INIT(turbo); @@ -196,14 +206,7 @@ public: void turbo_update_samples(); inline void subroc3d_update_volume(int leftchan, uint8_t dis, uint8_t dir); void buckrog_update_samples(); - void turbo(machine_config &config); - void buckrog(machine_config &config); - void buckroge(machine_config &config); - void buckrogu(machine_config &config); - void subroc3d(machine_config &config); - void turbo_samples(machine_config &config); - void subroc3d_samples(machine_config &config); - void buckrog_samples(machine_config &config); + void buckrog_cpu2_map(address_map &map); void buckrog_cpu2_portmap(address_map &map); void buckrog_map(address_map &map); diff --git a/src/mame/includes/turrett.h b/src/mame/includes/turrett.h index 40ea062f203..f8e7cca90b7 100644 --- a/src/mame/includes/turrett.h +++ b/src/mame/includes/turrett.h @@ -25,6 +25,11 @@ public: m_bank_b(*this, "bank_b"), m_screen(*this, "screen") {} + void turrett(machine_config &config); + + INPUT_CHANGED_MEMBER(ipt_change); + +private: // constants static const uint32_t X_VISIBLE = 336; static const uint32_t Y_VISIBLE = 244; @@ -45,7 +50,6 @@ public: DECLARE_WRITE32_MEMBER(video_w); DECLARE_READ32_MEMBER(int_r); DECLARE_WRITE32_MEMBER(int_w); - INPUT_CHANGED_MEMBER(ipt_change); DECLARE_READ_LINE_MEMBER(sbrc2_r); DECLARE_READ_LINE_MEMBER(sbrc3_r); @@ -84,10 +88,9 @@ public: uint8_t m_frame; uint8_t m_adc; - void turrett(machine_config &config); void cpu_map(address_map &map); void turrett_sound_map(address_map &map); -protected: + // driver_device overrides virtual void machine_reset() override; virtual void machine_start() override; diff --git a/src/mame/includes/twin16.h b/src/mame/includes/twin16.h index 06d5b1609d3..c986ff4c48f 100644 --- a/src/mame/includes/twin16.h +++ b/src/mame/includes/twin16.h @@ -27,6 +27,17 @@ public: m_sprite_gfx_ram(*this, "sprite_gfx_ram"), m_gfxrom(*this, "gfxrom") { } + void devilw(machine_config &config); + void miaj(machine_config &config); + void twin16(machine_config &config); + + void init_twin16(); + + DECLARE_WRITE8_MEMBER(volume_callback); + DECLARE_WRITE_LINE_MEMBER(screen_vblank_twin16); + uint32_t screen_update_twin16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + +protected: required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_subcpu; required_device<cpu_device> m_audiocpu; @@ -70,29 +81,22 @@ public: DECLARE_WRITE8_MEMBER(upd_reset_w); DECLARE_WRITE8_MEMBER(upd_start_w); - void init_twin16(); - TILE_GET_INFO_MEMBER(fix_tile_info); TILE_GET_INFO_MEMBER(layer0_tile_info); TILE_GET_INFO_MEMBER(layer1_tile_info); - uint32_t screen_update_twin16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(screen_vblank_twin16); TIMER_CALLBACK_MEMBER(sprite_tick); - DECLARE_WRITE8_MEMBER(volume_callback); - void devilw(machine_config &config); - void miaj(machine_config &config); - void twin16(machine_config &config); + void main_map(address_map &map); void sound_map(address_map &map); void sub_map(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; virtual void tile_get_info(tile_data &tileinfo, uint16_t data, int color_base); -private: + int set_sprite_timer(); void spriteram_process(); void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap ); @@ -107,17 +111,19 @@ public: : twin16_state(mconfig, type, tag) {} + void fround(machine_config &config); + + void init_fround(); + +private: DECLARE_WRITE16_MEMBER(fround_CPU_register_w); DECLARE_WRITE16_MEMBER(gfx_bank_w); - void init_fround(); - void fround(machine_config &config); void fround_map(address_map &map); -protected: + virtual void video_start() override; virtual void tile_get_info(tile_data &tileinfo, uint16_t data, int color_base) override; -private: uint8_t m_gfx_bank[4]; }; @@ -128,10 +134,12 @@ public: : twin16_state(mconfig, type, tag) {} - DECLARE_WRITE8_MEMBER(nvram_bank_w); + void cuebrickj(machine_config &config); + void init_cuebrickj(); - void cuebrickj(machine_config &config); private: + DECLARE_WRITE8_MEMBER(nvram_bank_w); + uint16_t m_nvram[0x400 * 0x20 / 2]; }; diff --git a/src/mame/includes/twincobr.h b/src/mame/includes/twincobr.h index 00beac8901f..812c73b042e 100644 --- a/src/mame/includes/twincobr.h +++ b/src/mame/includes/twincobr.h @@ -27,6 +27,13 @@ public: m_palette(*this, "palette") { } + void twincobr(machine_config &config); + void fsharkbt(machine_config &config); + void fshark(machine_config &config); + + void init_twincobr(); + +protected: optional_shared_ptr<uint8_t> m_sharedram; optional_device<buffered_spriteram8_device> m_spriteram8; optional_device<buffered_spriteram16_device> m_spriteram16; @@ -102,7 +109,6 @@ public: DECLARE_WRITE8_MEMBER(wardner_videoram_w); DECLARE_READ8_MEMBER(wardner_sprite_r); DECLARE_WRITE8_MEMBER(wardner_sprite_w); - void init_twincobr(); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_tx_tile_info); @@ -125,9 +131,7 @@ public: required_device<gfxdecode_device> m_gfxdecode; required_device<screen_device> m_screen; required_device<palette_device> m_palette; - void twincobr(machine_config &config); - void fsharkbt(machine_config &config); - void fshark(machine_config &config); + void DSP_io_map(address_map &map); void DSP_program_map(address_map &map); void fsharkbt_i8741_io_map(address_map &map); diff --git a/src/mame/includes/tx0.h b/src/mame/includes/tx0.h index 288f79697e3..fb45518db06 100644 --- a/src/mame/includes/tx0.h +++ b/src/mame/includes/tx0.h @@ -143,11 +143,22 @@ public: m_twr(*this, "TWR.%u", 0) { } + void tx0_64kw(machine_config &config); + void tx0_8kw(machine_config &config); + + void init_tx0(); + + required_device<tx0_device> m_maincpu; tx0_tape_reader_t m_tape_reader; tape_puncher_t m_tape_puncher; tx0_typewriter_t m_typewriter; emu_timer *m_dis_timer; magtape_t m_magtape; + + void schedule_select(); + void schedule_unselect(); + +protected: int m_old_typewriter_keys[4]; int m_old_control_keys; int m_old_tsr_keys; @@ -157,7 +168,6 @@ public: bitmap_ind16 m_typewriter_bitmap; int m_pos; int m_case_shift; - void init_tx0(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -170,7 +180,6 @@ public: TIMER_CALLBACK_MEMBER(prt_callback); TIMER_CALLBACK_MEMBER(dis_callback); void tx0_machine_stop(); - required_device<tx0_device> m_maincpu; inline void tx0_plot_pixel(bitmap_ind16 &bitmap, int x, int y, uint32_t color); void tx0_plot(int x, int y); void tx0_draw_led(bitmap_ind16 &bitmap, int x, int y, int state); @@ -188,8 +197,7 @@ public: void tape_write(uint8_t data); void begin_tape_read(int binary); void typewriter_out(uint8_t data); - void schedule_select(); - void schedule_unselect(); + void tx0_keyboard(); DECLARE_WRITE_LINE_MEMBER(tx0_io_cpy); DECLARE_WRITE_LINE_MEMBER(tx0_io_r1l); @@ -202,11 +210,9 @@ public: DECLARE_WRITE_LINE_MEMBER(tx0_io_reset_callback); void magtape_callback(); - void tx0_64kw(machine_config &config); - void tx0_8kw(machine_config &config); void tx0_64kw_map(address_map &map); void tx0_8kw_map(address_map &map); -private: + required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; required_device<crt_device> m_crt; diff --git a/src/mame/includes/tx1.h b/src/mame/includes/tx1.h index 93e122e0f27..c5fae904f6e 100644 --- a/src/mame/includes/tx1.h +++ b/src/mame/includes/tx1.h @@ -108,8 +108,8 @@ class tx1_state : public driver_device public: tx1_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_maincpu(*this, "main_cpu"), m_mathcpu(*this, "math_cpu"), + m_maincpu(*this, "main_cpu"), m_math_ram(*this, "math_ram"), m_vram(*this, "vram"), m_objram(*this, "objram"), @@ -124,8 +124,18 @@ public: m_sound(*this, "soundbrd") { } - required_device<cpu_device> m_maincpu; + void tx1(machine_config &config); + void tx1j(machine_config &config); + void buggyboy(machine_config &config); + void buggybjr(machine_config &config); + + math_t m_math; + sn74s516_t m_sn74s516; + required_device<cpu_device> m_mathcpu; + +private: + required_device<cpu_device> m_maincpu; required_shared_ptr<uint16_t> m_math_ram; required_shared_ptr<uint16_t> m_vram; required_shared_ptr<uint16_t> m_objram; @@ -143,9 +153,6 @@ public: emu_timer *m_interrupt_timer; - math_t m_math; - sn74s516_t m_sn74s516; - vregs_t m_vregs; std::unique_ptr<uint8_t[]> m_chr_bmp; std::unique_ptr<uint8_t[]> m_obj_bmp; @@ -214,10 +221,7 @@ public: DECLARE_WRITE_LINE_MEMBER(screen_vblank_tx1); DECLARE_WRITE_LINE_MEMBER(screen_vblank_buggyboy); TIMER_CALLBACK_MEMBER(interrupt_callback); - void tx1(machine_config &config); - void tx1j(machine_config &config); - void buggyboy(machine_config &config); - void buggybjr(machine_config &config); + void buggybjr_main(address_map &map); void buggyboy_main(address_map &map); void buggyboy_math(address_map &map); diff --git a/src/mame/includes/ultraman.h b/src/mame/includes/ultraman.h index d17e673d037..62b093f8986 100644 --- a/src/mame/includes/ultraman.h +++ b/src/mame/includes/ultraman.h @@ -26,6 +26,9 @@ public: { } + void ultraman(machine_config &config); + +private: int m_bank[3]; /* devices */ @@ -45,7 +48,6 @@ public: K051316_CB_MEMBER(zoom_callback_2); K051316_CB_MEMBER(zoom_callback_3); K051960_CB_MEMBER(sprite_callback); - void ultraman(machine_config &config); void main_map(address_map &map); void sound_io_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/ultratnk.h b/src/mame/includes/ultratnk.h index 83015b92cd6..b335130e89b 100644 --- a/src/mame/includes/ultratnk.h +++ b/src/mame/includes/ultratnk.h @@ -18,11 +18,6 @@ class ultratnk_state : public driver_device { public: - enum - { - TIMER_NMI - }; - ultratnk_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -39,6 +34,11 @@ public: void ultratnk(machine_config &config); protected: + enum + { + TIMER_NMI + }; + DECLARE_READ8_MEMBER(wram_r); DECLARE_READ8_MEMBER(analog_r); DECLARE_READ8_MEMBER(coin_r); diff --git a/src/mame/includes/undrfire.h b/src/mame/includes/undrfire.h index 0709fc4e701..3ba716a0a30 100644 --- a/src/mame/includes/undrfire.h +++ b/src/mame/includes/undrfire.h @@ -19,11 +19,6 @@ struct uf_tempsprite class undrfire_state : public driver_device { public: - enum - { - TIMER_INTERRUPT5 - }; - undrfire_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -47,6 +42,11 @@ protected: virtual void video_start() override; private: + enum + { + TIMER_INTERRUPT5 + }; + required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_subcpu; required_device<tc0100scn_device> m_tc0100scn; diff --git a/src/mame/includes/ut88.h b/src/mame/includes/ut88.h index 776b6553ff7..dc62d3c18b8 100644 --- a/src/mame/includes/ut88.h +++ b/src/mame/includes/ut88.h @@ -20,12 +20,6 @@ class ut88_state : public driver_device { public: - enum - { - TIMER_RESET, - TIMER_UPDATE_DISPLAY - }; - ut88_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_cassette(*this, "cassette") @@ -50,6 +44,19 @@ public: , m_digits(*this, "digit%u", 0U) { } + void ut88(machine_config &config); + void ut88mini(machine_config &config); + + void init_ut88(); + void init_ut88mini(); + +private: + enum + { + TIMER_RESET, + TIMER_UPDATE_DISPLAY + }; + DECLARE_READ8_MEMBER(ut88_keyboard_r); DECLARE_WRITE8_MEMBER(ut88_keyboard_w); DECLARE_WRITE8_MEMBER(ut88_sound_w); @@ -59,21 +66,17 @@ public: DECLARE_READ8_MEMBER(ut88_8255_portb_r); DECLARE_READ8_MEMBER(ut88_8255_portc_r); DECLARE_WRITE8_MEMBER(ut88_8255_porta_w); - void init_ut88(); - void init_ut88mini(); DECLARE_MACHINE_RESET(ut88); DECLARE_VIDEO_START(ut88); DECLARE_MACHINE_START(ut88mini); DECLARE_MACHINE_RESET(ut88mini); uint32_t screen_update_ut88(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void ut88(machine_config &config); - void ut88mini(machine_config &config); void ut88_io(address_map &map); void ut88_mem(address_map &map); void ut88mini_io(address_map &map); void ut88mini_mem(address_map &map); -private: + required_device<cassette_image_device> m_cassette; optional_device<i8255_device> m_ppi; optional_device<dac_bit_interface> m_dac; diff --git a/src/mame/includes/v1050.h b/src/mame/includes/v1050.h index f16e593febc..f8f61f59ff0 100644 --- a/src/mame/includes/v1050.h +++ b/src/mame/includes/v1050.h @@ -100,6 +100,10 @@ public: { } + void v1050(machine_config &config); + void v1050_video(machine_config &config); + +private: DECLARE_READ8_MEMBER( kb_data_r ); DECLARE_READ8_MEMBER( kb_status_r ); DECLARE_WRITE8_MEMBER( v1050_i8214_w ); @@ -153,18 +157,15 @@ public: MC6845_UPDATE_ROW(crtc_update_row); - void v1050(machine_config &config); - void v1050_video(machine_config &config); void v1050_crt_mem(address_map &map); void v1050_io(address_map &map); void v1050_mem(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -private: void bankswitch(); void update_fdc(); void set_interrupt(int line, int state); diff --git a/src/mame/includes/vaportra.h b/src/mame/includes/vaportra.h index d04725d314d..d64154bf24b 100644 --- a/src/mame/includes/vaportra.h +++ b/src/mame/includes/vaportra.h @@ -33,6 +33,11 @@ public: , m_paletteram_ext(*this, "palette_ext") { } + void vaportra(machine_config &config); + + void init_vaportra(); + +private: /* devices */ required_device<cpu_device> m_maincpu; required_device<h6280_device> m_audiocpu; @@ -54,7 +59,6 @@ public: DECLARE_WRITE16_MEMBER(palette_w); DECLARE_WRITE16_MEMBER(palette_ext_w); - void init_vaportra(); virtual void machine_start() override; virtual void machine_reset() override; @@ -62,7 +66,7 @@ public: void update_palette( int offset ); DECO16IC_BANK_CB_MEMBER(bank_callback); - void vaportra(machine_config &config); + void main_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/vastar.h b/src/mame/includes/vastar.h index 8b552b7ffa4..9d5b423052c 100644 --- a/src/mame/includes/vastar.h +++ b/src/mame/includes/vastar.h @@ -18,6 +18,9 @@ public: m_sprite_priority(*this, "sprite_priority"), m_sharedram(*this, "sharedram") { } + void vastar(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_subcpu; required_device<gfxdecode_device> m_gfxdecode; @@ -59,7 +62,7 @@ public: void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); INTERRUPT_GEN_MEMBER(vblank_irq); - void vastar(machine_config &config); + void cpu2_map(address_map &map); void cpu2_port_map(address_map &map); void main_map(address_map &map); diff --git a/src/mame/includes/vball.h b/src/mame/includes/vball.h index 2b3e457245e..4d576b8670d 100644 --- a/src/mame/includes/vball.h +++ b/src/mame/includes/vball.h @@ -22,6 +22,9 @@ public: m_scrolly_lo(*this, "scrolly_lo"), m_spriteram(*this, "spriteram") { } + void vball(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; @@ -62,7 +65,7 @@ public: void spprombank_w(int bank); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); inline int scanline_to_vcount(int scanline); - void vball(machine_config &config); + void main_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/vc4000.h b/src/mame/includes/vc4000.h index d472052f55c..85a6a8e8224 100644 --- a/src/mame/includes/vc4000.h +++ b/src/mame/includes/vc4000.h @@ -104,6 +104,15 @@ public: #endif { } + void cx3000tc(machine_config &config); + void mpu1000(machine_config &config); + void vc4000(machine_config &config); + void database(machine_config &config); + void h21(machine_config &config); + void rwtrntcs(machine_config &config); + void elektor(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(vc4000_sound_ctl); DECLARE_READ8_MEMBER(vc4000_key_r); DECLARE_READ8_MEMBER(vc4000_video_r); @@ -128,16 +137,9 @@ public: INTERRUPT_GEN_MEMBER(vc4000_video_line); DECLARE_QUICKLOAD_LOAD_MEMBER(vc4000); - void cx3000tc(machine_config &config); - void mpu1000(machine_config &config); - void vc4000(machine_config &config); - void database(machine_config &config); - void h21(machine_config &config); - void rwtrntcs(machine_config &config); - void elektor(machine_config &config); void elektor_mem(address_map &map); void vc4000_mem(address_map &map); -protected: + required_device<cpu_device> m_maincpu; required_device<screen_device> m_screen; optional_device<cassette_image_device> m_cassette; diff --git a/src/mame/includes/vcs80.h b/src/mame/includes/vcs80.h index 904e5829997..c63790e6add 100644 --- a/src/mame/includes/vcs80.h +++ b/src/mame/includes/vcs80.h @@ -31,6 +31,9 @@ public: , m_digits(*this, "digit%u", 0U) { } + void vcs80(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<z80pio_device> m_pio; required_ioport m_y0; @@ -82,7 +85,7 @@ public: int m_keyclk; void init_vcs80(); TIMER_DEVICE_CALLBACK_MEMBER(vcs80_keyboard_tick); - void vcs80(machine_config &config); + void vcs80_bd_mem(address_map &map); void vcs80_io(address_map &map); void vcs80_mem(address_map &map); diff --git a/src/mame/includes/vector06.h b/src/mame/includes/vector06.h index 6023fcd06fd..2e0edd213c3 100644 --- a/src/mame/includes/vector06.h +++ b/src/mame/includes/vector06.h @@ -55,6 +55,9 @@ public: m_reset(*this, "RESET") { } + void vector06(machine_config &config); + +private: DECLARE_FLOPPY_FORMATS(floppy_formats); DECLARE_READ8_MEMBER(vector06_8255_portb_r); @@ -80,10 +83,9 @@ public: TIMER_CALLBACK_MEMBER(reset_check_callback); IRQ_CALLBACK_MEMBER(vector06_irq_callback); - void vector06(machine_config &config); void vector06_io(address_map &map); void vector06_mem(address_map &map); -private: + required_device<cpu_device> m_maincpu; required_device<speaker_sound_device> m_speaker; required_device<cassette_image_device> m_cassette; diff --git a/src/mame/includes/vendetta.h b/src/mame/includes/vendetta.h index a232d005ad4..a0a9957e498 100644 --- a/src/mame/includes/vendetta.h +++ b/src/mame/includes/vendetta.h @@ -17,11 +17,6 @@ class vendetta_state : public driver_device { public: - enum - { - TIMER_Z80_NMI - }; - vendetta_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -35,6 +30,14 @@ public: m_videobank0(*this, "videobank0"), m_videobank1(*this, "videobank1") { } + void esckids(machine_config &config); + void vendetta(machine_config &config); + +private: + enum + { + TIMER_Z80_NMI + }; /* video-related */ int m_layer_colorbase[3]; @@ -77,13 +80,11 @@ public: DECLARE_WRITE8_MEMBER(banking_callback); K053246_CB_MEMBER(sprite_callback); - void esckids(machine_config &config); - void vendetta(machine_config &config); void esckids_map(address_map &map); void main_map(address_map &map); void sound_map(address_map &map); void videobank0_map(address_map &map); void videobank1_map(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/vertigo.h b/src/mame/includes/vertigo.h index f515234bb5f..a3ce392725b 100644 --- a/src/mame/includes/vertigo.h +++ b/src/mame/includes/vertigo.h @@ -39,7 +39,7 @@ public: void vertigo(machine_config &config); -protected: +private: DECLARE_WRITE_LINE_MEMBER(adc_eoc_w); DECLARE_READ16_MEMBER(vertigo_io_convert); DECLARE_READ16_MEMBER(vertigo_coin_r); @@ -60,7 +60,6 @@ protected: void vertigo_motor(address_map &map); void exidy440_audio_map(address_map &map); -private: struct am2901 { uint32_t ram[16]; /* internal ram */ diff --git a/src/mame/includes/vicdual.h b/src/mame/includes/vicdual.h index 34274a0306b..81abc7fee7a 100644 --- a/src/mame/includes/vicdual.h +++ b/src/mame/includes/vicdual.h @@ -39,6 +39,51 @@ public: m_fake_lives(*this, "FAKE_LIVES.%u", 0) { } + void vicdual_root(machine_config &config); + void vicdual_dualgame_root(machine_config &config); + void heiankyo(machine_config &config); + void headon(machine_config &config); + void headon_audio(machine_config &config); + void sspacaho(machine_config &config); + void headonn(machine_config &config); + void invho2(machine_config &config); + void frogs(machine_config &config); + void frogs_audio(machine_config &config); + void headons(machine_config &config); + void invinco(machine_config &config); + void invinco_audio(machine_config &config); + void invds(machine_config &config); + void headon2(machine_config &config); + void carnival(machine_config &config); + void carnival_audio(machine_config &config); + void pulsar(machine_config &config); + void pulsar_audio(machine_config &config); + void spacetrk(machine_config &config); + void headon2bw(machine_config &config); + void safari(machine_config &config); + void brdrline(machine_config &config); + void brdrline_audio(machine_config &config); + void carnivalh(machine_config &config); + void samurai(machine_config &config); + void sspaceat(machine_config &config); + void digger(machine_config &config); + void depthch(machine_config &config); + void depthch_audio(machine_config &config); + void carhntds(machine_config &config); + void alphaho(machine_config &config); + void tranqgun(machine_config &config); + void tranqgun_audio(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(read_coin_status); + DECLARE_CUSTOM_INPUT_MEMBER(get_64v); + DECLARE_CUSTOM_INPUT_MEMBER(get_vblank_comp); + DECLARE_CUSTOM_INPUT_MEMBER(get_composite_blank_comp); + DECLARE_CUSTOM_INPUT_MEMBER(get_timer_value); + DECLARE_CUSTOM_INPUT_MEMBER(fake_lives_r); + DECLARE_CUSTOM_INPUT_MEMBER(samurai_protection_r); + DECLARE_INPUT_CHANGED_MEMBER(coin_changed); + +protected: required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_audiocpu; optional_device<ay8910_device> m_psg; @@ -136,15 +181,6 @@ public: /*----------- defined in audio/tranqgun.c -----------*/ DECLARE_WRITE8_MEMBER( tranqgun_audio_w ); - DECLARE_CUSTOM_INPUT_MEMBER(read_coin_status); - DECLARE_CUSTOM_INPUT_MEMBER(get_64v); - DECLARE_CUSTOM_INPUT_MEMBER(get_vblank_comp); - DECLARE_CUSTOM_INPUT_MEMBER(get_composite_blank_comp); - DECLARE_CUSTOM_INPUT_MEMBER(get_timer_value); - DECLARE_CUSTOM_INPUT_MEMBER(fake_lives_r); - DECLARE_CUSTOM_INPUT_MEMBER(samurai_protection_r); - DECLARE_INPUT_CHANGED_MEMBER(coin_changed); - TIMER_DEVICE_CALLBACK_MEMBER(clear_coin_status); DECLARE_MACHINE_START(samurai); @@ -158,40 +194,7 @@ public: int get_vcounter(); int is_cabinet_color(); virtual pen_t choose_pen(uint8_t x, uint8_t y, pen_t back_pen); - void vicdual_root(machine_config &config); - void vicdual_dualgame_root(machine_config &config); - void heiankyo(machine_config &config); - void headon(machine_config &config); - void headon_audio(machine_config &config); - void sspacaho(machine_config &config); - void headonn(machine_config &config); - void invho2(machine_config &config); - void frogs(machine_config &config); - void frogs_audio(machine_config &config); - void headons(machine_config &config); - void invinco(machine_config &config); - void invinco_audio(machine_config &config); - void invds(machine_config &config); - void headon2(machine_config &config); - void carnival(machine_config &config); - void carnival_audio(machine_config &config); - void pulsar(machine_config &config); - void pulsar_audio(machine_config &config); - void spacetrk(machine_config &config); - void headon2bw(machine_config &config); - void safari(machine_config &config); - void brdrline(machine_config &config); - void brdrline_audio(machine_config &config); - void carnivalh(machine_config &config); - void samurai(machine_config &config); - void sspaceat(machine_config &config); - void digger(machine_config &config); - void depthch(machine_config &config); - void depthch_audio(machine_config &config); - void carhntds(machine_config &config); - void alphaho(machine_config &config); - void tranqgun(machine_config &config); - void tranqgun_audio(machine_config &config); + void alphaho_io_map(address_map &map); void brdrline_io_map(address_map &map); void carhntds_dualgame_map(address_map &map); @@ -234,6 +237,11 @@ public: m_s97271p(*this,"s97271p") { } + void nsub(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(nsub_coin_in); + +private: required_device<s97269pb_device> m_s97269pb; required_device<s97271p_device> m_s97271p; @@ -243,15 +251,12 @@ public: DECLARE_READ8_MEMBER(nsub_io_r); DECLARE_WRITE8_MEMBER(nsub_io_w); - DECLARE_INPUT_CHANGED_MEMBER(nsub_coin_in); - TIMER_DEVICE_CALLBACK_MEMBER(nsub_coin_pulse); DECLARE_MACHINE_START(nsub); DECLARE_MACHINE_RESET(nsub); virtual pen_t choose_pen(uint8_t x, uint8_t y, pen_t back_pen) override; - void nsub(machine_config &config); void nsub_io_map(address_map &map); void nsub_map(address_map &map); }; diff --git a/src/mame/includes/victory.h b/src/mame/includes/victory.h index 33a6969ccf2..95c177baec3 100644 --- a/src/mame/includes/victory.h +++ b/src/mame/includes/victory.h @@ -40,7 +40,7 @@ public: void victory(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER(lamp_control_w); DECLARE_WRITE8_MEMBER(paletteram_w); DECLARE_READ8_MEMBER(video_control_r); @@ -67,7 +67,6 @@ protected: void main_io_map(address_map &map); void main_map(address_map &map); -private: /* microcode state */ struct micro_t { diff --git a/src/mame/includes/vidbrain.h b/src/mame/includes/vidbrain.h index 00412898c7b..365ad196947 100644 --- a/src/mame/includes/vidbrain.h +++ b/src/mame/includes/vidbrain.h @@ -41,6 +41,12 @@ public: m_joy4_y(*this, "JOY4-Y") { } + void vidbrain(machine_config &config); + void vidbrain_video(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); + +private: required_device<cpu_device> m_maincpu; required_device<f3853_device> m_smi; required_device<uv201_device> m_uv; @@ -71,7 +77,7 @@ public: DECLARE_READ8_MEMBER( keyboard_r ); DECLARE_WRITE8_MEMBER( sound_w ); DECLARE_WRITE8_MEMBER( f3853_w ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); + DECLARE_WRITE_LINE_MEMBER( ext_int_w ); DECLARE_WRITE_LINE_MEMBER( hblank_w ); DECLARE_READ8_MEMBER(memory_read_byte); @@ -97,8 +103,6 @@ public: // timers emu_timer *m_timer_ne555; - void vidbrain(machine_config &config); - void vidbrain_video(machine_config &config); void vidbrain_io(address_map &map); void vidbrain_mem(address_map &map); }; diff --git a/src/mame/includes/videopin.h b/src/mame/includes/videopin.h index 6c491b129c9..c03f1c25450 100644 --- a/src/mame/includes/videopin.h +++ b/src/mame/includes/videopin.h @@ -26,11 +26,6 @@ class videopin_state : public driver_device { public: - enum - { - TIMER_INTERRUPT - }; - videopin_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -44,7 +39,12 @@ public: void videopin(machine_config &config); -protected: +private: + enum + { + TIMER_INTERRUPT + }; + DECLARE_READ8_MEMBER(misc_r); DECLARE_WRITE8_MEMBER(led_w); DECLARE_WRITE8_MEMBER(ball_w); @@ -68,7 +68,6 @@ protected: void update_plunger(); double calc_plunger_pos(); -private: required_device<cpu_device> m_maincpu; required_device<discrete_device> m_discrete; required_device<gfxdecode_device> m_gfxdecode; diff --git a/src/mame/includes/vigilant.h b/src/mame/includes/vigilant.h index c6a0c4dc224..2745a799002 100644 --- a/src/mame/includes/vigilant.h +++ b/src/mame/includes/vigilant.h @@ -16,6 +16,11 @@ public: m_spriteram(*this, "spriteram"), m_videoram(*this, "videoram") { } + void vigilant(machine_config &config); + void kikcubic(machine_config &config); + void buccanrs(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<m72_audio_device> m_audio; required_device<gfxdecode_device> m_gfxdecode; @@ -58,9 +63,7 @@ public: void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); void vigilant_postload(); - void vigilant(machine_config &config); - void kikcubic(machine_config &config); - void buccanrs(machine_config &config); + void buccanrs_sound_io_map(address_map &map); void kikcubic_io_map(address_map &map); void kikcubic_map(address_map &map); diff --git a/src/mame/includes/vindictr.h b/src/mame/includes/vindictr.h index ef8508f91d6..8106c23e741 100644 --- a/src/mame/includes/vindictr.h +++ b/src/mame/includes/vindictr.h @@ -25,10 +25,11 @@ public: m_jsa(*this, "jsa") { } - void init_vindictr(); void vindictr(machine_config &config); -protected: + void init_vindictr(); + +private: virtual void machine_reset() override; virtual void video_start() override; virtual void update_interrupts() override; @@ -42,7 +43,6 @@ protected: static const atari_motion_objects_config s_mob_config; void main_map(address_map &map); -private: required_device<tilemap_device> m_playfield_tilemap; required_device<tilemap_device> m_alpha_tilemap; required_device<atari_motion_objects_device> m_mob; diff --git a/src/mame/includes/vip.h b/src/mame/includes/vip.h index b0ab562ef3f..6dd295a0ed3 100644 --- a/src/mame/includes/vip.h +++ b/src/mame/includes/vip.h @@ -53,6 +53,13 @@ public: , m_leds(*this, "led%u", 0U) { } + void vp111(machine_config &config); + void vip(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER( reset_w ); + DECLARE_INPUT_CHANGED_MEMBER( beeper_w ); + +private: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void update_interrupts(); @@ -82,16 +89,11 @@ public: DECLARE_WRITE_LINE_MEMBER( exp_dma_out_w ); DECLARE_WRITE_LINE_MEMBER( exp_dma_in_w ); - DECLARE_INPUT_CHANGED_MEMBER( reset_w ); - DECLARE_INPUT_CHANGED_MEMBER( beeper_w ); - DECLARE_QUICKLOAD_LOAD_MEMBER( vip ); - void vp111(machine_config &config); - void vip(machine_config &config); + void vip_io(address_map &map); void vip_mem(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/vixen.h b/src/mame/includes/vixen.h index d762d80f6af..1b2791cfdd8 100644 --- a/src/mame/includes/vixen.h +++ b/src/mame/includes/vixen.h @@ -55,6 +55,11 @@ public: , m_txrdy(0) { } + void vixen(machine_config &config); + + void init_vixen(); + +private: DECLARE_READ8_MEMBER( status_r ); DECLARE_WRITE8_MEMBER( cmd_w ); DECLARE_READ8_MEMBER( ieee488_r ); @@ -70,18 +75,16 @@ public: DECLARE_WRITE_LINE_MEMBER( rxrdy_w ); DECLARE_WRITE_LINE_MEMBER( txrdy_w ); DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); - void init_vixen(); TIMER_DEVICE_CALLBACK_MEMBER(vsync_tick); IRQ_CALLBACK_MEMBER(vixen_int_ack); DECLARE_READ8_MEMBER(opram_r); DECLARE_READ8_MEMBER(oprom_r); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void vixen(machine_config &config); void bios_mem(address_map &map); void vixen_io(address_map &map); void vixen_mem(address_map &map); -private: + required_device<cpu_device> m_maincpu; required_device<fd1797_device> m_fdc; required_device<i8155_device> m_io_i8155; diff --git a/src/mame/includes/volfied.h b/src/mame/includes/volfied.h index b1280af475f..e1a057391c9 100644 --- a/src/mame/includes/volfied.h +++ b/src/mame/includes/volfied.h @@ -18,11 +18,6 @@ class volfied_state : public driver_device { public: - enum - { - TIMER_VOLFIED - }; - volfied_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -33,6 +28,13 @@ public: m_cchip_irq_clear(*this, "cchip_irq_clear") { } + void volfied(machine_config &config); + +private: + enum + { + TIMER_VOLFIED + }; DECLARE_READ16_MEMBER(video_ram_r); DECLARE_WRITE16_MEMBER(video_ram_w); DECLARE_WRITE16_MEMBER(video_ctrl_w); @@ -49,11 +51,9 @@ public: void refresh_pixel_layer( bitmap_ind16 &bitmap ); - void volfied(machine_config &config); void main_map(address_map &map); void z80_map(address_map &map); -private: /* memory pointers */ std::unique_ptr<uint16_t[]> m_video_ram; diff --git a/src/mame/includes/vp415.h b/src/mame/includes/vp415.h index fbc00b7f89e..cf307a42092 100644 --- a/src/mame/includes/vp415.h +++ b/src/mame/includes/vp415.h @@ -76,7 +76,7 @@ public: static const char *const SWITCHES_TAG; -protected: +private: void machine_reset() override; void machine_start() override; void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; diff --git a/src/mame/includes/vsnes.h b/src/mame/includes/vsnes.h index c5c47a1ad98..2cd01899f14 100644 --- a/src/mame/includes/vsnes.h +++ b/src/mame/includes/vsnes.h @@ -17,6 +17,31 @@ public: { } + void vsdual(machine_config &config); + void vsgshoe(machine_config &config); + void vsnes(machine_config &config); + void vsdual_pi(machine_config &config); + void topgun(machine_config &config); + void mightybj(machine_config &config); + void vsnes_bootleg(machine_config &config); + void jajamaru(machine_config &config); + + void init_vskonami(); + void init_vsvram(); + void init_bnglngby(); + void init_drmario(); + void init_MMC3(); + void init_vsfdf(); + void init_tkoboxng(); + void init_vsgun(); + void init_supxevs(); + void init_vsgshoe(); + void init_vsnormal(); + void init_platoon(); + void init_rbibb(); + void init_vsdual(); + +private: required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_subcpu; required_device<ppu2c0x_device> m_ppu1; @@ -63,20 +88,6 @@ public: DECLARE_WRITE8_MEMBER(vsdual_vrom_banking_sub); void v_set_mirroring(int ppu, int mirroring); - void init_vskonami(); - void init_vsvram(); - void init_bnglngby(); - void init_drmario(); - void init_MMC3(); - void init_vsfdf(); - void init_tkoboxng(); - void init_vsgun(); - void init_supxevs(); - void init_vsgshoe(); - void init_vsnormal(); - void init_platoon(); - void init_rbibb(); - void init_vsdual(); DECLARE_MACHINE_START(vsnes); DECLARE_MACHINE_RESET(vsnes); DECLARE_MACHINE_START(vsdual); @@ -91,19 +102,11 @@ public: DECLARE_READ8_MEMBER(vsnes_bootleg_z80_data_r); DECLARE_READ8_MEMBER(vsnes_bootleg_z80_address_r); - void vsdual(machine_config &config); - void vsgshoe(machine_config &config); - void vsnes(machine_config &config); - void vsdual_pi(machine_config &config); - void topgun(machine_config &config); - void mightybj(machine_config &config); - void vsnes_bootleg(machine_config &config); - void jajamaru(machine_config &config); void vsnes_bootleg_z80_map(address_map &map); void vsnes_cpu1_bootleg_map(address_map &map); void vsnes_cpu1_map(address_map &map); void vsnes_cpu2_map(address_map &map); -private: + int m_coin; int m_do_vrom_bank; int m_input_latch[4]; diff --git a/src/mame/includes/vtech2.h b/src/mame/includes/vtech2.h index 6acf6890647..218afa9f9cd 100644 --- a/src/mame/includes/vtech2.h +++ b/src/mame/includes/vtech2.h @@ -31,11 +31,12 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } - void init_laser(); void laser350(machine_config &config); void laser700(machine_config &config); void laser500(machine_config &config); + void init_laser(); + private: DECLARE_WRITE8_MEMBER(laser_bank_select_w); DECLARE_WRITE8_MEMBER(laser_fdc_w); diff --git a/src/mame/includes/vulgus.h b/src/mame/includes/vulgus.h index f3bbe707028..07049a55875 100644 --- a/src/mame/includes/vulgus.h +++ b/src/mame/includes/vulgus.h @@ -24,6 +24,9 @@ public: m_bgvideoram(*this, "bgvideoram") { } + void vulgus(machine_config &config); + +private: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; @@ -54,7 +57,7 @@ public: void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); INTERRUPT_GEN_MEMBER(vblank_irq); - void vulgus(machine_config &config); + void main_map(address_map &map); void sound_map(address_map &map); }; |