MAME going modern part 6 (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2012-04-05 15:00:36 +00:00
parent ac4b1dad09
commit afa1478b7c
39 changed files with 338 additions and 354 deletions

View File

@ -492,10 +492,9 @@ READ16_MEMBER(cave_state::donpachi_videoregs_r)
}
#if 0
WRITE16_HANDLER( donpachi_videoregs_w )
WRITE16_MEMBER(cave_state::donpachi_videoregs_w)
{
cave_state *state = space->machine().driver_data<cave_state>();
COMBINE_DATA(&state->m_videoregs[offset]);
COMBINE_DATA(&m_videoregs[offset]);
switch (offset)
{

View File

@ -401,14 +401,13 @@ WRITE16_MEMBER(cischeat_state::scudhamm_paletteram16_w)
---- ---- ---- --1- Up Limit
---- ---- ---- ---0 Down Limit */
READ16_HANDLER( scudhamm_motor_status_r )
READ16_MEMBER(cischeat_state::scudhamm_motor_status_r)
{
cischeat_state *state = space->machine().driver_data<cischeat_state>();
return state->m_scudhamm_motor_command; // Motor Status
return m_scudhamm_motor_command; // Motor Status
}
READ16_HANDLER( scudhamm_motor_pos_r )
READ16_MEMBER(cischeat_state::scudhamm_motor_pos_r)
{
return 0x00 << 8;
}
@ -428,18 +427,17 @@ WRITE16_MEMBER(cischeat_state::scudhamm_motor_command_w)
}
READ16_HANDLER( scudhamm_analog_r )
READ16_MEMBER(cischeat_state::scudhamm_analog_r)
{
cischeat_state *state = space->machine().driver_data<cischeat_state>();
int i=input_port_read(space->machine(), "IN1"),j;
int i=input_port_read(machine(), "IN1"),j;
if ((i^state->m_prev)&0x4000) {
if (i<state->m_prev) state->m_prev-=0x8000;
else state->m_prev+=0x8000;
if ((i^m_prev)&0x4000) {
if (i<m_prev) m_prev-=0x8000;
else m_prev+=0x8000;
}
j=i-state->m_prev;
state->m_prev=i;
j=i-m_prev;
m_prev=i;
/* effect of hammer collision 'accelerometer':
$00 - $09 - no hit
@ -504,9 +502,9 @@ static ADDRESS_MAP_START( scudhamm_map, AS_PROGRAM, 16, cischeat_state )
AM_RANGE(0x100014, 0x100015) AM_DEVREADWRITE8("oki1", okim6295_device, read, write, 0x00ff) // Sound
AM_RANGE(0x100018, 0x100019) AM_DEVREADWRITE8("oki2", okim6295_device, read, write, 0x00ff) //
AM_RANGE(0x10001c, 0x10001d) AM_WRITE(scudhamm_enable_w) // ?
AM_RANGE(0x100040, 0x100041) AM_READ_LEGACY(scudhamm_analog_r) AM_WRITENOP // A / D
AM_RANGE(0x100044, 0x100045) AM_READ_LEGACY(scudhamm_motor_pos_r) // Motor Position
AM_RANGE(0x100050, 0x100051) AM_READ_LEGACY(scudhamm_motor_status_r) AM_WRITE(scudhamm_motor_command_w) // Motor Limit Switches
AM_RANGE(0x100040, 0x100041) AM_READ(scudhamm_analog_r) AM_WRITENOP // A / D
AM_RANGE(0x100044, 0x100045) AM_READ(scudhamm_motor_pos_r) // Motor Position
AM_RANGE(0x100050, 0x100051) AM_READ(scudhamm_motor_status_r) AM_WRITE(scudhamm_motor_command_w) // Motor Limit Switches
AM_RANGE(0x10005c, 0x10005d) AM_READ_PORT("IN2") // 2 x DSW
ADDRESS_MAP_END

View File

@ -244,10 +244,10 @@ Stephh's log (2006.09.20) :
READ16_HANDLER( cps1_dsw_r )
READ16_MEMBER(cps_state::cps1_dsw_r)
{
static const char *const dswname[] = { "IN0", "DSWA", "DSWB", "DSWC" };
int in = input_port_read(space->machine(), dswname[offset]);
int in = input_port_read(machine(), dswname[offset]);
return (in << 8) | 0xff;
}
@ -301,14 +301,14 @@ WRITE16_MEMBER(cps_state::cps1_soundlatch2_w)
soundlatch2_w(space, 0, data & 0xff);
}
WRITE16_HANDLER( cps1_coinctrl_w )
WRITE16_MEMBER(cps_state::cps1_coinctrl_w)
{
if (ACCESSING_BITS_8_15)
{
coin_counter_w(space->machine(), 0, data & 0x0100);
coin_counter_w(space->machine(), 1, data & 0x0200);
coin_lockout_w(space->machine(), 0, ~data & 0x0400);
coin_lockout_w(space->machine(), 1, ~data & 0x0800);
coin_counter_w(machine(), 0, data & 0x0100);
coin_counter_w(machine(), 1, data & 0x0200);
coin_lockout_w(machine(), 0, ~data & 0x0400);
coin_lockout_w(machine(), 1, ~data & 0x0800);
// bit 15 = CPS-A custom reset?
}
@ -359,18 +359,16 @@ READ16_MEMBER(cps_state::qsound_rom_r)
}
}
READ16_HANDLER( qsound_sharedram1_r )
READ16_MEMBER(cps_state::qsound_sharedram1_r)
{
cps_state *state = space->machine().driver_data<cps_state>();
return state->m_qsound_sharedram1[offset] | 0xff00;
return m_qsound_sharedram1[offset] | 0xff00;
}
WRITE16_HANDLER( qsound_sharedram1_w )
WRITE16_MEMBER(cps_state::qsound_sharedram1_w)
{
cps_state *state = space->machine().driver_data<cps_state>();
if (ACCESSING_BITS_0_7)
state->m_qsound_sharedram1[offset] = data;
m_qsound_sharedram1[offset] = data;
}
READ16_MEMBER(cps_state::qsound_sharedram2_r)
@ -539,9 +537,9 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, cps_state )
AM_RANGE(0x000000, 0x3fffff) AM_ROM
AM_RANGE(0x800000, 0x800007) AM_READ_PORT("IN1") /* Player input ports */
/* forgottn, willow, cawing, nemo, varth read from 800010. Probably debug input leftover from development */
AM_RANGE(0x800018, 0x80001f) AM_READ_LEGACY(cps1_dsw_r) /* System input ports / Dip Switches */
AM_RANGE(0x800018, 0x80001f) AM_READ(cps1_dsw_r) /* System input ports / Dip Switches */
AM_RANGE(0x800020, 0x800021) AM_READNOP /* ? Used by Rockman ? not mapped according to PAL */
AM_RANGE(0x800030, 0x800037) AM_WRITE_LEGACY(cps1_coinctrl_w)
AM_RANGE(0x800030, 0x800037) AM_WRITE(cps1_coinctrl_w)
/* Forgotten Worlds has dial controls on B-board mapped at 800040-80005f. See DRIVER_INIT */
AM_RANGE(0x800100, 0x80013f) AM_WRITE_LEGACY(cps1_cps_a_w) AM_BASE(m_cps_a_regs) /* CPS-A custom */
/* CPS-B custom is mapped by the PAL IOB2 on the B-board. SF2 revision "E" World and USA 910228 has it a a different
@ -591,13 +589,13 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( qsound_main_map, AS_PROGRAM, 16, cps_state )
AM_RANGE(0x000000, 0x1fffff) AM_ROM
AM_RANGE(0x800000, 0x800007) AM_READ_PORT("IN1") /* Player input ports */
AM_RANGE(0x800018, 0x80001f) AM_READ_LEGACY(cps1_dsw_r) /* System input ports / Dip Switches */
AM_RANGE(0x800030, 0x800037) AM_WRITE_LEGACY(cps1_coinctrl_w)
AM_RANGE(0x800018, 0x80001f) AM_READ(cps1_dsw_r) /* System input ports / Dip Switches */
AM_RANGE(0x800030, 0x800037) AM_WRITE(cps1_coinctrl_w)
AM_RANGE(0x800100, 0x80013f) AM_WRITE_LEGACY(cps1_cps_a_w) AM_BASE(m_cps_a_regs) /* CPS-A custom */
AM_RANGE(0x800140, 0x80017f) AM_READWRITE_LEGACY(cps1_cps_b_r, cps1_cps_b_w) AM_BASE(m_cps_b_regs) /* CPS-B custom (mapped by LWIO/IOB1 PAL on B-board) */
AM_RANGE(0x900000, 0x92ffff) AM_RAM_WRITE_LEGACY(cps1_gfxram_w) AM_BASE_SIZE(m_gfxram, m_gfxram_size) /* SF2CE executes code from here */
AM_RANGE(0xf00000, 0xf0ffff) AM_READ(qsound_rom_r) /* Slammasters protection */
AM_RANGE(0xf18000, 0xf19fff) AM_READWRITE_LEGACY(qsound_sharedram1_r, qsound_sharedram1_w) /* Q RAM */
AM_RANGE(0xf18000, 0xf19fff) AM_READWRITE(qsound_sharedram1_r, qsound_sharedram1_w) /* Q RAM */
AM_RANGE(0xf1c000, 0xf1c001) AM_READ_PORT("IN2") /* Player 3 controls (later games) */
AM_RANGE(0xf1c002, 0xf1c003) AM_READ_PORT("IN3") /* Player 4 controls ("Muscle Bombers") */
AM_RANGE(0xf1c004, 0xf1c005) AM_WRITE(cpsq_coinctrl2_w) /* Coin control2 (later games) */

View File

@ -813,7 +813,7 @@ static READ16_HANDLER( joy_or_paddle_r )
static ADDRESS_MAP_START( cps2_map, AS_PROGRAM, 16, cps_state )
AM_RANGE(0x000000, 0x3fffff) AM_ROM /* 68000 ROM */
AM_RANGE(0x400000, 0x40000b) AM_RAM AM_BASE_SIZE(m_output, m_output_size) /* CPS2 object output */
AM_RANGE(0x618000, 0x619fff) AM_READWRITE_LEGACY(qsound_sharedram1_r, qsound_sharedram1_w) /* Q RAM */
AM_RANGE(0x618000, 0x619fff) AM_READWRITE(qsound_sharedram1_r, qsound_sharedram1_w) /* Q RAM */
AM_RANGE(0x662000, 0x662001) AM_RAM /* Network adapter related, accessed in SSF2TB */
AM_RANGE(0x662008, 0x662009) AM_RAM /* Network adapter related, accessed in SSF2TB */
AM_RANGE(0x662020, 0x662021) AM_RAM /* Network adapter related, accessed in SSF2TB */
@ -844,7 +844,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( dead_cps2_map, AS_PROGRAM, 16, cps_state )
AM_RANGE(0x000000, 0x3fffff) AM_ROM /* 68000 ROM */
AM_RANGE(0x400000, 0x40000b) AM_RAM AM_BASE_SIZE(m_output, m_output_size) /* CPS2 object output */
AM_RANGE(0x618000, 0x619fff) AM_READWRITE_LEGACY(qsound_sharedram1_r, qsound_sharedram1_w) /* Q RAM */
AM_RANGE(0x618000, 0x619fff) AM_READWRITE(qsound_sharedram1_r, qsound_sharedram1_w) /* Q RAM */
AM_RANGE(0x662000, 0x662001) AM_RAM /* Network adapter related, accessed in SSF2TB */
AM_RANGE(0x662008, 0x662009) AM_RAM /* Network adapter related, accessed in SSF2TB */
AM_RANGE(0x662020, 0x662021) AM_RAM /* Network adapter related, accessed in SSF2TB */

View File

@ -112,120 +112,110 @@ Todo & FIXME:
*
*************************************/
READ8_HANDLER( cvs_video_or_color_ram_r )
READ8_MEMBER(cvs_state::cvs_video_or_color_ram_r)
{
cvs_state *state = space->machine().driver_data<cvs_state>();
if (*state->m_fo_state)
return state->m_video_ram[offset];
if (*m_fo_state)
return m_video_ram[offset];
else
return state->m_color_ram[offset];
return m_color_ram[offset];
}
WRITE8_HANDLER( cvs_video_or_color_ram_w )
WRITE8_MEMBER(cvs_state::cvs_video_or_color_ram_w)
{
cvs_state *state = space->machine().driver_data<cvs_state>();
if (*state->m_fo_state)
state->m_video_ram[offset] = data;
if (*m_fo_state)
m_video_ram[offset] = data;
else
state->m_color_ram[offset] = data;
m_color_ram[offset] = data;
}
READ8_HANDLER( cvs_bullet_ram_or_palette_r )
READ8_MEMBER(cvs_state::cvs_bullet_ram_or_palette_r)
{
cvs_state *state = space->machine().driver_data<cvs_state>();
if (*state->m_fo_state)
return state->m_palette_ram[offset & 0x0f];
if (*m_fo_state)
return m_palette_ram[offset & 0x0f];
else
return state->m_bullet_ram[offset];
return m_bullet_ram[offset];
}
WRITE8_HANDLER( cvs_bullet_ram_or_palette_w )
WRITE8_MEMBER(cvs_state::cvs_bullet_ram_or_palette_w)
{
cvs_state *state = space->machine().driver_data<cvs_state>();
if (*state->m_fo_state)
state->m_palette_ram[offset & 0x0f] = data;
if (*m_fo_state)
m_palette_ram[offset & 0x0f] = data;
else
state->m_bullet_ram[offset] = data;
m_bullet_ram[offset] = data;
}
READ8_HANDLER( cvs_s2636_0_or_character_ram_r )
READ8_MEMBER(cvs_state::cvs_s2636_0_or_character_ram_r)
{
cvs_state *state = space->machine().driver_data<cvs_state>();
if (*state->m_fo_state)
return state->m_character_ram[(0 * 0x800) | 0x400 | state->m_character_ram_page_start | offset];
if (*m_fo_state)
return m_character_ram[(0 * 0x800) | 0x400 | m_character_ram_page_start | offset];
else
return s2636_work_ram_r(state->m_s2636_0, offset);
return s2636_work_ram_r(m_s2636_0, offset);
}
WRITE8_HANDLER( cvs_s2636_0_or_character_ram_w )
WRITE8_MEMBER(cvs_state::cvs_s2636_0_or_character_ram_w)
{
cvs_state *state = space->machine().driver_data<cvs_state>();
if (*state->m_fo_state)
if (*m_fo_state)
{
offset |= (0 * 0x800) | 0x400 | state->m_character_ram_page_start;
state->m_character_ram[offset] = data;
gfx_element_mark_dirty(space->machine().gfx[1], (offset / 8) % 256);
offset |= (0 * 0x800) | 0x400 | m_character_ram_page_start;
m_character_ram[offset] = data;
gfx_element_mark_dirty(machine().gfx[1], (offset / 8) % 256);
}
else
s2636_work_ram_w(state->m_s2636_0, offset, data);
s2636_work_ram_w(m_s2636_0, offset, data);
}
READ8_HANDLER( cvs_s2636_1_or_character_ram_r )
READ8_MEMBER(cvs_state::cvs_s2636_1_or_character_ram_r)
{
cvs_state *state = space->machine().driver_data<cvs_state>();
if (*state->m_fo_state)
return state->m_character_ram[(1 * 0x800) | 0x400 | state->m_character_ram_page_start | offset];
if (*m_fo_state)
return m_character_ram[(1 * 0x800) | 0x400 | m_character_ram_page_start | offset];
else
return s2636_work_ram_r(state->m_s2636_1, offset);
return s2636_work_ram_r(m_s2636_1, offset);
}
WRITE8_HANDLER( cvs_s2636_1_or_character_ram_w )
WRITE8_MEMBER(cvs_state::cvs_s2636_1_or_character_ram_w)
{
cvs_state *state = space->machine().driver_data<cvs_state>();
if (*state->m_fo_state)
if (*m_fo_state)
{
offset |= (1 * 0x800) | 0x400 | state->m_character_ram_page_start;
state->m_character_ram[offset] = data;
gfx_element_mark_dirty(space->machine().gfx[1], (offset / 8) % 256);
offset |= (1 * 0x800) | 0x400 | m_character_ram_page_start;
m_character_ram[offset] = data;
gfx_element_mark_dirty(machine().gfx[1], (offset / 8) % 256);
}
else
s2636_work_ram_w(state->m_s2636_1, offset, data);
s2636_work_ram_w(m_s2636_1, offset, data);
}
READ8_HANDLER( cvs_s2636_2_or_character_ram_r )
READ8_MEMBER(cvs_state::cvs_s2636_2_or_character_ram_r)
{
cvs_state *state = space->machine().driver_data<cvs_state>();
if (*state->m_fo_state)
return state->m_character_ram[(2 * 0x800) | 0x400 | state->m_character_ram_page_start | offset];
if (*m_fo_state)
return m_character_ram[(2 * 0x800) | 0x400 | m_character_ram_page_start | offset];
else
return s2636_work_ram_r(state->m_s2636_2, offset);
return s2636_work_ram_r(m_s2636_2, offset);
}
WRITE8_HANDLER( cvs_s2636_2_or_character_ram_w )
WRITE8_MEMBER(cvs_state::cvs_s2636_2_or_character_ram_w)
{
cvs_state *state = space->machine().driver_data<cvs_state>();
if (*state->m_fo_state)
if (*m_fo_state)
{
offset |= (2 * 0x800) | 0x400 | state->m_character_ram_page_start;
state->m_character_ram[offset] = data;
gfx_element_mark_dirty(space->machine().gfx[1], (offset / 8) % 256);
offset |= (2 * 0x800) | 0x400 | m_character_ram_page_start;
m_character_ram[offset] = data;
gfx_element_mark_dirty(machine().gfx[1], (offset / 8) % 256);
}
else
s2636_work_ram_w(state->m_s2636_2, offset, data);
s2636_work_ram_w(m_s2636_2, offset, data);
}
@ -484,11 +474,11 @@ WRITE8_MEMBER(cvs_state::audio_command_w)
static ADDRESS_MAP_START( cvs_main_cpu_map, AS_PROGRAM, 8, cvs_state )
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
AM_RANGE(0x0000, 0x13ff) AM_ROM
AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_READWRITE_LEGACY(cvs_bullet_ram_or_palette_r, cvs_bullet_ram_or_palette_w) AM_BASE(m_bullet_ram)
AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_READWRITE_LEGACY(cvs_s2636_2_or_character_ram_r, cvs_s2636_2_or_character_ram_w)
AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE_LEGACY(cvs_s2636_1_or_character_ram_r, cvs_s2636_1_or_character_ram_w)
AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_READWRITE_LEGACY(cvs_s2636_0_or_character_ram_r, cvs_s2636_0_or_character_ram_w)
AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE_LEGACY(cvs_video_or_color_ram_r, cvs_video_or_color_ram_w) AM_BASE(m_video_ram)
AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_bullet_ram_or_palette_r, cvs_bullet_ram_or_palette_w) AM_BASE(m_bullet_ram)
AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_2_or_character_ram_r, cvs_s2636_2_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_0_or_character_ram_r, cvs_s2636_0_or_character_ram_w)
AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE(cvs_video_or_color_ram_r, cvs_video_or_color_ram_w) AM_BASE(m_video_ram)
AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM
AM_RANGE(0x2000, 0x33ff) AM_ROM
AM_RANGE(0x4000, 0x53ff) AM_ROM

View File

@ -332,25 +332,25 @@ ADDRESS_MAP_END
READ16_HANDLER( slyspy_controls_r )
READ16_MEMBER(dec0_state::slyspy_controls_r)
{
switch (offset<<1)
{
case 0: /* Dip Switches */
return input_port_read(space->machine(), "DSW");
return input_port_read(machine(), "DSW");
case 2: /* Player 1 & Player 2 joysticks & fire buttons */
return input_port_read(space->machine(), "INPUTS");
return input_port_read(machine(), "INPUTS");
case 4: /* Credits */
return input_port_read(space->machine(), "SYSTEM");
return input_port_read(machine(), "SYSTEM");
}
logerror("Unknown control read at 30c000 %d\n", offset);
return ~0;
}
READ16_HANDLER( slyspy_protection_r )
READ16_MEMBER(dec0_state::slyspy_protection_r)
{
/* These values are for Boulderdash, I have no idea what they do in Slyspy */
switch (offset<<1) {
@ -360,7 +360,7 @@ READ16_HANDLER( slyspy_protection_r )
case 6: return 0x2;
}
logerror("%04x, Unknown protection read at 30c000 %d\n", cpu_get_pc(&space->device()), offset);
logerror("%04x, Unknown protection read at 30c000 %d\n", cpu_get_pc(&space.device()), offset);
return 0;
}
@ -406,19 +406,17 @@ WRITE16_MEMBER(dec0_state::unmapped_w)
void slyspy_set_protection_map(running_machine& machine, int type);
WRITE16_HANDLER( slyspy_state_w )
WRITE16_MEMBER(dec0_state::slyspy_state_w)
{
dec0_state *state = space->machine().driver_data<dec0_state>();
state->m_slyspy_state=0;
slyspy_set_protection_map(space->machine(), state->m_slyspy_state);
m_slyspy_state=0;
slyspy_set_protection_map(machine(), m_slyspy_state);
}
READ16_HANDLER( slyspy_state_r )
READ16_MEMBER(dec0_state::slyspy_state_r)
{
dec0_state *state = space->machine().driver_data<dec0_state>();
state->m_slyspy_state++;
state->m_slyspy_state=state->m_slyspy_state%4;
slyspy_set_protection_map(space->machine(), state->m_slyspy_state);
m_slyspy_state++;
m_slyspy_state=m_slyspy_state%4;
slyspy_set_protection_map(machine(), m_slyspy_state);
return 0; /* Value doesn't mater */
}
@ -433,8 +431,8 @@ void slyspy_set_protection_map(running_machine& machine, int type)
space->install_write_handler( 0x240000, 0x24ffff, write16_delegate(FUNC(dec0_state::unmapped_w),state));
space->install_legacy_write_handler( 0x24a000, 0x24a001, FUNC(slyspy_state_w));
space->install_legacy_read_handler( 0x244000, 0x244001, FUNC(slyspy_state_r));
space->install_write_handler( 0x24a000, 0x24a001, write16_delegate(FUNC(dec0_state::slyspy_state_w),state));
space->install_read_handler( 0x244000, 0x244001, read16_delegate(FUNC(dec0_state::slyspy_state_r),state));
switch (type)
{
@ -511,8 +509,8 @@ static ADDRESS_MAP_START( slyspy_map, AS_PROGRAM, 16, dec0_state )
AM_RANGE(0x308000, 0x3087ff) AM_RAM AM_BASE(m_spriteram) /* Sprites */
AM_RANGE(0x310000, 0x3107ff) AM_RAM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_SHARE("paletteram")
AM_RANGE(0x314000, 0x314003) AM_WRITE(slyspy_control_w)
AM_RANGE(0x314008, 0x31400f) AM_READ_LEGACY(slyspy_controls_r)
AM_RANGE(0x31c000, 0x31c00f) AM_READ_LEGACY(slyspy_protection_r) AM_WRITENOP
AM_RANGE(0x314008, 0x31400f) AM_READ(slyspy_controls_r)
AM_RANGE(0x31c000, 0x31c00f) AM_READ(slyspy_protection_r) AM_WRITENOP
ADDRESS_MAP_END
@ -599,7 +597,7 @@ static ADDRESS_MAP_START( secretab_map, AS_PROGRAM, 16, dec0_state )
// AM_RANGE(0x340000, 0x34007f) AM_DEVREADWRITE_LEGACY("tilegen1", deco_bac06_pf_colscroll_r, deco_bac06_pf_colscroll_w)
// AM_RANGE(0x340400, 0x3407ff) AM_DEVREADWRITE_LEGACY("tilegen1", deco_bac06_pf_rowscroll_r, deco_bac06_pf_rowscroll_w)
AM_RANGE(0x314008, 0x31400f) AM_READ_LEGACY(slyspy_controls_r)
AM_RANGE(0x314008, 0x31400f) AM_READ(slyspy_controls_r)
// AM_RANGE(0x314000, 0x314003) AM_WRITE(slyspy_control_w)
AM_RANGE(0x300000, 0x300007) AM_DEVWRITE_LEGACY("tilegen3", deco_bac06_pf_control_0_w)

View File

@ -72,10 +72,9 @@ WRITE8_MEMBER(espial_state::espial_master_interrupt_mask_w)
}
WRITE8_HANDLER( espial_sound_nmi_mask_w )
WRITE8_MEMBER(espial_state::espial_sound_nmi_mask_w)
{
espial_state *state = space->machine().driver_data<espial_state>();
state->m_sound_nmi_enabled = data & 1;
m_sound_nmi_enabled = data & 1;
}
static TIMER_DEVICE_CALLBACK( espial_scanline )
@ -156,7 +155,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( espial_sound_map, AS_PROGRAM, 8, espial_state )
AM_RANGE(0x0000, 0x1fff) AM_ROM
AM_RANGE(0x2000, 0x23ff) AM_RAM
AM_RANGE(0x4000, 0x4000) AM_WRITE_LEGACY(espial_sound_nmi_mask_w)
AM_RANGE(0x4000, 0x4000) AM_WRITE(espial_sound_nmi_mask_w)
AM_RANGE(0x6000, 0x6000) AM_READWRITE(soundlatch_r, soundlatch2_w)
ADDRESS_MAP_END

View File

@ -381,12 +381,12 @@ static SCREEN_UPDATE_IND16( kodb )
static ADDRESS_MAP_START( fcrash_map, AS_PROGRAM, 16, cps_state )
AM_RANGE(0x000000, 0x1fffff) AM_ROM
AM_RANGE(0x800030, 0x800031) AM_WRITE_LEGACY(cps1_coinctrl_w)
AM_RANGE(0x800030, 0x800031) AM_WRITE(cps1_coinctrl_w)
AM_RANGE(0x800100, 0x80013f) AM_RAM AM_BASE(m_cps_a_regs) /* CPS-A custom */
AM_RANGE(0x800140, 0x80017f) AM_RAM AM_BASE(m_cps_b_regs) /* CPS-B custom */
AM_RANGE(0x880000, 0x880001) AM_READ_PORT("IN1") /* Player input ports */
AM_RANGE(0x880006, 0x880007) AM_WRITE_LEGACY(fcrash_soundlatch_w) /* Sound command */
AM_RANGE(0x880008, 0x88000f) AM_READ_LEGACY(cps1_dsw_r) /* System input ports / Dip Switches */
AM_RANGE(0x880008, 0x88000f) AM_READ(cps1_dsw_r) /* System input ports / Dip Switches */
AM_RANGE(0x890000, 0x890001) AM_WRITENOP // palette related?
AM_RANGE(0x900000, 0x92ffff) AM_RAM_WRITE_LEGACY(cps1_gfxram_w) AM_BASE_SIZE(m_gfxram, m_gfxram_size)
AM_RANGE(0xff0000, 0xffffff) AM_RAM
@ -409,9 +409,9 @@ static ADDRESS_MAP_START( kodb_map, AS_PROGRAM, 16, cps_state )
AM_RANGE(0x000000, 0x3fffff) AM_ROM
AM_RANGE(0x800000, 0x800007) AM_READ_PORT("IN1") /* Player input ports */
/* forgottn, willow, cawing, nemo, varth read from 800010. Probably debug input leftover from development */
AM_RANGE(0x800018, 0x80001f) AM_READ_LEGACY(cps1_dsw_r) /* System input ports / Dip Switches */
AM_RANGE(0x800018, 0x80001f) AM_READ(cps1_dsw_r) /* System input ports / Dip Switches */
AM_RANGE(0x800020, 0x800021) AM_READNOP /* ? Used by Rockman ? not mapped according to PAL */
AM_RANGE(0x800030, 0x800037) AM_WRITE_LEGACY(cps1_coinctrl_w)
AM_RANGE(0x800030, 0x800037) AM_WRITE(cps1_coinctrl_w)
/* Forgotten Worlds has dial controls on B-board mapped at 800040-80005f. See DRIVER_INIT */
AM_RANGE(0x800100, 0x80013f) AM_WRITE_LEGACY(cps1_cps_a_w) AM_BASE(m_cps_a_regs) /* CPS-A custom */
AM_RANGE(0x800140, 0x80017f) AM_READWRITE_LEGACY(cps1_cps_b_r, cps1_cps_b_w) AM_BASE(m_cps_b_regs) /* CPS-B custom */

View File

@ -85,7 +85,7 @@ static WRITE8_HANDLER(galaxia_video_w)
galaxia_state *state = space->machine().driver_data<galaxia_state>();
// space->machine().primary_screen->update_partial(space->machine().primary_screen->vpos());
state->m_bg_tilemap->mark_tile_dirty(offset);
cvs_video_or_color_ram_w(space, offset, data);
state->cvs_video_or_color_ram_w(*space, offset, data);
}
static WRITE8_HANDLER(galaxia_scroll_w)
@ -130,7 +130,7 @@ static ADDRESS_MAP_START( galaxia_mem_map, AS_PROGRAM, 8, galaxia_state )
AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_DEVREADWRITE_LEGACY("s2636_0", s2636_work_ram_r, s2636_work_ram_w)
AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_DEVREADWRITE_LEGACY("s2636_1", s2636_work_ram_r, s2636_work_ram_w)
AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_DEVREADWRITE_LEGACY("s2636_2", s2636_work_ram_r, s2636_work_ram_w)
AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE_LEGACY(cvs_video_or_color_ram_r, galaxia_video_w) AM_BASE(m_video_ram)
AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READ(cvs_video_or_color_ram_r) AM_WRITE_LEGACY(galaxia_video_w) AM_BASE(m_video_ram)
AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM
AM_RANGE(0x2000, 0x33ff) AM_ROM
AM_RANGE(0x7214, 0x7214) AM_READ_PORT("IN0")
@ -140,7 +140,7 @@ static ADDRESS_MAP_START( astrowar_mem_map, AS_PROGRAM, 8, galaxia_state )
AM_RANGE(0x0000, 0x13ff) AM_ROM
AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_RAM
AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_DEVREADWRITE_LEGACY("s2636_0", s2636_work_ram_r, s2636_work_ram_w)
AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE_LEGACY(cvs_video_or_color_ram_r, galaxia_video_w) AM_BASE(m_video_ram)
AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READ(cvs_video_or_color_ram_r) AM_WRITE_LEGACY(galaxia_video_w) AM_BASE(m_video_ram)
AM_RANGE(0x1c00, 0x1cff) AM_MIRROR(0x6000) AM_RAM AM_BASE(m_bullet_ram)
AM_RANGE(0x2000, 0x33ff) AM_ROM
ADDRESS_MAP_END

