mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
blockout.cpp: various improvements: [Angelo Salese]
* Fixed Agress offsetted text layer, worked around initial VRAM check; * Converted to SCREEN_RAW_PARAMS and fixed visible area for Agress and Block Out; * Fixed input labels and hookups, following manual and in-game descriptions;
This commit is contained in:
parent
ae69176e80
commit
963647e231
@ -129,7 +129,7 @@ static ADDRESS_MAP_START( agress_map, AS_PROGRAM, 16, blockout_state )
|
||||
AM_RANGE(0x180000, 0x1bffff) AM_RAM_WRITE(blockout_videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x1d4000, 0x1dffff) AM_RAM /* work RAM */
|
||||
AM_RANGE(0x1f4000, 0x1fffff) AM_RAM /* work RAM */
|
||||
AM_RANGE(0x200000, 0x203fff) AM_RAM AM_SHARE("frontvideoram") AM_MIRROR(0x004000) // agress checks at F3A that this is mirrored, blockout glitches if you do it to it
|
||||
AM_RANGE(0x200000, 0x207fff) AM_RAM AM_SHARE("frontvideoram")
|
||||
AM_RANGE(0x208000, 0x21ffff) AM_RAM /* ??? */
|
||||
AM_RANGE(0x280002, 0x280003) AM_WRITE(blockout_frontcolor_w)
|
||||
AM_RANGE(0x280200, 0x2805ff) AM_RAM_WRITE(blockout_paletteram_w) AM_SHARE("paletteram")
|
||||
@ -156,9 +156,9 @@ static INPUT_PORTS_START( blockout )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Drop Button") // on top of stick
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 B Button")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 C Button")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
|
||||
|
||||
PORT_START("P2")
|
||||
@ -166,9 +166,9 @@ static INPUT_PORTS_START( blockout )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_NAME("P2 Drop Button") // on top of stick
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 B Button")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 C Button")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
|
||||
|
||||
PORT_START("SYSTEM")
|
||||
@ -207,30 +207,43 @@ static INPUT_PORTS_START( blockout )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" ) /* Listed as "Unused" */
|
||||
PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW2:5" ) /* Listed as "Unused" */
|
||||
PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW2:6" ) /* Listed as "Unused" */
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_DIPLOCATION("SW2:7") /* Listed as "Unused" */
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_DIPLOCATION("SW2:8") /* Listed as "Unused" */
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 A Button") PORT_DIPLOCATION("SW2:7") /* Listed as "Unused" */
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 A Button") PORT_PLAYER(2) PORT_DIPLOCATION("SW2:8") /* Listed as "Unused" */
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( blockoutj )
|
||||
PORT_INCLUDE( blockout )
|
||||
|
||||
PORT_MODIFY("P1")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 A Button (Drop)")
|
||||
|
||||
PORT_MODIFY("P2")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 A Button (Drop)") PORT_PLAYER(2)
|
||||
|
||||
PORT_MODIFY("DSW2")
|
||||
/* The following switch is 2/3 rotate buttons on the other sets, option doesn't exist in the Japan version */
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW2:3" )
|
||||
/* these can still be used on the difficutly select even if they can't be used for rotating pieces in this version */
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_DIPLOCATION("SW2:7")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_DIPLOCATION("SW2:8")
|
||||
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" ) /* Listed as "Unused" */
|
||||
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) /* Listed as "Unused" */
|
||||
// PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_DIPLOCATION("SW2:7")
|
||||
// PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_DIPLOCATION("SW2:8")
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( agress )
|
||||
PORT_INCLUDE( blockout )
|
||||
|
||||
// Button 1 & 2 looks identical gameplay wise (i.e. stop slots after each ten levels)
|
||||
PORT_MODIFY("P1")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 Button 3 (Bomb)")
|
||||
|
||||
PORT_MODIFY("P2")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Button 3 (Bomb)")
|
||||
|
||||
/* factory shipment setting is all dips OFF */
|
||||
PORT_MODIFY("DSW1")
|
||||
PORT_DIPNAME( 0x04, 0x04, "Opening Cut" ) PORT_DIPLOCATION("SW1:3")
|
||||
@ -243,6 +256,8 @@ static INPUT_PORTS_START( agress )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Players ) ) PORT_DIPLOCATION("SW2:3")
|
||||
PORT_DIPSETTING( 0x04, "1" )
|
||||
PORT_DIPSETTING( 0x00, "2" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW2:7" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW2:8" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -273,13 +288,29 @@ void blockout_state::machine_start()
|
||||
void blockout_state::machine_reset()
|
||||
{
|
||||
m_color = 0;
|
||||
|
||||
/*
|
||||
* agress checks at F3A that this is mirrored, blockout glitches if you mirror to it
|
||||
* But actually mirroring this VRAM makes display to be offset
|
||||
* (clearly visible with text being on top bank instead of bottom during gameplay)
|
||||
* There are many possible solutions to this:
|
||||
* A) reads are actually ORed between upper and lower banks
|
||||
* B) VRAM is initialized with same pattern checked
|
||||
* C) Agress isn't truly identical to Block Out HW wise, it really mirrors VRAM data and offsets display
|
||||
* For now
|
||||
*/
|
||||
for(int i=0;i<0x4000/2;i++)
|
||||
{
|
||||
m_frontvideoram[i] = i;
|
||||
m_frontvideoram[i+0x4000/2] = i;
|
||||
}
|
||||
}
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(blockout_state::blockout_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 248) // vblank-out irq
|
||||
if(scanline == 250) // vblank-out irq
|
||||
m_maincpu->set_input_line(6, ASSERT_LINE);
|
||||
|
||||
if(scanline == 0) // vblank-in irq or directly tied to coin inputs (TODO: check)
|
||||
@ -299,10 +330,8 @@ MACHINE_CONFIG_START(blockout_state::blockout)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(58)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(320, 256)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 319, 8, 247)
|
||||
/* assume same as ddragon3 with adjusted visible display area */
|
||||
MCFG_SCREEN_RAW_PARAMS(XTAL_28MHz / 4, 448, 0, 320, 272, 10, 250)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(blockout_state, screen_update_blockout)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
|
@ -306,7 +306,7 @@ static ADDRESS_MAP_START( ddragon3_map, AS_PROGRAM, 16, ddragon3_state )
|
||||
AM_RANGE(0x100006, 0x100007) AM_WRITE(irq5_ack_w)
|
||||
AM_RANGE(0x140000, 0x1405ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") /* Palette RAM */
|
||||
AM_RANGE(0x180000, 0x180fff) AM_RAM AM_SHARE("spriteram")
|
||||
AM_RANGE(0x1c0000, 0x1c3fff) AM_RAM /* working RAM */
|
||||
AM_RANGE(0x1c0000, 0x1c3fff) AM_RAM /* work RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( dd3b_map, AS_PROGRAM, 16, ddragon3_state )
|
||||
@ -325,7 +325,7 @@ static ADDRESS_MAP_START( dd3b_map, AS_PROGRAM, 16, ddragon3_state )
|
||||
AM_RANGE(0x180002, 0x180003) AM_READ_PORT("IN1")
|
||||
AM_RANGE(0x180004, 0x180005) AM_READ_PORT("IN2")
|
||||
AM_RANGE(0x180006, 0x180007) AM_READ_PORT("IN3")
|
||||
AM_RANGE(0x1c0000, 0x1c3fff) AM_RAM /* working RAM */
|
||||
AM_RANGE(0x1c0000, 0x1c3fff) AM_RAM /* work RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( ctribe_map, AS_PROGRAM, 16, ddragon3_state )
|
||||
@ -345,7 +345,7 @@ static ADDRESS_MAP_START( ctribe_map, AS_PROGRAM, 16, ddragon3_state )
|
||||
AM_RANGE(0x180002, 0x180003) AM_READ_PORT("IN1")
|
||||
AM_RANGE(0x180004, 0x180005) AM_READ_PORT("IN2")
|
||||
AM_RANGE(0x180006, 0x180007) AM_READ_PORT("IN3")
|
||||
AM_RANGE(0x1c0000, 0x1c3fff) AM_RAM /* working RAM */
|
||||
AM_RANGE(0x1c0000, 0x1c3fff) AM_RAM /* work RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, wwfwfest_state )
|
||||
|
Loading…
Reference in New Issue
Block a user