Permalink
Fetching contributors…
Cannot retrieve contributors at this time
12208 lines (10033 sloc) 568 KB
// license:BSD-3-Clause
// copyright-holders:Luca Elia
/***************************************************************************
-= Seta Hardware =-
driver by Luca Elia (l.elia@tin.it)
CPU : 68000 + [65C02] (only in the earlier games)
Custom : X1-001A, X1-002A (SDIP64) Sprites
X1-001
X1-002
X1-003 or X1-007 (SDIP42) Video blanking (feeds RGB DACs)
X1-004 (SDIP52) Inputs
X1-005
X1-006 (SDIP64) Palette
X1-010 (QFP80) Sound: 16 Bit PCM
X1-011 (QFP80) Graphics mixing
X1-012 (QFP100) Tilemaps
X1-014 Sprites?
-------------------------------------------------------------------------------
Ordered by Board Year + Game Licensed To
-------------------------------------------------------------------------------
P0-029-A (M6100287A) 88 Thundercade / Twin Formation (1) Taito
P0-034A (M6100326A) 88 Twin Eagle Taito
P0-044B 88 Caliber 50 Taito / RomStar
P0-045A (M6100429A) 89 DownTown Taito / RomStar
P0-045A 89 Arbalester Taito / RomStar
P0-046A (M6100430A) 89 U.S. Classic(2) Taito / RomStar
P0-047A 89 The Roulette Visco
P1-036-A + P0-045-A +
P1-049A 89 Meta Fox Taito / RomStar
P0-053-1 89 Castle of Dragon/Dragon Unit Taito / RomStar / Athena
P0-053A 91 Strike Gunner S.T.G Athena / Tecmo
P0-053A 92 Quiz Kokology Tecmo
P0-055B 89 Wit's Athena
P0-055D 90 Thunder & Lightning Romstar / Visco
Promat PCB 94 Wiggie Waggie(5) --
Promat PCB 94 Super Bar(5) --
P0-058A 90 Jockey Club Visco
P0-058C 98 International Toote (6) Coinmaster (bootleg)
P0-063A 91 Rezon Allumer
P0-068B (M6100723A) 92 Block Carnival Visco
P0-072-2 (prototype) 92 Blandia (prototype) Allumer
P0-077A (BP922) 92 Ultraman Club Banpresto
P0-078A 92 Blandia (7) Allumer
P0-079A 92 Zing Zing Zip Allumer / Tecmo
P0-079A 94 Eight Forces Tecmo
P0-080A (BP923) 92 SD Gundam Neo Battling (3) Banpresto
? 93 Athena no Hatena? Athena
? (93111A) 93 J.J.Squawkers Athena / Able
? (93111A) 93 War Of Aero Yang Cheng
P0-081A (BP933KA) 93 Mobile Suit Gundam Banpresto
P0-083A (BP931) 93 Ultra Toukon Densetsu Banpresto / Tsuburaya Prod.
P0-092A 93 Daioh Athena
P0-072-2 (prototype) 93 Daioh(prototype) Athena
? (93111A) 93 Daioh(conversion) Athena
P0-096A (BP934KA) 93 Kamen Rider Banpresto
P0-097A 93 Oishii Puzzle .. Sunsoft + Atlus
bootleg 9? Triple Fun (4) bootleg (Comad?)
P0-100A 93 Quiz Kokology 2 Tecmo
P0-101-1 94 Pro Mahjong Kiwame Athena
P0-102A 93 Mad Shark Allumer
P0-107A (prototype?) 94 Orbs (prototype?) American Sammy
P0-107A 93 Kero Kero Keroppi no Issyoni Asobou Sammy Industries [added Chack'n, Hau]
P0-111A 94 Magical Speed Allumer
P0-114A (SKB-001) 94 Krazy Bowl American Sammy
P0-117A (DH-01) 95 Extreme Downhill Sammy Japan
P0-117A? 95 Sokonuke Taisen Game Sammy Industries
P0-120A (BP954KA) 95 Gundhara Banpresto
P0-122A (SZR-001) 95 Zombie Raid American Sammy
? 96 Crazy Fight Subsino
-------------------------------------------------------------------------------
(1) YM2203 + YM3812 instead of X1-010
(2) wrong colors
(3) Same board as "Ultraman Club" despite the different PCB number
(4) this is a bootleg of Oishii Puzzle, in english, is there an official
version? the sound system has been replaced with an OKI M6295
hardware is definitely bootleg. standard simple layout board with no
custom chips and no manufacturer on the pcb.
(5) The game code is based on Thunder and Lightning but the PCB is custom
there are a few gfx emulation bugs (flipping of some border tiles and
sprites not leaving the screen correctly) its possible the custom hw
doesn't behave *exactly* the same as the original seta hw
(6) To enter test mode press O (open door), then F2 (turn function key), then E (bet 3-4).
(7) Bad tilemaps colors in demo mode are real game bug. Fade-in and fade-out "bad" colors are also right.
Bad sprites priorities are real game bugs. The bad-looking colors in Jurane stage are right.
Notes:
- The NEC D4701 used by Caliber 50 is a mouse interface IC (uPD4701c).
Of course it's used to control the spinners. U.S. Classic also uses one to control both trackballs.
- DownTown receives the joystick rotation counts through a pair of JST13 connectors (CN1, CN2).
On Meta Fox, these connectors are present but unused; they are not populated on Arbalester.
- jjsquawk is modified from jjsquawko so nuts don't fall from the trees shaken by white animal.
DIP Locations verified from manuals for:
- Zing Zing Zip
- Extreme Downhill
- Kero Kero Keroppi's Let's Play Together
TODO:
- I think the best way to correctly align tilemaps and sprites and account for
both flipping and different visible areas is to have a table with per game
vertical and horizontal offsets for sprites, tilemaps and possibly the "floating
tilemaps" (made of sprites) for both the flipped and normal screen cases.
Current issues: metafox test grid not aligned when screen flipped, madshark & utoukond
("floating tilemaps" sprites when flipped)
krzybowl not aligned vertically when screen flipped
zombraid not aligned when flipped vertically or horizontally
- bad sound in sokonuke?
- in msgunda1, colors for the score display screw up after the second animation
in attract mode. The end of the animation also has garbled sprites.
Note that the animation is not present in msgundam.
- Some games: battery backed portion of RAM (e.g. downtown, kiwame, zombraid)
- the zombraid crosshair hack can go if the nvram regions are figured out.
- Some games: programmable timer that generates IRQ. See e.g. gundhara:
lev 4 is triggerd by writes at d00000-6 and drives the sound.
See also msgundam.
- tndrcade: lots of flickering sprites
- drgnunit sprite/bg unaligned when screen flipped (check I/O test in service mode)
- extdwnhl has some wrong colored tiles in one of the attract mode images and in
later tracks.
- oisipuzl doesn't support screen flip? tilemap flipping is also kludged in the video driver.
- eightfrc has alignment problems both flipped and not
- flip screen and mirror support not working correctly in zombraid
- gundhara visible area might be smaller (zombraid uses the same MachineDriver, and
the current area is right for it)
- crazyfgt: emulate protection & tickets, fix graphics glitches, find correct clocks,
level 2 interrupt should probably be triggered by the 3812 but sound tends to die that way.
- jjsquawk: Player's shot sound is missing (not requested to X1-010?).
Many sounds are wrong since MAME 0.62.
i.e.
all scene: when you beat enemies or yellow walking eggs
stage 1: weasels throw eggs, white animals (shaking trees) are damaged, rabbit jump
stage 2: when BOX-MEN gets angry
- games using 6bpp gfx switch tilemaps color mode. Only blandia uses both, while the other ones use only mode 1, thus mode 0 is untested for them
***************************************************************************/
/***************************************************************************
Thundercade / Twin Formation
Taito America Corp./Romstar USA/Seta, 1987
PCB Layout
---------
M6100287A
P0-029-A
|------------------------------------------------------------------|
|M L K J H G F E D C B A1|
|A UA0-4 UA0-3 4364 UA0-2 UA0-1 4364 16MHz |
| X1-001 X1-002 2|
| 68000 |
| |
| 3|
| |
| |
| 4364 4364 UA0-9 UA0-8 UA0-7 UA0-6 4|
| |
| |
| 5|
| 4584 |
| |
| RESET_SW UA0-13 UA0-12 UA0-11 UA0-10 6|
| 4050 TL7705 |
| |
| 7|
| X0-006 |
| |
| SW1 8|
| UA10-5 2016 YM3812 YM2203 |
| YM3014 SW2 X1-006 9|
|VOL 4558 YM3014 M54528 X1-004 |
| 10|
| X2-003 X2-003 X2-003 X1-003 |
| 11|
| |--| JAMMA |--| |
|------------| |----------------------------------| |------------|
Notes:
68000 - clock 8.000MHz [16/2]
YM3812 - clock 4.000MHz [16/4]
YM2203 - clock 4.000MHz [16/4]
4364 - 8kx8 SRAM
2016 - 2kx8 SRAM
VSync - 59.1845Hz
HSync - 15.21kHz
Custom Chips -
X1-001 (SDIP64)
X1-002 (SDIP64)
X1-006 (SDIP64)
X0-006 (SDIP64), also marked 'RP5A10-0001'. This is a 65C02 in disguise,
possibly with additional ROM or logic acting as a protection chip.
clocks - pin1 16MHz, pin2 2MHz, pin3 59.1845Hz [VSYNC),
pin63 2MHz, pin62 2MHz
X1-003 (SDIP42)
X1-004 (SDIP52)
X2-003 (DIP16) - Resistor network IC for inputs
ROMs -
UA0-6 to AU0-13 DIP42 maskROM, read as MX27C2100 (2 Meg)
UA0-2 DIP32 27C1000 EPROM
All other ROMs DIP32 read as 27C1000
All ROMs have IC locations, but the PCB also has IC locations so components
can be referenced with IC# or location. See above diagram for info.
***************************************************************************/
/***************************************************************************
Twin Eagle
M6100326A Taito (Seta)
ua2-4 68000
ua2-3
ua2-6
ua2-5
ua2-8
ua2-10
ua2-7 ua2-1
ua2-9
ua2-12
ua2-11 ua2-2
***************************************************************************/
/***************************************************************************
U.S. Classic
M6100430A (Taito 1989)
u7 119 u6 118 u5 117 u4 116
68000-8
u13 120 000
u19 121 001
u21 122 002
u29 123 003
u33 124
u40 125
u44 126
u51 127
u58 128
u60 129 65c02
u68 130
u75 131 u61 004
u83 132
***************************************************************************/
/***************************************************************************
Caliber 50
CPU: TMP 68000N-8, 65C02
Other: NEC D4701
UH-001-006 SW2 SW1
UH-001-007
UH-001-008 8464 68000-8
UH-001-009 X1-002A X1-001A 8464 Uh-002-001=T01
UH-001-010 8464 51832
UH-001-011 8464 51832
UH-001-002
UH-001-012 X1-012 UH-001-003
UH-001-013 UH-002-004-T02
X1-011 5116-10
BAT
16MHz
X1-010 65C02 X1-006
UH-001-005 X1-007
4701 X1-004
***************************************************************************/
/***************************************************************************
Meta Fox
(Seta 1990)
P0-045A
P1-006-163 8464 68000-8
P1-007-164 X1-002A X1-001A 8464
P1-008-165 8464
P1-009-166 8464 256K-12
256K-12
X1-012
X1-011
2063 X1-010 X1-006 X0-006
X1-007
X1-004 X1-004
----------------------
P1-036-A
UP-001-010
UP-001-011
UP-001-012
UP-001-013
UP-001-014
UP-001-015
-----------------------
P1-049-A
UP-001-001
UP-001-002
P1-003-161
P1-004-162
UP-001-005
x
***************************************************************************/
/***************************************************************************
Dragon Unit
[Prototype of "Castle Of Dragon"]
PCB: P0-053-1
CPU: 68000-8
Sound: X1-010
OSC: 16.0000MHz
Chips: X1-001A, X1-002A, X1-004, X1-006, X1-007, X1-010, X1-011, X1-012
***************************************************************************/
/***************************************************************************
Wit's
(c)1989 Athena (distributed by Visco)
P0-055B (board is made by Seta)
CPU : TMP68000N-8
Sound: X1-010
OSC : 16.000MHz
ROMs:
UN001001.U1 - Main program (27256)
UN001002.U4 - Main program (27256)
UN001003.10A - Samples (28pin mask)
UN001004.12A /
UN001005.2L - Graphics (28pin mask)
UN001006.4L |
UN001007.5L |
UN001008.7L /
Custom chips: X1-001A X1-002A
X1-004 (x2)
X1-006
X1-007
X1-010
***************************************************************************/
/***************************************************************************
Thunder & Lightning
Location Device File ID Checksum
-----------------------------------------------
U1 1A 27C256 M4 C18C [ MAIN PROG ] [ EVEN ]
U4 3A 27C256 M5 12E1 [ MAIN PROG ] [ ODD ]
U29 10A 23C4001 R27 37F2 [ HIGH ]
U39 12A 23C4001 R28 0070 [ LOW ]
U6 2K 23C1000 T14 1F7D [ C40 ]
U9 4K 23C1000 T15 7A15 [ C30 ]
U14 5K 23C1000 T16 BFFD [ C20 ]
U20 7K 23C1000 T17 7AE7 [ C10 ]
PCB: PO055D
CPU: 68000 8MHz
Custom: X1-001A X1-002A
X1-004
X1-006
X1-007
X1-010
***************************************************************************/
/***************************************************************************
Athena no Hatena?
CPU : 68000-16
Sound: X1-010
OSC : 16.0000MHz
ROMs:
fs001001.evn - Main programs (27c4001)
fs001002.odd /
fs001004.pcm - Samples (8M mask - read as 27c800)
fs001003.gfx - Graphics (16M mask - read as 27c160)
Chips: X1-001A X1-002A
X1-004
X1-006
X1-007
X1-010
***************************************************************************/
/***************************************************************************
Blandia
Blandia by Allumer
This set is coming from an original Blandia PCB ref : P0-078A
As usually, it use a lot of customs allumer chips !
***************************************************************************/
/***************************************************************************
Blandia (prototype)
PCB: P0-072-2
CPU: 68000-16
Sound: X1-010
OSC: 16.0000MHz
Chips: X1-001A X1-002A
X1-004
X1-007
X1-010
X1-011 x2 X1-012 x2
***************************************************************************/
/***************************************************************************
Block Carnival / Thunder & Lightning 2
P0-068B, M6100723A
CPU : MC68000B8
Sound: X1-010
OSC : 16.000MHz
ROMs:
u1.a1 - Main programs (27c010)
u4.a3 /
bl-chr-0.j3 - Graphics (4M mask)
bl-chr-1.l3 /
bl-snd-0.a13 - Sound (4M mask)
Custom chips: X1-001A X1-002A
X1-004
X1-006
X1-007
X1-009
X1-010
Other:
Lithium battery x1
***************************************************************************/
/***************************************************************************
Daioh
DAIOH
Alumer 1993, Sammy license
P0-092A
FG-001-003
FG-001-004 X1-002A X1-001A FG-001-001
FG-001-002
FG-001-005 X1-11 X1-12
FG-001-006 X1-11 X1-12
68000-16
FG-001-007
X1-10 16MHz
X1-007 X1-004
***************************************************************************/
/***************************************************************************
Eight Forces
P0-079A (Same board as ZingZingZip)
CPU : MC68000B16
Sound: X1-010
OSC : 16.000MHz
ROMs:
uy2-u4.u3 - Main program (even)(27c2001)
uy2-u3.u4 - Main program (odd) (27c2001)
u63.bin - Sprites (HN62434, read as 27c4200)
u64.bin /
u69.bin - Samples (HN62318, read as 27c8001)
u70.bin /
u66.bin - Layer 1 (HN62418, read as 27c800)
u68.bin - Layer 2 (HN62418, read as 27c800)
PALs (not dumped):
uy-012.206 (PAL16L8A)
uy-013.14 (PAL16L8A)
uy-014.35 (PAL16L8A)
uy-015.36 (PALCE16V8)
uy-016.76 (PAL16L8A)
uy-017.116 (PAL16L8A)
Custom: X1-001A X1-002A
X1-004
X1-007
X1-010
X1-011 (x2) X1-012 (x2)
***************************************************************************/
/***************************************************************************
Extreme Downhill
(c)1995 Sammy
DH-01
P0-117A (board is made by Seta/Allumer)
CPU : MC68HC000B16
Sound: X1-010
OSC: 16.0000MHz (X1), 14.3180MHz (X2)
ROMs:
fw001002.201 - Main program (even) (Macronics 27c4000)
fw001001.200 - Main program (odd) (Macronics 27c4000)
fw001005.205 - (32pin mask, read as 27c8001)
fw001007.026 /
fw001003.202 - (42pin mask, read as 27c160)
fw001004.206 |
fw001006.152 /
PALs (16L8ACN, not dumped):
FW-001
FW-002
FW-003
FW-005
Custom chips: X1-001A X1-002A
X1-004
X1-007
X1-010
X1-011 (x2) X1-012 (x2)
***************************************************************************/
/***************************************************************************
GundHara
(C) 1995 Banpresto
Seta/Allumer Hardware
PCB: BP954KA
PCB: P0-120A
CPU: TMP68HC000N16 (68000, 64 pin DIP)
SND: ?
OSC: 16.000MHz
RAM: 6264 x 8, 62256 x 4
DIPS: 2 x 8 position
Other Chips: PALs x 6 (not dumped)
NEC 71054C
X1-004
X1-007
X1-010
X1-011 x2 X1-012 x2
X1-001A X1-002A
On PCB near JAMMA connector is a small push button to reset the PCB.
ROMS:
BPGH-001.102 27C040
BPGH-002.103 27C4000
BPGH-003.U3 27C4000
BPGH-004.U4 23C4000
BPGH-005.200 23C16000
BPGH-006.201 23C16000
BPGH-007.U63 23C16000
BPGH-008.U64 23C16000
BPGH-009.U65 27C4000
BPGH-010.U66 TC538200
BPGH-011.U67 TC538000
BPGH-012.U68 TC5316200
BPGH-013.U70 TC538000
***************************************************************************/
/***************************************************************************
Zombie Raid
Sammy, 1996
This is a gun shooting game using Seta/Allumer hardware.
PCB Layout
----------
SZR-001
P0-122A
------------------------------------------------------------------
FY001012.12L* FY001009.U67 FY001007.U65
FY001011.13L* FY001010.U68 FY001008.U66 FY001006.U200
X1-010 6264
CONN1 X1-011(x2) X1-002A
ADC0834 X1-012(x2) X1-001A
3V_BATT
4464
X1-007 6264(x2) 6264(x2) 6264(x2) 6264(x2)
16.000MHz HM9253101(x2)
X1-004 DSW2 D71054C
DSW1 TMP68HC000N-16 FY001004.U4 FY001001.U102
FY001003.U3 FY001002.U103
------------------------------------------------------------------
Notes:
* = These ROMs located on a small daughterboard. Main PCB locations used as filename extension.
CONN1 = 8 pin header for gun connection
***************************************************************************/
/***************************************************************************
J.J. Squawkers
68HC000N -16N
2) Alumer X1-012
2) Alumer X1-011
2) Alumer X1-014
X1-010
X1-007
X1-004
16.000MHz
NEC 71054C ----???
***************************************************************************/
/***************************************************************************
Kamen Rider
Kamen Riderclub Battleracer
Banpresto, 1993
Runs on Seta/Allumer hardware
PCB No: BP934KA P0-096A
CPU : MC68HC000B16
OSC : 16.000MHz
RAM : LH5160D-10L (x9), CXK58257AP-10L (x2)
DIPSW : 8 position (x2)
CUSTOM: X1-010
X1-007
X1-004
X1-011 (x2)
X1-012 (x2)
X1-002A
X1-001A
OTHER : NEC71054C, some PALs
ROMs :
FJ001007.152 27c4096 near X1-011 & X1-010 (sound program?)
FJ001008.26 8M Mask connected to X1-010, near FJ001007
FJ001003.25 27c4096 main program for 68k
FJ001006.22 16M Mask gfx
FJ001005.21 16M Mask gfx
***************************************************************************/
/***************************************************************************
Krazy Bowl
PCB: SKB-001
P0-114A
FV FV 2465
001 001 2465 X1-005
004 003 X1-002A X1-001A
58257 FV
001
002 (even)
58257
14.318MHz FV
001
FV 001 005 001 (odd)
FV 001 006
2465 68HC000B16
NEC4701 NEC4701
X1-010 X1-006
X1-007 X1-004
***************************************************************************/
/***************************************************************************
Mad Shark
Allumer, 1993
This game is a vertical shoot'em-up and runs on fairly standard Allumer hardware.
PCB Layout
----------
P0-102A
----------------------------------------------------
| X1-010 FQ001007 FQ001006 FQ001005 FQ001004 |
| LH5160 |
| X1-011 X1-011 X1-002A |
| |
|J X1-012 X1-012 X1-001A |
|A X1-007 |
|M LH5160 LH5160 LH5160 LH5160 |
|M |
|A LH5160 LH5160 LH5160 LH5160 |
| FQ001002 |
|* MC68HC000B16 |
| X1-004 |
| FQ001001 |
| LH52250 |
| DSW2(8) DSW1(8) 16MHz LH52250 D71054 |
----------------------------------------------------
Notes:
*: 4 jumper pads for region selection (hardwired)
***************************************************************************/
/***************************************************************************
Magical Speed
(c)1994 Allumer
PCB P0-111A:
+--------------------------------------------------+
| VR1 X1-010 FU001007 FU001006 FU001005 FU001004 |
| W2465K |
| CN3 X1-011 X1-011 X1-002A |
| CN1 |
|J CN2 X1-012 X1-012 X1-001A |
|A X1-007 |
|M W2465K U54 U50 W2465K W2465K W2465K U53 |
|M |
|A W2465K U51 W2465K W2465K W2465K |
| FU001002 |
|* MC68HC000B16 |
| X1-004 |
| FU001001 |
| CXK58257 |
| SW1 RST1 DSW2 DSW1 16MHz CXK58257 D71054 U52 |
+--------------------------------------------------+
CPU : MC68HC000B16
OSC : 16.000MHz
RAM : WinBond W2465K-70LL (x9), SONY CXK58257AP-10L (x2)
DIPSW : 8 position (x2)
CUSTOM: X1-010 Sound
X1-004 Input
X1-007 Video DAC
X1-011 (x2) Tilemap
X1-012 (x2) Tilemap
X1-002A Sprites
X1-001A Sprites
OTHER : NEC71054C
VR1 : Sound adjust pot
SW1 : Service switch
RST1 : Reset
CN1 : 7-Pin header to drive lights underneath buttons to show what cards are available to play
CN2 : 8-Pin header to drive lights underneath buttons to show what cards are available to play
CN3 : 5-Pin header connected to aucilliary PCB to drive lights about the cabinet
PAL :FU-011 @ U50
FU-012 @ U51
FU-013 @ U52
FU-014 @ u53
FU-015 @ U54
***************************************************************************/
/***************************************************************************
Mobile Suit Gundam
Banpresto 1993
P0-081A
SW2 SW1
FA-001-008 FA-001-001
FA-001-007 X1-002A X1-001A FA-002-002
5160
5160
71054
FA-001-006 5160 62256
FA-001-005 X1-011 X1-012 5160 62256
FA-001-004 X1-011 X1-012 5160
5160 5160
68000-16
16MHz
X1-010
X1-007 X1-004 X1-005
***************************************************************************/
/***************************************************************************
Oishii Puzzle Ha Irimasenka
PCB : P0-097A
CPU : 68000
Sound: X1-010
OSC : 14.31818MHz
All ROMs are 23c4000
Custom chips: X1-001A X1-002A
X1-004
X1-007
X1-010
X1-011 (x2) X1-012 (x2)
***************************************************************************/
/***************************************************************************
Triple Fun
Triple Fun
??, 19??
CPU : TMP68HC000P-16 (68000)
SOUND : OKI M6295
DIPSW : 8 position (x2)
XTAL : 16.000 MHz (8MHz written on PCB, located near OKI chip)
14.31818MHz (near 68000)
RAM : 62256 (x2), 6264 (x8), 2018 (x14)
PROMs : None
PALs : PALCE16V8H (x13)
OTHER : TPC1020AFN-084C (84 pin PLCC)
ROMs :
04.bin + 05.bin Main Program
01.bin Sound Program
02.bin + 03.bin OKI Samples
06.bin to 11.bin GFX
***************************************************************************/
/***************************************************************************
Pro Mahjong Kiwame
PCB : P0-101-1 (the board is made by Allumer/Seta)
CPU : TMP68301AF-16 (68000 core)
Sound: X1-010
OSC : 20.0000MHz
ROMs:
fp001001.bin - Main program (27c2001, even)
fp001002.bin - Main program (27c2001, odd)
fp001003.bin - Graphics (23c4000)
fp001005.bin - Samples (27c4000, high)
fp001006.bin - Samples (27c4000, low)
Chips: X1-001A
X1-002A
X1-004
X1-006
X1-007
X1-010
- To initialize high scores, power-on holding start button in service mode
***************************************************************************/
/***************************************************************************
Quiz Kokology
(c)1992 Tecmo
P0-053A
CPU : MC68000B8
Sound: X1-010
OSC : 16.000MHz
Custom chips: X1-001A X1-002A
X1-004
X1-006 X1-007
X1-010
X1-011 X1-012
***************************************************************************/
/***************************************************************************
Quiz Koko-logy 2
(c)1992 Tecmo
P0-100A
CPU : MC68HC000B16
Sound: X1-010
OSC : 16.000MHz
FN001001.106 - Main program (27C4096)
FN001003.107 / (40pin 2M mask)
FN001004.100 - OBJ chr. (42pin mask)
FN001005.104 - BG chr. (42pin mask)
FN001006.105 - Samples (32pin mask)
Custom chips: X1-001A X1-002A
X1-004
X1-006
X1-007
X1-010
X1-011 X1-012
***************************************************************************/
/***************************************************************************
Rezon (Japan)
PCB : P0-063A
CPU : TOSHIBA TMP68HC000N-16
Sound : X1-010
OSC : 16.000MHz
Other : Allumer
X1-001A X1-002A
X1-004
X1-007
X1-011 x 2 X1-012 x 2
***************************************************************************/
/***************************************************************************
SD Gundam Neo Battling
Banpresto, 1992
This game runs on Seta/Allumer hardware
PCB Layout
----------
P0-080A
BP923
|----------------------------------------------
|DSW1 DSW2 LH5168 62256 |
| LH5168 62256 |
|LH5168 |
| |
| BP923004 BP923001 |
|BP923005 BP923003 X1-002A X1-001A BP923002 |
| 16MHz |
| TMP68HC000N-16 |
|X1-010 PAL |
| PAL X1-006 |
| |
| |
| X1-004 X1-007 |
| |
| |
| |
| |
| J A M M A |
-----------------------------------------------
Notes:
68k clock: 16.000MHz
VSync: 58Hz
HSync: 15.22kHz
***************************************************************************/
/***************************************************************************
Sokonuke Taisen Game (Japan)
(c)1995 Sammy
CPU: 68HC000
Sound: All PCM ?
OSC: 16MHz
***************************************************************************/
/***************************************************************************
Strike Gunner
(c)1991 Athena (distributed by Tecmo)
P0-053A
CPU : TMP68000N-8
Sound: X1-010
OSC : 16.000MHz
Custom chips: X1-001A X1-002A
X1-004
X1-006 X1-007
X1-010
X1-011 X1-012
***************************************************************************/
/***************************************************************************
Ultraman Club
Banpresto, 1992
Board looks similar to Castle of Dragon PCB.
PCB No: P0-077A (Seta Number)
BP922 (Banpresto Number)
CPU: MC68HC000B16
OSC: 16.000MHz
DIP SW x 2 (8 position)
RAM: Sharp LH5160D-10L x 3, Hitachi S256KLP-12 x 2
PALs (2 x PAL16L8, not dumped)
SETA Chips: X1-010
X1-004
X1-007
X1-006
X1-002A
X1-001A
Controls are 8 way Joystick and 2 buttons.
ROMs:
UW001006.U48 27C010 \ Main Program
UW001007.U49 27C010 /
BP-U-001.U1 4M mask (40 pin, 512k x 8), read as MX27C4100 \ GFX
BP-U-002.U2 4M mask (40 pin, 512k x 8), read as MX27C4100 /
BP-U-003.U13 8M mask (32 pin, 1M x 8), read as MX27C8000 Sound
***************************************************************************/
/***************************************************************************
Ultra Toukon Densetsu
Banpresto, 1993
This game runs on fairly standard Allumer hardware.
PCB Layout
----------
P0-083A
BP931
----------------------------------------------------
| X1-010 93UTA08 93UTA06 93UTA04 93UTA02 |
| 93UTA07 93UTA05 93UTA03 93UTA01 |
| YM3438 LH5116 |
| LH5116 X1-011 X1-011 X1-002A |
| Z80 93UTA009 |
|J X1-012 X1-012 X1-001A |
|A X1-007 |
|M LH5116 LH5160 LH5160 LH5160 |
|M |
|A LH5116 LH5160 LH5160 LH5160 |
| |
|* 16MHz |
| X1-004 62256 |
| 62256 |
| DSW1(8) 93UTA011 93UTA010 |
| DSW2(8) 68HC000N-16 |
----------------------------------------------------
Notes:
*: 4 jumper pads for region selection (hardwired)
Z80 clock = 4.000MHz
VSync: 60Hz
HSync: 15.21kHz
1.048.576 93uta03.63
1.048.576 93uta04.64
1.048.576 93uta05.66
1.048.576 93uta06.67
1.048.576 93uta07.68
1.048.576 93uta08.69
***************************************************************************/
/***************************************************************************
War of Aero
Project M E I O U
93111A YANG CHENG
CPU : TOSHIBA TMP68HC000N-16
Sound : Allumer X1-010
OSC : 16.000000MHz
Other : Allumer
X1-001A X1-002A
X1-004
X1-007
X1-011 x 2
X1-012 x 2
NEC
C324C
D71054C
***************************************************************************/
/***************************************************************************
Zing Zing Zip
P0-079A
UY-001-005 X1-002A X1-001A 5168-10 256k-12
UY-001-006 5168-10 UY-001-001
UY-001-007 UY-001-002
UY-001-008 X1-011 X1-012 58257-12
5168-10
UY-001-010 X1-011 X1-012 5168-10
UY-001-017
UY-001-018
5168-10
X1-010 5168-10 68000-16
8464-80
8464-80 16MHz
X1-007 X1-004
***************************************************************************
Pairs Love
Allumer, 199x
PCB Layout
----------
P0-068B
|-----------------------------------------|
| X1-007 X1-006 UT2-001-005|
| |
| 4050 UT2-001-004|
| |
| |
| X1-002A |
| |
|J |
|A X1-004 |
|M X1-001A |
|M DSW1 |
|A |
| DSW2 6264 |
| 6264 |
| X1-009 |
| 62256 |
| |
| 68000 |
| UT2-001-003 62256 UT2-001-002 |
| 6264 |
| X1-010 16MHz UT2-001-001 |
|-----------------------------------------|
Notes:
68000 clock: 8.000MHz
VSync: 60Hz
***************************************************************************
Rezon (Taito License)
Allumer / Taito, 1992
This game runs on fairly standard Allumer hardware.
PCB Layout
----------
P0-063A (Allumer code printed on the PCB)
M6100627A REZON (Taito sticker)
|-----------------------------------------------------------|
| VOL 3404 6264 US001009 US001007 US001005 |
| MB3730 US001008 US001006 |
| |
| |
| |
| PAL4 X1-010 X1-011 X1-011 |
| |
| |
|J |
|A X1-012 X1-012 |
|M |
|M X1-007 |
|A |
| 6116 6116 PAL2 PAL3 |
| |
| 62256 62256 |
| 16MHZ 62256 62256 6264 6264 |
| DSW2(8) |
| X1-004 PAL1 |
| DSW1(8) |------------|US001004 REZON_1_P |
| | 68000 | US001003 REZON_0_P |
| RESET_SW |------------| 62256 62256|
|-----------------------------------------------------------|
Notes:
68000 clock - 16.000MHz
X1-010 clocks - pin1 16.000MHz, pin2 8.000MHz, pin79 4.000MHz, pin80 2.000MHz
VSync - 57.5Hz
PAL1 - PAL16L8 labelled 'US-010'
PAL2 - PAL16L8 labelled 'US-011'
PAL3 - PAL16L8 labelled 'US-012'
PAL4 - PAL16L8 labelled 'US-013'
62256 - 32K x8 SRAM
6264 - 8K x8 SRAM
6116 - 2K x8 SRAM
Custom IC's -
X1-001A (SDIP64) \ Sprite Generators
X1-002A (SDIP64) /
X1-004 (SDIP52) Input Related Functions (connected to joystick/input controls)
X1-007 (SDIP42) Video DAC? (connected to RGB output)
X1-010 (QFP80) Sound Chip, 16Bit PCM
X1-011 (x2, QFP100)\ Tilemap Generators
X1-012 (x2, QFP100)/
ROMs -
Filename Type Use
---------------------------------------------------
REZON_0_P.U3 27C1000 (DIP32) \
REZON_1_P.U4 27C1000 (DIP32) | 68000 Program
US001003.U102 27C1000 (DIP32) |
US001004.U103 27C1000 (DIP32) /
US001005.U63 4M MaskROM (DIP42) \ Sprites
US001006.U64 4M MaskROM (DIP42) /
US001007.U66 4M MaskROM (DIP42) \ Tiles
US001008.U68 4M MaskROM (DIP42) /
US001009.U70 4M MaskROM (DIP32) PCM Samples
***************************************************************************/
/***************************************************************************
Crazy Fight
x1-11
x1-11
x1-12
x1-12
x1-001a
x1-002a
x1-007
Lattlice PLSI 1032 FPGA
oki 6295
ym3812
68000
***************************************************************************/
/***************************************************************************
International Toote
Main PCB (P0-058C):
TOSHIBA TMP68HC000N-16
X1-010
X1-001A
X1-002A
X1-004 (x2)
X1-007
X1-011
X1-012
HD63B50P (ACIA)
Horse Race I/O Expansion (PCB-HRE-000):
MAX238CNG (RS-232)
DIP24 (glue on markings?)
MC68B50CP (x2, ACIA)
EF68B21P (x2, PIA)
ULN2803A (x2, Darlington Transistor Array)
4116R-001-151 (x2, Resistor Network)
2.45760 MHz Osc.
Note: on screen copyright is (c)1998 Coinmaster.
The I/O board has (c)1993 Coinmaster.
***************************************************************************/
#include "emu.h"
#include "includes/seta.h"
#include "cpu/m6502/m65c02.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
#include "machine/6821pia.h"
#include "machine/6850acia.h"
#include "machine/msm6242.h"
#include "machine/nvram.h"
#include "machine/pit8253.h"
#include "machine/tmp68301.h"
#include "machine/watchdog.h"
#include "sound/2203intf.h"
#include "sound/2612intf.h"
#include "sound/3812intf.h"
#include "sound/okim6295.h"
#include "sound/ym2151.h"
#include "diserial.h"
#include "screen.h"
#include "speaker.h"
#include "inttoote.lh"
#include "jockeyc.lh"
#include "setaroul.lh"
#include <algorithm>
#if __uPD71054_TIMER
// this mess should be replaced with pit8254, see madshark
#define USED_TIMER_NUM 1
/*------------------------------
timer(uPD71054) struct
------------------------------*/
/*------------------------------
update timer
------------------------------*/
void seta_state::uPD71054_update_timer(device_t *cpu, int no)
{
uPD71054_state *uPD71054 = &m_uPD71054;
uint16_t max = uPD71054->max[no]&0xffff;
if( max != 0 ) {
attotime period = attotime::from_hz(m_maincpu->unscaled_clock()) * (16 * max);
uPD71054->timer[no]->adjust( period, no );
} else {
uPD71054->timer[no]->adjust( attotime::never, no);
logerror( "%s: uPD71054 error, timer %d duration is 0\n",
machine().describe_context(), no );
}
}
/*------------------------------
callback
------------------------------*/
TIMER_CALLBACK_MEMBER(seta_state::uPD71054_timer_callback)
{
m_maincpu->set_input_line(4, HOLD_LINE );
uPD71054_update_timer( nullptr, param );
}
/*------------------------------
initialize
------------------------------*/
void seta_state::uPD71054_timer_init( )
{
uPD71054_state *uPD71054 = &m_uPD71054;
int no;
uPD71054->write_select = 0;
for( no = 0; no < USED_TIMER_NUM; no++ ) {
uPD71054->max[no] = 0xffff;
}
for( no = 0; no < USED_TIMER_NUM; no++ ) {
uPD71054->timer[no] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(seta_state::uPD71054_timer_callback),this));
}
}
/*------------------------------
timer write handler
------------------------------*/
WRITE16_MEMBER(seta_state::timer_regs_w)
{
uPD71054_state *uPD71054 = &m_uPD71054;
data &= 0xff;
uPD71054->reg[offset] = data;
switch( offset ) {
case 0x0000:
case 0x0001:
case 0x0002:
if( uPD71054->write_select == 0 ) {
uPD71054->max[offset] = (uPD71054->max[offset]&0xff00)+data;
if( ((uPD71054->reg[3]>>4)&3) == 3 ) {
uPD71054->write_select = 1;
}
} else {
uPD71054->max[offset] = (uPD71054->max[offset]&0x00ff)+(data<<8);
}
if( uPD71054->max[offset] != 0 ) {
uPD71054_update_timer( m_maincpu.target(), offset );
}
break;
case 0x0003:
switch( (data>>4)&3 ) {
case 2: uPD71054->write_select = 1; break;
case 1:
case 3: uPD71054->write_select = 0; break;
}
break;
}
}
#endif // __uPD71054_TIMER
/***************************************************************************
Sound
***************************************************************************/
WRITE_LINE_MEMBER(seta_state::utoukond_ym3438_interrupt)
{
m_audiocpu->set_input_line(INPUT_LINE_NMI, state);
}
/***************************************************************************
Common Routines
***************************************************************************/
/*
uPD71054C Timer
*/
WRITE_LINE_MEMBER(seta_state::pit_out0)
{
if (state)
m_maincpu->set_input_line(4, ASSERT_LINE);
}
/*
Shared RAM:
The 65c02 sees a linear array of bytes that is mapped, for the 68000,
to a linear array of words whose low order bytes hold the data
*/
READ16_MEMBER(seta_state::sharedram_68000_r)
{
return ((uint16_t)m_sharedram[offset]) & 0xff;
}
WRITE16_MEMBER(seta_state::sharedram_68000_w)
{
if (ACCESSING_BITS_0_7)
{
m_sharedram[offset] = data & 0xff;
}
}
/*
Sub CPU Control
*/
WRITE16_MEMBER(seta_state::sub_ctrl_w)
{
switch(offset)
{
case 0/2: // bit 0: reset sub cpu?
if (ACCESSING_BITS_0_7)
{
if ( !(m_sub_ctrl_data & 1) && (data & 1) )
m_subcpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero);
m_sub_ctrl_data = data;
}
break;
case 2/2: // ?
break;
case 4/2: // not sure
if (ACCESSING_BITS_0_7) if(m_soundlatch[0] != nullptr) m_soundlatch[0]->write(space, 0, data & 0xff);
break;
case 6/2: // not sure
if (ACCESSING_BITS_0_7) if(m_soundlatch[1] != nullptr) m_soundlatch[1]->write(space, 0, data & 0xff);
break;
}
}
/* DSW reading for 16 bit CPUs */
READ16_MEMBER(seta_state::seta_dsw_r)
{
uint16_t dsw = m_dsw->read();
if (offset == 0) return (dsw >> 8) & 0xff;
else return (dsw >> 0) & 0xff;
}
/* DSW reading for 8 bit CPUs */
READ8_MEMBER(seta_state::dsw1_r)
{
return (m_dsw->read() >> 8) & 0xff;
}
READ8_MEMBER(seta_state::dsw2_r)
{
return (m_dsw->read() >> 0) & 0xff;
}
/*
Sprites Buffering
*/
WRITE_LINE_MEMBER(seta_state::screen_vblank_seta_buffer_sprites)
{
// rising edge
if (state)
{
m_seta001->setac_eof();
}
}
/*
VRAM Handler
*/
template<int Layer>
WRITE16_MEMBER(seta_state::vram_w)
{
COMBINE_DATA(&m_vram[Layer][offset]);
if (m_rambank[Layer] == ((offset >> 12) & 1))
m_tilemap[Layer]->mark_tile_dirty(offset & 0x7ff);
}
/***************************************************************************
Main CPU
(for debugging it is useful to be able to peek at some memory regions that
the game writes to but never reads from. I marked this regions with an empty
comment to distinguish them, since there's always the possibility that some
games actually read from this kind of regions, expecting some hardware
register's value there, instead of the data they wrote)
***************************************************************************/
READ16_MEMBER(seta_state::ipl0_ack_r)
{
m_maincpu->set_input_line(1, CLEAR_LINE);
return 0;
}
WRITE16_MEMBER(seta_state::ipl0_ack_w)
{
m_maincpu->set_input_line(1, CLEAR_LINE);
}
READ16_MEMBER(seta_state::ipl1_ack_r)
{
m_maincpu->set_input_line(2, CLEAR_LINE);
return 0;
}
WRITE16_MEMBER(seta_state::ipl1_ack_w)
{
m_maincpu->set_input_line(2, CLEAR_LINE);
}
READ16_MEMBER(seta_state::ipl2_ack_r)
{
m_maincpu->set_input_line(4, CLEAR_LINE);
return 0;
}
WRITE16_MEMBER(seta_state::ipl2_ack_w)
{
m_maincpu->set_input_line(4, CLEAR_LINE);
}
/***************************************************************************
Thundercade
***************************************************************************/
/* Mirror RAM seems necessary since the e00000-e03fff area is not cleared
on startup. Level 2 int uses $e0000a as a counter that controls when
to write a value to the sub cpu, and when to read the result back.
If the check fails "error x0-006" is displayed. Hence if the counter
is not cleared at startup the game could check for the result before
writing to sharedram! */
void seta_state::tndrcade_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0x200000, 0x200001).w(FUNC(seta_state::ipl1_ack_w));
map(0x280000, 0x280001).nopw(); // ? 0 / 1 (sub cpu related?)
map(0x300000, 0x300001).nopw(); // ? 0 / 1
map(0x380000, 0x3803ff).ram().share("paletteram1"); // Palette
map(0x400000, 0x400001).nopw(); // ? $4000
map(0x600000, 0x6005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0x600600, 0x600607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0x800000, 0x800007).w(FUNC(seta_state::sub_ctrl_w)); // Sub CPU Control?
map(0xa00000, 0xa00fff).rw(FUNC(seta_state::sharedram_68000_r), FUNC(seta_state::sharedram_68000_w)); // Shared RAM
map(0xc00000, 0xc03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xe00000, 0xe03fff).ram().share("share1"); // RAM (Mirrored?)
map(0xffc000, 0xffffff).ram().share("share1"); // RAM (Mirrored?)
}
/***************************************************************************
Twin Eagle, DownTown, Arbalester, Meta Fox
(with slight variations, and Meta Fox protection hooked in)
***************************************************************************/
WRITE8_MEMBER(seta_state::twineagl_ctrl_w)
{
if ((data & 0x30) == 0)
{
m_maincpu->set_input_line(1, CLEAR_LINE);
m_maincpu->set_input_line(3, CLEAR_LINE);
}
}
void seta_state::downtown_map(address_map &map)
{
map(0x000000, 0x09ffff).rom(); // ROM
map(0x100000, 0x103fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0x200000, 0x200001).noprw(); // watchdog? (twineagl)
map(0x300000, 0x300001).w(FUNC(seta_state::ipl1_ack_w));
map(0x400000, 0x400007).w(FUNC(seta_state::twineagl_tilebank_w)); // special tile banking to animate water in twineagl
map(0x500001, 0x500001).w(FUNC(seta_state::twineagl_ctrl_w));
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x7003ff).ram().share("paletteram1"); // Palette
map(0x800000, 0x800005).writeonly().share("vctrl_0");// VRAM Ctrl
map(0x900000, 0x903fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM
map(0xa00000, 0xa00007).w(FUNC(seta_state::sub_ctrl_w)); // Sub CPU Control?
map(0xb00000, 0xb00fff).rw(FUNC(seta_state::sharedram_68000_r), FUNC(seta_state::sharedram_68000_w)); // Shared RAM
map(0xc00000, 0xc00001).nopw(); // ? $4000
map(0xd00000, 0xd005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xd00600, 0xd00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xe00000, 0xe03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xf00000, 0xffffff).ram(); // RAM
}
/***************************************************************************
Caliber 50
***************************************************************************/
void seta_state::calibr50_map(address_map &map)
{
map(0x000000, 0x09ffff).rom(); // ROM
map(0x100000, 0x100001).r(FUNC(seta_state::ipl2_ack_r));
map(0x200000, 0x200fff).ram().share("nvram"); // NVRAM (battery backed)
map(0x300000, 0x300001).rw(FUNC(seta_state::ipl1_ack_r), FUNC(seta_state::ipl1_ack_w));
map(0x400000, 0x400001).r("watchdog", FUNC(watchdog_timer_device::reset16_r));
map(0x500000, 0x500001).nopw(); // ?
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x7003ff).ram().share("paletteram1"); // Palette
map(0x800000, 0x800005).writeonly().share("vctrl_0");// VRAM Ctrl
map(0x900000, 0x903fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM
map(0x904000, 0x904fff).ram(); //
map(0xa00000, 0xa00001).portr("P1"); // X1-004
map(0xa00002, 0xa00003).portr("P2"); // X1-004
map(0xa00008, 0xa00009).portr("COINS"); // X1-004
map(0xa00010, 0xa00017).r(m_upd4701, FUNC(upd4701_device::read_xy)).umask16(0x00ff);
map(0xa00019, 0xa00019).r(m_upd4701, FUNC(upd4701_device::reset_xy_r));
map(0xd00000, 0xd005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xd00600, 0xd00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xe00000, 0xe03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xb00001, 0xb00001).r("soundlatch2", FUNC(generic_latch_8_device::read)); // From Sub CPU
map(0xb00001, 0xb00001).w("soundlatch1", FUNC(generic_latch_8_device::write)); // To Sub CPU
map(0xc00000, 0xc00001).ram(); // ? $4000
map(0xff0000, 0xffffff).ram(); // RAM
}
/***************************************************************************
U.S. Classic
***************************************************************************/
READ16_MEMBER(seta_state::usclssic_dsw_r)
{
switch (offset)
{
case 0/2: return (m_dsw->read() >> 8) & 0xf;
case 2/2: return (m_dsw->read() >> 12) & 0xf;
case 4/2: return (m_dsw->read() >> 0) & 0xf;
case 6/2: return (m_dsw->read() >> 4) & 0xf;
}
return 0;
}
CUSTOM_INPUT_MEMBER(seta_state::usclssic_trackball_x_r)
{
return m_track_x[m_usclssic_port_select ? 1 : 0]->read();
}
CUSTOM_INPUT_MEMBER(seta_state::usclssic_trackball_y_r)
{
return m_track_y[m_usclssic_port_select ? 1 : 0]->read();
}
WRITE8_MEMBER(seta_state::usclssic_lockout_w)
{
int tiles_offset = BIT(data, 4) ? 0x4000: 0;
m_usclssic_port_select = BIT(data, 6);
m_buttonmux->select_w(m_usclssic_port_select);
m_upd4701->resetx_w(BIT(data, 7));
m_upd4701->resety_w(BIT(data, 7));
if (tiles_offset != m_tiles_offset)
machine().tilemap().mark_all_dirty();
m_tiles_offset = tiles_offset;
seta_coin_lockout_w(data);
}
void seta_state::usclssic_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0xff0000, 0xffffff).ram(); // RAM
map(0x800000, 0x8005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0x800600, 0x800607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0x900000, 0x900001).ram(); // ? $4000
map(0xa00000, 0xa00005).ram().share("vctrl_0"); // VRAM Ctrl
map(0xb00000, 0xb003ff).ram().share("paletteram1"); // Palette
map(0xb40000, 0xb40007).r(m_upd4701, FUNC(upd4701_device::read_xy)).umask16(0x00ff);
map(0xb40001, 0xb40001).w(FUNC(seta_state::usclssic_lockout_w)); // Coin Lockout + Tiles Banking
map(0xb4000a, 0xb4000b).w(FUNC(seta_state::ipl1_ack_w));
map(0xb40010, 0xb40011).portr("COINS"); // Coins
map(0xb40011, 0xb40011).w("soundlatch1", FUNC(generic_latch_8_device::write)); // To Sub CPU
map(0xb40018, 0xb4001f).r(FUNC(seta_state::usclssic_dsw_r)); // 2 DSWs
map(0xb40018, 0xb40019).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0xb80000, 0xb80001).r(FUNC(seta_state::ipl2_ack_r));
map(0xc00000, 0xc03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xd00000, 0xd03fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM
map(0xd04000, 0xd04fff).ram(); //
map(0xe00000, 0xe00fff).ram(); // NVRAM? (odd bytes)
}
/***************************************************************************
Athena no Hatena?
***************************************************************************/
void seta_state::atehate_map(address_map &map)
{
map(0x000000, 0x0fffff).rom(); // ROM
map(0x900000, 0x9fffff).ram(); // RAM
map(0x100000, 0x103fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0x200000, 0x200001).nopw(); // ? watchdog ?
map(0x300000, 0x300001).nopw(); // ? 0 (irq ack lev 2?)
map(0x500000, 0x500001).nopw(); // ? (end of lev 1: bit 4 goes 1,0,1)
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x7003ff).ram().share("paletteram1"); // Palette
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xb00000, 0xb00001).portr("P1"); // P1
map(0xb00002, 0xb00003).portr("P2"); // P2
map(0xb00004, 0xb00005).portr("COINS"); // Coins
map(0xc00000, 0xc00001).ram(); // ? 0x4000
map(0xe00000, 0xe03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
}
/***************************************************************************
Blandia
***************************************************************************/
void seta_state::blandia_map(address_map &map)
{
map(0x000000, 0x1fffff).rom(); // ROM (up to 2MB)
map(0x200000, 0x20ffff).ram(); // RAM (main ram for zingzip, wrofaero writes to 20f000-20ffff)
map(0x210000, 0x21ffff).ram(); // RAM (gundhara)
map(0x300000, 0x30ffff).ram(); // RAM (wrofaero and blandia only?)
map(0x400000, 0x400001).portr("P1"); // P1
map(0x400002, 0x400003).portr("P2"); // P2
map(0x400004, 0x400005).portr("COINS"); // Coins
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_counter_w)); // Coin Counter (no lockout)
map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x500004, 0x500005).nopw();
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x7003ff).ram(); // (rezon,jjsquawk)
map(0x700400, 0x700fff).ram().share("paletteram1"); // Palette
map(0x703c00, 0x7047ff).ram().share("paletteram2"); // 2nd Palette for the palette offset effect
map(0x800000, 0x8005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0x800600, 0x800607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0x880000, 0x880001).ram(); // ? 0xc000
map(0x900000, 0x903fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xa00000, 0xa00005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0xa80000, 0xa80005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xb00000, 0xb03fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0xb04000, 0xb0ffff).ram(); // (jjsquawk)
map(0xb80000, 0xb83fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0xb84000, 0xb8ffff).ram(); // (jjsquawk)
map(0xc00000, 0xc03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0xd00000, 0xd00007).nopw(); // ?
map(0xe00000, 0xe00001).nopw(); // ? VBlank IRQ Ack
map(0xf00000, 0xf00001).nopw(); // ? Sound IRQ Ack
}
void seta_state::blandia_x1_map(address_map &map)
{
map(0x00000, 0xbffff).rom();
map(0xc0000, 0xfffff).bankr("x1_bank");
}
/***************************************************************************
Blandia (proto), Gundhara, J.J.Squawkers, Rezon, War of Aero, Zing Zing Zip
(with slight variations)
***************************************************************************/
void seta_state::blandiap_map(address_map &map)
{
map(0x000000, 0x1fffff).rom(); // ROM (up to 2MB)
map(0x200000, 0x20ffff).ram(); // RAM (main ram for zingzip, wrofaero writes to 20f000-20ffff)
map(0x210000, 0x21ffff).ram(); // RAM (gundhara)
map(0x300000, 0x30ffff).ram(); // RAM (wrofaero only?)
map(0x400000, 0x400001).portr("P1"); // P1
map(0x400002, 0x400003).portr("P2"); // P2
map(0x400004, 0x400005).portr("COINS"); // Coins
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_counter_w)); // Coin Counter (no lockout)
map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x500004, 0x500005).nopw();
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x7003ff).ram(); // (rezon,jjsquawk)
map(0x700400, 0x700fff).ram().share("paletteram1"); // Palette
map(0x703c00, 0x7047ff).ram().share("paletteram2"); // 2nd Palette for the palette offset effect
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0x804000, 0x80ffff).ram(); // (jjsquawk)
map(0x880000, 0x883fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0x884000, 0x88ffff).ram(); // (jjsquawk)
map(0x900000, 0x900005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0x980000, 0x980005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).ram(); // ? 0x4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xc00000, 0xc03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0xd00000, 0xd00007).nopw(); // ?
map(0xe00000, 0xe00001).nopw(); // ? VBlank IRQ Ack
map(0xf00000, 0xf00001).nopw(); // ? Sound IRQ Ack
}
/***************************************************************************
Blandia, Gundhara, J.J.Squawkers, Rezon, War of Aero, Zing Zing Zip
and Zombie Raid (with slight variations)
***************************************************************************/
double seta_state::zombraid_adc_cb(uint8_t input)
{
if (input == ADC083X_AGND)
return 0.0;
else if (input == ADC083X_VREF)
return 1.0;
else
return m_gun_inputs[input - ADC083X_CH0]->read() / 255.0;
}
READ16_MEMBER(seta_state::zombraid_gun_r)// Serial interface
{
return m_adc->do_read();
}
// Bit 0 is clock, 1 is data, 2 is reset
WRITE16_MEMBER(seta_state::zombraid_gun_w)
{
m_adc->cs_write(BIT(data, 2));
m_adc->di_write(BIT(data, 1));
m_adc->clk_write(BIT(data, 0));
/* Gun Recoils */
/* Note: In debug menu recoil solenoids strobe when held down. Is this correct?? */
m_gun_recoil[0] = BIT(data, 4);
m_gun_recoil[1] = BIT(data, 3);
}
READ16_MEMBER(seta_state::extra_r)
{
return m_extra_port.read_safe(0xff);
}
void seta_state::wrofaero_map(address_map &map)
{
map(0x000000, 0x1fffff).rom(); // ROM (up to 2MB)
map(0x200000, 0x20ffff).ram(); // RAM
map(0x210000, 0x21ffff).ram(); // RAM (gundhara)
map(0x300000, 0x30ffff).ram(); // RAM (wrofaero only?)
map(0x400000, 0x400001).portr("P1"); // P1
map(0x400002, 0x400003).portr("P2"); // P2
map(0x400004, 0x400005).portr("COINS"); // Coins
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_counter_w)); // Coin Counter (no lockout)
map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x500004, 0x500005).nopw();
map(0x500006, 0x500007).r(FUNC(seta_state::extra_r)); // Buttons 4,5,6 (Daioh only)
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x7003ff).ram(); // (rezon,jjsquawk)
map(0x700400, 0x700fff).ram().share("paletteram1"); // Palette
map(0x701000, 0x70ffff).ram(); //
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0x804000, 0x80ffff).ram(); // (jjsquawk)
map(0x880000, 0x883fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0x884000, 0x88ffff).ram(); // (jjsquawk)
map(0x900000, 0x900005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0x980000, 0x980005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).ram(); // ? 0x4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xc00000, 0xc03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
#if __uPD71054_TIMER
map(0xd00000, 0xd00007).w(FUNC(seta_state::timer_regs_w)); // ?
#else
map(0xd00000, 0xd00007).nopw(); // ?
#endif
map(0xe00000, 0xe00001).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0xf00000, 0xf00001).nopw(); // ? Sound IRQ Ack
}
void seta_state::zombraid_map(address_map &map)
{
wrofaero_map(map);
map(0x300000, 0x30ffff).ram().share("nvram"); // actually 8K x8 SRAM
map(0xf00000, 0xf00001).w(FUNC(seta_state::zombraid_gun_w));
map(0xf00002, 0xf00003).r(FUNC(seta_state::zombraid_gun_r));
}
void seta_state::zombraid_x1_map(address_map &map)
{
map(0x00000, 0x7ffff).rom();
map(0x80000, 0xfffff).bankr("x1_bank");
}
READ16_MEMBER(seta_state::zingzipbl_unknown_r)
{
return 0x0000;
}
void seta_state::zingzipbl_map(address_map &map)
{
map(0x000000, 0x1fffff).rom(); // ROM (up to 2MB)
map(0x200000, 0x20ffff).ram().share("workram"); // RAM (pointer for zombraid crosshair hack)
map(0x210000, 0x21ffff).ram(); // RAM (gundhara)
map(0x300000, 0x30ffff).ram(); // RAM (wrofaero only?)
// AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1") // P1
// AM_RANGE(0x400002, 0x400003) AM_READ_PORT("P2") // P2
map(0x400002, 0x400003).r(FUNC(seta_state::zingzipbl_unknown_r)); // P2
// AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x500004, 0x500005).nopw();
//AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r) // DSW
map(0x700000, 0x7003ff).ram(); // (rezon,jjsquawk)
map(0x700400, 0x700fff).ram().share("paletteram1"); // Palette
map(0x701000, 0x70ffff).ram(); //
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0x804000, 0x80ffff).ram(); // (jjsquawk)
map(0x880000, 0x883fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0x884000, 0x88ffff).ram(); // (jjsquawk)
map(0x900000, 0x900005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0x902010, 0x902013).r(FUNC(seta_state::zingzipbl_unknown_r));
map(0x980000, 0x980005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).ram(); // ? 0x4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xc00000, 0xc03fff).ram(); // soundram on original
#if __uPD71054_TIMER
map(0xd00000, 0xd00007).w(FUNC(seta_state::timer_regs_w)); // ?
#else
map(0xd00000, 0xd00007).nopw(); // ?
#endif
map(0xe00000, 0xe00001).nopw(); // ? VBlank IRQ Ack
map(0xf00000, 0xf00001).nopw(); // ? Sound IRQ Ack
}
void seta_state::jjsquawb_map(address_map &map)
{
map(0x000000, 0x1fffff).rom(); // ROM (up to 2MB)
map(0x200000, 0x20ffff).ram().share("workram"); // RAM (pointer for zombraid crosshair hack)
map(0x210000, 0x21ffff).ram(); // RAM (gundhara)
map(0x300000, 0x30ffff).ram(); // RAM (wrofaero only?)
map(0x400000, 0x400001).portr("P1"); // P1
map(0x400002, 0x400003).portr("P2"); // P2
map(0x400004, 0x400005).portr("COINS"); // Coins
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x500004, 0x500005).nopw();
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x70b3ff).ram(); // RZ: (rezon,jjsquawk)
map(0x70b400, 0x70bfff).ram().share("paletteram1"); // Palette
map(0x70c000, 0x70ffff).ram(); //
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0
map(0x804000, 0x807fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2
map(0x884000, 0x88ffff).ram(); // (jjsquawk)
map(0x908000, 0x908005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0x909000, 0x909005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xa0a000, 0xa0a5ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // RZ: Sprites Y
map(0xa0a600, 0xa0a607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
// AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
map(0xb0c000, 0xb0ffff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // RZ: Sprites Code + X + Attr
map(0xc00000, 0xc03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
#if __uPD71054_TIMER
map(0xd00000, 0xd00007).w(FUNC(seta_state::timer_regs_w)); // ?
#else
map(0xd00000, 0xd00007).nopw(); // ?
#endif
map(0xe00000, 0xe00001).nopw(); // ? VBlank IRQ Ack
map(0xf00000, 0xf00001).nopw(); // ? Sound IRQ Ack
}
/***************************************************************************
Orbs
***************************************************************************/
void seta_state::orbs_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0xf00000, 0xf0ffff).ram(); // RAM
map(0x100000, 0x100001).nopr(); // ?
map(0x200000, 0x200001).nopr(); // ?
map(0x300000, 0x300003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x400000, 0x400001).nopw(); // ?
map(0x500000, 0x500001).portr("P1"); // P1
map(0x500002, 0x500003).portr("P2"); // P2
map(0x500004, 0x500005).portr("COINS"); // Coins
//AM_RANGE(0x600000, 0x60000f) AM_READ(krzybowl_input_r ) // P1
map(0x8000f0, 0x8000f1).ram(); // NVRAM
map(0x800100, 0x8001ff).ram(); // NVRAM
map(0xa00000, 0xa03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0xb00000, 0xb003ff).ram().share("paletteram1"); // Palette
map(0xc00000, 0xc03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xd00000, 0xd00001).ram(); // ? 0x4000
map(0xe00000, 0xe005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xe00600, 0xe00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
}
/***************************************************************************
Kero Kero Keroppi no Issyoni Asobou
***************************************************************************/
static const uint16_t keroppi_protection_word[] = {
0x0000,
0x0000, 0x0000, 0x0000,
0x2000, 0x2000, 0x2000,
0x2000, 0x2000, 0x2000,
0x0400, 0x0400, 0x0400,
0x0000, 0x0000, 0x0000
};
READ16_MEMBER(seta_state::keroppi_protection_r)
{
uint16_t result = keroppi_protection_word[m_keroppi_protection_count];
m_keroppi_protection_count++;
if (m_keroppi_protection_count > 15)
m_keroppi_protection_count = 15;
return result;
}
READ16_MEMBER(seta_state::keroppi_protection_init_r)
{
m_keroppi_protection_count = 0;
return 0x00;
}
READ16_MEMBER(seta_state::keroppi_coin_r)
{
uint16_t result = m_coins->read();
if (m_keroppi_prize_hop == 2)
{
result &= ~0x0002; /* prize hopper */
m_keroppi_prize_hop = 0;
}
return result;
}
TIMER_CALLBACK_MEMBER(seta_state::keroppi_prize_hop_callback)
{
m_keroppi_prize_hop = 2;
}
WRITE16_MEMBER(seta_state::keroppi_prize_w)
{
if ((data & 0x0010) && !m_keroppi_prize_hop)
{
m_keroppi_prize_hop = 1;
m_keroppi_prize_hop_timer->adjust(attotime::from_seconds(3), 0x20); /* 3 seconds */
}
}
void seta_state::keroppi_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0xf00000, 0xf0ffff).ram(); // RAM
map(0x100000, 0x100001).r(FUNC(seta_state::keroppi_protection_r)); //
map(0x200000, 0x200001).r(FUNC(seta_state::keroppi_protection_init_r)); //
map(0x300000, 0x300003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x400000, 0x400001).nopw(); // ?
map(0x500000, 0x500001).portr("P1"); // P1
map(0x500002, 0x500003).portr("P2"); // P2
map(0x500004, 0x500005).r(FUNC(seta_state::keroppi_coin_r)); // Coins
map(0x8000f0, 0x8000f1).ram(); // NVRAM
map(0x800100, 0x8001ff).ram(); // NVRAM
map(0x900000, 0x900001).nopw(); // ?
map(0x900002, 0x900003).w(FUNC(seta_state::keroppi_prize_w)); //
map(0xa00000, 0xa03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0xb00000, 0xb003ff).ram().share("paletteram1"); // Palette
map(0xc00000, 0xc03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xd00000, 0xd00001).ram(); // ? 0x4000
map(0xe00000, 0xe005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xe00600, 0xe00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
}
MACHINE_START_MEMBER(seta_state,keroppi)
{
m_keroppi_prize_hop_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(seta_state::keroppi_prize_hop_callback), this));
m_keroppi_prize_hop = 0;
m_keroppi_protection_count = 0;
}
/***************************************************************************
Block Carnival
***************************************************************************/
/* similar to krzybowl */
void seta_state::blockcar_map(address_map &map)
{
map(0x000000, 0x03ffff).rom(); // ROM
map(0xf00000, 0xf03fff).ram(); // RAM
map(0xf04000, 0xf041ff).ram(); // Backup RAM?
map(0xf05000, 0xf050ff).ram(); // Backup RAM?
map(0x100000, 0x100001).nopw(); // ? 1 (start of interrupts, main loop: watchdog?)
map(0x200000, 0x200001).nopw(); // ? 0/1 (IRQ acknowledge?)
map(0x300000, 0x300003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x400001, 0x400001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout + Sound Enable (bit 4?)
map(0x500000, 0x500001).portr("P1"); // P1
map(0x500002, 0x500003).portr("P2"); // P2
map(0x500004, 0x500005).portr("COINS"); // Coins
map(0xa00000, 0xa03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0xb00000, 0xb003ff).ram().share("paletteram1"); // Palette
map(0xc00000, 0xc03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xd00000, 0xd00001).ram(); // ? 0x4000
map(0xe00000, 0xe005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xe00600, 0xe00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
}
void seta_state::blockcarb_map(address_map &map)
{
map(0x000000, 0x03ffff).rom(); // ROM
map(0xf00000, 0xf03fff).ram(); // RAM
map(0xf04000, 0xf041ff).ram(); // Backup RAM?
map(0xf05000, 0xf050ff).ram(); // Backup RAM?
map(0x100000, 0x100001).nopw(); // ? 1 (start of interrupts, main loop: watchdog?)
map(0x200000, 0x200001).nopw(); // ? 0/1 (IRQ acknowledge?)
map(0x300000, 0x300003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x400001, 0x400001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout + Sound Enable (bit 4?)
map(0x500000, 0x500001).portr("P1"); // P1
map(0x500002, 0x500003).portr("P2"); // P2
map(0x500004, 0x500005).portr("COINS"); // Coins
map(0x500009, 0x500009).w("oki", FUNC(okim6295_device::write));
//map(0x50000c, 0x50000d); // ??
map(0xa00000, 0xa03fff).noprw(); // Sound - not on this bootleg
map(0xb00000, 0xb003ff).ram().share("paletteram1"); // Palette
map(0xc00000, 0xc03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xd00000, 0xd00001).ram(); // ? 0x4000
map(0xe00000, 0xe005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xe00600, 0xe00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
}
/***************************************************************************
Daioh
***************************************************************************/
void seta_state::daioh_map(address_map &map)
{
map(0x000000, 0x0fffff).rom(); // ROM
map(0x100000, 0x10ffff).ram(); // RAM
map(0x400000, 0x400001).portr("P1"); // P1
map(0x400002, 0x400003).portr("P2"); // P2
map(0x400004, 0x400005).portr("COINS"); // Coins
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x500004, 0x500005).nopw();
map(0x500006, 0x500007).portr("EXTRA"); // Buttons 4,5,6
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x7003ff).ram();
map(0x700400, 0x700fff).ram().share("paletteram1"); // Palette
map(0x701000, 0x70ffff).ram(); //
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0x804000, 0x80ffff).ram(); //
map(0x880000, 0x883fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0x884000, 0x88ffff).ram(); //
map(0x900000, 0x900005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0x980000, 0x980005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).ram(); // ? 0x4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xb04000, 0xb13fff).ram();
map(0xc00000, 0xc03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0xe00000, 0xe00001).nopw(); //
}
/***************************************************************************
Daioh (location test version)
***************************************************************************/
void seta_state::daiohp_map(address_map &map)
{
map(0x000000, 0x07ffff).rom().mirror(0x080000); // ROM
map(0x100000, 0x17ffff).rom().mirror(0x080000); // ROM
map(0x200000, 0x20ffff).ram(); // RAM
map(0x400000, 0x400001).portr("P1"); // P1
map(0x400002, 0x400003).portr("P2"); // P2
map(0x400004, 0x400005).portr("COINS"); // Coins
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x500004, 0x500005).nopw();
map(0x500006, 0x500007).portr("EXTRA"); // Buttons 4,5,6
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x7003ff).ram();
map(0x700400, 0x700fff).ram().share("paletteram1"); // Palette
map(0x701000, 0x70ffff).ram(); //
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0x804000, 0x80ffff).ram(); //
map(0x880000, 0x883fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0x884000, 0x88ffff).ram(); //
map(0x900000, 0x900005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0x980000, 0x980005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).ram(); // ? 0x4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xb04000, 0xb13fff).ram();
map(0xc00000, 0xc03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0xd00000, 0xd00007).nopw(); // ?
map(0xe00000, 0xe00001).nopw(); // ? VBlank IRQ Ack
map(0xf00000, 0xf00001).nopw(); // ? Sound IRQ Ack
}
/***************************************************************************
Dragon Unit, Quiz Kokology, Quiz Kokology 2, Strike Gunner
***************************************************************************/
void seta_state::drgnunit_map(address_map &map)
{
map(0x000000, 0x0bffff).rom(); // ROM
map(0xf00000, 0xf0ffff).ram(); // RAM (qzkklogy)
map(0xffc000, 0xffffff).ram(); // RAM (drgnunit,stg)
map(0x100000, 0x103fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0x200000, 0x200001).nopw(); // Watchdog
map(0x300000, 0x300001).nopw(); // ? IRQ Ack
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x7003ff).ram().share("paletteram1"); // Palette
map(0x800000, 0x800005).ram().share("vctrl_0"); // VRAM Ctrl
map(0x900000, 0x903fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM
map(0x904000, 0x90ffff).nopw(); // unused (qzkklogy)
map(0xb00000, 0xb00001).portr("P1"); // P1
map(0xb00002, 0xb00003).portr("P2"); // P2
map(0xb00004, 0xb00005).portr("COINS"); // Coins
map(0xb00006, 0xb00007).nopr(); // unused (qzkklogy)
map(0xc00000, 0xc00001).ram(); // ? $4000
map(0xd00000, 0xd005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xd00600, 0xd00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xe00000, 0xe03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
}
/***************************************************************************
The Roulette
***************************************************************************/
MACHINE_START_MEMBER(setaroul_state, setaroul)
{
m_leds.resolve();
}
// Coin drop
MACHINE_RESET_MEMBER(setaroul_state, setaroul)
{
m_coin_start_cycles = 0;
}
INPUT_CHANGED_MEMBER( setaroul_state::coin_drop_start )
{
if (newval && !m_coin_start_cycles)
m_coin_start_cycles = m_maincpu->total_cycles();
}
CUSTOM_INPUT_MEMBER( setaroul_state::coin_sensors_r )
{
uint8_t data = 0x03;
// simulates the passage of coins through multiple sensors
if (m_coin_start_cycles)
{
attotime diff = m_maincpu->cycles_to_attotime(m_maincpu->total_cycles() - m_coin_start_cycles);
if (diff <= attotime::from_msec(16*10))
data &= ~0x02;
if (diff > attotime::from_msec(16*5) && diff < attotime::from_msec(16*15))
data &= ~0x01;
if (diff > attotime::from_msec(16*15))
m_coin_start_cycles = 0;
}
return data;
}
// the spritey low bits are mapped to 1 in every 4 bytes here as if it were a 32-bit bus..which is weird
// other ram is similar..
WRITE16_MEMBER(setaroul_state::spritecode_w)
{
if ((offset&1)==1) m_seta001->spritecodelow_w8(space, offset>>1, (data & 0xff00) >> 8);
if ((offset&1)==0) m_seta001->spritecodehigh_w8(space, offset>>1, (data & 0xff00) >> 8);
}
READ16_MEMBER(setaroul_state::spritecode_r)
{
uint16_t ret;
if ((offset&1)==1)
ret = m_seta001->spritecodelow_r8(space, offset>>1);
else
ret = m_seta001->spritecodehigh_r8(space, offset>>1);
return ret << 8;
}
WRITE16_MEMBER(setaroul_state::spriteylow_w)
{
if ((offset&1)==0) m_seta001->spriteylow_w8(space, offset>>1, (data & 0xff00) >> 8);
}
WRITE16_MEMBER(setaroul_state::spritectrl_w)
{
if ((offset&1)==0) m_seta001->spritectrl_w8(space, offset>>1, (data & 0xff00) >> 8);
}
// RTC (To do: write a D4911C device)
READ16_MEMBER(setaroul_state::rtc_r)
{
if (offset >= 7)
++offset;
if (offset/2 >= 7)
return 0;
return (m_rtc->read(space, offset/2, mem_mask) >> ((offset & 1) * 4)) & 0xf;
}
WRITE16_MEMBER(setaroul_state::rtc_w)
{
}
// Inputs
READ16_MEMBER(setaroul_state::inputs_r)
{
if (m_mux < 0x1a)
return m_bet[m_mux]->read();
return 0xff;
}
WRITE16_MEMBER(setaroul_state::mux_w)
{
m_mux = data;
}
// Outputs
void setaroul_state::show_outputs()
{
#ifdef MAME_DEBUG
popmessage("Pay: %02X Led: %02X", m_pay, m_led);
#endif
}
WRITE8_MEMBER(setaroul_state::pay_w)
{
m_pay = data;
machine().bookkeeping().coin_counter_w(6, data & 0x01); // coin in (meter 6 in input test, touch '7')
machine().bookkeeping().coin_counter_w(5, data & 0x02); // coupon in (meter 5 in input test, touch '6')
machine().bookkeeping().coin_counter_w(4, data & 0x04); // coin drop (meter 4 in input test, touch '5')
machine().bookkeeping().coin_counter_w(3, data & 0x08); // unused? (meter 3 in input test, touch '4')
machine().bookkeeping().coin_counter_w(2, data & 0x10); // medal out (meter 2 in input test, touch '3')
machine().bookkeeping().coin_counter_w(1, data & 0x20); // note in (meter 1 in input test, touch '2')
// data & 0x40 // hopper lock-out (lock.o in input test, touch '8')
// data & 0x80 // hopper motor (hop.h in input test, touch '0')
m_hopper->motor_w((!(data & 0x40) && (data & 0x80)) ? 1 : 0);
show_outputs();
}
WRITE8_MEMBER(setaroul_state::led_w)
{
m_led = data;
m_leds[0] = BIT(data, 0); // pay out (hop.c in input test, touch '1')
m_leds[1] = BIT(data, 1); // call attendant (cal.o in input test, touch '9')
//
// data & 0x10 // hopper divider (divider in input test, touch '10')
// data & 0x80 // video enable?
show_outputs();
}
void setaroul_state::setaroul_map(address_map &map)
{
map(0x000000, 0x01ffff).rom();
map(0x800000, 0x800003).noprw(); // RS232C Auto Time Set: r/w
map(0xc00000, 0xc03fff).ram().share("nvram");
map(0xc40000, 0xc40001).noprw(); // lev. 2/5 irq ack
map(0xc80000, 0xc80001).noprw(); // lev. 4 irq ack
map(0xcc0000, 0xcc001f).rw(FUNC(setaroul_state::rtc_r), FUNC(setaroul_state::rtc_w));
map(0xd00000, 0xd00001).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0xd40000, 0xd40001).portr("DSW1-A");
map(0xd40001, 0xd40001).w(FUNC(setaroul_state::pay_w));
map(0xd40002, 0xd40003).portr("DSW1-B");
map(0xd40004, 0xd40005).portr("DSW2-A");
map(0xd40006, 0xd40007).portr("DSW2-B");
map(0xd40008, 0xd40009).portr("COIN");
map(0xd40009, 0xd40009).w(FUNC(setaroul_state::led_w));
map(0xd4000a, 0xd4000b).portr("DOOR");
map(0xd40010, 0xd40011).rw(FUNC(setaroul_state::inputs_r), FUNC(setaroul_state::mux_w));
map(0xd40018, 0xd40019).portr("DSW3");
map(0xdc0000, 0xdc3fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0xe00000, 0xe03fff).ram().w(FUNC(setaroul_state::vram_w<0>)).share("vram_0");
map(0xe40000, 0xe40005).ram().share("vctrl_0"); // VRAM Ctrl
map(0xf00000, 0xf03fff).rw(FUNC(setaroul_state::spritecode_r), FUNC(setaroul_state::spritecode_w));
map(0xf40000, 0xf40bff).w(FUNC(setaroul_state::spriteylow_w));
map(0xf40c00, 0xf40c11).w(FUNC(setaroul_state::spritectrl_w));
// AM_RANGE(0xf80000, 0xf80001) AM_WRITE // $40 at boot
}
/***************************************************************************
Extreme Downhill / Sokonuke
***************************************************************************/
void seta_state::extdwnhl_map(address_map &map)
{
map.unmap_value_high();
map(0x000000, 0x0fffff).rom(); // ROM
map(0x200000, 0x20ffff).ram(); // RAM
map(0x210000, 0x21ffff).ram(); // RAM
map(0x220000, 0x23ffff).ram(); // RAM (sokonuke)
map(0x400000, 0x400001).portr("P1"); // P1
map(0x400002, 0x400003).portr("P2"); // P2
map(0x400004, 0x400005).portr("COINS"); // Coins
map(0x400008, 0x40000b).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x40000c, 0x40000d).rw("watchdog", FUNC(watchdog_timer_device::reset16_r), FUNC(watchdog_timer_device::reset16_w)); // Watchdog (extdwnhl (R) & sokonuke (W) MUST RETURN $FFFF)
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_counter_w)); // Coin Counter (no lockout)
map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x500004, 0x500007).noprw(); // IRQ Ack (extdwnhl (R) & sokonuke (W))
map(0x600400, 0x600fff).ram().share("paletteram1"); // Palette
map(0x601000, 0x610bff).ram(); //
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0x804000, 0x80ffff).ram(); //
map(0x880000, 0x883fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0x884000, 0x88ffff).ram(); //
map(0x900000, 0x900005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0x980000, 0x980005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).ram(); // ? 0x4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xb04000, 0xb13fff).ram(); //
map(0xe00000, 0xe03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
}
/***************************************************************************
(Kamen) Masked Riders Club Battle Race / Mad Shark
***************************************************************************/
void seta_state::kamenrid_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0x200000, 0x20ffff).ram(); // RAM
map(0x500000, 0x500001).portr("P1"); // P1
map(0x500002, 0x500003).portr("P2"); // P2
map(0x500004, 0x500007).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x500008, 0x500009).portr("COINS"); // Coins
map(0x50000c, 0x50000d).rw("watchdog", FUNC(watchdog_timer_device::reset16_r), FUNC(watchdog_timer_device::reset16_w)); // xx Watchdog? (sokonuke)
map(0x600001, 0x600001).w(FUNC(seta_state::seta_coin_counter_w)); // Coin Counter (no lockout)
map(0x600003, 0x600003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x600004, 0x600005).w(FUNC(seta_state::ipl1_ack_w));
map(0x600006, 0x600007).w(FUNC(seta_state::ipl2_ack_w));
map(0x700000, 0x7003ff).ram(); // Palette RAM (tested)
map(0x700400, 0x700fff).ram().share("paletteram1"); // Palette
map(0x701000, 0x703fff).ram(); // Palette
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0x804000, 0x807fff).ram(); // tested
map(0x880000, 0x883fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0x884000, 0x887fff).ram(); // tested
map(0x900000, 0x900005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0x980000, 0x980005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).ram(); // ? $4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xb04000, 0xb07fff).ram(); // tested
map(0xc00000, 0xc00007).rw("pit", FUNC(pit8254_device::read), FUNC(pit8254_device::write)).umask16(0x00ff);
map(0xd00000, 0xd03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
}
/* almost identical to kamenrid */
void seta_state::madshark_map(address_map &map)
{
map(0x000000, 0x0fffff).rom(); // ROM
map(0x200000, 0x20ffff).ram(); // RAM
map(0x500000, 0x500001).portr("P1"); // P1
map(0x500002, 0x500003).portr("P2"); // P2
map(0x500004, 0x500005).portr("COINS"); // Coins
map(0x500008, 0x50000b).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x50000c, 0x50000d).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x600001, 0x600001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x600003, 0x600003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x600004, 0x600005).w(FUNC(seta_state::ipl1_ack_w));
map(0x600006, 0x600007).w(FUNC(seta_state::ipl2_ack_w));
map(0x700400, 0x700fff).ram().share("paletteram1"); // Palette
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0x880000, 0x883fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0x900000, 0x900005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0x980000, 0x980005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).ram(); // ? $4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xc00000, 0xc00007).rw("pit", FUNC(pit8254_device::read), FUNC(pit8254_device::write)).umask16(0x00ff);
map(0xd00000, 0xd03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
}
WRITE16_MEMBER(seta_state::magspeed_lights_w)
{
COMBINE_DATA( &m_magspeed_lights[offset] );
for (int i = 0; i < 16; i++)
m_leds[offset * 16 + i] = BIT(m_magspeed_lights[offset], i);
// popmessage("%04X %04X %04X", m_magspeed_lights[0], m_magspeed_lights[1], m_magspeed_lights[2]);
}
/* almost identical to kamenrid */
void seta_state::magspeed_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0x1f8000, 0x1f8fff).noprw(); // NVRAM?
map(0x200000, 0x20ffff).ram(); // RAM
map(0x500000, 0x500001).portr("P1"); // P1
map(0x500002, 0x500003).portr("P2"); // P2
map(0x500004, 0x500005).portr("COINS"); // Coins
map(0x500008, 0x50000b).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x50000c, 0x50000d).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x500011, 0x500011).w(FUNC(seta_state::seta_coin_counter_w)); // Coin Counter (no lockout)
map(0x500015, 0x500015).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x500018, 0x500019).w(FUNC(seta_state::ipl1_ack_w)); // lev 2 irq ack?
map(0x50001c, 0x50001d).w(FUNC(seta_state::ipl2_ack_w)); // lev 4 irq ack?
map(0x600000, 0x600005).w(FUNC(seta_state::magspeed_lights_w)); // Lights
map(0x600006, 0x600007).nopw(); // ?
map(0x700000, 0x7003ff).ram(); // Palette RAM (tested)
map(0x700400, 0x700fff).ram().share("paletteram1"); // Palette
map(0x701000, 0x703fff).ram(); // Palette RAM (tested)
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0x804000, 0x807fff).ram(); // tested
map(0x880000, 0x883fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0x884000, 0x887fff).ram(); // tested
map(0x900000, 0x900005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0x980000, 0x980005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).ram(); // ? $4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xb04000, 0xb07fff).ram(); // tested
map(0xc00000, 0xc00007).rw("pit", FUNC(pit8254_device::read), FUNC(pit8254_device::write)).umask16(0x00ff);
map(0xd00000, 0xd03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
}
/***************************************************************************
Krazy Bowl
***************************************************************************/
void seta_state::krzybowl_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0xf00000, 0xf0ffff).ram(); // RAM
map(0x100000, 0x100001).nopr(); // ?
map(0x200000, 0x200001).nopr(); // ?
map(0x300000, 0x300003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x400000, 0x400001).nopw(); // ?
map(0x500000, 0x500001).portr("P1"); // P1
map(0x500002, 0x500003).portr("P2"); // P2
map(0x500004, 0x500005).portr("COINS"); // Coins
map(0x600000, 0x600007).r("upd1", FUNC(upd4701_device::read_xy)).umask16(0x00ff); // P1 trackball
map(0x600008, 0x60000f).r("upd2", FUNC(upd4701_device::read_xy)).umask16(0x00ff); // P2 trackball
map(0x8000f0, 0x8000f1).ram(); // NVRAM
map(0x800100, 0x8001ff).ram(); // NVRAM
map(0xa00000, 0xa03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0xb00000, 0xb003ff).ram().share("paletteram1"); // Palette
map(0xc00000, 0xc03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xd00000, 0xd00001).ram(); // ? 0x4000
map(0xe00000, 0xe005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xe00600, 0xe00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
}
/***************************************************************************
Mobile Suit Gundam
***************************************************************************/
/* Mirror RAM is necessary or startup, to clear Work RAM after the test */
void seta_state::msgundam_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0x100000, 0x1fffff).rom(); // ROM
map(0x200000, 0x20ffff).ram().mirror(0x70000); // RAM
map(0x400000, 0x400001).portr("P1"); // P1
map(0x400002, 0x400003).portr("P2"); // P2
map(0x400004, 0x400005).portr("COINS"); // Coins
map(0x400000, 0x400001).w(FUNC(seta_state::ipl1_ack_w)); // Lev 2 IRQ Ack
map(0x400004, 0x400005).w(FUNC(seta_state::ipl2_ack_w)); // Lev 4 IRQ Ack
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x500002, 0x500003).nopw(); // ?
map(0x500005, 0x500005).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700400, 0x700fff).ram().share("paletteram1"); // Palette
map(0x800000, 0x8005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0x800600, 0x800607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0x880000, 0x880001).ram(); // ? 0x4000
map(0x900000, 0x903fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xa00000, 0xa03fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0xa80000, 0xa83fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0xb00000, 0xb00005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0xb80000, 0xb80005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xc00000, 0xc03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0xd00000, 0xd00007).rw("pit", FUNC(pit8254_device::read), FUNC(pit8254_device::write)).umask16(0x00ff);
}
/***************************************************************************
Oishii Puzzle
***************************************************************************/
/* similar to wrofaero */
void seta_state::oisipuzl_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0x100000, 0x17ffff).rom(); // ROM
map(0x200000, 0x20ffff).ram(); // RAM
map(0x300000, 0x300003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x400000, 0x400001).portr("P1"); // P1
map(0x400002, 0x400003).portr("P2"); // P2
map(0x400004, 0x400005).portr("COINS"); // Coins
map(0x400000, 0x400001).nopw(); // ? IRQ Ack
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x500004, 0x500005).nopw(); // ? IRQ Ack
map(0x700000, 0x703fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0x880000, 0x883fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0x900000, 0x900005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0x980000, 0x980005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).ram(); // ? 0x4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xc00400, 0xc00fff).ram().share("paletteram1"); // Palette
}
/***************************************************************************
Triple Fun
***************************************************************************/
/* Same as oisipuzl but with the sound system replaced */
void seta_state::triplfun_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0x100000, 0x17ffff).rom(); // ROM
map(0x200000, 0x20ffff).ram(); // RAM
map(0x300000, 0x300003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x400000, 0x400001).portr("P1"); // P1
map(0x400002, 0x400003).portr("P2"); // P2
map(0x400004, 0x400005).portr("COINS"); // Coins
map(0x400000, 0x400001).nopw(); // ? IRQ Ack
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x500004, 0x500005).nopw(); // ? IRQ Ack
map(0x500007, 0x500007).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // tfun sound
map(0x700000, 0x703fff).noprw();
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0x880000, 0x883fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0x900000, 0x900005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0x980000, 0x980005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).ram(); // ? 0x4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xc00400, 0xc00fff).ram().share("paletteram1"); // Palette
}
/***************************************************************************
Pro Mahjong Kiwame
***************************************************************************/
WRITE16_MEMBER(seta_state::kiwame_row_select_w)
{
m_kiwame_row_select = data & 0x001f;
}
READ16_MEMBER(seta_state::kiwame_input_r)
{
int row_select = m_kiwame_row_select;
int i;
for(i = 0; i < 5; i++)
if (row_select & (1<<i)) break;
switch( offset )
{
case 0x00/2: return m_key[i]->read();
case 0x02/2: return 0xffff;
case 0x04/2: return m_coins->read();
// case 0x06/2:
case 0x08/2: return 0xffff;
default:
logerror("PC %06X - Read input %02X !\n", m_maincpu->pc(), offset*2);
return 0x0000;
}
}
void seta_state::kiwame_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0x200000, 0x20ffff).ram().share("nvram"); // RAM
map(0x800000, 0x803fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0x900000, 0x900001).ram(); // ? 0x4000
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xb00000, 0xb003ff).ram().share("paletteram1"); // Palette
map(0xc00000, 0xc03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0xd00000, 0xd00009).r(FUNC(seta_state::kiwame_input_r)); // mahjong panel
map(0xe00000, 0xe00003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0xfffc00, 0xffffff).rw("tmp68301", FUNC(tmp68301_device::regs_r), FUNC(tmp68301_device::regs_w));
}
/***************************************************************************
Thunder & Lightning / Wit's
***************************************************************************/
READ16_MEMBER(seta_state::thunderl_protection_r)
{
// logerror("PC %06X - Protection Read\n", m_maincpu->pc());
return 0x00dd;
}
WRITE16_MEMBER(seta_state::thunderl_protection_w)
{
// logerror("PC %06X - Protection Written: %04X <- %04X\n", m_maincpu->pc(), offset*2, data);
}
/* Similar to downtown etc. */
void seta_state::thunderl_map(address_map &map)
{
map(0x000000, 0x00ffff).rom(); // ROM
map(0xffc000, 0xffffff).ram(); // RAM
map(0x100000, 0x103fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0x200000, 0x200001).rw(FUNC(seta_state::ipl1_ack_r), FUNC(seta_state::ipl1_ack_w));
map(0x300000, 0x300001).nopw(); // ?
map(0x400000, 0x40ffff).w(FUNC(seta_state::thunderl_protection_w)); // Protection (not in wits)
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x7003ff).ram().share("paletteram1"); // Palette
map(0xb00000, 0xb00001).portr("P1"); // P1
map(0xb00002, 0xb00003).portr("P2"); // P2
map(0xb00004, 0xb00005).portr("COINS"); // Coins
map(0xb0000c, 0xb0000d).r(FUNC(seta_state::thunderl_protection_r)); // Protection (not in wits)
map(0xb00008, 0xb00009).portr("P3"); // P3 (wits)
map(0xb0000a, 0xb0000b).portr("P4"); // P4 (wits)
map(0xc00000, 0xc00001).ram(); // ? 0x4000
map(0xd00000, 0xd005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xd00600, 0xd00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xe00000, 0xe03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xe04000, 0xe07fff).ram(); // (wits)
}
void seta_state::thunderlbl_map(address_map &map)
{
map(0x000000, 0x00ffff).rom(); // ROM
map(0xffc000, 0xffffff).ram(); // RAM
// map(0x100000, 0x103fff).rw("x1snd", FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0x200000, 0x200001).rw(FUNC(seta_state::ipl1_ack_r), FUNC(seta_state::ipl1_ack_w));
map(0x300000, 0x300001).nopw(); // ?
// map(0x400000, 0x40ffff).w(FUNC(seta_state::thunderl_protection_w)); // Protection (not in wits)
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x7003ff).ram().share("paletteram1"); // Palette
map(0xb00000, 0xb00001).portr("P1"); // P1
map(0xb00002, 0xb00003).portr("P2"); // P2
map(0xb00004, 0xb00005).portr("COINS"); // Coins
map(0xb0000c, 0xb0000d).w(m_seta001, FUNC(seta001_device::spritectrl_w8)).umask16(0xff00); // the bootleg is modified to write the first byte of spritectrl here, rather than the usual address
map(0xb00008, 0xb00009).portr("P3"); // P3 (wits)
map(0xb00008, 0xb00008).w("soundlatch1", FUNC(generic_latch_8_device::write));
map(0xb0000a, 0xb0000b).portr("P4"); // P4 (wits)
map(0xc00000, 0xc00001).ram(); // ? 0x4000
map(0xd00000, 0xd005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xd00600, 0xd00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xe00000, 0xe03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xe04000, 0xe07fff).ram(); // (wits)
}
/***************************************************************************
Wiggie Waggie
***************************************************************************/
void seta_state::wiggie_map(address_map &map)
{
map(0x000000, 0x01ffff).rom(); // ROM
map(0xffc000, 0xffffff).ram(); // RAM
map(0x100000, 0x103fff).noprw(); // X1_010 is not used
map(0x200000, 0x200001).rw(FUNC(seta_state::ipl1_ack_r), FUNC(seta_state::ipl1_ack_w));
map(0x300000, 0x300001).nopw(); // ?
map(0x400000, 0x40ffff).w(FUNC(seta_state::thunderl_protection_w)); // Protection (not in wits)
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700000, 0x7003ff).ram().share("paletteram1"); // Palette
map(0xb00000, 0xb00001).portr("P1"); // P1
map(0xb00002, 0xb00003).portr("P2"); // P2
map(0xb00004, 0xb00005).portr("COINS"); // Coins
map(0xb0000c, 0xb0000d).r(FUNC(seta_state::thunderl_protection_r)); // Protection (not in wits)
map(0xb00008, 0xb00009).portr("P3"); // P3 (wits)
map(0xb00008, 0xb00008).w("soundlatch1", FUNC(generic_latch_8_device::write));
map(0xb0000a, 0xb0000b).portr("P4"); // P4 (wits)
map(0xc00000, 0xc00001).ram(); // ? 0x4000
map(0xd00000, 0xd005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xd00600, 0xd00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xe00000, 0xe03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xe04000, 0xe07fff).ram(); // (wits)
}
void seta_state::wiggie_sound_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
map(0x8000, 0x87ff).ram();
map(0x9800, 0x9800).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0xa000, 0xa000).r("soundlatch1", FUNC(generic_latch_8_device::read));
}
/***************************************************************************
Ultraman Club / SD Gundam Neo Battling
***************************************************************************/
void seta_state::umanclub_map(address_map &map)
{
map(0x000000, 0x03ffff).rom(); // ROM
map(0x200000, 0x20ffff).ram(); // RAM
map(0x300000, 0x3003ff).ram().share("paletteram1"); // Palette
map(0x300400, 0x300fff).ram(); //
map(0x400000, 0x400001).portr("P1"); // P1
map(0x400002, 0x400003).portr("P2"); // P2
map(0x400004, 0x400005).portr("COINS"); // Coins
map(0x400000, 0x400001).nopw(); // ? (end of lev 2)
map(0x400004, 0x400005).nopw(); // ? (end of lev 2)
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).ram(); // ? 0x4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xc00000, 0xc03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
}
/***************************************************************************
Ultra Toukond Densetsu
***************************************************************************/
WRITE8_MEMBER(seta_state::utoukond_sound_control_w)
{
if (!BIT(data, 6))
m_soundlatch[0]->acknowledge_w(space, 0, 0);
// other bits used for banking? (low nibble seems to always be 2)
}
void seta_state::utoukond_map(address_map &map)
{
map(0x000000, 0x0fffff).rom(); // ROM
map(0x200000, 0x20ffff).ram(); // RAM
map(0x400000, 0x400001).portr("P1"); // P1
map(0x400002, 0x400003).portr("P2"); // P2
map(0x400004, 0x400005).portr("COINS"); // Coins
map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout
map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers
map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x700400, 0x700fff).ram().share("paletteram1"); // Palette
map(0x800000, 0x803fff).ram().w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0&1
map(0x880000, 0x883fff).ram().w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2&3
map(0x900000, 0x900005).writeonly().share("vctrl_0");// VRAM 0&1 Ctrl
map(0x980000, 0x980005).writeonly().share("vctrl_1");// VRAM 2&3 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xc00001, 0xc00001).w("soundlatch1", FUNC(generic_latch_8_device::write));
map(0xe00000, 0xe00001).nopw(); // ? ack
}
/***************************************************************************
Pairs Love
***************************************************************************/
READ16_MEMBER(seta_state::pairlove_prot_r)
{
int retdata;
retdata = m_pairslove_protram[offset];
//osd_printf_debug("pairs love protection? read %06x %04x %04x\n",m_maincpu->pc(), offset,retdata);
m_pairslove_protram[offset] = m_pairslove_protram_old[offset];
return retdata;
}
WRITE16_MEMBER(seta_state::pairlove_prot_w)
{
//osd_printf_debug("pairs love protection? write %06x %04x %04x\n",m_maincpu->pc(), offset,data);
m_pairslove_protram_old[offset] = m_pairslove_protram[offset];
m_pairslove_protram[offset] = data;
}
void seta_state::pairlove_map(address_map &map)
{
map(0x000000, 0x03ffff).rom(); // ROM
map(0x100000, 0x100001).nopw(); // ? 1 (start of interrupts, main loop: watchdog?)
map(0x200000, 0x200001).nopw(); // ? 0/1 (IRQ acknowledge?)
map(0x300000, 0x300003).r(FUNC(seta_state::seta_dsw_r)); // DSW
map(0x400001, 0x400001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout + Sound Enable (bit 4?)
map(0x500000, 0x500001).portr("P1"); // P1
map(0x500002, 0x500003).portr("P2"); // P2
map(0x500004, 0x500005).portr("COINS"); // Coins
map(0x900000, 0x9001ff).rw(FUNC(seta_state::pairlove_prot_r), FUNC(seta_state::pairlove_prot_w));
map(0xa00000, 0xa03fff).rw(m_x1, FUNC(x1_010_device::word_r), FUNC(x1_010_device::word_w)); // Sound
map(0xb00000, 0xb00fff).ram().share("paletteram1"); // Palette
map(0xc00000, 0xc03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
map(0xd00000, 0xd00001).ram(); // ? 0x4000
map(0xe00000, 0xe005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xe00600, 0xe00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xf00000, 0xf0ffff).ram(); // RAM
}
/***************************************************************************
Crazy Fight
***************************************************************************/
void seta_state::crazyfgt_map(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x400000, 0x40ffff).ram();
map(0x610000, 0x610001).portr("COINS");
map(0x610002, 0x610003).portr("UNK");
map(0x610004, 0x610005).portr("INPUT");
map(0x610006, 0x610007).nopw();
map(0x620000, 0x620003).nopw(); // protection
map(0x630000, 0x630003).r(FUNC(seta_state::seta_dsw_r));
map(0x640400, 0x640fff).writeonly().share("paletteram1"); // Palette
map(0x650000, 0x650003).w("ymsnd", FUNC(ym3812_device::write)).umask16(0x00ff);
map(0x658001, 0x658001).w("oki", FUNC(okim6295_device::write));
map(0x670000, 0x670001).nopr(); // watchdog?
map(0x800000, 0x803fff).w(FUNC(seta_state::vram_w<1>)).share("vram_1"); // VRAM 2
map(0x880000, 0x883fff).w(FUNC(seta_state::vram_w<0>)).share("vram_0"); // VRAM 0
map(0x900000, 0x900005).ram().share("vctrl_1"); // VRAM 2&3 Ctrl
map(0x980000, 0x980005).ram().share("vctrl_0"); // VRAM 0&1 Ctrl
map(0xa00000, 0xa005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y
map(0xa00600, 0xa00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16));
map(0xa80000, 0xa80001).nopw(); // ? 0x4000
map(0xb00000, 0xb03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr
}
/***************************************************************************
Jockey Club
***************************************************************************/
// RTC (To do: write a D4911C device)
READ16_MEMBER(jockeyc_state::rtc_r)
{
if (offset >= 7)
++offset;
if (offset/2 >= 7)
return 0;
return (m_rtc->read(space, offset/2, mem_mask) >> ((offset & 1) * 4)) & 0xf;
}
WRITE16_MEMBER(jockeyc_state::rtc_w)
{
}
// Outputs
void jockeyc_state::show_outputs()
{
#ifdef MAME_DEBUG
popmessage("Mux: %04X Out: %04X", m_mux & (~0xf8), m_out);
#endif
}
READ16_MEMBER(jockeyc_state::mux_r)
{
switch ( m_mux & 0xf8 )
{
case 0x08: return (m_key2[0]->read() << 8) | m_key1[0]->read();
case 0x10: return (m_key2[1]->read() << 8) | m_key1[1]->read();
case 0x20: return (m_key2[2]->read() << 8) | m_key1[2]->read();
case 0x40: return (m_key2[3]->read() << 8) | m_key1[3]->read();
case 0x80: return (m_key2[4]->read() << 8) | m_key1[4]->read();
}
logerror("%06X: unknown key read, mux = %04x\n", m_maincpu->pc(), m_mux);
return 0xffff;
}