View File

@ -460,7 +460,7 @@ or Fatal Fury for example).
#ifdef UNUSED_FUNCTION
WRITE32_HANDLER( trap_write )
WRITE32_MEMBER(hng64_state::trap_write)
{
logerror("Remapped write... %08x %08x\n",offset,data);
}
@ -808,7 +808,7 @@ READ32_MEMBER(hng64_state::hng64_3d_1_r)
}
#ifdef UNUSED_FUNCTION
WRITE32_HANDLER( hng64_3d_1_w )
WRITE32_MEMBER(hng64_state::hng64_3d_1_w)
{
fatalerror("WRITE32_HANDLER( hng64_3d_1_w )");
}
@ -887,7 +887,7 @@ WRITE32_MEMBER(hng64_state::dl_control_w)
}
#ifdef UNUSED_FUNCTION
WRITE32_HANDLER( activate_3d_buffer )
WRITE32_MEMBER(hng64_state::activate_3d_buffer)
{
COMBINE_DATA (&active_3d_buffer[offset]);
mame_printf_debug("COMBINED %d\n", active_3d_buffer[offset]);
@ -1210,7 +1210,7 @@ WRITE8_MEMBER(hng64_state::hng64_comm_io_mmu)
}
#ifdef UNUSED_FUNCTION
READ8_HANDLER( hng64_comm_shared_r )
READ8_MEMBER(hng64_state::hng64_comm_shared_r)
{
// I'm thinking 0x54 comes from an interrupt on the MIPS CPU? Or maybe the Toshiba one?
// Nothing from CPU0 seems to ping the COM CPU as often as it reads 0x54.
@ -1226,7 +1226,7 @@ READ8_HANDLER( hng64_comm_shared_r )
if (offset==0x04) (hng64_com_shared_b & 0x000000ff) ? return 0xff : return 0x00;
}
WRITE8_HANDLER( hng64_comm_shared_w )
WRITE8_MEMBER(hng64_state::hng64_comm_shared_w)
{
if (offset==0x00) hng64_com_shared_a = (hng64_com_shared_a & 0x00ffffff) | (data << 24);
if (offset==0x01) hng64_com_shared_a = (hng64_com_shared_a & 0xff00ffff) | (data << 16);
@ -1258,7 +1258,7 @@ static ADDRESS_MAP_START( hng_comm_io_map, AS_IO, 8, hng64_state )
// AM_RANGE(0x3c,0x3f) AM_NOP /* Reserved */
/* General IO */
AM_RANGE(0x50,0x54) AM_NOP // AM_WRITE_LEGACY(hng64_comm_shared_r, hng64_comm_shared_w)
AM_RANGE(0x50,0x54) AM_NOP // AM_WRITE(hng64_comm_shared_r, hng64_comm_shared_w)
// AM_RANGE(0x72,0x72) AM_WRITE /* dunno yet */
ADDRESS_MAP_END

View File

@ -1614,28 +1614,27 @@ static WRITE8_DEVICE_HANDLER( ic3ss_o3_callback )
/* This is a bit of a cheat - since we don't clock into the OKI chip directly, we need to
calculate the oscillation frequency in advance. We're running the timer for interrupt
purposes, but the frequency calculation is done by plucking the values out as they are written.*/
WRITE8_HANDLER( ic3ss_w )
WRITE8_MEMBER(mpu4_state::ic3ss_w)
{
device_t *ic3ss = space->machine().device("ptm_ic3ss");
mpu4_state *state = space->machine().driver_data<mpu4_state>();
device_t *ic3ss = machine().device("ptm_ic3ss");
downcast<ptm6840_device *>(ic3ss)->write(offset,data);
device_t *msm6376 = space->machine().device("msm6376");
device_t *msm6376 = machine().device("msm6376");
if (offset == 3)
{
state->m_t1 = data;
m_t1 = data;
}
if (offset == 6)
{
state->m_t3h = data;
m_t3h = data;
}
if (offset == 7)
{
state->m_t3l = data;
m_t3l = data;
}
float num = (1720000/((state->m_t3l + 1)*(state->m_t3h + 1)));
float denom1 = ((state->m_t3h *(state->m_t3l + 1)+ 1)/(2*(state->m_t1 + 1)));
float num = (1720000/((m_t3l + 1)*(m_t3h + 1)));
float denom1 = ((m_t3h *(m_t3l + 1)+ 1)/(2*(m_t1 + 1)));
int denom2 = denom1 +0.5;//need to round up, this gives same precision as chip
int freq=num*denom2;
@ -2598,12 +2597,13 @@ void mpu4_install_mod4yam_space(address_space *space)
void mpu4_install_mod4oki_space(address_space *space)
{
mpu4_state *state = space->machine().driver_data<mpu4_state>();
pia6821_device *pia_ic4ss = space->machine().device<pia6821_device>("pia_ic4ss");
ptm6840_device *ptm_ic3ss = space->machine().device<ptm6840_device>("ptm_ic3ss");
space->install_readwrite_handler(0x0880, 0x0883, 0, 0, read8_delegate(FUNC(pia6821_device::read), pia_ic4ss), write8_delegate(FUNC(pia6821_device::write), pia_ic4ss));
space->install_read_handler(0x08c0, 0x08c7, 0, 0, read8_delegate(FUNC(ptm6840_device::read), ptm_ic3ss));
space->install_legacy_write_handler(0x08c0, 0x08c7, 0, 0, FUNC(ic3ss_w));
space->install_write_handler(0x08c0, 0x08c7, 0, 0, write8_delegate(FUNC(mpu4_state::ic3ss_w),state));
}
void mpu4_install_mod4bwb_space(address_space *space)

View File

@ -2004,7 +2004,7 @@ static ADDRESS_MAP_START( mpu4oki_68k_map, AS_PROGRAM, 16, mpu4_state )
AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_read, data_write, 0xff)
AM_RANGE(0xff9000, 0xff900f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0xff)
AM_RANGE(0xffa040, 0xffa04f) AM_DEVREAD8("ptm_ic3ss", ptm6840_device, read,0xff) // 6840PTM on sampled sound board
AM_RANGE(0xffa040, 0xffa04f) AM_WRITE8_LEGACY(ic3ss_w,0x00ff) // 6840PTM on sampled sound board
AM_RANGE(0xffa040, 0xffa04f) AM_WRITE8(ic3ss_w,0x00ff) // 6840PTM on sampled sound board
AM_RANGE(0xffa060, 0xffa067) AM_DEVREADWRITE8("pia_ic4ss", pia6821_device, read, write,0x00ff) // PIA6821 on sampled sound board
AM_RANGE(0xffd000, 0xffd00f) AM_READWRITE_LEGACY(characteriser16_r, characteriser16_w)
// AM_RANGE(0xfff000, 0xffffff) AM_NOP /* Possible bug, reads and writes here */
@ -2061,7 +2061,7 @@ static ADDRESS_MAP_START( bwbvid5_68k_map, AS_PROGRAM, 16, mpu4_state )
AM_RANGE(0xe01000, 0xe0100f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0x00ff)
AM_RANGE(0xe02000, 0xe02007) AM_DEVREADWRITE8("pia_ic4ss", pia6821_device, read, write, 0xff00)
AM_RANGE(0xe03000, 0xe0300f) AM_DEVREAD8("ptm_ic3ss", ptm6840_device, read,0xff00) // 6840PTM on sampled sound board
AM_RANGE(0xe03000, 0xe0300f) AM_WRITE8_LEGACY(ic3ss_w,0xff00) // 6840PTM on sampled sound board
AM_RANGE(0xe03000, 0xe0300f) AM_WRITE8(ic3ss_w,0xff00) // 6840PTM on sampled sound board
AM_RANGE(0xe04000, 0xe0400f) AM_READWRITE_LEGACY(bwb_characteriser16_r, bwb_characteriser16_w)//AM_READWRITE_LEGACY(adpcm_r, adpcm_w) CHR ?
ADDRESS_MAP_END

View File

@ -823,14 +823,12 @@ static READ32_HANDLER( gunbulet_gun_r )
return result<<24;
} /* gunbulet_gun_r */
static
READ32_HANDLER( randgen_r )
READ32_MEMBER(namconb1_state::randgen_r)
{
return space->machine().rand();
return machine().rand();
} /* randgen_r */
static
WRITE32_HANDLER( srand_w )
WRITE32_MEMBER(namconb1_state::srand_w)
{
/**
* Used to seed the hardware random number generator.
@ -857,7 +855,7 @@ static ADDRESS_MAP_START( namconb1_am, AS_PROGRAM, 32, namconb1_state )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x100000, 0x10001f) AM_READ_LEGACY(gunbulet_gun_r)
AM_RANGE(0x1c0000, 0x1cffff) AM_RAM
AM_RANGE(0x1e4000, 0x1e4003) AM_READWRITE_LEGACY(randgen_r,srand_w)
AM_RANGE(0x1e4000, 0x1e4003) AM_READWRITE(randgen_r,srand_w)
AM_RANGE(0x200000, 0x207fff) AM_READWRITE_LEGACY(namconb_share_r, namconb_share_w)
AM_RANGE(0x208000, 0x2fffff) AM_RAM
AM_RANGE(0x400000, 0x40001f) AM_READWRITE_LEGACY(namconb_cpureg_r, namconb1_cpureg_w)
@ -874,7 +872,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( namconb2_am, AS_PROGRAM, 32, namconb1_state )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x1c0000, 0x1cffff) AM_RAM
AM_RANGE(0x1e4000, 0x1e4003) AM_READWRITE_LEGACY(randgen_r,srand_w)
AM_RANGE(0x1e4000, 0x1e4003) AM_READWRITE(randgen_r,srand_w)
AM_RANGE(0x200000, 0x207fff) AM_READWRITE_LEGACY(namconb_share_r, namconb_share_w)
AM_RANGE(0x208000, 0x2fffff) AM_RAM
AM_RANGE(0x400000, 0x4fffff) AM_ROM AM_REGION("data", 0)

View File

@ -444,22 +444,21 @@ WRITE16_MEMBER(neogeo_state::io_control_w)
*
*************************************/
READ16_HANDLER( neogeo_unmapped_r )
READ16_MEMBER(neogeo_state::neogeo_unmapped_r)
{
neogeo_state *state = space->machine().driver_data<neogeo_state>();
UINT16 ret;
/* unmapped memory returns the last word on the data bus, which is almost always the opcode
of the next instruction due to prefetch */
/* prevent recursion */
if (state->m_recurse)
if (m_recurse)
ret = 0xffff;
else
{
state->m_recurse = 1;
ret = space->read_word(cpu_get_pc(&space->device()));
state->m_recurse = 0;
m_recurse = 1;
ret = space.read_word(cpu_get_pc(&space.device()));
m_recurse = 0;
}
return ret;
@ -1092,21 +1091,21 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, neogeo_state )
AM_RANGE(0x2ffff0, 0x2fffff) AM_WRITE(main_cpu_bank_select_w)
AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01ff7e) AM_READ_PORT("IN0")
AM_RANGE(0x300080, 0x300081) AM_MIRROR(0x01ff7e) AM_READ_PORT("IN4")
AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01ffe0) AM_READ_LEGACY(neogeo_unmapped_r) AM_WRITE(watchdog_w)
AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01ffe0) AM_READ(neogeo_unmapped_r) AM_WRITE(watchdog_w)
AM_RANGE(0x320000, 0x320001) AM_MIRROR(0x01fffe) AM_READ_PORT("IN3") AM_WRITE(audio_command_w)
AM_RANGE(0x340000, 0x340001) AM_MIRROR(0x01fffe) AM_READ_PORT("IN1")
AM_RANGE(0x360000, 0x37ffff) AM_READ_LEGACY(neogeo_unmapped_r)
AM_RANGE(0x360000, 0x37ffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0x380000, 0x380001) AM_MIRROR(0x01fffe) AM_READ_PORT("IN2")
AM_RANGE(0x380000, 0x38007f) AM_MIRROR(0x01ff80) AM_WRITE(io_control_w)
AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READ_LEGACY(neogeo_unmapped_r) AM_WRITE(system_control_w)
AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READ(neogeo_unmapped_r) AM_WRITE(system_control_w)
AM_RANGE(0x3c0000, 0x3c0007) AM_MIRROR(0x01fff8) AM_READ_LEGACY(neogeo_video_register_r)
AM_RANGE(0x3c0000, 0x3c000f) AM_MIRROR(0x01fff0) AM_WRITE_LEGACY(neogeo_video_register_w)
AM_RANGE(0x3e0000, 0x3fffff) AM_READ_LEGACY(neogeo_unmapped_r)
AM_RANGE(0x3e0000, 0x3fffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0x400000, 0x401fff) AM_MIRROR(0x3fe000) AM_READWRITE_LEGACY(neogeo_paletteram_r, neogeo_paletteram_w)
AM_RANGE(0x800000, 0x800fff) AM_READWRITE(memcard_r, memcard_w)
AM_RANGE(0xc00000, 0xc1ffff) AM_MIRROR(0x0e0000) AM_ROMBANK(NEOGEO_BANK_BIOS)
AM_RANGE(0xd00000, 0xd0ffff) AM_MIRROR(0x0f0000) AM_RAM_WRITE(save_ram_w) AM_BASE_LEGACY(&save_ram)
AM_RANGE(0xe00000, 0xffffff) AM_READ_LEGACY(neogeo_unmapped_r)
AM_RANGE(0xe00000, 0xffffff) AM_READ(neogeo_unmapped_r)
ADDRESS_MAP_END

