1 // license:BSD-3-Clause
2 // copyright-holders:David Haywood
3 #ifndef MAME_INCLUDES_GENERALPLUS_GPL16250_ROMRAM_H
4 #define MAME_INCLUDES_GENERALPLUS_GPL16250_ROMRAM_H
5 
6 #pragma once
7 
8 #include "includes/generalplus_gpl16250.h"
9 #include "machine/generalplus_gpl16250soc.h"
10 #include "machine/generalplus_gpl16250.h"
11 #include "bus/generic/slot.h"
12 #include "bus/generic/carts.h"
13 
14 #include "screen.h"
15 #include "speaker.h"
16 
17 
18 class wrlshunt_game_state : public gcm394_game_state
19 {
20 public:
wrlshunt_game_state(const machine_config & mconfig,device_type type,const char * tag)21 	wrlshunt_game_state(const machine_config& mconfig, device_type type, const char* tag) :
22 		gcm394_game_state(mconfig, type, tag)
23 	{
24 	}
25 
26 	void gpl16250_romram(machine_config &config);
27 
28 	void init_wrlshunt();
29 	void init_ths();
30 
31 protected:
32 	virtual void machine_start() override;
33 	virtual void machine_reset() override;
34 
35 	std::vector<uint16_t> m_sdram;
36 
37 	virtual uint16_t porta_r() override;
38 	virtual void porta_w(uint16_t data) override;
39 
40 private:
41 
42 
43 	//required_shared_ptr<u16> m_mainram;
44 
45 	virtual uint16_t cs0_r(offs_t offset) override;
46 	virtual void cs0_w(offs_t offset, uint16_t data) override;
47 	virtual uint16_t cs1_r(offs_t offset) override;
48 	virtual void cs1_w(offs_t offset, uint16_t data) override;
49 
50 	int m_romwords_mask;
51 };
52 
53 class jak_s500_game_state : public wrlshunt_game_state
54 {
55 public:
jak_s500_game_state(const machine_config & mconfig,device_type type,const char * tag)56 	jak_s500_game_state(const machine_config& mconfig, device_type type, const char* tag) :
57 		wrlshunt_game_state(mconfig, type, tag)
58 	{
59 	}
60 
61 protected:
62 	//virtual void machine_start() override;
63 	virtual void machine_reset() override;
64 
65 	virtual uint16_t porta_r() override;
66 	virtual uint16_t portb_r() override;
67 
68 private:
69 };
70 
71 class lazertag_game_state : public jak_s500_game_state
72 {
73 public:
lazertag_game_state(const machine_config & mconfig,device_type type,const char * tag)74 	lazertag_game_state(const machine_config& mconfig, device_type type, const char* tag) :
75 		jak_s500_game_state(mconfig, type, tag)
76 	{
77 	}
78 
79 protected:
80 	//virtual void machine_start() override;
81 	virtual void machine_reset() override;
82 
83 private:
84 };
85 
86 
87 class paccon_game_state : public jak_s500_game_state
88 {
89 public:
paccon_game_state(const machine_config & mconfig,device_type type,const char * tag)90 	paccon_game_state(const machine_config& mconfig, device_type type, const char* tag) :
91 		jak_s500_game_state(mconfig, type, tag)
92 	{
93 	}
94 
95 protected:
96 	virtual void machine_reset() override;
97 
98 private:
99 	uint16_t paccon_speedup_hack_r();
100 };
101 
102 class jak_pf_game_state : public jak_s500_game_state
103 {
104 public:
jak_pf_game_state(const machine_config & mconfig,device_type type,const char * tag)105 	jak_pf_game_state(const machine_config& mconfig, device_type type, const char* tag) :
106 		jak_s500_game_state(mconfig, type, tag)
107 	{
108 	}
109 
110 protected:
111 	virtual void machine_reset() override;
112 
113 private:
114 	uint16_t jak_pf_speedup_hack_r();
115 	uint16_t jak_pf_speedup_hack2_r();
116 };
117 
118 
119 class jak_prft_game_state : public jak_s500_game_state
120 {
121 public:
jak_prft_game_state(const machine_config & mconfig,device_type type,const char * tag)122 	jak_prft_game_state(const machine_config& mconfig, device_type type, const char* tag) :
123 		jak_s500_game_state(mconfig, type, tag)
124 	{
125 	}
126 
127 protected:
128 
129 	virtual void machine_reset() override;
130 
131 private:
132 };
133 
134 
135 
136 #endif // MAME_INCLUDES_GENERALPLUS_GPL16250_ROMRAM_H
137 
138