1 // Based on MAME driver by David Graves, Bryan McPhail, Brad Oliver, Andrew Prime, Brian Troha, Nicola Salmoria
2 
3 // Todo:
4 //  what next?
5 
6 #include "tiles_generic.h"
7 #include "m68000_intf.h"
8 #include "z80_intf.h"
9 #include "taito.h"
10 #include "taito_ic.h"
11 #include "burn_ym2610.h"
12 #include "burn_ym2203.h"
13 #include "msm6295.h"
14 
15 static INT32 Footchmp = 0;
16 static INT32 YesnoDip;
17 static INT32 MjnquestInput;
18 static INT32 DriveoutSoundNibble;
19 static INT32 DriveoutOkiBank;
20 static INT32 Driftout = 0;
21 static INT32 bNoClearOpposites = 0;
22 
23 INT32 TaitoF2SpriteType;
24 
25 INT32 TaitoF2SpritesFlipScreen;
26 INT32 TaitoF2PrepareSprites;
27 INT32 TaitoF2SpritesDisabled, TaitoF2SpritesActiveArea, TaitoF2SpritesMasterScrollX, TaitoF2SpritesMasterScrollY;
28 INT32 TaitoF2SpriteBlendMode;
29 UINT16 TaitoF2SpriteBank[8];
30 UINT16 TaitoF2SpriteBankBuffered[8];
31 UINT8 TaitoF2TilePriority[5];
32 UINT8 TaitoF2SpritePriority[4];
33 struct TaitoF2SpriteEntry *TaitoF2SpriteList;
34 static TaitoF2SpriteBufferUpdate TaitoF2SpriteBufferFunction;
35 
36 static INT32 PaletteType = 0;
37 enum { TAITOF2Palette = 0, METALBPalette = 1, QZQUESTPalette = 2 };
38 
39 static INT32 SpritePriWritebackMode = 0; // no priority writeback for sprite blender
40 
41 #ifdef BUILD_A68K
42 static bool bUseAsm68KCoreOldValue = false;
43 #endif
44 
45 #define A(a, b, c, d) {a, b, (UINT8*)(c), d}
46 
47 static struct BurnInputInfo CameltryInputList[] =
48 {
49 	{"Coin 1"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 2, "p1 coin"   },
50 	{"Start 1"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 7, "p1 start"  },
51 	{"Coin 2"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 3, "p2 coin"   },
52 	{"Start 2"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 7, "p2 start"  },
53 
54 	A("P1 Paddle"        , BIT_ANALOG_REL, &TaitoAnalogPort0      , "p1 x-axis" ),
55 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 4, "p1 fire 1" },
56 
57 	A("P2 Paddle"        , BIT_ANALOG_REL, &TaitoAnalogPort1      , "p2 x-axis" ),
58 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 4, "p2 fire 1" },
59 
60 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
61 	{"Service"           , BIT_DIGITAL   , TC0220IOCInputPort2 + 1, "service"   },
62 	{"Tilt"              , BIT_DIGITAL   , TC0220IOCInputPort2 + 0, "tilt"      },
63 	{"Dip 1"             , BIT_DIPSWITCH , TC0220IOCDip + 0       , "dip"       },
64 	{"Dip 2"             , BIT_DIPSWITCH , TC0220IOCDip + 1       , "dip"       },
65 };
66 
67 STDINPUTINFO(Cameltry)
68 
69 static struct BurnInputInfo DeadconxInputList[] =
70 {
71 	{"Coin 1"            , BIT_DIGITAL   , TaitoInputPort2 + 0, "p1 coin"   },
72 	{"Start 1"           , BIT_DIGITAL   , TaitoInputPort0 + 7, "p1 start"  },
73 	{"Coin 2"            , BIT_DIGITAL   , TaitoInputPort2 + 1, "p2 coin"   },
74 	{"Start 2"           , BIT_DIGITAL   , TaitoInputPort1 + 7, "p2 start"  },
75 
76 	{"P1 Up"             , BIT_DIGITAL   , TaitoInputPort0 + 0, "p1 up"     },
77 	{"P1 Down"           , BIT_DIGITAL   , TaitoInputPort0 + 1, "p1 down"   },
78 	{"P1 Left"           , BIT_DIGITAL   , TaitoInputPort0 + 2, "p1 left"   },
79 	{"P1 Right"          , BIT_DIGITAL   , TaitoInputPort0 + 3, "p1 right"  },
80 	{"P1 Fire 1"         , BIT_DIGITAL   , TaitoInputPort0 + 4, "p1 fire 1" },
81 	{"P1 Fire 2"         , BIT_DIGITAL   , TaitoInputPort0 + 5, "p1 fire 2" },
82 
83 	{"P2 Up"             , BIT_DIGITAL   , TaitoInputPort1 + 0, "p2 up"     },
84 	{"P2 Down"           , BIT_DIGITAL   , TaitoInputPort1 + 1, "p2 down"   },
85 	{"P2 Left"           , BIT_DIGITAL   , TaitoInputPort1 + 2, "p2 left"   },
86 	{"P2 Right"          , BIT_DIGITAL   , TaitoInputPort1 + 3, "p2 right"  },
87 	{"P2 Fire 1"         , BIT_DIGITAL   , TaitoInputPort1 + 4, "p2 fire 1" },
88 	{"P2 Fire 2"         , BIT_DIGITAL   , TaitoInputPort1 + 5, "p2 fire 2" },
89 
90 	{"Reset"             , BIT_DIGITAL   , &TaitoReset        , "reset"     },
91 	{"Service"           , BIT_DIGITAL   , TaitoInputPort2 + 4, "service"   },
92 	{"Service 2"         , BIT_DIGITAL   , TaitoInputPort2 + 5, "service 2" },
93 	{"Service 3"         , BIT_DIGITAL   , TaitoInputPort2 + 6, "service 3" },
94 	{"Tilt"              , BIT_DIGITAL   , TaitoInputPort2 + 7, "tilt"      },
95 	{"Dip 1"             , BIT_DIPSWITCH , TaitoDip + 0       , "dip"       },
96 	{"Dip 2"             , BIT_DIPSWITCH , TaitoDip + 1       , "dip"       },
97 };
98 
99 STDINPUTINFO(Deadconx)
100 
101 static struct BurnInputInfo DinorexInputList[] =
102 {
103 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 coin"   },
104 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p1 start"  },
105 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p2 coin"   },
106 	{"Start 2"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 7, "p2 start"  },
107 
108 	{"P1 Up"             , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 up"     },
109 	{"P1 Down"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 down"   },
110 	{"P1 Left"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 left"   },
111 	{"P1 Right"          , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 right"  },
112 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 fire 1" },
113 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 5, "p1 fire 2" },
114 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 6, "p1 fire 3" },
115 
116 	{"P2 Up"             , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "p2 up"     },
117 	{"P2 Down"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "p2 down"   },
118 	{"P2 Left"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p2 left"   },
119 	{"P2 Right"          , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p2 right"  },
120 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 4, "p2 fire 1" },
121 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 5, "p2 fire 2" },
122 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 6, "p2 fire 3" },
123 
124 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
125 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "service"   },
126 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "tilt"      },
127 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
128 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
129 };
130 
131 STDINPUTINFO(Dinorex)
132 
133 static struct BurnInputInfo DondokodInputList[] =
134 {
135 	{"Coin 1"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 2, "p1 coin"   },
136 	{"Start 1"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 7, "p1 start"  },
137 	{"Coin 2"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 3, "p2 coin"   },
138 	{"Start 2"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 7, "p2 start"  },
139 
140 	{"P1 Up"             , BIT_DIGITAL   , TC0220IOCInputPort0 + 0, "p1 up"     },
141 	{"P1 Down"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 1, "p1 down"   },
142 	{"P1 Left"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 2, "p1 left"   },
143 	{"P1 Right"          , BIT_DIGITAL   , TC0220IOCInputPort0 + 3, "p1 right"  },
144 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 4, "p1 fire 1" },
145 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 5, "p1 fire 2" },
146 
147 	{"P2 Up"             , BIT_DIGITAL   , TC0220IOCInputPort1 + 0, "p2 up"     },
148 	{"P2 Down"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 1, "p2 down"   },
149 	{"P2 Left"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 2, "p2 left"   },
150 	{"P2 Right"          , BIT_DIGITAL   , TC0220IOCInputPort1 + 3, "p2 right"  },
151 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 4, "p2 fire 1" },
152 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 5, "p2 fire 2" },
153 
154 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
155 	{"Service"           , BIT_DIGITAL   , TC0220IOCInputPort2 + 1, "service"   },
156 	{"Tilt"              , BIT_DIGITAL   , TC0220IOCInputPort2 + 0, "tilt"      },
157 	{"Dip 1"             , BIT_DIPSWITCH , TC0220IOCDip + 0       , "dip"       },
158 	{"Dip 2"             , BIT_DIPSWITCH , TC0220IOCDip + 1       , "dip"       },
159 };
160 
161 STDINPUTINFO(Dondokod)
162 
163 static struct BurnInputInfo DriftoutInputList[] =
164 {
165 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 coin"   },
166 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p1 start"  },
167 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p2 coin"   },
168 
169 	{"P1 Up"             , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 up"     },
170 	{"P1 Down"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 down"   },
171 	{"P1 Left"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 left"   },
172 	{"P1 Right"          , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 right"  },
173 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 fire 1" },
174 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 5, "p1 fire 2" },
175 
176 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
177 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "service"   },
178 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "tilt"      },
179 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
180 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
181 };
182 
183 STDINPUTINFO(Driftout)
184 
185 static struct BurnInputInfo FinalbInputList[] =
186 {
187 	{"Coin 1"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 2, "p1 coin"   },
188 	{"Start 1"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 7, "p1 start"  },
189 	{"Coin 2"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 3, "p2 coin"   },
190 	{"Start 2"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 7, "p2 start"  },
191 
192 	{"P1 Up"             , BIT_DIGITAL   , TC0220IOCInputPort0 + 0, "p1 up"     },
193 	{"P1 Down"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 1, "p1 down"   },
194 	{"P1 Left"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 2, "p1 left"   },
195 	{"P1 Right"          , BIT_DIGITAL   , TC0220IOCInputPort0 + 3, "p1 right"  },
196 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 4, "p1 fire 1" },
197 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 5, "p1 fire 2" },
198 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 6, "p1 fire 3" },
199 	{"P1 Fire 4"         , BIT_DIGITAL   , TC0220IOCInputPort2 + 4, "p1 fire 4" },
200 	{"P1 Fire 5"         , BIT_DIGITAL   , TC0220IOCInputPort2 + 5, "p1 fire 5" },
201 
202 	{"P2 Up"             , BIT_DIGITAL   , TC0220IOCInputPort1 + 0, "p2 up"     },
203 	{"P2 Down"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 1, "p2 down"   },
204 	{"P2 Left"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 2, "p2 left"   },
205 	{"P2 Right"          , BIT_DIGITAL   , TC0220IOCInputPort1 + 3, "p2 right"  },
206 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 4, "p2 fire 1" },
207 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 5, "p2 fire 2" },
208 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 6, "p2 fire 3" },
209 	{"P2 Fire 4"         , BIT_DIGITAL   , TC0220IOCInputPort2 + 6, "p2 fire 4" },
210 	{"P2 Fire 5"         , BIT_DIGITAL   , TC0220IOCInputPort2 + 7, "p2 fire 5" },
211 
212 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
213 	{"Service"           , BIT_DIGITAL   , TC0220IOCInputPort2 + 1, "service"   },
214 	{"Tilt"              , BIT_DIGITAL   , TC0220IOCInputPort2 + 0, "tilt"      },
215 	{"Dip 1"             , BIT_DIPSWITCH , TC0220IOCDip + 0       , "dip"       },
216 	{"Dip 2"             , BIT_DIPSWITCH , TC0220IOCDip + 1       , "dip"       },
217 };
218 
219 STDINPUTINFO(Finalb)
220 
221 static struct BurnInputInfo FootchmpInputList[] =
222 {
223 	{"Coin 1"            , BIT_DIGITAL   , TaitoInputPort2 + 0, "p1 coin"   },
224 	{"Start 1"           , BIT_DIGITAL   , TaitoInputPort0 + 7, "p1 start"  },
225 	{"Coin 2"            , BIT_DIGITAL   , TaitoInputPort2 + 1, "p2 coin"   },
226 	{"Start 2"           , BIT_DIGITAL   , TaitoInputPort1 + 7, "p2 start"  },
227 	{"Coin 3"            , BIT_DIGITAL   , TaitoInputPort2 + 2, "p3 coin"   },
228 	{"Start 3"           , BIT_DIGITAL   , TaitoInputPort3 + 7, "p3 start"  },
229 	{"Coin 4"            , BIT_DIGITAL   , TaitoInputPort2 + 3, "p4 coin"   },
230 	{"Start 4"           , BIT_DIGITAL   , TaitoInputPort4 + 7, "p4 start"  },
231 
232 	{"P1 Up"             , BIT_DIGITAL   , TaitoInputPort0 + 0, "p1 up"     },
233 	{"P1 Down"           , BIT_DIGITAL   , TaitoInputPort0 + 1, "p1 down"   },
234 	{"P1 Left"           , BIT_DIGITAL   , TaitoInputPort0 + 2, "p1 left"   },
235 	{"P1 Right"          , BIT_DIGITAL   , TaitoInputPort0 + 3, "p1 right"  },
236 	{"P1 Fire 1"         , BIT_DIGITAL   , TaitoInputPort0 + 4, "p1 fire 1" },
237 	{"P1 Fire 2"         , BIT_DIGITAL   , TaitoInputPort0 + 5, "p1 fire 2" },
238 
239 	{"P2 Up"             , BIT_DIGITAL   , TaitoInputPort1 + 0, "p2 up"     },
240 	{"P2 Down"           , BIT_DIGITAL   , TaitoInputPort1 + 1, "p2 down"   },
241 	{"P2 Left"           , BIT_DIGITAL   , TaitoInputPort1 + 2, "p2 left"   },
242 	{"P2 Right"          , BIT_DIGITAL   , TaitoInputPort1 + 3, "p2 right"  },
243 	{"P2 Fire 1"         , BIT_DIGITAL   , TaitoInputPort1 + 4, "p2 fire 1" },
244 	{"P2 Fire 2"         , BIT_DIGITAL   , TaitoInputPort1 + 5, "p2 fire 2" },
245 
246 	{"P3 Up"             , BIT_DIGITAL   , TaitoInputPort3 + 0, "p3 up"     },
247 	{"P3 Down"           , BIT_DIGITAL   , TaitoInputPort3 + 1, "p3 down"   },
248 	{"P3 Left"           , BIT_DIGITAL   , TaitoInputPort3 + 2, "p3 left"   },
249 	{"P3 Right"          , BIT_DIGITAL   , TaitoInputPort3 + 3, "p3 right"  },
250 	{"P3 Fire 1"         , BIT_DIGITAL   , TaitoInputPort3 + 4, "p3 fire 1" },
251 	{"P3 Fire 2"         , BIT_DIGITAL   , TaitoInputPort3 + 5, "p3 fire 2" },
252 
253 	{"P4 Up"             , BIT_DIGITAL   , TaitoInputPort4 + 0, "p4 up"     },
254 	{"P4 Down"           , BIT_DIGITAL   , TaitoInputPort4 + 1, "p4 down"   },
255 	{"P4 Left"           , BIT_DIGITAL   , TaitoInputPort4 + 2, "p4 left"   },
256 	{"P4 Right"          , BIT_DIGITAL   , TaitoInputPort4 + 3, "p4 right"  },
257 	{"P4 Fire 1"         , BIT_DIGITAL   , TaitoInputPort4 + 4, "p4 fire 1" },
258 	{"P4 Fire 2"         , BIT_DIGITAL   , TaitoInputPort4 + 5, "p4 fire 2" },
259 
260 	{"Reset"             , BIT_DIGITAL   , &TaitoReset        , "reset"     },
261 	{"Service"           , BIT_DIGITAL   , TaitoInputPort2 + 4, "service"   },
262 	{"Service 2"         , BIT_DIGITAL   , TaitoInputPort2 + 5, "service 2" },
263 	{"Service 3"         , BIT_DIGITAL   , TaitoInputPort2 + 6, "service 3" },
264 	{"Tilt"              , BIT_DIGITAL   , TaitoInputPort2 + 7, "tilt"      },
265 	{"Dip 1"             , BIT_DIPSWITCH , TaitoDip + 0       , "dip"       },
266 	{"Dip 2"             , BIT_DIPSWITCH , TaitoDip + 1       , "dip"       },
267 };
268 
269 STDINPUTINFO(Footchmp)
270 
271 static struct BurnInputInfo GrowlInputList[] =
272 {
273 	{"Coin 1"            , BIT_DIGITAL   , TaitoInputPort2 + 2, "p1 coin"   },
274 	{"Start 1"           , BIT_DIGITAL   , TaitoInputPort0 + 7, "p1 start"  },
275 	{"Coin 2"            , BIT_DIGITAL   , TaitoInputPort2 + 3, "p2 coin"   },
276 	{"Start 2"           , BIT_DIGITAL   , TaitoInputPort1 + 7, "p2 start"  },
277 	{"Coin 3"            , BIT_DIGITAL   , TaitoInputPort5 + 0, "p3 coin"   },
278 	{"Start 3"           , BIT_DIGITAL   , TaitoInputPort3 + 7, "p3 start"  },
279 	{"Coin 4"            , BIT_DIGITAL   , TaitoInputPort5 + 1, "p4 coin"   },
280 	{"Start 4"           , BIT_DIGITAL   , TaitoInputPort4 + 7, "p4 start"  },
281 
282 	{"P1 Up"             , BIT_DIGITAL   , TaitoInputPort0 + 0, "p1 up"     },
283 	{"P1 Down"           , BIT_DIGITAL   , TaitoInputPort0 + 1, "p1 down"   },
284 	{"P1 Left"           , BIT_DIGITAL   , TaitoInputPort0 + 2, "p1 left"   },
285 	{"P1 Right"          , BIT_DIGITAL   , TaitoInputPort0 + 3, "p1 right"  },
286 	{"P1 Fire 1"         , BIT_DIGITAL   , TaitoInputPort0 + 4, "p1 fire 1" },
287 	{"P1 Fire 2"         , BIT_DIGITAL   , TaitoInputPort0 + 5, "p1 fire 2" },
288 	{"P1 Fire 3"         , BIT_DIGITAL   , TaitoInputPort0 + 6, "p1 fire 3" },
289 
290 	{"P2 Up"             , BIT_DIGITAL   , TaitoInputPort1 + 0, "p2 up"     },
291 	{"P2 Down"           , BIT_DIGITAL   , TaitoInputPort1 + 1, "p2 down"   },
292 	{"P2 Left"           , BIT_DIGITAL   , TaitoInputPort1 + 2, "p2 left"   },
293 	{"P2 Right"          , BIT_DIGITAL   , TaitoInputPort1 + 3, "p2 right"  },
294 	{"P2 Fire 1"         , BIT_DIGITAL   , TaitoInputPort1 + 4, "p2 fire 1" },
295 	{"P2 Fire 2"         , BIT_DIGITAL   , TaitoInputPort1 + 5, "p2 fire 2" },
296 	{"P2 Fire 3"         , BIT_DIGITAL   , TaitoInputPort1 + 6, "p2 fire 3" },
297 
298 	{"P3 Up"             , BIT_DIGITAL   , TaitoInputPort3 + 0, "p3 up"     },
299 	{"P3 Down"           , BIT_DIGITAL   , TaitoInputPort3 + 1, "p3 down"   },
300 	{"P3 Left"           , BIT_DIGITAL   , TaitoInputPort3 + 2, "p3 left"   },
301 	{"P3 Right"          , BIT_DIGITAL   , TaitoInputPort3 + 3, "p3 right"  },
302 	{"P3 Fire 1"         , BIT_DIGITAL   , TaitoInputPort3 + 4, "p3 fire 1" },
303 	{"P3 Fire 2"         , BIT_DIGITAL   , TaitoInputPort3 + 5, "p3 fire 2" },
304 	{"P3 Fire 3"         , BIT_DIGITAL   , TaitoInputPort3 + 6, "p3 fire 3" },
305 
306 	{"P4 Up"             , BIT_DIGITAL   , TaitoInputPort4 + 0, "p4 up"     },
307 	{"P4 Down"           , BIT_DIGITAL   , TaitoInputPort4 + 1, "p4 down"   },
308 	{"P4 Left"           , BIT_DIGITAL   , TaitoInputPort4 + 2, "p4 left"   },
309 	{"P4 Right"          , BIT_DIGITAL   , TaitoInputPort4 + 3, "p4 right"  },
310 	{"P4 Fire 1"         , BIT_DIGITAL   , TaitoInputPort4 + 4, "p4 fire 1" },
311 	{"P4 Fire 2"         , BIT_DIGITAL   , TaitoInputPort4 + 5, "p4 fire 2" },
312 	{"P4 Fire 3"         , BIT_DIGITAL   , TaitoInputPort4 + 6, "p4 fire 3" },
313 
314 	{"Reset"             , BIT_DIGITAL   , &TaitoReset        , "reset"     },
315 	{"Service"           , BIT_DIGITAL   , TaitoInputPort2 + 1, "service"   },
316 	{"Service 2"         , BIT_DIGITAL   , TaitoInputPort5 + 2, "service 2" },
317 	{"Tilt"              , BIT_DIGITAL   , TaitoInputPort2 + 0, "tilt"      },
318 	{"Dip 1"             , BIT_DIPSWITCH , TaitoDip + 0       , "dip"       },
319 	{"Dip 2"             , BIT_DIPSWITCH , TaitoDip + 1       , "dip"       },
320 };
321 
322 STDINPUTINFO(Growl)
323 
324 static struct BurnInputInfo GunfrontInputList[] =
325 {
326 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 coin"   },
327 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p1 start"  },
328 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p2 coin"   },
329 	{"Start 2"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 7, "p2 start"  },
330 
331 	{"P1 Up"             , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 up"     },
332 	{"P1 Down"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 down"   },
333 	{"P1 Left"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 left"   },
334 	{"P1 Right"          , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 right"  },
335 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 fire 1" },
336 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 5, "p1 fire 2" },
337 
338 	{"P2 Up"             , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "p2 up"     },
339 	{"P2 Down"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "p2 down"   },
340 	{"P2 Left"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p2 left"   },
341 	{"P2 Right"          , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p2 right"  },
342 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 4, "p2 fire 1" },
343 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 5, "p2 fire 2" },
344 
345 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
346 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "service"   },
347 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "tilt"      },
348 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
349 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
350 };
351 
352 STDINPUTINFO(Gunfront)
353 
354 static struct BurnInputInfo KoshienInputList[] =
355 {
356 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p1 coin"   },
357 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 start"  },
358 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p2 coin"   },
359 	{"Start 2"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p2 start"  },
360 
361 	{"P1 Up"             , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "p1 up"     },
362 	{"P1 Down"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "p1 down"   },
363 	{"P1 Left"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 left"   },
364 	{"P1 Right"          , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p1 right"  },
365 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 fire 1" },
366 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 fire 2" },
367 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 fire 3" },
368 
369 	{"P2 Up"             , BIT_DIGITAL   , TC0510NIOInputPort2 + 4, "p2 up"     },
370 	{"P2 Down"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 5, "p2 down"   },
371 	{"P2 Left"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 6, "p2 left"   },
372 	{"P2 Right"          , BIT_DIGITAL   , TC0510NIOInputPort2 + 7, "p2 right"  },
373 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p2 fire 1" },
374 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 5, "p2 fire 2" },
375 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 6, "p2 fire 3" },
376 
377 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
378 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "service"   },
379 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "tilt"      },
380 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
381 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
382 };
383 
384 STDINPUTINFO(Koshien)
385 
386 static struct BurnInputInfo LiquidkInputList[] =
387 {
388 	{"Coin 1"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 2, "p1 coin"   },
389 	{"Start 1"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 7, "p1 start"  },
390 	{"Coin 2"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 3, "p2 coin"   },
391 	{"Start 2"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 7, "p2 start"  },
392 
393 	{"P1 Up"             , BIT_DIGITAL   , TC0220IOCInputPort0 + 0, "p1 up"     },
394 	{"P1 Down"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 1, "p1 down"   },
395 	{"P1 Left"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 2, "p1 left"   },
396 	{"P1 Right"          , BIT_DIGITAL   , TC0220IOCInputPort0 + 3, "p1 right"  },
397 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 4, "p1 fire 1" },
398 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 5, "p1 fire 2" },
399 
400 	{"P2 Up"             , BIT_DIGITAL   , TC0220IOCInputPort1 + 0, "p2 up"     },
401 	{"P2 Down"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 1, "p2 down"   },
402 	{"P2 Left"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 2, "p2 left"   },
403 	{"P2 Right"          , BIT_DIGITAL   , TC0220IOCInputPort1 + 3, "p2 right"  },
404 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 4, "p2 fire 1" },
405 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 5, "p2 fire 2" },
406 
407 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
408 	{"Service"           , BIT_DIGITAL   , TC0220IOCInputPort2 + 1, "service"   },
409 	{"Tilt"              , BIT_DIGITAL   , TC0220IOCInputPort2 + 0, "tilt"      },
410 	{"Dip 1"             , BIT_DIPSWITCH , TC0220IOCDip + 0       , "dip"       },
411 	{"Dip 2"             , BIT_DIPSWITCH , TC0220IOCDip + 1       , "dip"       },
412 };
413 
414 STDINPUTINFO(Liquidk)
415 
416 static struct BurnInputInfo MegablstInputList[] =
417 {
418 	{"Coin 1"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 2, "p1 coin"   },
419 	{"Start 1"           , BIT_DIGITAL   , TC0220IOCInputPort2 + 4, "p1 start"  },
420 	{"Coin 2"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 3, "p2 coin"   },
421 	{"Start 2"           , BIT_DIGITAL   , TC0220IOCInputPort2 + 5, "p2 start"  },
422 
423 	{"P1 Up"             , BIT_DIGITAL   , TC0220IOCInputPort0 + 0, "p1 up"     },
424 	{"P1 Down"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 1, "p1 down"   },
425 	{"P1 Left"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 2, "p1 left"   },
426 	{"P1 Right"          , BIT_DIGITAL   , TC0220IOCInputPort0 + 3, "p1 right"  },
427 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 4, "p1 fire 1" },
428 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 5, "p1 fire 2" },
429 
430 	{"P2 Up"             , BIT_DIGITAL   , TC0220IOCInputPort1 + 0, "p2 up"     },
431 	{"P2 Down"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 1, "p2 down"   },
432 	{"P2 Left"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 2, "p2 left"   },
433 	{"P2 Right"          , BIT_DIGITAL   , TC0220IOCInputPort1 + 3, "p2 right"  },
434 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 4, "p2 fire 1" },
435 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 5, "p2 fire 2" },
436 
437 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
438 	{"Service"           , BIT_DIGITAL   , TC0220IOCInputPort2 + 1, "service"   },
439 	{"Tilt"              , BIT_DIGITAL   , TC0220IOCInputPort2 + 0, "tilt"      },
440 	{"Dip 1"             , BIT_DIPSWITCH , TC0220IOCDip + 0       , "dip"       },
441 	{"Dip 2"             , BIT_DIPSWITCH , TC0220IOCDip + 1       , "dip"       },
442 };
443 
444 STDINPUTINFO(Megablst)
445 
446 static struct BurnInputInfo MetalbInputList[] =
447 {
448 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 coin"   },
449 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p1 start"  },
450 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p2 coin"   },
451 	{"Start 2"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 7, "p2 start"  },
452 
453 	{"P1 Up"             , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 up"     },
454 	{"P1 Down"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 down"   },
455 	{"P1 Left"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 left"   },
456 	{"P1 Right"          , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 right"  },
457 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 fire 1" },
458 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 5, "p1 fire 2" },
459 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 6, "p1 fire 3" },
460 
461 	{"P2 Up"             , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "p2 up"     },
462 	{"P2 Down"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "p2 down"   },
463 	{"P2 Left"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p2 left"   },
464 	{"P2 Right"          , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p2 right"  },
465 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 4, "p2 fire 1" },
466 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 5, "p2 fire 2" },
467 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 6, "p2 fire 3" },
468 
469 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
470 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "service"   },
471 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "tilt"      },
472 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
473 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
474 };
475 
476 STDINPUTINFO(Metalb)
477 
478 static struct BurnInputInfo MjnquestInputList[] =
479 {
480 	{"Coin 1"             , BIT_DIGITAL   , TaitoInputPort5 + 1, "p1 coin"   },
481 	{"Start 1"            , BIT_DIGITAL   , TaitoInputPort0 + 5, "p1 start"  },
482 	{"Coin 2"             , BIT_DIGITAL   , TaitoInputPort4 + 1, "p2 coin"   },
483 
484 	{"P1 A"               , BIT_DIGITAL   , TaitoInputPort0 + 0, "mah a"     },
485 	{"P1 B"               , BIT_DIGITAL   , TaitoInputPort1 + 0, "mah b"     },
486 	{"P1 C"               , BIT_DIGITAL   , TaitoInputPort2 + 0, "mah c"     },
487 	{"P1 D"               , BIT_DIGITAL   , TaitoInputPort3 + 0, "mah d"     },
488 	{"P1 E"               , BIT_DIGITAL   , TaitoInputPort0 + 1, "mah e"     },
489 	{"P1 F"               , BIT_DIGITAL   , TaitoInputPort1 + 1, "mah f"     },
490 	{"P1 G"               , BIT_DIGITAL   , TaitoInputPort2 + 1, "mah g"     },
491 	{"P1 H"               , BIT_DIGITAL   , TaitoInputPort3 + 1, "mah h"     },
492 	{"P1 I"               , BIT_DIGITAL   , TaitoInputPort0 + 2, "mah i"     },
493 	{"P1 J"               , BIT_DIGITAL   , TaitoInputPort1 + 2, "mah j"     },
494 	{"P1 K"               , BIT_DIGITAL   , TaitoInputPort2 + 2, "mah k"     },
495 	{"P1 L"               , BIT_DIGITAL   , TaitoInputPort3 + 2, "mah l"     },
496 	{"P1 M"               , BIT_DIGITAL   , TaitoInputPort0 + 3, "mah m"     },
497 	{"P1 N"               , BIT_DIGITAL   , TaitoInputPort1 + 3, "mah n"     },
498 	{"P1 Kan"             , BIT_DIGITAL   , TaitoInputPort0 + 4, "mah kan"   },
499 	{"P1 Pon"             , BIT_DIGITAL   , TaitoInputPort3 + 3, "mah pon"   },
500 	{"P1 Chi"             , BIT_DIGITAL   , TaitoInputPort2 + 3, "mah chi"   },
501 	{"P1 Reach"           , BIT_DIGITAL   , TaitoInputPort1 + 4, "mah reach" },
502 	{"P1 Ron"             , BIT_DIGITAL   , TaitoInputPort2 + 4, "mah ron"   },
503 
504 	{"Reset"              , BIT_DIGITAL   , &TaitoReset        , "reset"     },
505 	{"Service"            , BIT_DIGITAL   , TaitoInputPort5 + 0, "service"   },
506 	{"Tilt"               , BIT_DIGITAL   , TaitoInputPort4 + 0, "tilt"      },
507 	{"Dip 1"              , BIT_DIPSWITCH , TaitoDip + 0       , "dip"       },
508 	{"Dip 2"              , BIT_DIPSWITCH , TaitoDip + 1       , "dip"       },
509 };
510 
511 STDINPUTINFO(Mjnquest)
512 
513 static struct BurnInputInfo NinjakInputList[] =
514 {
515 	{"Coin 1"            , BIT_DIGITAL   , TaitoInputPort2 + 4, "p1 coin"   },
516 	{"Start 1"           , BIT_DIGITAL   , TaitoInputPort0 + 7, "p1 start"  },
517 	{"Coin 2"            , BIT_DIGITAL   , TaitoInputPort2 + 5, "p2 coin"   },
518 	{"Start 2"           , BIT_DIGITAL   , TaitoInputPort1 + 7, "p2 start"  },
519 	{"Coin 3"            , BIT_DIGITAL   , TaitoInputPort2 + 6, "p3 coin"   },
520 	{"Start 3"           , BIT_DIGITAL   , TaitoInputPort3 + 7, "p3 start"  },
521 	{"Coin 4"            , BIT_DIGITAL   , TaitoInputPort2 + 7, "p4 coin"   },
522 	{"Start 4"           , BIT_DIGITAL   , TaitoInputPort4 + 7, "p4 start"  },
523 
524 	{"P1 Up"             , BIT_DIGITAL   , TaitoInputPort0 + 0, "p1 up"     },
525 	{"P1 Down"           , BIT_DIGITAL   , TaitoInputPort0 + 1, "p1 down"   },
526 	{"P1 Left"           , BIT_DIGITAL   , TaitoInputPort0 + 2, "p1 left"   },
527 	{"P1 Right"          , BIT_DIGITAL   , TaitoInputPort0 + 3, "p1 right"  },
528 	{"P1 Fire 1"         , BIT_DIGITAL   , TaitoInputPort0 + 4, "p1 fire 1" },
529 	{"P1 Fire 2"         , BIT_DIGITAL   , TaitoInputPort0 + 5, "p1 fire 2" },
530 
531 	{"P2 Up"             , BIT_DIGITAL   , TaitoInputPort1 + 0, "p2 up"     },
532 	{"P2 Down"           , BIT_DIGITAL   , TaitoInputPort1 + 1, "p2 down"   },
533 	{"P2 Left"           , BIT_DIGITAL   , TaitoInputPort1 + 2, "p2 left"   },
534 	{"P2 Right"          , BIT_DIGITAL   , TaitoInputPort1 + 3, "p2 right"  },
535 	{"P2 Fire 1"         , BIT_DIGITAL   , TaitoInputPort1 + 4, "p2 fire 1" },
536 	{"P2 Fire 2"         , BIT_DIGITAL   , TaitoInputPort1 + 5, "p2 fire 2" },
537 
538 	{"P3 Up"             , BIT_DIGITAL   , TaitoInputPort3 + 0, "p3 up"     },
539 	{"P3 Down"           , BIT_DIGITAL   , TaitoInputPort3 + 1, "p3 down"   },
540 	{"P3 Left"           , BIT_DIGITAL   , TaitoInputPort3 + 2, "p3 left"   },
541 	{"P3 Right"          , BIT_DIGITAL   , TaitoInputPort3 + 3, "p3 right"  },
542 	{"P3 Fire 1"         , BIT_DIGITAL   , TaitoInputPort3 + 4, "p3 fire 1" },
543 	{"P3 Fire 2"         , BIT_DIGITAL   , TaitoInputPort3 + 5, "p3 fire 2" },
544 
545 	{"P4 Up"             , BIT_DIGITAL   , TaitoInputPort4 + 0, "p4 up"     },
546 	{"P4 Down"           , BIT_DIGITAL   , TaitoInputPort4 + 1, "p4 down"   },
547 	{"P4 Left"           , BIT_DIGITAL   , TaitoInputPort4 + 2, "p4 left"   },
548 	{"P4 Right"          , BIT_DIGITAL   , TaitoInputPort4 + 3, "p4 right"  },
549 	{"P4 Fire 1"         , BIT_DIGITAL   , TaitoInputPort4 + 4, "p4 fire 1" },
550 	{"P4 Fire 2"         , BIT_DIGITAL   , TaitoInputPort4 + 5, "p4 fire 2" },
551 
552 	{"Reset"             , BIT_DIGITAL   , &TaitoReset        , "reset"     },
553 	{"Service"           , BIT_DIGITAL   , TaitoInputPort2 + 1, "service"   },
554 	{"Service 2"         , BIT_DIGITAL   , TaitoInputPort2 + 2, "service 2" },
555 	{"Tilt"              , BIT_DIGITAL   , TaitoInputPort2 + 0, "tilt"      },
556 	{"Dip 1"             , BIT_DIPSWITCH , TaitoDip + 0       , "dip"       },
557 	{"Dip 2"             , BIT_DIPSWITCH , TaitoDip + 1       , "dip"       },
558 };
559 
560 STDINPUTINFO(Ninjak)
561 
562 static struct BurnInputInfo PulirulaInputList[] =
563 {
564 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 coin"   },
565 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p1 start"  },
566 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p2 coin"   },
567 	{"Start 2"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 7, "p2 start"  },
568 
569 	{"P1 Up"             , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 up"     },
570 	{"P1 Down"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 down"   },
571 	{"P1 Left"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 left"   },
572 	{"P1 Right"          , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 right"  },
573 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 fire 1" },
574 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 5, "p1 fire 2" },
575 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 6, "p1 fire 3" },
576 
577 	{"P2 Up"             , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "p2 up"     },
578 	{"P2 Down"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "p2 down"   },
579 	{"P2 Left"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p2 left"   },
580 	{"P2 Right"          , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p2 right"  },
581 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 4, "p2 fire 1" },
582 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 5, "p2 fire 2" },
583 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 6, "p2 fire 3" },
584 
585 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
586 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "service"   },
587 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "tilt"      },
588 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
589 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
590 };
591 
592 STDINPUTINFO(Pulirula)
593 
594 static struct BurnInputInfo QcrayonInputList[] =
595 {
596 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 coin"   },
597 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p1 start"  },
598 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p2 coin"   },
599 	{"Start 2"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 7, "p2 start"  },
600 
601 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 fire 1" },
602 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 fire 2" },
603 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 fire 3" },
604 	{"P1 Fire 4"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 fire 4" },
605 	{"P1 Fire 5"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 fire 5" },
606 
607 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "p2 fire 1" },
608 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "p2 fire 2" },
609 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p2 fire 3" },
610 	{"P2 Fire 4"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p2 fire 4" },
611 	{"P2 Fire 5"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 4, "p2 fire 5" },
612 
613 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
614 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "service"   },
615 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "tilt"      },
616 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
617 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
618 };
619 
620 STDINPUTINFO(Qcrayon)
621 
622 static struct BurnInputInfo Qcrayon2InputList[] =
623 {
624 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 coin"   },
625 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p1 start"  },
626 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p2 coin"   },
627 	{"Start 2"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 7, "p2 start"  },
628 
629 	{"P1 Up"             , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 up"     },
630 	{"P1 Down"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 down"   },
631 	{"P1 Left"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 left"   },
632 	{"P1 Right"          , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 right"  },
633 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 fire 1" },
634 
635 	{"P2 Up"             , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "p2 up"     },
636 	{"P2 Down"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "p2 down"   },
637 	{"P2 Left"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p2 left"   },
638 	{"P2 Right"          , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p2 right"  },
639 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 4, "p2 fire 1" },
640 
641 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
642 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "service"   },
643 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "tilt"      },
644 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
645 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
646 };
647 
648 STDINPUTINFO(Qcrayon2)
649 
650 static struct BurnInputInfo QjinseiInputList[] =
651 {
652 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 coin"   },
653 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p1 start"  },
654 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p2 coin"   },
655 	{"Start 2"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 7, "p2 start"  },
656 
657 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 fire 1" },
658 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 fire 2" },
659 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 fire 3" },
660 	{"P1 Fire 4"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 fire 4" },
661 	{"P1 Fire 5"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 fire 5" },
662 
663 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "p2 fire 1" },
664 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "p2 fire 2" },
665 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p2 fire 3" },
666 	{"P2 Fire 4"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p2 fire 4" },
667 	{"P2 Fire 5"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 4, "p2 fire 5" },
668 
669 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
670 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "service"   },
671 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "tilt"      },
672 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
673 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
674 };
675 
676 STDINPUTINFO(Qjinsei)
677 
678 static struct BurnInputInfo QtorimonInputList[] =
679 {
680 	{"Coin 1"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 2, "p1 coin"   },
681 	{"Start 1"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 7, "p1 start"  },
682 	{"Coin 2"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 3, "p2 coin"   },
683 	{"Start 2"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 7, "p2 start"  },
684 
685 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 0, "p1 fire 1" },
686 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 1, "p1 fire 2" },
687 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 3, "p1 fire 3" },
688 	{"P1 Fire 4"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 2, "p1 fire 4" },
689 
690 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 0, "p2 fire 1" },
691 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 1, "p2 fire 2" },
692 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 3, "p2 fire 3" },
693 	{"P2 Fire 4"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 2, "p2 fire 4" },
694 
695 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
696 	{"Service"           , BIT_DIGITAL   , TC0220IOCInputPort2 + 1, "service"   },
697 	{"Tilt"              , BIT_DIGITAL   , TC0220IOCInputPort2 + 0, "tilt"      },
698 	{"Dip 1"             , BIT_DIPSWITCH , TC0220IOCDip + 0       , "dip"       },
699 	{"Dip 2"             , BIT_DIPSWITCH , TC0220IOCDip + 1       , "dip"       },
700 };
701 
702 STDINPUTINFO(Qtorimon)
703 
704 static struct BurnInputInfo QuizhqInputList[] =
705 {
706 	{"Coin 1"            , BIT_DIGITAL   , TaitoInputPort2 + 2, "p1 coin"   },
707 	{"Start 1"           , BIT_DIGITAL   , TaitoInputPort0 + 7, "p1 start"  },
708 	{"Coin 2"            , BIT_DIGITAL   , TaitoInputPort2 + 3, "p2 coin"   },
709 	{"Start 2"           , BIT_DIGITAL   , TaitoInputPort1 + 7, "p2 start"  },
710 
711 	{"P1 Fire 1"         , BIT_DIGITAL   , TaitoInputPort0 + 0, "p1 fire 1" },
712 	{"P1 Fire 2"         , BIT_DIGITAL   , TaitoInputPort0 + 1, "p1 fire 2" },
713 	{"P1 Fire 3"         , BIT_DIGITAL   , TaitoInputPort0 + 3, "p1 fire 3" },
714 	{"P1 Fire 4"         , BIT_DIGITAL   , TaitoInputPort0 + 2, "p1 fire 4" },
715 	{"P1 Fire 5"         , BIT_DIGITAL   , TaitoInputPort0 + 4, "p1 fire 5" },
716 
717 	{"P2 Fire 1"         , BIT_DIGITAL   , TaitoInputPort1 + 0, "p2 fire 1" },
718 	{"P2 Fire 2"         , BIT_DIGITAL   , TaitoInputPort1 + 1, "p2 fire 2" },
719 	{"P2 Fire 3"         , BIT_DIGITAL   , TaitoInputPort1 + 3, "p2 fire 3" },
720 	{"P2 Fire 4"         , BIT_DIGITAL   , TaitoInputPort1 + 2, "p2 fire 4" },
721 	{"P2 Fire 5"         , BIT_DIGITAL   , TaitoInputPort1 + 4, "p2 fire 5" },
722 
723 	{"Reset"             , BIT_DIGITAL   , &TaitoReset        , "reset"     },
724 	{"Service"           , BIT_DIGITAL   , TaitoInputPort2 + 1, "service"   },
725 	{"Tilt"              , BIT_DIGITAL   , TaitoInputPort2 + 0, "tilt"      },
726 	{"Dip 1"             , BIT_DIPSWITCH , TaitoDip + 0       , "dip"       },
727 	{"Dip 2"             , BIT_DIPSWITCH , TaitoDip + 1       , "dip"       },
728 };
729 
730 STDINPUTINFO(Quizhq)
731 
732 static struct BurnInputInfo QzchikyuInputList[] =
733 {
734 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 coin"   },
735 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p1 start"  },
736 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p2 coin"   },
737 	{"Start 2"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 7, "p2 start"  },
738 
739 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 fire 1" },
740 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 fire 2" },
741 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 fire 3" },
742 	{"P1 Fire 4"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 fire 4" },
743 	{"P1 Fire 5"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 fire 5" },
744 
745 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "p2 fire 1" },
746 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "p2 fire 2" },
747 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p2 fire 3" },
748 	{"P2 Fire 4"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p2 fire 4" },
749 	{"P2 Fire 5"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 5, "p2 fire 5" },
750 
751 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
752 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "service"   },
753 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "tilt"      },
754 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
755 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
756 };
757 
758 STDINPUTINFO(Qzchikyu)
759 
760 static struct BurnInputInfo QzquestInputList[] =
761 {
762 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 coin"   },
763 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p1 start"  },
764 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p2 coin"   },
765 	{"Start 2"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 7, "p2 start"  },
766 
767 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 fire 1" },
768 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 fire 2" },
769 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 fire 3" },
770 	{"P1 Fire 4"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 fire 4" },
771 	{"P1 Fire 5"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 fire 5" },
772 
773 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "p2 fire 1" },
774 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "p2 fire 2" },
775 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p2 fire 3" },
776 	{"P2 Fire 4"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p2 fire 4" },
777 	{"P2 Fire 5"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 5, "p2 fire 5" },
778 
779 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
780 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "service"   },
781 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "tilt"      },
782 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
783 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
784 };
785 
786 STDINPUTINFO(Qzquest)
787 
788 static struct BurnInputInfo SolfigtrInputList[] =
789 {
790 	{"Coin 1"            , BIT_DIGITAL   , TaitoInputPort2 + 2, "p1 coin"   },
791 	{"Start 1"           , BIT_DIGITAL   , TaitoInputPort0 + 7, "p1 start"  },
792 	{"Coin 2"            , BIT_DIGITAL   , TaitoInputPort2 + 3, "p2 coin"   },
793 	{"Start 2"           , BIT_DIGITAL   , TaitoInputPort1 + 7, "p2 start"  },
794 
795 	{"P1 Up"             , BIT_DIGITAL   , TaitoInputPort0 + 0, "p1 up"     },
796 	{"P1 Down"           , BIT_DIGITAL   , TaitoInputPort0 + 1, "p1 down"   },
797 	{"P1 Left"           , BIT_DIGITAL   , TaitoInputPort0 + 2, "p1 left"   },
798 	{"P1 Right"          , BIT_DIGITAL   , TaitoInputPort0 + 3, "p1 right"  },
799 	{"P1 Fire 1"         , BIT_DIGITAL   , TaitoInputPort0 + 4, "p1 fire 1" },
800 	{"P1 Fire 2"         , BIT_DIGITAL   , TaitoInputPort0 + 5, "p1 fire 2" },
801 	{"P1 Fire 3"         , BIT_DIGITAL   , TaitoInputPort0 + 6, "p1 fire 3" },
802 
803 	{"P2 Up"             , BIT_DIGITAL   , TaitoInputPort1 + 0, "p2 up"     },
804 	{"P2 Down"           , BIT_DIGITAL   , TaitoInputPort1 + 1, "p2 down"   },
805 	{"P2 Left"           , BIT_DIGITAL   , TaitoInputPort1 + 2, "p2 left"   },
806 	{"P2 Right"          , BIT_DIGITAL   , TaitoInputPort1 + 3, "p2 right"  },
807 	{"P2 Fire 1"         , BIT_DIGITAL   , TaitoInputPort1 + 4, "p2 fire 1" },
808 	{"P2 Fire 2"         , BIT_DIGITAL   , TaitoInputPort1 + 5, "p2 fire 2" },
809 	{"P2 Fire 3"         , BIT_DIGITAL   , TaitoInputPort1 + 6, "p2 fire 3" },
810 
811 	{"Reset"             , BIT_DIGITAL   , &TaitoReset        , "reset"     },
812 	{"Service"           , BIT_DIGITAL   , TaitoInputPort2 + 1, "service"   },
813 	{"Tilt"              , BIT_DIGITAL   , TaitoInputPort2 + 0, "tilt"      },
814 	{"Dip 1"             , BIT_DIPSWITCH , TaitoDip + 0       , "dip"       },
815 	{"Dip 2"             , BIT_DIPSWITCH , TaitoDip + 1       , "dip"       },
816 };
817 
818 STDINPUTINFO(Solfigtr)
819 
820 static struct BurnInputInfo SsiInputList[] =
821 {
822 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 coin"   },
823 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p1 start"  },
824 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p2 coin"   },
825 	{"Start 2"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 7, "p2 start"  },
826 
827 	{"P1 Up"             , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 up"     },
828 	{"P1 Down"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 down"   },
829 	{"P1 Left"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 left"   },
830 	{"P1 Right"          , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 right"  },
831 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 fire 1" },
832 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 5, "p1 fire 2" },
833 
834 	{"P2 Up"             , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "p2 up"     },
835 	{"P2 Down"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "p2 down"   },
836 	{"P2 Left"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p2 left"   },
837 	{"P2 Right"          , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p2 right"  },
838 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 4, "p2 fire 1" },
839 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 5, "p2 fire 2" },
840 
841 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
842 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "service"   },
843 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "tilt"      },
844 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
845 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
846 };
847 
848 STDINPUTINFO(Ssi)
849 
850 static struct BurnInputInfo ThundfoxInputList[] =
851 {
852 	{"Coin 1"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 2, "p1 coin"   },
853 	{"Start 1"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 7, "p1 start"  },
854 	{"Coin 2"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 3, "p2 coin"   },
855 	{"Start 2"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 7, "p2 start"  },
856 
857 	{"P1 Up"             , BIT_DIGITAL   , TC0220IOCInputPort0 + 0, "p1 up"     },
858 	{"P1 Down"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 1, "p1 down"   },
859 	{"P1 Left"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 2, "p1 left"   },
860 	{"P1 Right"          , BIT_DIGITAL   , TC0220IOCInputPort0 + 3, "p1 right"  },
861 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 4, "p1 fire 1" },
862 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 5, "p1 fire 2" },
863 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0220IOCInputPort0 + 6, "p1 fire 3" },
864 
865 	{"P2 Up"             , BIT_DIGITAL   , TC0220IOCInputPort1 + 0, "p2 up"     },
866 	{"P2 Down"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 1, "p2 down"   },
867 	{"P2 Left"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 2, "p2 left"   },
868 	{"P2 Right"          , BIT_DIGITAL   , TC0220IOCInputPort1 + 3, "p2 right"  },
869 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 4, "p2 fire 1" },
870 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 5, "p2 fire 2" },
871 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0220IOCInputPort1 + 6, "p2 fire 3" },
872 
873 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
874 	{"Service"           , BIT_DIGITAL   , TC0220IOCInputPort2 + 1, "service"   },
875 	{"Tilt"              , BIT_DIGITAL   , TC0220IOCInputPort2 + 0, "tilt"      },
876 	{"Dip 1"             , BIT_DIPSWITCH , TC0220IOCDip + 0       , "dip"       },
877 	{"Dip 2"             , BIT_DIPSWITCH , TC0220IOCDip + 1       , "dip"       },
878 };
879 
880 STDINPUTINFO(Thundfox)
881 
882 static struct BurnInputInfo YesnojInputList[] =
883 {
884 	{"Coin 1"            , BIT_DIGITAL   , TaitoInputPort1 + 2, "p1 coin"   },
885 	{"Coin 2"            , BIT_DIGITAL   , TaitoInputPort1 + 3, "p2 coin"   },
886 
887 	{"P1 Fire 1"         , BIT_DIGITAL   , TaitoInputPort0 + 0, "p1 fire 1" },
888 	{"P1 Fire 2"         , BIT_DIGITAL   , TaitoInputPort0 + 1, "p1 fire 2" },
889 
890 	{"P2 Fire 1"         , BIT_DIGITAL   , TaitoInputPort0 + 2, "p2 fire 1" },
891 	{"P2 Fire 2"         , BIT_DIGITAL   , TaitoInputPort0 + 3, "p2 fire 2" },
892 
893 	{"Reset"             , BIT_DIGITAL   , &TaitoReset        , "reset"     },
894 	{"Service"           , BIT_DIGITAL   , TaitoInputPort1 + 1, "service"   },
895 	{"Tilt"              , BIT_DIGITAL   , TaitoInputPort1 + 0, "tilt"      },
896 	{"Dip 1"             , BIT_DIPSWITCH , TaitoDip + 0       , "dip"       },
897 	{"Dip 2"             , BIT_DIPSWITCH , TaitoDip + 1       , "dip"       },
898 };
899 
900 STDINPUTINFO(Yesnoj)
901 
902 static struct BurnInputInfo YuyugogoInputList[] =
903 {
904 	{"Coin 1"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 2, "p1 coin"   },
905 	{"Start 1"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p1 start"  },
906 	{"Coin 2"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "p2 coin"   },
907 	{"Start 2"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 7, "p2 start"  },
908 
909 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "p1 fire 1" },
910 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "p1 fire 2" },
911 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p1 fire 3" },
912 	{"P1 Fire 4"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 fire 4" },
913 	{"P1 Fire 5"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 fire 5" },
914 
915 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "p2 fire 1" },
916 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "p2 fire 2" },
917 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p2 fire 3" },
918 	{"P2 Fire 4"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p2 fire 4" },
919 	{"P2 Fire 5"         , BIT_DIGITAL   , TC0510NIOInputPort1 + 4, "p2 fire 5" },
920 
921 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
922 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort2 + 1, "service"   },
923 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort2 + 0, "tilt"      },
924 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
925 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
926 };
927 
STDINPUTINFO(Yuyugogo)928 STDINPUTINFO(Yuyugogo)
929 
930 #undef A
931 
932 static inline void DrvClearOppositesCommon(UINT8* nJoystickInputs)
933 {
934 	if ((*nJoystickInputs & 0x03) == 0x00) {
935 		*nJoystickInputs |= 0x03;
936 	}
937 	if ((*nJoystickInputs & 0x0c) == 0x00) {
938 		*nJoystickInputs |= 0x0c;
939 	}
940 }
941 
TC0220IOCMakeInputs()942 static void TC0220IOCMakeInputs()
943 {
944 	// Reset Inputs
945 	TC0220IOCInput[0] = 0xff;
946 	TC0220IOCInput[1] = 0xff;
947 	TC0220IOCInput[2] = 0xff;
948 
949 	for (INT32 i = 0; i < 8; i++) {
950 		TC0220IOCInput[0] -= (TC0220IOCInputPort0[i] & 1) << i;
951 		TC0220IOCInput[1] -= (TC0220IOCInputPort1[i] & 1) << i;
952 		TC0220IOCInput[2] -= (TC0220IOCInputPort2[i] & 1) << i;
953 	}
954 
955 	if (bNoClearOpposites == 0) {
956 		DrvClearOppositesCommon(&TC0220IOCInput[0]);
957 		DrvClearOppositesCommon(&TC0220IOCInput[1]);
958 	}
959 }
960 
TC0510NIOMakeInputs()961 static void TC0510NIOMakeInputs()
962 {
963 	// Reset Inputs
964 	TC0510NIOInput[0] = 0xff;
965 	TC0510NIOInput[1] = 0xff;
966 	TC0510NIOInput[2] = 0xff;
967 
968 	for (INT32 i = 0; i < 8; i++) {
969 		TC0510NIOInput[0] -= (TC0510NIOInputPort0[i] & 1) << i;
970 		TC0510NIOInput[1] -= (TC0510NIOInputPort1[i] & 1) << i;
971 		TC0510NIOInput[2] -= (TC0510NIOInputPort2[i] & 1) << i;
972 	}
973 
974 	if (bNoClearOpposites == 0) {
975 		DrvClearOppositesCommon(&TC0510NIOInput[0]);
976 		DrvClearOppositesCommon(&TC0510NIOInput[1]);
977 	}
978 }
979 
TaitoF2MakeInputs()980 static void TaitoF2MakeInputs()
981 {
982 	// Reset Inputs
983 	TaitoInput[0] = 0xff;
984 	TaitoInput[1] = 0xff;
985 	TaitoInput[2] = 0xff;
986 	TaitoInput[3] = 0xff;
987 	TaitoInput[4] = 0xff;
988 	TaitoInput[5] = 0xff;
989 
990 	for (INT32 i = 0; i < 8; i++) {
991 		TaitoInput[0] -= (TaitoInputPort0[i] & 1) << i;
992 		TaitoInput[1] -= (TaitoInputPort1[i] & 1) << i;
993 		TaitoInput[2] -= (TaitoInputPort2[i] & 1) << i;
994 		TaitoInput[3] -= (TaitoInputPort3[i] & 1) << i;
995 		TaitoInput[4] -= (TaitoInputPort4[i] & 1) << i;
996 		TaitoInput[5] -= (TaitoInputPort5[i] & 1) << i;
997 	}
998 
999 	if (bNoClearOpposites == 0) {
1000 		DrvClearOppositesCommon(&TaitoInput[0]);
1001 		DrvClearOppositesCommon(&TaitoInput[1]);
1002 		DrvClearOppositesCommon(&TaitoInput[3]);
1003 		DrvClearOppositesCommon(&TaitoInput[4]);
1004 	}
1005 }
1006 
1007 static struct BurnDIPInfo CameltryDIPList[]=
1008 {
1009 	// Default Values
1010 	{0x0b, 0xff, 0xff, 0xfe, NULL                             },
1011 	{0x0c, 0xff, 0xff, 0x7f, NULL                             },
1012 
1013 	// Dip 1
1014 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
1015 	{0x0b, 0x01, 0x01, 0x00, "Upright"                        },
1016 	{0x0b, 0x01, 0x01, 0x01, "Cocktail"                       },
1017 
1018 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1019 	{0x0b, 0x01, 0x02, 0x02, "Off"                            },
1020 	{0x0b, 0x01, 0x02, 0x00, "On"                             },
1021 
1022 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1023 	{0x0b, 0x01, 0x04, 0x04, "Off"                            },
1024 	{0x0b, 0x01, 0x04, 0x00, "On"                             },
1025 
1026 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1027 	{0x0b, 0x01, 0x08, 0x00, "Off"                            },
1028 	{0x0b, 0x01, 0x08, 0x08, "On"                             },
1029 
1030 	{0   , 0xfe, 0   , 4   , "Coinage"                        },
1031 	{0x0b, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
1032 	{0x0b, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
1033 	{0x0b, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
1034 	{0x0b, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1035 
1036 	{0   , 0xfe, 0   , 4   , "Price to Continue"              },
1037 	{0x0b, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
1038 	{0x0b, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
1039 	{0x0b, 0x01, 0xc0, 0x80, "1 Coin 1 Credit"                },
1040 	{0x0b, 0x01, 0xc0, 0xc0, "Same as start"                  },
1041 
1042 	// Dip 2
1043 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1044 	{0x0c, 0x01, 0x03, 0x02, "Easy"                           },
1045 	{0x0c, 0x01, 0x03, 0x03, "Medium"                         },
1046 	{0x0c, 0x01, 0x03, 0x01, "Hard"                           },
1047 	{0x0c, 0x01, 0x03, 0x00, "Hardest"                        },
1048 
1049 	{0   , 0xfe, 0   , 4   , "Start remain time"              },
1050 	{0x0c, 0x01, 0x0c, 0x00, "35"                             },
1051 	{0x0c, 0x01, 0x0c, 0x04, "40"                             },
1052 	{0x0c, 0x01, 0x0c, 0x0c, "50"                             },
1053 	{0x0c, 0x01, 0x0c, 0x08, "60"                             },
1054 
1055 	{0   , 0xfe, 0   , 4   , "Continue play time"             },
1056 	{0x0c, 0x01, 0x30, 0x00, "+20"                            },
1057 	{0x0c, 0x01, 0x30, 0x10, "+25"                            },
1058 	{0x0c, 0x01, 0x30, 0x30, "+30"                            },
1059 	{0x0c, 0x01, 0x30, 0x20, "+40"                            },
1060 
1061 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
1062 	{0x0c, 0x01, 0x40, 0x00, "Off"                            },
1063 	{0x0c, 0x01, 0x40, 0x40, "On"                             },
1064 
1065 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
1066 	{0x0c, 0x01, 0x80, 0x80, "Single"                         },
1067 	{0x0c, 0x01, 0x80, 0x00, "Dual"                           },
1068 };
1069 
1070 STDDIPINFO(Cameltry)
1071 
1072 static struct BurnDIPInfo CameltrjDIPList[]=
1073 {
1074 	// Default Values
1075 	{0x0b, 0xff, 0xff, 0xfe, NULL                             },
1076 	{0x0c, 0xff, 0xff, 0x7f, NULL                             },
1077 
1078 	// Dip 1
1079 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
1080 	{0x0b, 0x01, 0x01, 0x00, "Upright"                        },
1081 	{0x0b, 0x01, 0x01, 0x01, "Cocktail"                       },
1082 
1083 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1084 	{0x0b, 0x01, 0x02, 0x02, "Off"                            },
1085 	{0x0b, 0x01, 0x02, 0x00, "On"                             },
1086 
1087 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1088 	{0x0b, 0x01, 0x04, 0x04, "Off"                            },
1089 	{0x0b, 0x01, 0x04, 0x00, "On"                             },
1090 
1091 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1092 	{0x0b, 0x01, 0x08, 0x00, "Off"                            },
1093 	{0x0b, 0x01, 0x08, 0x08, "On"                             },
1094 
1095 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1096 	{0x0b, 0x01, 0x30, 0x00, "2 Coins 1 Credit"               },
1097 	{0x0b, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1098 	{0x0b, 0x01, 0x30, 0x00, "2 Coins 3 Credits"              },
1099 	{0x0b, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
1100 
1101 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1102 	{0x0b, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
1103 	{0x0b, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
1104 	{0x0b, 0x01, 0xc0, 0x00, "2 Coins 3 Credits"              },
1105 	{0x0b, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
1106 
1107 	// Dip 2
1108 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1109 	{0x0c, 0x01, 0x03, 0x02, "Easy"                           },
1110 	{0x0c, 0x01, 0x03, 0x03, "Medium"                         },
1111 	{0x0c, 0x01, 0x03, 0x01, "Hard"                           },
1112 	{0x0c, 0x01, 0x03, 0x00, "Hardest"                        },
1113 
1114 	{0   , 0xfe, 0   , 4   , "Start remain time"              },
1115 	{0x0c, 0x01, 0x0c, 0x00, "35"                             },
1116 	{0x0c, 0x01, 0x0c, 0x04, "40"                             },
1117 	{0x0c, 0x01, 0x0c, 0x0c, "50"                             },
1118 	{0x0c, 0x01, 0x0c, 0x08, "60"                             },
1119 
1120 	{0   , 0xfe, 0   , 4   , "Continue play time"             },
1121 	{0x0c, 0x01, 0x30, 0x00, "+20"                            },
1122 	{0x0c, 0x01, 0x30, 0x10, "+25"                            },
1123 	{0x0c, 0x01, 0x30, 0x30, "+30"                            },
1124 	{0x0c, 0x01, 0x30, 0x20, "+40"                            },
1125 
1126 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
1127 	{0x0c, 0x01, 0x40, 0x00, "Off"                            },
1128 	{0x0c, 0x01, 0x40, 0x40, "On"                             },
1129 
1130 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
1131 	{0x0c, 0x01, 0x80, 0x80, "Single"                         },
1132 	{0x0c, 0x01, 0x80, 0x00, "Dual"                           },
1133 };
1134 
1135 STDDIPINFO(Cameltrj)
1136 
1137 static struct BurnDIPInfo DeadconxDIPList[]=
1138 {
1139 	// Default Values
1140 	{0x15, 0xff, 0xff, 0xfe, NULL                             },
1141 	{0x16, 0xff, 0xff, 0xff, NULL                             },
1142 
1143 	// Dip 1
1144 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
1145 	{0x15, 0x01, 0x01, 0x00, "Upright"                        },
1146 	{0x15, 0x01, 0x01, 0x01, "Cocktail"                       },
1147 
1148 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1149 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
1150 	{0x15, 0x01, 0x02, 0x00, "On"                             },
1151 
1152 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1153 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
1154 	{0x15, 0x01, 0x04, 0x00, "On"                             },
1155 
1156 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1157 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
1158 	{0x15, 0x01, 0x08, 0x08, "On"                             },
1159 
1160 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1161 	{0x15, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
1162 	{0x15, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
1163 	{0x15, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
1164 	{0x15, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1165 
1166 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1167 	{0x15, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
1168 	{0x15, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
1169 	{0x15, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
1170 	{0x15, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
1171 
1172 	// Dip 2
1173 	{0   , 0xfe, 0   , 4   , "Number of Enemies 1/2 Player"	  },
1174 	{0x16, 0x01, 0x03, 0x01, "25/45 (Easy)"					  },
1175 	{0x16, 0x01, 0x03, 0x03, "30/50 (Medium)"				  },
1176 	{0x16, 0x01, 0x03, 0x02, "40/60 (Hard)"					  },
1177 	{0x16, 0x01, 0x03, 0x00, "50/70 (Hardest)"				  },
1178 
1179 	{0   , 0xfe, 0   , 4   , "Life Meter"					  },
1180 	{0x16, 0x01, 0x18, 0x00, "5  (Small)"					  },
1181 	{0x16, 0x01, 0x18, 0x10, "8  (Normal)"					  },
1182 	{0x16, 0x01, 0x18, 0x18, "10 (Big)"						  },
1183 	{0x16, 0x01, 0x18, 0x08, "12 (Biggest)"					  },
1184 
1185 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
1186 	{0x16, 0x01, 0x80, 0x00, "1 Player Only"                  },
1187 	{0x16, 0x01, 0x80, 0x80, "Multiplayer"                    },
1188 };
1189 
1190 STDDIPINFO(Deadconx)
1191 
1192 static struct BurnDIPInfo DeadconxjDIPList[]=
1193 {
1194 	// Default Values
1195 	{0x15, 0xff, 0xff, 0xfe, NULL                             },
1196 	{0x16, 0xff, 0xff, 0xff, NULL                             },
1197 
1198 	// Dip 1
1199 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
1200 	{0x15, 0x01, 0x01, 0x00, "Upright"                        },
1201 	{0x15, 0x01, 0x01, 0x01, "Cocktail"                       },
1202 
1203 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1204 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
1205 	{0x15, 0x01, 0x02, 0x00, "On"                             },
1206 
1207 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1208 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
1209 	{0x15, 0x01, 0x04, 0x00, "On"                             },
1210 
1211 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1212 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
1213 	{0x15, 0x01, 0x08, 0x08, "On"                             },
1214 
1215 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1216 	{0x15, 0x01, 0x0c, 0x00, "3 Coins 1 Credit"               },
1217 	{0x15, 0x01, 0x0c, 0x08, "2 Coins 1 Credit"               },
1218 	{0x15, 0x01, 0x0c, 0x0c, "1 Coin  1 Credit"               },
1219 	{0x15, 0x01, 0x0c, 0x04, "1 Coin  2 Credits"              },
1220 
1221 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1222 	{0x15, 0x01, 0x03, 0x00, "3 Coins 1 Credit"               },
1223 	{0x15, 0x01, 0x03, 0x02, "2 Coins 1 Credit"               },
1224 	{0x15, 0x01, 0x03, 0x03, "1 Coin  1 Credit"               },
1225 	{0x15, 0x01, 0x03, 0x01, "1 Coin  2 Credits"              },
1226 
1227 	// Dip 2
1228 	{0   , 0xfe, 0   , 4   , "Number of Enemies 1/2 Player"	  },
1229 	{0x16, 0x01, 0x03, 0x01, "25/45 (Easy)"					  },
1230 	{0x16, 0x01, 0x03, 0x03, "30/50 (Medium)"				  },
1231 	{0x16, 0x01, 0x03, 0x02, "40/60 (Hard)"					  },
1232 	{0x16, 0x01, 0x03, 0x00, "50/70 (Hardest)"				  },
1233 
1234 	{0   , 0xfe, 0   , 4   , "Life Meter"					  },
1235 	{0x16, 0x01, 0x18, 0x00, "5  (Small)"					  },
1236 	{0x16, 0x01, 0x18, 0x10, "8  (Normal)"					  },
1237 	{0x16, 0x01, 0x18, 0x18, "10 (Big)"						  },
1238 	{0x16, 0x01, 0x18, 0x08, "12 (Biggest)"					  },
1239 
1240 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
1241 	{0x16, 0x01, 0x80, 0x00, "1 Player Only"                  },
1242 	{0x16, 0x01, 0x80, 0x80, "Multiplayer"                    },
1243 };
1244 
1245 STDDIPINFO(Deadconxj)
1246 
1247 static struct BurnDIPInfo DinorexDIPList[]=
1248 {
1249 	// Default Values
1250 	{0x15, 0xff, 0xff, 0xff, NULL                             },
1251 	{0x16, 0xff, 0xff, 0xff, NULL                             },
1252 
1253 	// Dip 1
1254 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1255 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
1256 	{0x15, 0x01, 0x02, 0x00, "On"                             },
1257 
1258 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1259 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
1260 	{0x15, 0x01, 0x04, 0x00, "On"                             },
1261 
1262 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1263 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
1264 	{0x15, 0x01, 0x08, 0x08, "On"                             },
1265 
1266 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1267 	{0x15, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
1268 	{0x15, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
1269 	{0x15, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
1270 	{0x15, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1271 
1272 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1273 	{0x15, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
1274 	{0x15, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
1275 	{0x15, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
1276 	{0x15, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
1277 
1278 	// Dip 2
1279 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1280 	{0x16, 0x01, 0x03, 0x02, "Easy"                           },
1281 	{0x16, 0x01, 0x03, 0x03, "Medium"                         },
1282 	{0x16, 0x01, 0x03, 0x01, "Hard"                           },
1283 	{0x16, 0x01, 0x03, 0x00, "Hardest"                        },
1284 
1285 	{0   , 0xfe, 0   , 4   , "Damage"                         },
1286 	{0x16, 0x01, 0x0c, 0x08, "Small"                          },
1287 	{0x16, 0x01, 0x0c, 0x0c, "Normal"                         },
1288 	{0x16, 0x01, 0x0c, 0x04, "Big"                            },
1289 	{0x16, 0x01, 0x0c, 0x00, "Biggest"                        },
1290 
1291 	{0   , 0xfe, 0   , 2   , "Timer Speed"                    },
1292 	{0x16, 0x01, 0x10, 0x10, "Normal"                         },
1293 	{0x16, 0x01, 0x10, 0x00, "Fast"                           },
1294 
1295 	{0   , 0xfe, 0   , 2   , "Match Type"                     },
1296 	{0x16, 0x01, 0x20, 0x20, "Best of 3"                      },
1297 	{0x16, 0x01, 0x20, 0x00, "Single"                         },
1298 
1299 	{0   , 0xfe, 0   , 2   , "2 Player Mode"                  },
1300 	{0x16, 0x01, 0x40, 0x40, "Upright"                        },
1301 	{0x16, 0x01, 0x40, 0x00, "Cocktail"                       },
1302 
1303 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
1304 	{0x16, 0x01, 0x80, 0x00, "Single"                         },
1305 	{0x16, 0x01, 0x80, 0x80, "Dual"                           },
1306 };
1307 
1308 STDDIPINFO(Dinorex)
1309 
1310 static struct BurnDIPInfo DinorexjDIPList[]=
1311 {
1312 	// Default Values
1313 	{0x15, 0xff, 0xff, 0xff, NULL                             },
1314 	{0x16, 0xff, 0xff, 0xff, NULL                             },
1315 
1316 	// Dip 1
1317 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1318 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
1319 	{0x15, 0x01, 0x02, 0x00, "On"                             },
1320 
1321 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1322 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
1323 	{0x15, 0x01, 0x04, 0x00, "On"                             },
1324 
1325 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1326 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
1327 	{0x15, 0x01, 0x08, 0x08, "On"                             },
1328 
1329 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1330 	{0x15, 0x01, 0x0c, 0x00, "3 Coins 1 Credit"               },
1331 	{0x15, 0x01, 0x0c, 0x08, "2 Coins 1 Credit"               },
1332 	{0x15, 0x01, 0x0c, 0x0c, "1 Coin  1 Credit"               },
1333 	{0x15, 0x01, 0x0c, 0x04, "1 Coin  2 Credits"              },
1334 
1335 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1336 	{0x15, 0x01, 0x03, 0x00, "3 Coins 1 Credit"               },
1337 	{0x15, 0x01, 0x03, 0x02, "2 Coins 1 Credit"               },
1338 	{0x15, 0x01, 0x03, 0x03, "1 Coin  1 Credit"               },
1339 	{0x15, 0x01, 0x03, 0x01, "1 Coin  2 Credits"              },
1340 
1341 	// Dip 2
1342 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1343 	{0x16, 0x01, 0x03, 0x02, "Easy"                           },
1344 	{0x16, 0x01, 0x03, 0x03, "Medium"                         },
1345 	{0x16, 0x01, 0x03, 0x01, "Hard"                           },
1346 	{0x16, 0x01, 0x03, 0x00, "Hardest"                        },
1347 
1348 	{0   , 0xfe, 0   , 4   , "Damage"                         },
1349 	{0x16, 0x01, 0x0c, 0x08, "Small"                          },
1350 	{0x16, 0x01, 0x0c, 0x0c, "Normal"                         },
1351 	{0x16, 0x01, 0x0c, 0x04, "Big"                            },
1352 	{0x16, 0x01, 0x0c, 0x00, "Biggest"                        },
1353 
1354 	{0   , 0xfe, 0   , 2   , "Timer Speed"                    },
1355 	{0x16, 0x01, 0x10, 0x10, "Normal"                         },
1356 	{0x16, 0x01, 0x10, 0x00, "Fast"                           },
1357 
1358 	{0   , 0xfe, 0   , 2   , "Match Type"                     },
1359 	{0x16, 0x01, 0x20, 0x20, "Best of 3"                      },
1360 	{0x16, 0x01, 0x20, 0x00, "Single"                         },
1361 
1362 	{0   , 0xfe, 0   , 2   , "2 Player Mode"                  },
1363 	{0x16, 0x01, 0x40, 0x40, "Upright"                        },
1364 	{0x16, 0x01, 0x40, 0x00, "Cocktail"                       },
1365 
1366 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
1367 	{0x16, 0x01, 0x80, 0x00, "Single"                         },
1368 	{0x16, 0x01, 0x80, 0x80, "Dual"                           },
1369 };
1370 
1371 STDDIPINFO(Dinorexj)
1372 
1373 static struct BurnDIPInfo DondokodDIPList[]=
1374 {
1375 	// Default Values
1376 	{0x13, 0xff, 0xff, 0xff, NULL                             },
1377 	{0x14, 0xff, 0xff, 0xff, NULL                             },
1378 
1379 	// Dip 1
1380 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1381 	{0x13, 0x01, 0x02, 0x02, "Off"                            },
1382 	{0x13, 0x01, 0x02, 0x00, "On"                             },
1383 
1384 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1385 	{0x13, 0x01, 0x04, 0x04, "Off"                            },
1386 	{0x13, 0x01, 0x04, 0x00, "On"                             },
1387 
1388 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1389 	{0x13, 0x01, 0x08, 0x00, "Off"                            },
1390 	{0x13, 0x01, 0x08, 0x08, "On"                             },
1391 
1392 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1393 	{0x13, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
1394 	{0x13, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
1395 	{0x13, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
1396 	{0x13, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1397 
1398 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1399 	{0x13, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
1400 	{0x13, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
1401 	{0x13, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
1402 	{0x13, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
1403 
1404 	// Dip 2
1405 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1406 	{0x14, 0x01, 0x03, 0x02, "Easy"                           },
1407 	{0x14, 0x01, 0x03, 0x03, "Medium"                         },
1408 	{0x14, 0x01, 0x03, 0x01, "Hard"                           },
1409 	{0x14, 0x01, 0x03, 0x00, "Hardest"                        },
1410 
1411 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
1412 	{0x14, 0x01, 0x0c, 0x0c, "10k and 100k"                   },
1413 	{0x14, 0x01, 0x0c, 0x08, "10k and 150k"                   },
1414 	{0x14, 0x01, 0x0c, 0x04, "10k and 250k"                   },
1415 	{0x14, 0x01, 0x0c, 0x00, "10k and 350k"                   },
1416 
1417 	{0   , 0xfe, 0   , 4   , "Lives"                          },
1418 	{0x14, 0x01, 0x30, 0x20, "2"                              },
1419 	{0x14, 0x01, 0x30, 0x30, "3"                              },
1420 	{0x14, 0x01, 0x30, 0x00, "4"                              },
1421 	{0x14, 0x01, 0x30, 0x10, "5"                              },
1422 };
1423 
1424 STDDIPINFO(Dondokod)
1425 
1426 static struct BurnDIPInfo DondokodjDIPList[]=
1427 {
1428 	// Default Values
1429 	{0x13, 0xff, 0xff, 0xff, NULL                             },
1430 	{0x14, 0xff, 0xff, 0xff, NULL                             },
1431 
1432 	// Dip 1
1433 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1434 	{0x13, 0x01, 0x02, 0x02, "Off"                            },
1435 	{0x13, 0x01, 0x02, 0x00, "On"                             },
1436 
1437 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1438 	{0x13, 0x01, 0x04, 0x04, "Off"                            },
1439 	{0x13, 0x01, 0x04, 0x00, "On"                             },
1440 
1441 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1442 	{0x13, 0x01, 0x08, 0x00, "Off"                            },
1443 	{0x13, 0x01, 0x08, 0x08, "On"                             },
1444 
1445 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1446 	{0x13, 0x01, 0x30, 0x00, "2 Coins 1 Credit"               },
1447 	{0x13, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1448 	{0x13, 0x01, 0x30, 0x00, "2 Coins 3 Credits"              },
1449 	{0x13, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
1450 
1451 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1452 	{0x13, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
1453 	{0x13, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
1454 	{0x13, 0x01, 0xc0, 0x00, "2 Coins 3 Credits"              },
1455 	{0x13, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
1456 
1457 	// Dip 2
1458 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1459 	{0x14, 0x01, 0x03, 0x02, "Easy"                           },
1460 	{0x14, 0x01, 0x03, 0x03, "Medium"                         },
1461 	{0x14, 0x01, 0x03, 0x01, "Hard"                           },
1462 	{0x14, 0x01, 0x03, 0x00, "Hardest"                        },
1463 
1464 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
1465 	{0x14, 0x01, 0x0c, 0x0c, "10k and 100k"                   },
1466 	{0x14, 0x01, 0x0c, 0x08, "10k and 150k"                   },
1467 	{0x14, 0x01, 0x0c, 0x04, "10k and 250k"                   },
1468 	{0x14, 0x01, 0x0c, 0x00, "10k and 350k"                   },
1469 
1470 	{0   , 0xfe, 0   , 4   , "Lives"                          },
1471 	{0x14, 0x01, 0x30, 0x20, "2"                              },
1472 	{0x14, 0x01, 0x30, 0x30, "3"                              },
1473 	{0x14, 0x01, 0x30, 0x00, "4"                              },
1474 	{0x14, 0x01, 0x30, 0x10, "5"                              },
1475 };
1476 
1477 STDDIPINFO(Dondokodj)
1478 
1479 static struct BurnDIPInfo DondokoduDIPList[]=
1480 {
1481 	// Default Values
1482 	{0x13, 0xff, 0xff, 0xff, NULL                             },
1483 	{0x14, 0xff, 0xff, 0xff, NULL                             },
1484 
1485 	// Dip 1
1486 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1487 	{0x13, 0x01, 0x02, 0x02, "Off"                            },
1488 	{0x13, 0x01, 0x02, 0x00, "On"                             },
1489 
1490 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1491 	{0x13, 0x01, 0x04, 0x04, "Off"                            },
1492 	{0x13, 0x01, 0x04, 0x00, "On"                             },
1493 
1494 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1495 	{0x13, 0x01, 0x08, 0x00, "Off"                            },
1496 	{0x13, 0x01, 0x08, 0x08, "On"                             },
1497 
1498 	{0   , 0xfe, 0   , 4   , "Coinage"                        },
1499 	{0x13, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
1500 	{0x13, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
1501 	{0x13, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
1502 	{0x13, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1503 
1504 	{0   , 0xfe, 0   , 4   , "Price to Continue"              },
1505 	{0x13, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
1506 	{0x13, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
1507 	{0x13, 0x01, 0xc0, 0x80, "1 Coin 1 Credit"                },
1508 	{0x13, 0x01, 0xc0, 0xc0, "Same as start"                  },
1509 
1510 	// Dip 2
1511 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1512 	{0x14, 0x01, 0x03, 0x02, "Easy"                           },
1513 	{0x14, 0x01, 0x03, 0x03, "Medium"                         },
1514 	{0x14, 0x01, 0x03, 0x01, "Hard"                           },
1515 	{0x14, 0x01, 0x03, 0x00, "Hardest"                        },
1516 
1517 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
1518 	{0x14, 0x01, 0x0c, 0x0c, "10k and 100k"                   },
1519 	{0x14, 0x01, 0x0c, 0x08, "10k and 150k"                   },
1520 	{0x14, 0x01, 0x0c, 0x04, "10k and 250k"                   },
1521 	{0x14, 0x01, 0x0c, 0x00, "10k and 350k"                   },
1522 
1523 	{0   , 0xfe, 0   , 4   , "Lives"                          },
1524 	{0x14, 0x01, 0x30, 0x20, "2"                              },
1525 	{0x14, 0x01, 0x30, 0x30, "3"                              },
1526 	{0x14, 0x01, 0x30, 0x00, "4"                              },
1527 	{0x14, 0x01, 0x30, 0x10, "5"                              },
1528 };
1529 
1530 STDDIPINFO(Dondokodu)
1531 
1532 static struct BurnDIPInfo DriftoutDIPList[]=
1533 {
1534 	// Default Values
1535 	{0x0c, 0xff, 0xff, 0xff, NULL                             },
1536 	{0x0d, 0xff, 0xff, 0xff, NULL                             },
1537 
1538 	// Dip 1
1539 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1540 	{0x0c, 0x01, 0x02, 0x02, "Off"                            },
1541 	{0x0c, 0x01, 0x02, 0x00, "On"                             },
1542 
1543 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1544 	{0x0c, 0x01, 0x04, 0x04, "Off"                            },
1545 	{0x0c, 0x01, 0x04, 0x00, "On"                             },
1546 
1547 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1548 	{0x0c, 0x01, 0x08, 0x00, "Off"                            },
1549 	{0x0c, 0x01, 0x08, 0x08, "On"                             },
1550 
1551 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1552 	{0x0c, 0x01, 0x30, 0x00, "2 Coins 1 Credit"               },
1553 	{0x0c, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1554 	{0x0c, 0x01, 0x30, 0x00, "2 Coins 3 Credits"              },
1555 	{0x0c, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
1556 
1557 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1558 	{0x0c, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
1559 	{0x0c, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
1560 	{0x0c, 0x01, 0xc0, 0x00, "2 Coins 3 Credits"              },
1561 	{0x0c, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
1562 
1563 	// Dip 2
1564 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1565 	{0x0d, 0x01, 0x03, 0x02, "Easy"                           },
1566 	{0x0d, 0x01, 0x03, 0x03, "Medium"                         },
1567 	{0x0d, 0x01, 0x03, 0x01, "Hard"                           },
1568 	{0x0d, 0x01, 0x03, 0x00, "Hardest"                        },
1569 
1570 	{0   , 0xfe, 0   , 4   , "Control"                        },
1571 	{0x0d, 0x01, 0x0c, 0x0c, "Joystick"                       },
1572 	{0x0d, 0x01, 0x0c, 0x08, "Paddle"                         },
1573 	{0x0d, 0x01, 0x0c, 0x04, "Joystick"                       },
1574 	{0x0d, 0x01, 0x0c, 0x00, "Steering Wheel"                 },
1575 };
1576 
1577 STDDIPINFO(Driftout)
1578 
1579 static struct BurnDIPInfo FinalbDIPList[]=
1580 {
1581 	// Default Values
1582 	{0x19, 0xff, 0xff, 0xff, NULL                             },
1583 	{0x1a, 0xff, 0xff, 0xff, NULL                             },
1584 
1585 	// Dip 1
1586 	{0   , 0xfe, 0   , 2   , "Alternate Controls"             },
1587 	{0x19, 0x01, 0x01, 0x01, "Off"                            },
1588 	{0x19, 0x01, 0x01, 0x00, "On"                             },
1589 
1590 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1591 	{0x19, 0x01, 0x02, 0x02, "Off"                            },
1592 	{0x19, 0x01, 0x02, 0x00, "On"                             },
1593 
1594 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1595 	{0x19, 0x01, 0x04, 0x04, "Off"                            },
1596 	{0x19, 0x01, 0x04, 0x00, "On"                             },
1597 
1598 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1599 	{0x19, 0x01, 0x08, 0x00, "Off"                            },
1600 	{0x19, 0x01, 0x08, 0x08, "On"                             },
1601 
1602 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1603 	{0x19, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
1604 	{0x19, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
1605 	{0x19, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
1606 	{0x19, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1607 
1608 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1609 	{0x19, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
1610 	{0x19, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
1611 	{0x19, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
1612 	{0x19, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
1613 
1614 	// Dip 2
1615 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1616 	{0x1a, 0x01, 0x03, 0x02, "Easy"                           },
1617 	{0x1a, 0x01, 0x03, 0x03, "Medium"                         },
1618 	{0x1a, 0x01, 0x03, 0x01, "Hard"                           },
1619 	{0x1a, 0x01, 0x03, 0x00, "Hardest"                        },
1620 };
1621 
1622 STDDIPINFO(Finalb)
1623 
1624 static struct BurnDIPInfo FinalbjDIPList[]=
1625 {
1626 	// Default Values
1627 	{0x19, 0xff, 0xff, 0xff, NULL                             },
1628 	{0x1a, 0xff, 0xff, 0xff, NULL                             },
1629 
1630 	// Dip 1
1631 	{0   , 0xfe, 0   , 2   , "Alternate Controls"             },
1632 	{0x19, 0x01, 0x01, 0x01, "Off"                            },
1633 	{0x19, 0x01, 0x01, 0x00, "On"                             },
1634 
1635 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1636 	{0x19, 0x01, 0x02, 0x02, "Off"                            },
1637 	{0x19, 0x01, 0x02, 0x00, "On"                             },
1638 
1639 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1640 	{0x19, 0x01, 0x04, 0x04, "Off"                            },
1641 	{0x19, 0x01, 0x04, 0x00, "On"                             },
1642 
1643 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1644 	{0x19, 0x01, 0x08, 0x00, "Off"                            },
1645 	{0x19, 0x01, 0x08, 0x08, "On"                             },
1646 
1647 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1648 	{0x19, 0x01, 0x30, 0x00, "2 Coins 1 Credit"               },
1649 	{0x19, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1650 	{0x19, 0x01, 0x30, 0x00, "2 Coins 3 Credits"              },
1651 	{0x19, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
1652 
1653 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1654 	{0x19, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
1655 	{0x19, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
1656 	{0x19, 0x01, 0xc0, 0x00, "2 Coins 3 Credits"              },
1657 	{0x19, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
1658 
1659 	// Dip 2
1660 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1661 	{0x1a, 0x01, 0x03, 0x02, "Easy"                           },
1662 	{0x1a, 0x01, 0x03, 0x03, "Medium"                         },
1663 	{0x1a, 0x01, 0x03, 0x01, "Hard"                           },
1664 	{0x1a, 0x01, 0x03, 0x00, "Hardest"                        },
1665 };
1666 
1667 STDDIPINFO(Finalbj)
1668 
1669 static struct BurnDIPInfo FootchmpDIPList[]=
1670 {
1671 	// Default Values
1672 	{0x25, 0xff, 0xff, 0xfe, NULL                             },
1673 	{0x26, 0xff, 0xff, 0x7f, NULL                             },
1674 
1675 	// Dip 1
1676 	{0   , 0xfe, 0   , 2   , "Game Over Type"                 },
1677 	{0x25, 0x01, 0x01, 0x01, "Both Teams' Games Over"         },
1678 	{0x25, 0x01, 0x01, 0x00, "Losing Team's Game is Over"     },
1679 
1680 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1681 	{0x25, 0x01, 0x02, 0x02, "Off"                            },
1682 	{0x25, 0x01, 0x02, 0x00, "On"                             },
1683 
1684 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1685 	{0x25, 0x01, 0x04, 0x04, "Off"                            },
1686 	{0x25, 0x01, 0x04, 0x00, "On"                             },
1687 
1688 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1689 	{0x25, 0x01, 0x08, 0x00, "Off"                            },
1690 	{0x25, 0x01, 0x08, 0x08, "On"                             },
1691 
1692 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1693 	{0x25, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
1694 	{0x25, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
1695 	{0x25, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
1696 	{0x25, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1697 
1698 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1699 	{0x25, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
1700 	{0x25, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
1701 	{0x25, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
1702 	{0x25, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
1703 
1704 	// Dip 2
1705 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1706 	{0x26, 0x01, 0x03, 0x02, "Easy"                           },
1707 	{0x26, 0x01, 0x03, 0x03, "Normal"                         },
1708 	{0x26, 0x01, 0x03, 0x01, "Hard"                           },
1709 	{0x26, 0x01, 0x03, 0x00, "Hardest"                        },
1710 
1711 	{0   , 0xfe, 0   , 4   , "Game Time"                      },
1712 	{0x26, 0x01, 0x0c, 0x00, "1 minute  30 seconds"           },
1713 	{0x26, 0x01, 0x0c, 0x0c, "2 minutes"                      },
1714 	{0x26, 0x01, 0x0c, 0x04, "2 minutes 30 seconds"           },
1715 	{0x26, 0x01, 0x0c, 0x08, "3 minutes"                      },
1716 
1717 	{0   , 0xfe, 0   , 4   , "Cabinet"                        },
1718 	{0x26, 0x01, 0x30, 0x30, "2 Players"                      },
1719 	{0x26, 0x01, 0x30, 0x20, "4 Players / 4 Coin Slots"       },
1720 	{0x26, 0x01, 0x30, 0x10, "4 Players / 2 Cabinets Combined"},
1721 	{0x26, 0x01, 0x30, 0x00, "4 Players / 2 Coin Slots"       },
1722 
1723 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
1724 	{0x26, 0x01, 0x40, 0x00, "Off"                            },
1725 	{0x26, 0x01, 0x40, 0x40, "On"                             },
1726 
1727 	{0   , 0xfe, 0   , 2   , "Game Version"                   },
1728 	{0x26, 0x01, 0x80, 0x00, "Normal"                         },
1729 	{0x26, 0x01, 0x80, 0x80, "European"                       },
1730 
1731 };
1732 
1733 STDDIPINFO(Footchmp)
1734 
1735 static struct BurnDIPInfo HtheroDIPList[]=
1736 {
1737 	// Default Values
1738 	{0x25, 0xff, 0xff, 0x7f, NULL                             },
1739 	{0x26, 0xff, 0xff, 0xff, NULL                             },
1740 
1741 	// Dip 1
1742 	{0   , 0xfe, 0   , 2   , "Game Over Type"                 },
1743 	{0x25, 0x01, 0x80, 0x80, "Both Teams' Games Over"         },
1744 	{0x25, 0x01, 0x80, 0x00, "Losing Team's Game is Over"     },
1745 
1746 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1747 	{0x25, 0x01, 0x40, 0x40, "Off"                            },
1748 	{0x25, 0x01, 0x40, 0x00, "On"                             },
1749 
1750 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1751 	{0x25, 0x01, 0x20, 0x20, "Off"                            },
1752 	{0x25, 0x01, 0x20, 0x00, "On"                             },
1753 
1754 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1755 	{0x25, 0x01, 0x10, 0x00, "Off"                            },
1756 	{0x25, 0x01, 0x10, 0x10, "On"                             },
1757 
1758 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1759 	{0x25, 0x01, 0x0c, 0x00, "3 Coins 1 Credit"               },
1760 	{0x25, 0x01, 0x0c, 0x08, "2 Coins 1 Credit"               },
1761 	{0x25, 0x01, 0x0c, 0x0c, "1 Coin  1 Credit"               },
1762 	{0x25, 0x01, 0x0c, 0x04, "1 Coin  2 Credits"              },
1763 
1764 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1765 	{0x25, 0x01, 0x03, 0x00, "3 Coins 1 Credit"               },
1766 	{0x25, 0x01, 0x03, 0x02, "2 Coins 1 Credit"               },
1767 	{0x25, 0x01, 0x03, 0x03, "1 Coin  1 Credit"               },
1768 	{0x25, 0x01, 0x03, 0x01, "1 Coin  2 Credits"              },
1769 
1770 	// Dip 2
1771 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1772 	{0x26, 0x01, 0xc0, 0x40, "Easy"                           },
1773 	{0x26, 0x01, 0xc0, 0xc0, "Normal"                         },
1774 	{0x26, 0x01, 0xc0, 0x80, "Hard"                           },
1775 	{0x26, 0x01, 0xc0, 0x00, "Hardest"                        },
1776 
1777 	{0   , 0xfe, 0   , 4   , "Game Time"                      },
1778 	{0x26, 0x01, 0x30, 0x00, "1 minute  30 seconds"           },
1779 	{0x26, 0x01, 0x30, 0x30, "2 minutes"                      },
1780 	{0x26, 0x01, 0x30, 0x20, "2 minutes 30 seconds"           },
1781 	{0x26, 0x01, 0x30, 0x10, "3 minutes"                      },
1782 
1783 	{0   , 0xfe, 0   , 4   , "Cabinet"                        },
1784 	{0x26, 0x01, 0x0c, 0x0c, "2 Players"                      },
1785 	{0x26, 0x01, 0x0c, 0x04, "4 Players / 4 Coin Slots"       },
1786 	{0x26, 0x01, 0x0c, 0x08, "4 Players / 2 Cabinets Combined"},
1787 	{0x26, 0x01, 0x0c, 0x00, "4 Players / 2 Coin Slots"       },
1788 
1789 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
1790 	{0x26, 0x01, 0x02, 0x00, "Off"                            },
1791 	{0x26, 0x01, 0x02, 0x02, "On"                             },
1792 };
1793 
1794 STDDIPINFO(Hthero)
1795 
1796 static struct BurnDIPInfo GrowlDIPList[]=
1797 {
1798 	// Default Values
1799 	{0x28, 0xff, 0xff, 0xff, NULL                             },
1800 	{0x29, 0xff, 0xff, 0xff, NULL                             },
1801 
1802 	// Dip 1
1803 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1804 	{0x28, 0x01, 0x02, 0x02, "Off"                            },
1805 	{0x28, 0x01, 0x02, 0x00, "On"                             },
1806 
1807 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1808 	{0x28, 0x01, 0x04, 0x04, "Off"                            },
1809 	{0x28, 0x01, 0x04, 0x00, "On"                             },
1810 
1811 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1812 	{0x28, 0x01, 0x08, 0x00, "Off"                            },
1813 	{0x28, 0x01, 0x08, 0x08, "On"                             },
1814 
1815 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1816 	{0x28, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
1817 	{0x28, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
1818 	{0x28, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
1819 	{0x28, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1820 
1821 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1822 	{0x28, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
1823 	{0x28, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
1824 	{0x28, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
1825 	{0x28, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
1826 
1827 	// Dip 2
1828 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1829 	{0x29, 0x01, 0x03, 0x02, "Easy"                           },
1830 	{0x29, 0x01, 0x03, 0x03, "Normal"                         },
1831 	{0x29, 0x01, 0x03, 0x01, "Hard"                           },
1832 	{0x29, 0x01, 0x03, 0x00, "Hardest"                        },
1833 
1834 	{0   , 0xfe, 0   , 4   , "Cabinet Type"                   },
1835 	{0x29, 0x01, 0x30, 0x30, "2 Players"                      },
1836 	{0x29, 0x01, 0x30, 0x20, "4 Players / 4 Coin Slots"       },
1837 	{0x29, 0x01, 0x30, 0x10, "4 Players / 2 Cabinets Combined"},
1838 	{0x29, 0x01, 0x30, 0x00, "4 Players / 2 Coin Slots"       },
1839 
1840 	{0   , 0xfe, 0   , 2   , "Final Boss Continue"            },
1841 	{0x29, 0x01, 0x40, 0x00, "Off"                            },
1842 	{0x29, 0x01, 0x40, 0x40, "On"                             },
1843 };
1844 
1845 STDDIPINFO(Growl)
1846 
1847 static struct BurnDIPInfo GrowluDIPList[]=
1848 {
1849 	// Default Values
1850 	{0x28, 0xff, 0xff, 0xff, NULL                             },
1851 	{0x29, 0xff, 0xff, 0xff, NULL                             },
1852 
1853 	// Dip 1
1854 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1855 	{0x28, 0x01, 0x02, 0x02, "Off"                            },
1856 	{0x28, 0x01, 0x02, 0x00, "On"                             },
1857 
1858 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1859 	{0x28, 0x01, 0x04, 0x04, "Off"                            },
1860 	{0x28, 0x01, 0x04, 0x00, "On"                             },
1861 
1862 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1863 	{0x28, 0x01, 0x08, 0x00, "Off"                            },
1864 	{0x28, 0x01, 0x08, 0x08, "On"                             },
1865 
1866 	{0   , 0xfe, 0   , 4   , "Coinage"                        },
1867 	{0x28, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
1868 	{0x28, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
1869 	{0x28, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
1870 	{0x28, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1871 
1872 	{0   , 0xfe, 0   , 4   , "Price to Continue"              },
1873 	{0x28, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
1874 	{0x28, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
1875 	{0x28, 0x01, 0xc0, 0x80, "1 Coin 1 Credit"                },
1876 	{0x28, 0x01, 0xc0, 0xc0, "Same as start"                  },
1877 
1878 	// Dip 2
1879 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1880 	{0x29, 0x01, 0x03, 0x02, "Easy"                           },
1881 	{0x29, 0x01, 0x03, 0x03, "Normal"                         },
1882 	{0x29, 0x01, 0x03, 0x01, "Hard"                           },
1883 	{0x29, 0x01, 0x03, 0x00, "Hardest"                        },
1884 
1885 	{0   , 0xfe, 0   , 4   , "Cabinet Type"                   },
1886 	{0x29, 0x01, 0x30, 0x30, "2 Players"                      },
1887 	{0x29, 0x01, 0x30, 0x20, "4 Players / 4 Coin Slots"       },
1888 	{0x29, 0x01, 0x30, 0x10, "4 Players / 2 Cabinets Combined"},
1889 	{0x29, 0x01, 0x30, 0x00, "4 Players / 2 Coin Slots"       },
1890 
1891 	{0   , 0xfe, 0   , 2   , "Final Boss Continue"            },
1892 	{0x29, 0x01, 0x40, 0x00, "Off"                            },
1893 	{0x29, 0x01, 0x40, 0x40, "On"                             },
1894 };
1895 
1896 STDDIPINFO(Growlu)
1897 
1898 static struct BurnDIPInfo RunarkDIPList[]=
1899 {
1900 	// Default Values
1901 	{0x28, 0xff, 0xff, 0xff, NULL                             },
1902 	{0x29, 0xff, 0xff, 0xff, NULL                             },
1903 
1904 	// Dip 1
1905 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1906 	{0x28, 0x01, 0x02, 0x02, "Off"                            },
1907 	{0x28, 0x01, 0x02, 0x00, "On"                             },
1908 
1909 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1910 	{0x28, 0x01, 0x04, 0x04, "Off"                            },
1911 	{0x28, 0x01, 0x04, 0x00, "On"                             },
1912 
1913 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1914 	{0x28, 0x01, 0x08, 0x00, "Off"                            },
1915 	{0x28, 0x01, 0x08, 0x08, "On"                             },
1916 
1917 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1918 	{0x28, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
1919 	{0x28, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
1920 	{0x28, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1921 	{0x28, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
1922 
1923 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1924 	{0x28, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
1925 	{0x28, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
1926 	{0x28, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
1927 	{0x28, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
1928 
1929 	// Dip 2
1930 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1931 	{0x29, 0x01, 0x03, 0x02, "Easy"                           },
1932 	{0x29, 0x01, 0x03, 0x03, "Normal"                         },
1933 	{0x29, 0x01, 0x03, 0x01, "Hard"                           },
1934 	{0x29, 0x01, 0x03, 0x00, "Hardest"                        },
1935 
1936 	{0   , 0xfe, 0   , 4   , "Cabinet Type"                   },
1937 	{0x29, 0x01, 0x30, 0x30, "2 Players"                      },
1938 	{0x29, 0x01, 0x30, 0x20, "4 Players / 4 Coin Slots"       },
1939 	{0x29, 0x01, 0x30, 0x10, "4 Players / 2 Cabinets Combined"},
1940 	{0x29, 0x01, 0x30, 0x00, "4 Players / 2 Coin Slots"       },
1941 
1942 	{0   , 0xfe, 0   , 2   , "Final Boss Continue"            },
1943 	{0x29, 0x01, 0x40, 0x00, "Off"                            },
1944 	{0x29, 0x01, 0x40, 0x40, "On"                             },
1945 };
1946 
1947 STDDIPINFO(Runark)
1948 
1949 static struct BurnDIPInfo GunfrontDIPList[]=
1950 {
1951 	// Default Values
1952 	{0x13, 0xff, 0xff, 0xff, NULL                             },
1953 	{0x14, 0xff, 0xff, 0xff, NULL                             },
1954 
1955 	// Dip 1
1956 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
1957 	{0x13, 0x01, 0x02, 0x02, "Off"                            },
1958 	{0x13, 0x01, 0x02, 0x00, "On"                             },
1959 
1960 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
1961 	{0x13, 0x01, 0x04, 0x04, "Off"                            },
1962 	{0x13, 0x01, 0x04, 0x00, "On"                             },
1963 
1964 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
1965 	{0x13, 0x01, 0x08, 0x00, "Off"                            },
1966 	{0x13, 0x01, 0x08, 0x08, "On"                             },
1967 
1968 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
1969 	{0x13, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
1970 	{0x13, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
1971 	{0x13, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
1972 	{0x13, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
1973 
1974 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
1975 	{0x13, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
1976 	{0x13, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
1977 	{0x13, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
1978 	{0x13, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
1979 
1980 	// Dip 2
1981 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
1982 	{0x14, 0x01, 0x03, 0x02, "Easy"                           },
1983 	{0x14, 0x01, 0x03, 0x03, "Medium"                         },
1984 	{0x14, 0x01, 0x03, 0x01, "Hard"                           },
1985 	{0x14, 0x01, 0x03, 0x00, "Hardest"                        },
1986 
1987 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
1988 	{0x14, 0x01, 0x0c, 0x08, "10k and every 80k"              },
1989 	{0x14, 0x01, 0x0c, 0x0c, "20k and every 80k"              },
1990 	{0x14, 0x01, 0x0c, 0x04, "30k and every 80k"              },
1991 	{0x14, 0x01, 0x0c, 0x00, "60k and every 80k"              },
1992 
1993 	{0   , 0xfe, 0   , 4   , "Lives"                          },
1994 	{0x14, 0x01, 0x30, 0x20, "1"                              },
1995 	{0x14, 0x01, 0x30, 0x10, "2"                              },
1996 	{0x14, 0x01, 0x30, 0x30, "3"                              },
1997 	{0x14, 0x01, 0x30, 0x00, "5"                              },
1998 
1999 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
2000 	{0x14, 0x01, 0x40, 0x00, "Off"                            },
2001 	{0x14, 0x01, 0x40, 0x40, "On"                             },
2002 
2003 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
2004 	{0x14, 0x01, 0x80, 0x00, "Single"                         },
2005 	{0x14, 0x01, 0x80, 0x80, "Dual"                           },
2006 };
2007 
2008 STDDIPINFO(Gunfront)
2009 
2010 static struct BurnDIPInfo GunfrontjDIPList[]=
2011 {
2012 	// Default Values
2013 	{0x13, 0xff, 0xff, 0xff, NULL                             },
2014 	{0x14, 0xff, 0xff, 0xff, NULL                             },
2015 
2016 	// Dip 1
2017 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2018 	{0x13, 0x01, 0x02, 0x02, "Off"                            },
2019 	{0x13, 0x01, 0x02, 0x00, "On"                             },
2020 
2021 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2022 	{0x13, 0x01, 0x04, 0x04, "Off"                            },
2023 	{0x13, 0x01, 0x04, 0x00, "On"                             },
2024 
2025 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2026 	{0x13, 0x01, 0x08, 0x00, "Off"                            },
2027 	{0x13, 0x01, 0x08, 0x08, "On"                             },
2028 
2029 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2030 	{0x13, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
2031 	{0x13, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
2032 	{0x13, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2033 	{0x13, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
2034 
2035 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2036 	{0x13, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
2037 	{0x13, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
2038 	{0x13, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
2039 	{0x13, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
2040 
2041 	// Dip 2
2042 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2043 	{0x14, 0x01, 0x03, 0x02, "Easy"                           },
2044 	{0x14, 0x01, 0x03, 0x03, "Medium"                         },
2045 	{0x14, 0x01, 0x03, 0x01, "Hard"                           },
2046 	{0x14, 0x01, 0x03, 0x00, "Hardest"                        },
2047 
2048 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
2049 	{0x14, 0x01, 0x0c, 0x08, "10k and every 80k"              },
2050 	{0x14, 0x01, 0x0c, 0x0c, "20k and every 80k"              },
2051 	{0x14, 0x01, 0x0c, 0x04, "30k and every 80k"              },
2052 	{0x14, 0x01, 0x0c, 0x00, "60k and every 80k"              },
2053 
2054 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2055 	{0x14, 0x01, 0x30, 0x20, "1"                              },
2056 	{0x14, 0x01, 0x30, 0x10, "2"                              },
2057 	{0x14, 0x01, 0x30, 0x30, "3"                              },
2058 	{0x14, 0x01, 0x30, 0x00, "5"                              },
2059 
2060 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
2061 	{0x14, 0x01, 0x40, 0x00, "Off"                            },
2062 	{0x14, 0x01, 0x40, 0x40, "On"                             },
2063 
2064 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
2065 	{0x14, 0x01, 0x80, 0x00, "Single"                         },
2066 	{0x14, 0x01, 0x80, 0x80, "Dual"                           },
2067 };
2068 
2069 STDDIPINFO(Gunfrontj)
2070 
2071 static struct BurnDIPInfo KoshienDIPList[]=
2072 {
2073 	// Default Values
2074 	{0x15, 0xff, 0xff, 0xff, NULL                             },
2075 	{0x16, 0xff, 0xff, 0xff, NULL                             },
2076 
2077 	// Dip 1
2078 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2079 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
2080 	{0x15, 0x01, 0x02, 0x00, "On"                             },
2081 
2082 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2083 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
2084 	{0x15, 0x01, 0x04, 0x00, "On"                             },
2085 
2086 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2087 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
2088 	{0x15, 0x01, 0x08, 0x08, "On"                             },
2089 
2090 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2091 	{0x15, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
2092 	{0x15, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
2093 	{0x15, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2094 	{0x15, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
2095 
2096 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2097 	{0x15, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
2098 	{0x15, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
2099 	{0x15, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
2100 	{0x15, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
2101 
2102 	// Dip 2
2103 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2104 	{0x16, 0x01, 0x03, 0x02, "Easy"                           },
2105 	{0x16, 0x01, 0x03, 0x03, "Medium"                         },
2106 	{0x16, 0x01, 0x03, 0x01, "Hard"                           },
2107 	{0x16, 0x01, 0x03, 0x00, "Hardest"                        },
2108 
2109 	{0   , 0xfe, 0   , 2   , "Timer"                          },
2110 	{0x16, 0x01, 0x04, 0x00, "Off"                            },
2111 	{0x16, 0x01, 0x04, 0x04, "On"                             },
2112 
2113 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2114 	{0x16, 0x01, 0x30, 0x20, "2"                              },
2115 	{0x16, 0x01, 0x30, 0x30, "3"                              },
2116 	{0x16, 0x01, 0x30, 0x10, "4"                              },
2117 	{0x16, 0x01, 0x30, 0x00, "5"                              },
2118 
2119 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
2120 	{0x16, 0x01, 0x40, 0x00, "Off"                            },
2121 	{0x16, 0x01, 0x40, 0x40, "On"                             },
2122 
2123 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
2124 	{0x16, 0x01, 0x80, 0x00, "Single"                         },
2125 	{0x16, 0x01, 0x80, 0x80, "Dual"                           },
2126 };
2127 
2128 STDDIPINFO(Koshien)
2129 
2130 static struct BurnDIPInfo LiquidkDIPList[]=
2131 {
2132 	// Default Values
2133 	{0x13, 0xff, 0xff, 0xfe, NULL                             },
2134 	{0x14, 0xff, 0xff, 0x7f, NULL                             },
2135 
2136 	// Dip 1
2137 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
2138 	{0x13, 0x01, 0x01, 0x00, "Upright"                        },
2139 	{0x13, 0x01, 0x01, 0x01, "Cocktail"                       },
2140 
2141 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2142 	{0x13, 0x01, 0x02, 0x02, "Off"                            },
2143 	{0x13, 0x01, 0x02, 0x00, "On"                             },
2144 
2145 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2146 	{0x13, 0x01, 0x04, 0x04, "Off"                            },
2147 	{0x13, 0x01, 0x04, 0x00, "On"                             },
2148 
2149 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2150 	{0x13, 0x01, 0x08, 0x00, "Off"                            },
2151 	{0x13, 0x01, 0x08, 0x08, "On"                             },
2152 
2153 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2154 	{0x13, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
2155 	{0x13, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
2156 	{0x13, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
2157 	{0x13, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2158 
2159 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2160 	{0x13, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
2161 	{0x13, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
2162 	{0x13, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
2163 	{0x13, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
2164 
2165 	// Dip 2
2166 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2167 	{0x14, 0x01, 0x03, 0x02, "Easy"                           },
2168 	{0x14, 0x01, 0x03, 0x03, "Medium"                         },
2169 	{0x14, 0x01, 0x03, 0x01, "Hard"                           },
2170 	{0x14, 0x01, 0x03, 0x00, "Hardest"                        },
2171 
2172 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
2173 	{0x14, 0x01, 0x0c, 0x0c, "30k and 100k"                   },
2174 	{0x14, 0x01, 0x0c, 0x08, "30k and 150k"                   },
2175 	{0x14, 0x01, 0x0c, 0x04, "50k and 250k"                   },
2176 	{0x14, 0x01, 0x0c, 0x00, "50k and 350k"                   },
2177 
2178 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2179 	{0x14, 0x01, 0x30, 0x20, "2"                              },
2180 	{0x14, 0x01, 0x30, 0x30, "3"                              },
2181 	{0x14, 0x01, 0x30, 0x00, "4"                              },
2182 	{0x14, 0x01, 0x30, 0x10, "5"                              },
2183 
2184 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
2185 	{0x14, 0x01, 0x40, 0x00, "Off"                            },
2186 	{0x14, 0x01, 0x40, 0x40, "On"                             },
2187 
2188 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
2189 	{0x14, 0x01, 0x80, 0x80, "Single"                         },
2190 	{0x14, 0x01, 0x80, 0x00, "Dual"                           },
2191 };
2192 
2193 STDDIPINFO(Liquidk)
2194 
2195 static struct BurnDIPInfo LiquidkuDIPList[]=
2196 {
2197 	// Default Values
2198 	{0x13, 0xff, 0xff, 0xfe, NULL                             },
2199 	{0x14, 0xff, 0xff, 0x7f, NULL                             },
2200 
2201 	// Dip 1
2202 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
2203 	{0x13, 0x01, 0x01, 0x00, "Upright"                        },
2204 	{0x13, 0x01, 0x01, 0x01, "Cocktail"                       },
2205 
2206 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2207 	{0x13, 0x01, 0x02, 0x02, "Off"                            },
2208 	{0x13, 0x01, 0x02, 0x00, "On"                             },
2209 
2210 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2211 	{0x13, 0x01, 0x04, 0x04, "Off"                            },
2212 	{0x13, 0x01, 0x04, 0x00, "On"                             },
2213 
2214 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2215 	{0x13, 0x01, 0x08, 0x00, "Off"                            },
2216 	{0x13, 0x01, 0x08, 0x08, "On"                             },
2217 
2218 	{0   , 0xfe, 0   , 4   , "Coinage"                        },
2219 	{0x13, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
2220 	{0x13, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
2221 	{0x13, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
2222 	{0x13, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2223 
2224 	{0   , 0xfe, 0   , 4   , "Price to Continue"              },
2225 	{0x13, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
2226 	{0x13, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
2227 	{0x13, 0x01, 0xc0, 0x80, "1 Coin 1 Credit"                },
2228 	{0x13, 0x01, 0xc0, 0xc0, "Same as start"                  },
2229 
2230 	// Dip 2
2231 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2232 	{0x14, 0x01, 0x03, 0x02, "Easy"                           },
2233 	{0x14, 0x01, 0x03, 0x03, "Medium"                         },
2234 	{0x14, 0x01, 0x03, 0x01, "Hard"                           },
2235 	{0x14, 0x01, 0x03, 0x00, "Hardest"                        },
2236 
2237 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
2238 	{0x14, 0x01, 0x0c, 0x0c, "30k and 100k"                   },
2239 	{0x14, 0x01, 0x0c, 0x08, "30k and 150k"                   },
2240 	{0x14, 0x01, 0x0c, 0x04, "50k and 250k"                   },
2241 	{0x14, 0x01, 0x0c, 0x00, "50k and 350k"                   },
2242 
2243 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2244 	{0x14, 0x01, 0x30, 0x20, "2"                              },
2245 	{0x14, 0x01, 0x30, 0x30, "3"                              },
2246 	{0x14, 0x01, 0x30, 0x00, "4"                              },
2247 	{0x14, 0x01, 0x30, 0x10, "5"                              },
2248 
2249 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
2250 	{0x14, 0x01, 0x40, 0x00, "Off"                            },
2251 	{0x14, 0x01, 0x40, 0x40, "On"                             },
2252 
2253 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
2254 	{0x14, 0x01, 0x80, 0x80, "Single"                         },
2255 	{0x14, 0x01, 0x80, 0x00, "Dual"                           },
2256 };
2257 
2258 STDDIPINFO(Liquidku)
2259 
2260 static struct BurnDIPInfo MegablstDIPList[]=
2261 {
2262 	// Default Values
2263 	{0x13, 0xff, 0xff, 0xfe, NULL                             },
2264 	{0x14, 0xff, 0xff, 0xff, NULL                             },
2265 
2266 	// Dip 1
2267 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
2268 	{0x13, 0x01, 0x01, 0x00, "Upright"                        },
2269 	{0x13, 0x01, 0x01, 0x01, "Cocktail"                       },
2270 
2271 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2272 	{0x13, 0x01, 0x02, 0x02, "Off"                            },
2273 	{0x13, 0x01, 0x02, 0x00, "On"                             },
2274 
2275 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2276 	{0x13, 0x01, 0x04, 0x04, "Off"                            },
2277 	{0x13, 0x01, 0x04, 0x00, "On"                             },
2278 
2279 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2280 	{0x13, 0x01, 0x08, 0x00, "Off"                            },
2281 	{0x13, 0x01, 0x08, 0x08, "On"                             },
2282 
2283 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2284 	{0x13, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
2285 	{0x13, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
2286 	{0x13, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
2287 	{0x13, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2288 
2289 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2290 	{0x13, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
2291 	{0x13, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
2292 	{0x13, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
2293 	{0x13, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
2294 
2295 	// Dip 2
2296 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2297 	{0x14, 0x01, 0x03, 0x02, "Easy"                           },
2298 	{0x14, 0x01, 0x03, 0x03, "Medium"                         },
2299 	{0x14, 0x01, 0x03, 0x01, "Hard"                           },
2300 	{0x14, 0x01, 0x03, 0x00, "Hardest"                        },
2301 
2302 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
2303 	{0x14, 0x01, 0x0c, 0x0c, "100k only"                      },
2304 	{0x14, 0x01, 0x0c, 0x04, "150k only"                      },
2305 	{0x14, 0x01, 0x0c, 0x08, "200k only"                      },
2306 	{0x14, 0x01, 0x0c, 0x00, "None"                           },
2307 
2308 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2309 	{0x14, 0x01, 0x30, 0x10, "1"                              },
2310 	{0x14, 0x01, 0x30, 0x00, "2"                              },
2311 	{0x14, 0x01, 0x30, 0x30, "3"                              },
2312 	{0x14, 0x01, 0x30, 0x20, "4"                              },
2313 
2314 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
2315 	{0x14, 0x01, 0x40, 0x00, "Single"                         },
2316 	{0x14, 0x01, 0x40, 0x40, "Dual"                           },
2317 };
2318 
2319 STDDIPINFO(Megablst)
2320 
2321 static struct BurnDIPInfo MegablstjDIPList[]=
2322 {
2323 	// Default Values
2324 	{0x13, 0xff, 0xff, 0xfe, NULL                             },
2325 	{0x14, 0xff, 0xff, 0xff, NULL                             },
2326 
2327 	// Dip 1
2328 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
2329 	{0x13, 0x01, 0x01, 0x00, "Upright"                        },
2330 	{0x13, 0x01, 0x01, 0x01, "Cocktail"                       },
2331 
2332 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2333 	{0x13, 0x01, 0x02, 0x02, "Off"                            },
2334 	{0x13, 0x01, 0x02, 0x00, "On"                             },
2335 
2336 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2337 	{0x13, 0x01, 0x04, 0x04, "Off"                            },
2338 	{0x13, 0x01, 0x04, 0x00, "On"                             },
2339 
2340 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2341 	{0x13, 0x01, 0x08, 0x00, "Off"                            },
2342 	{0x13, 0x01, 0x08, 0x08, "On"                             },
2343 
2344 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2345 	{0x13, 0x01, 0x30, 0x00, "2 Coins 1 Credit"               },
2346 	{0x13, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2347 	{0x13, 0x01, 0x30, 0x00, "2 Coins 3 Credits"              },
2348 	{0x13, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
2349 
2350 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2351 	{0x13, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
2352 	{0x13, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
2353 	{0x13, 0x01, 0xc0, 0x00, "2 Coins 3 Credits"              },
2354 	{0x13, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
2355 
2356 	// Dip 2
2357 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2358 	{0x14, 0x01, 0x03, 0x02, "Easy"                           },
2359 	{0x14, 0x01, 0x03, 0x03, "Medium"                         },
2360 	{0x14, 0x01, 0x03, 0x01, "Hard"                           },
2361 	{0x14, 0x01, 0x03, 0x00, "Hardest"                        },
2362 
2363 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
2364 	{0x14, 0x01, 0x0c, 0x0c, "100k only"                      },
2365 	{0x14, 0x01, 0x0c, 0x04, "150k only"                      },
2366 	{0x14, 0x01, 0x0c, 0x08, "200k only"                      },
2367 	{0x14, 0x01, 0x0c, 0x00, "None"                           },
2368 
2369 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2370 	{0x14, 0x01, 0x30, 0x10, "1"                              },
2371 	{0x14, 0x01, 0x30, 0x00, "2"                              },
2372 	{0x14, 0x01, 0x30, 0x30, "3"                              },
2373 	{0x14, 0x01, 0x30, 0x20, "4"                              },
2374 
2375 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
2376 	{0x14, 0x01, 0x40, 0x00, "Single"                         },
2377 	{0x14, 0x01, 0x40, 0x40, "Dual"                           },
2378 };
2379 
2380 STDDIPINFO(Megablstj)
2381 
2382 static struct BurnDIPInfo MegablstuDIPList[]=
2383 {
2384 	// Default Values
2385 	{0x13, 0xff, 0xff, 0xfe, NULL                             },
2386 	{0x14, 0xff, 0xff, 0xff, NULL                             },
2387 
2388 	// Dip 1
2389 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
2390 	{0x13, 0x01, 0x01, 0x00, "Upright"                        },
2391 	{0x13, 0x01, 0x01, 0x01, "Cocktail"                       },
2392 
2393 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2394 	{0x13, 0x01, 0x02, 0x02, "Off"                            },
2395 	{0x13, 0x01, 0x02, 0x00, "On"                             },
2396 
2397 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2398 	{0x13, 0x01, 0x04, 0x04, "Off"                            },
2399 	{0x13, 0x01, 0x04, 0x00, "On"                             },
2400 
2401 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2402 	{0x13, 0x01, 0x08, 0x00, "Off"                            },
2403 	{0x13, 0x01, 0x08, 0x08, "On"                             },
2404 
2405 	{0   , 0xfe, 0   , 4   , "Coinage"                        },
2406 	{0x13, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
2407 	{0x13, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
2408 	{0x13, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
2409 	{0x13, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2410 
2411 	{0   , 0xfe, 0   , 4   , "Price to Continue"              },
2412 	{0x13, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
2413 	{0x13, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
2414 	{0x13, 0x01, 0xc0, 0x80, "1 Coin 1 Credit"                },
2415 	{0x13, 0x01, 0xc0, 0xc0, "Same as start"                  },
2416 
2417 	// Dip 2
2418 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2419 	{0x14, 0x01, 0x03, 0x02, "Easy"                           },
2420 	{0x14, 0x01, 0x03, 0x03, "Medium"                         },
2421 	{0x14, 0x01, 0x03, 0x01, "Hard"                           },
2422 	{0x14, 0x01, 0x03, 0x00, "Hardest"                        },
2423 
2424 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
2425 	{0x14, 0x01, 0x0c, 0x0c, "100k only"                      },
2426 	{0x14, 0x01, 0x0c, 0x04, "150k only"                      },
2427 	{0x14, 0x01, 0x0c, 0x08, "200k only"                      },
2428 	{0x14, 0x01, 0x0c, 0x00, "None"                           },
2429 
2430 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2431 	{0x14, 0x01, 0x30, 0x10, "1"                              },
2432 	{0x14, 0x01, 0x30, 0x00, "2"                              },
2433 	{0x14, 0x01, 0x30, 0x30, "3"                              },
2434 	{0x14, 0x01, 0x30, 0x20, "4"                              },
2435 
2436 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
2437 	{0x14, 0x01, 0x40, 0x00, "Single"                         },
2438 	{0x14, 0x01, 0x40, 0x40, "Dual"                           },
2439 };
2440 
2441 STDDIPINFO(Megablstu)
2442 
2443 static struct BurnDIPInfo MetalbDIPList[]=
2444 {
2445 	// Default Values
2446 	{0x15, 0xff, 0xff, 0xff, NULL                             },
2447 	{0x16, 0xff, 0xff, 0xff, NULL                             },
2448 
2449 	// Dip 1
2450 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2451 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
2452 	{0x15, 0x01, 0x02, 0x00, "On"                             },
2453 
2454 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2455 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
2456 	{0x15, 0x01, 0x04, 0x00, "On"                             },
2457 
2458 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2459 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
2460 	{0x15, 0x01, 0x08, 0x08, "On"                             },
2461 
2462 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2463 	{0x15, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
2464 	{0x15, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
2465 	{0x15, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
2466 	{0x15, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2467 
2468 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2469 	{0x15, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
2470 	{0x15, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
2471 	{0x15, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
2472 	{0x15, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
2473 
2474 	// Dip 2
2475 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2476 	{0x16, 0x01, 0x03, 0x02, "Easy"                           },
2477 	{0x16, 0x01, 0x03, 0x03, "Medium"                         },
2478 	{0x16, 0x01, 0x03, 0x01, "Hard"                           },
2479 	{0x16, 0x01, 0x03, 0x00, "Hardest"                        },
2480 
2481 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
2482 	{0x16, 0x01, 0x0c, 0x08, "50k and every 120k"             },
2483 	{0x16, 0x01, 0x0c, 0x0c, "70k and every 150k"             },
2484 	{0x16, 0x01, 0x0c, 0x04, "80k and every 160k"             },
2485 	{0x16, 0x01, 0x0c, 0x00, "100k and every 200k"            },
2486 
2487 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2488 	{0x16, 0x01, 0x30, 0x00, "1"                              },
2489 	{0x16, 0x01, 0x30, 0x10, "2"                              },
2490 	{0x16, 0x01, 0x30, 0x30, "3"                              },
2491 	{0x16, 0x01, 0x30, 0x20, "5"                              },
2492 
2493 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
2494 	{0x16, 0x01, 0x40, 0x00, "Off"                            },
2495 	{0x16, 0x01, 0x40, 0x40, "On"                             },
2496 
2497 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
2498 	{0x16, 0x01, 0x80, 0x00, "Single"                         },
2499 	{0x16, 0x01, 0x80, 0x80, "Dual"                           },
2500 };
2501 
2502 STDDIPINFO(Metalb)
2503 
2504 static struct BurnDIPInfo MetalbjDIPList[]=
2505 {
2506 	// Default Values
2507 	{0x15, 0xff, 0xff, 0xff, NULL                             },
2508 	{0x16, 0xff, 0xff, 0xff, NULL                             },
2509 
2510 	// Dip 1
2511 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2512 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
2513 	{0x15, 0x01, 0x02, 0x00, "On"                             },
2514 
2515 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2516 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
2517 	{0x15, 0x01, 0x04, 0x00, "On"                             },
2518 
2519 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2520 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
2521 	{0x15, 0x01, 0x08, 0x08, "On"                             },
2522 
2523 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2524 	{0x15, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
2525 	{0x15, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
2526 	{0x15, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2527 	{0x15, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
2528 
2529 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2530 	{0x15, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
2531 	{0x15, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
2532 	{0x15, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
2533 	{0x15, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
2534 
2535 	// Dip 2
2536 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2537 	{0x16, 0x01, 0x03, 0x02, "Easy"                           },
2538 	{0x16, 0x01, 0x03, 0x03, "Medium"                         },
2539 	{0x16, 0x01, 0x03, 0x01, "Hard"                           },
2540 	{0x16, 0x01, 0x03, 0x00, "Hardest"                        },
2541 
2542 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
2543 	{0x16, 0x01, 0x0c, 0x08, "50k and every 120k"             },
2544 	{0x16, 0x01, 0x0c, 0x0c, "70k and every 150k"             },
2545 	{0x16, 0x01, 0x0c, 0x04, "80k and every 160k"             },
2546 	{0x16, 0x01, 0x0c, 0x00, "100k and every 200k"            },
2547 
2548 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2549 	{0x16, 0x01, 0x30, 0x00, "1"                              },
2550 	{0x16, 0x01, 0x30, 0x10, "2"                              },
2551 	{0x16, 0x01, 0x30, 0x30, "3"                              },
2552 	{0x16, 0x01, 0x30, 0x20, "5"                              },
2553 
2554 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
2555 	{0x16, 0x01, 0x40, 0x00, "Off"                            },
2556 	{0x16, 0x01, 0x40, 0x40, "On"                             },
2557 
2558 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
2559 	{0x16, 0x01, 0x80, 0x00, "Single"                         },
2560 	{0x16, 0x01, 0x80, 0x80, "Dual"                           },
2561 };
2562 
2563 STDDIPINFO(Metalbj)
2564 
2565 static struct BurnDIPInfo MjnquestDIPList[]=
2566 {
2567 	// Default Values
2568 	{0x19, 0xff, 0xff, 0xff, NULL                             },
2569 	{0x1a, 0xff, 0xff, 0xff, NULL                             },
2570 
2571 	// Dip 1
2572 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2573 	{0x19, 0x01, 0x02, 0x02, "Off"                            },
2574 	{0x19, 0x01, 0x02, 0x00, "On"                             },
2575 
2576 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2577 	{0x19, 0x01, 0x04, 0x04, "Off"                            },
2578 	{0x19, 0x01, 0x04, 0x00, "On"                             },
2579 
2580 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2581 	{0x19, 0x01, 0x08, 0x00, "Off"                            },
2582 	{0x19, 0x01, 0x08, 0x08, "On"                             },
2583 
2584 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2585 	{0x19, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
2586 	{0x19, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
2587 	{0x19, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2588 	{0x19, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
2589 
2590 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2591 	{0x19, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
2592 	{0x19, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
2593 	{0x19, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
2594 	{0x19, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
2595 
2596 	// Dip 2
2597 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2598 	{0x1a, 0x01, 0x03, 0x02, "Easy"                           },
2599 	{0x1a, 0x01, 0x03, 0x03, "Medium"                         },
2600 	{0x1a, 0x01, 0x03, 0x01, "Hard"                           },
2601 	{0x1a, 0x01, 0x03, 0x00, "Hardest"                        },
2602 };
2603 
2604 STDDIPINFO(Mjnquest)
2605 
2606 static struct BurnDIPInfo NinjakDIPList[]=
2607 {
2608 	// Default Values
2609 	{0x24, 0xff, 0xff, 0xff, NULL                             },
2610 	{0x25, 0xff, 0xff, 0xdf, NULL                             },
2611 
2612 	// Dip 1
2613 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2614 	{0x24, 0x01, 0x02, 0x02, "Off"                            },
2615 	{0x24, 0x01, 0x02, 0x00, "On"                             },
2616 
2617 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2618 	{0x24, 0x01, 0x04, 0x04, "Off"                            },
2619 	{0x24, 0x01, 0x04, 0x00, "On"                             },
2620 
2621 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2622 	{0x24, 0x01, 0x08, 0x00, "Off"                            },
2623 	{0x24, 0x01, 0x08, 0x08, "On"                             },
2624 
2625 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2626 	{0x24, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
2627 	{0x24, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
2628 	{0x24, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
2629 	{0x24, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2630 
2631 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2632 	{0x24, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
2633 	{0x24, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
2634 	{0x24, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
2635 	{0x24, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
2636 
2637 	// Dip 2
2638 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2639 	{0x25, 0x01, 0x03, 0x02, "Easy"                           },
2640 	{0x25, 0x01, 0x03, 0x03, "Medium"                         },
2641 	{0x25, 0x01, 0x03, 0x01, "Hard"                           },
2642 	{0x25, 0x01, 0x03, 0x00, "Hardest"                        },
2643 
2644 	{0   , 0xfe, 0   , 4   , "Cabinet Type"                   },
2645 	{0x25, 0x01, 0x0c, 0x0c, "2 Players"                      },
2646 	{0x25, 0x01, 0x0c, 0x08, "TROG (4 Players / 2 Coin Slots" },
2647 	{0x25, 0x01, 0x0c, 0x04, "MTX2 (4 Players / 2 Cabinets"   },
2648 	{0x25, 0x01, 0x0c, 0x00, "YMNT (4 Players / 4 Coin Slots" },
2649 
2650 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2651 	{0x25, 0x01, 0x30, 0x20, "2"                              },
2652 	{0x25, 0x01, 0x30, 0x30, "3"                              },
2653 	{0x25, 0x01, 0x30, 0x10, "4"                              },
2654 	{0x25, 0x01, 0x30, 0x00, "5"                              },
2655 
2656 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
2657 	{0x25, 0x01, 0x40, 0x00, "Off"                            },
2658 	{0x25, 0x01, 0x40, 0x40, "On"                             },
2659 
2660 	{0   , 0xfe, 0   , 2   , "Game Type"                      },
2661 	{0x25, 0x01, 0x80, 0x00, "1 Player Only"                  },
2662 	{0x25, 0x01, 0x80, 0x80, "Multiplayer"                    },
2663 };
2664 
2665 STDDIPINFO(Ninjak)
2666 
2667 static struct BurnDIPInfo NinjakjDIPList[]=
2668 {
2669 	// Default Values
2670 	{0x24, 0xff, 0xff, 0xff, NULL                             },
2671 	{0x25, 0xff, 0xff, 0xdf, NULL                             },
2672 
2673 	// Dip 1
2674 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2675 	{0x24, 0x01, 0x02, 0x02, "Off"                            },
2676 	{0x24, 0x01, 0x02, 0x00, "On"                             },
2677 
2678 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2679 	{0x24, 0x01, 0x04, 0x04, "Off"                            },
2680 	{0x24, 0x01, 0x04, 0x00, "On"                             },
2681 
2682 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2683 	{0x24, 0x01, 0x08, 0x00, "Off"                            },
2684 	{0x24, 0x01, 0x08, 0x08, "On"                             },
2685 
2686 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2687 	{0x24, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
2688 	{0x24, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
2689 	{0x24, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2690 	{0x24, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
2691 
2692 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2693 	{0x24, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
2694 	{0x24, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
2695 	{0x24, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
2696 	{0x24, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
2697 
2698 	// Dip 2
2699 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2700 	{0x25, 0x01, 0x03, 0x02, "Easy"                           },
2701 	{0x25, 0x01, 0x03, 0x03, "Medium"                         },
2702 	{0x25, 0x01, 0x03, 0x01, "Hard"                           },
2703 	{0x25, 0x01, 0x03, 0x00, "Hardest"                        },
2704 
2705 	{0   , 0xfe, 0   , 4   , "Cabinet Type"                   },
2706 	{0x25, 0x01, 0x0c, 0x0c, "2 Players"                      },
2707 	{0x25, 0x01, 0x0c, 0x08, "TROG (4 Players / 2 Coin Slots" },
2708 	{0x25, 0x01, 0x0c, 0x04, "MTX2 (4 Players / 2 Cabinets"   },
2709 	{0x25, 0x01, 0x0c, 0x00, "YMNT (4 Players / 4 Coin Slots" },
2710 
2711 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2712 	{0x25, 0x01, 0x30, 0x20, "2"                              },
2713 	{0x25, 0x01, 0x30, 0x30, "3"                              },
2714 	{0x25, 0x01, 0x30, 0x10, "4"                              },
2715 	{0x25, 0x01, 0x30, 0x00, "5"                              },
2716 
2717 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
2718 	{0x25, 0x01, 0x40, 0x00, "Off"                            },
2719 	{0x25, 0x01, 0x40, 0x40, "On"                             },
2720 
2721 	{0   , 0xfe, 0   , 2   , "Game Type"                      },
2722 	{0x25, 0x01, 0x80, 0x00, "1 Player Only"                  },
2723 	{0x25, 0x01, 0x80, 0x80, "Multiplayer"                    },
2724 };
2725 
2726 STDDIPINFO(Ninjakj)
2727 
2728 static struct BurnDIPInfo NinjakuDIPList[]=
2729 {
2730 	// Default Values
2731 	{0x24, 0xff, 0xff, 0xff, NULL                             },
2732 	{0x25, 0xff, 0xff, 0xdf, NULL                             },
2733 
2734 	// Dip 1
2735 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2736 	{0x24, 0x01, 0x02, 0x02, "Off"                            },
2737 	{0x24, 0x01, 0x02, 0x00, "On"                             },
2738 
2739 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2740 	{0x24, 0x01, 0x04, 0x04, "Off"                            },
2741 	{0x24, 0x01, 0x04, 0x00, "On"                             },
2742 
2743 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2744 	{0x24, 0x01, 0x08, 0x00, "Off"                            },
2745 	{0x24, 0x01, 0x08, 0x08, "On"                             },
2746 
2747 	{0   , 0xfe, 0   , 4   , "Coinage"                        },
2748 	{0x24, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
2749 	{0x24, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
2750 	{0x24, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
2751 	{0x24, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2752 
2753 	{0   , 0xfe, 0   , 4   , "Price to Continue"              },
2754 	{0x24, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
2755 	{0x24, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
2756 	{0x24, 0x01, 0xc0, 0x80, "1 Coin 1 Credit"                },
2757 	{0x24, 0x01, 0xc0, 0xc0, "Same as start"                  },
2758 
2759 	// Dip 2
2760 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2761 	{0x25, 0x01, 0x03, 0x02, "Easy"                           },
2762 	{0x25, 0x01, 0x03, 0x03, "Medium"                         },
2763 	{0x25, 0x01, 0x03, 0x01, "Hard"                           },
2764 	{0x25, 0x01, 0x03, 0x00, "Hardest"                        },
2765 
2766 	{0   , 0xfe, 0   , 4   , "Cabinet Type"                   },
2767 	{0x25, 0x01, 0x0c, 0x0c, "2 Players"                      },
2768 	{0x25, 0x01, 0x0c, 0x08, "TROG (4 Players / 2 Coin Slots" },
2769 	{0x25, 0x01, 0x0c, 0x04, "MTX2 (4 Players / 2 Cabinets"   },
2770 	{0x25, 0x01, 0x0c, 0x00, "YMNT (4 Players / 4 Coin Slots" },
2771 
2772 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2773 	{0x25, 0x01, 0x30, 0x20, "2"                              },
2774 	{0x25, 0x01, 0x30, 0x30, "3"                              },
2775 	{0x25, 0x01, 0x30, 0x10, "4"                              },
2776 	{0x25, 0x01, 0x30, 0x00, "5"                              },
2777 
2778 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
2779 	{0x25, 0x01, 0x40, 0x00, "Off"                            },
2780 	{0x25, 0x01, 0x40, 0x40, "On"                             },
2781 
2782 	{0   , 0xfe, 0   , 2   , "Game Type"                      },
2783 	{0x25, 0x01, 0x80, 0x00, "1 Player Only"                  },
2784 	{0x25, 0x01, 0x80, 0x80, "Multiplayer"                    },
2785 };
2786 
2787 STDDIPINFO(Ninjaku)
2788 
2789 static struct BurnDIPInfo PulirulaDIPList[]=
2790 {
2791 	// Default Values
2792 	{0x15, 0xff, 0xff, 0xff, NULL                             },
2793 	{0x16, 0xff, 0xff, 0xff, NULL                             },
2794 
2795 	// Dip 1
2796 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2797 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
2798 	{0x15, 0x01, 0x02, 0x00, "On"                             },
2799 
2800 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2801 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
2802 	{0x15, 0x01, 0x04, 0x00, "On"                             },
2803 
2804 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2805 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
2806 	{0x15, 0x01, 0x08, 0x08, "On"                             },
2807 
2808 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2809 	{0x15, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
2810 	{0x15, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
2811 	{0x15, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
2812 	{0x15, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2813 
2814 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2815 	{0x15, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
2816 	{0x15, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
2817 	{0x15, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
2818 	{0x15, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
2819 
2820 	// Dip 2
2821 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2822 	{0x16, 0x01, 0x03, 0x02, "Easy"                           },
2823 	{0x16, 0x01, 0x03, 0x03, "Medium"                         },
2824 	{0x16, 0x01, 0x03, 0x01, "Hard"                           },
2825 	{0x16, 0x01, 0x03, 0x00, "Hardest"                        },
2826 
2827 	{0   , 0xfe, 0   , 3   , "Magic"                          },
2828 	{0x16, 0x01, 0x0c, 0x0c, "3"                              },
2829 	{0x16, 0x01, 0x0c, 0x08, "4"                              },
2830 	{0x16, 0x01, 0x0c, 0x04, "5"                              },
2831 
2832 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2833 	{0x16, 0x01, 0x30, 0x20, "2"                              },
2834 	{0x16, 0x01, 0x30, 0x30, "3"                              },
2835 	{0x16, 0x01, 0x30, 0x10, "4"                              },
2836 	{0x16, 0x01, 0x30, 0x00, "5"                              },
2837 
2838 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
2839 	{0x16, 0x01, 0x80, 0x00, "Single"                         },
2840 	{0x16, 0x01, 0x80, 0x80, "Dual"                           },
2841 };
2842 
2843 STDDIPINFO(Pulirula)
2844 
2845 static struct BurnDIPInfo PulirulajDIPList[]=
2846 {
2847 	// Default Values
2848 	{0x15, 0xff, 0xff, 0xff, NULL                             },
2849 	{0x16, 0xff, 0xff, 0xff, NULL                             },
2850 
2851 	// Dip 1
2852 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2853 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
2854 	{0x15, 0x01, 0x02, 0x00, "On"                             },
2855 
2856 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2857 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
2858 	{0x15, 0x01, 0x04, 0x00, "On"                             },
2859 
2860 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
2861 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
2862 	{0x15, 0x01, 0x08, 0x08, "On"                             },
2863 
2864 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2865 	{0x15, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
2866 	{0x15, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
2867 	{0x15, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2868 	{0x15, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
2869 
2870 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2871 	{0x15, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
2872 	{0x15, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
2873 	{0x15, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
2874 	{0x15, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
2875 
2876 	// Dip 2
2877 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2878 	{0x16, 0x01, 0x03, 0x02, "Easy"                           },
2879 	{0x16, 0x01, 0x03, 0x03, "Medium"                         },
2880 	{0x16, 0x01, 0x03, 0x01, "Hard"                           },
2881 	{0x16, 0x01, 0x03, 0x00, "Hardest"                        },
2882 
2883 	{0   , 0xfe, 0   , 3   , "Magic"                          },
2884 	{0x16, 0x01, 0x0c, 0x0c, "3"                              },
2885 	{0x16, 0x01, 0x0c, 0x08, "4"                              },
2886 	{0x16, 0x01, 0x0c, 0x04, "5"                              },
2887 
2888 	{0   , 0xfe, 0   , 4   , "Lives"                          },
2889 	{0x16, 0x01, 0x30, 0x20, "2"                              },
2890 	{0x16, 0x01, 0x30, 0x30, "3"                              },
2891 	{0x16, 0x01, 0x30, 0x10, "4"                              },
2892 	{0x16, 0x01, 0x30, 0x00, "5"                              },
2893 
2894 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
2895 	{0x16, 0x01, 0x80, 0x00, "Single"                         },
2896 	{0x16, 0x01, 0x80, 0x80, "Dual"                           },
2897 };
2898 
2899 STDDIPINFO(Pulirulaj)
2900 
2901 static struct BurnDIPInfo QcrayonDIPList[]=
2902 {
2903 	// Default Values
2904 	{0x11, 0xff, 0xff, 0xff, NULL                             },
2905 	{0x12, 0xff, 0xff, 0xff, NULL                             },
2906 
2907 	// Dip 1
2908 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2909 	{0x11, 0x01, 0x02, 0x02, "Off"                            },
2910 	{0x11, 0x01, 0x02, 0x00, "On"                             },
2911 
2912 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2913 	{0x11, 0x01, 0x04, 0x04, "Off"                            },
2914 	{0x11, 0x01, 0x04, 0x00, "On"                             },
2915 
2916 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2917 	{0x11, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
2918 	{0x11, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
2919 	{0x11, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2920 	{0x11, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
2921 
2922 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2923 	{0x11, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
2924 	{0x11, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
2925 	{0x11, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
2926 	{0x11, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
2927 
2928 	// Dip 2
2929 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2930 	{0x12, 0x01, 0x03, 0x02, "Easy"                           },
2931 	{0x12, 0x01, 0x03, 0x03, "Medium"                         },
2932 	{0x12, 0x01, 0x03, 0x01, "Hard"                           },
2933 	{0x12, 0x01, 0x03, 0x00, "Hardest"                        },
2934 
2935 	{0   , 0xfe, 0   , 4   , "Default Time"                   },
2936 	{0x12, 0x01, 0x0c, 0x00, "6 seconds"                      },
2937 	{0x12, 0x01, 0x0c, 0x04, "7 seconds"                      },
2938 	{0x12, 0x01, 0x0c, 0x08, "8 seconds"                      },
2939 	{0x12, 0x01, 0x0c, 0x0c, "10 seconds"                     },
2940 };
2941 
2942 STDDIPINFO(Qcrayon)
2943 
2944 static struct BurnDIPInfo Qcrayon2DIPList[]=
2945 {
2946 	// Default Values
2947 	{0x11, 0xff, 0xff, 0xff, NULL                             },
2948 	{0x12, 0xff, 0xff, 0xff, NULL                             },
2949 
2950 	// Dip 1
2951 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2952 	{0x11, 0x01, 0x02, 0x02, "Off"                            },
2953 	{0x11, 0x01, 0x02, 0x00, "On"                             },
2954 
2955 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2956 	{0x11, 0x01, 0x04, 0x04, "Off"                            },
2957 	{0x11, 0x01, 0x04, 0x00, "On"                             },
2958 
2959 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
2960 	{0x11, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
2961 	{0x11, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
2962 	{0x11, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
2963 	{0x11, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
2964 
2965 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
2966 	{0x11, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
2967 	{0x11, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
2968 	{0x11, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
2969 	{0x11, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
2970 
2971 	// Dip 2
2972 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
2973 	{0x12, 0x01, 0x03, 0x02, "Easy"                           },
2974 	{0x12, 0x01, 0x03, 0x03, "Medium"                         },
2975 	{0x12, 0x01, 0x03, 0x01, "Hard"                           },
2976 	{0x12, 0x01, 0x03, 0x00, "Hardest"                        },
2977 
2978 	{0   , 0xfe, 0   , 2   , "Game Control"                   },
2979 	{0x12, 0x01, 0x80, 0x80, "Joystick"                       },
2980 	{0x12, 0x01, 0x80, 0x00, "4 Buttons"                      },
2981 };
2982 
2983 STDDIPINFO(Qcrayon2)
2984 
2985 static struct BurnDIPInfo QjinseiDIPList[]=
2986 {
2987 	// Default Values
2988 	{0x11, 0xff, 0xff, 0xff, NULL                             },
2989 	{0x12, 0xff, 0xff, 0xff, NULL                             },
2990 
2991 	// Dip 1
2992 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
2993 	{0x11, 0x01, 0x02, 0x02, "Off"                            },
2994 	{0x11, 0x01, 0x02, 0x00, "On"                             },
2995 
2996 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
2997 	{0x11, 0x01, 0x04, 0x04, "Off"                            },
2998 	{0x11, 0x01, 0x04, 0x00, "On"                             },
2999 
3000 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
3001 	{0x11, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
3002 	{0x11, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
3003 	{0x11, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3004 	{0x11, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
3005 
3006 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
3007 	{0x11, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
3008 	{0x11, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
3009 	{0x11, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
3010 	{0x11, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
3011 
3012 	// Dip 2
3013 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
3014 	{0x12, 0x01, 0x03, 0x02, "Easy"                           },
3015 	{0x12, 0x01, 0x03, 0x03, "Medium"                         },
3016 	{0x12, 0x01, 0x03, 0x01, "Hard"                           },
3017 	{0x12, 0x01, 0x03, 0x00, "Hardest"                        },
3018 };
3019 
3020 STDDIPINFO(Qjinsei)
3021 
3022 static struct BurnDIPInfo QtorimonDIPList[]=
3023 {
3024 	// Default Values
3025 	{0x0f, 0xff, 0xff, 0xff, NULL                             },
3026 	{0x10, 0xff, 0xff, 0xff, NULL                             },
3027 
3028 	// Dip 1
3029 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
3030 	{0x0f, 0x01, 0x02, 0x02, "Off"                            },
3031 	{0x0f, 0x01, 0x02, 0x00, "On"                             },
3032 
3033 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
3034 	{0x0f, 0x01, 0x04, 0x04, "Off"                            },
3035 	{0x0f, 0x01, 0x04, 0x00, "On"                             },
3036 
3037 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
3038 	{0x0f, 0x01, 0x30, 0x00, "2 Coins 1 Credit"               },
3039 	{0x0f, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3040 	{0x0f, 0x01, 0x30, 0x00, "2 Coins 3 Credits"              },
3041 	{0x0f, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
3042 
3043 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
3044 	{0x0f, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
3045 	{0x0f, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
3046 	{0x0f, 0x01, 0xc0, 0x00, "2 Coins 3 Credits"              },
3047 	{0x0f, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
3048 
3049 	// Dip 2
3050 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
3051 	{0x10, 0x01, 0x03, 0x02, "Easy"                           },
3052 	{0x10, 0x01, 0x03, 0x03, "Medium"                         },
3053 	{0x10, 0x01, 0x03, 0x01, "Hard"                           },
3054 	{0x10, 0x01, 0x03, 0x00, "Hardest"                        },
3055 
3056 	{0   , 0xfe, 0   , 4   , "Lives"                          },
3057 	{0x10, 0x01, 0x30, 0x10, "1"                              },
3058 	{0x10, 0x01, 0x30, 0x20, "2"                              },
3059 	{0x10, 0x01, 0x30, 0x30, "3"                              },
3060 	{0x10, 0x01, 0x30, 0x00, "4"                              },
3061 
3062 	{0   , 0xfe, 0   , 2   , "Show Correct Answer"            },
3063 	{0x10, 0x01, 0x40, 0x40, "Off"                            },
3064 	{0x10, 0x01, 0x40, 0x00, "On"                             },
3065 };
3066 
3067 STDDIPINFO(Qtorimon)
3068 
3069 static struct BurnDIPInfo QuizhqDIPList[]=
3070 {
3071 	// Default Values
3072 	{0x11, 0xff, 0xff, 0xff, NULL                             },
3073 	{0x12, 0xff, 0xff, 0xff, NULL                             },
3074 
3075 	// Dip 1
3076 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
3077 	{0x11, 0x01, 0x02, 0x02, "Off"                            },
3078 	{0x11, 0x01, 0x02, 0x00, "On"                             },
3079 
3080 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
3081 	{0x11, 0x01, 0x04, 0x04, "Off"                            },
3082 	{0x11, 0x01, 0x04, 0x00, "On"                             },
3083 
3084 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
3085 	{0x11, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
3086 	{0x11, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
3087 	{0x11, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3088 	{0x11, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
3089 
3090 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
3091 	{0x11, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
3092 	{0x11, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
3093 	{0x11, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
3094 	{0x11, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
3095 
3096 	// Dip 2
3097 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
3098 	{0x12, 0x01, 0x03, 0x02, "Easy"                           },
3099 	{0x12, 0x01, 0x03, 0x03, "Medium"                         },
3100 	{0x12, 0x01, 0x03, 0x01, "Hard"                           },
3101 	{0x12, 0x01, 0x03, 0x00, "Hardest"                        },
3102 
3103 	{0   , 0xfe, 0   , 4   , "Time"                           },
3104 	{0x12, 0x01, 0x0c, 0x0c, "5 seconds"                      },
3105 	{0x12, 0x01, 0x0c, 0x08, "10 seconds"                     },
3106 	{0x12, 0x01, 0x0c, 0x04, "15 seconds"                     },
3107 	{0x12, 0x01, 0x0c, 0x00, "20 seconds"                     },
3108 
3109 	{0   , 0xfe, 0   , 4   , "Lives"                          },
3110 	{0x12, 0x01, 0x30, 0x20, "1"                              },
3111 	{0x12, 0x01, 0x30, 0x30, "2"                              },
3112 	{0x12, 0x01, 0x30, 0x10, "3"                              },
3113 	{0x12, 0x01, 0x30, 0x00, "4"                              },
3114 
3115 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
3116 	{0x12, 0x01, 0x40, 0x00, "Off"                            },
3117 	{0x12, 0x01, 0x40, 0x40, "On"                             },
3118 
3119 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
3120 	{0x12, 0x01, 0x80, 0x00, "Single"                         },
3121 	{0x12, 0x01, 0x80, 0x80, "Dual"                           },
3122 };
3123 
3124 STDDIPINFO(Quizhq)
3125 
3126 static struct BurnDIPInfo QzchikyuDIPList[]=
3127 {
3128 	// Default Values
3129 	{0x11, 0xff, 0xff, 0xfe, NULL                             },
3130 	{0x12, 0xff, 0xff, 0xff, NULL                             },
3131 
3132 	// Dip 1
3133 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
3134 	{0x11, 0x01, 0x01, 0x00, "Upright"                        },
3135 	{0x11, 0x01, 0x01, 0x01, "Cocktail"                       },
3136 
3137 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
3138 	{0x11, 0x01, 0x02, 0x02, "Off"                            },
3139 	{0x11, 0x01, 0x02, 0x00, "On"                             },
3140 
3141 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
3142 	{0x11, 0x01, 0x04, 0x04, "Off"                            },
3143 	{0x11, 0x01, 0x04, 0x00, "On"                             },
3144 
3145 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
3146 	{0x11, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
3147 	{0x11, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
3148 	{0x11, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3149 	{0x11, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
3150 
3151 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
3152 	{0x11, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
3153 	{0x11, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
3154 	{0x11, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
3155 	{0x11, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
3156 
3157 	// Dip 2
3158 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
3159 	{0x12, 0x01, 0x03, 0x02, "Easy"                           },
3160 	{0x12, 0x01, 0x03, 0x03, "Medium"                         },
3161 	{0x12, 0x01, 0x03, 0x01, "Hard"                           },
3162 	{0x12, 0x01, 0x03, 0x00, "Hardest"                        },
3163 };
3164 
3165 STDDIPINFO(Qzchikyu)
3166 
3167 static struct BurnDIPInfo QzquestDIPList[]=
3168 {
3169 	// Default Values
3170 	{0x11, 0xff, 0xff, 0xfe, NULL                             },
3171 	{0x12, 0xff, 0xff, 0xff, NULL                             },
3172 
3173 	// Dip 1
3174 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
3175 	{0x11, 0x01, 0x01, 0x00, "Upright"                        },
3176 	{0x11, 0x01, 0x01, 0x01, "Cocktail"                       },
3177 
3178 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
3179 	{0x11, 0x01, 0x02, 0x02, "Off"                            },
3180 	{0x11, 0x01, 0x02, 0x00, "On"                             },
3181 
3182 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
3183 	{0x11, 0x01, 0x04, 0x04, "Off"                            },
3184 	{0x11, 0x01, 0x04, 0x00, "On"                             },
3185 
3186 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
3187 	{0x11, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
3188 	{0x11, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
3189 	{0x11, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3190 	{0x11, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
3191 
3192 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
3193 	{0x11, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
3194 	{0x11, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
3195 	{0x11, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
3196 	{0x11, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
3197 
3198 	// Dip 2
3199 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
3200 	{0x12, 0x01, 0x03, 0x02, "Easy"                           },
3201 	{0x12, 0x01, 0x03, 0x03, "Medium"                         },
3202 	{0x12, 0x01, 0x03, 0x01, "Hard"                           },
3203 	{0x12, 0x01, 0x03, 0x00, "Hardest"                        },
3204 };
3205 
3206 STDDIPINFO(Qzquest)
3207 
3208 static struct BurnDIPInfo SolfigtrDIPList[]=
3209 {
3210 	// Default Values
3211 	{0x15, 0xff, 0xff, 0xff, NULL                             },
3212 	{0x16, 0xff, 0xff, 0xff, NULL                             },
3213 
3214 	// Dip 1
3215 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
3216 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
3217 	{0x15, 0x01, 0x02, 0x00, "On"                             },
3218 
3219 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
3220 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
3221 	{0x15, 0x01, 0x04, 0x00, "On"                             },
3222 
3223 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
3224 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
3225 	{0x15, 0x01, 0x08, 0x08, "On"                             },
3226 
3227 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
3228 	{0x15, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
3229 	{0x15, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
3230 	{0x15, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
3231 	{0x15, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3232 
3233 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
3234 	{0x15, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
3235 	{0x15, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
3236 	{0x15, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
3237 	{0x15, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
3238 
3239 	// Dip 2
3240 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
3241 	{0x16, 0x01, 0x03, 0x02, "Easy"                           },
3242 	{0x16, 0x01, 0x03, 0x03, "Medium"                         },
3243 	{0x16, 0x01, 0x03, 0x01, "Hard"                           },
3244 	{0x16, 0x01, 0x03, 0x00, "Hardest"                        },
3245 };
3246 
3247 STDDIPINFO(Solfigtr)
3248 
3249 static struct BurnDIPInfo SsiDIPList[]=
3250 {
3251 	// Default Values
3252 	{0x13, 0xff, 0xff, 0xfe, NULL                             },
3253 	{0x14, 0xff, 0xff, 0xff, NULL                             },
3254 
3255 	// Dip 1
3256 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
3257 	{0x13, 0x01, 0x01, 0x00, "Upright"                        },
3258 	{0x13, 0x01, 0x01, 0x01, "Cocktail"                       },
3259 
3260 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
3261 	{0x13, 0x01, 0x02, 0x02, "Off"                            },
3262 	{0x13, 0x01, 0x02, 0x00, "On"                             },
3263 
3264 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
3265 	{0x13, 0x01, 0x04, 0x04, "Off"                            },
3266 	{0x13, 0x01, 0x04, 0x00, "On"                             },
3267 
3268 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
3269 	{0x13, 0x01, 0x08, 0x00, "Off"                            },
3270 	{0x13, 0x01, 0x08, 0x08, "On"                             },
3271 
3272 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
3273 	{0x13, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
3274 	{0x13, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
3275 	{0x13, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
3276 	{0x13, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3277 
3278 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
3279 	{0x13, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
3280 	{0x13, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
3281 	{0x13, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
3282 	{0x13, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
3283 
3284 	// Dip 2
3285 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
3286 	{0x14, 0x01, 0x03, 0x02, "Easy"                           },
3287 	{0x14, 0x01, 0x03, 0x03, "Medium"                         },
3288 	{0x14, 0x01, 0x03, 0x01, "Hard"                           },
3289 	{0x14, 0x01, 0x03, 0x00, "Hardest"                        },
3290 
3291 	{0   , 0xfe, 0   , 4   , "Shields"                        },
3292 	{0x14, 0x01, 0x0c, 0x00, "None"                           },
3293 	{0x14, 0x01, 0x0c, 0x0c, "1"                              },
3294 	{0x14, 0x01, 0x0c, 0x04, "2"                              },
3295 	{0x14, 0x01, 0x0c, 0x08, "3"                              },
3296 
3297 	{0   , 0xfe, 0   , 2   , "Lives"                          },
3298 	{0x14, 0x01, 0x10, 0x00, "2"                              },
3299 	{0x14, 0x01, 0x10, 0x10, "3"                              },
3300 
3301 	{0   , 0xfe, 0   , 4   , "2 Player Mode"                  },
3302 	{0x14, 0x01, 0xa0, 0xa0, "Simultaneous"                   },
3303 	{0x14, 0x01, 0xa0, 0x80, "Alternate, Single"              },
3304 	{0x14, 0x01, 0xa0, 0x00, "Alternate, Dual"                },
3305 	{0x14, 0x01, 0xa0, 0x20, "Not Allowed"                    },
3306 
3307 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
3308 	{0x14, 0x01, 0x40, 0x00, "Off"                            },
3309 	{0x14, 0x01, 0x40, 0x40, "On"                             },
3310 };
3311 
3312 STDDIPINFO(Ssi)
3313 
3314 static struct BurnDIPInfo Majest12DIPList[]=
3315 {
3316 	// Default Values
3317 	{0x13, 0xff, 0xff, 0xfe, NULL                             },
3318 	{0x14, 0xff, 0xff, 0xff, NULL                             },
3319 
3320 	// Dip 1
3321 	{0   , 0xfe, 0   , 2   , "Cabinet"                        },
3322 	{0x13, 0x01, 0x01, 0x00, "Upright"                        },
3323 	{0x13, 0x01, 0x01, 0x01, "Cocktail"                       },
3324 
3325 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
3326 	{0x13, 0x01, 0x02, 0x02, "Off"                            },
3327 	{0x13, 0x01, 0x02, 0x00, "On"                             },
3328 
3329 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
3330 	{0x13, 0x01, 0x04, 0x04, "Off"                            },
3331 	{0x13, 0x01, 0x04, 0x00, "On"                             },
3332 
3333 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
3334 	{0x13, 0x01, 0x08, 0x00, "Off"                            },
3335 	{0x13, 0x01, 0x08, 0x08, "On"                             },
3336 
3337 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
3338 	{0x13, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
3339 	{0x13, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
3340 	{0x13, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3341 	{0x13, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
3342 
3343 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
3344 	{0x13, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
3345 	{0x13, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
3346 	{0x13, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
3347 	{0x13, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
3348 
3349 	// Dip 2
3350 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
3351 	{0x14, 0x01, 0x03, 0x02, "Easy"                           },
3352 	{0x14, 0x01, 0x03, 0x03, "Medium"                         },
3353 	{0x14, 0x01, 0x03, 0x01, "Hard"                           },
3354 	{0x14, 0x01, 0x03, 0x00, "Hardest"                        },
3355 
3356 	{0   , 0xfe, 0   , 4   , "Shields"                        },
3357 	{0x14, 0x01, 0x0c, 0x00, "None"                           },
3358 	{0x14, 0x01, 0x0c, 0x0c, "1"                              },
3359 	{0x14, 0x01, 0x0c, 0x04, "2"                              },
3360 	{0x14, 0x01, 0x0c, 0x08, "3"                              },
3361 
3362 	{0   , 0xfe, 0   , 2   , "Lives"                          },
3363 	{0x14, 0x01, 0x10, 0x00, "2"                              },
3364 	{0x14, 0x01, 0x10, 0x10, "3"                              },
3365 
3366 	{0   , 0xfe, 0   , 4   , "2 Player Mode"                  },
3367 	{0x14, 0x01, 0xa0, 0xa0, "Simultaneous"                   },
3368 	{0x14, 0x01, 0xa0, 0x80, "Alternate, Single"              },
3369 	{0x14, 0x01, 0xa0, 0x00, "Alternate, Dual"                },
3370 	{0x14, 0x01, 0xa0, 0x20, "Not Allowed"                    },
3371 
3372 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
3373 	{0x14, 0x01, 0x40, 0x00, "Off"                            },
3374 	{0x14, 0x01, 0x40, 0x40, "On"                             },
3375 };
3376 
3377 STDDIPINFO(Majest12)
3378 
3379 static struct BurnDIPInfo ThundfoxDIPList[]=
3380 {
3381 	// Default Values
3382 	{0x15, 0xff, 0xff, 0xff, NULL                             },
3383 	{0x16, 0xff, 0xff, 0xff, NULL                             },
3384 
3385 	// Dip 1
3386 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
3387 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
3388 	{0x15, 0x01, 0x02, 0x00, "On"                             },
3389 
3390 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
3391 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
3392 	{0x15, 0x01, 0x04, 0x00, "On"                             },
3393 
3394 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
3395 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
3396 	{0x15, 0x01, 0x08, 0x08, "On"                             },
3397 
3398 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
3399 	{0x15, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
3400 	{0x15, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
3401 	{0x15, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
3402 	{0x15, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3403 
3404 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
3405 	{0x15, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
3406 	{0x15, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
3407 	{0x15, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
3408 	{0x15, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
3409 
3410 	// Dip 2
3411 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
3412 	{0x16, 0x01, 0x03, 0x02, "Easy"                           },
3413 	{0x16, 0x01, 0x03, 0x03, "Medium"                         },
3414 	{0x16, 0x01, 0x03, 0x01, "Hard"                           },
3415 	{0x16, 0x01, 0x03, 0x00, "Hardest"                        },
3416 
3417 	{0   , 0xfe, 0   , 2   , "Timer"                          },
3418 	{0x16, 0x01, 0x04, 0x00, "Off"                            },
3419 	{0x16, 0x01, 0x04, 0x04, "On"                             },
3420 
3421 	{0   , 0xfe, 0   , 4   , "Lives"                          },
3422 	{0x16, 0x01, 0x30, 0x20, "2"                              },
3423 	{0x16, 0x01, 0x30, 0x30, "3"                              },
3424 	{0x16, 0x01, 0x30, 0x10, "4"                              },
3425 	{0x16, 0x01, 0x30, 0x00, "5"                              },
3426 
3427 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
3428 	{0x16, 0x01, 0x40, 0x00, "Off"                            },
3429 	{0x16, 0x01, 0x40, 0x40, "On"                             },
3430 
3431 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
3432 	{0x16, 0x01, 0x80, 0x00, "Single"                         },
3433 	{0x16, 0x01, 0x80, 0x80, "Dual"                           },
3434 };
3435 
3436 STDDIPINFO(Thundfox)
3437 
3438 static struct BurnDIPInfo ThundfoxjDIPList[]=
3439 {
3440 	// Default Values
3441 	{0x15, 0xff, 0xff, 0xff, NULL                             },
3442 	{0x16, 0xff, 0xff, 0xff, NULL                             },
3443 
3444 	// Dip 1
3445 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
3446 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
3447 	{0x15, 0x01, 0x02, 0x00, "On"                             },
3448 
3449 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
3450 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
3451 	{0x15, 0x01, 0x04, 0x00, "On"                             },
3452 
3453 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
3454 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
3455 	{0x15, 0x01, 0x08, 0x08, "On"                             },
3456 
3457 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
3458 	{0x15, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
3459 	{0x15, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
3460 	{0x15, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3461 	{0x15, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
3462 
3463 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
3464 	{0x15, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
3465 	{0x15, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
3466 	{0x15, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
3467 	{0x15, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
3468 
3469 	// Dip 2
3470 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
3471 	{0x16, 0x01, 0x03, 0x02, "Easy"                           },
3472 	{0x16, 0x01, 0x03, 0x03, "Medium"                         },
3473 	{0x16, 0x01, 0x03, 0x01, "Hard"                           },
3474 	{0x16, 0x01, 0x03, 0x00, "Hardest"                        },
3475 
3476 	{0   , 0xfe, 0   , 2   , "Timer"                          },
3477 	{0x16, 0x01, 0x04, 0x00, "Off"                            },
3478 	{0x16, 0x01, 0x04, 0x04, "On"                             },
3479 
3480 	{0   , 0xfe, 0   , 4   , "Lives"                          },
3481 	{0x16, 0x01, 0x30, 0x20, "2"                              },
3482 	{0x16, 0x01, 0x30, 0x30, "3"                              },
3483 	{0x16, 0x01, 0x30, 0x10, "4"                              },
3484 	{0x16, 0x01, 0x30, 0x00, "5"                              },
3485 
3486 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
3487 	{0x16, 0x01, 0x40, 0x00, "Off"                            },
3488 	{0x16, 0x01, 0x40, 0x40, "On"                             },
3489 
3490 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
3491 	{0x16, 0x01, 0x80, 0x00, "Single"                         },
3492 	{0x16, 0x01, 0x80, 0x80, "Dual"                           },
3493 };
3494 
3495 STDDIPINFO(Thundfoxj)
3496 
3497 static struct BurnDIPInfo ThundfoxuDIPList[]=
3498 {
3499 	// Default Values
3500 	{0x15, 0xff, 0xff, 0xff, NULL                             },
3501 	{0x16, 0xff, 0xff, 0xff, NULL                             },
3502 
3503 	// Dip 1
3504 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
3505 	{0x15, 0x01, 0x02, 0x02, "Off"                            },
3506 	{0x15, 0x01, 0x02, 0x00, "On"                             },
3507 
3508 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
3509 	{0x15, 0x01, 0x04, 0x04, "Off"                            },
3510 	{0x15, 0x01, 0x04, 0x00, "On"                             },
3511 
3512 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
3513 	{0x15, 0x01, 0x08, 0x00, "Off"                            },
3514 	{0x15, 0x01, 0x08, 0x08, "On"                             },
3515 
3516 	{0   , 0xfe, 0   , 4   , "Coinage"                        },
3517 	{0x15, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
3518 	{0x15, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
3519 	{0x15, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
3520 	{0x15, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3521 
3522 	{0   , 0xfe, 0   , 4   , "Price to Continue"              },
3523 	{0x15, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
3524 	{0x15, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
3525 	{0x15, 0x01, 0xc0, 0x80, "1 Coin 1 Credit"                },
3526 	{0x15, 0x01, 0xc0, 0xc0, "Same as start"                  },
3527 
3528 	// Dip 2
3529 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
3530 	{0x16, 0x01, 0x03, 0x02, "Easy"                           },
3531 	{0x16, 0x01, 0x03, 0x03, "Medium"                         },
3532 	{0x16, 0x01, 0x03, 0x01, "Hard"                           },
3533 	{0x16, 0x01, 0x03, 0x00, "Hardest"                        },
3534 
3535 	{0   , 0xfe, 0   , 2   , "Timer"                          },
3536 	{0x16, 0x01, 0x04, 0x00, "Off"                            },
3537 	{0x16, 0x01, 0x04, 0x04, "On"                             },
3538 
3539 	{0   , 0xfe, 0   , 4   , "Lives"                          },
3540 	{0x16, 0x01, 0x30, 0x20, "2"                              },
3541 	{0x16, 0x01, 0x30, 0x30, "3"                              },
3542 	{0x16, 0x01, 0x30, 0x10, "4"                              },
3543 	{0x16, 0x01, 0x30, 0x00, "5"                              },
3544 
3545 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
3546 	{0x16, 0x01, 0x40, 0x00, "Off"                            },
3547 	{0x16, 0x01, 0x40, 0x40, "On"                             },
3548 
3549 	{0   , 0xfe, 0   , 2   , "Upright Controls"               },
3550 	{0x16, 0x01, 0x80, 0x00, "Single"                         },
3551 	{0x16, 0x01, 0x80, 0x80, "Dual"                           },
3552 };
3553 
3554 STDDIPINFO(Thundfoxu)
3555 
3556 static struct BurnDIPInfo YesnojDIPList[]=
3557 {
3558 	// Default Values
3559 	{0x09, 0xff, 0xff, 0xff, NULL                             },
3560 	{0x0a, 0xff, 0xff, 0xfe, NULL                             },
3561 
3562 	// Dip 1
3563 
3564 	// Dip 2
3565 	{0   , 0xfe, 0   , 2   , "Results Printer"                },
3566 	{0x0a, 0x01, 0x01, 0x00, "Off"                            },
3567 	{0x0a, 0x01, 0x01, 0x01, "On"                             },
3568 
3569 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
3570 	{0x0a, 0x01, 0x02, 0x00, "Off"                            },
3571 	{0x0a, 0x01, 0x02, 0x02, "On"                             },
3572 
3573 	{0   , 0xfe, 0   , 4   , "Coinage"                        },
3574 	{0x0a, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
3575 	{0x0a, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
3576 	{0x0a, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
3577 	{0x0a, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3578 };
3579 
3580 STDDIPINFO(Yesnoj)
3581 
3582 static struct BurnDIPInfo YuyugogoDIPList[]=
3583 {
3584 	// Default Values
3585 	{0x11, 0xff, 0xff, 0xff, NULL                             },
3586 	{0x12, 0xff, 0xff, 0xff, NULL                             },
3587 
3588 	// Dip 1
3589 	{0   , 0xfe, 0   , 2   , "Flip Screen"                    },
3590 	{0x11, 0x01, 0x02, 0x02, "Off"                            },
3591 	{0x11, 0x01, 0x02, 0x00, "On"                             },
3592 
3593 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
3594 	{0x11, 0x01, 0x04, 0x04, "Off"                            },
3595 	{0x11, 0x01, 0x04, 0x00, "On"                             },
3596 
3597 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
3598 	{0x11, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
3599 	{0x11, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
3600 	{0x11, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
3601 	{0x11, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
3602 
3603 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
3604 	{0x11, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
3605 	{0x11, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
3606 	{0x11, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
3607 	{0x11, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
3608 
3609 	// Dip 2
3610 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
3611 	{0x12, 0x01, 0x03, 0x02, "Easy"                           },
3612 	{0x12, 0x01, 0x03, 0x03, "Medium"                         },
3613 	{0x12, 0x01, 0x03, 0x01, "Hard"                           },
3614 	{0x12, 0x01, 0x03, 0x00, "Hardest"                        },
3615 
3616 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
3617 	{0x12, 0x01, 0x40, 0x00, "Off"                            },
3618 	{0x12, 0x01, 0x40, 0x40, "On"                             },
3619 };
3620 
3621 STDDIPINFO(Yuyugogo)
3622 
3623 static struct BurnRomInfo CameltryRomDesc[] = {
3624 	{ "c38-11",             0x020000, 0xbe172da0, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3625 	{ "c38-14",             0x020000, 0xffa430de, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3626 
3627 	{ "c38-08.bin",         0x010000, 0x7ff78873, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3628 
3629 	{ "c38-01.bin",         0x080000, 0xc170ff36, BRF_GRA | TAITO_SPRITESA },
3630 
3631 	{ "c38-03.bin",         0x020000, 0x59fa59a7, BRF_SND | TAITO_YM2610A },
3632 
3633 	{ "c38-02.bin",         0x020000, 0x1a11714b, BRF_GRA | TAITO_CHARS_PIVOT },
3634 };
3635 
3636 STD_ROM_PICK(Cameltry)
3637 STD_ROM_FN(Cameltry)
3638 
3639 static struct BurnRomInfo CameltryauRomDesc[] = {
3640 	{ "c38-11",             0x020000, 0xbe172da0, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3641 	{ "c38-14",             0x020000, 0xffa430de, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3642 
3643 	{ "c38-15.bin",         0x010000, 0x0e60faac, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3644 
3645 	{ "c38-01.bin",         0x080000, 0xc170ff36, BRF_GRA | TAITO_SPRITESA },
3646 
3647 	{ "c38-02.bin",         0x020000, 0x1a11714b, BRF_GRA | TAITO_CHARS_PIVOT },
3648 
3649 	{ "c38-04.bin",         0x020000, 0x53d330bb, BRF_SND | TAITO_MSM6295 },
3650 };
3651 
3652 STD_ROM_PICK(Cameltryau)
3653 STD_ROM_FN(Cameltryau)
3654 
3655 static struct BurnRomInfo CameltryaRomDesc[] = {
3656 	{ "c38-11",             0x020000, 0xbe172da0, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3657 	{ "c38-16",             0x020000, 0x66ad6164, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3658 
3659 	{ "c38-15.bin",         0x010000, 0x0e60faac, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3660 
3661 	{ "c38-01.bin",         0x080000, 0xc170ff36, BRF_GRA | TAITO_SPRITESA },
3662 
3663 	{ "c38-02.bin",         0x020000, 0x1a11714b, BRF_GRA | TAITO_CHARS_PIVOT },
3664 
3665 	{ "c38-04.bin",         0x020000, 0x53d330bb, BRF_SND | TAITO_MSM6295 },
3666 };
3667 
3668 STD_ROM_PICK(Cameltrya)
3669 STD_ROM_FN(Cameltrya)
3670 
3671 static struct BurnRomInfo CameltryjRomDesc[] = {
3672 	{ "c38-09.bin",         0x020000, 0x2ae01120, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3673 	{ "c38-10.bin",         0x020000, 0x48d8ff56, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3674 
3675 	{ "c38-08.bin",         0x010000, 0x7ff78873, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3676 
3677 	{ "c38-01.bin",         0x080000, 0xc170ff36, BRF_GRA | TAITO_SPRITESA },
3678 
3679 	{ "c38-03.bin",         0x020000, 0x59fa59a7, BRF_SND | TAITO_YM2610A },
3680 
3681 	{ "c38-02.bin",         0x020000, 0x1a11714b, BRF_GRA | TAITO_CHARS_PIVOT },
3682 };
3683 
3684 STD_ROM_PICK(Cameltryj)
3685 STD_ROM_FN(Cameltryj)
3686 
3687 static struct BurnRomInfo DeadconxRomDesc[] = {
3688 	{ "d28-06.3",           0x040000, 0x5b4bff51, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3689 	{ "d28-12.5",           0x040000, 0x9b74e631, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3690 	{ "d28-09.2",           0x040000, 0x143a0cc1, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3691 	{ "d28-08.4",           0x040000, 0x4c872bd9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3692 
3693 	{ "d28-10.6",           0x010000, 0x40805d74, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3694 
3695 	{ "d28-04.16",          0x080000, 0xdcabc26b, BRF_GRA | TAITO_CHARS_BYTESWAP },
3696 	{ "d28-05.17",          0x080000, 0x862f9665, BRF_GRA | TAITO_CHARS_BYTESWAP },
3697 
3698 	{ "d28-01.8",           0x100000, 0x181d7b69, BRF_GRA | TAITO_SPRITESA },
3699 	{ "d28-02.9",           0x100000, 0xd301771c, BRF_GRA | TAITO_SPRITESA },
3700 
3701 	{ "d28-03.10",          0x100000, 0xa1804b52, BRF_SND | TAITO_YM2610A },
3702 };
3703 
3704 STD_ROM_PICK(Deadconx)
3705 STD_ROM_FN(Deadconx)
3706 
3707 static struct BurnRomInfo DeadconxjRomDesc[] = {
3708 	{ "d28-06.3",           0x040000, 0x5b4bff51, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3709 	{ "d28-07.5",           0x040000, 0x3fb8954c, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3710 	{ "d28-09.2",           0x040000, 0x143a0cc1, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3711 	{ "d28-08.4",           0x040000, 0x4c872bd9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3712 
3713 	{ "d28-10.6",           0x010000, 0x40805d74, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3714 
3715 	{ "d28-04.16",          0x080000, 0xdcabc26b, BRF_GRA | TAITO_CHARS_BYTESWAP },
3716 	{ "d28-05.17",          0x080000, 0x862f9665, BRF_GRA | TAITO_CHARS_BYTESWAP },
3717 
3718 	{ "d28-01.8",           0x100000, 0x181d7b69, BRF_GRA | TAITO_SPRITESA },
3719 	{ "d28-02.9",           0x100000, 0xd301771c, BRF_GRA | TAITO_SPRITESA },
3720 
3721 	{ "d28-03.10",          0x100000, 0xa1804b52, BRF_SND | TAITO_YM2610A },
3722 };
3723 
3724 STD_ROM_PICK(Deadconxj)
3725 STD_ROM_FN(Deadconxj)
3726 
3727 static struct BurnRomInfo DinorexRomDesc[] = {
3728 	{ "d39-14.9",           0x080000, 0xe6aafdac, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3729 	{ "d39-16.8",           0x080000, 0xcedc8537, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3730 	{ "d39-04.6",           0x100000, 0x3800506d, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
3731 	{ "d39-05.7",           0x100000, 0xe2ec3b5d, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
3732 
3733 	{ "d39-12.5",           0x010000, 0x8292c7c1, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3734 
3735 	{ "d39-06.2",           0x100000, 0x52f62835, BRF_GRA | TAITO_CHARS },
3736 
3737 	{ "d39-01.29",          0x200000, 0xd10e9c7d, BRF_GRA | TAITO_SPRITESA },
3738 	{ "d39-02.28",          0x200000, 0x6c304403, BRF_GRA | TAITO_SPRITESA },
3739 	{ "d39-03.27",          0x200000, 0xfc9cdab4, BRF_GRA | TAITO_SPRITESA },
3740 
3741 	{ "d39-07.10",          0x100000, 0x28262816, BRF_SND | TAITO_YM2610A },
3742 	{ "d39-08.4",           0x080000, 0x377b8b7b, BRF_SND | TAITO_YM2610B },
3743 };
3744 
3745 STD_ROM_PICK(Dinorex)
3746 STD_ROM_FN(Dinorex)
3747 
3748 static struct BurnRomInfo DinorexjRomDesc[] = {
3749 	{ "d39-14.9",           0x080000, 0xe6aafdac, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3750 	{ "d39-13.8",           0x080000, 0xae496b2f, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3751 	{ "d39-04.6",           0x100000, 0x3800506d, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
3752 	{ "d39-05.7",           0x100000, 0xe2ec3b5d, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
3753 
3754 	{ "d39-12.5",           0x010000, 0x8292c7c1, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3755 
3756 	{ "d39-06.2",           0x100000, 0x52f62835, BRF_GRA | TAITO_CHARS },
3757 
3758 	{ "d39-01.29",          0x200000, 0xd10e9c7d, BRF_GRA | TAITO_SPRITESA },
3759 	{ "d39-02.28",          0x200000, 0x6c304403, BRF_GRA | TAITO_SPRITESA },
3760 	{ "d39-03.27",          0x200000, 0xfc9cdab4, BRF_GRA | TAITO_SPRITESA },
3761 
3762 	{ "d39-07.10",          0x100000, 0x28262816, BRF_SND | TAITO_YM2610A },
3763 	{ "d39-08.4",           0x080000, 0x377b8b7b, BRF_SND | TAITO_YM2610B },
3764 };
3765 
3766 STD_ROM_PICK(Dinorexj)
3767 STD_ROM_FN(Dinorexj)
3768 
3769 static struct BurnRomInfo DinorexuRomDesc[] = {
3770 	{ "d39-14.9",           0x080000, 0xe6aafdac, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3771 	{ "d39-15.8",           0x080000, 0xfe96723b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3772 	{ "d39-04.6",           0x100000, 0x3800506d, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
3773 	{ "d39-05.7",           0x100000, 0xe2ec3b5d, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
3774 
3775 	{ "d39-12.5",           0x010000, 0x8292c7c1, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3776 
3777 	{ "d39-06.2",           0x100000, 0x52f62835, BRF_GRA | TAITO_CHARS },
3778 
3779 	{ "d39-01.29",          0x200000, 0xd10e9c7d, BRF_GRA | TAITO_SPRITESA },
3780 	{ "d39-02.28",          0x200000, 0x6c304403, BRF_GRA | TAITO_SPRITESA },
3781 	{ "d39-03.27",          0x200000, 0xfc9cdab4, BRF_GRA | TAITO_SPRITESA },
3782 
3783 	{ "d39-07.10",          0x100000, 0x28262816, BRF_SND | TAITO_YM2610A },
3784 	{ "d39-08.4",           0x080000, 0x377b8b7b, BRF_SND | TAITO_YM2610B },
3785 };
3786 
3787 STD_ROM_PICK(Dinorexu)
3788 STD_ROM_FN(Dinorexu)
3789 
3790 static struct BurnRomInfo DondokodRomDesc[] = {
3791 	{ "b95-12.bin",          0x020000, 0xd0fce87a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3792 	{ "b95-11-1.bin",        0x020000, 0xdad40cd3, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3793 	{ "b95-10.bin",          0x020000, 0xa46e1f0b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3794 	{ "b95-14.bin",          0x020000, 0x6e4e1351, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3795 
3796 	{ "b95-08.bin",          0x010000, 0xb5aa49e1, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3797 
3798 	{ "b95-02.bin",          0x080000, 0x67b4e979, BRF_GRA | TAITO_CHARS },
3799 
3800 	{ "b95-01.bin",          0x080000, 0x51c176ce, BRF_GRA | TAITO_SPRITESA },
3801 
3802 	{ "b95-04.bin",          0x080000, 0xac4c1716, BRF_SND | TAITO_YM2610A },
3803 
3804 	{ "b95-03.bin",          0x080000, 0x543aa0d1, BRF_GRA | TAITO_CHARS_PIVOT },
3805 };
3806 
3807 STD_ROM_PICK(Dondokod)
3808 STD_ROM_FN(Dondokod)
3809 
3810 static struct BurnRomInfo DondokodjRomDesc[] = {
3811 	{ "b95-12.bin",          0x020000, 0xd0fce87a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3812 	{ "b95-11-1.bin",        0x020000, 0xdad40cd3, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3813 	{ "b95-10.bin",          0x020000, 0xa46e1f0b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3814 	{ "b95-09.bin",          0x020000, 0xd8c86d39, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3815 
3816 	{ "b95-08.bin",          0x010000, 0xb5aa49e1, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3817 
3818 	{ "b95-02.bin",          0x080000, 0x67b4e979, BRF_GRA | TAITO_CHARS },
3819 
3820 	{ "b95-01.bin",          0x080000, 0x51c176ce, BRF_GRA | TAITO_SPRITESA },
3821 
3822 	{ "b95-04.bin",          0x080000, 0xac4c1716, BRF_SND | TAITO_YM2610A },
3823 
3824 	{ "b95-03.bin",          0x080000, 0x543aa0d1, BRF_GRA | TAITO_CHARS_PIVOT },
3825 };
3826 
3827 STD_ROM_PICK(Dondokodj)
3828 STD_ROM_FN(Dondokodj)
3829 
3830 static struct BurnRomInfo DondokoduRomDesc[] = {
3831 	{ "b95-12.bin",          0x020000, 0xd0fce87a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3832 	{ "b95-11-1.bin",        0x020000, 0xdad40cd3, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3833 	{ "b95-10.bin",          0x020000, 0xa46e1f0b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3834 	{ "b95-13.bin",          0x020000, 0x350d2c65, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3835 
3836 	{ "b95-08.bin",          0x010000, 0xb5aa49e1, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3837 
3838 	{ "b95-02.bin",          0x080000, 0x67b4e979, BRF_GRA | TAITO_CHARS },
3839 
3840 	{ "b95-01.bin",          0x080000, 0x51c176ce, BRF_GRA | TAITO_SPRITESA },
3841 
3842 	{ "b95-04.bin",          0x080000, 0xac4c1716, BRF_SND | TAITO_YM2610A },
3843 
3844 	{ "b95-03.bin",          0x080000, 0x543aa0d1, BRF_GRA | TAITO_CHARS_PIVOT },
3845 };
3846 
3847 STD_ROM_PICK(Dondokodu)
3848 STD_ROM_FN(Dondokodu)
3849 
3850 static struct BurnRomInfo DriftoutRomDesc[] = {
3851 	{ "ic46.rom",           0x080000, 0x71303738, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3852 	{ "ic45.rom",           0x080000, 0x43f81eca, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3853 
3854 	{ "do_50.rom",          0x010000, 0xffe10124, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3855 
3856 	{ "do_obj.rom",         0x080000, 0x5491f1c4, BRF_GRA | TAITO_SPRITESA },
3857 
3858 	{ "do_snd.rom",         0x080000, 0xf2deb82b, BRF_SND | TAITO_YM2610A },
3859 
3860 	{ "do_piv.rom",         0x080000, 0xc4f012f7, BRF_GRA | TAITO_CHARS_PIVOT },
3861 };
3862 
3863 STD_ROM_PICK(Driftout)
3864 STD_ROM_FN(Driftout)
3865 
3866 static struct BurnRomInfo DriftoutjRomDesc[] = {
3867 	{ "do_46.rom",          0x080000, 0xf960363e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3868 	{ "do_45.rom",          0x080000, 0xe3fe66b9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3869 
3870 	{ "do_50.rom",          0x010000, 0xffe10124, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3871 
3872 	{ "do_obj.rom",         0x080000, 0x5491f1c4, BRF_GRA | TAITO_SPRITESA },
3873 
3874 	{ "do_snd.rom",         0x080000, 0xf2deb82b, BRF_SND | TAITO_YM2610A },
3875 
3876 	{ "do_piv.rom",         0x080000, 0xc4f012f7, BRF_GRA | TAITO_CHARS_PIVOT },
3877 };
3878 
3879 STD_ROM_PICK(Driftoutj)
3880 STD_ROM_FN(Driftoutj)
3881 
3882 static struct BurnRomInfo DriveoutRomDesc[] = {
3883 	{ "4.u3",       		0x080000, 0xdc431e4e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3884 	{ "5.u2",       		0x080000, 0x6f9063f4, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3885 
3886 	{ "3.u20",       		0x008000, 0x99aaeb2e, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3887 
3888 	{ "6.u84",       		0x040000, 0x530ac420, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
3889 	{ "7.u81",       		0x040000, 0x0e9a3e9e, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
3890 
3891 	{ "8.u37",         		0x080000, 0xc4f012f7, BRF_GRA | TAITO_CHARS_PIVOT },
3892 
3893 	{ "1.u28",       		0x080000, 0xcbde0b66, BRF_SND | TAITO_MSM6295 },
3894 	{ "2.u29",       		0x020000, 0x0aba2026, BRF_SND | TAITO_MSM6295 },
3895 };
3896 
3897 STD_ROM_PICK(Driveout)
3898 STD_ROM_FN(Driveout)
3899 
3900 static struct BurnRomInfo FinalbRomDesc[] = {
3901 	{ "b82-09.10",          0x20000, 0x632f1ecd, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3902 	{ "b82-17.11",          0x20000, 0xe91b2ec9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3903 
3904 	{ "b82_10.16",          0x10000, 0xa38aaaed, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3905 
3906 	{ "b82-06.19",          0x20000, 0xfc450a25, BRF_GRA | TAITO_CHARS_BYTESWAP },
3907 	{ "b82-07.18",          0x20000, 0xec3df577, BRF_GRA | TAITO_CHARS_BYTESWAP },
3908 
3909 	{ "b82-04.4",           0x80000, 0x6346f98e, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
3910 	{ "b82-03.5",           0x80000, 0xdaa11561, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
3911 	{ "b82-05.3",           0x80000, 0xaa90b93a, BRF_GRA | TAITO_SPRITESA },
3912 
3913 	{ "b82-02.1",           0x80000, 0x5dd06bdd, BRF_SND | TAITO_YM2610A },
3914 
3915 	{ "b82-01.2",           0x80000, 0xf0eb6846, BRF_SND | TAITO_YM2610B },
3916 
3917 	{ "tibpal16l8.ic41",    0x00104, 0x11a0a19a, BRF_OPT },
3918 	{ "tibpal16l8.ic42",    0x00104, 0xcc53deb8, BRF_OPT },
3919 	{ "tibpal16l8.ic51",    0x00104, 0xf2878537, BRF_OPT },
3920 	{ "gal16v8.ic13",       0x00117, 0xa4f75fd0, BRF_OPT },
3921 	{ "gal16v8.ic35",       0x00117, 0xca4eb3e1, BRF_OPT },
3922 };
3923 
3924 STD_ROM_PICK(Finalb)
3925 STD_ROM_FN(Finalb)
3926 
3927 static struct BurnRomInfo FinalbjRomDesc[] = {
3928 	{ "b82-09.10",          0x20000, 0x632f1ecd, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3929 	{ "b82-08.11",          0x20000, 0x07154fe5, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3930 
3931 	{ "b82_10.16",          0x10000, 0xa38aaaed, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3932 
3933 	{ "b82-06.19",          0x20000, 0xfc450a25, BRF_GRA | TAITO_CHARS_BYTESWAP },
3934 	{ "b82-07.18",          0x20000, 0xec3df577, BRF_GRA | TAITO_CHARS_BYTESWAP },
3935 
3936 	{ "b82-04.4",           0x80000, 0x6346f98e, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
3937 	{ "b82-03.5",           0x80000, 0xdaa11561, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
3938 	{ "b82-05.3",           0x80000, 0xaa90b93a, BRF_GRA | TAITO_SPRITESA },
3939 
3940 	{ "b82-02.1",           0x80000, 0x5dd06bdd, BRF_SND | TAITO_YM2610A },
3941 
3942 	{ "b82-01.2",           0x80000, 0xf0eb6846, BRF_SND | TAITO_YM2610B },
3943 
3944 	{ "tibpal16l8.ic41",    0x00104, 0x11a0a19a, BRF_OPT },
3945 	{ "tibpal16l8.ic42",    0x00104, 0xcc53deb8, BRF_OPT },
3946 	{ "tibpal16l8.ic51",    0x00104, 0xf2878537, BRF_OPT },
3947 	{ "gal16v8.ic13",       0x00117, 0xa4f75fd0, BRF_OPT },
3948 	{ "gal16v8.ic35",       0x00117, 0xca4eb3e1, BRF_OPT },
3949 };
3950 
3951 STD_ROM_PICK(Finalbj)
3952 STD_ROM_FN(Finalbj)
3953 
3954 static struct BurnRomInfo FinalbuRomDesc[] = {
3955 	{ "b82-09-1",           0x20000, 0x66729cb9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3956 	{ "b82-6-14",           0x20000, 0x879387fa, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3957 
3958 	{ "b82_10.16",          0x10000, 0xa38aaaed, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3959 
3960 	{ "b82-06.19",          0x20000, 0xfc450a25, BRF_GRA | TAITO_CHARS_BYTESWAP },
3961 	{ "b82-07.18",          0x20000, 0xec3df577, BRF_GRA | TAITO_CHARS_BYTESWAP },
3962 
3963 	{ "b82-04.4",           0x80000, 0x6346f98e, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
3964 	{ "b82-03.5",           0x80000, 0xdaa11561, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
3965 	{ "b82-05.3",           0x80000, 0xaa90b93a, BRF_GRA | TAITO_SPRITESA },
3966 
3967 	{ "b82-02.1",           0x80000, 0x5dd06bdd, BRF_SND | TAITO_YM2610A },
3968 
3969 	{ "b82-01.2",           0x80000, 0xf0eb6846, BRF_SND | TAITO_YM2610B },
3970 
3971 	{ "tibpal16l8.ic41",    0x00104, 0x11a0a19a, BRF_OPT },
3972 	{ "tibpal16l8.ic42",    0x00104, 0xcc53deb8, BRF_OPT },
3973 	{ "tibpal16l8.ic51",    0x00104, 0xf2878537, BRF_OPT },
3974 	{ "gal16v8.ic13",       0x00117, 0xa4f75fd0, BRF_OPT },
3975 	{ "gal16v8.ic35",       0x00117, 0xca4eb3e1, BRF_OPT },
3976 };
3977 
3978 STD_ROM_PICK(Finalbu)
3979 STD_ROM_FN(Finalbu)
3980 
3981 static struct BurnRomInfo FootchmpRomDesc[] = {
3982 	{ "c80-11.6",           0x020000, 0xf78630fb, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3983 	{ "c80-10.4",           0x020000, 0x32c109cb, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3984 	{ "c80-12.7",           0x020000, 0x80d46fef, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3985 	{ "c80-14.5",           0x020000, 0x40ac4828, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
3986 
3987 	{ "c80-15.70",          0x010000, 0x05aa7fd7, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
3988 
3989 	{ "c80-04.1",           0x080000, 0x9a17fe8c, BRF_GRA | TAITO_CHARS_BYTESWAP },
3990 	{ "c80-05.2",           0x080000, 0xacde7071, BRF_GRA | TAITO_CHARS_BYTESWAP },
3991 
3992 	{ "c80-01.9",           0x100000, 0xf43782e6, BRF_GRA | TAITO_SPRITESA },
3993 	{ "c80-02.10",          0x100000, 0x060a8b61, BRF_GRA | TAITO_SPRITESA },
3994 
3995 	{ "c80-03.57",          0x100000, 0x609938d5, BRF_SND | TAITO_YM2610A },
3996 
3997 	{ "c80-09.ic46",        0x000104, 0x4ca48869, BRF_OPT },
3998 	{ "c80-08.ic45",        0x000104, 0x6137dd15, BRF_OPT },
3999 };
4000 
4001 STD_ROM_PICK(Footchmp)
4002 STD_ROM_FN(Footchmp)
4003 
4004 static struct BurnRomInfo HtheroRomDesc[] = {
4005 	{ "c80-16.6",           0x020000, 0x4e795b52, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4006 	{ "c80-17.4",           0x020000, 0x42c0a838, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4007 	{ "c80-12.7",           0x020000, 0x80d46fef, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4008 	{ "c80-18.5",           0x020000, 0xaea22904, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4009 
4010 	{ "c80-15.70",          0x010000, 0x05aa7fd7, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4011 
4012 	{ "c80-04.1",           0x080000, 0x9a17fe8c, BRF_GRA | TAITO_CHARS_BYTESWAP },
4013 	{ "c80-05.2",           0x080000, 0xacde7071, BRF_GRA | TAITO_CHARS_BYTESWAP },
4014 
4015 	{ "c80-01.9",           0x100000, 0xf43782e6, BRF_GRA | TAITO_SPRITESA },
4016 	{ "c80-02.10",          0x100000, 0x060a8b61, BRF_GRA | TAITO_SPRITESA },
4017 
4018 	{ "c80-03.57",          0x100000, 0x609938d5, BRF_SND | TAITO_YM2610A },
4019 };
4020 
4021 STD_ROM_PICK(Hthero)
4022 STD_ROM_FN(Hthero)
4023 
4024 static struct BurnRomInfo Euroch92RomDesc[] = {
4025 	{ "ec92_25.rom",        0x020000, 0x98482202, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4026 	{ "ec92_23.rom",        0x020000, 0xae5e75e9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4027 	{ "ec92_26.rom",        0x020000, 0xb986ccb2, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4028 	{ "ec92_24.rom",        0x020000, 0xb31d94ac, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4029 
4030 	{ "ec92_27.rom",        0x010000, 0x2db48e65, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4031 
4032 	{ "ec92_21.rom",        0x080000, 0x5759ed37, BRF_GRA | TAITO_CHARS_BYTESWAP },
4033 	{ "ec92_22.rom",        0x080000, 0xd9a0d38e, BRF_GRA | TAITO_CHARS_BYTESWAP },
4034 
4035 	{ "ec92_19.rom",        0x100000, 0x219141a5, BRF_GRA | TAITO_SPRITESA },
4036 	{ "c80-02.10",          0x100000, 0x060a8b61, BRF_GRA | TAITO_SPRITESA },
4037 
4038 	{ "c80-03.57",          0x100000, 0x609938d5, BRF_SND | TAITO_YM2610A },
4039 };
4040 
4041 STD_ROM_PICK(Euroch92)
4042 STD_ROM_FN(Euroch92)
4043 
4044 static struct BurnRomInfo GrowlRomDesc[] = {
4045 	{ "c74-10-1.ic59",      0x040000, 0x8bf17a85, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4046 	{ "c74-08-1.ic61",      0x040000, 0xbc70396f, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4047 	{ "c74-11.ic58",        0x040000, 0xee3bd6d5, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4048 	{ "c74-14.ic60",        0x040000, 0xb6c24ec7, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4049 
4050 	{ "c74-12.ic62",        0x010000, 0xbb6ed668, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4051 
4052 	{ "c74-01.ic34",        0x100000, 0x3434ce80, BRF_GRA | TAITO_CHARS },
4053 
4054 	{ "c74-03.ic12",        0x100000, 0x1a0d8951, BRF_GRA | TAITO_SPRITESA },
4055 	{ "c74-02.ic11",        0x100000, 0x15a21506, BRF_GRA | TAITO_SPRITESA },
4056 
4057 	{ "c74-04.ic28",        0x100000, 0x2d97edf2, BRF_SND | TAITO_YM2610A },
4058 	{ "c74-05.ic29",        0x080000, 0xe29c0828, BRF_SND | TAITO_YM2610B },
4059 };
4060 
4061 STD_ROM_PICK(Growl)
4062 STD_ROM_FN(Growl)
4063 
4064 static struct BurnRomInfo GrowlaRomDesc[] = {
4065 	{ "c74-10.ic59",        0x040000, 0xca81a20b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4066 	{ "c74-08.ic61",        0x040000, 0xaa35dd9e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4067 	{ "c74-11.ic58",        0x040000, 0xee3bd6d5, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4068 	{ "c74-14.ic60",        0x040000, 0xb6c24ec7, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4069 
4070 	{ "c74-12.ic62",        0x010000, 0xbb6ed668, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4071 
4072 	{ "c74-01.ic34",        0x100000, 0x3434ce80, BRF_GRA | TAITO_CHARS },
4073 
4074 	{ "c74-03.ic12",        0x100000, 0x1a0d8951, BRF_GRA | TAITO_SPRITESA },
4075 	{ "c74-02.ic11",        0x100000, 0x15a21506, BRF_GRA | TAITO_SPRITESA },
4076 
4077 	{ "c74-04.ic28",        0x100000, 0x2d97edf2, BRF_SND | TAITO_YM2610A },
4078 	{ "c74-05.ic29",        0x080000, 0xe29c0828, BRF_SND | TAITO_YM2610B },
4079 };
4080 
4081 STD_ROM_PICK(Growla)
4082 STD_ROM_FN(Growla)
4083 
4084 static struct BurnRomInfo GrowluRomDesc[] = {
4085 	{ "c74-10.ic59",        0x040000, 0xca81a20b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4086 	{ "c74-08.ic61",        0x040000, 0xaa35dd9e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4087 	{ "c74-11.ic58",        0x040000, 0xee3bd6d5, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4088 	{ "c74-13.ic60",        0x040000, 0xc1c57e51, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4089 
4090 	{ "c74-12.ic62",        0x010000, 0xbb6ed668, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4091 
4092 	{ "c74-01.ic34",        0x100000, 0x3434ce80, BRF_GRA | TAITO_CHARS },
4093 
4094 	{ "c74-03.ic12",        0x100000, 0x1a0d8951, BRF_GRA | TAITO_SPRITESA },
4095 	{ "c74-02.ic11",        0x100000, 0x15a21506, BRF_GRA | TAITO_SPRITESA },
4096 
4097 	{ "c74-04.ic28",        0x100000, 0x2d97edf2, BRF_SND | TAITO_YM2610A },
4098 	{ "c74-05.ic29",        0x080000, 0xe29c0828, BRF_SND | TAITO_YM2610B },
4099 };
4100 
4101 STD_ROM_PICK(Growlu)
4102 STD_ROM_FN(Growlu)
4103 
4104 static struct BurnRomInfo RunarkRomDesc[] = {
4105 	{ "c74-10.ic59",        0x040000, 0xca81a20b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4106 	{ "c74-08.ic61",        0x040000, 0xaa35dd9e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4107 	{ "c74-11.ic58",        0x040000, 0xee3bd6d5, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4108 	{ "c74-09.ic14",        0x040000, 0x58cc2feb, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4109 
4110 	{ "c74-12.ic62",        0x010000, 0xbb6ed668, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4111 
4112 	{ "c74-01.ic34",        0x100000, 0x3434ce80, BRF_GRA | TAITO_CHARS },
4113 
4114 	{ "c74-03.ic12",        0x100000, 0x1a0d8951, BRF_GRA | TAITO_SPRITESA },
4115 	{ "c74-02.ic11",        0x100000, 0x15a21506, BRF_GRA | TAITO_SPRITESA },
4116 
4117 	{ "c74-04.ic28",        0x100000, 0x2d97edf2, BRF_SND | TAITO_YM2610A },
4118 	{ "c74-05.ic29",        0x080000, 0xe29c0828, BRF_SND | TAITO_YM2610B },
4119 };
4120 
4121 STD_ROM_PICK(Runark)
4122 STD_ROM_FN(Runark)
4123 
4124 static struct BurnRomInfo GunfrontRomDesc[] = {
4125 	{ "c71-09.ic42",        0x020000, 0x10a544a2, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4126 	{ "c71-08.ic41",        0x020000, 0xc17dc0a0, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4127 	{ "c71-10.ic40",        0x020000, 0xf39c0a06, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4128 	{ "c71-14.ic39",        0x020000, 0x312da036, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4129 	{ "c71-16.ic38",        0x020000, 0x1bbcc2d4, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4130 	{ "c71-15.ic37",        0x020000, 0xdf3e00bb, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4131 
4132 	{ "c71-12.ic49",        0x010000, 0x0038c7f8, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4133 
4134 	{ "c71-02.ic59",        0x100000, 0x2a600c92, BRF_GRA | TAITO_CHARS },
4135 
4136 	{ "c71-03.ic19",        0x100000, 0x9133c605, BRF_GRA | TAITO_SPRITESA },
4137 
4138 	{ "c71-01.ic29",        0x100000, 0x0e73105a, BRF_SND | TAITO_YM2610A },
4139 };
4140 
4141 STD_ROM_PICK(Gunfront)
4142 STD_ROM_FN(Gunfront)
4143 
4144 static struct BurnRomInfo GunfrontjRomDesc[] = {
4145 	{ "c71-09.ic42",        0x020000, 0x10a544a2, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4146 	{ "c71-08.ic41",        0x020000, 0xc17dc0a0, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4147 	{ "c71-10.ic40",        0x020000, 0xf39c0a06, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4148 	{ "c71-11.ic39",        0x020000, 0xdf23c11a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4149 	{ "c71-16.ic38",        0x020000, 0x1bbcc2d4, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4150 	{ "c71-15.ic37",        0x020000, 0xdf3e00bb, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4151 
4152 	{ "c71-12.ic49",        0x010000, 0x0038c7f8, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4153 
4154 	{ "c71-02.ic59",        0x100000, 0x2a600c92, BRF_GRA | TAITO_CHARS },
4155 
4156 	{ "c71-03.ic19",        0x100000, 0x9133c605, BRF_GRA | TAITO_SPRITESA },
4157 
4158 	{ "c71-01.ic29",        0x100000, 0x0e73105a, BRF_SND | TAITO_YM2610A },
4159 };
4160 
4161 STD_ROM_PICK(Gunfrontj)
4162 STD_ROM_FN(Gunfrontj)
4163 
4164 static struct BurnRomInfo KoshienRomDesc[] = {
4165 	{ "c81-11.bin",         0x020000, 0xb44ea8c9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4166 	{ "c81-10.bin",         0x020000, 0x8f98c40a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4167 	{ "c81-04.bin",         0x080000, 0x1592b460, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
4168 
4169 	{ "c81-12.bin",         0x010000, 0x6e8625b6, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4170 
4171 	{ "c81-03.bin",         0x100000, 0x29bbf492, BRF_GRA | TAITO_CHARS },
4172 
4173 	{ "c81-01.bin",         0x100000, 0x64b15d2a, BRF_GRA | TAITO_SPRITESA },
4174 	{ "c81-02.bin",         0x100000, 0x962461e8, BRF_GRA | TAITO_SPRITESA },
4175 
4176 	{ "c81-05.bin",         0x080000, 0x9c3d71be, BRF_SND | TAITO_YM2610A },
4177 	{ "c81-06.bin",         0x080000, 0x927833b4, BRF_SND | TAITO_YM2610B },
4178 
4179 	{ "pal16l8b-c81-07.bin",0x000104, 0x46341732, BRF_OPT },
4180 	{ "pal16l8b-c81-08.bin",0x000104, 0xe7d2d300, BRF_OPT },
4181 	{ "pal16l8b-c81-09.bin",0x000104, 0xe4c012a1, BRF_OPT },
4182 };
4183 
4184 STD_ROM_PICK(Koshien)
4185 STD_ROM_FN(Koshien)
4186 
4187 static struct BurnRomInfo LiquidkRomDesc[] = {
4188 	{ "c49-09.ic47",        0x20000, 0x6ae09eb9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4189 	{ "c49-11.ic48",        0x20000, 0x42d2be6e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4190 	{ "c49-10.ic45",        0x20000, 0x50bef2e0, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4191 	{ "c49-12.ic46",        0x20000, 0xcb16bad5, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4192 
4193 	{ "c49-08.ic32",        0x10000, 0x413c310c, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4194 
4195 	{ "c49-03.ic76",        0x80000, 0xc3364f9b, BRF_GRA | TAITO_CHARS },
4196 
4197 	{ "c49-01.ic54",        0x80000, 0x67cc3163, BRF_GRA | TAITO_SPRITESA },
4198 	{ "c49-02.ic53",        0x80000, 0xd2400710, BRF_GRA | TAITO_SPRITESA },
4199 
4200 	{ "c49-04.ic33",        0x80000, 0x474d45a4, BRF_SND | TAITO_YM2610A },
4201 };
4202 
4203 STD_ROM_PICK(Liquidk)
4204 STD_ROM_FN(Liquidk)
4205 
4206 static struct BurnRomInfo LiquidkuRomDesc[] = {
4207 	{ "c49-09.ic47",        0x20000, 0x6ae09eb9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4208 	{ "c49-11.ic48",        0x20000, 0x42d2be6e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4209 	{ "c49-10.ic45",        0x20000, 0x50bef2e0, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4210 	{ "c49-14.ic46",        0x20000, 0xbc118a43, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4211 
4212 	{ "c49-08.ic32",        0x10000, 0x413c310c, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4213 
4214 	{ "c49-03.ic76",        0x80000, 0xc3364f9b, BRF_GRA | TAITO_CHARS },
4215 
4216 	{ "c49-01.ic54",        0x80000, 0x67cc3163, BRF_GRA | TAITO_SPRITESA },
4217 	{ "c49-02.ic53",        0x80000, 0xd2400710, BRF_GRA | TAITO_SPRITESA },
4218 
4219 	{ "c49-04.ic33",        0x80000, 0x474d45a4, BRF_SND | TAITO_YM2610A },
4220 };
4221 
4222 STD_ROM_PICK(Liquidku)
4223 STD_ROM_FN(Liquidku)
4224 
4225 static struct BurnRomInfo MizubakuRomDesc[] = {
4226 	{ "c49-09.ic47",        0x20000, 0x6ae09eb9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4227 	{ "c49-11.ic48",        0x20000, 0x42d2be6e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4228 	{ "c49-10.ic45",        0x20000, 0x50bef2e0, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4229 	{ "c49-13.ic46",        0x20000, 0x2518dbf9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4230 
4231 	{ "c49-08.ic32",        0x10000, 0x413c310c, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4232 
4233 	{ "c49-03.ic76",        0x80000, 0xc3364f9b, BRF_GRA | TAITO_CHARS },
4234 
4235 	{ "c49-01.ic54",        0x80000, 0x67cc3163, BRF_GRA | TAITO_SPRITESA },
4236 	{ "c49-02.ic53",        0x80000, 0xd2400710, BRF_GRA | TAITO_SPRITESA },
4237 
4238 	{ "c49-04.ic33",        0x80000, 0x474d45a4, BRF_SND | TAITO_YM2610A },
4239 };
4240 
4241 STD_ROM_PICK(Mizubaku)
4242 STD_ROM_FN(Mizubaku)
4243 
4244 // Taito C-Chip BIOS
4245 static struct BurnRomInfo emptyRomDesc[] = {
4246 	{ "",                    0,          0, 0 },
4247 };
4248 
4249 static struct BurnRomInfo cchipRomDesc[] = {
4250 #if !defined ROM_VERIFY
4251 	{ "cchip_upd78c11.bin",		0x01000, 0x43021521, BRF_BIOS | TAITO_CCHIP_BIOS},
4252 #endif
4253 };
4254 
4255 static struct BurnRomInfo MegablstRomDesc[] = {
4256 	{ "c11-07.55",             0x020000, 0x11d228b6, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4257 	{ "c11-08.39",             0x020000, 0xa79d4dca, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4258 	{ "c11-06.54",             0x020000, 0x7c249894, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4259 	{ "c11-11.38",             0x020000, 0x263ecbf9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4260 
4261 	{ "c11-12.3",              0x010000, 0xb11094f1, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4262 
4263 	{ "c11-05.58",             0x080000, 0x733e6d8e, BRF_GRA | TAITO_CHARS },
4264 
4265 	{ "c11-03.32",             0x080000, 0x46718c7a, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4266 	{ "c11-04.31",             0x080000, 0x663f33cc, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4267 
4268 	{ "c11-01.29",             0x080000, 0xfd1ea532, BRF_SND | TAITO_YM2610A },
4269 	{ "c11-02.30",             0x080000, 0x451cc187, BRF_SND | TAITO_YM2610B },
4270 
4271 	{ "c11-15.ic59",           0x002000, 0xaf49ee7f, BRF_ESS | BRF_PRG | TAITO_CCHIP_EEPROM },
4272 
4273 	{ "pal16l8b-b89-01.ic8",   0x000104, 0x4095b97a, BRF_OPT },
4274 	{ "pal16l8b-b89-02.ic28",  0x000104, 0x6430b559, BRF_OPT },
4275 	{ "pal16l8b-b89-03.bin",   0x000104, 0x634592e2, BRF_OPT },
4276 	{ "palce16v8-b89-04.ic27", 0x000117, 0xfc136ae2, BRF_OPT },
4277 	{ "pal16l8b-c11-13.ic13",  0x000104, 0x421d7ea8, BRF_OPT },
4278 	{ "pal16l8b-c11-14.ic23",  0x000104, 0x5c740aee, BRF_OPT },
4279 };
4280 
4281 STDROMPICKEXT(Megablst, Megablst, cchip)
4282 STD_ROM_FN(Megablst)
4283 
4284 static struct BurnRomInfo MegablstjRomDesc[] = {
4285 	{ "c11-07.55",             0x020000, 0x11d228b6, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4286 	{ "c11-08.39",             0x020000, 0xa79d4dca, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4287 	{ "c11-06.54",             0x020000, 0x7c249894, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4288 	{ "c11-09.38",             0x020000, 0xc830aad5, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4289 
4290 	{ "c11-12.3",              0x010000, 0xb11094f1, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4291 
4292 	{ "c11-05.58",             0x080000, 0x733e6d8e, BRF_GRA | TAITO_CHARS },
4293 
4294 	{ "c11-03.32",             0x080000, 0x46718c7a, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4295 	{ "c11-04.31",             0x080000, 0x663f33cc, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4296 
4297 	{ "c11-01.29",             0x080000, 0xfd1ea532, BRF_SND | TAITO_YM2610A },
4298 	{ "c11-02.30",             0x080000, 0x451cc187, BRF_SND | TAITO_YM2610B },
4299 
4300 	{ "c11-15.ic59",           0x002000, 0xaf49ee7f, BRF_ESS | BRF_PRG | TAITO_CCHIP_EEPROM },
4301 };
4302 
4303 STDROMPICKEXT(Megablstj, Megablstj, cchip)
4304 STD_ROM_FN(Megablstj)
4305 
4306 static struct BurnRomInfo MegablstuRomDesc[] = {
4307 	{ "c11-07.55",             0x020000, 0x11d228b6, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4308 	{ "c11-08.39",             0x020000, 0xa79d4dca, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4309 	{ "c11-06.54",             0x020000, 0x7c249894, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4310 	{ "c11-10.38",             0x020000, 0xbf379a43, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4311 
4312 	{ "c11-12.3",              0x010000, 0xb11094f1, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4313 
4314 	{ "c11-05.58",             0x080000, 0x733e6d8e, BRF_GRA | TAITO_CHARS },
4315 
4316 	{ "c11-03.32",             0x080000, 0x46718c7a, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4317 	{ "c11-04.31",             0x080000, 0x663f33cc, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4318 
4319 	{ "c11-01.29",             0x080000, 0xfd1ea532, BRF_SND | TAITO_YM2610A },
4320 	{ "c11-02.30",             0x080000, 0x451cc187, BRF_SND | TAITO_YM2610B },
4321 
4322 	{ "c11-15.ic59",           0x002000, 0xaf49ee7f, BRF_ESS | BRF_PRG | TAITO_CCHIP_EEPROM },
4323 };
4324 
4325 STDROMPICKEXT(Megablstu, Megablstu, cchip)
4326 STD_ROM_FN(Megablstu)
4327 
4328 static struct BurnRomInfo MetalbRomDesc[] = {
4329 	{ "d16-16.8",           0x040000, 0x3150be61, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4330 	{ "d16-18.7",           0x040000, 0x5216d092, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4331 	{ "d12-07.9",           0x020000, 0xe07f5136, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4332 	{ "d12-06.6",           0x020000, 0x131df731, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4333 
4334 	{ "d12-13.5",           0x020000, 0xbcca2649, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4335 
4336 	{ "d12-03.14",          0x080000, 0x46b498c0, BRF_GRA | TAITO_CHARS_BYTESWAP },
4337 	{ "d12-04.13",          0x080000, 0xab66d141, BRF_GRA | TAITO_CHARS_BYTESWAP },
4338 
4339 	{ "d12-01.20",          0x100000, 0xb81523b9, BRF_GRA | TAITO_SPRITESA },
4340 
4341 	{ "d12-02.10",          0x100000, 0x79263e74, BRF_SND | TAITO_YM2610A },
4342 	{ "d12-05.16",          0x080000, 0x7fd036c5, BRF_SND | TAITO_YM2610B },
4343 };
4344 
4345 STD_ROM_PICK(Metalb)
4346 STD_ROM_FN(Metalb)
4347 
4348 static struct BurnRomInfo MetalbjRomDesc[] = {
4349 	{ "d12-12.8",           0x040000, 0x556f82b2, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4350 	{ "d12-11.7",           0x040000, 0xaf9ee28d, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4351 	{ "d12-07.9",           0x020000, 0xe07f5136, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4352 	{ "d12-06.6",           0x020000, 0x131df731, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4353 
4354 	{ "d12-13.5",           0x020000, 0xbcca2649, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4355 
4356 	{ "d12-03.14",          0x080000, 0x46b498c0, BRF_GRA | TAITO_CHARS_BYTESWAP },
4357 	{ "d12-04.13",          0x080000, 0xab66d141, BRF_GRA | TAITO_CHARS_BYTESWAP },
4358 
4359 	{ "d12-01.20",          0x100000, 0xb81523b9, BRF_GRA | TAITO_SPRITESA },
4360 
4361 	{ "d12-02.10",          0x100000, 0x79263e74, BRF_SND | TAITO_YM2610A },
4362 	{ "d12-05.16",          0x080000, 0x7fd036c5, BRF_SND | TAITO_YM2610B },
4363 };
4364 
4365 STD_ROM_PICK(Metalbj)
4366 STD_ROM_FN(Metalbj)
4367 
4368 static struct BurnRomInfo MjnquestRomDesc[] = {
4369 	{ "c77-09",                0x020000, 0x0a005d01, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4370 	{ "c77-08",                0x020000, 0x4244f775, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4371 	{ "c77-04",                0x080000, 0xc2e7e038, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
4372 
4373 	{ "c77-10",                0x010000, 0xf16b2c1e, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4374 
4375 	{ "c77-01",                0x100000, 0x5ba51205, BRF_GRA | TAITO_CHARS },
4376 	{ "c77-02",                0x100000, 0x6a6f3040, BRF_GRA | TAITO_CHARS },
4377 
4378 	{ "c77-05",                0x080000, 0xc5a54678, BRF_GRA | TAITO_SPRITESA },
4379 
4380 	{ "c77-03",                0x080000, 0x312f17b1, BRF_SND | TAITO_YM2610A },
4381 };
4382 
4383 STD_ROM_PICK(Mjnquest)
4384 STD_ROM_FN(Mjnquest)
4385 
4386 static struct BurnRomInfo MjnquestbRomDesc[] = {
4387 	{ "c77-09a",               0x020000, 0xfc17f1c2, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4388 	{ "c77-08",                0x020000, 0x4244f775, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4389 	{ "c77-04",                0x080000, 0xc2e7e038, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
4390 
4391 	{ "c77-10",                0x010000, 0xf16b2c1e, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4392 
4393 	{ "c77-01",                0x100000, 0x5ba51205, BRF_GRA | TAITO_CHARS },
4394 	{ "c77-02",                0x100000, 0x6a6f3040, BRF_GRA | TAITO_CHARS },
4395 
4396 	{ "c77-05",                0x080000, 0xc5a54678, BRF_GRA | TAITO_SPRITESA },
4397 
4398 	{ "c77-03",                0x080000, 0x312f17b1, BRF_SND | TAITO_YM2610A },
4399 };
4400 
4401 STD_ROM_PICK(Mjnquestb)
4402 STD_ROM_FN(Mjnquestb)
4403 
4404 static struct BurnRomInfo NinjakRomDesc[] = {
4405 	{ "c85-10x.ic50",          0x020000, 0xba7e6e74, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4406 	{ "c85-13x.ic49",          0x020000, 0x0ac2cba2, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4407 	{ "c85-07.ic48",           0x020000, 0x3eccfd0a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4408 	{ "c85-06.ic47",           0x020000, 0xd126ded1, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4409 
4410 	{ "c85-14.ic54",           0x010000, 0xf2a52a51, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4411 
4412 	{ "c85-03.ic65",           0x080000, 0x4cc7b9df, BRF_GRA | TAITO_CHARS },
4413 
4414 	{ "c85-01.ic19",           0x100000, 0xa711977c, BRF_GRA | TAITO_SPRITESA },
4415 	{ "c85-02.ic17",           0x100000, 0xa6ad0f3d, BRF_GRA | TAITO_SPRITESA },
4416 
4417 	{ "c85-04.ic31",           0x080000, 0x5afb747e, BRF_SND | TAITO_YM2610A },
4418 	{ "c85-05.ic33",           0x080000, 0x3c1b0ed0, BRF_SND | TAITO_YM2610B },
4419 };
4420 
4421 STD_ROM_PICK(Ninjak)
4422 STD_ROM_FN(Ninjak)
4423 
4424 static struct BurnRomInfo NinjakjRomDesc[] = {
4425 	{ "c85-10x.ic50",          0x020000, 0xba7e6e74, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4426 	{ "c85-11x.ic49",          0x020000, 0xe4ccaa8e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4427 	{ "c85-07.ic48",           0x020000, 0x3eccfd0a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4428 	{ "c85-06.ic47",           0x020000, 0xd126ded1, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4429 
4430 	{ "c85-14.ic54",           0x010000, 0xf2a52a51, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4431 
4432 	{ "c85-03.ic65",           0x080000, 0x4cc7b9df, BRF_GRA | TAITO_CHARS },
4433 
4434 	{ "c85-01.ic19",           0x100000, 0xa711977c, BRF_GRA | TAITO_SPRITESA },
4435 	{ "c85-02.ic17",           0x100000, 0xa6ad0f3d, BRF_GRA | TAITO_SPRITESA },
4436 
4437 	{ "c85-04.ic31",           0x080000, 0x5afb747e, BRF_SND | TAITO_YM2610A },
4438 	{ "c85-05.ic33",           0x080000, 0x3c1b0ed0, BRF_SND | TAITO_YM2610B },
4439 };
4440 
4441 STD_ROM_PICK(Ninjakj)
4442 STD_ROM_FN(Ninjakj)
4443 
4444 static struct BurnRomInfo NinjakuRomDesc[] = {
4445 	{ "c85-15x.ic50",          0x020000, 0x719a481b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4446 	{ "c85-12x.ic49",          0x020000, 0x6c3f7e1e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4447 	{ "c85-07.ic48",           0x020000, 0x3eccfd0a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4448 	{ "c85-06.ic47",           0x020000, 0xd126ded1, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4449 
4450 	{ "c85-14.ic54",           0x010000, 0xf2a52a51, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4451 
4452 	{ "c85-03.ic65",           0x080000, 0x4cc7b9df, BRF_GRA | TAITO_CHARS },
4453 
4454 	{ "c85-01.ic19",           0x100000, 0xa711977c, BRF_GRA | TAITO_SPRITESA },
4455 	{ "c85-02.ic17",           0x100000, 0xa6ad0f3d, BRF_GRA | TAITO_SPRITESA },
4456 
4457 	{ "c85-04.ic31",           0x080000, 0x5afb747e, BRF_SND | TAITO_YM2610A },
4458 	{ "c85-05.ic33",           0x080000, 0x3c1b0ed0, BRF_SND | TAITO_YM2610B },
4459 };
4460 
4461 STD_ROM_PICK(Ninjaku)
4462 STD_ROM_FN(Ninjaku)
4463 
4464 static struct BurnRomInfo PulirulaRomDesc[] = {
4465 	{ "c98-12.rom",          0x040000, 0x816d6cde, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4466 	{ "c98-16.rom",          0x040000, 0x59df5c77, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4467 	{ "c98-06.rom",          0x020000, 0x64a71b45, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4468 	{ "c98-07.rom",          0x020000, 0x90195bc0, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4469 
4470 	{ "c98-14.rom",          0x020000, 0xa858e17c, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4471 
4472 	{ "c98-04.rom",          0x100000, 0x0e1fe3b2, BRF_GRA | TAITO_CHARS },
4473 
4474 	{ "c98-02.rom",          0x100000, 0x4a2ad2b3, BRF_GRA | TAITO_SPRITESA },
4475 	{ "c98-03.rom",          0x100000, 0x589a678f, BRF_GRA | TAITO_SPRITESA },
4476 
4477 	{ "c98-01.rom",          0x100000, 0x197f66f5, BRF_SND | TAITO_YM2610A },
4478 
4479 	{ "c98-05.rom",          0x080000, 0x9ddd9c39, BRF_GRA | TAITO_CHARS_PIVOT },
4480 };
4481 
4482 STD_ROM_PICK(Pulirula)
4483 STD_ROM_FN(Pulirula)
4484 
4485 static struct BurnRomInfo PulirulaaRomDesc[] = {
4486 	// dumped from an original PCB without original ROM labels. The maincpu and audiocpu ROMs differ from the parent.
4487 	{ "ic46.bin",            0x040000, 0x584ae599, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4488 	{ "ic45.bin",            0x040000, 0x08024086, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4489 	{ "ic44.bin",            0x020000, 0xda9d31fd, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4490 	{ "ic43.bin",            0x020000, 0x1feea319, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4491 
4492 	{ "ic50.bin",            0x020000, 0xe8b68cb8, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4493 
4494 	{ "c98-04.rom",          0x100000, 0x0e1fe3b2, BRF_GRA | TAITO_CHARS },
4495 
4496 	{ "c98-02.rom",          0x100000, 0x4a2ad2b3, BRF_GRA | TAITO_SPRITESA },
4497 	{ "c98-03.rom",          0x100000, 0x589a678f, BRF_GRA | TAITO_SPRITESA },
4498 
4499 	{ "c98-01.rom",          0x100000, 0x197f66f5, BRF_SND | TAITO_YM2610A },
4500 
4501 	{ "c98-05.rom",          0x080000, 0x9ddd9c39, BRF_GRA | TAITO_CHARS_PIVOT },
4502 };
4503 
4504 STD_ROM_PICK(Pulirulaa)
4505 STD_ROM_FN(Pulirulaa)
4506 
4507 static struct BurnRomInfo PulirulajRomDesc[] = {
4508 	{ "c98-12.rom",          0x040000, 0x816d6cde, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4509 	{ "c98-13.rom",          0x040000, 0xb7d13d5b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4510 	{ "c98-06.rom",          0x020000, 0x64a71b45, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4511 	{ "c98-07.rom",          0x020000, 0x90195bc0, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4512 
4513 	{ "c98-14.rom",          0x020000, 0xa858e17c, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4514 
4515 	{ "c98-04.rom",          0x100000, 0x0e1fe3b2, BRF_GRA | TAITO_CHARS },
4516 
4517 	{ "c98-02.rom",          0x100000, 0x4a2ad2b3, BRF_GRA | TAITO_SPRITESA },
4518 	{ "c98-03.rom",          0x100000, 0x589a678f, BRF_GRA | TAITO_SPRITESA },
4519 
4520 	{ "c98-01.rom",          0x100000, 0x197f66f5, BRF_SND | TAITO_YM2610A },
4521 
4522 	{ "c98-05.rom",          0x080000, 0x9ddd9c39, BRF_GRA | TAITO_CHARS_PIVOT },
4523 };
4524 
4525 STD_ROM_PICK(Pulirulaj)
4526 STD_ROM_FN(Pulirulaj)
4527 
4528 static struct BurnRomInfo QcrayonRomDesc[] = {
4529 	{ "d55-13",                0x040000, 0x16afbfc7, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4530 	{ "d55-14",                0x040000, 0x2fb3057f, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4531 	{ "d55-03",                0x100000, 0x4d161e76, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
4532 
4533 	{ "d55-15",                0x010000, 0xba782eff, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4534 
4535 	{ "d55-02",                0x100000, 0xf3db2f1c, BRF_GRA | TAITO_CHARS },
4536 
4537 	{ "d55-05",                0x100000, 0xf0e59902, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4538 	{ "d55-04",                0x100000, 0x412975ce, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4539 
4540 	{ "d55-01",                0x100000, 0xa8309af4, BRF_SND | TAITO_YM2610A },
4541 };
4542 
4543 STD_ROM_PICK(Qcrayon)
4544 STD_ROM_FN(Qcrayon)
4545 
4546 static struct BurnRomInfo Qcrayon2RomDesc[] = {
4547 	{ "d63-12",                0x040000, 0x0f445a38, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4548 	{ "d63-13",                0x040000, 0x74455752, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4549 	{ "d63-01",                0x080000, 0x872e38b4, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
4550 
4551 	{ "d63-11",                0x010000, 0x2c7ac9e5, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4552 
4553 	{ "d63-03",                0x100000, 0xd24843af, BRF_GRA | TAITO_CHARS },
4554 
4555 	{ "d63-06",                0x200000, 0x58b1e4a8, BRF_GRA | TAITO_SPRITESA },
4556 
4557 	{ "d63-02",                0x100000, 0x162ae165, BRF_SND | TAITO_YM2610A },
4558 };
4559 
4560 STD_ROM_PICK(Qcrayon2)
4561 STD_ROM_FN(Qcrayon2)
4562 
4563 static struct BurnRomInfo QjinseiRomDesc[] = {
4564 	{ "d48-09",                0x040000, 0xa573b68d, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4565 	{ "d48-10",                0x040000, 0x37143a5b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4566 	{ "d48-03",                0x100000, 0xfb5ea8dc, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
4567 
4568 	{ "d48-11",                0x010000, 0x656c5b54, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4569 
4570 	{ "d48-04",                0x100000, 0x61e4b078, BRF_GRA | TAITO_CHARS },
4571 
4572 	{ "d48-02",                0x100000, 0xa7b68e63, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4573 	{ "d48-01",                0x100000, 0x72a94b73, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4574 
4575 	{ "d48-05",                0x080000, 0x3fefd058, BRF_SND | TAITO_YM2610A },
4576 };
4577 
4578 STD_ROM_PICK(Qjinsei)
4579 STD_ROM_FN(Qjinsei)
4580 
4581 static struct BurnRomInfo QtorimonRomDesc[] = {
4582 	{ "c41-04.bin",         0x020000, 0x0fbf5223, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4583 	{ "c41-05.bin",         0x020000, 0x174bd5db, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4584 	{ "mask-51.bin",        0x020000, 0x12e14aca, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4585 	{ "mask-52.bin",        0x020000, 0xb3ef66f3, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4586 
4587 	{ "c41-06.bin",         0x010000, 0x753a98d8, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4588 
4589 	{ "c41-02.bin",         0x020000, 0x05dcd36d, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4590 	{ "c41-01.bin",         0x020000, 0x39ff043c, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4591 
4592 	{ "c41-03.bin",         0x020000, 0xb2c18e89, BRF_SND | TAITO_YM2610A },
4593 };
4594 
4595 STD_ROM_PICK(Qtorimon)
4596 STD_ROM_FN(Qtorimon)
4597 
4598 static struct BurnRomInfo QuizhqRomDesc[] = {
4599 	{ "c53-05.bin",         0x020000, 0xc798fc20, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4600 	{ "c53-01.bin",         0x020000, 0xbf44c93e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4601 	{ "c53-52.bin",         0x020000, 0x12e14aca, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4602 	{ "c53-51.bin",         0x020000, 0xb3ef66f3, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4603 
4604 	{ "c53-08.bin",         0x010000, 0x25187e81, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4605 
4606 	{ "c53-03.bin",         0x020000, 0x47596e70, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4607 	{ "c53-07.bin",         0x020000, 0x4f9fa82f, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4608 	{ "c53-02.bin",         0x020000, 0xd704c6f4, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4609 	{ "c53-06.bin",         0x020000, 0xf77f63fc, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4610 
4611 	{ "c53-04.bin",         0x020000, 0x99890ad4, BRF_SND | TAITO_YM2610A },
4612 };
4613 
4614 STD_ROM_PICK(Quizhq)
4615 STD_ROM_FN(Quizhq)
4616 
4617 static struct BurnRomInfo QzchikyuRomDesc[] = {
4618 	{ "d19-06.8",           0x020000, 0xde8c8e55, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4619 	{ "d19-05.7",           0x020000, 0xc6d099d0, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4620 	{ "d19-03.6",           0x080000, 0x5c1b92c0, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
4621 
4622 	{ "d19-07.5",           0x010000, 0xa8935f84, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4623 
4624 	{ "d19-02.10",          0x100000, 0xf2dce2f2, BRF_GRA | TAITO_CHARS },
4625 
4626 	{ "d19-01.21",          0x100000, 0x6c4342d0, BRF_GRA | TAITO_SPRITESA },
4627 
4628 	{ "d19-04.9",           0x080000, 0xd3c44905, BRF_SND | TAITO_YM2610A },
4629 
4630 	{ "pal16l8b-d19-08.bin",0x000104, 0xc6240d10, BRF_OPT },
4631 	{ "pal16l8b-d19-09.bin",0x000104, 0x576f5db9, BRF_OPT },
4632 	{ "pal16l8b-d19-10.bin",0x000104, 0xea1232a5, BRF_OPT },
4633 };
4634 
4635 STD_ROM_PICK(Qzchikyu)
4636 STD_ROM_FN(Qzchikyu)
4637 
4638 static struct BurnRomInfo QzquestRomDesc[] = {
4639 	{ "c92-06.8",           0x020000, 0x424be722, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4640 	{ "c92-05.7",           0x020000, 0xda470f93, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4641 	{ "c92-03.6",           0x080000, 0x1d697606, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
4642 
4643 	{ "c92-07.5",           0x010000, 0x3e313db9, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4644 
4645 	{ "c92-02.10",          0x100000, 0x2daccecf, BRF_GRA | TAITO_CHARS },
4646 
4647 	{ "c92-01.21",          0x100000, 0x9976a285, BRF_GRA | TAITO_SPRITESA },
4648 
4649 	{ "c92-04.9",           0x080000, 0xe421bb43, BRF_SND | TAITO_YM2610A },
4650 };
4651 
4652 STD_ROM_PICK(Qzquest)
4653 STD_ROM_FN(Qzquest)
4654 
4655 static struct BurnRomInfo SsiRomDesc[] = {
4656 	{ "c64_15-1.ic9",       0x040000, 0xce9308a6, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4657 	{ "c64_16-1.ic8",       0x040000, 0x470a483a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4658 
4659 	{ "c64-09.13",          0x010000, 0x88d7f65c, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4660 
4661 	{ "c64-01.1",           0x100000, 0xa1b4f486, BRF_GRA | TAITO_SPRITESA },
4662 
4663 	{ "c64-02.2",           0x020000, 0x3cb0b907, BRF_SND | TAITO_YM2610A },
4664 
4665 	// originals are protected PAL16L8s, these are brute-forced and reversed for GAL16V8s
4666 	{ "c64-10.ic42",		0x000117, 0x08e8c3d6, BRF_OPT },
4667 	{ "c64-11.ic43",		0x000117, 0xf116413e, BRF_OPT },
4668 
4669 };
4670 
4671 STD_ROM_PICK(Ssi)
4672 STD_ROM_FN(Ssi)
4673 
4674 static struct BurnRomInfo SsiaRomDesc[] = {
4675 	{ "c64_15.ic9",       	0x040000, 0x3a6d591b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4676 	{ "c64_16.ic8",       	0x040000, 0x8a567a4f, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4677 
4678 	{ "c64-09.13",          0x010000, 0x88d7f65c, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4679 
4680 	{ "c64-01.1",           0x100000, 0xa1b4f486, BRF_GRA | TAITO_SPRITESA },
4681 
4682 	{ "c64-02.2",           0x020000, 0x3cb0b907, BRF_SND | TAITO_YM2610A },
4683 
4684 	// originals are protected PAL16L8s, these are brute-forced and reversed for GAL16V8s
4685 	{ "c64-10.ic42",		0x000117, 0x08e8c3d6, BRF_OPT },
4686 	{ "c64-11.ic43",		0x000117, 0xf116413e, BRF_OPT },
4687 };
4688 
4689 STD_ROM_PICK(Ssia)
4690 STD_ROM_FN(Ssia)
4691 
4692 static struct BurnRomInfo SsibRomDesc[] = {
4693 	{ "c64_12.ic9",       	0x040000, 0xd5716d7e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4694 	{ "c64_13.ic8",       	0x040000, 0x99e3dd1c, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4695 
4696 	{ "c64-09.ic38",        0x010000, 0x88d7f65c, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4697 
4698 	{ "c64-01.ic51",        0x100000, 0xa1b4f486, BRF_GRA | TAITO_SPRITESA },
4699 
4700 	{ "c64-02.ic1",         0x020000, 0x3cb0b907, BRF_SND | TAITO_YM2610A },
4701 
4702 	// originals are protected PAL16L8s, these are brute-forced and reversed for GAL16V8s
4703 	{ "c64-10.ic42",		0x000117, 0x08e8c3d6, BRF_OPT },
4704 	{ "c64-11.ic43",		0x000117, 0xf116413e, BRF_OPT },
4705 };
4706 
4707 STD_ROM_PICK(Ssib)
4708 STD_ROM_FN(Ssib)
4709 
4710 static struct BurnRomInfo Majest12uRomDesc[] = {
4711 	{ "c64_15.ic9",         0x040000, 0x3a6d591b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4712 	{ "c64_17.ic8",         0x040000, 0xfd514ad9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4713 
4714 	{ "c64-09.13",          0x010000, 0x88d7f65c, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4715 
4716 	{ "c64-01.1",           0x100000, 0xa1b4f486, BRF_GRA | TAITO_SPRITESA },
4717 
4718 	{ "c64-02.2",           0x020000, 0x3cb0b907, BRF_SND | TAITO_YM2610A },
4719 
4720 	// originals are protected PAL16L8s, these are brute-forced and reversed for GAL16V8s
4721 	{ "c64-10.ic42",		0x000117, 0x08e8c3d6, BRF_OPT },
4722 	{ "c64-11.ic43",		0x000117, 0xf116413e, BRF_OPT },
4723 };
4724 
4725 STD_ROM_PICK(Majest12u)
4726 STD_ROM_FN(Majest12u)
4727 
4728 static struct BurnRomInfo Majest12uaRomDesc[] = {
4729 	{ "c64_12.ic9",         0x040000, 0xd5716d7e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4730 	{ "c64_14.ic8",         0x040000, 0xeee4ed8a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4731 
4732 	{ "c64-09.13",          0x010000, 0x88d7f65c, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4733 
4734 	{ "c64-01.1",           0x100000, 0xa1b4f486, BRF_GRA | TAITO_SPRITESA },
4735 
4736 	{ "c64-02.2",           0x020000, 0x3cb0b907, BRF_SND | TAITO_YM2610A },
4737 
4738 	// originals are protected PAL16L8s, these are brute-forced and reversed for GAL16V8s
4739 	{ "c64-10.ic42",		0x000117, 0x08e8c3d6, BRF_OPT },
4740 	{ "c64-11.ic43",		0x000117, 0xf116413e, BRF_OPT },
4741 };
4742 
4743 STD_ROM_PICK(Majest12ua)
4744 STD_ROM_FN(Majest12ua)
4745 
4746 static struct BurnRomInfo Majest12jRomDesc[] = {
4747 	{ "c64-07.10",          0x020000, 0xf29ed5c9, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4748 	{ "c64-08.11",          0x020000, 0xddfd33d5, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4749 	{ "c64-06.4",           0x020000, 0x18dc71ac, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4750 	{ "c64-05.5",           0x020000, 0xb61866c0, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4751 
4752 	{ "c64-09.13",          0x010000, 0x88d7f65c, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4753 
4754 	{ "c64-01.1",           0x100000, 0xa1b4f486, BRF_GRA | TAITO_SPRITESA },
4755 
4756 	{ "c64-02.2",           0x020000, 0x3cb0b907, BRF_SND | TAITO_YM2610A },
4757 
4758 	// originals are protected PAL16L8s, these are brute-forced and reversed for GAL16V8s
4759 	{ "c64-10.ic42",		0x000117, 0x08e8c3d6, BRF_OPT },
4760 	{ "c64-11.ic43",		0x000117, 0xf116413e, BRF_OPT },
4761 };
4762 
4763 STD_ROM_PICK(Majest12j)
4764 STD_ROM_FN(Majest12j)
4765 
4766 static struct BurnRomInfo SolfigtrRomDesc[] = {
4767 	{ "c91-05.59",           0x040000, 0xc1260e7c, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4768 	{ "c91-09.61",           0x040000, 0xd82b5266, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4769 
4770 	{ "c91-07.62",           0x010000, 0xe471a05a, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4771 
4772 	{ "c91-03.34",           0x100000, 0x8965da12, BRF_GRA | TAITO_CHARS },
4773 
4774 	{ "c91-01.12",           0x100000, 0x0f3f4e00, BRF_GRA | TAITO_SPRITESA },
4775 	{ "c91-02.11",           0x100000, 0xe14ab98e, BRF_GRA | TAITO_SPRITESA },
4776 
4777 	{ "c91-04.28",           0x080000, 0x390b1065, BRF_SND | TAITO_YM2610A },
4778 
4779 	{ "pal16l8b-c74-06.ic48",0x000104, 0xc868dc16, BRF_OPT },
4780 };
4781 
4782 STD_ROM_PICK(Solfigtr)
4783 STD_ROM_FN(Solfigtr)
4784 
4785 static struct BurnRomInfo ThundfoxRomDesc[] = {
4786 	{ "c28-13-1.51",         0x020000, 0xacb07013, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4787 	{ "c28-16-1.40",         0x020000, 0x1e43d55b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4788 	{ "c28-08.50",           0x020000, 0x38e038f1, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4789 	{ "c28-07.39",           0x020000, 0x24419abb, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4790 
4791 	{ "c28-14.3",            0x010000, 0x45ef3616, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4792 
4793 	{ "c28-02.61",           0x080000, 0x6230a09d, BRF_GRA | TAITO_CHARS },
4794 
4795 	{ "c28-01.63",           0x080000, 0x44552b25, BRF_GRA | TAITO_CHARSB },
4796 
4797 	{ "c28-03.29",           0x080000, 0x51bdc7af, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4798 	{ "c28-04.28",           0x080000, 0xba7ed535, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4799 
4800 	{ "c28-06.41",           0x080000, 0xdb6983db, BRF_SND | TAITO_YM2610A },
4801 	{ "c28-05.42",           0x080000, 0xd3b238fa, BRF_SND | TAITO_YM2610B },
4802 
4803 	{ "pal16l8b-b89-01.ic19",0x000104, 0x4095b97a, BRF_OPT },
4804 	{ "pal16l8b-b89-03.ic37",0x000104, 0x634592e2, BRF_OPT },
4805 	{ "pal16v8b-b89-04.ic33",0x000117, 0xfc136ae2, BRF_OPT },
4806 	{ "pal16l8b-c28-09.ic25",0x000104, 0x383e7305, BRF_OPT },
4807 	{ "pal16l8b-c28-10.ic26",0x000104, 0x47fccc07, BRF_OPT },
4808 	{ "pal16l8b-c28-11.ic35",0x000104, 0x33414fe8, BRF_OPT },
4809 };
4810 
4811 STD_ROM_PICK(Thundfox)
4812 STD_ROM_FN(Thundfox)
4813 
4814 static struct BurnRomInfo ThundfoxjRomDesc[] = {
4815 	{ "c28-13-1.51",         0x020000, 0xacb07013, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4816 	{ "c28-12-1.40",         0x020000, 0xf04db477, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4817 	{ "c28-08.50",           0x020000, 0x38e038f1, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4818 	{ "c28-07.39",           0x020000, 0x24419abb, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4819 
4820 	{ "c28-14.3",            0x010000, 0x45ef3616, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4821 
4822 	{ "c28-02.61",           0x080000, 0x6230a09d, BRF_GRA | TAITO_CHARS },
4823 
4824 	{ "c28-01.63",           0x080000, 0x44552b25, BRF_GRA | TAITO_CHARSB },
4825 
4826 	{ "c28-03.29",           0x080000, 0x51bdc7af, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4827 	{ "c28-04.28",           0x080000, 0xba7ed535, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4828 
4829 	{ "c28-06.41",           0x080000, 0xdb6983db, BRF_SND | TAITO_YM2610A },
4830 	{ "c28-05.42",           0x080000, 0xd3b238fa, BRF_SND | TAITO_YM2610B },
4831 };
4832 
4833 STD_ROM_PICK(Thundfoxj)
4834 STD_ROM_FN(Thundfoxj)
4835 
4836 static struct BurnRomInfo ThundfoxuRomDesc[] = {
4837 	{ "c28-13-1.51",         0x020000, 0xacb07013, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4838 	{ "c28-15-1.40",         0x020000, 0x874a84e1, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4839 	{ "c28-08.50",           0x020000, 0x38e038f1, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4840 	{ "c28-07.39",           0x020000, 0x24419abb, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4841 
4842 	{ "c28-14.3",            0x010000, 0x45ef3616, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4843 
4844 	{ "c28-02.61",           0x080000, 0x6230a09d, BRF_GRA | TAITO_CHARS },
4845 
4846 	{ "c28-01.63",           0x080000, 0x44552b25, BRF_GRA | TAITO_CHARSB },
4847 
4848 	{ "c28-03.29",           0x080000, 0x51bdc7af, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4849 	{ "c28-04.28",           0x080000, 0xba7ed535, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4850 
4851 	{ "c28-06.41",           0x080000, 0xdb6983db, BRF_SND | TAITO_YM2610A },
4852 	{ "c28-05.42",           0x080000, 0xd3b238fa, BRF_SND | TAITO_YM2610B },
4853 };
4854 
4855 STD_ROM_PICK(Thundfoxu)
4856 STD_ROM_FN(Thundfoxu)
4857 
4858 static struct BurnRomInfo YesnojRomDesc[] = {
4859 	{ "d20-05-2.2",            0x040000, 0x68adb929, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4860 	{ "d20-04-2.4",            0x040000, 0xa84762f8, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4861 
4862 	{ "d20-06.5",              0x010000, 0x3eb537dc, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4863 
4864 	{ "d20-01.11",             0x080000, 0x9d8a4d57, BRF_GRA | TAITO_CHARS },
4865 
4866 	{ "d20-02.12",             0x080000, 0xe71a8e40, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4867 	{ "d20-03.13",             0x080000, 0x6a51a1b4, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4868 };
4869 
4870 STD_ROM_PICK(Yesnoj)
4871 STD_ROM_FN(Yesnoj)
4872 
4873 static struct BurnRomInfo YuyugogoRomDesc[] = {
4874 	{ "c83-10.3",              0x020000, 0x4d185d03, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4875 	{ "c83-09.2",              0x020000, 0xf9892792, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
4876 	{ "c83-03.10",             0x100000, 0xeed9acc2, BRF_ESS | BRF_PRG | TAITO_68KROM1 },
4877 
4878 	{ "c83-11.1",              0x010000, 0x461e702a, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
4879 
4880 	{ "c83-05.21",             0x020000, 0xeca57fb1, BRF_GRA | TAITO_CHARS },
4881 
4882 	{ "c83-01.12",             0x100000, 0x8bf0d416, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4883 	{ "c83-02.11",             0x100000, 0x20bb1c15, BRF_GRA | TAITO_SPRITESA_BYTESWAP },
4884 
4885 	{ "c83-04.5",              0x100000, 0x2600093a, BRF_SND | TAITO_YM2610A },
4886 };
4887 
4888 STD_ROM_PICK(Yuyugogo)
STD_ROM_FN(Yuyugogo)4889 STD_ROM_FN(Yuyugogo)
4890 
4891 static INT32 MemIndex()
4892 {
4893 	UINT8 *Next; Next = TaitoMem;
4894 
4895 	Taito68KRom1                    = Next; Next += Taito68KRom1Size;
4896 	TaitoZ80Rom1                    = Next; Next += TaitoZ80Rom1Size;
4897 	TaitoYM2610ARom                 = Next; Next += TaitoYM2610ARomSize;
4898 	TaitoYM2610BRom                 = Next; Next += TaitoYM2610BRomSize;
4899 	TaitoMSM6295Rom                 = Next; Next += TaitoMSM6295RomSize;
4900 
4901 	cchip_rom                       = Next; Next += TaitoCCHIPBIOSSize;
4902 	cchip_eeprom                    = Next; Next += TaitoCCHIPEEPROMSize;
4903 
4904 	TaitoRamStart                   = Next;
4905 
4906 	Taito68KRam1                    = Next; Next += 0x020000;
4907 	TaitoZ80Ram1                    = Next; Next += 0x002000;
4908 	TaitoSpriteRam                  = Next; Next += 0x010000;
4909 	TaitoSpriteRamBuffered          = Next; Next += 0x010000;
4910 	TaitoSpriteRamDelayed           = Next; Next += 0x010000;
4911 	TaitoSpriteExtension            = Next; Next += 0x004000;
4912 	TaitoPaletteRam                 = Next; Next += 0x004000;
4913 
4914 	TaitoRamEnd                     = Next;
4915 
4916 	TaitoChars                      = Next; Next += TaitoNumChar * TaitoCharWidth * TaitoCharHeight;
4917 	if (TaitoNumCharB) { TaitoCharsB  = Next; Next += TaitoNumCharB * TaitoCharBWidth * TaitoCharBHeight; }
4918 	TaitoCharsPivot                 = Next; Next += TaitoNumCharPivot * TaitoCharPivotWidth * TaitoCharPivotHeight;
4919 	TaitoSpritesA                   = Next; Next += TaitoNumSpriteA * TaitoSpriteAWidth * TaitoSpriteAHeight;
4920 	TaitoPalette                    = (UINT32*)Next; Next += 0x02000 * sizeof(UINT32);
4921 	TaitoPriorityMap                = pPrioDraw; // from tiles_generic! //Next; Next += nScreenWidth * nScreenHeight;
4922 	TaitoF2SpriteList               = (TaitoF2SpriteEntry*)Next; Next += 0x400 * sizeof(TaitoF2SpriteEntry);
4923 
4924 	TaitoMemEnd                     = Next;
4925 
4926 	return 0;
4927 }
4928 
TaitoF2DoReset()4929 static INT32 TaitoF2DoReset()
4930 {
4931 	TaitoDoReset();
4932 
4933 	YesnoDip = 0;
4934 	MjnquestInput = 0;
4935 	DriveoutSoundNibble = 0;
4936 	DriveoutOkiBank = 0;
4937 
4938 	TaitoF2SpritesFlipScreen = 0;
4939 	TaitoF2SpriteBlendMode = 0;
4940 	TaitoF2TilePriority[0] = TaitoF2TilePriority[1] = TaitoF2TilePriority[2] = TaitoF2TilePriority[3] = TaitoF2TilePriority[4] = 0;
4941 	TaitoF2SpritePriority[0] = TaitoF2SpritePriority[1] = TaitoF2SpritePriority[2] = TaitoF2SpritePriority[3] = 0;
4942 
4943 	return 0;
4944 }
4945 
TaitoF2SpriteBankWrite(INT32 Offset,UINT16 Data)4946 static void TaitoF2SpriteBankWrite(INT32 Offset, UINT16 Data)
4947 {
4948 	INT32 i, j;
4949 
4950 	if (Offset < 2) return;
4951 	if (Offset < 4) {
4952 		j = (Offset & 1) << 1;
4953 		i = Data << 11;
4954 		TaitoF2SpriteBankBuffered[j + 0] = i;
4955 		TaitoF2SpriteBankBuffered[j + 1] = i + 0x400;
4956 	} else {
4957 		i = Data << 10;
4958 		TaitoF2SpriteBankBuffered[Offset] = i;
4959 	}
4960 }
4961 
Cameltry68KReadByte(UINT32 a)4962 UINT8 __fastcall Cameltry68KReadByte(UINT32 a)
4963 {
4964 	TC0220IOCHalfWordRead_Map(0x300000)
4965 
4966 	switch (a) {
4967 		default: {
4968 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
4969 		}
4970 	}
4971 
4972 	return 0;
4973 }
4974 
Cameltry68KWriteByte(UINT32 a,UINT8 d)4975 void __fastcall Cameltry68KWriteByte(UINT32 a, UINT8 d)
4976 {
4977 	TC0220IOCHalfWordWrite_Map(0x300000)
4978 	TC0100SCN0ByteWrite_Map(0x800000, 0x813fff)
4979 
4980 	switch (a) {
4981 		case 0x320000: {
4982 			TC0140SYTPortWrite(d);
4983 			return;
4984 		}
4985 
4986 		case 0x320002: {
4987 			TC0140SYTCommWrite(d);
4988 			return;
4989 		}
4990 
4991 		default: {
4992 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
4993 		}
4994 	}
4995 }
4996 
Cameltry68KReadWord(UINT32 a)4997 UINT16 __fastcall Cameltry68KReadWord(UINT32 a)
4998 {
4999 	TC0220IOCHalfWordRead_Map(0x300000)
5000 
5001 	switch (a) {
5002 		case 0x300018: {
5003 			INT32 Temp = TaitoAnalogPort0 >> 6;
5004 			if (Temp >= 0x14 && Temp < 0x80) Temp = 0x14;
5005 			if (Temp <= 0x3ec && Temp > 0x80) Temp = 0x3ec;
5006 			return Temp;
5007 		}
5008 
5009 		case 0x30001c: {
5010 			INT32 Temp = TaitoAnalogPort1 >> 6;
5011 			if (Temp >= 0x14 && Temp < 0x80) Temp = 0x14;
5012 			if (Temp <= 0x3ec && Temp > 0x80) Temp = 0x3ec;
5013 			return Temp;
5014 		}
5015 
5016 		default: {
5017 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
5018 		}
5019 	}
5020 
5021 	return 0;
5022 }
5023 
Cameltry68KWriteWord(UINT32 a,UINT16 d)5024 void __fastcall Cameltry68KWriteWord(UINT32 a, UINT16 d)
5025 {
5026 	TC0220IOCHalfWordWrite_Map(0x300000)
5027 	TC0100SCN0WordWrite_Map(0x800000, 0x813fff)
5028 	TC0100SCN0CtrlWordWrite_Map(0x820000)
5029 	TC0280GRDCtrlWordWrite_Map(0xa02000)
5030 	TC0360PRIHalfWordWrite_Map(0xd00000)
5031 
5032 	if (a >= 0x814000 && a <= 0x814fff) return; //???
5033 
5034 	switch (a) {
5035 		default: {
5036 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
5037 		}
5038 	}
5039 }
5040 
Deadconx68KReadByte(UINT32 a)5041 UINT8 __fastcall Deadconx68KReadByte(UINT32 a)
5042 {
5043 	switch (a) {
5044 		case 0x700001: {
5045 			return TaitoDip[0];
5046 		}
5047 
5048 		case 0x700003: {
5049 			return TaitoDip[1];
5050 		}
5051 
5052 		case 0x700005: {
5053 			return TaitoInput[2];
5054 		}
5055 
5056 		case 0x700007: {
5057 			return 0xff;
5058 		}
5059 
5060 		case 0x70000b: {
5061 			return TaitoInput[0];
5062 		}
5063 
5064 		case 0x70000d: {
5065 			return TaitoInput[1];
5066 		}
5067 
5068 		case 0x70000f: {
5069 			return 0xff;
5070 		}
5071 
5072 		case 0x700011: {
5073 			return 0xff;
5074 		}
5075 
5076 		case 0xa00002: {
5077 			return TC0140SYTCommRead();
5078 		}
5079 
5080 		default: {
5081 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
5082 		}
5083 	}
5084 
5085 	return 0;
5086 }
5087 
Deadconx68KWriteByte(UINT32 a,UINT8 d)5088 void __fastcall Deadconx68KWriteByte(UINT32 a, UINT8 d)
5089 {
5090 	switch (a) {
5091 		case 0x700007: {
5092 			// coin write
5093 			return;
5094 		}
5095 
5096 		case 0xa00000: {
5097 			TC0140SYTPortWrite(d);
5098 			return;
5099 		}
5100 
5101 		case 0xa00002: {
5102 			TC0140SYTCommWrite(d);
5103 			return;
5104 		}
5105 
5106 		default: {
5107 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
5108 		}
5109 	}
5110 }
5111 
Deadconx68KReadWord(UINT32 a)5112 UINT16 __fastcall Deadconx68KReadWord(UINT32 a)
5113 {
5114 	switch (a) {
5115 		default: {
5116 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
5117 		}
5118 	}
5119 
5120 	return 0;
5121 }
5122 
Deadconx68KWriteWord(UINT32 a,UINT16 d)5123 void __fastcall Deadconx68KWriteWord(UINT32 a, UINT16 d)
5124 {
5125 	TC0480SCPCtrlWordWrite_Map(0x430000)
5126 	TC0360PRIHalfWordWrite_Map(0x500000)
5127 
5128 	switch (a) {
5129 		case 0x300000:
5130 		case 0x300002:
5131 		case 0x300004:
5132 		case 0x300006:
5133 		case 0x300008:
5134 		case 0x30000a:
5135 		case 0x30000c:
5136 		case 0x30000e: {
5137 			TaitoF2SpriteBankWrite((a - 0x300000) >> 1, d);
5138 			return;
5139 		}
5140 
5141 		case 0x700006: {
5142 			// coin write
5143 			return;
5144 		}
5145 
5146 		case 0x700008:
5147 		case 0x700012:
5148 		case 0x700014:
5149 		case 0x700016:
5150 		case 0x700018: {
5151 			// ???
5152 			return;
5153 		}
5154 
5155 		case 0x800000: {
5156 			// watchdog
5157 			return;
5158 		}
5159 
5160 		case 0x900000: {
5161 			// ???
5162 			return;
5163 		}
5164 
5165 		default: {
5166 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
5167 		}
5168 	}
5169 }
5170 
Dinorex68KReadByte(UINT32 a)5171 UINT8 __fastcall Dinorex68KReadByte(UINT32 a)
5172 {
5173 	TC0510NIOHalfWordRead_Map(0x300000)
5174 
5175 	switch (a) {
5176 		case 0xa00002: {
5177 			return TC0140SYTCommRead();
5178 		}
5179 
5180 		default: {
5181 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
5182 		}
5183 	}
5184 
5185 	return 0;
5186 }
5187 
Dinorex68KWriteByte(UINT32 a,UINT8 d)5188 void __fastcall Dinorex68KWriteByte(UINT32 a, UINT8 d)
5189 {
5190 	TC0510NIOHalfWordWrite_Map(0x300000)
5191 	TC0100SCN0ByteWrite_Map(0x900000, 0x90ffff)
5192 
5193 	switch (a) {
5194 		case 0xa00000: {
5195 			TC0140SYTPortWrite(d);
5196 			return;
5197 		}
5198 
5199 		case 0xa00002: {
5200 			TC0140SYTCommWrite(d);
5201 			return;
5202 		}
5203 
5204 		case 0xb00000: {
5205 			// nop
5206 			return;
5207 		}
5208 
5209 		default: {
5210 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
5211 		}
5212 	}
5213 }
5214 
Dinorex68KReadWord(UINT32 a)5215 UINT16 __fastcall Dinorex68KReadWord(UINT32 a)
5216 {
5217 	switch (a) {
5218 		default: {
5219 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
5220 		}
5221 	}
5222 
5223 	return 0;
5224 }
5225 
Dinorex68KWriteWord(UINT32 a,UINT16 d)5226 void __fastcall Dinorex68KWriteWord(UINT32 a, UINT16 d)
5227 {
5228 	TC0510NIOHalfWordWrite_Map(0x300000)
5229 	TC0360PRIHalfWordWrite_Map(0x700000)
5230 	TC0100SCN0WordWrite_Map(0x900000, 0x90ffff)
5231 	TC0100SCN0CtrlWordWrite_Map(0x920000)
5232 
5233 	switch (a) {
5234 		case 0xb00000: {
5235 			// nop
5236 			return;
5237 		}
5238 
5239 		default: {
5240 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
5241 		}
5242 	}
5243 }
5244 
Dondokod68KReadByte(UINT32 a)5245 UINT8 __fastcall Dondokod68KReadByte(UINT32 a)
5246 {
5247 	TC0220IOCHalfWordRead_Map(0x300000)
5248 
5249 	switch (a) {
5250 		case 0x320002: {
5251 			return TC0140SYTCommRead();
5252 		}
5253 
5254 		default: {
5255 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
5256 		}
5257 	}
5258 
5259 	return 0;
5260 }
5261 
Dondokod68KWriteByte(UINT32 a,UINT8 d)5262 void __fastcall Dondokod68KWriteByte(UINT32 a, UINT8 d)
5263 {
5264 	TC0220IOCHalfWordWrite_Map(0x300000)
5265 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
5266 
5267 	switch (a) {
5268 		case 0x320000:
5269 		case 0x320001: {
5270 			TC0140SYTPortWrite(d);
5271 			return;
5272 		}
5273 
5274 		case 0x320002:
5275 		case 0x320003: {
5276 			TC0140SYTCommWrite(d);
5277 			return;
5278 		}
5279 
5280 		default: {
5281 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
5282 		}
5283 	}
5284 }
5285 
Dondokod68KReadWord(UINT32 a)5286 UINT16 __fastcall Dondokod68KReadWord(UINT32 a)
5287 {
5288 	TC0220IOCHalfWordRead_Map(0x300000)
5289 
5290 	switch (a) {
5291 		default: {
5292 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
5293 		}
5294 	}
5295 
5296 	return 0;
5297 }
5298 
Dondokod68KWriteWord(UINT32 a,UINT16 d)5299 void __fastcall Dondokod68KWriteWord(UINT32 a, UINT16 d)
5300 {
5301 	TC0220IOCHalfWordWrite_Map(0x300000)
5302 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
5303 	TC0100SCN0CtrlWordWrite_Map(0x820000)
5304 	TC0280GRDCtrlWordWrite_Map(0xa02000)
5305 	TC0360PRIHalfWordWrite_Map(0xb00000)
5306 
5307 	switch (a) {
5308 		case 0x360000: {
5309 			//???
5310 			return;
5311 		}
5312 
5313 		default: {
5314 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
5315 		}
5316 	}
5317 }
5318 
Driftout68KReadByte(UINT32 a)5319 UINT8 __fastcall Driftout68KReadByte(UINT32 a)
5320 {
5321 	TC0510NIOHalfWordRead_Map(0xb00000)
5322 
5323 	switch (a) {
5324 		default: {
5325 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
5326 		}
5327 	}
5328 
5329 	return 0;
5330 }
5331 
Driftout68KWriteByte(UINT32 a,UINT8 d)5332 void __fastcall Driftout68KWriteByte(UINT32 a, UINT8 d)
5333 {
5334 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
5335 	TC0510NIOHalfWordWrite_Map(0xb00000)
5336 
5337 	switch (a) {
5338 		case 0x200000: {
5339 			TC0140SYTPortWrite(d);
5340 			return;
5341 		}
5342 
5343 		case 0x200002: {
5344 			TC0140SYTCommWrite(d);
5345 			return;
5346 		}
5347 
5348 		default: {
5349 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
5350 		}
5351 	}
5352 }
5353 
Driftout68KReadWord(UINT32 a)5354 UINT16 __fastcall Driftout68KReadWord(UINT32 a)
5355 {
5356 	TC0510NIOHalfWordRead_Map(0xb00000)
5357 
5358 	switch (a) {
5359 		case 0x200000: {
5360 			return 0;
5361 		}
5362 
5363 		case 0xb00018:
5364 		case 0xb0001a: {
5365 			//driftout_paddle_r
5366 			return 0xff;
5367 		}
5368 
5369 		default: {
5370 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
5371 		}
5372 	}
5373 
5374 	return 0;
5375 }
5376 
Driftout68KWriteWord(UINT32 a,UINT16 d)5377 void __fastcall Driftout68KWriteWord(UINT32 a, UINT16 d)
5378 {
5379 	TC0430GRWCtrlWordWrite_Map(0x402000)
5380 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
5381 	TC0100SCN0CtrlWordWrite_Map(0x820000)
5382 	TC0360PRIHalfWordSwapWrite_Map(0xa00000)
5383 	TC0510NIOHalfWordWrite_Map(0xb00000)
5384 
5385 	switch (a) {
5386 		case 0xa00000: {
5387 			//???
5388 			return;
5389 		}
5390 
5391 		case 0x20019c: {
5392 			//???
5393 			return;
5394 		}
5395 
5396 		default: {
5397 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
5398 		}
5399 	}
5400 }
5401 
Driveout68KWriteByte(UINT32 a,UINT8 d)5402 void __fastcall Driveout68KWriteByte(UINT32 a, UINT8 d)
5403 {
5404 	TC0510NIOHalfWordWrite_Map(0xb00000)
5405 
5406 	switch (a) {
5407 		case 0x200000: {
5408 			DriveoutSoundNibble = d & 1;
5409 			return;
5410 		}
5411 
5412 		case 0x200002: {
5413 			if (!DriveoutSoundNibble) {
5414 				TaitoSoundLatch = (d & 0x0f) | (TaitoSoundLatch & 0xf0);
5415 			} else {
5416 				TaitoSoundLatch = ((d << 4) & 0xf0) | (TaitoSoundLatch & 0x0f);
5417 				ZetOpen(0);
5418 				ZetSetIRQLine(0, CPU_IRQSTATUS_AUTO);
5419 				ZetClose();
5420 			}
5421 			return;
5422 		}
5423 
5424 		default: {
5425 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
5426 		}
5427 	}
5428 }
5429 
Finalb68KReadByte(UINT32 a)5430 UINT8 __fastcall Finalb68KReadByte(UINT32 a)
5431 {
5432 	TC0220IOCHalfWordRead_Map(0x300000)
5433 
5434 	switch (a) {
5435 		default: {
5436 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
5437 		}
5438 	}
5439 
5440 	return 0;
5441 }
5442 
Finalb68KWriteByte(UINT32 a,UINT8 d)5443 void __fastcall Finalb68KWriteByte(UINT32 a, UINT8 d)
5444 {
5445 	TC0220IOCHalfWordWrite_Map(0x300000)
5446 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
5447 
5448 	switch (a) {
5449 		case 0x320001: {
5450 			TC0140SYTPortWrite(d);
5451 			return;
5452 		}
5453 
5454 		case 0x320003: {
5455 			TC0140SYTCommWrite(d);
5456 			return;
5457 		}
5458 
5459 		default: {
5460 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
5461 		}
5462 	}
5463 }
5464 
Finalb68KReadWord(UINT32 a)5465 UINT16 __fastcall Finalb68KReadWord(UINT32 a)
5466 {
5467 	TC0220IOCHalfWordRead_Map(0x300000)
5468 
5469 	switch (a) {
5470 		case 0x200002: {
5471 			return TC0110PCRWordRead(0);
5472 		}
5473 
5474 		default: {
5475 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
5476 		}
5477 	}
5478 
5479 	return 0;
5480 }
5481 
Finalb68KWriteWord(UINT32 a,UINT16 d)5482 void __fastcall Finalb68KWriteWord(UINT32 a, UINT16 d)
5483 {
5484 	TC0220IOCHalfWordWrite_Map(0x300000)
5485 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
5486 	TC0100SCN0CtrlWordWrite_Map(0x820000)
5487 
5488 	if (a >= 0x810000 && a <= 0x81ffff) return; // NOP
5489 
5490 	switch (a) {
5491 		case 0x200000:
5492 		case 0x200002: {
5493 			TC0110PCRWordWrite(0, (a - 0x200000) >> 1, d);
5494 			return;
5495 		}
5496 
5497 		case 0x200004: // hm?
5498 		    return;
5499 
5500 	    default: {
5501 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
5502 		}
5503 	}
5504 }
5505 
Footchmp68KReadByte(UINT32 a)5506 UINT8 __fastcall Footchmp68KReadByte(UINT32 a)
5507 {
5508 	switch (a) {
5509 		default: {
5510 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
5511 		}
5512 	}
5513 
5514 	return 0;
5515 }
5516 
Footchmp68KWriteByte(UINT32 a,UINT8 d)5517 void __fastcall Footchmp68KWriteByte(UINT32 a, UINT8 d)
5518 {
5519 	switch (a) {
5520 		case 0xa00001: {
5521 			TC0140SYTPortWrite(d);
5522 			return;
5523 		}
5524 
5525 		case 0xa00003: {
5526 			TC0140SYTCommWrite(d);
5527 			return;
5528 		}
5529 
5530 		default: {
5531 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
5532 		}
5533 	}
5534 }
5535 
Footchmp68KReadWord(UINT32 a)5536 UINT16 __fastcall Footchmp68KReadWord(UINT32 a)
5537 {
5538 	switch (a) {
5539 		case 0x700000: {
5540 			return TaitoDip[0];
5541 		}
5542 
5543 		case 0x700002: {
5544 			return TaitoDip[1];
5545 		}
5546 
5547 		case 0x700004: {
5548 			return TaitoInput[2];
5549 		}
5550 
5551 		case 0x70000a: {
5552 			return TaitoInput[0];
5553 		}
5554 
5555 		case 0x70000c: {
5556 			return TaitoInput[1];
5557 		}
5558 
5559 		case 0x70000e: {
5560 			return TaitoInput[3];
5561 		}
5562 
5563 		case 0x700010: {
5564 			return TaitoInput[4];
5565 		}
5566 
5567 		default: {
5568 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
5569 		}
5570 	}
5571 
5572 	return 0xffff;
5573 }
5574 
Footchmp68KWriteWord(UINT32 a,UINT16 d)5575 void __fastcall Footchmp68KWriteWord(UINT32 a, UINT16 d)
5576 {
5577 	TC0480SCPCtrlWordWrite_Map(0x430000)
5578 	TC0360PRIHalfWordWrite_Map(0x500000)
5579 
5580 	switch (a) {
5581 		case 0x300000:
5582 		case 0x300002:
5583 		case 0x300004:
5584 		case 0x300006:
5585 		case 0x300008:
5586 		case 0x30000a:
5587 		case 0x30000c:
5588 		case 0x30000e: {
5589 			TaitoF2SpriteBankWrite((a - 0x300000) >> 1, d);
5590 			return;
5591 		}
5592 
5593 		case 0x700006:
5594 		case 0x700008:
5595 		case 0x700012:
5596 		case 0x700014:
5597 		case 0x700016:
5598 		case 0x700018: {
5599 			return;
5600 		}
5601 
5602 		case 0x800000: {
5603 			// watchdog
5604 			return;
5605 		}
5606 
5607 		case 0x900000: {
5608 			// ????
5609 			return;
5610 		}
5611 
5612 		default: {
5613 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
5614 		}
5615 	}
5616 }
5617 
Growl68KReadByte(UINT32 a)5618 UINT8 __fastcall Growl68KReadByte(UINT32 a)
5619 {
5620 	switch (a) {
5621 		case 0x320001: {
5622 			return TaitoInput[0];
5623 		}
5624 
5625 		case 0x320003: {
5626 			return TaitoInput[1];
5627 		}
5628 
5629 		case 0x400002: {
5630 			return TC0140SYTCommRead();
5631 		}
5632 
5633 		case 0x508000: {
5634 			return TaitoInput[4];
5635 		}
5636 
5637 		case 0x508001: {
5638 			return TaitoInput[3];
5639 		}
5640 
5641 		default: {
5642 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
5643 		}
5644 	}
5645 
5646 	return 0;
5647 }
5648 
Growl68KWriteByte(UINT32 a,UINT8 d)5649 void __fastcall Growl68KWriteByte(UINT32 a, UINT8 d)
5650 {
5651 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
5652 
5653 	switch (a) {
5654 		case 0x400000: {
5655 			TC0140SYTPortWrite(d);
5656 			return;
5657 		}
5658 
5659 		case 0x400002: {
5660 			TC0140SYTCommWrite(d);
5661 			return;
5662 		}
5663 
5664 		default: {
5665 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
5666 		}
5667 	}
5668 }
5669 
Growl68KReadWord(UINT32 a)5670 UINT16 __fastcall Growl68KReadWord(UINT32 a)
5671 {
5672 	switch (a) {
5673 		case 0x300000: {
5674 			return TaitoDip[0];
5675 		}
5676 
5677 		case 0x300002: {
5678 			return TaitoDip[1];
5679 		}
5680 
5681 		case 0x320000: {
5682 			return TaitoInput[0];
5683 		}
5684 
5685 		case 0x320004: {
5686 			return TaitoInput[2];
5687 		}
5688 
5689 		case 0x50c000: {
5690 			return TaitoInput[5];
5691 		}
5692 
5693 		default: {
5694 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
5695 		}
5696 	}
5697 
5698 	return 0;
5699 }
5700 
Growl68KWriteWord(UINT32 a,UINT16 d)5701 void __fastcall Growl68KWriteWord(UINT32 a, UINT16 d)
5702 {
5703 	TC0360PRIHalfWordWrite_Map(0xb00000)
5704 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
5705 	TC0100SCN0CtrlWordWrite_Map(0x820000)
5706 
5707 	switch (a) {
5708 		case 0x300004: {
5709 			// coin write
5710 			return;
5711 		}
5712 
5713 		case 0x340000: {
5714 			// watchdog
5715 			return;
5716 		}
5717 
5718 		case 0x500000:
5719 		case 0x500002:
5720 		case 0x500004:
5721 		case 0x500006:
5722 		case 0x500008:
5723 		case 0x50000a:
5724 		case 0x50000c:
5725 		case 0x50000e: {
5726 			TaitoF2SpriteBankWrite((a - 0x500000) >> 1, d);
5727 			return;
5728 		}
5729 
5730 		case 0x504000: {
5731 			// nop
5732 			return;
5733 		}
5734 
5735 		default: {
5736 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
5737 		}
5738 	}
5739 }
5740 
Gunfront68KReadByte(UINT32 a)5741 UINT8 __fastcall Gunfront68KReadByte(UINT32 a)
5742 {
5743 	TC0510NIOHalfWordSwapRead_Map(0x300000)
5744 
5745 	switch (a) {
5746 		case 0x320002: {
5747 			return TC0140SYTCommRead();
5748 		}
5749 
5750 		default: {
5751 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
5752 		}
5753 	}
5754 
5755 	return 0;
5756 }
5757 
Gunfront68KWriteByte(UINT32 a,UINT8 d)5758 void __fastcall Gunfront68KWriteByte(UINT32 a, UINT8 d)
5759 {
5760 	TC0510NIOHalfWordSwapWrite_Map(0x300000)
5761 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
5762 
5763 	switch (a) {
5764 		case 0x320000: {
5765 			TC0140SYTPortWrite(d);
5766 			return;
5767 		}
5768 
5769 		case 0x320002: {
5770 			TC0140SYTCommWrite(d);
5771 			return;
5772 		}
5773 
5774 		case 0xa00000: {
5775 			// nop
5776 			return;
5777 		}
5778 
5779 		default: {
5780 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
5781 		}
5782 	}
5783 }
5784 
Gunfront68KReadWord(UINT32 a)5785 UINT16 __fastcall Gunfront68KReadWord(UINT32 a)
5786 {
5787 	switch (a) {
5788 		default: {
5789 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
5790 		}
5791 	}
5792 
5793 	return 0;
5794 }
5795 
Gunfront68KWriteWord(UINT32 a,UINT16 d)5796 void __fastcall Gunfront68KWriteWord(UINT32 a, UINT16 d)
5797 {
5798 	TC0510NIOHalfWordSwapWrite_Map(0x300000)
5799 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
5800 	TC0100SCN0CtrlWordWrite_Map(0x820000)
5801 	TC0360PRIHalfWordWrite_Map(0xb00000)
5802 
5803 	switch (a) {
5804 		default: {
5805 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
5806 		}
5807 	}
5808 }
5809 
Koshien68KReadByte(UINT32 a)5810 UINT8 __fastcall Koshien68KReadByte(UINT32 a)
5811 {
5812 	TC0510NIOHalfWordRead_Map(0x300000)
5813 
5814 	switch (a) {
5815 		default: {
5816 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
5817 		}
5818 	}
5819 
5820 	return 0;
5821 }
5822 
Koshien68KWriteByte(UINT32 a,UINT8 d)5823 void __fastcall Koshien68KWriteByte(UINT32 a, UINT8 d)
5824 {
5825 	TC0510NIOHalfWordWrite_Map(0x300000)
5826 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
5827 	TC0360PRIHalfWordWrite_Map(0xb00000)
5828 
5829 	switch (a) {
5830 		case 0x320000: {
5831 			TC0140SYTPortWrite(d);
5832 			return;
5833 		}
5834 
5835 		case 0x320002: {
5836 			TC0140SYTCommWrite(d);
5837 			return;
5838 		}
5839 
5840 		case 0x340000: {
5841 			//???
5842 			return;
5843 		}
5844 
5845 		default: {
5846 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
5847 		}
5848 	}
5849 }
5850 
Koshien68KReadWord(UINT32 a)5851 UINT16 __fastcall Koshien68KReadWord(UINT32 a)
5852 {
5853 	TC0510NIOHalfWordRead_Map(0x300000)
5854 
5855 	switch (a) {
5856 		default: {
5857 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
5858 		}
5859 	}
5860 
5861 	return 0;
5862 }
5863 
Koshien68KWriteWord(UINT32 a,UINT16 d)5864 void __fastcall Koshien68KWriteWord(UINT32 a, UINT16 d)
5865 {
5866 	TC0510NIOHalfWordWrite_Map(0x300000)
5867 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
5868 	TC0100SCN0CtrlWordWrite_Map(0x820000)
5869 	TC0360PRIHalfWordWrite_Map(0xb00000)
5870 
5871 	switch (a) {
5872 		case 0xa20000: {
5873 			TaitoF2SpriteBankBuffered[0] = 0x0000;
5874 			TaitoF2SpriteBankBuffered[1] = 0x0400;
5875 			TaitoF2SpriteBankBuffered[2] =  ((d & 0x00f) + 1) * 0x800;
5876 			TaitoF2SpriteBankBuffered[4] = (((d & 0x0f0) >> 4) + 1) * 0x800;
5877 			TaitoF2SpriteBankBuffered[6] = (((d & 0xf00) >> 8) + 1) * 0x800;
5878 			TaitoF2SpriteBankBuffered[3] = TaitoF2SpriteBankBuffered[2] + 0x400;
5879 			TaitoF2SpriteBankBuffered[5] = TaitoF2SpriteBankBuffered[4] + 0x400;
5880 			TaitoF2SpriteBankBuffered[7] = TaitoF2SpriteBankBuffered[6] + 0x400;
5881 			return;
5882 		}
5883 
5884 		default: {
5885 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
5886 		}
5887 	}
5888 }
5889 
Liquidk68KReadByte(UINT32 a)5890 UINT8 __fastcall Liquidk68KReadByte(UINT32 a)
5891 {
5892 	TC0220IOCHalfWordRead_Map(0x300000)
5893 
5894 	switch (a) {
5895 		default: {
5896 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
5897 		}
5898 	}
5899 
5900 	return 0;
5901 }
5902 
Liquidk68KWriteByte(UINT32 a,UINT8 d)5903 void __fastcall Liquidk68KWriteByte(UINT32 a, UINT8 d)
5904 {
5905 	TC0220IOCHalfWordWrite_Map(0x300000)
5906 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
5907 
5908 	switch (a) {
5909 		case 0x320001: {
5910 			TC0140SYTPortWrite(d);
5911 			return;
5912 		}
5913 
5914 		case 0x320003: {
5915 			TC0140SYTCommWrite(d);
5916 			return;
5917 		}
5918 
5919 		default: {
5920 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
5921 		}
5922 	}
5923 }
5924 
Liquidk68KReadWord(UINT32 a)5925 UINT16 __fastcall Liquidk68KReadWord(UINT32 a)
5926 {
5927 	TC0220IOCHalfWordRead_Map(0x300000)
5928 
5929 	switch (a) {
5930 		default: {
5931 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
5932 		}
5933 	}
5934 
5935 	return 0;
5936 }
5937 
Liquidk68KWriteWord(UINT32 a,UINT16 d)5938 void __fastcall Liquidk68KWriteWord(UINT32 a, UINT16 d)
5939 {
5940 	TC0220IOCHalfWordWrite_Map(0x300000)
5941 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
5942 	TC0100SCN0CtrlWordWrite_Map(0x820000)
5943 	TC0360PRIHalfWordWrite_Map(0xb00000)
5944 
5945 	switch (a) {
5946 		default: {
5947 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
5948 		}
5949 	}
5950 }
5951 
Megablst68KReadByte(UINT32 a)5952 UINT8 __fastcall Megablst68KReadByte(UINT32 a)
5953 {
5954 	TC0220IOCHalfWordRead_Map(0x120000)
5955 
5956 	CCHIP_READ(0x180000)
5957 
5958 	switch (a) {
5959 		case 0x100002: {
5960 			return TC0140SYTCommRead();
5961 		}
5962 
5963 		default: {
5964 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
5965 		}
5966 	}
5967 
5968 	return 0;
5969 }
5970 
Megablst68KWriteByte(UINT32 a,UINT8 d)5971 void __fastcall Megablst68KWriteByte(UINT32 a, UINT8 d)
5972 {
5973 	TC0220IOCHalfWordWrite_Map(0x120000)
5974 	TC0360PRIHalfWordWrite_Map(0x400000)
5975 	TC0100SCN0ByteWrite_Map(0x600000, 0x60ffff)
5976 
5977 	CCHIP_WRITE(0x180000)
5978 
5979 	switch (a) {
5980 		case 0x100000: {
5981 			TC0140SYTPortWrite(d);
5982 			return;
5983 		}
5984 
5985 		case 0x100002: {
5986 			TC0140SYTCommWrite(d);
5987 			return;
5988 		}
5989 
5990 		default: {
5991 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
5992 		}
5993 	}
5994 }
5995 
Megablst68KReadWord(UINT32 a)5996 UINT16 __fastcall Megablst68KReadWord(UINT32 a)
5997 {
5998 	TC0220IOCHalfWordRead_Map(0x120000)
5999 
6000 	CCHIP_READ(0x180000)
6001 
6002 	switch (a) {
6003 		default: {
6004 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
6005 		}
6006 	}
6007 
6008 	return 0;
6009 }
6010 
Megablst68KWriteWord(UINT32 a,UINT16 d)6011 void __fastcall Megablst68KWriteWord(UINT32 a, UINT16 d)
6012 {
6013 	TC0220IOCHalfWordWrite_Map(0x120000)
6014 	TC0360PRIHalfWordWrite_Map(0x400000)
6015 	TC0100SCN0WordWrite_Map(0x600000, 0x60ffff)
6016 	TC0100SCN0CtrlWordWrite_Map(0x620000)
6017 
6018 	CCHIP_WRITE(0x180000)
6019 
6020 	switch (a) {
6021 		default: {
6022 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
6023 		}
6024 	}
6025 }
6026 
Metalb68KReadByte(UINT32 a)6027 UINT8 __fastcall Metalb68KReadByte(UINT32 a)
6028 {
6029 	TC0510NIOHalfWordSwapRead_Map(0x800000)
6030 
6031 	switch (a) {
6032 		case 0x900002: {
6033 			return TC0140SYTCommRead();
6034 		}
6035 
6036 		default: {
6037 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
6038 		}
6039 	}
6040 
6041 	return 0;
6042 }
6043 
Metalb68KWriteByte(UINT32 a,UINT8 d)6044 void __fastcall Metalb68KWriteByte(UINT32 a, UINT8 d)
6045 {
6046 	TC0510NIOHalfWordSwapWrite_Map(0x800000)
6047 
6048 	switch (a) {
6049 		case 0x900000: {
6050 			TC0140SYTPortWrite(d);
6051 			return;
6052 		}
6053 
6054 		case 0x900002: {
6055 			TC0140SYTCommWrite(d);
6056 			return;
6057 		}
6058 
6059 		case 0xa00000: {
6060 			//???
6061 			return;
6062 		}
6063 
6064 		default: {
6065 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
6066 		}
6067 	}
6068 }
6069 
Metalb68KReadWord(UINT32 a)6070 UINT16 __fastcall Metalb68KReadWord(UINT32 a)
6071 {
6072 	switch (a) {
6073 		default: {
6074 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
6075 		}
6076 	}
6077 
6078 	return 0;
6079 }
6080 
Metalb68KWriteWord(UINT32 a,UINT16 d)6081 void __fastcall Metalb68KWriteWord(UINT32 a, UINT16 d)
6082 {
6083 	TC0480SCPCtrlWordWrite_Map(0x530000)
6084 	TC0360PRIHalfWordWrite_Map(0x600000)
6085 	TC0510NIOHalfWordSwapWrite_Map(0x800000)
6086 
6087 	switch (a) {
6088 		case 0x42000c:
6089 		case 0x42000e: {
6090 			//???
6091 			return;
6092 		}
6093 
6094 		case 0xa00000: {
6095 			//???
6096 			return;
6097 		}
6098 
6099 		default: {
6100 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
6101 		}
6102 	}
6103 }
6104 
Mjnquest68KReadByte(UINT32 a)6105 UINT8 __fastcall Mjnquest68KReadByte(UINT32 a)
6106 {
6107 	switch (a) {
6108 		case 0x300000: {
6109 			return TaitoInput[4];
6110 		}
6111 
6112 		case 0x300001: {
6113 			return TaitoDip[0];
6114 		}
6115 
6116 		case 0x300002: {
6117 			return TaitoInput[5];
6118 		}
6119 
6120 		case 0x300003: {
6121 			return TaitoDip[1];
6122 		}
6123 
6124 		case 0x360002: {
6125 			return TC0140SYTCommRead();
6126 		}
6127 
6128 		default: {
6129 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
6130 		}
6131 	}
6132 
6133 	return 0;
6134 }
6135 
Mjnquest68KWriteByte(UINT32 a,UINT8 d)6136 void __fastcall Mjnquest68KWriteByte(UINT32 a, UINT8 d)
6137 {
6138 	TC0100SCN0ByteWrite_Map(0x400000, 0x40ffff)
6139 
6140 	switch (a) {
6141 		case 0x330000:
6142 		case 0x330001: {
6143 			//nop
6144 			return;
6145 		}
6146 
6147 		case 0x360000: {
6148 			TC0140SYTPortWrite(d);
6149 			return;
6150 		}
6151 
6152 		case 0x360002: {
6153 			TC0140SYTCommWrite(d);
6154 			return;
6155 		}
6156 
6157 		case 0x360005: {
6158 			//???
6159 			return;
6160 		}
6161 
6162 		default: {
6163 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
6164 		}
6165 	}
6166 }
6167 
Mjnquest68KReadWord(UINT32 a)6168 UINT16 __fastcall Mjnquest68KReadWord(UINT32 a)
6169 {
6170 	switch (a) {
6171 		case 0x310000: {
6172 			switch (MjnquestInput) {
6173 				case 0x01: return TaitoInput[0];
6174 				case 0x02: return TaitoInput[1];
6175 				case 0x04: return TaitoInput[2];
6176 				case 0x08: return TaitoInput[3];
6177 				case 0x10: return 0xff;
6178 			}
6179 			return 0xff;
6180 		}
6181 
6182 		default: {
6183 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
6184 		}
6185 	}
6186 
6187 	return 0;
6188 }
6189 
Mjnquest68KWriteWord(UINT32 a,UINT16 d)6190 void __fastcall Mjnquest68KWriteWord(UINT32 a, UINT16 d)
6191 {
6192 	TC0100SCN0WordWrite_Map(0x400000, 0x40ffff)
6193 	TC0100SCN0CtrlWordWrite_Map(0x420000)
6194 
6195 	switch (a) {
6196 		case 0x200000:
6197 		case 0x200002: {
6198 			TC0110PCRWordWrite(0, (a - 0x200000) >> 1, d);
6199 			return;
6200 		}
6201 
6202 		case 0x200004: {
6203 			//nop
6204 			return;
6205 		}
6206 
6207 		case 0x300000: {
6208 			//???
6209 			return;
6210 		}
6211 
6212 		case 0x320000: {
6213 			MjnquestInput = d >> 6;
6214 			return;
6215 		}
6216 
6217 		case 0x350000: {
6218 			//nop
6219 			return;
6220 		}
6221 
6222 		case 0x380000: {
6223 			TC0100SCNSetGfxBank(0, d);
6224 			return;
6225 		}
6226 
6227 		default: {
6228 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
6229 		}
6230 	}
6231 }
6232 
Ninjak68KReadByte(UINT32 a)6233 UINT8 __fastcall Ninjak68KReadByte(UINT32 a)
6234 {
6235 	switch (a) {
6236 		case 0x300000: {
6237 			return TaitoDip[0];
6238 		}
6239 
6240 		case 0x300002: {
6241 			return TaitoDip[1];
6242 		}
6243 
6244 		case 0x300004: {
6245 			return TaitoInput[0];
6246 		}
6247 
6248 		case 0x300006: {
6249 			return TaitoInput[1];
6250 		}
6251 
6252 		case 0x300008: {
6253 			return TaitoInput[3];
6254 		}
6255 
6256 		case 0x30000a: {
6257 			return TaitoInput[4];
6258 		}
6259 
6260 		case 0x30000c: {
6261 			return TaitoInput[2];
6262 		}
6263 
6264 		case 0x400002: {
6265 			return TC0140SYTCommRead();
6266 		}
6267 
6268 		default: {
6269 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
6270 		}
6271 	}
6272 
6273 	return 0;
6274 }
6275 
Ninjak68KWriteByte(UINT32 a,UINT8 d)6276 void __fastcall Ninjak68KWriteByte(UINT32 a, UINT8 d)
6277 {
6278 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
6279 
6280 	switch (a) {
6281 		case 0x30000e: {
6282 			//coin write
6283 			return;
6284 		}
6285 
6286 		case 0x300010: {
6287 			//???
6288 			return;
6289 		}
6290 
6291 		case 0x400000: {
6292 			TC0140SYTPortWrite(d);
6293 			return;
6294 		}
6295 
6296 		case 0x400002: {
6297 			TC0140SYTCommWrite(d);
6298 			return;
6299 		}
6300 
6301 		default: {
6302 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
6303 		}
6304 	}
6305 }
6306 
Ninjak68KReadWord(UINT32 a)6307 UINT16 __fastcall Ninjak68KReadWord(UINT32 a)
6308 {
6309 	switch (a) {
6310 		default: {
6311 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
6312 		}
6313 	}
6314 
6315 	return 0;
6316 }
6317 
Ninjak68KWriteWord(UINT32 a,UINT16 d)6318 void __fastcall Ninjak68KWriteWord(UINT32 a, UINT16 d)
6319 {
6320 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
6321 	TC0100SCN0CtrlWordWrite_Map(0x820000)
6322 	TC0360PRIHalfWordWrite_Map(0xb00000)
6323 
6324 	switch (a) {
6325 		case 0x300000:
6326 		case 0x300012:
6327 		case 0x300014:
6328 		case 0x300016:
6329 		case 0x300018: {
6330 			//???
6331 			return;
6332 		}
6333 
6334 		case 0x380000: {
6335 			//watchdog
6336 			return;
6337 		}
6338 
6339 		case 0x600000:
6340 		case 0x600002:
6341 		case 0x600004:
6342 		case 0x600006:
6343 		case 0x600008:
6344 		case 0x60000a:
6345 		case 0x60000c:
6346 		case 0x60000e: {
6347 			TaitoF2SpriteBankWrite((a - 0x600000) >> 1, d);
6348 			return;
6349 		}
6350 
6351 		default: {
6352 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
6353 		}
6354 	}
6355 }
6356 
Pulirula68KReadByte(UINT32 a)6357 UINT8 __fastcall Pulirula68KReadByte(UINT32 a)
6358 {
6359 	TC0510NIOHalfWordRead_Map(0xb00000)
6360 
6361 	switch (a) {
6362 		case 0x200002: {
6363 			return TC0140SYTCommRead();
6364 		}
6365 
6366 		default: {
6367 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
6368 		}
6369 	}
6370 
6371 	return 0;
6372 }
6373 
Pulirula68KWriteByte(UINT32 a,UINT8 d)6374 void __fastcall Pulirula68KWriteByte(UINT32 a, UINT8 d)
6375 {
6376 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
6377 	TC0510NIOHalfWordWrite_Map(0xb00000)
6378 
6379 	switch (a) {
6380 		case 0x200000: {
6381 			TC0140SYTPortWrite(d);
6382 			return;
6383 		}
6384 
6385 		case 0x200002: {
6386 			TC0140SYTCommWrite(d);
6387 			return;
6388 		}
6389 
6390 		default: {
6391 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
6392 		}
6393 	}
6394 }
6395 
Pulirula68KReadWord(UINT32 a)6396 UINT16 __fastcall Pulirula68KReadWord(UINT32 a)
6397 {
6398 	switch (a) {
6399 		default: {
6400 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
6401 		}
6402 	}
6403 
6404 	return 0;
6405 }
6406 
Pulirula68KWriteWord(UINT32 a,UINT16 d)6407 void __fastcall Pulirula68KWriteWord(UINT32 a, UINT16 d)
6408 {
6409 	TC0430GRWCtrlWordWrite_Map(0x402000)
6410 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
6411 	TC0100SCN0CtrlWordWrite_Map(0x820000)
6412 	TC0360PRIHalfWordSwapWrite_Map(0xa00000)
6413 	TC0510NIOHalfWordWrite_Map(0xb00000)
6414 
6415 	switch (a) {
6416 		case 0x500000: {
6417 			//???
6418 			return;
6419 		}
6420 
6421 		default: {
6422 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
6423 		}
6424 	}
6425 }
6426 
Qcrayon68KReadByte(UINT32 a)6427 UINT8 __fastcall Qcrayon68KReadByte(UINT32 a)
6428 {
6429 	TC0510NIOHalfWordRead_Map(0xa00000)
6430 
6431 	switch (a) {
6432 		case 0x500002: {
6433 			return TC0140SYTCommRead();
6434 		}
6435 
6436 		default: {
6437 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
6438 		}
6439 	}
6440 
6441 	return 0;
6442 }
6443 
Qcrayon68KWriteByte(UINT32 a,UINT8 d)6444 void __fastcall Qcrayon68KWriteByte(UINT32 a, UINT8 d)
6445 {
6446 	TC0100SCN0ByteWrite_Map(0x900000, 0x90ffff)
6447 	TC0510NIOHalfWordWrite_Map(0xa00000)
6448 
6449 	switch (a) {
6450 		case 0x200000: {
6451 			//???
6452 			return;
6453 		}
6454 
6455 		case 0x500000: {
6456 			TC0140SYTPortWrite(d);
6457 			return;
6458 		}
6459 
6460 		case 0x500002: {
6461 			TC0140SYTCommWrite(d);
6462 			return;
6463 		}
6464 
6465 		default: {
6466 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
6467 		}
6468 	}
6469 }
6470 
Qcrayon68KReadWord(UINT32 a)6471 UINT16 __fastcall Qcrayon68KReadWord(UINT32 a)
6472 {
6473 	switch (a) {
6474 		default: {
6475 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
6476 		}
6477 	}
6478 
6479 	return 0;
6480 }
6481 
Qcrayon68KWriteWord(UINT32 a,UINT16 d)6482 void __fastcall Qcrayon68KWriteWord(UINT32 a, UINT16 d)
6483 {
6484 	TC0100SCN0WordWrite_Map(0x900000, 0x90ffff)
6485 	TC0100SCN0CtrlWordWrite_Map(0x920000)
6486 	TC0510NIOHalfWordWrite_Map(0xa00000)
6487 	TC0360PRIHalfWordWrite_Map(0xb00000)
6488 
6489 	switch (a) {
6490 		default: {
6491 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
6492 		}
6493 	}
6494 }
6495 
Qcrayon268KReadByte(UINT32 a)6496 UINT8 __fastcall Qcrayon268KReadByte(UINT32 a)
6497 {
6498 	TC0510NIOHalfWordRead_Map(0x700000)
6499 
6500 	switch (a) {
6501 		case 0xa00002: {
6502 			return TC0140SYTCommRead();
6503 		}
6504 
6505 		default: {
6506 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
6507 		}
6508 	}
6509 
6510 	return 0;
6511 }
6512 
Qcrayon268KWriteByte(UINT32 a,UINT8 d)6513 void __fastcall Qcrayon268KWriteByte(UINT32 a, UINT8 d)
6514 {
6515 	TC0100SCN0ByteWrite_Map(0x500000, 0x50ffff)
6516 	TC0510NIOHalfWordWrite_Map(0x700000)
6517 
6518 	switch (a) {
6519 		case 0x800000: {
6520 			//???
6521 			return;
6522 		}
6523 
6524 		case 0xa00000: {
6525 			TC0140SYTPortWrite(d);
6526 			return;
6527 		}
6528 
6529 		case 0xa00002: {
6530 			TC0140SYTCommWrite(d);
6531 			return;
6532 		}
6533 
6534 		default: {
6535 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
6536 		}
6537 	}
6538 }
6539 
Qcrayon268KReadWord(UINT32 a)6540 UINT16 __fastcall Qcrayon268KReadWord(UINT32 a)
6541 {
6542 	switch (a) {
6543 		default: {
6544 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
6545 		}
6546 	}
6547 
6548 	return 0;
6549 }
6550 
Qcrayon268KWriteWord(UINT32 a,UINT16 d)6551 void __fastcall Qcrayon268KWriteWord(UINT32 a, UINT16 d)
6552 {
6553 	TC0100SCN0WordWrite_Map(0x500000, 0x50ffff)
6554 	TC0100SCN0CtrlWordWrite_Map(0x520000)
6555 	TC0510NIOHalfWordWrite_Map(0x700000)
6556 	TC0360PRIHalfWordWrite_Map(0x900000)
6557 
6558 	switch (a) {
6559 		default: {
6560 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
6561 		}
6562 	}
6563 }
6564 
Qjinsei68KReadByte(UINT32 a)6565 UINT8 __fastcall Qjinsei68KReadByte(UINT32 a)
6566 {
6567 	TC0510NIOHalfWordRead_Map(0xb00000)
6568 
6569 	switch (a) {
6570 		case 0x200002: {
6571 			return TC0140SYTCommRead();
6572 		}
6573 
6574 		default: {
6575 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
6576 		}
6577 	}
6578 
6579 	return 0;
6580 }
6581 
Qjinsei68KWriteByte(UINT32 a,UINT8 d)6582 void __fastcall Qjinsei68KWriteByte(UINT32 a, UINT8 d)
6583 {
6584 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
6585 	TC0510NIOHalfWordWrite_Map(0xb00000)
6586 
6587 	switch (a) {
6588 		case 0x200000: {
6589 			TC0140SYTPortWrite(d);
6590 			return;
6591 		}
6592 
6593 		case 0x200002: {
6594 			TC0140SYTCommWrite(d);
6595 			return;
6596 		}
6597 
6598 		default: {
6599 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
6600 		}
6601 	}
6602 }
6603 
Qjinsei68KReadWord(UINT32 a)6604 UINT16 __fastcall Qjinsei68KReadWord(UINT32 a)
6605 {
6606 	switch (a) {
6607 		default: {
6608 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
6609 		}
6610 	}
6611 
6612 	return 0;
6613 }
6614 
Qjinsei68KWriteWord(UINT32 a,UINT16 d)6615 void __fastcall Qjinsei68KWriteWord(UINT32 a, UINT16 d)
6616 {
6617 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
6618 	TC0100SCN0CtrlWordWrite_Map(0x820000)
6619 	TC0360PRIHalfWordWrite_Map(0xa00000)
6620 	TC0510NIOHalfWordWrite_Map(0xb00000)
6621 
6622 	switch (a) {
6623 		case 0x500000: {
6624 			//nop
6625 			return;
6626 		}
6627 
6628 		default: {
6629 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
6630 		}
6631 	}
6632 }
6633 
Qtorimon68KReadByte(UINT32 a)6634 UINT8 __fastcall Qtorimon68KReadByte(UINT32 a)
6635 {
6636 	TC0220IOCHalfWordRead_Map(0x500000)
6637 
6638 	switch (a) {
6639 		case 0x600002: {
6640 			return TC0140SYTCommRead();
6641 		}
6642 
6643 		default: {
6644 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
6645 		}
6646 	}
6647 
6648 	return 0;
6649 }
6650 
Qtorimon68KWriteByte(UINT32 a,UINT8 d)6651 void __fastcall Qtorimon68KWriteByte(UINT32 a, UINT8 d)
6652 {
6653 	TC0220IOCHalfWordWrite_Map(0x500000)
6654 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
6655 
6656 	switch (a) {
6657 		case 0x600000: {
6658 			TC0140SYTPortWrite(d);
6659 			return;
6660 		}
6661 
6662 		case 0x600002: {
6663 			TC0140SYTCommWrite(d);
6664 			return;
6665 		}
6666 
6667 		default: {
6668 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
6669 		}
6670 	}
6671 }
6672 
Qtorimon68KReadWord(UINT32 a)6673 UINT16 __fastcall Qtorimon68KReadWord(UINT32 a)
6674 {
6675 	switch (a) {
6676 		case 0x200002: {
6677 			return TC0110PCRWordRead(0);
6678 		}
6679 
6680 		default: {
6681 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
6682 		}
6683 	}
6684 
6685 	return 0;
6686 }
6687 
Qtorimon68KWriteWord(UINT32 a,UINT16 d)6688 void __fastcall Qtorimon68KWriteWord(UINT32 a, UINT16 d)
6689 {
6690 	TC0220IOCHalfWordWrite_Map(0x500000)
6691 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
6692 	TC0100SCN0CtrlWordWrite_Map(0x820000)
6693 
6694 	if (a >= 0x810000 && a <= 0x81ffff) return; // NOP
6695 
6696 	switch (a) {
6697 		case 0x200000:
6698 		case 0x200002: {
6699 			TC0110PCRWordWrite(0, (a - 0x200000) >> 1, d);
6700 			return;
6701 		}
6702 
6703 		default: {
6704 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
6705 		}
6706 	}
6707 }
6708 
Quizhq68KReadByte(UINT32 a)6709 UINT8 __fastcall Quizhq68KReadByte(UINT32 a)
6710 {
6711 	switch (a) {
6712 		case 0x500001: {
6713 			return TaitoDip[1];
6714 		}
6715 
6716 		case 0x500003: {
6717 			return TaitoInput[0];
6718 		}
6719 
6720 		case 0x580001: {
6721 			return TaitoDip[0];
6722 		}
6723 
6724 		case 0x580003: {
6725 			return TaitoInput[1];
6726 		}
6727 
6728 		case 0x580005: {
6729 			return TaitoInput[2];
6730 		}
6731 
6732 		default: {
6733 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
6734 		}
6735 	}
6736 
6737 	return 0;
6738 }
6739 
Quizhq68KWriteByte(UINT32 a,UINT8 d)6740 void __fastcall Quizhq68KWriteByte(UINT32 a, UINT8 d)
6741 {
6742 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
6743 
6744 	switch (a) {
6745 		case 0x500005: {
6746 			//coin write
6747 			return;
6748 		}
6749 
6750 		case 0x500007: {
6751 			//???
6752 			return;
6753 		}
6754 
6755 		case 0x580007: {
6756 			//nop
6757 			return;
6758 		}
6759 
6760 		case 0x600001: {
6761 			TC0140SYTPortWrite(d);
6762 			return;
6763 		}
6764 
6765 		case 0x600003: {
6766 			TC0140SYTCommWrite(d);
6767 			return;
6768 		}
6769 
6770 		default: {
6771 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
6772 		}
6773 	}
6774 }
6775 
Quizhq68KReadWord(UINT32 a)6776 UINT16 __fastcall Quizhq68KReadWord(UINT32 a)
6777 {
6778 	switch (a) {
6779 		case 0x500000: {
6780 			return TaitoDip[1];
6781 		}
6782 
6783 		case 0x500002: {
6784 			return TaitoInput[0];
6785 		}
6786 
6787 		case 0x580000: {
6788 			return TaitoDip[0];
6789 		}
6790 
6791 		case 0x580002: {
6792 			return TaitoInput[1];
6793 		}
6794 
6795 		case 0x580004: {
6796 			return TaitoInput[2];
6797 		}
6798 
6799 		default: {
6800 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
6801 		}
6802 	}
6803 
6804 	return 0;
6805 }
6806 
Quizhq68KWriteWord(UINT32 a,UINT16 d)6807 void __fastcall Quizhq68KWriteWord(UINT32 a, UINT16 d)
6808 {
6809 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
6810 	TC0100SCN0CtrlWordWrite_Map(0x820000)
6811 
6812 	if (a >= 0x810000 && a <= 0x81ffff) return; // NOP
6813 
6814 	switch (a) {
6815 		case 0x200000:
6816 		case 0x200002: {
6817 			TC0110PCRWordWrite(0, (a - 0x200000) >> 1, d);
6818 			return;
6819 		}
6820 
6821 		case 0x680000: {
6822 			//nop
6823 			return;
6824 		}
6825 
6826 		default: {
6827 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
6828 		}
6829 	}
6830 }
6831 
Qzchikyu68KReadByte(UINT32 a)6832 UINT8 __fastcall Qzchikyu68KReadByte(UINT32 a)
6833 {
6834 	TC0510NIOHalfWordRead_Map(0x200000)
6835 
6836 	switch (a) {
6837 		default: {
6838 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
6839 		}
6840 	}
6841 
6842 	return 0;
6843 }
6844 
Qzchikyu68KWriteByte(UINT32 a,UINT8 d)6845 void __fastcall Qzchikyu68KWriteByte(UINT32 a, UINT8 d)
6846 {
6847 	TC0510NIOHalfWordWrite_Map(0x200000)
6848 	TC0100SCN0ByteWrite_Map(0x700000, 0x70ffff)
6849 
6850 	switch (a) {
6851 		case 0x300001: {
6852 			TC0140SYTPortWrite(d);
6853 			return;
6854 		}
6855 
6856 		case 0x300003: {
6857 			TC0140SYTCommWrite(d);
6858 			return;
6859 		}
6860 
6861 		default: {
6862 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
6863 		}
6864 	}
6865 }
6866 
Qzchikyu68KReadWord(UINT32 a)6867 UINT16 __fastcall Qzchikyu68KReadWord(UINT32 a)
6868 {
6869 	switch (a) {
6870 		default: {
6871 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
6872 		}
6873 	}
6874 
6875 	return 0;
6876 }
6877 
Qzchikyu68KWriteWord(UINT32 a,UINT16 d)6878 void __fastcall Qzchikyu68KWriteWord(UINT32 a, UINT16 d)
6879 {
6880 	TC0510NIOHalfWordWrite_Map(0x200000)
6881 	TC0100SCN0WordWrite_Map(0x700000, 0x70ffff)
6882 	TC0100SCN0CtrlWordWrite_Map(0x720000)
6883 
6884 	switch (a) {
6885 		default: {
6886 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
6887 		}
6888 	}
6889 }
6890 
Qzquest68KReadByte(UINT32 a)6891 UINT8 __fastcall Qzquest68KReadByte(UINT32 a)
6892 {
6893 	TC0510NIOHalfWordRead_Map(0x200000)
6894 
6895 	switch (a) {
6896 		default: {
6897 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
6898 		}
6899 	}
6900 
6901 	return 0;
6902 }
6903 
Qzquest68KWriteByte(UINT32 a,UINT8 d)6904 void __fastcall Qzquest68KWriteByte(UINT32 a, UINT8 d)
6905 {
6906 	TC0510NIOHalfWordWrite_Map(0x200000)
6907 	TC0100SCN0ByteWrite_Map(0x700000, 0x70ffff)
6908 
6909 	switch (a) {
6910 		case 0x300001: {
6911 			TC0140SYTPortWrite(d);
6912 			return;
6913 		}
6914 
6915 		case 0x300003: {
6916 			TC0140SYTCommWrite(d);
6917 			return;
6918 		}
6919 
6920 		default: {
6921 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
6922 		}
6923 	}
6924 }
6925 
Qzquest68KReadWord(UINT32 a)6926 UINT16 __fastcall Qzquest68KReadWord(UINT32 a)
6927 {
6928 	switch (a) {
6929 		default: {
6930 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
6931 		}
6932 	}
6933 
6934 	return 0;
6935 }
6936 
Qzquest68KWriteWord(UINT32 a,UINT16 d)6937 void __fastcall Qzquest68KWriteWord(UINT32 a, UINT16 d)
6938 {
6939 	TC0510NIOHalfWordWrite_Map(0x200000)
6940 	TC0100SCN0WordWrite_Map(0x700000, 0x70ffff)
6941 	TC0100SCN0CtrlWordWrite_Map(0x720000)
6942 
6943 	switch (a) {
6944 		default: {
6945 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
6946 		}
6947 	}
6948 }
6949 
Solfigtr68KReadByte(UINT32 a)6950 UINT8 __fastcall Solfigtr68KReadByte(UINT32 a)
6951 {
6952 	switch (a) {
6953 		case 0x300001: {
6954 			return TaitoDip[0];
6955 		}
6956 
6957 		case 0x300003: {
6958 			return TaitoDip[1];
6959 		}
6960 
6961 		case 0x320001: {
6962 			return TaitoInput[0];
6963 		}
6964 
6965 		case 0x320003: {
6966 			return TaitoInput[1];
6967 		}
6968 
6969 		case 0x320005: {
6970 			return TaitoInput[2];
6971 		}
6972 
6973 		case 0x400002: {
6974 			return TC0140SYTCommRead();
6975 		}
6976 
6977 		default: {
6978 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
6979 		}
6980 	}
6981 
6982 	return 0;
6983 }
6984 
Solfigtr68KWriteByte(UINT32 a,UINT8 d)6985 void __fastcall Solfigtr68KWriteByte(UINT32 a, UINT8 d)
6986 {
6987 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
6988 
6989 	switch (a) {
6990 		case 0x300005: {
6991 			//coin write
6992 			return;
6993 		}
6994 
6995 		case 0x400000: {
6996 			TC0140SYTPortWrite(d);
6997 			return;
6998 		}
6999 
7000 		case 0x400002: {
7001 			TC0140SYTCommWrite(d);
7002 			return;
7003 		}
7004 
7005 		case 0x504000: {
7006 			//nop
7007 			return;
7008 		}
7009 
7010 		default: {
7011 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
7012 		}
7013 	}
7014 }
7015 
Solfigtr68KReadWord(UINT32 a)7016 UINT16 __fastcall Solfigtr68KReadWord(UINT32 a)
7017 {
7018 	switch (a) {
7019 		default: {
7020 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
7021 		}
7022 	}
7023 
7024 	return 0;
7025 }
7026 
Solfigtr68KWriteWord(UINT32 a,UINT16 d)7027 void __fastcall Solfigtr68KWriteWord(UINT32 a, UINT16 d)
7028 {
7029 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
7030 	TC0100SCN0CtrlWordWrite_Map(0x820000)
7031 	TC0360PRIHalfWordWrite_Map(0xb00000)
7032 
7033 	switch (a) {
7034 		case 0x300006: {
7035 			//???
7036 			return;
7037 		}
7038 
7039 		case 0x320006: {
7040 			//???
7041 			return;
7042 		}
7043 
7044 		case 0x340000: {
7045 			//watchdog
7046 			return;
7047 		}
7048 
7049 		case 0x500000:
7050 		case 0x500002:
7051 		case 0x500004:
7052 		case 0x500006:
7053 		case 0x500008:
7054 		case 0x50000a:
7055 		case 0x50000c:
7056 		case 0x50000e: {
7057 			TaitoF2SpriteBankWrite((a - 0x500000) >> 1, d);
7058 			return;
7059 		}
7060 
7061 		default: {
7062 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
7063 		}
7064 	}
7065 }
7066 
Ssi68KReadByte(UINT32 a)7067 UINT8 __fastcall Ssi68KReadByte(UINT32 a)
7068 {
7069 	TC0510NIOHalfWordRead_Map(0x100000)
7070 
7071 	switch (a) {
7072 		case 0x400002: {
7073 			return TC0140SYTCommRead();
7074 		}
7075 
7076 		default: {
7077 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
7078 		}
7079 	}
7080 
7081 	return 0;
7082 }
7083 
Ssi68KWriteByte(UINT32 a,UINT8 d)7084 void __fastcall Ssi68KWriteByte(UINT32 a, UINT8 d)
7085 {
7086 	TC0510NIOHalfWordWrite_Map(0x100000)
7087 	TC0100SCN0ByteWrite_Map(0x600000, 0x60ffff)
7088 
7089 	switch (a) {
7090 		case 0x400000: {
7091 			TC0140SYTPortWrite(d);
7092 			return;
7093 		}
7094 
7095 		case 0x400002: {
7096 			TC0140SYTCommWrite(d);
7097 			return;
7098 		}
7099 
7100 		case 0x500000: {
7101 			// nop
7102 			return;
7103 		}
7104 
7105 		default: {
7106 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
7107 		}
7108 	}
7109 }
7110 
Ssi68KReadWord(UINT32 a)7111 UINT16 __fastcall Ssi68KReadWord(UINT32 a)
7112 {
7113 	switch (a) {
7114 		default: {
7115 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
7116 		}
7117 	}
7118 
7119 	return 0;
7120 }
7121 
Ssi68KWriteWord(UINT32 a,UINT16 d)7122 void __fastcall Ssi68KWriteWord(UINT32 a, UINT16 d)
7123 {
7124 	TC0510NIOHalfWordWrite_Map(0x100000)
7125 	TC0100SCN0ByteWrite_Map(0x600000, 0x60ffff)
7126 	TC0100SCN0CtrlWordWrite_Map(0x620000)
7127 
7128 	switch (a) {
7129 		default: {
7130 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
7131 		}
7132 	}
7133 }
7134 
Thundfox68KReadByte(UINT32 a)7135 UINT8 __fastcall Thundfox68KReadByte(UINT32 a)
7136 {
7137 	TC0220IOCHalfWordRead_Map(0x200000)
7138 
7139 	switch (a) {
7140 		default: {
7141 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
7142 		}
7143 	}
7144 
7145 	return 0;
7146 }
7147 
Thundfox68KWriteByte(UINT32 a,UINT8 d)7148 void __fastcall Thundfox68KWriteByte(UINT32 a, UINT8 d)
7149 {
7150 	TC0220IOCHalfWordWrite_Map(0x200000)
7151 	TC0100SCN0ByteWrite_Map(0x400000, 0x40ffff)
7152 	TC0360PRIHalfWordWrite_Map(0x800000)
7153 
7154 	switch (a) {
7155 		case 0x220000: {
7156 			TC0140SYTPortWrite(d);
7157 			return;
7158 		}
7159 
7160 		case 0x220002: {
7161 			TC0140SYTCommWrite(d);
7162 			return;
7163 		}
7164 
7165 		default: {
7166 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
7167 		}
7168 	}
7169 }
7170 
Thundfox68KReadWord(UINT32 a)7171 UINT16 __fastcall Thundfox68KReadWord(UINT32 a)
7172 {
7173 	TC0220IOCHalfWordRead_Map(0x200000)
7174 
7175 	switch (a) {
7176 		default: {
7177 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
7178 		}
7179 	}
7180 
7181 	return 0;
7182 }
7183 
Thundfox68KWriteWord(UINT32 a,UINT16 d)7184 void __fastcall Thundfox68KWriteWord(UINT32 a, UINT16 d)
7185 {
7186 	TC0220IOCHalfWordWrite_Map(0x200000)
7187 	TC0100SCN0WordWrite_Map(0x400000, 0x40ffff)
7188 	TC0100SCN0CtrlWordWrite_Map(0x420000)
7189 	TC0100SCN1WordWrite_Map(0x500000, 0x50ffff)
7190 	TC0100SCN1CtrlWordWrite_Map(0x520000)
7191 
7192 	switch (a) {
7193 		default: {
7194 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
7195 		}
7196 	}
7197 }
7198 
Yesnoj68KReadByte(UINT32 a)7199 UINT8 __fastcall Yesnoj68KReadByte(UINT32 a)
7200 {
7201 	if (a >= 0x700000 && a <= 0x70001f) return 0;
7202 
7203 	switch (a) {
7204 		case 0x800002: {
7205 			return TC0140SYTCommRead();
7206 		}
7207 
7208 		case 0xa00001: {
7209 			return TaitoInput[0];
7210 		}
7211 
7212 		default: {
7213 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
7214 		}
7215 	}
7216 
7217 	return 0;
7218 }
7219 
Yesnoj68KWriteByte(UINT32 a,UINT8 d)7220 void __fastcall Yesnoj68KWriteByte(UINT32 a, UINT8 d)
7221 {
7222 	TC0100SCN0ByteWrite_Map(0x500000, 0x50ffff)
7223 
7224 	switch (a) {
7225 		case 0x700015:
7226 		case 0x70001b:
7227 		case 0x70001d:
7228 		case 0x70001f: {
7229 			//???
7230 			return;
7231 		}
7232 
7233 		case 0x800000: {
7234 			TC0140SYTPortWrite(d);
7235 			return;
7236 		}
7237 
7238 		case 0x800002: {
7239 			TC0140SYTCommWrite(d);
7240 			return;
7241 		}
7242 
7243 		case 0x900003: {
7244 			//nop
7245 			return;
7246 		}
7247 
7248 		default: {
7249 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
7250 		}
7251 	}
7252 }
7253 
Yesnoj68KReadWord(UINT32 a)7254 UINT16 __fastcall Yesnoj68KReadWord(UINT32 a)
7255 {
7256 	switch (a) {
7257 		case 0xa00004: {
7258 			return TaitoInput[1];
7259 		}
7260 
7261 		case 0xb00000: {
7262 			YesnoDip = 1 - YesnoDip;
7263 
7264 			if (YesnoDip) {
7265 				return TaitoDip[0];
7266 			} else {
7267 				return TaitoDip[1];
7268 			}
7269 		}
7270 
7271 		default: {
7272 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
7273 		}
7274 	}
7275 
7276 	return 0;
7277 }
7278 
Yesnoj68KWriteWord(UINT32 a,UINT16 d)7279 void __fastcall Yesnoj68KWriteWord(UINT32 a, UINT16 d)
7280 {
7281 	TC0100SCN0WordWrite_Map(0x500000, 0x50ffff)
7282 	TC0100SCN0CtrlWordWrite_Map(0x520000)
7283 
7284 	switch (a) {
7285 		case 0x900002:
7286 		case 0x900006:
7287 		case 0xa00006:
7288 		case 0xc00000:
7289 		case 0xd00000: {
7290 			//nop
7291 			return;
7292 		}
7293 		default: {
7294 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
7295 		}
7296 	}
7297 }
7298 
Yuyugogo68KReadByte(UINT32 a)7299 UINT8 __fastcall Yuyugogo68KReadByte(UINT32 a)
7300 {
7301 	TC0510NIOHalfWordRead_Map(0x200000)
7302 
7303 	switch (a) {
7304 		case 0x400002: {
7305 			return TC0140SYTCommRead();
7306 		}
7307 
7308 		default: {
7309 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
7310 		}
7311 	}
7312 
7313 	return 0;
7314 }
7315 
Yuyugogo68KWriteByte(UINT32 a,UINT8 d)7316 void __fastcall Yuyugogo68KWriteByte(UINT32 a, UINT8 d)
7317 {
7318 	TC0510NIOHalfWordWrite_Map(0x200000)
7319 	TC0100SCN0ByteWrite_Map(0x800000, 0x80ffff)
7320 
7321 	switch (a) {
7322 		case 0x400000: {
7323 			TC0140SYTPortWrite(d);
7324 			return;
7325 		}
7326 
7327 		case 0x400002: {
7328 			TC0140SYTCommWrite(d);
7329 			return;
7330 		}
7331 
7332 		default: {
7333 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
7334 		}
7335 	}
7336 }
7337 
Yuyugogo68KReadWord(UINT32 a)7338 UINT16 __fastcall Yuyugogo68KReadWord(UINT32 a)
7339 {
7340 	switch (a) {
7341 		default: {
7342 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
7343 		}
7344 	}
7345 
7346 	return 0;
7347 }
7348 
Yuyugogo68KWriteWord(UINT32 a,UINT16 d)7349 void __fastcall Yuyugogo68KWriteWord(UINT32 a, UINT16 d)
7350 {
7351 	TC0510NIOHalfWordWrite_Map(0x200000)
7352 	TC0100SCN0WordWrite_Map(0x800000, 0x80ffff)
7353 	TC0100SCN0CtrlWordWrite_Map(0x820000)
7354 
7355 	switch (a) {
7356 		default: {
7357 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
7358 		}
7359 	}
7360 }
7361 
z80_bank(INT32 bank)7362 static void z80_bank(INT32 bank)
7363 {
7364 	TaitoZ80Bank = bank;
7365 
7366 	ZetMapMemory(TaitoZ80Rom1 + 0x4000 + (TaitoZ80Bank * 0x4000), 0x4000, 0x7fff, MAP_ROM);
7367 }
7368 
TaitoF2Z80Read(UINT16 a)7369 UINT8 __fastcall TaitoF2Z80Read(UINT16 a)
7370 {
7371 	switch (a) {
7372 		case 0xe000: {
7373 			return BurnYM2610Read(0);
7374 		}
7375 
7376 		case 0xe002: {
7377 			return BurnYM2610Read(2);
7378 		}
7379 
7380 		case 0xe200: {
7381 			// NOP
7382 			return 0;
7383 		}
7384 
7385 		case 0xe201: {
7386 			return TC0140SYTSlaveCommRead();
7387 		}
7388 
7389 		case 0xea00: {
7390 			// NOP
7391 			return 0;
7392 		}
7393 
7394 		default: {
7395 			bprintf(PRINT_NORMAL, _T("Z80 Read => %04X\n"), a);
7396 		}
7397 	}
7398 
7399 	return 0;
7400 }
7401 
TaitoF2Z80Write(UINT16 a,UINT8 d)7402 void __fastcall TaitoF2Z80Write(UINT16 a, UINT8 d)
7403 {
7404 	switch (a) {
7405 		case 0xe000: {
7406 			BurnYM2610Write(0, d);
7407 			return;
7408 		}
7409 
7410 		case 0xe001: {
7411 			BurnYM2610Write(1, d);
7412 			return;
7413 		}
7414 
7415 		case 0xe002: {
7416 			BurnYM2610Write(2, d);
7417 			return;
7418 		}
7419 
7420 		case 0xe003: {
7421 			BurnYM2610Write(3, d);
7422 			return;
7423 		}
7424 
7425 		case 0xe200: {
7426 			TC0140SYTSlavePortWrite(d);
7427 			return;
7428 		}
7429 
7430 		case 0xe201: {
7431 			TC0140SYTSlaveCommWrite(d);
7432 			return;
7433 		}
7434 
7435 		case 0xe400:
7436 		case 0xe401:
7437 		case 0xe402:
7438 		case 0xe403: {
7439 			return;
7440 		}
7441 
7442 		case 0xe600: {
7443 			return;
7444 		}
7445 
7446 		case 0xee00: {
7447 			return;
7448 		}
7449 
7450 		case 0xf000: {
7451 			return;
7452 		}
7453 
7454 		case 0xf200: {
7455 			z80_bank((d - 1) & 7);
7456 			return;
7457 		}
7458 
7459 		default: {
7460 			bprintf(PRINT_NORMAL, _T("Z80 Write => %04X, %02X\n"), a, d);
7461 		}
7462 	}
7463 }
7464 
CamltryaZ80Read(UINT16 a)7465 UINT8 __fastcall CamltryaZ80Read(UINT16 a)
7466 {
7467 	switch (a) {
7468 		case 0x9000: {
7469 			return BurnYM2203Read(0, 0);
7470 		}
7471 
7472 		case 0xa001: {
7473 			return TC0140SYTSlaveCommRead();
7474 		}
7475 
7476 		case 0xb000: {
7477 			return MSM6295Read(0);
7478 		}
7479 
7480 		default: {
7481 			bprintf(PRINT_NORMAL, _T("Z80 Read => %04X\n"), a);
7482 		}
7483 	}
7484 
7485 	return 0;
7486 }
7487 
CamltryaZ80Write(UINT16 a,UINT8 d)7488 void __fastcall CamltryaZ80Write(UINT16 a, UINT8 d)
7489 {
7490 	switch (a) {
7491 		case 0x9000: {
7492 			BurnYM2203Write(0, 0, d);
7493 			return;
7494 		}
7495 
7496 		case 0x9001: {
7497 			BurnYM2203Write(0, 1, d);
7498 			return;
7499 		}
7500 
7501 		case 0xa000: {
7502 			TC0140SYTSlavePortWrite(d);
7503 			return;
7504 		}
7505 
7506 		case 0xa001: {
7507 			TC0140SYTSlaveCommWrite(d);
7508 			return;
7509 		}
7510 
7511 		case 0xb000:
7512 		case 0xb001: {
7513 			MSM6295Write(0, d);
7514 			return;
7515 		}
7516 
7517 		default: {
7518 			bprintf(PRINT_NORMAL, _T("Z80 Write => %04X, %02X\n"), a, d);
7519 		}
7520 	}
7521 }
7522 
DriveoutZ80Read(UINT16 a)7523 UINT8 __fastcall DriveoutZ80Read(UINT16 a)
7524 {
7525 	switch (a) {
7526 		case 0x9800: {
7527 			return MSM6295Read(0);
7528 		}
7529 
7530 		case 0xa000: {
7531 			return TaitoSoundLatch;
7532 		}
7533 
7534 		default: {
7535 			bprintf(PRINT_NORMAL, _T("Z80 Read => %04X\n"), a);
7536 		}
7537 	}
7538 
7539 	return 0;
7540 }
7541 
DriveoutMSM6295Bank(INT32 bank)7542 static void DriveoutMSM6295Bank(INT32 bank)
7543 {
7544 	DriveoutOkiBank = bank;
7545 
7546 	MSM6295SetBank(0, TaitoMSM6295Rom + ((DriveoutOkiBank & 3) * 0x20000), 0x00000, 0x1ffff);
7547 	MSM6295SetBank(0, TaitoMSM6295Rom + 0x80000, 0x20000, 0x3ffff);
7548 }
7549 
DriveoutZ80Write(UINT16 a,UINT8 d)7550 void __fastcall DriveoutZ80Write(UINT16 a, UINT8 d)
7551 {
7552 	switch (a) {
7553 		case 0x9000: {
7554 			if (d & 4) {
7555 				DriveoutMSM6295Bank(d);
7556 			}
7557 			return;
7558 		}
7559 
7560 		case 0x9800: {
7561 			MSM6295Write(0, d);
7562 			return;
7563 		}
7564 
7565 		default: {
7566 			bprintf(PRINT_NORMAL, _T("Z80 Write => %04X, %02X\n"), a, d);
7567 		}
7568 	}
7569 }
7570 
7571 static INT32 CharPlaneOffsets[4]          = { 0, 1, 2, 3 };
7572 static INT32 CharXOffsets[8]              = { 8, 12, 0, 4, 24, 28, 16, 20 };
7573 static INT32 CharYOffsets[8]              = { 0, 32, 64, 96, 128, 160, 192, 224 };
7574 static INT32 PivotPlaneOffsets[4]         = { 0, 1, 2, 3 };
7575 static INT32 PivotXOffsets[8]             = { 0, 4, 8, 12, 16, 20, 24, 28 };
7576 static INT32 PivotYOffsets[8]             = { 0, 32, 64, 96, 128, 160, 192, 224 };
7577 static INT32 YuyugogoCharPlaneOffsets[1]  = { 0 };
7578 static INT32 YuyugogoCharXOffsets[8]      = { 0, 1, 2, 3, 4, 5, 6, 7 };
7579 static INT32 YuyugogoCharYOffsets[8]      = { 0, 8, 16, 24, 32, 40, 48, 56 };
7580 static INT32 TC0480SCPCharPlaneOffsets[4] = { 0, 1, 2, 3 };
7581 static INT32 TC0480SCPCharXOffsets[16]    = { 4, 0, 20, 16, 12, 8, 28, 24, 36, 32, 52, 48, 44, 40, 60, 56 };
7582 static INT32 TC0480SCPCharYOffsets[16]    = { 0, 64, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960 };
7583 static INT32 SpritePlaneOffsets[4]        = { 0, 1, 2, 3 };
7584 static INT32 SpriteXOffsets[16]           = { 4, 0, 12, 8, 20, 16, 28, 24, 36, 32, 44, 40, 52, 48, 60, 56 };
7585 static INT32 SpriteYOffsets[16]           = { 0, 64, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960 };
7586 static INT32 FinalbSpritePlaneOffsets[6]  = { 0x800000, 0x800001, 0, 1, 2, 3 };
7587 static INT32 FinalbSpriteXOffsets[16]     = { 12, 8, 4, 0, 28, 24, 20, 16, 44, 40, 36, 32, 60, 56, 52, 48 };
7588 static INT32 FinalbSpriteYOffsets[16]     = { 0, 64, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960 };
7589 
TaitoF2FMIRQHandler(INT32,INT32 nStatus)7590 static void TaitoF2FMIRQHandler(INT32, INT32 nStatus)
7591 {
7592 	ZetSetIRQLine(0, (nStatus) ? CPU_IRQSTATUS_ACK : CPU_IRQSTATUS_NONE);
7593 }
7594 
TaitoF2SoundInit()7595 static void TaitoF2SoundInit()
7596 {
7597 	// Setup the Z80 emulation
7598 	ZetInit(0);
7599 	ZetOpen(0);
7600 	ZetSetReadHandler(TaitoF2Z80Read);
7601 	ZetSetWriteHandler(TaitoF2Z80Write);
7602 	ZetMapArea(0x0000, 0x3fff, 0, TaitoZ80Rom1                 );
7603 	ZetMapArea(0x0000, 0x3fff, 2, TaitoZ80Rom1                 );
7604 	ZetMapArea(0x4000, 0x7fff, 0, TaitoZ80Rom1 + 0x4000        );
7605 	ZetMapArea(0x4000, 0x7fff, 2, TaitoZ80Rom1 + 0x4000        );
7606 	ZetMapArea(0xc000, 0xdfff, 0, TaitoZ80Ram1                 );
7607 	ZetMapArea(0xc000, 0xdfff, 1, TaitoZ80Ram1                 );
7608 	ZetMapArea(0xc000, 0xdfff, 2, TaitoZ80Ram1                 );
7609 	ZetClose();
7610 
7611 	BurnYM2610Init(24000000 / 3, TaitoYM2610ARom, (INT32*)&TaitoYM2610ARomSize, TaitoYM2610BRom, (INT32*)&TaitoYM2610BRomSize, &TaitoF2FMIRQHandler, 0);
7612 	BurnTimerAttachZet(24000000 / 6);
7613 	BurnYM2610SetRoute(BURN_SND_YM2610_YM2610_ROUTE_1, 1.00, BURN_SND_ROUTE_LEFT);
7614 	BurnYM2610SetRoute(BURN_SND_YM2610_YM2610_ROUTE_2, 1.00, BURN_SND_ROUTE_RIGHT);
7615 	BurnYM2610SetRoute(BURN_SND_YM2610_AY8910_ROUTE, 0.25, BURN_SND_ROUTE_BOTH);
7616 }
7617 
7618 #ifdef BUILD_A68K
SwitchToMusashi()7619 static void SwitchToMusashi()
7620 {
7621 	if (bBurnUseASMCPUEmulation) {
7622 #if 1 && defined FBNEO_DEBUG
7623 		bprintf(PRINT_NORMAL, _T("Switching to Musashi 68000 core\n"));
7624 #endif
7625 		bUseAsm68KCoreOldValue = bBurnUseASMCPUEmulation;
7626 		bBurnUseASMCPUEmulation = false;
7627 	}
7628 }
7629 #endif
7630 
TaitoF2Init()7631 static void TaitoF2Init()
7632 {
7633 	GenericTilesInit();
7634 
7635 	TaitoCharModulo = 0x100;
7636 	TaitoCharNumPlanes = 4;
7637 	TaitoCharWidth = 8;
7638 	TaitoCharHeight = 8;
7639 	TaitoCharPlaneOffsets = CharPlaneOffsets;
7640 	TaitoCharXOffsets = CharXOffsets;
7641 	TaitoCharYOffsets = CharYOffsets;
7642 	TaitoNumChar = 0;
7643 
7644 	TaitoSpriteAModulo = 0x400;
7645 	TaitoSpriteANumPlanes = 4;
7646 	TaitoSpriteAWidth = 16;
7647 	TaitoSpriteAHeight = 16;
7648 	TaitoSpriteAPlaneOffsets = SpritePlaneOffsets;
7649 	TaitoSpriteAXOffsets = SpriteXOffsets;
7650 	TaitoSpriteAYOffsets = SpriteYOffsets;
7651 	TaitoNumSpriteA = 0;
7652 
7653 	TaitoNum68Ks = 1;
7654 	TaitoNumZ80s = 1;
7655 	TaitoNumYM2610 = 1;
7656 
7657 	TaitoF2SpritesDisabled = 1;
7658 	TaitoF2SpritesActiveArea = 0;
7659 	TaitoXOffset = 0;
7660 	TaitoF2SpriteType = 0;
7661 
7662 	TaitoF2SpriteBufferFunction = TaitoF2NoBuffer;
7663 
7664 	PaletteType = TAITOF2Palette; // 0 taito, 1 metalb, 2 qzquest
7665 	SpritePriWritebackMode = 1; // default to no priority writeback for sprite blender
7666 
7667 	for (INT32 i = 0; i < 8; i++) {
7668 		TaitoF2SpriteBankBuffered[i] = 0x400 * i;
7669 		TaitoF2SpriteBank[i] = TaitoF2SpriteBankBuffered[i];
7670 	}
7671 
7672 	nTaitoCyclesTotal[0] = (24000000 / 2) / 60;
7673 	nTaitoCyclesTotal[1] = (24000000 / 6) / 60;
7674 }
7675 
CameltryInit()7676 static INT32 CameltryInit()
7677 {
7678 	INT32 nLen;
7679 
7680 	TaitoF2Init();
7681 
7682 	TaitoCharPivotModulo = 0x100;
7683 	TaitoCharPivotNumPlanes = 4;
7684 	TaitoCharPivotWidth = 8;
7685 	TaitoCharPivotHeight = 8;
7686 	TaitoCharPivotPlaneOffsets = PivotPlaneOffsets;
7687 	TaitoCharPivotXOffsets = PivotXOffsets;
7688 	TaitoCharPivotYOffsets = PivotYOffsets;
7689 	TaitoNumCharPivot = 0x1000;
7690 
7691 	TaitoNumSpriteA = 0x1000;
7692 
7693 	TaitoLoadRoms(0);
7694 
7695 	// Allocate and Blank all required memory
7696 	TaitoMem = NULL;
7697 	MemIndex();
7698 	nLen = TaitoMemEnd - (UINT8 *)0;
7699 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
7700 	memset(TaitoMem, 0, nLen);
7701 	MemIndex();
7702 
7703 	if (TaitoLoadRoms(1)) return 1;
7704 
7705 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
7706 	TC0140SYTInit(0);
7707 	TC0220IOCInit();
7708 	TC0280GRDInit(-16, -16, TaitoCharsPivot);
7709 	TC0280GRDSetPriMap(TaitoPriorityMap);
7710 	TC0360PRIInit();
7711 
7712 #ifdef BUILD_A68K
7713 	SwitchToMusashi();
7714 #endif
7715 
7716 	// Setup the 68000 emulation
7717 	SekInit(0, 0x68000);
7718 	SekOpen(0);
7719 	SekMapMemory(Taito68KRom1             , 0x000000, 0x03ffff, MAP_ROM);
7720 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
7721 	SekMapMemory(TaitoPaletteRam          , 0x200000, 0x201fff, MAP_RAM);
7722 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x813fff, MAP_READ);
7723 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
7724 	SekMapMemory(TC0280GRDRam             , 0xa00000, 0xa01fff, MAP_RAM);
7725 	SekSetReadByteHandler(0, Cameltry68KReadByte);
7726 	SekSetWriteByteHandler(0, Cameltry68KWriteByte);
7727 	SekSetReadWordHandler(0, Cameltry68KReadWord);
7728 	SekSetWriteWordHandler(0, Cameltry68KWriteWord);
7729 	SekClose();
7730 
7731 	TaitoF2SoundInit();
7732 
7733 	TaitoXOffset = 3;
7734 
7735 	SpritePriWritebackMode = 0;
7736 	bNoClearOpposites = 1;
7737 
7738 	// Reset the driver
7739 	TaitoF2DoReset();
7740 
7741 	return 0;
7742 }
7743 
CamltryaInit()7744 static INT32 CamltryaInit()
7745 {
7746 	INT32 nLen;
7747 
7748 	TaitoF2Init();
7749 
7750 	TaitoNumYM2610 = 0;
7751 	TaitoNumYM2203 = 1;
7752 	TaitoNumMSM6295 = 1;
7753 
7754 	TaitoCharPivotModulo = 0x100;
7755 	TaitoCharPivotNumPlanes = 4;
7756 	TaitoCharPivotWidth = 8;
7757 	TaitoCharPivotHeight = 8;
7758 	TaitoCharPivotPlaneOffsets = PivotPlaneOffsets;
7759 	TaitoCharPivotXOffsets = PivotXOffsets;
7760 	TaitoCharPivotYOffsets = PivotYOffsets;
7761 	TaitoNumCharPivot = 0x1000;
7762 
7763 	TaitoNumSpriteA = 0x1000;
7764 
7765 	TaitoLoadRoms(0);
7766 
7767 	// Allocate and Blank all required memory
7768 	TaitoMem = NULL;
7769 	MemIndex();
7770 	nLen = TaitoMemEnd - (UINT8 *)0;
7771 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
7772 	memset(TaitoMem, 0, nLen);
7773 	MemIndex();
7774 
7775 	if (TaitoLoadRoms(1)) return 1;
7776 
7777 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
7778 	TC0140SYTInit(0);
7779 	TC0220IOCInit();
7780 	TC0280GRDInit(-16, -16, TaitoCharsPivot);
7781 	TC0280GRDSetPriMap(TaitoPriorityMap);
7782 	TC0360PRIInit();
7783 
7784 #ifdef BUILD_A68K
7785 	SwitchToMusashi();
7786 #endif
7787 
7788 	// Setup the 68000 emulation
7789 	SekInit(0, 0x68000);
7790 	SekOpen(0);
7791 	SekMapMemory(Taito68KRom1             , 0x000000, 0x03ffff, MAP_ROM);
7792 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
7793 	SekMapMemory(TaitoPaletteRam          , 0x200000, 0x201fff, MAP_RAM);
7794 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x813fff, MAP_READ);
7795 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
7796 	SekMapMemory(TC0280GRDRam             , 0xa00000, 0xa01fff, MAP_RAM);
7797 	SekSetReadByteHandler(0, Cameltry68KReadByte);
7798 	SekSetWriteByteHandler(0, Cameltry68KWriteByte);
7799 	SekSetReadWordHandler(0, Cameltry68KReadWord);
7800 	SekSetWriteWordHandler(0, Cameltry68KWriteWord);
7801 	SekClose();
7802 
7803 	// Setup the Z80 emulation
7804 	ZetInit(0);
7805 	ZetOpen(0);
7806 	ZetSetReadHandler(CamltryaZ80Read);
7807 	ZetSetWriteHandler(CamltryaZ80Write);
7808 	ZetMapArea(0x0000, 0x7fff, 0, TaitoZ80Rom1                 );
7809 	ZetMapArea(0x0000, 0x7fff, 2, TaitoZ80Rom1                 );
7810 	ZetMapArea(0x8000, 0x8fff, 0, TaitoZ80Ram1                 );
7811 	ZetMapArea(0x8000, 0x8fff, 1, TaitoZ80Ram1                 );
7812 	ZetMapArea(0x8000, 0x8fff, 2, TaitoZ80Ram1                 );
7813 	ZetClose();
7814 
7815 	BurnYM2203Init(1, 24000000 / 8, &TaitoF2FMIRQHandler, 0);
7816 	BurnTimerAttachZet(24000000 / 4);
7817 	BurnYM2203SetRoute(0, BURN_SND_YM2203_YM2203_ROUTE, 0.60, BURN_SND_ROUTE_BOTH);
7818 	BurnYM2203SetRoute(0, BURN_SND_YM2203_AY8910_ROUTE_1, 0.20, BURN_SND_ROUTE_BOTH);
7819 	BurnYM2203SetRoute(0, BURN_SND_YM2203_AY8910_ROUTE_2, 0.20, BURN_SND_ROUTE_BOTH);
7820 	BurnYM2203SetRoute(0, BURN_SND_YM2203_AY8910_ROUTE_3, 0.20, BURN_SND_ROUTE_BOTH);
7821 
7822 	MSM6295Init(0, (4224000 / 4) / 132, 1);
7823 	MSM6295SetRoute(0, 0.10, BURN_SND_ROUTE_BOTH);
7824 	MSM6295SetBank(0, TaitoMSM6295Rom, 0x00000, 0x3ffff);
7825 
7826 	nTaitoCyclesTotal[1] = (24000000 / 4) / 60;
7827 
7828 	TaitoXOffset = 3;
7829 	SpritePriWritebackMode = 0;
7830 	bNoClearOpposites = 1;
7831 
7832 	// Reset the driver
7833 	TaitoF2DoReset();
7834 
7835 	return 0;
7836 }
7837 
DeadconxInit()7838 static INT32 DeadconxInit()
7839 {
7840 	INT32 nLen;
7841 
7842 	TaitoF2Init();
7843 
7844 	TaitoCharModulo = 0x400;
7845 	TaitoCharNumPlanes = 4;
7846 	TaitoCharWidth = 16;
7847 	TaitoCharHeight = 16;
7848 	TaitoCharPlaneOffsets = TC0480SCPCharPlaneOffsets;
7849 	TaitoCharXOffsets = TC0480SCPCharXOffsets;
7850 	TaitoCharYOffsets = TC0480SCPCharYOffsets;
7851 	TaitoNumChar = 0x2000;
7852 
7853 	TaitoSpriteAModulo = 0x400;
7854 	TaitoSpriteANumPlanes = 4;
7855 	TaitoSpriteAWidth = 16;
7856 	TaitoSpriteAHeight = 16;
7857 	TaitoSpriteAPlaneOffsets = SpritePlaneOffsets;
7858 	TaitoSpriteAXOffsets = SpriteXOffsets;
7859 	TaitoSpriteAYOffsets = SpriteYOffsets;
7860 	TaitoNumSpriteA = 0x4000;
7861 
7862 	TaitoLoadRoms(0);
7863 
7864 	// Allocate and Blank all required memory
7865 	TaitoMem = NULL;
7866 	MemIndex();
7867 	nLen = TaitoMemEnd - (UINT8 *)0;
7868 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
7869 	memset(TaitoMem, 0, nLen);
7870 	MemIndex();
7871 
7872 	if (TaitoLoadRoms(1)) return 1;
7873 
7874 	if (!strcmp(BurnDrvGetTextA(DRV_NAME), "deadconxj")) {
7875 		TC0480SCPInit(TaitoNumChar, 3, 0x34, -5, -1, 0, 26);
7876 	} else {
7877 		TC0480SCPInit(TaitoNumChar, 3, 0x1e, 8, -1, 0, 0);
7878 	}
7879 	TC0480SCPSetPriMap(TaitoPriorityMap);
7880 
7881 	TC0140SYTInit(0);
7882 	TC0360PRIInit();
7883 
7884 #ifdef BUILD_A68K
7885 	SwitchToMusashi();
7886 #endif
7887 
7888 	// Setup the 68000 emulation
7889 	SekInit(0, 0x68000);
7890 	SekOpen(0);
7891 	SekMapMemory(Taito68KRom1             , 0x000000, 0x0fffff, MAP_ROM);
7892 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
7893 	SekMapMemory(TaitoSpriteRam           , 0x200000, 0x20ffff, MAP_RAM);
7894 	SekMapMemory(TC0480SCPRam             , 0x400000, 0x40ffff, MAP_RAM);
7895 	SekMapMemory(TaitoPaletteRam          , 0x600000, 0x601fff, MAP_RAM);
7896 	SekSetReadByteHandler(0, Deadconx68KReadByte);
7897 	SekSetWriteByteHandler(0, Deadconx68KWriteByte);
7898 	SekSetReadWordHandler(0, Deadconx68KReadWord);
7899 	SekSetWriteWordHandler(0, Deadconx68KWriteWord);
7900 	SekClose();
7901 
7902 	TaitoF2SoundInit();
7903 
7904 	TaitoXOffset = 3;
7905 
7906 	// Reset the driver
7907 	TaitoF2DoReset();
7908 
7909 	return 0;
7910 }
7911 
DinorexInit()7912 static INT32 DinorexInit()
7913 {
7914 	INT32 nLen;
7915 
7916 	TaitoF2Init();
7917 
7918 	TaitoNumChar = 0x8000;
7919 	TaitoNumSpriteA = 0xc000;
7920 
7921 	TaitoLoadRoms(0);
7922 
7923 	// Allocate and Blank all required memory
7924 	TaitoMem = NULL;
7925 	MemIndex();
7926 	nLen = TaitoMemEnd - (UINT8 *)0;
7927 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
7928 	memset(TaitoMem, 0, nLen);
7929 	MemIndex();
7930 
7931 	if (TaitoLoadRoms(1)) return 1;
7932 
7933 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
7934 	TC0140SYTInit(0);
7935 	TC0360PRIInit();
7936 	TC0510NIOInit();
7937 
7938 #ifdef BUILD_A68K
7939 	SwitchToMusashi();
7940 #endif
7941 
7942 	// Setup the 68000 emulation
7943 	SekInit(0, 0x68000);
7944 	SekOpen(0);
7945 	SekMapMemory(Taito68KRom1             , 0x000000, 0x2fffff, MAP_ROM);
7946 	SekMapMemory(TaitoSpriteExtension     , 0x400000, 0x400fff, MAP_RAM);
7947 	SekMapMemory(TaitoPaletteRam          , 0x500000, 0x501fff, MAP_RAM);
7948 	SekMapMemory(Taito68KRam1             , 0x600000, 0x60ffff, MAP_RAM);
7949 	SekMapMemory(TaitoSpriteRam           , 0x800000, 0x80ffff, MAP_RAM);
7950 	SekMapMemory(TC0100SCNRam[0]          , 0x900000, 0x90ffff, MAP_READ);
7951 	SekSetReadByteHandler(0, Dinorex68KReadByte);
7952 	SekSetWriteByteHandler(0, Dinorex68KWriteByte);
7953 	SekSetReadWordHandler(0, Dinorex68KReadWord);
7954 	SekSetWriteWordHandler(0, Dinorex68KWriteWord);
7955 	SekClose();
7956 
7957 	TaitoF2SoundInit();
7958 
7959 	TaitoXOffset = 3;
7960 	TaitoF2SpriteType = 3;
7961 
7962 	SpritePriWritebackMode = 0;
7963 
7964 	// Reset the driver
7965 	TaitoF2DoReset();
7966 
7967 	return 0;
7968 }
7969 
DondokodInit()7970 static INT32 DondokodInit()
7971 {
7972 	INT32 nLen;
7973 
7974 	TaitoF2Init();
7975 
7976 	TaitoCharPivotModulo = 0x100;
7977 	TaitoCharPivotNumPlanes = 4;
7978 	TaitoCharPivotWidth = 8;
7979 	TaitoCharPivotHeight = 8;
7980 	TaitoCharPivotPlaneOffsets = PivotPlaneOffsets;
7981 	TaitoCharPivotXOffsets = PivotXOffsets;
7982 	TaitoCharPivotYOffsets = PivotYOffsets;
7983 	TaitoNumCharPivot = 0x4000;
7984 
7985 	TaitoNumChar = 0x4000;
7986 	TaitoNumSpriteA = 0x1000;
7987 
7988 	TaitoLoadRoms(0);
7989 
7990 	// Allocate and Blank all required memory
7991 	TaitoMem = NULL;
7992 	MemIndex();
7993 	nLen = TaitoMemEnd - (UINT8 *)0;
7994 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
7995 	memset(TaitoMem, 0, nLen);
7996 	MemIndex();
7997 
7998 	if (TaitoLoadRoms(1)) return 1;
7999 
8000 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
8001 	TC0140SYTInit(0);
8002 	TC0220IOCInit();
8003 	TC0280GRDInit(-16, -16, TaitoCharsPivot);
8004 	TC0280GRDSetPriMap(TaitoPriorityMap);
8005 	TC0360PRIInit();
8006 
8007 #ifdef BUILD_A68K
8008 	SwitchToMusashi();
8009 #endif
8010 
8011 	// Setup the 68000 emulation
8012 	SekInit(0, 0x68000);
8013 	SekOpen(0);
8014 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
8015 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
8016 	SekMapMemory(TaitoPaletteRam          , 0x200000, 0x201fff, MAP_RAM);
8017 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
8018 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
8019 	SekMapMemory(TC0280GRDRam             , 0xa00000, 0xa01fff, MAP_RAM);
8020 	SekSetReadByteHandler(0, Dondokod68KReadByte);
8021 	SekSetWriteByteHandler(0, Dondokod68KWriteByte);
8022 	SekSetReadWordHandler(0, Dondokod68KReadWord);
8023 	SekSetWriteWordHandler(0, Dondokod68KWriteWord);
8024 	SekClose();
8025 
8026 	TaitoF2SoundInit();
8027 
8028 	TaitoXOffset = 3;
8029 	TaitoF2SpriteBufferFunction = TaitoF2PartialBufferDelayed;
8030 	PaletteType = TAITOF2Palette;
8031 
8032 	SpritePriWritebackMode = 0;
8033 
8034 	// Reset the driver
8035 	TaitoF2DoReset();
8036 
8037 	return 0;
8038 }
8039 
DriftoutInit()8040 static INT32 DriftoutInit()
8041 {
8042 	INT32 nLen;
8043 
8044 	TaitoF2Init();
8045 
8046 	TaitoCharPivotModulo = 0x100;
8047 	TaitoCharPivotNumPlanes = 4;
8048 	TaitoCharPivotWidth = 8;
8049 	TaitoCharPivotHeight = 8;
8050 	TaitoCharPivotPlaneOffsets = PivotPlaneOffsets;
8051 	TaitoCharPivotXOffsets = PivotXOffsets;
8052 	TaitoCharPivotYOffsets = PivotYOffsets;
8053 	TaitoNumCharPivot = 0x4000;
8054 	TaitoNumSpriteA = 0x1000;
8055 
8056 	TaitoLoadRoms(0);
8057 
8058 	// Allocate and Blank all required memory
8059 	TaitoMem = NULL;
8060 	MemIndex();
8061 	nLen = TaitoMemEnd - (UINT8 *)0;
8062 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8063 	memset(TaitoMem, 0, nLen);
8064 	MemIndex();
8065 
8066 	if (TaitoLoadRoms(1)) return 1;
8067 
8068 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, NULL);
8069 	TC0140SYTInit(0);
8070 	TC0360PRIInit();
8071 	TC0430GRWInit(-16, 0, TaitoCharsPivot);
8072 	TC0510NIOInit();
8073 
8074 #ifdef BUILD_A68K
8075 	SwitchToMusashi();
8076 #endif
8077 
8078 	// Setup the 68000 emulation
8079 	SekInit(0, 0x68000);
8080 	SekOpen(0);
8081 	SekMapMemory(Taito68KRom1             , 0x000000, 0x0fffff, MAP_ROM);
8082 	SekMapMemory(Taito68KRam1             , 0x300000, 0x30ffff, MAP_RAM);
8083 	SekMapMemory(TC0430GRWRam             , 0x400000, 0x401fff, MAP_RAM);
8084 	SekMapMemory(TaitoPaletteRam          , 0x700000, 0x701fff, MAP_RAM);
8085 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
8086 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
8087 	SekSetReadByteHandler(0, Driftout68KReadByte);
8088 	SekSetWriteByteHandler(0, Driftout68KWriteByte);
8089 	SekSetReadWordHandler(0, Driftout68KReadWord);
8090 	SekSetWriteWordHandler(0, Driftout68KWriteWord);
8091 	SekClose();
8092 
8093 	TaitoF2SoundInit();
8094 
8095 	TaitoXOffset = 3;
8096 
8097 	PaletteType = QZQUESTPalette;
8098 
8099 	SpritePriWritebackMode = 0;
8100 
8101 	Driftout = 1;
8102 
8103 	// Reset the driver
8104 	TaitoF2DoReset();
8105 
8106 	return 0;
8107 }
8108 
DriveoutInit()8109 static INT32 DriveoutInit()
8110 {
8111 	INT32 nLen;
8112 
8113 	TaitoF2Init();
8114 
8115 	TaitoNumYM2610 = 0;
8116 	TaitoNumMSM6295 = 1;
8117 
8118 	TaitoCharPivotModulo = 0x100;
8119 	TaitoCharPivotNumPlanes = 4;
8120 	TaitoCharPivotWidth = 8;
8121 	TaitoCharPivotHeight = 8;
8122 	TaitoCharPivotPlaneOffsets = PivotPlaneOffsets;
8123 	TaitoCharPivotXOffsets = PivotXOffsets;
8124 	TaitoCharPivotYOffsets = PivotYOffsets;
8125 	TaitoNumCharPivot = 0x4000;
8126 	TaitoNumSpriteA = 0x1000;
8127 
8128 	TaitoLoadRoms(0);
8129 
8130 	TaitoMSM6295RomSize = 0x100000;
8131 
8132 	// Allocate and Blank all required memory
8133 	TaitoMem = NULL;
8134 	MemIndex();
8135 	nLen = TaitoMemEnd - (UINT8 *)0;
8136 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8137 	memset(TaitoMem, 0, nLen);
8138 	MemIndex();
8139 
8140 	if (TaitoLoadRoms(1)) return 1;
8141 
8142 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, NULL);
8143 	TC0360PRIInit();
8144 	TC0430GRWInit(-16, 0, TaitoCharsPivot);
8145 	TC0510NIOInit();
8146 
8147 #ifdef BUILD_A68K
8148 	SwitchToMusashi();
8149 #endif
8150 
8151 	// Setup the 68000 emulation
8152 	SekInit(0, 0x68000);
8153 	SekOpen(0);
8154 	SekMapMemory(Taito68KRom1             , 0x000000, 0x0fffff, MAP_ROM);
8155 	SekMapMemory(Taito68KRam1             , 0x300000, 0x30ffff, MAP_RAM);
8156 	SekMapMemory(TC0430GRWRam             , 0x400000, 0x401fff, MAP_RAM);
8157 	SekMapMemory(TaitoPaletteRam          , 0x700000, 0x701fff, MAP_RAM);
8158 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
8159 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
8160 	SekSetReadByteHandler(0, Driftout68KReadByte);
8161 	SekSetWriteByteHandler(0, Driveout68KWriteByte);
8162 	SekSetReadWordHandler(0, Driftout68KReadWord);
8163 	SekSetWriteWordHandler(0, Driftout68KWriteWord);
8164 	SekClose();
8165 
8166 	// Setup the Z80 emulation
8167 	ZetInit(0);
8168 	ZetOpen(0);
8169 	ZetSetReadHandler(DriveoutZ80Read);
8170 	ZetSetWriteHandler(DriveoutZ80Write);
8171 	ZetMapArea(0x0000, 0x7fff, 0, TaitoZ80Rom1                 );
8172 	ZetMapArea(0x0000, 0x7fff, 2, TaitoZ80Rom1                 );
8173 	ZetMapArea(0x8000, 0x87ff, 0, TaitoZ80Ram1                 );
8174 	ZetMapArea(0x8000, 0x87ff, 1, TaitoZ80Ram1                 );
8175 	ZetMapArea(0x8000, 0x87ff, 2, TaitoZ80Ram1                 );
8176 	ZetClose();
8177 
8178 	MSM6295Init(0, 1056000 / 132, 0);
8179 	MSM6295SetRoute(0, 1.00, BURN_SND_ROUTE_BOTH);
8180 
8181 	TaitoXOffset = 3;
8182 
8183 	PaletteType = QZQUESTPalette;
8184 
8185 	SpritePriWritebackMode = 0;
8186 
8187 	Driftout = 1;
8188 
8189 	// Reset the driver
8190 	TaitoF2DoReset();
8191 
8192 	return 0;
8193 }
8194 
FinalbInit()8195 static INT32 FinalbInit()
8196 {
8197 	INT32 nLen;
8198 
8199 	TaitoF2Init();
8200 
8201 	TaitoNumChar = 0x2000;
8202 
8203 	TaitoSpriteAModulo = 0x400;
8204 	TaitoSpriteANumPlanes = 6;
8205 	TaitoSpriteAWidth = 16;
8206 	TaitoSpriteAHeight = 16;
8207 	TaitoSpriteAPlaneOffsets = FinalbSpritePlaneOffsets;
8208 	TaitoSpriteAXOffsets = FinalbSpriteXOffsets;
8209 	TaitoSpriteAYOffsets = FinalbSpriteYOffsets;
8210 	TaitoNumSpriteA = 0x2000;
8211 
8212 	TaitoLoadRoms(0);
8213 
8214 	// Allocate and Blank all required memory
8215 	TaitoMem = NULL;
8216 	MemIndex();
8217 	nLen = TaitoMemEnd - (UINT8 *)0;
8218 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8219 	memset(TaitoMem, 0, nLen);
8220 	MemIndex();
8221 
8222 	TaitoNumSpriteA = 0x0000;  // Need to load these outside of the usual routine
8223 
8224 	if (TaitoLoadRoms(1)) return 1;
8225 
8226 	TC0110PCRInit(1, 0x1000);
8227 	TC0100SCNInit(0, TaitoNumChar, 1, 8, 0, NULL);
8228 	TC0140SYTInit(0);
8229 	TC0220IOCInit();
8230 
8231 	// Load and decode Sprites
8232 	INT32 nRet;
8233 	TaitoNumSpriteA = 0x2000;
8234 	UINT8 *TempRom = (UINT8*)BurnMalloc(0x200000);
8235 	memset(TempRom, 0, 0x200000);
8236 	nRet = BurnLoadRom(TempRom + 0x000000 ,  5, 2); if (nRet != 0) return 1;
8237 	nRet = BurnLoadRom(TempRom + 0x000001 ,  6, 2); if (nRet != 0) return 1;
8238 	nRet = BurnLoadRom(TempRom + 0x180000 ,  7, 1); if (nRet != 0) return 1;
8239 
8240 	INT32 Offset = 0x100000;
8241 	UINT8 Data, d1, d2, d3, d4;
8242 	for (INT32 i = 0x180000; i < 0x200000; i++) {
8243 		Data = TempRom[i];
8244 		d1 = (Data >> 0) & 3;
8245 		d2 = (Data >> 2) & 3;
8246 		d3 = (Data >> 4) & 3;
8247 		d4 = (Data >> 6) & 3;
8248 
8249 		TempRom[Offset] = (d3 << 2) | (d4 << 6);
8250 		Offset++;
8251 
8252 		TempRom[Offset] = (d1 << 2) | (d2 << 6);
8253 		Offset++;
8254 	}
8255 	GfxDecode(TaitoNumSpriteA, TaitoSpriteANumPlanes, TaitoSpriteAWidth, TaitoSpriteAHeight, FinalbSpritePlaneOffsets, FinalbSpriteXOffsets, FinalbSpriteYOffsets, TaitoSpriteAModulo, TempRom, TaitoSpritesA);
8256 	BurnFree(TempRom);
8257 
8258 #ifdef BUILD_A68K
8259 	SwitchToMusashi();
8260 #endif
8261 
8262 	// Setup the 68000 emulation
8263 	SekInit(0, 0x68000);
8264 	SekOpen(0);
8265 	SekMapMemory(Taito68KRom1             , 0x000000, 0x03ffff, MAP_ROM);
8266 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
8267 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
8268 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
8269 	SekSetReadByteHandler(0, Finalb68KReadByte);
8270 	SekSetWriteByteHandler(0, Finalb68KWriteByte);
8271 	SekSetReadWordHandler(0, Finalb68KReadWord);
8272 	SekSetWriteWordHandler(0, Finalb68KWriteWord);
8273 	SekClose();
8274 
8275 	TaitoF2SoundInit();
8276 
8277 	TaitoXOffset = 1;
8278 	TaitoF2SpriteBufferFunction = TaitoF2PartialBufferDelayed;
8279 
8280 	// Reset the driver
8281 	TaitoF2DoReset();
8282 
8283 	return 0;
8284 }
8285 
FootchmpInit()8286 static INT32 FootchmpInit()
8287 {
8288 	INT32 nLen;
8289 
8290 	TaitoF2Init();
8291 
8292 	Footchmp = 1;
8293 
8294 	TaitoCharModulo = 0x400;
8295 	TaitoCharNumPlanes = 4;
8296 	TaitoCharWidth = 16;
8297 	TaitoCharHeight = 16;
8298 	TaitoCharPlaneOffsets = TC0480SCPCharPlaneOffsets;
8299 	TaitoCharXOffsets = TC0480SCPCharXOffsets;
8300 	TaitoCharYOffsets = TC0480SCPCharYOffsets;
8301 	TaitoNumChar = 0x2000;
8302 
8303 	TaitoSpriteAModulo = 0x400;
8304 	TaitoSpriteANumPlanes = 4;
8305 	TaitoSpriteAWidth = 16;
8306 	TaitoSpriteAHeight = 16;
8307 	TaitoSpriteAPlaneOffsets = SpritePlaneOffsets;
8308 	TaitoSpriteAXOffsets = SpriteXOffsets;
8309 	TaitoSpriteAYOffsets = SpriteYOffsets;
8310 	TaitoNumSpriteA = 0x4000;
8311 
8312 	TaitoLoadRoms(0);
8313 
8314 	// Allocate and Blank all required memory
8315 	TaitoMem = NULL;
8316 	MemIndex();
8317 	nLen = TaitoMemEnd - (UINT8 *)0;
8318 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8319 	memset(TaitoMem, 0, nLen);
8320 	MemIndex();
8321 
8322 	if (!strcmp(BurnDrvGetTextA(DRV_NAME), "hthero")) {
8323 		TC0480SCPInit(TaitoNumChar, 3, 0x33, -4, -1, 0, 24);
8324 	} else {
8325 		TC0480SCPInit(TaitoNumChar, 3, 0x1d, 8, -1, 0, 0);
8326 	}
8327 	TC0480SCPSetPriMap(TaitoPriorityMap);
8328 	TC0140SYTInit(0);
8329 	TC0360PRIInit();
8330 
8331 	if (TaitoLoadRoms(1)) return 1;
8332 
8333 #ifdef BUILD_A68K
8334 	SwitchToMusashi();
8335 #endif
8336 
8337 	// Setup the 68000 emulation
8338 	SekInit(0, 0x68000);
8339 	SekOpen(0);
8340 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
8341 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
8342 	SekMapMemory(TaitoSpriteRam           , 0x200000, 0x20ffff, MAP_RAM);
8343 	SekMapMemory(TC0480SCPRam             , 0x400000, 0x40ffff, MAP_RAM);
8344 	SekMapMemory(TaitoPaletteRam          , 0x600000, 0x601fff, MAP_RAM);
8345 	SekSetReadByteHandler(0, Footchmp68KReadByte);
8346 	SekSetWriteByteHandler(0, Footchmp68KWriteByte);
8347 	SekSetReadWordHandler(0, Footchmp68KReadWord);
8348 	SekSetWriteWordHandler(0, Footchmp68KWriteWord);
8349 	SekClose();
8350 
8351 	TaitoF2SoundInit();
8352 
8353 	TaitoXOffset = 3;
8354 	TaitoF2SpriteBufferFunction = TaitoF2FullBufferDelayed;
8355 	SpritePriWritebackMode = 0;
8356 
8357 	// Reset the driver
8358 	TaitoF2DoReset();
8359 
8360 	return 0;
8361 }
8362 
GrowlInit()8363 static INT32 GrowlInit()
8364 {
8365 	INT32 nLen;
8366 
8367 	TaitoF2Init();
8368 
8369 	TaitoNumChar = 0x8000;
8370 	TaitoNumSpriteA = 0x4000;
8371 
8372 	TaitoLoadRoms(0);
8373 
8374 	// Allocate and Blank all required memory
8375 	TaitoMem = NULL;
8376 	MemIndex();
8377 	nLen = TaitoMemEnd - (UINT8 *)0;
8378 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8379 	memset(TaitoMem, 0, nLen);
8380 	MemIndex();
8381 
8382 	if (TaitoLoadRoms(1)) return 1;
8383 
8384 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
8385 	TC0140SYTInit(0);
8386 	TC0360PRIInit();
8387 
8388 #ifdef BUILD_A68K
8389 	SwitchToMusashi();
8390 #endif
8391 
8392 	// Setup the 68000 emulation
8393 	SekInit(0, 0x68000);
8394 	SekOpen(0);
8395 	SekMapMemory(Taito68KRom1             , 0x000000, 0x0fffff, MAP_ROM);
8396 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
8397 	SekMapMemory(TaitoPaletteRam          , 0x200000, 0x201fff, MAP_RAM);
8398 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
8399 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
8400 	SekSetReadByteHandler(0, Growl68KReadByte);
8401 	SekSetWriteByteHandler(0, Growl68KWriteByte);
8402 	SekSetReadWordHandler(0, Growl68KReadWord);
8403 	SekSetWriteWordHandler(0, Growl68KWriteWord);
8404 	SekClose();
8405 
8406 	TaitoF2SoundInit();
8407 
8408 	TaitoXOffset = 3;
8409 
8410 	SpritePriWritebackMode = 0;
8411 
8412 	// Reset the driver
8413 	TaitoF2DoReset();
8414 
8415 	return 0;
8416 }
8417 
GunfrontInit()8418 static INT32 GunfrontInit()
8419 {
8420 	INT32 nLen;
8421 
8422 	TaitoF2Init();
8423 
8424 	TaitoNumChar = 0x8000;
8425 	TaitoNumSpriteA = 0x2000;
8426 
8427 	TaitoLoadRoms(0);
8428 
8429 	// Allocate and Blank all required memory
8430 	TaitoMem = NULL;
8431 	MemIndex();
8432 	nLen = TaitoMemEnd - (UINT8 *)0;
8433 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8434 	memset(TaitoMem, 0, nLen);
8435 	MemIndex();
8436 
8437 	if (TaitoLoadRoms(1)) return 1;
8438 
8439 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
8440 	TC0140SYTInit(0);
8441 	TC0360PRIInit();
8442 	TC0510NIOInit();
8443 
8444 #ifdef BUILD_A68K
8445 	SwitchToMusashi();
8446 #endif
8447 
8448 	// Setup the 68000 emulation
8449 	SekInit(0, 0x68000);
8450 	SekOpen(0);
8451 	SekMapMemory(Taito68KRom1             , 0x000000, 0x0bffff, MAP_ROM);
8452 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
8453 	SekMapMemory(TaitoPaletteRam          , 0x200000, 0x201fff, MAP_RAM);
8454 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
8455 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
8456 	SekSetReadByteHandler(0, Gunfront68KReadByte);
8457 	SekSetWriteByteHandler(0, Gunfront68KWriteByte);
8458 	SekSetReadWordHandler(0, Gunfront68KReadWord);
8459 	SekSetWriteWordHandler(0, Gunfront68KWriteWord);
8460 	SekClose();
8461 
8462 	TaitoF2SoundInit();
8463 
8464 	TaitoF2SpriteBufferFunction = TaitoF2PartialBufferDelayed;
8465 
8466 	SpritePriWritebackMode = 0;
8467 
8468 	TaitoXOffset = 3;
8469 
8470 	// Reset the driver
8471 	TaitoF2DoReset();
8472 
8473 	return 0;
8474 }
8475 
KoshienInit()8476 static INT32 KoshienInit()
8477 {
8478 	INT32 nLen;
8479 
8480 	TaitoF2Init();
8481 
8482 	TaitoNumChar = 0x8000;
8483 	TaitoNumSpriteA = 0x4000;
8484 
8485 	TaitoLoadRoms(0);
8486 
8487 	// Allocate and Blank all required memory
8488 	TaitoMem = NULL;
8489 	MemIndex();
8490 	nLen = TaitoMemEnd - (UINT8 *)0;
8491 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8492 	memset(TaitoMem, 0, nLen);
8493 	MemIndex();
8494 
8495 	if (TaitoLoadRoms(1)) return 1;
8496 
8497 	TC0100SCNInit(0, TaitoNumChar, 1, 8, 0, TaitoPriorityMap);
8498 	TC0140SYTInit(0);
8499 	TC0360PRIInit();
8500 	TC0510NIOInit();
8501 
8502 #ifdef BUILD_A68K
8503 	SwitchToMusashi();
8504 #endif
8505 
8506 	// Setup the 68000 emulation
8507 	SekInit(0, 0x68000);
8508 	SekOpen(0);
8509 	SekMapMemory(Taito68KRom1             , 0x000000, 0x03ffff, MAP_ROM);
8510 	SekMapMemory(Taito68KRom1 + 0x40000   , 0x080000, 0x0fffff, MAP_ROM);
8511 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
8512 	SekMapMemory(TaitoPaletteRam          , 0x200000, 0x201fff, MAP_RAM);
8513 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
8514 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
8515 	SekSetReadByteHandler(0, Koshien68KReadByte);
8516 	SekSetWriteByteHandler(0, Koshien68KWriteByte);
8517 	SekSetReadWordHandler(0, Koshien68KReadWord);
8518 	SekSetWriteWordHandler(0, Koshien68KWriteWord);
8519 	SekClose();
8520 
8521 	TaitoF2SoundInit();
8522 
8523 	TaitoXOffset = 1;
8524 
8525 	SpritePriWritebackMode = 0;
8526 	bNoClearOpposites = 1;
8527 
8528 	// Reset the driver
8529 	TaitoF2DoReset();
8530 
8531 	return 0;
8532 }
8533 
LiquidkInit()8534 static INT32 LiquidkInit()
8535 {
8536 	INT32 nLen;
8537 
8538 	TaitoF2Init();
8539 
8540 	TaitoNumChar = 0x4000;
8541 	TaitoNumSpriteA = 0x2000;
8542 
8543 	TaitoLoadRoms(0);
8544 
8545 	// Allocate and Blank all required memory
8546 	TaitoMem = NULL;
8547 	MemIndex();
8548 	nLen = TaitoMemEnd - (UINT8 *)0;
8549 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8550 	memset(TaitoMem, 0, nLen);
8551 	MemIndex();
8552 
8553 	if (TaitoLoadRoms(1)) return 1;
8554 
8555 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
8556 	TC0100SCNLiquidKludge();
8557 	TC0140SYTInit(0);
8558 	TC0360PRIInit();
8559 	TC0220IOCInit();
8560 
8561 #ifdef BUILD_A68K
8562 	SwitchToMusashi();
8563 #endif
8564 
8565 	// Setup the 68000 emulation
8566 	SekInit(0, 0x68000);
8567 	SekOpen(0);
8568 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
8569 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
8570 	SekMapMemory(TaitoPaletteRam          , 0x200000, 0x201fff, MAP_RAM);
8571 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
8572 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
8573 	SekSetReadByteHandler(0, Liquidk68KReadByte);
8574 	SekSetWriteByteHandler(0, Liquidk68KWriteByte);
8575 	SekSetReadWordHandler(0, Liquidk68KReadWord);
8576 	SekSetWriteWordHandler(0, Liquidk68KWriteWord);
8577 	SekClose();
8578 
8579 	TaitoF2SoundInit();
8580 
8581 	TaitoXOffset = 3;
8582 	TaitoF2SpriteBufferFunction = TaitoF2PartialBufferDelayed;
8583 	SpritePriWritebackMode = 0;
8584 
8585 	// Reset the driver
8586 	TaitoF2DoReset();
8587 
8588 	return 0;
8589 }
8590 
MegablstInit()8591 static INT32 MegablstInit()
8592 {
8593 	INT32 nLen;
8594 
8595 	TaitoF2Init();
8596 
8597 	TaitoNumChar = 0x4000;
8598 	TaitoNumSpriteA = 0x2000;
8599 
8600 	TaitoLoadRoms(0);
8601 
8602 	// Allocate and Blank all required memory
8603 	TaitoMem = NULL;
8604 	MemIndex();
8605 	nLen = TaitoMemEnd - (UINT8 *)0;
8606 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8607 	memset(TaitoMem, 0, nLen);
8608 	MemIndex();
8609 
8610 	if (TaitoLoadRoms(1)) return 1;
8611 
8612 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
8613 	TC0140SYTInit(0);
8614 	TC0220IOCInit();
8615 
8616 #ifdef BUILD_A68K
8617 	SwitchToMusashi();
8618 #endif
8619 
8620 	// Setup the 68000 emulation
8621 	SekInit(0, 0x68000);
8622 	SekOpen(0);
8623 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
8624 	SekMapMemory(Taito68KRam1             , 0x200000, 0x20ffff, MAP_RAM);
8625 	SekMapMemory(TaitoPaletteRam          , 0x300000, 0x301fff, MAP_RAM);
8626 	SekMapMemory(TC0100SCNRam[0]          , 0x600000, 0x60ffff, MAP_READ);
8627 	SekMapMemory(Taito68KRam1 + 0x10000   , 0x610000, 0x61ffff, MAP_RAM);
8628 	SekMapMemory(TaitoSpriteRam           , 0x800000, 0x80ffff, MAP_RAM);
8629 	SekSetReadByteHandler(0, Megablst68KReadByte);
8630 	SekSetWriteByteHandler(0, Megablst68KWriteByte);
8631 	SekSetReadWordHandler(0, Megablst68KReadWord);
8632 	SekSetWriteWordHandler(0, Megablst68KWriteWord);
8633 	SekClose();
8634 
8635 	TaitoF2SoundInit();
8636 
8637 	cchip_init();
8638 
8639 	TaitoXOffset = 3;
8640 
8641 	// Reset the driver
8642 	TaitoF2DoReset();
8643 
8644 	return 0;
8645 }
8646 
MetalbInit()8647 static INT32 MetalbInit()
8648 {
8649 	INT32 nLen;
8650 
8651 	TaitoF2Init();
8652 
8653 	TaitoCharModulo = 0x400;
8654 	TaitoCharNumPlanes = 4;
8655 	TaitoCharWidth = 16;
8656 	TaitoCharHeight = 16;
8657 	TaitoCharPlaneOffsets = TC0480SCPCharPlaneOffsets;
8658 	TaitoCharXOffsets = TC0480SCPCharXOffsets;
8659 	TaitoCharYOffsets = TC0480SCPCharYOffsets;
8660 	TaitoNumChar = 0x2000;
8661 
8662 	TaitoNumSpriteA = 0x2000;
8663 
8664 	TaitoLoadRoms(0);
8665 
8666 	// Allocate and Blank all required memory
8667 	TaitoMem = NULL;
8668 	MemIndex();
8669 	nLen = TaitoMemEnd - (UINT8 *)0;
8670 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8671 	memset(TaitoMem, 0, nLen);
8672 	MemIndex();
8673 
8674 	if (TaitoLoadRoms(1)) return 1;
8675 
8676 	TC0480SCPInit(TaitoNumChar, 3, 0x32, -4, 1, 0, 24);
8677 	TC0480SCPSetColourBase(256);
8678 	TC0480SCPSetPriMap(TaitoPriorityMap);
8679 	TC0140SYTInit(0);
8680 	TC0360PRIInit();
8681 	TC0510NIOInit();
8682 
8683 #ifdef BUILD_A68K
8684 	SwitchToMusashi();
8685 #endif
8686 
8687 	// Setup the 68000 emulation
8688 	SekInit(0, 0x68000);
8689 	SekOpen(0);
8690 	SekMapMemory(Taito68KRom1             , 0x000000, 0x0bffff, MAP_ROM);
8691 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
8692 	SekMapMemory(TaitoSpriteRam           , 0x300000, 0x30ffff, MAP_RAM);
8693 	SekMapMemory(TC0480SCPRam             , 0x500000, 0x50ffff, MAP_RAM);
8694 	SekMapMemory(TaitoPaletteRam          , 0x700000, 0x703fff, MAP_RAM);
8695 	SekSetReadByteHandler(0, Metalb68KReadByte);
8696 	SekSetWriteByteHandler(0, Metalb68KWriteByte);
8697 	SekSetReadWordHandler(0, Metalb68KReadWord);
8698 	SekSetWriteWordHandler(0, Metalb68KWriteWord);
8699 	SekClose();
8700 
8701 	TaitoF2SoundInit();
8702 
8703 	TaitoXOffset = 3;
8704 
8705 	SpritePriWritebackMode = 0;
8706 	PaletteType = METALBPalette;
8707 
8708 	// Reset the driver
8709 	TaitoF2DoReset();
8710 
8711 	return 0;
8712 }
8713 
MjnquestInit()8714 static INT32 MjnquestInit()
8715 {
8716 	INT32 nLen;
8717 
8718 	TaitoF2Init();
8719 
8720 	TaitoNumChar = 0x10000;
8721 	TaitoNumSpriteA = 0x1000;
8722 
8723 	TaitoLoadRoms(0);
8724 
8725 	// Allocate and Blank all required memory
8726 	TaitoMem = NULL;
8727 	MemIndex();
8728 	nLen = TaitoMemEnd - (UINT8 *)0;
8729 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8730 	memset(TaitoMem, 0, nLen);
8731 	MemIndex();
8732 
8733 	if (TaitoLoadRoms(1)) return 1;
8734 
8735 	// Load and decode Sprites
8736 	INT32 nRet;
8737 	UINT8 *TempRom = (UINT8*)BurnMalloc(TaitoSpriteARomSize);
8738 	memset(TempRom, 0, TaitoSpriteARomSize);
8739 	nRet = BurnLoadRom(TempRom + 0x000000 ,  6, 1); if (nRet != 0) return 1;
8740 	for (UINT32 i = 0; i < TaitoSpriteARomSize; i += 2) {
8741 		INT32 Temp = TempRom[i];
8742 		TempRom[i + 0] = (TempRom[i + 1] >> 4) | (TempRom[i + 1] << 4);
8743 		TempRom[i + 1] = (Temp >> 4) | (Temp << 4);
8744 	}
8745 	GfxDecode(TaitoNumSpriteA, TaitoSpriteANumPlanes, TaitoSpriteAWidth, TaitoSpriteAHeight, TaitoSpriteAPlaneOffsets, TaitoSpriteAXOffsets, TaitoSpriteAYOffsets, TaitoSpriteAModulo, TempRom, TaitoSpritesA);
8746 	BurnFree(TempRom);
8747 
8748 	TC0110PCRInit(1, 0x1000);
8749 	TC0100SCNInit(0, TaitoNumChar, 0, 8, 0, NULL);
8750 	TC0100SCNSetGfxMask(0, 0x7fff);
8751 	TC0140SYTInit(0);
8752 
8753 #ifdef BUILD_A68K
8754 	SwitchToMusashi();
8755 #endif
8756 
8757 	// Setup the 68000 emulation
8758 	SekInit(0, 0x68000);
8759 	SekOpen(0);
8760 	SekMapMemory(Taito68KRom1             , 0x000000, 0x03ffff, MAP_ROM);
8761 	SekMapMemory(Taito68KRom1 + 0x40000   , 0x080000, 0x0fffff, MAP_ROM);
8762 	SekMapMemory(Taito68KRam1             , 0x110000, 0x12ffff, MAP_RAM);
8763 	SekMapMemory(TC0100SCNRam[0]          , 0x400000, 0x40ffff, MAP_READ);
8764 	SekMapMemory(TaitoSpriteRam           , 0x500000, 0x50ffff, MAP_RAM);
8765 	SekSetReadByteHandler(0, Mjnquest68KReadByte);
8766 	SekSetWriteByteHandler(0, Mjnquest68KWriteByte);
8767 	SekSetReadWordHandler(0, Mjnquest68KReadWord);
8768 	SekSetWriteWordHandler(0, Mjnquest68KWriteWord);
8769 	SekClose();
8770 
8771 	TaitoF2SoundInit();
8772 
8773 	bNoClearOpposites = 1;
8774 
8775 	// Reset the driver
8776 	TaitoF2DoReset();
8777 
8778 	return 0;
8779 }
8780 
NinjakInit()8781 static INT32 NinjakInit()
8782 {
8783 	INT32 nLen;
8784 
8785 	TaitoF2Init();
8786 
8787 	TaitoNumChar = 0x4000;
8788 	TaitoNumSpriteA = 0x4000;
8789 
8790 	TaitoLoadRoms(0);
8791 
8792 	// Allocate and Blank all required memory
8793 	TaitoMem = NULL;
8794 	MemIndex();
8795 	nLen = TaitoMemEnd - (UINT8 *)0;
8796 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8797 	memset(TaitoMem, 0, nLen);
8798 	MemIndex();
8799 
8800 	if (TaitoLoadRoms(1)) return 1;
8801 
8802 	TC0100SCNInit(0, TaitoNumChar, 0, 8, 0, TaitoPriorityMap);
8803 	TC0140SYTInit(0);
8804 	TC0360PRIInit();
8805 
8806 #ifdef BUILD_A68K
8807 	SwitchToMusashi();
8808 #endif
8809 
8810 	// Setup the 68000 emulation
8811 	SekInit(0, 0x68000);
8812 	SekOpen(0);
8813 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
8814 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
8815 	SekMapMemory(TaitoPaletteRam          , 0x200000, 0x201fff, MAP_RAM);
8816 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
8817 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
8818 	SekSetReadByteHandler(0, Ninjak68KReadByte);
8819 	SekSetWriteByteHandler(0, Ninjak68KWriteByte);
8820 	SekSetReadWordHandler(0, Ninjak68KReadWord);
8821 	SekSetWriteWordHandler(0, Ninjak68KWriteWord);
8822 	SekClose();
8823 
8824 	TaitoF2SoundInit();
8825 
8826 	// Reset the driver
8827 	TaitoF2DoReset();
8828 	SpritePriWritebackMode = 0;
8829 
8830 	return 0;
8831 }
8832 
PulirulaInit()8833 static INT32 PulirulaInit()
8834 {
8835 	INT32 nLen;
8836 
8837 	TaitoF2Init();
8838 
8839 	TaitoCharPivotModulo = 0x100;
8840 	TaitoCharPivotNumPlanes = 4;
8841 	TaitoCharPivotWidth = 8;
8842 	TaitoCharPivotHeight = 8;
8843 	TaitoCharPivotPlaneOffsets = PivotPlaneOffsets;
8844 	TaitoCharPivotXOffsets = PivotXOffsets;
8845 	TaitoCharPivotYOffsets = PivotYOffsets;
8846 	TaitoNumCharPivot = 0x4000;
8847 
8848 	TaitoNumChar = 0x8000;
8849 	TaitoNumSpriteA = 0x4000;
8850 
8851 	TaitoLoadRoms(0);
8852 
8853 	// Allocate and Blank all required memory
8854 	TaitoMem = NULL;
8855 	MemIndex();
8856 	nLen = TaitoMemEnd - (UINT8 *)0;
8857 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8858 	memset(TaitoMem, 0, nLen);
8859 	MemIndex();
8860 
8861 	if (TaitoLoadRoms(1)) return 1;
8862 
8863 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
8864 	TC0140SYTInit(0);
8865 	TC0360PRIInit();
8866 	TC0430GRWInit(-10, 0, TaitoCharsPivot);
8867 	TC0430GRDSetPriMap(TaitoPriorityMap);
8868 
8869 	TC0510NIOInit();
8870 
8871 #ifdef BUILD_A68K
8872 	SwitchToMusashi();
8873 #endif
8874 
8875 	// Setup the 68000 emulation
8876 	SekInit(0, 0x68000);
8877 	SekOpen(0);
8878 	SekMapMemory(Taito68KRom1             , 0x000000, 0x0bffff, MAP_ROM);
8879 	SekMapMemory(Taito68KRam1             , 0x300000, 0x30ffff, MAP_RAM);
8880 	SekMapMemory(TC0430GRWRam             , 0x400000, 0x401fff, MAP_RAM);
8881 	SekMapMemory(TaitoPaletteRam          , 0x700000, 0x701fff, MAP_RAM);
8882 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
8883 	SekMapMemory(TaitoSpriteExtension     , 0x600000, 0x603fff, MAP_RAM);
8884 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
8885 	SekSetReadByteHandler(0, Pulirula68KReadByte);
8886 	SekSetWriteByteHandler(0, Pulirula68KWriteByte);
8887 	SekSetReadWordHandler(0, Pulirula68KReadWord);
8888 	SekSetWriteWordHandler(0, Pulirula68KWriteWord);
8889 	SekClose();
8890 
8891 	TaitoF2SoundInit();
8892 
8893 	TaitoXOffset = 3;
8894 	TaitoF2SpriteType = 2;
8895 	PaletteType = QZQUESTPalette;
8896 	SpritePriWritebackMode = 0;
8897 
8898 	// Reset the driver
8899 	TaitoF2DoReset();
8900 
8901 	return 0;
8902 }
8903 
QcrayonInit()8904 static INT32 QcrayonInit()
8905 {
8906 	INT32 nLen;
8907 
8908 	TaitoF2Init();
8909 
8910 	TaitoNumChar = 0x8000;
8911 	TaitoNumSpriteA = 0x4000;
8912 
8913 	TaitoLoadRoms(0);
8914 
8915 	// Allocate and Blank all required memory
8916 	TaitoMem = NULL;
8917 	MemIndex();
8918 	nLen = TaitoMemEnd - (UINT8 *)0;
8919 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8920 	memset(TaitoMem, 0, nLen);
8921 	MemIndex();
8922 
8923 	if (TaitoLoadRoms(1)) return 1;
8924 
8925 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
8926 	TC0140SYTInit(0);
8927 	TC0360PRIInit();
8928 	TC0510NIOInit();
8929 
8930 #ifdef BUILD_A68K
8931 	SwitchToMusashi();
8932 #endif
8933 
8934 	// Setup the 68000 emulation
8935 	SekInit(0, 0x68000);
8936 	SekOpen(0);
8937 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
8938 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
8939 	SekMapMemory(Taito68KRom1 + 0x80000   , 0x300000, 0x3fffff, MAP_ROM);
8940 	SekMapMemory(TaitoSpriteExtension     , 0x600000, 0x603fff, MAP_RAM);
8941 	SekMapMemory(TaitoPaletteRam          , 0x700000, 0x701fff, MAP_RAM);
8942 	SekMapMemory(TaitoSpriteRam           , 0x800000, 0x80ffff, MAP_RAM);
8943 	SekMapMemory(TC0100SCNRam[0]          , 0x900000, 0x90ffff, MAP_READ);
8944 	SekSetReadByteHandler(0, Qcrayon68KReadByte);
8945 	SekSetWriteByteHandler(0, Qcrayon68KWriteByte);
8946 	SekSetReadWordHandler(0, Qcrayon68KReadWord);
8947 	SekSetWriteWordHandler(0, Qcrayon68KWriteWord);
8948 	SekClose();
8949 
8950 	TaitoF2SoundInit();
8951 
8952 	TaitoXOffset = 3;
8953 	TaitoF2SpriteType = 3;
8954 	SpritePriWritebackMode = 0;
8955 	bNoClearOpposites = 1;
8956 
8957 	// Reset the driver
8958 	TaitoF2DoReset();
8959 
8960 	return 0;
8961 }
8962 
Qcrayon2Init()8963 static INT32 Qcrayon2Init()
8964 {
8965 	INT32 nLen;
8966 
8967 	TaitoF2Init();
8968 
8969 	TaitoNumChar = 0x8000;
8970 	TaitoNumSpriteA = 0x4000;
8971 
8972 	TaitoLoadRoms(0);
8973 
8974 	// Allocate and Blank all required memory
8975 	TaitoMem = NULL;
8976 	MemIndex();
8977 	nLen = TaitoMemEnd - (UINT8 *)0;
8978 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
8979 	memset(TaitoMem, 0, nLen);
8980 	MemIndex();
8981 
8982 	if (TaitoLoadRoms(1)) return 1;
8983 
8984 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
8985 	TC0140SYTInit(0);
8986 	TC0360PRIInit();
8987 	TC0510NIOInit();
8988 
8989 #ifdef BUILD_A68K
8990 	SwitchToMusashi();
8991 #endif
8992 
8993 	// Setup the 68000 emulation
8994 	SekInit(0, 0x68000);
8995 	SekOpen(0);
8996 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
8997 	SekMapMemory(Taito68KRam1             , 0x200000, 0x20ffff, MAP_RAM);
8998 	SekMapMemory(TaitoPaletteRam          , 0x300000, 0x301fff, MAP_RAM);
8999 	SekMapMemory(TaitoSpriteRam           , 0x400000, 0x40ffff, MAP_RAM);
9000 	SekMapMemory(TC0100SCNRam[0]          , 0x500000, 0x50ffff, MAP_READ);
9001 	SekMapMemory(Taito68KRom1 + 0x80000   , 0x600000, 0x6fffff, MAP_ROM);
9002 	SekMapMemory(TaitoSpriteExtension     , 0xb00000, 0xb017ff, MAP_RAM);
9003 	SekSetReadByteHandler(0, Qcrayon268KReadByte);
9004 	SekSetWriteByteHandler(0, Qcrayon268KWriteByte);
9005 	SekSetReadWordHandler(0, Qcrayon268KReadWord);
9006 	SekSetWriteWordHandler(0, Qcrayon268KWriteWord);
9007 	SekClose();
9008 
9009 	TaitoF2SoundInit();
9010 
9011 	TaitoXOffset = 3;
9012 	TaitoF2SpriteType = 3;
9013 	SpritePriWritebackMode = 0;
9014 	bNoClearOpposites = 1;
9015 
9016 	// Reset the driver
9017 	TaitoF2DoReset();
9018 
9019 	return 0;
9020 }
9021 
QjinseiInit()9022 static INT32 QjinseiInit()
9023 {
9024 	INT32 nLen;
9025 
9026 	TaitoF2Init();
9027 
9028 	TaitoNumChar = 0x8000;
9029 	TaitoNumSpriteA = 0x4000;
9030 
9031 	TaitoLoadRoms(0);
9032 
9033 	// Allocate and Blank all required memory
9034 	TaitoMem = NULL;
9035 	MemIndex();
9036 	nLen = TaitoMemEnd - (UINT8 *)0;
9037 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
9038 	memset(TaitoMem, 0, nLen);
9039 	MemIndex();
9040 
9041 	if (TaitoLoadRoms(1)) return 1;
9042 
9043 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
9044 	TC0140SYTInit(0);
9045 	TC0360PRIInit();
9046 	TC0510NIOInit();
9047 
9048 #ifdef BUILD_A68K
9049 	SwitchToMusashi();
9050 #endif
9051 
9052 	// Setup the 68000 emulation
9053 	SekInit(0, 0x68000);
9054 	SekOpen(0);
9055 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
9056 	SekMapMemory(Taito68KRom1 + 0x80000   , 0x100000, 0x1fffff, MAP_ROM);
9057 	SekMapMemory(Taito68KRam1             , 0x300000, 0x30ffff, MAP_RAM);
9058 	SekMapMemory(TaitoSpriteExtension     , 0x600000, 0x603fff, MAP_RAM);
9059 	SekMapMemory(TaitoPaletteRam          , 0x700000, 0x701fff, MAP_RAM);
9060 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
9061 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
9062 	SekSetReadByteHandler(0, Qjinsei68KReadByte);
9063 	SekSetWriteByteHandler(0, Qjinsei68KWriteByte);
9064 	SekSetReadWordHandler(0, Qjinsei68KReadWord);
9065 	SekSetWriteWordHandler(0, Qjinsei68KWriteWord);
9066 	SekClose();
9067 
9068 	TaitoF2SoundInit();
9069 
9070 	TaitoXOffset = 3;
9071 	TaitoF2SpriteType = 3;
9072 	bNoClearOpposites = 1;
9073 
9074 	// Reset the driver
9075 	TaitoF2DoReset();
9076 
9077 	return 0;
9078 }
9079 
QtorimonInit()9080 static INT32 QtorimonInit()
9081 {
9082 	INT32 nLen;
9083 
9084 	TaitoF2Init();
9085 
9086 	TaitoNumSpriteA = 0x0800;
9087 
9088 	TaitoLoadRoms(0);
9089 
9090 	// Allocate and Blank all required memory
9091 	TaitoMem = NULL;
9092 	MemIndex();
9093 	nLen = TaitoMemEnd - (UINT8 *)0;
9094 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
9095 	memset(TaitoMem, 0, nLen);
9096 	MemIndex();
9097 
9098 	if (TaitoLoadRoms(1)) return 1;
9099 
9100 	TC0110PCRInit(1, 0x1000);
9101 	TC0100SCNInit(0, TaitoNumChar, 0, 8, 0, NULL);
9102 	TC0140SYTInit(0);
9103 	TC0220IOCInit();
9104 
9105 #ifdef BUILD_A68K
9106 	SwitchToMusashi();
9107 #endif
9108 
9109 	// Setup the 68000 emulation
9110 	SekInit(0, 0x68000);
9111 	SekOpen(0);
9112 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
9113 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
9114 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
9115 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
9116 	SekSetReadByteHandler(0, Qtorimon68KReadByte);
9117 	SekSetWriteByteHandler(0, Qtorimon68KWriteByte);
9118 	SekSetReadWordHandler(0, Qtorimon68KReadWord);
9119 	SekSetWriteWordHandler(0, Qtorimon68KWriteWord);
9120 	SekClose();
9121 
9122 	TaitoF2SoundInit();
9123 
9124 	TaitoF2SpriteBufferFunction = TaitoF2PartialBufferDelayed;
9125 	bNoClearOpposites = 1;
9126 
9127 	// Reset the driver
9128 	TaitoF2DoReset();
9129 
9130 	return 0;
9131 }
9132 
QuizhqInit()9133 static INT32 QuizhqInit()
9134 {
9135 	INT32 nLen;
9136 
9137 	TaitoF2Init();
9138 
9139 	TaitoNumSpriteA = 0x1000;
9140 
9141 	TaitoLoadRoms(0);
9142 
9143 	Taito68KRom1Size = 0xc0000;
9144 
9145 	// Allocate and Blank all required memory
9146 	TaitoMem = NULL;
9147 	MemIndex();
9148 	nLen = TaitoMemEnd - (UINT8 *)0;
9149 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
9150 	memset(TaitoMem, 0, nLen);
9151 	MemIndex();
9152 
9153 	if (TaitoLoadRoms(1)) return 1;
9154 
9155 	memcpy(Taito68KRom1 + 0x80000, Taito68KRom1 + 0x40000, 0x40000);
9156 	memset(Taito68KRom1 + 0x40000, 0, 0x40000);
9157 
9158 	TC0110PCRInit(1, 0x1000);
9159 	TC0100SCNInit(0, TaitoNumChar, 0, 8, 0, NULL);
9160 	TC0140SYTInit(0);
9161 
9162 #ifdef BUILD_A68K
9163 	SwitchToMusashi();
9164 #endif
9165 
9166 	// Setup the 68000 emulation
9167 	SekInit(0, 0x68000);
9168 	SekOpen(0);
9169 	SekMapMemory(Taito68KRom1             , 0x000000, 0x0bffff, MAP_ROM);
9170 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
9171 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
9172 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
9173 	SekSetReadByteHandler(0, Quizhq68KReadByte);
9174 	SekSetWriteByteHandler(0, Quizhq68KWriteByte);
9175 	SekSetReadWordHandler(0, Quizhq68KReadWord);
9176 	SekSetWriteWordHandler(0, Quizhq68KWriteWord);
9177 	SekClose();
9178 
9179 	TaitoF2SoundInit();
9180 
9181 	TaitoF2SpriteBufferFunction = TaitoF2PartialBufferDelayed;
9182 	bNoClearOpposites = 1;
9183 
9184 	// Reset the driver
9185 	TaitoF2DoReset();
9186 
9187 	return 0;
9188 }
9189 
QzchikyuInit()9190 static INT32 QzchikyuInit()
9191 {
9192 	INT32 nLen;
9193 
9194 	TaitoF2Init();
9195 
9196 	TaitoNumChar = 0x8000;
9197 	TaitoNumSpriteA = 0x2000;
9198 
9199 	TaitoLoadRoms(0);
9200 
9201 	// Allocate and Blank all required memory
9202 	TaitoMem = NULL;
9203 	MemIndex();
9204 	nLen = TaitoMemEnd - (UINT8 *)0;
9205 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
9206 	memset(TaitoMem, 0, nLen);
9207 	MemIndex();
9208 
9209 	if (TaitoLoadRoms(1)) return 1;
9210 
9211 	TC0100SCNInit(0, TaitoNumChar, 0, 8, 0, NULL);
9212 	TC0140SYTInit(0);
9213 	TC0510NIOInit();
9214 
9215 #ifdef BUILD_A68K
9216 	SwitchToMusashi();
9217 #endif
9218 
9219 	// Setup the 68000 emulation
9220 	SekInit(0, 0x68000);
9221 	SekOpen(0);
9222 	SekMapMemory(Taito68KRom1             , 0x000000, 0x03ffff, MAP_ROM);
9223 	SekMapMemory(Taito68KRom1 + 0x40000   , 0x100000, 0x17ffff, MAP_ROM);
9224 	SekMapMemory(TaitoPaletteRam          , 0x400000, 0x401fff, MAP_RAM);
9225 	SekMapMemory(Taito68KRam1             , 0x500000, 0x50ffff, MAP_RAM);
9226 	SekMapMemory(TaitoSpriteRam           , 0x600000, 0x60ffff, MAP_RAM);
9227 	SekMapMemory(TC0100SCNRam[0]          , 0x700000, 0x70ffff, MAP_READ);
9228 	SekSetReadByteHandler(0, Qzchikyu68KReadByte);
9229 	SekSetWriteByteHandler(0, Qzchikyu68KWriteByte);
9230 	SekSetReadWordHandler(0, Qzchikyu68KReadWord);
9231 	SekSetWriteWordHandler(0, Qzchikyu68KWriteWord);
9232 	SekClose();
9233 
9234 	TaitoF2SoundInit();
9235 
9236 	TaitoF2SpriteBufferFunction = TaitoF2PartialBufferDelayedQzchikyu;
9237 	bNoClearOpposites = 1;
9238 
9239 	// Reset the driver
9240 	TaitoF2DoReset();
9241 
9242 	return 0;
9243 }
9244 
QzquestInit()9245 static INT32 QzquestInit()
9246 {
9247 	INT32 nLen;
9248 
9249 	TaitoF2Init();
9250 
9251 	TaitoNumChar = 0x8000;
9252 	TaitoNumSpriteA = 0x2000;
9253 
9254 	TaitoLoadRoms(0);
9255 
9256 	// Allocate and Blank all required memory
9257 	TaitoMem = NULL;
9258 	MemIndex();
9259 	nLen = TaitoMemEnd - (UINT8 *)0;
9260 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
9261 	memset(TaitoMem, 0, nLen);
9262 	MemIndex();
9263 
9264 	if (TaitoLoadRoms(1)) return 1;
9265 
9266 	TC0100SCNInit(0, TaitoNumChar, 0, 8, 0, NULL);
9267 	TC0140SYTInit(0);
9268 	TC0510NIOInit();
9269 
9270 #ifdef BUILD_A68K
9271 	SwitchToMusashi();
9272 #endif
9273 
9274 	// Setup the 68000 emulation
9275 	SekInit(0, 0x68000);
9276 	SekOpen(0);
9277 	SekMapMemory(Taito68KRom1             , 0x000000, 0x03ffff, MAP_ROM);
9278 	SekMapMemory(Taito68KRom1 + 0x40000   , 0x100000, 0x1fffff, MAP_ROM);
9279 	SekMapMemory(TaitoPaletteRam          , 0x400000, 0x401fff, MAP_RAM);
9280 	SekMapMemory(Taito68KRam1             , 0x500000, 0x50ffff, MAP_RAM);
9281 	SekMapMemory(TaitoSpriteRam           , 0x600000, 0x60ffff, MAP_RAM);
9282 	SekMapMemory(TC0100SCNRam[0]          , 0x700000, 0x70ffff, MAP_READ);
9283 	SekSetReadByteHandler(0, Qzquest68KReadByte);
9284 	SekSetWriteByteHandler(0, Qzquest68KWriteByte);
9285 	SekSetReadWordHandler(0, Qzquest68KReadWord);
9286 	SekSetWriteWordHandler(0, Qzquest68KWriteWord);
9287 	SekClose();
9288 
9289 	TaitoF2SoundInit();
9290 
9291 	TaitoF2SpriteBufferFunction = TaitoF2PartialBufferDelayed;
9292 	bNoClearOpposites = 1;
9293 
9294 	// Reset the driver
9295 	TaitoF2DoReset();
9296 
9297 	return 0;
9298 }
9299 
SolfigtrInit()9300 static INT32 SolfigtrInit()
9301 {
9302 	INT32 nLen;
9303 
9304 	TaitoF2Init();
9305 
9306 	TaitoNumChar = 0x8000;
9307 	TaitoNumSpriteA = 0x4000;
9308 
9309 	TaitoLoadRoms(0);
9310 
9311 	// Allocate and Blank all required memory
9312 	TaitoMem = NULL;
9313 	MemIndex();
9314 	nLen = TaitoMemEnd - (UINT8 *)0;
9315 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
9316 	memset(TaitoMem, 0, nLen);
9317 	MemIndex();
9318 
9319 	if (TaitoLoadRoms(1)) return 1;
9320 
9321 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, TaitoPriorityMap);
9322 	TC0140SYTInit(0);
9323 	TC0360PRIInit();
9324 
9325 #ifdef BUILD_A68K
9326 	SwitchToMusashi();
9327 #endif
9328 
9329 	// Setup the 68000 emulation
9330 	SekInit(0, 0x68000);
9331 	SekOpen(0);
9332 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
9333 	SekMapMemory(Taito68KRam1             , 0x100000, 0x10ffff, MAP_RAM);
9334 	SekMapMemory(TaitoPaletteRam          , 0x200000, 0x201fff, MAP_RAM);
9335 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
9336 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
9337 	SekSetReadByteHandler(0, Solfigtr68KReadByte);
9338 	SekSetWriteByteHandler(0, Solfigtr68KWriteByte);
9339 	SekSetReadWordHandler(0, Solfigtr68KReadWord);
9340 	SekSetWriteWordHandler(0, Solfigtr68KWriteWord);
9341 	SekClose();
9342 
9343 	TaitoF2SoundInit();
9344 
9345 	TaitoXOffset = 3;
9346 
9347 	SpritePriWritebackMode = 0;
9348 
9349 	// Reset the driver
9350 	TaitoF2DoReset();
9351 
9352 	return 0;
9353 }
9354 
SsiInit()9355 static INT32 SsiInit()
9356 {
9357 	INT32 nLen;
9358 
9359 	TaitoF2Init();
9360 
9361 	TaitoNumSpriteA = 0x2000;
9362 
9363 	TaitoLoadRoms(0);
9364 
9365 	// Allocate and Blank all required memory
9366 	TaitoMem = NULL;
9367 	MemIndex();
9368 	nLen = TaitoMemEnd - (UINT8 *)0;
9369 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
9370 	memset(TaitoMem, 0, nLen);
9371 	MemIndex();
9372 
9373 	if (TaitoLoadRoms(1)) return 1;
9374 
9375 	TC0100SCNInit(0, TaitoNumChar, 0, 0, 0, NULL);
9376 	TC0140SYTInit(0);
9377 	TC0510NIOInit();
9378 
9379 #ifdef BUILD_A68K
9380 	SwitchToMusashi();
9381 #endif
9382 
9383 	// Setup the 68000 emulation
9384 	SekInit(0, 0x68000);
9385 	SekOpen(0);
9386 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
9387 	SekMapMemory(Taito68KRam1             , 0x200000, 0x20ffff, MAP_RAM);
9388 	SekMapMemory(TaitoPaletteRam          , 0x300000, 0x301fff, MAP_RAM);
9389 	SekMapMemory(TC0100SCNRam[0]          , 0x600000, 0x60ffff, MAP_READ);
9390 	SekMapMemory(TaitoSpriteRam           , 0x800000, 0x80ffff, MAP_RAM);
9391 	SekSetReadByteHandler(0, Ssi68KReadByte);
9392 	SekSetWriteByteHandler(0, Ssi68KWriteByte);
9393 	SekSetReadWordHandler(0, Ssi68KReadWord);
9394 	SekSetWriteWordHandler(0, Ssi68KWriteWord);
9395 	SekClose();
9396 
9397 	TaitoF2SoundInit();
9398 
9399 	TaitoXOffset = 3;
9400 	TaitoF2SpriteBufferFunction = TaitoF2PartialBufferDelayedThundfox;
9401 
9402 	// Reset the driver
9403 	TaitoF2DoReset();
9404 
9405 	return 0;
9406 }
9407 
ThundfoxInit()9408 static INT32 ThundfoxInit()
9409 {
9410 	INT32 nLen;
9411 
9412 	TaitoF2Init();
9413 
9414 	TaitoNumChar = 0x4000;
9415 
9416 	TaitoCharBModulo = 0x100;
9417 	TaitoCharBNumPlanes = 4;
9418 	TaitoCharBWidth = 8;
9419 	TaitoCharBHeight = 8;
9420 	TaitoCharBPlaneOffsets = CharPlaneOffsets;
9421 	TaitoCharBXOffsets = CharXOffsets;
9422 	TaitoCharBYOffsets = CharYOffsets;
9423 	TaitoNumCharB = 0x4000;
9424 
9425 	TaitoNumSpriteA = 0x2000;
9426 
9427 	TaitoLoadRoms(0);
9428 
9429 	// Allocate and Blank all required memory
9430 	TaitoMem = NULL;
9431 	MemIndex();
9432 	nLen = TaitoMemEnd - (UINT8 *)0;
9433 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
9434 	memset(TaitoMem, 0, nLen);
9435 	MemIndex();
9436 
9437 	if (TaitoLoadRoms(1)) return 1;
9438 
9439 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, NULL);
9440 	TC0100SCNSetClipArea(0, nScreenWidth, nScreenHeight, 0);
9441 	TC0100SCNInit(1, TaitoNumCharB, 3, 16, 0, NULL);
9442 	TC0100SCNSetClipArea(1, nScreenWidth, nScreenHeight, 0);
9443 	TC0140SYTInit(0);
9444 	TC0220IOCInit();
9445 	TC0360PRIInit();
9446 
9447 #ifdef BUILD_A68K
9448 	SwitchToMusashi();
9449 #endif
9450 
9451 	// Setup the 68000 emulation
9452 	SekInit(0, 0x68000);
9453 	SekOpen(0);
9454 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
9455 	SekMapMemory(TaitoPaletteRam          , 0x100000, 0x101fff, MAP_RAM);
9456 	SekMapMemory(Taito68KRam1             , 0x300000, 0x30ffff, MAP_RAM);
9457 	SekMapMemory(TC0100SCNRam[0]          , 0x400000, 0x40ffff, MAP_READ);
9458 	SekMapMemory(TC0100SCNRam[1]          , 0x500000, 0x50ffff, MAP_READ);
9459 	SekMapMemory(TaitoSpriteRam           , 0x600000, 0x60ffff, MAP_RAM);
9460 	SekSetReadByteHandler(0, Thundfox68KReadByte);
9461 	SekSetWriteByteHandler(0, Thundfox68KWriteByte);
9462 	SekSetReadWordHandler(0, Thundfox68KReadWord);
9463 	SekSetWriteWordHandler(0, Thundfox68KWriteWord);
9464 	SekClose();
9465 
9466 	TaitoF2SoundInit();
9467 
9468 	TaitoXOffset = 3;
9469 	TaitoF2SpriteBufferFunction = TaitoF2PartialBufferDelayedThundfox;
9470 
9471 	// Reset the driver
9472 	TaitoF2DoReset();
9473 
9474 	return 0;
9475 }
9476 
YesnojInit()9477 static INT32 YesnojInit()
9478 {
9479 	INT32 nLen;
9480 
9481 	TaitoF2Init();
9482 
9483 	TaitoCharModulo = 0x40;
9484 	TaitoCharNumPlanes = 1;
9485 	TaitoCharWidth = 8;
9486 	TaitoCharHeight = 8;
9487 	TaitoCharPlaneOffsets = YuyugogoCharPlaneOffsets;
9488 	TaitoCharXOffsets = YuyugogoCharXOffsets;
9489 	TaitoCharYOffsets = YuyugogoCharYOffsets;
9490 	TaitoNumChar = 0x10000;
9491 
9492 	TaitoNumSpriteA = 0x2000;
9493 
9494 	TaitoLoadRoms(0);
9495 
9496 	// Allocate and Blank all required memory
9497 	TaitoMem = NULL;
9498 	MemIndex();
9499 	nLen = TaitoMemEnd - (UINT8 *)0;
9500 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
9501 	memset(TaitoMem, 0, nLen);
9502 	MemIndex();
9503 
9504 	if (TaitoLoadRoms(1)) return 1;
9505 
9506 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, NULL);
9507 	TC0140SYTInit(0);
9508 
9509 #ifdef BUILD_A68K
9510 	SwitchToMusashi();
9511 #endif
9512 
9513 	// Setup the 68000 emulation
9514 	SekInit(0, 0x68000);
9515 	SekOpen(0);
9516 	SekMapMemory(Taito68KRom1             , 0x000000, 0x07ffff, MAP_ROM);
9517 	SekMapMemory(Taito68KRam1             , 0x200000, 0x20ffff, MAP_RAM);
9518 	SekMapMemory(TaitoSpriteRam           , 0x400000, 0x40ffff, MAP_RAM);
9519 	SekMapMemory(TC0100SCNRam[0]          , 0x500000, 0x50ffff, MAP_READ);
9520 	SekMapMemory(TaitoPaletteRam          , 0x600000, 0x601fff, MAP_RAM);
9521 	SekSetReadByteHandler(0, Yesnoj68KReadByte);
9522 	SekSetWriteByteHandler(0, Yesnoj68KWriteByte);
9523 	SekSetReadWordHandler(0, Yesnoj68KReadWord);
9524 	SekSetWriteWordHandler(0, Yesnoj68KWriteWord);
9525 	SekClose();
9526 
9527 	TaitoF2SoundInit();
9528 
9529 	TaitoXOffset = 3;
9530 	bNoClearOpposites = 1;
9531 
9532 	// Reset the driver
9533 	TaitoF2DoReset();
9534 
9535 	return 0;
9536 }
9537 
YuyugogoInit()9538 static INT32 YuyugogoInit()
9539 {
9540 	INT32 nLen;
9541 
9542 	TaitoF2Init();
9543 
9544 	TaitoCharModulo = 0x40;
9545 	TaitoCharNumPlanes = 1;
9546 	TaitoCharWidth = 8;
9547 	TaitoCharHeight = 8;
9548 	TaitoCharPlaneOffsets = YuyugogoCharPlaneOffsets;
9549 	TaitoCharXOffsets = YuyugogoCharXOffsets;
9550 	TaitoCharYOffsets = YuyugogoCharYOffsets;
9551 	TaitoNumChar = 0x4000;
9552 
9553 	TaitoNumSpriteA = 0x4000;
9554 
9555 	TaitoLoadRoms(0);
9556 
9557 	// Allocate and Blank all required memory
9558 	TaitoMem = NULL;
9559 	MemIndex();
9560 	nLen = TaitoMemEnd - (UINT8 *)0;
9561 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
9562 	memset(TaitoMem, 0, nLen);
9563 	MemIndex();
9564 
9565 	if (TaitoLoadRoms(1)) return 1;
9566 
9567 	TC0100SCNInit(0, TaitoNumChar, 3, 8, 0, NULL);
9568 	TC0140SYTInit(0);
9569 	TC0510NIOInit();
9570 
9571 #ifdef BUILD_A68K
9572 	SwitchToMusashi();
9573 #endif
9574 
9575 	// Setup the 68000 emulation
9576 	SekInit(0, 0x68000);
9577 	SekOpen(0);
9578 	SekMapMemory(Taito68KRom1             , 0x000000, 0x03ffff, MAP_ROM);
9579 	SekMapMemory(TC0100SCNRam[0]          , 0x800000, 0x80ffff, MAP_READ);
9580 	SekMapMemory(TaitoSpriteRam           , 0x900000, 0x90ffff, MAP_RAM);
9581 	SekMapMemory(TaitoPaletteRam          , 0xa00000, 0xa01fff, MAP_RAM);
9582 	SekMapMemory(Taito68KRam1             , 0xb00000, 0xb10fff, MAP_RAM);
9583 	SekMapMemory(TaitoSpriteExtension     , 0xc00000, 0xc01fff, MAP_RAM);
9584 	SekMapMemory(Taito68KRom1 + 0x40000   , 0xd00000, 0xdfffff, MAP_ROM);
9585 	SekSetReadByteHandler(0, Yuyugogo68KReadByte);
9586 	SekSetWriteByteHandler(0, Yuyugogo68KWriteByte);
9587 	SekSetReadWordHandler(0, Yuyugogo68KReadWord);
9588 	SekSetWriteWordHandler(0, Yuyugogo68KWriteWord);
9589 	SekClose();
9590 
9591 	TaitoF2SoundInit();
9592 
9593 	TaitoF2SpriteType = 1;
9594 	TaitoXOffset = 3;
9595 	bNoClearOpposites = 1;
9596 
9597 	// Reset the driver
9598 	TaitoF2DoReset();
9599 
9600 	return 0;
9601 }
9602 
TaitoF2Exit()9603 static INT32 TaitoF2Exit()
9604 {
9605 	TaitoExit();
9606 
9607 	TaitoF2SpritesFlipScreen = 0;
9608 	TaitoF2SpriteBlendMode = 0;
9609 	TaitoF2TilePriority[0] = TaitoF2TilePriority[1] = TaitoF2TilePriority[2] = TaitoF2TilePriority[3] = TaitoF2TilePriority[4] = 0;
9610 	TaitoF2SpritePriority[0] = TaitoF2SpritePriority[1] = TaitoF2SpritePriority[2] = TaitoF2SpritePriority[3] = 0;
9611 
9612 	TaitoF2SpriteType = 0;
9613 	Footchmp = 0;
9614 	YesnoDip = 0;
9615 	MjnquestInput = 0;
9616 	DriveoutSoundNibble = 0;
9617 	DriveoutOkiBank = 0;
9618 
9619 	bNoClearOpposites = 0;
9620 
9621 	Driftout = 0;
9622 
9623 	TaitoF2SpriteBufferFunction = NULL;
9624 
9625 	PaletteType = 0;
9626 	SpritePriWritebackMode = 0;
9627 
9628 #ifdef BUILD_A68K
9629 	// Switch back CPU core if needed
9630 	if (bUseAsm68KCoreOldValue) {
9631 #if 1 && defined FBNEO_DEBUG
9632 		bprintf(PRINT_NORMAL, _T("Switching back to A68K core\n"));
9633 #endif
9634 		bUseAsm68KCoreOldValue = false;
9635 		bBurnUseASMCPUEmulation = true;
9636 	}
9637 #endif
9638 
9639 	return 0;
9640 }
9641 
pal4bit(UINT8 bits)9642 static inline UINT8 pal4bit(UINT8 bits)
9643 {
9644 	bits &= 0x0f;
9645 	return (bits << 4) | bits;
9646 }
9647 
pal5bit(UINT8 bits)9648 static inline UINT8 pal5bit(UINT8 bits)
9649 {
9650 	bits &= 0x1f;
9651 	return (bits << 3) | (bits >> 2);
9652 }
9653 
9654 
CalcCol(UINT16 nColour)9655 inline static INT32 CalcCol(UINT16 nColour)
9656 {
9657 	INT32 r, g, b;
9658 
9659 	r = pal4bit(BURN_ENDIAN_SWAP_INT16(nColour) >> 12);
9660 	g = pal4bit(BURN_ENDIAN_SWAP_INT16(nColour) >>  8);
9661 	b = pal4bit(BURN_ENDIAN_SWAP_INT16(nColour) >>  4);
9662 
9663 	return BurnHighCol(r, g, b, 0);
9664 }
9665 
QzquestCalcCol(UINT16 nColour)9666 inline static INT32 QzquestCalcCol(UINT16 nColour)
9667 {
9668 	INT32 r, g, b;
9669 
9670 	r = pal5bit(BURN_ENDIAN_SWAP_INT16(nColour) >> 10);
9671 	g = pal5bit(BURN_ENDIAN_SWAP_INT16(nColour) >>  5);
9672 	b = pal5bit(BURN_ENDIAN_SWAP_INT16(nColour) >>  0);
9673 
9674 	return BurnHighCol(r, g, b, 0);
9675 }
9676 
TaitoF2CalcPalette()9677 static void TaitoF2CalcPalette()
9678 {
9679 	INT32 i;
9680 	UINT16* ps;
9681 	UINT32* pd;
9682 
9683 	for (i = 0, ps = (UINT16*)TaitoPaletteRam, pd = TaitoPalette; i < 0x1000; i++, ps++, pd++) {
9684 		*pd = CalcCol(*ps);
9685 	}
9686 }
9687 
MetalbCalcPalette()9688 static void MetalbCalcPalette()
9689 {
9690 	INT32 i;
9691 	UINT16* ps;
9692 	UINT32* pd;
9693 
9694 	for (i = 0, ps = (UINT16*)TaitoPaletteRam, pd = TaitoPalette; i < 0x2000; i++, ps++, pd++) {
9695 		*pd = CalcCol(*ps);
9696 	}
9697 }
9698 
QzquestCalcPalette()9699 static void QzquestCalcPalette()
9700 {
9701 	INT32 i;
9702 	UINT16* ps;
9703 	UINT32* pd;
9704 
9705 	for (i = 0, ps = (UINT16*)TaitoPaletteRam, pd = TaitoPalette; i < 0x1000; i++, ps++, pd++) {
9706 		*pd = QzquestCalcCol(*ps);
9707 	}
9708 }
9709 
DynCalcPalette()9710 static void DynCalcPalette()
9711 {
9712 	switch (PaletteType) { // 0 taito, 1 metalb, 2 qzquest
9713 		case 0: TaitoF2CalcPalette(); break;
9714 		case 1: MetalbCalcPalette(); break;
9715 		case 2: QzquestCalcPalette(); break;
9716 	}
9717 }
9718 
UpdateTaitoF2SpriteBanks()9719 static void UpdateTaitoF2SpriteBanks()
9720 {
9721 	INT32 i;
9722 
9723 	for (i = 0; i < 8; i++) {
9724 		TaitoF2SpriteBank[i] = TaitoF2SpriteBankBuffered[i];
9725 	}
9726 }
9727 
TaitoF2HandleSpriteBuffering()9728 void TaitoF2HandleSpriteBuffering()
9729 {
9730 	if (TaitoF2PrepareSprites) {
9731 		memcpy(TaitoSpriteRamBuffered, TaitoSpriteRam, 0x10000);
9732 		TaitoF2PrepareSprites = 0;
9733 	}
9734 }
9735 
TaitoF2UpdateSpritesActiveArea()9736 static void TaitoF2UpdateSpritesActiveArea()
9737 {
9738 	INT32 Off;
9739 	UINT16 *SpriteRamBuffered = (UINT16*)TaitoSpriteRamBuffered;
9740 
9741 	UpdateTaitoF2SpriteBanks();
9742 
9743 	TaitoF2HandleSpriteBuffering();
9744 
9745 	if (TaitoF2SpritesActiveArea == 0x8000 && SpriteRamBuffered[(0x8000 + 6) / 2] == 0 && SpriteRamBuffered[(0x8000 + 10) / 2] == 0) TaitoF2SpritesActiveArea = 0;
9746 
9747 	for (Off = 0; Off < 0x4000; Off += 16) {
9748 		INT32 Offs = Off + TaitoF2SpritesActiveArea;
9749 
9750 		if (SpriteRamBuffered[(Offs + 6) / 2] & 0x8000) {
9751 			TaitoF2SpritesDisabled = SpriteRamBuffered[(Offs + 10) / 2] & 0x1000;
9752 			if (Footchmp) {
9753 				TaitoF2SpritesActiveArea = 0x8000 * (SpriteRamBuffered[(Offs + 6) / 2] & 0x0001);
9754 			} else {
9755 				TaitoF2SpritesActiveArea = 0x8000 * (SpriteRamBuffered[(Offs + 10) / 2] & 0x0001);
9756 			}
9757 		}
9758 
9759 		if ((SpriteRamBuffered[(Offs + 4) / 2] & 0xf000) == 0xa000) {
9760 			TaitoF2SpritesMasterScrollX = SpriteRamBuffered[(Offs + 4) / 2] & 0xfff;
9761 			if (TaitoF2SpritesMasterScrollX >= 0x800) TaitoF2SpritesMasterScrollX -= 0x1000;
9762 
9763 			TaitoF2SpritesMasterScrollY = SpriteRamBuffered[(Offs + 6) / 2] & 0xfff;
9764 			if (TaitoF2SpritesMasterScrollY >= 0x800) TaitoF2SpritesMasterScrollY -= 0x1000;
9765 		}
9766 	}
9767 }
9768 
RenderSpriteZoom(INT32 Code,INT32 sx,INT32 sy,INT32 Colour,INT32 xFlip,INT32 yFlip,INT32 xScale,INT32 yScale,INT32 Priority,UINT8 * pSource)9769 static void RenderSpriteZoom(INT32 Code, INT32 sx, INT32 sy, INT32 Colour, INT32 xFlip, INT32 yFlip, INT32 xScale, INT32 yScale, INT32 Priority, UINT8* pSource)
9770 {
9771 	UINT8 *SourceBase = pSource + ((Code % TaitoNumSpriteA) * TaitoSpriteAWidth * TaitoSpriteAHeight);
9772 
9773 	INT32 SpriteScreenHeight = (yScale * TaitoSpriteAHeight + 0x8000) >> 16;
9774 	INT32 SpriteScreenWidth = (xScale * TaitoSpriteAWidth + 0x8000) >> 16;
9775 
9776 	Colour = 0x10 * (Colour % 0x100);
9777 
9778 	if (TaitoF2SpritesFlipScreen) {
9779 		xFlip = !xFlip;
9780 		sx = 320 - sx - (xScale >> 12);
9781 		yFlip = !yFlip;
9782 		sy = 256 - sy - (yScale >> 12);
9783 	}
9784 
9785 	if (SpriteScreenWidth && SpriteScreenHeight) {
9786 		INT32 dx = (TaitoSpriteAWidth << 16) / SpriteScreenWidth;
9787 		INT32 dy = (TaitoSpriteAHeight << 16) / SpriteScreenHeight;
9788 
9789 		INT32 ex = sx + SpriteScreenWidth;
9790 		INT32 ey = sy + SpriteScreenHeight;
9791 
9792 		INT32 xIndexBase;
9793 		INT32 yIndex;
9794 
9795 		if (xFlip) {
9796 			xIndexBase = (SpriteScreenWidth - 1) * dx;
9797 			dx = -dx;
9798 		} else {
9799 			xIndexBase = 0;
9800 		}
9801 
9802 		if (yFlip) {
9803 			yIndex = (SpriteScreenHeight - 1) * dy;
9804 			dy = -dy;
9805 		} else {
9806 			yIndex = 0;
9807 		}
9808 
9809 		if (sx < 0) {
9810 			INT32 Pixels = 0 - sx;
9811 			sx += Pixels;
9812 			xIndexBase += Pixels * dx;
9813 		}
9814 
9815 		if (sy < 0) {
9816 			INT32 Pixels = 0 - sy;
9817 			sy += Pixels;
9818 			yIndex += Pixels * dy;
9819 		}
9820 
9821 		if (ex > nScreenWidth) {
9822 			INT32 Pixels = ex - nScreenWidth;
9823 			ex -= Pixels;
9824 		}
9825 
9826 		if (ey > nScreenHeight) {
9827 			INT32 Pixels = ey - nScreenHeight;
9828 			ey -= Pixels;
9829 		}
9830 
9831 		if (ex > sx) {
9832 			INT32 y;
9833 
9834 			for (y = sy; y < ey; y++) {
9835 				UINT8 *Source = SourceBase + ((yIndex >> 16) * TaitoSpriteAWidth);
9836 				UINT16* pPixel = pTransDraw + (y * nScreenWidth);
9837 
9838 				INT32 x, xIndex = xIndexBase;
9839 				for (x = sx; x < ex; x++) {
9840 					INT32 c = Source[xIndex >> 16];
9841 					UINT8 *pri = &TaitoPriorityMap[(y * nScreenWidth) + x];
9842 					if (c && (*pri & 0x80) == 0) {
9843 						if (TaitoIC_TC0360PRIInUse) {
9844 							INT32 Pri = *pri;
9845 							INT32 TilePri = 0;
9846 
9847 							if (TaitoIC_TC0100SCNInUse || PaletteType == METALBPalette) {
9848 								if (Pri & 0x01) TilePri = TaitoF2TilePriority[0];
9849 								if (Pri & 0x02) TilePri = TaitoF2TilePriority[1];
9850 								if (Pri & 0x04) TilePri = TaitoF2TilePriority[2];
9851 								if (Pri & 0x08) TilePri = TaitoF2TilePriority[3];
9852 								if (Pri & 0x10) TilePri = TaitoF2TilePriority[4];
9853 							}
9854 
9855 							if (((TaitoF2SpriteBlendMode & 0xc0) == 0xc0) && (Priority == (TilePri - 1)))
9856 							{
9857 								pPixel[x] = ((c | Colour) & 0xfff0) | (pPixel[x] & 0x0f);
9858 							}
9859 							else if (((TaitoF2SpriteBlendMode & 0xc0) == 0xc0) && (Priority == (TilePri + 1)))
9860 							{
9861 								if (pPixel[x] & 0x0f) {
9862 									pPixel[x] = (pPixel[x] & 0xfff0) | ((c | Colour) & 0x0f);
9863 								} else {
9864 									pPixel[x] = c | Colour;
9865 								}
9866 							}
9867 							else if (((TaitoF2SpriteBlendMode & 0xc0) == 0x80) && (Priority == (TilePri - 1)))
9868 							{
9869 								pPixel[x] = pPixel[x] & 0xffef;
9870 							}
9871 							else if (((TaitoF2SpriteBlendMode & 0xc0) == 0x80) && (Priority == (TilePri + 1)))
9872 							{
9873 								pPixel[x] = ((c | Colour) & 0xffef);
9874 							}
9875 							else
9876 							{
9877 								if (Priority > TilePri)
9878 									pPixel[x] = c | Colour;
9879 							}
9880 
9881 							*pri |= ((SpritePriWritebackMode) ? 0x00 : 0x80);
9882 						} else {
9883 							pPixel[x] = c | Colour;
9884 						}
9885 					}
9886 					xIndex += dx;
9887 				}
9888 
9889 				yIndex += dy;
9890 			}
9891 		}
9892 	}
9893 }
9894 
RenderSpriteZoomPriMask(INT32 Code,INT32 sx,INT32 sy,INT32 Colour,INT32 xFlip,INT32 yFlip,INT32 xScale,INT32 yScale,INT32 Priority,UINT8 * pSource)9895 static void RenderSpriteZoomPriMask(INT32 Code, INT32 sx, INT32 sy, INT32 Colour, INT32 xFlip, INT32 yFlip, INT32 xScale, INT32 yScale, INT32 Priority, UINT8* pSource)
9896 {
9897 	UINT8 *SourceBase = pSource + ((Code % TaitoNumSpriteA) * TaitoSpriteAWidth * TaitoSpriteAHeight);
9898 
9899 	INT32 SpriteScreenHeight = (yScale * TaitoSpriteAHeight + 0x8000) >> 16;
9900 	INT32 SpriteScreenWidth = (xScale * TaitoSpriteAWidth + 0x8000) >> 16;
9901 
9902 	Colour = 0x10 * (Colour % 0x100);
9903 	Priority |= 1<<31;
9904 	if (TaitoF2SpritesFlipScreen) {
9905 		xFlip = !xFlip;
9906 		sx = 320 - sx - (xScale >> 12);
9907 		yFlip = !yFlip;
9908 		sy = 256 - sy - (yScale >> 12);
9909 	}
9910 
9911 	if (SpriteScreenWidth && SpriteScreenHeight) {
9912 		INT32 dx = (TaitoSpriteAWidth << 16) / SpriteScreenWidth;
9913 		INT32 dy = (TaitoSpriteAHeight << 16) / SpriteScreenHeight;
9914 
9915 		INT32 ex = sx + SpriteScreenWidth;
9916 		INT32 ey = sy + SpriteScreenHeight;
9917 
9918 		INT32 xIndexBase;
9919 		INT32 yIndex;
9920 
9921 		if (xFlip) {
9922 			xIndexBase = (SpriteScreenWidth - 1) * dx;
9923 			dx = -dx;
9924 		} else {
9925 			xIndexBase = 0;
9926 		}
9927 
9928 		if (yFlip) {
9929 			yIndex = (SpriteScreenHeight - 1) * dy;
9930 			dy = -dy;
9931 		} else {
9932 			yIndex = 0;
9933 		}
9934 
9935 		if (sx < 0) {
9936 			INT32 Pixels = 0 - sx;
9937 			sx += Pixels;
9938 			xIndexBase += Pixels * dx;
9939 		}
9940 
9941 		if (sy < 0) {
9942 			INT32 Pixels = 0 - sy;
9943 			sy += Pixels;
9944 			yIndex += Pixels * dy;
9945 		}
9946 
9947 		if (ex > nScreenWidth) {
9948 			INT32 Pixels = ex - nScreenWidth;
9949 			ex -= Pixels;
9950 		}
9951 
9952 		if (ey > nScreenHeight) {
9953 			INT32 Pixels = ey - nScreenHeight;
9954 			ey -= Pixels;
9955 		}
9956 
9957 		if (ex > sx) {
9958 			INT32 y;
9959 
9960 			for (y = sy; y < ey; y++) {
9961 				UINT8 *Source = SourceBase + ((yIndex >> 16) * TaitoSpriteAWidth);
9962 				UINT16* pPixel = pTransDraw + (y * nScreenWidth);
9963 				UINT8 *pri = TaitoPriorityMap + (y * nScreenWidth);
9964 
9965 				INT32 x, xIndex = xIndexBase;
9966 				for (x = sx; x < ex; x++) {
9967 					INT32 c = Source[xIndex >> 16];
9968 					if (c) {
9969 						if ((Priority & (1 << (pri[x]&0x1f))) == 0) {
9970 							pPixel[x] = c | Colour;
9971 						}
9972 						pri[x] = 0x1f;
9973 					}
9974 					xIndex += dx;
9975 				}
9976 
9977 				yIndex += dy;
9978 			}
9979 		}
9980 	}
9981 }
9982 
TaitoF2MakeSpriteList()9983 void TaitoF2MakeSpriteList()
9984 {
9985 	INT32 i, x, y, Off, ExtOffs;
9986 	INT32 Code, Colour, SpriteData, SpriteCont, xFlip, yFlip;
9987 	INT32 xCurrent, yCurrent, BigSprite = 0;
9988 	INT32 yNum = 0, xNum = 0, xLatch = 0, yLatch = 0, LastContinuationTile = 0;
9989 	UINT32 ZoomWord, xZoom, yZoom, zx = 0, zy = 0, xZoomLatch = 0, yZoomLatch = 0;
9990 	INT32 xScroll1, yScroll1;
9991 	INT32 xScroll = 0, yScroll = 0;
9992 	INT32 xCur, yCur;
9993 	INT32 xOffset = 0;
9994 
9995 	INT32 Disabled = TaitoF2SpritesDisabled;
9996 	INT32 MasterScrollX = TaitoF2SpritesMasterScrollX;
9997 	INT32 MasterScrollY = TaitoF2SpritesMasterScrollY;
9998 	INT32 Area = TaitoF2SpritesActiveArea;
9999 
10000 	UINT16 *SpriteRamBuffered = (UINT16*)TaitoSpriteRamBuffered;
10001 	UINT16 *SpriteExtension = (UINT16*)TaitoSpriteExtension;
10002 	struct TaitoF2SpriteEntry *SpritePtr = TaitoF2SpriteList;
10003 
10004 	memset(TaitoF2SpriteList, 0, 0x400 * sizeof(TaitoF2SpriteEntry));
10005 
10006 	xScroll1 = 0;
10007 	yScroll1 = 0;
10008 	x = y = 0;
10009 	xCurrent = yCurrent = 0;
10010 	Colour = 0;
10011 
10012 	xOffset = TaitoXOffset;
10013 	if (TaitoF2SpritesFlipScreen) xOffset = -TaitoXOffset;
10014 
10015 	if (Area == 0x8000 && SpriteRamBuffered[(0x8000 + 6) / 2] == 0 && SpriteRamBuffered[(0x8000 + 10) / 2] == 0) Area = 0;
10016 
10017 	for (Off = 0; Off < 0x4000; Off += 16) {
10018 		INT32 Offs = Off + Area;
10019 
10020 		if (SpriteRamBuffered[(Offs + 6) / 2] & 0x8000) {
10021 			Disabled = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 10) / 2]) & 0x1000;
10022 			TaitoF2SpritesFlipScreen = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 10) / 2]) & 0x2000;
10023 
10024 			xOffset = TaitoXOffset;
10025 			if (TaitoF2SpritesFlipScreen) xOffset = -TaitoXOffset;
10026 
10027 			if (Footchmp) {
10028 				Area = 0x8000 * (BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 6) / 2]) & 0x0001);
10029 			} else {
10030 				Area = 0x8000 * (BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 10) / 2]) & 0x0001);
10031 			}
10032 		}
10033 
10034 		if ((BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 4) / 2]) & 0xf000) == 0xa000) {
10035 			MasterScrollX = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 4) / 2]) & 0xfff;
10036 			if (MasterScrollX >= 0x800) MasterScrollX -= 0x1000;
10037 
10038 			MasterScrollY = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 6) / 2]) & 0xfff;
10039 			if (MasterScrollY >= 0x800) MasterScrollY -= 0x1000;
10040 		}
10041 
10042 		if ((BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 4) / 2]) & 0xf000) == 0x5000) {
10043 			xScroll1 = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 4) / 2]) & 0xfff;
10044 			if (xScroll1 >= 0x800) xScroll1 -= 0x1000;
10045 
10046 			yScroll1 = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 6) / 2]) & 0xfff;
10047 			if (yScroll1 >= 0x800) yScroll1 -= 0x1000;
10048 		}
10049 
10050 		if (Disabled)
10051 			continue;
10052 
10053 		SpriteData = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 8) / 2]);
10054 
10055 		SpriteCont = (SpriteData & 0xff00) >> 8;
10056 
10057 		if ((SpriteCont & 0x08) != 0) {
10058 			if (BigSprite == 0) {
10059 				xLatch = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 4) / 2]) & 0xfff;
10060 				yLatch = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 6) / 2]) & 0xfff;
10061 				xNum = 0;
10062 				yNum = 0;
10063 				ZoomWord = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 2) / 2]);
10064 				yZoomLatch = (ZoomWord >> 8) & 0xff;
10065 				xZoomLatch = (ZoomWord) & 0xff;
10066 				BigSprite = 1;
10067 			}
10068 		} else if (BigSprite) {
10069 			LastContinuationTile = 1;
10070 		}
10071 
10072 		if ((SpriteCont & 0x04) == 0) Colour = SpriteData & 0xff;
10073 
10074 		if (BigSprite == 0 || (SpriteCont & 0xf0) == 0) {
10075 			x = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 4) / 2]);
10076 
10077 			if (x & 0x8000) {
10078 				xScroll = -xOffset - 0x60;
10079 				yScroll = 0;
10080 			} else if (x & 0x4000) {
10081 				xScroll = MasterScrollX - xOffset - 0x60;
10082 				yScroll = MasterScrollY;
10083 			} else {
10084 				xScroll = xScroll1 + MasterScrollX - xOffset - 0x60;
10085 				yScroll = yScroll1 + MasterScrollY;
10086 			}
10087 
10088 			x &= 0xfff;
10089 			y = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[(Offs + 6) / 2]) & 0xfff;
10090 
10091 			xCurrent = x;
10092 			yCurrent = y;
10093 		} else {
10094 			if ((SpriteCont & 0x10) == 0) {
10095 				y = yCurrent;
10096 			} else if ((SpriteCont & 0x20) != 0) {
10097 				y += 16;
10098 				yNum++;
10099 			}
10100 
10101 			if ((SpriteCont & 0x40) == 0) {
10102 				x = xCurrent;
10103 			} else if ((SpriteCont & 0x80) != 0){
10104 				x += 16;
10105 				yNum=0;
10106 				xNum++;
10107 			}
10108 		}
10109 
10110 		if (BigSprite) {
10111 			xZoom = xZoomLatch;
10112 			yZoom = yZoomLatch;
10113 			zx = 0x10;
10114 			zy = 0x10;
10115 
10116 			if (xZoom || yZoom) {
10117 				x = xLatch + (xNum * (0x100 - xZoom) + 12) / 16;
10118 				y = yLatch + (yNum * (0x100 - yZoom) + 12) / 16;
10119 				zx = xLatch + ((xNum + 1) * (0x100 - xZoom) + 12) / 16 - x;
10120 				zy = yLatch + ((yNum + 1) * (0x100 - yZoom) + 12) / 16 - y;
10121 			}
10122 		} else {
10123 			ZoomWord = SpriteRamBuffered[(Offs + 2) / 2];
10124 			yZoom = (ZoomWord >> 8) & 0xff;
10125 			xZoom = (ZoomWord) & 0xff;
10126 			zx = (0x100 - xZoom) / 16;
10127 			zy = (0x100 - yZoom) / 16;
10128 		}
10129 
10130 		if (LastContinuationTile) {
10131 			BigSprite = 0;
10132 			LastContinuationTile = 0;
10133 		}
10134 
10135 		Code = 0;
10136 		ExtOffs = Offs;
10137 		if (ExtOffs >= 0x8000) ExtOffs -= 0x4000;
10138 
10139 		if (TaitoF2SpriteType == 0) {
10140 			Code = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[Offs / 2]) & 0x1fff;
10141 			i = (Code & 0x1c00) >> 10;
10142 			Code = TaitoF2SpriteBank[i] + (Code & 0x3ff);
10143 		}
10144 
10145 		if (TaitoF2SpriteType == 1) {
10146 			Code = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[Offs / 2]) & 0x3ff;
10147 			i = (BURN_ENDIAN_SWAP_INT16(SpriteExtension[(ExtOffs >> 4)]) & 0x3f) << 10;
10148 			Code = (i | Code);
10149 		}
10150 
10151 		if (TaitoF2SpriteType == 2) {
10152 			Code = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[Offs / 2]) & 0xff;
10153 			i = (BURN_ENDIAN_SWAP_INT16(SpriteExtension[(ExtOffs >> 4)]) & 0xff00);
10154 			Code = (i | Code);
10155 		}
10156 
10157 		if (TaitoF2SpriteType == 3) {
10158 			Code = BURN_ENDIAN_SWAP_INT16(SpriteRamBuffered[Offs / 2]) & 0xff;
10159 			i = (BURN_ENDIAN_SWAP_INT16(SpriteExtension[ExtOffs >> 4]) & 0xff) << 8;
10160 			Code = (i | Code);
10161 		}
10162 
10163 		if (Code == 0) continue;
10164 
10165 		xFlip = SpriteCont & 0x01;
10166 		yFlip = SpriteCont & 0x02;
10167 
10168 		xCur = (x + xScroll) & 0xfff;
10169 		if (xCur >= 0x800) xCur -= 0x1000;
10170 
10171 		yCur = (y + yScroll) & 0xfff;
10172 		if (yCur >= 0x800) yCur -= 0x1000;
10173 
10174 		if (TaitoF2SpritesFlipScreen) {
10175 			yCur += 16;
10176 		} else {
10177 			yCur -= 16;
10178 		}
10179 
10180 		INT32 Priority = (Colour & 0xc0) >> 6;
10181 
10182 		SpritePtr->Code = Code;
10183 		SpritePtr->x = xCur;
10184 		SpritePtr->y = yCur;
10185 		SpritePtr->Colour = Colour;
10186 		SpritePtr->xFlip = xFlip;
10187 		SpritePtr->yFlip = yFlip;
10188 		SpritePtr->xZoom = zx << 12;
10189 		SpritePtr->yZoom = zy << 12;
10190 		SpritePtr->Priority = TaitoF2SpritePriority[Priority];
10191 		SpritePtr->Priority_Raw = Priority;
10192 		SpritePtr++;
10193 	}
10194 }
10195 
TaitoF2RenderSpriteList(INT32 TaitoF2SpritePriorityLevel)10196 void TaitoF2RenderSpriteList(INT32 TaitoF2SpritePriorityLevel)
10197 {
10198 	for (INT32 i = 0; i < 0x400; i++) {
10199 		if (TaitoF2SpriteList[i].Priority == TaitoF2SpritePriorityLevel) RenderSpriteZoom(TaitoF2SpriteList[i].Code, TaitoF2SpriteList[i].x, TaitoF2SpriteList[i].y, TaitoF2SpriteList[i].Colour, TaitoF2SpriteList[i].xFlip, TaitoF2SpriteList[i].yFlip, TaitoF2SpriteList[i].xZoom, TaitoF2SpriteList[i].yZoom, TaitoF2SpritePriorityLevel, TaitoSpritesA);
10200 	}
10201 }
10202 
TaitoF2RenderSpriteListBackwardsForPriority()10203 void TaitoF2RenderSpriteListBackwardsForPriority()
10204 {
10205 	for (INT32 i = 0x400-1; i > -1; i--) {
10206 		RenderSpriteZoom(TaitoF2SpriteList[i].Code, TaitoF2SpriteList[i].x, TaitoF2SpriteList[i].y, TaitoF2SpriteList[i].Colour, TaitoF2SpriteList[i].xFlip, TaitoF2SpriteList[i].yFlip, TaitoF2SpriteList[i].xZoom, TaitoF2SpriteList[i].yZoom, TaitoF2SpriteList[i].Priority, TaitoSpritesA);
10207 	}
10208 }
10209 
TaitoF2RenderSpriteListPriMasks(INT32 * primasks)10210 void TaitoF2RenderSpriteListPriMasks(INT32 *primasks)
10211 {
10212 	for (INT32 i = 0x400-1; i > -1; i--) {
10213 		RenderSpriteZoomPriMask(TaitoF2SpriteList[i].Code, TaitoF2SpriteList[i].x, TaitoF2SpriteList[i].y, TaitoF2SpriteList[i].Colour, TaitoF2SpriteList[i].xFlip, TaitoF2SpriteList[i].yFlip, TaitoF2SpriteList[i].xZoom, TaitoF2SpriteList[i].yZoom, primasks[TaitoF2SpriteList[i].Priority_Raw & 3], TaitoSpritesA);
10214 	}
10215 }
10216 
TaitoF2NoBuffer()10217 void TaitoF2NoBuffer()
10218 {
10219 	TaitoF2UpdateSpritesActiveArea();
10220 	TaitoF2PrepareSprites = 1;
10221 }
10222 
TaitoF2PartialBufferDelayed()10223 void TaitoF2PartialBufferDelayed()
10224 {
10225 	UINT16 *SpriteRam = (UINT16*)TaitoSpriteRam;
10226 	UINT16 *SpriteRamBuffered = (UINT16*)TaitoSpriteRamBuffered;
10227 
10228 	TaitoF2UpdateSpritesActiveArea();
10229 	TaitoF2PrepareSprites = 0;
10230 	memcpy(TaitoSpriteRamBuffered, TaitoSpriteRamDelayed, 0x10000);
10231 	for (INT32 i = 0; i < 0x10000 / 2; i += 4) SpriteRamBuffered[i] = SpriteRam[i];
10232 	memcpy(TaitoSpriteRamDelayed, TaitoSpriteRam, 0x10000);
10233 }
10234 
TaitoF2PartialBufferDelayedQzchikyu()10235 void TaitoF2PartialBufferDelayedQzchikyu()
10236 {
10237 	UINT16 *SpriteRam = (UINT16*)TaitoSpriteRam;
10238 	UINT16 *SpriteRamBuffered = (UINT16*)TaitoSpriteRamBuffered;
10239 
10240 	TaitoF2UpdateSpritesActiveArea();
10241 	TaitoF2PrepareSprites = 0;
10242 	memcpy(TaitoSpriteRamBuffered, TaitoSpriteRamDelayed, 0x10000);
10243 	for (INT32 i = 0; i < 0x10000 / 2; i += 8) {
10244 		SpriteRamBuffered[i + 0] = SpriteRam[i + 0];
10245 		SpriteRamBuffered[i + 1] = SpriteRam[i + 1];
10246 		SpriteRamBuffered[i + 4] = SpriteRam[i + 4];
10247 		SpriteRamBuffered[i + 5] = SpriteRam[i + 5];
10248 		SpriteRamBuffered[i + 6] = SpriteRam[i + 6];
10249 		SpriteRamBuffered[i + 7] = SpriteRam[i + 7];
10250 	}
10251 	memcpy(TaitoSpriteRamDelayed, TaitoSpriteRam, 0x10000);
10252 }
10253 
TaitoF2PartialBufferDelayedThundfox()10254 void TaitoF2PartialBufferDelayedThundfox()
10255 {
10256 	UINT16 *SpriteRam = (UINT16*)TaitoSpriteRam;
10257 	UINT16 *SpriteRamBuffered = (UINT16*)TaitoSpriteRamBuffered;
10258 
10259 	TaitoF2UpdateSpritesActiveArea();
10260 	TaitoF2PrepareSprites = 0;
10261 	memcpy(TaitoSpriteRamBuffered, TaitoSpriteRamDelayed, 0x10000);
10262 	for (INT32 i = 0; i < 0x10000 / 2; i += 8) {
10263 		SpriteRamBuffered[i + 0] = SpriteRam[i + 0];
10264 		SpriteRamBuffered[i + 1] = SpriteRam[i + 1];
10265 		SpriteRamBuffered[i + 4] = SpriteRam[i + 4];
10266 	}
10267 	memcpy(TaitoSpriteRamDelayed, TaitoSpriteRam, 0x10000);
10268 }
10269 
TaitoF2FullBufferDelayed()10270 void TaitoF2FullBufferDelayed()
10271 {
10272 	UINT16 *SpriteRam = (UINT16*)TaitoSpriteRam;
10273 	UINT16 *SpriteRamBuffered = (UINT16*)TaitoSpriteRamBuffered;
10274 
10275 	TaitoF2UpdateSpritesActiveArea();
10276 	TaitoF2PrepareSprites = 0;
10277 	memcpy(TaitoSpriteRamBuffered, TaitoSpriteRamDelayed, 0x10000);
10278 	for (INT32 i = 0;i < 0x10000 / 2; i++) SpriteRamBuffered[i] = SpriteRam[i];
10279 	memcpy(TaitoSpriteRamDelayed, TaitoSpriteRam, 0x10000);
10280 }
10281 
TaitoF2Draw()10282 static INT32 TaitoF2Draw()
10283 {
10284 	INT32 i;
10285 	INT32 Disable = TC0100SCNCtrl[0][6] & 0xf7;
10286 	INT32 DrawLayer0 = 1;
10287 	INT32 DrawLayer1 = 1;
10288 	INT32 DrawLayer2 = 1;
10289 
10290 	if (TC0100SCNBottomLayer(0)) {
10291 		TaitoF2TilePriority[1] = TC0360PRIRegs[5] & 0x0f;
10292 		TaitoF2TilePriority[0] = TC0360PRIRegs[5] >> 4;
10293 	} else {
10294 		TaitoF2TilePriority[0] = TC0360PRIRegs[5] & 0x0f;
10295 		TaitoF2TilePriority[1] = TC0360PRIRegs[5] >> 4;
10296 	}
10297 	TaitoF2TilePriority[2] = TC0360PRIRegs[4] >> 4;
10298 
10299 	if (TaitoF2TilePriority[1] < TaitoF2TilePriority[0]) TaitoF2TilePriority[1] = TaitoF2TilePriority[0];
10300 
10301 	TaitoF2SpritePriority[0] = TC0360PRIRegs[6] & 0x0f;
10302 	TaitoF2SpritePriority[1] = TC0360PRIRegs[6] >> 4;
10303 	TaitoF2SpritePriority[2] = TC0360PRIRegs[7] & 0x0f;
10304 	TaitoF2SpritePriority[3] = TC0360PRIRegs[7] >> 4;
10305 
10306 	TaitoF2SpriteBlendMode = TC0360PRIRegs[0] & 0xc0;
10307 
10308 	BurnTransferClear();
10309 	//TaitoF2CalcPalette();
10310 	DynCalcPalette();
10311 
10312 	// Detect when we are using sprite blending with the sprite under the tile layer
10313 	UINT8 TileAltPriority[3] = { 0xff, 0xff, 0xff };
10314 	if (TaitoF2SpriteBlendMode) {
10315 		for (i = 0; i < 4; i++) {
10316 			if (TaitoF2SpritePriority[i] == TaitoF2TilePriority[0] - 1) {
10317 				TileAltPriority[0] = TaitoF2SpritePriority[i];
10318 				DrawLayer0 = 0;
10319 			}
10320 
10321 			if (TaitoF2SpritePriority[i] == TaitoF2TilePriority[1] - 1) {
10322 				TileAltPriority[1] = TaitoF2SpritePriority[i];
10323 				DrawLayer1 = 0;
10324 			}
10325 
10326 			if (TaitoF2SpritePriority[i] == TaitoF2TilePriority[2] - 1) {
10327 				TileAltPriority[2] = TaitoF2SpritePriority[i];
10328 				DrawLayer2 = 0;
10329 			}
10330 		}
10331 	}
10332 
10333 	TaitoF2MakeSpriteList();
10334 
10335 	if (TC0100SCNBottomLayer(0)) {
10336 		for (i = 0; i < 16; i++) {
10337 			if (nBurnLayer & 1) if (TileAltPriority[0] == i) { if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars); }
10338 			if (nBurnLayer & 2) if (TileAltPriority[1] == i) { if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars); }
10339 			if (nBurnLayer & 4) if (TileAltPriority[2] == i) { if (!(Disable & 0x04)) TC0100SCNRenderCharLayer(0); }
10340 
10341 			if (!TaitoIC_TC0360PRIInUse) {
10342 				if (nSpriteEnable & 1) if (TaitoF2SpritePriority[3] == i) TaitoF2RenderSpriteList(TaitoF2SpritePriority[3]);
10343 				if (nSpriteEnable & 2) if (TaitoF2SpritePriority[2] == i) TaitoF2RenderSpriteList(TaitoF2SpritePriority[2]);
10344 				if (nSpriteEnable & 4) if (TaitoF2SpritePriority[1] == i) TaitoF2RenderSpriteList(TaitoF2SpritePriority[1]);
10345 				if (nSpriteEnable & 8) if (TaitoF2SpritePriority[0] == i) TaitoF2RenderSpriteList(TaitoF2SpritePriority[0]);
10346 			}
10347 
10348 			if (nBurnLayer & 1) if (TaitoF2TilePriority[0] == i && DrawLayer0) { if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars); }
10349 			if (nBurnLayer & 2) if (TaitoF2TilePriority[1] == i && DrawLayer1) { if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars); }
10350 			if (nBurnLayer & 4) if (TaitoF2TilePriority[2] == i && DrawLayer2) { if (!(Disable & 0x04)) TC0100SCNRenderCharLayer(0); }
10351 		}
10352 	} else {
10353 		for (i = 0; i < 16; i++) {
10354 			if (nBurnLayer & 2) if (TileAltPriority[0] == i) { if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars); }
10355 			if (nBurnLayer & 1) if (TileAltPriority[1] == i) { if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars); }
10356 			if (nBurnLayer & 4) if (TileAltPriority[2] == i) { if (!(Disable & 0x04)) TC0100SCNRenderCharLayer(0); }
10357 
10358 			if (!TaitoIC_TC0360PRIInUse) {
10359 				if (nSpriteEnable & 1) if (TaitoF2SpritePriority[3] == i) TaitoF2RenderSpriteList(TaitoF2SpritePriority[3]);
10360 				if (nSpriteEnable & 2) if (TaitoF2SpritePriority[2] == i) TaitoF2RenderSpriteList(TaitoF2SpritePriority[2]);
10361 				if (nSpriteEnable & 4) if (TaitoF2SpritePriority[1] == i) TaitoF2RenderSpriteList(TaitoF2SpritePriority[1]);
10362 				if (nSpriteEnable & 8) if (TaitoF2SpritePriority[0] == i) TaitoF2RenderSpriteList(TaitoF2SpritePriority[0]);
10363 			}
10364 
10365 			if (nBurnLayer & 2) if (TaitoF2TilePriority[0] == i && DrawLayer0) { if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars); }
10366 			if (nBurnLayer & 1) if (TaitoF2TilePriority[1] == i && DrawLayer1) { if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars); }
10367 			if (nBurnLayer & 4) if (TaitoF2TilePriority[2] == i && DrawLayer2) { if (!(Disable & 0x04)) TC0100SCNRenderCharLayer(0); }
10368 		}
10369 	}
10370 
10371 	if (TaitoIC_TC0360PRIInUse)
10372 		TaitoF2RenderSpriteListBackwardsForPriority();
10373 
10374 	BurnTransferCopy(TaitoPalette);
10375 
10376 	return 0;
10377 }
10378 
FinalbDraw()10379 static INT32 FinalbDraw()
10380 {
10381 	INT32 Disable = TC0100SCNCtrl[0][6] & 0xf7;
10382 
10383 	BurnTransferClear();
10384 
10385 	TaitoF2SpritePriority[0] = 0;
10386 	TaitoF2SpritePriority[1] = 0;
10387 	TaitoF2SpritePriority[2] = 0;
10388 	TaitoF2SpritePriority[3] = 0;
10389 
10390 	if (TC0100SCNBottomLayer(0)) {
10391 		if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
10392 		if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
10393 	} else {
10394 		if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
10395 		if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
10396 	}
10397 
10398 	TaitoF2MakeSpriteList();
10399 
10400 	TaitoF2RenderSpriteList(0);
10401 
10402 	if (!(Disable & 0x04)) TC0100SCNRenderCharLayer(0);
10403 	BurnTransferCopy(TC0110PCRPalette);
10404 
10405 	return 0;
10406 }
10407 
FootchmpDraw()10408 static INT32 FootchmpDraw() // and deadconx
10409 {
10410 	UINT8 Layer[5];
10411 	UINT16 Priority = TC0480SCPGetBgPriority();
10412 
10413 	Layer[0] = (Priority & 0xf000) >> 12;
10414 	Layer[1] = (Priority & 0x0f00) >>  8;
10415 	Layer[2] = (Priority & 0x00f0) >>  4;
10416 	Layer[3] = (Priority & 0x000f) >>  0;
10417 	Layer[4] = 4;
10418 
10419 	TaitoF2TilePriority[0] = TC0360PRIRegs[4] >> 4;
10420 	TaitoF2TilePriority[1] = TC0360PRIRegs[5] & 0x0f;
10421 	TaitoF2TilePriority[2] = TC0360PRIRegs[5] >> 4;
10422 	TaitoF2TilePriority[3] = TC0360PRIRegs[4] & 0x0f;
10423 	TaitoF2TilePriority[4] = TC0360PRIRegs[7] >> 4;
10424 
10425 	TaitoF2SpritePriority[0] = TC0360PRIRegs[6] & 0x0f;
10426 	TaitoF2SpritePriority[1] = TC0360PRIRegs[6] >> 4;
10427 	TaitoF2SpritePriority[2] = TC0360PRIRegs[7] & 0x0f;
10428 	TaitoF2SpritePriority[3] = TC0360PRIRegs[7] >> 4;
10429 
10430 	BurnTransferClear();
10431 	TaitoF2CalcPalette();
10432 
10433 	if (nBurnLayer & 1) TC0480SCPTilemapRenderPrio(Layer[0], 0, 1, TaitoChars);
10434 	if (nBurnLayer & 2) TC0480SCPTilemapRenderPrio(Layer[1], 0, 2, TaitoChars);
10435 	if (nBurnLayer & 4) TC0480SCPTilemapRenderPrio(Layer[2], 0, 4, TaitoChars);
10436 	if (nBurnLayer & 8) TC0480SCPTilemapRenderPrio(Layer[3], 0, 8, TaitoChars);
10437 
10438 	{ // sprite layer
10439 		TaitoF2MakeSpriteList();
10440 
10441 		INT32 primasks[4] = { 0, 0, 0, 0 };
10442 
10443 		for (INT32 i = 0; i < 4; i++) {
10444 			if (TaitoF2SpritePriority[i] < TaitoF2TilePriority[Layer[0]]) primasks[i] |= 0xaaaa;
10445 			if (TaitoF2SpritePriority[i] < TaitoF2TilePriority[Layer[1]]) primasks[i] |= 0xcccc;
10446 			if (TaitoF2SpritePriority[i] < TaitoF2TilePriority[Layer[2]]) primasks[i] |= 0xf0f0;
10447 			if (TaitoF2SpritePriority[i] < TaitoF2TilePriority[Layer[3]]) primasks[i] |= 0xff00;
10448 		}
10449 
10450 		if (nSpriteEnable & 1)
10451 			TaitoF2RenderSpriteListPriMasks((INT32 *)&primasks);
10452 	}
10453 
10454 	TC0480SCPRenderCharLayer(); // always over
10455 
10456 	BurnTransferCopy(TaitoPalette);
10457 
10458 	return 0;
10459 }
10460 
MetalbDraw()10461 static INT32 MetalbDraw()
10462 {
10463 	UINT8 Layer[4], InvLayer[4];
10464 	UINT16 Priority = TC0480SCPGetBgPriority();
10465 
10466 	Layer[0] = (Priority & 0xf000) >> 12;
10467 	Layer[1] = (Priority & 0x0f00) >>  8;
10468 	Layer[2] = (Priority & 0x00f0) >>  4;
10469 	Layer[3] = (Priority & 0x000f) >>  0;
10470 
10471 	InvLayer[Layer[0]] = 0;
10472 	InvLayer[Layer[1]] = 1;
10473 	InvLayer[Layer[2]] = 2;
10474 	InvLayer[Layer[3]] = 3;
10475 
10476 	TaitoF2TilePriority[InvLayer[0]] = TC0360PRIRegs[4] & 0x0f;
10477 	TaitoF2TilePriority[InvLayer[1]] = TC0360PRIRegs[4] >> 4;
10478 	TaitoF2TilePriority[InvLayer[2]] = TC0360PRIRegs[5] & 0x0f;
10479 	TaitoF2TilePriority[InvLayer[3]] = TC0360PRIRegs[5] >> 4;
10480 	TaitoF2TilePriority[4] = TC0360PRIRegs[9] & 0x0f;
10481 
10482 	TaitoF2SpritePriority[0] = TC0360PRIRegs[6] & 0x0f;
10483 	TaitoF2SpritePriority[1] = TC0360PRIRegs[6] >> 4;
10484 	TaitoF2SpritePriority[2] = TC0360PRIRegs[7] & 0x0f;
10485 	TaitoF2SpritePriority[3] = TC0360PRIRegs[7] >> 4;
10486 
10487 	TaitoF2SpriteBlendMode = TC0360PRIRegs[0] & 0xc0;
10488 
10489 	BurnTransferClear();
10490 	MetalbCalcPalette();
10491 
10492 	TaitoF2MakeSpriteList();
10493 
10494 	if (nBurnLayer & 1) TC0480SCPTilemapRenderPrio(Layer[0], 0, 1, TaitoChars);
10495 	if (nBurnLayer & 2) TC0480SCPTilemapRenderPrio(Layer[1], 0, 2, TaitoChars);
10496 	if (nBurnLayer & 4) TC0480SCPTilemapRenderPrio(Layer[2], 0, 4, TaitoChars);
10497 	if (nBurnLayer & 8) TC0480SCPTilemapRenderPrio(Layer[3], 0, 8, TaitoChars);
10498 
10499 	if (nSpriteEnable & 1) TaitoF2RenderSpriteListBackwardsForPriority();
10500 
10501 	if (nSpriteEnable & 2) TC0480SCPRenderCharLayer();
10502 	BurnTransferCopy(TaitoPalette);
10503 
10504 	return 0;
10505 }
10506 
draw_layer(INT32 layer,INT32 pri)10507 static void draw_layer(INT32 layer, INT32 pri)
10508 {
10509 	INT32 Disable = TC0100SCNCtrl[0][6] & 0xf7;
10510 
10511 	switch (layer) {
10512 		case 0:
10513 			if ((nBurnLayer & 2) && (~Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars, pri);
10514 			break;
10515 		case 1:
10516 			if ((nBurnLayer & 4) && (~Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars, pri);
10517 			break;
10518 		case 2:
10519 			if ((nBurnLayer & 8) && (~Disable & 0x04)) TC0100SCNRenderCharLayer(0, pri);
10520 			break;
10521 	}
10522 }
10523 
TaitoF2PriDraw()10524 static INT32 TaitoF2PriDraw()
10525 {
10526 	INT32 layer[3] = { TC0100SCNBottomLayer(0), TC0100SCNBottomLayer(0) ^ 1, 2 };
10527 
10528 	TaitoF2TilePriority[layer[0]] = TC0360PRIRegs[5] & 0x0f;
10529 	TaitoF2TilePriority[layer[1]] = TC0360PRIRegs[5] >> 4;
10530 	TaitoF2TilePriority[layer[2]] = TC0360PRIRegs[4] >> 4;
10531 
10532 	TaitoF2SpritePriority[0] = TC0360PRIRegs[6] & 0x0f;
10533 	TaitoF2SpritePriority[1] = TC0360PRIRegs[6] >> 4;
10534 	TaitoF2SpritePriority[2] = TC0360PRIRegs[7] & 0x0f;
10535 	TaitoF2SpritePriority[3] = TC0360PRIRegs[7] >> 4;
10536 	TaitoF2SpriteBlendMode = TC0360PRIRegs[0] & 0xc0;
10537 
10538 	BurnTransferClear();
10539 	DynCalcPalette();
10540 
10541 	TaitoF2MakeSpriteList();
10542 
10543 	draw_layer(layer[0], 1);
10544 	draw_layer(layer[1], 2);
10545 	draw_layer(layer[2], 4);
10546 
10547 	if (nSpriteEnable & 1) TaitoF2RenderSpriteListBackwardsForPriority();
10548 
10549 	BurnTransferCopy(TaitoPalette);
10550 
10551 	return 0;
10552 }
10553 
TaitoF2PriRozDraw()10554 static INT32 TaitoF2PriRozDraw()
10555 {
10556 	INT32 Disable = TC0100SCNCtrl[0][6] & 0xf7;
10557 	INT32 RozPriority;
10558 
10559 	INT32 layer[3] = { TC0100SCNBottomLayer(0), TC0100SCNBottomLayer(0) ^ 1, 2 };
10560 
10561 	TaitoF2TilePriority[layer[0]] = TC0360PRIRegs[5] & 0x0f;
10562 	TaitoF2TilePriority[layer[1]] = TC0360PRIRegs[5] >> 4;
10563 	TaitoF2TilePriority[layer[2]] = TC0360PRIRegs[4] >> 4;
10564 
10565 	// tileprilayers[] is a copy of TaitoF2TilePriority[], it needs to stay
10566 	// constant. TaitoF2TilePriority[] gets dynamically altered to suit the
10567 	// rendition.
10568 	INT32 tileprilayers[3] = { TaitoF2TilePriority[0], TaitoF2TilePriority[1], TaitoF2TilePriority[2] };
10569 
10570 	TaitoF2SpritePriority[0] = TC0360PRIRegs[6] & 0x0f;
10571 	TaitoF2SpritePriority[1] = TC0360PRIRegs[6] >> 4;
10572 	TaitoF2SpritePriority[2] = TC0360PRIRegs[7] & 0x0f;
10573 	TaitoF2SpritePriority[3] = TC0360PRIRegs[7] >> 4;
10574 
10575 	TaitoF2SpriteBlendMode = TC0360PRIRegs[0] & 0xc0;
10576 
10577 	RozPriority = (TC0360PRIRegs[1] & 0xc0) >> 6;
10578 	RozPriority = (TC0360PRIRegs[8 + (RozPriority / 2)] >> 4 * (RozPriority & 1)) & 0x0f;
10579 	TC0280GRDBaseColour = (TC0360PRIRegs[1] & 0x3f) << 2;
10580 
10581 	if (Driftout && RozPriority == 0) RozPriority = -1; // disable roz layer for driftout
10582 
10583 	BurnTransferClear();
10584 	DynCalcPalette();
10585 
10586 	TaitoF2MakeSpriteList();
10587 
10588 	INT32 drawn = 0;
10589 	for (INT32 i = 0; i < 16; i++) {
10590 		if (RozPriority == i) {
10591 			if (nBurnLayer & 1) TC0430GRWRenderLayer(1 << drawn);
10592 
10593 			TaitoF2TilePriority[drawn] = i;
10594 			drawn++;
10595 		}
10596 
10597 		for (INT32 j = 0; j < 3; j++) {
10598 			if (tileprilayers[layer[j]] == i) {
10599 				if (nBurnLayer & 2) { if ((layer[j] == 0) && !(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars, 1 << drawn); }
10600 				if (nBurnLayer & 4) { if ((layer[j] == 1) && !(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars, 1 << drawn); }
10601 				if (nBurnLayer & 8) { if ((layer[j] == 2) && !(Disable & 0x04)) TC0100SCNRenderCharLayer(0, 1 << drawn); }
10602 
10603 				TaitoF2TilePriority[drawn] = i;
10604 				drawn++;
10605 			}
10606 		}
10607 	}
10608 
10609 	if (nSpriteEnable & 1) TaitoF2RenderSpriteListBackwardsForPriority();
10610 
10611 	BurnTransferCopy(TaitoPalette);
10612 
10613 	return 0;
10614 }
10615 
QtorimonDraw()10616 static INT32 QtorimonDraw()
10617 {
10618 	INT32 Disable = TC0100SCNCtrl[0][6] & 0xf7;
10619 
10620 	BurnTransferClear();
10621 
10622 	TaitoF2SpritePriority[0] = 0;
10623 	TaitoF2SpritePriority[1] = 0;
10624 	TaitoF2SpritePriority[2] = 0;
10625 	TaitoF2SpritePriority[3] = 0;
10626 
10627 	TaitoF2MakeSpriteList();
10628 
10629 	TaitoF2RenderSpriteList(0);
10630 
10631 	if (!(Disable & 0x04)) TC0100SCNRenderCharLayer(0);
10632 	BurnTransferCopy(TC0110PCRPalette);
10633 
10634 	return 0;
10635 }
10636 
QzquestDraw()10637 static INT32 QzquestDraw()
10638 {
10639 	INT32 Disable = TC0100SCNCtrl[0][6] & 0xf7;
10640 
10641 	BurnTransferClear();
10642 	QzquestCalcPalette();
10643 
10644 	if (TC0100SCNBottomLayer(0)) {
10645 		if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
10646 		if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
10647 	} else {
10648 		if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
10649 		if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
10650 	}
10651 
10652 	TaitoF2SpritePriority[0] = 0;
10653 	TaitoF2SpritePriority[1] = 0;
10654 	TaitoF2SpritePriority[2] = 0;
10655 	TaitoF2SpritePriority[3] = 0;
10656 
10657 	TaitoF2MakeSpriteList();
10658 
10659 	TaitoF2RenderSpriteList(0);
10660 
10661 	if (!(Disable & 0x04)) TC0100SCNRenderCharLayer(0);
10662 	BurnTransferCopy(TaitoPalette);
10663 
10664 	return 0;
10665 }
10666 
SsiDraw()10667 static INT32 SsiDraw()
10668 {
10669 	BurnTransferClear();
10670 	TaitoF2CalcPalette();
10671 
10672 	TaitoF2SpritePriority[0] = 0;
10673 	TaitoF2SpritePriority[1] = 0;
10674 	TaitoF2SpritePriority[2] = 0;
10675 	TaitoF2SpritePriority[3] = 0;
10676 
10677 	TaitoF2MakeSpriteList();
10678 
10679 	TaitoF2RenderSpriteList(0);
10680 
10681 	BurnTransferCopy(TaitoPalette);
10682 
10683 	return 0;
10684 }
10685 
ThundfoxDraw()10686 static INT32 ThundfoxDraw()
10687 {
10688 	INT32 Disable1 = TC0100SCNCtrl[0][6] & 0xf7;
10689 	INT32 Disable2 = TC0100SCNCtrl[1][6] & 0xf7;
10690 
10691 	BurnTransferClear();
10692 	TaitoF2CalcPalette();
10693 
10694 	INT32 TilePri[2][3];
10695 	INT32 Layer[2][3];
10696 
10697 	Layer[0][0] = TC0100SCNBottomLayer(0);
10698 	Layer[0][1] = Layer[0][0] ^ 1;
10699 	Layer[0][2] = 2;
10700 	TilePri[0][Layer[0][0]] = TC0360PRIRegs[5] & 0x0f;
10701 	TilePri[0][Layer[0][1]] = TC0360PRIRegs[5] >> 4;
10702 	TilePri[0][Layer[0][2]] = TC0360PRIRegs[4] >> 4;
10703 
10704 	Layer[1][0] = TC0100SCNBottomLayer(1);
10705 	Layer[1][1] = Layer[1][0] ^ 1;
10706 	Layer[1][2] = 2;
10707 	TilePri[1][Layer[1][0]] = TC0360PRIRegs[9] & 0x0f;
10708 	TilePri[1][Layer[1][1]] = TC0360PRIRegs[9] >> 4;
10709 	TilePri[1][Layer[1][2]] = TC0360PRIRegs[8] >> 4;
10710 
10711 	TaitoF2SpritePriority[0] = TC0360PRIRegs[6] & 0x0f;
10712 	TaitoF2SpritePriority[1] = TC0360PRIRegs[6] >> 4;
10713 	TaitoF2SpritePriority[2] = TC0360PRIRegs[7] & 0x0f;
10714 	TaitoF2SpritePriority[3] = TC0360PRIRegs[7] >> 4;
10715 
10716 	TaitoF2MakeSpriteList();
10717 
10718 //	bprintf(PRINT_NORMAL, _T("Layer0-0 %x, Layer 0-1 %x, Layer 0-2 %x, Layer1-0 %x, Layer 1-1 %x, Layer 1-2 %x, Sprite 0 %x, Sprite 1 %x, Sprite 2 %x, Sprite 3 %x\n"), TilePri[0][0], TilePri[0][1], TilePri[0][2], TilePri[1][0], TilePri[1][1], TilePri[1][2], TaitoF2SpritePriority[0], TaitoF2SpritePriority[1], TaitoF2SpritePriority[2], TaitoF2SpritePriority[3]);
10719 
10720 	for (INT32 i = 0; i < 16; i++) {
10721 		if (TilePri[1][0] == i) {
10722 			if (TC0100SCNBottomLayer(1)) {
10723 				if (!(Disable2 & 0x02)) TC0100SCNRenderFgLayer(1, 0, TaitoCharsB);
10724 			} else {
10725 				if (!(Disable2 & 0x01)) TC0100SCNRenderBgLayer(1, 0, TaitoCharsB);
10726 			}
10727 		}
10728 		if (TilePri[0][0] == i) {
10729 			if (TC0100SCNBottomLayer(0)) {
10730 				if (!(Disable1 & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
10731 			} else {
10732 				if (!(Disable1 & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
10733 			}
10734 		}
10735 		if (TilePri[1][1] == i) {
10736 			if (!TC0100SCNBottomLayer(1)) {
10737 				if (!(Disable2 & 0x02)) TC0100SCNRenderFgLayer(1, 0, TaitoCharsB);
10738 			} else {
10739 				if (!(Disable2 & 0x01)) TC0100SCNRenderBgLayer(1, 0, TaitoCharsB);
10740 			}
10741 		}
10742 		if (TilePri[0][1] == i) {
10743 			if (!TC0100SCNBottomLayer(0)) {
10744 				if (!(Disable1 & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
10745 			} else {
10746 				if (!(Disable1 & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
10747 			}
10748 		}
10749 		if (TaitoF2SpritePriority[3] == i) TaitoF2RenderSpriteList(TaitoF2SpritePriority[3]);
10750 		if (TaitoF2SpritePriority[2] == i) TaitoF2RenderSpriteList(TaitoF2SpritePriority[2]);
10751 		if (TaitoF2SpritePriority[1] == i) TaitoF2RenderSpriteList(TaitoF2SpritePriority[1]);
10752 		if (TaitoF2SpritePriority[0] == i) TaitoF2RenderSpriteList(TaitoF2SpritePriority[0]);
10753 		if (TilePri[1][2] == i) { if (!(Disable2 & 0x04)) TC0100SCNRenderCharLayer(1); }
10754 		if (TilePri[0][2] == i) { if (!(Disable1 & 0x04)) TC0100SCNRenderCharLayer(0); }
10755 	}
10756 
10757 	BurnTransferCopy(TaitoPalette);
10758 
10759 	return 0;
10760 }
10761 
YuyugogoDraw()10762 static INT32 YuyugogoDraw()
10763 {
10764 	INT32 Disable = TC0100SCNCtrl[0][6] & 0xf7;
10765 
10766 	BurnTransferClear();
10767 	TaitoF2CalcPalette();
10768 
10769 	TaitoF2SpritePriority[0] = 0;
10770 	TaitoF2SpritePriority[1] = 0;
10771 	TaitoF2SpritePriority[2] = 0;
10772 	TaitoF2SpritePriority[3] = 0;
10773 
10774 	TaitoF2MakeSpriteList();
10775 
10776 	TaitoF2RenderSpriteList(0);
10777 
10778 	if (TC0100SCNBottomLayer(0)) {
10779 		if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
10780 		if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
10781 	} else {
10782 		if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
10783 		if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
10784 	}
10785 
10786 	if (!(Disable & 0x04)) TC0100SCNRenderCharLayer(0);
10787 	BurnTransferCopy(TaitoPalette);
10788 
10789 	return 0;
10790 }
10791 
TaitoF2Frame()10792 static INT32 TaitoF2Frame()
10793 {
10794 	INT32 nInterleave = 40;
10795 
10796 	if (TaitoReset) TaitoF2DoReset();
10797 
10798 	if (TaitoIC_TC0220IOCInUse) {
10799 		TC0220IOCMakeInputs();
10800 	} else {
10801 		if (TaitoIC_TC0510NIOInUse) {
10802 			TC0510NIOMakeInputs();
10803 		} else {
10804 			TaitoF2MakeInputs();
10805 		}
10806 	}
10807 
10808 	nTaitoCyclesDone[0] = nTaitoCyclesDone[1] = 0;
10809 
10810 	SekNewFrame();
10811 	ZetNewFrame();
10812 
10813 	for (INT32 i = 0; i < nInterleave; i++) {
10814 		INT32 nCurrentCPU, nNext;
10815 
10816 		// Run 68000 #1
10817 		nCurrentCPU = 0;
10818 		SekOpen(0);
10819 		nNext = (i + 1) * nTaitoCyclesTotal[nCurrentCPU] / nInterleave;
10820 		nTaitoCyclesSegment = nNext - nTaitoCyclesDone[nCurrentCPU];
10821 		if (i == (nInterleave - 1)) nTaitoCyclesSegment -= 500;
10822 		nTaitoCyclesDone[nCurrentCPU] += SekRun(nTaitoCyclesSegment);
10823 		if (i == (nInterleave - 1)) {
10824 			SekSetIRQLine(5, CPU_IRQSTATUS_AUTO);
10825 			nTaitoCyclesDone[nCurrentCPU] += SekRun(500);
10826 			SekSetIRQLine(6, CPU_IRQSTATUS_AUTO);
10827 		}
10828 		SekClose();
10829 
10830 		nCurrentCPU = 1;
10831 		ZetOpen(0);
10832 		BurnTimerUpdate((i + 1) * (nTaitoCyclesTotal[1] / nInterleave));
10833 		ZetClose();
10834 
10835 		if (cchip_active) {
10836 			cchip_run(12000000 / 60 / nInterleave);
10837 			if (i == nInterleave-1) cchip_interrupt();
10838 		}
10839 	}
10840 
10841 	ZetOpen(0);
10842 	BurnTimerEndFrame(nTaitoCyclesTotal[1]);
10843 	if (pBurnSoundOut) {
10844 		if (TaitoNumYM2610) BurnYM2610Update(pBurnSoundOut, nBurnSoundLen);
10845 		if (TaitoNumYM2203) BurnYM2203Update(pBurnSoundOut, nBurnSoundLen);
10846 		if (TaitoNumMSM6295) MSM6295Render(0, pBurnSoundOut, nBurnSoundLen);
10847 	}
10848 	ZetClose();
10849 
10850 	TaitoF2HandleSpriteBuffering();
10851 
10852 	if (pBurnDraw) BurnDrvRedraw();
10853 
10854 	TaitoF2SpriteBufferFunction();
10855 
10856 	return 0;
10857 }
10858 
DriveoutFrame()10859 static INT32 DriveoutFrame()
10860 {
10861 	INT32 nInterleave = 10;
10862 
10863 	if (TaitoReset) TaitoF2DoReset();
10864 
10865 	if (TaitoIC_TC0220IOCInUse) {
10866 		TC0220IOCMakeInputs();
10867 	} else {
10868 		if (TaitoIC_TC0510NIOInUse) {
10869 			TC0510NIOMakeInputs();
10870 		} else {
10871 			TaitoF2MakeInputs();
10872 		}
10873 	}
10874 
10875 	nTaitoCyclesDone[0] = nTaitoCyclesDone[1] = 0;
10876 
10877 	SekNewFrame();
10878 	ZetNewFrame();
10879 
10880 	for (INT32 i = 0; i < nInterleave; i++) {
10881 		INT32 nCurrentCPU, nNext;
10882 
10883 		// Run 68000 #1
10884 		nCurrentCPU = 0;
10885 		SekOpen(0);
10886 		nNext = (i + 1) * nTaitoCyclesTotal[nCurrentCPU] / nInterleave;
10887 		nTaitoCyclesSegment = nNext - nTaitoCyclesDone[nCurrentCPU];
10888 		if (i == 9) nTaitoCyclesSegment -= 500;
10889 		nTaitoCyclesDone[nCurrentCPU] += SekRun(nTaitoCyclesSegment);
10890 		if (i == 9) {
10891 			SekSetIRQLine(5, CPU_IRQSTATUS_AUTO);
10892 			nTaitoCyclesDone[nCurrentCPU] += SekRun(500);
10893 			SekSetIRQLine(6, CPU_IRQSTATUS_AUTO);
10894 		}
10895 		SekClose();
10896 
10897 		// Run Z80
10898 		nCurrentCPU = 1;
10899 		ZetOpen(0);
10900 		nNext = (i + 1) * nTaitoCyclesTotal[nCurrentCPU] / nInterleave;
10901 		nTaitoCyclesSegment = nNext - nTaitoCyclesDone[nCurrentCPU];
10902 		nTaitoCyclesSegment = ZetRun(nTaitoCyclesSegment);
10903 		nTaitoCyclesDone[nCurrentCPU] += nTaitoCyclesSegment;
10904 		ZetClose();
10905 	}
10906 
10907 	// Make sure the buffer is entirely filled.
10908 	if (pBurnSoundOut) {
10909 		MSM6295Render(0, pBurnSoundOut, nBurnSoundLen);
10910 	}
10911 
10912 	TaitoF2HandleSpriteBuffering();
10913 
10914 	if (pBurnDraw) BurnDrvRedraw();
10915 
10916 	TaitoF2SpriteBufferFunction();
10917 
10918 	return 0;
10919 }
10920 
TaitoF2Scan(INT32 nAction,INT32 * pnMin)10921 static INT32 TaitoF2Scan(INT32 nAction, INT32 *pnMin)
10922 {
10923 	struct BurnArea ba;
10924 
10925 	if (pnMin != NULL) {			// Return minimum compatible version
10926 		*pnMin = 0x029682;
10927 	}
10928 
10929 	if (nAction & ACB_MEMORY_RAM) {
10930 		memset(&ba, 0, sizeof(ba));
10931 		ba.Data	  = TaitoRamStart;
10932 		ba.nLen	  = TaitoRamEnd-TaitoRamStart;
10933 		ba.szName = "All Ram";
10934 		BurnAcb(&ba);
10935 	}
10936 
10937 	TaitoICScan(nAction);
10938 
10939 	if (nAction & ACB_DRIVER_DATA) {
10940 		SekScan(nAction);
10941 		ZetScan(nAction);
10942 
10943 		if (TaitoNumYM2203) { // cameltrya..
10944 			BurnYM2203Scan(nAction, pnMin);
10945 			MSM6295Scan(nAction, pnMin);
10946 		}
10947 
10948 		if (TaitoNumYM2610) {
10949 			BurnYM2610Scan(nAction, pnMin);
10950 		}
10951 
10952 		SCAN_VAR(TaitoZ80Bank);
10953 
10954 		SCAN_VAR(TaitoF2SpritesFlipScreen);
10955 		SCAN_VAR(TaitoF2PrepareSprites);
10956 		SCAN_VAR(TaitoF2SpritesDisabled);
10957 		SCAN_VAR(TaitoF2SpritesActiveArea);
10958 		SCAN_VAR(TaitoF2SpritesMasterScrollX);
10959 		SCAN_VAR(TaitoF2SpritesMasterScrollY);
10960 		SCAN_VAR(TaitoF2SpriteBlendMode);
10961 		SCAN_VAR(TaitoF2SpriteBank);
10962 		SCAN_VAR(TaitoF2SpriteBankBuffered);
10963 		SCAN_VAR(TaitoF2TilePriority);
10964 		SCAN_VAR(TaitoF2SpritePriority);
10965 
10966 		SCAN_VAR(YesnoDip);
10967 		SCAN_VAR(MjnquestInput);
10968 		SCAN_VAR(DriveoutSoundNibble);
10969 		SCAN_VAR(DriveoutOkiBank);
10970 	}
10971 
10972 	if (nAction & ACB_WRITE) {
10973 		ZetOpen(0);
10974 		z80_bank(TaitoZ80Bank);
10975 		ZetClose();
10976 
10977 		if (DriveoutOkiBank) {
10978 			DriveoutMSM6295Bank(DriveoutOkiBank);
10979 		}
10980 	}
10981 
10982 	return 0;
10983 }
10984 
10985 struct BurnDriver BurnDrvCameltry = {
10986 	"cameltry", NULL, NULL, NULL, "1989",
10987 	"Cameltry (US, YM2610)\0", NULL, "Taito America Corporation", "Taito F2",
10988 	NULL, NULL, NULL, NULL,
10989 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_MAZE, 0,
10990 	NULL, CameltryRomInfo, CameltryRomName, NULL, NULL, NULL, NULL, CameltryInputInfo, CameltryDIPInfo,
10991 	CameltryInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriRozDraw, TaitoF2Scan,
10992 	NULL, 0x2000, 320, 224, 4, 3
10993 };
10994 
10995 struct BurnDriver BurnDrvCameltryau = {
10996 	"cameltryau", "cameltry", NULL, NULL, "1989",
10997 	"Cameltry (World, YM2203 + M6295)\0", NULL, "Taito America Corporation", "Taito F2",
10998 	NULL, NULL, NULL, NULL,
10999 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_MAZE, 0,
11000 	NULL, CameltryauRomInfo, CameltryauRomName, NULL, NULL, NULL, NULL, CameltryInputInfo, CameltryDIPInfo,
11001 	CamltryaInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriRozDraw, TaitoF2Scan,
11002 	NULL, 0x2000, 320, 224, 4, 3
11003 };
11004 
11005 struct BurnDriver BurnDrvCameltrya = {
11006 	"cameltrya", "cameltry", NULL, NULL, "1989",
11007 	"Cameltry (US, YM2203 + M6295)\0", NULL, "Taito America Corporation", "Taito F2",
11008 	NULL, NULL, NULL, NULL,
11009 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_MAZE, 0,
11010 	NULL, CameltryaRomInfo, CameltryaRomName, NULL, NULL, NULL, NULL, CameltryInputInfo, CameltryDIPInfo,
11011 	CamltryaInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriRozDraw, TaitoF2Scan,
11012 	NULL, 0x2000, 320, 224, 4, 3
11013 };
11014 
11015 struct BurnDriver BurnDrvCameltryj = {
11016 	"cameltryj", "cameltry", NULL, NULL, "1989",
11017 	"Cameltry (Japan, YM2610)\0", NULL, "Taito Corporation", "Taito F2",
11018 	NULL, NULL, NULL, NULL,
11019 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_MAZE, 0,
11020 	NULL, CameltryjRomInfo, CameltryjRomName, NULL, NULL, NULL, NULL, CameltryInputInfo, CameltrjDIPInfo,
11021 	CameltryInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriRozDraw, TaitoF2Scan,
11022 	NULL, 0x2000, 320, 224, 4, 3
11023 };
11024 
11025 struct BurnDriver BurnDrvDeadconx = {
11026 	"deadconx", NULL, NULL, NULL, "1992",
11027 	"Dead Connection (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11028 	NULL, NULL, NULL, NULL,
11029 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_RUNGUN, 0,
11030 	NULL, DeadconxRomInfo, DeadconxRomName, NULL, NULL, NULL, NULL, DeadconxInputInfo, DeadconxDIPInfo,
11031 	DeadconxInit, TaitoF2Exit, TaitoF2Frame, FootchmpDraw, TaitoF2Scan,
11032 	NULL, 0x2000, 320, 224, 4, 3
11033 };
11034 
11035 struct BurnDriver BurnDrvDeadconxj = {
11036 	"deadconxj", "deadconx", NULL, NULL, "1992",
11037 	"Dead Connection (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11038 	NULL, NULL, NULL, NULL,
11039 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_RUNGUN, 0,
11040 	NULL, DeadconxjRomInfo, DeadconxjRomName, NULL, NULL, NULL, NULL, DeadconxInputInfo, DeadconxjDIPInfo,
11041 	DeadconxInit, TaitoF2Exit, TaitoF2Frame, FootchmpDraw, TaitoF2Scan,
11042 	NULL, 0x2000, 320, 224, 4, 3
11043 };
11044 
11045 struct BurnDriver BurnDrvDinorex = {
11046 	"dinorex", NULL, NULL, NULL, "1992",
11047 	"Dino Rex (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11048 	NULL, NULL, NULL, NULL,
11049 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_VSFIGHT, 0,
11050 	NULL, DinorexRomInfo, DinorexRomName, NULL, NULL, NULL, NULL, DinorexInputInfo, DinorexDIPInfo,
11051 	DinorexInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11052 	NULL, 0x2000, 320, 224, 4, 3
11053 };
11054 
11055 struct BurnDriver BurnDrvDinorexj = {
11056 	"dinorexj", "dinorex", NULL, NULL, "1992",
11057 	"Dino Rex (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11058 	NULL, NULL, NULL, NULL,
11059 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_VSFIGHT, 0,
11060 	NULL, DinorexjRomInfo, DinorexjRomName, NULL, NULL, NULL, NULL, DinorexInputInfo, DinorexjDIPInfo,
11061 	DinorexInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11062 	NULL, 0x2000, 320, 224, 4, 3
11063 };
11064 
11065 struct BurnDriver BurnDrvDinorexu = {
11066 	"dinorexu", "dinorex", NULL, NULL, "1992",
11067 	"Dino Rex (US)\0", NULL, "Taito America Corporation", "Taito F2",
11068 	NULL, NULL, NULL, NULL,
11069 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_VSFIGHT, 0,
11070 	NULL, DinorexuRomInfo, DinorexuRomName, NULL, NULL, NULL, NULL, DinorexInputInfo, DinorexDIPInfo,
11071 	DinorexInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11072 	NULL, 0x2000, 320, 224, 4, 3
11073 };
11074 
11075 struct BurnDriver BurnDrvDondokod = {
11076 	"dondokod", NULL, NULL, NULL, "1989",
11077 	"Don Doko Don (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11078 	NULL, NULL, NULL, NULL,
11079 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_PLATFORM, 0,
11080 	NULL, DondokodRomInfo, DondokodRomName, NULL, NULL, NULL, NULL, DondokodInputInfo, DondokodDIPInfo,
11081 	DondokodInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriRozDraw, TaitoF2Scan,
11082 	NULL, 0x2000, 320, 224, 4, 3
11083 };
11084 
11085 struct BurnDriver BurnDrvDondokodj = {
11086 	"dondokodj", "dondokod", NULL, NULL, "1989",
11087 	"Don Doko Don (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11088 	NULL, NULL, NULL, NULL,
11089 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_PLATFORM, 0,
11090 	NULL, DondokodjRomInfo, DondokodjRomName, NULL, NULL, NULL, NULL, DondokodInputInfo, DondokodjDIPInfo,
11091 	DondokodInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriRozDraw, TaitoF2Scan,
11092 	NULL, 0x2000, 320, 224, 4, 3
11093 };
11094 
11095 struct BurnDriver BurnDrvDondokodu = {
11096 	"dondokodu", "dondokod", NULL, NULL, "1989",
11097 	"Don Doko Don (US)\0", NULL, "Taito Corporation", "Taito F2",
11098 	NULL, NULL, NULL, NULL,
11099 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_PLATFORM, 0,
11100 	NULL, DondokoduRomInfo, DondokoduRomName, NULL, NULL, NULL, NULL, DondokodInputInfo, DondokoduDIPInfo,
11101 	DondokodInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriRozDraw, TaitoF2Scan,
11102 	NULL, 0x2000, 320, 224, 4, 3
11103 };
11104 
11105 struct BurnDriver BurnDrvDriftout = {
11106 	"driftout", NULL, NULL, NULL, "1991",
11107 	"Drift Out (Europe)\0", NULL, "Visco (Europe)", "Taito F2",
11108 	NULL, NULL, NULL, NULL,
11109 	BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TAITO_TAITOF2, GBF_RACING, 0,
11110 	NULL, DriftoutRomInfo, DriftoutRomName, NULL, NULL, NULL, NULL, DriftoutInputInfo, DriftoutDIPInfo,
11111 	DriftoutInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriRozDraw, TaitoF2Scan,
11112 	NULL, 0x2000, 224, 320, 3, 4
11113 };
11114 
11115 struct BurnDriver BurnDrvDriftoutj = {
11116 	"driftoutj", "driftout", NULL, NULL, "1991",
11117 	"Drift Out (Japan)\0", NULL, "Visco (Japan)", "Taito F2",
11118 	NULL, NULL, NULL, NULL,
11119 	BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_RACING, 0,
11120 	NULL, DriftoutjRomInfo, DriftoutjRomName, NULL, NULL, NULL, NULL, DriftoutInputInfo, DriftoutDIPInfo,
11121 	DriftoutInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriRozDraw, TaitoF2Scan,
11122 	NULL, 0x2000, 224, 320, 3, 4
11123 };
11124 
11125 struct BurnDriver BurnDrvDriveout = {
11126 	"driveout", "driftout", NULL, NULL, "1991",
11127 	"Drive Out\0", NULL, "bootleg", "Taito F2",
11128 	NULL, NULL, NULL, NULL,
11129 	BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_TAITO_TAITOF2, GBF_RACING, 0,
11130 	NULL, DriveoutRomInfo, DriveoutRomName, NULL, NULL, NULL, NULL, DriftoutInputInfo, DriftoutDIPInfo,
11131 	DriveoutInit, TaitoF2Exit, DriveoutFrame, TaitoF2PriRozDraw, TaitoF2Scan,
11132 	NULL, 0x2000, 224, 320, 3, 4
11133 };
11134 
11135 struct BurnDriver BurnDrvFinalb = {
11136 	"finalb", NULL, NULL, NULL, "1988",
11137 	"Final Blow (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11138 	NULL, NULL, NULL, NULL,
11139 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_VSFIGHT, 0,
11140 	NULL, FinalbRomInfo, FinalbRomName, NULL, NULL, NULL, NULL, FinalbInputInfo, FinalbDIPInfo,
11141 	FinalbInit, TaitoF2Exit, TaitoF2Frame, FinalbDraw, TaitoF2Scan,
11142 	NULL, 0x1000, 320, 224, 4, 3
11143 };
11144 
11145 struct BurnDriver BurnDrvFinalbj = {
11146 	"finalbj", "finalb", NULL, NULL, "1988",
11147 	"Final Blow (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11148 	NULL, NULL, NULL, NULL,
11149 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_VSFIGHT, 0,
11150 	NULL, FinalbjRomInfo, FinalbjRomName, NULL, NULL, NULL, NULL, FinalbInputInfo, FinalbjDIPInfo,
11151 	FinalbInit, TaitoF2Exit, TaitoF2Frame, FinalbDraw, TaitoF2Scan,
11152 	NULL, 0x1000, 320, 224, 4, 3
11153 };
11154 
11155 struct BurnDriver BurnDrvFinalbu = {
11156 	"finalbu", "finalb", NULL, NULL, "1988",
11157 	"Final Blow (US)\0", NULL, "Taito America Corporation", "Taito F2",
11158 	NULL, NULL, NULL, NULL,
11159 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_VSFIGHT, 0,
11160 	NULL, FinalbuRomInfo, FinalbuRomName, NULL, NULL, NULL, NULL, FinalbInputInfo, FinalbjDIPInfo,
11161 	FinalbInit, TaitoF2Exit, TaitoF2Frame, FinalbDraw, TaitoF2Scan,
11162 	NULL, 0x1000, 320, 224, 4, 3
11163 };
11164 
11165 struct BurnDriver BurnDrvFootchmp = {
11166 	"footchmp", NULL, NULL, NULL, "1990",
11167 	"Football Champ (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11168 	NULL, NULL, NULL, NULL,
11169 	BDF_GAME_WORKING, 4, HARDWARE_TAITO_TAITOF2, GBF_SPORTSFOOTBALL, 0,
11170 	NULL, FootchmpRomInfo, FootchmpRomName, NULL, NULL, NULL, NULL, FootchmpInputInfo, FootchmpDIPInfo,
11171 	FootchmpInit, TaitoF2Exit, TaitoF2Frame, FootchmpDraw, TaitoF2Scan,
11172 	NULL, 0x2000, 320, 224, 4, 3
11173 };
11174 
11175 struct BurnDriver BurnDrvHthero = {
11176 	"hthero", "footchmp", NULL, NULL, "1990",
11177 	"Hat Trick Hero (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11178 	NULL, NULL, NULL, NULL,
11179 	BDF_GAME_WORKING | BDF_CLONE, 4, HARDWARE_TAITO_TAITOF2, GBF_SPORTSFOOTBALL, 0,
11180 	NULL, HtheroRomInfo, HtheroRomName, NULL, NULL, NULL, NULL, FootchmpInputInfo, HtheroDIPInfo,
11181 	FootchmpInit, TaitoF2Exit, TaitoF2Frame, FootchmpDraw, TaitoF2Scan,
11182 	NULL, 0x2000, 320, 224, 4, 3
11183 };
11184 
11185 struct BurnDriver BurnDrvEuroch92 = {
11186 	"euroch92", NULL, NULL, NULL, "1992",
11187 	"Euro Champ '92 (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11188 	NULL, NULL, NULL, NULL,
11189 	BDF_GAME_WORKING, 4, HARDWARE_TAITO_TAITOF2, GBF_SPORTSFOOTBALL, 0,
11190 	NULL, Euroch92RomInfo, Euroch92RomName, NULL, NULL, NULL, NULL, FootchmpInputInfo, FootchmpDIPInfo,
11191 	FootchmpInit, TaitoF2Exit, TaitoF2Frame, FootchmpDraw, TaitoF2Scan,
11192 	NULL, 0x2000, 320, 224, 4, 3
11193 };
11194 
11195 struct BurnDriver BurnDrvGrowl = {
11196 	"growl", NULL, NULL, NULL, "1990",
11197 	"Growl (World, Rev 1)\0", NULL, "Taito Corporation Japan", "Taito F2",
11198 	NULL, NULL, NULL, NULL,
11199 	BDF_GAME_WORKING, 4, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11200 	NULL, GrowlRomInfo, GrowlRomName, NULL, NULL, NULL, NULL, GrowlInputInfo, GrowlDIPInfo,
11201 	GrowlInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriDraw, TaitoF2Scan,
11202 	NULL, 0x2000, 320, 224, 4, 3
11203 };
11204 
11205 struct BurnDriver BurnDrvGrowla = {
11206 	"growla", "growl", NULL, NULL, "1990",
11207 	"Growl (World)\0", NULL, "Taito America Japan", "Taito F2",
11208 	NULL, NULL, NULL, NULL,
11209 	BDF_GAME_WORKING | BDF_CLONE, 4, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11210 	NULL, GrowlaRomInfo, GrowlaRomName, NULL, NULL, NULL, NULL, GrowlInputInfo, GrowluDIPInfo,
11211 	GrowlInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriDraw, TaitoF2Scan,
11212 	NULL, 0x2000, 320, 224, 4, 3
11213 };
11214 
11215 struct BurnDriver BurnDrvGrowlu = {
11216 	"growlu", "growl", NULL, NULL, "1990",
11217 	"Growl (US)\0", NULL, "Taito America Corporation", "Taito F2",
11218 	NULL, NULL, NULL, NULL,
11219 	BDF_GAME_WORKING | BDF_CLONE, 4, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11220 	NULL, GrowluRomInfo, GrowluRomName, NULL, NULL, NULL, NULL, GrowlInputInfo, GrowluDIPInfo,
11221 	GrowlInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriDraw, TaitoF2Scan,
11222 	NULL, 0x2000, 320, 224, 4, 3
11223 };
11224 
11225 struct BurnDriver BurnDrvRunark = {
11226 	"runark", "growl", NULL, NULL, "1990",
11227 	"Runark (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11228 	NULL, NULL, NULL, NULL,
11229 	BDF_GAME_WORKING | BDF_CLONE, 4, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11230 	NULL, RunarkRomInfo, RunarkRomName, NULL, NULL, NULL, NULL, GrowlInputInfo, RunarkDIPInfo,
11231 	GrowlInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriDraw, TaitoF2Scan,
11232 	NULL, 0x2000, 320, 224, 4, 3
11233 };
11234 
11235 struct BurnDriver BurnDrvGunfront = {
11236 	"gunfront", NULL, NULL, NULL, "1990",
11237 	"Gun & Frontier (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11238 	NULL, NULL, NULL, NULL,
11239 	BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TAITO_TAITOF2, GBF_VERSHOOT, 0,
11240 	NULL, GunfrontRomInfo, GunfrontRomName, NULL, NULL, NULL, NULL, GunfrontInputInfo, GunfrontDIPInfo,
11241 	GunfrontInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriDraw, TaitoF2Scan,
11242 	NULL, 0x2000, 224, 320, 3, 4
11243 };
11244 
11245 struct BurnDriver BurnDrvGunfrontj = {
11246 	"gunfrontj", "gunfront", NULL, NULL, "1990",
11247 	"Gun Frontier (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11248 	NULL, NULL, NULL, NULL,
11249 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TAITO_TAITOF2, GBF_VERSHOOT, 0,
11250 	NULL, GunfrontjRomInfo, GunfrontjRomName, NULL, NULL, NULL, NULL, GunfrontInputInfo, GunfrontjDIPInfo,
11251 	GunfrontInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriDraw, TaitoF2Scan,
11252 	NULL, 0x2000, 224, 320, 3, 4
11253 };
11254 
11255 struct BurnDriver BurnDrvKoshien = {
11256 	"koshien", NULL, NULL, NULL, "1990",
11257 	"Ah Eikou no Koshien (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11258 	L"\u7532\u5B50\u5712 \u6804\u5149\u306E \u55DA\u547C (Japan)\0Ah Eikou no Koshien\0", NULL, NULL, NULL,
11259 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_SPORTSMISC, 0,
11260 	NULL, KoshienRomInfo, KoshienRomName, NULL, NULL, NULL, NULL, KoshienInputInfo, KoshienDIPInfo,
11261 	KoshienInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11262 	NULL, 0x2000, 320, 224, 4, 3
11263 };
11264 
11265 struct BurnDriver BurnDrvLiquidk = {
11266 	"liquidk", NULL, NULL, NULL, "1990",
11267 	"Liquid Kids (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11268 	NULL, NULL, NULL, NULL,
11269 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_PLATFORM, 0,
11270 	NULL, LiquidkRomInfo, LiquidkRomName, NULL, NULL, NULL, NULL, LiquidkInputInfo, LiquidkDIPInfo,
11271 	LiquidkInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11272 	NULL, 0x2000, 320, 224, 4, 3
11273 };
11274 
11275 struct BurnDriver BurnDrvLiquidku = {
11276 	"liquidku", "liquidk", NULL, NULL, "1990",
11277 	"Liquid Kids (US)\0", NULL, "Taito America Corporation", "Taito F2",
11278 	NULL, NULL, NULL, NULL,
11279 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_PLATFORM, 0,
11280 	NULL, LiquidkuRomInfo, LiquidkuRomName, NULL, NULL, NULL, NULL, LiquidkInputInfo, LiquidkuDIPInfo,
11281 	LiquidkInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11282 	NULL, 0x2000, 320, 224, 4, 3
11283 };
11284 
11285 struct BurnDriver BurnDrvMizubaku = {
11286 	"mizubaku", "liquidk", NULL, NULL, "1990",
11287 	"Mizubaku Daibouken (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11288 	L"\u30DF\u30BA\u30D0\u30AF \u5927\u5192\u967A \u30A2\u30C9\u30D9\u30F3\u30C1\u30E3\u30FC (Japan)\0Mizubaku Daibouken\0", NULL, NULL, NULL,
11289 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_PLATFORM, 0,
11290 	NULL, MizubakuRomInfo, MizubakuRomName, NULL, NULL, NULL, NULL, LiquidkInputInfo, LiquidkuDIPInfo,
11291 	LiquidkInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11292 	NULL, 0x2000, 320, 224, 4, 3
11293 };
11294 
11295 struct BurnDriver BurnDrvMegablst = {
11296 	"megablst", NULL, "cchip", NULL, "1989",
11297 	"Mega Blast (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11298 	NULL, NULL, NULL, NULL,
11299 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_HORSHOOT, 0,
11300 	NULL, MegablstRomInfo, MegablstRomName, NULL, NULL, NULL, NULL, MegablstInputInfo, MegablstDIPInfo,
11301 	MegablstInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11302 	NULL, 0x2000, 320, 224, 4, 3
11303 };
11304 
11305 struct BurnDriver BurnDrvMegablstj = {
11306 	"megablstj", "megablst", "cchip", NULL, "1989",
11307 	"Mega Blast (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11308 	NULL, NULL, NULL, NULL,
11309 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_HORSHOOT, 0,
11310 	NULL, MegablstjRomInfo, MegablstjRomName, NULL, NULL, NULL, NULL, MegablstInputInfo, MegablstjDIPInfo,
11311 	MegablstInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11312 	NULL, 0x2000, 320, 224, 4, 3
11313 };
11314 
11315 struct BurnDriver BurnDrvMegablstu = {
11316 	"megablstu", "megablst", "cchip", NULL, "1989",
11317 	"Mega Blast (US)\0", NULL, "Taito America Corporation", "Taito F2",
11318 	NULL, NULL, NULL, NULL,
11319 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_HORSHOOT, 0,
11320 	NULL, MegablstuRomInfo, MegablstuRomName, NULL, NULL, NULL, NULL, MegablstInputInfo, MegablstuDIPInfo,
11321 	MegablstInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11322 	NULL, 0x2000, 320, 224, 4, 3
11323 };
11324 
11325 struct BurnDriver BurnDrvMetalb = {
11326 	"metalb", NULL, NULL, NULL, "1991",
11327 	"Metal Black (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11328 	NULL, NULL, NULL, NULL,
11329 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_HORSHOOT, 0,
11330 	NULL, MetalbRomInfo, MetalbRomName, NULL, NULL, NULL, NULL, MetalbInputInfo, MetalbDIPInfo,
11331 	MetalbInit, TaitoF2Exit, TaitoF2Frame, MetalbDraw, TaitoF2Scan,
11332 	NULL, 0x2000, 320, 224, 4, 3
11333 };
11334 
11335 struct BurnDriver BurnDrvMetalbj = {
11336 	"metalbj", "metalb", NULL, NULL, "1991",
11337 	"Metal Black (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11338 	NULL, NULL, NULL, NULL,
11339 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_HORSHOOT, 0,
11340 	NULL, MetalbjRomInfo, MetalbjRomName, NULL, NULL, NULL, NULL, MetalbInputInfo, MetalbjDIPInfo,
11341 	MetalbInit, TaitoF2Exit, TaitoF2Frame, MetalbDraw, TaitoF2Scan,
11342 	NULL, 0x2000, 320, 224, 4, 3
11343 };
11344 
11345 struct BurnDriver BurnDrvMjnquest = {
11346 	"mjnquest", NULL, NULL, NULL, "1990",
11347 	"Mahjong Quest (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11348 	NULL, NULL, NULL, NULL,
11349 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_MAHJONG, 0,
11350 	NULL, MjnquestRomInfo, MjnquestRomName, NULL, NULL, NULL, NULL, MjnquestInputInfo, MjnquestDIPInfo,
11351 	MjnquestInit, TaitoF2Exit, TaitoF2Frame, FinalbDraw, TaitoF2Scan,
11352 	NULL, 0x1000, 320, 224, 4, 3
11353 };
11354 
11355 struct BurnDriver BurnDrvMjnquestb = {
11356 	"mjnquestb", "mjnquest", NULL, NULL, "1990",
11357 	"Mahjong Quest (No Nudity)\0", NULL, "Taito Corporation", "Taito F2",
11358 	NULL, NULL, NULL, NULL,
11359 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_MAHJONG, 0,
11360 	NULL, MjnquestbRomInfo, MjnquestbRomName, NULL, NULL, NULL, NULL, MjnquestInputInfo, MjnquestDIPInfo,
11361 	MjnquestInit, TaitoF2Exit, TaitoF2Frame, FinalbDraw, TaitoF2Scan,
11362 	NULL, 0x1000, 320, 224, 4, 3
11363 };
11364 
11365 struct BurnDriver BurnDrvNinjak = {
11366 	"ninjak", NULL, NULL, NULL, "1990",
11367 	"The Ninja Kids (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11368 	NULL, NULL, NULL, NULL,
11369 	BDF_GAME_WORKING, 4, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11370 	NULL, NinjakRomInfo, NinjakRomName, NULL, NULL, NULL, NULL, NinjakInputInfo, NinjakDIPInfo,
11371 	NinjakInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11372 	NULL, 0x2000, 320, 224, 4, 3
11373 };
11374 
11375 struct BurnDriver BurnDrvNinjakj = {
11376 	"ninjakj", "ninjak", NULL, NULL, "1990",
11377 	"The Ninja Kids (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11378 	NULL, NULL, NULL, NULL,
11379 	BDF_GAME_WORKING | BDF_CLONE, 4, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11380 	NULL, NinjakjRomInfo, NinjakjRomName, NULL, NULL, NULL, NULL, NinjakInputInfo, NinjakjDIPInfo,
11381 	NinjakInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriDraw, TaitoF2Scan,
11382 	NULL, 0x2000, 320, 224, 4, 3
11383 };
11384 
11385 struct BurnDriver BurnDrvNinjaku = {
11386 	"ninjaku", "ninjak", NULL, NULL, "1990",
11387 	"The Ninja Kids (US)\0", NULL, "Taito America Corporation", "Taito F2",
11388 	NULL, NULL, NULL, NULL,
11389 	BDF_GAME_WORKING | BDF_CLONE, 4, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11390 	NULL, NinjakuRomInfo, NinjakuRomName, NULL, NULL, NULL, NULL, NinjakInputInfo, NinjakuDIPInfo,
11391 	NinjakInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriDraw, TaitoF2Scan,
11392 	NULL, 0x2000, 320, 224, 4, 3
11393 };
11394 
11395 struct BurnDriver BurnDrvPulirula = {
11396 	"pulirula", NULL, NULL, NULL, "1991",
11397 	"PuLiRuLa (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11398 	NULL, NULL, NULL, NULL,
11399 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11400 	NULL, PulirulaRomInfo, PulirulaRomName, NULL, NULL, NULL, NULL, PulirulaInputInfo, PulirulaDIPInfo,
11401 	PulirulaInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriRozDraw, TaitoF2Scan,
11402 	NULL, 0x2000, 320, 224, 4, 3
11403 };
11404 
11405 struct BurnDriver BurnDrvPulirulaa = {
11406 	"pulirulaa", "pulirula", NULL, NULL, "1991",
11407 	"PuLiRuLa (World, earlier?)\0", NULL, "Taito Corporation", "Taito F2",
11408 	NULL, NULL, NULL, NULL,
11409 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11410 	NULL, PulirulaaRomInfo, PulirulaaRomName, NULL, NULL, NULL, NULL, PulirulaInputInfo, PulirulaDIPInfo,
11411 	PulirulaInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriRozDraw, TaitoF2Scan,
11412 	NULL, 0x2000, 320, 224, 4, 3
11413 };
11414 
11415 struct BurnDriver BurnDrvPulirulaj = {
11416 	"pulirulaj", "pulirula", NULL, NULL, "1991",
11417 	"PuLiRuLa (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11418 	NULL, NULL, NULL, NULL,
11419 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11420 	NULL, PulirulajRomInfo, PulirulajRomName, NULL, NULL, NULL, NULL, PulirulaInputInfo, PulirulajDIPInfo,
11421 	PulirulaInit, TaitoF2Exit, TaitoF2Frame, TaitoF2PriRozDraw, TaitoF2Scan,
11422 	NULL, 0x2000, 320, 224, 4, 3
11423 };
11424 
11425 struct BurnDriver BurnDrvQcrayon = {
11426 	"qcrayon", NULL, NULL, NULL, "1993",
11427 	"Quiz Crayon Shinchan (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11428 	L"\u30AF\u30A4\u30BA \u30AF\u30EC\u30E8\u30F3\u3057\u3093\u3061\u3083\u3093 (Japan)\0Quiz Crayon Shinchan\0", NULL, NULL, NULL,
11429 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_QUIZ, 0,
11430 	NULL, QcrayonRomInfo, QcrayonRomName, NULL, NULL, NULL, NULL, QcrayonInputInfo, QcrayonDIPInfo,
11431 	QcrayonInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11432 	NULL, 0x2000, 320, 224, 4, 3
11433 };
11434 
11435 struct BurnDriver BurnDrvQcrayon2 = {
11436 	"qcrayon2", NULL, NULL, NULL, "1993",
11437 	"Crayon Shinchan Orato Asobo (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11438 	L"\u30AF\u30EC\u30E8\u30F3\u3057\u3093\u3061\u3083\u3093 \u30AA\u30E9\u3068\u904A\u307C (Japan)\0Crayon Shinchan Orato Asobo\0", NULL, NULL, NULL,
11439 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_QUIZ, 0,
11440 	NULL, Qcrayon2RomInfo, Qcrayon2RomName, NULL, NULL, NULL, NULL, Qcrayon2InputInfo, Qcrayon2DIPInfo,
11441 	Qcrayon2Init, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11442 	NULL, 0x2000, 320, 224, 4, 3
11443 };
11444 
11445 struct BurnDriver BurnDrvQjinsei = {
11446 	"qjinsei", NULL, NULL, NULL, "1992",
11447 	"Quiz Jinsei Gekijoh (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11448 	L"\u30AF\u30A4\u30BA \u4EBA\u751F\u5287\u5834 (Japan)\0Quiz Jinsei Gekijoh\0", NULL, NULL, NULL,
11449 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_QUIZ, 0,
11450 	NULL, QjinseiRomInfo, QjinseiRomName, NULL, NULL, NULL, NULL, QjinseiInputInfo, QjinseiDIPInfo,
11451 	QjinseiInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11452 	NULL, 0x2000, 320, 224, 4, 3
11453 };
11454 
11455 struct BurnDriver BurnDrvQtorimon = {
11456 	"qtorimon", NULL, NULL, NULL, "1990",
11457 	"Quiz Torimonochou (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11458 	L"\u304F\u3044\u305A \u82E6\u80C3\u982D \u6355\u7269\u5E33 (Japan)\0Quiz Torimonochou\0", NULL, NULL, NULL,
11459 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_QUIZ, 0,
11460 	NULL, QtorimonRomInfo, QtorimonRomName, NULL, NULL, NULL, NULL, QtorimonInputInfo, QtorimonDIPInfo,
11461 	QtorimonInit, TaitoF2Exit, TaitoF2Frame, QtorimonDraw, TaitoF2Scan,
11462 	NULL, 0x800, 320, 224, 4, 3
11463 };
11464 
11465 struct BurnDriver BurnDrvQuizhq = {
11466 	"quizhq", NULL, NULL, NULL, "1990",
11467 	"Quiz H.Q. (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11468 	NULL, NULL, NULL, NULL,
11469 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_QUIZ, 0,
11470 	NULL, QuizhqRomInfo, QuizhqRomName, NULL, NULL, NULL, NULL, QuizhqInputInfo, QuizhqDIPInfo,
11471 	QuizhqInit, TaitoF2Exit, TaitoF2Frame, QtorimonDraw, TaitoF2Scan,
11472 	NULL, 0x1000, 320, 224, 4, 3
11473 };
11474 
11475 struct BurnDriver BurnDrvQzchikyu = {
11476 	"qzchikyu", NULL, NULL, NULL, "1991",
11477 	"Quiz Chikyu Bouei Gun (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11478 	L"\u30AF\u30A4\u30BA \u5730\u7403\u9632\u885B\u8ECD (Japan)\0Quiz Chikyu Bouei Gun\0", NULL, NULL, NULL,
11479 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_QUIZ, 0,
11480 	NULL, QzchikyuRomInfo, QzchikyuRomName, NULL, NULL, NULL, NULL, QzchikyuInputInfo, QzchikyuDIPInfo,
11481 	QzchikyuInit, TaitoF2Exit, TaitoF2Frame, QzquestDraw, TaitoF2Scan,
11482 	NULL, 0x2000, 320, 224, 4, 3
11483 };
11484 
11485 struct BurnDriver BurnDrvQzquest = {
11486 	"qzquest", NULL, NULL, NULL, "1991",
11487 	"Quiz Quest - Hime to Yuusha no Monogatari (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11488 	L"\u30AF\u30A4\u30BA \u30AF\u30A8\u30B9\u30C8 \uFF0D\u59EB\u3068\u52C7\u8005\u306E\u7269\u8A9E\uFF0D (Japan)\0Quiz Quest - Hime to Yuusha no Monogatari\0", NULL, NULL, NULL,
11489 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_QUIZ, 0,
11490 	NULL, QzquestRomInfo, QzquestRomName, NULL, NULL, NULL, NULL, QzquestInputInfo, QzquestDIPInfo,
11491 	QzquestInit, TaitoF2Exit, TaitoF2Frame, QzquestDraw, TaitoF2Scan,
11492 	NULL, 0x2000, 320, 224, 4, 3
11493 };
11494 
11495 struct BurnDriver BurnDrvSolfigtr = {
11496 	"solfigtr", NULL, NULL, NULL, "1991",
11497 	"Solitary Fighter (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11498 	NULL, NULL, NULL, NULL,
11499 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_VSFIGHT, 0,
11500 	NULL, SolfigtrRomInfo, SolfigtrRomName, NULL, NULL, NULL, NULL, SolfigtrInputInfo, SolfigtrDIPInfo,
11501 	SolfigtrInit, TaitoF2Exit, TaitoF2Frame, TaitoF2Draw, TaitoF2Scan,
11502 	NULL, 0x2000, 320, 224, 4, 3
11503 };
11504 
11505 struct BurnDriver BurnDrvSsi = {
11506 	"ssi", NULL, NULL, NULL, "1990",
11507 	"Super Space Invaders '91 (World, Rev 1)\0", NULL, "Taito Corporation Japan", "Taito F2",
11508 	NULL, NULL, NULL, NULL,
11509 	BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TAITO_TAITOF2, GBF_SHOOT, 0,
11510 	NULL, SsiRomInfo, SsiRomName, NULL, NULL, NULL, NULL, SsiInputInfo, SsiDIPInfo,
11511 	SsiInit, TaitoF2Exit, TaitoF2Frame, SsiDraw, TaitoF2Scan,
11512 	NULL, 0x2000, 224, 320, 3, 4
11513 };
11514 
11515 struct BurnDriver BurnDrvSsia = {
11516 	"ssia", "ssi", NULL, NULL, "1990",
11517 	"Super Space Invaders '91 (World)\0", NULL, "Taito Corporation Japan", "Taito F2",
11518 	NULL, NULL, NULL, NULL,
11519 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TAITO_TAITOF2, GBF_SHOOT, 0,
11520 	NULL, SsiaRomInfo, SsiaRomName, NULL, NULL, NULL, NULL, SsiInputInfo, SsiDIPInfo,
11521 	SsiInit, TaitoF2Exit, TaitoF2Frame, SsiDraw, TaitoF2Scan,
11522 	NULL, 0x2000, 224, 320, 3, 4
11523 };
11524 
11525 struct BurnDriver BurnDrvSsib = {
11526 	"ssib", "ssi", NULL, NULL, "1990",
11527 	"Super Space Invaders '91 (World, earlier?)\0", NULL, "Taito Corporation Japan", "Taito F2",
11528 	NULL, NULL, NULL, NULL,
11529 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TAITO_TAITOF2, GBF_SHOOT, 0,
11530 	NULL, SsibRomInfo, SsibRomName, NULL, NULL, NULL, NULL, SsiInputInfo, SsiDIPInfo,
11531 	SsiInit, TaitoF2Exit, TaitoF2Frame, SsiDraw, TaitoF2Scan,
11532 	NULL, 0x2000, 224, 320, 3, 4
11533 };
11534 
11535 struct BurnDriver BurnDrvMajest12u = {
11536 	"majest12u", "ssi", NULL, NULL, "1990",
11537 	"Majestic Twelve - The Space Invaders Part IV (US)\0", NULL, "Taito America Corporation", "Taito F2",
11538 	NULL, NULL, NULL, NULL,
11539 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TAITO_TAITOF2, GBF_SHOOT, 0,
11540 	NULL, Majest12uRomInfo, Majest12uRomName, NULL, NULL, NULL, NULL, SsiInputInfo, Majest12DIPInfo,
11541 	SsiInit, TaitoF2Exit, TaitoF2Frame, SsiDraw, TaitoF2Scan,
11542 	NULL, 0x2000, 224, 320, 3, 4
11543 };
11544 
11545 struct BurnDriver BurnDrvMajest12ua = {
11546 	"majest12ua", "ssi", NULL, NULL, "1990",
11547 	"Majestic Twelve - The Space Invaders Part IV (US, earlier?)\0", NULL, "Taito America Corporation", "Taito F2",
11548 	NULL, NULL, NULL, NULL,
11549 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TAITO_TAITOF2, GBF_SHOOT, 0,
11550 	NULL, Majest12uaRomInfo, Majest12uaRomName, NULL, NULL, NULL, NULL, SsiInputInfo, Majest12DIPInfo,
11551 	SsiInit, TaitoF2Exit, TaitoF2Frame, SsiDraw, TaitoF2Scan,
11552 	NULL, 0x2000, 224, 320, 3, 4
11553 };
11554 
11555 struct BurnDriver BurnDrvMajest12j = {
11556 	"majest12j", "ssi", NULL, NULL, "1990",
11557 	"Majestic Twelve - The Space Invaders Part IV (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11558 	NULL, NULL, NULL, NULL,
11559 	BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL, 2, HARDWARE_TAITO_TAITOF2, GBF_SHOOT, 0,
11560 	NULL, Majest12jRomInfo, Majest12jRomName, NULL, NULL, NULL, NULL, SsiInputInfo, Majest12DIPInfo,
11561 	SsiInit, TaitoF2Exit, TaitoF2Frame, SsiDraw, TaitoF2Scan,
11562 	NULL, 0x2000, 224, 320, 3, 4
11563 };
11564 
11565 struct BurnDriver BurnDrvThundfox = {
11566 	"thundfox", NULL, NULL, NULL, "1990",
11567 	"Thunder Fox (World)\0", "NULL", "Taito Corporation Japan", "Taito F2",
11568 	NULL, NULL, NULL, NULL,
11569 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11570 	NULL, ThundfoxRomInfo, ThundfoxRomName, NULL, NULL, NULL, NULL, ThundfoxInputInfo, ThundfoxDIPInfo,
11571 	ThundfoxInit, TaitoF2Exit, TaitoF2Frame, ThundfoxDraw, TaitoF2Scan,
11572 	NULL, 0x1000, 320, 224, 4, 3
11573 };
11574 
11575 struct BurnDriver BurnDrvThundfoxj = {
11576 	"thundfoxj", "thundfox", NULL, NULL, "1990",
11577 	"Thunder Fox (Japan)\0", "NULL", "Taito Corporation", "Taito F2",
11578 	NULL, NULL, NULL, NULL,
11579 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11580 	NULL, ThundfoxjRomInfo, ThundfoxjRomName, NULL, NULL, NULL, NULL, ThundfoxInputInfo, ThundfoxjDIPInfo,
11581 	ThundfoxInit, TaitoF2Exit, TaitoF2Frame, ThundfoxDraw, TaitoF2Scan,
11582 	NULL, 0x1000, 320, 224, 4, 3
11583 };
11584 
11585 struct BurnDriver BurnDrvThundfoxu = {
11586 	"thundfoxu", "thundfox", NULL, NULL, "1990",
11587 	"Thunder Fox (US)\0", "NULL", "Taito America Corporation", "Taito F2",
11588 	NULL, NULL, NULL, NULL,
11589 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_TAITOF2, GBF_SCRFIGHT, 0,
11590 	NULL, ThundfoxuRomInfo, ThundfoxuRomName, NULL, NULL, NULL, NULL, ThundfoxInputInfo, ThundfoxuDIPInfo,
11591 	ThundfoxInit, TaitoF2Exit, TaitoF2Frame, ThundfoxDraw, TaitoF2Scan,
11592 	NULL, 0x1000, 320, 224, 4, 3
11593 };
11594 
11595 struct BurnDriver BurnDrvYesnoj = {
11596 	"yesnoj", NULL, NULL, NULL, "1992",
11597 	"Yes/No Sinri Tokimeki Chart\0", NULL, "Taito Corporation", "Taito F2",
11598 	L"\uFF39\uFF45\uFF53.\uFF2E\uFF4F \u5FC3\u7406 \u30C8\u30AD\u30E1\u30AD\u30C1\u30E3\u30FC\u30C8\0Yes/No Sinri Tokimeki Chart\0", NULL, NULL, NULL,
11599 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_QUIZ, 0,
11600 	NULL, YesnojRomInfo, YesnojRomName, NULL, NULL, NULL, NULL, YesnojInputInfo, YesnojDIPInfo,
11601 	YesnojInit, TaitoF2Exit, TaitoF2Frame, YuyugogoDraw, TaitoF2Scan,
11602 	NULL, 0x2000, 320, 224, 4, 3
11603 };
11604 
11605 struct BurnDriver BurnDrvYuyugogo = {
11606 	"yuyugogo", NULL, NULL, NULL, "1990",
11607 	"Yuuyu no Quiz de GO!GO! (Japan)\0", NULL, "Taito Corporation", "Taito F2",
11608 	L"\u3086\u3046\u3086 \u306E\u30AF\u30A4\u30BA\u3067 \uFF27\uFF4F!\uFF27\uFF4F! (Japan)\0Yuuyu no Quiz de GO!GO!\0", NULL, NULL, NULL,
11609 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_TAITOF2, GBF_QUIZ, 0,
11610 	NULL, YuyugogoRomInfo, YuyugogoRomName, NULL, NULL, NULL, NULL, YuyugogoInputInfo, YuyugogoDIPInfo,
11611 	YuyugogoInit, TaitoF2Exit, TaitoF2Frame, YuyugogoDraw, TaitoF2Scan,
11612 	NULL, 0x2000, 320, 224, 4, 3
11613 };
11614