diff options
author | 2015-08-10 13:10:14 +0200 | |
---|---|---|
committer | 2015-08-10 13:10:14 +0200 | |
commit | 99353dc95ff844559e7c2fbe8570f830f28b0297 (patch) | |
tree | 3d85fe8780f7d69d6600bd52119a83c8bfa5edb1 /src/mess/includes | |
parent | 2d0ecac6acf0dc9688fd125c5cad6e156b766782 (diff) |
coleco.c: Reduce tagmap lookups and added support for 31in1 and 63in1 multicarts (nw)
Diffstat (limited to 'src/mess/includes')
-rw-r--r-- | src/mess/includes/coleco.h | 62 |
1 files changed, 51 insertions, 11 deletions
diff --git a/src/mess/includes/coleco.h b/src/mess/includes/coleco.h index 7b91445e8e1..ab6e1379663 100644 --- a/src/mess/includes/coleco.h +++ b/src/mess/includes/coleco.h @@ -20,13 +20,26 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_cart(*this, COLECOVISION_CARTRIDGE_SLOT_TAG), - m_ram(*this, "ram") + m_ram(*this, "ram"), + m_ctrlsel(*this, "CTRLSEL"), + m_std_keypad1(*this, "STD_KEYPAD1"), + m_std_joy1(*this, "STD_JOY1"), + m_std_keypad2(*this, "STD_KEYPAD2"), + m_std_joy2(*this, "STD_JOY2"), + m_sac_keypad1(*this, "SAC_KEYPAD1"), + m_sac_joy1(*this, "SAC_JOY1"), + m_sac_slide1(*this, "SAC_SLIDE1"), + m_sac_keypad2(*this, "SAC_KEYPAD2"), + m_sac_joy2(*this, "SAC_JOY2"), + m_sac_slide2(*this, "SAC_SLIDE2"), + m_driv_wheel1(*this, "DRIV_WHEEL1"), + m_driv_pedal1(*this, "DRIV_PEDAL1"), + m_driv_wheel2(*this, "DRIV_WHEEL2"), + m_driv_pedal2(*this, "DRIV_PEDAL2"), + m_roller_x(*this, "ROLLER_X"), + m_roller_y(*this, "ROLLER_Y") { } - required_device<cpu_device> m_maincpu; - required_device<colecovision_cartridge_slot_device> m_cart; - required_shared_ptr<UINT8> m_ram; - virtual void machine_start(); virtual void machine_reset(); @@ -36,6 +49,21 @@ public: DECLARE_WRITE8_MEMBER( paddle_off_w ); DECLARE_WRITE8_MEMBER( paddle_on_w ); + TIMER_CALLBACK_MEMBER(paddle_d7reset_callback); + TIMER_CALLBACK_MEMBER(paddle_irqreset_callback); + TIMER_CALLBACK_MEMBER(paddle_pulse_callback); + TIMER_DEVICE_CALLBACK_MEMBER(paddle_update_callback); + DECLARE_WRITE_LINE_MEMBER(coleco_vdp_interrupt); + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(czz50_cart); + + UINT8 coleco_paddle_read(int port, int joy_mode, UINT8 joy_status); + UINT8 coleco_scan_paddles(UINT8 *joy_status0, UINT8 *joy_status1); + +private: + required_device<cpu_device> m_maincpu; + required_device<colecovision_cartridge_slot_device> m_cart; + required_shared_ptr<UINT8> m_ram; + int m_joy_mode; int m_last_nmi_state; @@ -48,12 +76,24 @@ public: int m_joy_d7_state[2]; UINT8 m_joy_analog_state[2]; UINT8 m_joy_analog_reload[2]; - TIMER_CALLBACK_MEMBER(paddle_d7reset_callback); - TIMER_CALLBACK_MEMBER(paddle_irqreset_callback); - TIMER_CALLBACK_MEMBER(paddle_pulse_callback); - TIMER_DEVICE_CALLBACK_MEMBER(paddle_update_callback); - DECLARE_WRITE_LINE_MEMBER(coleco_vdp_interrupt); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(czz50_cart); + + optional_ioport m_ctrlsel; + required_ioport m_std_keypad1; + required_ioport m_std_joy1; + required_ioport m_std_keypad2; + required_ioport m_std_joy2; + optional_ioport m_sac_keypad1; + optional_ioport m_sac_joy1; + optional_ioport m_sac_slide1; + optional_ioport m_sac_keypad2; + optional_ioport m_sac_joy2; + optional_ioport m_sac_slide2; + optional_ioport m_driv_wheel1; + optional_ioport m_driv_pedal1; + optional_ioport m_driv_wheel2; + optional_ioport m_driv_pedal2; + optional_ioport m_roller_x; + optional_ioport m_roller_y; }; #endif |