1 // license:BSD-3-Clause
2 // copyright-holders:Carlos A. Lozano, Uki
3 /***************************************************************************
4 
5     Aeroboto
6 
7 ***************************************************************************/
8 #ifndef MAME_INCLUDES_AEROBOTO_H
9 #define MAME_INCLUDES_AEROBOTO_H
10 
11 #pragma once
12 
13 #include "emupal.h"
14 #include "tilemap.h"
15 
16 class aeroboto_state : public driver_device
17 {
18 public:
aeroboto_state(const machine_config & mconfig,device_type type,const char * tag)19 	aeroboto_state(const machine_config &mconfig, device_type type, const char *tag) :
20 		driver_device(mconfig, type, tag),
21 		m_mainram(*this, "mainram"),
22 		m_videoram(*this, "videoram"),
23 		m_hscroll(*this, "hscroll"),
24 		m_tilecolor(*this, "tilecolor"),
25 		m_spriteram(*this, "spriteram"),
26 		m_vscroll(*this, "vscroll"),
27 		m_starx(*this, "starx"),
28 		m_stary(*this, "stary"),
29 		m_bgcolor(*this, "bgcolor"),
30 		m_maincpu(*this, "maincpu"),
31 		m_audiocpu(*this, "audiocpu"),
32 		m_gfxdecode(*this, "gfxdecode"),
33 		m_palette(*this, "palette")
34 	{ }
35 
36 	/* memory pointers */
37 	required_shared_ptr<uint8_t> m_mainram;
38 	required_shared_ptr<uint8_t> m_videoram;
39 	required_shared_ptr<uint8_t> m_hscroll;
40 	required_shared_ptr<uint8_t> m_tilecolor;
41 	required_shared_ptr<uint8_t> m_spriteram;
42 	required_shared_ptr<uint8_t> m_vscroll;
43 	required_shared_ptr<uint8_t> m_starx;
44 	required_shared_ptr<uint8_t> m_stary;
45 	required_shared_ptr<uint8_t> m_bgcolor;
46 
47 	/* stars layout */
48 	uint8_t * m_stars_rom;
49 	int     m_stars_length;
50 
51 	/* video-related */
52 	tilemap_t *m_bg_tilemap;
53 	int     m_charbank;
54 	int     m_starsoff;
55 	int     m_sx;
56 	int     m_sy;
57 	uint8_t   m_ox;
58 	uint8_t   m_oy;
59 
60 	/* misc */
61 	int m_count;
62 	int m_disable_irq;
63 	uint8_t aeroboto_201_r();
64 	uint8_t aeroboto_irq_ack_r();
65 	uint8_t aeroboto_2973_r();
66 	void aeroboto_1a2_w(uint8_t data);
67 	uint8_t aeroboto_in0_r();
68 	void aeroboto_3000_w(uint8_t data);
69 	void aeroboto_videoram_w(offs_t offset, uint8_t data);
70 	void aeroboto_tilecolor_w(offs_t offset, uint8_t data);
71 	TILE_GET_INFO_MEMBER(get_tile_info);
72 	virtual void machine_start() override;
73 	virtual void machine_reset() override;
74 	virtual void video_start() override;
75 	uint32_t screen_update_aeroboto(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
76 	DECLARE_WRITE_LINE_MEMBER(vblank_irq);
77 	void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
78 	required_device<cpu_device> m_maincpu;
79 	required_device<cpu_device> m_audiocpu;
80 	required_device<gfxdecode_device> m_gfxdecode;
81 	required_device<palette_device> m_palette;
82 	void formatz(machine_config &config);
83 	void main_map(address_map &map);
84 	void sound_map(address_map &map);
85 };
86 
87 #endif // MAME_INCLUDES_AEROBOTO_H
88