1 // license:BSD-3-Clause
2 // copyright-holders:David Haywood, Pierpaolo Prazzoli
3 #ifndef MAME_INCLUDES_QUIZPANI_H
4 #define MAME_INCLUDES_QUIZPANI_H
5 
6 #pragma once
7 
8 #include "machine/nmk112.h"
9 #include "tilemap.h"
10 
11 class quizpani_state : public driver_device
12 {
13 public:
quizpani_state(const machine_config & mconfig,device_type type,const char * tag)14 	quizpani_state(const machine_config &mconfig, device_type type, const char *tag) :
15 		driver_device(mconfig, type, tag),
16 		m_maincpu(*this, "maincpu"),
17 		m_gfxdecode(*this, "gfxdecode"),
18 		m_scrollreg(*this, "scrollreg"),
19 		m_bg_videoram(*this, "bg_videoram"),
20 		m_txt_videoram(*this, "txt_videoram")
21 	{ }
22 
23 	required_device<cpu_device> m_maincpu;
24 	required_device<gfxdecode_device> m_gfxdecode;
25 
26 	required_shared_ptr<uint16_t> m_scrollreg;
27 	required_shared_ptr<uint16_t> m_bg_videoram;
28 	required_shared_ptr<uint16_t> m_txt_videoram;
29 
30 	tilemap_t *m_bg_tilemap;
31 	tilemap_t *m_txt_tilemap;
32 	int m_bgbank;
33 	int m_txtbank;
34 
35 	void bg_videoram_w(offs_t offset, uint16_t data);
36 	void txt_videoram_w(offs_t offset, uint16_t data);
37 	void tilesbank_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
38 
39 	TILEMAP_MAPPER_MEMBER(bg_scan);
40 	TILE_GET_INFO_MEMBER(bg_tile_info);
41 	TILE_GET_INFO_MEMBER(txt_tile_info);
42 
43 	virtual void video_start() override;
44 
45 	uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
46 	void quizpani(machine_config &config);
47 	void quizpani_map(address_map &map);
48 };
49 
50 #endif // MAME_INCLUDES_QUIZPANI_H
51