summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/laserbat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/laserbat.cpp')
-rw-r--r--src/mame/drivers/laserbat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mame/drivers/laserbat.cpp b/src/mame/drivers/laserbat.cpp
index 82457e60712..b358a978197 100644
--- a/src/mame/drivers/laserbat.cpp
+++ b/src/mame/drivers/laserbat.cpp
@@ -499,7 +499,7 @@ void laserbat_state::laserbat(machine_config &config)
laserbat_base(config);
// video hardware
- PALETTE(config, m_palette, 256).set_init(FUNC(laserbat_state::palette_init_laserbat));
+ PALETTE(config, m_palette, FUNC(laserbat_state::laserbat_palette), 256);
// sound board devices
SPEAKER(config, "speaker").front_center();
@@ -531,7 +531,7 @@ void catnmous_state::catnmous(machine_config &config)
laserbat_base(config);
// video hardware
- PALETTE(config, m_palette, 256).set_init(FUNC(catnmous_state::palette_init_catnmous));
+ PALETTE(config, m_palette, FUNC(catnmous_state::catnmous_palette), 256);
// sound board devices
SPEAKER(config, "speaker").front_center();
ment break detection' href='/mame/commit/src/devices/machine/sdlc.cpp?id=6407707ccc3445af120e5f7429392d4d344321e9'>6407707ccc3
46c4dfb5f91

























































