View File

@ -119,11 +119,11 @@ static READ8_HANDLER( audio_t1_r )
static ADDRESS_MAP_START( quasar, AS_PROGRAM, 8, quasar_state )
AM_RANGE(0x0000, 0x13ff) AM_ROM
AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_READWRITE_LEGACY(cvs_bullet_ram_or_palette_r, quasar_bullet_w) AM_BASE(m_bullet_ram)
AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_READWRITE_LEGACY(cvs_s2636_0_or_character_ram_r, cvs_s2636_0_or_character_ram_w)
AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE_LEGACY(cvs_s2636_1_or_character_ram_r, cvs_s2636_1_or_character_ram_w)
AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_READWRITE_LEGACY(cvs_s2636_2_or_character_ram_r, cvs_s2636_2_or_character_ram_w)
AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE_LEGACY(cvs_video_or_color_ram_r, quasar_video_w) AM_BASE(m_video_ram)
AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_READ(cvs_bullet_ram_or_palette_r) AM_WRITE_LEGACY(quasar_bullet_w) AM_BASE(m_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_READ(cvs_video_or_color_ram_r) AM_WRITE_LEGACY(quasar_video_w) AM_BASE(m_video_ram)
AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM
AM_RANGE(0x2000, 0x33ff) AM_ROM
AM_RANGE(0x4000, 0x53ff) AM_ROM

View File

@ -289,80 +289,71 @@ static DRIVER_INIT( kuniokunb )
***************************************************************************/
READ8_HANDLER( renegade_68705_port_a_r )
READ8_MEMBER(renegade_state::renegade_68705_port_a_r)
{
renegade_state *state = space->machine().driver_data<renegade_state>();
return (state->m_port_a_out & state->m_ddr_a) | (state->m_port_a_in & ~state->m_ddr_a);
return (m_port_a_out & m_ddr_a) | (m_port_a_in & ~m_ddr_a);
}
WRITE8_HANDLER( renegade_68705_port_a_w )
WRITE8_MEMBER(renegade_state::renegade_68705_port_a_w)
{
renegade_state *state = space->machine().driver_data<renegade_state>();
state->m_port_a_out = data;
m_port_a_out = data;
}
WRITE8_HANDLER( renegade_68705_ddr_a_w )
WRITE8_MEMBER(renegade_state::renegade_68705_ddr_a_w)
{
renegade_state *state = space->machine().driver_data<renegade_state>();
state->m_ddr_a = data;
m_ddr_a = data;
}
READ8_HANDLER( renegade_68705_port_b_r )
READ8_MEMBER(renegade_state::renegade_68705_port_b_r)
{
renegade_state *state = space->machine().driver_data<renegade_state>();
return (state->m_port_b_out & state->m_ddr_b) | (state->m_port_b_in & ~state->m_ddr_b);
return (m_port_b_out & m_ddr_b) | (m_port_b_in & ~m_ddr_b);
}
WRITE8_HANDLER( renegade_68705_port_b_w )
WRITE8_MEMBER(renegade_state::renegade_68705_port_b_w)
{
renegade_state *state = space->machine().driver_data<renegade_state>();
if ((state->m_ddr_b & 0x02) && (~data & 0x02) && (state->m_port_b_out & 0x02))
if ((m_ddr_b & 0x02) && (~data & 0x02) && (m_port_b_out & 0x02))
{
state->m_port_a_in = state->m_from_main;
m_port_a_in = m_from_main;
if (state->m_main_sent)
cputag_set_input_line(space->machine(), "mcu", 0, CLEAR_LINE);
if (m_main_sent)
cputag_set_input_line(machine(), "mcu", 0, CLEAR_LINE);
state->m_main_sent = 0;
m_main_sent = 0;
}
if ((state->m_ddr_b & 0x04) && (data & 0x04) && (~state->m_port_b_out & 0x04))
if ((m_ddr_b & 0x04) && (data & 0x04) && (~m_port_b_out & 0x04))
{
state->m_from_mcu = state->m_port_a_out;
state->m_mcu_sent = 1;
m_from_mcu = m_port_a_out;
m_mcu_sent = 1;
}
state->m_port_b_out = data;
m_port_b_out = data;
}
WRITE8_HANDLER( renegade_68705_ddr_b_w )
WRITE8_MEMBER(renegade_state::renegade_68705_ddr_b_w)
{
renegade_state *state = space->machine().driver_data<renegade_state>();
state->m_ddr_b = data;
m_ddr_b = data;
}
READ8_HANDLER( renegade_68705_port_c_r )
READ8_MEMBER(renegade_state::renegade_68705_port_c_r)
{
renegade_state *state = space->machine().driver_data<renegade_state>();
state->m_port_c_in = 0;
if (state->m_main_sent)
state->m_port_c_in |= 0x01;
if (!state->m_mcu_sent)
state->m_port_c_in |= 0x02;
m_port_c_in = 0;
if (m_main_sent)
m_port_c_in |= 0x01;
if (!m_mcu_sent)
m_port_c_in |= 0x02;
return (state->m_port_c_out & state->m_ddr_c) | (state->m_port_c_in & ~state->m_ddr_c);
return (m_port_c_out & m_ddr_c) | (m_port_c_in & ~m_ddr_c);
}
WRITE8_HANDLER( renegade_68705_port_c_w )
WRITE8_MEMBER(renegade_state::renegade_68705_port_c_w)
{
renegade_state *state = space->machine().driver_data<renegade_state>();
state->m_port_c_out = data;
m_port_c_out = data;
}
WRITE8_HANDLER( renegade_68705_ddr_c_w )
WRITE8_MEMBER(renegade_state::renegade_68705_ddr_c_w)
{
renegade_state *state = space->machine().driver_data<renegade_state>();
state->m_ddr_c = data;
m_ddr_c = data;
}
@ -683,12 +674,12 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( renegade_mcu_map, AS_PROGRAM, 8, renegade_state )
ADDRESS_MAP_GLOBAL_MASK(0x7ff)
AM_RANGE(0x0000, 0x0000) AM_READWRITE_LEGACY(renegade_68705_port_a_r, renegade_68705_port_a_w)
AM_RANGE(0x0001, 0x0001) AM_READWRITE_LEGACY(renegade_68705_port_b_r, renegade_68705_port_b_w)
AM_RANGE(0x0002, 0x0002) AM_READWRITE_LEGACY(renegade_68705_port_c_r, renegade_68705_port_c_w)
AM_RANGE(0x0004, 0x0004) AM_WRITE_LEGACY(renegade_68705_ddr_a_w)
AM_RANGE(0x0005, 0x0005) AM_WRITE_LEGACY(renegade_68705_ddr_b_w)
AM_RANGE(0x0006, 0x0006) AM_WRITE_LEGACY(renegade_68705_ddr_c_w)
AM_RANGE(0x0000, 0x0000) AM_READWRITE(renegade_68705_port_a_r, renegade_68705_port_a_w)
AM_RANGE(0x0001, 0x0001) AM_READWRITE(renegade_68705_port_b_r, renegade_68705_port_b_w)
AM_RANGE(0x0002, 0x0002) AM_READWRITE(renegade_68705_port_c_r, renegade_68705_port_c_w)
AM_RANGE(0x0004, 0x0004) AM_WRITE(renegade_68705_ddr_a_w)
AM_RANGE(0x0005, 0x0005) AM_WRITE(renegade_68705_ddr_b_w)
AM_RANGE(0x0006, 0x0006) AM_WRITE(renegade_68705_ddr_c_w)
// AM_RANGE(0x0008, 0x0008) AM_READWRITE_LEGACY(m68705_tdr_r, m68705_tdr_w)
// AM_RANGE(0x0009, 0x0009) AM_READWRITE_LEGACY(m68705_tcr_r, m68705_tcr_w)
AM_RANGE(0x0010, 0x007f) AM_RAM

View File

@ -2032,12 +2032,11 @@ static READ32_HANDLER ( viprp1o_speedup_r )
#ifdef UNUSED_FUNCTION
// causes input problems?
READ32_HANDLER ( ejanhs_speedup_r )
READ32_MEMBER(seibuspi_state::ejanhs_speedup_r)
{
seibuspi_state *state = space->machine().driver_data<seibuspi_state>();
// mame_printf_debug("%08x\n",cpu_get_pc(&space->device()));
if (cpu_get_pc(&space->device())==0x03032c7) device_spin_until_interrupt(&space->device()); // idle
return state->m_spimainram[(0x002d224-0x800)/4];
// mame_printf_debug("%08x\n",cpu_get_pc(&space.device()));
if (cpu_get_pc(&space.device())==0x03032c7) device_spin_until_interrupt(&space.device()); // idle
return m_spimainram[(0x002d224-0x800)/4];
}
#endif

View File

@ -115,20 +115,19 @@ static MACHINE_RESET( sshangha )
/******************************************************************************/
INLINE void set_color_888(running_machine &machine, pen_t color, int rshift, int gshift, int bshift, UINT32 data)
INLINE void sshangha_set_color_888(running_machine &machine, pen_t color, int rshift, int gshift, int bshift, UINT32 data)
{
palette_set_color_rgb(machine, color, (data >> rshift) & 0xff, (data >> gshift) & 0xff, (data >> bshift) & 0xff);
}
WRITE16_HANDLER( paletteram16_xbgr_word_be_sprites2_w )
WRITE16_MEMBER(sshangha_state::paletteram16_xbgr_word_be_sprites2_w)
{
sshangha_state *state = space->machine().driver_data<sshangha_state>();
COMBINE_DATA(&state->m_sprite_paletteram2[offset]);
set_color_888(space->machine(), (offset/2)+0x100, 0, 8, 16, state->m_sprite_paletteram2[(offset) | 1] | (state->m_sprite_paletteram2[(offset) & ~1] << 16) );
COMBINE_DATA(&m_sprite_paletteram2[offset]);
sshangha_set_color_888(machine(), (offset/2)+0x100, 0, 8, 16, m_sprite_paletteram2[(offset) | 1] | (m_sprite_paletteram2[(offset) & ~1] << 16) );
}
WRITE16_HANDLER( paletteram16_xbgr_word_be_sprites_w )
WRITE16_MEMBER(sshangha_state::paletteram16_xbgr_word_be_sprites_w)
{
// hack??? we have to call this otherwise the sprite colours for some selected tiles are wrong (most noticeable on the 2nd level of quest mode)
// however if we simply mirror the memory both ways the how to play screen ends up with bad colours
@ -137,23 +136,20 @@ WRITE16_HANDLER( paletteram16_xbgr_word_be_sprites_w )
// maybe related to sprite DMA on the original, or the apparent lack of a 2nd sprite controller on the bootleg.
paletteram16_xbgr_word_be_sprites2_w(space,offset,data,mem_mask);
sshangha_state *state = space->machine().driver_data<sshangha_state>();
COMBINE_DATA(&state->m_sprite_paletteram[offset]);
set_color_888(space->machine(), (offset/2)+0x000, 0, 8, 16, state->m_sprite_paletteram[(offset) | 1] | (state->m_sprite_paletteram[(offset) & ~1] << 16) );
COMBINE_DATA(&m_sprite_paletteram[offset]);
sshangha_set_color_888(machine(), (offset/2)+0x000, 0, 8, 16, m_sprite_paletteram[(offset) | 1] | (m_sprite_paletteram[(offset) & ~1] << 16) );
}
WRITE16_HANDLER( paletteram16_xbgr_word_be_tilelow_w )
WRITE16_MEMBER(sshangha_state::paletteram16_xbgr_word_be_tilelow_w)
{
sshangha_state *state = space->machine().driver_data<sshangha_state>();
COMBINE_DATA(&state->m_tile_paletteram1[offset]);
set_color_888(space->machine(), (offset/2)+0x200, 0, 8, 16, state->m_tile_paletteram1[(offset) | 1] | (state->m_tile_paletteram1[(offset) & ~1] << 16) );
COMBINE_DATA(&m_tile_paletteram1[offset]);
sshangha_set_color_888(machine(), (offset/2)+0x200, 0, 8, 16, m_tile_paletteram1[(offset) | 1] | (m_tile_paletteram1[(offset) & ~1] << 16) );
}
WRITE16_HANDLER( paletteram16_xbgr_word_be_tilehigh_w )
WRITE16_MEMBER(sshangha_state::paletteram16_xbgr_word_be_tilehigh_w)
{
sshangha_state *state = space->machine().driver_data<sshangha_state>();
COMBINE_DATA(&state->m_tile_paletteram2[offset]);
set_color_888(space->machine(), (offset/2)+0x300, 0, 8, 16, state->m_tile_paletteram2[(offset) | 1] | (state->m_tile_paletteram2[(offset) & ~1] << 16) );
COMBINE_DATA(&m_tile_paletteram2[offset]);
sshangha_set_color_888(machine(), (offset/2)+0x300, 0, 8, 16, m_tile_paletteram2[(offset) | 1] | (m_tile_paletteram2[(offset) & ~1] << 16) );
}
static ADDRESS_MAP_START( sshangha_map, AS_PROGRAM, 16, sshangha_state )
@ -177,10 +173,10 @@ static ADDRESS_MAP_START( sshangha_map, AS_PROGRAM, 16, sshangha_state )
AM_RANGE(0x370000, 0x370001) AM_READ(deco_71_r)
AM_RANGE(0x370000, 0x370007) AM_WRITENOP
AM_RANGE(0x380000, 0x3803ff) AM_RAM_WRITE_LEGACY(paletteram16_xbgr_word_be_sprites_w) AM_BASE(m_sprite_paletteram)
AM_RANGE(0x380400, 0x3807ff) AM_RAM_WRITE_LEGACY(paletteram16_xbgr_word_be_tilehigh_w) AM_BASE(m_tile_paletteram2)
AM_RANGE(0x380800, 0x380bff) AM_RAM_WRITE_LEGACY(paletteram16_xbgr_word_be_sprites2_w) AM_BASE(m_sprite_paletteram2)
AM_RANGE(0x380c00, 0x380fff) AM_RAM_WRITE_LEGACY(paletteram16_xbgr_word_be_tilelow_w) AM_BASE(m_tile_paletteram1)
AM_RANGE(0x380000, 0x3803ff) AM_RAM_WRITE(paletteram16_xbgr_word_be_sprites_w) AM_BASE(m_sprite_paletteram)
AM_RANGE(0x380400, 0x3807ff) AM_RAM_WRITE(paletteram16_xbgr_word_be_tilehigh_w) AM_BASE(m_tile_paletteram2)
AM_RANGE(0x380800, 0x380bff) AM_RAM_WRITE(paletteram16_xbgr_word_be_sprites2_w) AM_BASE(m_sprite_paletteram2)
AM_RANGE(0x380c00, 0x380fff) AM_RAM_WRITE(paletteram16_xbgr_word_be_tilelow_w) AM_BASE(m_tile_paletteram1)
AM_RANGE(0x381000, 0x383fff) AM_RAM // unused palette area
AM_RANGE(0xfec000, 0xff3fff) AM_RAM
@ -204,10 +200,10 @@ static ADDRESS_MAP_START( sshanghb_map, AS_PROGRAM, 16, sshangha_state )
AM_RANGE(0x340000, 0x340fff) AM_RAM // original spriteram
AM_RANGE(0x380000, 0x3803ff) AM_RAM_WRITE_LEGACY(paletteram16_xbgr_word_be_sprites_w) AM_BASE(m_sprite_paletteram)
AM_RANGE(0x380400, 0x3807ff) AM_RAM_WRITE_LEGACY(paletteram16_xbgr_word_be_tilehigh_w) AM_BASE(m_tile_paletteram2)
AM_RANGE(0x380800, 0x380bff) AM_RAM_WRITE_LEGACY(paletteram16_xbgr_word_be_sprites2_w) AM_BASE(m_sprite_paletteram2)
AM_RANGE(0x380c00, 0x380fff) AM_RAM_WRITE_LEGACY(paletteram16_xbgr_word_be_tilelow_w) AM_BASE(m_tile_paletteram1)
AM_RANGE(0x380000, 0x3803ff) AM_RAM_WRITE(paletteram16_xbgr_word_be_sprites_w) AM_BASE(m_sprite_paletteram)
AM_RANGE(0x380400, 0x3807ff) AM_RAM_WRITE(paletteram16_xbgr_word_be_tilehigh_w) AM_BASE(m_tile_paletteram2)
AM_RANGE(0x380800, 0x380bff) AM_RAM_WRITE(paletteram16_xbgr_word_be_sprites2_w) AM_BASE(m_sprite_paletteram2)
AM_RANGE(0x380c00, 0x380fff) AM_RAM_WRITE(paletteram16_xbgr_word_be_tilelow_w) AM_BASE(m_tile_paletteram1)
AM_RANGE(0x381000, 0x383fff) AM_RAM // unused palette area
AM_RANGE(0x3c0000, 0x3c0fff) AM_RAM AM_SHARE("spriteram") // bootleg spriteram

View File

@ -69,8 +69,8 @@ static ADDRESS_MAP_START( stepstag_map, AS_PROGRAM, 16, stepstag_state )
AM_RANGE(0x408000, 0x409fff) AM_RAM // ???
AM_RANGE(0x500000, 0x50ffff) AM_RAM // Line
AM_RANGE(0x600000, 0x60ffff) AM_RAM_WRITE_LEGACY(tetrisp2_vram_rot_w) AM_BASE(m_vram_rot) // Rotation
AM_RANGE(0x900000, 0x903fff) AM_READWRITE_LEGACY(tetrisp2_nvram_r, tetrisp2_nvram_w) AM_BASE(m_nvram) AM_SHARE("nvram") // NVRAM
AM_RANGE(0x904000, 0x907fff) AM_READWRITE_LEGACY(tetrisp2_nvram_r, tetrisp2_nvram_w) // NVRAM (mirror)
AM_RANGE(0x900000, 0x903fff) AM_READWRITE(tetrisp2_nvram_r, tetrisp2_nvram_w) AM_BASE(m_nvram) AM_SHARE("nvram") // NVRAM
AM_RANGE(0x904000, 0x907fff) AM_READWRITE(tetrisp2_nvram_r, tetrisp2_nvram_w) // NVRAM (mirror)
// AM_RANGE(0xa00000, 0xa7ffff) AM_READ_LEGACY(unknown_read_0xc00000 ) // presumably comms with slave CPU
AM_RANGE(0xb00000, 0xb00001) AM_WRITENOP // Coin Counter plus other things
AM_RANGE(0xb20000, 0xb20001) AM_WRITENOP // protection related?
@ -78,7 +78,7 @@ static ADDRESS_MAP_START( stepstag_map, AS_PROGRAM, 16, stepstag_state )
AM_RANGE(0xb40010, 0xb4001b) AM_WRITEONLY AM_BASE(m_scroll_bg) // Background Scrolling
AM_RANGE(0xb4003e, 0xb4003f) AM_WRITENOP // scr_size
AM_RANGE(0xb60000, 0xb6002f) AM_WRITEONLY AM_BASE(m_rotregs) // Rotation Registers
AM_RANGE(0xba0000, 0xba001f) AM_WRITE_LEGACY(tetrisp2_systemregs_w) // system param
AM_RANGE(0xba0000, 0xba001f) AM_WRITE(tetrisp2_systemregs_w) // system param
AM_RANGE(0xba001e, 0xba001f) AM_WRITENOP // Lev 2 irq ack
AM_RANGE(0xbe0002, 0xbe0003) AM_READ_PORT("PLAYERS") // Inputs
AM_RANGE(0xbe0004, 0xbe0005) AM_READ_LEGACY(stepstag_ip_1_word_r) // Inputs & protection

View File

@ -50,12 +50,11 @@ Notes:
***************************************************************************/
WRITE16_HANDLER( tetrisp2_systemregs_w )
WRITE16_MEMBER(tetrisp2_state::tetrisp2_systemregs_w)
{
tetrisp2_state *state = space->machine().driver_data<tetrisp2_state>();
if (ACCESSING_BITS_0_7)
{
state->m_systemregs[offset] = data;
m_systemregs[offset] = data;
}
}
@ -216,17 +215,15 @@ READ16_MEMBER(tetrisp2_state::tetrisp2_ip_1_word_r)
/* The game only ever writes even bytes and reads odd bytes */
READ16_HANDLER( tetrisp2_nvram_r )
READ16_MEMBER(tetrisp2_state::tetrisp2_nvram_r)
{
tetrisp2_state *state = space->machine().driver_data<tetrisp2_state>();
return ( (state->m_nvram[offset] >> 8) & 0x00ff ) |
( (state->m_nvram[offset] << 8) & 0xff00 ) ;
return ( (m_nvram[offset] >> 8) & 0x00ff ) |
( (m_nvram[offset] << 8) & 0xff00 ) ;
}
WRITE16_HANDLER( tetrisp2_nvram_w )
WRITE16_MEMBER(tetrisp2_state::tetrisp2_nvram_w)
{
tetrisp2_state *state = space->machine().driver_data<tetrisp2_state>();
COMBINE_DATA(&state->m_nvram[offset]);
COMBINE_DATA(&m_nvram[offset]);
}
READ16_MEMBER(tetrisp2_state::rockn_nvram_r)
@ -297,15 +294,15 @@ static ADDRESS_MAP_START( tetrisp2_map, AS_PROGRAM, 16, tetrisp2_state )
AM_RANGE(0x600000, 0x60ffff) AM_RAM_WRITE_LEGACY(tetrisp2_vram_rot_w) AM_BASE(m_vram_rot) // Rotation
AM_RANGE(0x650000, 0x651fff) AM_RAM_WRITE_LEGACY(tetrisp2_vram_rot_w) // Rotation (mirror)
AM_RANGE(0x800000, 0x800003) AM_DEVREADWRITE8_LEGACY("ymz", ymz280b_r, ymz280b_w, 0x00ff) // Sound
AM_RANGE(0x900000, 0x903fff) AM_READ_LEGACY(tetrisp2_nvram_r) AM_WRITE_LEGACY(tetrisp2_nvram_w) AM_BASE(m_nvram) AM_SHARE("nvram") // NVRAM
AM_RANGE(0x904000, 0x907fff) AM_READ_LEGACY(tetrisp2_nvram_r) AM_WRITE_LEGACY(tetrisp2_nvram_w) // NVRAM (mirror)
AM_RANGE(0x900000, 0x903fff) AM_READ(tetrisp2_nvram_r) AM_WRITE(tetrisp2_nvram_w) AM_BASE(m_nvram) AM_SHARE("nvram") // NVRAM
AM_RANGE(0x904000, 0x907fff) AM_READ(tetrisp2_nvram_r) AM_WRITE(tetrisp2_nvram_w) // NVRAM (mirror)
AM_RANGE(0xb00000, 0xb00001) AM_WRITE(tetrisp2_coincounter_w) // Coin Counter
AM_RANGE(0xb20000, 0xb20001) AM_WRITENOP // ???
AM_RANGE(0xb40000, 0xb4000b) AM_WRITEONLY AM_BASE(m_scroll_fg) // Foreground Scrolling
AM_RANGE(0xb40010, 0xb4001b) AM_WRITEONLY AM_BASE(m_scroll_bg) // Background Scrolling
AM_RANGE(0xb4003e, 0xb4003f) AM_WRITENOP // scr_size
AM_RANGE(0xb60000, 0xb6002f) AM_WRITEONLY AM_BASE(m_rotregs) // Rotation Registers
AM_RANGE(0xba0000, 0xba001f) AM_WRITE_LEGACY(tetrisp2_systemregs_w) // system param
AM_RANGE(0xba0000, 0xba001f) AM_WRITE(tetrisp2_systemregs_w) // system param
AM_RANGE(0xba001a, 0xba001b) AM_WRITENOP // Lev 4 irq ack
AM_RANGE(0xba001e, 0xba001f) AM_WRITENOP // Lev 2 irq ack
AM_RANGE(0xbe0000, 0xbe0001) AM_READNOP // INT-level1 dummy read
@ -359,7 +356,7 @@ static ADDRESS_MAP_START( nndmseal_map, AS_PROGRAM, 16, tetrisp2_state )
AM_RANGE(0x800000, 0x800003) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff ) // Sound
AM_RANGE(0x900000, 0x903fff) AM_READWRITE_LEGACY(tetrisp2_nvram_r, tetrisp2_nvram_w) AM_BASE(m_nvram) AM_SHARE("nvram") // NVRAM
AM_RANGE(0x900000, 0x903fff) AM_READWRITE(tetrisp2_nvram_r, tetrisp2_nvram_w) AM_BASE(m_nvram) AM_SHARE("nvram") // NVRAM
AM_RANGE(0xb00000, 0xb00001) AM_WRITE(nndmseal_coincounter_w) // Coin Counter
AM_RANGE(0xb20000, 0xb20001) AM_WRITE(nndmseal_b20000_w) // ???
@ -398,7 +395,7 @@ static ADDRESS_MAP_START( rockn1_map, AS_PROGRAM, 16, tetrisp2_state )
AM_RANGE(0x408000, 0x409fff) AM_RAM // ???
AM_RANGE(0x500000, 0x50ffff) AM_RAM // Line
AM_RANGE(0x600000, 0x60ffff) AM_RAM_WRITE_LEGACY(tetrisp2_vram_rot_w) AM_BASE(m_vram_rot) // Rotation
AM_RANGE(0x900000, 0x903fff) AM_READ(rockn_nvram_r) AM_WRITE_LEGACY(tetrisp2_nvram_w) AM_BASE(m_nvram) AM_SHARE("nvram") // NVRAM
AM_RANGE(0x900000, 0x903fff) AM_READ(rockn_nvram_r) AM_WRITE(tetrisp2_nvram_w) AM_BASE(m_nvram) AM_SHARE("nvram") // NVRAM
AM_RANGE(0xa30000, 0xa30001) AM_READWRITE(rockn_soundvolume_r, rockn_soundvolume_w) // Sound Volume
AM_RANGE(0xa40000, 0xa40003) AM_DEVREADWRITE8_LEGACY("ymz", ymz280b_r, ymz280b_w, 0x00ff) // Sound
AM_RANGE(0xa44000, 0xa44001) AM_READWRITE(rockn_adpcmbank_r, rockn_adpcmbank_w) // Sound Bank
@ -432,7 +429,7 @@ static ADDRESS_MAP_START( rockn2_map, AS_PROGRAM, 16, tetrisp2_state )
AM_RANGE(0x800000, 0x803fff) AM_RAM_WRITE_LEGACY(tetrisp2_vram_fg_w) AM_BASE(m_vram_fg) // Foreground
AM_RANGE(0x804000, 0x807fff) AM_RAM_WRITE_LEGACY(tetrisp2_vram_bg_w) AM_BASE(m_vram_bg) // Background
AM_RANGE(0x808000, 0x809fff) AM_RAM // ???
AM_RANGE(0x900000, 0x903fff) AM_READ(rockn_nvram_r) AM_WRITE_LEGACY(tetrisp2_nvram_w) AM_BASE(m_nvram) AM_SHARE("nvram") // NVRAM
AM_RANGE(0x900000, 0x903fff) AM_READ(rockn_nvram_r) AM_WRITE(tetrisp2_nvram_w) AM_BASE(m_nvram) AM_SHARE("nvram") // NVRAM
AM_RANGE(0xa30000, 0xa30001) AM_READWRITE(rockn_soundvolume_r, rockn_soundvolume_w) // Sound Volume
AM_RANGE(0xa40000, 0xa40003) AM_DEVREADWRITE8_LEGACY("ymz", ymz280b_r, ymz280b_w, 0x00ff) // Sound
AM_RANGE(0xa44000, 0xa44001) AM_READWRITE(rockn_adpcmbank_r, rockn2_adpcmbank_w) // Sound Bank
@ -466,7 +463,7 @@ static ADDRESS_MAP_START( rocknms_main_map, AS_PROGRAM, 16, tetrisp2_state )
AM_RANGE(0x800000, 0x803fff) AM_RAM_WRITE_LEGACY(tetrisp2_vram_fg_w) AM_BASE(m_vram_fg) // Foreground
AM_RANGE(0x804000, 0x807fff) AM_RAM_WRITE_LEGACY(tetrisp2_vram_bg_w) AM_BASE(m_vram_bg) // Background
// AM_RANGE(0x808000, 0x809fff) AM_RAM // ???
AM_RANGE(0x900000, 0x903fff) AM_READ(rockn_nvram_r) AM_WRITE_LEGACY(tetrisp2_nvram_w) AM_BASE(m_nvram) AM_SHARE("nvram") // NVRAM
AM_RANGE(0x900000, 0x903fff) AM_READ(rockn_nvram_r) AM_WRITE(tetrisp2_nvram_w) AM_BASE(m_nvram) AM_SHARE("nvram") // NVRAM
AM_RANGE(0xa30000, 0xa30001) AM_READWRITE(rockn_soundvolume_r, rockn_soundvolume_w) // Sound Volume
AM_RANGE(0xa40000, 0xa40003) AM_DEVREADWRITE8_LEGACY("ymz", ymz280b_r, ymz280b_w, 0x00ff) // Sound
AM_RANGE(0xa44000, 0xa44001) AM_READWRITE(rockn_adpcmbank_r, rockn_adpcmbank_w) // Sound Bank

