1 // Based on MAME driver by David Graves
2 
3 // tofix: darius2d's offsets and y screen size is wrong - it should be 232 and everything moved down 8px
4 
5 #include "tiles_generic.h"
6 #include "m68000_intf.h"
7 #include "z80_intf.h"
8 #include "taito.h"
9 #include "taito_ic.h"
10 #include "burn_ym2610.h"
11 
12 static INT32 Ninjaw = 0, Warriorb = 0;
13 
14 static double Darius2YM2610Route1MasterVol;
15 static double Darius2YM2610Route2MasterVol;
16 
17 static struct BurnInputInfo Darius2InputList[] =
18 {
19 	{"P1 Coin"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 2, "p1 coin"   },
20 	{"P1 Start"          , BIT_DIGITAL   , TC0220IOCInputPort2 + 2, "p1 start"  },
21 	{"P1 Up"             , BIT_DIGITAL   , TC0220IOCInputPort1 + 0, "p1 up"     },
22 	{"P1 Down"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 1, "p1 down"   },
23 	{"P1 Left"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 3, "p1 left"   },
24 	{"P1 Right"          , BIT_DIGITAL   , TC0220IOCInputPort1 + 2, "p1 right"  },
25 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort2 + 4, "p1 fire 1" },
26 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort2 + 5, "p1 fire 2" },
27 
28 	{"P2 Coin"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 3, "p2 coin"   },
29 	{"P2 Start"          , BIT_DIGITAL   , TC0220IOCInputPort2 + 3, "p2 start"  },
30 	{"P2 Up"             , BIT_DIGITAL   , TC0220IOCInputPort1 + 4, "p2 up"     },
31 	{"P2 Down"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 5, "p2 down"   },
32 	{"P2 Left"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 7, "p2 left"   },
33 	{"P2 Right"          , BIT_DIGITAL   , TC0220IOCInputPort1 + 6, "p2 right"  },
34 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort2 + 6, "p2 fire 1" },
35 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort2 + 7, "p2 fire 2" },
36 
37 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
38 	{"Service"           , BIT_DIGITAL   , TC0220IOCInputPort2 + 0, "service"   },
39 	{"Tilt"              , BIT_DIGITAL   , TC0220IOCInputPort2 + 1, "tilt"      },
40 	{"Freeze"            , BIT_DIGITAL   , TC0220IOCInputPort0 + 4, "freeze"    },
41 	{"Dip 1"             , BIT_DIPSWITCH , TC0220IOCDip + 0       , "dip"       },
42 	{"Dip 2"             , BIT_DIPSWITCH , TC0220IOCDip + 1       , "dip"       },
43 };
44 
45 STDINPUTINFO(Darius2)
46 
47 static struct BurnInputInfo Darius2dInputList[] =
48 {
49 	{"P1 Coin"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 2, "p1 coin"   },
50 	{"P1 Start"          , BIT_DIGITAL   , TC0220IOCInputPort0 + 4, "p1 start"  },
51 	{"P1 Up"             , BIT_DIGITAL   , TC0220IOCInputPort1 + 0, "p1 up"     },
52 	{"P1 Down"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 1, "p1 down"   },
53 	{"P1 Left"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 2, "p1 left"   },
54 	{"P1 Right"          , BIT_DIGITAL   , TC0220IOCInputPort1 + 3, "p1 right"  },
55 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort2 + 4, "p1 fire 1" },
56 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort2 + 5, "p1 fire 2" },
57 
58 	{"P2 Coin"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 3, "p2 coin"   },
59 	{"P2 Start"          , BIT_DIGITAL   , TC0220IOCInputPort0 + 5, "p2 start"  },
60 	{"P2 Up"             , BIT_DIGITAL   , TC0220IOCInputPort1 + 4, "p2 up"     },
61 	{"P2 Down"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 5, "p2 down"   },
62 	{"P2 Left"           , BIT_DIGITAL   , TC0220IOCInputPort1 + 6, "p2 left"   },
63 	{"P2 Right"          , BIT_DIGITAL   , TC0220IOCInputPort1 + 7, "p2 right"  },
64 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0220IOCInputPort2 + 6, "p2 fire 1" },
65 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0220IOCInputPort2 + 7, "p2 fire 2" },
66 
67 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
68 	{"Service"           , BIT_DIGITAL   , TC0220IOCInputPort0 + 0, "service"   },
69 	{"Tilt"              , BIT_DIGITAL   , TC0220IOCInputPort0 + 1, "tilt"      },
70 	{"Freeze"            , BIT_DIGITAL   , TC0220IOCInputPort2 + 3, "freeze"    },
71 	{"Dip 1"             , BIT_DIPSWITCH , TC0220IOCDip + 0       , "dip"       },
72 	{"Dip 2"             , BIT_DIPSWITCH , TC0220IOCDip + 1       , "dip"       },
73 };
74 
75 STDINPUTINFO(Darius2d)
76 
77 static struct BurnInputInfo WarriorbInputList[] =
78 {
79 	{"P1 Coin"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 2, "p1 coin"   },
80 	{"P1 Start"          , BIT_DIGITAL   , TC0510NIOInputPort0 + 4, "p1 start"  },
81 	{"P1 Up"             , BIT_DIGITAL   , TC0510NIOInputPort1 + 0, "p1 up"     },
82 	{"P1 Down"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 1, "p1 down"   },
83 	{"P1 Left"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 2, "p1 left"   },
84 	{"P1 Right"          , BIT_DIGITAL   , TC0510NIOInputPort1 + 3, "p1 right"  },
85 	{"P1 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort2 + 4, "p1 fire 1" },
86 	{"P1 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort2 + 5, "p1 fire 2" },
87 	{"P1 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 6, "p1 fire 3" },
88 
89 	{"P2 Coin"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 3, "p2 coin"   },
90 	{"P2 Start"          , BIT_DIGITAL   , TC0510NIOInputPort0 + 5, "p2 start"  },
91 	{"P2 Up"             , BIT_DIGITAL   , TC0510NIOInputPort1 + 4, "p2 up"     },
92 	{"P2 Down"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 5, "p2 down"   },
93 	{"P2 Left"           , BIT_DIGITAL   , TC0510NIOInputPort1 + 6, "p2 left"   },
94 	{"P2 Right"          , BIT_DIGITAL   , TC0510NIOInputPort1 + 7, "p2 right"  },
95 	{"P2 Fire 1"         , BIT_DIGITAL   , TC0510NIOInputPort2 + 6, "p2 fire 1" },
96 	{"P2 Fire 2"         , BIT_DIGITAL   , TC0510NIOInputPort2 + 7, "p2 fire 2" },
97 	{"P2 Fire 3"         , BIT_DIGITAL   , TC0510NIOInputPort0 + 7, "p2 fire 3" },
98 
99 	{"Reset"             , BIT_DIGITAL   , &TaitoReset            , "reset"     },
100 	{"Service"           , BIT_DIGITAL   , TC0510NIOInputPort0 + 0, "service"   },
101 	{"Tilt"              , BIT_DIGITAL   , TC0510NIOInputPort0 + 1, "tilt"      },
102 	{"Freeze"            , BIT_DIGITAL   , TC0510NIOInputPort2 + 3, "freeze"    },
103 	{"Dip 1"             , BIT_DIPSWITCH , TC0510NIODip + 0       , "dip"       },
104 	{"Dip 2"             , BIT_DIPSWITCH , TC0510NIODip + 1       , "dip"       },
105 };
106 
STDINPUTINFO(Warriorb)107 STDINPUTINFO(Warriorb)
108 
109 static void Darius2MakeInputs()
110 {
111 	TC0220IOCInput[0] = 0xe2;
112 	TC0220IOCInput[1] = 0xff;
113 	TC0220IOCInput[2] = 0xff;
114 
115 	if (TC0220IOCInputPort0[0]) TC0220IOCInput[0] |= 0x01;
116 	if (TC0220IOCInputPort0[1]) TC0220IOCInput[0] -= 0x02;
117 	if (TC0220IOCInputPort0[2]) TC0220IOCInput[0] |= 0x04;
118 	if (TC0220IOCInputPort0[3]) TC0220IOCInput[0] |= 0x08;
119 	if (TC0220IOCInputPort0[4]) TC0220IOCInput[0] |= 0x10;
120 	if (TC0220IOCInputPort0[5]) TC0220IOCInput[0] -= 0x20;
121 	if (TC0220IOCInputPort0[6]) TC0220IOCInput[0] -= 0x40;
122 	if (TC0220IOCInputPort0[7]) TC0220IOCInput[0] -= 0x80;
123 
124 	for (INT32 i = 0; i < 8; i++) {
125 		TC0220IOCInput[1] -= (TC0220IOCInputPort1[i] & 1) << i;
126 		TC0220IOCInput[2] -= (TC0220IOCInputPort2[i] & 1) << i;
127 	}
128 }
129 
Darius2dMakeInputs()130 static void Darius2dMakeInputs()
131 {
132 	TC0220IOCInput[0] = 0xff;
133 	TC0220IOCInput[1] = 0xff;
134 	TC0220IOCInput[2] = 0xf7;
135 
136 	if (TC0220IOCInputPort2[0]) TC0220IOCInput[2] -= 0x01;
137 	if (TC0220IOCInputPort2[1]) TC0220IOCInput[2] -= 0x02;
138 	if (TC0220IOCInputPort2[2]) TC0220IOCInput[2] -= 0x04;
139 	if (TC0220IOCInputPort2[3]) TC0220IOCInput[2] |= 0x08;
140 	if (TC0220IOCInputPort2[4]) TC0220IOCInput[2] -= 0x10;
141 	if (TC0220IOCInputPort2[5]) TC0220IOCInput[2] -= 0x20;
142 	if (TC0220IOCInputPort2[6]) TC0220IOCInput[2] -= 0x40;
143 	if (TC0220IOCInputPort2[7]) TC0220IOCInput[2] -= 0x80;
144 
145 	for (INT32 i = 0; i < 8; i++) {
146 		TC0220IOCInput[0] -= (TC0220IOCInputPort0[i] & 1) << i;
147 		TC0220IOCInput[1] -= (TC0220IOCInputPort1[i] & 1) << i;
148 	}
149 }
150 
WarriorbMakeInputs()151 static void WarriorbMakeInputs()
152 {
153 	TC0510NIOInput[0] = 0xff;
154 	TC0510NIOInput[1] = 0xff;
155 	TC0510NIOInput[2] = 0xf7;
156 
157 	if (TC0510NIOInputPort2[0]) TC0510NIOInput[2] -= 0x01;
158 	if (TC0510NIOInputPort2[1]) TC0510NIOInput[2] -= 0x02;
159 	if (TC0510NIOInputPort2[2]) TC0510NIOInput[2] -= 0x04;
160 	if (TC0510NIOInputPort2[3]) TC0510NIOInput[2] |= 0x08;
161 	if (TC0510NIOInputPort2[4]) TC0510NIOInput[2] -= 0x10;
162 	if (TC0510NIOInputPort2[5]) TC0510NIOInput[2] -= 0x20;
163 	if (TC0510NIOInputPort2[6]) TC0510NIOInput[2] -= 0x40;
164 	if (TC0510NIOInputPort2[7]) TC0510NIOInput[2] -= 0x80;
165 
166 	for (INT32 i = 0; i < 8; i++) {
167 		TC0510NIOInput[0] -= (TC0510NIOInputPort0[i] & 1) << i;
168 		TC0510NIOInput[1] -= (TC0510NIOInputPort1[i] & 1) << i;
169 	}
170 }
171 
172 static struct BurnDIPInfo Darius2DIPList[]=
173 {
174 	// Default Values
175 	{0x14, 0xff, 0xff, 0xfe, NULL                             },
176 	{0x15, 0xff, 0xff, 0xff, NULL                             },
177 
178 	// Dip 1
179 	{0   , 0xfe, 0   , 2   , "Auto Fire"                      },
180 	{0x14, 0x01, 0x02, 0x02, "Normal"                         },
181 	{0x14, 0x01, 0x02, 0x00, "Fast"                           },
182 
183 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
184 	{0x14, 0x01, 0x04, 0x04, "Off"                            },
185 	{0x14, 0x01, 0x04, 0x00, "On"                             },
186 
187 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
188 	{0x14, 0x01, 0x08, 0x00, "Off"                            },
189 	{0x14, 0x01, 0x08, 0x08, "On"                             },
190 
191 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
192 	{0x14, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
193 	{0x14, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
194 	{0x14, 0x01, 0x30, 0x00, "2 Coins 3 Credits"              },
195 	{0x14, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
196 
197 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
198 	{0x14, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
199 	{0x14, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
200 	{0x14, 0x01, 0xc0, 0x00, "2 Coins 3 Credits"              },
201 	{0x14, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
202 
203 	// Dip 2
204 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
205 	{0x15, 0x01, 0x03, 0x02, "Easy"                           },
206 	{0x15, 0x01, 0x03, 0x03, "Medium"                         },
207 	{0x15, 0x01, 0x03, 0x01, "Hard"                           },
208 	{0x15, 0x01, 0x03, 0x00, "Hardest"                        },
209 
210 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
211 	{0x15, 0x01, 0x0c, 0x0c, "every 700k"                     },
212 	{0x15, 0x01, 0x0c, 0x08, "every 800k"                     },
213 	{0x15, 0x01, 0x0c, 0x04, "every 900k"                     },
214 	{0x15, 0x01, 0x0c, 0x00, "every 1000K"                    },
215 
216 	{0   , 0xfe, 0   , 4   , "Lives"                          },
217 	{0x15, 0x01, 0x30, 0x30, "3"                              },
218 	{0x15, 0x01, 0x30, 0x20, "4"                              },
219 	{0x15, 0x01, 0x30, 0x10, "5"                              },
220 	{0x15, 0x01, 0x30, 0x00, "6"                              },
221 
222 	{0   , 0xfe, 0   , 2   , "Invulnerability"                },
223 	{0x15, 0x01, 0x40, 0x40, "Off"                            },
224 	{0x15, 0x01, 0x40, 0x00, "On"                             },
225 
226 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
227 	{0x15, 0x01, 0x80, 0x00, "Off"                            },
228 	{0x15, 0x01, 0x80, 0x80, "On"                             },
229 };
230 
231 STDDIPINFO(Darius2)
232 
233 static struct BurnDIPInfo Darius2dDIPList[]=
234 {
235 	// Default Values
236 	{0x14, 0xff, 0xff, 0xfe, NULL                             },
237 	{0x15, 0xff, 0xff, 0xff, NULL                             },
238 
239 	// Dip 1
240 	{0   , 0xfe, 0   , 2   , "Auto Fire"                      },
241 	{0x14, 0x01, 0x02, 0x02, "Normal"                         },
242 	{0x14, 0x01, 0x02, 0x00, "Fast"                           },
243 
244 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
245 	{0x14, 0x01, 0x04, 0x04, "Off"                            },
246 	{0x14, 0x01, 0x04, 0x00, "On"                             },
247 
248 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
249 	{0x14, 0x01, 0x08, 0x00, "Off"                            },
250 	{0x14, 0x01, 0x08, 0x08, "On"                             },
251 
252 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
253 	{0x14, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
254 	{0x14, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
255 	{0x14, 0x01, 0x30, 0x00, "2 Coins 3 Credits"              },
256 	{0x14, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
257 
258 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
259 	{0x14, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
260 	{0x14, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
261 	{0x14, 0x01, 0xc0, 0x00, "2 Coins 3 Credits"              },
262 	{0x14, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
263 
264 	// Dip 2
265 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
266 	{0x15, 0x01, 0x03, 0x02, "Easy"                           },
267 	{0x15, 0x01, 0x03, 0x03, "Medium"                         },
268 	{0x15, 0x01, 0x03, 0x01, "Hard"                           },
269 	{0x15, 0x01, 0x03, 0x00, "Hardest"                        },
270 
271 	{0   , 0xfe, 0   , 4   , "Bonus Life"                     },
272 	{0x15, 0x01, 0x0c, 0x0c, "every 700k"                     },
273 	{0x15, 0x01, 0x0c, 0x08, "every 800k"                     },
274 	{0x15, 0x01, 0x0c, 0x04, "every 900k"                     },
275 	{0x15, 0x01, 0x0c, 0x00, "every 1000K"                    },
276 
277 	{0   , 0xfe, 0   , 4   , "Lives"                          },
278 	{0x15, 0x01, 0x30, 0x30, "3"                              },
279 	{0x15, 0x01, 0x30, 0x20, "4"                              },
280 	{0x15, 0x01, 0x30, 0x10, "5"                              },
281 	{0x15, 0x01, 0x30, 0x00, "6"                              },
282 
283 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
284 	{0x15, 0x01, 0x80, 0x00, "Off"                            },
285 	{0x15, 0x01, 0x80, 0x80, "On"                             },
286 };
287 
288 STDDIPINFO(Darius2d)
289 
290 static struct BurnDIPInfo NinjawDIPList[]=
291 {
292 	// Default Values
293 	{0x14, 0xff, 0xff, 0xff, NULL                             },
294 	{0x15, 0xff, 0xff, 0xff, NULL                             },
295 
296 	// Dip 1
297 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
298 	{0x14, 0x01, 0x01, 0x00, "Off"                            },
299 	{0x14, 0x01, 0x01, 0x01, "On"                             },
300 
301 	{0   , 0xfe, 0   , 2   , "Auto Fire"                      },
302 	{0x14, 0x01, 0x02, 0x02, "Normal"                         },
303 	{0x14, 0x01, 0x02, 0x00, "Fast"                           },
304 
305 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
306 	{0x14, 0x01, 0x04, 0x04, "Off"                            },
307 	{0x14, 0x01, 0x04, 0x00, "On"                             },
308 
309 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
310 	{0x14, 0x01, 0x08, 0x00, "Off"                            },
311 	{0x14, 0x01, 0x08, 0x08, "On"                             },
312 
313 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
314 	{0x14, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
315 	{0x14, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
316 	{0x14, 0x01, 0x30, 0x00, "2 Coins 3 Credits"              },
317 	{0x14, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
318 
319 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
320 	{0x14, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
321 	{0x14, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
322 	{0x14, 0x01, 0xc0, 0x00, "2 Coins 3 Credits"              },
323 	{0x14, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
324 
325 	// Dip 2
326 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
327 	{0x15, 0x01, 0x03, 0x02, "Easy"                           },
328 	{0x15, 0x01, 0x03, 0x03, "Medium"                         },
329 	{0x15, 0x01, 0x03, 0x01, "Hard"                           },
330 	{0x15, 0x01, 0x03, 0x00, "Hardest"                        },
331 };
332 
333 STDDIPINFO(Ninjaw)
334 
335 static struct BurnDIPInfo NinjawjDIPList[]=
336 {
337 	// Default Values
338 	{0x14, 0xff, 0xff, 0xff, NULL                             },
339 	{0x15, 0xff, 0xff, 0xff, NULL                             },
340 
341 	// Dip 1
342 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
343 	{0x14, 0x01, 0x01, 0x00, "Off"                            },
344 	{0x14, 0x01, 0x01, 0x01, "On"                             },
345 
346 	{0   , 0xfe, 0   , 2   , "Auto Fire"                      },
347 	{0x14, 0x01, 0x02, 0x02, "Normal"                         },
348 	{0x14, 0x01, 0x02, 0x00, "Fast"                           },
349 
350 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
351 	{0x14, 0x01, 0x04, 0x04, "Off"                            },
352 	{0x14, 0x01, 0x04, 0x00, "On"                             },
353 
354 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
355 	{0x14, 0x01, 0x08, 0x00, "Off"                            },
356 	{0x14, 0x01, 0x08, 0x08, "On"                             },
357 
358 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
359 	{0x14, 0x01, 0x30, 0x00, "4 Coins 1 Credit"               },
360 	{0x14, 0x01, 0x30, 0x10, "3 Coins 1 Credit"               },
361 	{0x14, 0x01, 0x30, 0x20, "2 Coins 1 Credit"               },
362 	{0x14, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
363 
364 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
365 	{0x14, 0x01, 0xc0, 0xc0, "1 Coin 2 Credits"               },
366 	{0x14, 0x01, 0xc0, 0x80, "1 Coin 3 Credits"               },
367 	{0x14, 0x01, 0xc0, 0x40, "1 Coin 4 Credits"               },
368 	{0x14, 0x01, 0xc0, 0x00, "1 Coin 6 Credits"               },
369 
370 	// Dip 2
371 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
372 	{0x15, 0x01, 0x03, 0x02, "Easy"                           },
373 	{0x15, 0x01, 0x03, 0x03, "Medium"                         },
374 	{0x15, 0x01, 0x03, 0x01, "Hard"                           },
375 	{0x15, 0x01, 0x03, 0x00, "Hardest"                        },
376 };
377 
378 STDDIPINFO(Ninjawj)
379 
380 static struct BurnDIPInfo WarriorbDIPList[]=
381 {
382 	// Default Values
383 	{0x16, 0xff, 0xff, 0xff, NULL                             },
384 	{0x17, 0xff, 0xff, 0xff, NULL                             },
385 
386 	// Dip 1
387 	{0   , 0xfe, 0   , 4   , "Vitality Recovery"              },
388 	{0x16, 0x01, 0x03, 0x02, "Less"                           },
389 	{0x16, 0x01, 0x03, 0x03, "Normal"                         },
390 	{0x16, 0x01, 0x03, 0x01, "More"                           },
391 	{0x16, 0x01, 0x03, 0x00, "Most"                           },
392 
393 	{0   , 0xfe, 0   , 2   , "Service Mode"                   },
394 	{0x16, 0x01, 0x04, 0x04, "Off"                            },
395 	{0x16, 0x01, 0x04, 0x00, "On"                             },
396 
397 	{0   , 0xfe, 0   , 2   , "Demo Sounds"                    },
398 	{0x16, 0x01, 0x08, 0x00, "Off"                            },
399 	{0x16, 0x01, 0x08, 0x08, "On"                             },
400 
401 	{0   , 0xfe, 0   , 4   , "Coin A"                         },
402 	{0x16, 0x01, 0x30, 0x00, "3 Coins 1 Credit"               },
403 	{0x16, 0x01, 0x30, 0x10, "2 Coins 1 Credit"               },
404 	{0x16, 0x01, 0x30, 0x30, "1 Coin  1 Credit"               },
405 	{0x16, 0x01, 0x30, 0x20, "1 Coin  2 Credits"              },
406 
407 	{0   , 0xfe, 0   , 4   , "Coin B"                         },
408 	{0x16, 0x01, 0xc0, 0x00, "3 Coins 1 Credit"               },
409 	{0x16, 0x01, 0xc0, 0x40, "2 Coins 1 Credit"               },
410 	{0x16, 0x01, 0xc0, 0xc0, "1 Coin  1 Credit"               },
411 	{0x16, 0x01, 0xc0, 0x80, "1 Coin  2 Credits"              },
412 
413 	// Dip 2
414 	{0   , 0xfe, 0   , 4   , "Difficulty"                     },
415 	{0x17, 0x01, 0x03, 0x02, "Easy"                           },
416 	{0x17, 0x01, 0x03, 0x03, "Medium"                         },
417 	{0x17, 0x01, 0x03, 0x01, "Hard"                           },
418 	{0x17, 0x01, 0x03, 0x00, "Hardest"                        },
419 
420 	{0   , 0xfe, 0   , 2   , "Gold Sheep at"                  },
421 	{0x17, 0x01, 0x04, 0x04, "50k only"                       },
422 	{0x17, 0x01, 0x04, 0x00, "50k, then every 70k"            },
423 
424 	{0   , 0xfe, 0   , 2   , "Magic Energy Loss"              },
425 	{0x17, 0x01, 0x08, 0x08, "Always Player"                  },
426 	{0x17, 0x01, 0x08, 0x00, "Player or Magician"             },
427 
428 	{0   , 0xfe, 0   , 2   , "Player Starting Strength"       },
429 	{0x17, 0x01, 0x10, 0x10, "Normal"                         },
430 	{0x17, 0x01, 0x10, 0x00, "Full"                           },
431 
432 	{0   , 0xfe, 0   , 2   , "Magician appears"               },
433 	{0x17, 0x01, 0x20, 0x20, "When you get a crystal"         },
434 	{0x17, 0x01, 0x20, 0x00, "Always"                         },
435 
436 	{0   , 0xfe, 0   , 2   , "Allow Continue"                 },
437 	{0x17, 0x01, 0x40, 0x00, "Off"                            },
438 	{0x17, 0x01, 0x40, 0x40, "On"                             },
439 
440 	{0   , 0xfe, 0   , 2   , "Rounds"                         },
441 	{0x17, 0x01, 0x80, 0x80, "Normal (10-14, depends on skill"},
442 	{0x17, 0x01, 0x80, 0x00, "Long (14)"                      },
443 };
444 
445 STDDIPINFO(Warriorb)
446 
447 static struct BurnRomInfo Darius2RomDesc[] = {
448 	{ "c07-32-1",      0x10000, 0x216c8f6a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
449 	{ "c07-29-1",      0x10000, 0x48de567f, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
450 	{ "c07-31-1",      0x10000, 0x8279d2f8, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
451 	{ "c07-30-1",      0x10000, 0x6122e400, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
452 	{ "c07-27",        0x20000, 0x0a6f7b6c, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
453 	{ "c07-25",        0x20000, 0x059f40ce, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
454 	{ "c07-26",        0x20000, 0x1f411242, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
455 	{ "c07-24",        0x20000, 0x486c9c20, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
456 
457 	{ "c07-35-1",      0x10000, 0xdd8c4723, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
458 	{ "c07-38-1",      0x10000, 0x46afb85c, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
459 	{ "c07-34-1",      0x10000, 0x296984b8, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
460 	{ "c07-37-1",      0x10000, 0x8b7d461f, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
461 	{ "c07-33-1",      0x10000, 0x2da03a3f, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
462 	{ "c07-36-1",      0x10000, 0x02cf2b1c, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
463 
464 	{ "c07-28",        0x20000, 0xda304bc5, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
465 
466 	{ "c07-03.12",     0x80000, 0x189bafce, BRF_GRA | TAITO_CHARS },
467 	{ "c07-04.11",     0x80000, 0x50421e81, BRF_GRA | TAITO_CHARS },
468 
469 	{ "c07-01",        0x80000, 0x3cf0f050, BRF_GRA | TAITO_SPRITESA },
470 	{ "c07-02",        0x80000, 0x75d16d4b, BRF_GRA | TAITO_SPRITESA },
471 
472 	{ "c07-10.95",     0x80000, 0x4bbe0ed9, BRF_SND | TAITO_YM2610A },
473 	{ "c07-11.96",     0x80000, 0x3c815699, BRF_SND | TAITO_YM2610A },
474 
475 	{ "c07-12.107",    0x80000, 0xe0b71258, BRF_SND | TAITO_YM2610B },
476 };
477 
478 STD_ROM_PICK(Darius2)
479 STD_ROM_FN(Darius2)
480 
481 static struct BurnRomInfo Darius2dRomDesc[] = {
482 	{ "c07_20-2.74",   0x20000, 0xa0f345b8, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
483 	{ "c07_19-2.73",   0x20000, 0x925412c6, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
484 	{ "c07_21-2.76",   0x20000, 0xbdd60e37, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
485 	{ "c07_18-2.71",   0x20000, 0x23fcd89b, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
486 	{ "c07-09.75",     0x80000, 0xcc69c2ce, BRF_ESS | BRF_PRG | TAITO_68KROM1          },
487 
488 	{ "c07_17.69",     0x20000, 0xae16c905, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
489 
490 	{ "c07-03.12",     0x80000, 0x189bafce, BRF_GRA | TAITO_CHARS },
491 	{ "c07-04.11",     0x80000, 0x50421e81, BRF_GRA | TAITO_CHARS },
492 
493 	{ "c07-06.27",     0x80000, 0x5eebbcd6, BRF_GRA | TAITO_SPRITESA_BYTESWAP32 },
494 	{ "c07-05.24",     0x80000, 0xfb6d0550, BRF_GRA | TAITO_SPRITESA_BYTESWAP32 },
495 	{ "c07-08.25",     0x80000, 0xa07dc846, BRF_GRA | TAITO_SPRITESA_BYTESWAP32 },
496 	{ "c07-07.26",     0x80000, 0xfd9f9e74, BRF_GRA | TAITO_SPRITESA_BYTESWAP32 },
497 
498 	{ "c07-10.95",     0x80000, 0x4bbe0ed9, BRF_SND | TAITO_YM2610A },
499 	{ "c07-11.96",     0x80000, 0x3c815699, BRF_SND | TAITO_YM2610A },
500 
501 	{ "c07-12.107",    0x80000, 0xe0b71258, BRF_SND | TAITO_YM2610B },
502 
503 	{ "c07-13.37",     0x00400, 0x3ca18eb3, BRF_OPT },
504 	{ "c07-14.38",     0x00400, 0xbaf2a193, BRF_OPT },
505 };
506 
507 STD_ROM_PICK(Darius2d)
508 STD_ROM_FN(Darius2d)
509 
510 static struct BurnRomInfo Darius2doRomDesc[] = {
511 	{ "c07_20-1.74",   0x20000, 0x48b0804a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
512 	{ "c07_19-1.73",   0x20000, 0x1f9a4f83, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
513 	{ "c07_21-1.76",   0x20000, 0xb491b0ca, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
514 	{ "c07_18-1.71",   0x20000, 0xc552e42f, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
515 	{ "c07-09.75",     0x80000, 0xcc69c2ce, BRF_ESS | BRF_PRG | TAITO_68KROM1          },
516 
517 	{ "c07_17.69",     0x20000, 0xae16c905, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
518 
519 	{ "c07-03.12",     0x80000, 0x189bafce, BRF_GRA | TAITO_CHARS },
520 	{ "c07-04.11",     0x80000, 0x50421e81, BRF_GRA | TAITO_CHARS },
521 
522 	{ "c07-06.27",     0x80000, 0x5eebbcd6, BRF_GRA | TAITO_SPRITESA_BYTESWAP32 },
523 	{ "c07-05.24",     0x80000, 0xfb6d0550, BRF_GRA | TAITO_SPRITESA_BYTESWAP32 },
524 	{ "c07-08.25",     0x80000, 0xa07dc846, BRF_GRA | TAITO_SPRITESA_BYTESWAP32 },
525 	{ "c07-07.26",     0x80000, 0xfd9f9e74, BRF_GRA | TAITO_SPRITESA_BYTESWAP32 },
526 
527 	{ "c07-10.95",     0x80000, 0x4bbe0ed9, BRF_SND | TAITO_YM2610A },
528 	{ "c07-11.96",     0x80000, 0x3c815699, BRF_SND | TAITO_YM2610A },
529 
530 	{ "c07-12.107",    0x80000, 0xe0b71258, BRF_SND | TAITO_YM2610B },
531 
532 	{ "c07-13.37",     0x00400, 0x3ca18eb3, BRF_OPT },
533 	{ "c07-14.38",     0x00400, 0xbaf2a193, BRF_OPT },
534 };
535 
536 STD_ROM_PICK(Darius2do)
537 STD_ROM_FN(Darius2do)
538 
539 static struct BurnRomInfo NinjawRomDesc[] = {
540 	{ "b31_45.35",     0x10000, 0x107902c3, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
541 	{ "b31_47.32",     0x10000, 0xbd536b1e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
542 	{ "b31_29.34",     0x10000, 0xf2941a37, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
543 	{ "b31_27.31",     0x10000, 0x2f3ff642, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
544 	{ "b31_41.5",      0x20000, 0x0daef28a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
545 	{ "b31_39.2",      0x20000, 0xe9197c3c, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
546 	{ "b31_40.6",      0x20000, 0x2ce0f24e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
547 	{ "b31_38.3",      0x20000, 0xbc68cd99, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
548 
549 	{ "b31_33.87",     0x10000, 0x6ce9af44, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
550 	{ "b31_36.97",     0x10000, 0xba20b0d4, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
551 	{ "b31_32.86",     0x10000, 0xe6025fec, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
552 	{ "b31_35.96",     0x10000, 0x70d9a89f, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
553 	{ "b31_31.85",     0x10000, 0x837f47e2, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
554 	{ "b31_34.95",     0x10000, 0xd6b5fb2a, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
555 
556 	{ "b31_37.11",     0x20000, 0x0ca5799d, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
557 
558 	{ "b31-01.23",     0x80000, 0x8e8237a7, BRF_GRA | TAITO_CHARS },
559 	{ "b31-02.24",     0x80000, 0x4c3b4e33, BRF_GRA | TAITO_CHARS },
560 
561 	{ "b31-07.176",    0x80000, 0x33568cdb, BRF_GRA | TAITO_SPRITESA },
562 	{ "b31-06.175",    0x80000, 0x0d59439e, BRF_GRA | TAITO_SPRITESA },
563 	{ "b31-05.174",    0x80000, 0x0a1fc9fb, BRF_GRA | TAITO_SPRITESA },
564 	{ "b31-04.173",    0x80000, 0x2e1e4cb5, BRF_GRA | TAITO_SPRITESA },
565 
566 	{ "b31-09.18",     0x80000, 0x60a73382, BRF_SND | TAITO_YM2610A },
567 	{ "b31-10.17",     0x80000, 0xc6434aef, BRF_SND | TAITO_YM2610A },
568 	{ "b31-11.16",     0x80000, 0x8da531d4, BRF_SND | TAITO_YM2610A },
569 
570 	{ "b31-08.19",     0x80000, 0xa0a1f87d, BRF_SND | TAITO_YM2610B },
571 
572 	{ "b31-25.38",     0x00200, 0xa0b4ba48, BRF_OPT },
573 	{ "b31-26.58",     0x00200, 0x13e5fe15, BRF_OPT },
574 };
575 
576 STD_ROM_PICK(Ninjaw)
577 STD_ROM_FN(Ninjaw)
578 
579 static struct BurnRomInfo Ninjaw1RomDesc[] = {
580 	{ "b31_30.35",     0x10000, 0x056edd9f, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
581 	{ "b31_43.32",     0x10000, 0x56ae37a6, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
582 	{ "b31_29.34",     0x10000, 0xf2941a37, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
583 	{ "b31_27.31",     0x10000, 0x2f3ff642, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
584 	{ "b31_41.5",      0x20000, 0x0daef28a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
585 	{ "b31_39.2",      0x20000, 0xe9197c3c, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
586 	{ "b31_40.6",      0x20000, 0x2ce0f24e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
587 	{ "b31_38.3",      0x20000, 0xbc68cd99, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
588 
589 	{ "b31_33.87",     0x10000, 0x6ce9af44, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
590 	{ "b31_36.97",     0x10000, 0xba20b0d4, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
591 	{ "b31_32.86",     0x10000, 0xe6025fec, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
592 	{ "b31_35.96",     0x10000, 0x70d9a89f, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
593 	{ "b31_31.85",     0x10000, 0x837f47e2, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
594 	{ "b31_34.95",     0x10000, 0xd6b5fb2a, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
595 
596 	{ "b31_37.11",     0x20000, 0x0ca5799d, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
597 
598 	{ "b31-01.23",     0x80000, 0x8e8237a7, BRF_GRA | TAITO_CHARS },
599 	{ "b31-02.24",     0x80000, 0x4c3b4e33, BRF_GRA | TAITO_CHARS },
600 
601 	{ "b31-07.176",    0x80000, 0x33568cdb, BRF_GRA | TAITO_SPRITESA },
602 	{ "b31-06.175",    0x80000, 0x0d59439e, BRF_GRA | TAITO_SPRITESA },
603 	{ "b31-05.174",    0x80000, 0x0a1fc9fb, BRF_GRA | TAITO_SPRITESA },
604 	{ "b31-04.173",    0x80000, 0x2e1e4cb5, BRF_GRA | TAITO_SPRITESA },
605 
606 	{ "b31-09.18",     0x80000, 0x60a73382, BRF_SND | TAITO_YM2610A },
607 	{ "b31-10.17",     0x80000, 0xc6434aef, BRF_SND | TAITO_YM2610A },
608 	{ "b31-11.16",     0x80000, 0x8da531d4, BRF_SND | TAITO_YM2610A },
609 
610 	{ "b31-08.19",     0x80000, 0xa0a1f87d, BRF_SND | TAITO_YM2610B },
611 
612 	{ "b31-25.38",     0x00200, 0xa0b4ba48, BRF_OPT },
613 	{ "b31-26.58",     0x00200, 0x13e5fe15, BRF_OPT },
614 };
615 
616 STD_ROM_PICK(Ninjaw1)
617 STD_ROM_FN(Ninjaw1)
618 
619 static struct BurnRomInfo NinjawjRomDesc[] = {
620 	{ "b31_30.35",     0x10000, 0x056edd9f, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
621 	{ "b31_28.32",     0x10000, 0xcfa7661c, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
622 	{ "b31_29.34",     0x10000, 0xf2941a37, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
623 	{ "b31_27.31",     0x10000, 0x2f3ff642, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
624 	{ "b31_41.5",      0x20000, 0x0daef28a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
625 	{ "b31_39.2",      0x20000, 0xe9197c3c, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
626 	{ "b31_40.6",      0x20000, 0x2ce0f24e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
627 	{ "b31_38.3",      0x20000, 0xbc68cd99, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
628 
629 	{ "b31_33.87",     0x10000, 0x6ce9af44, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
630 	{ "b31_36.97",     0x10000, 0xba20b0d4, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
631 	{ "b31_32.86",     0x10000, 0xe6025fec, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
632 	{ "b31_35.96",     0x10000, 0x70d9a89f, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
633 	{ "b31_31.85",     0x10000, 0x837f47e2, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
634 	{ "b31_34.95",     0x10000, 0xd6b5fb2a, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
635 
636 	{ "b31_37.11",     0x20000, 0x0ca5799d, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
637 
638 	{ "b31-01.23",     0x80000, 0x8e8237a7, BRF_GRA | TAITO_CHARS },
639 	{ "b31-02.24",     0x80000, 0x4c3b4e33, BRF_GRA | TAITO_CHARS },
640 
641 	{ "b31-07.176",    0x80000, 0x33568cdb, BRF_GRA | TAITO_SPRITESA },
642 	{ "b31-06.175",    0x80000, 0x0d59439e, BRF_GRA | TAITO_SPRITESA },
643 	{ "b31-05.174",    0x80000, 0x0a1fc9fb, BRF_GRA | TAITO_SPRITESA },
644 	{ "b31-04.173",    0x80000, 0x2e1e4cb5, BRF_GRA | TAITO_SPRITESA },
645 
646 	{ "b31-09.18",     0x80000, 0x60a73382, BRF_SND | TAITO_YM2610A },
647 	{ "b31-10.17",     0x80000, 0xc6434aef, BRF_SND | TAITO_YM2610A },
648 	{ "b31-11.16",     0x80000, 0x8da531d4, BRF_SND | TAITO_YM2610A },
649 
650 	{ "b31-08.19",     0x80000, 0xa0a1f87d, BRF_SND | TAITO_YM2610B },
651 
652 	{ "b31-25.38",     0x00200, 0xa0b4ba48, BRF_OPT },
653 	{ "b31-26.58",     0x00200, 0x13e5fe15, BRF_OPT },
654 };
655 
656 STD_ROM_PICK(Ninjawj)
657 STD_ROM_FN(Ninjawj)
658 
659 static struct BurnRomInfo NinjawuRomDesc[] = {
660 	{ "b31_49.35",     0x10000, 0xd38b6391, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
661 	{ "b31_48.32",     0x10000, 0x4b5bb3d8, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
662 	{ "b31_29.34",     0x10000, 0xf2941a37, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
663 	{ "b31_27.31",     0x10000, 0x2f3ff642, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
664 	{ "b31_41.5",      0x20000, 0x0daef28a, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
665 	{ "b31_39.2",      0x20000, 0xe9197c3c, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
666 	{ "b31_40.6",      0x20000, 0x2ce0f24e, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
667 	{ "b31_38.3",      0x20000, 0xbc68cd99, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
668 
669 	{ "b31_33.87",     0x10000, 0x6ce9af44, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
670 	{ "b31_36.97",     0x10000, 0xba20b0d4, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
671 	{ "b31_32.86",     0x10000, 0xe6025fec, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
672 	{ "b31_35.96",     0x10000, 0x70d9a89f, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
673 	{ "b31_31.85",     0x10000, 0x837f47e2, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
674 	{ "b31_34.95",     0x10000, 0xd6b5fb2a, BRF_ESS | BRF_PRG | TAITO_68KROM2_BYTESWAP },
675 
676 	{ "b31_37.11",     0x20000, 0x0ca5799d, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
677 
678 	{ "b31-01.23",     0x80000, 0x8e8237a7, BRF_GRA | TAITO_CHARS },
679 	{ "b31-02.24",     0x80000, 0x4c3b4e33, BRF_GRA | TAITO_CHARS },
680 
681 	{ "b31-07.176",    0x80000, 0x33568cdb, BRF_GRA | TAITO_SPRITESA },
682 	{ "b31-06.175",    0x80000, 0x0d59439e, BRF_GRA | TAITO_SPRITESA },
683 	{ "b31-05.174",    0x80000, 0x0a1fc9fb, BRF_GRA | TAITO_SPRITESA },
684 	{ "b31-04.173",    0x80000, 0x2e1e4cb5, BRF_GRA | TAITO_SPRITESA },
685 
686 	{ "b31-09.18",     0x80000, 0x60a73382, BRF_SND | TAITO_YM2610A },
687 	{ "b31-10.17",     0x80000, 0xc6434aef, BRF_SND | TAITO_YM2610A },
688 	{ "b31-11.16",     0x80000, 0x8da531d4, BRF_SND | TAITO_YM2610A },
689 
690 	{ "b31-08.19",     0x80000, 0xa0a1f87d, BRF_SND | TAITO_YM2610B },
691 
692 	{ "b31-25.38",     0x00200, 0xa0b4ba48, BRF_OPT },
693 	{ "b31-26.58",     0x00200, 0x13e5fe15, BRF_OPT },
694 };
695 
696 STD_ROM_PICK(Ninjawu)
697 STD_ROM_FN(Ninjawu)
698 
699 static struct BurnRomInfo WarriorbRomDesc[] = {
700 	{ "d24_20-1.74",   0x040000, 0x4452dc25, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
701 	{ "d24_19-1.73",   0x040000, 0x15c16016, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
702 	{ "d24_21-1.76",   0x040000, 0x783ef8e1, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
703 	{ "d24_18-1.71",   0x040000, 0x4502db60, BRF_ESS | BRF_PRG | TAITO_68KROM1_BYTESWAP },
704 	{ "d24-09.75",     0x100000, 0xece5cc59, BRF_ESS | BRF_PRG | TAITO_68KROM1          },
705 
706 	{ "d24_17.69",     0x020000, 0xe41e4aae, BRF_ESS | BRF_PRG | TAITO_Z80ROM1 },
707 
708 	{ "d24-02.12",     0x100000, 0x9f50c271, BRF_GRA | TAITO_CHARS },
709 	{ "d24-01.11",     0x100000, 0x326dcca9, BRF_GRA | TAITO_CHARS },
710 
711 	{ "d24-07.47",     0x100000, 0x9f50c271, BRF_GRA | TAITO_CHARSB },
712 	{ "d24-08.48",     0x100000, 0x1e6d1528, BRF_GRA | TAITO_CHARSB },
713 
714 	{ "d24-06.27",     0x100000, 0x918486fe, BRF_GRA | TAITO_SPRITESA_BYTESWAP32 },
715 	{ "d24-03.24",     0x100000, 0x46db9fd7, BRF_GRA | TAITO_SPRITESA_BYTESWAP32 },
716 	{ "d24-04.25",     0x100000, 0x148e0493, BRF_GRA | TAITO_SPRITESA_BYTESWAP32 },
717 	{ "d24-05.26",     0x100000, 0x9f414317, BRF_GRA | TAITO_SPRITESA_BYTESWAP32 },
718 
719 	{ "d24-12.107",    0x100000, 0x279203a1, BRF_SND | TAITO_YM2610A },
720 	{ "d24-10.95",     0x100000, 0x0e0c716d, BRF_SND | TAITO_YM2610A },
721 	{ "d24-11.118",    0x100000, 0x15362573, BRF_SND | TAITO_YM2610A },
722 
723 	{ "d24-13.37",     0x000400, 0x3ca18eb3, BRF_OPT },
724 	{ "d24-14.38",     0x000400, 0xbaf2a193, BRF_OPT },
725 
726 	{ "d24-15.78",     0x000144, 0x04992a7d, BRF_OPT },
727 	{ "d24-16.79",     0x000144, 0x92c59a8d, BRF_OPT },
728 };
729 
730 STD_ROM_PICK(Warriorb)
STD_ROM_FN(Warriorb)731 STD_ROM_FN(Warriorb)
732 
733 static INT32 MemIndex()
734 {
735 	UINT8 *Next; Next = TaitoMem;
736 
737 	Taito68KRom1                        = Next; Next += Taito68KRom1Size;
738 	Taito68KRom2                        = Next; Next += Taito68KRom2Size;
739 	TaitoZ80Rom1                        = Next; Next += TaitoZ80Rom1Size;
740 	TaitoYM2610ARom                     = Next; Next += TaitoYM2610ARomSize;
741 	TaitoYM2610BRom                     = Next; Next += TaitoYM2610BRomSize;
742 
743 	TaitoRamStart                       = Next;
744 
745 	Taito68KRam1                        = Next; Next += 0x010000;
746 	Taito68KRam2                        = Next; Next += 0x010000;
747 	TaitoZ80Ram1                        = Next; Next += 0x002000;
748 	TaitoSharedRam                      = Next; Next += 0x010000;
749 	TaitoSpriteRam                      = Next; Next += 0x004000;
750 
751 	TaitoRamEnd                         = Next;
752 
753 	TaitoChars                          = Next; Next += TaitoNumChar * TaitoCharWidth * TaitoCharHeight;
754 	TaitoSpritesA                       = Next; Next += TaitoNumSpriteA * TaitoSpriteAWidth * TaitoSpriteAHeight;
755 
756 	TaitoMemEnd                         = Next;
757 
758 	return 0;
759 }
760 
Darius2dMemIndex()761 static INT32 Darius2dMemIndex()
762 {
763 	UINT8 *Next; Next = TaitoMem;
764 
765 	Taito68KRom1                        = Next; Next += Taito68KRom1Size;
766 	TaitoZ80Rom1                        = Next; Next += TaitoZ80Rom1Size;
767 	TaitoYM2610ARom                     = Next; Next += TaitoYM2610ARomSize;
768 	TaitoYM2610BRom                     = Next; Next += TaitoYM2610BRomSize;
769 
770 	TaitoRamStart                       = Next;
771 
772 	Taito68KRam1                        = Next; Next += 0x010000;
773 	TaitoZ80Ram1                        = Next; Next += 0x002000;
774 	TaitoSpriteRam                      = Next; Next += 0x001400;
775 
776 	TaitoRamEnd                         = Next;
777 
778 	TaitoChars                          = Next; Next += TaitoNumChar * TaitoCharWidth * TaitoCharHeight;
779 	TaitoSpritesA                       = Next; Next += TaitoNumSpriteA * TaitoSpriteAWidth * TaitoSpriteAHeight;
780 
781 	TaitoMemEnd                         = Next;
782 
783 	return 0;
784 }
785 
WarriorbMemIndex()786 static INT32 WarriorbMemIndex()
787 {
788 	UINT8 *Next; Next = TaitoMem;
789 
790 	Taito68KRom1                        = Next; Next += Taito68KRom1Size;
791 	TaitoZ80Rom1                        = Next; Next += TaitoZ80Rom1Size;
792 	TaitoYM2610ARom                     = Next; Next += TaitoYM2610ARomSize;
793 	TaitoYM2610BRom                     = Next; Next += TaitoYM2610BRomSize;
794 
795 	TaitoRamStart                       = Next;
796 
797 	Taito68KRam1                        = Next; Next += 0x014000;
798 	TaitoZ80Ram1                        = Next; Next += 0x002000;
799 	TaitoSpriteRam                      = Next; Next += 0x001400;
800 
801 	TaitoRamEnd                         = Next;
802 
803 	TaitoChars                          = Next; Next += TaitoNumChar * TaitoCharWidth * TaitoCharHeight;
804 	TaitoCharsB                         = Next; Next += TaitoNumCharB * TaitoCharBWidth * TaitoCharBHeight;
805 	TaitoSpritesA                       = Next; Next += TaitoNumSpriteA * TaitoSpriteAWidth * TaitoSpriteAHeight;
806 
807 	TaitoMemEnd                         = Next;
808 
809 	return 0;
810 }
811 
Darius2CpuAReset(UINT16 d)812 static void Darius2CpuAReset(UINT16 d)
813 {
814 	TaitoCpuACtrl = d;
815 	if (!(TaitoCpuACtrl & 1)) {
816 		SekClose();
817 		SekOpen(1);
818 		SekReset();
819 		SekClose();
820 		SekOpen(0);
821 	}
822 }
823 
Darius268K1ReadByte(UINT32 a)824 UINT8 __fastcall Darius268K1ReadByte(UINT32 a)
825 {
826 	switch (a) {
827 		default: {
828 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
829 		}
830 	}
831 
832 	return 0;
833 }
834 
Darius268K1WriteByte(UINT32 a,UINT8 d)835 void __fastcall Darius268K1WriteByte(UINT32 a, UINT8 d)
836 {
837 	TC0100SCNTripleScreenByteWrite_Map(0x280000, 0x293fff)
838 	TC0100SCN1ByteWrite_Map(0x2c0000, 0x2d3fff)
839 	TC0100SCN2ByteWrite_Map(0x300000, 0x313fff)
840 
841 	switch (a) {
842 		default: {
843 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
844 		}
845 	}
846 }
847 
Darius268K1ReadWord(UINT32 a)848 UINT16 __fastcall Darius268K1ReadWord(UINT32 a)
849 {
850 	switch (a) {
851 		case 0x200000: {
852 			return TC0220IOCPortRegRead();
853 		}
854 
855 		case 0x200002: {
856 			return TC0220IOCHalfWordPortRead();
857 		}
858 
859 		case 0x220002: {
860 			return TC0140SYTCommRead();
861 		}
862 
863 		case 0x340002: {
864 			return TC0110PCRWordRead(0);
865 		}
866 
867 		case 0x350002: {
868 			return TC0110PCRWordRead(1);
869 		}
870 
871 		case 0x360002: {
872 			return TC0110PCRWordRead(2);
873 		}
874 
875 		default: {
876 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
877 		}
878 	}
879 
880 	return 0;
881 }
882 
Darius268K1WriteWord(UINT32 a,UINT16 d)883 void __fastcall Darius268K1WriteWord(UINT32 a, UINT16 d)
884 {
885 	TC0100SCN0CtrlWordWrite_Map(0x2a0000)
886 	TC0100SCN1CtrlWordWrite_Map(0x2e0000)
887 	TC0100SCN2CtrlWordWrite_Map(0x320000)
888 	TC0100SCNTripleScreenWordWrite_Map(0x280000, 0x293fff)
889 	TC0100SCN1WordWrite_Map(0x2c0000, 0x2d3fff)
890 	TC0100SCN2WordWrite_Map(0x300000, 0x313fff)
891 
892 	switch (a) {
893 		case 0x200000: {
894 			TC0220IOCHalfWordPortRegWrite(d);
895 			return;
896 		}
897 
898 		case 0x200002: {
899 			TC0220IOCHalfWordPortWrite(d);
900 			return;
901 		}
902 
903 		case 0x210000: {
904 			Darius2CpuAReset(d);
905 			return;
906 		}
907 
908 		case 0x220000: {
909 			TC0140SYTPortWrite(d);
910 			return;
911 		}
912 
913 		case 0x220002: {
914 			TC0140SYTCommWrite(d);
915 			return;
916 		}
917 
918 		case 0x340000:
919 		case 0x340002: {
920 			TC0110PCRStep1WordWrite(0, (a - 0x340000) >> 1, d);
921 			return;
922 		}
923 
924 		case 0x350000:
925 		case 0x350002: {
926 			TC0110PCRStep1WordWrite(1, (a - 0x350000) >> 1, d);
927 			return;
928 		}
929 
930 		case 0x360000:
931 		case 0x360002: {
932 			TC0110PCRStep1WordWrite(2, (a - 0x360000) >> 1, d);
933 			return;
934 		}
935 
936 		case 0x340004:
937 		case 0x350004:
938 		case 0x360004: {
939 			//nop
940 			return;
941 		}
942 
943 		default: {
944 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
945 		}
946 	}
947 }
948 
Darius268K2ReadByte(UINT32 a)949 UINT8 __fastcall Darius268K2ReadByte(UINT32 a)
950 {
951 	switch (a) {
952 		default: {
953 			bprintf(PRINT_NORMAL, _T("68K #2 Read byte => %06X\n"), a);
954 		}
955 	}
956 
957 	return 0;
958 }
959 
Darius268K2WriteByte(UINT32 a,UINT8 d)960 void __fastcall Darius268K2WriteByte(UINT32 a, UINT8 d)
961 {
962 	switch (a) {
963 		default: {
964 			bprintf(PRINT_NORMAL, _T("68K #2 Write byte => %06X, %02X\n"), a, d);
965 		}
966 	}
967 }
968 
Darius268K2ReadWord(UINT32 a)969 UINT16 __fastcall Darius268K2ReadWord(UINT32 a)
970 {
971 	switch (a) {
972 		case 0x200000: {
973 			return TC0220IOCPortRegRead();
974 		}
975 
976 		default: {
977 			bprintf(PRINT_NORMAL, _T("68K #2 Read word => %06X\n"), a);
978 		}
979 	}
980 
981 	return 0;
982 }
983 
Darius268K2WriteWord(UINT32 a,UINT16 d)984 void __fastcall Darius268K2WriteWord(UINT32 a, UINT16 d)
985 {
986 	TC0100SCNTripleScreenWordWrite_Map(0x280000, 0x293fff)
987 
988 	switch (a) {
989 		case 0x210000: {
990 			//???
991 			return;
992 		}
993 
994 		case 0x340000:
995 		case 0x340002: {
996 			TC0110PCRStep1WordWrite(0, (a - 0x340000) >> 1, d);
997 			return;
998 		}
999 
1000 		case 0x350000:
1001 		case 0x350002: {
1002 			TC0110PCRStep1WordWrite(1, (a - 0x350000) >> 1, d);
1003 			return;
1004 		}
1005 
1006 		case 0x360000:
1007 		case 0x360002: {
1008 			TC0110PCRStep1WordWrite(2, (a - 0x360000) >> 1, d);
1009 			return;
1010 		}
1011 
1012 		case 0x340004:
1013 		case 0x350004:
1014 		case 0x360004: {
1015 			//nop
1016 			return;
1017 		}
1018 
1019 		default: {
1020 			bprintf(PRINT_NORMAL, _T("68K #2 Write word => %06X, %04X\n"), a, d);
1021 		}
1022 	}
1023 }
1024 
Darius2d68KReadByte(UINT32 a)1025 UINT8 __fastcall Darius2d68KReadByte(UINT32 a)
1026 {
1027 	switch (a) {
1028 		default: {
1029 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
1030 		}
1031 	}
1032 
1033 	return 0;
1034 }
1035 
Darius2d68KWriteByte(UINT32 a,UINT8 d)1036 void __fastcall Darius2d68KWriteByte(UINT32 a, UINT8 d)
1037 {
1038 	TC0100SCNDualScreenByteWrite_Map(0x200000, 0x213fff)
1039 	TC0100SCN1ByteWrite_Map(0x240000, 0x25ffff)
1040 
1041 	switch (a) {
1042 		default: {
1043 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
1044 		}
1045 	}
1046 }
1047 
Darius2d68KReadWord(UINT32 a)1048 UINT16 __fastcall Darius2d68KReadWord(UINT32 a)
1049 {
1050 	switch (a) {
1051 		case 0x400002: {
1052 			return TC0110PCRWordRead(0);
1053 		}
1054 
1055 		case 0x420002: {
1056 			return TC0110PCRWordRead(1);
1057 		}
1058 
1059 		case 0x800000:
1060 		case 0x800002:
1061 		case 0x800004:
1062 		case 0x800006:
1063 		case 0x800008:
1064 		case 0x80000a:
1065 		case 0x80000c:
1066 		case 0x80000e: {
1067 			return TC0220IOCRead((a - 0x800000) >> 1);
1068 		}
1069 
1070 		case 0x830002: {
1071 			return TC0140SYTCommRead();
1072 		}
1073 
1074 		default: {
1075 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
1076 		}
1077 	}
1078 
1079 	return 0;
1080 }
1081 
Darius2d68KWriteWord(UINT32 a,UINT16 d)1082 void __fastcall Darius2d68KWriteWord(UINT32 a, UINT16 d)
1083 {
1084 	TC0100SCNDualScreenWordWrite_Map(0x200000, 0x213fff)
1085 
1086 	if (a >= 0x214000 && a <= 0x2141ff) return;
1087 
1088 	TC0100SCN0CtrlWordWrite_Map(0x220000)
1089 	TC0100SCN1CtrlWordWrite_Map(0x260000)
1090 	TC0100SCN1WordWrite_Map(0x240000, 0x25ffff)
1091 
1092 	switch (a) {
1093 		case 0x400000:
1094 		case 0x400002:
1095 		case 0x400004: {
1096 			TC0110PCRStep1WordWrite(0, (a - 0x400000) >> 1, d);
1097 			return;
1098 		}
1099 
1100 		case 0x420000:
1101 		case 0x420002:
1102 		case 0x420004: {
1103 			TC0110PCRStep1WordWrite(1, (a - 0x420000) >> 1, d);
1104 			return;
1105 		}
1106 
1107 		case 0x800000:
1108 		case 0x800002:
1109 		case 0x800004:
1110 		case 0x800006:
1111 		case 0x800008:
1112 		case 0x80000a:
1113 		case 0x80000c:
1114 		case 0x80000e: {
1115 			TC0220IOCWrite((a - 0x800000) >> 1, d);
1116 			return;
1117 		}
1118 
1119 		case 0x820000: {
1120 			// nop
1121 			return;
1122 		}
1123 
1124 		case 0x830000: {
1125 			TC0140SYTPortWrite(d);
1126 			return;
1127 		}
1128 
1129 		case 0x830002: {
1130 			TC0140SYTCommWrite(d);
1131 			return;
1132 		}
1133 
1134 		default: {
1135 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
1136 		}
1137 	}
1138 }
1139 
Warriorb68KReadByte(UINT32 a)1140 UINT8 __fastcall Warriorb68KReadByte(UINT32 a)
1141 {
1142 	TC0510NIOHalfWordRead_Map(0x800000)
1143 
1144 	switch (a) {
1145 		default: {
1146 			bprintf(PRINT_NORMAL, _T("68K #1 Read byte => %06X\n"), a);
1147 		}
1148 	}
1149 
1150 	return 0;
1151 }
1152 
Warriorb68KWriteByte(UINT32 a,UINT8 d)1153 void __fastcall Warriorb68KWriteByte(UINT32 a, UINT8 d)
1154 {
1155 	TC0100SCNDualScreenByteWrite_Map(0x300000, 0x313fff)
1156 	TC0100SCN1ByteWrite_Map(0x340000, 0x35ffff)
1157 
1158 	switch (a) {
1159 		default: {
1160 			bprintf(PRINT_NORMAL, _T("68K #1 Write byte => %06X, %02X\n"), a, d);
1161 		}
1162 	}
1163 }
1164 
Warriorb68KReadWord(UINT32 a)1165 UINT16 __fastcall Warriorb68KReadWord(UINT32 a)
1166 {
1167 	TC0510NIOHalfWordRead_Map(0x800000)
1168 
1169 	switch (a) {
1170 		case 0x400002: {
1171 			return TC0110PCRWordRead(0);
1172 		}
1173 
1174 		case 0x420002: {
1175 			return TC0110PCRWordRead(1);
1176 		}
1177 
1178 		case 0x830002: {
1179 			return TC0140SYTCommRead();
1180 		}
1181 
1182 		default: {
1183 			bprintf(PRINT_NORMAL, _T("68K #1 Read word => %06X\n"), a);
1184 		}
1185 	}
1186 
1187 	return 0;
1188 }
1189 
Warriorb68KWriteWord(UINT32 a,UINT16 d)1190 void __fastcall Warriorb68KWriteWord(UINT32 a, UINT16 d)
1191 {
1192 	TC0100SCNDualScreenWordWrite_Map(0x300000, 0x313fff)
1193 	TC0100SCN1WordWrite_Map(0x340000, 0x35ffff)
1194 
1195 	TC0100SCN0CtrlWordWrite_Map(0x320000)
1196 	TC0100SCN1CtrlWordWrite_Map(0x360000)
1197 
1198 	TC0510NIOHalfWordWrite_Map(0x800000)
1199 
1200 	switch (a) {
1201 		case 0x400000:
1202 		case 0x400002:
1203 		case 0x400004: {
1204 			TC0110PCRStep1WordWrite(0, (a - 0x400000) >> 1, d);
1205 			return;
1206 		}
1207 
1208 		case 0x420000:
1209 		case 0x420002:
1210 		case 0x420004: {
1211 			TC0110PCRStep1WordWrite(1, (a - 0x420000) >> 1, d);
1212 			return;
1213 		}
1214 
1215 		case 0x820000: {
1216 			// nop
1217 			return;
1218 		}
1219 
1220 		case 0x830000: {
1221 			TC0140SYTPortWrite(d);
1222 			return;
1223 		}
1224 
1225 		case 0x830002: {
1226 			TC0140SYTCommWrite(d);
1227 			return;
1228 		}
1229 
1230 		default: {
1231 			bprintf(PRINT_NORMAL, _T("68K #1 Write word => %06X, %04X\n"), a, d);
1232 		}
1233 	}
1234 }
1235 
Darius2Z80Read(UINT16 a)1236 UINT8 __fastcall Darius2Z80Read(UINT16 a)
1237 {
1238 	switch (a) {
1239 		case 0xe000: {
1240 			return BurnYM2610Read(0);
1241 		}
1242 
1243 		case 0xe002: {
1244 			return BurnYM2610Read(2);
1245 		}
1246 
1247 		case 0xe201: {
1248 			return TC0140SYTSlaveCommRead();
1249 		}
1250 
1251 		case 0xea00: {
1252 			// NOP
1253 			return 0;
1254 		}
1255 
1256 		default: {
1257 			bprintf(PRINT_NORMAL, _T("Z80 Read %04X\n"), a);
1258 		}
1259 	}
1260 
1261 	return 0;
1262 }
1263 
Darius2Z80Write(UINT16 a,UINT8 d)1264 void __fastcall Darius2Z80Write(UINT16 a, UINT8 d)
1265 {
1266 	switch (a) {
1267 		case 0xe000: {
1268 			BurnYM2610Write(0, d);
1269 			return;
1270 		}
1271 
1272 		case 0xe001: {
1273 			BurnYM2610Write(1, d);
1274 			return;
1275 		}
1276 
1277 		case 0xe002: {
1278 			BurnYM2610Write(2, d);
1279 			return;
1280 		}
1281 
1282 		case 0xe003: {
1283 			BurnYM2610Write(3, d);
1284 			return;
1285 		}
1286 
1287 		case 0xe200: {
1288 			TC0140SYTSlavePortWrite(d);
1289 			return;
1290 		}
1291 
1292 		case 0xe201: {
1293 			TC0140SYTSlaveCommWrite(d);
1294 			return;
1295 		}
1296 
1297 		case 0xe400: {
1298 			BurnYM2610SetLeftVolume(BURN_SND_YM2610_YM2610_ROUTE_1, Darius2YM2610Route1MasterVol * d / 255.0);
1299 			return;
1300 		}
1301 
1302 		case 0xe401: {
1303 			BurnYM2610SetRightVolume(BURN_SND_YM2610_YM2610_ROUTE_1, Darius2YM2610Route1MasterVol * d / 255.0);
1304 			return;
1305 		}
1306 
1307 		case 0xe402: {
1308 			BurnYM2610SetLeftVolume(BURN_SND_YM2610_YM2610_ROUTE_2, Darius2YM2610Route1MasterVol * d / 255.0);
1309 			return;
1310 		}
1311 
1312 		case 0xe403: {
1313 			BurnYM2610SetRightVolume(BURN_SND_YM2610_YM2610_ROUTE_2, Darius2YM2610Route1MasterVol * d / 255.0);
1314 			return;
1315 		}
1316 
1317 		case 0xe600: {
1318 			//???
1319 			return;
1320 		}
1321 
1322 		case 0xee00: {
1323 			//nop
1324 			return;
1325 		}
1326 
1327 		case 0xf000: {
1328 			//nop
1329 			return;
1330 		}
1331 
1332 		case 0xf200: {
1333 			TaitoZ80Bank = (d - 1) & 7;
1334 			ZetMapArea(0x4000, 0x7fff, 0, TaitoZ80Rom1 + 0x4000 + (TaitoZ80Bank * 0x4000));
1335 			ZetMapArea(0x4000, 0x7fff, 2, TaitoZ80Rom1 + 0x4000 + (TaitoZ80Bank * 0x4000));
1336 			return;
1337 		}
1338 
1339 		default: {
1340 			bprintf(PRINT_NORMAL, _T("Z80 Write %04X, %02X\n"), a, d);
1341 		}
1342 	}
1343 }
1344 
1345 static INT32 CharPlaneOffsets[4]           = { 0, 1, 2, 3 };
1346 static INT32 CharXOffsets[8]               = { 8, 12, 0, 4, 24, 28, 16, 20 };
1347 static INT32 CharYOffsets[8]               = { 0, 32, 64, 96, 128, 160, 192, 224 };
1348 static INT32 SpritePlaneOffsets[4]         = { 8, 12, 0, 4 };
1349 static INT32 SpriteXOffsets[16]            = { 3, 2, 1, 0, 19, 18, 17, 16, 259, 258, 257, 256, 275, 274, 273, 272 };
1350 static INT32 SpriteYOffsets[16]            = { 0, 32, 64, 96, 128, 160, 192, 224, 512, 544, 576, 608, 640, 672, 704, 736 };
1351 static INT32 Darius2dSpritePlaneOffsets[4] = { 0, 1, 2, 3 };
1352 static INT32 Darius2dSpriteXOffsets[16]    = { 12, 8, 44, 40, 4, 0, 36, 32, 28, 24, 60, 56, 20, 16, 52, 48 };
1353 static INT32 Darius2dSpriteYOffsets[16]    = { 0, 64, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960 };
1354 
Darius2FMIRQHandler(INT32,INT32 nStatus)1355 static void Darius2FMIRQHandler(INT32, INT32 nStatus)
1356 {
1357 	ZetSetIRQLine(0, (nStatus) ? CPU_IRQSTATUS_ACK : CPU_IRQSTATUS_NONE);
1358 }
1359 
Darius2Init()1360 static INT32 Darius2Init()
1361 {
1362 	INT32 nLen;
1363 
1364 	TaitoCharModulo = 0x100;
1365 	TaitoCharNumPlanes = 4;
1366 	TaitoCharWidth = 8;
1367 	TaitoCharHeight = 8;
1368 	TaitoCharPlaneOffsets = CharPlaneOffsets;
1369 	TaitoCharXOffsets = CharXOffsets;
1370 	TaitoCharYOffsets = CharYOffsets;
1371 	TaitoNumChar = 0x8000;
1372 
1373 	TaitoSpriteAModulo = 0x400;
1374 	TaitoSpriteANumPlanes = 4;
1375 	TaitoSpriteAWidth = 16;
1376 	TaitoSpriteAHeight = 16;
1377 	TaitoSpriteAPlaneOffsets = SpritePlaneOffsets;
1378 	TaitoSpriteAXOffsets = SpriteXOffsets;
1379 	TaitoSpriteAYOffsets = SpriteYOffsets;
1380 	TaitoNumSpriteA = 0x2000;
1381 
1382 	if (Ninjaw) TaitoNumSpriteA = 0x4000;
1383 
1384 	TaitoNum68Ks = 2;
1385 	TaitoNumZ80s = 1;
1386 	TaitoNumYM2610 = 1;
1387 
1388 	TaitoLoadRoms(0);
1389 
1390 	// Allocate and Blank all required memory
1391 	TaitoMem = NULL;
1392 	MemIndex();
1393 	nLen = TaitoMemEnd - (UINT8 *)0;
1394 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
1395 	memset(TaitoMem, 0, nLen);
1396 	MemIndex();
1397 
1398 	GenericTilesInit();
1399 
1400 	TC0100SCNInit(0, TaitoNumChar, 22, 16, 0, NULL);
1401 	TC0100SCNSetClipArea(0, 288, nScreenHeight, 0);
1402 	TC0100SCNInit(1, TaitoNumChar, 24, 16, 0, NULL);
1403 	TC0100SCNSetClipArea(1, 288, nScreenHeight, 288);
1404 	TC0100SCNSetPaletteOffset(1, 0x1000);
1405 	TC0100SCNInit(2, TaitoNumChar, 26, 16, 0, NULL);
1406 	TC0100SCNSetClipArea(2, 288, nScreenHeight, 576);
1407 	TC0100SCNSetPaletteOffset(2, 0x2000);
1408 	TC0110PCRInit(3, 0x3000);
1409 	TC0140SYTInit(0);
1410 	TC0220IOCInit();
1411 
1412 	if (TaitoLoadRoms(1)) return 1;
1413 
1414 	SekInit(0, 0x68000);
1415 	SekOpen(0);
1416 	SekMapMemory(Taito68KRom1           , 0x000000, 0x0bffff, MAP_ROM);
1417 	SekMapMemory(Taito68KRam1           , 0x0c0000, 0x0cffff, MAP_RAM);
1418 	SekMapMemory(TaitoSharedRam         , 0x240000, 0x24ffff, MAP_RAM);
1419 	SekMapMemory(TaitoSpriteRam         , 0x260000, 0x263fff, MAP_RAM);
1420 	SekMapMemory(TC0100SCNRam[0]        , 0x280000, 0x293fff, MAP_READ);
1421 	SekMapMemory(TC0100SCNRam[1]        , 0x2c0000, 0x2d3fff, MAP_READ);
1422 	SekMapMemory(TC0100SCNRam[2]        , 0x300000, 0x313fff, MAP_READ);
1423 	SekSetReadByteHandler(0, Darius268K1ReadByte);
1424 	SekSetWriteByteHandler(0, Darius268K1WriteByte);
1425 	SekSetReadWordHandler(0, Darius268K1ReadWord);
1426 	SekSetWriteWordHandler(0, Darius268K1WriteWord);
1427 	SekClose();
1428 
1429 	SekInit(1, 0x68000);
1430 	SekOpen(1);
1431 	SekMapMemory(Taito68KRom2           , 0x000000, 0x05ffff, MAP_ROM);
1432 	SekMapMemory(Taito68KRam2           , 0x080000, 0x08ffff, MAP_RAM);
1433 	SekMapMemory(TaitoSharedRam         , 0x240000, 0x24ffff, MAP_RAM);
1434 	SekMapMemory(TaitoSpriteRam         , 0x260000, 0x263fff, MAP_RAM);
1435 	SekMapMemory(TC0100SCNRam[0]        , 0x280000, 0x293fff, MAP_READ);
1436 	SekSetReadByteHandler(0, Darius268K2ReadByte);
1437 	SekSetWriteByteHandler(0, Darius268K2WriteByte);
1438 	SekSetReadWordHandler(0, Darius268K2ReadWord);
1439 	SekSetWriteWordHandler(0, Darius268K2WriteWord);
1440 	SekClose();
1441 
1442 	ZetInit(0);
1443 	ZetOpen(0);
1444 	ZetSetReadHandler(Darius2Z80Read);
1445 	ZetSetWriteHandler(Darius2Z80Write);
1446 	ZetMapArea(0x0000, 0x3fff, 0, TaitoZ80Rom1               );
1447 	ZetMapArea(0x0000, 0x3fff, 2, TaitoZ80Rom1               );
1448 	ZetMapArea(0x4000, 0x7fff, 0, TaitoZ80Rom1 + 0x4000      );
1449 	ZetMapArea(0x4000, 0x7fff, 2, TaitoZ80Rom1 + 0x4000      );
1450 	ZetMapArea(0xc000, 0xdfff, 0, TaitoZ80Ram1               );
1451 	ZetMapArea(0xc000, 0xdfff, 1, TaitoZ80Ram1               );
1452 	ZetMapArea(0xc000, 0xdfff, 2, TaitoZ80Ram1               );
1453 	ZetClose();
1454 
1455 	BurnYM2610Init(16000000 / 2, TaitoYM2610ARom, (INT32*)&TaitoYM2610ARomSize, TaitoYM2610BRom, (INT32*)&TaitoYM2610BRomSize, &Darius2FMIRQHandler, 0);
1456 	BurnTimerAttachZet(16000000 / 4);
1457 	BurnYM2610SetLeftVolume(BURN_SND_YM2610_AY8910_ROUTE, 0.03);
1458 	BurnYM2610SetRightVolume(BURN_SND_YM2610_AY8910_ROUTE, 0.03);
1459 	Darius2YM2610Route1MasterVol = 1.00;
1460 	Darius2YM2610Route2MasterVol = 1.00;
1461 	bYM2610UseSeperateVolumes = 1;
1462 
1463 	TaitoMakeInputsFunction = Darius2MakeInputs;
1464 	TaitoIrqLine = 4;
1465 
1466 	nTaitoCyclesTotal[0] = (16000000 / 2) / 60;
1467 	nTaitoCyclesTotal[1] = (16000000 / 2) / 60;
1468 	nTaitoCyclesTotal[2] = (16000000 / 4) / 60;
1469 
1470 	TaitoResetFunction = TaitoDoReset;
1471 	TaitoResetFunction();
1472 
1473 	return 0;
1474 }
1475 
Darius2dInit()1476 static INT32 Darius2dInit()
1477 {
1478 	INT32 nLen;
1479 
1480 	TaitoCharModulo = 0x100;
1481 	TaitoCharNumPlanes = 4;
1482 	TaitoCharWidth = 8;
1483 	TaitoCharHeight = 8;
1484 	TaitoCharPlaneOffsets = CharPlaneOffsets;
1485 	TaitoCharXOffsets = CharXOffsets;
1486 	TaitoCharYOffsets = CharYOffsets;
1487 	TaitoNumChar = 0x8000;
1488 
1489 	TaitoSpriteAModulo = 0x400;
1490 	TaitoSpriteANumPlanes = 4;
1491 	TaitoSpriteAWidth = 16;
1492 	TaitoSpriteAHeight = 16;
1493 	TaitoSpriteAPlaneOffsets = Darius2dSpritePlaneOffsets;
1494 	TaitoSpriteAXOffsets = Darius2dSpriteXOffsets;
1495 	TaitoSpriteAYOffsets = Darius2dSpriteYOffsets;
1496 	TaitoNumSpriteA = 0x4000;
1497 
1498 	TaitoNum68Ks = 1;
1499 	TaitoNumZ80s = 1;
1500 	TaitoNumYM2610 = 1;
1501 
1502 	TaitoLoadRoms(0);
1503 
1504 	// Allocate and Blank all required memory
1505 	TaitoMem = NULL;
1506 	Darius2dMemIndex();
1507 	nLen = TaitoMemEnd - (UINT8 *)0;
1508 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
1509 	memset(TaitoMem, 0, nLen);
1510 	Darius2dMemIndex();
1511 
1512 	GenericTilesInit();
1513 
1514 	TC0100SCNInit(0, TaitoNumChar, 4, 24, 0, NULL);
1515 	TC0100SCNSetClipArea(0, 320, nScreenHeight, 0);
1516 	TC0100SCNInit(1, TaitoNumChar, 4, 24, 0, NULL);
1517 	TC0100SCNSetClipArea(1, 320, nScreenHeight, 320);
1518 	TC0100SCNSetPaletteOffset(1, 0x1000);
1519 	TC0110PCRInit(2, 0x2000);
1520 	TC0140SYTInit(0);
1521 	TC0220IOCInit();
1522 
1523 	if (TaitoLoadRoms(1)) return 1;
1524 
1525 	SekInit(0, 0x68000);
1526 	SekOpen(0);
1527 	SekMapMemory(Taito68KRom1           , 0x000000, 0x0fffff, MAP_ROM);
1528 	SekMapMemory(Taito68KRam1           , 0x100000, 0x10ffff, MAP_RAM);
1529 	SekMapMemory(TC0100SCNRam[0]        , 0x200000, 0x213fff, MAP_READ);
1530 	SekMapMemory(TC0100SCNRam[1]        , 0x240000, 0x253fff, MAP_READ);
1531 	SekMapMemory(TaitoSpriteRam         , 0x600000, 0x6013ff, MAP_RAM);
1532 	SekSetReadByteHandler(0, Darius2d68KReadByte);
1533 	SekSetWriteByteHandler(0, Darius2d68KWriteByte);
1534 	SekSetReadWordHandler(0, Darius2d68KReadWord);
1535 	SekSetWriteWordHandler(0, Darius2d68KWriteWord);
1536 	SekClose();
1537 
1538 	ZetInit(0);
1539 	ZetOpen(0);
1540 	ZetSetReadHandler(Darius2Z80Read);
1541 	ZetSetWriteHandler(Darius2Z80Write);
1542 	ZetMapArea(0x0000, 0x3fff, 0, TaitoZ80Rom1               );
1543 	ZetMapArea(0x0000, 0x3fff, 2, TaitoZ80Rom1               );
1544 	ZetMapArea(0x4000, 0x7fff, 0, TaitoZ80Rom1 + 0x4000      );
1545 	ZetMapArea(0x4000, 0x7fff, 2, TaitoZ80Rom1 + 0x4000      );
1546 	ZetMapArea(0xc000, 0xdfff, 0, TaitoZ80Ram1               );
1547 	ZetMapArea(0xc000, 0xdfff, 1, TaitoZ80Ram1               );
1548 	ZetMapArea(0xc000, 0xdfff, 2, TaitoZ80Ram1               );
1549 	ZetClose();
1550 
1551 	BurnYM2610Init(16000000 / 2, TaitoYM2610ARom, (INT32*)&TaitoYM2610ARomSize, TaitoYM2610BRom, (INT32*)&TaitoYM2610BRomSize, &Darius2FMIRQHandler, 0);
1552 	BurnTimerAttachZet(16000000 / 4);
1553 	BurnYM2610SetLeftVolume(BURN_SND_YM2610_AY8910_ROUTE, 0.03);
1554 	BurnYM2610SetRightVolume(BURN_SND_YM2610_AY8910_ROUTE, 0.03);
1555 	Darius2YM2610Route1MasterVol = 12.00;
1556 	Darius2YM2610Route2MasterVol = 12.00;
1557 	bYM2610UseSeperateVolumes = 1;
1558 
1559 	TaitoMakeInputsFunction = Darius2dMakeInputs;
1560 	TaitoIrqLine = 4;
1561 
1562 	nTaitoCyclesTotal[0] = 12000000 / 60;
1563 	nTaitoCyclesTotal[1] = (16000000 / 4) / 60;
1564 
1565 	TaitoResetFunction = TaitoDoReset;
1566 	TaitoResetFunction();
1567 
1568 	return 0;
1569 }
1570 
NinjawInit()1571 static INT32 NinjawInit()
1572 {
1573 	Ninjaw = 1;
1574 	return Darius2Init();
1575 }
1576 
WarriorbInit()1577 static INT32 WarriorbInit()
1578 {
1579 	INT32 nLen;
1580 
1581 	Warriorb = 1;
1582 	TaitoCharModulo = 0x100;
1583 	TaitoCharNumPlanes = 4;
1584 	TaitoCharWidth = 8;
1585 	TaitoCharHeight = 8;
1586 	TaitoCharPlaneOffsets = CharPlaneOffsets;
1587 	TaitoCharXOffsets = CharXOffsets;
1588 	TaitoCharYOffsets = CharYOffsets;
1589 	TaitoNumChar = 0x10000;
1590 
1591 	TaitoCharBModulo = 0x100;
1592 	TaitoCharBNumPlanes = 4;
1593 	TaitoCharBWidth = 8;
1594 	TaitoCharBHeight = 8;
1595 	TaitoCharBPlaneOffsets = CharPlaneOffsets;
1596 	TaitoCharBXOffsets = CharXOffsets;
1597 	TaitoCharBYOffsets = CharYOffsets;
1598 	TaitoNumCharB = 0x10000;
1599 
1600 	TaitoSpriteAModulo = 0x400;
1601 	TaitoSpriteANumPlanes = 4;
1602 	TaitoSpriteAWidth = 16;
1603 	TaitoSpriteAHeight = 16;
1604 	TaitoSpriteAPlaneOffsets = Darius2dSpritePlaneOffsets;
1605 	TaitoSpriteAXOffsets = Darius2dSpriteXOffsets;
1606 	TaitoSpriteAYOffsets = Darius2dSpriteYOffsets;
1607 	TaitoNumSpriteA = 0x8000;
1608 
1609 	TaitoNum68Ks = 1;
1610 	TaitoNumZ80s = 1;
1611 	TaitoNumYM2610 = 1;
1612 
1613 	TaitoLoadRoms(0);
1614 
1615 	// Allocate and Blank all required memory
1616 	TaitoMem = NULL;
1617 	WarriorbMemIndex();
1618 	nLen = TaitoMemEnd - (UINT8 *)0;
1619 	if ((TaitoMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
1620 	memset(TaitoMem, 0, nLen);
1621 	WarriorbMemIndex();
1622 
1623 	GenericTilesInit();
1624 
1625 	TC0100SCNInit(0, TaitoNumChar, 4, 8, 0, NULL);
1626 	TC0100SCNSetClipArea(0, 320, nScreenHeight, 0);
1627 	TC0100SCNInit(1, TaitoNumCharB, 5, 8, 0, NULL);
1628 	TC0100SCNSetClipArea(1, 320, nScreenHeight, 320);
1629 	TC0100SCNSetPaletteOffset(1, 0x1000);
1630 	TC0110PCRInit(2, 0x2000);
1631 	TC0140SYTInit(0);
1632 	TC0510NIOInit();
1633 
1634 	if (TaitoLoadRoms(1)) return 1;
1635 
1636 	SekInit(0, 0x68000);
1637 	SekOpen(0);
1638 	SekMapMemory(Taito68KRom1           , 0x000000, 0x1fffff, MAP_ROM);
1639 	SekMapMemory(Taito68KRam1           , 0x200000, 0x213fff, MAP_RAM);
1640 	SekMapMemory(TC0100SCNRam[0]        , 0x300000, 0x313fff, MAP_READ);
1641 	SekMapMemory(TC0100SCNRam[1]        , 0x340000, 0x353fff, MAP_READ);
1642 	SekMapMemory(TaitoSpriteRam         , 0x600000, 0x6013ff, MAP_RAM);
1643 	SekSetReadByteHandler(0, Warriorb68KReadByte);
1644 	SekSetWriteByteHandler(0, Warriorb68KWriteByte);
1645 	SekSetReadWordHandler(0, Warriorb68KReadWord);
1646 	SekSetWriteWordHandler(0, Warriorb68KWriteWord);
1647 	SekClose();
1648 
1649 	ZetInit(0);
1650 	ZetOpen(0);
1651 	ZetSetReadHandler(Darius2Z80Read);
1652 	ZetSetWriteHandler(Darius2Z80Write);
1653 	ZetMapArea(0x0000, 0x3fff, 0, TaitoZ80Rom1               );
1654 	ZetMapArea(0x0000, 0x3fff, 2, TaitoZ80Rom1               );
1655 	ZetMapArea(0x4000, 0x7fff, 0, TaitoZ80Rom1 + 0x4000      );
1656 	ZetMapArea(0x4000, 0x7fff, 2, TaitoZ80Rom1 + 0x4000      );
1657 	ZetMapArea(0xc000, 0xdfff, 0, TaitoZ80Ram1               );
1658 	ZetMapArea(0xc000, 0xdfff, 1, TaitoZ80Ram1               );
1659 	ZetMapArea(0xc000, 0xdfff, 2, TaitoZ80Ram1               );
1660 	ZetClose();
1661 
1662 	BurnYM2610Init(16000000 / 2, TaitoYM2610ARom, (INT32*)&TaitoYM2610ARomSize, TaitoYM2610BRom, (INT32*)&TaitoYM2610BRomSize, &Darius2FMIRQHandler, 0);
1663 	BurnTimerAttachZet(16000000 / 4);
1664 	BurnYM2610SetLeftVolume(BURN_SND_YM2610_AY8910_ROUTE, 0.25);
1665 	BurnYM2610SetRightVolume(BURN_SND_YM2610_AY8910_ROUTE, 0.25);
1666 	Darius2YM2610Route1MasterVol = 12.00;
1667 	Darius2YM2610Route2MasterVol = 12.00;
1668 	bYM2610UseSeperateVolumes = 1;
1669 
1670 	TaitoMakeInputsFunction = WarriorbMakeInputs;
1671 	TaitoIrqLine = 4;
1672 
1673 	nTaitoCyclesTotal[0] = 16000000 / 60;
1674 	nTaitoCyclesTotal[1] = (16000000 / 4) / 60;
1675 
1676 	TaitoResetFunction = TaitoDoReset;
1677 	TaitoResetFunction();
1678 
1679 	return 0;
1680 }
1681 
Darius2Exit()1682 static INT32 Darius2Exit()
1683 {
1684 	Ninjaw = 0;
1685 	Warriorb = 0;
1686 	return TaitoExit();
1687 }
1688 
Darius2RenderSprites(INT32 PriorityDraw)1689 static void Darius2RenderSprites(INT32 PriorityDraw)
1690 {
1691 	INT32 Offset, Data, Code, Colour, xFlip, yFlip;
1692 	INT32 x, y, Priority;
1693 
1694 	UINT16 *SpriteRam = (UINT16*)TaitoSpriteRam;
1695 
1696 	for (Offset = 0x2000 - 4; Offset >=0; Offset -= 4) {
1697 		Data = SpriteRam[Offset + 2];
1698 		Code = Data & (TaitoNumSpriteA - 1);
1699 
1700 		if (!Code) continue;
1701 
1702 		Data = SpriteRam[Offset + 0];
1703 		x = (Data - 32) & 0x3ff;
1704 
1705 		Data = SpriteRam[Offset + 1];
1706 		y = (Data - 0) & 0x1ff;
1707 
1708 		Data = SpriteRam[Offset + 3];
1709 		xFlip = (Data & 0x1);
1710 		yFlip = (Data & 0x2) >> 1;
1711 		Priority = (Data & 0x4) >> 2;
1712 
1713 		if (Priority != PriorityDraw) continue;
1714 
1715 		Colour = (Data & 0x7f00) >> 8;
1716 
1717 		y -= 16;
1718 
1719 		if (x > 0x3c0) x -= 0x400;
1720 		if (y > 0x180) y -= 0x200;
1721 
1722 		if (x > 16 && x < (nScreenWidth - 16) && y > 16 && y < (nScreenHeight - 16)) {
1723 			if (xFlip) {
1724 				if (yFlip) {
1725 					Render16x16Tile_Mask_FlipXY(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1726 				} else {
1727 					Render16x16Tile_Mask_FlipX(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1728 				}
1729 			} else {
1730 				if (yFlip) {
1731 					Render16x16Tile_Mask_FlipY(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1732 				} else {
1733 					Render16x16Tile_Mask(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1734 				}
1735 			}
1736 		} else {
1737 			if (xFlip) {
1738 				if (yFlip) {
1739 					Render16x16Tile_Mask_FlipXY_Clip(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1740 				} else {
1741 					Render16x16Tile_Mask_FlipX_Clip(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1742 				}
1743 			} else {
1744 				if (yFlip) {
1745 					Render16x16Tile_Mask_FlipY_Clip(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1746 				} else {
1747 					Render16x16Tile_Mask_Clip(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1748 				}
1749 			}
1750 		}
1751 	}
1752 }
1753 
Darius2dRenderSprites(INT32 PriorityDraw)1754 static void Darius2dRenderSprites(INT32 PriorityDraw)
1755 {
1756 	INT32 Offset, Data, Code, Colour, xFlip, yFlip;
1757 	INT32 x, y, Priority;
1758 
1759 	UINT16 *SpriteRam = (UINT16*)TaitoSpriteRam;
1760 
1761 //	for (Offset = 0; Offset < 0x001400 / 2; Offset += 4) {
1762 	for (Offset = (0x1400 / 2) - 4; Offset >= 0; Offset -= 4) {
1763 		Data = SpriteRam[Offset + 1];
1764 		Code = Data & (TaitoNumSpriteA - 1);
1765 
1766 		Data = SpriteRam[Offset + 0];
1767 		y = (-(Data & 0x1ff) - 24) & 0x1ff;
1768 		yFlip = (Data & 0x200) >> 9;
1769 
1770 		Data = SpriteRam[Offset + 2];
1771 		Priority = (Data & 0x100) >> 8;
1772 		Colour = Data & 0x7f;
1773 
1774 		Data = SpriteRam[Offset + 3];
1775 		x = Data & 0x3ff;
1776 		xFlip = (Data & 0x400) >> 10;
1777 
1778 		if (Priority != PriorityDraw) continue;
1779 
1780 		y -= (Warriorb) ? 8 : 16+8; //darius2d (16+8)
1781 
1782 		if (x > 0x3c0) x -= 0x400;
1783 		if (y > 0x180) y -= 0x200;
1784 
1785 		if (x > 16 && x < (nScreenWidth - 16) && y > 16 && y < (nScreenHeight - 16)) {
1786 			if (xFlip) {
1787 				if (yFlip) {
1788 					Render16x16Tile_Mask_FlipXY(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1789 				} else {
1790 					Render16x16Tile_Mask_FlipX(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1791 				}
1792 			} else {
1793 				if (yFlip) {
1794 					Render16x16Tile_Mask_FlipY(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1795 				} else {
1796 					Render16x16Tile_Mask(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1797 				}
1798 			}
1799 		} else {
1800 			if (xFlip) {
1801 				if (yFlip) {
1802 					Render16x16Tile_Mask_FlipXY_Clip(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1803 				} else {
1804 					Render16x16Tile_Mask_FlipX_Clip(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1805 				}
1806 			} else {
1807 				if (yFlip) {
1808 					Render16x16Tile_Mask_FlipY_Clip(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1809 				} else {
1810 					Render16x16Tile_Mask_Clip(pTransDraw, Code, x, y, Colour, 4, 0, 0, TaitoSpritesA);
1811 				}
1812 			}
1813 		}
1814 	}
1815 }
1816 
Darius2Draw()1817 static INT32 Darius2Draw()
1818 {
1819 	INT32 Disable = TC0100SCNCtrl[0][6] & 0xf7;
1820 	INT32 Disable2 = TC0100SCNCtrl[1][6] & 0xf7;
1821 	INT32 Disable3 = TC0100SCNCtrl[2][6] & 0xf7;
1822 
1823 	BurnTransferClear();
1824 
1825 	if (TC0100SCNBottomLayer(0)) {
1826 		if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
1827 		if (!(Disable2 & 0x02)) TC0100SCNRenderFgLayer(1, 0, TaitoChars);
1828 		if (!(Disable3 & 0x02)) TC0100SCNRenderFgLayer(2, 0, TaitoChars);
1829 		Darius2RenderSprites(1);
1830 		if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
1831 		if (!(Disable2 & 0x01)) TC0100SCNRenderBgLayer(1, 0, TaitoChars);
1832 		if (!(Disable3 & 0x01)) TC0100SCNRenderBgLayer(2, 0, TaitoChars);
1833 	} else {
1834 		if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
1835 		if (!(Disable2 & 0x01)) TC0100SCNRenderBgLayer(1, 0, TaitoChars);
1836 		if (!(Disable3 & 0x01)) TC0100SCNRenderBgLayer(2, 0, TaitoChars);
1837 		Darius2RenderSprites(1);
1838 		if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
1839 		if (!(Disable2 & 0x02)) TC0100SCNRenderFgLayer(1, 0, TaitoChars);
1840 		if (!(Disable3 & 0x02)) TC0100SCNRenderFgLayer(2, 0, TaitoChars);
1841 	}
1842 
1843 	Darius2RenderSprites(0);
1844 
1845 	if (!(Disable & 0x04)) TC0100SCNRenderCharLayer(0);
1846 	if (!(Disable2 & 0x04)) TC0100SCNRenderCharLayer(1);
1847 	if (!(Disable3 & 0x04)) TC0100SCNRenderCharLayer(2);
1848 	BurnTransferCopy(TC0110PCRPalette);
1849 
1850 	return 0;
1851 }
1852 
Darius2dDraw()1853 static INT32 Darius2dDraw()
1854 {
1855 	INT32 Disable = TC0100SCNCtrl[0][6] & 0xf7;
1856 	INT32 Disable2 = TC0100SCNCtrl[1][6] & 0xf7;
1857 
1858 	BurnTransferClear();
1859 
1860 	if (TC0100SCNBottomLayer(0)) {
1861 		if (nBurnLayer & 2) if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
1862 		if (nBurnLayer & 2) if (!(Disable2 & 0x02)) TC0100SCNRenderFgLayer(1, 0, TaitoChars);
1863 		if (nSpriteEnable & 1) Darius2dRenderSprites(1);
1864 		if (nBurnLayer & 1) if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
1865 		if (nBurnLayer & 1) if (!(Disable2 & 0x01)) TC0100SCNRenderBgLayer(1, 0, TaitoChars);
1866 	} else {
1867 		if (nBurnLayer & 1) if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
1868 		if (nBurnLayer & 1) if (!(Disable2 & 0x01)) TC0100SCNRenderBgLayer(1, 0, TaitoChars);
1869 		if (nSpriteEnable & 1) Darius2dRenderSprites(1);
1870 		if (nBurnLayer & 2) if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
1871 		if (nBurnLayer & 2) if (!(Disable2 & 0x02)) TC0100SCNRenderFgLayer(1, 0, TaitoChars);
1872 	}
1873 
1874 	if (nSpriteEnable & 2) Darius2dRenderSprites(0);
1875 
1876 	if (nBurnLayer & 4) if (!(Disable & 0x04)) TC0100SCNRenderCharLayer(0);
1877 	if (nBurnLayer & 8) if (!(Disable2 & 0x04)) TC0100SCNRenderCharLayer(1);
1878 	BurnTransferCopy(TC0110PCRPalette);
1879 
1880 	return 0;
1881 }
1882 
WarriorbDraw()1883 static INT32 WarriorbDraw()
1884 {
1885 	INT32 Disable = TC0100SCNCtrl[0][6] & 0xf7;
1886 	INT32 Disable2 = TC0100SCNCtrl[1][6] & 0xf7;
1887 
1888 	BurnTransferClear();
1889 
1890 	if (TC0100SCNBottomLayer(0)) {
1891 		if (nBurnLayer & 2) if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
1892 		if (nBurnLayer & 2) if (!(Disable2 & 0x02)) TC0100SCNRenderFgLayer(1, 0, TaitoCharsB);
1893 		if (nSpriteEnable & 1) Darius2dRenderSprites(1);
1894 		if (nBurnLayer & 1) if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
1895 		if (nBurnLayer & 1) if (!(Disable2 & 0x01)) TC0100SCNRenderBgLayer(1, 0, TaitoCharsB);
1896 	} else {
1897 		if (nBurnLayer & 1) if (!(Disable & 0x01)) TC0100SCNRenderBgLayer(0, 0, TaitoChars);
1898 		if (nBurnLayer & 1) if (!(Disable2 & 0x01)) TC0100SCNRenderBgLayer(1, 0, TaitoCharsB);
1899 		if (nSpriteEnable & 1) Darius2dRenderSprites(1);
1900 		if (nBurnLayer & 2) if (!(Disable & 0x02)) TC0100SCNRenderFgLayer(0, 0, TaitoChars);
1901 		if (nBurnLayer & 2) if (!(Disable2 & 0x02)) TC0100SCNRenderFgLayer(1, 0, TaitoCharsB);
1902 	}
1903 
1904 	if (nSpriteEnable & 2) Darius2dRenderSprites(0);
1905 
1906 	if (nBurnLayer & 4) if (!(Disable & 0x04)) TC0100SCNRenderCharLayer(0);
1907 	if (nBurnLayer & 8) if (!(Disable2 & 0x04)) TC0100SCNRenderCharLayer(1);
1908 	BurnTransferCopy(TC0110PCRPalette);
1909 
1910 	return 0;
1911 }
1912 
Darius2Frame()1913 static INT32 Darius2Frame()
1914 {
1915 	INT32 nInterleave = 100;
1916 
1917 	if (TaitoReset) TaitoResetFunction();
1918 
1919 	TaitoMakeInputsFunction();
1920 
1921 	nTaitoCyclesDone[0] = nTaitoCyclesDone[1] = nTaitoCyclesDone[2] = 0;
1922 
1923 	SekNewFrame();
1924 	ZetNewFrame();
1925 
1926 	for (INT32 i = 0; i < nInterleave; i++) {
1927 		INT32 nCurrentCPU, nNext;
1928 
1929 		// Run 68000 # 1
1930 		nCurrentCPU = 0;
1931 		SekOpen(0);
1932 		nNext = (i + 1) * nTaitoCyclesTotal[nCurrentCPU] / nInterleave;
1933 		nTaitoCyclesSegment = nNext - nTaitoCyclesDone[nCurrentCPU];
1934 		nTaitoCyclesDone[nCurrentCPU] += SekRun(nTaitoCyclesSegment);
1935 		if (i == nInterleave - 1) SekSetIRQLine(TaitoIrqLine, CPU_IRQSTATUS_AUTO);
1936 		SekClose();
1937 
1938 		// Run 68000 # 2
1939 		if ((TaitoCpuACtrl & 0x01)) {
1940 			nCurrentCPU = 1;
1941 			SekOpen(1);
1942 			nNext = (i + 1) * nTaitoCyclesTotal[nCurrentCPU] / nInterleave;
1943 			nTaitoCyclesSegment = nNext - nTaitoCyclesDone[nCurrentCPU];
1944 			nTaitoCyclesDone[nCurrentCPU] += SekRun(nTaitoCyclesSegment);
1945 			if (i == nInterleave - 1) SekSetIRQLine(TaitoIrqLine, CPU_IRQSTATUS_AUTO);
1946 			SekClose();
1947 		}
1948 
1949 		ZetOpen(0);
1950 		BurnTimerUpdate(i * (nTaitoCyclesTotal[2] / nInterleave));
1951 		ZetClose();
1952 	}
1953 
1954 	ZetOpen(0);
1955 	BurnTimerEndFrame(nTaitoCyclesTotal[2]);
1956 	if (pBurnSoundOut) {
1957 		BurnYM2610Update(pBurnSoundOut, nBurnSoundLen);
1958 	}
1959 	ZetClose();
1960 
1961 	if (pBurnDraw) BurnDrvRedraw();
1962 
1963 	return 0;
1964 }
1965 
Darius2dFrame()1966 static INT32 Darius2dFrame()
1967 {
1968 	INT32 nInterleave = 100;
1969 
1970 	if (TaitoReset) TaitoResetFunction();
1971 
1972 	TaitoMakeInputsFunction();
1973 
1974 	nTaitoCyclesDone[0] = nTaitoCyclesDone[2] = 0;
1975 
1976 	SekNewFrame();
1977 	ZetNewFrame();
1978 
1979 	for (INT32 i = 0; i < nInterleave; i++) {
1980 		INT32 nCurrentCPU, nNext;
1981 
1982 		// Run 68000 # 1
1983 		nCurrentCPU = 0;
1984 		SekOpen(0);
1985 		nNext = (i + 1) * nTaitoCyclesTotal[nCurrentCPU] / nInterleave;
1986 		nTaitoCyclesSegment = nNext - nTaitoCyclesDone[nCurrentCPU];
1987 		nTaitoCyclesDone[nCurrentCPU] += SekRun(nTaitoCyclesSegment);
1988 		if (i == nInterleave - 1) SekSetIRQLine(TaitoIrqLine, CPU_IRQSTATUS_AUTO);
1989 		SekClose();
1990 
1991 		ZetOpen(0);
1992 		BurnTimerUpdate(i * (nTaitoCyclesTotal[1] / nInterleave));
1993 		ZetClose();
1994 	}
1995 
1996 	ZetOpen(0);
1997 	BurnTimerEndFrame(nTaitoCyclesTotal[1]);
1998 	if (pBurnSoundOut) {
1999 		BurnYM2610Update(pBurnSoundOut, nBurnSoundLen);
2000 	}
2001 	ZetClose();
2002 
2003 	if (pBurnDraw) BurnDrvRedraw();
2004 
2005 	return 0;
2006 }
2007 
Darius2Scan(INT32 nAction,INT32 * pnMin)2008 static INT32 Darius2Scan(INT32 nAction, INT32 *pnMin)
2009 {
2010 	struct BurnArea ba;
2011 
2012 	if (pnMin != NULL) {			// Return minimum compatible version
2013 		*pnMin = 0x029684;
2014 	}
2015 
2016 	if (nAction & ACB_MEMORY_RAM) {
2017 		memset(&ba, 0, sizeof(ba));
2018 		ba.Data	  = TaitoRamStart;
2019 		ba.nLen	  = TaitoRamEnd-TaitoRamStart;
2020 		ba.szName = "All Ram";
2021 		BurnAcb(&ba);
2022 	}
2023 
2024 	TaitoICScan(nAction);
2025 
2026 	if (nAction & ACB_DRIVER_DATA) {
2027 		SekScan(nAction);
2028 		ZetScan(nAction);
2029 
2030 		if (TaitoNumYM2610) BurnYM2610Scan(nAction, pnMin);
2031 
2032 		SCAN_VAR(TaitoCpuACtrl);
2033 
2034 		SCAN_VAR(TaitoInput);
2035 		SCAN_VAR(TaitoZ80Bank);
2036 		SCAN_VAR(nTaitoCyclesDone);
2037 		SCAN_VAR(nTaitoCyclesSegment);
2038 	}
2039 
2040 	if (nAction & ACB_WRITE && TaitoZ80Bank) {
2041 		ZetOpen(0);
2042 		ZetMapArea(0x4000, 0x7fff, 0, TaitoZ80Rom1 + 0x4000 + (TaitoZ80Bank * 0x4000));
2043 		ZetMapArea(0x4000, 0x7fff, 2, TaitoZ80Rom1 + 0x4000 + (TaitoZ80Bank * 0x4000));
2044 		ZetClose();
2045 	}
2046 
2047 	return 0;
2048 }
2049 
2050 struct BurnDriver BurnDrvDarius2 = {
2051 	"darius2", NULL, NULL, NULL, "1989",
2052 	"Darius II (Japan)\0", NULL, "Taito Corporation", "Taito Misc",
2053 	NULL, NULL, NULL, NULL,
2054 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_MISC, GBF_HORSHOOT, 0,
2055 	NULL, Darius2RomInfo, Darius2RomName, NULL, NULL, NULL, NULL, Darius2InputInfo, Darius2DIPInfo,
2056 	Darius2Init, Darius2Exit, Darius2Frame, Darius2Draw, Darius2Scan,
2057 	NULL, 0x3000, 864, 224, 12, 3
2058 };
2059 
2060 struct BurnDriver BurnDrvDarius2d = {
2061 	"darius2d", "darius2", NULL, NULL, "1989",
2062 	"Darius II (dual screen) (Japan)\0", NULL, "Taito Corporation", "Taito Misc",
2063 	NULL, NULL, NULL, NULL,
2064 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_MISC, GBF_HORSHOOT, 0,
2065 	NULL, Darius2dRomInfo, Darius2dRomName, NULL, NULL, NULL, NULL, Darius2dInputInfo, Darius2dDIPInfo,
2066 	Darius2dInit, Darius2Exit, Darius2dFrame, Darius2dDraw, Darius2Scan,
2067 	NULL, 0x2000, 640, 224, 8, 3
2068 };
2069 
2070 struct BurnDriver BurnDrvDarius2do = {
2071 	"darius2do", "darius2", NULL, NULL, "1989",
2072 	"Darius II (dual screen) (Japan old version)\0", NULL, "Taito Corporation", "Taito Misc",
2073 	NULL, NULL, NULL, NULL,
2074 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_MISC, GBF_HORSHOOT, 0,
2075 	NULL, Darius2doRomInfo, Darius2doRomName, NULL, NULL, NULL, NULL, Darius2dInputInfo, Darius2dDIPInfo,
2076 	Darius2dInit, Darius2Exit, Darius2dFrame, Darius2dDraw, Darius2Scan,
2077 	NULL, 0x2000, 640, 224, 8, 3
2078 };
2079 
2080 struct BurnDriver BurnDrvNinjaw = {
2081 	"ninjaw", NULL, NULL, NULL, "1987",
2082 	"The Ninja Warriors (World, later version)\0", NULL, "Taito Corporation Japan", "Taito Misc",
2083 	NULL, NULL, NULL, NULL,
2084 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_MISC, GBF_PLATFORM, 0,
2085 	NULL, NinjawRomInfo, NinjawRomName, NULL, NULL, NULL, NULL, Darius2InputInfo, NinjawDIPInfo,
2086 	NinjawInit, Darius2Exit, Darius2Frame, Darius2Draw, Darius2Scan,
2087 	NULL, 0x3000, 864, 224, 12, 3
2088 };
2089 
2090 struct BurnDriver BurnDrvNinjaw1 = {
2091 	"ninjaw1", "ninjaw", NULL, NULL, "1987",
2092 	"The Ninja Warriors (World, earlier version)\0", NULL, "Taito Corporation Japan", "Taito Misc",
2093 	NULL, NULL, NULL, NULL,
2094 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_MISC, GBF_PLATFORM, 0,
2095 	NULL, Ninjaw1RomInfo, Ninjaw1RomName, NULL, NULL, NULL, NULL, Darius2InputInfo, NinjawDIPInfo,
2096 	NinjawInit, Darius2Exit, Darius2Frame, Darius2Draw, Darius2Scan,
2097 	NULL, 0x3000, 864, 224, 12, 3
2098 };
2099 
2100 struct BurnDriver BurnDrvNinjawj = {
2101 	"ninjawj", "ninjaw", NULL, NULL, "1987",
2102 	"The Ninja Warriors (Japan)\0", NULL, "Taito Corporation", "Taito Misc",
2103 	NULL, NULL, NULL, NULL,
2104 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_MISC, GBF_PLATFORM, 0,
2105 	NULL, NinjawjRomInfo, NinjawjRomName, NULL, NULL, NULL, NULL, Darius2InputInfo, NinjawjDIPInfo,
2106 	NinjawInit, Darius2Exit, Darius2Frame, Darius2Draw, Darius2Scan,
2107 	NULL, 0x3000, 864, 224, 12, 3
2108 };
2109 
2110 struct BurnDriver BurnDrvNinjawu = {
2111 	"ninjawu", "ninjaw", NULL, NULL, "1987",
2112 	"The Ninja Warriors (US, Romstar license)\0", NULL, "Taito Corporation America (licensed to Romstar)", "Taito Misc",
2113 	NULL, NULL, NULL, NULL,
2114 	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_TAITO_MISC, GBF_PLATFORM, 0,
2115 	NULL, NinjawuRomInfo, NinjawuRomName, NULL, NULL, NULL, NULL, Darius2InputInfo, NinjawjDIPInfo,
2116 	NinjawInit, Darius2Exit, Darius2Frame, Darius2Draw, Darius2Scan,
2117 	NULL, 0x3000, 864, 224, 12, 3
2118 };
2119 
2120 struct BurnDriver BurnDrvWarriorb = {
2121 	"warriorb", NULL, NULL, NULL, "1991",
2122 	"Warrior Blade - Rastan Saga Episode III (Japan)\0", NULL, "Taito Corporation", "Taito Misc",
2123 	NULL, NULL, NULL, NULL,
2124 	BDF_GAME_WORKING, 2, HARDWARE_TAITO_MISC, GBF_HORSHOOT, 0,
2125 	NULL, WarriorbRomInfo, WarriorbRomName, NULL, NULL, NULL, NULL, WarriorbInputInfo, WarriorbDIPInfo,
2126 	WarriorbInit, Darius2Exit, Darius2dFrame, WarriorbDraw, Darius2Scan,
2127 	NULL, 0x2000, 640, 240, 8, 3
2128 };
2129