1 // license:BSD-3-Clause
2 // copyright-holders:David Haywood
3 
4 #include "video/edevices.h"
5 #include "machine/eepromser.h"
6 #include "emupal.h"
7 #include "cpu/m68000/m68000.h"
8 #include "sound/okim6295.h"
9 #include "screen.h"
10 #include "speaker.h"
11 
12 class stlforce_state : public driver_device
13 {
14 public:
stlforce_state(const machine_config & mconfig,device_type type,const char * tag)15 	stlforce_state(const machine_config &mconfig, device_type type, const char *tag) :
16 		driver_device(mconfig, type, tag),
17 		m_maincpu(*this, "maincpu"),
18 		m_eeprom(*this, "eeprom"),
19 		m_video(*this, "edevices_vid"),
20 		m_gfxdecode(*this, "gfxdecode"),
21 		m_palette(*this, "palette"),
22 		m_okibank(*this, "okibank")
23 	{ }
24 
25 	void stlforce(machine_config &config);
26 	void twinbrat(machine_config &config);
27 
28 	void init_twinbrat();
29 
30 private:
31 	required_device<cpu_device> m_maincpu;
32 	required_device<eeprom_serial_93cxx_device> m_eeprom;
33 	required_device<edevices_device> m_video;
34 	required_device<gfxdecode_device> m_gfxdecode;
35 	required_device<palette_device> m_palette;
36 
37 	optional_memory_bank m_okibank;
38 
39 	void eeprom_w(uint8_t data);
40 	void oki_bank_w(uint8_t data);
41 
42 	uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
43 
44 	void stlforce_map(address_map &map);
45 	void twinbrat_oki_map(address_map &map);
46 };
47