View File

@ -492,9 +492,6 @@ WRITE16_MEMBER(wecleman_state::blitter_w)
WEC Le Mans 24 Main CPU Handlers
***************************************************************************/
static WRITE16_HANDLER( wecleman_soundlatch_w );
static ADDRESS_MAP_START( wecleman_map, AS_PROGRAM, 16, wecleman_state )
AM_RANGE(0x000000, 0x03ffff) AM_ROM // ROM (03c000-03ffff used as RAM sometimes!)
AM_RANGE(0x040494, 0x040495) AM_WRITE_LEGACY(wecleman_videostatus_w) AM_BASE(m_videostatus) // cloud blending control (HACK)
@ -507,7 +504,7 @@ static ADDRESS_MAP_START( wecleman_map, AS_PROGRAM, 16, wecleman_state )
AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE_LEGACY(wecleman_paletteram16_SSSSBBBBGGGGRRRR_word_w) AM_SHARE("paletteram")
AM_RANGE(0x124000, 0x127fff) AM_RAM AM_SHARE("share1") // Shared with main CPU
AM_RANGE(0x130000, 0x130fff) AM_RAM AM_BASE(m_spriteram) // Sprites
AM_RANGE(0x140000, 0x140001) AM_WRITE_LEGACY(wecleman_soundlatch_w) // To sound CPU
AM_RANGE(0x140000, 0x140001) AM_WRITE(wecleman_soundlatch_w) // To sound CPU
AM_RANGE(0x140002, 0x140003) AM_WRITE(selected_ip_w) // Selects accelerator / wheel / ..
AM_RANGE(0x140004, 0x140005) AM_WRITE(irqctrl_w) // Main CPU controls the other CPUs
AM_RANGE(0x140006, 0x140007) AM_WRITENOP // Watchdog reset
@ -582,13 +579,12 @@ ADDRESS_MAP_END
***************************************************************************/
/* 140001.b */
WRITE16_HANDLER( wecleman_soundlatch_w )
WRITE16_MEMBER(wecleman_state::wecleman_soundlatch_w)
{
wecleman_state *state = space->machine().driver_data<wecleman_state>();
if (ACCESSING_BITS_0_7)
{
state->soundlatch_w(*space, 0, data & 0xFF);
cputag_set_input_line(space->machine(), "audiocpu", 0, HOLD_LINE);
soundlatch_w(*&space, 0, data & 0xFF);
cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE);
}
}

