1 // license:BSD-3-Clause 2 // copyright-holders:Nathan Woods 3 /*************************************************************************** 4 5 coco3.h 6 7 TRS-80 Radio Shack Color Computer 1/2 Family 8 9 ***************************************************************************/ 10 11 #pragma once 12 13 #ifndef MAME_INCLUDES_COCO3_H 14 #define MAME_INCLUDES_COCO3_H 15 16 17 #include "includes/coco12.h" 18 #include "video/gime.h" 19 20 21 //************************************************************************** 22 // MACROS / CONSTANTS 23 //************************************************************************** 24 25 #define GIME_TAG "gime" 26 #define VDG_TAG "vdg" 27 #define COMPOSITE_SCREEN_TAG "composite" 28 #define RGB_SCREEN_TAG "rgb" 29 30 31 32 //************************************************************************** 33 // TYPE DEFINITIONS 34 //************************************************************************** 35 36 class coco3_state : public coco_state 37 { 38 public: coco3_state(const machine_config & mconfig,device_type type,const char * tag)39 coco3_state(const machine_config &mconfig, device_type type, const char *tag) 40 : coco_state(mconfig, type, tag) 41 , m_gime(*this, GIME_TAG) { } 42 43 virtual void ff20_write(offs_t offset, uint8_t data) override; 44 virtual uint8_t ff40_read(offs_t offset) override; 45 virtual void ff40_write(offs_t offset, uint8_t data) override; 46 DECLARE_WRITE_LINE_MEMBER(gime_firq_w)47 DECLARE_WRITE_LINE_MEMBER(gime_firq_w) { recalculate_firq(); } DECLARE_WRITE_LINE_MEMBER(gime_irq_w)48 DECLARE_WRITE_LINE_MEMBER(gime_irq_w) { recalculate_irq(); } 49 50 uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); 51 52 void coco3p(machine_config &config); 53 void coco3h(machine_config &config); 54 void coco3dw1(machine_config &config); 55 void coco3(machine_config &config); 56 void coco3_mem(address_map &map); 57 protected: 58 virtual void update_cart_base(uint8_t *cart_base) override; 59 60 // interrupts 61 virtual bool firq_get_line(void) override; 62 virtual bool irq_get_line(void) override; 63 64 // miscellaneous 65 virtual void update_keyboard_input(uint8_t value) override; 66 virtual void cart_w(bool line) override; 67 68 private: 69 required_device<gime_device> m_gime; 70 }; 71 72 #endif // MAME_INCLUDES_COCO3_H 73