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

« back to all changes in this revision

Viewing changes to src/mame/drivers/ginganin.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:
70
70
*/
71
71
 
72
72
 
73
 
static ADDRESS_MAP_START( ginganin_map, AS_PROGRAM, 16 )
 
73
static ADDRESS_MAP_START( ginganin_map, AS_PROGRAM, 16, ginganin_state )
74
74
/* The ROM area: 10000-13fff is written with: 0000 0000 0000 0001, at startup only. Why? */
75
75
        AM_RANGE(0x000000, 0x01ffff) AM_ROM
76
76
        AM_RANGE(0x020000, 0x023fff) AM_RAM
77
 
        AM_RANGE(0x030000, 0x0307ff) AM_RAM_WRITE(ginganin_txtram16_w) AM_BASE_MEMBER(ginganin_state, m_txtram)
78
 
        AM_RANGE(0x040000, 0x0407ff) AM_RAM AM_BASE_SIZE_MEMBER(ginganin_state, m_spriteram, m_spriteram_size)
79
 
        AM_RANGE(0x050000, 0x0507ff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBxxxx_word_w) AM_BASE_GENERIC(paletteram)
80
 
        AM_RANGE(0x060000, 0x06000f) AM_RAM_WRITE(ginganin_vregs16_w) AM_BASE_MEMBER(ginganin_state, m_vregs)
81
 
        AM_RANGE(0x068000, 0x06bfff) AM_RAM_WRITE(ginganin_fgram16_w) AM_BASE_MEMBER(ginganin_state, m_fgram)
 
77
        AM_RANGE(0x030000, 0x0307ff) AM_RAM_WRITE(ginganin_txtram16_w) AM_SHARE("txtram")
 
78
        AM_RANGE(0x040000, 0x0407ff) AM_RAM AM_SHARE("spriteram")
 
79
        AM_RANGE(0x050000, 0x0507ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
 
80
        AM_RANGE(0x060000, 0x06000f) AM_RAM_WRITE(ginganin_vregs16_w) AM_SHARE("vregs")
 
81
        AM_RANGE(0x068000, 0x06bfff) AM_RAM_WRITE(ginganin_fgram16_w) AM_SHARE("fgram")
82
82
        AM_RANGE(0x070000, 0x070001) AM_READ_PORT("P1_P2")
83
83
        AM_RANGE(0x070002, 0x070003) AM_READ_PORT("DSW")
84
84
ADDRESS_MAP_END
90
90
**
91
91
*/
92
92
 
93
 
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8 )
 
93
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, ginganin_state )
94
94
        AM_RANGE(0x0000, 0x07ff) AM_RAM
95
 
        AM_RANGE(0x0800, 0x0807) AM_DEVREADWRITE_MODERN("6840ptm", ptm6840_device, read, write)
96
 
        AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_r)
97
 
        AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ymsnd", y8950_w)
98
 
        AM_RANGE(0x2800, 0x2801) AM_DEVWRITE("aysnd", ay8910_address_data_w)
 
95
        AM_RANGE(0x0800, 0x0807) AM_DEVREADWRITE("6840ptm", ptm6840_device, read, write)
 
96
        AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_byte_r)
 
97
        AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ymsnd", y8950_w)
 
98
        AM_RANGE(0x2800, 0x2801) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w)
99
99
        AM_RANGE(0x4000, 0xffff) AM_ROM
100
100
ADDRESS_MAP_END
101
101
 
380
380
        UINT16 *rom;
381
381
 
382
382
        /* main cpu patches */
383
 
        rom = (UINT16 *)machine.region("maincpu")->base();
 
383
        rom = (UINT16 *)machine.root_device().memregion("maincpu")->base();
384
384
        /* avoid writes to rom getting to the log */
385
385
        rom[0x408 / 2] = 0x6000;
386
386
        rom[0x40a / 2] = 0x001c;
388
388
 
389
389
        /* sound cpu patches */
390
390
        /* let's clear the RAM: ROM starts at 0x4000 */
391
 
        memset(machine.region("audiocpu")->base(), 0, 0x800);
 
391
        memset(machine.root_device().memregion("audiocpu")->base(), 0, 0x800);
392
392
}
393
393
 
394
394