View File

@ -284,83 +284,74 @@ static CUSTOM_INPUT( xain_vblank_r )
***************************************************************************/
READ8_HANDLER( xain_68705_port_a_r )
READ8_MEMBER(xain_state::xain_68705_port_a_r)
{
xain_state *state = space->machine().driver_data<xain_state>();
return (state->m_port_a_out & state->m_ddr_a) | (state->m_port_a_in & ~state->m_ddr_a);
return (m_port_a_out & m_ddr_a) | (m_port_a_in & ~m_ddr_a);
}
WRITE8_HANDLER( xain_68705_port_a_w )
WRITE8_MEMBER(xain_state::xain_68705_port_a_w)
{
xain_state *state = space->machine().driver_data<xain_state>();
state->m_port_a_out = data;
m_port_a_out = data;
}
WRITE8_HANDLER( xain_68705_ddr_a_w )
WRITE8_MEMBER(xain_state::xain_68705_ddr_a_w)
{
xain_state *state = space->machine().driver_data<xain_state>();
state->m_ddr_a = data;
m_ddr_a = data;
}
READ8_HANDLER( xain_68705_port_b_r )
READ8_MEMBER(xain_state::xain_68705_port_b_r)
{
xain_state *state = space->machine().driver_data<xain_state>();
return (state->m_port_b_out & state->m_ddr_b) | (state->m_port_b_in & ~state->m_ddr_b);
return (m_port_b_out & m_ddr_b) | (m_port_b_in & ~m_ddr_b);
}
WRITE8_HANDLER( xain_68705_port_b_w )
WRITE8_MEMBER(xain_state::xain_68705_port_b_w)
{
xain_state *state = space->machine().driver_data<xain_state>();
if ((state->m_ddr_b & 0x02) && (~data & 0x02))
if ((m_ddr_b & 0x02) && (~data & 0x02))
{
state->m_port_a_in = state->m_from_main;
m_port_a_in = m_from_main;
}
/* Rising edge of PB1 */
else if ((state->m_ddr_b & 0x02) && (~state->m_port_b_out & 0x02) && (data & 0x02))
else if ((m_ddr_b & 0x02) && (~m_port_b_out & 0x02) && (data & 0x02))
{
state->m_mcu_accept = 1;
cputag_set_input_line(space->machine(), "mcu", 0, CLEAR_LINE);
m_mcu_accept = 1;
cputag_set_input_line(machine(), "mcu", 0, CLEAR_LINE);
}
/* Rising edge of PB2 */
if ((state->m_ddr_b & 0x04) && (~state->m_port_b_out & 0x04) && (data & 0x04))
if ((m_ddr_b & 0x04) && (~m_port_b_out & 0x04) && (data & 0x04))
{
state->m_mcu_ready = 0;
state->m_from_mcu = state->m_port_a_out;
m_mcu_ready = 0;
m_from_mcu = m_port_a_out;
}
state->m_port_b_out = data;
m_port_b_out = data;
}
WRITE8_HANDLER( xain_68705_ddr_b_w )
WRITE8_MEMBER(xain_state::xain_68705_ddr_b_w)
{
xain_state *state = space->machine().driver_data<xain_state>();
state->m_ddr_b = data;
m_ddr_b = data;
}
READ8_HANDLER( xain_68705_port_c_r )
READ8_MEMBER(xain_state::xain_68705_port_c_r)
{
xain_state *state = space->machine().driver_data<xain_state>();
state->m_port_c_in = 0;
m_port_c_in = 0;
if (!state->m_mcu_accept)
state->m_port_c_in |= 0x01;
if (state->m_mcu_ready)
state->m_port_c_in |= 0x02;
if (!m_mcu_accept)
m_port_c_in |= 0x01;
if (m_mcu_ready)
m_port_c_in |= 0x02;
return (state->m_port_c_out & state->m_ddr_c) | (state->m_port_c_in & ~state->m_ddr_c);
return (m_port_c_out & m_ddr_c) | (m_port_c_in & ~m_ddr_c);
}
WRITE8_HANDLER( xain_68705_port_c_w )
WRITE8_MEMBER(xain_state::xain_68705_port_c_w)
{
xain_state *state = space->machine().driver_data<xain_state>();
state->m_port_c_out = data;
m_port_c_out = data;
}
WRITE8_HANDLER( xain_68705_ddr_c_w )
WRITE8_MEMBER(xain_state::xain_68705_ddr_c_w)
{
xain_state *state = space->machine().driver_data<xain_state>();
state->m_ddr_c = data;
m_ddr_c = data;
}
static CUSTOM_INPUT( mcu_status_r )
@ -383,14 +374,13 @@ static CUSTOM_INPUT( mcu_status_r )
return res;
}
READ8_HANDLER( mcu_comm_reset_r )
READ8_MEMBER(xain_state::mcu_comm_reset_r)
{
xain_state *state = space->machine().driver_data<xain_state>();
state->m_mcu_ready = 1;
state->m_mcu_accept = 1;
m_mcu_ready = 1;
m_mcu_accept = 1;
if (space->machine().device("mcu") != NULL)
cputag_set_input_line(space->machine(), "mcu", 0, CLEAR_LINE);
if (machine().device("mcu") != NULL)
cputag_set_input_line(machine(), "mcu", 0, CLEAR_LINE);
return 0xff;
}
@ -411,7 +401,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, xain_state )
AM_RANGE(0x3a04, 0x3a04) AM_READ(xain_68705_r)
AM_RANGE(0x3a04, 0x3a05) AM_WRITE_LEGACY(xain_scrollxP0_w)
AM_RANGE(0x3a05, 0x3a05) AM_READ_PORT("VBLANK")
AM_RANGE(0x3a06, 0x3a06) AM_READ_LEGACY(mcu_comm_reset_r)
AM_RANGE(0x3a06, 0x3a06) AM_READ(mcu_comm_reset_r)
AM_RANGE(0x3a06, 0x3a07) AM_WRITE_LEGACY(xain_scrollyP0_w)
AM_RANGE(0x3a08, 0x3a08) AM_WRITE(xain_sound_command_w)
AM_RANGE(0x3a09, 0x3a0c) AM_WRITE(xain_main_irq_w)
@ -435,12 +425,12 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( mcu_map, AS_PROGRAM, 8, xain_state )
ADDRESS_MAP_GLOBAL_MASK(0x7ff)
AM_RANGE(0x0000, 0x0000) AM_READWRITE_LEGACY(xain_68705_port_a_r, xain_68705_port_a_w)
AM_RANGE(0x0001, 0x0001) AM_READWRITE_LEGACY(xain_68705_port_b_r, xain_68705_port_b_w)
AM_RANGE(0x0002, 0x0002) AM_READWRITE_LEGACY(xain_68705_port_c_r, xain_68705_port_c_w)
AM_RANGE(0x0004, 0x0004) AM_WRITE_LEGACY(xain_68705_ddr_a_w)
AM_RANGE(0x0005, 0x0005) AM_WRITE_LEGACY(xain_68705_ddr_b_w)
AM_RANGE(0x0006, 0x0006) AM_WRITE_LEGACY(xain_68705_ddr_c_w)
AM_RANGE(0x0000, 0x0000) AM_READWRITE(xain_68705_port_a_r, xain_68705_port_a_w)
AM_RANGE(0x0001, 0x0001) AM_READWRITE(xain_68705_port_b_r, xain_68705_port_b_w)
AM_RANGE(0x0002, 0x0002) AM_READWRITE(xain_68705_port_c_r, xain_68705_port_c_w)
AM_RANGE(0x0004, 0x0004) AM_WRITE(xain_68705_ddr_a_w)
AM_RANGE(0x0005, 0x0005) AM_WRITE(xain_68705_ddr_b_w)
AM_RANGE(0x0006, 0x0006) AM_WRITE(xain_68705_ddr_c_w)
// AM_RANGE(0x0008, 0x0008) AM_READWRITE_LEGACY(m68705_tdr_r, m68705_tdr_w)
// AM_RANGE(0x0009, 0x0009) AM_READWRITE_LEGACY(m68705_tcr_r, m68705_tcr_w)
AM_RANGE(0x0010, 0x007f) AM_RAM

