1 // license:BSD-3-Clause 2 // copyright-holders:Ryan Holtz 3 /*************************************************************************** 4 5 Sun bwtwo monochrome video controller 6 7 ***************************************************************************/ 8 9 #ifndef MAME_BUS_SBUS_BWTWO_H 10 #define MAME_BUS_SBUS_BWTWO_H 11 12 #pragma once 13 14 #include "sbus.h" 15 16 17 class sbus_bwtwo_device : public device_t, public device_sbus_card_interface 18 { 19 public: 20 // construction/destruction 21 sbus_bwtwo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); 22 23 protected: 24 // device_t overrides 25 virtual const tiny_rom_entry *device_rom_region() const override; 26 virtual void device_add_mconfig(machine_config &config) override; 27 virtual void device_start() override; 28 29 // device_sbus_slot_interface overrides 30 virtual void install_device() override; 31 32 uint8_t regs_r(offs_t offset); 33 void regs_w(offs_t offset, uint8_t data); 34 uint32_t rom_r(offs_t offset); 35 uint8_t vram_r(offs_t offset); 36 void vram_w(offs_t offset, uint8_t data); 37 38 private: 39 uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); 40 41 void mem_map(address_map &map) override; 42 43 required_memory_region m_rom; 44 std::unique_ptr<uint8_t[]> m_vram; 45 required_device<screen_device> m_screen; 46 uint32_t m_mono_lut[256][8]; 47 }; 48 49 50 DECLARE_DEVICE_TYPE(SBUS_BWTWO, sbus_bwtwo_device) 51 52 #endif // MAME_BUS_SBUS_BWTWO_H 53