1 // license:BSD-3-Clause 2 // copyright-holders:David Haywood 3 #ifndef MAME_INCLUDES_BFM_SC5_H 4 #define MAME_INCLUDES_BFM_SC5_H 5 6 #pragma once 7 8 #include "includes/bfm_sc4.h" 9 #include "cpu/m68000/m68000.h" 10 11 class bfm_sc5_state : public bfm_sc45_state 12 { 13 public: bfm_sc5_state(const machine_config & mconfig,device_type type,const char * tag)14 bfm_sc5_state(const machine_config &mconfig, device_type type, const char *tag) 15 : bfm_sc45_state(mconfig, type, tag) 16 , m_maincpu(*this, "maincpu") 17 { } 18 19 void init_sc5(); 20 21 void bfm_sc5(machine_config &config); 22 23 protected: 24 void sc5_map(address_map &map); 25 26 required_device<m68000_base_device> m_maincpu; 27 28 uint8_t sc5_10202F0_r(offs_t offset); 29 void sc5_10202F0_w(offs_t offset, uint8_t data); 30 void sc5_duart_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); 31 32 uint8_t sc5_mux1_r(offs_t offset); 33 void sc5_mux1_w(offs_t offset, uint8_t data); 34 void sc5_mux2_w(offs_t offset, uint8_t data); 35 36 DECLARE_WRITE_LINE_MEMBER(bfm_sc5_duart_irq_handler); 37 DECLARE_WRITE_LINE_MEMBER(bfm_sc5_duart_txa); 38 uint8_t bfm_sc5_duart_input_r(); 39 void bfm_sc5_duart_output_w(uint8_t data); 40 }; 41 42 INPUT_PORTS_EXTERN( bfm_sc5 ); 43 44 #endif // MAME_INCLUDES_BFM_SC5_H 45