mirror of
https://github.com/holub/mame
synced 2025-05-21 05:08:54 +03:00
Breaks some driver entanglements to simplify future driver_device
conversion efforts: [Atari Ace] * taito_f3 is disentangled from a number of other drivers by using an AM_SHARE tag instead of a common variable. * Several drivers are made into explicit subclasses of other drivers: 8080bw from mw8080bw, missb2 from bublbobl, quasar from cvs, taito_x from seta. * arcadecl is separated from rampart by duplicating the bitmap rendering code. * jaleco decryption code is moved to jalcrpt.c. * cischeat is separated from megasys1 by duplicating some video code. * mcr3 is partly separated from mcr. * machine/midwunit.c is split into wunit and xunit files with some code duplication. * midtunit gfx_rom variables are made distinct from midyunit variables, making midyunit independent of midtunit. * contants in namconb1 are duplicated/renamed in namcofl. * namcos2 uses of namcos21 are eliminated by introducing namcos2_kickstart. * toypop is separated from mappy by duplicating some video code.
This commit is contained in:
parent
4977af6a7d
commit
c809bf3d3a
8
.gitattributes
vendored
8
.gitattributes
vendored
@ -2623,6 +2623,7 @@ src/mame/includes/1943.h svneol=native#text/plain
|
||||
src/mame/includes/20pacgal.h svneol=native#text/plain
|
||||
src/mame/includes/40love.h svneol=native#text/plain
|
||||
src/mame/includes/4enraya.h svneol=native#text/plain
|
||||
src/mame/includes/8080bw.h svneol=native#text/plain
|
||||
src/mame/includes/88games.h svneol=native#text/plain
|
||||
src/mame/includes/actfancr.h svneol=native#text/plain
|
||||
src/mame/includes/aeroboto.h svneol=native#text/plain
|
||||
@ -2950,6 +2951,7 @@ src/mame/includes/markham.h svneol=native#text/plain
|
||||
src/mame/includes/matmania.h svneol=native#text/plain
|
||||
src/mame/includes/mcatadv.h svneol=native#text/plain
|
||||
src/mame/includes/mcr.h svneol=native#text/plain
|
||||
src/mame/includes/mcr3.h svneol=native#text/plain
|
||||
src/mame/includes/mcr68.h svneol=native#text/plain
|
||||
src/mame/includes/meadows.h svneol=native#text/plain
|
||||
src/mame/includes/megadriv.h svneol=native#text/plain
|
||||
@ -2965,6 +2967,7 @@ src/mame/includes/micro3d.h svneol=native#text/plain
|
||||
src/mame/includes/midtunit.h svneol=native#text/plain
|
||||
src/mame/includes/midvunit.h svneol=native#text/plain
|
||||
src/mame/includes/midwunit.h svneol=native#text/plain
|
||||
src/mame/includes/midxunit.h svneol=native#text/plain
|
||||
src/mame/includes/midyunit.h svneol=native#text/plain
|
||||
src/mame/includes/midzeus.h svneol=native#text/plain
|
||||
src/mame/includes/mikie.h svneol=native#text/plain
|
||||
@ -3512,6 +3515,8 @@ src/mame/machine/harddriv.c svneol=native#text/plain
|
||||
src/mame/machine/irem_cpu.c svneol=native#text/plain
|
||||
src/mame/machine/irem_cpu.h svneol=native#text/plain
|
||||
src/mame/machine/irobot.c svneol=native#text/plain
|
||||
src/mame/machine/jalcrpt.c svneol=native#text/plain
|
||||
src/mame/machine/jalcrpt.h svneol=native#text/plain
|
||||
src/mame/machine/jumpshot.c svneol=native#text/plain
|
||||
src/mame/machine/kabuki.c svneol=native#text/plain
|
||||
src/mame/machine/kaneko16.c svneol=native#text/plain
|
||||
@ -3544,11 +3549,10 @@ src/mame/machine/midtunit.c svneol=native#text/plain
|
||||
src/mame/machine/midwayic.c svneol=native#text/plain
|
||||
src/mame/machine/midwayic.h svneol=native#text/plain
|
||||
src/mame/machine/midwunit.c svneol=native#text/plain
|
||||
src/mame/machine/midxunit.c svneol=native#text/plain
|
||||
src/mame/machine/midyunit.c svneol=native#text/plain
|
||||
src/mame/machine/model1.c svneol=native#text/plain
|
||||
src/mame/machine/model3.c svneol=native#text/plain
|
||||
src/mame/machine/ms32crpt.c svneol=native#text/plain
|
||||
src/mame/machine/ms32crpt.h svneol=native#text/plain
|
||||
src/mame/machine/mw8080bw.c svneol=native#text/plain
|
||||
src/mame/machine/n64.c svneol=native#text/plain
|
||||
src/mame/machine/namco06.c svneol=native#text/plain
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "sound/sn76477.h"
|
||||
#include "sound/discrete.h"
|
||||
#include "sound/speaker.h"
|
||||
#include "includes/mw8080bw.h"
|
||||
#include "includes/8080bw.h"
|
||||
|
||||
|
||||
/*******************************************************/
|
||||
@ -16,7 +16,9 @@
|
||||
|
||||
MACHINE_START( extra_8080bw_sh )
|
||||
{
|
||||
mw8080bw_state *state = machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = machine->driver_data<_8080bw_state>();
|
||||
|
||||
state->speaker = machine->device("speaker");
|
||||
|
||||
state->save_item(NAME(state->port_1_last_extra));
|
||||
state->save_item(NAME(state->port_2_last_extra));
|
||||
@ -31,7 +33,7 @@ MACHINE_START( extra_8080bw_sh )
|
||||
|
||||
WRITE8_HANDLER( invadpt2_sh_port_1_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_1_last_extra;
|
||||
|
||||
sn76477_enable_w(state->sn, !(data & 0x01)); /* SAUCER SOUND */
|
||||
@ -58,7 +60,7 @@ WRITE8_HANDLER( invadpt2_sh_port_2_w )
|
||||
D2 = 82K
|
||||
D3 = 100K */
|
||||
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_2_last_extra;
|
||||
|
||||
if (rising_bits & 0x01) sample_start(state->samples, 4, 3, 0); /* FLEET */
|
||||
@ -81,7 +83,7 @@ WRITE8_HANDLER( invadpt2_sh_port_2_w )
|
||||
|
||||
WRITE8_HANDLER( spcewars_sh_port_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_1_last_extra;
|
||||
|
||||
sn76477_enable_w(state->sn, !(data & 0x01)); /* Saucer Sound */
|
||||
@ -125,7 +127,7 @@ const samples_interface lrescue_samples_interface =
|
||||
|
||||
WRITE8_HANDLER( lrescue_sh_port_1_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_1_last_extra;
|
||||
|
||||
if (rising_bits & 0x01) sample_start(state->samples, 0, 3, 0); /* Thrust */
|
||||
@ -143,7 +145,7 @@ WRITE8_HANDLER( lrescue_sh_port_1_w )
|
||||
|
||||
WRITE8_HANDLER( lrescue_sh_port_2_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_2_last_extra;
|
||||
|
||||
if (rising_bits & 0x01) sample_start(state->samples, 1, 8, 0); /* Footstep high tone */
|
||||
@ -183,7 +185,7 @@ WRITE8_HANDLER( cosmo_sh_port_2_w )
|
||||
|
||||
WRITE8_HANDLER( ballbomb_sh_port_1_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_1_last_extra;
|
||||
|
||||
if (rising_bits & 0x01) sample_start(state->samples, 1, 2, 0); /* Hit a balloon */
|
||||
@ -201,7 +203,7 @@ WRITE8_HANDLER( ballbomb_sh_port_1_w )
|
||||
|
||||
WRITE8_HANDLER( ballbomb_sh_port_2_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_2_last_extra;
|
||||
|
||||
if (data & 0x01) sample_start(state->samples, 0, 7, 0); /* Indicates plane will drop bombs */
|
||||
@ -260,7 +262,7 @@ DISCRETE_SOUND_END
|
||||
WRITE8_HANDLER( indianbt_sh_port_1_w )
|
||||
{
|
||||
/* bit 4 occurs every 5.25 seconds during gameplay */
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_1_last_extra;
|
||||
|
||||
if (rising_bits & 0x01) sample_start(state->samples, 1, 7, 0); /* Death */
|
||||
@ -277,7 +279,7 @@ WRITE8_HANDLER( indianbt_sh_port_1_w )
|
||||
|
||||
WRITE8_HANDLER( indianbt_sh_port_2_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_2_last_extra;
|
||||
|
||||
if (rising_bits & 0x01) sample_start(state->samples, 4, 0, 0); /* Bird dropped an egg, Lasso used */
|
||||
@ -633,7 +635,7 @@ WRITE8_DEVICE_HANDLER( polaris_sh_port_2_w )
|
||||
|
||||
WRITE8_DEVICE_HANDLER( polaris_sh_port_3_w )
|
||||
{
|
||||
mw8080bw_state *state = device->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = device->machine->driver_data<_8080bw_state>();
|
||||
|
||||
coin_lockout_global_w(device->machine, data & 0x04); /* SX8 */
|
||||
|
||||
@ -787,7 +789,7 @@ static const double schaser_effect_rc[8] =
|
||||
|
||||
WRITE8_HANDLER( schaser_sh_port_1_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
int effect;
|
||||
|
||||
/* bit 0 - Dot Sound Enable (SX0)
|
||||
@ -860,7 +862,7 @@ WRITE8_HANDLER( schaser_sh_port_2_w )
|
||||
bit 4 - Field Control B (SX10)
|
||||
bit 5 - Flip Screen */
|
||||
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
|
||||
//printf( "schaser_sh_port_2_w: %02x\n", data );
|
||||
|
||||
@ -882,7 +884,7 @@ WRITE8_HANDLER( schaser_sh_port_2_w )
|
||||
|
||||
static TIMER_CALLBACK( schaser_effect_555_cb )
|
||||
{
|
||||
mw8080bw_state *state = machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = machine->driver_data<_8080bw_state>();
|
||||
int effect = param;
|
||||
attotime new_time;
|
||||
/* Toggle 555 output */
|
||||
@ -907,7 +909,7 @@ static TIMER_CALLBACK( schaser_effect_555_cb )
|
||||
|
||||
static STATE_POSTLOAD( schaser_reinit_555_time_remain )
|
||||
{
|
||||
mw8080bw_state *state = machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = machine->driver_data<_8080bw_state>();
|
||||
address_space *space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM);
|
||||
state->schaser_effect_555_time_remain = attotime::from_double(state->schaser_effect_555_time_remain_savable);
|
||||
schaser_sh_port_2_w(space, 0, state->port_2_last_extra);
|
||||
@ -916,7 +918,7 @@ static STATE_POSTLOAD( schaser_reinit_555_time_remain )
|
||||
|
||||
MACHINE_START( schaser_sh )
|
||||
{
|
||||
mw8080bw_state *state = machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = machine->driver_data<_8080bw_state>();
|
||||
|
||||
state->schaser_effect_555_timer = machine->scheduler().timer_alloc(FUNC(schaser_effect_555_cb));
|
||||
|
||||
@ -930,7 +932,7 @@ MACHINE_START( schaser_sh )
|
||||
|
||||
MACHINE_RESET( schaser_sh )
|
||||
{
|
||||
mw8080bw_state *state = machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = machine->driver_data<_8080bw_state>();
|
||||
address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
|
||||
state->schaser_effect_555_is_low = 0;
|
||||
@ -950,7 +952,7 @@ MACHINE_RESET( schaser_sh )
|
||||
|
||||
WRITE8_HANDLER( rollingc_sh_port_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_3_last_extra;
|
||||
|
||||
if (rising_bits & 0x02) sample_start(state->samples, 4, 0, 0); /* Steering */
|
||||
@ -974,7 +976,7 @@ WRITE8_HANDLER( rollingc_sh_port_w )
|
||||
|
||||
WRITE8_HANDLER( invrvnge_sh_port_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
|
||||
switch (data)
|
||||
{
|
||||
@ -1019,7 +1021,7 @@ WRITE8_HANDLER( invrvnge_sh_port_w )
|
||||
|
||||
WRITE8_HANDLER( lupin3_sh_port_1_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_1_last_extra;
|
||||
|
||||
if (rising_bits & 0x01) sample_start(state->samples, 0, 6, 0); /* Walking, get money */
|
||||
@ -1035,7 +1037,7 @@ WRITE8_HANDLER( lupin3_sh_port_1_w )
|
||||
|
||||
WRITE8_HANDLER( lupin3_sh_port_2_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_2_last_extra;
|
||||
|
||||
if (rising_bits & 0x01) sample_start(state->samples, 0, 3, 0); /* Lands on top of building, wife kicks man */
|
||||
@ -1064,7 +1066,7 @@ WRITE8_HANDLER( schasercv_sh_port_1_w )
|
||||
bit 3 = 1st speedup
|
||||
Death is a stream of ff's with some fe's thrown in */
|
||||
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_1_last_extra;
|
||||
|
||||
if (rising_bits & 0x02) sample_start(state->samples, 1, 6, 0); /* Ran over a dot */
|
||||
@ -1075,7 +1077,7 @@ WRITE8_HANDLER( schasercv_sh_port_1_w )
|
||||
|
||||
WRITE8_HANDLER( schasercv_sh_port_2_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
|
||||
speaker_level_w(state->speaker, (data & 0x01) ? 1 : 0); /* End-of-Level */
|
||||
|
||||
@ -1092,7 +1094,7 @@ WRITE8_HANDLER( schasercv_sh_port_2_w )
|
||||
|
||||
WRITE8_HANDLER( yosakdon_sh_port_1_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_1_last_extra;
|
||||
|
||||
if (rising_bits & 0x01) sample_start(state->samples, 0, 3, 0); /* Game Over */
|
||||
@ -1108,7 +1110,7 @@ WRITE8_HANDLER( yosakdon_sh_port_1_w )
|
||||
|
||||
WRITE8_HANDLER( yosakdon_sh_port_2_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_2_last_extra;
|
||||
|
||||
if (rising_bits & 0x01) sample_start(state->samples, 1, 6, 0); /* Ready? , Game Over */
|
||||
@ -1132,7 +1134,7 @@ WRITE8_HANDLER( yosakdon_sh_port_2_w )
|
||||
WRITE8_HANDLER( shuttlei_sh_port_1_w )
|
||||
{
|
||||
/* bit 3 is high while you are alive and playing */
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
UINT8 rising_bits = data & ~state->port_1_last_extra;
|
||||
|
||||
if (rising_bits & 0x01) sample_start(state->samples, 4, 4, 0); /* Fleet move */
|
||||
@ -1145,7 +1147,7 @@ WRITE8_HANDLER( shuttlei_sh_port_1_w )
|
||||
|
||||
WRITE8_HANDLER( shuttlei_sh_port_2_w )
|
||||
{
|
||||
mw8080bw_state *state = space->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = space->machine->driver_data<_8080bw_state>();
|
||||
|
||||
switch (data)
|
||||
{
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "emu.h"
|
||||
#include "sound/es5506.h"
|
||||
#include "includes/taito_f3.h"
|
||||
#include "taito_en.h"
|
||||
|
||||
static int counter,vector_reg,imr_status;
|
||||
@ -8,6 +7,7 @@ static UINT16 es5510_dsp_ram[0x200];
|
||||
static UINT32 es5510_gpr[0xc0];
|
||||
static UINT32 es5510_gpr_latch;
|
||||
static int timer_mode,m68681_imr;
|
||||
static UINT32 *f3_shared_ram;
|
||||
|
||||
//static int es_tmp=1;
|
||||
|
||||
@ -20,18 +20,26 @@ enum { TIMER_SINGLESHOT, TIMER_PULSE };
|
||||
|
||||
static READ16_HANDLER(f3_68000_share_r)
|
||||
{
|
||||
if ((offset&3)==0) return (f3_shared_ram[offset/4]&0xff000000)>>16;
|
||||
if ((offset&3)==1) return (f3_shared_ram[offset/4]&0x00ff0000)>>8;
|
||||
if ((offset&3)==2) return (f3_shared_ram[offset/4]&0x0000ff00)>>0;
|
||||
return (f3_shared_ram[offset/4]&0x000000ff)<<8;
|
||||
switch (offset & 3)
|
||||
{
|
||||
case 0: return (f3_shared_ram[offset/4]&0xff000000)>>16;
|
||||
case 1: return (f3_shared_ram[offset/4]&0x00ff0000)>>8;
|
||||
case 2: return (f3_shared_ram[offset/4]&0x0000ff00)>>0;
|
||||
case 3: return (f3_shared_ram[offset/4]&0x000000ff)<<8;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER(f3_68000_share_w)
|
||||
{
|
||||
if ((offset&3)==0) f3_shared_ram[offset/4]=(f3_shared_ram[offset/4]&0x00ffffff)|((data&0xff00)<<16);
|
||||
else if ((offset&3)==1) f3_shared_ram[offset/4]=(f3_shared_ram[offset/4]&0xff00ffff)|((data&0xff00)<<8);
|
||||
else if ((offset&3)==2) f3_shared_ram[offset/4]=(f3_shared_ram[offset/4]&0xffff00ff)|((data&0xff00)<<0);
|
||||
else f3_shared_ram[offset/4]=(f3_shared_ram[offset/4]&0xffffff00)|((data&0xff00)>>8);
|
||||
switch (offset & 3)
|
||||
{
|
||||
case 0: f3_shared_ram[offset/4] = (f3_shared_ram[offset/4]&0x00ffffff)|((data&0xff00)<<16);
|
||||
case 1: f3_shared_ram[offset/4] = (f3_shared_ram[offset/4]&0xff00ffff)|((data&0xff00)<<8);
|
||||
case 2: f3_shared_ram[offset/4] = (f3_shared_ram[offset/4]&0xffff00ff)|((data&0xff00)<<0);
|
||||
case 3: f3_shared_ram[offset/4] = (f3_shared_ram[offset/4]&0xffffff00)|((data&0xff00)>>8);
|
||||
}
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER( f3_es5505_bank_w )
|
||||
@ -262,6 +270,8 @@ SOUND_RESET( taito_f3_soundsystem_reset )
|
||||
/* reset CPU to catch any banking of startup vectors */
|
||||
machine->device("audiocpu")->reset();
|
||||
//cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
|
||||
f3_shared_ram = (UINT32 *)memory_get_shared(*machine, "f3_shared");
|
||||
}
|
||||
|
||||
static const es5505_interface es5505_taito_f3_config =
|
||||
|
@ -186,7 +186,7 @@
|
||||
#include "machine/mb14241.h"
|
||||
#include "sound/speaker.h"
|
||||
#include "deprecat.h"
|
||||
#include "includes/mw8080bw.h"
|
||||
#include "includes/8080bw.h"
|
||||
|
||||
#include "invrvnge.lh"
|
||||
#include "shuttlei.lh"
|
||||
@ -528,9 +528,9 @@ MACHINE_CONFIG_END
|
||||
|
||||
static ADDRESS_MAP_START( cosmo_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE_MEMBER(mw8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE_MEMBER(_8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x4000, 0x57ff) AM_ROM
|
||||
AM_RANGE(0x5c00, 0x5fff) AM_RAM AM_BASE_MEMBER(mw8080bw_state, colorram)
|
||||
AM_RANGE(0x5c00, 0x5fff) AM_RAM AM_BASE_MEMBER(_8080bw_state, colorram)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
/* at least one of these MWA8_NOPs must be sound related */
|
||||
@ -903,9 +903,9 @@ INPUT_PORTS_END
|
||||
|
||||
static ADDRESS_MAP_START( rollingc_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE_MEMBER(mw8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE_MEMBER(_8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x4000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0xa000, 0xbfff) AM_MIRROR(0x00e0) AM_RAM AM_BASE_MEMBER(mw8080bw_state, colorram)
|
||||
AM_RANGE(0xa000, 0xbfff) AM_MIRROR(0x00e0) AM_RAM AM_BASE_MEMBER(_8080bw_state, colorram)
|
||||
AM_RANGE(0xe400, 0xffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -967,9 +967,9 @@ MACHINE_CONFIG_END
|
||||
|
||||
static ADDRESS_MAP_START( schaser_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE_MEMBER(mw8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE_MEMBER(_8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x4000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x0060) AM_RAM AM_BASE_MEMBER(mw8080bw_state, colorram)
|
||||
AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x0060) AM_RAM AM_BASE_MEMBER(_8080bw_state, colorram)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -1161,7 +1161,7 @@ static CUSTOM_INPUT( sflush_80_r )
|
||||
|
||||
static ADDRESS_MAP_START( sflush_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_RAM
|
||||
AM_RANGE(0x4000, 0x5fff) AM_RAM AM_BASE_SIZE_MEMBER(mw8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x4000, 0x5fff) AM_RAM AM_BASE_SIZE_MEMBER(_8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x8008, 0x8008) AM_READ_PORT("PADDLE")
|
||||
AM_RANGE(0x8009, 0x8009) AM_DEVREAD("mb14241", mb14241_shift_result_r)
|
||||
AM_RANGE(0x800a, 0x800a) AM_READ_PORT("IN2")
|
||||
@ -1171,7 +1171,7 @@ static ADDRESS_MAP_START( sflush_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x801a, 0x801a) AM_WRITENOP
|
||||
AM_RANGE(0x801c, 0x801c) AM_WRITENOP
|
||||
AM_RANGE(0x801d, 0x801d) AM_WRITENOP
|
||||
AM_RANGE(0xa000, 0xbfff) AM_MIRROR(0x0060) AM_RAM AM_BASE_MEMBER(mw8080bw_state, colorram)
|
||||
AM_RANGE(0xa000, 0xbfff) AM_MIRROR(0x0060) AM_RAM AM_BASE_MEMBER(_8080bw_state, colorram)
|
||||
AM_RANGE(0xd800, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -1361,7 +1361,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
static INTERRUPT_GEN( polaris_interrupt )
|
||||
{
|
||||
mw8080bw_state *state = device->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = device->machine->driver_data<_8080bw_state>();
|
||||
state->polaris_cloud_speed++;
|
||||
|
||||
if (state->polaris_cloud_speed >= 4) /* every 4 frames - this was verified against real machine */
|
||||
@ -1373,7 +1373,7 @@ static INTERRUPT_GEN( polaris_interrupt )
|
||||
|
||||
static MACHINE_START( polaris )
|
||||
{
|
||||
mw8080bw_state *state = machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = machine->driver_data<_8080bw_state>();
|
||||
state->save_item(NAME(state->polaris_cloud_speed));
|
||||
state->save_item(NAME(state->polaris_cloud_pos));
|
||||
|
||||
@ -1605,7 +1605,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
static ADDRESS_MAP_START( yosakdon_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE_MEMBER(mw8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE_MEMBER(_8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x4000, 0x43ff) AM_WRITEONLY /* what's this? */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -1624,7 +1624,7 @@ static INPUT_PORTS_START( yosakdon )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in1_control_r, NULL)
|
||||
//PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in1_control_r, NULL)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("IN1")
|
||||
@ -1947,7 +1947,7 @@ INPUT_PORTS_END
|
||||
|
||||
static ADDRESS_MAP_START( shuttlei_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE_MEMBER(mw8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE_MEMBER(_8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x4000, 0x43ff) AM_RAM AM_SHARE("share1") // shuttlei
|
||||
AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE("share1") // skylove (is it mirrored, or different PCB hookup?)
|
||||
ADDRESS_MAP_END
|
||||
@ -2021,7 +2021,7 @@ static MACHINE_RESET( darthvdr )
|
||||
static ADDRESS_MAP_START( darthvdr_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x17ff) AM_ROM
|
||||
AM_RANGE(0x1800, 0x1fff) AM_RAM
|
||||
AM_RANGE(0x4000, 0x5fff) AM_RAM AM_BASE_SIZE_MEMBER(mw8080bw_state, main_ram, main_ram_size)
|
||||
AM_RANGE(0x4000, 0x5fff) AM_RAM AM_BASE_SIZE_MEMBER(_8080bw_state, main_ram, main_ram_size)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( darthvdr_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
|
@ -69,7 +69,6 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "includes/rampart.h"
|
||||
#include "includes/arcadecl.h"
|
||||
|
||||
|
||||
@ -84,7 +83,7 @@
|
||||
|
||||
static void update_interrupts(running_machine *machine)
|
||||
{
|
||||
rampart_state *state = machine->driver_data<rampart_state>();
|
||||
arcadecl_state *state = machine->driver_data<arcadecl_state>();
|
||||
cputag_set_input_line(machine, "maincpu", 4, state->scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
@ -112,7 +111,7 @@ static MACHINE_START( arcadecl )
|
||||
|
||||
static MACHINE_RESET( arcadecl )
|
||||
{
|
||||
rampart_state *state = machine->driver_data<rampart_state>();
|
||||
arcadecl_state *state = machine->driver_data<arcadecl_state>();
|
||||
|
||||
atarigen_eeprom_reset(state);
|
||||
atarigen_interrupt_reset(state, update_interrupts);
|
||||
@ -154,7 +153,7 @@ static WRITE16_HANDLER( latch_w )
|
||||
|
||||
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM
|
||||
AM_RANGE(0x200000, 0x21ffff) AM_RAM AM_BASE_MEMBER(rampart_state, bitmap)
|
||||
AM_RANGE(0x200000, 0x21ffff) AM_RAM AM_BASE_MEMBER(arcadecl_state, bitmap)
|
||||
AM_RANGE(0x3c0000, 0x3c07ff) AM_RAM_WRITE(atarigen_expanded_666_paletteram_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x3e0000, 0x3e07ff) AM_RAM_WRITE(atarimo_0_spriteram_w) AM_BASE(&atarimo_0_spriteram)
|
||||
AM_RANGE(0x3e0800, 0x3effbf) AM_RAM
|
||||
@ -324,7 +323,7 @@ GFXDECODE_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static MACHINE_CONFIG_START( arcadecl, rampart_state )
|
||||
static MACHINE_CONFIG_START( arcadecl, arcadecl_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK)
|
||||
|
@ -92,7 +92,7 @@ ROMs : MR96004-10.1 [125661cd] (IC5 - Samples)
|
||||
#include "deprecat.h"
|
||||
#include "sound/ymf271.h"
|
||||
#include "rendlay.h"
|
||||
#include "machine/ms32crpt.h"
|
||||
#include "machine/jalcrpt.h"
|
||||
|
||||
|
||||
class bnstars_state : public driver_device
|
||||
|
@ -172,7 +172,7 @@ Cisco Heat.
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "sound/2151intf.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "includes/megasys1.h"
|
||||
#include "machine/jalcrpt.h"
|
||||
#include "includes/cischeat.h"
|
||||
|
||||
|
||||
@ -256,19 +256,19 @@ static WRITE16_HANDLER( bigrun_paletteram16_w )
|
||||
|
||||
static ADDRESS_MAP_START( bigrun_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM
|
||||
AM_RANGE(0x080000, 0x083fff) AM_READWRITE(bigrun_vregs_r, bigrun_vregs_w) AM_BASE(&megasys1_vregs) // Vregs
|
||||
AM_RANGE(0x080000, 0x083fff) AM_READWRITE(bigrun_vregs_r, bigrun_vregs_w) AM_BASE_MEMBER(cischeat_state, vregs) // Vregs
|
||||
AM_RANGE(0x084000, 0x087fff) AM_RAM // Linking with other units
|
||||
AM_RANGE(0x088000, 0x08bfff) AM_READWRITE(sharedram2_r, sharedram2_w) AM_BASE_MEMBER(cischeat_state, sharedram2) // Sharedram with sub CPU#2
|
||||
AM_RANGE(0x08c000, 0x08ffff) AM_READWRITE(sharedram1_r, sharedram1_w) AM_BASE_MEMBER(cischeat_state, sharedram1) // Sharedram with sub CPU#1
|
||||
|
||||
/* Only writes to the first 0x40000 bytes affect the tilemaps: */
|
||||
/* either these games support larger tilemaps or have more ram than needed */
|
||||
AM_RANGE(0x090000, 0x093fff) AM_WRITE(megasys1_scrollram_0_w) AM_BASE(&megasys1_scrollram[0]) // Scroll ram 0
|
||||
AM_RANGE(0x094000, 0x097fff) AM_WRITE(megasys1_scrollram_1_w) AM_BASE(&megasys1_scrollram[1]) // Scroll ram 1
|
||||
AM_RANGE(0x098000, 0x09bfff) AM_WRITE(megasys1_scrollram_2_w) AM_BASE(&megasys1_scrollram[2]) // Scroll ram 2
|
||||
AM_RANGE(0x090000, 0x093fff) AM_WRITE(cischeat_scrollram_0_w) AM_BASE_MEMBER(cischeat_state, scrollram[0]) // Scroll ram 0
|
||||
AM_RANGE(0x094000, 0x097fff) AM_WRITE(cischeat_scrollram_1_w) AM_BASE_MEMBER(cischeat_state, scrollram[1]) // Scroll ram 1
|
||||
AM_RANGE(0x098000, 0x09bfff) AM_WRITE(cischeat_scrollram_2_w) AM_BASE_MEMBER(cischeat_state, scrollram[2]) // Scroll ram 2
|
||||
|
||||
AM_RANGE(0x09c000, 0x09ffff) AM_WRITE(bigrun_paletteram16_w) AM_BASE_GENERIC(paletteram) // Palettes
|
||||
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE(&megasys1_ram) // RAM
|
||||
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE_MEMBER(cischeat_state, ram) // RAM
|
||||
AM_RANGE(0x100000, 0x13ffff) AM_READ(rom_1_r) // ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -309,7 +309,7 @@ static WRITE16_HANDLER( cischeat_paletteram16_w )
|
||||
|
||||
static ADDRESS_MAP_START( cischeat_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM
|
||||
AM_RANGE(0x080000, 0x087fff) AM_READWRITE(cischeat_vregs_r, cischeat_vregs_w) AM_BASE(&megasys1_vregs) // Vregs
|
||||
AM_RANGE(0x080000, 0x087fff) AM_READWRITE(cischeat_vregs_r, cischeat_vregs_w) AM_BASE_MEMBER(cischeat_state, vregs) // Vregs
|
||||
AM_RANGE(0x088000, 0x088fff) AM_RAM // Linking with other units
|
||||
|
||||
/* Only the first 0x800 bytes are tested but:
|
||||
@ -323,13 +323,13 @@ static ADDRESS_MAP_START( cischeat_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
|
||||
/* Only writes to the first 0x40000 bytes affect the tilemaps: */
|
||||
/* either these games support larger tilemaps or have more ram than needed */
|
||||
AM_RANGE(0x0a0000, 0x0a7fff) AM_RAM_WRITE(megasys1_scrollram_0_w) AM_BASE(&megasys1_scrollram[0]) // Scroll ram 0
|
||||
AM_RANGE(0x0a8000, 0x0affff) AM_RAM_WRITE(megasys1_scrollram_1_w) AM_BASE(&megasys1_scrollram[1]) // Scroll ram 1
|
||||
AM_RANGE(0x0b0000, 0x0b7fff) AM_RAM_WRITE(megasys1_scrollram_2_w) AM_BASE(&megasys1_scrollram[2]) // Scroll ram 2
|
||||
AM_RANGE(0x0a0000, 0x0a7fff) AM_RAM_WRITE(cischeat_scrollram_0_w) AM_BASE_MEMBER(cischeat_state, scrollram[0]) // Scroll ram 0
|
||||
AM_RANGE(0x0a8000, 0x0affff) AM_RAM_WRITE(cischeat_scrollram_1_w) AM_BASE_MEMBER(cischeat_state, scrollram[1]) // Scroll ram 1
|
||||
AM_RANGE(0x0b0000, 0x0b7fff) AM_RAM_WRITE(cischeat_scrollram_2_w) AM_BASE_MEMBER(cischeat_state, scrollram[2]) // Scroll ram 2
|
||||
|
||||
AM_RANGE(0x0b8000, 0x0bffff) AM_RAM_WRITE(cischeat_paletteram16_w) AM_BASE_GENERIC(paletteram) // Palettes
|
||||
|
||||
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE(&megasys1_ram) // RAM
|
||||
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE_MEMBER(cischeat_state, ram) // RAM
|
||||
AM_RANGE(0x100000, 0x17ffff) AM_READ(rom_1_r) // ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -369,7 +369,7 @@ static WRITE16_HANDLER( f1gpstar_paletteram16_w )
|
||||
|
||||
static ADDRESS_MAP_START( f1gpstar_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM
|
||||
AM_RANGE(0x080000, 0x087fff) AM_READWRITE(f1gpstar_vregs_r, f1gpstar_vregs_w) AM_BASE(&megasys1_vregs) // Vregs
|
||||
AM_RANGE(0x080000, 0x087fff) AM_READWRITE(f1gpstar_vregs_r, f1gpstar_vregs_w) AM_BASE_MEMBER(cischeat_state, vregs) // Vregs
|
||||
AM_RANGE(0x088000, 0x088fff) AM_RAM // Linking with other units
|
||||
|
||||
AM_RANGE(0x090000, 0x097fff) AM_READWRITE(sharedram2_r, sharedram2_w) AM_BASE_MEMBER(cischeat_state, sharedram2) // Sharedram with sub CPU#2
|
||||
@ -377,13 +377,13 @@ static ADDRESS_MAP_START( f1gpstar_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
|
||||
/* Only writes to the first 0x40000 bytes affect the tilemaps: */
|
||||
/* either these games support larger tilemaps or have more ram than needed */
|
||||
AM_RANGE(0x0a0000, 0x0a7fff) AM_RAM_WRITE(megasys1_scrollram_0_w) AM_BASE(&megasys1_scrollram[0]) // Scroll ram 0
|
||||
AM_RANGE(0x0a8000, 0x0affff) AM_RAM_WRITE(megasys1_scrollram_1_w) AM_BASE(&megasys1_scrollram[1]) // Scroll ram 1
|
||||
AM_RANGE(0x0b0000, 0x0b7fff) AM_RAM_WRITE(megasys1_scrollram_2_w) AM_BASE(&megasys1_scrollram[2]) // Scroll ram 2
|
||||
AM_RANGE(0x0a0000, 0x0a7fff) AM_RAM_WRITE(cischeat_scrollram_0_w) AM_BASE_MEMBER(cischeat_state, scrollram[0]) // Scroll ram 0
|
||||
AM_RANGE(0x0a8000, 0x0affff) AM_RAM_WRITE(cischeat_scrollram_1_w) AM_BASE_MEMBER(cischeat_state, scrollram[1]) // Scroll ram 1
|
||||
AM_RANGE(0x0b0000, 0x0b7fff) AM_RAM_WRITE(cischeat_scrollram_2_w) AM_BASE_MEMBER(cischeat_state, scrollram[2]) // Scroll ram 2
|
||||
|
||||
AM_RANGE(0x0b8000, 0x0bffff) AM_RAM_WRITE(f1gpstar_paletteram16_w) AM_BASE_GENERIC(paletteram) // Palettes
|
||||
|
||||
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE(&megasys1_ram) // RAM
|
||||
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE_MEMBER(cischeat_state, ram) // RAM
|
||||
AM_RANGE(0x100000, 0x17ffff) AM_READ(rom_1_r) // ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -395,7 +395,7 @@ ADDRESS_MAP_END
|
||||
// Same as f1gpstar, but vregs are slightly different:
|
||||
static ADDRESS_MAP_START( f1gpstr2_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM
|
||||
AM_RANGE(0x080000, 0x087fff) AM_READWRITE(f1gpstr2_vregs_r, f1gpstr2_vregs_w) AM_BASE(&megasys1_vregs) // Vregs (slightly different from f1gpstar)
|
||||
AM_RANGE(0x080000, 0x087fff) AM_READWRITE(f1gpstr2_vregs_r, f1gpstr2_vregs_w) AM_BASE_MEMBER(cischeat_state, vregs) // Vregs (slightly different from f1gpstar)
|
||||
AM_RANGE(0x088000, 0x088fff) AM_RAM // Linking with other units
|
||||
|
||||
AM_RANGE(0x090000, 0x097fff) AM_READWRITE(sharedram2_r, sharedram2_w) AM_BASE_MEMBER(cischeat_state, sharedram2) // Sharedram with sub CPU#2
|
||||
@ -403,13 +403,13 @@ static ADDRESS_MAP_START( f1gpstr2_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
|
||||
/* Only writes to the first 0x40000 bytes affect the tilemaps: */
|
||||
/* either these games support larger tilemaps or have more ram than needed */
|
||||
AM_RANGE(0x0a0000, 0x0a7fff) AM_RAM_WRITE(megasys1_scrollram_0_w) AM_BASE(&megasys1_scrollram[0]) // Scroll ram 0
|
||||
AM_RANGE(0x0a8000, 0x0affff) AM_RAM_WRITE(megasys1_scrollram_1_w) AM_BASE(&megasys1_scrollram[1]) // Scroll ram 1
|
||||
AM_RANGE(0x0b0000, 0x0b7fff) AM_RAM_WRITE(megasys1_scrollram_2_w) AM_BASE(&megasys1_scrollram[2]) // Scroll ram 2
|
||||
AM_RANGE(0x0a0000, 0x0a7fff) AM_RAM_WRITE(cischeat_scrollram_0_w) AM_BASE_MEMBER(cischeat_state, scrollram[0]) // Scroll ram 0
|
||||
AM_RANGE(0x0a8000, 0x0affff) AM_RAM_WRITE(cischeat_scrollram_1_w) AM_BASE_MEMBER(cischeat_state, scrollram[1]) // Scroll ram 1
|
||||
AM_RANGE(0x0b0000, 0x0b7fff) AM_RAM_WRITE(cischeat_scrollram_2_w) AM_BASE_MEMBER(cischeat_state, scrollram[2]) // Scroll ram 2
|
||||
|
||||
AM_RANGE(0x0b8000, 0x0bffff) AM_RAM_WRITE(f1gpstar_paletteram16_w) AM_BASE_GENERIC(paletteram) // Palettes
|
||||
|
||||
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE(&megasys1_ram) // RAM
|
||||
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE_MEMBER(cischeat_state, ram) // RAM
|
||||
AM_RANGE(0x100000, 0x17ffff) AM_READ(rom_1_r) // ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -538,11 +538,11 @@ static WRITE16_HANDLER( scudhamm_oki_bank_w )
|
||||
|
||||
static ADDRESS_MAP_START( scudhamm_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM
|
||||
AM_RANGE(0x082000, 0x082fff) AM_RAM_WRITE(scudhamm_vregs_w) AM_BASE(&megasys1_vregs) // Video Registers + RAM
|
||||
AM_RANGE(0x0a0000, 0x0a3fff) AM_RAM_WRITE(megasys1_scrollram_0_w) AM_BASE(&megasys1_scrollram[0]) // Scroll RAM 0
|
||||
AM_RANGE(0x0b0000, 0x0b3fff) AM_RAM_WRITE(megasys1_scrollram_2_w) AM_BASE(&megasys1_scrollram[2]) // Scroll RAM 2
|
||||
AM_RANGE(0x082000, 0x082fff) AM_RAM_WRITE(scudhamm_vregs_w) AM_BASE_MEMBER(cischeat_state, vregs) // Video Registers + RAM
|
||||
AM_RANGE(0x0a0000, 0x0a3fff) AM_RAM_WRITE(cischeat_scrollram_0_w) AM_BASE_MEMBER(cischeat_state, scrollram[0]) // Scroll RAM 0
|
||||
AM_RANGE(0x0b0000, 0x0b3fff) AM_RAM_WRITE(cischeat_scrollram_2_w) AM_BASE_MEMBER(cischeat_state, scrollram[2]) // Scroll RAM 2
|
||||
AM_RANGE(0x0b8000, 0x0bffff) AM_RAM_WRITE(scudhamm_paletteram16_w) AM_BASE_GENERIC(paletteram) // Palette
|
||||
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE(&megasys1_ram) // Work RAM + Spriteram
|
||||
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE_MEMBER(cischeat_state, ram) // Work RAM + Spriteram
|
||||
AM_RANGE(0x100000, 0x100001) AM_WRITE(scudhamm_oki_bank_w) // Sound
|
||||
AM_RANGE(0x100008, 0x100009) AM_READ_PORT("IN0") AM_WRITE(scudhamm_leds_w) // Buttons
|
||||
AM_RANGE(0x100014, 0x100015) AM_DEVREADWRITE8_MODERN("oki1", okim6295_device, read, write, 0x00ff) // Sound
|
||||
@ -621,11 +621,11 @@ static WRITE16_HANDLER( armchmp2_leds_w )
|
||||
|
||||
static ADDRESS_MAP_START( armchmp2_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM
|
||||
AM_RANGE(0x082000, 0x082fff) AM_RAM_WRITE(scudhamm_vregs_w) AM_BASE(&megasys1_vregs) // Video Registers + RAM
|
||||
AM_RANGE(0x0a0000, 0x0a3fff) AM_RAM_WRITE(megasys1_scrollram_0_w) AM_BASE(&megasys1_scrollram[0]) // Scroll RAM 0
|
||||
AM_RANGE(0x0b0000, 0x0b3fff) AM_RAM_WRITE(megasys1_scrollram_2_w) AM_BASE(&megasys1_scrollram[2]) // Scroll RAM 2
|
||||
AM_RANGE(0x082000, 0x082fff) AM_RAM_WRITE(scudhamm_vregs_w) AM_BASE_MEMBER(cischeat_state, vregs) // Video Registers + RAM
|
||||
AM_RANGE(0x0a0000, 0x0a3fff) AM_RAM_WRITE(cischeat_scrollram_0_w) AM_BASE_MEMBER(cischeat_state, scrollram[0]) // Scroll RAM 0
|
||||
AM_RANGE(0x0b0000, 0x0b3fff) AM_RAM_WRITE(cischeat_scrollram_2_w) AM_BASE_MEMBER(cischeat_state, scrollram[2]) // Scroll RAM 2
|
||||
AM_RANGE(0x0b8000, 0x0bffff) AM_RAM_WRITE(scudhamm_paletteram16_w) AM_BASE_GENERIC(paletteram) // Palette
|
||||
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE(&megasys1_ram) // Work RAM + Spriteram
|
||||
AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE_MEMBER(cischeat_state, ram) // Work RAM + Spriteram
|
||||
AM_RANGE(0x100000, 0x100001) AM_READ_PORT("IN2") AM_WRITE(scudhamm_oki_bank_w) // DSW + Sound
|
||||
AM_RANGE(0x100004, 0x100005) AM_READ_PORT("IN3") // DSW
|
||||
AM_RANGE(0x100008, 0x100009) AM_READWRITE(armchmp2_buttons_r, armchmp2_leds_w) // Leds + Coin Counters + Buttons + Sensors
|
||||
@ -808,8 +808,17 @@ ADDRESS_MAP_END
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
static READ16_HANDLER ( f1gpstr2_io_r ) { return megasys1_vregs[offset + 0x1000/2]; }
|
||||
static WRITE16_HANDLER( f1gpstr2_io_w ) { COMBINE_DATA(&megasys1_vregs[offset + 0x1000/2]); }
|
||||
static READ16_HANDLER ( f1gpstr2_io_r )
|
||||
{
|
||||
cischeat_state *state = space->machine->driver_data<cischeat_state>();
|
||||
return state->vregs[offset + 0x1000/2];
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER( f1gpstr2_io_w )
|
||||
{
|
||||
cischeat_state *state = space->machine->driver_data<cischeat_state>();
|
||||
COMBINE_DATA(&state->vregs[offset + 0x1000/2]);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( f1gpstr2_io_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM
|
||||
|
@ -42,7 +42,6 @@ $305.b invincibility
|
||||
#include "video/taitoic.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "sound/es5506.h"
|
||||
#include "includes/taito_f3.h"
|
||||
#include "audio/taito_en.h"
|
||||
#include "includes/galastrm.h"
|
||||
|
||||
@ -182,7 +181,7 @@ static ADDRESS_MAP_START( galastrm_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x400000, 0x400007) AM_WRITE(galastrm_input_w) /* eerom etc. */
|
||||
AM_RANGE(0x40fff0, 0x40fff3) AM_WRITENOP
|
||||
AM_RANGE(0x500000, 0x500007) AM_READWRITE(galastrm_adstick_ctrl_r, galastrm_adstick_ctrl_w)
|
||||
AM_RANGE(0x600000, 0x6007ff) AM_RAM AM_BASE(&f3_shared_ram) /* Sound shared ram */
|
||||
AM_RANGE(0x600000, 0x6007ff) AM_RAM AM_SHARE("f3_shared") /* Sound shared ram */
|
||||
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0480scp", tc0480scp_long_r, tc0480scp_long_w) /* tilemaps */
|
||||
AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE("tc0480scp", tc0480scp_ctrl_long_r, tc0480scp_ctrl_long_w)
|
||||
AM_RANGE(0x900000, 0x900003) AM_WRITE(galastrm_palette_w) /* TC0110PCR */
|
||||
|
@ -67,7 +67,6 @@
|
||||
#include "video/taitoic.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "sound/es5506.h"
|
||||
#include "includes/taito_f3.h"
|
||||
#include "audio/taito_en.h"
|
||||
#include "includes/groundfx.h"
|
||||
|
||||
@ -225,7 +224,7 @@ static ADDRESS_MAP_START( groundfx_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x500004, 0x500007) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0x500000, 0x500007) AM_WRITE(groundfx_input_w) /* eeprom etc. */
|
||||
AM_RANGE(0x600000, 0x600003) AM_READWRITE(groundfx_adc_r,groundfx_adc_w)
|
||||
AM_RANGE(0x700000, 0x7007ff) AM_RAM AM_BASE(&f3_shared_ram)
|
||||
AM_RANGE(0x700000, 0x7007ff) AM_RAM AM_SHARE("f3_shared")
|
||||
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0480scp", tc0480scp_long_r, tc0480scp_long_w) /* tilemaps */
|
||||
AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE("tc0480scp", tc0480scp_ctrl_long_r, tc0480scp_ctrl_long_w) // debugging
|
||||
AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_long_r, tc0100scn_long_w) /* piv tilemaps */
|
||||
|
@ -49,7 +49,6 @@
|
||||
#include "video/taitoic.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "sound/es5506.h"
|
||||
#include "includes/taito_f3.h"
|
||||
#include "audio/taito_en.h"
|
||||
#include "includes/gunbustr.h"
|
||||
|
||||
@ -197,7 +196,7 @@ static ADDRESS_MAP_START( gunbustr_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x200000, 0x21ffff) AM_RAM AM_BASE_MEMBER(gunbustr_state, ram) /* main CPUA ram */
|
||||
AM_RANGE(0x300000, 0x301fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* Sprite ram */
|
||||
AM_RANGE(0x380000, 0x380003) AM_WRITE(motor_control_w) /* motor, lamps etc. */
|
||||
AM_RANGE(0x390000, 0x3907ff) AM_RAM AM_BASE(&f3_shared_ram) /* Sound shared ram */
|
||||
AM_RANGE(0x390000, 0x3907ff) AM_RAM AM_SHARE("f3_shared") /* Sound shared ram */
|
||||
AM_RANGE(0x400000, 0x400003) AM_READ_PORT("P1_P2")
|
||||
AM_RANGE(0x400004, 0x400007) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0x400000, 0x400007) AM_WRITE(gunbustr_input_w) /* eerom etc. */
|
||||
|
@ -108,6 +108,7 @@
|
||||
#include "audio/mcr.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/mcr.h"
|
||||
#include "includes/mcr3.h"
|
||||
|
||||
#include "turbotag.lh"
|
||||
|
||||
@ -135,6 +136,25 @@ static INT8 maxrpm_p2_shift;
|
||||
|
||||
|
||||
|
||||
static WRITE8_HANDLER( mcrmono_control_port_w )
|
||||
{
|
||||
/*
|
||||
Bit layout is as follows:
|
||||
D7 = n/c
|
||||
D6 = cocktail flip
|
||||
D5 = n/c
|
||||
D4 = n/c
|
||||
D3 = n/c
|
||||
D2 = n/c
|
||||
D1 = n/c
|
||||
D0 = coin meter 1
|
||||
*/
|
||||
|
||||
coin_counter_w(space->machine, 0, (data >> 0) & 1);
|
||||
mcr_cocktail_flip = (data >> 6) & 1;
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Demolition Derby (mono) I/O ports
|
||||
@ -482,7 +502,7 @@ static ADDRESS_MAP_START( mcrmono_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0xe800, 0xe9ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xea00, 0xebff) AM_RAM
|
||||
AM_RANGE(0xec00, 0xec7f) AM_MIRROR(0x0380) AM_WRITE(mcr3_paletteram_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(mcr3_videoram_w) AM_BASE_MEMBER(mcr_state, videoram)
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(mcr3_videoram_w) AM_BASE_MEMBER(mcr3_state, videoram)
|
||||
AM_RANGE(0xf800, 0xffff) AM_ROM /* schematics show a 2716 @ 2B here, but nobody used it */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -512,7 +532,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( spyhunt_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x0000, 0xdfff) AM_ROM
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(spyhunt_videoram_w) AM_BASE_MEMBER(mcr_state, videoram)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(spyhunt_videoram_w) AM_BASE_MEMBER(mcr3_state, videoram)
|
||||
AM_RANGE(0xe800, 0xebff) AM_MIRROR(0x0400) AM_RAM_WRITE(spyhunt_alpharam_w) AM_BASE(&spyhunt_alpharam)
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xf800, 0xf9ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
@ -524,7 +544,7 @@ static ADDRESS_MAP_START( spyhunt_portmap, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
SSIO_INPUT_PORTS
|
||||
AM_RANGE(0x84, 0x86) AM_WRITE(mcr_scroll_value_w)
|
||||
AM_RANGE(0x84, 0x86) AM_WRITE(spyhunt_scroll_value_w)
|
||||
AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w)
|
||||
AM_RANGE(0xe8, 0xe8) AM_WRITENOP
|
||||
AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE("ctc", z80ctc_r, z80ctc_w)
|
||||
@ -1073,11 +1093,13 @@ GFXDECODE_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
/* Core MCR3 system with no sound */
|
||||
static MACHINE_CONFIG_START( mcr3_base, mcr_state )
|
||||
/* Core MCR monoboard system with no sound */
|
||||
static MACHINE_CONFIG_START( mcrmono, mcr3_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/4)
|
||||
MCFG_CPU_PROGRAM_MAP(mcrmono_map)
|
||||
MCFG_CPU_IO_MAP(mcrmono_portmap)
|
||||
MCFG_CPU_CONFIG(mcr_daisy_chain)
|
||||
MCFG_CPU_VBLANK_INT_HACK(mcr_interrupt,2)
|
||||
|
||||
@ -1097,34 +1119,18 @@ static MACHINE_CONFIG_START( mcr3_base, mcr_state )
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_SIZE(32*16, 30*16)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*16, 32*16-1, 0*16, 30*16-1)
|
||||
MCFG_SCREEN_UPDATE(mcr)
|
||||
MCFG_SCREEN_UPDATE(mcr3)
|
||||
|
||||
MCFG_GFXDECODE(mcr3)
|
||||
MCFG_PALETTE_LENGTH(64)
|
||||
|
||||
MCFG_VIDEO_START(mcr)
|
||||
MCFG_VIDEO_START(mcrmono)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
/*************************************/
|
||||
|
||||
|
||||
/* Core MCR monoboard system with no sound */
|
||||
static MACHINE_CONFIG_DERIVED( mcrmono, mcr3_base )
|
||||
|
||||
/* basic machine hardware */
|
||||
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(mcrmono_map)
|
||||
MCFG_CPU_IO_MAP(mcrmono_portmap)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_START(mcrmono)
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
MCFG_SCREEN_UPDATE(mcr3)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
/* Sarge/Demolition Derby Mono/Max RPM = MCR monoboard with Turbo Chip Squeak */
|
||||
static MACHINE_CONFIG_DERIVED( mono_tcs, mcrmono )
|
||||
|
||||
@ -1145,7 +1151,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
|
||||
/* Core scrolling system with SSIO sound */
|
||||
static MACHINE_CONFIG_DERIVED( mcrscroll, mcr3_base )
|
||||
static MACHINE_CONFIG_DERIVED( mcrscroll, mcrmono )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_FRAGMENT_ADD(mcr_ssio)
|
||||
|
@ -123,10 +123,11 @@ RAM RW 0f0000-0f3fff 0e0000-0effff? <
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "deprecat.h"
|
||||
#include "includes/megasys1.h"
|
||||
#include "sound/2203intf.h"
|
||||
#include "sound/2151intf.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "machine/jalcrpt.h"
|
||||
#include "includes/megasys1.h"
|
||||
|
||||
|
||||
/* Variables only used here: */
|
||||
@ -3550,115 +3551,6 @@ ROM_START( tshingen )
|
||||
ROM_END
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Code Decryption
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void phantasm_rom_decode(running_machine *machine, const char *region)
|
||||
{
|
||||
UINT16 *RAM = (UINT16 *) machine->region(region)->base();
|
||||
int i, size = machine->region(region)->bytes();
|
||||
if (size > 0x40000) size = 0x40000;
|
||||
|
||||
for (i = 0 ; i < size/2 ; i++)
|
||||
{
|
||||
UINT16 x,y;
|
||||
|
||||
x = RAM[i];
|
||||
|
||||
// [0] def0 189a bc56 7234
|
||||
// [1] fdb9 7531 eca8 6420
|
||||
// [2] 0123 4567 ba98 fedc
|
||||
#define BITSWAP_0 BITSWAP16(x,0xd,0xe,0xf,0x0,0x1,0x8,0x9,0xa,0xb,0xc,0x5,0x6,0x7,0x2,0x3,0x4)
|
||||
#define BITSWAP_1 BITSWAP16(x,0xf,0xd,0xb,0x9,0x7,0x5,0x3,0x1,0xe,0xc,0xa,0x8,0x6,0x4,0x2,0x0)
|
||||
#define BITSWAP_2 BITSWAP16(x,0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0xb,0xa,0x9,0x8,0xf,0xe,0xd,0xc)
|
||||
|
||||
if (i < 0x08000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_0;} else {y = BITSWAP_1;} }
|
||||
else if (i < 0x10000/2) { y = BITSWAP_2; }
|
||||
else if (i < 0x18000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_0;} else {y = BITSWAP_1;} }
|
||||
else if (i < 0x20000/2) { y = BITSWAP_1; }
|
||||
else { y = BITSWAP_2; }
|
||||
|
||||
#undef BITSWAP_0
|
||||
#undef BITSWAP_1
|
||||
#undef BITSWAP_2
|
||||
|
||||
RAM[i] = y;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void astyanax_rom_decode(running_machine *machine, const char *region)
|
||||
{
|
||||
UINT16 *RAM = (UINT16 *) machine->region(region)->base();
|
||||
int i, size = machine->region(region)->bytes();
|
||||
if (size > 0x40000) size = 0x40000;
|
||||
|
||||
for (i = 0 ; i < size/2 ; i++)
|
||||
{
|
||||
UINT16 x,y;
|
||||
|
||||
x = RAM[i];
|
||||
|
||||
// [0] def0 a981 65cb 7234
|
||||
// [1] fdb9 7531 8ace 0246
|
||||
// [2] 4567 0123 ba98 fedc
|
||||
|
||||
#define BITSWAP_0 BITSWAP16(x,0xd,0xe,0xf,0x0,0xa,0x9,0x8,0x1,0x6,0x5,0xc,0xb,0x7,0x2,0x3,0x4)
|
||||
#define BITSWAP_1 BITSWAP16(x,0xf,0xd,0xb,0x9,0x7,0x5,0x3,0x1,0x8,0xa,0xc,0xe,0x0,0x2,0x4,0x6)
|
||||
#define BITSWAP_2 BITSWAP16(x,0x4,0x5,0x6,0x7,0x0,0x1,0x2,0x3,0xb,0xa,0x9,0x8,0xf,0xe,0xd,0xc)
|
||||
|
||||
if (i < 0x08000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_0;} else {y = BITSWAP_1;} }
|
||||
else if (i < 0x10000/2) { y = BITSWAP_2; }
|
||||
else if (i < 0x18000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_0;} else {y = BITSWAP_1;} }
|
||||
else if (i < 0x20000/2) { y = BITSWAP_1; }
|
||||
else { y = BITSWAP_2; }
|
||||
|
||||
#undef BITSWAP_0
|
||||
#undef BITSWAP_1
|
||||
#undef BITSWAP_2
|
||||
|
||||
RAM[i] = y;
|
||||
}
|
||||
}
|
||||
|
||||
void rodland_rom_decode(running_machine *machine, const char *region)
|
||||
{
|
||||
UINT16 *RAM = (UINT16 *) machine->region(region)->base();
|
||||
int i, size = machine->region(region)->bytes();
|
||||
if (size > 0x40000) size = 0x40000;
|
||||
|
||||
for (i = 0 ; i < size/2 ; i++)
|
||||
{
|
||||
UINT16 x,y;
|
||||
|
||||
x = RAM[i];
|
||||
|
||||
// [0] d0a9 6ebf 5c72 3814 [1] 4567 0123 ba98 fedc
|
||||
// [2] fdb9 ce07 5318 a246 [3] 4512 ed3b a967 08fc
|
||||
#define BITSWAP_0 BITSWAP16(x,0xd,0x0,0xa,0x9,0x6,0xe,0xb,0xf,0x5,0xc,0x7,0x2,0x3,0x8,0x1,0x4);
|
||||
#define BITSWAP_1 BITSWAP16(x,0x4,0x5,0x6,0x7,0x0,0x1,0x2,0x3,0xb,0xa,0x9,0x8,0xf,0xe,0xd,0xc);
|
||||
#define BITSWAP_2 BITSWAP16(x,0xf,0xd,0xb,0x9,0xc,0xe,0x0,0x7,0x5,0x3,0x1,0x8,0xa,0x2,0x4,0x6);
|
||||
#define BITSWAP_3 BITSWAP16(x,0x4,0x5,0x1,0x2,0xe,0xd,0x3,0xb,0xa,0x9,0x6,0x7,0x0,0x8,0xf,0xc);
|
||||
|
||||
if (i < 0x08000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_0;} else {y = BITSWAP_1;} }
|
||||
else if (i < 0x10000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_2;} else {y = BITSWAP_3;} }
|
||||
else if (i < 0x18000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_0;} else {y = BITSWAP_1;} }
|
||||
else if (i < 0x20000/2) { y = BITSWAP_1; }
|
||||
else { y = BITSWAP_3; }
|
||||
|
||||
#undef BITSWAP_0
|
||||
#undef BITSWAP_1
|
||||
#undef BITSWAP_2
|
||||
#undef BITSWAP_3
|
||||
|
||||
RAM[i] = y;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void rodlandj_gfx_unmangle(running_machine *machine, const char *region)
|
||||
{
|
||||
UINT8 *rom = machine->region(region)->base();
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "audio/williams.h"
|
||||
#include "audio/dcs.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/midyunit.h"
|
||||
#include "includes/midtunit.h"
|
||||
|
||||
|
||||
@ -55,7 +54,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x01d01020, 0x01d0103f) AM_READWRITE(midtunit_sound_r, midtunit_sound_w)
|
||||
AM_RANGE(0x01d81060, 0x01d8107f) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0x01f00000, 0x01f0001f) AM_WRITE(midtunit_control_w)
|
||||
AM_RANGE(0x02000000, 0x07ffffff) AM_READ(midtunit_gfxrom_r) AM_BASE((UINT16 **)&midyunit_gfx_rom) AM_SIZE(&midyunit_gfx_rom_size)
|
||||
AM_RANGE(0x02000000, 0x07ffffff) AM_READ(midtunit_gfxrom_r) AM_BASE((UINT16 **)&midtunit_gfx_rom) AM_SIZE(&midtunit_gfx_rom_size)
|
||||
AM_RANGE(0x1f800000, 0x1fffffff) AM_ROM AM_REGION("user1", 0) /* mirror used by MK */
|
||||
AM_RANGE(0xc0000000, 0xc00001ff) AM_READWRITE(tms34010_io_register_r, tms34010_io_register_w)
|
||||
AM_RANGE(0xff800000, 0xffffffff) AM_ROM AM_REGION("user1", 0)
|
||||
|
@ -633,7 +633,7 @@ static const tms34010_config tms_config =
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static MACHINE_CONFIG_START( wunit, midwxunit_state )
|
||||
static MACHINE_CONFIG_START( wunit, midwunit_state )
|
||||
|
||||
MCFG_CPU_ADD("maincpu", TMS34010, 50000000)
|
||||
MCFG_CPU_CONFIG(tms_config)
|
||||
|
@ -85,7 +85,7 @@ There's a separate sound board also, but it wasn't available so is not documente
|
||||
#include "audio/dcs.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/midtunit.h"
|
||||
#include "includes/midwunit.h"
|
||||
#include "includes/midxunit.h"
|
||||
|
||||
|
||||
#define PIXEL_CLOCK (8000000)
|
||||
@ -106,14 +106,14 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x60400000, 0x6040001f) AM_READWRITE(midxunit_status_r, midxunit_security_clock_w)
|
||||
AM_RANGE(0x60c00000, 0x60c0007f) AM_READ(midxunit_io_r)
|
||||
AM_RANGE(0x60c00080, 0x60c000df) AM_WRITE(midxunit_io_w)
|
||||
AM_RANGE(0x60c000e0, 0x60c000ff) AM_READWRITE(midwunit_security_r, midxunit_security_w)
|
||||
AM_RANGE(0x60c000e0, 0x60c000ff) AM_READWRITE(midxunit_security_r, midxunit_security_w)
|
||||
AM_RANGE(0x80800000, 0x8080001f) AM_READWRITE(midxunit_analog_r, midxunit_analog_select_w)
|
||||
AM_RANGE(0x80c00000, 0x80c000ff) AM_READWRITE(midxunit_uart_r, midxunit_uart_w)
|
||||
AM_RANGE(0xa0440000, 0xa047ffff) AM_READWRITE(midwunit_cmos_r, midxunit_cmos_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0xa0440000, 0xa047ffff) AM_READWRITE(midxunit_cmos_r, midxunit_cmos_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0xa0800000, 0xa08fffff) AM_READWRITE(midxunit_paletteram_r, midxunit_paletteram_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xc0000000, 0xc00003ff) AM_READWRITE(tms34020_io_register_r, tms34020_io_register_w)
|
||||
AM_RANGE(0xc0c00000, 0xc0c000ff) AM_MIRROR(0x00400000) AM_READWRITE(midtunit_dma_r, midtunit_dma_w)
|
||||
AM_RANGE(0xf8000000, 0xfeffffff) AM_READ(midwunit_gfxrom_r) AM_BASE((UINT16 **)&midwunit_decode_memory)
|
||||
AM_RANGE(0xf8000000, 0xfeffffff) AM_READ(midwunit_gfxrom_r) AM_BASE((UINT16 **)&midxunit_decode_memory)
|
||||
AM_RANGE(0xff000000, 0xffffffff) AM_ROM AM_REGION("user1", 0)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -257,7 +257,7 @@ static const tms34010_config tms_config =
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static MACHINE_CONFIG_START( midxunit, midwxunit_state )
|
||||
static MACHINE_CONFIG_START( midxunit, midxunit_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", TMS34020, 40000000)
|
||||
|
@ -22,11 +22,22 @@ OKI M6295 sound ROM dump is bad.
|
||||
#include "includes/bublbobl.h"
|
||||
|
||||
|
||||
class missb2_state : public bublbobl_state
|
||||
{
|
||||
public:
|
||||
missb2_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: bublbobl_state(machine, config) { }
|
||||
|
||||
UINT8 * bgvram;
|
||||
UINT8 * bg_paletteram;
|
||||
};
|
||||
|
||||
|
||||
/* Video Hardware */
|
||||
|
||||
static SCREEN_UPDATE( missb2 )
|
||||
{
|
||||
bublbobl_state *state = screen->machine->driver_data<bublbobl_state>();
|
||||
missb2_state *state = screen->machine->driver_data<missb2_state>();
|
||||
int offs;
|
||||
int sx, sy, xc, yc;
|
||||
int gfx_num, gfx_attr, gfx_offs;
|
||||
@ -127,7 +138,7 @@ INLINE void bg_changecolor_RRRRGGGGBBBBxxxx( running_machine *machine, pen_t col
|
||||
|
||||
static WRITE8_HANDLER( bg_paletteram_RRRRGGGGBBBBxxxx_be_w )
|
||||
{
|
||||
bublbobl_state *state = space->machine->driver_data<bublbobl_state>();
|
||||
missb2_state *state = space->machine->driver_data<missb2_state>();
|
||||
state->bg_paletteram[offset] = data;
|
||||
bg_changecolor_RRRRGGGGBBBBxxxx(space->machine, offset / 2, state->bg_paletteram[offset | 1] | (state->bg_paletteram[offset & ~1] << 8));
|
||||
}
|
||||
@ -148,8 +159,8 @@ static WRITE8_HANDLER( missb2_bg_bank_w )
|
||||
static ADDRESS_MAP_START( master_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0xc000, 0xdcff) AM_RAM AM_BASE_SIZE_MEMBER(bublbobl_state, videoram, videoram_size)
|
||||
AM_RANGE(0xdd00, 0xdfff) AM_RAM AM_BASE_SIZE_MEMBER(bublbobl_state, objectram, objectram_size)
|
||||
AM_RANGE(0xc000, 0xdcff) AM_RAM AM_BASE_SIZE_MEMBER(missb2_state, videoram, videoram_size)
|
||||
AM_RANGE(0xdd00, 0xdfff) AM_RAM AM_BASE_SIZE_MEMBER(missb2_state, objectram, objectram_size)
|
||||
AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE("share1")
|
||||
AM_RANGE(0xf800, 0xf9ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_be_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xfa00, 0xfa00) AM_WRITE(bublbobl_sound_command_w)
|
||||
@ -173,11 +184,11 @@ static ADDRESS_MAP_START( slave_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x9000, 0x9fff) AM_ROMBANK("bank2") // ROM data for the background palette ram
|
||||
AM_RANGE(0xa000, 0xafff) AM_ROMBANK("bank3") // ROM data for the background palette ram
|
||||
AM_RANGE(0xb000, 0xb1ff) AM_ROM // banked ???
|
||||
AM_RANGE(0xc000, 0xc1ff) AM_RAM_WRITE(bg_paletteram_RRRRGGGGBBBBxxxx_be_w) AM_BASE_MEMBER(bublbobl_state, bg_paletteram)
|
||||
AM_RANGE(0xc000, 0xc1ff) AM_RAM_WRITE(bg_paletteram_RRRRGGGGBBBBxxxx_be_w) AM_BASE_MEMBER(missb2_state, bg_paletteram)
|
||||
AM_RANGE(0xc800, 0xcfff) AM_RAM // main ???
|
||||
AM_RANGE(0xd000, 0xd000) AM_WRITE(missb2_bg_bank_w)
|
||||
AM_RANGE(0xd002, 0xd002) AM_WRITENOP
|
||||
AM_RANGE(0xd003, 0xd003) AM_RAM AM_BASE_MEMBER(bublbobl_state, bgvram)
|
||||
AM_RANGE(0xd003, 0xd003) AM_RAM AM_BASE_MEMBER(missb2_state, bgvram)
|
||||
AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE("share1")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -418,7 +429,7 @@ static INTERRUPT_GEN( missb2_interrupt )
|
||||
|
||||
static MACHINE_START( missb2 )
|
||||
{
|
||||
bublbobl_state *state = machine->driver_data<bublbobl_state>();
|
||||
missb2_state *state = machine->driver_data<missb2_state>();
|
||||
|
||||
state->maincpu = machine->device("maincpu");
|
||||
state->audiocpu = machine->device("audiocpu");
|
||||
@ -433,14 +444,14 @@ static MACHINE_START( missb2 )
|
||||
|
||||
static MACHINE_RESET( missb2 )
|
||||
{
|
||||
bublbobl_state *state = machine->driver_data<bublbobl_state>();
|
||||
missb2_state *state = machine->driver_data<missb2_state>();
|
||||
|
||||
state->sound_nmi_enable = 0;
|
||||
state->pending_nmi = 0;
|
||||
state->sound_status = 0;
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( missb2, bublbobl_state )
|
||||
static MACHINE_CONFIG_START( missb2, missb2_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, MAIN_XTAL/4) // 6 MHz
|
||||
@ -571,7 +582,7 @@ static void configure_banks( running_machine* machine )
|
||||
|
||||
static DRIVER_INIT( missb2 )
|
||||
{
|
||||
bublbobl_state *state = machine->driver_data<bublbobl_state>();
|
||||
missb2_state *state = machine->driver_data<missb2_state>();
|
||||
|
||||
configure_banks(machine);
|
||||
state->video_enable = 0;
|
||||
|
@ -168,7 +168,7 @@ Super Strong Warriors
|
||||
#include "cpu/v60/v60.h"
|
||||
#include "deprecat.h"
|
||||
#include "sound/ymf271.h"
|
||||
#include "machine/ms32crpt.h"
|
||||
#include "machine/jalcrpt.h"
|
||||
#include "includes/ms32.h"
|
||||
|
||||
|
||||
|
@ -157,7 +157,6 @@ OSC3: 48.384MHz
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "includes/namconb1.h"
|
||||
#include "includes/namcos2.h"
|
||||
#include "includes/namcoic.h"
|
||||
#include "cpu/i960/i960.h"
|
||||
@ -527,9 +526,9 @@ static const gfx_layout roz_layout =
|
||||
};
|
||||
|
||||
static GFXDECODE_START( 2 )
|
||||
GFXDECODE_ENTRY( NAMCONB1_TILEGFXREGION, 0, tile_layout, 0x1000, 0x08 )
|
||||
GFXDECODE_ENTRY( NAMCONB1_SPRITEGFXREGION, 0, obj_layout, 0x0000, 0x10 )
|
||||
GFXDECODE_ENTRY( NAMCONB1_ROTGFXREGION, 0, roz_layout, 0x1800, 0x08 )
|
||||
GFXDECODE_ENTRY( NAMCOFL_TILEGFXREGION, 0, tile_layout, 0x1000, 0x08 )
|
||||
GFXDECODE_ENTRY( NAMCOFL_SPRITEGFXREGION, 0, obj_layout, 0x0000, 0x10 )
|
||||
GFXDECODE_ENTRY( NAMCOFL_ROTGFXREGION, 0, roz_layout, 0x1800, 0x08 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -607,8 +606,8 @@ static MACHINE_CONFIG_START( namcofl, namcofl_state )
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_SIZE(NAMCONB1_HTOTAL, NAMCONB1_VTOTAL)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, NAMCONB1_HBSTART-1, 0, NAMCONB1_VBSTART-1)
|
||||
MCFG_SCREEN_SIZE(NAMCOFL_HTOTAL, NAMCOFL_VTOTAL)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, NAMCOFL_HBSTART-1, 0, NAMCOFL_VBSTART-1)
|
||||
MCFG_SCREEN_UPDATE(namcofl)
|
||||
|
||||
MCFG_PALETTE_LENGTH(8192)
|
||||
@ -642,26 +641,26 @@ ROM_START( speedrcr )
|
||||
ROM_REGION16_LE( 0x80000, "c75data", 0 ) // C75 data
|
||||
ROM_LOAD("se1_spr.21l", 0x000000, 0x80000, CRC(850a27ac) SHA1(7d5db840ec67659a1f2e69a62cdb03ce6ee0b47b) )
|
||||
|
||||
ROM_REGION( 0x200000, NAMCONB1_ROTGFXREGION, 0 ) // "RCHAR" (roz characters)
|
||||
ROM_REGION( 0x200000, NAMCOFL_ROTGFXREGION, 0 ) // "RCHAR" (roz characters)
|
||||
ROM_LOAD("se1_rch0.19j", 0x000000, 0x100000, CRC(a0827288) SHA1(13691ef4d402a6dc91851de4f82cfbdf96d417cb) )
|
||||
ROM_LOAD("se1_rch1.18j", 0x100000, 0x100000, CRC(af7609ad) SHA1(b16041f0eb47d7566011d9d762a3083411dc422e) )
|
||||
|
||||
ROM_REGION( 0x400000, NAMCONB1_TILEGFXREGION, 0 ) // "SCHAR" (regular BG characters)
|
||||
ROM_REGION( 0x400000, NAMCOFL_TILEGFXREGION, 0 ) // "SCHAR" (regular BG characters)
|
||||
ROM_LOAD("se1_sch0.21p", 0x000000, 0x100000, CRC(7b5cfad0) SHA1(5a0355e37eb191bc0cf8b6b7c3d0274560b9bbd5) )
|
||||
ROM_LOAD("se1_sch1.20p", 0x100000, 0x100000, CRC(5086e0d3) SHA1(0aa7d11f4f9a75117e69cc77f1b73a68d9007aef) )
|
||||
ROM_LOAD("se1_sch2.19p", 0x200000, 0x100000, CRC(e59a731e) SHA1(3fed72e9bb485d4d689ab51490360c4c6f1dc5cb) )
|
||||
ROM_LOAD("se1_sch3.18p", 0x300000, 0x100000, CRC(f817027a) SHA1(71745476f496c60d89c8563b3e46bc85eebc79ce) )
|
||||
|
||||
ROM_REGION( 0x800000, NAMCONB1_SPRITEGFXREGION, 0 ) // OBJ
|
||||
ROM_REGION( 0x800000, NAMCOFL_SPRITEGFXREGION, 0 ) // OBJ
|
||||
ROM_LOAD16_BYTE("se1obj0l.ic1", 0x000001, 0x200000, CRC(17585218) SHA1(3332afa9bd194ac37b8d6f352507c523a0f2e2b3) )
|
||||
ROM_LOAD16_BYTE("se1obj0u.ic2", 0x000000, 0x200000, CRC(d14b1236) SHA1(e5447732ef3acec88fb7a00e0deca3e71a40ae65) )
|
||||
ROM_LOAD16_BYTE("se1obj1l.ic3", 0x400001, 0x200000, CRC(c4809fd5) SHA1(e0b80fccc17c83fb9d08f7f1cf2cd2f0f3a510b4) )
|
||||
ROM_LOAD16_BYTE("se1obj1u.ic4", 0x400000, 0x200000, CRC(0beefa56) SHA1(012fb7b330dbf851ab2217da0a0e7136ddc3d23f) )
|
||||
|
||||
ROM_REGION( 0x100000, NAMCONB1_ROTMASKREGION, 0 ) // "RSHAPE" (roz mask like NB-1?)
|
||||
ROM_REGION( 0x100000, NAMCOFL_ROTMASKREGION, 0 ) // "RSHAPE" (roz mask like NB-1?)
|
||||
ROM_LOAD("se1_rsh.14k", 0x000000, 0x100000, CRC(7aa5a962) SHA1(ff936dfcfcc4ee1f5f2232df62def76ff99e671e) )
|
||||
|
||||
ROM_REGION( 0x100000, NAMCONB1_TILEMASKREGION, 0 ) // "SSHAPE" (mask for other tiles?)
|
||||
ROM_REGION( 0x100000, NAMCOFL_TILEMASKREGION, 0 ) // "SSHAPE" (mask for other tiles?)
|
||||
ROM_LOAD("se1_ssh.18u", 0x000000, 0x100000, CRC(7a8e0bda) SHA1(f6a508d90274d0205fec0c46f5f783a2715c0c6e) )
|
||||
|
||||
ROM_REGION( 0x400000, "c352", 0 ) // Samples
|
||||
@ -694,26 +693,26 @@ ROM_START( finalapr )
|
||||
ROM_REGION16_LE( 0x80000, "c75data", 0 ) // C75 data
|
||||
ROM_LOAD("flr1spr.21l", 0x000000, 0x20000, CRC(69bb0f5e) SHA1(6831d618de42a165e508ad37db594d3aa290c530) )
|
||||
|
||||
ROM_REGION( 0x200000, NAMCONB1_ROTGFXREGION, 0 ) // "RCHAR" (roz characters)
|
||||
ROM_REGION( 0x200000, NAMCOFL_ROTGFXREGION, 0 ) // "RCHAR" (roz characters)
|
||||
ROM_LOAD("flr1rch0.19j", 0x000000, 0x100000, CRC(f413f50d) SHA1(cdd8073dda4feaea78e3b94520cf20a9799fd04d) )
|
||||
ROM_LOAD("flr1rch1.18j", 0x100000, 0x100000, CRC(4654d519) SHA1(f8bb473013cdca48dd98df0de2f78c300c156e91) )
|
||||
|
||||
ROM_REGION( 0x400000, NAMCONB1_TILEGFXREGION, 0 ) // "SCHAR" (regular BG characters)
|
||||
ROM_REGION( 0x400000, NAMCOFL_TILEGFXREGION, 0 ) // "SCHAR" (regular BG characters)
|
||||
ROM_LOAD("flr1sch0.21p", 0x000000, 0x100000, CRC(7169efca) SHA1(66c7aa1b50b236b4700b07be0dca7aebdabedb8c) )
|
||||
ROM_LOAD("flr1sch1.20p", 0x100000, 0x100000, CRC(aa233a02) SHA1(0011329f585658d90f820daf0ba08ce2735bddfc) )
|
||||
ROM_LOAD("flr1sch2.19p", 0x200000, 0x100000, CRC(9b6b7abd) SHA1(5cdec70db1b46bc5d0866ca155b520157fef3adf) )
|
||||
ROM_LOAD("flr1sch3.18p", 0x300000, 0x100000, CRC(50a14f54) SHA1(ab9c2f2e11f006a9dc7e5aedd5788d7d67166d36) )
|
||||
|
||||
ROM_REGION( 0x800000, NAMCONB1_SPRITEGFXREGION, 0 ) // OBJ
|
||||
ROM_REGION( 0x800000, NAMCOFL_SPRITEGFXREGION, 0 ) // OBJ
|
||||
ROM_LOAD16_BYTE("flr1obj0l.ic1", 0x000001, 0x200000, CRC(364a902c) SHA1(4a1ea48eee86d410e36096cc100b4c9a5a645034) )
|
||||
ROM_LOAD16_BYTE("flr1obj0u.ic2", 0x000000, 0x200000, CRC(a5c7b80e) SHA1(4e0e863cfdd8c051c3c4594bb21e11fb93c28f0c) )
|
||||
ROM_LOAD16_BYTE("flr1obj1l.ic3", 0x400001, 0x200000, CRC(51fd8de7) SHA1(b1571c45e8c33d746716fd790c704a3361d02bdc) )
|
||||
ROM_LOAD16_BYTE("flr1obj1u.ic4", 0x400000, 0x200000, CRC(1737aa3c) SHA1(8eaf0dc5d60a270d2c1626f54f5edbddbb0a59c8) )
|
||||
|
||||
ROM_REGION( 0x80000, NAMCONB1_ROTMASKREGION, 0 ) // "RSHAPE" (roz mask like NB-1?)
|
||||
ROM_REGION( 0x80000, NAMCOFL_ROTMASKREGION, 0 ) // "RSHAPE" (roz mask like NB-1?)
|
||||
ROM_LOAD("flr1rsh.14k", 0x000000, 0x080000, CRC(037c0983) SHA1(c48574a8ad125cedfaf2538c5ff824e121204629) )
|
||||
|
||||
ROM_REGION( 0x80000, NAMCONB1_TILEMASKREGION, 0 ) // "SSHAPE" (mask for other tiles?)
|
||||
ROM_REGION( 0x80000, NAMCOFL_TILEMASKREGION, 0 ) // "SSHAPE" (mask for other tiles?)
|
||||
ROM_LOAD("flr1ssh.18u", 0x000000, 0x080000, CRC(f70cb2bf) SHA1(dbddda822287783a43415172b81d0382a8ac43d8) )
|
||||
|
||||
ROM_REGION( 0x200000, "c352", 0 ) // Samples
|
||||
@ -736,26 +735,26 @@ ROM_START( finalapro )
|
||||
ROM_REGION16_LE( 0x80000, "c75data", 0 ) // C75 data
|
||||
ROM_LOAD("flr1spr.21l", 0x000000, 0x20000, CRC(69bb0f5e) SHA1(6831d618de42a165e508ad37db594d3aa290c530) )
|
||||
|
||||
ROM_REGION( 0x200000, NAMCONB1_ROTGFXREGION, 0 ) // "RCHAR" (roz characters)
|
||||
ROM_REGION( 0x200000, NAMCOFL_ROTGFXREGION, 0 ) // "RCHAR" (roz characters)
|
||||
ROM_LOAD("flr1rch0.19j", 0x000000, 0x100000, CRC(f413f50d) SHA1(cdd8073dda4feaea78e3b94520cf20a9799fd04d) )
|
||||
ROM_LOAD("flr1rch1.18j", 0x100000, 0x100000, CRC(4654d519) SHA1(f8bb473013cdca48dd98df0de2f78c300c156e91) )
|
||||
|
||||
ROM_REGION( 0x400000, NAMCONB1_TILEGFXREGION, 0 ) // "SCHAR" (regular BG characters)
|
||||
ROM_REGION( 0x400000, NAMCOFL_TILEGFXREGION, 0 ) // "SCHAR" (regular BG characters)
|
||||
ROM_LOAD("flr1sch0.21p", 0x000000, 0x100000, CRC(7169efca) SHA1(66c7aa1b50b236b4700b07be0dca7aebdabedb8c) )
|
||||
ROM_LOAD("flr1sch1.20p", 0x100000, 0x100000, CRC(aa233a02) SHA1(0011329f585658d90f820daf0ba08ce2735bddfc) )
|
||||
ROM_LOAD("flr1sch2.19p", 0x200000, 0x100000, CRC(9b6b7abd) SHA1(5cdec70db1b46bc5d0866ca155b520157fef3adf) )
|
||||
ROM_LOAD("flr1sch3.18p", 0x300000, 0x100000, CRC(50a14f54) SHA1(ab9c2f2e11f006a9dc7e5aedd5788d7d67166d36) )
|
||||
|
||||
ROM_REGION( 0x800000, NAMCONB1_SPRITEGFXREGION, 0 ) // OBJ
|
||||
ROM_REGION( 0x800000, NAMCOFL_SPRITEGFXREGION, 0 ) // OBJ
|
||||
ROM_LOAD16_BYTE("flr1obj0l.ic1", 0x000001, 0x200000, CRC(364a902c) SHA1(4a1ea48eee86d410e36096cc100b4c9a5a645034) )
|
||||
ROM_LOAD16_BYTE("flr1obj0u.ic2", 0x000000, 0x200000, CRC(a5c7b80e) SHA1(4e0e863cfdd8c051c3c4594bb21e11fb93c28f0c) )
|
||||
ROM_LOAD16_BYTE("flr1obj1l.ic3", 0x400001, 0x200000, CRC(51fd8de7) SHA1(b1571c45e8c33d746716fd790c704a3361d02bdc) )
|
||||
ROM_LOAD16_BYTE("flr1obj1u.ic4", 0x400000, 0x200000, CRC(1737aa3c) SHA1(8eaf0dc5d60a270d2c1626f54f5edbddbb0a59c8) )
|
||||
|
||||
ROM_REGION( 0x80000, NAMCONB1_ROTMASKREGION, 0 ) // "RSHAPE" (roz mask like NB-1?)
|
||||
ROM_REGION( 0x80000, NAMCOFL_ROTMASKREGION, 0 ) // "RSHAPE" (roz mask like NB-1?)
|
||||
ROM_LOAD("flr1rsh.14k", 0x000000, 0x080000, CRC(037c0983) SHA1(c48574a8ad125cedfaf2538c5ff824e121204629) )
|
||||
|
||||
ROM_REGION( 0x80000, NAMCONB1_TILEMASKREGION, 0 ) // "SSHAPE" (mask for other tiles?)
|
||||
ROM_REGION( 0x80000, NAMCOFL_TILEMASKREGION, 0 ) // "SSHAPE" (mask for other tiles?)
|
||||
ROM_LOAD("flr1ssh.18u", 0x000000, 0x080000, CRC(f70cb2bf) SHA1(dbddda822287783a43415172b81d0382a8ac43d8) )
|
||||
|
||||
ROM_REGION( 0x200000, "c352", 0 ) // Samples
|
||||
@ -779,26 +778,26 @@ ROM_START( finalaprj )
|
||||
ROM_REGION16_LE( 0x80000, "c75data", 0 ) // C75 data
|
||||
ROM_LOAD("flr1spr.21l", 0x000000, 0x20000, CRC(69bb0f5e) SHA1(6831d618de42a165e508ad37db594d3aa290c530) )
|
||||
|
||||
ROM_REGION( 0x200000, NAMCONB1_ROTGFXREGION, 0 ) // "RCHAR" (roz characters)
|
||||
ROM_REGION( 0x200000, NAMCOFL_ROTGFXREGION, 0 ) // "RCHAR" (roz characters)
|
||||
ROM_LOAD("flr1rch0.19j", 0x000000, 0x100000, CRC(f413f50d) SHA1(cdd8073dda4feaea78e3b94520cf20a9799fd04d) )
|
||||
ROM_LOAD("flr1rch1.18j", 0x100000, 0x100000, CRC(4654d519) SHA1(f8bb473013cdca48dd98df0de2f78c300c156e91) )
|
||||
|
||||
ROM_REGION( 0x400000, NAMCONB1_TILEGFXREGION, 0 ) // "SCHAR" (regular BG characters)
|
||||
ROM_REGION( 0x400000, NAMCOFL_TILEGFXREGION, 0 ) // "SCHAR" (regular BG characters)
|
||||
ROM_LOAD("flr1sch0.21p", 0x000000, 0x100000, CRC(7169efca) SHA1(66c7aa1b50b236b4700b07be0dca7aebdabedb8c) )
|
||||
ROM_LOAD("flr1sch1.20p", 0x100000, 0x100000, CRC(aa233a02) SHA1(0011329f585658d90f820daf0ba08ce2735bddfc) )
|
||||
ROM_LOAD("flr1sch2.19p", 0x200000, 0x100000, CRC(9b6b7abd) SHA1(5cdec70db1b46bc5d0866ca155b520157fef3adf) )
|
||||
ROM_LOAD("flr1sch3.18p", 0x300000, 0x100000, CRC(50a14f54) SHA1(ab9c2f2e11f006a9dc7e5aedd5788d7d67166d36) )
|
||||
|
||||
ROM_REGION( 0x800000, NAMCONB1_SPRITEGFXREGION, 0 ) // OBJ
|
||||
ROM_REGION( 0x800000, NAMCOFL_SPRITEGFXREGION, 0 ) // OBJ
|
||||
ROM_LOAD16_BYTE("flr1obj0l.ic1", 0x000001, 0x200000, CRC(364a902c) SHA1(4a1ea48eee86d410e36096cc100b4c9a5a645034) )
|
||||
ROM_LOAD16_BYTE("flr1obj0u.ic2", 0x000000, 0x200000, CRC(a5c7b80e) SHA1(4e0e863cfdd8c051c3c4594bb21e11fb93c28f0c) )
|
||||
ROM_LOAD16_BYTE("flr1obj1l.ic3", 0x400001, 0x200000, CRC(51fd8de7) SHA1(b1571c45e8c33d746716fd790c704a3361d02bdc) )
|
||||
ROM_LOAD16_BYTE("flr1obj1u.ic4", 0x400000, 0x200000, CRC(1737aa3c) SHA1(8eaf0dc5d60a270d2c1626f54f5edbddbb0a59c8) )
|
||||
|
||||
ROM_REGION( 0x80000, NAMCONB1_ROTMASKREGION, 0 ) // "RSHAPE" (roz mask like NB-1?)
|
||||
ROM_REGION( 0x80000, NAMCOFL_ROTMASKREGION, 0 ) // "RSHAPE" (roz mask like NB-1?)
|
||||
ROM_LOAD("flr1rsh.14k", 0x000000, 0x080000, CRC(037c0983) SHA1(c48574a8ad125cedfaf2538c5ff824e121204629) )
|
||||
|
||||
ROM_REGION( 0x80000, NAMCONB1_TILEMASKREGION, 0 ) // "SSHAPE" (mask for other tiles?)
|
||||
ROM_REGION( 0x80000, NAMCOFL_TILEMASKREGION, 0 ) // "SSHAPE" (mask for other tiles?)
|
||||
ROM_LOAD("flr1ssh.18u", 0x000000, 0x080000, CRC(f70cb2bf) SHA1(dbddda822287783a43415172b81d0382a8ac43d8) )
|
||||
|
||||
ROM_REGION( 0x200000, "c352", 0 ) // Samples
|
||||
|
@ -1523,6 +1523,12 @@ static const c140_interface C140_interface_typeB =
|
||||
C140_TYPE_SYSTEM21_B
|
||||
};
|
||||
|
||||
static MACHINE_START( namcos21 )
|
||||
{
|
||||
MACHINE_START_CALL( namcos2 );
|
||||
namcos2_kickstart = namcos21_kickstart;
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( s21base, namcos21_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000,12288000) /* Master */
|
||||
MCFG_CPU_PROGRAM_MAP(namcos21_68k_master)
|
||||
@ -1553,7 +1559,7 @@ static MACHINE_CONFIG_START( s21base, namcos21_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(12000))
|
||||
|
||||
MCFG_MACHINE_START(namcos2)
|
||||
MCFG_MACHINE_START(namcos21)
|
||||
MCFG_MACHINE_RESET(namcos2)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
@ -1625,7 +1631,7 @@ static MACHINE_CONFIG_START( driveyes, namcos21_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */
|
||||
|
||||
MCFG_MACHINE_START(namcos2)
|
||||
MCFG_MACHINE_START(namcos21)
|
||||
MCFG_MACHINE_RESET(namcos2)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
@ -1684,7 +1690,7 @@ static MACHINE_CONFIG_START( winrun_c140_typeB, namcos21_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */
|
||||
|
||||
MCFG_MACHINE_START(namcos2)
|
||||
MCFG_MACHINE_START(namcos21)
|
||||
MCFG_MACHINE_RESET(namcos2)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
|
@ -76,19 +76,19 @@ Sound Board 1b11107
|
||||
|
||||
static WRITE8_HANDLER( video_page_select_w )
|
||||
{
|
||||
cvs_state *state = space->machine->driver_data<cvs_state>();
|
||||
quasar_state *state = space->machine->driver_data<quasar_state>();
|
||||
state->page = offset & 0x03;
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( io_page_select_w )
|
||||
{
|
||||
cvs_state *state = space->machine->driver_data<cvs_state>();
|
||||
quasar_state *state = space->machine->driver_data<quasar_state>();
|
||||
state->io_page = offset & 0x03;
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( quasar_video_w )
|
||||
{
|
||||
cvs_state *state = space->machine->driver_data<cvs_state>();
|
||||
quasar_state *state = space->machine->driver_data<quasar_state>();
|
||||
|
||||
switch (state->page)
|
||||
{
|
||||
@ -101,7 +101,7 @@ static WRITE8_HANDLER( quasar_video_w )
|
||||
|
||||
static READ8_HANDLER( quasar_IO_r )
|
||||
{
|
||||
cvs_state *state = space->machine->driver_data<cvs_state>();
|
||||
quasar_state *state = space->machine->driver_data<quasar_state>();
|
||||
UINT8 ans = 0;
|
||||
|
||||
switch (state->io_page)
|
||||
@ -117,7 +117,7 @@ static READ8_HANDLER( quasar_IO_r )
|
||||
|
||||
static WRITE8_HANDLER( quasar_bullet_w )
|
||||
{
|
||||
cvs_state *state = space->machine->driver_data<cvs_state>();
|
||||
quasar_state *state = space->machine->driver_data<quasar_state>();
|
||||
state->bullet_ram[offset] = (data ^ 0xff);
|
||||
}
|
||||
|
||||
@ -146,11 +146,11 @@ static READ8_HANDLER( audio_t1_r )
|
||||
|
||||
static ADDRESS_MAP_START( quasar, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x13ff) AM_ROM
|
||||
AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_bullet_ram_or_palette_r, quasar_bullet_w) AM_BASE_MEMBER(cvs_state, bullet_ram)
|
||||
AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_bullet_ram_or_palette_r, quasar_bullet_w) AM_BASE_MEMBER(quasar_state, bullet_ram)
|
||||
AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_0_or_character_ram_r, cvs_s2636_0_or_character_ram_w)
|
||||
AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_1_or_character_ram_r, cvs_s2636_1_or_character_ram_w)
|
||||
AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_2_or_character_ram_r, cvs_s2636_2_or_character_ram_w)
|
||||
AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE(cvs_video_or_color_ram_r, quasar_video_w) AM_BASE_MEMBER(cvs_state, video_ram)
|
||||
AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE(cvs_video_or_color_ram_r, quasar_video_w) AM_BASE_MEMBER(quasar_state, video_ram)
|
||||
AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM
|
||||
AM_RANGE(0x2000, 0x33ff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x53ff) AM_ROM
|
||||
@ -163,7 +163,7 @@ static ADDRESS_MAP_START( quasar_io, ADDRESS_SPACE_IO, 8 )
|
||||
AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READWRITE(cvs_collision_clear, quasar_sh_command_w)
|
||||
AM_RANGE(S2650_CTRL_PORT, S2650_CTRL_PORT) AM_READ(cvs_collision_r) AM_WRITENOP
|
||||
AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE")
|
||||
AM_RANGE(S2650_FO_PORT, S2650_FO_PORT) AM_RAM AM_BASE_MEMBER(cvs_state, fo_state)
|
||||
AM_RANGE(S2650_FO_PORT, S2650_FO_PORT) AM_RAM AM_BASE_MEMBER(quasar_state, fo_state)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
/*************************************
|
||||
@ -338,7 +338,7 @@ static const s2636_interface s2636_2_config =
|
||||
|
||||
static MACHINE_START( quasar )
|
||||
{
|
||||
cvs_state *state = machine->driver_data<cvs_state>();
|
||||
quasar_state *state = machine->driver_data<quasar_state>();
|
||||
|
||||
MACHINE_START_CALL(cvs);
|
||||
|
||||
@ -350,7 +350,7 @@ static MACHINE_START( quasar )
|
||||
|
||||
static MACHINE_RESET( quasar )
|
||||
{
|
||||
cvs_state *state = machine->driver_data<cvs_state>();
|
||||
quasar_state *state = machine->driver_data<quasar_state>();
|
||||
|
||||
MACHINE_RESET_CALL(cvs);
|
||||
|
||||
@ -359,7 +359,7 @@ static MACHINE_RESET( quasar )
|
||||
state->io_page = 8;
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( quasar, cvs_state )
|
||||
static MACHINE_CONFIG_START( quasar, quasar_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", S2650, 14318000/4) /* 14 mhz crystal divide by 4 on board */
|
||||
|
@ -38,7 +38,6 @@
|
||||
#include "video/taitoic.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "sound/es5506.h"
|
||||
#include "includes/taito_f3.h"
|
||||
#include "audio/taito_en.h"
|
||||
|
||||
#include "superchs.lh"
|
||||
@ -236,7 +235,7 @@ static ADDRESS_MAP_START( superchs_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_BASE_MEMBER(superchs_state, shared_ram)
|
||||
AM_RANGE(0x240000, 0x240003) AM_WRITE(cpua_ctrl_w)
|
||||
AM_RANGE(0x280000, 0x287fff) AM_RAM_WRITE(superchs_palette_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x2c0000, 0x2c07ff) AM_RAM AM_BASE(&f3_shared_ram)
|
||||
AM_RANGE(0x2c0000, 0x2c07ff) AM_RAM AM_SHARE("f3_shared")
|
||||
AM_RANGE(0x300000, 0x300007) AM_READWRITE(superchs_input_r, superchs_input_w) /* eerom etc. */
|
||||
AM_RANGE(0x340000, 0x340003) AM_READWRITE(superchs_stick_r, superchs_stick_w) /* stick int request */
|
||||
ADDRESS_MAP_END
|
||||
|
@ -43,7 +43,6 @@
|
||||
#include "sound/okim6295.h"
|
||||
|
||||
static UINT32 coin_word[2], *f3_ram;
|
||||
UINT32 *f3_shared_ram;
|
||||
int f3_game;
|
||||
|
||||
|
||||
@ -164,7 +163,7 @@ static ADDRESS_MAP_START( f3_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x630000, 0x63ffff) AM_RAM_WRITE(f3_pivot_w) AM_BASE(&f3_pivot_ram)
|
||||
AM_RANGE(0x660000, 0x66000f) AM_WRITE(f3_control_0_w)
|
||||
AM_RANGE(0x660010, 0x66001f) AM_WRITE(f3_control_1_w)
|
||||
AM_RANGE(0xc00000, 0xc007ff) AM_RAM AM_BASE(&f3_shared_ram)
|
||||
AM_RANGE(0xc00000, 0xc007ff) AM_RAM AM_SHARE("f3_shared")
|
||||
AM_RANGE(0xc80000, 0xc80003) AM_WRITE(f3_sound_reset_0_w)
|
||||
AM_RANGE(0xc80100, 0xc80103) AM_WRITE(f3_sound_reset_1_w)
|
||||
ADDRESS_MAP_END
|
||||
|
@ -321,6 +321,14 @@ Stephh's notes (based on the game M68000 code and some tests) :
|
||||
#include "includes/cchip.h"
|
||||
|
||||
|
||||
class taitox_state : public seta_state
|
||||
{
|
||||
public:
|
||||
taitox_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: seta_state(machine, config) { }
|
||||
|
||||
int banknum;
|
||||
};
|
||||
|
||||
static READ16_HANDLER( superman_dsw_input_r )
|
||||
{
|
||||
@ -397,16 +405,16 @@ static WRITE16_HANDLER( kyustrkr_input_w )
|
||||
|
||||
static void reset_sound_region(running_machine *machine)
|
||||
{
|
||||
seta_state *state = machine->driver_data<seta_state>();
|
||||
taitox_state *state = machine->driver_data<taitox_state>();
|
||||
|
||||
memory_set_bankptr(machine, "bank2", machine->region("audiocpu")->base() + (state->taitox_banknum * 0x4000) + 0x10000 );
|
||||
memory_set_bankptr(machine, "bank2", machine->region("audiocpu")->base() + (state->banknum * 0x4000) + 0x10000 );
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( sound_bankswitch_w )
|
||||
{
|
||||
seta_state *state = space->machine->driver_data<seta_state>();
|
||||
taitox_state *state = space->machine->driver_data<taitox_state>();
|
||||
|
||||
state->taitox_banknum = (data - 1) & 3;
|
||||
state->banknum = (data - 1) & 3;
|
||||
reset_sound_region(space->machine);
|
||||
}
|
||||
|
||||
@ -425,8 +433,8 @@ static ADDRESS_MAP_START( superman_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x900802, 0x900803) AM_READWRITE(cchip1_ctrl_r, cchip1_ctrl_w)
|
||||
AM_RANGE(0x900c00, 0x900c01) AM_WRITE(cchip1_bank_w)
|
||||
AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xd00000, 0xd007ff) AM_RAM AM_BASE_MEMBER(seta_state, spriteram) // Sprites Y
|
||||
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, spriteram2) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xd00000, 0xd007ff) AM_RAM AM_BASE_MEMBER(taitox_state, spriteram) // Sprites Y
|
||||
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(taitox_state, spriteram2) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xf00000, 0xf03fff) AM_RAM /* Main RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -439,8 +447,8 @@ static ADDRESS_MAP_START( daisenpu_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
|
||||
AM_RANGE(0x900000, 0x90000f) AM_READWRITE(daisenpu_input_r, daisenpu_input_w)
|
||||
AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xd00000, 0xd007ff) AM_RAM AM_BASE_MEMBER(seta_state, spriteram) // Sprites Y
|
||||
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, spriteram2) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xd00000, 0xd007ff) AM_RAM AM_BASE_MEMBER(taitox_state, spriteram) // Sprites Y
|
||||
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(taitox_state, spriteram2) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xf00000, 0xf03fff) AM_RAM /* Main RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -453,8 +461,8 @@ static ADDRESS_MAP_START( gigandes_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
|
||||
AM_RANGE(0x900000, 0x90000f) AM_READWRITE(daisenpu_input_r, daisenpu_input_w)
|
||||
AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xd00000, 0xd007ff) AM_RAM AM_BASE_MEMBER(seta_state, spriteram) // Sprites Y
|
||||
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, spriteram2) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xd00000, 0xd007ff) AM_RAM AM_BASE_MEMBER(taitox_state, spriteram) // Sprites Y
|
||||
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(taitox_state, spriteram2) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xf00000, 0xf03fff) AM_RAM /* Main RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -467,8 +475,8 @@ static ADDRESS_MAP_START( ballbros_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
|
||||
AM_RANGE(0x900000, 0x90000f) AM_READWRITE(daisenpu_input_r, daisenpu_input_w)
|
||||
AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xd00000, 0xd007ff) AM_RAM AM_BASE_MEMBER(seta_state, spriteram) // Sprites Y
|
||||
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, spriteram2) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xd00000, 0xd007ff) AM_RAM AM_BASE_MEMBER(taitox_state, spriteram) // Sprites Y
|
||||
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(taitox_state, spriteram2) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xf00000, 0xf03fff) AM_RAM /* Main RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -894,10 +902,10 @@ static STATE_POSTLOAD( taitox_postload )
|
||||
|
||||
static MACHINE_START( taitox )
|
||||
{
|
||||
seta_state *state = machine->driver_data<seta_state>();
|
||||
taitox_state *state = machine->driver_data<taitox_state>();
|
||||
|
||||
state->taitox_banknum = -1;
|
||||
state->save_item(NAME(state->taitox_banknum));
|
||||
state->banknum = -1;
|
||||
state->save_item(NAME(state->banknum));
|
||||
machine->state().register_postload(taitox_postload, NULL);
|
||||
}
|
||||
|
||||
@ -909,7 +917,7 @@ static const tc0140syt_interface taitox_tc0140syt_intf =
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
static MACHINE_CONFIG_START( superman, seta_state )
|
||||
static MACHINE_CONFIG_START( superman, taitox_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) /* verified on pcb */
|
||||
@ -951,7 +959,7 @@ static MACHINE_CONFIG_START( superman, seta_state )
|
||||
MCFG_TC0140SYT_ADD("tc0140syt", taitox_tc0140syt_intf)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( daisenpu, seta_state )
|
||||
static MACHINE_CONFIG_START( daisenpu, taitox_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) /* verified on pcb */
|
||||
@ -990,7 +998,7 @@ static MACHINE_CONFIG_START( daisenpu, seta_state )
|
||||
MCFG_TC0140SYT_ADD("tc0140syt", taitox_tc0140syt_intf)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( gigandes, seta_state )
|
||||
static MACHINE_CONFIG_START( gigandes, taitox_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 MHz? */
|
||||
@ -1031,7 +1039,7 @@ static MACHINE_CONFIG_START( gigandes, seta_state )
|
||||
MCFG_TC0140SYT_ADD("tc0140syt", taitox_tc0140syt_intf)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( ballbros, seta_state )
|
||||
static MACHINE_CONFIG_START( ballbros, taitox_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 MHz? */
|
||||
|
@ -352,7 +352,6 @@ Notes:
|
||||
#include "emu.h"
|
||||
#include "cpu/tms32051/tms32051.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "includes/taito_f3.h"
|
||||
#include "cpu/mc68hc11/mc68hc11.h"
|
||||
#include "sound/es5506.h"
|
||||
#include "machine/eeprom.h"
|
||||
@ -764,12 +763,13 @@ static WRITE32_HANDLER(dsp_shared_w)
|
||||
|
||||
static READ32_HANDLER(f3_share_r)
|
||||
{
|
||||
taitojc_state *state = space->machine->driver_data<taitojc_state>();
|
||||
switch (offset & 3)
|
||||
{
|
||||
case 0: return (f3_shared_ram[(offset/4)] << 0) & 0xff000000;
|
||||
case 1: return (f3_shared_ram[(offset/4)] << 8) & 0xff000000;
|
||||
case 2: return (f3_shared_ram[(offset/4)] << 16) & 0xff000000;
|
||||
case 3: return (f3_shared_ram[(offset/4)] << 24) & 0xff000000;
|
||||
case 0: return (state->f3_shared_ram[(offset/4)] << 0) & 0xff000000;
|
||||
case 1: return (state->f3_shared_ram[(offset/4)] << 8) & 0xff000000;
|
||||
case 2: return (state->f3_shared_ram[(offset/4)] << 16) & 0xff000000;
|
||||
case 3: return (state->f3_shared_ram[(offset/4)] << 24) & 0xff000000;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -777,14 +777,15 @@ static READ32_HANDLER(f3_share_r)
|
||||
|
||||
static WRITE32_HANDLER(f3_share_w)
|
||||
{
|
||||
taitojc_state *state = space->machine->driver_data<taitojc_state>();
|
||||
UINT32 d = (data >> 24) & 0xff;
|
||||
|
||||
switch (offset & 3)
|
||||
{
|
||||
case 0: f3_shared_ram[(offset/4)] &= ~0xff000000; f3_shared_ram[(offset/4)] |= d << 24; break;
|
||||
case 1: f3_shared_ram[(offset/4)] &= ~0x00ff0000; f3_shared_ram[(offset/4)] |= d << 16; break;
|
||||
case 2: f3_shared_ram[(offset/4)] &= ~0x0000ff00; f3_shared_ram[(offset/4)] |= d << 8; break;
|
||||
case 3: f3_shared_ram[(offset/4)] &= ~0x000000ff; f3_shared_ram[(offset/4)] |= d << 0; break;
|
||||
case 0: state->f3_shared_ram[(offset/4)] &= ~0xff000000; state->f3_shared_ram[(offset/4)] |= d << 24; break;
|
||||
case 1: state->f3_shared_ram[(offset/4)] &= ~0x00ff0000; state->f3_shared_ram[(offset/4)] |= d << 16; break;
|
||||
case 2: state->f3_shared_ram[(offset/4)] &= ~0x0000ff00; state->f3_shared_ram[(offset/4)] |= d << 8; break;
|
||||
case 3: state->f3_shared_ram[(offset/4)] &= ~0x000000ff; state->f3_shared_ram[(offset/4)] |= d << 0; break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -811,7 +812,7 @@ static ADDRESS_MAP_START( taitojc_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x06600010, 0x06600013) AM_NOP // unknown
|
||||
AM_RANGE(0x06600040, 0x0660004f) AM_WRITE(jc_control_w)
|
||||
AM_RANGE(0x06800000, 0x06801fff) AM_NOP // unknown
|
||||
AM_RANGE(0x06a00000, 0x06a01fff) AM_READWRITE(f3_share_r, f3_share_w)
|
||||
AM_RANGE(0x06a00000, 0x06a01fff) AM_READWRITE(f3_share_r, f3_share_w) AM_SHARE("f3_shared") AM_BASE_MEMBER(taitojc_state,f3_shared_ram)
|
||||
//AM_RANGE(0x06c00000, 0x06c0ffff) AM_RAM
|
||||
AM_RANGE(0x06e00000, 0x06e0ffff) AM_WRITE(jc_output_w)
|
||||
AM_RANGE(0x08000000, 0x080fffff) AM_RAM AM_BASE_MEMBER(taitojc_state,main_ram)
|
||||
@ -1353,8 +1354,6 @@ static DRIVER_INIT( taitojc )
|
||||
{
|
||||
taitojc_state *state = machine->driver_data<taitojc_state>();
|
||||
|
||||
f3_shared_ram = auto_alloc_array(machine, UINT32, 0x800/4);
|
||||
|
||||
state->polygon_fifo = auto_alloc_array(machine, UINT16, POLYGON_FIFO_SIZE);
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,6 @@ Board contains only 29 ROMs and not much else.
|
||||
#include "video/taitoic.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "sound/es5506.h"
|
||||
#include "includes/taito_f3.h"
|
||||
#include "audio/taito_en.h"
|
||||
#include "includes/undrfire.h"
|
||||
|
||||
@ -472,7 +471,7 @@ static ADDRESS_MAP_START( undrfire_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x400000, 0x400003) AM_WRITE(motor_control_w) /* gun vibration */
|
||||
AM_RANGE(0x500000, 0x500007) AM_READWRITE(undrfire_input_r, undrfire_input_w) /* eerom etc. */
|
||||
AM_RANGE(0x600000, 0x600007) AM_READWRITE(unknown_hardware_r, unknown_int_req_w) /* int request for unknown hardware */
|
||||
AM_RANGE(0x700000, 0x7007ff) AM_RAM AM_BASE(&f3_shared_ram)
|
||||
AM_RANGE(0x700000, 0x7007ff) AM_RAM AM_SHARE("f3_shared")
|
||||
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0480scp", tc0480scp_long_r, tc0480scp_long_w) /* tilemaps */
|
||||
AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE("tc0480scp", tc0480scp_ctrl_long_r, tc0480scp_ctrl_long_w)
|
||||
AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_long_r, tc0100scn_long_w) /* piv tilemaps */
|
||||
@ -491,7 +490,7 @@ static ADDRESS_MAP_START( cbombers_cpua_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x400000, 0x400003) AM_WRITE(cbombers_cpua_ctrl_w)
|
||||
AM_RANGE(0x500000, 0x500007) AM_READWRITE(undrfire_input_r, undrfire_input_w)
|
||||
AM_RANGE(0x600000, 0x600007) AM_READWRITE(cbombers_adc_r, cbombers_adc_w)
|
||||
AM_RANGE(0x700000, 0x7007ff) AM_RAM AM_BASE(&f3_shared_ram)
|
||||
AM_RANGE(0x700000, 0x7007ff) AM_RAM AM_SHARE("f3_shared")
|
||||
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0480scp", tc0480scp_long_r, tc0480scp_long_w) /* tilemaps */
|
||||
AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE("tc0480scp", tc0480scp_ctrl_long_r, tc0480scp_ctrl_long_w)
|
||||
AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_long_r, tc0100scn_long_w) /* piv tilemaps */
|
||||
|
105
src/mame/includes/8080bw.h
Normal file
105
src/mame/includes/8080bw.h
Normal file
@ -0,0 +1,105 @@
|
||||
/***************************************************************************
|
||||
|
||||
8080-based black and white hardware
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "includes/mw8080bw.h"
|
||||
|
||||
/* for games in 8080bw.c */
|
||||
#define CABINET_PORT_TAG "CAB"
|
||||
|
||||
|
||||
class _8080bw_state : public mw8080bw_state
|
||||
{
|
||||
public:
|
||||
_8080bw_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: mw8080bw_state(machine, config) { }
|
||||
|
||||
/* misc game specific */
|
||||
emu_timer *schaser_effect_555_timer;
|
||||
attotime schaser_effect_555_time_remain;
|
||||
INT32 schaser_effect_555_time_remain_savable;
|
||||
int schaser_effect_555_is_low;
|
||||
int schaser_explosion;
|
||||
int schaser_last_effect;
|
||||
UINT8 polaris_cloud_speed;
|
||||
UINT8 polaris_cloud_pos;
|
||||
UINT8 schaser_background_disable;
|
||||
UINT8 schaser_background_select;
|
||||
UINT8 c8080bw_flip_screen;
|
||||
UINT8 color_map;
|
||||
UINT8 screen_red;
|
||||
|
||||
device_t *speaker;
|
||||
};
|
||||
|
||||
|
||||
/*----------- defined in audio/8080bw.c -----------*/
|
||||
|
||||
MACHINE_START( extra_8080bw_sh );
|
||||
|
||||
WRITE8_HANDLER( invadpt2_sh_port_1_w );
|
||||
WRITE8_HANDLER( invadpt2_sh_port_2_w );
|
||||
|
||||
WRITE8_HANDLER( spcewars_sh_port_w );
|
||||
|
||||
WRITE8_HANDLER( lrescue_sh_port_1_w );
|
||||
WRITE8_HANDLER( lrescue_sh_port_2_w );
|
||||
extern const samples_interface lrescue_samples_interface;
|
||||
|
||||
WRITE8_HANDLER( cosmo_sh_port_2_w );
|
||||
|
||||
WRITE8_HANDLER( ballbomb_sh_port_1_w );
|
||||
WRITE8_HANDLER( ballbomb_sh_port_2_w );
|
||||
|
||||
WRITE8_HANDLER( indianbt_sh_port_1_w );
|
||||
WRITE8_HANDLER( indianbt_sh_port_2_w );
|
||||
WRITE8_DEVICE_HANDLER( indianbt_sh_port_3_w );
|
||||
DISCRETE_SOUND_EXTERN( indianbt );
|
||||
|
||||
WRITE8_DEVICE_HANDLER( polaris_sh_port_1_w );
|
||||
WRITE8_DEVICE_HANDLER( polaris_sh_port_2_w );
|
||||
WRITE8_DEVICE_HANDLER( polaris_sh_port_3_w );
|
||||
DISCRETE_SOUND_EXTERN( polaris );
|
||||
|
||||
MACHINE_RESET( schaser_sh );
|
||||
MACHINE_START( schaser_sh );
|
||||
WRITE8_HANDLER( schaser_sh_port_1_w );
|
||||
WRITE8_HANDLER( schaser_sh_port_2_w );
|
||||
extern const sn76477_interface schaser_sn76477_interface;
|
||||
DISCRETE_SOUND_EXTERN( schaser );
|
||||
|
||||
WRITE8_HANDLER( rollingc_sh_port_w );
|
||||
|
||||
WRITE8_HANDLER( invrvnge_sh_port_w );
|
||||
|
||||
WRITE8_HANDLER( lupin3_sh_port_1_w );
|
||||
WRITE8_HANDLER( lupin3_sh_port_2_w );
|
||||
|
||||
WRITE8_HANDLER( schasercv_sh_port_1_w );
|
||||
WRITE8_HANDLER( schasercv_sh_port_2_w );
|
||||
|
||||
WRITE8_HANDLER( yosakdon_sh_port_1_w );
|
||||
WRITE8_HANDLER( yosakdon_sh_port_2_w );
|
||||
|
||||
WRITE8_HANDLER( shuttlei_sh_port_1_w );
|
||||
WRITE8_HANDLER( shuttlei_sh_port_2_w );
|
||||
|
||||
|
||||
/*----------- defined in video/8080bw.c -----------*/
|
||||
|
||||
MACHINE_START( extra_8080bw_vh );
|
||||
|
||||
SCREEN_UPDATE( invadpt2 );
|
||||
SCREEN_UPDATE( ballbomb );
|
||||
SCREEN_UPDATE( schaser );
|
||||
SCREEN_UPDATE( schasercv );
|
||||
SCREEN_UPDATE( rollingc );
|
||||
SCREEN_UPDATE( polaris );
|
||||
SCREEN_UPDATE( lupin3 );
|
||||
SCREEN_UPDATE( cosmo );
|
||||
SCREEN_UPDATE( indianbt );
|
||||
SCREEN_UPDATE( shuttlei );
|
||||
SCREEN_UPDATE( sflush );
|
||||
|
@ -5,6 +5,18 @@
|
||||
*************************************************************************/
|
||||
|
||||
|
||||
#include "machine/atarigen.h"
|
||||
|
||||
class arcadecl_state : public atarigen_state
|
||||
{
|
||||
public:
|
||||
arcadecl_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: atarigen_state(machine, config) { }
|
||||
|
||||
UINT16 * bitmap;
|
||||
UINT8 has_mo;
|
||||
};
|
||||
|
||||
/*----------- defined in video/arcadecl.c -----------*/
|
||||
|
||||
VIDEO_START( arcadecl );
|
||||
|
@ -13,10 +13,6 @@ public:
|
||||
size_t videoram_size;
|
||||
size_t objectram_size;
|
||||
|
||||
/* missb2.c also needs the following */
|
||||
UINT8 * bgvram;
|
||||
UINT8 * bg_paletteram;
|
||||
|
||||
/* video-related */
|
||||
int video_enable;
|
||||
|
||||
|
@ -4,6 +4,17 @@ public:
|
||||
cischeat_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: driver_device(machine, config) { }
|
||||
|
||||
UINT16 *scrollram[3];
|
||||
UINT16 *objectram;
|
||||
UINT16 *vregs;
|
||||
UINT16 *ram;
|
||||
tilemap_t *tmap[3];
|
||||
tilemap_t *tilemap[3][2][4];
|
||||
int scrollx[3], scrolly[3];
|
||||
int active_layers;
|
||||
int bits_per_color_code;
|
||||
int scroll_flag[3];
|
||||
|
||||
UINT16 *rom_1;
|
||||
UINT16 *rom_2;
|
||||
UINT16 *rom_3;
|
||||
@ -31,6 +42,10 @@ READ16_HANDLER( scudhamm_analog_r );
|
||||
|
||||
/*----------- defined in video/cischeat.c -----------*/
|
||||
|
||||
WRITE16_HANDLER( cischeat_scrollram_0_w );
|
||||
WRITE16_HANDLER( cischeat_scrollram_1_w );
|
||||
WRITE16_HANDLER( cischeat_scrollram_2_w );
|
||||
|
||||
READ16_HANDLER( bigrun_vregs_r );
|
||||
READ16_HANDLER( cischeat_vregs_r );
|
||||
READ16_HANDLER( f1gpstar_vregs_r );
|
||||
|
@ -29,7 +29,6 @@ public:
|
||||
UINT8 * cvs_4_bit_dac_data;
|
||||
UINT8 * tms5110_ctl_data;
|
||||
UINT8 * dac3_state;
|
||||
UINT8 * effectram; // quasar
|
||||
|
||||
/* video-related */
|
||||
struct cvs_star stars[CVS_MAX_STARS];
|
||||
@ -40,7 +39,6 @@ public:
|
||||
int total_stars;
|
||||
int stars_on;
|
||||
UINT8 scroll_reg;
|
||||
UINT8 effectcontrol; // quasar
|
||||
int stars_scroll;
|
||||
|
||||
/* misc */
|
||||
@ -51,8 +49,6 @@ public:
|
||||
UINT16 character_ram_page_start;
|
||||
UINT16 speech_rom_bit_address;
|
||||
|
||||
UINT8 page, io_page; // quasar
|
||||
|
||||
/* devices */
|
||||
device_t *maincpu;
|
||||
device_t *audiocpu;
|
||||
@ -71,6 +67,18 @@ public:
|
||||
we can use the same gfx_layout */
|
||||
};
|
||||
|
||||
class quasar_state : public cvs_state
|
||||
{
|
||||
public:
|
||||
quasar_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: cvs_state(machine, config) { }
|
||||
|
||||
UINT8 * effectram;
|
||||
UINT8 effectcontrol;
|
||||
UINT8 page, io_page;
|
||||
};
|
||||
|
||||
|
||||
/*----------- defined in drivers/cvs.c -----------*/
|
||||
|
||||
MACHINE_START( cvs );
|
||||
|
@ -31,4 +31,3 @@ WRITE8_HANDLER( mappy_videoram_w );
|
||||
WRITE8_HANDLER( mappy_scroll_w );
|
||||
READ8_HANDLER( superpac_flipscreen_r );
|
||||
WRITE8_HANDLER( superpac_flipscreen_w );
|
||||
void mappy_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *spriteram, int xoffs, int yoffs, int transcolor);
|
||||
|
@ -43,7 +43,6 @@ extern const gfx_layout mcr_sprite_layout;
|
||||
|
||||
extern UINT32 mcr_cpu_board;
|
||||
extern UINT32 mcr_sprite_board;
|
||||
extern UINT32 mcr_ssio_board;
|
||||
|
||||
MACHINE_START( mcr );
|
||||
MACHINE_RESET( mcr );
|
||||
@ -53,8 +52,6 @@ INTERRUPT_GEN( mcr_interrupt );
|
||||
INTERRUPT_GEN( mcr_ipu_interrupt );
|
||||
|
||||
WRITE8_HANDLER( mcr_control_port_w );
|
||||
WRITE8_HANDLER( mcrmono_control_port_w );
|
||||
WRITE8_HANDLER( mcr_scroll_value_w );
|
||||
|
||||
WRITE8_HANDLER( mcr_ipu_laserdisk_w );
|
||||
READ8_HANDLER( mcr_ipu_watchdog_r );
|
||||
@ -77,25 +74,3 @@ WRITE8_HANDLER( twotiger_videoram_w );
|
||||
WRITE8_HANDLER( mcr_91490_videoram_w );
|
||||
|
||||
SCREEN_UPDATE( mcr );
|
||||
|
||||
|
||||
/*----------- defined in video/mcr3.c -----------*/
|
||||
|
||||
extern UINT8 spyhunt_sprite_color_mask;
|
||||
extern INT16 spyhunt_scrollx, spyhunt_scrolly;
|
||||
extern INT16 spyhunt_scroll_offset;
|
||||
|
||||
extern UINT8 *spyhunt_alpharam;
|
||||
|
||||
WRITE8_HANDLER( mcr3_paletteram_w );
|
||||
WRITE8_HANDLER( mcr3_videoram_w );
|
||||
WRITE8_HANDLER( spyhunt_videoram_w );
|
||||
WRITE8_HANDLER( spyhunt_alpharam_w );
|
||||
|
||||
VIDEO_START( mcrmono );
|
||||
VIDEO_START( spyhunt );
|
||||
|
||||
PALETTE_INIT( spyhunt );
|
||||
|
||||
SCREEN_UPDATE( mcr3 );
|
||||
SCREEN_UPDATE( spyhunt );
|
||||
|
30
src/mame/includes/mcr3.h
Normal file
30
src/mame/includes/mcr3.h
Normal file
@ -0,0 +1,30 @@
|
||||
class mcr3_state : public driver_device
|
||||
{
|
||||
public:
|
||||
mcr3_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: driver_device(machine, config) { }
|
||||
|
||||
UINT8 *videoram;
|
||||
};
|
||||
|
||||
|
||||
/*----------- defined in video/mcr3.c -----------*/
|
||||
|
||||
extern UINT8 spyhunt_sprite_color_mask;
|
||||
extern INT16 spyhunt_scroll_offset;
|
||||
|
||||
extern UINT8 *spyhunt_alpharam;
|
||||
|
||||
WRITE8_HANDLER( mcr3_paletteram_w );
|
||||
WRITE8_HANDLER( mcr3_videoram_w );
|
||||
WRITE8_HANDLER( spyhunt_videoram_w );
|
||||
WRITE8_HANDLER( spyhunt_alpharam_w );
|
||||
WRITE8_HANDLER( spyhunt_scroll_value_w );
|
||||
|
||||
VIDEO_START( mcrmono );
|
||||
VIDEO_START( spyhunt );
|
||||
|
||||
PALETTE_INIT( spyhunt );
|
||||
|
||||
SCREEN_UPDATE( mcr3 );
|
||||
SCREEN_UPDATE( spyhunt );
|
@ -23,16 +23,9 @@
|
||||
/*----------- defined in video/megasys1.c -----------*/
|
||||
|
||||
/* Variables */
|
||||
extern tilemap_t *megasys1_tmap[3];
|
||||
|
||||
extern UINT16 *megasys1_scrollram[3];
|
||||
extern UINT16 *megasys1_objectram, *megasys1_vregs, *megasys1_ram;
|
||||
|
||||
extern int megasys1_scrollx[3], megasys1_scrolly[3];
|
||||
extern int megasys1_active_layers;
|
||||
//extern int megasys1_screen_flag, megasys1_sprite_flag;
|
||||
extern int megasys1_bits_per_color_code;
|
||||
|
||||
|
||||
/* Functions */
|
||||
VIDEO_START( megasys1 );
|
||||
@ -50,12 +43,3 @@ WRITE16_HANDLER( megasys1_vregs_D_w );
|
||||
WRITE16_HANDLER( megasys1_scrollram_0_w );
|
||||
WRITE16_HANDLER( megasys1_scrollram_1_w );
|
||||
WRITE16_HANDLER( megasys1_scrollram_2_w );
|
||||
|
||||
void megasys1_set_vreg_flag(int which, int data);
|
||||
|
||||
|
||||
/*----------- defined in drivers/megasys1.c -----------*/
|
||||
|
||||
void astyanax_rom_decode(running_machine *machine, const char *region);
|
||||
void phantasm_rom_decode(running_machine *machine, const char *region);
|
||||
void rodland_rom_decode (running_machine *machine, const char *region);
|
||||
|
@ -38,6 +38,8 @@ WRITE16_HANDLER( midtunit_sound_w );
|
||||
|
||||
/*----------- defined in video/midtunit.c -----------*/
|
||||
|
||||
extern UINT8 * midtunit_gfx_rom;
|
||||
extern size_t midtunit_gfx_rom_size;
|
||||
extern UINT8 midtunit_gfx_rom_large;
|
||||
|
||||
VIDEO_START( midtunit );
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
class midwxunit_state : public driver_device
|
||||
class midwunit_state : public driver_device
|
||||
{
|
||||
public:
|
||||
midwxunit_state(running_machine &machine, const driver_device_config_base &config)
|
||||
midwunit_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: driver_device(machine, config),
|
||||
m_nvram(*this, "nvram") { }
|
||||
|
||||
@ -20,21 +20,11 @@ extern UINT8 *midwunit_decode_memory;
|
||||
|
||||
WRITE16_HANDLER( midwunit_cmos_enable_w );
|
||||
WRITE16_HANDLER( midwunit_cmos_w );
|
||||
WRITE16_HANDLER( midxunit_cmos_w );
|
||||
READ16_HANDLER( midwunit_cmos_r );
|
||||
|
||||
WRITE16_HANDLER( midwunit_io_w );
|
||||
WRITE16_HANDLER( midxunit_io_w );
|
||||
WRITE16_HANDLER( midxunit_unknown_w );
|
||||
|
||||
READ16_HANDLER( midwunit_io_r );
|
||||
READ16_HANDLER( midxunit_io_r );
|
||||
READ16_HANDLER( midxunit_analog_r );
|
||||
WRITE16_HANDLER( midxunit_analog_select_w );
|
||||
READ16_HANDLER( midxunit_status_r );
|
||||
|
||||
READ16_HANDLER( midxunit_uart_r );
|
||||
WRITE16_HANDLER( midxunit_uart_w );
|
||||
|
||||
DRIVER_INIT( mk3 );
|
||||
DRIVER_INIT( mk3r20 );
|
||||
@ -46,15 +36,11 @@ DRIVER_INIT( openice );
|
||||
DRIVER_INIT( nbahangt );
|
||||
DRIVER_INIT( wwfmania );
|
||||
DRIVER_INIT( rmpgwt );
|
||||
DRIVER_INIT( revx );
|
||||
|
||||
MACHINE_RESET( midwunit );
|
||||
MACHINE_RESET( midxunit );
|
||||
|
||||
READ16_HANDLER( midwunit_security_r );
|
||||
WRITE16_HANDLER( midwunit_security_w );
|
||||
WRITE16_HANDLER( midxunit_security_w );
|
||||
WRITE16_HANDLER( midxunit_security_clock_w );
|
||||
|
||||
READ16_HANDLER( midwunit_sound_r );
|
||||
WRITE16_HANDLER( midwunit_sound_w );
|
||||
|
45
src/mame/includes/midxunit.h
Normal file
45
src/mame/includes/midxunit.h
Normal file
@ -0,0 +1,45 @@
|
||||
/*************************************************************************
|
||||
|
||||
Driver for Midway X-unit games.
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
class midxunit_state : public driver_device
|
||||
{
|
||||
public:
|
||||
midxunit_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: driver_device(machine, config),
|
||||
m_nvram(*this, "nvram") { }
|
||||
|
||||
required_shared_ptr<UINT16> m_nvram;
|
||||
};
|
||||
|
||||
|
||||
/*----------- defined in machine/midxunit.c -----------*/
|
||||
|
||||
extern UINT8 *midxunit_decode_memory;
|
||||
|
||||
READ16_HANDLER( midxunit_cmos_r );
|
||||
WRITE16_HANDLER( midxunit_cmos_w );
|
||||
|
||||
WRITE16_HANDLER( midxunit_io_w );
|
||||
WRITE16_HANDLER( midxunit_unknown_w );
|
||||
|
||||
READ16_HANDLER( midxunit_io_r );
|
||||
READ16_HANDLER( midxunit_analog_r );
|
||||
WRITE16_HANDLER( midxunit_analog_select_w );
|
||||
READ16_HANDLER( midxunit_status_r );
|
||||
|
||||
READ16_HANDLER( midxunit_uart_r );
|
||||
WRITE16_HANDLER( midxunit_uart_w );
|
||||
|
||||
DRIVER_INIT( revx );
|
||||
|
||||
MACHINE_RESET( midxunit );
|
||||
|
||||
READ16_HANDLER( midxunit_security_r );
|
||||
WRITE16_HANDLER( midxunit_security_w );
|
||||
WRITE16_HANDLER( midxunit_security_clock_w );
|
||||
|
||||
READ16_HANDLER( midxunit_sound_r );
|
||||
WRITE16_HANDLER( midxunit_sound_w );
|
@ -49,21 +49,6 @@ public:
|
||||
UINT8 port_3_last_extra;
|
||||
|
||||
/* misc game specific */
|
||||
emu_timer *schaser_effect_555_timer;
|
||||
attotime schaser_effect_555_time_remain;
|
||||
INT32 schaser_effect_555_time_remain_savable;
|
||||
int schaser_effect_555_is_low;
|
||||
int schaser_explosion;
|
||||
int schaser_last_effect;
|
||||
UINT8 polaris_cloud_speed;
|
||||
UINT8 polaris_cloud_pos;
|
||||
UINT8 schaser_background_disable;
|
||||
UINT8 schaser_background_select;
|
||||
UINT8 c8080bw_flip_screen;
|
||||
UINT8 color_map;
|
||||
UINT8 screen_red;
|
||||
|
||||
|
||||
UINT16 phantom2_cloud_counter;
|
||||
UINT8 invaders_flip_screen;
|
||||
UINT8 rev_shift_res;
|
||||
@ -85,7 +70,6 @@ public:
|
||||
device_t *samples;
|
||||
device_t *samples1;
|
||||
device_t *samples2;
|
||||
device_t *speaker;
|
||||
device_t *sn1;
|
||||
device_t *sn2;
|
||||
device_t *sn;
|
||||
@ -93,18 +77,11 @@ public:
|
||||
};
|
||||
|
||||
|
||||
/*----------- defined in drivers/mw8080bw.c -----------*/
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mw8080bw_root );
|
||||
MACHINE_CONFIG_EXTERN( invaders );
|
||||
extern const char layout_invaders[];
|
||||
|
||||
#define SEAWOLF_GUN_PORT_TAG ("GUN")
|
||||
|
||||
#define TORNBASE_CAB_TYPE_UPRIGHT_OLD (0)
|
||||
#define TORNBASE_CAB_TYPE_UPRIGHT_NEW (1)
|
||||
#define TORNBASE_CAB_TYPE_COCKTAIL (2)
|
||||
UINT8 tornbase_get_cabinet_type(running_machine *machine);
|
||||
|
||||
#define DESERTGU_GUN_X_PORT_TAG ("GUNX")
|
||||
#define DESERTGU_GUN_Y_PORT_TAG ("GUNY")
|
||||
@ -113,14 +90,6 @@ UINT8 tornbase_get_cabinet_type(running_machine *machine);
|
||||
#define INVADERS_P1_CONTROL_PORT_TAG ("CONTP1")
|
||||
#define INVADERS_P2_CONTROL_PORT_TAG ("CONTP2")
|
||||
|
||||
/* for games in 8080bw.c */
|
||||
#define CABINET_PORT_TAG "CAB"
|
||||
|
||||
|
||||
CUSTOM_INPUT( invaders_in1_control_r );
|
||||
CUSTOM_INPUT( invaders_in2_control_r );
|
||||
|
||||
int invaders_is_cabinet_cocktail(running_machine *machine);
|
||||
|
||||
#define BLUESHRK_SPEAR_PORT_TAG ("IN0")
|
||||
|
||||
@ -144,6 +113,19 @@ int invaders_is_cabinet_cocktail(running_machine *machine);
|
||||
PORT_CONFSETTING( 0x00, DEF_STR( Upright ) ) \
|
||||
PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
|
||||
|
||||
/*----------- defined in drivers/mw8080bw.c -----------*/
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mw8080bw_root );
|
||||
MACHINE_CONFIG_EXTERN( invaders );
|
||||
extern const char layout_invaders[];
|
||||
|
||||
UINT8 tornbase_get_cabinet_type(running_machine *machine);
|
||||
|
||||
CUSTOM_INPUT( invaders_in1_control_r );
|
||||
CUSTOM_INPUT( invaders_in2_control_r );
|
||||
|
||||
int invaders_is_cabinet_cocktail(running_machine *machine);
|
||||
|
||||
|
||||
/*----------- defined in machine/mw8080bw.c -----------*/
|
||||
|
||||
@ -240,58 +222,6 @@ WRITE8_DEVICE_HANDLER( invad2ct_audio_2_w );
|
||||
WRITE8_DEVICE_HANDLER( invad2ct_audio_3_w );
|
||||
WRITE8_DEVICE_HANDLER( invad2ct_audio_4_w );
|
||||
|
||||
/*----------- defined in audio/8080bw.c -----------*/
|
||||
|
||||
MACHINE_START( extra_8080bw_sh );
|
||||
|
||||
WRITE8_HANDLER( invadpt2_sh_port_1_w );
|
||||
WRITE8_HANDLER( invadpt2_sh_port_2_w );
|
||||
|
||||
WRITE8_HANDLER( spcewars_sh_port_w );
|
||||
|
||||
WRITE8_HANDLER( lrescue_sh_port_1_w );
|
||||
WRITE8_HANDLER( lrescue_sh_port_2_w );
|
||||
extern const samples_interface lrescue_samples_interface;
|
||||
|
||||
WRITE8_HANDLER( cosmo_sh_port_2_w );
|
||||
|
||||
WRITE8_HANDLER( ballbomb_sh_port_1_w );
|
||||
WRITE8_HANDLER( ballbomb_sh_port_2_w );
|
||||
|
||||
WRITE8_HANDLER( indianbt_sh_port_1_w );
|
||||
WRITE8_HANDLER( indianbt_sh_port_2_w );
|
||||
WRITE8_DEVICE_HANDLER( indianbt_sh_port_3_w );
|
||||
DISCRETE_SOUND_EXTERN( indianbt );
|
||||
|
||||
WRITE8_DEVICE_HANDLER( polaris_sh_port_1_w );
|
||||
WRITE8_DEVICE_HANDLER( polaris_sh_port_2_w );
|
||||
WRITE8_DEVICE_HANDLER( polaris_sh_port_3_w );
|
||||
DISCRETE_SOUND_EXTERN( polaris );
|
||||
|
||||
MACHINE_RESET( schaser_sh );
|
||||
MACHINE_START( schaser_sh );
|
||||
WRITE8_HANDLER( schaser_sh_port_1_w );
|
||||
WRITE8_HANDLER( schaser_sh_port_2_w );
|
||||
extern const sn76477_interface schaser_sn76477_interface;
|
||||
DISCRETE_SOUND_EXTERN( schaser );
|
||||
|
||||
WRITE8_HANDLER( rollingc_sh_port_w );
|
||||
|
||||
WRITE8_HANDLER( invrvnge_sh_port_w );
|
||||
|
||||
WRITE8_HANDLER( lupin3_sh_port_1_w );
|
||||
WRITE8_HANDLER( lupin3_sh_port_2_w );
|
||||
|
||||
WRITE8_HANDLER( schasercv_sh_port_1_w );
|
||||
WRITE8_HANDLER( schasercv_sh_port_2_w );
|
||||
|
||||
WRITE8_HANDLER( yosakdon_sh_port_1_w );
|
||||
WRITE8_HANDLER( yosakdon_sh_port_2_w );
|
||||
|
||||
WRITE8_HANDLER( shuttlei_sh_port_1_w );
|
||||
WRITE8_HANDLER( shuttlei_sh_port_2_w );
|
||||
|
||||
|
||||
/*----------- defined in video/mw8080bw.c -----------*/
|
||||
|
||||
SCREEN_UPDATE( mw8080bw );
|
||||
@ -302,21 +232,3 @@ SCREEN_UPDATE( phantom2 );
|
||||
SCREEN_EOF( phantom2 );
|
||||
|
||||
SCREEN_UPDATE( invaders );
|
||||
|
||||
|
||||
/*----------- defined in video/8080bw.c -----------*/
|
||||
|
||||
MACHINE_START( extra_8080bw_vh );
|
||||
|
||||
SCREEN_UPDATE( invadpt2 );
|
||||
SCREEN_UPDATE( ballbomb );
|
||||
SCREEN_UPDATE( schaser );
|
||||
SCREEN_UPDATE( schasercv );
|
||||
SCREEN_UPDATE( rollingc );
|
||||
SCREEN_UPDATE( polaris );
|
||||
SCREEN_UPDATE( lupin3 );
|
||||
SCREEN_UPDATE( cosmo );
|
||||
SCREEN_UPDATE( indianbt );
|
||||
SCREEN_UPDATE( shuttlei );
|
||||
SCREEN_UPDATE( sflush );
|
||||
|
||||
|
@ -12,6 +12,21 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#define NAMCOFL_HTOTAL (288) /* wrong */
|
||||
#define NAMCOFL_HBSTART (288)
|
||||
#define NAMCOFL_VTOTAL (262) /* needs to be checked */
|
||||
#define NAMCOFL_VBSTART (224)
|
||||
|
||||
#define NAMCOFL_TILEMASKREGION "tilemask"
|
||||
#define NAMCOFL_TILEGFXREGION "tile"
|
||||
#define NAMCOFL_SPRITEGFXREGION "sprite"
|
||||
#define NAMCOFL_ROTMASKREGION "rotmask"
|
||||
#define NAMCOFL_ROTGFXREGION "rot"
|
||||
|
||||
#define NAMCOFL_TILEGFX 0
|
||||
#define NAMCOFL_SPRITEGFX 1
|
||||
#define NAMCOFL_ROTGFX 2
|
||||
|
||||
/*----------- defined in video/namcofl.c -----------*/
|
||||
|
||||
VIDEO_START( namcofl );
|
||||
|
@ -1,10 +1,3 @@
|
||||
/*----------- defined in drivers/namconb1.c -----------*/
|
||||
|
||||
extern UINT32 *namconb1_spritebank32;
|
||||
extern UINT32 *namconb1_tilebank32;
|
||||
|
||||
/*----------- defined in video/namconb1.c -----------*/
|
||||
|
||||
#define NAMCONB1_HTOTAL (288) /* wrong */
|
||||
#define NAMCONB1_HBSTART (288)
|
||||
#define NAMCONB1_VTOTAL (262) /* needs to be checked */
|
||||
@ -20,6 +13,13 @@ extern UINT32 *namconb1_tilebank32;
|
||||
#define NAMCONB1_SPRITEGFX 1
|
||||
#define NAMCONB1_ROTGFX 2
|
||||
|
||||
/*----------- defined in drivers/namconb1.c -----------*/
|
||||
|
||||
extern UINT32 *namconb1_spritebank32;
|
||||
extern UINT32 *namconb1_tilebank32;
|
||||
|
||||
/*----------- defined in video/namconb1.c -----------*/
|
||||
|
||||
SCREEN_UPDATE( namconb1 );
|
||||
VIDEO_START( namconb1 );
|
||||
|
||||
|
@ -136,6 +136,7 @@ extern UINT16 *namcos2_68k_roz_ram;
|
||||
|
||||
/*----------- defined in machine/namcos2.c -----------*/
|
||||
|
||||
extern void (*namcos2_kickstart)(running_machine *machine, int internal);
|
||||
extern int namcos2_gametype;
|
||||
|
||||
MACHINE_START( namcos2 );
|
||||
|
@ -15,11 +15,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
/*----------- defined in drivers/namcos21.c -----------*/
|
||||
|
||||
extern void namcos21_kickstart(running_machine *, int);
|
||||
|
||||
|
||||
/*----------- defined in video/namcos21.c -----------*/
|
||||
|
||||
extern void namcos21_ClearPolyFrameBuffer( void );
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include "machine/atarigen.h"
|
||||
|
||||
/* shared with arcadecl hardware */
|
||||
class rampart_state : public atarigen_state
|
||||
{
|
||||
public:
|
||||
@ -22,5 +21,3 @@ public:
|
||||
|
||||
VIDEO_START( rampart );
|
||||
SCREEN_UPDATE( rampart );
|
||||
|
||||
void rampart_bitmap_render(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect);
|
||||
|
@ -51,7 +51,6 @@ public:
|
||||
tilemap_t *tilemap_3; // Layer 1
|
||||
int tilemaps_flip;
|
||||
int samples_bank;
|
||||
int taitox_banknum;
|
||||
int color_mode_shift;
|
||||
int current_tilemap_mode[2];
|
||||
|
||||
|
@ -51,7 +51,6 @@ public:
|
||||
|
||||
/*----------- defined in drivers/taito_f3.c -----------*/
|
||||
|
||||
extern UINT32 *f3_shared_ram;
|
||||
extern int f3_game;
|
||||
|
||||
/*----------- defined in video/taito_f3.c -----------*/
|
||||
|
@ -40,6 +40,7 @@ public:
|
||||
|
||||
poly_manager *poly;
|
||||
|
||||
UINT32 *f3_shared_ram;
|
||||
UINT32 *main_ram;
|
||||
UINT16 *dsp_shared_ram;
|
||||
UINT32 *palette_ram;
|
||||
|
@ -1,7 +1,109 @@
|
||||
#include "emu.h"
|
||||
#include "machine/ms32crpt.h"
|
||||
#include "machine/jalcrpt.h"
|
||||
|
||||
|
||||
void phantasm_rom_decode(running_machine *machine, const char *region)
|
||||
{
|
||||
UINT16 *RAM = (UINT16 *) machine->region(region)->base();
|
||||
int i, size = machine->region(region)->bytes();
|
||||
if (size > 0x40000) size = 0x40000;
|
||||
|
||||
for (i = 0 ; i < size/2 ; i++)
|
||||
{
|
||||
UINT16 x,y;
|
||||
|
||||
x = RAM[i];
|
||||
|
||||
// [0] def0 189a bc56 7234
|
||||
// [1] fdb9 7531 eca8 6420
|
||||
// [2] 0123 4567 ba98 fedc
|
||||
#define BITSWAP_0 BITSWAP16(x,0xd,0xe,0xf,0x0,0x1,0x8,0x9,0xa,0xb,0xc,0x5,0x6,0x7,0x2,0x3,0x4)
|
||||
#define BITSWAP_1 BITSWAP16(x,0xf,0xd,0xb,0x9,0x7,0x5,0x3,0x1,0xe,0xc,0xa,0x8,0x6,0x4,0x2,0x0)
|
||||
#define BITSWAP_2 BITSWAP16(x,0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0xb,0xa,0x9,0x8,0xf,0xe,0xd,0xc)
|
||||
|
||||
if (i < 0x08000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_0;} else {y = BITSWAP_1;} }
|
||||
else if (i < 0x10000/2) { y = BITSWAP_2; }
|
||||
else if (i < 0x18000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_0;} else {y = BITSWAP_1;} }
|
||||
else if (i < 0x20000/2) { y = BITSWAP_1; }
|
||||
else { y = BITSWAP_2; }
|
||||
|
||||
#undef BITSWAP_0
|
||||
#undef BITSWAP_1
|
||||
#undef BITSWAP_2
|
||||
|
||||
RAM[i] = y;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void astyanax_rom_decode(running_machine *machine, const char *region)
|
||||
{
|
||||
UINT16 *RAM = (UINT16 *) machine->region(region)->base();
|
||||
int i, size = machine->region(region)->bytes();
|
||||
if (size > 0x40000) size = 0x40000;
|
||||
|
||||
for (i = 0 ; i < size/2 ; i++)
|
||||
{
|
||||
UINT16 x,y;
|
||||
|
||||
x = RAM[i];
|
||||
|
||||
// [0] def0 a981 65cb 7234
|
||||
// [1] fdb9 7531 8ace 0246
|
||||
// [2] 4567 0123 ba98 fedc
|
||||
|
||||
#define BITSWAP_0 BITSWAP16(x,0xd,0xe,0xf,0x0,0xa,0x9,0x8,0x1,0x6,0x5,0xc,0xb,0x7,0x2,0x3,0x4)
|
||||
#define BITSWAP_1 BITSWAP16(x,0xf,0xd,0xb,0x9,0x7,0x5,0x3,0x1,0x8,0xa,0xc,0xe,0x0,0x2,0x4,0x6)
|
||||
#define BITSWAP_2 BITSWAP16(x,0x4,0x5,0x6,0x7,0x0,0x1,0x2,0x3,0xb,0xa,0x9,0x8,0xf,0xe,0xd,0xc)
|
||||
|
||||
if (i < 0x08000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_0;} else {y = BITSWAP_1;} }
|
||||
else if (i < 0x10000/2) { y = BITSWAP_2; }
|
||||
else if (i < 0x18000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_0;} else {y = BITSWAP_1;} }
|
||||
else if (i < 0x20000/2) { y = BITSWAP_1; }
|
||||
else { y = BITSWAP_2; }
|
||||
|
||||
#undef BITSWAP_0
|
||||
#undef BITSWAP_1
|
||||
#undef BITSWAP_2
|
||||
|
||||
RAM[i] = y;
|
||||
}
|
||||
}
|
||||
|
||||
void rodland_rom_decode(running_machine *machine, const char *region)
|
||||
{
|
||||
UINT16 *RAM = (UINT16 *) machine->region(region)->base();
|
||||
int i, size = machine->region(region)->bytes();
|
||||
if (size > 0x40000) size = 0x40000;
|
||||
|
||||
for (i = 0 ; i < size/2 ; i++)
|
||||
{
|
||||
UINT16 x,y;
|
||||
|
||||
x = RAM[i];
|
||||
|
||||
// [0] d0a9 6ebf 5c72 3814 [1] 4567 0123 ba98 fedc
|
||||
// [2] fdb9 ce07 5318 a246 [3] 4512 ed3b a967 08fc
|
||||
#define BITSWAP_0 BITSWAP16(x,0xd,0x0,0xa,0x9,0x6,0xe,0xb,0xf,0x5,0xc,0x7,0x2,0x3,0x8,0x1,0x4);
|
||||
#define BITSWAP_1 BITSWAP16(x,0x4,0x5,0x6,0x7,0x0,0x1,0x2,0x3,0xb,0xa,0x9,0x8,0xf,0xe,0xd,0xc);
|
||||
#define BITSWAP_2 BITSWAP16(x,0xf,0xd,0xb,0x9,0xc,0xe,0x0,0x7,0x5,0x3,0x1,0x8,0xa,0x2,0x4,0x6);
|
||||
#define BITSWAP_3 BITSWAP16(x,0x4,0x5,0x1,0x2,0xe,0xd,0x3,0xb,0xa,0x9,0x6,0x7,0x0,0x8,0xf,0xc);
|
||||
|
||||
if (i < 0x08000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_0;} else {y = BITSWAP_1;} }
|
||||
else if (i < 0x10000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_2;} else {y = BITSWAP_3;} }
|
||||
else if (i < 0x18000/2) { if ( (i | (0x248/2)) != i ) {y = BITSWAP_0;} else {y = BITSWAP_1;} }
|
||||
else if (i < 0x20000/2) { y = BITSWAP_1; }
|
||||
else { y = BITSWAP_3; }
|
||||
|
||||
#undef BITSWAP_0
|
||||
#undef BITSWAP_1
|
||||
#undef BITSWAP_2
|
||||
#undef BITSWAP_3
|
||||
|
||||
RAM[i] = y;
|
||||
}
|
||||
}
|
||||
|
||||
/********** DECRYPT **********/
|
||||
|
||||
/* 4 known types */
|
@ -1,3 +1,7 @@
|
||||
void astyanax_rom_decode(running_machine *machine, const char *region);
|
||||
void phantasm_rom_decode(running_machine *machine, const char *region);
|
||||
void rodland_rom_decode (running_machine *machine, const char *region);
|
||||
|
||||
void ms32_rearrange_sprites(running_machine *machine, const char *region);
|
||||
void decrypt_ms32_tx(running_machine *machine, int addr_xor,int data_xor, const char *region);
|
||||
void decrypt_ms32_bg(running_machine *machine, int addr_xor,int data_xor, const char *region);
|
@ -23,7 +23,6 @@ UINT8 mcr_cocktail_flip;
|
||||
|
||||
UINT32 mcr_cpu_board;
|
||||
UINT32 mcr_sprite_board;
|
||||
UINT32 mcr_ssio_board;
|
||||
|
||||
|
||||
|
||||
@ -249,48 +248,6 @@ WRITE8_HANDLER( mcr_control_port_w )
|
||||
}
|
||||
|
||||
|
||||
WRITE8_HANDLER( mcrmono_control_port_w )
|
||||
{
|
||||
/*
|
||||
Bit layout is as follows:
|
||||
D7 = n/c
|
||||
D6 = cocktail flip
|
||||
D5 = n/c
|
||||
D4 = n/c
|
||||
D3 = n/c
|
||||
D2 = n/c
|
||||
D1 = n/c
|
||||
D0 = coin meter 1
|
||||
*/
|
||||
|
||||
coin_counter_w(space->machine, 0, (data >> 0) & 1);
|
||||
mcr_cocktail_flip = (data >> 6) & 1;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_HANDLER( mcr_scroll_value_w )
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0:
|
||||
/* low 8 bits of horizontal scroll */
|
||||
spyhunt_scrollx = (spyhunt_scrollx & ~0xff) | data;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
/* upper 3 bits of horizontal scroll and upper 1 bit of vertical scroll */
|
||||
spyhunt_scrollx = (spyhunt_scrollx & 0xff) | ((data & 0x07) << 8);
|
||||
spyhunt_scrolly = (spyhunt_scrolly & 0xff) | ((data & 0x80) << 1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
/* low 8 bits of vertical scroll */
|
||||
spyhunt_scrolly = (spyhunt_scrolly & ~0xff) | data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* NFL Football IPU board
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "audio/williams.h"
|
||||
#include "audio/dcs.h"
|
||||
#include "includes/midyunit.h"
|
||||
#include "includes/midtunit.h"
|
||||
|
||||
|
||||
@ -414,7 +413,7 @@ static READ16_HANDLER( jdredd_hack_r )
|
||||
|
||||
static void init_tunit_generic(running_machine *machine, int sound)
|
||||
{
|
||||
offs_t gfx_chunk = midyunit_gfx_rom_size / 4;
|
||||
offs_t gfx_chunk = midtunit_gfx_rom_size / 4;
|
||||
UINT8 *base;
|
||||
int i;
|
||||
|
||||
@ -423,12 +422,12 @@ static void init_tunit_generic(running_machine *machine, int sound)
|
||||
|
||||
/* load the graphics ROMs -- quadruples */
|
||||
base = machine->region("gfx1")->base();
|
||||
for (i = 0; i < midyunit_gfx_rom_size; i += 4)
|
||||
for (i = 0; i < midtunit_gfx_rom_size; i += 4)
|
||||
{
|
||||
midyunit_gfx_rom[i + 0] = base[0 * gfx_chunk + i / 4];
|
||||
midyunit_gfx_rom[i + 1] = base[1 * gfx_chunk + i / 4];
|
||||
midyunit_gfx_rom[i + 2] = base[2 * gfx_chunk + i / 4];
|
||||
midyunit_gfx_rom[i + 3] = base[3 * gfx_chunk + i / 4];
|
||||
midtunit_gfx_rom[i + 0] = base[0 * gfx_chunk + i / 4];
|
||||
midtunit_gfx_rom[i + 1] = base[1 * gfx_chunk + i / 4];
|
||||
midtunit_gfx_rom[i + 2] = base[2 * gfx_chunk + i / 4];
|
||||
midtunit_gfx_rom[i + 3] = base[3 * gfx_chunk + i / 4];
|
||||
}
|
||||
|
||||
/* load sound ROMs and set up sound handlers */
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "cpu/tms34010/tms34010.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "audio/dcs.h"
|
||||
#include "includes/midyunit.h"
|
||||
#include "includes/midtunit.h"
|
||||
#include "includes/midwunit.h"
|
||||
#include "midwayic.h"
|
||||
|
||||
@ -22,7 +22,6 @@ static UINT8 cmos_write_enable;
|
||||
/* I/O-related variables */
|
||||
static UINT16 iodata[8];
|
||||
static UINT8 ioshuffle[16];
|
||||
static UINT8 midxunit_analog_port;
|
||||
|
||||
/* UART-related variables */
|
||||
static UINT8 uart[8];
|
||||
@ -30,7 +29,6 @@ static UINT8 security_bits;
|
||||
|
||||
/* prototype */
|
||||
static READ16_HANDLER( midwunit_sound_state_r );
|
||||
static void midxunit_dcs_output_full(running_machine *machine, int state);
|
||||
|
||||
|
||||
|
||||
@ -45,7 +43,6 @@ static void register_state_saving(running_machine *machine)
|
||||
state_save_register_global(machine, cmos_write_enable);
|
||||
state_save_register_global_array(machine, iodata);
|
||||
state_save_register_global_array(machine, ioshuffle);
|
||||
state_save_register_global(machine, midxunit_analog_port);
|
||||
state_save_register_global_array(machine, uart);
|
||||
state_save_register_global(machine, security_bits);
|
||||
}
|
||||
@ -68,7 +65,7 @@ WRITE16_HANDLER( midwunit_cmos_w )
|
||||
{
|
||||
if (cmos_write_enable)
|
||||
{
|
||||
midwxunit_state *state = space->machine->driver_data<midwxunit_state>();
|
||||
midwunit_state *state = space->machine->driver_data<midwunit_state>();
|
||||
COMBINE_DATA(state->m_nvram+offset);
|
||||
cmos_write_enable = 0;
|
||||
}
|
||||
@ -80,16 +77,10 @@ WRITE16_HANDLER( midwunit_cmos_w )
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( midxunit_cmos_w )
|
||||
{
|
||||
midwxunit_state *state = space->machine->driver_data<midwxunit_state>();
|
||||
COMBINE_DATA(state->m_nvram+offset);
|
||||
}
|
||||
|
||||
|
||||
READ16_HANDLER( midwunit_cmos_r )
|
||||
{
|
||||
midwxunit_state *state = space->machine->driver_data<midwxunit_state>();
|
||||
midwunit_state *state = space->machine->driver_data<midwunit_state>();
|
||||
return state->m_nvram[offset];
|
||||
}
|
||||
|
||||
@ -136,53 +127,6 @@ WRITE16_HANDLER( midwunit_io_w )
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( midxunit_io_w )
|
||||
{
|
||||
int oldword, newword;
|
||||
|
||||
offset = (offset / 2) % 8;
|
||||
oldword = iodata[offset];
|
||||
newword = oldword;
|
||||
COMBINE_DATA(&newword);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 2:
|
||||
/* watchdog reset */
|
||||
// watchdog_reset_w(0,0);
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Gun Outputs for RevX */
|
||||
/* Note: The Gun for the Coin slot you use is supposed to rumble when you insert coins, and it doesn't for P3 */
|
||||
/* Perhaps an Input is hooked up wrong??? */
|
||||
output_set_value("Player1_Gun_Recoil", data & 0x1 );
|
||||
output_set_value("Player2_Gun_Recoil", (data & 0x2) >> 1 );
|
||||
output_set_value("Player3_Gun_Recoil", (data & 0x4) >> 2 );
|
||||
output_set_value("Player1_Gun_LED", (~data & 0x10) >> 4 );
|
||||
output_set_value("Player2_Gun_LED", (~data & 0x20) >> 5 );
|
||||
output_set_value("Player3_Gun_LED", (~data & 0x40) >> 6 );
|
||||
|
||||
logerror("%08X:I/O write to %d = %04X\n", cpu_get_pc(space->cpu), offset, data);
|
||||
// logerror("%08X:Unknown I/O write to %d = %04X\n", cpu_get_pc(space->cpu), offset, data);
|
||||
break;
|
||||
}
|
||||
iodata[offset] = newword;
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( midxunit_unknown_w )
|
||||
{
|
||||
int offs = offset / 0x40000;
|
||||
|
||||
if (offs == 1 && ACCESSING_BITS_0_7)
|
||||
dcs_reset_w(data & 2);
|
||||
|
||||
if (ACCESSING_BITS_0_7 && offset % 0x40000 == 0)
|
||||
logerror("%08X:midxunit_unknown_w @ %d = %02X\n", cpu_get_pc(space->cpu), offs, data & 0xff);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -216,169 +160,6 @@ READ16_HANDLER( midwunit_io_r )
|
||||
}
|
||||
|
||||
|
||||
READ16_HANDLER( midxunit_io_r )
|
||||
{
|
||||
static const char *const portnames[] = { "IN0", "IN1", "IN2", "DSW" };
|
||||
|
||||
offset = (offset / 2) % 8;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
return input_port_read(space->machine, portnames[offset]);
|
||||
|
||||
default:
|
||||
logerror("%08X:Unknown I/O read from %d\n", cpu_get_pc(space->cpu), offset);
|
||||
break;
|
||||
}
|
||||
return ~0;
|
||||
}
|
||||
|
||||
|
||||
READ16_HANDLER( midxunit_analog_r )
|
||||
{
|
||||
static const char *const portnames[] = { "AN0", "AN1", "AN2", "AN3", "AN4", "AN5" };
|
||||
|
||||
return input_port_read(space->machine, portnames[midxunit_analog_port]);
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( midxunit_analog_select_w )
|
||||
{
|
||||
if (offset == 0 && ACCESSING_BITS_0_7)
|
||||
midxunit_analog_port = data - 8;
|
||||
}
|
||||
|
||||
|
||||
READ16_HANDLER( midxunit_status_r )
|
||||
{
|
||||
/* low bit indicates whether the ADC is done reading the current input */
|
||||
return (midway_serial_pic_status_r() << 1) | 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Revolution X UART
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void midxunit_dcs_output_full(running_machine *machine, int state)
|
||||
{
|
||||
/* only signal if not in loopback state */
|
||||
if (uart[1] != 0x66)
|
||||
cputag_set_input_line(machine, "maincpu", 1, state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
READ16_HANDLER( midxunit_uart_r )
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
/* convert to a byte offset */
|
||||
if (offset & 1)
|
||||
return 0;
|
||||
offset /= 2;
|
||||
|
||||
/* switch off the offset */
|
||||
switch (offset)
|
||||
{
|
||||
case 0: /* register 0 must return 0x13 in order to pass the self test */
|
||||
result = 0x13;
|
||||
break;
|
||||
|
||||
case 1: /* register 1 contains the status */
|
||||
|
||||
/* loopback case: data always ready, and always ok to send */
|
||||
if (uart[1] == 0x66)
|
||||
result |= 5;
|
||||
|
||||
/* non-loopback case: bit 0 means data ready, bit 2 means ok to send */
|
||||
else
|
||||
{
|
||||
int temp = midwunit_sound_state_r(space, 0, 0xffff);
|
||||
result |= (temp & 0x800) >> 9;
|
||||
result |= (~temp & 0x400) >> 10;
|
||||
space->machine->scheduler().synchronize();
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: /* register 3 contains the data read */
|
||||
|
||||
/* loopback case: feed back last data wrtten */
|
||||
if (uart[1] == 0x66)
|
||||
result = uart[3];
|
||||
|
||||
/* non-loopback case: read from the DCS system */
|
||||
else
|
||||
result = midwunit_sound_r(space, 0, 0xffff);
|
||||
break;
|
||||
|
||||
case 5: /* register 5 seems to be like 3, but with in/out swapped */
|
||||
|
||||
/* loopback case: data always ready, and always ok to send */
|
||||
if (uart[1] == 0x66)
|
||||
result |= 5;
|
||||
|
||||
/* non-loopback case: bit 0 means data ready, bit 2 means ok to send */
|
||||
else
|
||||
{
|
||||
int temp = midwunit_sound_state_r(space, 0, 0xffff);
|
||||
result |= (temp & 0x800) >> 11;
|
||||
result |= (~temp & 0x400) >> 8;
|
||||
space->machine->scheduler().synchronize();
|
||||
}
|
||||
break;
|
||||
|
||||
default: /* everyone else reads themselves */
|
||||
result = uart[offset];
|
||||
break;
|
||||
}
|
||||
|
||||
/* logerror("%08X:UART R @ %X = %02X\n", cpu_get_pc(space->cpu), offset, result);*/
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( midxunit_uart_w )
|
||||
{
|
||||
/* convert to a byte offset, ignoring MSB writes */
|
||||
if ((offset & 1) || !ACCESSING_BITS_0_7)
|
||||
return;
|
||||
offset /= 2;
|
||||
data &= 0xff;
|
||||
|
||||
/* switch off the offset */
|
||||
switch (offset)
|
||||
{
|
||||
case 3: /* register 3 contains the data to be sent */
|
||||
|
||||
/* loopback case: don't feed through */
|
||||
if (uart[1] == 0x66)
|
||||
uart[3] = data;
|
||||
|
||||
/* non-loopback case: send to the DCS system */
|
||||
else
|
||||
midwunit_sound_w(space, 0, data, mem_mask);
|
||||
break;
|
||||
|
||||
case 5: /* register 5 write seems to reset things */
|
||||
dcs_data_r();
|
||||
break;
|
||||
|
||||
default: /* everyone else just stores themselves */
|
||||
uart[offset] = data;
|
||||
break;
|
||||
}
|
||||
|
||||
/* logerror("%08X:UART W @ %X = %02X\n", cpu_get_pc(space->cpu), offset, data);*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -395,7 +176,7 @@ static void init_wunit_generic(running_machine *machine)
|
||||
register_state_saving(machine);
|
||||
|
||||
/* load the graphics ROMs -- quadruples */
|
||||
midyunit_gfx_rom = base = machine->region("gfx1")->base();
|
||||
midtunit_gfx_rom = base = machine->region("gfx1")->base();
|
||||
len = machine->region("gfx1")->bytes();
|
||||
for (i = 0; i < len / 0x400000; i++)
|
||||
{
|
||||
@ -590,40 +371,6 @@ DRIVER_INIT( rmpgwt )
|
||||
}
|
||||
|
||||
|
||||
/********************** Revolution X **********************/
|
||||
|
||||
DRIVER_INIT( revx )
|
||||
{
|
||||
UINT8 *base;
|
||||
int i, j, len;
|
||||
|
||||
/* register for state saving */
|
||||
register_state_saving(machine);
|
||||
|
||||
/* load the graphics ROMs -- quadruples */
|
||||
midyunit_gfx_rom = base = machine->region("gfx1")->base();
|
||||
len = machine->region("gfx1")->bytes();
|
||||
for (i = 0; i < len / 0x200000; i++)
|
||||
{
|
||||
memcpy(midwunit_decode_memory, base, 0x200000);
|
||||
for (j = 0; j < 0x80000; j++)
|
||||
{
|
||||
*base++ = midwunit_decode_memory[0x000000 + j];
|
||||
*base++ = midwunit_decode_memory[0x080000 + j];
|
||||
*base++ = midwunit_decode_memory[0x100000 + j];
|
||||
*base++ = midwunit_decode_memory[0x180000 + j];
|
||||
}
|
||||
}
|
||||
|
||||
/* init sound */
|
||||
dcs_init(machine);
|
||||
|
||||
/* serial prefixes 419, 420 */
|
||||
midway_serial_pic_init(machine, 419);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Machine init
|
||||
@ -644,13 +391,6 @@ MACHINE_RESET( midwunit )
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET( midxunit )
|
||||
{
|
||||
MACHINE_RESET_CALL(midwunit);
|
||||
dcs_set_io_callbacks(midxunit_dcs_output_full, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -671,20 +411,6 @@ WRITE16_HANDLER( midwunit_security_w )
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( midxunit_security_w )
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
security_bits = data & 0x0f;
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( midxunit_security_clock_w )
|
||||
{
|
||||
if (offset == 0 && ACCESSING_BITS_0_7)
|
||||
midway_serial_pic_w(space, ((~data & 2) << 3) | security_bits);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
|
424
src/mame/machine/midxunit.c
Normal file
424
src/mame/machine/midxunit.c
Normal file
@ -0,0 +1,424 @@
|
||||
/*************************************************************************
|
||||
|
||||
Driver for Williams/Midway Wolf-unit games.
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/tms34010/tms34010.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "audio/dcs.h"
|
||||
#include "includes/midtunit.h"
|
||||
#include "includes/midxunit.h"
|
||||
#include "midwayic.h"
|
||||
|
||||
|
||||
/* code-related variables */
|
||||
UINT8 * midxunit_decode_memory;
|
||||
|
||||
/* CMOS-related variables */
|
||||
static UINT8 cmos_write_enable;
|
||||
|
||||
/* I/O-related variables */
|
||||
static UINT16 iodata[8];
|
||||
static UINT8 ioshuffle[16];
|
||||
static UINT8 midxunit_analog_port;
|
||||
|
||||
/* UART-related variables */
|
||||
static UINT8 uart[8];
|
||||
static UINT8 security_bits;
|
||||
|
||||
/* prototype */
|
||||
static READ16_HANDLER( midxunit_sound_state_r );
|
||||
static void midxunit_dcs_output_full(running_machine *machine, int state);
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* State saving
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void register_state_saving(running_machine *machine)
|
||||
{
|
||||
state_save_register_global(machine, cmos_write_enable);
|
||||
state_save_register_global_array(machine, iodata);
|
||||
state_save_register_global_array(machine, ioshuffle);
|
||||
state_save_register_global(machine, midxunit_analog_port);
|
||||
state_save_register_global_array(machine, uart);
|
||||
state_save_register_global(machine, security_bits);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* CMOS reads/writes
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ16_HANDLER( midxunit_cmos_r )
|
||||
{
|
||||
midxunit_state *state = space->machine->driver_data<midxunit_state>();
|
||||
return state->m_nvram[offset];
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( midxunit_cmos_w )
|
||||
{
|
||||
midxunit_state *state = space->machine->driver_data<midxunit_state>();
|
||||
COMBINE_DATA(state->m_nvram+offset);
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* General I/O writes
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE16_HANDLER( midxunit_io_w )
|
||||
{
|
||||
int oldword, newword;
|
||||
|
||||
offset = (offset / 2) % 8;
|
||||
oldword = iodata[offset];
|
||||
newword = oldword;
|
||||
COMBINE_DATA(&newword);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 2:
|
||||
/* watchdog reset */
|
||||
// watchdog_reset_w(0,0);
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Gun Outputs for RevX */
|
||||
/* Note: The Gun for the Coin slot you use is supposed to rumble when you insert coins, and it doesn't for P3 */
|
||||
/* Perhaps an Input is hooked up wrong??? */
|
||||
output_set_value("Player1_Gun_Recoil", data & 0x1 );
|
||||
output_set_value("Player2_Gun_Recoil", (data & 0x2) >> 1 );
|
||||
output_set_value("Player3_Gun_Recoil", (data & 0x4) >> 2 );
|
||||
output_set_value("Player1_Gun_LED", (~data & 0x10) >> 4 );
|
||||
output_set_value("Player2_Gun_LED", (~data & 0x20) >> 5 );
|
||||
output_set_value("Player3_Gun_LED", (~data & 0x40) >> 6 );
|
||||
|
||||
logerror("%08X:I/O write to %d = %04X\n", cpu_get_pc(space->cpu), offset, data);
|
||||
// logerror("%08X:Unknown I/O write to %d = %04X\n", cpu_get_pc(space->cpu), offset, data);
|
||||
break;
|
||||
}
|
||||
iodata[offset] = newword;
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( midxunit_unknown_w )
|
||||
{
|
||||
int offs = offset / 0x40000;
|
||||
|
||||
if (offs == 1 && ACCESSING_BITS_0_7)
|
||||
dcs_reset_w(data & 2);
|
||||
|
||||
if (ACCESSING_BITS_0_7 && offset % 0x40000 == 0)
|
||||
logerror("%08X:midxunit_unknown_w @ %d = %02X\n", cpu_get_pc(space->cpu), offs, data & 0xff);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* General I/O reads
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ16_HANDLER( midxunit_io_r )
|
||||
{
|
||||
static const char *const portnames[] = { "IN0", "IN1", "IN2", "DSW" };
|
||||
|
||||
offset = (offset / 2) % 8;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
return input_port_read(space->machine, portnames[offset]);
|
||||
|
||||
default:
|
||||
logerror("%08X:Unknown I/O read from %d\n", cpu_get_pc(space->cpu), offset);
|
||||
break;
|
||||
}
|
||||
return ~0;
|
||||
}
|
||||
|
||||
|
||||
READ16_HANDLER( midxunit_analog_r )
|
||||
{
|
||||
static const char *const portnames[] = { "AN0", "AN1", "AN2", "AN3", "AN4", "AN5" };
|
||||
|
||||
return input_port_read(space->machine, portnames[midxunit_analog_port]);
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( midxunit_analog_select_w )
|
||||
{
|
||||
if (offset == 0 && ACCESSING_BITS_0_7)
|
||||
midxunit_analog_port = data - 8;
|
||||
}
|
||||
|
||||
|
||||
READ16_HANDLER( midxunit_status_r )
|
||||
{
|
||||
/* low bit indicates whether the ADC is done reading the current input */
|
||||
return (midway_serial_pic_status_r() << 1) | 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Revolution X UART
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void midxunit_dcs_output_full(running_machine *machine, int state)
|
||||
{
|
||||
/* only signal if not in loopback state */
|
||||
if (uart[1] != 0x66)
|
||||
cputag_set_input_line(machine, "maincpu", 1, state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
READ16_HANDLER( midxunit_uart_r )
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
/* convert to a byte offset */
|
||||
if (offset & 1)
|
||||
return 0;
|
||||
offset /= 2;
|
||||
|
||||
/* switch off the offset */
|
||||
switch (offset)
|
||||
{
|
||||
case 0: /* register 0 must return 0x13 in order to pass the self test */
|
||||
result = 0x13;
|
||||
break;
|
||||
|
||||
case 1: /* register 1 contains the status */
|
||||
|
||||
/* loopback case: data always ready, and always ok to send */
|
||||
if (uart[1] == 0x66)
|
||||
result |= 5;
|
||||
|
||||
/* non-loopback case: bit 0 means data ready, bit 2 means ok to send */
|
||||
else
|
||||
{
|
||||
int temp = midxunit_sound_state_r(space, 0, 0xffff);
|
||||
result |= (temp & 0x800) >> 9;
|
||||
result |= (~temp & 0x400) >> 10;
|
||||
space->machine->scheduler().synchronize();
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: /* register 3 contains the data read */
|
||||
|
||||
/* loopback case: feed back last data wrtten */
|
||||
if (uart[1] == 0x66)
|
||||
result = uart[3];
|
||||
|
||||
/* non-loopback case: read from the DCS system */
|
||||
else
|
||||
result = midxunit_sound_r(space, 0, 0xffff);
|
||||
break;
|
||||
|
||||
case 5: /* register 5 seems to be like 3, but with in/out swapped */
|
||||
|
||||
/* loopback case: data always ready, and always ok to send */
|
||||
if (uart[1] == 0x66)
|
||||
result |= 5;
|
||||
|
||||
/* non-loopback case: bit 0 means data ready, bit 2 means ok to send */
|
||||
else
|
||||
{
|
||||
int temp = midxunit_sound_state_r(space, 0, 0xffff);
|
||||
result |= (temp & 0x800) >> 11;
|
||||
result |= (~temp & 0x400) >> 8;
|
||||
space->machine->scheduler().synchronize();
|
||||
}
|
||||
break;
|
||||
|
||||
default: /* everyone else reads themselves */
|
||||
result = uart[offset];
|
||||
break;
|
||||
}
|
||||
|
||||
/* logerror("%08X:UART R @ %X = %02X\n", cpu_get_pc(space->cpu), offset, result);*/
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( midxunit_uart_w )
|
||||
{
|
||||
/* convert to a byte offset, ignoring MSB writes */
|
||||
if ((offset & 1) || !ACCESSING_BITS_0_7)
|
||||
return;
|
||||
offset /= 2;
|
||||
data &= 0xff;
|
||||
|
||||
/* switch off the offset */
|
||||
switch (offset)
|
||||
{
|
||||
case 3: /* register 3 contains the data to be sent */
|
||||
|
||||
/* loopback case: don't feed through */
|
||||
if (uart[1] == 0x66)
|
||||
uart[3] = data;
|
||||
|
||||
/* non-loopback case: send to the DCS system */
|
||||
else
|
||||
midxunit_sound_w(space, 0, data, mem_mask);
|
||||
break;
|
||||
|
||||
case 5: /* register 5 write seems to reset things */
|
||||
dcs_data_r();
|
||||
break;
|
||||
|
||||
default: /* everyone else just stores themselves */
|
||||
uart[offset] = data;
|
||||
break;
|
||||
}
|
||||
|
||||
/* logerror("%08X:UART W @ %X = %02X\n", cpu_get_pc(space->cpu), offset, data);*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* X-unit init (DCS)
|
||||
*
|
||||
* music: ADSP2101
|
||||
*
|
||||
*************************************/
|
||||
|
||||
/********************** Revolution X **********************/
|
||||
|
||||
DRIVER_INIT( revx )
|
||||
{
|
||||
UINT8 *base;
|
||||
int i, j, len;
|
||||
|
||||
/* register for state saving */
|
||||
register_state_saving(machine);
|
||||
|
||||
/* load the graphics ROMs -- quadruples */
|
||||
midtunit_gfx_rom = base = machine->region("gfx1")->base();
|
||||
len = machine->region("gfx1")->bytes();
|
||||
for (i = 0; i < len / 0x200000; i++)
|
||||
{
|
||||
memcpy(midxunit_decode_memory, base, 0x200000);
|
||||
for (j = 0; j < 0x80000; j++)
|
||||
{
|
||||
*base++ = midxunit_decode_memory[0x000000 + j];
|
||||
*base++ = midxunit_decode_memory[0x080000 + j];
|
||||
*base++ = midxunit_decode_memory[0x100000 + j];
|
||||
*base++ = midxunit_decode_memory[0x180000 + j];
|
||||
}
|
||||
}
|
||||
|
||||
/* init sound */
|
||||
dcs_init(machine);
|
||||
|
||||
/* serial prefixes 419, 420 */
|
||||
midway_serial_pic_init(machine, 419);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Machine init
|
||||
*
|
||||
*************************************/
|
||||
|
||||
MACHINE_RESET( midxunit )
|
||||
{
|
||||
int i;
|
||||
|
||||
/* reset sound */
|
||||
dcs_reset_w(1);
|
||||
dcs_reset_w(0);
|
||||
|
||||
/* reset I/O shuffling */
|
||||
for (i = 0; i < 16; i++)
|
||||
ioshuffle[i] = i % 8;
|
||||
|
||||
dcs_set_io_callbacks(midxunit_dcs_output_full, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Security chip I/O
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ16_HANDLER( midxunit_security_r )
|
||||
{
|
||||
return midway_serial_pic_r(space);
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( midxunit_security_w )
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
security_bits = data & 0x0f;
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( midxunit_security_clock_w )
|
||||
{
|
||||
if (offset == 0 && ACCESSING_BITS_0_7)
|
||||
midway_serial_pic_w(space, ((~data & 2) << 3) | security_bits);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Sound write handlers
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ16_HANDLER( midxunit_sound_r )
|
||||
{
|
||||
logerror("%08X:Sound read\n", cpu_get_pc(space->cpu));
|
||||
|
||||
return dcs_data_r() & 0xff;
|
||||
}
|
||||
|
||||
|
||||
READ16_HANDLER( midxunit_sound_state_r )
|
||||
{
|
||||
return dcs_control_r();
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( midxunit_sound_w )
|
||||
{
|
||||
/* check for out-of-bounds accesses */
|
||||
if (offset)
|
||||
{
|
||||
logerror("%08X:Unexpected write to sound (hi) = %04X\n", cpu_get_pc(space->cpu), data);
|
||||
return;
|
||||
}
|
||||
|
||||
/* call through based on the sound type */
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
logerror("%08X:Sound write = %04X\n", cpu_get_pc(space->cpu), data);
|
||||
dcs_data_w(data & 0xff);
|
||||
}
|
||||
}
|
@ -108,7 +108,6 @@ MACHINE_START( mw8080bw )
|
||||
state->sn1 = machine->device("sn1");
|
||||
state->sn2 = machine->device("sn2");
|
||||
state->discrete = machine->device("discrete");
|
||||
state->speaker = machine->device("speaker");
|
||||
state->mb14241 = machine->device("mb14241");
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@ Namco System II
|
||||
#include "emu.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "cpu/m6805/m6805.h"
|
||||
#include "includes/namcos21.h"
|
||||
#include "includes/namcos2.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
@ -21,6 +20,7 @@ static void InitC148(void);
|
||||
|
||||
static emu_timer *namcos2_posirq_timer;
|
||||
|
||||
void (*namcos2_kickstart)(running_machine *machine, int internal);
|
||||
int namcos2_gametype;
|
||||
|
||||
static unsigned mFinalLapProtCount;
|
||||
@ -105,6 +105,7 @@ ResetAllSubCPUs( running_machine *machine, int state )
|
||||
|
||||
MACHINE_START( namcos2 )
|
||||
{
|
||||
namcos2_kickstart = NULL;
|
||||
namcos2_eeprom = auto_alloc_array(machine, UINT8, namcos2_eeprom_size);
|
||||
machine->device<nvram_device>("nvram")->set_base(namcos2_eeprom, namcos2_eeprom_size);
|
||||
namcos2_posirq_timer = machine->scheduler().timer_alloc(FUNC(namcos2_posirq_tick));
|
||||
@ -576,12 +577,12 @@ ReadWriteC148( address_space *space, offs_t offset, UINT16 data, int bWrite )
|
||||
/* Suspend execution */
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
}
|
||||
if (IsSystem21())
|
||||
if (namcos2_kickstart != NULL)
|
||||
{
|
||||
//printf( "dspkick=0x%x\n", data );
|
||||
if (data & 0x04)
|
||||
{
|
||||
namcos21_kickstart(space->machine, 1);
|
||||
(*namcos2_kickstart)(space->machine, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -756,7 +756,7 @@ $(MAMEOBJ)/jaleco.a: \
|
||||
$(DRIVERS)/skyfox.o $(VIDEO)/skyfox.o \
|
||||
$(DRIVERS)/stepstag.o \
|
||||
$(DRIVERS)/tetrisp2.o $(VIDEO)/tetrisp2.o \
|
||||
$(MACHINE)/ms32crpt.o \
|
||||
$(MACHINE)/jalcrpt.o \
|
||||
$(VIDEO)/jalblend.o \
|
||||
|
||||
$(MAMEOBJ)/jpm.a: \
|
||||
@ -911,7 +911,7 @@ $(MAMEOBJ)/midway.a: \
|
||||
$(DRIVERS)/midtunit.o $(MACHINE)/midtunit.o $(VIDEO)/midtunit.o \
|
||||
$(DRIVERS)/midvunit.o $(VIDEO)/midvunit.o \
|
||||
$(DRIVERS)/midwunit.o $(MACHINE)/midwunit.o \
|
||||
$(DRIVERS)/midxunit.o \
|
||||
$(DRIVERS)/midxunit.o $(MACHINE)/midxunit.o \
|
||||
$(DRIVERS)/midyunit.o $(MACHINE)/midyunit.o $(VIDEO)/midyunit.o \
|
||||
$(DRIVERS)/midzeus.o $(VIDEO)/midzeus.o $(VIDEO)/midzeus2.o \
|
||||
$(DRIVERS)/omegrace.o \
|
||||
|
@ -7,7 +7,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mw8080bw.h"
|
||||
#include "includes/8080bw.h"
|
||||
|
||||
|
||||
#define NUM_PENS (8)
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
MACHINE_START( extra_8080bw_vh )
|
||||
{
|
||||
mw8080bw_state *state = machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = machine->driver_data<_8080bw_state>();
|
||||
|
||||
state->save_item(NAME(state->c8080bw_flip_screen));
|
||||
state->save_item(NAME(state->color_map));
|
||||
@ -65,7 +65,7 @@ static void cosmo_get_pens( pen_t *pens )
|
||||
|
||||
INLINE void set_pixel( running_machine *machine, bitmap_t *bitmap, UINT8 y, UINT8 x, pen_t *pens, UINT8 color )
|
||||
{
|
||||
mw8080bw_state *state = machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = machine->driver_data<_8080bw_state>();
|
||||
|
||||
if (y >= MW8080BW_VCOUNTER_START_NO_VBLANK)
|
||||
{
|
||||
@ -94,7 +94,7 @@ INLINE void set_8_pixels( running_machine *machine, bitmap_t *bitmap, UINT8 y, U
|
||||
/* this is needed as this driver doesn't emulate the shift register like mw8080bw does */
|
||||
static void clear_extra_columns( running_machine *machine, bitmap_t *bitmap, pen_t *pens, UINT8 color )
|
||||
{
|
||||
mw8080bw_state *state = machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = machine->driver_data<_8080bw_state>();
|
||||
UINT8 x;
|
||||
|
||||
for (x = 0; x < 4; x++)
|
||||
@ -114,7 +114,7 @@ static void clear_extra_columns( running_machine *machine, bitmap_t *bitmap, pen
|
||||
|
||||
SCREEN_UPDATE( invadpt2 )
|
||||
{
|
||||
mw8080bw_state *state = screen->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = screen->machine->driver_data<_8080bw_state>();
|
||||
pen_t pens[NUM_PENS];
|
||||
offs_t offs;
|
||||
UINT8 *prom;
|
||||
@ -146,7 +146,7 @@ SCREEN_UPDATE( invadpt2 )
|
||||
|
||||
SCREEN_UPDATE( ballbomb )
|
||||
{
|
||||
mw8080bw_state *state = screen->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = screen->machine->driver_data<_8080bw_state>();
|
||||
pen_t pens[NUM_PENS];
|
||||
offs_t offs;
|
||||
UINT8 *color_map_base;
|
||||
@ -179,7 +179,7 @@ SCREEN_UPDATE( ballbomb )
|
||||
|
||||
SCREEN_UPDATE( schaser )
|
||||
{
|
||||
mw8080bw_state *state = screen->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = screen->machine->driver_data<_8080bw_state>();
|
||||
pen_t pens[NUM_PENS];
|
||||
offs_t offs;
|
||||
UINT8 *background_map_base;
|
||||
@ -220,7 +220,7 @@ SCREEN_UPDATE( schaser )
|
||||
|
||||
SCREEN_UPDATE( schasercv )
|
||||
{
|
||||
mw8080bw_state *state = screen->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = screen->machine->driver_data<_8080bw_state>();
|
||||
pen_t pens[NUM_PENS];
|
||||
offs_t offs;
|
||||
|
||||
@ -246,7 +246,7 @@ SCREEN_UPDATE( schasercv )
|
||||
|
||||
SCREEN_UPDATE( rollingc )
|
||||
{
|
||||
mw8080bw_state *state = screen->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = screen->machine->driver_data<_8080bw_state>();
|
||||
pen_t pens[NUM_PENS];
|
||||
offs_t offs;
|
||||
|
||||
@ -271,7 +271,7 @@ SCREEN_UPDATE( rollingc )
|
||||
|
||||
SCREEN_UPDATE( polaris )
|
||||
{
|
||||
mw8080bw_state *state = screen->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = screen->machine->driver_data<_8080bw_state>();
|
||||
pen_t pens[NUM_PENS];
|
||||
offs_t offs;
|
||||
UINT8 *color_map_base;
|
||||
@ -343,7 +343,7 @@ SCREEN_UPDATE( polaris )
|
||||
|
||||
SCREEN_UPDATE( lupin3 )
|
||||
{
|
||||
mw8080bw_state *state = screen->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = screen->machine->driver_data<_8080bw_state>();
|
||||
pen_t pens[NUM_PENS];
|
||||
offs_t offs;
|
||||
|
||||
@ -368,7 +368,7 @@ SCREEN_UPDATE( lupin3 )
|
||||
|
||||
SCREEN_UPDATE( cosmo )
|
||||
{
|
||||
mw8080bw_state *state = screen->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = screen->machine->driver_data<_8080bw_state>();
|
||||
pen_t pens[NUM_PENS];
|
||||
offs_t offs;
|
||||
|
||||
@ -395,7 +395,7 @@ SCREEN_UPDATE( cosmo )
|
||||
|
||||
SCREEN_UPDATE( indianbt )
|
||||
{
|
||||
mw8080bw_state *state = screen->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = screen->machine->driver_data<_8080bw_state>();
|
||||
pen_t pens[NUM_PENS];
|
||||
offs_t offs;
|
||||
UINT8 *color_map_base;
|
||||
@ -427,7 +427,7 @@ SCREEN_UPDATE( indianbt )
|
||||
|
||||
SCREEN_UPDATE( shuttlei )
|
||||
{
|
||||
mw8080bw_state *state = screen->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = screen->machine->driver_data<_8080bw_state>();
|
||||
pen_t pens[2] = { RGB_BLACK, RGB_WHITE };
|
||||
offs_t offs;
|
||||
|
||||
@ -458,7 +458,7 @@ SCREEN_UPDATE( shuttlei )
|
||||
|
||||
SCREEN_UPDATE( sflush )
|
||||
{
|
||||
mw8080bw_state *state = screen->machine->driver_data<mw8080bw_state>();
|
||||
_8080bw_state *state = screen->machine->driver_data<_8080bw_state>();
|
||||
pen_t pens[NUM_PENS];
|
||||
offs_t offs;
|
||||
|
||||
|
@ -9,10 +9,10 @@
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/rampart.h"
|
||||
#include "includes/arcadecl.h"
|
||||
|
||||
|
||||
static void arcadecl_bitmap_render(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect);
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -58,7 +58,7 @@ VIDEO_START( arcadecl )
|
||||
0, /* resulting value to indicate "special" */
|
||||
0, /* callback routine for special entries */
|
||||
};
|
||||
rampart_state *state = machine->driver_data<rampart_state>();
|
||||
arcadecl_state *state = machine->driver_data<arcadecl_state>();
|
||||
|
||||
/* initialize the motion objects */
|
||||
atarimo_init(machine, 0, &modesc);
|
||||
@ -79,10 +79,10 @@ VIDEO_START( arcadecl )
|
||||
|
||||
SCREEN_UPDATE( arcadecl )
|
||||
{
|
||||
rampart_state *state = screen->machine->driver_data<rampart_state>();
|
||||
arcadecl_state *state = screen->machine->driver_data<arcadecl_state>();
|
||||
|
||||
/* draw the playfield */
|
||||
rampart_bitmap_render(screen->machine, bitmap, cliprect);
|
||||
arcadecl_bitmap_render(screen->machine, bitmap, cliprect);
|
||||
|
||||
/* draw and merge the MO */
|
||||
if (state->has_mo)
|
||||
@ -111,3 +111,32 @@ SCREEN_UPDATE( arcadecl )
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Bitmap rendering
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void arcadecl_bitmap_render(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
arcadecl_state *state = machine->driver_data<arcadecl_state>();
|
||||
int x, y;
|
||||
|
||||
/* update any dirty scanlines */
|
||||
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
|
||||
{
|
||||
const UINT16 *src = &state->bitmap[256 * y];
|
||||
UINT16 *dst = BITMAP_ADDR16(bitmap, y, 0);
|
||||
|
||||
/* regenerate the line */
|
||||
for (x = cliprect->min_x & ~1; x <= cliprect->max_x; x += 2)
|
||||
{
|
||||
int bits = src[(x - 8) / 2];
|
||||
dst[x + 0] = bits >> 8;
|
||||
dst[x + 1] = bits & 0xff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,6 @@ Note: if MAME_DEBUG is defined, pressing Z or X with:
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/megasys1.h"
|
||||
#include "includes/cischeat.h"
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
@ -86,20 +85,20 @@ Note: if MAME_DEBUG is defined, pressing Z or X with:
|
||||
|
||||
#endif
|
||||
|
||||
#define MEGASYS1_VREG_SCROLL(_n_, _dir_) megasys1_scroll##_dir_[_n_] = new_data;
|
||||
#define CISCHEAT_VREG_SCROLL(_n_, _dir_) state->scroll##_dir_[_n_] = new_data
|
||||
|
||||
|
||||
#define cischeat_tmap_SET_SCROLL(_n_) \
|
||||
if (megasys1_tmap[_n_]) \
|
||||
if (state->tmap[_n_]) \
|
||||
{ \
|
||||
tilemap_set_scrollx(megasys1_tmap[_n_], 0, megasys1_scrollx[_n_]); \
|
||||
tilemap_set_scrolly(megasys1_tmap[_n_], 0, megasys1_scrolly[_n_]); \
|
||||
tilemap_set_scrollx(state->tmap[_n_], 0, state->scrollx[_n_]); \
|
||||
tilemap_set_scrolly(state->tmap[_n_], 0, state->scrolly[_n_]); \
|
||||
}
|
||||
|
||||
#define cischeat_tmap_DRAW(_n_) \
|
||||
if ( (megasys1_tmap[_n_]) && (megasys1_active_layers & (1 << _n_) ) ) \
|
||||
if ( (state->tmap[_n_]) && (state->active_layers & (1 << _n_) ) ) \
|
||||
{ \
|
||||
tilemap_draw(bitmap, cliprect, megasys1_tmap[_n_], flag, 0 ); \
|
||||
tilemap_draw(bitmap, cliprect, state->tmap[_n_], flag, 0 ); \
|
||||
flag = 0; \
|
||||
}
|
||||
|
||||
@ -126,14 +125,133 @@ static void prepare_shadows(cischeat_state *state)
|
||||
Cisco Heat
|
||||
**************************************************************************/
|
||||
|
||||
#define TILES_PER_PAGE_X (0x20)
|
||||
#define TILES_PER_PAGE_Y (0x20)
|
||||
#define TILES_PER_PAGE (TILES_PER_PAGE_X * TILES_PER_PAGE_Y)
|
||||
|
||||
INLINE void scrollram_w(address_space *space, offs_t offset, UINT16 data, UINT16 mem_mask, int which)
|
||||
{
|
||||
cischeat_state *state = space->machine->driver_data<cischeat_state>();
|
||||
COMBINE_DATA(&state->scrollram[which][offset]);
|
||||
if (offset < 0x40000/2 && state->tmap[which])
|
||||
{
|
||||
if (state->scroll_flag[which] & 0x10) /* tiles are 8x8 */
|
||||
{
|
||||
tilemap_mark_tile_dirty(state->tmap[which], offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
tilemap_mark_tile_dirty(state->tmap[which], offset*4 + 0);
|
||||
tilemap_mark_tile_dirty(state->tmap[which], offset*4 + 1);
|
||||
tilemap_mark_tile_dirty(state->tmap[which], offset*4 + 2);
|
||||
tilemap_mark_tile_dirty(state->tmap[which], offset*4 + 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( cischeat_scrollram_0_w ) { scrollram_w(space, offset, data, mem_mask, 0); }
|
||||
WRITE16_HANDLER( cischeat_scrollram_1_w ) { scrollram_w(space, offset, data, mem_mask, 1); }
|
||||
WRITE16_HANDLER( cischeat_scrollram_2_w ) { scrollram_w(space, offset, data, mem_mask, 2); }
|
||||
|
||||
static TILEMAP_MAPPER( cischeat_scan_8x8 )
|
||||
{
|
||||
return (col * TILES_PER_PAGE_Y) +
|
||||
(row / TILES_PER_PAGE_Y) * TILES_PER_PAGE * (num_cols / TILES_PER_PAGE_X) +
|
||||
(row % TILES_PER_PAGE_Y);
|
||||
}
|
||||
|
||||
static TILEMAP_MAPPER( cischeat_scan_16x16 )
|
||||
{
|
||||
return ( ((col / 2) * (TILES_PER_PAGE_Y / 2)) +
|
||||
((row / 2) / (TILES_PER_PAGE_Y / 2)) * (TILES_PER_PAGE / 4) * (num_cols / TILES_PER_PAGE_X) +
|
||||
((row / 2) % (TILES_PER_PAGE_Y / 2)) )*4 + (row&1) + (col&1)*2;
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( cischeat_get_scroll_tile_info_8x8 )
|
||||
{
|
||||
cischeat_state *state = machine->driver_data<cischeat_state>();
|
||||
int tmap = (FPTR)param;
|
||||
UINT16 code = state->scrollram[tmap][tile_index];
|
||||
SET_TILE_INFO(tmap, (code & 0xfff), code >> (16 - state->bits_per_color_code), 0);
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( cischeat_get_scroll_tile_info_16x16 )
|
||||
{
|
||||
cischeat_state *state = machine->driver_data<cischeat_state>();
|
||||
int tmap = (FPTR)param;
|
||||
UINT16 code = state->scrollram[tmap][tile_index/4];
|
||||
SET_TILE_INFO(tmap, (code & 0xfff) * 4 + (tile_index & 3), code >> (16 - state->bits_per_color_code), 0);
|
||||
}
|
||||
|
||||
static void create_tilemaps(running_machine *machine)
|
||||
{
|
||||
cischeat_state *state = machine->driver_data<cischeat_state>();
|
||||
int layer, i;
|
||||
|
||||
for (layer = 0; layer < 3; layer++)
|
||||
{
|
||||
/* 16x16 tilemaps */
|
||||
state->tilemap[layer][0][0] = tilemap_create(machine, cischeat_get_scroll_tile_info_16x16, cischeat_scan_16x16,
|
||||
8,8, TILES_PER_PAGE_X * 16, TILES_PER_PAGE_Y * 2);
|
||||
state->tilemap[layer][0][1] = tilemap_create(machine, cischeat_get_scroll_tile_info_16x16, cischeat_scan_16x16,
|
||||
8,8, TILES_PER_PAGE_X * 8, TILES_PER_PAGE_Y * 4);
|
||||
state->tilemap[layer][0][2] = tilemap_create(machine, cischeat_get_scroll_tile_info_16x16, cischeat_scan_16x16,
|
||||
8,8, TILES_PER_PAGE_X * 4, TILES_PER_PAGE_Y * 8);
|
||||
state->tilemap[layer][0][3] = tilemap_create(machine, cischeat_get_scroll_tile_info_16x16, cischeat_scan_16x16,
|
||||
8,8, TILES_PER_PAGE_X * 2, TILES_PER_PAGE_Y * 16);
|
||||
|
||||
/* 8x8 tilemaps */
|
||||
state->tilemap[layer][1][0] = tilemap_create(machine, cischeat_get_scroll_tile_info_8x8, cischeat_scan_8x8,
|
||||
8,8, TILES_PER_PAGE_X * 8, TILES_PER_PAGE_Y * 1);
|
||||
state->tilemap[layer][1][1] = tilemap_create(machine, cischeat_get_scroll_tile_info_8x8, cischeat_scan_8x8,
|
||||
8,8, TILES_PER_PAGE_X * 4, TILES_PER_PAGE_Y * 2);
|
||||
state->tilemap[layer][1][2] = tilemap_create(machine, cischeat_get_scroll_tile_info_8x8, cischeat_scan_8x8,
|
||||
8,8, TILES_PER_PAGE_X * 4, TILES_PER_PAGE_Y * 2);
|
||||
state->tilemap[layer][1][3] = tilemap_create(machine, cischeat_get_scroll_tile_info_8x8, cischeat_scan_8x8,
|
||||
8,8, TILES_PER_PAGE_X * 2, TILES_PER_PAGE_Y * 4);
|
||||
|
||||
/* set user data and transparency */
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
tilemap_set_user_data(state->tilemap[layer][i/4][i%4], (void *)(FPTR)layer);
|
||||
tilemap_set_transparent_pen(state->tilemap[layer][i/4][i%4], 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void cischeat_set_vreg_flag(cischeat_state *state, int which, int data)
|
||||
{
|
||||
if (state->scroll_flag[which] != data)
|
||||
{
|
||||
state->scroll_flag[which] = data;
|
||||
state->tmap[which] = state->tilemap[which][(data >> 4) & 1][data & 3];
|
||||
tilemap_mark_all_tiles_dirty(state->tmap[which]);
|
||||
}
|
||||
}
|
||||
|
||||
/* 32 colour codes for the tiles */
|
||||
VIDEO_START( cischeat )
|
||||
{
|
||||
cischeat_state *state = machine->driver_data<cischeat_state>();
|
||||
state->shift_ret = 1;
|
||||
VIDEO_START_CALL(megasys1);
|
||||
int i;
|
||||
|
||||
megasys1_bits_per_color_code = 5;
|
||||
state->shift_ret = 1;
|
||||
|
||||
machine->generic.spriteram.u16 = &state->ram[0x8000/2];
|
||||
|
||||
create_tilemaps(machine);
|
||||
state->tmap[0] = state->tilemap[0][0][0];
|
||||
state->tmap[1] = state->tilemap[1][0][0];
|
||||
state->tmap[2] = state->tilemap[2][0][0];
|
||||
|
||||
state->active_layers = 0;
|
||||
|
||||
for (i = 0; i < 3; i ++)
|
||||
{
|
||||
state->scroll_flag[i] = state->scrollx[i] = state->scrolly[i] = 0;
|
||||
}
|
||||
|
||||
state->bits_per_color_code = 5;
|
||||
|
||||
prepare_shadows(state);
|
||||
}
|
||||
@ -145,9 +263,11 @@ VIDEO_START( cischeat )
|
||||
/* 16 colour codes for the tiles */
|
||||
VIDEO_START( f1gpstar )
|
||||
{
|
||||
cischeat_state *state = machine->driver_data<cischeat_state>();
|
||||
|
||||
VIDEO_START_CALL(cischeat);
|
||||
|
||||
megasys1_bits_per_color_code = 4;
|
||||
state->bits_per_color_code = 4;
|
||||
}
|
||||
|
||||
VIDEO_START( bigrun )
|
||||
@ -229,15 +349,15 @@ READ16_HANDLER( bigrun_vregs_r )
|
||||
case 0x2200/2 : return input_port_read(space->machine, "IN5"); // DSW 3 (4 bits)
|
||||
|
||||
default: SHOW_READ_ERROR("vreg %04X read!",offset*2);
|
||||
return megasys1_vregs[offset];
|
||||
return state->vregs[offset];
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( bigrun_vregs_w )
|
||||
{
|
||||
cischeat_state *state = space->machine->driver_data<cischeat_state>();
|
||||
UINT16 old_data = megasys1_vregs[offset];
|
||||
UINT16 new_data = COMBINE_DATA(&megasys1_vregs[offset]);
|
||||
UINT16 old_data = state->vregs[offset];
|
||||
UINT16 new_data = COMBINE_DATA(&state->vregs[offset]);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
@ -271,17 +391,17 @@ WRITE16_HANDLER( bigrun_vregs_w )
|
||||
case 0x0010/2 : state->ip_select = new_data; break;
|
||||
case 0x0012/2 : state->ip_select = new_data+1; break; // value above + 1
|
||||
|
||||
case 0x2000/2+0 : MEGASYS1_VREG_SCROLL(0,x) break;
|
||||
case 0x2000/2+1 : MEGASYS1_VREG_SCROLL(0,y) break;
|
||||
case 0x2000/2+2 : megasys1_set_vreg_flag(0,new_data);break;
|
||||
case 0x2000/2+0 : CISCHEAT_VREG_SCROLL(0,x); break;
|
||||
case 0x2000/2+1 : CISCHEAT_VREG_SCROLL(0,y); break;
|
||||
case 0x2000/2+2 : cischeat_set_vreg_flag(state,0,new_data);break;
|
||||
|
||||
case 0x2008/2+0 : MEGASYS1_VREG_SCROLL(1,x) break;
|
||||
case 0x2008/2+1 : MEGASYS1_VREG_SCROLL(1,y) break;
|
||||
case 0x2008/2+2 : megasys1_set_vreg_flag(1,new_data);break;
|
||||
case 0x2008/2+0 : CISCHEAT_VREG_SCROLL(1,x); break;
|
||||
case 0x2008/2+1 : CISCHEAT_VREG_SCROLL(1,y); break;
|
||||
case 0x2008/2+2 : cischeat_set_vreg_flag(state,1,new_data);break;
|
||||
|
||||
case 0x2100/2+0 : MEGASYS1_VREG_SCROLL(2,x) break;
|
||||
case 0x2100/2+1 : MEGASYS1_VREG_SCROLL(2,y) break;
|
||||
case 0x2100/2+2 : megasys1_set_vreg_flag(2,new_data);break;
|
||||
case 0x2100/2+0 : CISCHEAT_VREG_SCROLL(2,x); break;
|
||||
case 0x2100/2+1 : CISCHEAT_VREG_SCROLL(2,y); break;
|
||||
case 0x2100/2+2 : cischeat_set_vreg_flag(state,2,new_data);break;
|
||||
|
||||
case 0x2108/2 : break; // ? written with 0 only
|
||||
case 0x2208/2 : break; // watchdog reset
|
||||
@ -324,15 +444,15 @@ READ16_HANDLER( cischeat_vregs_r )
|
||||
case 0x2300/2 : return soundlatch2_r(space,0); // From sound cpu
|
||||
|
||||
default: SHOW_READ_ERROR("vreg %04X read!",offset*2);
|
||||
return megasys1_vregs[offset];
|
||||
return state->vregs[offset];
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( cischeat_vregs_w )
|
||||
{
|
||||
cischeat_state *state = space->machine->driver_data<cischeat_state>();
|
||||
UINT16 old_data = megasys1_vregs[offset];
|
||||
UINT16 new_data = COMBINE_DATA(&megasys1_vregs[offset]);
|
||||
UINT16 old_data = state->vregs[offset];
|
||||
UINT16 new_data = COMBINE_DATA(&state->vregs[offset]);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
@ -360,17 +480,17 @@ WRITE16_HANDLER( cischeat_vregs_w )
|
||||
case 0x0010/2 : state->ip_select = new_data; break;
|
||||
case 0x0012/2 : break; // value above + 1
|
||||
|
||||
case 0x2000/2+0 : MEGASYS1_VREG_SCROLL(0,x) break;
|
||||
case 0x2000/2+1 : MEGASYS1_VREG_SCROLL(0,y) break;
|
||||
case 0x2000/2+2 : megasys1_set_vreg_flag(0,new_data);break;
|
||||
case 0x2000/2+0 : CISCHEAT_VREG_SCROLL(0,x); break;
|
||||
case 0x2000/2+1 : CISCHEAT_VREG_SCROLL(0,y); break;
|
||||
case 0x2000/2+2 : cischeat_set_vreg_flag(state,0,new_data);break;
|
||||
|
||||
case 0x2008/2+0 : MEGASYS1_VREG_SCROLL(1,x) break;
|
||||
case 0x2008/2+1 : MEGASYS1_VREG_SCROLL(1,y) break;
|
||||
case 0x2008/2+2 : megasys1_set_vreg_flag(1,new_data);break;
|
||||
case 0x2008/2+0 : CISCHEAT_VREG_SCROLL(1,x); break;
|
||||
case 0x2008/2+1 : CISCHEAT_VREG_SCROLL(1,y); break;
|
||||
case 0x2008/2+2 : cischeat_set_vreg_flag(state,1,new_data);break;
|
||||
|
||||
case 0x2100/2+0 : MEGASYS1_VREG_SCROLL(2,x) break;
|
||||
case 0x2100/2+1 : MEGASYS1_VREG_SCROLL(2,y) break;
|
||||
case 0x2100/2+2 : megasys1_set_vreg_flag(2,new_data);break;
|
||||
case 0x2100/2+0 : CISCHEAT_VREG_SCROLL(2,x); break;
|
||||
case 0x2100/2+1 : CISCHEAT_VREG_SCROLL(2,y); break;
|
||||
case 0x2100/2+2 : cischeat_set_vreg_flag(state,2,new_data);break;
|
||||
|
||||
case 0x2108/2 : break; // ? written with 0 only
|
||||
case 0x2208/2 : break; // watchdog reset
|
||||
@ -398,6 +518,7 @@ WRITE16_HANDLER( cischeat_vregs_w )
|
||||
|
||||
READ16_HANDLER( f1gpstar_vregs_r )
|
||||
{
|
||||
cischeat_state *state = space->machine->driver_data<cischeat_state>();
|
||||
switch (offset)
|
||||
{
|
||||
case 0x0000/2 : return input_port_read(space->machine, "IN1"); // DSW 1 & 2
|
||||
@ -416,7 +537,7 @@ READ16_HANDLER( f1gpstar_vregs_r )
|
||||
return (read_accelerator(space->machine) & 0xff) + ((input_port_read(space->machine, "IN5") & 0xff)<<8);
|
||||
|
||||
default: SHOW_READ_ERROR("vreg %04X read!",offset*2);
|
||||
return megasys1_vregs[offset];
|
||||
return state->vregs[offset];
|
||||
}
|
||||
}
|
||||
|
||||
@ -424,7 +545,7 @@ READ16_HANDLER( f1gpstr2_vregs_r )
|
||||
{
|
||||
cischeat_state *state = space->machine->driver_data<cischeat_state>();
|
||||
if ((offset >= 0x1000/2) && (offset < 0x2000/2))
|
||||
return megasys1_vregs[offset];
|
||||
return state->vregs[offset];
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
@ -444,7 +565,7 @@ READ16_HANDLER( wildplt_vregs_r )
|
||||
{
|
||||
cischeat_state *state = space->machine->driver_data<cischeat_state>();
|
||||
if ((offset >= 0x1000/2) && (offset < 0x2000/2))
|
||||
return megasys1_vregs[offset];
|
||||
return state->vregs[offset];
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
@ -461,15 +582,16 @@ READ16_HANDLER( wildplt_vregs_r )
|
||||
return (state->f1gpstr2_ioready[0]&1) ? 0xff : 0xf0;
|
||||
|
||||
default: SHOW_READ_ERROR("vreg %04X read!",offset*2);
|
||||
return megasys1_vregs[offset];
|
||||
return state->vregs[offset];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( f1gpstar_vregs_w )
|
||||
{
|
||||
// UINT16 old_data = megasys1_vregs[offset];
|
||||
UINT16 new_data = COMBINE_DATA(&megasys1_vregs[offset]);
|
||||
cischeat_state *state = space->machine->driver_data<cischeat_state>();
|
||||
// UINT16 old_data = state->vregs[offset];
|
||||
UINT16 new_data = COMBINE_DATA(&state->vregs[offset]);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
@ -498,17 +620,17 @@ CPU #0 PC 00235C : Warning, vreg 0006 <- 0000
|
||||
|
||||
case 0x0010/2 : break;
|
||||
|
||||
case 0x2000/2+0 : MEGASYS1_VREG_SCROLL(0,x) break;
|
||||
case 0x2000/2+1 : MEGASYS1_VREG_SCROLL(0,y) break;
|
||||
case 0x2000/2+2 : megasys1_set_vreg_flag(0,new_data);break;
|
||||
case 0x2000/2+0 : CISCHEAT_VREG_SCROLL(0,x); break;
|
||||
case 0x2000/2+1 : CISCHEAT_VREG_SCROLL(0,y); break;
|
||||
case 0x2000/2+2 : cischeat_set_vreg_flag(state,0,new_data);break;
|
||||
|
||||
case 0x2008/2+0 : MEGASYS1_VREG_SCROLL(1,x) break;
|
||||
case 0x2008/2+1 : MEGASYS1_VREG_SCROLL(1,y) break;
|
||||
case 0x2008/2+2 : megasys1_set_vreg_flag(1,new_data);break;
|
||||
case 0x2008/2+0 : CISCHEAT_VREG_SCROLL(1,x); break;
|
||||
case 0x2008/2+1 : CISCHEAT_VREG_SCROLL(1,y); break;
|
||||
case 0x2008/2+2 : cischeat_set_vreg_flag(state,1,new_data);break;
|
||||
|
||||
case 0x2100/2+0 : MEGASYS1_VREG_SCROLL(2,x) break;
|
||||
case 0x2100/2+1 : MEGASYS1_VREG_SCROLL(2,y) break;
|
||||
case 0x2100/2+2 : megasys1_set_vreg_flag(2,new_data);break;
|
||||
case 0x2100/2+0 : CISCHEAT_VREG_SCROLL(2,x); break;
|
||||
case 0x2100/2+1 : CISCHEAT_VREG_SCROLL(2,y); break;
|
||||
case 0x2100/2+2 : cischeat_set_vreg_flag(state,2,new_data);break;
|
||||
|
||||
case 0x2108/2 : break; // ? written with 0 only
|
||||
case 0x2208/2 : break; // watchdog reset
|
||||
@ -525,8 +647,9 @@ CPU #0 PC 00235C : Warning, vreg 0006 <- 0000
|
||||
|
||||
WRITE16_HANDLER( f1gpstr2_vregs_w )
|
||||
{
|
||||
// UINT16 old_data = megasys1_vregs[offset];
|
||||
UINT16 new_data = COMBINE_DATA(&megasys1_vregs[offset]);
|
||||
cischeat_state *state = space->machine->driver_data<cischeat_state>();
|
||||
// UINT16 old_data = state->vregs[offset];
|
||||
UINT16 new_data = COMBINE_DATA(&state->vregs[offset]);
|
||||
|
||||
if ((offset >= 0x1000/2) && (offset < 0x2000/2))
|
||||
return;
|
||||
@ -553,14 +676,15 @@ WRITE16_HANDLER( f1gpstr2_vregs_w )
|
||||
|
||||
WRITE16_HANDLER( scudhamm_vregs_w )
|
||||
{
|
||||
// int old_data = megasys1_vregs[offset];
|
||||
int new_data = COMBINE_DATA(&megasys1_vregs[offset]);
|
||||
cischeat_state *state = space->machine->driver_data<cischeat_state>();
|
||||
// int old_data = state->vregs[offset];
|
||||
int new_data = COMBINE_DATA(&state->vregs[offset]);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0x000/2+0 : MEGASYS1_VREG_SCROLL(0,x) break;
|
||||
case 0x000/2+1 : MEGASYS1_VREG_SCROLL(0,y) break;
|
||||
case 0x000/2+2 : megasys1_set_vreg_flag(0,new_data);break;
|
||||
case 0x000/2+0 : CISCHEAT_VREG_SCROLL(0,x); break;
|
||||
case 0x000/2+1 : CISCHEAT_VREG_SCROLL(0,y); break;
|
||||
case 0x000/2+2 : cischeat_set_vreg_flag(state,0,new_data);break;
|
||||
|
||||
// UNUSED LAYER
|
||||
case 0x008/2+0 :
|
||||
@ -568,9 +692,9 @@ WRITE16_HANDLER( scudhamm_vregs_w )
|
||||
case 0x008/2+2 :
|
||||
break;
|
||||
|
||||
case 0x100/2+0 : MEGASYS1_VREG_SCROLL(2,x) break;
|
||||
case 0x100/2+1 : MEGASYS1_VREG_SCROLL(2,y) break;
|
||||
case 0x100/2+2 : megasys1_set_vreg_flag(2,new_data);break;
|
||||
case 0x100/2+0 : CISCHEAT_VREG_SCROLL(2,x); break;
|
||||
case 0x100/2+1 : CISCHEAT_VREG_SCROLL(2,y); break;
|
||||
case 0x100/2+2 : cischeat_set_vreg_flag(state,2,new_data);break;
|
||||
|
||||
case 0x208/2 : watchdog_reset_w(space,0,0); break;
|
||||
|
||||
@ -1125,7 +1249,7 @@ if ( input_code_pressed(screen->machine, KEYCODE_Z) || input_code_pressed(screen
|
||||
if (input_code_pressed(screen->machine, KEYCODE_R)) { msk |= 0x10;} \
|
||||
if (input_code_pressed(screen->machine, KEYCODE_T)) { msk |= 0x20;} \
|
||||
\
|
||||
if (msk != 0) megasys1_active_layers &= msk; \
|
||||
if (msk != 0) state->active_layers &= msk; \
|
||||
} \
|
||||
\
|
||||
{ \
|
||||
@ -1133,7 +1257,7 @@ if ( input_code_pressed(screen->machine, KEYCODE_Z) || input_code_pressed(screen
|
||||
state->show_unknown ^= 1; \
|
||||
if (state->show_unknown) \
|
||||
popmessage("0:%04X 2:%04X 4:%04X 6:%04X c:%04X", \
|
||||
megasys1_vregs[0],megasys1_vregs[1],megasys1_vregs[2],megasys1_vregs[3],megasys1_vregs[0xc/2] ); \
|
||||
state->vregs[0],state->vregs[1],state->vregs[2],state->vregs[3],state->vregs[0xc/2] ); \
|
||||
}
|
||||
#else
|
||||
#define CISCHEAT_LAYERSCTL
|
||||
@ -1145,20 +1269,19 @@ if ( input_code_pressed(screen->machine, KEYCODE_Z) || input_code_pressed(screen
|
||||
|
||||
SCREEN_UPDATE( bigrun )
|
||||
{
|
||||
cischeat_state *state = screen->machine->driver_data<cischeat_state>();
|
||||
int i;
|
||||
int megasys1_active_layers1, flag;
|
||||
int active_layers1, flag;
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
cischeat_state *state = screen->machine->driver_data<cischeat_state>();
|
||||
|
||||
/* FAKE Videoreg */
|
||||
megasys1_active_layers = megasys1_vregs[0x2400/2];
|
||||
if (megasys1_active_layers == 0) megasys1_active_layers = 0x3f;
|
||||
state->active_layers = state->vregs[0x2400/2];
|
||||
if (state->active_layers == 0) state->active_layers = 0x3f;
|
||||
#else
|
||||
megasys1_active_layers = 0x3f;
|
||||
state->active_layers = 0x3f;
|
||||
#endif
|
||||
|
||||
megasys1_active_layers1 = megasys1_active_layers;
|
||||
active_layers1 = state->active_layers;
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
CISCHEAT_LAYERSCTRL
|
||||
@ -1172,8 +1295,8 @@ SCREEN_UPDATE( bigrun )
|
||||
|
||||
for (i = 7; i >= 4; i--)
|
||||
{ /* bitmap, road, min_priority, max_priority, transparency */
|
||||
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,i,i,FALSE);
|
||||
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,i,i,TRUE);
|
||||
if (state->active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,i,i,FALSE);
|
||||
if (state->active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,i,i,TRUE);
|
||||
}
|
||||
|
||||
flag = 0;
|
||||
@ -1182,15 +1305,15 @@ SCREEN_UPDATE( bigrun )
|
||||
|
||||
for (i = 3; i >= 0; i--)
|
||||
{ /* bitmap, road, min_priority, max_priority, transparency */
|
||||
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,i,i,TRUE);
|
||||
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,i,i,TRUE);
|
||||
if (state->active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,i,i,TRUE);
|
||||
if (state->active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,i,i,TRUE);
|
||||
}
|
||||
|
||||
if (megasys1_active_layers & 0x08) bigrun_draw_sprites(screen->machine,bitmap,cliprect,15,0);
|
||||
if (state->active_layers & 0x08) bigrun_draw_sprites(screen->machine,bitmap,cliprect,15,0);
|
||||
|
||||
cischeat_tmap_DRAW(2)
|
||||
|
||||
megasys1_active_layers = megasys1_active_layers1;
|
||||
state->active_layers = active_layers1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1201,19 +1324,18 @@ SCREEN_UPDATE( bigrun )
|
||||
|
||||
SCREEN_UPDATE( cischeat )
|
||||
{
|
||||
int megasys1_active_layers1, flag;
|
||||
cischeat_state *state = screen->machine->driver_data<cischeat_state>();
|
||||
int active_layers1, flag;
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
cischeat_state *state = screen->machine->driver_data<cischeat_state>();
|
||||
|
||||
/* FAKE Videoreg */
|
||||
megasys1_active_layers = megasys1_vregs[0x2400/2];
|
||||
if (megasys1_active_layers == 0) megasys1_active_layers = 0x3f;
|
||||
state->active_layers = state->vregs[0x2400/2];
|
||||
if (state->active_layers == 0) state->active_layers = 0x3f;
|
||||
#else
|
||||
megasys1_active_layers = 0x3f;
|
||||
state->active_layers = 0x3f;
|
||||
#endif
|
||||
|
||||
megasys1_active_layers1 = megasys1_active_layers;
|
||||
active_layers1 = state->active_layers;
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
CISCHEAT_LAYERSCTRL
|
||||
@ -1226,28 +1348,28 @@ SCREEN_UPDATE( cischeat )
|
||||
bitmap_fill(bitmap,cliprect,0);
|
||||
|
||||
/* bitmap, road, priority, transparency */
|
||||
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,7,5,FALSE);
|
||||
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,7,5,TRUE);
|
||||
if (state->active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,7,5,FALSE);
|
||||
if (state->active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,7,5,TRUE);
|
||||
|
||||
flag = 0;
|
||||
cischeat_tmap_DRAW(0)
|
||||
// else bitmap_fill(bitmap,cliprect,0);
|
||||
cischeat_tmap_DRAW(1)
|
||||
|
||||
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,15,3);
|
||||
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,4,1,TRUE);
|
||||
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,4,1,TRUE);
|
||||
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,2,2);
|
||||
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,0,0,TRUE);
|
||||
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,0,0,TRUE);
|
||||
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,1,0);
|
||||
if (state->active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,15,3);
|
||||
if (state->active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,4,1,TRUE);
|
||||
if (state->active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,4,1,TRUE);
|
||||
if (state->active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,2,2);
|
||||
if (state->active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,0,0,TRUE);
|
||||
if (state->active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,0,0,TRUE);
|
||||
if (state->active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,1,0);
|
||||
cischeat_tmap_DRAW(2)
|
||||
|
||||
/* for the map screen */
|
||||
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,0+16,0+16);
|
||||
if (state->active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,0+16,0+16);
|
||||
|
||||
|
||||
megasys1_active_layers = megasys1_active_layers1;
|
||||
state->active_layers = active_layers1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1259,35 +1381,34 @@ SCREEN_UPDATE( cischeat )
|
||||
|
||||
SCREEN_UPDATE( f1gpstar )
|
||||
{
|
||||
int megasys1_active_layers1, flag;
|
||||
cischeat_state *state = screen->machine->driver_data<cischeat_state>();
|
||||
int active_layers1, flag;
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
cischeat_state *state = screen->machine->driver_data<cischeat_state>();
|
||||
|
||||
/* FAKE Videoreg */
|
||||
megasys1_active_layers = megasys1_vregs[0x2400/2];
|
||||
if (megasys1_active_layers == 0) megasys1_active_layers = 0x3f;
|
||||
state->active_layers = state->vregs[0x2400/2];
|
||||
if (state->active_layers == 0) state->active_layers = 0x3f;
|
||||
#else
|
||||
megasys1_active_layers = 0x3f;
|
||||
state->active_layers = 0x3f;
|
||||
#endif
|
||||
|
||||
megasys1_active_layers1 = megasys1_active_layers;
|
||||
active_layers1 = state->active_layers;
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
CISCHEAT_LAYERSCTRL
|
||||
#endif
|
||||
|
||||
cischeat_tmap_SET_SCROLL(0)
|
||||
cischeat_tmap_SET_SCROLL(1)
|
||||
cischeat_tmap_SET_SCROLL(2)
|
||||
cischeat_tmap_SET_SCROLL(0);
|
||||
cischeat_tmap_SET_SCROLL(1);
|
||||
cischeat_tmap_SET_SCROLL(2);
|
||||
|
||||
bitmap_fill(bitmap,cliprect,0);
|
||||
|
||||
/* 1: clouds 5, grad 7, road 0 2: clouds 5, grad 7, road 0, tunnel roof 0 */
|
||||
|
||||
/* road 1!! 0!! */ /* bitmap, road, min_priority, max_priority, transparency */
|
||||
if (megasys1_active_layers & 0x20) f1gpstar_draw_road(screen->machine,bitmap,cliprect,1,6,7,TRUE);
|
||||
if (megasys1_active_layers & 0x10) f1gpstar_draw_road(screen->machine,bitmap,cliprect,0,6,7,TRUE);
|
||||
if (state->active_layers & 0x20) f1gpstar_draw_road(screen->machine,bitmap,cliprect,1,6,7,TRUE);
|
||||
if (state->active_layers & 0x10) f1gpstar_draw_road(screen->machine,bitmap,cliprect,0,6,7,TRUE);
|
||||
|
||||
flag = 0;
|
||||
cischeat_tmap_DRAW(0)
|
||||
@ -1295,21 +1416,21 @@ SCREEN_UPDATE( f1gpstar )
|
||||
cischeat_tmap_DRAW(1)
|
||||
|
||||
/* road 1!! 0!! */ /* bitmap, road, min_priority, max_priority, transparency */
|
||||
if (megasys1_active_layers & 0x20) f1gpstar_draw_road(screen->machine,bitmap,cliprect,1,1,5,TRUE);
|
||||
if (megasys1_active_layers & 0x10) f1gpstar_draw_road(screen->machine,bitmap,cliprect,0,1,5,TRUE);
|
||||
if (state->active_layers & 0x20) f1gpstar_draw_road(screen->machine,bitmap,cliprect,1,1,5,TRUE);
|
||||
if (state->active_layers & 0x10) f1gpstar_draw_road(screen->machine,bitmap,cliprect,0,1,5,TRUE);
|
||||
|
||||
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,15,2);
|
||||
if (state->active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,15,2);
|
||||
|
||||
/* road 1!! 0!! */ /* bitmap, road, min_priority, max_priority, transparency */
|
||||
if (megasys1_active_layers & 0x20) f1gpstar_draw_road(screen->machine,bitmap,cliprect,1,0,0,TRUE);
|
||||
if (megasys1_active_layers & 0x10) f1gpstar_draw_road(screen->machine,bitmap,cliprect,0,0,0,TRUE);
|
||||
if (state->active_layers & 0x20) f1gpstar_draw_road(screen->machine,bitmap,cliprect,1,0,0,TRUE);
|
||||
if (state->active_layers & 0x10) f1gpstar_draw_road(screen->machine,bitmap,cliprect,0,0,0,TRUE);
|
||||
|
||||
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,1,1);
|
||||
if (state->active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,1,1);
|
||||
cischeat_tmap_DRAW(2)
|
||||
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,0,0);
|
||||
if (state->active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,0,0);
|
||||
|
||||
|
||||
megasys1_active_layers = megasys1_active_layers1;
|
||||
state->active_layers = active_layers1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1321,12 +1442,12 @@ SCREEN_UPDATE( f1gpstar )
|
||||
|
||||
SCREEN_UPDATE( scudhamm )
|
||||
{
|
||||
int megasys1_active_layers1, flag;
|
||||
megasys1_active_layers1 = megasys1_active_layers;
|
||||
megasys1_active_layers = 0x0d;
|
||||
cischeat_state *state = screen->machine->driver_data<cischeat_state>();
|
||||
int active_layers1, flag;
|
||||
active_layers1 = state->active_layers;
|
||||
state->active_layers = 0x0d;
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
cischeat_state *state = screen->machine->driver_data<cischeat_state>();
|
||||
state->debugsprites = 0;
|
||||
if ( input_code_pressed(screen->machine, KEYCODE_Z) || input_code_pressed(screen->machine, KEYCODE_X) )
|
||||
{
|
||||
@ -1339,7 +1460,7 @@ if ( input_code_pressed(screen->machine, KEYCODE_Z) || input_code_pressed(screen
|
||||
if (input_code_pressed(screen->machine, KEYCODE_D)) { msk |= 0x8; state->debugsprites = 3;}
|
||||
if (input_code_pressed(screen->machine, KEYCODE_F)) { msk |= 0x8; state->debugsprites = 4;}
|
||||
|
||||
if (msk != 0) megasys1_active_layers &= msk;
|
||||
if (msk != 0) state->active_layers &= msk;
|
||||
#if 1
|
||||
{
|
||||
address_space *space = cputag_get_address_space(screen->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
@ -1363,10 +1484,10 @@ if ( input_code_pressed(screen->machine, KEYCODE_Z) || input_code_pressed(screen
|
||||
flag = 0;
|
||||
cischeat_tmap_DRAW(0)
|
||||
// no layer 1
|
||||
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,0,15);
|
||||
if (state->active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,0,15);
|
||||
cischeat_tmap_DRAW(2)
|
||||
|
||||
megasys1_active_layers = megasys1_active_layers1;
|
||||
state->active_layers = active_layers1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -399,13 +399,13 @@ WRITE8_HANDLER( mappy_scroll_w )
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/* also used by toypop.c */
|
||||
void mappy_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *spriteram_base, int xoffs, int yoffs, int transcolor)
|
||||
static void mappy_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *spriteram_base)
|
||||
{
|
||||
UINT8 *spriteram = spriteram_base + 0x780;
|
||||
UINT8 *spriteram_2 = spriteram + 0x800;
|
||||
UINT8 *spriteram_3 = spriteram_2 + 0x800;
|
||||
int offs;
|
||||
enum { xoffs = 0, yoffs = 0 };
|
||||
|
||||
for (offs = 0;offs < 0x80;offs += 2)
|
||||
{
|
||||
@ -449,7 +449,7 @@ void mappy_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectan
|
||||
color,
|
||||
flipx,flipy,
|
||||
sx + 16*x,sy + 16*y,
|
||||
colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, transcolor));
|
||||
colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 15));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -478,7 +478,7 @@ spriteram_3
|
||||
1 -------x X position MSB
|
||||
*/
|
||||
|
||||
static void phozon_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *spriteram_base )
|
||||
static void phozon_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *spriteram_base)
|
||||
{
|
||||
UINT8 *spriteram = spriteram_base + 0x780;
|
||||
UINT8 *spriteram_2 = spriteram + 0x800;
|
||||
@ -547,7 +547,7 @@ SCREEN_UPDATE( superpac )
|
||||
tilemap_draw(bitmap,cliprect,state->bg_tilemap,TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES,0);
|
||||
|
||||
bitmap_fill(sprite_bitmap,cliprect,15);
|
||||
mappy_draw_sprites(screen->machine,sprite_bitmap,cliprect,state->spriteram,0,0,15);
|
||||
mappy_draw_sprites(screen->machine,sprite_bitmap,cliprect,state->spriteram);
|
||||
copybitmap_trans(bitmap,sprite_bitmap,0,0,0,0,cliprect,15);
|
||||
|
||||
/* Redraw the high priority characters */
|
||||
@ -597,7 +597,7 @@ SCREEN_UPDATE( mappy )
|
||||
|
||||
tilemap_draw(bitmap,cliprect,state->bg_tilemap,TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES,0);
|
||||
|
||||
mappy_draw_sprites(screen->machine,bitmap,cliprect,state->spriteram,0,0,15);
|
||||
mappy_draw_sprites(screen->machine,bitmap,cliprect,state->spriteram);
|
||||
|
||||
/* Redraw the high priority characters */
|
||||
tilemap_draw(bitmap,cliprect,state->bg_tilemap,1,0);
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mcr.h"
|
||||
#include "includes/mcr3.h"
|
||||
|
||||
|
||||
|
||||
@ -17,7 +18,7 @@
|
||||
|
||||
/* Spy Hunter hardware extras */
|
||||
UINT8 spyhunt_sprite_color_mask;
|
||||
INT16 spyhunt_scrollx, spyhunt_scrolly;
|
||||
static INT16 spyhunt_scrollx, spyhunt_scrolly;
|
||||
INT16 spyhunt_scroll_offset;
|
||||
|
||||
UINT8 *spyhunt_alpharam;
|
||||
@ -45,7 +46,7 @@ static tilemap_t *alpha_tilemap;
|
||||
#ifdef UNUSED_FUNCTION
|
||||
static TILE_GET_INFO( get_bg_tile_info )
|
||||
{
|
||||
mcr_state *state = machine->driver_data<mcr_state>();
|
||||
mcr3_state *state = machine->driver_data<mcr3_state>();
|
||||
UINT8 *videoram = state->videoram;
|
||||
int data = videoram[tile_index * 2] | (videoram[tile_index * 2 + 1] << 8);
|
||||
int code = (data & 0x3ff) | ((data >> 4) & 0x400);
|
||||
@ -57,7 +58,7 @@ static TILE_GET_INFO( get_bg_tile_info )
|
||||
|
||||
static TILE_GET_INFO( mcrmono_get_bg_tile_info )
|
||||
{
|
||||
mcr_state *state = machine->driver_data<mcr_state>();
|
||||
mcr3_state *state = machine->driver_data<mcr3_state>();
|
||||
UINT8 *videoram = state->videoram;
|
||||
int data = videoram[tile_index * 2] | (videoram[tile_index * 2 + 1] << 8);
|
||||
int code = (data & 0x3ff) | ((data >> 4) & 0x400);
|
||||
@ -75,7 +76,7 @@ static TILEMAP_MAPPER( spyhunt_bg_scan )
|
||||
|
||||
static TILE_GET_INFO( spyhunt_get_bg_tile_info )
|
||||
{
|
||||
mcr_state *state = machine->driver_data<mcr_state>();
|
||||
mcr3_state *state = machine->driver_data<mcr3_state>();
|
||||
UINT8 *videoram = state->videoram;
|
||||
int data = videoram[tile_index];
|
||||
int code = (data & 0x3f) | ((data >> 1) & 0x40);
|
||||
@ -172,7 +173,7 @@ WRITE8_HANDLER( mcr3_paletteram_w )
|
||||
|
||||
WRITE8_HANDLER( mcr3_videoram_w )
|
||||
{
|
||||
mcr_state *state = space->machine->driver_data<mcr_state>();
|
||||
mcr3_state *state = space->machine->driver_data<mcr3_state>();
|
||||
UINT8 *videoram = state->videoram;
|
||||
videoram[offset] = data;
|
||||
tilemap_mark_tile_dirty(bg_tilemap, offset / 2);
|
||||
@ -181,7 +182,7 @@ WRITE8_HANDLER( mcr3_videoram_w )
|
||||
|
||||
WRITE8_HANDLER( spyhunt_videoram_w )
|
||||
{
|
||||
mcr_state *state = space->machine->driver_data<mcr_state>();
|
||||
mcr3_state *state = space->machine->driver_data<mcr3_state>();
|
||||
UINT8 *videoram = state->videoram;
|
||||
videoram[offset] = data;
|
||||
tilemap_mark_tile_dirty(bg_tilemap, offset);
|
||||
@ -195,6 +196,29 @@ WRITE8_HANDLER( spyhunt_alpharam_w )
|
||||
}
|
||||
|
||||
|
||||
WRITE8_HANDLER( spyhunt_scroll_value_w )
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0:
|
||||
/* low 8 bits of horizontal scroll */
|
||||
spyhunt_scrollx = (spyhunt_scrollx & ~0xff) | data;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
/* upper 3 bits of horizontal scroll and upper 1 bit of vertical scroll */
|
||||
spyhunt_scrollx = (spyhunt_scrollx & 0xff) | ((data & 0x07) << 8);
|
||||
spyhunt_scrolly = (spyhunt_scrolly & 0xff) | ((data & 0x80) << 1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
/* low 8 bits of vertical scroll */
|
||||
spyhunt_scrolly = (spyhunt_scrolly & ~0xff) | data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
|
@ -195,20 +195,19 @@ actual code sent to the hardware.
|
||||
#include "includes/megasys1.h"
|
||||
|
||||
/* Variables defined here, that have to be shared: */
|
||||
tilemap_t *megasys1_tmap[3];
|
||||
|
||||
UINT16 *megasys1_scrollram[3];
|
||||
UINT16 *megasys1_objectram, *megasys1_vregs, *megasys1_ram;
|
||||
|
||||
int megasys1_scrollx[3], megasys1_scrolly[3];
|
||||
int megasys1_active_layers;
|
||||
int megasys1_bits_per_color_code;
|
||||
static int megasys1_scrollx[3], megasys1_scrolly[3];
|
||||
static int megasys1_active_layers;
|
||||
static int megasys1_bits_per_color_code;
|
||||
|
||||
static int megasys1_scroll_flag[3];
|
||||
static int megasys1_sprite_bank;
|
||||
static int megasys1_screen_flag, megasys1_sprite_flag;
|
||||
static int megasys1_8x8_scroll_factor[3], megasys1_16x16_scroll_factor[3];
|
||||
|
||||
static tilemap_t *megasys1_tmap[3];
|
||||
static tilemap_t *megasys1_tilemap[3][2][4];
|
||||
|
||||
/* Variables defined in driver: */
|
||||
@ -419,7 +418,7 @@ static void create_tilemaps(running_machine *machine)
|
||||
}
|
||||
}
|
||||
|
||||
void megasys1_set_vreg_flag(int which, int data)
|
||||
static void megasys1_set_vreg_flag(int which, int data)
|
||||
{
|
||||
if (megasys1_scroll_flag[which] != data)
|
||||
{
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include "emu.h"
|
||||
#include "profiler.h"
|
||||
#include "cpu/tms34010/tms34010.h"
|
||||
#include "includes/midyunit.h"
|
||||
#include "includes/midtunit.h"
|
||||
|
||||
|
||||
@ -41,6 +40,8 @@ enum
|
||||
|
||||
|
||||
/* graphics-related variables */
|
||||
UINT8 * midtunit_gfx_rom;
|
||||
size_t midtunit_gfx_rom_size;
|
||||
UINT8 midtunit_gfx_rom_large;
|
||||
static UINT16 midtunit_control;
|
||||
|
||||
@ -129,7 +130,7 @@ VIDEO_START( midxunit )
|
||||
|
||||
READ16_HANDLER( midtunit_gfxrom_r )
|
||||
{
|
||||
UINT8 *base = &midyunit_gfx_rom[gfxbank_offset[(offset >> 21) & 1]];
|
||||
UINT8 *base = &midtunit_gfx_rom[gfxbank_offset[(offset >> 21) & 1]];
|
||||
offset = (offset & 0x01fffff) * 2;
|
||||
return base[offset] | (base[offset + 1] << 8);
|
||||
}
|
||||
@ -137,7 +138,7 @@ READ16_HANDLER( midtunit_gfxrom_r )
|
||||
|
||||
READ16_HANDLER( midwunit_gfxrom_r )
|
||||
{
|
||||
UINT8 *base = &midyunit_gfx_rom[gfxbank_offset[0]];
|
||||
UINT8 *base = &midtunit_gfx_rom[gfxbank_offset[0]];
|
||||
offset *= 2;
|
||||
return base[offset] | (base[offset + 1] << 8);
|
||||
}
|
||||
@ -356,7 +357,7 @@ typedef void (*dma_draw_func)(void);
|
||||
#define DMA_DRAW_FUNC_BODY(name, bitsperpixel, extractor, xflip, skip, scale, zero, nonzero) \
|
||||
{ \
|
||||
int height = dma_state.height << 8; \
|
||||
UINT8 *base = midyunit_gfx_rom; \
|
||||
UINT8 *base = midtunit_gfx_rom; \
|
||||
UINT32 offset = dma_state.offset; \
|
||||
UINT16 pal = dma_state.palette; \
|
||||
UINT16 color = pal | dma_state.color; \
|
||||
|
@ -1,7 +1,6 @@
|
||||
/* video/namcofl.c */
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/namconb1.h"
|
||||
#include "includes/namcoic.h"
|
||||
#include "includes/namcos2.h"
|
||||
#include "includes/namcofl.h"
|
||||
@ -120,7 +119,7 @@ static int FLobjcode2tile( running_machine *machine, int code )
|
||||
|
||||
VIDEO_START( namcofl )
|
||||
{
|
||||
namco_tilemap_init( machine, NAMCONB1_TILEGFX, machine->region(NAMCONB1_TILEMASKREGION)->base(), TilemapCB );
|
||||
namco_obj_init(machine,NAMCONB1_SPRITEGFX,0x0,FLobjcode2tile);
|
||||
namco_roz_init(machine,NAMCONB1_ROTGFX,NAMCONB1_ROTMASKREGION);
|
||||
namco_tilemap_init( machine, NAMCOFL_TILEGFX, machine->region(NAMCOFL_TILEMASKREGION)->base(), TilemapCB );
|
||||
namco_obj_init(machine,NAMCOFL_SPRITEGFX,0x0,FLobjcode2tile);
|
||||
namco_roz_init(machine,NAMCOFL_ROTGFX,NAMCOFL_ROTMASKREGION);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ PALETTE_INIT( quasar )
|
||||
|
||||
VIDEO_START( quasar )
|
||||
{
|
||||
cvs_state *state = machine->driver_data<cvs_state>();
|
||||
quasar_state *state = machine->driver_data<quasar_state>();
|
||||
state->effectram = auto_alloc_array(machine, UINT8, 0x400);
|
||||
|
||||
/* create helper bitmap */
|
||||
@ -105,7 +105,7 @@ VIDEO_START( quasar )
|
||||
|
||||
SCREEN_UPDATE( quasar )
|
||||
{
|
||||
cvs_state *state = screen->machine->driver_data<cvs_state>();
|
||||
quasar_state *state = screen->machine->driver_data<quasar_state>();
|
||||
int offs;
|
||||
bitmap_t *s2636_0_bitmap, *s2636_1_bitmap, *s2636_2_bitmap;
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "includes/rampart.h"
|
||||
|
||||
|
||||
static void rampart_bitmap_render(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect);
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -107,7 +108,7 @@ SCREEN_UPDATE( rampart )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void rampart_bitmap_render(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
|
||||
static void rampart_bitmap_render(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
rampart_state *state = machine->driver_data<rampart_state>();
|
||||
int x, y;
|
||||
|
@ -31,7 +31,7 @@ To Do:
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/ms32crpt.h"
|
||||
#include "machine/jalcrpt.h"
|
||||
#include "includes/tetrisp2.h"
|
||||
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mappy.h"
|
||||
#include "includes/toypop.h"
|
||||
|
||||
/***************************************************************************
|
||||
@ -223,11 +222,69 @@ static void draw_background(running_machine *machine, bitmap_t *bitmap)
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *spriteram_base)
|
||||
{
|
||||
UINT8 *spriteram = spriteram_base + 0x780;
|
||||
UINT8 *spriteram_2 = spriteram + 0x800;
|
||||
UINT8 *spriteram_3 = spriteram_2 + 0x800;
|
||||
int offs;
|
||||
enum { xoffs = -31, yoffs = -8 };
|
||||
|
||||
for (offs = 0;offs < 0x80;offs += 2)
|
||||
{
|
||||
/* is it on? */
|
||||
if ((spriteram_3[offs+1] & 2) == 0)
|
||||
{
|
||||
static const UINT8 gfx_offs[2][2] =
|
||||
{
|
||||
{ 0, 1 },
|
||||
{ 2, 3 }
|
||||
};
|
||||
int sprite = spriteram[offs];
|
||||
int color = spriteram[offs+1];
|
||||
int sx = spriteram_2[offs+1] + 0x100 * (spriteram_3[offs+1] & 1) - 40 + xoffs;
|
||||
int sy = 256 - spriteram_2[offs] + yoffs + 1; // sprites are buffered and delayed by one scanline
|
||||
int flipx = (spriteram_3[offs] & 0x01);
|
||||
int flipy = (spriteram_3[offs] & 0x02) >> 1;
|
||||
int sizex = (spriteram_3[offs] & 0x04) >> 2;
|
||||
int sizey = (spriteram_3[offs] & 0x08) >> 3;
|
||||
int x,y;
|
||||
|
||||
sprite &= ~sizex;
|
||||
sprite &= ~(sizey << 1);
|
||||
|
||||
sy -= 16 * sizey;
|
||||
sy = (sy & 0xff) - 32; // fix wraparound
|
||||
|
||||
if (flip_screen_get(machine))
|
||||
{
|
||||
flipx ^= 1;
|
||||
flipy ^= 1;
|
||||
sy += 40;
|
||||
}
|
||||
|
||||
for (y = 0;y <= sizey;y++)
|
||||
{
|
||||
for (x = 0;x <= sizex;x++)
|
||||
{
|
||||
drawgfx_transmask(bitmap,cliprect,machine->gfx[1],
|
||||
sprite + gfx_offs[y ^ (sizey * flipy)][x ^ (sizex * flipx)],
|
||||
color,
|
||||
flipx,flipy,
|
||||
sx + 16*x,sy + 16*y,
|
||||
colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0xff));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SCREEN_UPDATE( toypop )
|
||||
{
|
||||
toypop_state *state = screen->machine->driver_data<toypop_state>();
|
||||
draw_background(screen->machine, bitmap);
|
||||
tilemap_draw(bitmap,cliprect,state->bg_tilemap,0,0);
|
||||
mappy_draw_sprites(screen->machine, bitmap, cliprect, state->spriteram, -31, -8, 0xff);
|
||||
draw_sprites(screen->machine, bitmap, cliprect, state->spriteram);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user