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
66
67
68
69
70
71
72
73
74
|
// license:BSD-3-Clause
// copyright-holders:David Haywood
#ifndef MAME_INCLUDES_WELLTRIS_H
#define MAME_INCLUDES_WELLTRIS_H
#pragma once
#include "machine/gen_latch.h"
#include "video/vsystem_spr2.h"
#include "screen.h"
#include "tilemap.h"
class welltris_state : public driver_device
{
public:
welltris_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_spr_old(*this, "vsystem_spr_old"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_soundlatch(*this, "soundlatch"),
m_spriteram(*this, "spriteram"),
m_pixelram(*this, "pixelram"),
m_charvideoram(*this, "charvideoram")
{ }
void quiz18k(machine_config &config);
void welltris(machine_config &config);
void init_quiz18k();
void init_welltris();
protected:
virtual void machine_start() override;
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<vsystem_spr2_device> m_spr_old;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<generic_latch_8_device> m_soundlatch;
required_shared_ptr<uint16_t> m_spriteram;
required_shared_ptr<uint16_t> m_pixelram;
required_shared_ptr<uint16_t> m_charvideoram;
tilemap_t *m_char_tilemap;
uint8_t m_gfxbank[2];
uint16_t m_charpalettebank;
uint16_t m_spritepalettebank;
uint16_t m_pixelpalettebank;
int m_scrollx;
int m_scrolly;
void sound_bankswitch_w(uint8_t data);
void palette_bank_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void gfxbank_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void scrollreg_w(offs_t offset, uint16_t data);
void charvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
TILE_GET_INFO_MEMBER(get_tile_info);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect);
void setbank(int num, int bank);
void main_map(address_map &map);
void sound_map(address_map &map);
void sound_port_map(address_map &map);
};
#endif // MAME_INCLUDES_WELLTRIS_H
|