199
199
/* adpcm address write */
200
static WRITE8_HANDLER( appoooh_adpcm_w )
200
WRITE8_MEMBER(appoooh_state::appoooh_adpcm_w)
202
appoooh_state *state = space->machine().driver_data<appoooh_state>();
204
state->m_adpcm_address = data << 8;
205
msm5205_reset_w(state->m_adpcm, 0);
206
state->m_adpcm_data = 0xffffffff;
203
m_adpcm_address = data << 8;
204
msm5205_reset_w(m_adpcm, 0);
205
m_adpcm_data = 0xffffffff;
214
213
*************************************/
216
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8 )
215
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, appoooh_state )
217
216
AM_RANGE(0x0000, 0x7fff) AM_ROM
218
217
AM_RANGE(0x8000, 0x9fff) AM_ROM
219
218
AM_RANGE(0xa000, 0xdfff) AM_ROMBANK("bank1")
220
219
AM_RANGE(0xe000, 0xe7ff) AM_RAM
221
220
AM_RANGE(0xe800, 0xefff) AM_RAM /* RAM ? */
223
AM_RANGE(0xf000, 0xf01f) AM_BASE_MEMBER(appoooh_state, m_spriteram)
224
AM_RANGE(0xf020, 0xf3ff) AM_WRITE(appoooh_fg_videoram_w) AM_BASE_MEMBER(appoooh_state, m_fg_videoram)
225
AM_RANGE(0xf420, 0xf7ff) AM_WRITE(appoooh_fg_colorram_w) AM_BASE_MEMBER(appoooh_state, m_fg_colorram)
226
AM_RANGE(0xf800, 0xf81f) AM_BASE_MEMBER(appoooh_state, m_spriteram_2)
227
AM_RANGE(0xf820, 0xfbff) AM_WRITE(appoooh_bg_videoram_w) AM_BASE_MEMBER(appoooh_state, m_bg_videoram)
228
AM_RANGE(0xfc20, 0xffff) AM_WRITE(appoooh_bg_colorram_w) AM_BASE_MEMBER(appoooh_state, m_bg_colorram)
222
AM_RANGE(0xf000, 0xf01f) AM_SHARE("spriteram")
223
AM_RANGE(0xf020, 0xf3ff) AM_WRITE(appoooh_fg_videoram_w) AM_SHARE("fg_videoram")
224
AM_RANGE(0xf420, 0xf7ff) AM_WRITE(appoooh_fg_colorram_w) AM_SHARE("fg_colorram")
225
AM_RANGE(0xf800, 0xf81f) AM_SHARE("spriteram_2")
226
AM_RANGE(0xf820, 0xfbff) AM_WRITE(appoooh_bg_videoram_w) AM_SHARE("bg_videoram")
227
AM_RANGE(0xfc20, 0xffff) AM_WRITE(appoooh_bg_colorram_w) AM_SHARE("bg_colorram")
229
228
AM_RANGE(0xf000, 0xffff) AM_RAM
232
static ADDRESS_MAP_START( main_portmap, AS_IO, 8 )
231
static ADDRESS_MAP_START( main_portmap, AS_IO, 8, appoooh_state )
233
232
ADDRESS_MAP_GLOBAL_MASK(0xff)
234
AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") AM_DEVWRITE("sn1", sn76496_w)
235
AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") AM_DEVWRITE("sn2", sn76496_w)
236
AM_RANGE(0x02, 0x02) AM_DEVWRITE("sn3", sn76496_w)
233
AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") AM_DEVWRITE_LEGACY("sn1", sn76496_w)
234
AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") AM_DEVWRITE_LEGACY("sn2", sn76496_w)
235
AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("sn3", sn76496_w)
237
236
AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") AM_WRITE(appoooh_adpcm_w)
238
237
AM_RANGE(0x04, 0x04) AM_READ_PORT("BUTTON3") AM_WRITE(appoooh_out_w)
239
238
AM_RANGE(0x05, 0x05) AM_WRITE(appoooh_scroll_w) /* unknown */