1 // license:BSD-3-Clause 2 // copyright-holders:Curt Coder 3 /********************************************************************** 4 5 CMD SuperCPU v2 + SuperRAM emulation 6 7 **********************************************************************/ 8 9 #ifndef MAME_BUS_C64_SUPERCPU_H 10 #define MAME_BUS_C64_SUPERCPU_H 11 12 #pragma once 13 14 #include "exp.h" 15 #include "cpu/g65816/g65816.h" 16 17 18 19 //************************************************************************** 20 // TYPE DEFINITIONS 21 //************************************************************************** 22 23 // ======================> c64_supercpu_device 24 25 class c64_supercpu_device : public device_t, 26 public device_c64_expansion_card_interface 27 { 28 public: 29 // construction/destruction 30 c64_supercpu_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 // optional information overrides 38 virtual const tiny_rom_entry *device_rom_region() const override; 39 virtual void device_add_mconfig(machine_config &config) override; 40 virtual ioport_constructor device_input_ports() const override; 41 42 // device_c64_expansion_card_interface overrides 43 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; 44 virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; 45 virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override; 46 virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) override; 47 48 private: 49 required_device<cpu_device> m_maincpu; 50 required_device<c64_expansion_slot_device> m_exp; 51 52 required_shared_ptr<uint8_t> m_sram; 53 required_shared_ptr<uint8_t> m_dimm; 54 55 void c64_supercpu_map(address_map &map); 56 }; 57 58 59 // device type definition 60 DECLARE_DEVICE_TYPE(C64_SUPERCPU, c64_supercpu_device) 61 62 63 #endif // MAME_BUS_C64_SUPERCPU_H 64