View File

@ -139,6 +139,7 @@ public:
DECLARE_WRITE8_MEMBER(sailormn_rombank_w);
DECLARE_WRITE8_MEMBER(sailormn_okibank0_w);
DECLARE_WRITE8_MEMBER(sailormn_okibank1_w);
DECLARE_WRITE16_MEMBER(donpachi_videoregs_w);
};
/*----------- defined in video/cave.c -----------*/

View File

@ -44,6 +44,9 @@ public:
DECLARE_WRITE16_MEMBER(bigrun_soundbank_w);
DECLARE_READ16_MEMBER(f1gpstr2_io_r);
DECLARE_WRITE16_MEMBER(f1gpstr2_io_w);
DECLARE_READ16_MEMBER(scudhamm_motor_status_r);
DECLARE_READ16_MEMBER(scudhamm_motor_pos_r);
DECLARE_READ16_MEMBER(scudhamm_analog_r);
};

View File

@ -153,17 +153,16 @@ public:
DECLARE_WRITE16_MEMBER(qsound_sharedram2_w);
DECLARE_WRITE8_MEMBER(qsound_banksw_w);
DECLARE_READ16_MEMBER(sf2mdt_r);
DECLARE_READ16_MEMBER(cps1_dsw_r);
DECLARE_WRITE16_MEMBER(cps1_coinctrl_w);
DECLARE_READ16_MEMBER(qsound_sharedram1_r);
DECLARE_WRITE16_MEMBER(qsound_sharedram1_w);
};
/*----------- defined in drivers/cps1.c -----------*/
ADDRESS_MAP_EXTERN( qsound_sub_map, 8 );
READ16_HANDLER( qsound_sharedram1_r );
WRITE16_HANDLER( qsound_sharedram1_w );
READ16_HANDLER( cps1_dsw_r );
WRITE16_HANDLER( cps1_coinctrl_w );
INTERRUPT_GEN( cps1_interrupt );
GFXDECODE_EXTERN( cps1 );

