Previous 199869 Revisions Next

r17737 Saturday 8th September, 2012 at 23:48:59 UTC by hap
move interfaces down
[src/mame/drivers]homerun.c panicr.c

trunk/src/mame/drivers/panicr.c
r17736r17737
262262
263263/***************************************************************************
264264
265  I/O
265  I/O / Memory
266266
267267***************************************************************************/
268268
r17736r17737
288288}
289289
290290
291
292291WRITE8_MEMBER(panicr_state::panicr_scrollx_lo_w)
293292{
294293   m_scrollx = (m_scrollx & 0xff00) | (data << 1 & 0xfe) | (data >> 7 & 0x01);
trunk/src/mame/drivers/homerun.c
r17736r17737
5151#include "includes/homerun.h"
5252
5353
54/***************************************************************************
5455
56  I/O / Memory
5557
56static I8255A_INTERFACE( ppi8255_intf )
57{
58   // all ports are outputs
59   DEVCB_NULL,            /* Port A read */
60   DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrollhi_w),   /* Port A write */
61   DEVCB_NULL,            /* Port B read */
62   DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrolly_w),   /* Port B write */
63   DEVCB_NULL,            /* Port C read */
64   DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrollx_w)   /* Port C write */
65};
58***************************************************************************/
6659
67
6860static ADDRESS_MAP_START( homerun_memmap, AS_PROGRAM, 8, homerun_state )
6961   AM_RANGE(0x0000, 0x3fff) AM_ROM
7062   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
r17736r17737
7466   AM_RANGE(0xc000, 0xdfff) AM_RAM
7567ADDRESS_MAP_END
7668
69static ADDRESS_MAP_START( homerun_iomap, AS_IO, 8, homerun_state )
70   ADDRESS_MAP_GLOBAL_MASK(0xff)
71   AM_RANGE(0x10, 0x10) AM_WRITENOP // D7756C sample number
72   AM_RANGE(0x20, 0x20) AM_WRITENOP // D7756C control
73   AM_RANGE(0x30, 0x33) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
74   AM_RANGE(0x40, 0x40) AM_READ_PORT("IN0")
75   AM_RANGE(0x50, 0x50) AM_READ_PORT("IN2")
76   AM_RANGE(0x60, 0x60) AM_READ_PORT("IN1")
77   AM_RANGE(0x70, 0x71) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
78ADDRESS_MAP_END
79
80
7781CUSTOM_INPUT_MEMBER(homerun_state::homerun_40_r)
7882{
7983   UINT8 ret = (machine().primary_screen->vpos() > 116) ? 1 : 0;
r17736r17737
8892}
8993
9094
91static ADDRESS_MAP_START( homerun_iomap, AS_IO, 8, homerun_state )
92   ADDRESS_MAP_GLOBAL_MASK(0xff)
93   AM_RANGE(0x10, 0x10) AM_WRITENOP // D7756C sample number
94   AM_RANGE(0x20, 0x20) AM_WRITENOP // D7756C control
95   AM_RANGE(0x30, 0x33) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
96   AM_RANGE(0x40, 0x40) AM_READ_PORT("IN0")
97   AM_RANGE(0x50, 0x50) AM_READ_PORT("IN2")
98   AM_RANGE(0x60, 0x60) AM_READ_PORT("IN1")
99   AM_RANGE(0x70, 0x71) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
100ADDRESS_MAP_END
95/***************************************************************************
10196
102static const ym2203_interface ym2203_config =
103{
104   {
105      AY8910_LEGACY_OUTPUT,
106      AY8910_DEFAULT_LOADS,
107      DEVCB_INPUT_PORT("DSW"),
108      DEVCB_NULL,
109      DEVCB_NULL,
110      DEVCB_HANDLER(homerun_banking_w)
111   },
112   DEVCB_NULL
113};
97  Inputs
11498
99***************************************************************************/
115100
116101static INPUT_PORTS_START( homerun )
117102   PORT_START("IN0")
r17736r17737
220205INPUT_PORTS_END
221206
222207
208/***************************************************************************
209
210  Machine Config
211
212***************************************************************************/
213
223214static const gfx_layout gfxlayout =
224215{
225216   8,8,
r17736r17737
231222   8*8*2
232223};
233224
234
235
236225static const gfx_layout spritelayout =
237226{
238227   16,16,
r17736r17737
250239GFXDECODE_END
251240
252241
242static I8255A_INTERFACE( ppi8255_intf )
243{
244   // all ports are outputs
245   DEVCB_NULL,            /* Port A read */
246   DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrollhi_w),   /* Port A write */
247   DEVCB_NULL,            /* Port B read */
248   DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrolly_w),   /* Port B write */
249   DEVCB_NULL,            /* Port C read */
250   DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrollx_w)   /* Port C write */
251};
252
253static const ym2203_interface ym2203_config =
254{
255   {
256      AY8910_LEGACY_OUTPUT,
257      AY8910_DEFAULT_LOADS,
258      DEVCB_INPUT_PORT("DSW"),
259      DEVCB_NULL,
260      DEVCB_NULL,
261      DEVCB_HANDLER(homerun_banking_w)
262   },
263   DEVCB_NULL
264};
265
266
253267static MACHINE_START( homerun )
254268{
255269   homerun_state *state = machine.driver_data<homerun_state>();

Previous 199869 Revisions Next


© 1997-2024 The MAME Team