move interfaces down

This commit is contained in:
Michaël Banaan Ananas 2012-09-08 23:48:59 +00:00
parent 26c97f1729
commit 3275b4963b
2 changed files with 50 additions and 37 deletions

View File

@ -51,19 +51,11 @@ Notes:
#include "includes/homerun.h"
/***************************************************************************
I/O / Memory
static I8255A_INTERFACE( ppi8255_intf )
{
// all ports are outputs
DEVCB_NULL, /* Port A read */
DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrollhi_w), /* Port A write */
DEVCB_NULL, /* Port B read */
DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrolly_w), /* Port B write */
DEVCB_NULL, /* Port C read */
DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrollx_w) /* Port C write */
};
***************************************************************************/
static ADDRESS_MAP_START( homerun_memmap, AS_PROGRAM, 8, homerun_state )
AM_RANGE(0x0000, 0x3fff) AM_ROM
@ -74,6 +66,18 @@ static ADDRESS_MAP_START( homerun_memmap, AS_PROGRAM, 8, homerun_state )
AM_RANGE(0xc000, 0xdfff) AM_RAM
ADDRESS_MAP_END
static ADDRESS_MAP_START( homerun_iomap, AS_IO, 8, homerun_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x10, 0x10) AM_WRITENOP // D7756C sample number
AM_RANGE(0x20, 0x20) AM_WRITENOP // D7756C control
AM_RANGE(0x30, 0x33) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
AM_RANGE(0x40, 0x40) AM_READ_PORT("IN0")
AM_RANGE(0x50, 0x50) AM_READ_PORT("IN2")
AM_RANGE(0x60, 0x60) AM_READ_PORT("IN1")
AM_RANGE(0x70, 0x71) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
ADDRESS_MAP_END
CUSTOM_INPUT_MEMBER(homerun_state::homerun_40_r)
{
UINT8 ret = (machine().primary_screen->vpos() > 116) ? 1 : 0;
@ -88,30 +92,11 @@ CUSTOM_INPUT_MEMBER(homerun_state::ganjaja_hopper_status_r)
}
static ADDRESS_MAP_START( homerun_iomap, AS_IO, 8, homerun_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x10, 0x10) AM_WRITENOP // D7756C sample number
AM_RANGE(0x20, 0x20) AM_WRITENOP // D7756C control
AM_RANGE(0x30, 0x33) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
AM_RANGE(0x40, 0x40) AM_READ_PORT("IN0")
AM_RANGE(0x50, 0x50) AM_READ_PORT("IN2")
AM_RANGE(0x60, 0x60) AM_READ_PORT("IN1")
AM_RANGE(0x70, 0x71) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
ADDRESS_MAP_END
/***************************************************************************
static const ym2203_interface ym2203_config =
{
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_INPUT_PORT("DSW"),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_HANDLER(homerun_banking_w)
},
DEVCB_NULL
};
Inputs
***************************************************************************/
static INPUT_PORTS_START( homerun )
PORT_START("IN0")
@ -220,6 +205,12 @@ static INPUT_PORTS_START( ganjaja )
INPUT_PORTS_END
/***************************************************************************
Machine Config
***************************************************************************/
static const gfx_layout gfxlayout =
{
8,8,
@ -231,8 +222,6 @@ static const gfx_layout gfxlayout =
8*8*2
};
static const gfx_layout spritelayout =
{
16,16,
@ -250,6 +239,31 @@ static GFXDECODE_START( homerun )
GFXDECODE_END
static I8255A_INTERFACE( ppi8255_intf )
{
// all ports are outputs
DEVCB_NULL, /* Port A read */
DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrollhi_w), /* Port A write */
DEVCB_NULL, /* Port B read */
DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrolly_w), /* Port B write */
DEVCB_NULL, /* Port C read */
DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrollx_w) /* Port C write */
};
static const ym2203_interface ym2203_config =
{
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_INPUT_PORT("DSW"),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_HANDLER(homerun_banking_w)
},
DEVCB_NULL
};
static MACHINE_START( homerun )
{
homerun_state *state = machine.driver_data<homerun_state>();

View File

@ -262,7 +262,7 @@ static SCREEN_UPDATE_IND16( panicr)
/***************************************************************************
I/O
I/O / Memory
***************************************************************************/
@ -288,7 +288,6 @@ READ8_MEMBER(panicr_state::panicr_collision_r)
}
WRITE8_MEMBER(panicr_state::panicr_scrollx_lo_w)
{
m_scrollx = (m_scrollx & 0xff00) | (data << 1 & 0xfe) | (data >> 7 & 0x01);