1 // license:BSD-3-Clause 2 // copyright-holders:Curt Coder 3 /********************************************************************** 4 5 Commodore 128 COMAL 80 cartridge emulation 6 7 **********************************************************************/ 8 9 #ifndef MAME_BUS_C64_C128_COMAL80_H 10 #define MAME_BUS_C64_C128_COMAL80_H 11 12 #pragma once 13 14 15 #include "exp.h" 16 17 18 19 //************************************************************************** 20 // TYPE DEFINITIONS 21 //************************************************************************** 22 23 // ======================> c128_comal80_cartridge_device 24 25 class c128_comal80_cartridge_device : public device_t, 26 public device_c64_expansion_card_interface 27 { 28 public: 29 // construction/destruction 30 c128_comal80_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); 31 32 protected: 33 // device-level overrides 34 virtual void device_start() override; 35 virtual void device_reset() override; 36 37 // device_c64_expansion_card_interface overrides 38 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; 39 virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; 40 41 private: 42 uint8_t m_bank; 43 }; 44 45 46 // device type definition 47 DECLARE_DEVICE_TYPE(C128_COMAL80, c128_comal80_cartridge_device) 48 49 50 #endif // MAME_BUS_C64_C128_COMAL80_H 51