summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/pasha2.cpp
blob: fdf88f2ac0ec929f95adeb8883d16d6410de8277 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
// license:BSD-3-Clause
// copyright-holders:Pierpaolo Prazzoli
/********************************************************************

Pasha Pasha 2
Dong Sung, 1998

3PLAY
|--------------------------------------------------|
|      DA1311    UM53   AD-65    DREAM  9.6MHz     |
|KA22065  TL062  UM51   AD-65          RESET_SW    |
|   VOL1   VOL2                  1MHz   TL7705     |
|                                                  |
|    DSW2(8)            20MHz    GM71C18163        |
|     93C46                                   UM2  |
|           PAL                                    |
|J                                                 |
|A                                                 |
|M                      E1-16XT             AT89C52|
|M                                                 |
|A                                  U102           |
|           6116                                   |
|           6116       U3           U101           |
|                                                  |
|                                                  |
|                                             12MHz|
|                    A42MX16                       |
|    DSW1(8)                                       |
| UCN5801                                          |
| UCN5801                                          |
|         16MHz                                    |
|--------------------------------------------------|
Notes:
      U3         - 27C040 EPROM (DIP32)
      UM2/UM51/53- 29F040 EPROM (PLCC32)
      U101/102   - Each location contains a small adapter board plugged into a DIP42 socket. Each
                   adapter board holds 2x Intel E28F016S5 TSOP40 16M FlashROMs. On the PCB under the ROMs
                   it's marked '32MASK'. However, the adapter boards are not standard. If you try to read
                   the ROMs while they are _ON-THE-ADAPTER_ as a 32M DIP42 EPROM (such as 27C322), the
                   FlashROMs are damaged and the PCB no longer works :(
                   Thus, the FlashROMs must be removed and read separately!
                   The small adapter boards with their respective FlashROMs are laid out like this........

                   |------------------------------|
                   |                              |
                   |       U2           U1        |  U102
                   |                              |
                   |------------------------------|

                   |------------------------------|
                   |                              |
                   |       U2           U1        |  U101
                   |                              |
                   |------------------------------|

      A42MX16    - Actel A42MX16 FPGA (QFP160)
      AT89C52    - Atmel AT89C52 Microcontroller w/8k internal FlashROM, clock 12MHz (DIP40)
      E1-16XT    - Hyperstone E1-16XT CPU, clock 20MHz
      DREAM      - ATMEL DREAM SAM9773 Single Chip Synthesizer/MIDI with Effects and Serial Interface, clock 9.6MHz (TQFP80)
      AD-65      - Oki compatible M6295 sound chip, clock 1MHz
      5493R45    - ISSI 5493R45-001 128k x8 SRAM (SOJ32)
      GM71C18163 - Hynix 1M x16 DRAM (SOJ42)
      VSync      - 60Hz
      HSync      - 15.15kHz

 driver by Pierpaolo Prazzoli

 TODO:
 - eeprom - is it used?
 - irq2 - sound related? reads the 2 unmapped input registers.
 - irq3 - it only writes a 0 into memory and changes a register
 - pasha2: simulate music (DREAM chip)
 - zdrum: with DRC it fatal errors with 'Unimplemented: generate_adds (c00013ae)' if let in attract for a while or at the end of the 'Flash memory check' in test mode)
          with interpreter the game hangs itself with 'Assertion failed: file flash.dat'
 - zdrum: proper inputs (coin seems to freeze the game - gets stuck in a loop at c0001386, can be forced out of it with do PC=c0001392 and the coin gets credited) -
          right arrow not found yet, second left drum switch flickers on and off continuously in i/o test)
 - zdrum: when coined up via debugger and then started, the game itself reports an assert with DRC, gets to the select character screen and then hangs with the interpreter
 - zdrum: settings aren't kept after reset, possibly needs eeprom hook up
 - zdrum: dump hard disc and emulate MP3 board

*********************************************************************/

#include "emu.h"
#include "cpu/mcs51/mcs51.h"
#include "cpu/e132xs/e132xs.h"
#include "machine/eepromser.h"
#include "sound/okim6295.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"

#include "pasha2.lh"


class pasha2_state : public driver_device
{
public:
	pasha2_state(const machine_config &mconfig, device_type type, const char *tag)
		: driver_device(mconfig, type, tag)
		, m_wram(*this, "wram")
		, m_mainbank(*this, "mainbank")
		, m_lamps_r(*this, "lamp_p%u_r", 1U)
		, m_lamps_g(*this, "lamp_p%u_g", 1U)
		, m_lamps_b(*this, "lamp_p%u_b", 1U)
		, m_maincpu(*this, "maincpu")
		, m_oki(*this, "oki%u", 1U)
		, m_palette(*this, "palette")
	{ }

	void pasha2(machine_config &config);
	void zdrum(machine_config &config);

	void init_pasha2();

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

private:
	// memory pointers
	required_shared_ptr<u16> m_wram;

	required_memory_bank m_mainbank;

	// output finders
	output_finder<3> m_lamps_r;
	output_finder<3> m_lamps_g;
	output_finder<3> m_lamps_b;

	// devices
	required_device<cpu_device> m_maincpu;
	required_device_array<okim6295_device, 2> m_oki;
	required_device<palette_device> m_palette;

	// video-related
	u8 m_vbuffer = 0;
	bitmap_ind16 m_bg_bitmap[2];
	bitmap_ind16 m_fg_bitmap[2];

	// video functions
	void vbuffer_set_w(u16 data);
	void vbuffer_clear_w(u16 data);
	void bg_bitmap_w(offs_t offset, u8 data);
	void fg_bitmap_w(offs_t offset, u8 data);

	u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);

	// peripheral handlers
	template<int Chip> void oki_bank_w(offs_t offset, u16 data);
	void misc_w(offs_t offset, u16 data);
	void pasha2_lamps_w(u16 data);

	// speedup functions
	u16 pasha2_speedup_r(offs_t offset);

	// address maps
	void pasha2_io(address_map &map);
	void pasha2_map(address_map &map);
	void zdrum_audio_map(address_map &map);
};


void pasha2_state::misc_w(offs_t offset, u16 data)
{
	if (offset)
	{
		if (data & 0x0800)
		{
			const u16 bank = data & 0xf000;

			switch (bank)
			{
				case 0x8000:
				case 0x9000:
				case 0xa000:
				case 0xb000:
				case 0xc000:
				case 0xd000:
					m_mainbank->set_entry((bank>>12) & 7); break;
			}
		}
	}
}

void pasha2_state::vbuffer_set_w(u16 data)
{
	m_vbuffer = 1;
}

void pasha2_state::vbuffer_clear_w(u16 data)
{
	m_vbuffer = 0;
}

void pasha2_state::bg_bitmap_w(offs_t offset, u8 data)
{
	m_bg_bitmap[m_vbuffer].pix(offset >> 9, offset & 0x1ff) = (data & 0xff) | 0x100;
}

void pasha2_state::fg_bitmap_w(offs_t offset, u8 data)
{
	// handle overlapping pixels without writing them
	if ((data & 0xff) == 0xff)
		return;

	m_fg_bitmap[m_vbuffer].pix(offset >> 9, offset & 0x1ff) = data & 0xff;
}

template<int Chip>
void pasha2_state::oki_bank_w(offs_t offset, u16 data)
{
	if (offset)
		m_oki[Chip]->set_rom_bank(data & 1);
}

void pasha2_state::pasha2_lamps_w(u16 data)
{
	for (int p = 0; p < 3; p++)
	{
		m_lamps_r[p] = BIT(data, (p << 2) | 0);
		m_lamps_g[p] = BIT(data, (p << 2) | 1);
		m_lamps_b[p] = BIT(data, (p << 2) | 2);
	}
}

void pasha2_state::pasha2_map(address_map &map)
{
	// MEM0 (DRAM)
	map(0x00000000, 0x001fffff).ram().share("wram");
	// MEM1 (VRAM and Video registers)
	map(0x40000000, 0x4001ffff).ram().w(FUNC(pasha2_state::bg_bitmap_w));
	map(0x40020000, 0x4003ffff).ram().w(FUNC(pasha2_state::fg_bitmap_w));
	map(0x40060000, 0x40060001).nopw();
	map(0x40064000, 0x40064001).nopw();
	map(0x40068000, 0x40068001).nopw();
	map(0x4006c000, 0x4006c001).nopw();
	map(0x40070000, 0x40070001).w(FUNC(pasha2_state::vbuffer_clear_w));
	map(0x40074000, 0x40074001).w(FUNC(pasha2_state::vbuffer_set_w));
	map(0x40078000, 0x40078001).nopw(); //once at startup -> to disable the eeprom?
	// MEM2 (Bankswitched ROM)
	map(0x80000000, 0x803fffff).bankr("mainbank");
	// MEM3 (Palette, Boot ROM)
	map(0xe0000000, 0xe00001ff).rw(m_palette, FUNC(palette_device::read8), FUNC(palette_device::write8)).share("palette"); //tilemap? palette?
	map(0xe0000200, 0xe00003ff).rw(m_palette, FUNC(palette_device::read8_ext), FUNC(palette_device::write8_ext)).share("palette_ext"); // "
	map(0xfff80000, 0xffffffff).rom().region("maincpu", 0);
}

