1 // FB Alpha Super Kaneko Nova System driver module by iq_132, fixups by dink
2 // Based on MAME driver by Sylvain Glaize and David Haywood
3 //
4 // notes: vblokbr/sarukani prefers 60hz w/the speedhack, or it gets stuck in testmode.
5 //
6
7 #include "tiles_generic.h"
8 #include "ymz280b.h"
9 #include "sknsspr.h"
10 #include "sh2_intf.h"
11 #include "lowpass2.h"
12
13 static UINT8 *AllMem;
14 static UINT8 *MemEnd;
15 static UINT8 *AllRam;
16 static UINT8 *RamEnd;
17 static UINT8 *DrvSh2BIOS;
18 static UINT8 *DrvSh2ROM;
19 static UINT8 *DrvGfxROM0;
20 static UINT8 *DrvGfxROM1;
21 static UINT8 *DrvGfxROM2;
22 static UINT8 *DrvNvRAM;
23 static UINT8 *DrvSprRAM;
24 static UINT8 *DrvVidRAM;
25 static UINT8 *DrvLineRAM;
26 static UINT8 *DrvPalRAM;
27 static UINT8 *DrvGfxRAM;
28 static UINT8 *DrvSh2RAM;
29 static UINT8 *DrvCacheRAM;
30 static UINT8 *DrvV3Regs;
31 static UINT8 *DrvSprRegs;
32 static UINT8 *DrvPalRegs;
33
34 static UINT32 *DrvPalette;
35
36 static UINT8 *DrvTmpScreenBuf;
37 static UINT16 *DrvTmpScreenA;
38 static UINT16 *DrvTmpScreenB;
39 static UINT16 *DrvTmpScreenA2;
40 static UINT16 *DrvTmpScreenB2;
41 static UINT16 *DrvTmpScreenC;
42 static UINT8 *DrvTmpFlagA;
43 static UINT8 *DrvTmpFlagB;
44 static UINT8 *DrvTmpFlagA2;
45 static UINT8 *DrvTmpFlagB2;
46 static UINT32 *DrvTmpDraw; // main drawing surface
47 static UINT32 *pDrvTmpDraw;
48 static UINT8 *olddepths;
49
50 static struct {
51 UINT16 x1p, y1p, z1p, x1s, y1s, z1s;
52 UINT16 x2p, y2p, z2p, x2s, y2s, z2s;
53 UINT16 org;
54
55 UINT16 x1_p1, x1_p2, y1_p1, y1_p2, z1_p1, z1_p2;
56 UINT16 x2_p1, x2_p2, y2_p1, y2_p2, z2_p1, z2_p2;
57 UINT16 x1tox2, y1toy2, z1toz2;
58 INT16 x_in, y_in, z_in;
59 UINT16 flag;
60
61 UINT8 disconnect;
62 } hit;
63
64 static INT32 sprite_kludge_x;
65 static INT32 sprite_kludge_y;
66
67 static UINT8 DrvJoy1[32];
68 static UINT8 DrvDips[2];
69 static UINT32 DrvInputs[3];
70 static INT16 DrvAnalogPort0 = 0;
71 static INT16 DrvAnalogPort1 = 0;
72 static UINT8 DrvReset;
73
74 static UINT8 PaddleX[2] = { 0, 0 };
75
76 static INT32 sixtyhz = 0;
77
78 static INT32 nGfxLen0 = 0;
79 static INT32 nRedrawTiles = 0;
80 static UINT32 speedhack_address = ~0;
81 static UINT32 speedhack_pc[2] = { 0, 0 };
82 static UINT8 region = 0; /* 0 Japan, 1 Europe, 2 Asia, 3 USA, 4 Korea */
83 static UINT32 Vblokbrk = 0;
84
85 static class LowPass2 *LP1 = NULL, *LP2 = NULL;
86
87 static struct BurnRomInfo emptyRomDesc[] = {
88 { "", 0, 0, 0 },
89 };
90 #define A(a, b, c, d) {a, b, (UINT8*)(c), d}
91
92 static struct BurnInputInfo VblokbrkInputList[] = {
93 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 10, "p1 coin"},
94 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 8, "p1 start"},
95 {"P1 Up", BIT_DIGITAL, DrvJoy1 + 24, "p1 up"},
96 {"P1 Down", BIT_DIGITAL, DrvJoy1 + 25, "p1 down"},
97 {"P1 Left", BIT_DIGITAL, DrvJoy1 + 26, "p1 left"},
98 {"P1 Right", BIT_DIGITAL, DrvJoy1 + 27, "p1 right"},
99 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 28, "p1 fire 1"},
100 {"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 29, "p1 fire 2"},
101 {"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 30, "p1 fire 3"},
102 A("P1 Paddle", BIT_ANALOG_REL, &DrvAnalogPort0,"p1 z-axis"),
103
104 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 11, "p2 coin"},
105 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 9, "p2 start"},
106 {"P2 Up", BIT_DIGITAL, DrvJoy1 + 16, "p2 up"},
107 {"P2 Down", BIT_DIGITAL, DrvJoy1 + 17, "p2 down"},
108 {"P2 Left", BIT_DIGITAL, DrvJoy1 + 18, "p2 left"},
109 {"P2 Right", BIT_DIGITAL, DrvJoy1 + 19, "p2 right"},
110 {"P2 Button 1", BIT_DIGITAL, DrvJoy1 + 20, "p2 fire 1"},
111 {"P2 Button 2", BIT_DIGITAL, DrvJoy1 + 21, "p2 fire 2"},
112 {"P2 Button 3", BIT_DIGITAL, DrvJoy1 + 22, "p2 fire 3"},
113 A("P2 Paddle", BIT_ANALOG_REL, &DrvAnalogPort1,"p2 z-axis"),
114
115 {"Reset", BIT_DIGITAL, &DrvReset, "reset"},
116 {"Service", BIT_DIGITAL, DrvJoy1 + 14, "service"},
117 {"Tilt", BIT_DIGITAL, DrvJoy1 + 13, "tilt"},
118 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip"},
119 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip"},
120 };
121
122 #undef A
123
124 STDINPUTINFO(Vblokbrk)
125
126 static struct BurnInputInfo SknsInputList[] = {
127 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 10, "p1 coin"},
128 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 8, "p1 start"},
129 {"P1 Up", BIT_DIGITAL, DrvJoy1 + 24, "p1 up"},
130 {"P1 Down", BIT_DIGITAL, DrvJoy1 + 25, "p1 down"},
131 {"P1 Left", BIT_DIGITAL, DrvJoy1 + 26, "p1 left"},
132 {"P1 Right", BIT_DIGITAL, DrvJoy1 + 27, "p1 right"},
133 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 28, "p1 fire 1"},
134 {"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 29, "p1 fire 2"},
135 {"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 30, "p1 fire 3"},
136
137 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 11, "p2 coin"},
138 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 9, "p2 start"},
139 {"P2 Up", BIT_DIGITAL, DrvJoy1 + 16, "p2 up"},
140 {"P2 Down", BIT_DIGITAL, DrvJoy1 + 17, "p2 down"},
141 {"P2 Left", BIT_DIGITAL, DrvJoy1 + 18, "p2 left"},
142 {"P2 Right", BIT_DIGITAL, DrvJoy1 + 19, "p2 right"},
143 {"P2 Button 1", BIT_DIGITAL, DrvJoy1 + 20, "p2 fire 1"},
144 {"P2 Button 2", BIT_DIGITAL, DrvJoy1 + 21, "p2 fire 2"},
145 {"P2 Button 3", BIT_DIGITAL, DrvJoy1 + 22, "p2 fire 3"},
146
147 {"Reset", BIT_DIGITAL, &DrvReset, "reset"},
148 {"Service", BIT_DIGITAL, DrvJoy1 + 14, "service"},
149 {"Tilt", BIT_DIGITAL, DrvJoy1 + 13, "tilt"},
150 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip"},
151 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip"},
152 };
153
154 STDINPUTINFO(Skns)
155
156 static struct BurnDIPInfo SknsDIPList[]=
157 {
158 {0x15, 0xff, 0xff, 0xff, NULL },
159 {0x16, 0xff, 0xff, 0x00, NULL },
160
161 {0 , 0xfe, 0 , 2, "Service Mode" },
162 {0x15, 0x01, 0x01, 0x01, "Off" },
163 {0x15, 0x01, 0x01, 0x00, "On" },
164
165 {0 , 0xfe, 0 , 2, "Flip Screen" },
166 {0x15, 0x01, 0x02, 0x02, "Off" },
167 {0x15, 0x01, 0x02, 0x00, "On" },
168
169 {0 , 0xfe, 0 , 2, "Use Backup Ram"},
170 {0x15, 0x01, 0x40, 0x00, "No" },
171 {0x15, 0x01, 0x40, 0x40, "Yes" },
172
173 {0 , 0xfe, 0 , 2, "Freeze" },
174 {0x15, 0x01, 0x80, 0x00, "Freezes the game"},
175 {0x15, 0x01, 0x80, 0x80, "No" },
176
177 {0 , 0xfe, 0 , 2, "Speed Hacks"},
178 {0x16, 0x01, 0x01, 0x00, "No" },
179 {0x16, 0x01, 0x01, 0x01, "Yes" },
180 };
181
182 STDDIPINFO(Skns)
183
184 static struct BurnDIPInfo SknsNoSpeedhackDIPList[]=
185 {
186 {0x15, 0xff, 0xff, 0xff, NULL },
187 {0x16, 0xff, 0xff, 0x00, NULL },
188
189 {0 , 0xfe, 0 , 2, "Service Mode" },
190 {0x15, 0x01, 0x01, 0x01, "Off" },
191 {0x15, 0x01, 0x01, 0x00, "On" },
192
193 {0 , 0xfe, 0 , 2, "Flip Screen" },
194 {0x15, 0x01, 0x02, 0x02, "Off" },
195 {0x15, 0x01, 0x02, 0x00, "On" },
196
197 {0 , 0xfe, 0 , 2, "Use Backup Ram"},
198 {0x15, 0x01, 0x40, 0x00, "No" },
199 {0x15, 0x01, 0x40, 0x40, "Yes" },
200
201 {0 , 0xfe, 0 , 2, "Freeze" },
202 {0x15, 0x01, 0x80, 0x00, "Freezes the game"},
203 {0x15, 0x01, 0x80, 0x80, "No" },
204 };
205
206 STDDIPINFO(SknsNoSpeedhack)
207
208 static struct BurnDIPInfo VblokbrkDIPList[]=
209 {
210 {0x17, 0xff, 0xff, 0xff, NULL },
211 {0x18, 0xff, 0xff, 0x00, NULL },
212
213 {0 , 0xfe, 0 , 2, "Service Mode" },
214 {0x17, 0x01, 0x01, 0x01, "Off" },
215 {0x17, 0x01, 0x01, 0x00, "On" },
216
217 {0 , 0xfe, 0 , 2, "Flip Screen" },
218 {0x17, 0x01, 0x02, 0x02, "Off" },
219 {0x17, 0x01, 0x02, 0x00, "On" },
220
221 {0 , 0xfe, 0 , 2, "Use Backup Ram"},
222 {0x17, 0x01, 0x40, 0x00, "No" },
223 {0x17, 0x01, 0x40, 0x40, "Yes" },
224
225 {0 , 0xfe, 0 , 2, "Freeze" },
226 {0x17, 0x01, 0x80, 0x00, "Freezes the game"},
227 {0x17, 0x01, 0x80, 0x80, "No" },
228
229 {0 , 0xfe, 0 , 2, "Speed Hacks"},
230 {0x18, 0x01, 0x01, 0x00, "No" },
231 {0x18, 0x01, 0x01, 0x01, "Yes" },
232 };
233
234 STDDIPINFO(Vblokbrk)
235
236 static struct BurnInputInfo CyvernInputList[] = {
237 {"P1 Coin", BIT_DIGITAL, DrvJoy1 + 10, "p1 coin"},
238 {"P1 Start", BIT_DIGITAL, DrvJoy1 + 8, "p1 start"},
239 {"P1 Up", BIT_DIGITAL, DrvJoy1 + 24, "p1 up"},
240 {"P1 Down", BIT_DIGITAL, DrvJoy1 + 25, "p1 down"},
241 {"P1 Left", BIT_DIGITAL, DrvJoy1 + 26, "p1 left"},
242 {"P1 Right", BIT_DIGITAL, DrvJoy1 + 27, "p1 right"},
243 {"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 28, "p1 fire 1"},
244 {"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 29, "p1 fire 2"},
245
246 {"P2 Coin", BIT_DIGITAL, DrvJoy1 + 11, "p2 coin"},
247 {"P2 Start", BIT_DIGITAL, DrvJoy1 + 9, "p2 start"},
248 {"P2 Up", BIT_DIGITAL, DrvJoy1 + 16, "p2 up"},
249 {"P2 Down", BIT_DIGITAL, DrvJoy1 + 17, "p2 down"},
250 {"P2 Left", BIT_DIGITAL, DrvJoy1 + 18, "p2 left"},
251 {"P2 Right", BIT_DIGITAL, DrvJoy1 + 19, "p2 right"},
252 {"P2 Button 1", BIT_DIGITAL, DrvJoy1 + 20, "p2 fire 1"},
253 {"P2 Button 2", BIT_DIGITAL, DrvJoy1 + 21, "p2 fire 2"},
254
255 {"Reset", BIT_DIGITAL, &DrvReset, "reset"},
256 {"Service", BIT_DIGITAL, DrvJoy1 + 14, "service"},
257 {"Tilt", BIT_DIGITAL, DrvJoy1 + 13, "tilt"},
258 {"Dip A", BIT_DIPSWITCH, DrvDips + 0, "dip"},
259 {"Dip B", BIT_DIPSWITCH, DrvDips + 1, "dip"},
260 };
261
262 STDINPUTINFO(Cyvern)
263
264
265 static struct BurnDIPInfo CyvernDIPList[]=
266 {
267 {0x13, 0xff, 0xff, 0xff, NULL },
268 {0x14, 0xff, 0xff, 0x00, NULL },
269
270 {0 , 0xfe, 0 , 2, "Service Mode" },
271 {0x13, 0x01, 0x01, 0x01, "Off" },
272 {0x13, 0x01, 0x01, 0x00, "On" },
273
274 {0 , 0xfe, 0 , 2, "Flip Screen" },
275 {0x13, 0x01, 0x02, 0x02, "Off" },
276 {0x13, 0x01, 0x02, 0x00, "On" },
277
278 {0 , 0xfe, 0 , 2, "Use Backup Ram"},
279 {0x13, 0x01, 0x40, 0x00, "No" },
280 {0x13, 0x01, 0x40, 0x40, "Yes" },
281
282 {0 , 0xfe, 0 , 2, "Freeze" },
283 {0x13, 0x01, 0x80, 0x00, "Freezes the game"},
284 {0x13, 0x01, 0x80, 0x80, "No" },
285
286 {0 , 0xfe, 0 , 2, "Speed Hacks"},
287 {0x14, 0x01, 0x01, 0x00, "No" },
288 {0x14, 0x01, 0x01, 0x01, "Yes" },
289
290 {0 , 0xfe, 0 , 2, "Headache Filter (audio hack)"},
291 {0x14, 0x01, 0x02, 0x00, "No" },
292 {0x14, 0x01, 0x02, 0x02, "Yes" },
293 };
294
295 STDDIPINFO(Cyvern)
296
297 static struct BurnDIPInfo CyvernNoSpeedhackDIPList[]= // gals panic 4 (galpani4)
298 {
299 {0x13, 0xff, 0xff, 0xff, NULL },
300 {0x14, 0xff, 0xff, 0x00, NULL },
301
302 {0 , 0xfe, 0 , 2, "Service Mode" },
303 {0x13, 0x01, 0x01, 0x01, "Off" },
304 {0x13, 0x01, 0x01, 0x00, "On" },
305
306 {0 , 0xfe, 0 , 2, "Flip Screen" },
307 {0x13, 0x01, 0x02, 0x02, "Off" },
308 {0x13, 0x01, 0x02, 0x00, "On" },
309
310 {0 , 0xfe, 0 , 2, "Use Backup Ram"},
311 {0x13, 0x01, 0x40, 0x00, "No" },
312 {0x13, 0x01, 0x40, 0x40, "Yes" },
313
314 {0 , 0xfe, 0 , 2, "Freeze" },
315 {0x13, 0x01, 0x80, 0x00, "Freezes the game"},
316 {0x13, 0x01, 0x80, 0x80, "No" },
317 };
318
STDDIPINFO(CyvernNoSpeedhack)319 STDDIPINFO(CyvernNoSpeedhack)
320
321 static void hit_calc_orig(UINT16 p, UINT16 s, UINT16 org, UINT16 *l, UINT16 *r)
322 {
323 switch(org & 3) {
324 case 0:
325 *l = p;
326 *r = p+s;
327 break;
328 case 1:
329 *l = p-s/2;
330 *r = *l+s;
331 break;
332 case 2:
333 *l = p-s;
334 *r = p;
335 break;
336 case 3:
337 *l = p-s;
338 *r = p+s;
339 break;
340 }
341 }
342
hit_calc_axis(UINT16 x1p,UINT16 x1s,UINT16 x2p,UINT16 x2s,UINT16 org,UINT16 * x1_p1,UINT16 * x1_p2,UINT16 * x2_p1,UINT16 * x2_p2,INT16 * x_in,UINT16 * x1tox2)343 static void hit_calc_axis(UINT16 x1p, UINT16 x1s, UINT16 x2p, UINT16 x2s, UINT16 org,
344 UINT16 *x1_p1, UINT16 *x1_p2, UINT16 *x2_p1, UINT16 *x2_p2,
345 INT16 *x_in, UINT16 *x1tox2)
346 {
347 UINT16 x1l=0, x1r=0, x2l=0, x2r=0;
348 hit_calc_orig(x1p, x1s, org, &x1l, &x1r);
349 hit_calc_orig(x2p, x2s, org >> 8, &x2l, &x2r);
350
351 *x1tox2 = x2p-x1p;
352 *x1_p1 = x1p;
353 *x2_p1 = x2p;
354 *x1_p2 = x1r;
355 *x2_p2 = x2l;
356 *x_in = x1r-x2l;
357 }
358
hit_recalc()359 static void hit_recalc()
360 {
361 hit_calc_axis(hit.x1p, hit.x1s, hit.x2p, hit.x2s, hit.org,
362 &hit.x1_p1, &hit.x1_p2, &hit.x2_p1, &hit.x2_p2,
363 &hit.x_in, &hit.x1tox2);
364 hit_calc_axis(hit.y1p, hit.y1s, hit.y2p, hit.y2s, hit.org,
365 &hit.y1_p1, &hit.y1_p2, &hit.y2_p1, &hit.y2_p2,
366 &hit.y_in, &hit.y1toy2);
367 hit_calc_axis(hit.z1p, hit.z1s, hit.z2p, hit.z2s, hit.org,
368 &hit.z1_p1, &hit.z1_p2, &hit.z2_p1, &hit.z2_p2,
369 &hit.z_in, &hit.z1toz2);
370
371 hit.flag = 0;
372 hit.flag |= hit.y2p > hit.y1p ? 0x8000 : hit.y2p == hit.y1p ? 0x4000 : 0x2000;
373 hit.flag |= hit.y_in >= 0 ? 0 : 0x1000;
374 hit.flag |= hit.x2p > hit.x1p ? 0x0800 : hit.x2p == hit.x1p ? 0x0400 : 0x0200;
375 hit.flag |= hit.x_in >= 0 ? 0 : 0x0100;
376 hit.flag |= hit.z2p > hit.z1p ? 0x0080 : hit.z2p == hit.z1p ? 0x0040 : 0x0020;
377 hit.flag |= hit.z_in >= 0 ? 0 : 0x0010;
378 hit.flag |= hit.x_in >= 0 && hit.y_in >= 0 && hit.z_in >= 0 ? 8 : 0;
379 hit.flag |= hit.z_in >= 0 && hit.x_in >= 0 ? 4 : 0;
380 hit.flag |= hit.y_in >= 0 && hit.z_in >= 0 ? 2 : 0;
381 hit.flag |= hit.x_in >= 0 && hit.y_in >= 0 ? 1 : 0;
382 }
383
skns_hit_w(UINT32 adr,UINT32 data)384 static void skns_hit_w(UINT32 adr, UINT32 data)
385 {
386 switch(adr & ~3) {
387 case 0x00:
388 case 0x28:
389 hit.x1p = data;
390 break;
391 case 0x08:
392 case 0x30:
393 hit.y1p = data;
394 break;
395 case 0x38:
396 case 0x50:
397 hit.z1p = data;
398 break;
399 case 0x04:
400 case 0x2c:
401 hit.x1s = data;
402 break;
403 case 0x0c:
404 case 0x34:
405 hit.y1s = data;
406 break;
407 case 0x3c:
408 case 0x54:
409 hit.z1s = data;
410 break;
411 case 0x10:
412 case 0x58:
413 hit.x2p = data;
414 break;
415 case 0x18:
416 case 0x60:
417 hit.y2p = data;
418 break;
419 case 0x20:
420 case 0x68:
421 hit.z2p = data;
422 break;
423 case 0x14:
424 case 0x5c:
425 hit.x2s = data;
426 break;
427 case 0x1c:
428 case 0x64:
429 hit.y2s = data;
430 break;
431 case 0x24:
432 case 0x6c:
433 hit.z2s = data;
434 break;
435 case 0x70:
436 hit.org = data;
437 break;
438 default:
439 break;
440 }
441 hit_recalc();
442 }
443
skns_hit_r(UINT32 adr)444 static UINT32 skns_hit_r(UINT32 adr)
445 {
446 if(hit.disconnect)
447 return 0x0000;
448
449 switch(adr & 0xfc) {
450 case 0x28:
451 case 0x2a:
452 return (Sh2TotalCycles() ^ (Sh2TotalCycles() >> 16)) & 0xffff;
453 case 0x00:
454 case 0x10:
455 return (UINT16)hit.x_in;
456 case 0x04:
457 case 0x14:
458 return (UINT16)hit.y_in;
459 case 0x18:
460 return (UINT16)hit.z_in;
461 case 0x08:
462 case 0x1c:
463 return hit.flag;
464 case 0x40:
465 return hit.x1p;
466 case 0x48:
467 return hit.y1p;
468 case 0x50:
469 return hit.z1p;
470 case 0x44:
471 return hit.x1s;
472 case 0x4c:
473 return hit.y1s;
474 case 0x54:
475 return hit.z1s;
476 case 0x58:
477 return hit.x2p;
478 case 0x60:
479 return hit.y2p;
480 case 0x68:
481 return hit.z2p;
482 case 0x5c:
483 return hit.x2s;
484 case 0x64:
485 return hit.y2s;
486 case 0x6c:
487 return hit.z2s;
488 case 0x70:
489 return hit.org;
490 case 0x80:
491 return hit.x1tox2;
492 case 0x84:
493 return hit.y1toy2;
494 case 0x88:
495 return hit.z1toz2;
496 case 0x90:
497 return hit.x1_p1;
498 case 0xa0:
499 return hit.y1_p1;
500 case 0xb0:
501 return hit.z1_p1;
502 case 0x98:
503 return hit.x1_p2;
504 case 0xa8:
505 return hit.y1_p2;
506 case 0xb8:
507 return hit.z1_p2;
508 case 0x94:
509 return hit.x2_p1;
510 case 0xa4:
511 return hit.y2_p1;
512 case 0xb4:
513 return hit.z2_p1;
514 case 0x9c:
515 return hit.x2_p2;
516 case 0xac:
517 return hit.y2_p2;
518 case 0xbc:
519 return hit.z2_p2;
520 default:
521 return 0;
522 }
523 }
524
525
skns_msm6242_r(UINT32 offset)526 static UINT32 skns_msm6242_r(UINT32 offset)
527 {
528 time_t nLocalTime = time(NULL); // ripped from pgm_run.cpp
529 tm* tmLocalTime = localtime(&nLocalTime);
530
531 UINT32 value = 0;
532
533 switch ((offset >> 2) & 3)
534 {
535 case 0:
536 value = (tmLocalTime->tm_sec % 10)<<24;
537 value |= (tmLocalTime->tm_sec / 10)<<16;
538 value |= (tmLocalTime->tm_min % 10)<<8;
539 value |= (tmLocalTime->tm_min / 10);
540 break;
541 case 1:
542 value = (tmLocalTime->tm_hour % 10)<<24;
543 value |= (tmLocalTime->tm_hour / 10)<<16;
544 value |= (tmLocalTime->tm_mday % 10)<<8;
545 value |= (tmLocalTime->tm_mday / 10);
546 break;
547 case 2:
548 value = ((tmLocalTime->tm_mon + 1) % 10) << 24;
549 value |= ((tmLocalTime->tm_mon + 1) / 10) << 16;
550 value |= (tmLocalTime->tm_year % 10) << 8;
551 value |= ((tmLocalTime->tm_year / 10) % 10);
552 break;
553 case 3:
554 value = (tmLocalTime->tm_wday)<<24;
555 value |= (1)<<16;
556 value |= (6)<<8;
557 value |= (4);
558 break;
559 }
560 return value;
561 }
562
suprnova_read_byte(UINT32 address)563 static UINT8 __fastcall suprnova_read_byte(UINT32 address)
564 {
565 address &= 0xc7ffffff;
566
567 if ((address & 0xfffffff0) == 0x01000000) {
568 return skns_msm6242_r(address) >> ((~address & 3) << 3);
569 }
570
571 if ((address & 0xffffff00) == 0x02f00000) {
572 return skns_hit_r(address) >> ((~address & 3) << 3);
573 }
574
575 switch (address)
576 {
577 case 0x00400000:
578 case 0x00400001:
579 case 0x00400002:
580 case 0x00400003:
581 return DrvInputs[0] >> ((~address & 3) << 3); // 400000
582
583 case 0x00400004:
584 case 0x00400005:
585 case 0x00400006:
586 case 0x00400007:
587 return DrvInputs[1] >> ((~address & 3) << 3); // 400004
588
589 case 0x0040000c:
590 case 0x0040000d:
591 case 0x0040000e:
592 case 0x0040000f:
593 return DrvInputs[2] >> ((~address & 3) << 3); // 40000c
594
595 case 0x00c00000:
596 case 0x00c00001:
597 case 0x00c00002:return 0;
598 case 0x00c00003:
599 return YMZ280BReadStatus();
600 }
601 bprintf(0, _T("rb %X. "), address);
602
603 return 0;
604 }
605
suprnova_read_word(UINT32 address)606 static UINT16 __fastcall suprnova_read_word(UINT32 address)
607 {
608 address &= 0xc7fffffe;
609
610 if ((address & 0xfffffff0) == 0x01000000) {
611 return skns_msm6242_r(address) >> ((~address & 2) << 3);
612 }
613
614 if ((address & 0xffffff00) == 0x02f00000) {
615 return skns_hit_r(address) >> ((~address & 2) << 3);
616 }
617
618 switch (address)
619 {
620 case 0x00400000:
621 case 0x00400001:
622 return DrvInputs[0] >> 16;
623
624 case 0x00400002:
625 case 0x00400003:
626 return DrvInputs[0]; // 400000
627
628 case 0x00400004:
629 case 0x00400005:
630 return DrvInputs[1] >> 16;
631
632 case 0x00400006:
633 case 0x00400007:
634 return DrvInputs[1]; // 400004
635
636 case 0x0040000c:
637 case 0x0040000d:
638 return DrvInputs[2] >> 16;
639
640 case 0x0040000e:
641 case 0x0040000f:
642 return DrvInputs[2]; // 40000c
643 }
644 bprintf(0, _T("rw %X. "), address);
645
646 return 0;
647 }
648
suprnova_read_long(UINT32 address)649 static UINT32 __fastcall suprnova_read_long(UINT32 address)
650 {
651 address &= 0xc7fffffc;
652
653 if ((address & 0xfffffff0) == 0x01000000) {
654 return skns_msm6242_r(address);
655 }
656
657 if ((address & 0xffffff00) == 0x02f00000) {
658 return skns_hit_r(address);
659 }
660
661 switch (address)
662 {
663 case 0x00400000:
664 return DrvInputs[0];
665
666 case 0x00400004:
667 return DrvInputs[1];
668
669 case 0x0040000c:
670 return DrvInputs[2];
671 }
672
673 return 0;
674 }
675
676 static INT32 suprnova_alt_enable_sprites = 0;
677 static INT32 bright_spc_g_trans = 0;
678 static INT32 bright_spc_r_trans = 0;
679 static INT32 bright_spc_b_trans = 0;
680 static INT32 bright_spc_g = 0;
681 static INT32 bright_spc_r = 0;
682 static INT32 bright_spc_b = 0;
683 static INT32 suprnova_alt_enable_background = 0;
684 static INT32 bright_v3_g = 0;
685 static INT32 bright_v3_r = 0;
686 static INT32 bright_v3_b = 0;
687 static INT32 use_spc_bright = 1;
688 static INT32 use_v3_bright = 1;
689
skns_pal_regs_w(UINT32 offset)690 static void skns_pal_regs_w(UINT32 offset)
691 {
692 UINT32 data = *((UINT32*)(DrvPalRegs + (offset & 0x1c)));
693 offset = (offset >> 2) & 7;
694
695 switch ( offset )
696 {
697 case (0x00/4): // RWRA0
698 use_spc_bright = data&1;
699 suprnova_alt_enable_sprites = (data>>8)&1;
700 break;
701
702 case (0x04/4): // RWRA1
703 bright_spc_g = data&0xff;
704 bright_spc_g_trans = (data>>8) &0xff;
705 break;
706
707 case (0x08/4): // RWRA2
708 bright_spc_r = data&0xff;
709 bright_spc_r_trans = (data>>8) &0xff;
710 break;
711
712 case (0x0C/4): // RWRA3
713 bright_spc_b = data&0xff;
714 bright_spc_b_trans = (data>>8)&0xff;
715 break;
716
717 case (0x10/4): // RWRB0
718 use_v3_bright = data&1;
719 suprnova_alt_enable_background = (data>>8)&1;
720 break;
721
722 case (0x14/4): // RWRB1
723 bright_v3_g = data&0xff;
724 // bright_v3_g_trans = (data>>8)&0xff;
725 break;
726
727 case (0x18/4): // RWRB2
728 bright_v3_r = data&0xff;
729 // bright_v3_r_trans = (data>>8)&0xff;
730 break;
731
732 case (0x1C/4): // RWRB3
733 bright_v3_b = data&0xff;
734 // bright_v3_b_trans = (data>>8)&0xff;
735 break;
736 }
737 }
738
decode_graphics_ram(UINT32 offset)739 static inline void decode_graphics_ram(UINT32 offset)
740 {
741 offset &= 0x3fffc;
742 UINT32 p = *((UINT32*)(DrvGfxRAM + offset));
743
744 if ( (DrvGfxROM2[offset + 0] == p >> 24) &&
745 (DrvGfxROM2[offset + 1] == p >> 16) &&
746 (DrvGfxROM2[offset + 2] == p >> 8) &&
747 (DrvGfxROM2[offset + 3] == p >> 0) ) return;
748
749 nRedrawTiles = 1;
750
751 DrvGfxROM2[offset + 0] = p >> 24;
752 DrvGfxROM2[offset + 1] = p >> 16;
753 DrvGfxROM2[offset + 2] = p >> 8;
754 DrvGfxROM2[offset + 3] = p >> 0;
755 }
756
suprnova_write_byte(UINT32 address,UINT8 data)757 static void __fastcall suprnova_write_byte(UINT32 address, UINT8 data)
758 {
759 address &= 0xc7ffffff;
760
761 if ((address & 0xfffc0000) == 0x4800000) {
762 #ifdef LSB_FIRST
763 DrvGfxRAM[(address & 0x3ffff) ^ 3] = data;
764 #else
765 DrvGfxRAM[(address & 0x3ffff)] = data;
766 #endif
767 decode_graphics_ram(address);
768 return;
769
770 } //04800000, 0x0483ffff
771
772 switch (address)
773 {
774 case 0x00c00000:
775 YMZ280BSelectRegister(data);
776 return;
777
778 case 0x00c00001:
779 YMZ280BWriteRegister(data);
780 return;
781
782 case 0x01800000:
783 // case 0x01800001:
784 // case 0x01800002:
785 // case 0x01800003:// sengeki writes here... puzzloop complains (security...)
786 {
787 hit.disconnect=1; /* hit2 stuff */
788 switch (region) /* 0 Japan, 1 Europe, 2 Asia, 3 USA, 4 Korea */
789 {
790 case 0:
791 if (data == 0) hit.disconnect= 0;
792 break;
793 case 3:
794 if (data == 1) hit.disconnect= 0;
795 break;
796 case 4: // korea
797 if (data == 2) hit.disconnect= 0;
798 break;
799 case 1:
800 if (data == 3) hit.disconnect= 0;
801 break;
802 case 2:
803 if (data < 2) hit.disconnect= 0;
804 break;
805 // unknown country id, unlock per default
806 default:
807 hit.disconnect= 0;
808 break;
809 }
810 }
811 return;
812 }
813
814 if ((address & 0xffffffe0) == 0x02a00000) {
815 #ifdef LSB_FIRST
816 DrvPalRegs[(address & 0x1f) ^ 3] = data;
817 #else
818 DrvPalRegs[(address & 0x1f)] = data;
819 #endif
820 skns_pal_regs_w(address);
821 return;
822 }
823
824 // skns_msm6242_w -- not used
825 if ((address & ~0x0f) == 0x1000000) return;
826
827 // skns io -- not used
828 if ((address & ~0x0f) == 0x00400000) {
829 if ((Sh2GetPC(0) == 0x04013B42 + 2) && Vblokbrk) { // speedhack for Vblokbrk / Saru Kani
830 //Sh2BurnUntilInt(0); // this breaks sound in vblokbrk...
831 }
832 return;
833 }
834 }
835
suprnova_write_word(UINT32 address,UINT16 data)836 static void __fastcall suprnova_write_word(UINT32 address, UINT16 data)
837 {
838 address &= 0xc7fffffe;
839
840 if ((address & 0xfffc0000) == 0x4800000) {
841 #ifdef LSB_FIRST
842 *((UINT16*)(DrvGfxRAM + ((address & 0x3fffe) ^ 2))) = data;
843 #else
844 *((UINT16*)(DrvGfxRAM + ((address & 0x3fffe)))) = data;
845 #endif
846 decode_graphics_ram(address);
847 return;
848
849 } //04800000, 0x0483ffff
850 }
851
suprnova_write_long(UINT32 address,UINT32 data)852 static void __fastcall suprnova_write_long(UINT32 address, UINT32 data)
853 {
854 address &= 0xc7fffffc;
855
856 if ((address & 0xfffc0000) == 0x4800000) {
857 *((UINT32*)(DrvGfxRAM + (address & 0x3fffc))) = data;
858 decode_graphics_ram(address);
859 return;
860
861 } //04800000, 0x0483ffff
862
863 if ((address & 0xffffffe0) == 0x02a00000) {
864 *((UINT32*)(DrvPalRegs + (address & 0x1c))) = data;
865 skns_pal_regs_w(address);
866 return;
867 }
868
869 if ((address & 0xffffff00) == 0x02f00000) {
870 skns_hit_w(address & 0xff, data);
871 return;
872 }
873
874 if (address == 0x05000000) return; // vsblock
875 }
876
suprnova_speedhack(UINT32 a)877 static inline void suprnova_speedhack(UINT32 a)
878 {
879 UINT32 b = a & ~3;
880 UINT32 pc = Sh2GetPC(0);
881
882 if (b == speedhack_address) {
883 if (pc == speedhack_pc[0]) {
884 Sh2BurnUntilInt(0);
885 }
886 }
887 }
888
suprnova_hack_read_long(UINT32 a)889 static UINT32 __fastcall suprnova_hack_read_long(UINT32 a)
890 {
891 suprnova_speedhack(a);
892
893 a &= 0xffffc;
894
895 return *((UINT32*)(DrvSh2RAM + a));
896 }
897
suprnova_hack_read_word(UINT32 a)898 static UINT16 __fastcall suprnova_hack_read_word(UINT32 a)
899 {
900 suprnova_speedhack(a);
901
902 #ifdef LSB_FIRST
903 return *((UINT16 *)(DrvSh2RAM + ((a & 0xffffe) ^ 2)));
904 #else
905 return *((UINT16 *)(DrvSh2RAM + ((a & 0xffffe))));
906 #endif
907 }
908
suprnova_hack_read_byte(UINT32 a)909 static UINT8 __fastcall suprnova_hack_read_byte(UINT32 a)
910 {
911 suprnova_speedhack(a);
912
913 #ifdef LSB_FIRST
914 return DrvSh2RAM[(a & 0xfffff) ^ 3];
915 #else
916 return DrvSh2RAM[(a & 0xfffff)];
917 #endif
918 }
919
920 #ifdef LSB_FIRST
BurnSwapEndian(UINT8 * src,INT32 len)921 static void BurnSwapEndian(UINT8 *src, INT32 len)
922 {
923 for (INT32 i = 0; i < len; i+=4) {
924 INT32 t = src[i + 0];
925 src[i + 0] = src[i+3];
926 src[i + 3] = t;
927 t = src[i + 1];
928 src[i + 1] = src[i + 2];
929 src[i + 2] = t;
930 }
931 }
932 #endif
933
MemIndex(INT32 gfxlen0)934 static INT32 MemIndex(INT32 gfxlen0)
935 {
936 UINT8 *Next; Next = AllMem;
937
938 DrvSh2BIOS = Next; Next += 0x0080000;
939 DrvSh2ROM = Next; Next += 0x0400000;
940
941 YMZ280BROM = Next; Next += 0x0500000;
942
943 DrvGfxROM0 = Next; Next += gfxlen0;
944 DrvGfxROM1 = Next; Next += 0x0800000;
945 DrvGfxROM2 = Next; Next += 0x0800000;
946
947 AllRam = Next;
948
949 DrvVidRAM = Next; Next += 0x010000;
950 DrvNvRAM = Next; Next += 0x010000;
951 DrvSprRAM = Next; Next += 0x010000;
952 DrvLineRAM = Next; Next += 0x010000;
953 DrvPalRAM = Next; Next += 0x020000;
954 DrvGfxRAM = Next; Next += 0x040000;
955 DrvSh2RAM = Next; Next += 0x100000;
956 DrvCacheRAM = Next; Next += 0x010000;
957 DrvV3Regs = Next; Next += 0x010100;
958 DrvSprRegs = Next; Next += 0x010100;
959 DrvPalRegs = Next; Next += 0x010020;
960
961 RamEnd = Next;
962
963 DrvTmpScreenBuf = Next; Next += 0x10000;
964
965 DrvTmpScreenA = (UINT16*)Next; Next += 1024 * 1024 * sizeof(INT16);
966 DrvTmpScreenB = (UINT16*)Next; Next += 1024 * 1024 * sizeof(INT16);
967 DrvTmpScreenC = (UINT16*)Next; Next += 320 * 240 * sizeof(INT16);
968 DrvTmpScreenA2 = (UINT16*)Next; Next += 320 * 240 * sizeof(INT16);
969 DrvTmpScreenB2 = (UINT16*)Next; Next += 320 * 240 * sizeof(INT16);
970 pDrvTmpDraw = (UINT32*)Next;
971 DrvTmpDraw = (UINT32*)Next; Next += 320 * 240 * sizeof(INT32);
972
973 DrvTmpFlagA = Next; Next += 1024 * 1024;
974 DrvTmpFlagB = Next; Next += 1024 * 1024;
975
976 DrvTmpFlagA2 = Next; Next += 320 * 240;
977 DrvTmpFlagB2 = Next; Next += 320 * 240;
978
979 DrvPalette = (UINT32*)Next; Next += 0x10000 * sizeof(INT32);
980
981 olddepths = Next; Next += 2 * sizeof(UINT8);
982
983 MemEnd = Next;
984
985 return 0;
986 }
987
DrvDoReset()988 static INT32 DrvDoReset()
989 {
990 memset (AllRam, 0, RamEnd - AllRam);
991 memset (DrvTmpScreenBuf, 0xff, 0x8000);
992 memset (&hit, 0, sizeof(hit));
993
994 Sh2Open(0);
995 if (Vblokbrk) {
996 Sh2Reset(); // VS Block Breaker / Saru Kani must run through the Super Kaneko BIOS for nvram to work!
997 } else { // Run everything else directly, bypassing the bios.
998 Sh2Reset( *(UINT32 *)(DrvSh2ROM + 0), *(UINT32 *)(DrvSh2ROM + 4) );
999 if (sprite_kludge_y == -272) // sengekistriker
1000 Sh2SetVBR(0x6000000);
1001 else Sh2SetVBR(0x4000000);
1002 }
1003 Sh2Close();
1004
1005 YMZ280BReset();
1006
1007 hit.disconnect = (region != 2) ? 1 : 0;
1008
1009 suprnova_alt_enable_sprites = 0;
1010 bright_spc_g_trans = bright_spc_r_trans = bright_spc_b_trans = 0;
1011 bright_spc_g = bright_spc_r = bright_spc_b = 0;
1012 //suprnova_alt_enable_background = 0; set in init, and by game
1013 bright_v3_g = bright_v3_r = bright_v3_b = 0;
1014 use_spc_bright = 1;
1015 use_v3_bright = 1;
1016
1017 nRedrawTiles = 1;
1018 olddepths[0] = olddepths[1] = 0xff;
1019
1020 PaddleX[0] = PaddleX[1] = 0;
1021
1022 HiscoreReset();
1023
1024 Sh2SetEatCycles((DrvDips[1] & 1) ? 4 : 1);
1025
1026 return 0;
1027 }
1028
DrvLoad(INT32 nLoadRoms)1029 static INT32 DrvLoad(INT32 nLoadRoms)
1030 {
1031 char* pRomName;
1032 struct BurnRomInfo ri;
1033
1034 UINT8 *LoadPr = DrvSh2ROM;
1035 UINT8 *LoadSp = DrvGfxROM0;
1036 UINT8 *LoadBg = DrvGfxROM1;
1037 UINT8 *LoadFg = DrvGfxROM2 + 0x400000;
1038 UINT8 *LoadYM = YMZ280BROM;
1039
1040 for (INT32 i = 0; !BurnDrvGetRomName(&pRomName, i, 0); i++)
1041 {
1042 BurnDrvGetRomInfo(&ri, i);
1043
1044 if ((ri.nType & 7) == 1) {
1045 if (nLoadRoms) {
1046 if (BurnLoadRom(LoadPr + 0, i+0, 2)) return 1;
1047 if (BurnLoadRom(LoadPr + 1, i+1, 2)) return 1;
1048 }
1049 LoadPr += ri.nLen * 2;
1050 i++;
1051
1052 continue;
1053 }
1054
1055 if ((ri.nType & 7) == 2) {
1056 if (nLoadRoms) {
1057 if (BurnLoadRom(LoadSp, i, 1)) return 1;
1058 }
1059 LoadSp += ri.nLen;
1060
1061 continue;
1062 }
1063
1064 if ((ri.nType & 7) == 3) {
1065 if (nLoadRoms) {
1066 if (BurnLoadRom(LoadBg, i, 1)) return 1;
1067 }
1068 LoadBg += ri.nLen;
1069
1070 continue;
1071 }
1072
1073 if ((ri.nType & 7) == 4) {
1074 if (nLoadRoms) {
1075 if (BurnLoadRom(LoadFg, i, 1)) return 1;
1076 }
1077 LoadFg += ri.nLen;
1078
1079 continue;
1080 }
1081
1082 if ((ri.nType & 7) == 5) {
1083 if (nLoadRoms) {
1084 if (BurnLoadRom(LoadYM, i, 1)) return 1;
1085 }
1086 LoadYM += ri.nLen;
1087 continue;
1088 }
1089 }
1090
1091 if (!nLoadRoms) {
1092 for (nGfxLen0 = 1; nGfxLen0 < (LoadSp - DrvGfxROM0); nGfxLen0 <<= 1) {}
1093 }
1094
1095 return 0;
1096 }
1097
DrvInit(INT32 bios)1098 static INT32 DrvInit(INT32 bios)
1099 {
1100 AllMem = NULL;
1101 DrvLoad(0);
1102 MemIndex(nGfxLen0);
1103 INT32 nLen = MemEnd - (UINT8 *)0;
1104 if ((AllMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
1105 memset(AllMem, 0, nLen);
1106 MemIndex(nGfxLen0);
1107
1108 {
1109 if (DrvLoad(1)) return 1;
1110
1111 if (BurnLoadRom(DrvSh2BIOS, 0x00080 + bios, 1)) return 1; // bios
1112 region = bios;
1113 #ifdef LSB_FIRST
1114 BurnSwapEndian(DrvSh2BIOS, 0x80000);
1115 BurnSwapEndian(DrvSh2ROM, 0x200000);
1116 #endif
1117 }
1118
1119 Sh2Init(1);
1120 Sh2Open(0);
1121
1122 Sh2MapMemory(DrvSh2BIOS, 0x00000000, 0x0007ffff, MAP_ROM);
1123 Sh2MapMemory(DrvNvRAM, 0x00800000, 0x00801fff, MAP_RAM);
1124 Sh2MapMemory(DrvSprRAM, 0x02000000, 0x02003fff, MAP_RAM);
1125 Sh2MapMemory(DrvSprRegs, 0x02100000, 0x0210003f, MAP_RAM); // sprite regs
1126 Sh2MapMemory(DrvV3Regs, 0x02400000, 0x0240007f, MAP_RAM);
1127 Sh2MapMemory(DrvVidRAM, 0x02500000, 0x02507fff, MAP_RAM); //0-4000, 4000-7fff A, B
1128 Sh2MapMemory(DrvLineRAM, 0x02600000, 0x02607fff, MAP_RAM);
1129 Sh2MapMemory(DrvPalRegs, 0x02a00000, 0x02a0001f, MAP_ROM);
1130 Sh2MapMemory(DrvPalRAM, 0x02a40000, 0x02a5ffff, MAP_RAM);
1131 Sh2MapMemory(DrvSh2ROM, 0x04000000, 0x041fffff, MAP_ROM);
1132 Sh2MapMemory(DrvGfxRAM, 0x04800000, 0x0483ffff, MAP_ROM); // tilemap B, graphics tiles
1133 Sh2MapMemory(DrvSh2RAM, 0x06000000, 0x060fffff, MAP_RAM);
1134 Sh2MapMemory(DrvCacheRAM, 0xc0000000, 0xc0000fff, MAP_RAM);
1135
1136 Sh2SetReadByteHandler (0, suprnova_read_byte);
1137 Sh2SetReadWordHandler (0, suprnova_read_word);
1138 Sh2SetReadLongHandler (0, suprnova_read_long);
1139 Sh2SetWriteByteHandler(0, suprnova_write_byte);
1140 Sh2SetWriteWordHandler(0, suprnova_write_word);
1141 Sh2SetWriteLongHandler(0, suprnova_write_long);
1142
1143 Sh2MapHandler(1, 0x06000000, 0x060fffff, MAP_ROM);
1144 Sh2SetReadByteHandler (1, suprnova_hack_read_byte);
1145 Sh2SetReadWordHandler (1, suprnova_hack_read_word);
1146 Sh2SetReadLongHandler (1, suprnova_hack_read_long);
1147
1148 if (!strncmp(BurnDrvGetTextA(DRV_NAME), "galpanis", 8) || !strncmp(BurnDrvGetTextA(DRV_NAME), "panicstr", 8)) {
1149 bprintf(0, _T("Note (soundfix): switching Busy Loop Speedhack to mode #2 for galpanis*.\n"));
1150 sh2_busyloop_speedhack_mode2 = 1;
1151 }
1152
1153 if (!sixtyhz) BurnSetRefreshRate(59.5971);
1154
1155 YMZ280BInit(16666666, NULL);
1156 YMZ280BSetRoute(BURN_SND_YMZ280B_YMZ280B_ROUTE_1, 0.65, BURN_SND_ROUTE_LEFT);
1157 YMZ280BSetRoute(BURN_SND_YMZ280B_YMZ280B_ROUTE_2, 0.65, BURN_SND_ROUTE_RIGHT);
1158
1159 skns_init();
1160 skns_sprite_kludge(sprite_kludge_x, sprite_kludge_y);
1161
1162 GenericTilesInit();
1163
1164 { // filter (for cyvern)
1165 LP1 = new LowPass2(10900, nBurnSoundRate, 0.13, 1.0, 2300, 0.01, 1.0);
1166 LP2 = new LowPass2(10900, nBurnSoundRate, 0.13, 1.0, 2300, 0.01, 1.0);
1167 }
1168
1169 DrvDoReset();
1170
1171 return 0;
1172 }
1173
DrvExit()1174 static INT32 DrvExit()
1175 {
1176 GenericTilesExit();
1177
1178 skns_exit();
1179
1180 Sh2Exit();
1181 YMZ280BExit();
1182 YMZ280BROM = NULL;
1183
1184 BurnFree(AllMem);
1185
1186 suprnova_alt_enable_background = 0;
1187 Vblokbrk = 0;
1188 nGfxLen0 = 0;
1189
1190 sixtyhz = 0;
1191
1192 speedhack_address = ~0;
1193 memset (speedhack_pc, 0, 2 * sizeof(INT32));
1194
1195 // de-init cyvern filter
1196 delete LP1; LP1 = NULL;
1197 delete LP2; LP2 = NULL;
1198
1199 return 0;
1200 }
1201
draw_layer(UINT8 * source,UINT8 * previous,UINT16 * dest,UINT8 * prid,UINT8 * gfxbase,INT32 layer)1202 static void draw_layer(UINT8 *source, UINT8 *previous, UINT16 *dest, UINT8 *prid, UINT8 *gfxbase, INT32 layer)
1203 {
1204 UINT32 *prev = (UINT32*)previous;
1205 UINT32 *vram = (UINT32*)source;
1206
1207 UINT8 depthchanged[2] = { 0, 0 };
1208 UINT32 depth = *((UINT32*)(DrvV3Regs + 0x0c));
1209 if (layer) depth >>= 8;
1210 depth &= 1;
1211
1212 if (depth != olddepths[layer]) {
1213 depthchanged[layer] = 1;
1214 olddepths[layer] = depth;
1215 }
1216
1217 for (INT32 offs = 0; offs < 64 * 64; offs++)
1218 {
1219 // dirty tile speed hack. nRedrawTiles true if ram-based graphics changed.
1220 if (layer == 1) {
1221 if (!depthchanged[layer] && !nRedrawTiles && vram[offs] == prev[offs]) {
1222 continue;
1223 }
1224 } else {
1225 if (!depthchanged[layer] && vram[offs] == prev[offs]) {
1226 continue;
1227 }
1228 }
1229 prev[offs] = vram[offs];
1230
1231 INT32 sx = (offs & 0x3f) << 4;
1232 INT32 sy = (offs >> 6) << 4;
1233
1234 INT32 attr = vram[offs];
1235 INT32 code = attr & 0x001fffff;
1236 INT32 color =((attr & 0x3f000000) >> 24) | 0x40;
1237 INT32 prio =(attr & 0x00e00000) >> 21;
1238
1239 INT32 flipx = (attr >> 31) & 1;
1240 INT32 flipy = (attr >> 30) & 1;
1241
1242 color <<= 8;
1243 UINT8 *pri = prid + sy * 1024 + sx;
1244 UINT16 *dst = dest + sy * 1024 + sx;
1245
1246 if (depth) { // 4bpp
1247
1248 code &= 0x0FFFF;
1249
1250 if (flipy) flipy = 0x78;
1251 if (flipx) flipy |=0x07;
1252
1253 UINT8 *gfx = gfxbase + (code << 7);
1254
1255 for (INT32 y = 0; y < 16; y++) {
1256 for (INT32 x = 0; x < 16; x+=2) {
1257 INT32 c = gfx[((y << 3) | (x >> 1)) ^ flipy];
1258
1259 dst[x+0] = (c & 0x0f) + color;
1260 dst[x+1] = (c >> 4) + color;
1261 pri[x+0] = pri[x+1] = prio;
1262 }
1263
1264 dst += 1024;
1265 pri += 1024;
1266 }
1267 } else { // 8bpp
1268 code &= 0x7FFF;
1269
1270 UINT8 *gfx = gfxbase + (code << 8);
1271 if (flipy) gfx += 0xf0;
1272 INT32 inc = flipy ? -16 : 16;
1273
1274 for (INT32 y = 0; y < 16 * 16; y+=16, gfx += inc) {
1275 if (flipx) {
1276 dst[ 0] = gfx[15] + color;
1277 dst[ 1] = gfx[14] + color;
1278 dst[ 2] = gfx[13] + color;
1279 dst[ 3] = gfx[12] + color;
1280 dst[ 4] = gfx[11] + color;
1281 dst[ 5] = gfx[10] + color;
1282 dst[ 6] = gfx[ 9] + color;
1283 dst[ 7] = gfx[ 8] + color;
1284 dst[ 8] = gfx[ 7] + color;
1285 dst[ 9] = gfx[ 6] + color;
1286 dst[10] = gfx[ 5] + color;
1287 dst[11] = gfx[ 4] + color;
1288 dst[12] = gfx[ 3] + color;
1289 dst[13] = gfx[ 2] + color;
1290 dst[14] = gfx[ 1] + color;
1291 dst[15] = gfx[ 0] + color;
1292 } else {
1293 dst[ 0] = gfx[ 0] + color;
1294 dst[ 1] = gfx[ 1] + color;
1295 dst[ 2] = gfx[ 2] + color;
1296 dst[ 3] = gfx[ 3] + color;
1297 dst[ 4] = gfx[ 4] + color;
1298 dst[ 5] = gfx[ 5] + color;
1299 dst[ 6] = gfx[ 6] + color;
1300 dst[ 7] = gfx[ 7] + color;
1301 dst[ 8] = gfx[ 8] + color;
1302 dst[ 9] = gfx[ 9] + color;
1303 dst[10] = gfx[10] + color;
1304 dst[11] = gfx[11] + color;
1305 dst[12] = gfx[12] + color;
1306 dst[13] = gfx[13] + color;
1307 dst[14] = gfx[14] + color;
1308 dst[15] = gfx[15] + color;
1309 }
1310
1311 pri[ 0] = prio;
1312 pri[ 1] = prio;
1313 pri[ 2] = prio;
1314 pri[ 3] = prio;
1315 pri[ 4] = prio;
1316 pri[ 5] = prio;
1317 pri[ 6] = prio;
1318 pri[ 7] = prio;
1319 pri[ 8] = prio;
1320 pri[ 9] = prio;
1321 pri[10] = prio;
1322 pri[11] = prio;
1323 pri[12] = prio;
1324 pri[13] = prio;
1325 pri[14] = prio;
1326 pri[15] = prio;
1327
1328 dst += 1024;
1329 pri += 1024;
1330 }
1331 }
1332 }
1333 }
1334
1335
suprnova_draw_roz(UINT16 * source,UINT8 * flags,UINT16 * ddest,UINT8 * dflags,UINT32 startx,UINT32 starty,INT32 incxx,INT32 incxy,INT32 incyx,INT32 incyy,INT32 wraparound,INT32 columnscroll,UINT32 * scrollram)1336 static void suprnova_draw_roz(UINT16 *source, UINT8 *flags, UINT16 *ddest, UINT8 *dflags, UINT32 startx, UINT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, INT32 wraparound, INT32 columnscroll, UINT32* scrollram)
1337 {
1338 const INT32 xmask = 0x3ff;
1339 const INT32 ymask = 0x3ff;
1340 const UINT32 widthshifted = 1024 << 16;
1341 const UINT32 heightshifted = 1024 << 16;
1342 UINT32 cx;
1343 UINT32 cy;
1344 INT32 x;
1345 INT32 sx;
1346 INT32 sy;
1347 INT32 ex;
1348 INT32 ey;
1349 UINT16 *dest;
1350 UINT8* destflags;
1351
1352 /* pre-advance based on the cliprect */
1353 startx += 0 * incxx + 0 * incyx;
1354 starty += 0 * incxy + 0 * incyy;
1355
1356 /* extract start/end points */
1357 sx = 0;
1358 sy = 0;
1359 ex = nScreenWidth-1;
1360 ey = nScreenHeight-1;
1361
1362 {
1363 /* loop over rows */
1364 while (sy <= ey)
1365 {
1366
1367 /* initialize X counters */
1368 x = sx;
1369 cx = startx;
1370 cy = starty;
1371
1372 /* get dest and priority pointers */
1373 dest = ddest + (sy * nScreenWidth) + sx;
1374 destflags = dflags + (sy * nScreenWidth) + sx;
1375
1376 /* loop over columns */
1377 while (x <= ex)
1378 {
1379 if ((wraparound) || (cx < widthshifted && cy < heightshifted)) // not sure how this will cope with no wraparound, but row/col scroll..
1380 {
1381 if (columnscroll)
1382 {
1383 INT32 offset = (((cy >> 16) - scrollram[(cx>>16)&0x3ff]) & ymask) * 1024 + ((cx >> 16) & xmask);
1384 offset &= 0xfffff;
1385 dest[0] = source[offset];
1386 destflags[0] = flags[offset];
1387 }
1388 else
1389 {
1390 INT32 offset = ((cy >> 16) & ymask) * 1024 + (((cx >> 16) - scrollram[(cy>>16)&0x3ff]) & xmask);
1391 offset &= 0xfffff;
1392 ; dest[0] = source[offset];
1393 destflags[0] = flags[offset];
1394 }
1395 }
1396
1397 /* advance in X */
1398 cx += incxx;
1399 cy += incxy;
1400 x++;
1401 dest++;
1402 destflags++;
1403 }
1404
1405 /* advance in Y */
1406 startx += incyx;
1407 starty += incyy;
1408 sy++;
1409 }
1410 }
1411 }
1412
supernova_draw(INT32 * offs,UINT16 * bitmap,UINT8 * flags,UINT16 * dbitmap,UINT8 * dflags,INT32 layer)1413 static void supernova_draw(INT32 *offs, UINT16 *bitmap, UINT8 *flags, UINT16 *dbitmap, UINT8 *dflags, INT32 layer)
1414 {
1415 UINT32 *vreg = (UINT32*)DrvV3Regs;
1416 UINT32 *line = (UINT32*)DrvLineRAM;
1417
1418 INT32 enable = (vreg[offs[0]] >> 0) & 0x0001;
1419 INT32 nowrap = (vreg[offs[0]] >> 0) & 0x0004;
1420
1421 UINT32 startx,starty;
1422 INT32 incxx,incxy,incyx,incyy;
1423 INT32 columnscroll;
1424
1425 if (!enable) {
1426 // clear the speedup & pri buffer for disabled layers
1427 if (layer == 0) {
1428 memset(DrvTmpScreenBuf + 0x0000, 0xff, 0x4000);
1429 memset(DrvTmpFlagA2, 0, 320 * 240);
1430 } else {
1431 memset(DrvTmpScreenBuf + 0x4000, 0xff, 0x4000);
1432 memset(DrvTmpFlagB2, 0, 320 * 240);
1433 }
1434 }
1435
1436 if (enable && suprnova_alt_enable_background)
1437 {
1438 if (layer == 0) draw_layer(DrvVidRAM + 0x0000, DrvTmpScreenBuf + 0x0000, DrvTmpScreenA, DrvTmpFlagA, DrvGfxROM1, 0);
1439 if (layer == 1) draw_layer(DrvVidRAM + 0x4000, DrvTmpScreenBuf + 0x4000, DrvTmpScreenB, DrvTmpFlagB, DrvGfxROM2, 1);
1440
1441 startx = vreg[offs[1]];
1442 incyy = vreg[offs[2]]&0x7ffff;
1443 if (incyy&0x40000) incyy = incyy-0x80000; // level 3 boss in sengekis
1444 incyx = vreg[offs[3]];
1445 starty = vreg[offs[4]];
1446 incxy = vreg[offs[5]];
1447 incxx = vreg[offs[6]]&0x7ffff;
1448 if (incxx&0x40000) incxx = incxx-0x80000;
1449
1450 columnscroll = (vreg[0x0c/4] >> offs[7]) & 0x0001;
1451
1452 // iq_132 complete hack for now....
1453 if ((incyy|incyx|incxy|incxx)==0) {
1454 incyy=1<<8;
1455 incxx=1<<8;
1456 }
1457
1458 if (nBurnLayer & (layer+1)) suprnova_draw_roz(bitmap,flags,dbitmap,dflags,startx << 8,starty << 8, incxx << 8,incxy << 8,incyx << 8,incyy << 8, !nowrap, columnscroll, &line[offs[8]]);
1459 }
1460 }
1461
DrvRecalcPalette()1462 static void DrvRecalcPalette()
1463 {
1464 INT32 use_bright, brightness_r, brightness_g, brightness_b;
1465 INT32 r,g,b;
1466 UINT32 *p = (UINT32*)DrvPalRAM;
1467 for (INT32 i = 0; i < 0x20000 / 4; i++) {
1468 r = (p[i] >> 10) & 0x1f;
1469 g = (p[i] >> 5) & 0x1f;
1470 b = (p[i] >> 0) & 0x1f;
1471
1472 if (i < 0x4000) { // 1st half is for Sprites
1473 use_bright = use_spc_bright;
1474 brightness_b = bright_spc_b;
1475 brightness_g = bright_spc_g;
1476 brightness_r = bright_spc_r;
1477 } else { // V3 bg's
1478 use_bright = use_v3_bright;
1479 brightness_b = bright_v3_b;
1480 brightness_g = bright_v3_g;
1481 brightness_r = bright_v3_r;
1482 }
1483
1484 if(use_bright) {
1485 if(brightness_b) b = ((b<<3) * (brightness_b+1))>>8;
1486 else b = 0;
1487 if(brightness_g) g = ((g<<3) * (brightness_g+1))>>8;
1488 else g = 0;
1489 if(brightness_r) r = ((r<<3) * (brightness_r+1))>>8;
1490 else r = 0;
1491 } else {
1492 r <<= 3;
1493 g <<= 3;
1494 b <<= 3;
1495 }
1496
1497 DrvPalette[i] = (r << 16) | (g << 8) | b;
1498 }
1499 }
1500
1501
render_and_copy_layers()1502 static void render_and_copy_layers()
1503 {
1504 UINT32 *vreg = (UINT32*)DrvV3Regs;
1505
1506 INT32 offs[2][9] = {
1507 { 0x10 / 4, 0x1c / 4, 0x30 / 4, 0x2c / 4, 0x20 / 4, 0x28 / 4, 0x24 / 4, 1, 0x0000 },
1508 { 0x34 / 4, 0x40 / 4, 0x54 / 4, 0x50 / 4, 0x44 / 4, 0x4c / 4, 0x48 / 4, 9, 0x1000 / 4 }
1509 };
1510
1511 {
1512 INT32 supernova_pri_a = (vreg[0x10/4] & 0x0002)>>1;
1513 INT32 supernova_pri_b = (vreg[0x34/4] & 0x0002)>>1;
1514
1515 supernova_draw(offs[1], DrvTmpScreenB, DrvTmpFlagB, DrvTmpScreenB2, DrvTmpFlagB2, 1);
1516 supernova_draw(offs[0], DrvTmpScreenA, DrvTmpFlagA, DrvTmpScreenA2, DrvTmpFlagA2, 0);
1517
1518 {
1519 INT32 x,y;
1520 UINT8* srcflags, *src2flags;
1521 UINT16* src, *src2, *src3;
1522 UINT32* dst;
1523 UINT16 pri, pri2, pri3;
1524 UINT16 bgpri;
1525
1526 UINT32 *clut = DrvPalette;
1527
1528 for (y=0;y<240;y++)
1529 {
1530 src = DrvTmpScreenB2 + y * nScreenWidth; //BITMAP_ADDR16(tilemap_bitmap_lower, y, 0);
1531 srcflags = DrvTmpFlagB2 + y * nScreenWidth; //BITMAP_ADDR8(tilemap_bitmapflags_lower, y, 0);
1532
1533 src2 = DrvTmpScreenA2 + y * nScreenWidth; //BITMAP_ADDR16(tilemap_bitmap_higher, y, 0);
1534 src2flags = DrvTmpFlagA2 + y * nScreenWidth; //BITMAP_ADDR8(tilemap_bitmapflags_higher, y, 0);
1535
1536 src3 = DrvTmpScreenC + y * nScreenWidth; //BITMAP_ADDR16(sprite_bitmap, y, 0);
1537
1538 dst = DrvTmpDraw + y * nScreenWidth; //BITMAP_ADDR32(bitmap, y, 0);
1539
1540 for (x=0;x<320;x++)
1541 {
1542 UINT16 pendata = src[x]&0x7fff;
1543 UINT16 pendata2 = src2[x]&0x7fff;
1544 UINT16 bgpendata;
1545 UINT16 pendata3 = src3[x]&0x3fff;
1546
1547 UINT32 coldat;
1548
1549 pri = ((srcflags[x] & 0x07)<<1) | (supernova_pri_b);
1550 pri2= ((src2flags[x] & 0x07)<<1) | (supernova_pri_a);
1551 pri3 = ((src3[x]&0xc000)>>12)+3;
1552
1553 if (pri<=pri2) // <= is good for last level of cyvern.. < seem better for galpanis kaneko logo
1554 {
1555 if (pendata2&0xff)
1556 {
1557 bgpendata = pendata2&0x7fff;
1558 bgpri = pri2;
1559 }
1560 else if (pendata&0xff)
1561 {
1562 bgpendata = pendata&0x7fff;
1563 bgpri = pri;
1564 }
1565 else
1566 {
1567 bgpendata = pendata2&0x7fff;
1568 bgpri = 0;
1569 }
1570 }
1571 else
1572 {
1573 if (pendata&0xff)
1574 {
1575 bgpendata = pendata&0x7fff;
1576 bgpri = pri;
1577 }
1578 else if (pendata2&0xff)
1579 {
1580 bgpendata = pendata2&0x7fff;
1581 bgpri = pri2;
1582 }
1583 else
1584 {
1585 bgpendata = 0;
1586 bgpri = 0;
1587 }
1588 }
1589
1590 // if the sprites are higher than the bg pixel
1591 if (pri3 > bgpri)
1592 {
1593 if (pendata3&0xff)
1594 {
1595 UINT16 palvalue = *((UINT32*)(DrvPalRAM + (pendata3 * 4)));
1596
1597 coldat = clut[pendata3];
1598
1599 if (palvalue&0x8000) // iq_132
1600 {
1601 UINT32 srccolour = clut[bgpendata&0x7fff];
1602 UINT32 dstcolour = clut[pendata3&0x3fff];
1603
1604 INT32 r,g,b;
1605 INT32 r2,g2,b2;
1606
1607 r = (srccolour & 0x000000ff)>> 0;
1608 g = (srccolour & 0x0000ff00)>> 8;
1609 b = (srccolour & 0x00ff0000)>> 16;
1610
1611 r2 = (dstcolour & 0x000000ff)>> 0;
1612 g2 = (dstcolour & 0x0000ff00)>> 8;
1613 b2 = (dstcolour & 0x00ff0000)>> 16;
1614
1615 r2 = (r2 * bright_spc_r_trans) >> 8;
1616 g2 = (g2 * bright_spc_g_trans) >> 8;
1617 b2 = (b2 * bright_spc_b_trans) >> 8;
1618
1619 r = (r+r2);
1620 if (r>255) r = 255;
1621
1622 g = (g+g2);
1623 if (g>255) g = 255;
1624
1625 b = (b+b2);
1626 if (b>255) b = 255;
1627
1628 dst[x] = (r << 16) | (g << 8) | (b << 0);
1629 }
1630
1631 else
1632 {
1633 coldat = clut[pendata3];
1634 dst[x] = coldat;
1635 }
1636 }
1637 else
1638 {
1639 coldat = clut[bgpendata];
1640 dst[x] = coldat;
1641 }
1642 }
1643 else
1644 {
1645 coldat = clut[bgpendata];
1646 dst[x] = coldat;
1647 }
1648
1649 }
1650 }
1651 }
1652 }
1653 }
1654
1655
DrvDraw()1656 static INT32 DrvDraw()
1657 {
1658 DrvRecalcPalette();
1659
1660 if (nBurnBpp == 4) { // 32bpp rendered directly
1661 DrvTmpDraw = (UINT32*)pBurnDraw;
1662 } else {
1663 DrvTmpDraw = pDrvTmpDraw;
1664 }
1665
1666 memset (DrvTmpScreenA2, 0, nScreenWidth * nScreenHeight * 2);
1667 memset (DrvTmpScreenB2, 0, nScreenWidth * nScreenHeight * 2);
1668
1669 render_and_copy_layers();
1670
1671 // mix sprites next frame (necessary 1frame sprite lag)
1672 memset (DrvTmpScreenC, 0, nScreenWidth * nScreenHeight * 2);
1673 if (nSpriteEnable & 1) skns_draw_sprites(DrvTmpScreenC, (UINT32*)DrvSprRAM, 0x4000, DrvGfxROM0, nGfxLen0, (UINT32*)DrvSprRegs, 0);
1674
1675 if (nBurnBpp != 4) {
1676 for (INT32 i = 0; i < nScreenWidth * nScreenHeight; i++) {
1677 INT32 d = DrvTmpDraw[i];
1678 PutPix(pBurnDraw + i * nBurnBpp, BurnHighCol(d>>16, d>>8, d, 0));
1679 }
1680 }
1681
1682 nRedrawTiles = 0;
1683
1684 return 0;
1685 }
1686
Paddle_incdec(UINT32 PaddlePortnum,UINT32 player)1687 static UINT8 Paddle_incdec(UINT32 PaddlePortnum, UINT32 player) {
1688 UINT8 Temp = ProcessAnalog(PaddlePortnum, 0, 1, 0x01, 0xff);
1689 if (Temp > 0x90) PaddleX[player]-=15;
1690 if (Temp < 0x70) PaddleX[player]+=15;
1691 return PaddleX[player];
1692 }
1693
DrvFrame()1694 static INT32 DrvFrame()
1695 {
1696 if (DrvReset) {
1697 DrvDoReset();
1698 }
1699
1700 {
1701 DrvInputs[0] = ~0;
1702 for (INT32 i = 0; i < 32; i++) {
1703 DrvInputs[0] ^= (DrvJoy1[i] & 1) << i;
1704 }
1705
1706 DrvInputs[1] = 0x0000ff00 | DrvDips[0];
1707 DrvInputs[1] |= (Paddle_incdec(DrvAnalogPort0, 0) << 24) | (Paddle_incdec(DrvAnalogPort1, 1) << 16);
1708 DrvInputs[2] = 0xffffffff;
1709 }
1710
1711 UINT32 nTotalCycles = (sixtyhz) ? (28638000 / 60) : (INT32)(28638000 / 59.5971);
1712 INT32 nCyclesDone = 0;
1713 INT32 nInterleave = 262;
1714
1715 for (INT32 i = 0; i < nInterleave; i++) {
1716 nCyclesDone += Sh2Run(((i + 1) * nTotalCycles / nInterleave) - nCyclesDone);
1717
1718 if (i == 1) {
1719 Sh2SetIRQLine(1, CPU_IRQSTATUS_AUTO);
1720 } else if (i == 240) {
1721 Sh2SetIRQLine(5, CPU_IRQSTATUS_AUTO);
1722 }
1723 { // fire irq9 every interleave iteration.
1724 Sh2SetIRQLine(9, CPU_IRQSTATUS_AUTO);
1725 if (i%125==0 && i!=0) { //125 = every 8 ms (per 261 interleave)
1726 Sh2SetIRQLine(11, CPU_IRQSTATUS_AUTO);
1727 }
1728 if (i%31==0 && i!=0) { //31=every 2 ms
1729 Sh2SetIRQLine(15, CPU_IRQSTATUS_AUTO);
1730 }
1731 }
1732 }
1733
1734 if (pBurnSoundOut) {
1735 YMZ280BRender(pBurnSoundOut, nBurnSoundLen);
1736 if (LP1 && LP2 && (DrvDips[1] & 2)) { // Cyvern "Headache Filter" dip
1737 LP1->Filter(pBurnSoundOut + 0, nBurnSoundLen); // Left
1738 LP2->Filter(pBurnSoundOut + 1, nBurnSoundLen); // Right
1739 }
1740 }
1741
1742 if (pBurnDraw) {
1743 DrvDraw();
1744 }
1745
1746 return 0;
1747 }
1748
1749
DrvScan(INT32 nAction,INT32 * pnMin)1750 static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
1751 {
1752 struct BurnArea ba;
1753
1754 if (pnMin != NULL) {
1755 *pnMin = 0x029707;
1756 }
1757
1758 if (nAction & ACB_MEMORY_RAM) {
1759 ba.Data = AllRam;
1760 ba.nLen = RamEnd - AllRam;
1761 ba.nAddress = 0;
1762 ba.szName = "All RAM";
1763 BurnAcb(&ba);
1764
1765 ba.Data = DrvGfxROM2;
1766 ba.nLen = 0x40000;
1767 ba.nAddress = 0;
1768 ba.szName = "RAM Tiles";
1769 BurnAcb(&ba);
1770 }
1771
1772 if (nAction & ACB_DRIVER_DATA) {
1773 Sh2Scan(nAction);
1774 YMZ280BScan(nAction, pnMin);
1775
1776 SCAN_VAR(hit);
1777 SCAN_VAR(suprnova_alt_enable_sprites);
1778 SCAN_VAR(bright_spc_g_trans);
1779 SCAN_VAR(bright_spc_r_trans);
1780 SCAN_VAR(bright_spc_b_trans);
1781 SCAN_VAR(bright_spc_g);
1782 SCAN_VAR(bright_spc_r);
1783 SCAN_VAR(bright_spc_b);
1784 SCAN_VAR(suprnova_alt_enable_background);
1785 SCAN_VAR(bright_v3_g);
1786 SCAN_VAR(bright_v3_r);
1787 SCAN_VAR(bright_v3_b);
1788 SCAN_VAR(use_spc_bright);
1789 SCAN_VAR(use_v3_bright);
1790 SCAN_VAR(PaddleX);
1791 }
1792
1793 if (nAction & ACB_NVRAM) {
1794 ba.Data = DrvNvRAM;
1795 ba.nLen = 0x02000;
1796 ba.nAddress = 0;
1797 ba.szName = "NV RAM";
1798 BurnAcb(&ba);
1799 }
1800
1801 if (nAction & ACB_WRITE) {
1802 nRedrawTiles = 1;
1803 olddepths[0] = olddepths[1] = 0xff;
1804 }
1805
1806 return 0;
1807 }
1808
1809
1810 // Super Kaneko Nova System BIOS
1811
1812 static struct BurnRomInfo sknsRomDesc[] = {
1813 { "sknsj1.u10", 0x80000, 0x7e2b836c, BRF_BIOS}, // 0 Japan
1814 { "sknse2.u10", 0x80000, 0xe2b9d7d1, BRF_BIOS}, // 1 Europe
1815 { "sknsa1.u10", 0x80000, 0x745e5212, BRF_BIOS}, // 2 Asia
1816 { "sknsu1.u10", 0x80000, 0x384d21ec, BRF_BIOS}, // 3 USA
1817 { "sknsk1.u10", 0x80000, 0xff1c9f79, BRF_BIOS}, // 4 Korea
1818
1819 #if defined (ROM_VERIFY)
1820 { "supernova_modbios-japan.u10", 0x080000, 0xb8d3190c, BRF_OPT },
1821 { "supernova-modbios-korea.u10", 0x080000, 0x1d90517c, BRF_OPT },
1822 #endif
1823 };
1824
1825 STD_ROM_PICK(skns)
STD_ROM_FN(skns)1826 STD_ROM_FN(skns)
1827
1828 static INT32 SknsInit() {
1829 return 1;
1830 }
1831
1832 struct BurnDriver BurnDrvSkns = {
1833 "skns", NULL, NULL, NULL, "1996",
1834 "Super Kaneko Nova System BIOS\0", "BIOS only", "Kaneko", "Super Kaneko Nova System",
1835 NULL, NULL, NULL, NULL,
1836 BDF_BOARDROM, 0, HARDWARE_KANEKO_SKNS, GBF_BIOS, 0,
1837 NULL, sknsRomInfo, sknsRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo,
1838 SknsInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
1839 320, 240, 4, 3
1840 };
1841
1842
1843 // Cyvern (US)
1844
1845 static struct BurnRomInfo cyvernRomDesc[] = {
1846 { "cv-usa.u10", 0x100000, 0x1023ddca, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
1847 { "cv-usa.u8", 0x100000, 0xf696f6be, 1 | BRF_PRG | BRF_ESS }, // 1
1848
1849 { "cv100-00.u24", 0x400000, 0xcd4ae88a, 2 | BRF_GRA}, // 2 Sprites
1850 { "cv101-00.u20", 0x400000, 0xa6cb3f0b, 2 | BRF_GRA}, // 3
1851
1852 { "cv200-00.u16", 0x400000, 0xddc8c67e, 3 | BRF_GRA}, // 4 Background Tiles
1853 { "cv201-00.u13", 0x400000, 0x65863321, 3 | BRF_GRA}, // 5
1854
1855 { "cv210-00.u18", 0x400000, 0x7486bf3a, 4 | BRF_GRA}, // 6 Foreground Tiles
1856
1857 { "cv300-00.u4", 0x400000, 0xfbeda465, 5 | BRF_SND}, // 7 YMZ280b Samples
1858 };
1859
STDROMPICKEXT(cyvern,cyvern,skns)1860 STDROMPICKEXT(cyvern, cyvern, skns)
1861 STD_ROM_FN(cyvern)
1862
1863 static INT32 CyvernInit()
1864 {
1865 sprite_kludge_x = 0;
1866 sprite_kludge_y = 2;
1867 speedhack_address = 0x604d3c8;
1868 speedhack_pc[0] = 0x402ebd4;
1869
1870 return DrvInit(3 /* USA */);
1871 }
1872
1873 struct BurnDriver BurnDrvCyvern = {
1874 "cyvern", NULL, "skns", NULL, "1998",
1875 "Cyvern (US)\0", NULL, "Kaneko", "Super Kaneko Nova System",
1876 NULL, NULL, NULL, NULL,
1877 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_VERSHOOT, 0,
1878 NULL, cyvernRomInfo, cyvernRomName, NULL, NULL, NULL, NULL, CyvernInputInfo, CyvernDIPInfo,
1879 CyvernInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
1880 240, 320, 3, 4
1881 };
1882
1883
1884 // Cyvern (Japan)
1885
1886 static struct BurnRomInfo cyvernjRomDesc[] = {
1887 { "cvj-even.u10", 0x100000, 0x802fadb4, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
1888 { "cvj-odd.u8", 0x100000, 0xf8a0fbdd, 1 | BRF_PRG | BRF_ESS }, // 1
1889
1890 { "cv100-00.u24", 0x400000, 0xcd4ae88a, 2 | BRF_GRA}, // 2 Sprites
1891 { "cv101-00.u20", 0x400000, 0xa6cb3f0b, 2 | BRF_GRA}, // 3
1892
1893 { "cv200-00.u16", 0x400000, 0xddc8c67e, 3 | BRF_GRA}, // 4 Background Tiles
1894 { "cv201-00.u13", 0x400000, 0x65863321, 3 | BRF_GRA}, // 5
1895
1896 { "cv210-00.u18", 0x400000, 0x7486bf3a, 4 | BRF_GRA}, // 6 Foreground Tiles
1897
1898 { "cv300-00.u4", 0x400000, 0xfbeda465, 5 | BRF_SND}, // 7 YMZ280b Samples
1899 };
1900
STDROMPICKEXT(cyvernj,cyvernj,skns)1901 STDROMPICKEXT(cyvernj, cyvernj, skns)
1902 STD_ROM_FN(cyvernj)
1903
1904 static INT32 CyvernJInit()
1905 {
1906 sprite_kludge_x = 0;
1907 sprite_kludge_y = 2;
1908 speedhack_address = 0x604d3c8;
1909 speedhack_pc[0] = 0x402ebd4;
1910
1911 return DrvInit(0 /* Japan */);
1912 }
1913
1914 struct BurnDriver BurnDrvCyvernJ = {
1915 "cyvernj", "cyvern", "skns", NULL, "1998",
1916 "Cyvern (Japan)\0", NULL, "Kaneko", "Super Kaneko Nova System",
1917 NULL, NULL, NULL, NULL,
1918 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_VERSHOOT, 0,
1919 NULL, cyvernjRomInfo, cyvernjRomName, NULL, NULL, NULL, NULL, CyvernInputInfo, CyvernDIPInfo,
1920 CyvernJInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
1921 240, 320, 3, 4
1922 };
1923
1924 // Guts'n (Japan)
1925
1926 static struct BurnRomInfo gutsnRomDesc[] = {
1927 { "gts000j0.u6", 0x080000, 0x8ee91310, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
1928 { "gts001j0.u4", 0x080000, 0x80b8ee66, 1 | BRF_PRG | BRF_ESS }, // 1
1929
1930 { "gts10000.u24", 0x400000, 0x1959979e, 2 | BRF_GRA }, // 2 Sprites
1931
1932 { "gts20000.u16", 0x400000, 0xc443aac3, 3 | BRF_GRA }, // 3 Background Tiles
1933
1934 { "gts30000.u4", 0x400000, 0x8c169141, 5 | BRF_SND }, // 4 YMZ280b Samples
1935 };
1936
STDROMPICKEXT(gutsn,gutsn,skns)1937 STDROMPICKEXT(gutsn, gutsn, skns)
1938 STD_ROM_FN(gutsn)
1939
1940 static INT32 GutsnInit()
1941 {
1942 sprite_kludge_x = -1;
1943 sprite_kludge_y = 1;
1944 speedhack_address = 0x600c780;
1945 speedhack_pc[0] = 0x4022070; //number from mame + 0x02
1946
1947 return DrvInit(0 /*japan*/);
1948 }
1949
1950 struct BurnDriver BurnDrvGutsn = {
1951 "gutsn", NULL, "skns", NULL, "2000",
1952 "Guts'n (Japan)\0", NULL, "Kaneko / Kouyousha", "Super Kaneko Nova System",
1953 NULL, NULL, NULL, NULL,
1954 BDF_GAME_WORKING | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
1955 NULL, gutsnRomInfo, gutsnRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo,
1956 GutsnInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
1957 320, 240, 4, 3
1958 };
1959
1960
1961 // Sengeki Striker (Asia)
1962
1963 static struct BurnRomInfo sengekisRomDesc[] = {
1964 { "ss01a.u6", 0x080000, 0x962fe857, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
1965 { "ss01a.u4", 0x080000, 0xee853c23, 1 | BRF_PRG | BRF_ESS }, // 1
1966
1967 { "ss100-00.u21", 0x400000, 0xbc7b3dfa, 2 | BRF_GRA}, // 2 Sprites
1968 { "ss101-00.u20", 0x400000, 0xab2df280, 2 | BRF_GRA}, // 3
1969 { "ss102-00.u8", 0x400000, 0x0845eafe, 2 | BRF_GRA}, // 4
1970 { "ss103-00.u32", 0x400000, 0xee451ac9, 2 | BRF_GRA}, // 5
1971
1972 { "ss200-00.u17", 0x400000, 0xcd773976, 3 | BRF_GRA}, // 6 Background Tiles
1973 { "ss201-00.u9", 0x400000, 0x301fad4c, 3 | BRF_GRA}, // 7
1974
1975 { "ss210-00.u3", 0x200000, 0xc3697805, 4 | BRF_GRA}, // 8 Foreground Tiles
1976
1977 { "ss300-00.u1", 0x400000, 0x35b04b18, 5 | BRF_SND}, // 9 YMZ280b Samples
1978 };
1979
STDROMPICKEXT(sengekis,sengekis,skns)1980 STDROMPICKEXT(sengekis, sengekis, skns)
1981 STD_ROM_FN(sengekis)
1982
1983 static INT32 SengekisInit()
1984 {
1985 sprite_kludge_x = -192;
1986 sprite_kludge_y = -272;
1987
1988 speedhack_address = 0x60b74bc;
1989 speedhack_pc[0] = 0x60006ec + 2;
1990 sixtyhz = 1;
1991
1992 return DrvInit(2 /*asia*/);
1993 }
1994
1995 struct BurnDriver BurnDrvSengekis = {
1996 "sengekis", NULL, "skns", NULL, "1997",
1997 "Sengeki Striker (Asia)\0", NULL, "Kaneko / Warashi", "Super Kaneko Nova System",
1998 NULL, NULL, NULL, NULL,
1999 BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_VERSHOOT, 0,
2000 NULL, sengekisRomInfo, sengekisRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo,
2001 SengekisInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2002 240, 320, 3, 4
2003 };
2004
2005 // Sengeki Striker (Japan)
2006
2007 static struct BurnRomInfo sengekisjRomDesc[] = {
2008 { "ss01j.u6", 0x080000, 0x9efdcd5a, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2009 { "ss01j.u4", 0x080000, 0x92c3f45e, 1 | BRF_PRG | BRF_ESS }, // 1
2010
2011 { "ss100-00.u21", 0x400000, 0xbc7b3dfa, 2 | BRF_GRA }, // 2 Sprites
2012 { "ss101-00.u20", 0x400000, 0xab2df280, 2 | BRF_GRA }, // 3
2013 { "ss102-00.u8", 0x400000, 0x0845eafe, 2 | BRF_GRA }, // 4
2014 { "ss103-00.u32", 0x400000, 0xee451ac9, 2 | BRF_GRA }, // 5
2015
2016 { "ss200-00.u17", 0x400000, 0xcd773976, 3 | BRF_GRA }, // 6 Background Tiles
2017 { "ss201-00.u9", 0x400000, 0x301fad4c, 3 | BRF_GRA }, // 7
2018
2019 { "ss210-00.u3", 0x200000, 0xc3697805, 4 | BRF_GRA }, // 8 Foreground Tiles
2020
2021 { "ss300-00.u1", 0x400000, 0x35b04b18, 5 | BRF_SND }, // 9 YMZ280b Samples
2022 };
2023
STDROMPICKEXT(sengekisj,sengekisj,skns)2024 STDROMPICKEXT(sengekisj, sengekisj, skns)
2025 STD_ROM_FN(sengekisj)
2026
2027 static INT32 SengekisjInit()
2028 {
2029 sprite_kludge_x = -192;
2030 sprite_kludge_y = -272;
2031
2032 speedhack_address = 0x60b7380;
2033 speedhack_pc[0] = 0x60006ec + 2;
2034 sixtyhz = 1;
2035
2036 return DrvInit(0 /*japan*/);
2037 }
2038
2039 struct BurnDriver BurnDrvSengekisj = {
2040 "sengekisj", "sengekis", "skns", NULL, "1997",
2041 "Sengeki Striker (Japan)\0", NULL, "Kaneko / Warashi", "Super Kaneko Nova System",
2042 NULL, NULL, NULL, NULL,
2043 BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_VERSHOOT, 0,
2044 NULL, sengekisjRomInfo, sengekisjRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo,
2045 SengekisjInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2046 240, 320, 3, 4
2047 };
2048
2049
2050 // Puzz Loop (Europe, v0.94)
2051
2052 static struct BurnRomInfo puzzloopRomDesc[] = {
2053 { "pl00e4.u6", 0x080000, 0x7d3131a5, 1 | BRF_PRG | BRF_ESS }, // 1 SH2 Code
2054 { "pl00e4.u4", 0x080000, 0x40dc3291, 1 | BRF_PRG | BRF_ESS }, // 2
2055
2056 { "pzl10000.u24", 0x400000, 0x35bf6897, 2 | BRF_GRA }, // 3 Sprites
2057
2058 { "pzl20000.u16", 0x400000, 0xff558e68, 3 | BRF_GRA }, // 4 Background Tiles
2059
2060 { "pzl21000.u18", 0x400000, 0xc8b3be64, 4 | BRF_GRA }, // 5 Foreground Tiles
2061
2062 { "pzl30000.u4", 0x400000, 0x38604b8d, 5 | BRF_SND }, // 6 YMZ280b Samples
2063 };
2064
STDROMPICKEXT(puzzloop,puzzloop,skns)2065 STDROMPICKEXT(puzzloop, puzzloop, skns)
2066 STD_ROM_FN(puzzloop)
2067
2068 static INT32 PuzzloopInit()
2069 {
2070 sprite_kludge_x = -9;
2071 sprite_kludge_y = -1;
2072
2073 speedhack_address = 0x6081d38;
2074 speedhack_pc[0] = 0x401dab0 + 2;
2075
2076 return DrvInit(1 /*europe*/);
2077 }
2078
2079 struct BurnDriver BurnDrvPuzzloop = {
2080 "puzzloop", NULL, "skns", NULL, "1998",
2081 "Puzz Loop (Europe, v0.94)\0", NULL, "Mitchell", "Super Kaneko Nova System",
2082 NULL, NULL, NULL, NULL,
2083 BDF_GAME_WORKING | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2084 NULL, puzzloopRomInfo, puzzloopRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //PuzzloopInputInfo, PuzzloopDIPInfo,
2085 PuzzloopInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2086 320, 240, 4, 3
2087 };
2088
2089
2090 // Puzz Loop (Europe, v0.93)
2091
2092 static struct BurnRomInfo puzzloopeRomDesc[] = {
2093 { "pl00e1.u6", 0x080000, 0x273adc38, 1 | BRF_PRG | BRF_ESS }, // 1 SH2 Code
2094 { "pl00e1.u4", 0x080000, 0x14ac2870, 1 | BRF_PRG | BRF_ESS }, // 2
2095
2096 { "pzl10000.u24", 0x400000, 0x35bf6897, 2 | BRF_GRA }, // 3 Sprites
2097
2098 { "pzl20000.u16", 0x400000, 0xff558e68, 3 | BRF_GRA }, // 4 Background Tiles
2099
2100 { "pzl21000.u18", 0x400000, 0xc8b3be64, 4 | BRF_GRA }, // 5 Foreground Tiles
2101
2102 { "pzl30000.u4", 0x400000, 0x38604b8d, 5 | BRF_SND }, // 6 YMZ280b Samples
2103 };
2104
2105 STDROMPICKEXT(puzzloope, puzzloope, skns)
2106 STD_ROM_FN(puzzloope)
2107
2108 struct BurnDriver BurnDrvPuzzloope = {
2109 "puzzloope", "puzzloop", "skns", NULL, "1998",
2110 "Puzz Loop (Europe, v0.93)\0", NULL, "Mitchell", "Super Kaneko Nova System",
2111 NULL, NULL, NULL, NULL,
2112 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2113 NULL, puzzloopeRomInfo, puzzloopeRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //PuzzloopInputInfo, PuzzloopDIPInfo,
2114 PuzzloopInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2115 320, 240, 4, 3
2116 };
2117
2118
2119 // Puzz Loop (Japan)
2120
2121 static struct BurnRomInfo puzzloopjRomDesc[] = {
2122 { "pl0j2.u6", 0x080000, 0x23c3bf97, 1 | BRF_PRG | BRF_ESS }, // 1 SH2 Code
2123 { "pl0j2.u4", 0x080000, 0x55b2a3cb, 1 | BRF_PRG | BRF_ESS }, // 2
2124
2125 { "pzl10000.u24", 0x400000, 0x35bf6897, 2 | BRF_GRA }, // 3 Sprites
2126
2127 { "pzl20000.u16", 0x400000, 0xff558e68, 3 | BRF_GRA }, // 4 Background Tiles
2128
2129 { "pzl21000.u18", 0x400000, 0xc8b3be64, 4 | BRF_GRA }, // 5 Foreground Tiles
2130
2131 { "pzl30000.u4", 0x400000, 0x38604b8d, 5 | BRF_SND }, // 6 YMZ280b Samples
2132 };
2133
STDROMPICKEXT(puzzloopj,puzzloopj,skns)2134 STDROMPICKEXT(puzzloopj, puzzloopj, skns)
2135 STD_ROM_FN(puzzloopj)
2136
2137 static INT32 PuzzloopjInit()
2138 {
2139 sprite_kludge_x = -9;
2140 sprite_kludge_y = -1;
2141
2142 speedhack_address = 0x6086714;
2143 speedhack_pc[0] = 0x401dca0 + 2;
2144
2145 return DrvInit(0 /*japan*/);
2146 }
2147
2148 struct BurnDriver BurnDrvPuzzloopj = {
2149 "puzzloopj", "puzzloop", "skns", NULL, "1998",
2150 "Puzz Loop (Japan)\0", NULL, "Mitchell", "Super Kaneko Nova System",
2151 NULL, NULL, NULL, NULL,
2152 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2153 NULL, puzzloopjRomInfo, puzzloopjRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //PuzzloopInputInfo, PuzzloopDIPInfo,
2154 PuzzloopjInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2155 320, 240, 4, 3
2156 };
2157
2158
2159 // Puzz Loop (Asia)
2160
2161 static struct BurnRomInfo puzzloopaRomDesc[] = {
2162 { "pl0a3.u6", 0x080000, 0x4e8673b8, 1 | BRF_PRG | BRF_ESS }, // 1 SH2 Code
2163 { "pl0a3.u4", 0x080000, 0xe08a1a07, 1 | BRF_PRG | BRF_ESS }, // 2
2164
2165 { "pzl10000.u24", 0x400000, 0x35bf6897, 2 | BRF_GRA }, // 3 Sprites
2166
2167 { "pzl20000.u16", 0x400000, 0xff558e68, 3 | BRF_GRA }, // 4 Background Tiles
2168
2169 { "pzl21000.u18", 0x400000, 0xc8b3be64, 4 | BRF_GRA }, // 5 Foreground Tiles
2170
2171 { "pzl30000.u4", 0x400000, 0x38604b8d, 5 | BRF_SND }, // 6 YMZ280b Samples
2172 };
2173
STDROMPICKEXT(puzzloopa,puzzloopa,skns)2174 STDROMPICKEXT(puzzloopa, puzzloopa, skns)
2175 STD_ROM_FN(puzzloopa)
2176
2177 static INT32 PuzzloopaInit()
2178 {
2179 sprite_kludge_x = -9;
2180 sprite_kludge_y = -1;
2181
2182 speedhack_address = 0x6085bcc;
2183 speedhack_pc[0] = 0x401d9d4 + 2;
2184
2185 return DrvInit(2 /*asia*/);
2186 }
2187
2188 struct BurnDriver BurnDrvPuzzloopa = {
2189 "puzzloopa", "puzzloop", "skns", NULL, "1998",
2190 "Puzz Loop (Asia)\0", NULL, "Mitchell", "Super Kaneko Nova System",
2191 NULL, NULL, NULL, NULL,
2192 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2193 NULL, puzzloopaRomInfo, puzzloopaRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //PuzzloopInputInfo, PuzzloopDIPInfo,
2194 PuzzloopaInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2195 320, 240, 4, 3
2196 };
2197
2198
2199 // Puzz Loop (Korea)
2200
2201 static struct BurnRomInfo puzzloopkRomDesc[] = {
2202 { "pl0k4.u6", 0x080000, 0x8d81f20c, 1 | BRF_PRG | BRF_ESS }, // 1 SH2 Code
2203 { "pl0k4.u4", 0x080000, 0x17c78e41, 1 | BRF_PRG | BRF_ESS }, // 2
2204
2205 { "pzl10000.u24", 0x400000, 0x35bf6897, 2 | BRF_GRA }, // 3 Sprites
2206
2207 { "pzl20000.u16", 0x400000, 0xff558e68, 3 | BRF_GRA }, // 4 Background Tiles
2208
2209 { "pzl21000.u18", 0x400000, 0xc8b3be64, 4 | BRF_GRA }, // 5 Foreground Tiles
2210
2211 { "pzl30000.u4", 0x400000, 0x38604b8d, 5 | BRF_SND }, // 6 YMZ280b Samples
2212 };
2213
STDROMPICKEXT(puzzloopk,puzzloopk,skns)2214 STDROMPICKEXT(puzzloopk, puzzloopk, skns)
2215 STD_ROM_FN(puzzloopk)
2216
2217 static INT32 PuzzloopkInit()
2218 {
2219 sprite_kludge_x = -9;
2220 sprite_kludge_y = -1;
2221
2222 // speedhack_address = 0x6081d38;
2223 // speedhack_pc[0] = 0x401dab0 + 2;
2224
2225 return DrvInit(4 /*korea*/);
2226 }
2227
2228 struct BurnDriver BurnDrvPuzzloopk = {
2229 "puzzloopk", "puzzloop", "skns", NULL, "1998",
2230 "Puzz Loop (Korea)\0", NULL, "Mitchell", "Super Kaneko Nova System",
2231 NULL, NULL, NULL, NULL,
2232 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2233 NULL, puzzloopkRomInfo, puzzloopkRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //PuzzloopInputInfo, PuzzloopDIPInfo,
2234 PuzzloopkInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2235 320, 240, 4, 3
2236 };
2237
2238
2239 // Puzz Loop (USA)
2240
2241 static struct BurnRomInfo puzzloopuRomDesc[] = {
2242 { "plue5.u6", 0x080000, 0xe6f3f82f, 1 | BRF_PRG | BRF_ESS }, // 1 SH2 Code
2243 { "plue5.u4", 0x080000, 0x0d081d30, 1 | BRF_PRG | BRF_ESS }, // 2
2244
2245 { "pzl10000.u24", 0x400000, 0x35bf6897, 2 | BRF_GRA }, // 3 Sprites
2246
2247 { "pzl20000.u16", 0x400000, 0xff558e68, 3 | BRF_GRA }, // 4 Background Tiles
2248
2249 { "pzl21000.u18", 0x400000, 0xc8b3be64, 4 | BRF_GRA }, // 5 Foreground Tiles
2250
2251 { "pzl30000.u4", 0x400000, 0x38604b8d, 5 | BRF_SND }, // 6 YMZ280b Samples
2252 };
2253
STDROMPICKEXT(puzzloopu,puzzloopu,skns)2254 STDROMPICKEXT(puzzloopu, puzzloopu, skns)
2255 STD_ROM_FN(puzzloopu)
2256
2257 static INT32 PuzzloopuInit()
2258 {
2259 sprite_kludge_x = -9;
2260 sprite_kludge_y = -1;
2261
2262 speedhack_address = 0x6085cec;
2263 speedhack_pc[0] = 0x401dab0 + 2;
2264
2265 return DrvInit(3 /*usa*/);
2266 }
2267
2268 struct BurnDriver BurnDrvPuzzloopu = {
2269 "puzzloopu", "puzzloop", "skns", NULL, "1998",
2270 "Puzz Loop (USA)\0", NULL, "Mitchell", "Super Kaneko Nova System",
2271 NULL, NULL, NULL, NULL,
2272 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2273 NULL, puzzloopuRomInfo, puzzloopuRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //PuzzloopInputInfo, PuzzloopDIPInfo,
2274 PuzzloopuInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2275 320, 240, 4, 3
2276 };
2277
2278
2279 // Tel Jan
2280
2281 static struct BurnRomInfo teljanRomDesc[] = {
2282 { "tel1j.u10", 0x080000, 0x09b552fe, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2283 { "tel1j.u8", 0x080000, 0x070b4345, 1 | BRF_PRG | BRF_ESS }, // 1
2284
2285 { "tj100-00.u24", 0x400000, 0x810144f1, 2 | BRF_GRA }, // 2 Sprites
2286 { "tj101-00.u20", 0x400000, 0x82f570e1, 2 | BRF_GRA }, // 3
2287 { "tj102-00.u17", 0x400000, 0xace875dc, 2 | BRF_GRA }, // 4
2288
2289 { "tj200-00.u16", 0x400000, 0xbe0f90b2, 3 | BRF_GRA }, // 5 Background Tiles
2290
2291 { "tj300-00.u4", 0x400000, 0x685495c4, 5 | BRF_SND }, // 6 YMZ280b Samples
2292 };
2293
STDROMPICKEXT(teljan,teljan,skns)2294 STDROMPICKEXT(teljan, teljan, skns)
2295 STD_ROM_FN(teljan)
2296
2297 static INT32 TeljanInit()
2298 {
2299 sprite_kludge_x = 5;
2300 sprite_kludge_y = 1;
2301
2302 speedhack_address = 0x6002fb4;
2303 speedhack_pc[0] = 0x401ba32 + 2;
2304
2305 return DrvInit(0 /*japan*/);
2306 }
2307
2308 struct BurnDriver BurnDrvTeljan = {
2309 "teljan", NULL, "skns",NULL, "1999",
2310 "Tel Jan\0", NULL, "Electro Design", "Super Kaneko Nova System",
2311 NULL, NULL, NULL, NULL,
2312 BDF_GAME_WORKING, 2, HARDWARE_KANEKO_SKNS, GBF_MAHJONG, 0,
2313 NULL, teljanRomInfo, teljanRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //Skns_1pInputInfo, Skns_1pDIPInfo,
2314 TeljanInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2315 320, 240, 4, 3
2316 };
2317
2318
2319 // Panic Street (Japan)
2320
2321 static struct BurnRomInfo panicstrRomDesc[] = {
2322 { "ps1000j0.u10", 0x100000, 0x59645f89, 1 | BRF_PRG | BRF_ESS }, // 1 SH2 Code
2323 { "ps1001j0.u8", 0x100000, 0xc4722be9, 1 | BRF_PRG | BRF_ESS }, // 2
2324
2325 { "ps-10000.u24", 0x400000, 0x294b2f14, 2 | BRF_GRA }, // 3 Sprites
2326 { "ps110100.u20", 0x400000, 0xe292f393, 2 | BRF_GRA }, // 4
2327
2328 { "ps120000.u16", 0x400000, 0xd772ac15, 3 | BRF_GRA }, // 5 Background Tiles
2329
2330 { "ps-30000.u4", 0x400000, 0x2262e263, 5 | BRF_SND }, // 6 YMZ280b Samples
2331 };
2332
STDROMPICKEXT(panicstr,panicstr,skns)2333 STDROMPICKEXT(panicstr, panicstr, skns)
2334 STD_ROM_FN(panicstr)
2335
2336 static INT32 PanicstrInit()
2337 {
2338 sprite_kludge_x = -1;
2339 sprite_kludge_y = -1;
2340
2341 speedhack_address = 0x60f19e4;
2342 speedhack_pc[0] = 0x404e68a + 2;
2343
2344 return DrvInit(0 /*japan*/);
2345 }
2346
2347 struct BurnDriver BurnDrvPanicstr = {
2348 "panicstr", NULL, "skns", NULL, "1999",
2349 "Panic Street (Japan)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2350 NULL, NULL, NULL, NULL,
2351 BDF_GAME_WORKING | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2352 NULL, panicstrRomInfo, panicstrRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //GalpanisInputInfo, GalpanisDIPInfo,
2353 PanicstrInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2354 320, 240, 4, 3
2355 };
2356
2357
2358 // Gals Panic 4 (Europe)
2359 // only main CPU and plds dumps were provided
2360
2361 static struct BurnRomInfo galpani4RomDesc[] = {
2362 { "gp4-000-e0.u10", 0x080000, 0x7464cc28, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2363 { "gp4-001-e0.u8", 0x080000, 0x8d162069, 1 | BRF_PRG | BRF_ESS }, // 1
2364
2365 { "gp4-100-00.u24", 0x200000, 0x1df61f01, 2 | BRF_GRA }, // 2 Sprites
2366 { "gp4-101-00.u20", 0x100000, 0x8e2c9349, 2 | BRF_GRA }, // 3
2367
2368 { "gp4-200-00.u16", 0x200000, 0xf0781376, 3 | BRF_GRA }, // 4 Background Tiles
2369 { "gp4-201-00.u18", 0x200000, 0x10c4b183, 3 | BRF_GRA }, // 5
2370
2371 { "gp4-300-00.u4", 0x200000, 0x8374663a, 5 | BRF_SND }, // 6 YMZ280b Samples
2372
2373 { "skns-r09.u9", 0x000117, 0xb02058d9, 0 | BRF_OPT }, // 7 plds
2374 { "skns-r11.u11", 0x000117, 0xa9f05af4, 0 | BRF_OPT },
2375 };
2376
STDROMPICKEXT(galpani4,galpani4,skns)2377 STDROMPICKEXT(galpani4, galpani4, skns)
2378 STD_ROM_FN(galpani4)
2379
2380 static INT32 Galpani4Init()
2381 {
2382 sprite_kludge_x = -5;
2383 sprite_kludge_y = -1;
2384
2385 return DrvInit(1 /*Europe*/);
2386 }
2387
2388 struct BurnDriver BurnDrvGalpani4 = {
2389 "galpani4", NULL, "skns", NULL, "1996",
2390 "Gals Panic 4 (Europe)\0", "No sound. Use a clone, instead!", "Kaneko", "Super Kaneko Nova System",
2391 NULL, NULL, NULL, NULL,
2392 BDF_GAME_WORKING | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2393 NULL, galpani4RomInfo, galpani4RomName, NULL, NULL, NULL, NULL, CyvernInputInfo, CyvernNoSpeedhackDIPInfo,
2394 Galpani4Init, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2395 320, 240, 4, 3
2396 };
2397
2398 // Gals Panic 4 (Japan)
2399
2400 static struct BurnRomInfo galpani4jRomDesc[] = {
2401 { "gp4j1.u10", 0x080000, 0x919a3893, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2402 { "gp4j1.u8", 0x080000, 0x94cb1fb7, 1 | BRF_PRG | BRF_ESS }, // 1
2403
2404 { "gp4-100-00.u24", 0x200000, 0x1df61f01, 2 | BRF_GRA }, // 2 Sprites
2405 { "gp4-101-00.u20", 0x100000, 0x8e2c9349, 2 | BRF_GRA }, // 3
2406
2407 { "gp4-200-00.u16", 0x200000, 0xf0781376, 3 | BRF_GRA }, // 4 Background Tiles
2408 { "gp4-201-00.u18", 0x200000, 0x10c4b183, 3 | BRF_GRA }, // 5
2409
2410 { "gp4-300-00.u4", 0x200000, 0x8374663a, 5 | BRF_SND }, // 6 YMZ280b Samples
2411 };
2412
STDROMPICKEXT(galpani4j,galpani4j,skns)2413 STDROMPICKEXT(galpani4j, galpani4j, skns)
2414 STD_ROM_FN(galpani4j)
2415
2416 static INT32 Galpani4jInit()
2417 {
2418 sprite_kludge_x = -5;
2419 sprite_kludge_y = -1;
2420
2421 return DrvInit(0 /*Japan*/);
2422 }
2423
2424 struct BurnDriver BurnDrvGalpani4j = {
2425 "galpani4j", "galpani4", "skns", NULL, "1996",
2426 "Gals Panic 4 (Japan)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2427 NULL, NULL, NULL, NULL,
2428 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2429 NULL, galpani4jRomInfo, galpani4jRomName, NULL, NULL, NULL, NULL, CyvernInputInfo, CyvernNoSpeedhackDIPInfo,
2430 Galpani4jInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2431 320, 240, 4, 3
2432 };
2433
2434
2435 // Gals Panic 4 (Korea)
2436
2437 static struct BurnRomInfo galpani4kRomDesc[] = {
2438 { "gp4k1.u10", 0x080000, 0xcbd5c3a0, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2439 { "gp4k1.u8", 0x080000, 0x7a95bfe2, 1 | BRF_PRG | BRF_ESS }, // 1
2440
2441 { "gp4-100-00.u24", 0x200000, 0x1df61f01, 2 | BRF_GRA }, // 2 Sprites
2442 { "gp4-101-00.u20", 0x100000, 0x8e2c9349, 2 | BRF_GRA }, // 3
2443
2444 { "gp4-200-00.u16", 0x200000, 0xf0781376, 3 | BRF_GRA }, // 4 Background Tiles
2445 { "gp4-201-00.u18", 0x200000, 0x10c4b183, 3 | BRF_GRA }, // 5
2446
2447 { "gp4-300-00.u4", 0x200000, 0x8374663a, 5 | BRF_SND }, // 6 YMZ280b Samples
2448 { "gp4-301-01.u7", 0x200000, 0x886ef77f, 5 | BRF_SND }, // 7
2449 };
2450
STDROMPICKEXT(galpani4k,galpani4k,skns)2451 STDROMPICKEXT(galpani4k, galpani4k, skns)
2452 STD_ROM_FN(galpani4k)
2453
2454 static INT32 Galpani4kInit()
2455 {
2456 sprite_kludge_x = -5;
2457 sprite_kludge_y = -1;
2458
2459 return DrvInit(4 /*Korea*/);
2460 }
2461
2462 struct BurnDriver BurnDrvGalpani4k = {
2463 "galpani4k", "galpani4", "skns", NULL, "1996",
2464 "Gals Panic 4 (Korea)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2465 NULL, NULL, NULL, NULL,
2466 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2467 NULL, galpani4kRomInfo, galpani4kRomName, NULL, NULL, NULL, NULL, CyvernInputInfo, CyvernNoSpeedhackDIPInfo,
2468 Galpani4kInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2469 320, 240, 4, 3
2470 };
2471
2472 // Gals Panic DX (Asia)
2473
2474 static struct BurnRomInfo galpanidxRomDesc[] = {
2475 { "gpdx.u10", 0x100000, 0x8eca883d, 1 | BRF_PRG | BRF_ESS }, // 0 user1
2476 { "gpdx.u8", 0x100000, 0xb0088d8f, 1 | BRF_PRG | BRF_ESS }, // 1
2477
2478 { "gp4-100-00.u24", 0x200000, 0x1df61f01, 2 | BRF_GRA }, // 2 gfx1
2479 { "gp4-101-00.u20", 0x100000, 0x8e2c9349, 2 | BRF_GRA }, // 3
2480
2481 { "gp4-200-00.u16", 0x200000, 0xf0781376, 3 | BRF_GRA }, // 4 gfx2
2482 { "gp4-201-00.u18", 0x200000, 0x10c4b183, 3 | BRF_GRA }, // 5
2483
2484 { "gp4-300-00.u4", 0x200000, 0x8374663a, 5 | BRF_SND }, // 6 ymz
2485 { "gp4-301-01.u7", 0x200000, 0x886ef77f, 5 | BRF_SND }, // 7
2486 };
2487
STDROMPICKEXT(galpanidx,galpanidx,skns)2488 STDROMPICKEXT(galpanidx, galpanidx, skns)
2489 STD_ROM_FN(galpanidx)
2490
2491 static INT32 GalpanidxInit()
2492 {
2493 sprite_kludge_x = -5;
2494 sprite_kludge_y = -1;
2495
2496 return DrvInit(2 /*Asia*/);
2497 }
2498
2499 struct BurnDriver BurnDrvGalpanidx = {
2500 "galpanidx", "galpani4", "skns", NULL, "2001",
2501 "Gals Panic DX (Asia)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2502 NULL, NULL, NULL, NULL,
2503 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2504 NULL, galpanidxRomInfo, galpanidxRomName, NULL, NULL, NULL, NULL, CyvernInputInfo, CyvernNoSpeedhackDIPInfo,
2505 GalpanidxInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2506 320, 240, 4, 3
2507 };
2508
2509
2510 // Gals Panic S - Extra Edition (Europe, revision 1)
2511
2512 static struct BurnRomInfo galpanisRomDesc[] = {
2513 { "gps-000-e1.u10", 0x100000, 0xb9ea3c44, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2514 { "gps-001-e1.u8", 0x100000, 0xded57bd0, 1 | BRF_PRG | BRF_ESS }, // 1
2515
2516 { "gps-100-00.u24", 0x400000, 0xa1a7acf2, 2 | BRF_GRA }, // 2 Sprites
2517 { "gps-101-00.u20", 0x400000, 0x49f764b6, 2 | BRF_GRA }, // 3
2518 { "gps-102-00.u17", 0x400000, 0x51980272, 2 | BRF_GRA }, // 4
2519
2520 { "gps-200-00.u16", 0x400000, 0xc146a09e, 3 | BRF_GRA }, // 5 Background Tiles
2521 { "gps-201-00.u13", 0x400000, 0x9dfa2dc6, 3 | BRF_GRA }, // 6
2522
2523 { "gps-300-00.u4", 0x400000, 0x9e4da8e3, 5 | BRF_SND }, // 7 YMZ280b Samples
2524 };
2525
STDROMPICKEXT(galpanis,galpanis,skns)2526 STDROMPICKEXT(galpanis, galpanis, skns)
2527 STD_ROM_FN(galpanis)
2528
2529 static INT32 GalpanisInit()
2530 {
2531 sprite_kludge_x = -5;
2532 sprite_kludge_y = -1;
2533
2534 return DrvInit(1 /*Europe*/);
2535 }
2536
2537 struct BurnDriver BurnDrvGalpanis = {
2538 "galpanis", NULL, "skns", NULL, "1997",
2539 "Gals Panic S - Extra Edition (Europe, revision 1)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2540 NULL, NULL, NULL, NULL,
2541 BDF_GAME_WORKING | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2542 NULL, galpanisRomInfo, galpanisRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsNoSpeedhackDIPInfo,
2543 GalpanisInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2544 320, 240, 4, 3
2545 };
2546
2547
2548 // Gals Panic S - Extra Edition (Europe, set 2)
2549
2550 static struct BurnRomInfo galpaniseRomDesc[] = {
2551 { "u10", 0x100000, 0xe78e1623, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2552 { "u8", 0x100000, 0x098eff7c, 1 | BRF_PRG | BRF_ESS }, // 1
2553
2554 { "gps-100-00.u24", 0x400000, 0xa1a7acf2, 2 | BRF_GRA }, // 2 Sprites
2555 { "gps-101-00.u20", 0x400000, 0x49f764b6, 2 | BRF_GRA }, // 3
2556 { "gps-102-00.u17", 0x400000, 0x51980272, 2 | BRF_GRA }, // 4
2557
2558 { "gps-200-00.u16", 0x400000, 0xc146a09e, 3 | BRF_GRA }, // 5 Background Tiles
2559 { "gps-201-00.u13", 0x400000, 0x9dfa2dc6, 3 | BRF_GRA }, // 6
2560
2561 { "gps-300-00.u4", 0x400000, 0x9e4da8e3, 5 | BRF_SND }, // 7 YMZ280b Samples
2562 };
2563
2564 STDROMPICKEXT(galpanise, galpanise, skns)
2565 STD_ROM_FN(galpanise)
2566
2567 struct BurnDriver BurnDrvGalpanise = {
2568 "galpanise", "galpanis", "skns", NULL, "1997",
2569 "Gals Panic S - Extra Edition (Europe, set 2)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2570 NULL, NULL, NULL, NULL,
2571 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2572 NULL, galpaniseRomInfo, galpaniseRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsNoSpeedhackDIPInfo,
2573 GalpanisInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2574 320, 240, 4, 3
2575 };
2576
2577
2578 // Gals Panic S - Extra Edition (Japan, revision 1)
2579
2580 static struct BurnRomInfo galpanisjRomDesc[] = {
2581 { "gps-000-j1.u10", 0x100000, 0xc6938c3f, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2582 { "gps-001-j1.u8", 0x100000, 0xe764177a, 1 | BRF_PRG | BRF_ESS }, // 1
2583
2584 { "gps-100-00.u24", 0x400000, 0xa1a7acf2, 2 | BRF_GRA }, // 2 Sprites
2585 { "gps-101-00.u20", 0x400000, 0x49f764b6, 2 | BRF_GRA }, // 3
2586 { "gps-102-00.u17", 0x400000, 0x51980272, 2 | BRF_GRA }, // 4
2587
2588 { "gps-200-00.u16", 0x400000, 0xc146a09e, 3 | BRF_GRA }, // 5 Background Tiles
2589 { "gps-201-00.u13", 0x400000, 0x9dfa2dc6, 3 | BRF_GRA }, // 6
2590
2591 { "gps-300-00.u4", 0x400000, 0x9e4da8e3, 5 | BRF_SND }, // 7 YMZ280b Samples
2592 };
2593
STDROMPICKEXT(galpanisj,galpanisj,skns)2594 STDROMPICKEXT(galpanisj, galpanisj, skns)
2595 STD_ROM_FN(galpanisj)
2596
2597 static INT32 GalpanisjInit()
2598 {
2599 sprite_kludge_x = -5;
2600 sprite_kludge_y = -1;
2601
2602 return DrvInit(0 /*Japan*/);
2603 }
2604
2605 struct BurnDriver BurnDrvGalpanisj = {
2606 "galpanisj", "galpanis", "skns", NULL, "1997",
2607 "Gals Panic S - Extra Edition (Japan, revision 1)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2608 NULL, NULL, NULL, NULL,
2609 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2610 NULL, galpanisjRomInfo, galpanisjRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsNoSpeedhackDIPInfo,
2611 GalpanisjInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2612 320, 240, 4, 3
2613 };
2614
2615
2616 // Gals Panic S - Extra Edition (Asia)
2617
2618 static struct BurnRomInfo galpanisaRomDesc[] = {
2619 { "gps-000-a0_9abc.u10", 0x100000, 0x4e24b799, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2620 { "gps-001-a0_bd64.u8", 0x100000, 0xaa4db8af, 1 | BRF_PRG | BRF_ESS }, // 1
2621
2622 { "gps-100-00.u24", 0x400000, 0xa1a7acf2, 2 | BRF_GRA }, // 2 Sprites
2623 { "gps-101-00.u20", 0x400000, 0x49f764b6, 2 | BRF_GRA }, // 3
2624 { "gps-102-00.u17", 0x400000, 0x51980272, 2 | BRF_GRA }, // 4
2625
2626 { "gps-200-00.u16", 0x400000, 0xc146a09e, 3 | BRF_GRA }, // 5 Background Tiles
2627 { "gps-201-00.u13", 0x400000, 0x9dfa2dc6, 3 | BRF_GRA }, // 6
2628
2629 { "gps-300-00.u4", 0x400000, 0x9e4da8e3, 5 | BRF_SND }, // 7 YMZ280b Samples
2630 };
2631
STDROMPICKEXT(galpanisa,galpanisa,skns)2632 STDROMPICKEXT(galpanisa, galpanisa, skns)
2633 STD_ROM_FN(galpanisa)
2634
2635 static INT32 GalpanisaInit()
2636 {
2637 sprite_kludge_x = -5;
2638 sprite_kludge_y = -1;
2639
2640 return DrvInit(2 /*Asia*/);
2641 }
2642
2643 struct BurnDriver BurnDrvGalpanisa = {
2644 "galpanisa", "galpanis", "skns", NULL, "1997",
2645 "Gals Panic S - Extra Edition (Asia)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2646 NULL, NULL, NULL, NULL,
2647 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2648 NULL, galpanisaRomInfo, galpanisaRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsNoSpeedhackDIPInfo,
2649 GalpanisaInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2650 320, 240, 4, 3
2651 };
2652
2653
2654 // Gals Panic S - Extra Edition (Korea, revision 1)
2655
2656 static struct BurnRomInfo galpaniskRomDesc[] = {
2657 { "gps-000-k1.u10", 0x100000, 0xc9ff3d8a, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2658 { "gps-001-k1.u8", 0x100000, 0x354e601d, 1 | BRF_PRG | BRF_ESS }, // 1
2659
2660 { "gps-100-00.u24", 0x400000, 0xa1a7acf2, 2 | BRF_GRA }, // 2 Sprites
2661 { "gps-101-00.u20", 0x400000, 0x49f764b6, 2 | BRF_GRA }, // 3
2662 { "gps-102-00.u17", 0x400000, 0x51980272, 2 | BRF_GRA }, // 4
2663
2664 { "gps-200-00.u16", 0x400000, 0xc146a09e, 3 | BRF_GRA }, // 5 Background Tiles
2665 { "gps-201-00.u13", 0x400000, 0x9dfa2dc6, 3 | BRF_GRA }, // 6
2666
2667 { "gps-300-00.u4", 0x400000, 0x9e4da8e3, 5 | BRF_SND }, // 7 YMZ280b Samples
2668 };
2669
STDROMPICKEXT(galpanisk,galpanisk,skns)2670 STDROMPICKEXT(galpanisk, galpanisk, skns)
2671 STD_ROM_FN(galpanisk)
2672
2673 static INT32 GalpaniskInit()
2674 {
2675 sprite_kludge_x = -5;
2676 sprite_kludge_y = -1;
2677
2678 return DrvInit(4 /*Korea*/);
2679 }
2680
2681 struct BurnDriver BurnDrvGalpanisk = {
2682 "galpanisk", "galpanis", "skns", NULL, "1997",
2683 "Gals Panic S - Extra Edition (Korea, revision 1)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2684 NULL, NULL, NULL, NULL,
2685 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2686 NULL, galpaniskRomInfo, galpaniskRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsNoSpeedhackDIPInfo,
2687 GalpaniskInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2688 320, 240, 4, 3
2689 };
2690
2691
2692 // Gals Panic S - Extra Edition (Korea)
2693
2694 static struct BurnRomInfo galpaniskaRomDesc[] = {
2695 { "gps-000-k0.u10", 0x100000, 0xbe74128c, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2696 { "gps-001-k0.u8", 0x100000, 0x701f793d, 1 | BRF_PRG | BRF_ESS }, // 1
2697
2698 { "gps-100-00.u24", 0x400000, 0xa1a7acf2, 2 | BRF_GRA }, // 2 Sprites
2699 { "gps-101-00.u20", 0x400000, 0x49f764b6, 2 | BRF_GRA }, // 3
2700 { "gps-102-00.u17", 0x400000, 0x51980272, 2 | BRF_GRA }, // 4
2701
2702 { "gps-200-00.u16", 0x400000, 0xc146a09e, 3 | BRF_GRA }, // 5 Background Tiles
2703 { "gps-201-00.u13", 0x400000, 0x9dfa2dc6, 3 | BRF_GRA }, // 6
2704
2705 { "gps-300-00.u4", 0x400000, 0x9e4da8e3, 5 | BRF_SND }, // 7 YMZ280b Samples
2706 };
2707
2708 STDROMPICKEXT(galpaniska, galpaniska, skns)
2709 STD_ROM_FN(galpaniska)
2710
2711 struct BurnDriver BurnDrvGalpaniska = {
2712 "galpaniska", "galpanis", "skns", NULL, "1997",
2713 "Gals Panic S - Extra Edition (Korea)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2714 NULL, NULL, NULL, NULL,
2715 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2716 NULL, galpaniskaRomInfo, galpaniskaRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsNoSpeedhackDIPInfo,
2717 GalpaniskInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2718 320, 240, 4, 3
2719 };
2720
2721
2722 // Gals Panic S2 (Europe)
2723 // only the 2 program ROMs were dumped, but mask ROMs are supposed to match.
2724
2725 static struct BurnRomInfo galpans2RomDesc[] = {
2726 { "gps2e_u6__ver.3.u6", 0x100000, 0x72fff5d1, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2727 { "gps2e_u4__ver.3.u4", 0x100000, 0x95061601, 1 | BRF_PRG | BRF_ESS }, // 1
2728
2729 { "gs210000.u21", 0x400000, 0x294b2f14, 2 | BRF_GRA }, // 2 Sprites
2730 { "gs210100.u20", 0x400000, 0xf75c5a9a, 2 | BRF_GRA }, // 3
2731 { "gs210200.u8", 0x400000, 0x25b4f56b, 2 | BRF_GRA }, // 4
2732 { "gs210300.u32", 0x400000, 0xdb6d4424, 2 | BRF_GRA }, // 5
2733
2734 { "gs220000.u17", 0x400000, 0x5caae1c0, 3 | BRF_GRA }, // 6 Background Tiles
2735 { "gs220100.u9", 0x400000, 0x8d51f197, 3 | BRF_GRA }, // 7
2736
2737 { "gs221000.u3", 0x400000, 0x58800a18, 4 | BRF_GRA }, // 8 Foreground Tiles
2738
2739 { "gs230000.u1", 0x400000, 0x0348e8e1, 5 | BRF_SND }, // 9 YMZ280b Samples
2740 };
2741
STDROMPICKEXT(galpans2,galpans2,skns)2742 STDROMPICKEXT(galpans2, galpans2, skns)
2743 STD_ROM_FN(galpans2)
2744
2745 static INT32 Galpans2Init()
2746 {
2747 sprite_kludge_x = -1;
2748 sprite_kludge_y = -1;
2749
2750 speedhack_address = 0x60fb6bc;
2751 speedhack_pc[0] = 0x4049ae2 + 2;
2752
2753 return DrvInit(1 /*Europe*/);
2754 }
2755
2756 struct BurnDriver BurnDrvGalpans2 = {
2757 "galpans2", NULL, "skns", NULL, "1999",
2758 "Gals Panic S2 (Europe)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2759 NULL, NULL, NULL, NULL,
2760 BDF_GAME_WORKING | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2761 NULL, galpans2RomInfo, galpans2RomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //GalpanisInputInfo, GalpanisDIPInfo,
2762 Galpans2Init, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2763 320, 240, 4, 3
2764 };
2765
2766
2767 // Gals Panic S2 (Japan)
2768
2769 static struct BurnRomInfo galpans2jRomDesc[] = {
2770 { "gps2j.u6", 0x100000, 0x6e74005b, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2771 { "gps2j.u4", 0x100000, 0x9b4b2304, 1 | BRF_PRG | BRF_ESS }, // 1
2772
2773 { "gs210000.u21", 0x400000, 0x294b2f14, 2 | BRF_GRA }, // 2 Sprites
2774 { "gs210100.u20", 0x400000, 0xf75c5a9a, 2 | BRF_GRA }, // 3
2775 { "gs210200.u8", 0x400000, 0x25b4f56b, 2 | BRF_GRA }, // 4
2776 { "gs210300.u32", 0x400000, 0xdb6d4424, 2 | BRF_GRA }, // 5
2777
2778 { "gs220000.u17", 0x400000, 0x5caae1c0, 3 | BRF_GRA }, // 6 Background Tiles
2779 { "gs220100.u9", 0x400000, 0x8d51f197, 3 | BRF_GRA }, // 7
2780
2781 { "gs221000.u3", 0x400000, 0x58800a18, 4 | BRF_GRA }, // 8 Foreground Tiles
2782
2783 { "gs230000.u1", 0x400000, 0x0348e8e1, 5 | BRF_SND }, // 9 YMZ280b Samples
2784 };
2785
STDROMPICKEXT(galpans2j,galpans2j,skns)2786 STDROMPICKEXT(galpans2j, galpans2j, skns)
2787 STD_ROM_FN(galpans2j)
2788
2789 static INT32 Galpans2jInit()
2790 {
2791 sprite_kludge_x = -1;
2792 sprite_kludge_y = -1;
2793
2794 speedhack_address = 0x60fb6bc;
2795 speedhack_pc[0] = 0x4049ae2 + 2;
2796
2797 return DrvInit(0 /*Japan*/);
2798 }
2799
2800 struct BurnDriver BurnDrvGalpans2j = {
2801 "galpans2j", "galpans2", "skns", NULL, "1999",
2802 "Gals Panic S2 (Japan)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2803 NULL, NULL, NULL, NULL,
2804 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2805 NULL, galpans2jRomInfo, galpans2jRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //GalpanisInputInfo, GalpanisDIPInfo,
2806 Galpans2jInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2807 320, 240, 4, 3
2808 };
2809
2810
2811 // Gals Panic S2 (Asia)
2812
2813 static struct BurnRomInfo galpans2aRomDesc[] = {
2814 { "gps2av11.u6", 0x100000, 0x61c05d5f, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2815 { "gps2av11.u4", 0x100000, 0x2e8c0ac2, 1 | BRF_PRG | BRF_ESS }, // 1
2816
2817 { "gs210000.u21", 0x400000, 0x294b2f14, 2 | BRF_GRA }, // 2 Sprites
2818 { "gs210100.u20", 0x400000, 0xf75c5a9a, 2 | BRF_GRA }, // 3
2819 { "gs210200.u8", 0x400000, 0x25b4f56b, 2 | BRF_GRA }, // 4
2820 { "gs210300.u32", 0x400000, 0xdb6d4424, 2 | BRF_GRA }, // 5
2821
2822 { "gs220000.u17", 0x400000, 0x5caae1c0, 3 | BRF_GRA }, // 6 Background Tiles
2823 { "gs220100.u9", 0x400000, 0x8d51f197, 3 | BRF_GRA }, // 7
2824
2825 { "gs221000.u3", 0x400000, 0x58800a18, 4 | BRF_GRA }, // 8 Foreground Tiles
2826
2827 { "gs230000.u1", 0x400000, 0x0348e8e1, 5 | BRF_SND }, // 9 YMZ280b Samples
2828 };
2829
STDROMPICKEXT(galpans2a,galpans2a,skns)2830 STDROMPICKEXT(galpans2a, galpans2a, skns)
2831 STD_ROM_FN(galpans2a)
2832
2833 static INT32 Galpans2aInit()
2834 {
2835 sprite_kludge_x = -1;
2836 sprite_kludge_y = -1;
2837
2838 speedhack_address = 0x60fb6bc;
2839 speedhack_pc[0] = 0x4049ae2 + 2;
2840
2841 return DrvInit(2 /*Asia*/);
2842 }
2843
2844 struct BurnDriver BurnDrvGalpans2a = {
2845 "galpans2a", "galpans2", "skns", NULL, "1999",
2846 "Gals Panic S2 (Asia)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2847 NULL, NULL, NULL, NULL,
2848 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2849 NULL, galpans2aRomInfo, galpans2aRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //GalpanisInputInfo, GalpanisDIPInfo,
2850 Galpans2aInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2851 320, 240, 4, 3
2852 };
2853
2854
2855 // Gals Panic SU (Korea)
2856
2857 static struct BurnRomInfo galpansuRomDesc[] = {
2858 { "su.u10", 0x100000, 0x5ae66218, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2859 { "su.u8", 0x100000, 0x10977a03, 1 | BRF_PRG | BRF_ESS }, // 1
2860
2861 { "24", 0x400000, 0x294b2f14, 2 | BRF_GRA }, // 2 Sprites
2862 { "20", 0x400000, 0xf75c5a9a, 2 | BRF_GRA }, // 3
2863 { "17", 0x400000, 0x25b4f56b, 2 | BRF_GRA }, // 4
2864 { "32", 0x400000, 0xdb6d4424, 2 | BRF_GRA }, // 5
2865
2866 { "16", 0x400000, 0x5caae1c0, 3 | BRF_GRA }, // 6 Background Tiles
2867 { "13", 0x400000, 0x8d51f197, 3 | BRF_GRA }, // 7
2868
2869 { "7", 0x400000, 0x58800a18, 4 | BRF_GRA }, // 8 Foreground Tiles
2870
2871 { "4", 0x400000, 0x0348e8e1, 5 | BRF_SND }, // 9 YMZ280b Samples
2872
2873 #if !defined (ROM_VERIFY)
2874 { "bios.u10", 0x80000, 0x161fb79e, BRF_BIOS | BRF_OPT}, // 10 Korea Bios
2875 #endif
2876 };
2877
STDROMPICKEXT(galpansu,galpansu,skns)2878 STDROMPICKEXT(galpansu, galpansu, skns)
2879 STD_ROM_FN(galpansu)
2880
2881 static INT32 GalpansuInit()
2882 {
2883 sprite_kludge_x = -1;
2884 sprite_kludge_y = -1;
2885
2886 speedhack_address = 0x60fb6bc;
2887 speedhack_pc[0] = 0x4049ae2 + 2;
2888
2889 return DrvInit(4 /*Korea*/);
2890 }
2891
2892 struct BurnDriver BurnDrvGalpansu = {
2893 "galpansu", "galpans2", "skns", NULL, "1999",
2894 "Gals Panic SU (Korea)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2895 NULL, NULL, NULL, NULL,
2896 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2897 NULL, galpansuRomInfo, galpansuRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //GalpanisInputInfo, GalpanisDIPInfo,
2898 GalpansuInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2899 320, 240, 4, 3
2900 };
2901
2902
2903 // Gals Panic S3 (Japan)
2904
2905 static struct BurnRomInfo galpans3RomDesc[] = {
2906 { "gpss3.u10", 0x100000, 0xc1449a72, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2907 { "gpss3.u8", 0x100000, 0x11eb44cf, 1 | BRF_PRG | BRF_ESS }, // 1
2908
2909 { "u24.bin", 0x800000, 0x70613168, 2 | BRF_GRA }, // 2 Sprites
2910
2911 { "u16.bin", 0x800000, 0xa96daf2a, 3 | BRF_GRA }, // 3 Background Tiles
2912
2913 { "u4.bin", 0x400000, 0xbf5736c6, 5 | BRF_SND }, // 4 YMZ280b Samples
2914 };
2915
STDROMPICKEXT(galpans3,galpans3,skns)2916 STDROMPICKEXT(galpans3, galpans3, skns)
2917 STD_ROM_FN(galpans3)
2918
2919 static INT32 Galpans3Init()
2920 {
2921 sprite_kludge_x = -1;
2922 sprite_kludge_y = -1;
2923
2924 return DrvInit(0 /*Japan*/);
2925 }
2926
2927 struct BurnDriver BurnDrvGalpans3 = {
2928 "galpans3", NULL, "skns", NULL, "2002",
2929 "Gals Panic S3 (Japan)\0", NULL, "Kaneko", "Super Kaneko Nova System",
2930 NULL, NULL, NULL, NULL,
2931 BDF_GAME_WORKING | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
2932 NULL, galpans3RomInfo, galpans3RomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //GalpanisInputInfo, GalpanisDIPInfo,
2933 Galpans3Init, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2934 320, 240, 4, 3
2935 };
2936
2937
2938 // Jan Jan Paradise
2939
2940 static struct BurnRomInfo jjparadsRomDesc[] = {
2941 { "jp1j1.u10", 0x080000, 0xde2fb669, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2942 { "jp1j1.u8", 0x080000, 0x7276efb1, 1 | BRF_PRG | BRF_ESS }, // 1
2943
2944 { "jp100-00.u24", 0x400000, 0xf31b2e95, 2 | BRF_GRA }, // 2 Sprites
2945 { "jp101-00.u20", 0x400000, 0x70cc8c24, 2 | BRF_GRA }, // 3
2946 { "jp102-00.u17", 0x400000, 0x35401c1e, 2 | BRF_GRA }, // 4
2947
2948 { "jp200-00.u16", 0x200000, 0x493d63db, 3 | BRF_GRA }, // 5 Background Tiles
2949
2950 { "jp300-00.u4", 0x200000, 0x7023fe46, 5 | BRF_SND }, // 6 YMZ280b Samples
2951 };
2952
STDROMPICKEXT(jjparads,jjparads,skns)2953 STDROMPICKEXT(jjparads, jjparads, skns)
2954 STD_ROM_FN(jjparads)
2955
2956 static INT32 JjparadsInit()
2957 {
2958 sprite_kludge_x = 5;
2959 sprite_kludge_y = 1;
2960
2961 // speedhack_address = 0x6000994;
2962 // speedhack_pc[0] = 0x4015e84 + 2;
2963
2964 return DrvInit(0 /*Japan*/);
2965 }
2966
2967 struct BurnDriver BurnDrvJjparads = {
2968 "jjparads", NULL, "skns", NULL, "1996",
2969 "Jan Jan Paradise\0", NULL, "Electro Design", "Super Kaneko Nova System",
2970 NULL, NULL, NULL, NULL,
2971 BDF_GAME_WORKING, 2, HARDWARE_KANEKO_SKNS, GBF_MAHJONG, 0,
2972 NULL, jjparadsRomInfo, jjparadsRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //Skns_1pInputInfo, Skns_1pDIPInfo,
2973 JjparadsInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
2974 320, 240, 4, 3
2975 };
2976
2977
2978 // Jan Jan Paradise 2
2979
2980 static struct BurnRomInfo jjparad2RomDesc[] = {
2981 { "jp2000j1.u6", 0x080000, 0x5d75e765, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
2982 { "jp2001j1.u4", 0x080000, 0x1771910a, 1 | BRF_PRG | BRF_ESS }, // 1
2983
2984 { "jp210000.u21", 0x400000, 0x79a7e3d7, 2 | BRF_GRA }, // 2 Sprites
2985 { "jp210100.u20", 0x400000, 0x42415e0c, 2 | BRF_GRA }, // 3
2986 { "jp210200.u8", 0x400000, 0x26731745, 2 | BRF_GRA }, // 4
2987
2988 { "jp220000.u17", 0x400000, 0xd0e71873, 3 | BRF_GRA }, // 5 Background Tiles
2989 { "jp220100.u9", 0x400000, 0x4c7d964d, 3 | BRF_GRA }, // 6
2990
2991 { "jp230000.u1", 0x400000, 0x73e30d7f, 5 | BRF_SND }, // 7 YMZ280b Samples
2992 };
2993
STDROMPICKEXT(jjparad2,jjparad2,skns)2994 STDROMPICKEXT(jjparad2, jjparad2, skns)
2995 STD_ROM_FN(jjparad2)
2996
2997 static INT32 Jjparad2Init()
2998 {
2999 sprite_kludge_x = 5;
3000 sprite_kludge_y = 1;
3001
3002 // speedhack_address = 0x6000994;
3003 // speedhack_pc[0] = 0x401620a + 2;
3004
3005 return DrvInit(0 /*Japan*/);
3006 }
3007
3008 struct BurnDriver BurnDrvJjparad2 = {
3009 "jjparad2", NULL, "skns", NULL, "1997",
3010 "Jan Jan Paradise 2\0", NULL, "Electro Design", "Super Kaneko Nova System",
3011 NULL, NULL, NULL, NULL,
3012 BDF_GAME_WORKING, 2, HARDWARE_KANEKO_SKNS, GBF_MAHJONG, 0,
3013 NULL, jjparad2RomInfo, jjparad2RomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //Skns_1pInputInfo, Skns_1pDIPInfo,
3014 Jjparad2Init, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
3015 320, 240, 4, 3
3016 };
3017
3018
3019 // Sen-Know (Japan)
3020
3021 static struct BurnRomInfo senknowRomDesc[] = {
3022 { "snw000j1.u6", 0x080000, 0x0d6136f6, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
3023 { "snw001j1.u4", 0x080000, 0x4a10ec3d, 1 | BRF_PRG | BRF_ESS }, // 1
3024
3025 { "snw10000.u21", 0x400000, 0x5133c69c, 2 | BRF_GRA }, // 2 Sprites
3026 { "snw10100.u20", 0x400000, 0x9dafe03f, 2 | BRF_GRA }, // 3
3027
3028 { "snw20000.u17", 0x400000, 0xd5fe5f8c, 3 | BRF_GRA }, // 4 Background Tiles
3029 { "snw20100.u9", 0x400000, 0xc0037846, 3 | BRF_GRA }, // 5
3030
3031 { "snw21000.u3", 0x400000, 0xf5c23e79, 4 | BRF_GRA }, // 6 Foreground Tiles
3032
3033 { "snw30000.u1", 0x400000, 0xec9eef40, 5 | BRF_SND }, // 7 YMZ280b Samples
3034 };
3035
STDROMPICKEXT(senknow,senknow,skns)3036 STDROMPICKEXT(senknow, senknow, skns)
3037 STD_ROM_FN(senknow)
3038
3039 static INT32 SenknowInit()
3040 {
3041 sprite_kludge_x = 1;
3042 sprite_kludge_y = 1;
3043
3044 speedhack_address = 0x60000dc;
3045 speedhack_pc[0] = 0x4017dce + 2;
3046
3047 return DrvInit(0 /*Japan*/);
3048 }
3049
3050 struct BurnDriver BurnDrvSenknow = {
3051 "senknow", NULL, "skns", NULL, "1999",
3052 "Sen-Know (Japan)\0", NULL, "Kaneko / Kouyousha", "Super Kaneko Nova System",
3053 NULL, NULL, NULL, NULL,
3054 BDF_GAME_WORKING | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_PUZZLE, 0,
3055 NULL, senknowRomInfo, senknowRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //SknsInputInfo, SknsDIPInfo,
3056 SenknowInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
3057 320, 240, 4, 3
3058 };
3059
3060
3061 // VS Mahjong Otome Ryouran (revision 2)
3062
3063 static struct BurnRomInfo ryouranRomDesc[] = {
3064 { "or-000-j2.u10", 0x080000, 0xcba8ca4e, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
3065 { "or-001-j2.u8", 0x080000, 0x8e79c6b7, 1 | BRF_PRG | BRF_ESS }, // 1
3066
3067 { "or100-00.u24", 0x400000, 0xe9c7695b, 2 | BRF_GRA }, // 2 Sprites
3068 { "or101-00.u20", 0x400000, 0xfe06bf12, 2 | BRF_GRA }, // 3
3069 { "or102-00.u17", 0x400000, 0xf2a5237b, 2 | BRF_GRA }, // 4
3070
3071 { "or200-00.u16", 0x400000, 0x4c4701a8, 3 | BRF_GRA }, // 5 Background Tiles
3072 { "or201-00.u13", 0x400000, 0xa94064aa, 3 | BRF_GRA }, // 6
3073
3074 { "or300-00.u4", 0x400000, 0xa3f64b79, 5 | BRF_SND }, // 7 YMZ280b Samples
3075 };
3076
STDROMPICKEXT(ryouran,ryouran,skns)3077 STDROMPICKEXT(ryouran, ryouran, skns)
3078 STD_ROM_FN(ryouran)
3079
3080 static INT32 RyouranInit()
3081 {
3082 sprite_kludge_x = 5;
3083 sprite_kludge_y = 1;
3084
3085 speedhack_address = 0x6000a14;
3086 speedhack_pc[0] = 0x40182ce + 2;
3087
3088 return DrvInit(0 /*Japan*/);
3089 }
3090
3091 struct BurnDriver BurnDrvRyouran = {
3092 "ryouran", NULL, "skns", NULL, "1998",
3093 "VS Mahjong Otome Ryouran (revision 2)\0", NULL, "Electro Design", "Super Kaneko Nova System",
3094 NULL, NULL, NULL, NULL,
3095 BDF_GAME_WORKING, 2, HARDWARE_KANEKO_SKNS, GBF_MAHJONG, 0,
3096 NULL, ryouranRomInfo, ryouranRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //Skns_1pInputInfo, Skns_1pDIPInfo,
3097 RyouranInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
3098 320, 240, 4, 3
3099 };
3100
3101
3102 // VS Mahjong Otome Ryouran (revision 1)
3103
3104 static struct BurnRomInfo ryouranoRomDesc[] = {
3105 { "or000j1.u10", 0x080000, 0xd93aa491, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
3106 { "or001j1.u8", 0x080000, 0xf466e5e9, 1 | BRF_PRG | BRF_ESS }, // 1
3107
3108 { "or100-00.u24", 0x400000, 0xe9c7695b, 2 | BRF_GRA }, // 2 Sprites
3109 { "or101-00.u20", 0x400000, 0xfe06bf12, 2 | BRF_GRA }, // 3
3110 { "or102-00.u17", 0x400000, 0xf2a5237b, 2 | BRF_GRA }, // 4
3111
3112 { "or200-00.u16", 0x400000, 0x4c4701a8, 3 | BRF_GRA }, // 5 Background Tiles
3113 { "or201-00.u13", 0x400000, 0xa94064aa, 3 | BRF_GRA }, // 6
3114
3115 { "or300-00.u4", 0x400000, 0xa3f64b79, 5 | BRF_SND }, // 7 YMZ280b Samples
3116 };
3117
3118 STDROMPICKEXT(ryourano, ryourano, skns)
3119 STD_ROM_FN(ryourano)
3120
3121 struct BurnDriver BurnDrvRyourano = {
3122 "ryourano", "ryouran", "skns", NULL, "1998",
3123 "VS Mahjong Otome Ryouran (revision 1)\0", NULL, "Electro Design", "Super Kaneko Nova System",
3124 NULL, NULL, NULL, NULL,
3125 BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_KANEKO_SKNS, GBF_MAHJONG, 0,
3126 NULL, ryouranoRomInfo, ryouranoRomName, NULL, NULL, NULL, NULL, SknsInputInfo, SknsDIPInfo, //Skns_1pInputInfo, Skns_1pDIPInfo,
3127 RyouranInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
3128 320, 240, 4, 3
3129 };
3130
3131 // VS Block Breaker (Europe)
3132
3133 static struct BurnRomInfo vblokbrkRomDesc[] = {
3134 { "sk000e2-e.u10", 0x080000, 0x5a278f10, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
3135 { "sk000e-o.u8", 0x080000, 0xaecf0647, 1 | BRF_PRG | BRF_ESS }, // 1
3136
3137 { "sk-100-00.u24", 0x200000, 0x151dd88a, 2 | BRF_GRA }, // 2 Sprites
3138 { "sk-101.u20", 0x100000, 0x779cce23, 2 | BRF_GRA }, // 3
3139
3140 { "sk-200-00.u16", 0x200000, 0x2e297c61, 3 | BRF_GRA }, // 4 Background Tiles
3141
3142 { "sk-300-00.u4", 0x200000, 0xe6535c05, 5 | BRF_SND }, // 5 YMZ280b Samples
3143 };
3144
STDROMPICKEXT(vblokbrk,vblokbrk,skns)3145 STDROMPICKEXT(vblokbrk, vblokbrk, skns)
3146 STD_ROM_FN(vblokbrk)
3147
3148 static INT32 VblokbrkInit()
3149 {
3150 sprite_kludge_x = -1;
3151 sprite_kludge_y = -1;
3152 suprnova_alt_enable_background = 1;
3153 Vblokbrk = 1;
3154 sixtyhz = 1;
3155
3156 return DrvInit(1 /*Europe*/);
3157 }
3158
3159 struct BurnDriver BurnDrvVblokbrk = {
3160 "vblokbrk", NULL, "skns", NULL, "1997",
3161 "VS Block Breaker (Europe)\0", NULL, "Kaneko / Mediaworks", "Super Kaneko Nova System",
3162 NULL, NULL, NULL, NULL,
3163 BDF_GAME_WORKING | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_BREAKOUT, 0,
3164 NULL, vblokbrkRomInfo, vblokbrkRomName, NULL, NULL, NULL, NULL, VblokbrkInputInfo, VblokbrkDIPInfo,
3165 VblokbrkInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
3166 320, 240, 4, 3
3167 };
3168
3169
3170 // VS Block Breaker (Asia)
3171
3172 static struct BurnRomInfo vblokbrkaRomDesc[] = {
3173 { "sk01a.u10", 0x080000, 0x4d1be53e, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
3174 { "sk01a.u8", 0x080000, 0x461e0197, 1 | BRF_PRG | BRF_ESS }, // 1
3175
3176 { "sk-100-00.u24", 0x200000, 0x151dd88a, 2 | BRF_GRA }, // 2 Sprites
3177 { "sk-101.u20", 0x100000, 0x779cce23, 2 | BRF_GRA }, // 3
3178
3179 { "sk-200-00.u16", 0x200000, 0x2e297c61, 3 | BRF_GRA }, // 4 Background Tiles
3180
3181 { "sk-300-00.u4", 0x200000, 0xe6535c05, 5 | BRF_SND }, // 5 YMZ280b Samples
3182 };
3183
STDROMPICKEXT(vblokbrka,vblokbrka,skns)3184 STDROMPICKEXT(vblokbrka, vblokbrka, skns)
3185 STD_ROM_FN(vblokbrka)
3186
3187 static INT32 VblokbrkaInit()
3188 {
3189 sprite_kludge_x = -1;
3190 sprite_kludge_y = -1;
3191 suprnova_alt_enable_background = 1;
3192 Vblokbrk = 1;
3193 sixtyhz = 1;
3194
3195 return DrvInit(2 /*Asia*/);
3196 }
3197
3198 struct BurnDriver BurnDrvVblokbrka = {
3199 "vblokbrka", "vblokbrk", "skns", NULL, "1997",
3200 "VS Block Breaker (Asia)\0", NULL, "Kaneko / Mediaworks", "Super Kaneko Nova System",
3201 NULL, NULL, NULL, NULL,
3202 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_BREAKOUT, 0,
3203 NULL, vblokbrkaRomInfo, vblokbrkaRomName, NULL, NULL, NULL, NULL, VblokbrkInputInfo, VblokbrkDIPInfo,
3204 VblokbrkaInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
3205 320, 240, 4, 3
3206 };
3207
3208
3209 // Saru-Kani-Hamu-Zou (Japan)
3210
3211 static struct BurnRomInfo sarukaniRomDesc[] = {
3212 { "sk1j1.u10", 0x080000, 0xfcc131b6, 1 | BRF_PRG | BRF_ESS }, // 0 SH2 Code
3213 { "sk1j1.u8", 0x080000, 0x3b6aa343, 1 | BRF_PRG | BRF_ESS }, // 1
3214
3215 { "sk-100-00.u24", 0x200000, 0x151dd88a, 2 | BRF_GRA }, // 2 Sprites
3216 { "sk-101.u20", 0x100000, 0x779cce23, 2 | BRF_GRA }, // 3
3217
3218 { "sk-200-00.u16", 0x200000, 0x2e297c61, 3 | BRF_GRA }, // 4 Background Tiles
3219
3220 { "sk-300-00.u4", 0x200000, 0xe6535c05, 5 | BRF_SND }, // 5 YMZ280b Samples
3221 };
3222
STDROMPICKEXT(sarukani,sarukani,skns)3223 STDROMPICKEXT(sarukani, sarukani, skns)
3224 STD_ROM_FN(sarukani)
3225
3226 static INT32 SarukaniInit()
3227 {
3228 sprite_kludge_x = -1;
3229 sprite_kludge_y = -1;
3230 suprnova_alt_enable_background = 1;
3231 Vblokbrk = 1;
3232 sixtyhz = 1;
3233
3234 return DrvInit(0 /*Japan*/);
3235 }
3236
3237 struct BurnDriver BurnDrvSarukani = {
3238 "sarukani", "vblokbrk", "skns", NULL, "1997",
3239 "Saru-Kani-Hamu-Zou (Japan)\0", NULL, "Kaneko / Mediaworks", "Super Kaneko Nova System",
3240 NULL, NULL, NULL, NULL,
3241 BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_KANEKO_SKNS, GBF_BREAKOUT, 0,
3242 NULL, sarukaniRomInfo, sarukaniRomName, NULL, NULL, NULL, NULL, VblokbrkInputInfo, VblokbrkDIPInfo,
3243 SarukaniInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
3244 320, 240, 4, 3
3245 };
3246