9ece34eb218
46c4dfb5f91
















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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
ass="n">device_type type, const char *tag)
		: driver_device(mconfig, type, tag),
		m_maincpu(*this, "maincpu"),
		m_audiocpu(*this, "audiocpu"),
		m_gfxdecode(*this, "gfxdecode"),
		m_palette(*this, "palette"),
		m_mainlatch(*this, "mainlatch"),
		m_soundlatch(*this, "soundlatch"),
		m_bigsprite_videoram(*this, "bigspriteram"),
		m_videoram(*this, "videoram"),
		m_column_scroll(*this, "column_scroll"),
		m_spriteram(*this, "spriteram"),
		m_bigsprite_control(*this, "bigspritectrl"),
		m_colorram(*this, "colorram"),
		m_swimmer_background_color(*this, "bgcolor"),
		m_toprollr_bg_videoram(*this, "bg_videoram"),
		m_toprollr_bg_coloram(*this, "bg_coloram"),
		m_decrypted_opcodes(*this, "decrypted_opcodes") { }

	required_device<cpu_device> m_maincpu;
	optional_device<cpu_device> m_audiocpu;
	required_device<gfxdecode_device> m_gfxdecode;
	required_device<palette_device> m_palette;
	required_device<ls259_device> m_mainlatch;
	optional_device<generic_latch_8_device> m_soundlatch;

	required_shared_ptr<uint8_t> m_bigsprite_videoram;
	required_shared_ptr<uint8_t> m_videoram;
	optional_shared_ptr<uint8_t> m_column_scroll;
	required_shared_ptr<uint8_t> m_spriteram;
	required_shared_ptr<uint8_t> m_bigsprite_control;
	required_shared_ptr<uint8_t> m_colorram;
	optional_shared_ptr<uint8_t> m_swimmer_background_color;
	optional_shared_ptr<uint8_t> m_toprollr_bg_videoram;
	optional_shared_ptr<uint8_t> m_toprollr_bg_coloram;
	optional_shared_ptr<uint8_t> m_decrypted_opcodes;

	bool m_flip_x;
	bool m_flip_y;
	bool m_swimmer_side_background_enabled;
	bool m_swimmer_palettebank;

	uint8_t m_yamato_p0;
	uint8_t m_yamato_p1;
	uint8_t m_toprollr_rombank;
	bool m_nmi_mask;
	tilemap_t *m_pf_tilemap;
	tilemap_t *m_bs_tilemap;
	tilemap_t *m_toproller_bg_tilemap;
	std::unique_ptr<uint8_t[]> m_opcodes;

	DECLARE_WRITE8_MEMBER(swimmer_sh_soundlatch_w);
	DECLARE_WRITE8_MEMBER(yamato_p0_w);
	DECLARE_WRITE8_MEMBER(yamato_p1_w);
	DECLARE_READ8_MEMBER(yamato_p0_r);
	DECLARE_READ8_MEMBER(yamato_p1_r);
	DECLARE_WRITE_LINE_MEMBER(toprollr_rombank_w);
	DECLARE_WRITE_LINE_MEMBER(nmi_mask_w);
	DECLARE_READ8_MEMBER(bagmanf_a000_r);
	DECLARE_WRITE8_MEMBER(cclimber_colorram_w);
	DECLARE_WRITE_LINE_MEMBER(flip_screen_x_w);
	DECLARE_WRITE_LINE_MEMBER(flip_screen_y_w);
	DECLARE_WRITE_LINE_MEMBER(sidebg_enable_w);
	DECLARE_WRITE_LINE_MEMBER(palette_bank_w);

	virtual void machine_start() override;
	DECLARE_DRIVER_INIT(cclimber);
	DECLARE_DRIVER_INIT(yamato);
	DECLARE_DRIVER_INIT(ckongb);
	DECLARE_DRIVER_INIT(toprollr);
	DECLARE_DRIVER_INIT(cclimberj);
	DECLARE_DRIVER_INIT(cannonb2);
	DECLARE_DRIVER_INIT(cannonb);
	DECLARE_DRIVER_INIT(dking);
	DECLARE_DRIVER_INIT(rpatrol);
	DECLARE_VIDEO_START(cclimber);
	DECLARE_PALETTE_INIT(cclimber);
	DECLARE_VIDEO_START(swimmer);
	DECLARE_PALETTE_INIT(swimmer);
	DECLARE_PALETTE_INIT(yamato);
	DECLARE_VIDEO_START(toprollr);
	DECLARE_PALETTE_INIT(toprollr);

	TILE_GET_INFO_MEMBER(cclimber_get_pf_tile_info);
	TILE_GET_INFO_MEMBER(swimmer_get_pf_tile_info);
	TILE_GET_INFO_MEMBER(toprollr_get_pf_tile_info);
	TILE_GET_INFO_MEMBER(cclimber_get_bs_tile_info);
	TILE_GET_INFO_MEMBER(toprollr_get_bs_tile_info);
	TILE_GET_INFO_MEMBER(toproller_get_bg_tile_info);

	uint32_t screen_update_cclimber(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	uint32_t screen_update_swimmer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	uint32_t screen_update_yamato(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	uint32_t screen_update_toprollr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	void swimmer_set_background_pen();
	void draw_playfield(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	void cclimber_draw_bigsprite(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	void toprollr_draw_bigsprite(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	void cclimber_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx);
	void toprollr_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx);
	void swimmer_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx);
	void cclimber_decode(const uint8_t convtable[8][16]);

	DECLARE_WRITE_LINE_MEMBER(vblank_irq);
	DECLARE_WRITE_LINE_MEMBER(bagmanf_vblank_irq);
	void root(machine_config &config);
	void swimmer(machine_config &config);
	void guzzler(machine_config &config);
	void toprollr(machine_config &config);
	void cannonb(machine_config &config);
	void yamato(machine_config &config);
	void bagmanf(machine_config &config);
	void cclimber(machine_config &config);
	void cclimberx(machine_config &config);
	void ckongb(machine_config &config);
	void bagmanf_map(address_map &map);
	void cannonb_map(address_map &map);
	void cclimber_map(address_map &map);
	void cclimber_portmap(address_map &map);
	void decrypted_opcodes_map(address_map &map);
	void guzzler_map(address_map &map);
	void swimmer_audio_map(address_map &map);
	void swimmer_audio_portmap(address_map &map);
	void swimmer_map(address_map &map);
	void toprollr_decrypted_opcodes_map(address_map &map);
	void toprollr_map(address_map &map);
	void yamato_audio_map(address_map &map);
	void yamato_audio_portmap(address_map &map);
	void yamato_decrypted_opcodes_map(address_map &map);
	void yamato_map(address_map &map);
	void yamato_portmap(address_map &map);
};