void pasha2_state::pasha2_io(address_map &map)
{
	map(0x08, 0x0b).nopr(); //sound status?
	map(0x18, 0x1b).nopr(); //sound status?
	map(0x20, 0x23).w(FUNC(pasha2_state::pasha2_lamps_w));
	map(0x40, 0x43).portr("COINS");
	map(0x60, 0x63).portr("DSW");
	map(0x80, 0x83).portr("INPUTS");
	map(0xa0, 0xa3).nopw(); //soundlatch?
	map(0xc0, 0xc3).w(FUNC(pasha2_state::misc_w));
	map(0xe3, 0xe3).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
	map(0xe7, 0xe7).rw(m_oki[1], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
	map(0xe8, 0xeb).w(FUNC(pasha2_state::oki_bank_w<0>));
	map(0xec, 0xef).w(FUNC(pasha2_state::oki_bank_w<1>));
}

void pasha2_state::zdrum_audio_map(address_map &map)
{
	map(0x00000000, 0x001fffff).ram();
	map(0xfff80000, 0xffffffff).rom().region("audiocpu", 0);
}

static INPUT_PORTS_START( pasha2 )
	PORT_START("COINS")
	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 )
	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 )
	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN3 )
	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )

	// 2 physical dip-switches
	PORT_START("DSW")
	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0018, 0x0008, DEF_STR( Lives ) )
	PORT_DIPSETTING(      0x0018, "1" )
	PORT_DIPSETTING(      0x0010, "2" )
	PORT_DIPSETTING(      0x0008, "3" )
	PORT_DIPSETTING(      0x0000, "5" )
	PORT_DIPNAME( 0x0060, 0x0060, DEF_STR( Coinage ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( 5C_1C ) )
	PORT_DIPSETTING(      0x0020, DEF_STR( 3C_1C ) )
	PORT_DIPSETTING(      0x0040, DEF_STR( 2C_1C ) )
	PORT_DIPSETTING(      0x0060, DEF_STR( 1C_1C ) )
	PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) )
	PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )

	PORT_START("INPUTS")
	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 )
	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 )
	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START3 )
INPUT_PORTS_END

static INPUT_PORTS_START( zdrum )
	PORT_START("COINS") // no apparent effects on gameplay or i/o test, but for otherwise noted
	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) // coin, but game enters a loop when pressed
	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE1 ) // service in i/o test, seems to have no effect during gameplay
	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_SERVICE_NO_TOGGLE( 0x800, IP_ACTIVE_LOW )
	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )

	// 2 physical dip-switches, but the settings seem to be done via service mode, so possibly unused?
	PORT_START("DSW")
	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
	PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )

	PORT_START("INPUTS")
	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) PORT_NAME( "Drum switch right 2" )
	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) // TODO: what's up with this? should probably be //  PORT_NAME( "Drum switch left 3" ), but it flickers on and off regardless
	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME( "Drum switch left 1" )
	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME( "Drum switch left 2" )
	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1) PORT_NAME( "Drum switch right 3" )
	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) PORT_NAME( "Drum switch right 1" )
	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME( "Left arrow" )
	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) // all the following but 0x800 don't seem to have any effect
	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) // isn't shown in the i/o test but it's used to move between items in the service mode
	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END

void pasha2_state::video_start()
{
	// 2 512x256 8bpp bitmaps, Both are double buffered
	for (int i = 0; i < 2; i++)
	{
		m_bg_bitmap[i].allocate(512, 256);
		m_fg_bitmap[i].allocate(512, 256);

		m_bg_bitmap[i].fill(0x100); // Palette space 0x100-0x1ff
		m_fg_bitmap[i].fill(0);     // Palette space 0x000-0x0ff

		save_item(NAME(m_bg_bitmap[i]), i);
		save_item(NAME(m_fg_bitmap[i]), i);
	}
}

u32 pasha2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	copybitmap(bitmap, m_bg_bitmap[(m_vbuffer ^ 1)], 0, 0, 0, 0, cliprect);
	copybitmap_trans(bitmap, m_fg_bitmap[(m_vbuffer ^ 1)], 0, 0, 0, 0, cliprect, 0);

	return 0;
}

void pasha2_state::machine_start()
{
	m_lamps_r.resolve();
	m_lamps_g.resolve();
	m_lamps_b.resolve();

	m_mainbank->configure_entries(0, 6, memregion("bankeddata")->base(), 0x400000);
	m_mainbank->set_entry(0);

	save_item(NAME(m_vbuffer));
}

void pasha2_state::machine_reset()
{
	m_vbuffer = 0;
}

void pasha2_state::pasha2(machine_config &config)
{
	// basic machine hardware
	E116XT(config, m_maincpu, 20_MHz_XTAL*4);     // 4x internal multiplier
	m_maincpu->set_addrmap(AS_PROGRAM, &pasha2_state::pasha2_map);
	m_maincpu->set_addrmap(AS_IO, &pasha2_state::pasha2_io);
	m_maincpu->set_vblank_int("screen", FUNC(pasha2_state::irq0_line_hold));

	AT89C52(config, "audiocpu", 12_MHz_XTAL);     // clock from docs
	// TODO : ports are unimplemented; P0,P1,P2,P3 and Serial Port Used

	EEPROM_93C46_16BIT(config, "eeprom");

	// video hardware
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
	screen.set_size(512, 512);
	screen.set_visarea(0, 383, 0, 239);
	screen.set_screen_update(FUNC(pasha2_state::screen_update));
	screen.set_palette(m_palette);

	PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x200);
	m_palette->set_membits(8);

	// sound hardware
	SPEAKER(config, "mono").front_center();

	OKIM6295(config, m_oki[0], 1_MHz_XTAL, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0);

	OKIM6295(config, m_oki[1], 1_MHz_XTAL, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0);

	//and ATMEL DREAM SAM9773
}

void pasha2_state::zdrum(machine_config &config)
{
	pasha2(config);

	m_maincpu->set_force_no_drc(true); // gets a bit further

	e116xt_device &audiocpu(E116XT(config.replace(), "audiocpu", 45_MHz_XTAL)); // type unknown, but it does look like Hyperstone code
	audiocpu.set_addrmap(AS_PROGRAM, &pasha2_state::zdrum_audio_map);

	// TODO: MP3 hw, also PCB should be stereo according to test mode
}

ROM_START( pasha2 )
	ROM_REGION16_BE( 0x80000, "maincpu", 0 ) // Hyperstone CPU Code
	ROM_LOAD( "pp2.u3",       0x00000, 0x80000, CRC(1c701273) SHA1(f465323a1d3f2fd752c51c178fafe4cc866e28d6) )

	ROM_REGION16_BE( 0x400000*6, "bankeddata", ROMREGION_ERASEFF ) // data roms
	ROM_LOAD16_BYTE( "pp2-u2.u101",  0x000000, 0x200000, CRC(85c4a2d0) SHA1(452b24b74bd0b65d2d6852486e2917f94e21ecc8) )
	ROM_LOAD16_BYTE( "pp2-u1.u101",  0x000001, 0x200000, CRC(96cbd04e) SHA1(a4e7dd61194584b3c4217674d78ab2fd96b7b2e0) )
	ROM_LOAD16_BYTE( "pp2-u2.u102",  0x400000, 0x200000, CRC(2097d88c) SHA1(7597578e6ddca00909feac35d9d7331f783b2bd6) )
	ROM_LOAD16_BYTE( "pp2-u1.u102",  0x400001, 0x200000, CRC(7a3492fb) SHA1(de72c4d10e17eaf2b7531f637b42cbb3d07819b5) )
	// empty space, but no empty sockets on the pcb

	ROM_REGION( 0x2000, "audiocpu", 0 ) // AT89C52
	ROM_LOAD( "89c52.bin",  0x0000, 0x2000, CRC(9ce43ce4) SHA1(8027a3549b38e9a2e7bb8f518a0defcaf9743371) ) // music play 1.0

	ROM_REGION( 0x80000, "sam9773", 0 ) // SAM9773 sound data
	ROM_LOAD( "pp2.um2",      0x00000, 0x80000, CRC(86814b37) SHA1(70f8a94410e362669570c39e00492c0d69de6b17) )

	ROM_REGION( 0x80000, "oki1", 0 ) // Oki Samples
	ROM_LOAD( "pp2.um51",     0x00000, 0x80000, CRC(3b1b1a30) SHA1(1ea1266d280a2b96ac4ef9fe8ee7b1a5f7861672) )

	ROM_REGION( 0x80000, "oki2", 0 ) // Oki Samples
	ROM_LOAD( "pp2.um53",     0x00000, 0x80000, CRC(8a29ad03) SHA1(3e9b0c86d8e3bb0b7691f68ad45431f6f9e8edbd) )
ROM_END