View File

@ -69,6 +69,16 @@ public:
DECLARE_WRITE8_MEMBER(cvs_speech_rom_address_hi_w);
DECLARE_READ8_MEMBER(cvs_speech_command_r);
DECLARE_WRITE8_MEMBER(audio_command_w);
DECLARE_READ8_MEMBER(cvs_video_or_color_ram_r);
DECLARE_WRITE8_MEMBER(cvs_video_or_color_ram_w);
DECLARE_READ8_MEMBER(cvs_bullet_ram_or_palette_r);
DECLARE_WRITE8_MEMBER(cvs_bullet_ram_or_palette_w);
DECLARE_READ8_MEMBER(cvs_s2636_0_or_character_ram_r);
DECLARE_WRITE8_MEMBER(cvs_s2636_0_or_character_ram_w);
DECLARE_READ8_MEMBER(cvs_s2636_1_or_character_ram_r);
DECLARE_WRITE8_MEMBER(cvs_s2636_1_or_character_ram_w);
DECLARE_READ8_MEMBER(cvs_s2636_2_or_character_ram_r);
DECLARE_WRITE8_MEMBER(cvs_s2636_2_or_character_ram_w);
};
@ -77,19 +87,6 @@ public:
MACHINE_START( cvs );
MACHINE_RESET( cvs );
READ8_HANDLER( cvs_video_or_color_ram_r );
WRITE8_HANDLER( cvs_video_or_color_ram_w );
READ8_HANDLER( cvs_bullet_ram_or_palette_r );
WRITE8_HANDLER( cvs_bullet_ram_or_palette_w );
READ8_HANDLER( cvs_s2636_0_or_character_ram_r );
WRITE8_HANDLER( cvs_s2636_0_or_character_ram_w );
READ8_HANDLER( cvs_s2636_1_or_character_ram_r );
WRITE8_HANDLER( cvs_s2636_1_or_character_ram_w );
READ8_HANDLER( cvs_s2636_2_or_character_ram_r );
WRITE8_HANDLER( cvs_s2636_2_or_character_ram_w );
/*----------- defined in video/cvs.c -----------*/
WRITE8_HANDLER( cvs_scroll_w );

