diff options
Diffstat (limited to 'src/mame/drivers')
-rw-r--r-- | src/mame/drivers/taitoair.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/mame/drivers/taitoair.c b/src/mame/drivers/taitoair.c index 24eaec97a93..128508dd4aa 100644 --- a/src/mame/drivers/taitoair.c +++ b/src/mame/drivers/taitoair.c @@ -300,6 +300,27 @@ static WRITE16_HANDLER( airsys_paletteram16_w ) /* xxBBBBxRRRRxGGGG */ palette_set_color_rgb(space->machine(), offset, pal4bit(a >> 0), pal4bit(a >> 5), pal4bit(a >> 10)); } +static WRITE16_HANDLER( airsys_gradram_w ) +{ + taitoair_state *state = space->machine().driver_data<taitoair_state>(); + UINT32 pen; + int r,g,b; + + COMBINE_DATA(&state->m_gradram[offset]); + + pen = (state->m_gradram[offset])|(state->m_gradram[(offset+0x2000)]<<16); + /* TODO: correct? */ + r = (pen & 0x00007f) >> 0; + g = (pen & 0x007f00) >> (8); + b = (pen & 0x7f0000) >> (16); + + r = (r << 1) | (r & 1); + g = (g << 1) | (g & 1); + b = (b << 1) | (b & 1); + + palette_set_color_rgb(space->machine(), offset+0x2000, r, g, b); +} + /*********************************************************** INPUTS @@ -368,8 +389,7 @@ static ADDRESS_MAP_START( airsys_map, AS_PROGRAM, 16 ) AM_RANGE(0x000000, 0x0bffff) AM_ROM AM_RANGE(0x0c0000, 0x0cffff) AM_RAM AM_BASE_MEMBER(taitoair_state, m_m68000_mainram) AM_RANGE(0x140000, 0x140001) AM_WRITE(system_control_w) /* Pause the TMS32025 */ - AM_RANGE(0x180000, 0x183fff) AM_RAM /* "gradiation ram (0)" */ - AM_RANGE(0x184000, 0x187fff) AM_RAM /* "gradiation ram (1)" */ + AM_RANGE(0x180000, 0x187fff) AM_RAM_WRITE(airsys_gradram_w) AM_BASE_MEMBER(taitoair_state, m_gradram) /* "gradiation ram (0/1)" */ AM_RANGE(0x188000, 0x18bfff) AM_RAM_WRITE(airsys_paletteram16_w) AM_BASE_MEMBER(taitoair_state, m_paletteram) AM_RANGE(0x800000, 0x820fff) AM_DEVREADWRITE("tc0080vco", tc0080vco_word_r, tc0080vco_word_w) /* tilemaps, sprites */ AM_RANGE(0x908000, 0x90ffff) AM_RAM AM_BASE_MEMBER(taitoair_state, m_line_ram) /* "line ram" */ @@ -465,7 +485,7 @@ static INPUT_PORTS_START( topland ) to make keyboard control feasible! */ PORT_START(STICK1_PORT_TAG) - PORT_BIT( 0x00ff, 0x0000, IPT_AD_STICK_Z ) PORT_MINMAX(0x0080,0x007f) PORT_SENSITIVITY(30) PORT_KEYDELTA(40) PORT_PLAYER(1) PORT_REVERSE + PORT_BIT( 0xffff, 0x0000, IPT_AD_STICK_Z ) PORT_MINMAX(0x0000,0xffff) PORT_SENSITIVITY(30) PORT_KEYDELTA(40) PORT_PLAYER(1) PORT_REVERSE PORT_START(STICK2_PORT_TAG) PORT_BIT( 0xffff, 0x0000, IPT_AD_STICK_X ) PORT_MINMAX(0xf800,0x07ff) PORT_SENSITIVITY(30) PORT_KEYDELTA(40) PORT_PLAYER(1) @@ -676,7 +696,7 @@ static MACHINE_CONFIG_START( airsys, taitoair_state ) MCFG_SCREEN_UPDATE(taitoair) MCFG_GFXDECODE(airsys) - MCFG_PALETTE_LENGTH(512*16) + MCFG_PALETTE_LENGTH(512*16+512*16) MCFG_TC0080VCO_ADD("tc0080vco", airsys_tc0080vco_intf) |