// PARA8B16 main PCB, very similar to the Pasha Pasha 2 PCB but with no AT89C52 and SAM9773
// PARA MP3 MAIN Ver. 1.00 2000.1 plug in PCB (Xilinx XC9536, Micronas MAS3507D F10, Micronas DAC3550A C2, 14.7456 XTAL)
// MUTALISK V3.02 PCB which plugs in the MP3 PCB (stickered IC 'Catos Creative Staffs' - probably an Hyperstone core given the ROM content -, 45.0000000 MHz XTAL, GM71V65163CT5 RAM, D27C040 ROM)
ROM_START( zdrum )
	ROM_REGION16_BE( 0x80000, "maincpu", 0 ) // Hyperstone CPU Code
	ROM_LOAD( "u3.bin", 0x00000, 0x80000, CRC(296c6ee8) SHA1(67814ac87828f578591ec2069ad96861fe29de6c) )

	ROM_REGION16_BE( 0x400000*6, "bankeddata", ROMREGION_ERASEFF ) // data roms
	ROM_LOAD16_WORD_SWAP( "u101.bin", 0x000000, 0x400000, CRC(e9bc892e) SHA1(f50cde278693a38cfad1185a89c41e2e2029c5ac) ) // Dumped as 27C322, but actually E28F916S5 * 2
	ROM_LOAD16_WORD_SWAP( "u102.bin", 0x400000, 0x400000, CRC(954e67a1) SHA1(cf1553fd70e27fab2d77df07ccd2866c198b5b35) ) // "

	ROM_REGION( 0x80000, "audiocpu", 0 ) // on the MUTALISK PCB
	ROM_LOAD( "mutalisk_u6.bin", 0x00000, 0x80000, CRC(7d044372) SHA1(41c63644ce048cec2079fb5ec8a2da9c66841c48) ) // 27C4000DC

	ROM_REGION( 0x80000, "oki1", 0 )
	ROM_LOAD( "um51.bin", 0x00000, 0x80000, CRC(b1a22ea2) SHA1(2814d212faf99504bd19602c4183fd8a4763c44c) ) // AM29F040

	ROM_REGION( 0x80000, "oki2", 0 )
	ROM_LOAD( "um53.bin", 0x00000, 0x80000, CRC(372022da) SHA1(809d103bdb365c9ff9e32b6a3032040b6a91ce88) ) // MBM29F040A

	ROM_REGION( 0x117, "plds", 0 )
	ROM_LOAD( "u507.bin", 0x000, 0x117, CRC(681ddf27) SHA1(0f9696918e512eb3840750c9386b4312a9e937ab) ) // PALCE16V8H

	DISK_REGION( "ide:0:hdd:image" ) // should contain the songs
	DISK_IMAGE( "zdrum", 0, NO_DUMP )
ROM_END

u16 pasha2_state::pasha2_speedup_r(offs_t offset)
{
	if(m_maincpu->pc() == 0x8302)
		m_maincpu->spin_until_interrupt();

	return m_wram[(0x95744 / 2) + offset];
}

void pasha2_state::init_pasha2()
{
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x95744, 0x95747, read16sm_delegate(*this, FUNC(pasha2_state::pasha2_speedup_r)));
}

