diff options
Diffstat (limited to 'src/mame/includes/sms.h')
-rw-r--r-- | src/mame/includes/sms.h | 190 |
1 files changed, 96 insertions, 94 deletions
diff --git a/src/mame/includes/sms.h b/src/mame/includes/sms.h index 3c635f9ddcf..381778ab431 100644 --- a/src/mame/includes/sms.h +++ b/src/mame/includes/sms.h @@ -70,6 +70,102 @@ public: m_store_cart_selection_data(0) { } + void store_post_load(); + void store_select_cart(uint8_t data); + + DECLARE_READ8_MEMBER(read_0000); + DECLARE_READ8_MEMBER(read_4000); + DECLARE_READ8_MEMBER(read_8000); + DECLARE_READ8_MEMBER(read_ram); + DECLARE_WRITE8_MEMBER(write_ram); + DECLARE_WRITE8_MEMBER(write_cart); + + DECLARE_READ8_MEMBER(sms_mapper_r); + DECLARE_WRITE8_MEMBER(sms_mapper_w); + DECLARE_WRITE8_MEMBER(sms_mem_control_w); + DECLARE_WRITE8_MEMBER(sms_io_control_w); + DECLARE_READ8_MEMBER(sms_count_r); + DECLARE_READ8_MEMBER(sms_input_port_dc_r); + DECLARE_READ8_MEMBER(sms_input_port_dd_r); + DECLARE_READ8_MEMBER(gg_input_port_00_r); + DECLARE_READ8_MEMBER(sg1000m3_peripheral_r); + DECLARE_WRITE8_MEMBER(sg1000m3_peripheral_w); + DECLARE_READ8_MEMBER(gg_sio_r); + DECLARE_WRITE8_MEMBER(gg_sio_w); + DECLARE_WRITE8_MEMBER(gg_psg_stereo_w); + DECLARE_WRITE8_MEMBER(gg_psg_w); + DECLARE_WRITE8_MEMBER(sms_psg_w); + DECLARE_READ8_MEMBER(smsj_audio_control_r); + DECLARE_WRITE8_MEMBER(smsj_audio_control_w); + DECLARE_WRITE8_MEMBER(smsj_ym2413_register_port_w); + DECLARE_WRITE8_MEMBER(smsj_ym2413_data_port_w); + 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); + DECLARE_WRITE_LINE_MEMBER(gg_ext_th_input); + DECLARE_READ32_MEMBER(sms_pixel_color); + + void init_sg1000m3(); + void init_gamegear(); + void init_gamegeaj(); + void init_sms1krfm(); + void init_sms1kr(); + void init_smskr(); + void init_smsj(); + void init_sms1(); + void init_sms(); + DECLARE_VIDEO_START(gamegear); + DECLARE_VIDEO_RESET(gamegear); + 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_gamegear(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + 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 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); + void sms_io(address_map &map); + void sms_mem(address_map &map); + 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); + void setup_bios(); + void setup_media_slots(); + void setup_enabled_slots(); + void lphaser_hcount_latch(); + void sms_get_inputs(); + void smsj_set_audio_control(uint8_t data); + // devices required_device<cpu_device> m_maincpu; required_device<sega315_5124_device> m_vdp; @@ -168,100 +264,6 @@ public: sega8_card_slot_device *m_cards[16]; uint8_t m_store_control; uint8_t m_store_cart_selection_data; - void store_post_load(); - void store_select_cart(uint8_t data); - - DECLARE_READ8_MEMBER(read_0000); - DECLARE_READ8_MEMBER(read_4000); - DECLARE_READ8_MEMBER(read_8000); - DECLARE_READ8_MEMBER(read_ram); - DECLARE_WRITE8_MEMBER(write_ram); - DECLARE_WRITE8_MEMBER(write_cart); - - DECLARE_READ8_MEMBER(sms_mapper_r); - DECLARE_WRITE8_MEMBER(sms_mapper_w); - DECLARE_WRITE8_MEMBER(sms_mem_control_w); - DECLARE_WRITE8_MEMBER(sms_io_control_w); - DECLARE_READ8_MEMBER(sms_count_r); - DECLARE_READ8_MEMBER(sms_input_port_dc_r); - DECLARE_READ8_MEMBER(sms_input_port_dd_r); - DECLARE_READ8_MEMBER(gg_input_port_00_r); - DECLARE_READ8_MEMBER(sg1000m3_peripheral_r); - DECLARE_WRITE8_MEMBER(sg1000m3_peripheral_w); - DECLARE_READ8_MEMBER(gg_sio_r); - DECLARE_WRITE8_MEMBER(gg_sio_w); - DECLARE_WRITE8_MEMBER(gg_psg_stereo_w); - DECLARE_WRITE8_MEMBER(gg_psg_w); - DECLARE_WRITE8_MEMBER(sms_psg_w); - DECLARE_READ8_MEMBER(smsj_audio_control_r); - DECLARE_WRITE8_MEMBER(smsj_audio_control_w); - DECLARE_WRITE8_MEMBER(smsj_ym2413_register_port_w); - DECLARE_WRITE8_MEMBER(smsj_ym2413_data_port_w); - 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); - DECLARE_WRITE_LINE_MEMBER(gg_ext_th_input); - DECLARE_READ32_MEMBER(sms_pixel_color); - - void init_sg1000m3(); - void init_gamegear(); - void init_gamegeaj(); - void init_sms1krfm(); - void init_sms1kr(); - void init_smskr(); - void init_smsj(); - void init_sms1(); - void init_sms(); - DECLARE_MACHINE_START(sms); - DECLARE_MACHINE_RESET(sms); - DECLARE_VIDEO_START(gamegear); - DECLARE_VIDEO_RESET(gamegear); - 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_gamegear(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - 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 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); - void sms_io(address_map &map); - void sms_mem(address_map &map); - void smsj_io(address_map &map); - void smskr_io(address_map &map); -protected: - uint8_t read_bus(address_space &space, unsigned int bank, uint16_t base_addr, uint16_t offset); - void setup_bios(); - void setup_media_slots(); - void setup_enabled_slots(); - void lphaser_hcount_latch(); - void sms_get_inputs(); - void smsj_set_audio_control(uint8_t data); }; class smssdisp_state : public sms_state |