~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/mame/drivers/appoooh.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
        {
178
178
                if (state->m_adpcm_data == 0xffffffff)
179
179
                {
180
 
                        UINT8 *RAM = device->machine().region("adpcm")->base();
 
180
                        UINT8 *RAM = state->memregion("adpcm")->base();
181
181
 
182
182
                        state->m_adpcm_data = RAM[state->m_adpcm_address++];
183
183
                        msm5205_data_w(device, state->m_adpcm_data >> 4);
197
197
}
198
198
 
199
199
/* adpcm address write */
200
 
static WRITE8_HANDLER( appoooh_adpcm_w )
 
200
WRITE8_MEMBER(appoooh_state::appoooh_adpcm_w)
201
201
{
202
 
        appoooh_state *state = space->machine().driver_data<appoooh_state>();
203
202
 
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;
207
206
}
208
207
 
209
208
 
213
212
 *
214
213
 *************************************/
215
214
 
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 ? */
222
221
 
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
230
229
ADDRESS_MAP_END
231
230
 
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 */
605
604
static DRIVER_INIT(robowresb)
606
605
{
607
606
        address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
608
 
        space->set_decrypted_region(0x0000, 0x7fff, machine.region("maincpu")->base() + 0x1c000);
 
607
        space->set_decrypted_region(0x0000, 0x7fff, machine.root_device().memregion("maincpu")->base() + 0x1c000);
609
608
}
610
609
 
611
610