GAMEL( 1998, pasha2, 0, pasha2, pasha2, pasha2_state, init_pasha2, ROT0, "Dong Sung",        "Pasha Pasha 2", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_pasha2 )
GAME ( 2000, zdrum,  0, zdrum,  zdrum,  pasha2_state, empty_init,  ROT0, "PARA Enterprises", "Zooty Drum",    MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // missing HD dump, MP3 board emulation. Inputs seem to be read differently.
class="s">"100k 300k 200k+" ) PORT_DIPSETTING( 0x80, DEF_STR( None ) ) PORT_START("DSW2") PORT_DIPUNUSED( 0x01, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x02, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x04, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) PORT_START("COIN") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) INPUT_PORTS_END // verified from 5A22 code static INPUT_PORTS_START( iron ) PORT_INCLUDE(snes_common) PORT_START("DSW1") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) // duplicate setting PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) // "LEVEL" PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) // "MEDIUM" PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) // duplicate setting PORT_DIPNAME( 0x04, 0x04, "Suffered Damages" ) // code at 0x(8)082d0 PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x00, "More" ) PORT_DIPNAME( 0x18, 0x18, DEF_STR( Lives ) ) // table at 0x(8)3ffda (4 * 1 word) gives 02 03 04 05 (add 1) but extra LSRA before TAY at 0x(8)3ffcf PORT_DIPSETTING( 0x18, "3" ) PORT_DIPSETTING( 0x08, "4" ) PORT_DIPSETTING( 0x10, "769 (Bug)" ) PORT_DIPSETTING( 0x00, "1025 (Bug)" ) PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) PORT_START("COIN") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) INPUT_PORTS_END // verified from 5A22 code static INPUT_PORTS_START( denseib ) PORT_INCLUDE(snes_common) PORT_START("DSW1") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) // duplicate setting PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) PORT_DIPNAME( 0x18, 0x10, DEF_STR( Difficulty ) ) // "RANK" PORT_DIPSETTING( 0x18, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x10, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x08, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) // duplicate setting PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) PORT_DIPNAME( 0x80, 0x00, "Mode" ) PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x80, "Battle" ) PORT_START("DSW2") PORT_DIPNAME( 0x07, 0x07, "Suffered Damages" ) // code at 0x(8)0f810 PORT_DIPSETTING( 0x07, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x06, "x1.5" ) PORT_DIPSETTING( 0x05, "x2.5" ) PORT_DIPSETTING( 0x04, "x3.5" ) PORT_DIPSETTING( 0x03, "x4.5" ) PORT_DIPSETTING( 0x02, "x5.5" ) PORT_DIPSETTING( 0x01, "x6.5" ) PORT_DIPSETTING( 0x00, "x7.5" ) PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) PORT_START("COIN") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) INPUT_PORTS_END // verified from 5A22 code static INPUT_PORTS_START( sblast2b ) PORT_INCLUDE(snes_common) PORT_START("DSW1") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) // duplicate setting PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) PORT_DIPNAME( 0x38, 0x38, DEF_STR( Difficulty ) ) // "LEVEL" PORT_DIPSETTING( 0x38, "0 (Easiest)" ) // "NORMAL" PORT_DIPSETTING( 0x30, "1" ) // "HARD" PORT_DIPSETTING( 0x28, "2" ) // undefined PORT_DIPSETTING( 0x20, "3" ) // undefined PORT_DIPSETTING( 0x18, "4" ) // undefined PORT_DIPSETTING( 0x10, "5" ) // undefined PORT_DIPSETTING( 0x08, "6" ) // undefined PORT_DIPSETTING( 0x00, "7 (Hardest)" ) // undefined PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Lives ) ) PORT_DIPSETTING( 0xc0, "1" ) PORT_DIPSETTING( 0x80, "2" ) PORT_DIPSETTING( 0x40, "3" ) PORT_DIPSETTING( 0x00, "4" ) PORT_START("DSW2") PORT_DIPNAME( 0x0f, 0x04, "Power" ) PORT_DIPSETTING( 0x07, "0" ) PORT_DIPSETTING( 0x06, "1" ) PORT_DIPSETTING( 0x05, "2" ) PORT_DIPSETTING( 0x04, "3" ) PORT_DIPSETTING( 0x03, "4" ) PORT_DIPSETTING( 0x02, "5" ) PORT_DIPSETTING( 0x01, "6" ) PORT_DIPSETTING( 0x00, "7" ) PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) PORT_START("COIN") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) INPUT_PORTS_END static INPUT_PORTS_START( endless ) PORT_INCLUDE(snes_common) PORT_START("DSW1") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) // duplicate setting PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) PORT_DIPNAME( 0x38, 0x38, DEF_STR( Difficulty ) ) // "LEVEL" PORT_DIPSETTING( 0x38, "0 (Easiest)" ) // "EASY" PORT_DIPSETTING( 0x30, "1" ) // "NORMAL" PORT_DIPSETTING( 0x28, "2" ) // "HARD" PORT_DIPSETTING( 0x20, "3" ) // undefined PORT_DIPSETTING( 0x18, "4" ) // undefined PORT_DIPSETTING( 0x10, "5" ) // undefined PORT_DIPSETTING( 0x08, "6" ) // undefined PORT_DIPSETTING( 0x00, "7 (Hardest)" ) // undefined PORT_DIPNAME( 0xc0, 0xc0, "Time" ) // "TIME" PORT_DIPSETTING( 0xc0, "99" ) // "LIMIT" PORT_DIPSETTING( 0x80, "60" ) // undefined PORT_DIPSETTING( 0x40, "30" ) // undefined PORT_DIPSETTING( 0x00, "Infinite" ) // "NO LIMIT" PORT_START("DSW2") PORT_DIPUNUSED( 0x01, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x02, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x04, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) PORT_START("COIN") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) INPUT_PORTS_END static INPUT_PORTS_START( rushbets ) PORT_INCLUDE(snes_common) PORT_START("DSW1") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) // duplicate setting PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) PORT_DIPNAME( 0x38, 0x38, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x38, "0" ) PORT_DIPSETTING( 0x30, "1" ) PORT_DIPSETTING( 0x28, "2" ) PORT_DIPSETTING( 0x20, "2" ) PORT_DIPSETTING( 0x18, "2" ) PORT_DIPSETTING( 0x10, "2" ) PORT_DIPSETTING( 0x08, "2" ) PORT_DIPSETTING( 0x00, "2" ) PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0xc0, "0" ) PORT_DIPSETTING( 0x80, "1" ) PORT_DIPSETTING( 0x40, "2" ) PORT_DIPSETTING( 0x00, "3" ) PORT_START("COIN") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) INPUT_PORTS_END static INPUT_PORTS_START( venom ) PORT_INCLUDE(snes_common) PORT_START("DSW1") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) // duplicate setting PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) PORT_START("DSW2") PORT_DIPUNUSED( 0x01, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x02, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x04, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) PORT_START("COIN") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) // The game code has been hacked to use only 3 buttons (the arcade panel) as a result many moves are not even possible and some buttons have multiple purposes compared to the original game PORT_MODIFY("SERIAL1_DATA1") PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x000f, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_MODIFY("SERIAL2_DATA1") PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x000f, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END static INPUT_PORTS_START( wldgunsb ) PORT_INCLUDE( venom ) PORT_MODIFY("DSW1") PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Lives ) ) PORT_DIPSETTING( 0xc0, "1" ) PORT_DIPSETTING( 0x80, "2" ) PORT_DIPSETTING( 0x40, "3" ) PORT_DIPSETTING( 0x00, "4" ) INPUT_PORTS_END void snesb_state::base(machine_config &config) { // basic machine hardware _5A22(config, m_maincpu, 3580000 * 6); // 2.68Mhz, also 3.58Mhz m_maincpu->set_addrmap(AS_PROGRAM, &snesb_state::snesb_map); // audio CPU, runs at 24.576 MHz / 12 = 2.048 MHz S_SMP(config, m_soundcpu, XTAL(24'576'000) / 12); m_soundcpu->set_addrmap(AS_DATA, &snesb_state::spc_map); m_soundcpu->dsp_io_read_callback().set(m_s_dsp, FUNC(s_dsp_device::dsp_io_r)); m_soundcpu->dsp_io_write_callback().set(m_s_dsp, FUNC(s_dsp_device::dsp_io_w)); config.set_perfect_quantum(m_maincpu); // video hardware SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(DOTCLK_NTSC * 2, SNES_HTOTAL * 2, 0, SNES_SCR_WIDTH * 2, SNES_VTOTAL_NTSC, 0, SNES_SCR_HEIGHT_NTSC); m_screen->set_video_attributes(VIDEO_VARIABLE_WIDTH); m_screen->set_screen_update(FUNC(snes_state::screen_update)); SNES_PPU(config, m_ppu, MCLK_NTSC); m_ppu->open_bus_callback().set([this] { return snes_open_bus_r(); }); // lambda because overloaded function name m_ppu->set_screen("screen"); // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); S_DSP(config, m_s_dsp, XTAL(24'576'000) / 12); m_s_dsp->set_addrmap(0, &snesb_state::spc_map); m_s_dsp->add_route(0, "lspeaker", 1.00); m_s_dsp->add_route(1, "rspeaker", 1.00); } void snesb_state::extrainp(machine_config &config) { base(config); m_maincpu->set_addrmap(AS_PROGRAM, &snesb_state::extrainp_map); } void snesb_state::kinstb(machine_config &config) { base(config); m_maincpu->set_addrmap(AS_PROGRAM, &snesb_state::kinstb_map); } MACHINE_RESET_MEMBER( snesb_state, ffight2b ) { address_space &cpu0space = m_maincpu->space(AS_PROGRAM); snes_state::machine_reset(); // Hack: avoid starting with 55 credits. It's either a work RAM init fault or MCU clears it by his own, hard to tell ... cpu0space.write_byte(0x7eadce, 0x00); } void snesb_state::ffight2b(machine_config &config) { extrainp(config); MCFG_MACHINE_RESET_OVERRIDE( snesb_state, ffight2b ) } void snesb_state::sblast2b(machine_config &config) { base(config); m_maincpu->set_addrmap(AS_PROGRAM, &snesb_state::sblast2b_map); } void snesb_state::endless(machine_config &config) { base(config); m_maincpu->set_addrmap(AS_PROGRAM, &snesb_state::endless_map); } void snesb_state::rushbets(machine_config &config) { base(config); m_maincpu->set_addrmap(AS_PROGRAM, &snesb_state::rushbets_map); } void snesb_state::venom(machine_config &config) { base(config); m_maincpu->set_addrmap(AS_PROGRAM, &snesb_state::venom_map); } void snesb_state::wldgunsb(machine_config &config) { base(config); m_maincpu->set_addrmap(AS_PROGRAM, &snesb_state::wldgunsb_map); } void snesb_state::init_kinstb() { uint8_t *rom = memregion("user3")->base(); for (uint32_t i = 0; i < 0x400000; i++) { rom[i] = bitswap<8>(rom[i], 5, 0, 6, 1, 7, 4, 3, 2); } init_snes_hirom(); } void snesb_state::init_ffight2b() { uint8_t *rom = memregion("user3")->base(); for (uint32_t i = 0; i < 0x140000; i++) { rom[i] = rom[i] ^ 0xff; if (i < 0x10000) rom[i] = bitswap<8>(rom[i], 3, 1, 6, 4, 7, 0, 2, 5); else if (i < 0x20000) rom[i] = bitswap<8>(rom[i],3, 7, 0, 5, 1, 6, 2, 4); else if (i < 0x30000) rom[i] = bitswap<8>(rom[i], 1, 7, 6, 4, 5, 2, 3, 0); else if (i < 0x40000) rom[i] = bitswap<8>(rom[i], 0, 3, 2, 5, 4, 6, 7, 1); else if (i < 0x140000) rom[i] = bitswap<8>(rom[i], 6, 4, 0, 5, 1, 3, 2, 7); } // boot vector rom[0x7ffd] = 0x89; rom[0x7ffc] = 0x54; init_snes(); } void snesb_state::init_ffight3b() { uint8_t *rom = memregion("user3")->base(); for (int i = 0; i < 0x300000; i++) { if (i < 0x80000) rom[i] = bitswap<8>(rom[i], 7, 4, 2, 0, 3, 5, 6, 1) ^ 0xff; else if (i < 0x280000) rom[i] = bitswap<8>(rom[i], 0, 5, 1, 3, 2, 7, 6, 4); else rom[i] = bitswap<8>(rom[i], 4, 7, 0, 2, 5, 3, 1, 6) ^ 0xff; } // boot vector. TODO: this is the same as the console version, but needs to be verified rom[0xfffc] = 0x00; rom[0xfffd] = 0xfe; // patch out protection rom[0xfe33] = 0x5c; rom[0xfe34] = 0x00; rom[0xfe35] = 0x00; rom[0xfe36] = 0xc0; rom[0xfeab] = 0x60; init_snes_hirom(); } void snesb_state::init_iron() { uint8_t *rom = memregion("user3")->base(); for (uint32_t i = 0; i < 0x140000; i++) { if (i < 0x80000) rom[i] = bitswap<8>(rom[i] ^ 0xff, 2, 7, 1, 6, 3, 0, 5, 4); else rom[i] = bitswap<8>(rom[i], 6, 3, 0, 5, 1, 4, 7, 2); } init_snes(); } void snesb_state::init_denseib() { uint8_t *rom = memregion("user3")->base(); for (uint32_t i = 0; i < 0x200000; i++) { rom[i] = rom[i] ^ 0xff; switch (i >> 16) { case 0x00: rom[i] = bitswap<8>(rom[i], 1, 7, 0, 6, 3, 4, 5, 2); break; case 0x01: rom[i] = bitswap<8>(rom[i], 3, 4, 7, 2, 0, 6, 5, 1); break; case 0x02: rom[i] = bitswap<8>(rom[i], 5, 4, 2, 1, 7, 0, 6, 3); break; case 0x03: rom[i] = bitswap<8>(rom[i], 0, 1, 3, 7, 2, 6, 5, 4); break; default: rom[i] = bitswap<8>(rom[i], 4, 5, 1, 0, 2, 3, 7, 6); break; } } // boot vector rom[0xfffc] = 0x40; rom[0xfffd] = 0xf7; init_snes_hirom(); } void snesb_state::init_denseib2() { uint8_t *src = memregion("user7")->base(); uint8_t *dst = memregion("user3")->base(); static const uint8_t address_tab_high[0x40] = { 0x0b, 0x1d, 0x05, 0x15, 0x09, 0x19, 0x04, 0x13, 0x02, 0x1f, 0x07, 0x17, 0x0d, 0x11, 0x0a, 0x1a, 0x14, 0x0e, 0x18, 0x06, 0x1e, 0x01, 0x10, 0x0c, 0x1b, 0x0f, 0x16, 0x00, 0x12, 0x08, 0x1c, 0x03, 0x2b, 0x3d, 0x25, 0x35, 0x29, 0x39, 0x24, 0x33, 0x22, 0x3f, 0x27, 0x37, 0x2d, 0x31, 0x2a, 0x3a, 0x34, 0x2e, 0x38, 0x26, 0x3e, 0x21, 0x30, 0x2c, 0x3b, 0x2f, 0x36, 0x20, 0x32, 0x28, 0x3c, 0x23 }; static const uint8_t address_tab_low[0x40] = { 0x14, 0x1d, 0x11, 0x3c, 0x0a, 0x29, 0x2d, 0x2e, 0x30, 0x32, 0x16, 0x36, 0x05, 0x25, 0x26, 0x37, 0x20, 0x21, 0x27, 0x28, 0x33, 0x34, 0x23, 0x12, 0x1e, 0x1f, 0x3b, 0x24, 0x2c, 0x35, 0x38, 0x39, 0x3d, 0x0c, 0x2a, 0x0d, 0x22, 0x18, 0x19, 0x1a, 0x03, 0x08, 0x04, 0x3a, 0x0b, 0x0f, 0x15, 0x17, 0x1b, 0x13, 0x00, 0x1c, 0x2b, 0x01, 0x06, 0x2f, 0x07, 0x09, 0x02, 0x31, 0x10, 0x0e, 0x3f, 0x3e }; static const uint8_t data_high[16] = { 0x03, 0x04, 0x85, 0x01, 0x81, 0x87, 0x07, 0x05, 0x86, 0x00, 0x02, 0x82, 0x84, 0x83, 0x06, 0x80 }; static const uint8_t data_low[16] = { 0x30, 0x40, 0x58, 0x10, 0x18, 0x78, 0x70, 0x50, 0x68, 0x00, 0x20, 0x28, 0x48, 0x38, 0x60, 0x08 }; for (int i = 0; i < 0x200000; i++) { int j = (address_tab_high[i >> 15] << 15) + (i & 0x7fc0) + address_tab_low[i & 0x3f]; dst[i] = data_high[src[j] >> 4] | data_low[src[j] & 0xf]; if (i >= 0x00000 && i < 0x10000) dst[i] = bitswap<8>(dst[i], 2, 1, 3, 0, 7, 4, 5, 6) ^ 0xff; if (i >= 0x10000 && i < 0x20000) dst[i] = bitswap<8>(dst[i], 1, 7, 4, 5, 6, 0, 3, 2); if (i >= 0x20000 && i < 0x30000) dst[i] = bitswap<8>(dst[i], 0, 2, 6, 7, 5, 3, 4, 1) ^ 0xff; if (i >= 0x30000 && i < 0x40000) dst[i] = bitswap<8>(dst[i], 6, 5, 0, 3, 1, 7, 2, 4) ^ 0xff; } // boot vector dst[0xfffc] = 0x40; dst[0xfffd] = 0xf7; init_snes_hirom(); } void snesb_state::init_legendsb() { uint8_t *rom = memregion("user3")->base(); for (int i = 0; i < 0x100000; i++) { uint8_t val = rom[i] ^ 0xff; if (i < 0x10000) rom[i] = bitswap<8>(val, 6, 5, 4, 2, 1, 0, 3, 7); else if (i < 0x20000) rom[i] = bitswap<8>(val, 6, 1, 3, 5, 2, 0, 7, 4); else if (i < 0x30000) rom[i] = bitswap<8>(val, 2, 6, 3, 0, 4, 5, 7, 1); else if (i < 0x40000) rom[i] = bitswap<8>(val, 5, 4, 2, 7, 0, 3, 6, 1); else rom[i] = bitswap<8>(val, 3, 6, 0, 5, 1, 4, 7, 2); } // boot vector rom[0x7ffc] = 0x19; rom[0x7ffd] = 0x80; init_snes(); } void snesb_state::init_sblast2b() { uint8_t *src = memregion("user7")->base(); uint8_t *dst = memregion("user3")->base(); static const uint8_t address_tab_high[48] = { 0x0b, 0x1d, 0x05, 0x15, 0x09, 0x19, 0x04, 0x13, 0x02, 0x1f, 0x07, 0x17, 0x0d, 0x11, 0x0a, 0x1a, 0x14, 0x0e, 0x18, 0x06, 0x1e, 0x01, 0x10, 0x0c, 0x1b, 0x0f, 0x16, 0x00, 0x12, 0x08, 0x1c, 0x03, 0x2b, 0x2e, 0x25, 0x26, 0x29, 0x21, 0x24, 0x2c, 0x22, 0x2f, 0x27, 0x20, 0x2d, 0x28, 0x2a, 0x23 }; static const uint8_t address_tab_low[64] = { 0x14, 0x1d, 0x11, 0x3c, 0x0a, 0x29, 0x2d, 0x2e, 0x30, 0x32, 0x16, 0x36, 0x05, 0x25, 0x26, 0x37, 0x20, 0x21, 0x27, 0x28, 0x33, 0x34, 0x23, 0x12, 0x1e, 0x1f, 0x3b, 0x24, 0x2c, 0x35, 0x38, 0x39, 0x3d, 0x0c, 0x2a, 0x0d, 0x22, 0x18, 0x19, 0x1a, 0x03, 0x08, 0x04, 0x3a, 0x0b, 0x0f, 0x15, 0x17, 0x1b, 0x13, 0x00, 0x1c, 0x2b, 0x01, 0x06, 0x2f, 0x07, 0x09, 0x02, 0x31, 0x10, 0x0e, 0x3f, 0x3e }; static const uint8_t data_high[16] = { 0x44, 0x01, 0x51, 0x40, 0x50, 0x55, 0x45, 0x41, 0x15, 0x00, 0x04, 0x14, 0x11, 0x54, 0x05, 0x10 }; static const uint8_t data_low[16] = { 0x88, 0x02, 0x2a, 0x08, 0x28, 0xaa, 0x8a, 0x0a, 0xa2, 0x00, 0x80, 0xa0, 0x22, 0xa8, 0x82, 0x20 }; for (int i = 0; i < 0x180000; i++) { int j = (address_tab_high[i >> 15] << 15) + (i & 0x7fc0) + address_tab_low[i & 0x3f]; dst[i] = data_high[src[j] >> 4] | data_low[src[j] & 0xf]; if (i >= 0x00000 && i < 0x10000) dst[i] = bitswap<8>(dst[i], 6, 3, 5, 4, 2, 0, 7, 1) ^ 0xff; if (i >= 0x10000 && i < 0x20000) dst[i] = bitswap<8>(dst[i], 4, 0, 7, 6, 3, 1, 2, 5) ^ 0xff; if (i >= 0x20000 && i < 0x30000) dst[i] = bitswap<8>(dst[i], 5, 7, 6, 1, 4, 3, 0, 2); if (i >= 0x30000 && i < 0x40000) dst[i] = bitswap<8>(dst[i], 3, 1, 2, 0, 5, 6, 4, 7) ^ 0xff; } // boot vector dst[0xfffc] = 0xc0; dst[0xfffd] = 0x7a; save_item(NAME(m_cnt)); init_snes_hirom(); } void snesb_state::init_endless() { uint8_t *src = memregion("user7")->base(); uint8_t *dst = memregion("user3")->base(); static const uint8_t address_tab_high[0x40] = { 0x3b, 0x1d, 0x35, 0x15, 0x39, 0x19, 0x34, 0x13, 0x32, 0x1f, 0x37, 0x17, 0x3d, 0x11, 0x3a, 0x1a, 0x14, 0x3e, 0x18, 0x36, 0x1e, 0x31, 0x10, 0x3c, 0x1b, 0x3f, 0x16, 0x30, 0x12, 0x38, 0x1c, 0x33, 0x2b, 0x0d, 0x25, 0x05, 0x29, 0x09, 0x24, 0x03, 0x22, 0x0f, 0x27, 0x07, 0x2d, 0x01, 0x2a, 0x0a, 0x04, 0x2e, 0x08, 0x26, 0x0e, 0x21, 0x00, 0x2c, 0x0b, 0x2f, 0x06, 0x20, 0x02, 0x28, 0x0c, 0x23 }; static const uint8_t address_tab_low[0x40] = { 0x14, 0x1d, 0x11, 0x3c, 0x0a, 0x29, 0x2d, 0x2e, 0x30, 0x32, 0x16, 0x36, 0x05, 0x25, 0x26, 0x37, 0x20, 0x21, 0x27, 0x28, 0x33, 0x34, 0x23, 0x12, 0x1e, 0x1f, 0x3b, 0x24, 0x2c, 0x35, 0x38, 0x39, 0x3d, 0x0c, 0x2a, 0x0d, 0x22, 0x18, 0x19, 0x1a, 0x03, 0x08, 0x04, 0x3a, 0x0b, 0x0f, 0x15, 0x17, 0x1b, 0x13, 0x00, 0x1c, 0x2b, 0x01, 0x06, 0x2f, 0x07, 0x09, 0x02, 0x31, 0x10, 0x0e, 0x3f, 0x3e }; static const uint8_t data_high[16] = { 0x88, 0x38, 0x10, 0x98, 0x90, 0x00, 0x08, 0x18, 0x20, 0xb8, 0xa8, 0xa0, 0x30, 0x80, 0x28, 0xb0 }; static const uint8_t data_low[16] = { 0x41, 0x46, 0x02, 0x43, 0x03, 0x00, 0x40, 0x42, 0x04, 0x47, 0x45, 0x05, 0x06, 0x01, 0x44, 0x07 }; for (int i = 0; i < 0x200000; i++) { int j = (address_tab_high[i >> 15] << 15) + (i & 0x7fc0) + address_tab_low[i & 0x3f]; dst[i] = data_high[src[j] >> 4] | data_low[src[j] & 0xf]; if (i >= 0x00000 && i < 0x10000) dst[i] = bitswap<8>(dst[i], 2, 3, 4, 1, 7, 0, 6, 5); if (i >= 0x10000 && i < 0x20000) dst[i] = bitswap<8>(dst[i], 1, 5, 6, 0, 2, 4, 7, 3) ^ 0xff; if (i >= 0x20000 && i < 0x30000) dst[i] = bitswap<8>(dst[i], 3, 0, 1, 6, 4, 5, 2, 7); if (i >= 0x30000 && i < 0x40000) dst[i] = bitswap<8>(dst[i], 0, 4, 2, 3, 5, 6, 7, 1) ^ 0xff; } // boot vector dst[0x7ffc] = 0x00; dst[0x7ffd] = 0x80; save_item(NAME(m_cnt)); init_snes(); } void snesb_state::init_rushbets() { uint8_t *src = memregion("user7")->base(); uint8_t *dst = memregion("user3")->base(); static const uint8_t address_tab_high[32] = { 0x0b, 0x1d, 0x05, 0x15, 0x09, 0x19, 0x04, 0x13, 0x02, 0x1f, 0x07, 0x17, 0x0d, 0x11, 0x0a, 0x1a, 0x14, 0x0e, 0x18, 0x06, 0x1e, 0x01, 0x10, 0x0c, 0x1b, 0x0f, 0x16, 0x00, 0x12, 0x08, 0x1c, 0x03 }; static const uint8_t address_tab_low[64] = { 0x14, 0x1d, 0x11, 0x3c, 0x0a, 0x29, 0x2d, 0x2e, 0x30, 0x32, 0x16, 0x36, 0x05, 0x25, 0x26, 0x37, 0x20, 0x21, 0x27, 0x28, 0x33, 0x34, 0x23, 0x12, 0x1e, 0x1f, 0x3b, 0x24, 0x2c, 0x35, 0x38, 0x39, 0x3d, 0x0c, 0x2a, 0x0d, 0x22, 0x18, 0x19, 0x1a, 0x03, 0x08, 0x04, 0x3a, 0x0b, 0x0f, 0x15, 0x17, 0x1b, 0x13, 0x00, 0x1c, 0x2b, 0x01, 0x06, 0x2f, 0x07, 0x09, 0x02, 0x31, 0x10, 0x0e, 0x3f, 0x3e }; static const uint8_t data_high[16] = { 0x84, 0x10, 0x92, 0x80, 0x82, 0x96, 0x94, 0x90, 0x16, 0x00, 0x04, 0x06, 0x12, 0x86, 0x14, 0x02 }; static const uint8_t data_low[16] = { 0x28, 0x01, 0x61, 0x20, 0x60, 0x69, 0x29, 0x21, 0x49, 0x00, 0x08, 0x48, 0x41, 0x68, 0x09, 0x40 }; for (int i = 0; i < 0x200000; i++) { int j = (address_tab_high[(i >> 15) & 0x1f] << 15) + (i & 0x107fc0) + address_tab_low[i & 0x3f]; dst[i] = data_high[src[j] >> 4] | data_low[src[j] & 0xf]; if (i >= 0x00000 && i < 0x10000) dst[i] = bitswap<8>(dst[i], 0, 7, 6, 3, 5, 4, 1, 2) ^ 0xff; if (i >= 0x10000 && i < 0x20000) dst[i] = bitswap<8>(dst[i], 2, 1, 3, 7, 6, 5, 4, 0) ^ 0xff; if (i >= 0x20000 && i < 0x30000) dst[i] = bitswap<8>(dst[i], 4, 6, 0, 2, 7, 3, 5, 1); if (i >= 0x30000 && i < 0x40000) dst[i] = bitswap<8>(dst[i], 5, 4, 7, 1, 0, 6, 2, 3) ^ 0xff; } // boot vector dst[0xfffc] = 0xec; dst[0xfffd] = 0x80; save_item(NAME(m_cnt)); init_snes_hirom(); } void snesb_state::init_venom() { uint8_t *src = memregion("user7")->base(); uint8_t *dst = memregion("user3")->base(); static uint8_t address_tab_high[0x60] = { 0x00, 0x11, 0x02, 0x13, 0x04, 0x15, 0x06, 0x17, 0x08, 0x19, 0x0a, 0x1b, 0x0c, 0x1d, 0x0e, 0x1f, 0x20, 0x31, 0x22, 0x33, 0x24, 0x35, 0x26, 0x37, 0x28, 0x39, 0x2a, 0x3b, 0x2c, 0x3d, 0x2e, 0x3f, 0x10, 0x01, 0x12, 0x03, 0x14, 0x05, 0x16, 0x07, 0x18, 0x09, 0x1a, 0x0b, 0x1c, 0x0d, 0x1e, 0x0f, 0x30, 0x21, 0x32, 0x23, 0x34, 0x25, 0x36, 0x27, 0x38, 0x29, 0x3a, 0x2b, 0x3c, 0x2d, 0x3e, 0x2f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f }; static uint8_t address_tab_low[0x40] = { 0x14, 0x1d, 0x11, 0x3c, 0x0a, 0x29, 0x2d, 0x2e, 0x30, 0x32, 0x16, 0x36, 0x05, 0x25, 0x26, 0x37, 0x20, 0x21, 0x27, 0x28, 0x33, 0x34, 0x23, 0x12, 0x1e, 0x1f, 0x3b, 0x24, 0x2c, 0x35, 0x38, 0x39, 0x3d, 0x0c, 0x2a, 0x0d, 0x22, 0x18, 0x19, 0x1a, 0x03, 0x08, 0x04, 0x3a, 0x0b, 0x0f, 0x15, 0x17, 0x1b, 0x13, 0x00, 0x1c, 0x2b, 0x01, 0x06, 0x2f, 0x07, 0x09, 0x02, 0x31, 0x10, 0x0e, 0x3f, 0x3e }; static const uint8_t data_high[16] = { 0x60, 0x45, 0x04, 0x64, 0x24, 0x00, 0x40, 0x44, 0x01, 0x65, 0x61, 0x21, 0x05, 0x20, 0x41, 0x25 }; static const uint8_t data_low[16] = { 0x0a, 0x92, 0x80, 0x8a, 0x88, 0x00, 0x02, 0x82, 0x10, 0x9a, 0x1a, 0x18, 0x90, 0x08, 0x12, 0x98 }; for (int i = 0; i < 0x300000; i++) { int j = (address_tab_high[i >> 15] << 15) + (i & 0x7fc0) + address_tab_low[i & 0x3f]; dst[i] = data_high[src[j] >> 4] | data_low[src[j] & 0xf]; if (i >= 0x00000 && i < 0x10000) dst[i] = bitswap<8>(dst[i], 6, 7, 0, 3, 1, 4, 2, 5) ^ 0xff; if (i >= 0x10000 && i < 0x20000) dst[i] = bitswap<8>(dst[i], 0, 1, 4, 5, 3, 7, 6, 2); if (i >= 0x20000 && i < 0x30000) dst[i] = bitswap<8>(dst[i], 1, 3, 2, 6, 5, 4, 0, 7) ^ 0xff; if (i >= 0x30000 && i < 0x40000) dst[i] = bitswap<8>(dst[i], 4, 0, 7, 6, 2, 1, 5, 3); } // boot vector dst[0x7ffc] = 0x98; dst[0x7ffd] = 0xff; init_snes(); } void snesb_state::init_wldgunsb() { uint8_t *src = memregion("user7")->base(); uint8_t *dst = memregion("user3")->base(); static uint8_t address_tab_high[0x20] = { 0x0b, 0x1d, 0x05, 0x15, 0x09, 0x19, 0x04, 0x13, 0x02, 0x1f, 0x07, 0x17, 0x0d, 0x11, 0x0a, 0x1a, 0x14, 0x0e, 0x18, 0x06, 0x1e, 0x01, 0x10, 0x0c, 0x1b, 0x0f, 0x16, 0x00, 0x12, 0x08, 0x1c, 0x03 }; static uint8_t address_tab_low[0x40] = { 0x14, 0x1d, 0x11, 0x3c, 0x0a, 0x29, 0x2d, 0x2e, 0x30, 0x32, 0x16, 0x36, 0x05, 0x25, 0x26, 0x37, 0x20, 0x21, 0x27, 0x28, 0x33, 0x34, 0x23, 0x12, 0x1e, 0x1f, 0x3b, 0x24, 0x2c, 0x35, 0x38, 0x39, 0x3d, 0x0c, 0x2a, 0x0d, 0x22, 0x18, 0x19, 0x1a, 0x03, 0x08, 0x04, 0x3a, 0x0b, 0x0f, 0x15, 0x17, 0x1b, 0x13, 0x00, 0x1c, 0x2b, 0x01, 0x06, 0x2f, 0x07, 0x09, 0x02, 0x31, 0x10, 0x0e, 0x3f, 0x3e }; static const uint8_t data_low[16] = { 0x30, 0xa8, 0x80, 0xb0, 0x90, 0x00, 0x20, 0xa0, 0x08, 0xb8, 0x38, 0x18, 0x88, 0x10, 0x28, 0x98 }; static const uint8_t data_high[16] = { 0x05, 0x43, 0x40, 0x45, 0x44, 0x00, 0x01, 0x41, 0x02, 0x47, 0x07, 0x06, 0x42, 0x04, 0x03, 0x46 }; for (int i = 0; i < 0x100000; i++) { int j = (address_tab_high[i >> 15] << 15) + (i & 0x7fc0) + address_tab_low[i & 0x3f]; dst[i] = data_high[src[j] >> 4] | data_low[src[j] & 0xf]; if (i >= 0x00000 && i < 0x10000) dst[i] = bitswap<8>(dst[i], 3, 1, 7, 0, 6, 4, 5, 2) ^ 0xff; if (i >= 0x10000 && i < 0x20000) dst[i] = bitswap<8>(dst[i], 4, 7, 3, 2, 0, 1, 6, 5); if (i >= 0x20000 && i < 0x30000) dst[i] = bitswap<8>(dst[i], 6, 0, 7, 1, 4, 3, 5, 2) ^ 0xff; if (i >= 0x30000 && i < 0x40000) dst[i] = bitswap<8>(dst[i], 0, 2, 6, 4, 1, 5, 7, 3); } // boot vector dst[0x7ffc] = 0x40; dst[0x7ffd] = 0x80; save_item(NAME(m_cnt)); init_snes(); } ROM_START( kinstb ) ROM_REGION( 0x400000, "user3", 0 ) ROM_LOAD( "1.u14", 0x000000, 0x100000, CRC(70889919) SHA1(1451714cbdacb7f6ced2bc7afa478ad7264cf3b7) ) ROM_LOAD( "2.u15", 0x100000, 0x100000, CRC(e4a5d1da) SHA1(6ae566bd2f740a251d7a81b8ebb92a651cfaac8d) ) ROM_LOAD( "3.u16", 0x200000, 0x100000, CRC(7a40f7dd) SHA1(cebe632e8d2d68d0619077cc1e931af73c9a723b) ) ROM_LOAD( "4.u17", 0x300000, 0x100000, CRC(3d7564c1) SHA1(392b513991897668d5dd469ac84a34f785895774) ) ROM_END ROM_START( ffight2b ) ROM_REGION( 0x140000, "user3", 0 ) ROM_LOAD( "ff2_3.u6", 0x000000, 0x008000, CRC(343bf582) SHA1(cc6b7219bb2fe61f0b377b606ad28b0e5a78be0b) ) ROM_CONTINUE( 0x088000, 0x008000 ) ROM_CONTINUE( 0x010000, 0x008000 ) ROM_CONTINUE( 0x098000, 0x008000 ) ROM_CONTINUE( 0x020000, 0x008000 ) ROM_CONTINUE( 0x0a8000, 0x008000 ) ROM_CONTINUE( 0x030000, 0x008000 ) ROM_CONTINUE( 0x0b8000, 0x008000 ) ROM_CONTINUE( 0x040000, 0x008000 ) ROM_CONTINUE( 0x0c8000, 0x008000 ) ROM_CONTINUE( 0x050000, 0x008000 ) ROM_CONTINUE( 0x0d8000, 0x008000 ) ROM_CONTINUE( 0x060000, 0x008000 ) ROM_CONTINUE( 0x0e8000, 0x008000 ) ROM_CONTINUE( 0x070000, 0x008000 ) ROM_CONTINUE( 0x0f8000, 0x008000 ) ROM_LOAD( "ff2_2.u7", 0x080000, 0x008000, CRC(b2078ae5) SHA1(e7bc3ad26ed672707d0dcfcaff238aad74986532) ) ROM_CONTINUE( 0x008000, 0x008000 ) ROM_CONTINUE( 0x090000, 0x008000 ) ROM_CONTINUE( 0x018000, 0x008000 ) ROM_CONTINUE( 0x0a0000, 0x008000 ) ROM_CONTINUE( 0x028000, 0x008000 ) ROM_CONTINUE( 0x0b0000, 0x008000 ) ROM_CONTINUE( 0x038000, 0x008000 ) ROM_CONTINUE( 0x0c0000, 0x008000 ) ROM_CONTINUE( 0x048000, 0x008000 ) ROM_CONTINUE( 0x0d0000, 0x008000 ) ROM_CONTINUE( 0x058000, 0x008000 ) ROM_CONTINUE( 0x0e0000, 0x008000 ) ROM_CONTINUE( 0x068000, 0x008000 ) ROM_CONTINUE( 0x0f0000, 0x008000 ) ROM_CONTINUE( 0x078000, 0x008000 ) ROM_LOAD( "ff2_1.u8", 0x100000, 0x040000, CRC(ea315ac1) SHA1(a85de091882d35bc77dc99677511828ff7c20350) ) ROM_END ROM_START( ffight3b ) // CS101P049-1 PCB ROM_REGION( 0x300000, "user3", ROMREGION_ERASEFF ) ROM_LOAD( "801.u6", 0x000000, 0x080000, CRC(b6c637a7) SHA1(8ab041b9d7ab4318002b11bb876bce8f9764f644) ) ROM_CONTINUE( 0x280000, 0x080000) ROM_LOAD( "801.u7", 0x100000, 0x100000, CRC(efbdd541) SHA1(85c7a674bd976414e916b87239571615d255d7eb) ) ROM_LOAD( "801.u8", 0x200000, 0x080000, CRC(6e2f7309) SHA1(ad5f37d79590c4bc4b1d33432595eb9d53f1bb90) ) ROM_CONTINUE( 0x080000, 0x080000) ROM_END ROM_START( iron ) ROM_REGION( 0x140000, "user3", 0 ) ROM_LOAD( "6.c09.bin", 0x000000, 0x080000, CRC(50ea1457) SHA1(092f9a0e34deeb090b8c88553be3b1596ded60ef) ) ROM_LOAD( "5.c10.bin", 0x080000, 0x080000, CRC(0c3a0b5b) SHA1(1e8ab860689137e0e94731f1af2cfc561492b5bd) ) ROM_LOAD( "4.c11.bin", 0x100000, 0x040000, CRC(2aa417c7) SHA1(24b375e5bbd4be5dcd31b63ea98fbbadd53d543e) ) ROM_END ROM_START( denseib ) ROM_REGION( 0x200000, "user3", ROMREGION_ERASEFF ) ROM_LOAD( "dj.u14", 0x000000, 0x0080000, CRC(487ded13) SHA1(624edce30fe2f2d750bcb49c609ceb511b2279b1) ) ROM_LOAD( "dj.u15", 0x080000, 0x0080000, CRC(5932a440) SHA1(6048372268a097b08d9f56ad30f083267d798165) ) ROM_LOAD( "dj.u16", 0x100000, 0x0080000, CRC(7cb71fd7) SHA1(7673e9dcaabe804e2d637e67eabca1683dad4245) ) ROM_LOAD( "dj.u17", 0x180000, 0x0080000, CRC(de29dd89) SHA1(441aefbc7ee64515ee66431ef504e76dc8dc5ca3) ) ROM_END ROM_START( denseib2 ) ROM_REGION( 0x200000, "user3", ROMREGION_ERASEFF ) ROM_REGION( 0x200000, "user7", 0 ) ROM_LOAD( "u31.bin", 0x000000, 0x080000, CRC(834723a8) SHA1(3f56bba5017f77147e7d52618678f1e2eff4991b) ) ROM_LOAD( "u32.bin", 0x080000, 0x080000, CRC(9748e86b) SHA1(68a62e0961d735602ae6ebd1aca5990c588ccbb1) ) ROM_LOAD( "u33.bin", 0x100000, 0x080000, CRC(abcc6b61) SHA1(ef90f23b674f6dd36b3d60c9c395a1d4bc853798) ) ROM_LOAD( "u34.bin", 0x180000, 0x080000, CRC(0a16ac96) SHA1(ddc11009d4b35a151aa7e357346f3ac109e112ef) ) ROM_END ROM_START( sblast2b ) ROM_REGION( 0x180000, "user3", ROMREGION_ERASEFF ) ROM_REGION( 0x180000, "user7", 0 ) ROM_LOAD( "1.bin", 0x000000, 0x0080000, CRC(bea10c40) SHA1(d9cc65267b9b57145d714f2c17b436c1fb21513f) ) ROM_LOAD( "2.bin", 0x080000, 0x0080000, CRC(57d2b6e9) SHA1(1a7b347101f67b254e2f86294d501b0669431644) ) ROM_LOAD( "3.bin", 0x100000, 0x0080000, CRC(9e63a5ce) SHA1(1d18606fbb28b55a921fc37e1af1aff4caae9003) ) ROM_END ROM_START( sblast2ba) // all 27c4000 ROM_REGION( 0x200000, "user3", ROMREGION_ERASEFF ) ROM_REGION( 0x200000, "user7", 0 ) ROM_LOAD( "u14", 0x000000, 0x080000, CRC(d2bdc126) SHA1(fa8f03b73f2f9b7a159699b764e2c46b5f8a8190) ) ROM_LOAD( "u15", 0x080000, 0x080000, CRC(50f9acb1) SHA1(a86bc98f81dc2c9443fbcd9b5f4880b8d5851ed6) ) ROM_LOAD( "u16", 0x100000, 0x080000, CRC(2a7f40f3) SHA1(e0db49969880af1edbadd8bc5a1bc59a55777d23) ) ROM_LOAD( "u17", 0x180000, 0x080000, CRC(09817173) SHA1(e2ad9e7e1a95cde9ee973647dbd5df83b524978b) ) ROM_END ROM_START( legendsb ) ROM_REGION( 0x100000, "user3", 0 ) ROM_LOAD( "u37_0", 0x000000, 0x080000, BAD_DUMP CRC(44101f23) SHA1(7563886598b290faa616397f7e87a56e2f984b79) ) // U37 ROM is bad, was unable to get stable reads ROM_LOAD( "u37_1", 0x000000, 0x080000, BAD_DUMP CRC(d2e835bb) SHA1(0620e099f43cde95d6b4b210eef13abbff5f40e9) ) ROM_LOAD( "u37_2", 0x000000, 0x008000, BAD_DUMP CRC(1bc6f429) SHA1(eb4e1a483d2aa545a1ba33243afd9693ee5bebd0) ) ROM_CONTINUE( 0x088000, 0x008000 ) ROM_CONTINUE( 0x010000, 0x008000 ) ROM_CONTINUE( 0x098000, 0x008000 ) ROM_CONTINUE( 0x020000, 0x008000 ) ROM_CONTINUE( 0x0a8000, 0x008000 ) ROM_CONTINUE( 0x030000, 0x008000 ) ROM_CONTINUE( 0x0b8000, 0x008000 ) ROM_CONTINUE( 0x040000, 0x008000 ) ROM_CONTINUE( 0x0c8000, 0x008000 ) ROM_CONTINUE( 0x050000, 0x008000 ) ROM_CONTINUE( 0x0d8000, 0x008000 ) ROM_CONTINUE( 0x060000, 0x008000 ) ROM_CONTINUE( 0x0e8000, 0x008000 ) ROM_CONTINUE( 0x070000, 0x008000 ) ROM_CONTINUE( 0x0f8000, 0x008000 ) ROM_LOAD( "u36", 0x080000, 0x008000, CRC(c33a5362) SHA1(537b1b7ef22baa289523fac8f9843db155408c56) ) ROM_CONTINUE( 0x008000, 0x008000 ) ROM_CONTINUE( 0x090000, 0x008000 ) ROM_CONTINUE( 0x018000, 0x008000 ) ROM_CONTINUE( 0x0a0000, 0x008000 ) ROM_CONTINUE( 0x028000, 0x008000 ) ROM_CONTINUE( 0x0b0000, 0x008000 ) ROM_CONTINUE( 0x038000, 0x008000 ) ROM_CONTINUE( 0x0c0000, 0x008000 ) ROM_CONTINUE( 0x048000, 0x008000 ) ROM_CONTINUE( 0x0d0000, 0x008000 ) ROM_CONTINUE( 0x058000, 0x008000 ) ROM_CONTINUE( 0x0e0000, 0x008000 ) ROM_CONTINUE( 0x068000, 0x008000 ) ROM_CONTINUE( 0x0f0000, 0x008000 ) ROM_CONTINUE( 0x078000, 0x008000 ) ROM_END ROM_START( endless ) ROM_REGION( 0x200000, "user3", ROMREGION_ERASEFF ) ROM_REGION( 0x200000, "user7", 0 ) ROM_LOAD( "endlessduel.unknownposition1", 0x000000, 0x80000, CRC(e49acd29) SHA1(ac137261fe7a7691738ac812bea9591256eb9038) ) ROM_LOAD( "endlessduel.unknownposition2", 0x080000, 0x80000, CRC(ad2052f9) SHA1(d61382e3d93eb0bff45fb534cec0ce5ae3626165) ) ROM_LOAD( "endlessduel.unknownposition3", 0x100000, 0x80000, CRC(30d06d7a) SHA1(17c617d94abb10c3bdf9d51013b116f4ef4debe8) ) ROM_LOAD( "endlessduel.unknownposition4", 0x180000, 0x80000, CRC(9a9493ad) SHA1(82ee4fce9cc2014cb8404fd43eebb7941cdb9ac1) ) ROM_END ROM_START( endlessa ) ROM_REGION( 0x200000, "user3", ROMREGION_ERASEFF ) ROM_REGION( 0x200000, "user7", 0 ) ROM_LOAD( "gundam wing endless duel.c23", 0x000000, 0x80000, CRC(e49acd29) SHA1(ac137261fe7a7691738ac812bea9591256eb9038) ) ROM_LOAD( "gundam wing endless duel.c20", 0x080000, 0x80000, CRC(cf22a554) SHA1(86a31c83a1d28038c334949e82182c07010ccb3c) ) ROM_LOAD( "gundam wing endless duel.c22", 0x100000, 0x80000, CRC(30d06d7a) SHA1(17c617d94abb10c3bdf9d51013b116f4ef4debe8) ) ROM_LOAD( "gundam wing endless duel.c21", 0x180000, 0x80000, CRC(0cc430c0) SHA1(fb36359e7e3919244c47a6da43f31dc2a79fcba6) ) ROM_END ROM_START( rushbets ) ROM_REGION( 0x200000, "user3", ROMREGION_ERASEFF ) ROM_REGION( 0x200000, "user7", 0 ) ROM_LOAD( "ic19.bin", 0x000000, 0x80000, CRC(8aa0ad59) SHA1(83facb65c53ade99f1f057a8de27bee4a9c2efd8) ) ROM_LOAD( "ic20.bin", 0x080000, 0x80000, CRC(a8afe28b) SHA1(16d1c4f957804d22dc05a97c56ae10c408dbc1f2) ) ROM_LOAD( "ic21.bin", 0x100000, 0x80000, CRC(2f6e8711) SHA1(fe4030ef3445594455fe93e374a41e9ba2147bf6) ) ROM_LOAD( "ic22.bin", 0x180000, 0x80000, CRC(95a234d2) SHA1(31a556c8ed395f61ba198631ee086c18cc740792) ) ROM_END ROM_START( venom ) ROM_REGION( 0x300000, "user3", ROMREGION_ERASEFF ) ROM_REGION( 0x300000, "user7", 0 ) ROM_LOAD( "u31.bin", 0x000000, 0x0100000, CRC(d1034a76) SHA1(541dd92197ca2e4eb686e426c840aad847d02be8) ) ROM_LOAD( "u32.bin", 0x100000, 0x0100000, CRC(fbe865b0) SHA1(25467a6faa912bf180c5dd7aecee77c3b5f207f8) ) ROM_LOAD( "u33.bin", 0x200000, 0x0080000, CRC(ed874ca2) SHA1(cfc90b38ea2eea07e990f0b72d7c1af2a7076beb) ) ROM_LOAD( "u34.bin", 0x280000, 0x0080000, CRC(7a09c9e0) SHA1(794965d5501ec0e21f1f3a8cb8fd66f913d42760) ) ROM_END ROM_START( wldgunsb ) ROM_REGION( 0x100000, "user3", ROMREGION_ERASEFF ) ROM_REGION( 0x100000, "user7", 0 ) ROM_LOAD( "c19.bin", 0x000000, 0x080000, CRC(59df0dc8) SHA1(d18b7f204ad4e0fcd64c2e2a25d60b64930419e7) ) ROM_LOAD( "c20.bin", 0x080000, 0x080000, CRC(62ae4acb) SHA1(62aa320bcc7eeedb00c70baa909ac0230256c9a4) ) ROM_END } // Anonymous namespace GAME( 199?, kinstb, 0, kinstb, kinstb, snesb_state, init_kinstb, ROT0, "bootleg", "Killer Instinct (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1996, ffight2b, 0, ffight2b, ffight2b, snesb_state, init_ffight2b, ROT0, "bootleg", "Final Fight 2 (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 199?, ffight3b, 0, extrainp, ffight2b, snesb_state, init_ffight3b, ROT0, "bootleg", "Final Fight 3 (SNES bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // based on beta version? protection isn't figured out GAME( 1996, iron, 0, extrainp, iron, snesb_state, init_iron, ROT0, "bootleg", "Iron (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1996, denseib, 0, extrainp, denseib, snesb_state, init_denseib, ROT0, "bootleg", "Ghost Chaser Densei (SNES bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1996, denseib2, denseib, extrainp, denseib, snesb_state, init_denseib2, ROT0, "bootleg", "Ghost Chaser Densei (SNES bootleg, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1997, sblast2b, 0, sblast2b, sblast2b, snesb_state, init_sblast2b, ROT0, "bootleg", "Sonic Blast Man II Special Turbo (SNES bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1997, sblast2ba, sblast2b, base, sblast2b, snesb_state, empty_init, ROT0, "bootleg", "Sonic Blast Man II Special Turbo (SNES bootleg, set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // needs to be descrambled GAME( 1996, endless, 0, endless, endless, snesb_state, init_endless, ROT0, "bootleg", "Gundam Wing: Endless Duel (SNES bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1996, endlessa, endless, endless, endless, snesb_state, init_endless, ROT0, "bootleg", "Gundam Wing: Endless Duel (SNES bootleg, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1996, legendsb, 0, extrainp, kinstb, snesb_state, init_legendsb, ROT0, "bootleg", "Legend (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1997, rushbets, 0, rushbets, rushbets, snesb_state, init_rushbets, ROT0, "bootleg", "Rushing Beat Shura (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1997, venom, 0, venom, venom, snesb_state, init_venom, ROT0, "bootleg", "Venom & Spider-Man - Separation Anxiety (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1996, wldgunsb, 0, wldgunsb, wldgunsb, snesb_state, init_wldgunsb, ROT0, "bootleg", "Wild Guns (SNES bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // based off Japanese version