1 // license:BSD-3-Clause 2 // copyright-holders:Curt Coder 3 /********************************************************************** 4 5 Timeworks PARTNER 64 cartridge emulation 6 7 **********************************************************************/ 8 9 #ifndef MAME_BUS_C64_PARTNER_H 10 #define MAME_BUS_C64_PARTNER_H 11 12 #pragma once 13 14 #include "exp.h" 15 16 17 18 //************************************************************************** 19 // TYPE DEFINITIONS 20 //************************************************************************** 21 22 // ======================> c64_partner_cartridge_device 23 24 class c64_partner_cartridge_device : public device_t, 25 public device_c64_expansion_card_interface 26 { 27 public: 28 // construction/destruction 29 c64_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); 30 31 // optional information overrides 32 virtual ioport_constructor device_input_ports() const override; 33 34 DECLARE_WRITE_LINE_MEMBER( nmi_w ); 35 36 protected: 37 // device-level overrides 38 virtual void device_start() override; 39 virtual void device_reset() override; 40 41 // device_c64_expansion_card_interface overrides 42 virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; 43 virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; 44 virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override; 45 46 private: 47 optional_shared_ptr<uint8_t> m_ram; 48 49 int m_a0; 50 int m_a6; 51 int m_nmi; 52 }; 53 54 55 // device type definition 56 DECLARE_DEVICE_TYPE(C64_PARTNER, c64_partner_cartridge_device) 57 58 59 #endif // MAME_BUS_C64_PARTNER_H 60