1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
// license:BSD-3-Clause
// copyright-holders:Mike Balfour
#ifndef MAME_INCLUDES_RUNAWAY_H
#define MAME_INCLUDES_RUNAWAY_H
#pragma once
#include "machine/er2055.h"
#include "emupal.h"
#include "screen.h"
#include "tilemap.h"
class runaway_state : public driver_device
{
public:
runaway_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_video_ram(*this, "video_ram")
, m_sprite_ram(*this, "sprite_ram")
, m_maincpu(*this, "maincpu")
, m_earom(*this, "earom")
, m_gfxdecode(*this, "gfxdecode")
, m_screen(*this, "screen")
, m_palette(*this, "palette")
{ }
void qwak(machine_config &config);
void runaway(machine_config &config);
private:
uint8_t runaway_input_r(offs_t offset);
void runaway_irq_ack_w(uint8_t data);
uint8_t earom_read();
void earom_write(offs_t offset, uint8_t data);
void earom_control_w(uint8_t data);
void runaway_paletteram_w(offs_t offset, uint8_t data);
void runaway_video_ram_w(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(tile_bank_w);
uint8_t runaway_pot_r(offs_t offset);
TILE_GET_INFO_MEMBER(runaway_get_tile_info);
TILE_GET_INFO_MEMBER(qwak_get_tile_info);
DECLARE_VIDEO_START(qwak);
uint32_t screen_update_runaway(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_qwak(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(interrupt_callback);
void runaway_map(address_map &map);
void qwak_map(address_map &map);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
emu_timer *m_interrupt_timer;
required_shared_ptr<uint8_t> m_video_ram;
required_shared_ptr<uint8_t> m_sprite_ram;
tilemap_t *m_bg_tilemap;
int m_tile_bank;
required_device<cpu_device> m_maincpu;
optional_device<er2055_device> m_earom;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
};
#endif // MAME_INCLUDES_RUNAWAY_H
|