1 // license:BSD-3-Clause 2 // copyright-holders:Curt Coder, Mike Naberezny 3 #ifndef MAME_INCLUDES_SOFTBOX_H 4 #define MAME_INCLUDES_SOFTBOX_H 5 6 #pragma once 7 8 #include "bus/ieee488/ieee488.h" 9 #include "bus/imi7000/imi7000.h" 10 #include "cpu/z80/z80.h" 11 #include "imagedev/harddriv.h" 12 #include "machine/corvushd.h" 13 #include "machine/com8116.h" 14 #include "machine/i8251.h" 15 #include "machine/i8255.h" 16 17 #define Z80_TAG "z80" 18 #define I8251_TAG "ic15" 19 #define I8255_0_TAG "ic17" 20 #define I8255_1_TAG "ic16" 21 #define COM8116_TAG "ic14" 22 #define RS232_TAG "rs232" 23 #define CORVUS_HDC_TAG "corvus" 24 25 class softbox_state : public driver_device 26 { 27 public: softbox_state(const machine_config & mconfig,device_type type,const char * tag)28 softbox_state(const machine_config &mconfig, device_type type, const char *tag) 29 : driver_device(mconfig, type, tag) 30 , m_maincpu(*this, Z80_TAG) 31 , m_ieee(*this, IEEE488_TAG) 32 , m_hdc(*this, CORVUS_HDC_TAG) 33 , m_leds(*this, "led%u", 0U) 34 { } 35 36 void softbox(machine_config &config); 37 38 private: 39 // device_ieee488_interface overrides 40 virtual void ieee488_ifc(int state); 41 42 uint8_t ppi0_pa_r(); 43 void ppi0_pb_w(uint8_t data); 44 45 uint8_t ppi1_pa_r(); 46 void ppi1_pb_w(uint8_t data); 47 uint8_t ppi1_pc_r(); 48 void ppi1_pc_w(uint8_t data); 49 50 enum 51 { 52 LED_A = 0, 53 LED_B, 54 LED_READY 55 }; 56 57 void softbox_io(address_map &map); 58 void softbox_mem(address_map &map); 59 int m_ifc; // Tracks previous state of IEEE-488 IFC line 60 61 virtual void machine_start() override; 62 virtual void device_reset_after_children() override; 63 64 required_device<cpu_device> m_maincpu; 65 required_device<ieee488_device> m_ieee; 66 required_device<corvus_hdc_device> m_hdc; 67 output_finder<3> m_leds; 68 }; 69 70 #endif 71