1 // license:BSD-3-Clause 2 // copyright-holders:Curt Coder 3 /********************************************************************** 4 5 COMX-35 80-Column Card emulation 6 7 **********************************************************************/ 8 9 #ifndef MAME_BUS_COMX35_CLM_H 10 #define MAME_BUS_COMX35_CLM_H 11 12 #pragma once 13 14 #include "exp.h" 15 #include "video/mc6845.h" 16 #include "emupal.h" 17 18 19 20 //************************************************************************** 21 // TYPE DEFINITIONS 22 //************************************************************************** 23 24 // ======================> comx_clm_device 25 26 class comx_clm_device : public device_t, 27 public device_comx_expansion_card_interface, 28 public device_gfx_interface 29 { 30 public: 31 // construction/destruction 32 comx_clm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); 33 34 protected: 35 // device-level overrides 36 virtual void device_start() override; 37 virtual void device_reset() override; 38 39 // optional information overrides 40 virtual const tiny_rom_entry *device_rom_region() const override; 41 virtual void device_add_mconfig(machine_config &config) override; 42 43 // device_comx_expansion_card_interface overrides 44 virtual int comx_ef4_r() override; 45 virtual uint8_t comx_mrd_r(offs_t offset, int *extrom) override; 46 virtual void comx_mwr_w(offs_t offset, uint8_t data) override; 47 48 private: 49 MC6845_UPDATE_ROW( crtc_update_row ); 50 51 required_device<mc6845_device> m_crtc; 52 required_device<palette_device> m_palette; 53 required_memory_region m_rom; 54 required_memory_region m_char_rom; 55 optional_shared_ptr<uint8_t> m_video_ram; 56 }; 57 58 59 // device type definition 60 DECLARE_DEVICE_TYPE(COMX_CLM, comx_clm_device) 61 62 63 #endif // MAME_BUS_COMX35_CLM_H 64