summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/atlantis.c
blob: 22678df24f31d288bc133fb8b4d1047fcafaded5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
/***************************************************************************

    Midway "Atlantis" hardware

    skeleton by R. Belmont

    Games supported:
        * Midway Skins Game
        * Midway Skins Game Tournament Edition (not dumped)
        * Midway Swingers Tour (not dumped)

    Hardware overview:
        * VR4310 CPU (similar to the N64's VR4300)
        * VR4373 "Nile 3" system controller / PCI bridge
        * CMD 646U2 Ultra DMA IDE controller
        * M4T28-8R128H1 TimeKeeper RTC/CMOS
        * PLX PCI9050 Bus Target Interface Chip (interfaces ISA-style designs to PCI)
        * Midway Zeus-series custom video
        * TL16c552 dual UART
        * ADSP-2181 based DCS2 audio (unclear which variant)

    TODO:
        * Proper VR4373 implementation
        * Proper PCI bus implementation
        * PCI peripherals

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

#include "emu.h"
#include "cpu/mips/mips3.h"
#include "cpu/adsp2100/adsp2100.h"
#include "machine/idectrl.h"
#include "machine/midwayic.h"
#include "audio/dcs.h"


class atlantis_state : public driver_device
{
public:
	atlantis_state(const machine_config &mconfig, device_type type, const char *tag)
		: driver_device(mconfig, type, tag) {}
};


/*************************************
 *
 *  Machine start
 *
 *************************************/

static MACHINE_START( mwskins )
{
//  atlantis_state *state = machine.driver_data<atlantis_state>();
	/* set the fastest DRC options */
	mips3drc_set_options(machine.device("maincpu"), MIPS3DRC_FASTEST_OPTIONS);
}



/*************************************
 *
 *  Machine init
 *
 *************************************/

static MACHINE_RESET( mwskins )
{
    dcs_reset_w(machine, 1);
    dcs_reset_w(machine, 0);
}



/*************************************
 *
 *  Video refresh
 *
 *************************************/

static SCREEN_UPDATE_IND16( mwskins )
{
	return 0;
}



/*************************************
 *
 *  Interrupt handling
 *
 *************************************/

static void ide_interrupt(device_t *device, int state)
{
}

/*************************************
 *
 *  Main CPU memory handlers
 *
 *************************************/

static ADDRESS_MAP_START( main_map, AS_PROGRAM, 32, atlantis_state )
	ADDRESS_MAP_UNMAP_HIGH
    AM_RANGE(0x00000000, 0x007fffff) AM_RAM // 8 MB main RAM
    // 04000000 - PCI slot (ActionTec modem, ROM dump TBD)
    // 08000000 - PLX9050 chip (Zeus interface?)
    // 0F000000 - VR4373 ("Nile 3") registers
	AM_RANGE(0x1fc00000, 0x1fc7ffff) AM_ROM AM_REGION("user1", 0) AM_SHARE("rombase")
ADDRESS_MAP_END




/*************************************
 *
 *  Port definitions
 *
 *************************************/

static INPUT_PORTS_START( mwskins )
INPUT_PORTS_END

/*************************************
 *
 *  Machine driver
 *
 *************************************/

static const mips3_config r4310_config =
{
	16384,				/* code cache size */
	16384				/* data cache size */
};


static MACHINE_CONFIG_START( mwskins, atlantis_state )

	/* basic machine hardware */
	MCFG_CPU_ADD("maincpu", VR4310LE, 166666666)    // clock is TRUSTED
	MCFG_CPU_CONFIG(r4310_config)
	MCFG_CPU_PROGRAM_MAP(main_map)

	MCFG_MACHINE_START(mwskins)
	MCFG_MACHINE_RESET(mwskins)

	MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)

	/* video hardware */
	MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)

	MCFG_SCREEN_ADD("screen", RASTER)
	MCFG_SCREEN_REFRESH_RATE(60)
	MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
	MCFG_SCREEN_SIZE(320, 240)
	MCFG_SCREEN_VISIBLE_AREA(0, 319, 0, 239)
	MCFG_SCREEN_UPDATE_STATIC(mwskins)

	MCFG_PALETTE_INIT(BBBBB_GGGGG_RRRRR)
	MCFG_PALETTE_LENGTH(32768)

	/* sound hardware */
	MCFG_FRAGMENT_ADD(dcs2_audio_denver)
MACHINE_CONFIG_END



/*************************************
 *
 *  ROM definition(s)
 *
 *************************************/

ROM_START( mwskins )
	ROM_REGION32_LE( 0x80000, "user1", 0 )	/* 512k for R4310 code */
    ROM_LOAD( "skins_game_u4_boot_1.00.u4", 0x000000, 0x080000, CRC(0fe87720) SHA1(4b24abbe662a2d7b61e6a3f079e28b73605ba19f) )

	DISK_REGION( "drive_0" )
	DISK_IMAGE( "mwskins", 0, SHA1(5cb293a6fdb2478293f48ddfc93cdd018acb2bb5) )
ROM_END

ROM_START( mwskinsa )
	ROM_REGION32_LE( 0x80000, "user1", 0 )	/* 512k for R4310 code */
    ROM_LOAD( "skins_game_u4_boot_1.00.u4", 0x000000, 0x080000, CRC(0fe87720) SHA1(4b24abbe662a2d7b61e6a3f079e28b73605ba19f) )

	DISK_REGION( "drive_0" )
	DISK_IMAGE( "mwskinsa", 0, SHA1(72497917b31156eb11a46bbcc6f22a254dcec044) )
ROM_END


/*************************************
 *
 *  Driver initialization
 *
 *************************************/

static DRIVER_INIT( mwskins )
{
	dcs2_init(machine, 8, 0);
}

/*************************************
 *
 *  Game driver(s)
 *
 *************************************/

GAME( 2000, mwskins,    0,      mwskins, mwskins,  mwskins,   ROT0, "Midway", "Skins Game (1.06)", GAME_NOT_WORKING | GAME_NO_SOUND )
GAME( 2000, mwskinsa, mwskins,  mwskins, mwskins,  mwskins,   ROT0, "Midway", "Skins Game (unknown alt. version)", GAME_NOT_WORKING | GAME_NO_SOUND )