summaryrefslogtreecommitdiffstats
path: root/src/mame/includes/bottom9.h
blob: 7f91261759030fb160e45a67e12430a8fa177495 (plain) (blame)
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
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
/*************************************************************************

    Bottom of the Ninth

*************************************************************************/
#ifndef MAME_INCLUDES_BOTTOM9_H
#define MAME_INCLUDES_BOTTOM9_H

#pragma once

#include "sound/k007232.h"
#include "video/k052109.h"
#include "video/k051960.h"
#include "video/k051316.h"
#include "video/konami_helper.h"
#include "emupal.h"

class bottom9_state : public driver_device
{
public:
	bottom9_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_k007232_1(*this, "k007232_1"),
		m_k007232_2(*this, "k007232_2"),
		m_k052109(*this, "k052109"),
		m_k051960(*this, "k051960"),
		m_k051316(*this, "k051316"),
		m_palette(*this, "palette")
	{ }

	/* misc */
	int        m_video_enable;
	int        m_zoomreadroms;
	int        m_k052109_selected;
	int        m_nmienable;

	/* devices */
	required_device<cpu_device> m_maincpu;
	required_device<cpu_device> m_audiocpu;
	required_device<k007232_device> m_k007232_1;
	required_device<k007232_device> m_k007232_2;
	required_device<k052109_device> m_k052109;
	required_device<k051960_device> m_k051960;
	required_device<k051316_device> m_k051316;
	required_device<palette_device> m_palette;
	uint8_t k052109_051960_r(offs_t offset);
	void k052109_051960_w(offs_t offset, uint8_t data);
	uint8_t bottom9_bankedram1_r(offs_t offset);
	void bottom9_bankedram1_w(offs_t offset, uint8_t data);
	uint8_t bottom9_bankedram2_r(offs_t offset);
	void bottom9_bankedram2_w(offs_t offset, uint8_t data);
	void bankswitch_w(uint8_t data);
	void bottom9_1f90_w(uint8_t data);
	void bottom9_sh_irqtrigger_w(uint8_t data);
	void nmi_enable_w(uint8_t data);
	void sound_bank_w(uint8_t data);
	virtual void machine_start() override;
	virtual void machine_reset() override;
	uint32_t screen_update_bottom9(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	INTERRUPT_GEN_MEMBER(bottom9_sound_interrupt);
	void volume_callback0(uint8_t data);
	void volume_callback1(uint8_t data);
	K051316_CB_MEMBER(zoom_callback);
	K052109_CB_MEMBER(tile_callback);
	K051960_CB_MEMBER(sprite_callback);
	void bottom9(machine_config &config);
	void audio_map(address_map &map);
	void main_map(address_map &map);
};

#endif // MAME_INCLUDES_BOTTOM9_H