summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/generalplus_gpl16250_romram.h
blob: c1b6fd7f9722a7992e695d0b6a9afa39e76073b1 (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
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
// license:BSD-3-Clause
// copyright-holders:David Haywood
#ifndef MAME_INCLUDES_GENERALPLUS_GPL16250_ROMRAM_H
#define MAME_INCLUDES_GENERALPLUS_GPL16250_ROMRAM_H

#pragma once

#include "includes/generalplus_gpl16250.h"
#include "machine/generalplus_gpl16250soc.h"
#include "machine/generalplus_gpl16250.h"
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"

#include "screen.h"
#include "speaker.h"


class wrlshunt_game_state : public gcm394_game_state
{
public:
	wrlshunt_game_state(const machine_config& mconfig, device_type type, const char* tag) :
		gcm394_game_state(mconfig, type, tag)
	{
	}

	void gpl16250_romram(machine_config &config);

	void init_wrlshunt();
	void init_ths();

protected:
	virtual void machine_start() override;
	virtual void machine_reset() override;

	std::vector<uint16_t> m_sdram;

	virtual uint16_t porta_r() override;
	virtual void porta_w(uint16_t data) override;

private:


	//required_shared_ptr<u16> m_mainram;

	virtual uint16_t cs0_r(offs_t offset) override;
	virtual void cs0_w(offs_t offset, uint16_t data) override;
	virtual uint16_t cs1_r(offs_t offset) override;
	virtual void cs1_w(offs_t offset, uint16_t data) override;

	int m_romwords_mask;
};

class jak_s500_game_state : public wrlshunt_game_state
{
public:
	jak_s500_game_state(const machine_config& mconfig, device_type type, const char* tag) :
		wrlshunt_game_state(mconfig, type, tag)
	{
	}

protected:
	//virtual void machine_start() override;
	virtual void machine_reset() override;

	virtual uint16_t porta_r() override;
	virtual uint16_t portb_r() override;

private:
};

class lazertag_game_state : public jak_s500_game_state
{
public:
	lazertag_game_state(const machine_config& mconfig, device_type type, const char* tag) :
		jak_s500_game_state(mconfig, type, tag)
	{
	}

protected:
	//virtual void machine_start() override;
	virtual void machine_reset() override;

private:
};


class paccon_game_state : public jak_s500_game_state
{
public:
	paccon_game_state(const machine_config& mconfig, device_type type, const char* tag) :
		jak_s500_game_state(mconfig, type, tag)
	{
	}

protected:
	virtual void machine_reset() override;

private:
	uint16_t paccon_speedup_hack_r();
};

class jak_pf_game_state : public jak_s500_game_state
{
public:
	jak_pf_game_state(const machine_config& mconfig, device_type type, const char* tag) :
		jak_s500_game_state(mconfig, type, tag)
	{
	}

protected:
	virtual void machine_reset() override;

private:
	uint16_t jak_pf_speedup_hack_r();
	uint16_t jak_pf_speedup_hack2_r();
};


class jak_prft_game_state : public jak_s500_game_state
{
public:
	jak_prft_game_state(const machine_config& mconfig, device_type type, const char* tag) :
		jak_s500_game_state(mconfig, type, tag)
	{
	}

protected:

	virtual void machine_reset() override;

private:
};



#endif // MAME_INCLUDES_GENERALPLUS_GPL16250_ROMRAM_H