1
/***************************************************************************
3
Atari Bad Lands hardware
13
****************************************************************************
17
****************************************************************************
19
========================================================================
21
========================================================================
22
000000-03FFFF R xxxxxxxx xxxxxxxx Program ROM
23
FC0000 R -------x -------- Sound command buffer full
24
FC0000 W -------- -------- Sound CPU reset
25
FD0000-FD1FFF R/W -------- xxxxxxxx EEPROM
26
FE0000 W -------- -------- Watchdog reset
27
FE2000 W -------- -------- VBLANK IRQ acknowledge
28
FE4000 R -------- xxxx---- Switch inputs
29
R -------- x------- (Self test)
30
R -------- -x------ (VBLANK)
31
R -------- --x----- (Player 2 button)
32
R -------- ---x---- (Player 1 button)
33
FE6000 R -------- xxxxxxxx Player 1 steering
34
FE6002 R -------- xxxxxxxx Player 2 steering
35
FE6004 R -------- xxxxxxxx Player 1 pedal
36
FE6006 R -------- xxxxxxxx Player 2 pedal
37
FE8000 W xxxxxxxx -------- Sound command write
38
FEA000 R xxxxxxxx -------- Sound response read
39
FEC000 W -------- -------x Playfield tile bank select
40
FEE000 W -------- -------- EEPROM enable
41
FFC000-FFC0FF R/W xxxxxxxx xxxxxxxx Playfield palette RAM (128 entries)
42
R/W x------- -------- (RGB 1 LSB)
43
R/W -xxxxx-- -------- (Red 5 MSB)
44
R/W ------xx xxx----- (Green 5 MSB)
45
R/W -------- ---xxxxx (Blue 5 MSB)
46
FFC100-FFC1FF R/W xxxxxxxx xxxxxxxx Motion object palette RAM (128 entries)
47
FFC200-FFC3FF R/W xxxxxxxx xxxxxxxx Extra palette RAM (256 entries)
48
FFE000-FFEFFF R/W xxxxxxxx xxxxxxxx Playfield RAM (64x32 tiles)
49
R/W xxx----- -------- (Palette select)
50
R/W ---x---- -------- (Tile bank select)
51
R/W ----xxxx xxxxxxxx (Tile index)
52
FFF000-FFFFFF R/W xxxxxxxx xxxxxxxx Motion object RAM (32 entries x 4 words)
53
R/W ----xxxx xxxxxxxx (0: Tile index)
54
R/W xxxxxxxx x------- (1: Y position)
55
R/W -------- ----xxxx (1: Number of Y tiles - 1)
56
R/W xxxxxxxx x------- (3: X position)
57
R/W -------- ----x--- (3: Priority)
58
R/W -------- -----xxx (3: Palette select)
59
========================================================================
62
IRQ2 = sound CPU communications
63
========================================================================
66
========================================================================
67
SOUND CPU (based on JSA II, but implemented onboard)
68
========================================================================
69
0000-1FFF R/W xxxxxxxx Program RAM
70
2000-2001 R/W xxxxxxxx YM2151 communications
71
2802 R xxxxxxxx Sound command read
72
2804 R xxxx--xx Status input
73
R x------- (Self test)
74
R -x------ (Sound command buffer full)
75
R --x----- (Sound response buffer full)
76
R ---x---- (Self test)
77
R ------xx (Coin inputs)
78
2806 R/W -------- IRQ acknowledge
79
2A02 W xxxxxxxx Sound response write
80
2A04 W xxxx---x Sound control
81
W xx------ (ROM bank select)
82
W --xx---- (Coin counters)
83
W -------x (YM2151 reset)
84
3000-3FFF R xxxxxxxx Banked ROM
85
4000-FFFF R xxxxxxxx Program ROM
86
========================================================================
88
IRQ = timed interrupt ORed with YM2151 interrupt
89
NMI = latch on sound command
90
========================================================================
100
|-------------------------------------------------|
101
|TDA2030 LM324 ROM.2N ROM.2S ROM.2U|
102
|VOL LM324 ROM.4N ROM.4S ROM.4U|
105
| ROM.9C PAL2 ROM.10R 10T |
106
|J 6502 ROM.14R ROM.14T|
108
|M 14.31818MHz PAL4 VMA |
110
|A VGC7205 ROM.17F PAL5 |
111
| TEST_SW 68000 ROM.20F SOS |
112
| NE556 PAL1 ROM.24F PAL6 6264 |
113
|LED DIP20 ROM.27F 2816 |
114
|-------------------------------------------------|
116
68000 - clock 7.15909MHz [14.31818/2]
117
6502 - clock 1.7897725 [14.31818/8]
118
YM2151 - clock 3.579545MHz [14.31818/4]
119
VGC7205- VLSI VGC7205A0672 ATARI 137304-2002
121
DIP20 - socket not populated
122
SOS - Motorola (rebadged) SOS-137550-001 ZKZKAA8946
123
VMA - Motorola (rebadged) VMA-137552-001 ZKZKAB8948
124
MB87316- Fujitsu MB87316 137536-001 with clock input 7.15909MHz
125
Listed in Jed Margolin's Atari Approved Vendor List
126
(http://www.jmargolin.com/schem/atariavl.htm) as.....
127
137536-001 IC,Line_Buffer(LB),CMOS,672B_RAM,500_Gate,40pin FUJITSU MB87316
131
------------------------
136
27F 136074-1006 xxxx (byte checksum unreadable)
149
PAL1 - Lattice GAL16V8 labelled '136074-1001'
150
PAL2 - Lattice GAL16V8 labelled '136074-1005'
151
PAL3 - Lattice GAL16V8 labelled '136074-1004'
152
PAL4 - Lattice GAL16V8 labelled '136074-1003'
153
PAL5 - Lattice GAL16V8 labelled '136074-1002'
154
PAL6 - Lattice GAL16V8 labelled '136074-2000'
161
****************************************************************************/
165
#include "cpu/z80/z80.h"
166
#include "cpu/m68000/m68000.h"
167
#include "cpu/m6502/m6502.h"
168
#include "sound/2151intf.h"
169
#include "video/atarimo.h"
170
#include "includes/badlands.h"
174
/*************************************
178
*************************************/
180
static void update_interrupts(running_machine &machine)
182
badlands_state *state = machine.driver_data<badlands_state>();
183
cputag_set_input_line(machine, "maincpu", 1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
184
cputag_set_input_line(machine, "maincpu", 2, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
188
static void scanline_update(screen_device &screen, int scanline)
190
address_space *space = screen.machine().device("audiocpu")->memory().space(AS_PROGRAM);
192
/* sound IRQ is on 32V */
194
atarigen_6502_irq_ack_r(space, 0);
195
else if (!(input_port_read(screen.machine(), "FE4000") & 0x40))
196
atarigen_6502_irq_gen(screen.machine().device("audiocpu"));
200
static MACHINE_START( badlands )
202
badlands_state *state = machine.driver_data<badlands_state>();
204
atarigen_init(machine);
206
state->save_item(NAME(state->m_pedal_value));
210
static MACHINE_RESET( badlands )
212
badlands_state *state = machine.driver_data<badlands_state>();
214
state->m_pedal_value[0] = state->m_pedal_value[1] = 0x80;
216
atarigen_eeprom_reset(state);
217
atarigen_interrupt_reset(state, update_interrupts);
218
atarigen_scanline_timer_reset(*machine.primary_screen, scanline_update, 32);
220
atarigen_sound_io_reset(machine.device("audiocpu"));
221
memcpy(state->m_bank_base, &state->m_bank_source_data[0x0000], 0x1000);
226
/*************************************
230
*************************************/
232
static INTERRUPT_GEN( vblank_int )
234
badlands_state *state = device->machine().driver_data<badlands_state>();
235
int pedal_state = input_port_read(device->machine(), "PEDALS");
238
/* update the pedals once per frame */
239
for (i = 0; i < 2; i++)
241
state->m_pedal_value[i]--;
242
if (pedal_state & (1 << i))
243
state->m_pedal_value[i]++;
246
atarigen_video_int_gen(device);
251
/*************************************
255
*************************************/
257
static READ16_HANDLER( sound_busy_r )
259
badlands_state *state = space->machine().driver_data<badlands_state>();
261
if (state->m_cpu_to_sound_ready) temp ^= 0x0100;
266
static READ16_HANDLER( pedal_0_r )
268
badlands_state *state = space->machine().driver_data<badlands_state>();
269
return state->m_pedal_value[0];
273
static READ16_HANDLER( pedal_1_r )
275
badlands_state *state = space->machine().driver_data<badlands_state>();
276
return state->m_pedal_value[1];
281
/*************************************
285
*************************************/
287
static READ8_HANDLER( audio_io_r )
289
badlands_state *state = space->machine().driver_data<badlands_state>();
292
switch (offset & 0x206)
294
case 0x000: /* n/c */
295
logerror("audio_io_r: Unknown read at %04X\n", offset & 0x206);
298
case 0x002: /* /RDP */
299
result = atarigen_6502_sound_r(space, offset);
302
case 0x004: /* /RDIO */
305
0x40 = NMI line state (active low)
306
0x20 = sound output full
313
result = input_port_read(space->machine(), "AUDIO");
314
if (!(input_port_read(space->machine(), "FE4000") & 0x0080)) result ^= 0x90;
315
if (state->m_cpu_to_sound_ready) result ^= 0x40;
316
if (state->m_sound_to_cpu_ready) result ^= 0x20;
320
case 0x006: /* /IRQACK */
321
atarigen_6502_irq_ack_r(space, 0);
324
case 0x200: /* /VOICE */
325
case 0x202: /* /WRP */
326
case 0x204: /* /WRIO */
327
case 0x206: /* /MIX */
328
logerror("audio_io_r: Unknown read at %04X\n", offset & 0x206);
336
static WRITE8_HANDLER( audio_io_w )
338
badlands_state *state = space->machine().driver_data<badlands_state>();
340
switch (offset & 0x206)
342
case 0x000: /* n/c */
343
case 0x002: /* /RDP */
344
case 0x004: /* /RDIO */
345
logerror("audio_io_w: Unknown write (%02X) at %04X\n", data & 0xff, offset & 0x206);
348
case 0x006: /* /IRQACK */
349
atarigen_6502_irq_ack_r(space, 0);
352
case 0x200: /* n/c */
353
case 0x206: /* n/c */
356
case 0x202: /* /WRP */
357
atarigen_6502_sound_w(space, offset, data);
360
case 0x204: /* WRIO */
363
0x20 = coin counter 2
364
0x10 = coin counter 1
368
0x01 = YM2151 reset (active low)
371
/* update the bank */
372
memcpy(state->m_bank_base, &state->m_bank_source_data[0x1000 * ((data >> 6) & 3)], 0x1000);
379
/*************************************
381
* Main CPU memory handlers
383
*************************************/
385
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16 )
386
AM_RANGE(0x000000, 0x03ffff) AM_ROM
387
AM_RANGE(0xfc0000, 0xfc1fff) AM_READWRITE(sound_busy_r, atarigen_sound_reset_w)
388
AM_RANGE(0xfd0000, 0xfd1fff) AM_READWRITE(atarigen_eeprom_r, atarigen_eeprom_w) AM_SHARE("eeprom")
389
AM_RANGE(0xfe0000, 0xfe1fff) AM_WRITE(watchdog_reset16_w)
390
AM_RANGE(0xfe2000, 0xfe3fff) AM_WRITE(atarigen_video_int_ack_w)
391
AM_RANGE(0xfe4000, 0xfe5fff) AM_READ_PORT("FE4000")
392
AM_RANGE(0xfe6000, 0xfe6001) AM_READ_PORT("FE6000")
393
AM_RANGE(0xfe6002, 0xfe6003) AM_READ_PORT("FE6002")
394
AM_RANGE(0xfe6004, 0xfe6005) AM_READ(pedal_0_r)
395
AM_RANGE(0xfe6006, 0xfe6007) AM_READ(pedal_1_r)
396
AM_RANGE(0xfe8000, 0xfe9fff) AM_WRITE(atarigen_sound_upper_w)
397
AM_RANGE(0xfea000, 0xfebfff) AM_READ(atarigen_sound_upper_r)
398
AM_RANGE(0xfec000, 0xfedfff) AM_WRITE(badlands_pf_bank_w)
399
AM_RANGE(0xfee000, 0xfeffff) AM_WRITE(atarigen_eeprom_enable_w)
400
AM_RANGE(0xffc000, 0xffc3ff) AM_RAM_WRITE(atarigen_expanded_666_paletteram_w) AM_BASE_GENERIC(paletteram)
401
AM_RANGE(0xffe000, 0xffefff) AM_RAM_WRITE(atarigen_playfield_w) AM_BASE_MEMBER(badlands_state, m_playfield)
402
AM_RANGE(0xfff000, 0xfff1ff) AM_READWRITE(atarimo_0_spriteram_r, atarimo_0_spriteram_expanded_w)
403
AM_RANGE(0xfff200, 0xffffff) AM_RAM
408
/*************************************
410
* Sound CPU memory handlers
412
*************************************/
414
static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8 )
415
AM_RANGE(0x0000, 0x1fff) AM_RAM
416
AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE("ymsnd", ym2151_r, ym2151_w)
417
AM_RANGE(0x2800, 0x2bff) AM_READWRITE(audio_io_r, audio_io_w)
418
AM_RANGE(0x3000, 0xffff) AM_ROM
423
/*************************************
427
*************************************/
429
static INPUT_PORTS_START( badlands )
430
PORT_START("FE4000") /* fe4000 */
431
PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED )
432
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
433
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
434
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_VBLANK )
435
PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
436
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
438
PORT_START("FE6000") /* fe6000 */
439
PORT_BIT( 0x00ff, 0, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1)
440
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
442
PORT_START("FE6002") /* fe6002 */
443
PORT_BIT( 0x00ff, 0, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2)
444
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
446
PORT_START("AUDIO") /* audio port */
447
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
448
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
449
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )
450
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
451
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* self test */
452
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* response buffer full */
453
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) /* command buffer full */
454
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* self test */
456
PORT_START("PEDALS") /* fake for pedals */
457
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
458
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
459
PORT_BIT( 0xfffc, IP_ACTIVE_HIGH, IPT_UNUSED )
464
/*************************************
466
* Graphics definitions
468
*************************************/
470
static const gfx_layout pflayout =
476
{ 0, 4, 8, 12, 16, 20, 24, 28 },
477
{ 0*8, 4*8, 8*8, 12*8, 16*8, 20*8, 24*8, 28*8 },
482
static const gfx_layout molayout =
488
{ 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 },
489
{ 0*8, 8*8, 16*8, 24*8, 32*8, 40*8, 48*8, 56*8 },
494
static GFXDECODE_START( badlands )
495
GFXDECODE_ENTRY( "gfx1", 0, pflayout, 0, 8 )
496
GFXDECODE_ENTRY( "gfx2", 0, molayout, 128, 8 )
501
/*************************************
505
*************************************/
507
static MACHINE_CONFIG_START( badlands, badlands_state )
509
/* basic machine hardware */
510
MCFG_CPU_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
511
MCFG_CPU_PROGRAM_MAP(main_map)
512
MCFG_CPU_VBLANK_INT("screen", vblank_int)
514
MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8)
515
MCFG_CPU_PROGRAM_MAP(audio_map)
517
MCFG_MACHINE_START(badlands)
518
MCFG_MACHINE_RESET(badlands)
519
MCFG_NVRAM_ADD_1FILL("eeprom")
522
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
523
MCFG_GFXDECODE(badlands)
524
MCFG_PALETTE_LENGTH(256)
526
MCFG_SCREEN_ADD("screen", RASTER)
527
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
528
/* note: these parameters are from published specs, not derived */
529
/* the board uses an SOS-2 chip to generate video signals */
530
MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240)
531
MCFG_SCREEN_UPDATE(badlands)
533
MCFG_VIDEO_START(badlands)
536
MCFG_SPEAKER_STANDARD_MONO("mono")
538
MCFG_SOUND_ADD("ymsnd", YM2151, ATARI_CLOCK_14MHz/4)
539
MCFG_SOUND_ROUTE(0, "mono", 0.30)
540
MCFG_SOUND_ROUTE(1, "mono", 0.30)
545
/*************************************
549
*************************************/
551
ROM_START( badlands )
552
ROM_REGION( 0x40000, "maincpu", 0 ) /* 4*64k for 68000 code */
553
ROM_LOAD16_BYTE( "136074-1008.20f", 0x00000, 0x10000, CRC(a3da5774) SHA1(5ab1eb61d25594b2d7c40400cb57e7f47a717598) )
554
ROM_LOAD16_BYTE( "136074-1006.27f", 0x00001, 0x10000, CRC(aa03b4f3) SHA1(5eda60c715ffcefd4ad34bdb90579e8671dc384a) )
555
ROM_LOAD16_BYTE( "136074-1009.17f", 0x20000, 0x10000, CRC(0e2e807f) SHA1(5b61de066dca12c44335aa68a13c821845657866) )
556
ROM_LOAD16_BYTE( "136074-1007.24f", 0x20001, 0x10000, CRC(99a20c2c) SHA1(9b0a5a5dafb8816e72330d302c60339b600b49a8) )
558
ROM_REGION( 0x14000, "audiocpu", 0 ) /* 64k for 6502 code */
559
ROM_LOAD( "136074-1018.9c", 0x10000, 0x4000, CRC(a05fd146) SHA1(d97abbcf7897ca720cc18ff3a323f41cd3b23c34) )
560
ROM_CONTINUE( 0x04000, 0xc000 )
562
ROM_REGION( 0x60000, "gfx1", ROMREGION_INVERT )
563
ROM_LOAD( "136074-1012.4n", 0x000000, 0x10000, CRC(5d124c6c) SHA1(afebaaf90b3751f5e873fc4c45f1d5385ef86a6e) ) /* playfield */
564
ROM_LOAD( "136074-1013.2n", 0x010000, 0x10000, CRC(b1ec90d6) SHA1(8d4c7db8e1bf9c050f5869eb38fa573867fdc12b) )
565
ROM_LOAD( "136074-1014.4s", 0x020000, 0x10000, CRC(248a6845) SHA1(086ef0840b889e790ce3fcd09f98589aae932456) )
566
ROM_LOAD( "136074-1015.2s", 0x030000, 0x10000, CRC(792296d8) SHA1(833cdb968064151ca77bb3dbe416ff7127a12de4) )
567
ROM_LOAD( "136074-1016.4u", 0x040000, 0x10000, CRC(878f7c66) SHA1(31159bea5d6aac8100fca8f3860220b97d63e72e) )
568
ROM_LOAD( "136074-1017.2u", 0x050000, 0x10000, CRC(ad0071a3) SHA1(472b197e5d320b3424d8a8d8c051b1023a07ae08) )
570
ROM_REGION( 0x30000, "gfx2", ROMREGION_INVERT )
571
ROM_LOAD( "136074-1010.14r", 0x000000, 0x10000, CRC(c15f629e) SHA1(944e3479dce6e420cf9a3f4c1438c5ca66e5cb97) ) /* mo */
572
ROM_LOAD( "136074-1011.10r", 0x010000, 0x10000, CRC(fb0b6717) SHA1(694ab0f04d673682831a24027757d4b3c40a4e0e) )
573
ROM_LOAD( "136074-1019.14t", 0x020000, 0x10000, CRC(0e26bff6) SHA1(ee018dd37a27c7e7c16a57ea0d32aeb9cdf26bb4) )
575
ROM_REGION( 0x0800, "plds", 0 )
576
ROM_LOAD( "gal16v8-1001.26c", 0x0000, 0x0117, CRC(04c3be6a) SHA1(f027834e652f3ff778b09c3754294b303f9ed826) )
577
ROM_LOAD( "gal16v8-1002.21r", 0x0200, 0x0117, CRC(f68bf41d) SHA1(72edd6d0f5d55d39c0020f384149de7ac964f273) )
578
ROM_LOAD( "gal16v8-1003.16s", 0x0400, 0x0117, CRC(a288bbd0) SHA1(62f5900ac88ffb335257f58d892492f370805498) )
579
ROM_LOAD( "gal16v8-1005.12e", 0x0600, 0x0117, CRC(9df77c79) SHA1(52c1c190b80db9b9bc43ce6eefd5f37ac16e590c) )
584
/*************************************
586
* Driver initialization
588
*************************************/
590
static DRIVER_INIT( badlands )
592
badlands_state *state = machine.driver_data<badlands_state>();
594
/* initialize the audio system */
595
state->m_bank_base = &machine.region("audiocpu")->base()[0x03000];
596
state->m_bank_source_data = &machine.region("audiocpu")->base()[0x10000];
601
/*************************************
605
*************************************/
607
GAME( 1989, badlands, 0, badlands, badlands, badlands, ROT0, "Atari Games", "Bad Lands", 0 )
609
/* Badlands - Playmark Bootleg support - split this into its own file?
616
sound ics: YM2151 + 3012
618
other ics: 28c16 2kx8 eeprom.Used to store bookeeping,settings etc. like original pcb.
624
blb21, blb22, blb27, blb28 main program
626
blb29 to blb40 graphics
628
All eproms are 27c512
632
This romset comes from a bootleg pcb produced by Playmark.This pcb was been modified to use as control standard joysticks instead of steering wheels.Game differences are: Copyright string removed.
636
static READ16_HANDLER( badlandsb_unk_r )
642
static ADDRESS_MAP_START( bootleg_map, AS_PROGRAM, 16 )
643
AM_RANGE(0x000000, 0x03ffff) AM_ROM
646
AM_RANGE(0x400008, 0x400009) AM_READ(badlandsb_unk_r )
647
AM_RANGE(0x4000fe, 0x4000ff) AM_READ(badlandsb_unk_r )
649
AM_RANGE(0xfc0000, 0xfc0001) AM_READ(badlandsb_unk_r )
651
AM_RANGE(0xfe4000, 0xfe4001) AM_READ(badlandsb_unk_r )
652
AM_RANGE(0xfe4004, 0xfe4005) AM_READ(badlandsb_unk_r )
653
AM_RANGE(0xfe4006, 0xfe4007) AM_READ(badlandsb_unk_r )
656
AM_RANGE(0xfd0000, 0xfd1fff) AM_READWRITE(atarigen_eeprom_r, atarigen_eeprom_w) AM_SHARE("eeprom")
657
//AM_RANGE(0xfe0000, 0xfe1fff) AM_WRITE(watchdog_reset16_w)
658
AM_RANGE(0xfe2000, 0xfe3fff) AM_WRITE(atarigen_video_int_ack_w)
660
AM_RANGE(0xfec000, 0xfedfff) AM_WRITE(badlands_pf_bank_w)
661
AM_RANGE(0xfee000, 0xfeffff) AM_WRITE(atarigen_eeprom_enable_w)
662
AM_RANGE(0xffc000, 0xffc3ff) AM_RAM_WRITE(atarigen_expanded_666_paletteram_w) AM_BASE_GENERIC(paletteram)
663
AM_RANGE(0xffe000, 0xffefff) AM_RAM_WRITE(atarigen_playfield_w) AM_BASE_MEMBER(badlands_state, m_playfield)
664
AM_RANGE(0xfff000, 0xfff1ff) AM_READWRITE(atarimo_0_spriteram_r, atarimo_0_spriteram_expanded_w)
665
AM_RANGE(0xfff200, 0xffffff) AM_RAM
669
static const gfx_layout pflayout_bootleg =
674
{ RGN_FRAC(0,4), RGN_FRAC(1,4), RGN_FRAC(2,4), RGN_FRAC(3,4) },
675
{ 0, 1, 2, 3, 4, 5, 6, 7 },
676
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
680
static GFXDECODE_START( badlandsb )
681
GFXDECODE_ENTRY( "gfx1", 0, pflayout_bootleg, 0, 8 )
682
GFXDECODE_ENTRY( "gfx2", 0, molayout, 128, 8 )
685
static void update_interrupts_bootleg(running_machine &machine)
687
badlands_state *state = machine.driver_data<badlands_state>();
688
cputag_set_input_line(machine, "maincpu", 1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
692
static void scanline_update_bootleg(screen_device &screen, int scanline)
694
/* sound IRQ is on 32V */
695
// if (scanline & 32)
696
// atarigen_6502_irq_ack_r(screen->machine(), 0);
697
// else if (!(input_port_read(machine, "FE4000") & 0x40))
698
// atarigen_6502_irq_gen(screen->machine().device("audiocpu"));
703
static MACHINE_RESET( badlandsb )
705
badlands_state *state = machine.driver_data<badlands_state>();
706
// state->m_pedal_value[0] = state->m_pedal_value[1] = 0x80;
708
atarigen_eeprom_reset(state);
709
atarigen_interrupt_reset(state, update_interrupts_bootleg);
710
atarigen_scanline_timer_reset(*machine.primary_screen, scanline_update_bootleg, 32);
712
// atarigen_sound_io_reset(machine.device("audiocpu"));
713
// memcpy(state->m_bank_base, &state->m_bank_source_data[0x0000], 0x1000);
716
static MACHINE_CONFIG_START( badlandsb, badlands_state )
718
/* basic machine hardware */
719
MCFG_CPU_ADD("maincpu", M68000, XTAL_28MHz/4) /* Divisor estimated */
720
MCFG_CPU_PROGRAM_MAP(bootleg_map)
721
MCFG_CPU_VBLANK_INT("screen", vblank_int)
723
// MCFG_CPU_ADD("audiocpu", Z80, XTAL_20MHz/12) /* Divisor estimated */
724
// MCFG_CPU_PROGRAM_MAP(bootleg_soundmap)
726
MCFG_MACHINE_START(badlands)
727
MCFG_MACHINE_RESET(badlandsb)
728
MCFG_NVRAM_ADD_1FILL("eeprom")
731
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
732
MCFG_GFXDECODE(badlandsb)
733
MCFG_PALETTE_LENGTH(256)
735
MCFG_SCREEN_ADD("screen", RASTER)
736
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
737
/* note: these parameters are from published specs, not derived */
738
/* the board uses an SOS-2 chip to generate video signals */
739
MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240)
740
MCFG_SCREEN_UPDATE(badlands)
742
MCFG_VIDEO_START(badlands)
745
MCFG_SPEAKER_STANDARD_MONO("mono")
747
MCFG_SOUND_ADD("ymsnd", YM2151, XTAL_20MHz/8) /* Divisor estimated */
748
MCFG_SOUND_ROUTE(0, "mono", 0.30)
749
MCFG_SOUND_ROUTE(1, "mono", 0.30)
754
/* bootleg by Playmark, uses Joystick controls */
755
ROM_START( badlandsb )
756
/* bootleg 68k Program */
757
ROM_REGION( 0x40000, "maincpu", 0 ) /* 4*64k for 68000 code */
758
ROM_LOAD16_BYTE( "blb28.ic21", 0x00000, 0x10000, CRC(dffb025d) SHA1(f2c17607acbbeee7d5d3f3dd2e8dc768b755e991) )
759
ROM_LOAD16_BYTE( "blb22.ic22", 0x00001, 0x10000, CRC(ca3015c4) SHA1(72e1451498143d920239487704f4b4a8a71410e0) )
760
ROM_LOAD16_BYTE( "blb27.ic19", 0x20000, 0x10000, CRC(0e2e807f) SHA1(5b61de066dca12c44335aa68a13c821845657866) )
761
ROM_LOAD16_BYTE( "blb21.ic20", 0x20001, 0x10000, CRC(99a20c2c) SHA1(9b0a5a5dafb8816e72330d302c60339b600b49a8) )
763
/* Z80 on the bootleg! */
764
ROM_REGION( 0x10000, "cpu1", 0 )
765
ROM_LOAD( "blb26.ic27", 0x00000, 0x10000, CRC(59503ab4) SHA1(ea5686ee28f6125c1394d687cc35c6322c8f900c) )
767
/* the 2nd half of 122,123,124 and 125 is identical to the first half and not used */
768
ROM_REGION( 0x80000, "gfx1", 0 )
769
ROM_LOAD( "blb36.ic123", 0x000000, 0x10000, BAD_DUMP CRC(d7978eeb) SHA1(1adc95bebe9eea8c112d40cd04ab7a8d75c4f961) ) /* bad dump -- empty */
770
ROM_LOAD( "blb37.ic92", 0x008000, 0x10000, CRC(9188db9f) SHA1(8f7dc2c4c0dec9a80b6214a2efaa0de0858de84c) )
771
ROM_LOAD( "blb38.ic125", 0x020000, 0x10000, CRC(4839dd54) SHA1(031efbc144e5e088be0f3576aa514c7c2b775f6d) )
772
ROM_LOAD( "blb31.ic91", 0x028000, 0x10000, BAD_DUMP CRC(77e3dabc) SHA1(fa3c93f37ab11cfe82cf17c25ec2f9b8bee8a64e) ) /* bad dump -- BADADDR xxxx-xxxxxxxxxxx */
773
ROM_LOAD( "blb30.ic122", 0x040000, 0x10000, CRC(61a1bcec) SHA1(fd38bbf8f6c8d1e0e936740db757f9fa85753503) )
774
ROM_LOAD( "blb35.ic90", 0x048000, 0x10000, CRC(649c17f0) SHA1(bed3b7fc2c0516fe309bb81b65d8925ecf3065e4) )
775
ROM_LOAD( "blb32.ic124", 0x060000, 0x10000, CRC(a67c61ba) SHA1(d701eb7f4520b57be54a7113d39f81d52800ee7e) )
776
ROM_LOAD( "blb29.ic88", 0x068000, 0x10000, CRC(a9f280e5) SHA1(daff021d14f17da8c4469270a1e50e5a01d05d49) )
778
/* the 1st half of 67 & 68 are empty and not used */
779
ROM_REGION( 0x40000, "gfx2", 0 )
780
ROM_LOAD16_BYTE( "blb33.ic67", 0x10001, 0x10000, CRC(aebf9938) SHA1(3778aacbde07e5a5d010e41ab62d5b0db8632ad8) )
781
ROM_LOAD16_BYTE( "blb34.ic34", 0x00001, 0x10000, CRC(3eac30a5) SHA1(deefc668185bf30ad3eeba73853f97ce12b85293) )
782
ROM_LOAD16_BYTE( "blb39.ic68", 0x10000, 0x10000, CRC(f398f2d7) SHA1(1eef64680101888425490eb4d5b86072e59753cf) )
783
ROM_LOAD16_BYTE( "blb40.ic35", 0x00000, 0x10000, CRC(b47679ee) SHA1(0bd7d40dad214c54021c2014efbd374a7e4c7a3f) )
787
GAME( 1989, badlandsb, badlands, badlandsb, badlands, 0, ROT0, "bootleg (Playmark)", "Bad Lands (bootleg)", GAME_NOT_WORKING )