View File

@ -27,6 +27,10 @@ public:
DECLARE_WRITE16_MEMBER(midres_sound_w);
DECLARE_WRITE16_MEMBER(unmapped_w);
DECLARE_WRITE8_MEMBER(automat_adpcm_w);
DECLARE_READ16_MEMBER(slyspy_controls_r);
DECLARE_READ16_MEMBER(slyspy_protection_r);
DECLARE_WRITE16_MEMBER(slyspy_state_w);
DECLARE_READ16_MEMBER(slyspy_state_r);
};

View File

@ -32,6 +32,7 @@ public:
device_t *m_audiocpu;
DECLARE_WRITE8_MEMBER(espial_master_interrupt_mask_w);
DECLARE_WRITE8_MEMBER(espial_master_soundlatch_w);
DECLARE_WRITE8_MEMBER(espial_sound_nmi_mask_w);
};
/*----------- defined in video/espial.c -----------*/

View File

@ -128,6 +128,11 @@ public:
DECLARE_READ8_MEMBER(hng64_comm_memory_r);
DECLARE_WRITE8_MEMBER(hng64_comm_memory_w);
DECLARE_WRITE8_MEMBER(hng64_comm_io_mmu);
DECLARE_WRITE32_MEMBER(trap_write);
DECLARE_WRITE32_MEMBER(hng64_3d_1_w);
DECLARE_WRITE32_MEMBER(activate_3d_buffer);
DECLARE_READ8_MEMBER(hng64_comm_shared_r);
DECLARE_WRITE8_MEMBER(hng64_comm_shared_w);
};

View File

@ -245,6 +245,7 @@ public:
DECLARE_READ8_MEMBER(mpu4_ym2413_r);
DECLARE_READ8_MEMBER(crystal_sound_r);
DECLARE_WRITE8_MEMBER(crystal_sound_w);
DECLARE_WRITE8_MEMBER(ic3ss_w);
};
/* mpu4.c, used by mpu4vid.c */
@ -260,8 +261,6 @@ MACHINE_CONFIG_EXTERN( mpu4_common2 );
MACHINE_CONFIG_EXTERN( mod2 );
WRITE8_HANDLER( ic3ss_w );
extern MACHINE_START( mod2 );
extern const ay8910_interface ay8910_config;

View File

@ -35,6 +35,8 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_mcu;
DECLARE_READ32_MEMBER(randgen_r);
DECLARE_WRITE32_MEMBER(srand_w);
};

View File

@ -123,6 +123,7 @@ public:
DECLARE_READ8_MEMBER(audio_cpu_bank_select_8000_bfff_r);
DECLARE_WRITE16_MEMBER(system_control_w);
DECLARE_WRITE16_MEMBER(watchdog_w);
DECLARE_READ16_MEMBER(neogeo_unmapped_r);
};
@ -133,7 +134,6 @@ void neogeo_set_display_counter_msb(address_space *space, UINT16 data);
void neogeo_set_display_counter_lsb(address_space *space, UINT16 data);
void neogeo_acknowledge_interrupt(running_machine &machine, UINT16 data);
void neogeo_set_main_cpu_bank_address(address_space *space, UINT32 bank_address);
READ16_HANDLER( neogeo_unmapped_r );
DEVICE_IMAGE_LOAD( neo_cartridge );

View File

@ -46,6 +46,15 @@ public:
DECLARE_WRITE8_MEMBER(bankswitch_w);
DECLARE_WRITE8_MEMBER(renegade_coin_counter_w);
void mcu_process_command();
DECLARE_READ8_MEMBER(renegade_68705_port_a_r);
DECLARE_WRITE8_MEMBER(renegade_68705_port_a_w);
DECLARE_WRITE8_MEMBER(renegade_68705_ddr_a_w);
DECLARE_READ8_MEMBER(renegade_68705_port_b_r);
DECLARE_WRITE8_MEMBER(renegade_68705_port_b_w);
DECLARE_WRITE8_MEMBER(renegade_68705_ddr_b_w);
DECLARE_READ8_MEMBER(renegade_68705_port_c_r);
DECLARE_WRITE8_MEMBER(renegade_68705_port_c_w);
DECLARE_WRITE8_MEMBER(renegade_68705_ddr_c_w);
};

View File

@ -43,6 +43,7 @@ public:
UINT32 m_bg_fore_layer_position;
UINT8 m_alpha_table[8192];
UINT8 m_sprite_bpp;
DECLARE_READ32_MEMBER(ejanhs_speedup_r);
};

View File

@ -31,6 +31,10 @@ public:
DECLARE_READ16_MEMBER(deco_71_r);
DECLARE_READ8_MEMBER(sshangha_sound_shared_r);
DECLARE_WRITE8_MEMBER(sshangha_sound_shared_w);
DECLARE_WRITE16_MEMBER(paletteram16_xbgr_word_be_sprites2_w);
DECLARE_WRITE16_MEMBER(paletteram16_xbgr_word_be_sprites_w);
DECLARE_WRITE16_MEMBER(paletteram16_xbgr_word_be_tilelow_w);
DECLARE_WRITE16_MEMBER(paletteram16_xbgr_word_be_tilehigh_w);
};

View File

@ -57,12 +57,11 @@ public:
DECLARE_WRITE16_MEMBER(tetrisp2_coincounter_w);
DECLARE_WRITE16_MEMBER(nndmseal_coincounter_w);
DECLARE_WRITE16_MEMBER(nndmseal_b20000_w);
DECLARE_WRITE16_MEMBER(tetrisp2_systemregs_w);
DECLARE_READ16_MEMBER(tetrisp2_nvram_r);
DECLARE_WRITE16_MEMBER(tetrisp2_nvram_w);
};
WRITE16_HANDLER( tetrisp2_systemregs_w );
READ16_HANDLER( tetrisp2_nvram_r );
WRITE16_HANDLER( tetrisp2_nvram_w );
/*----------- defined in video/tetrisp2.c -----------*/
WRITE16_HANDLER( tetrisp2_palette_w );

View File

@ -47,6 +47,7 @@ public:
DECLARE_WRITE8_MEMBER(multiply_w);
DECLARE_WRITE16_MEMBER(hotchase_soundlatch_w);
DECLARE_WRITE8_MEMBER(hotchase_sound_control_w);
DECLARE_WRITE16_MEMBER(wecleman_soundlatch_w);
};

View File

@ -39,6 +39,16 @@ public:
DECLARE_WRITE8_MEMBER(xain_irqB_clear_w);
DECLARE_READ8_MEMBER(xain_68705_r);
DECLARE_WRITE8_MEMBER(xain_68705_w);
DECLARE_READ8_MEMBER(xain_68705_port_a_r);
DECLARE_WRITE8_MEMBER(xain_68705_port_a_w);
DECLARE_WRITE8_MEMBER(xain_68705_ddr_a_w);
DECLARE_READ8_MEMBER(xain_68705_port_b_r);
DECLARE_WRITE8_MEMBER(xain_68705_port_b_w);
DECLARE_WRITE8_MEMBER(xain_68705_ddr_b_w);
DECLARE_READ8_MEMBER(xain_68705_port_c_r);
DECLARE_WRITE8_MEMBER(xain_68705_port_c_w);
DECLARE_WRITE8_MEMBER(xain_68705_ddr_c_w);
DECLARE_READ8_MEMBER(mcu_comm_reset_r);
};

View File

@ -795,11 +795,12 @@ static void set_video_control( running_machine &machine, UINT16 data )
READ16_HANDLER( neogeo_video_register_r )
{
neogeo_state *state = space->machine().driver_data<neogeo_state>();
UINT16 ret;
/* accessing the LSB only is not mapped */
if (mem_mask == 0x00ff)
ret = neogeo_unmapped_r(space, 0, 0xffff) & 0x00ff;
ret = state->neogeo_unmapped_r(*space, 0, 0xffff) & 0x00ff;
else
{
switch (offset)