diff --git a/src/mame/drivers/fastfred.c b/src/mame/drivers/fastfred.c index 61883730d07..3dc2a2fdd5e 100644 --- a/src/mame/drivers/fastfred.c +++ b/src/mame/drivers/fastfred.c @@ -615,7 +615,6 @@ static MACHINE_DRIVER_START( imago ) /* video hardware */ MDRV_PALETTE_LENGTH(256+64+2) /* 256 for characters, 64 for the stars and 2 for the web */ - MDRV_COLORTABLE_LENGTH(32*8+64+2) MDRV_GFXDECODE(imago) MDRV_VIDEO_START(imago) diff --git a/src/mame/drivers/safarir.c b/src/mame/drivers/safarir.c index 84e5ea20e8d..bc13e5e6c81 100644 --- a/src/mame/drivers/safarir.c +++ b/src/mame/drivers/safarir.c @@ -86,6 +86,7 @@ static WRITE8_HANDLER( ram_bank_w ) } + /************************************* * * Video system @@ -114,12 +115,10 @@ static PALETTE_INIT( safarir ) { int i; - for (i = 0; i < machine->drv->total_colors; i++) + for (i = 0; i < machine->drv->total_colors / 2; i++) { - palette_set_color_rgb(machine, i, pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i >> 0)); - - colortable[(i * 2) + 0] = 0; - colortable[(i * 2) + 1] = i; + palette_set_color(machine, (i * 2) + 0, RGB_BLACK); + palette_set_color(machine, (i * 2) + 1, MAKE_RGB(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i >> 0))); } } @@ -272,9 +271,8 @@ static MACHINE_DRIVER_START( safarir ) MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) MDRV_VIDEO_START(safarir) MDRV_VIDEO_UPDATE(safarir) - MDRV_PALETTE_LENGTH(8) MDRV_PALETTE_INIT(safarir) - MDRV_COLORTABLE_LENGTH(2*8) + MDRV_PALETTE_LENGTH(2*8) MDRV_GFXDECODE(safarir) MDRV_SCREEN_ADD("main", 0) diff --git a/src/mame/drivers/sangho.c b/src/mame/drivers/sangho.c index 9eb27155a73..f82ee46cd0d 100644 --- a/src/mame/drivers/sangho.c +++ b/src/mame/drivers/sangho.c @@ -245,7 +245,6 @@ static MACHINE_DRIVER_START(pzlestar) MDRV_SCREEN_SIZE(512 + 32, (212 + 28) * 2) MDRV_SCREEN_VISIBLE_AREA(0, 512 + 32 - 1, 0, (212 + 28) * 2 - 1) MDRV_PALETTE_LENGTH(512) - MDRV_COLORTABLE_LENGTH(512) MDRV_MACHINE_RESET(pzlestar) @@ -277,7 +276,6 @@ static MACHINE_DRIVER_START(sexyboom ) MDRV_SCREEN_SIZE(512 + 32, (212 + 28) * 2) MDRV_SCREEN_VISIBLE_AREA(0, 512 + 32 - 1, 0, (212 + 28) * 2 - 1) MDRV_PALETTE_LENGTH(512) - MDRV_COLORTABLE_LENGTH(512) MDRV_MACHINE_RESET(sexyboom) diff --git a/src/mame/drivers/sbasketb.c b/src/mame/drivers/sbasketb.c index 33815909841..befa71cbf2f 100644 --- a/src/mame/drivers/sbasketb.c +++ b/src/mame/drivers/sbasketb.c @@ -22,25 +22,25 @@ MAIN BOARD: #include "sound/dac.h" -extern void konami1_decode(void); - extern UINT8 *sbasketb_scroll; extern UINT8 *sbasketb_palettebank; extern UINT8 *sbasketb_spriteram_select; -extern WRITE8_HANDLER( sbasketb_videoram_w ); -extern WRITE8_HANDLER( sbasketb_colorram_w ); -extern WRITE8_HANDLER( sbasketb_flipscreen_w ); -extern WRITE8_HANDLER( sbasketb_scroll_w ); +void konami1_decode(void); -extern PALETTE_INIT( sbasketb ); -extern VIDEO_START( sbasketb ); -extern VIDEO_UPDATE( sbasketb ); +WRITE8_HANDLER( sbasketb_videoram_w ); +WRITE8_HANDLER( sbasketb_colorram_w ); +WRITE8_HANDLER( sbasketb_flipscreen_w ); +WRITE8_HANDLER( sbasketb_scroll_w ); -extern WRITE8_HANDLER( konami_SN76496_latch_w ); -extern WRITE8_HANDLER( konami_SN76496_0_w ); -extern WRITE8_HANDLER( hyperspt_sound_w ); -extern READ8_HANDLER( hyperspt_sh_timer_r ); +PALETTE_INIT( sbasketb ); +VIDEO_START( sbasketb ); +VIDEO_UPDATE( sbasketb ); + +WRITE8_HANDLER( konami_SN76496_latch_w ); +WRITE8_HANDLER( konami_SN76496_0_w ); +WRITE8_HANDLER( hyperspt_sound_w ); +READ8_HANDLER( hyperspt_sh_timer_r ); static WRITE8_HANDLER( sbasketb_sh_irqtrigger_w ) @@ -80,7 +80,7 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x3c85, 0x3c85) AM_WRITE(MWA8_RAM) AM_BASE(&sbasketb_spriteram_select) AM_RANGE(0x3d00, 0x3d00) AM_WRITE(soundlatch_w) AM_RANGE(0x3d80, 0x3d80) AM_WRITE(sbasketb_sh_irqtrigger_w) - AM_RANGE(0x3f80, 0x3f80) AM_WRITE(sbasketb_scroll_w) + AM_RANGE(0x3f80, 0x3f80) AM_WRITE(MWA8_RAM) AM_BASE(&sbasketb_scroll) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) @@ -255,8 +255,7 @@ static MACHINE_DRIVER_START( sbasketb ) MDRV_SCREEN_SIZE(32*8, 32*8) MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) MDRV_GFXDECODE(sbasketb) - MDRV_PALETTE_LENGTH(256) - MDRV_COLORTABLE_LENGTH(16*16+16*16*16) + MDRV_PALETTE_LENGTH(16*16+16*16*16) MDRV_PALETTE_INIT(sbasketb) MDRV_VIDEO_START(sbasketb) diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index 27988a83c3d..5a219f1b895 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -1600,7 +1600,7 @@ static ADDRESS_MAP_START( tndrcade_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x200000, 0x200001) AM_WRITE(MWA16_NOP ) // ? 0 AM_RANGE(0x280000, 0x280001) AM_WRITE(MWA16_NOP ) // ? 0 / 1 (sub cpu related?) AM_RANGE(0x300000, 0x300001) AM_WRITE(MWA16_NOP ) // ? 0 / 1 - AM_RANGE(0x380000, 0x3803ff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x380000, 0x3803ff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x400000, 0x400001) AM_WRITE(MWA16_RAM ) // ? $4000 AM_RANGE(0x600000, 0x600607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y AM_RANGE(0x800000, 0x800007) AM_WRITE(sub_ctrl_w ) // Sub CPU Control? @@ -1637,7 +1637,7 @@ static ADDRESS_MAP_START( downtown_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x300000, 0x300001) AM_WRITE(MWA16_NOP ) // IRQ enable/acknowledge? AM_RANGE(0x400000, 0x400007) AM_WRITE(twineagl_tilebank_w ) // special tile banking to animate water in twineagl AM_RANGE(0x500000, 0x500001) AM_WRITE(MWA16_NOP ) // ? - AM_RANGE(0x700000, 0x7003ff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700000, 0x7003ff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x800000, 0x800005) AM_WRITE(MWA16_RAM) AM_BASE(&seta_vctrl_0 ) // VRAM Ctrl AM_RANGE(0x900000, 0x903fff) AM_WRITE(seta_vram_0_w) AM_BASE(&seta_vram_0 ) // VRAM AM_RANGE(0xa00000, 0xa00007) AM_WRITE(sub_ctrl_w ) // Sub CPU Control? @@ -1711,7 +1711,7 @@ static ADDRESS_MAP_START( calibr50_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x200000, 0x200fff) AM_WRITE(MWA16_RAM ) // NVRAM AM_RANGE(0x300000, 0x300001) AM_WRITE(MWA16_NOP ) // ? (random value) AM_RANGE(0x500000, 0x500001) AM_WRITE(MWA16_NOP ) // ? - AM_RANGE(0x700000, 0x7003ff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700000, 0x7003ff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x800000, 0x800005) AM_WRITE(MWA16_RAM) AM_BASE(&seta_vctrl_0 ) // VRAM Ctrl AM_RANGE(0x900000, 0x903fff) AM_WRITE(seta_vram_0_w) AM_BASE(&seta_vram_0 ) // VRAM AM_RANGE(0x904000, 0x904fff) AM_WRITE(MWA16_RAM ) // @@ -1773,20 +1773,6 @@ static WRITE16_HANDLER( usclssic_lockout_w ) } } -/* palette can probably be handled in a better way (better colortable / palette init..) */ - -INLINE void usc_changecolor_xRRRRRGGGGGBBBBB(pen_t color,int data) -{ - if (color>=0x100) palette_set_color_rgb(Machine,color-0x100,pal5bit(data >> 10),pal5bit(data >> 5),pal5bit(data >> 0)); - else palette_set_color_rgb(Machine,color+0x200,pal5bit(data >> 10),pal5bit(data >> 5),pal5bit(data >> 0)); -} - -static WRITE16_HANDLER( usclssic_paletteram16_xRRRRRGGGGGBBBBB_word_w ) -{ - COMBINE_DATA(&paletteram16[offset]); - usc_changecolor_xRRRRRGGGGGBBBBB(offset,paletteram16[offset]); -} - static ADDRESS_MAP_START( usclssic_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x07ffff) AM_READ(MRA16_ROM ) // ROM @@ -1813,7 +1799,7 @@ static ADDRESS_MAP_START( usclssic_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x800000, 0x800607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y AM_RANGE(0x900000, 0x900001) AM_WRITE(MWA16_RAM ) // ? $4000 AM_RANGE(0xa00000, 0xa00005) AM_WRITE(MWA16_RAM) AM_BASE(&seta_vctrl_0 ) // VRAM Ctrl - AM_RANGE(0xb00000, 0xb003ff) AM_WRITE(usclssic_paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0xb00000, 0xb003ff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0xb40000, 0xb40001) AM_WRITE(usclssic_lockout_w ) // Coin Lockout + Tiles Banking AM_RANGE(0xb40010, 0xb40011) AM_WRITE(calibr50_soundlatch_w ) // To Sub CPU AM_RANGE(0xb40018, 0xb40019) AM_WRITE(watchdog_reset16_w ) // Watchdog @@ -1851,7 +1837,7 @@ static ADDRESS_MAP_START( atehate_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x200000, 0x200001) AM_WRITE(MWA16_NOP ) // ? watchdog ? AM_RANGE(0x300000, 0x300001) AM_WRITE(MWA16_NOP ) // ? 0 (irq ack lev 2?) AM_RANGE(0x500000, 0x500001) AM_WRITE(MWA16_NOP ) // ? (end of lev 1: bit 4 goes 1,0,1) - AM_RANGE(0x700000, 0x7003ff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700000, 0x7003ff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0xa00000, 0xa00607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y AM_RANGE(0xc00000, 0xc00001) AM_WRITE(MWA16_RAM ) // ? 0x4000 AM_RANGE(0xe00000, 0xe03fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16_2 ) // Sprites Code + X + Attr @@ -1893,7 +1879,7 @@ static ADDRESS_MAP_START( blandia_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x300000, 0x30ffff) AM_WRITE(MWA16_RAM ) // RAM (wrofaero only?) AM_RANGE(0x500000, 0x500005) AM_WRITE(seta_vregs_w) AM_BASE(&seta_vregs ) // Coin Lockout + Video Registers AM_RANGE(0x700000, 0x7003ff) AM_WRITE(MWA16_RAM ) // (rezon,jjsquawk) - AM_RANGE(0x700400, 0x700fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700400, 0x700fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x701000, 0x70ffff) AM_WRITE(MWA16_RAM ) // AM_RANGE(0x800000, 0x800607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y AM_RANGE(0x880000, 0x880001) AM_WRITE(MWA16_RAM ) // ? 0xc000 @@ -1948,7 +1934,7 @@ static ADDRESS_MAP_START( blandiap_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x300000, 0x30ffff) AM_WRITE(MWA16_RAM ) // RAM (wrofaero only?) AM_RANGE(0x500000, 0x500005) AM_WRITE(seta_vregs_w) AM_BASE(&seta_vregs ) // Coin Lockout + Video Registers AM_RANGE(0x700000, 0x7003ff) AM_WRITE(MWA16_RAM ) // (rezon,jjsquawk) - AM_RANGE(0x700400, 0x700fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700400, 0x700fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x701000, 0x70ffff) AM_WRITE(MWA16_RAM ) // AM_RANGE(0x800000, 0x803fff) AM_WRITE(seta_vram_0_w) AM_BASE(&seta_vram_0 ) // VRAM 0 AM_RANGE(0x804000, 0x80ffff) AM_WRITE(MWA16_RAM ) // (jjsquawk) @@ -2044,7 +2030,7 @@ static ADDRESS_MAP_START( wrofaero_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x300000, 0x30ffff) AM_WRITE(MWA16_RAM ) // RAM (wrofaero only?) AM_RANGE(0x500000, 0x500005) AM_WRITE(seta_vregs_w) AM_BASE(&seta_vregs ) // Coin Lockout + Video Registers AM_RANGE(0x700000, 0x7003ff) AM_WRITE(MWA16_RAM ) // (rezon,jjsquawk) - AM_RANGE(0x700400, 0x700fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700400, 0x700fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x701000, 0x70ffff) AM_WRITE(MWA16_RAM ) // AM_RANGE(0x800000, 0x803fff) AM_WRITE(seta_vram_0_w) AM_BASE(&seta_vram_0 ) // VRAM 0 AM_RANGE(0x804000, 0x80ffff) AM_WRITE(MWA16_RAM ) // (jjsquawk) @@ -2095,7 +2081,7 @@ static ADDRESS_MAP_START( orbs_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x8000f0, 0x8000f1) AM_WRITE(MWA16_RAM ) // NVRAM AM_RANGE(0x800100, 0x8001ff) AM_WRITE(MWA16_RAM ) // NVRAM AM_RANGE(0xa00000, 0xa03fff) AM_WRITE(seta_sound_word_w ) // Sound - AM_RANGE(0xb00000, 0xb003ff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0xb00000, 0xb003ff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0xc00000, 0xc03fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16_2 ) // Sprites Code + X + Attr AM_RANGE(0xd00000, 0xd00001) AM_WRITE(MWA16_RAM ) // ? 0x4000 AM_RANGE(0xe00000, 0xe00607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y @@ -2132,7 +2118,7 @@ static ADDRESS_MAP_START( blockcar_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x200000, 0x200001) AM_WRITE(MWA16_NOP ) // ? 0/1 (IRQ acknowledge?) AM_RANGE(0x400000, 0x400001) AM_WRITE(seta_vregs_w) AM_BASE(&seta_vregs ) // Coin Lockout + Sound Enable (bit 4?) AM_RANGE(0xa00000, 0xa03fff) AM_WRITE(seta_sound_word_w ) // Sound - AM_RANGE(0xb00000, 0xb003ff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0xb00000, 0xb003ff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0xc00000, 0xc03fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16_2 ) // Sprites Code + X + Attr AM_RANGE(0xd00000, 0xd00001) AM_WRITE(MWA16_RAM ) // ? 0x4000 AM_RANGE(0xe00000, 0xe00607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y @@ -2173,7 +2159,7 @@ static ADDRESS_MAP_START( daioh_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x100000, 0x10ffff) AM_WRITE(MWA16_RAM ) // RAM AM_RANGE(0x500000, 0x500005) AM_WRITE(seta_vregs_w) AM_BASE(&seta_vregs ) // Coin Lockout + Video Registers AM_RANGE(0x700000, 0x7003ff) AM_WRITE(MWA16_RAM ) - AM_RANGE(0x700400, 0x700fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700400, 0x700fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x701000, 0x70ffff) AM_WRITE(MWA16_RAM ) // AM_RANGE(0x800000, 0x803fff) AM_WRITE(seta_vram_0_w) AM_BASE(&seta_vram_0 ) // VRAM 0 AM_RANGE(0x804000, 0x80ffff) AM_WRITE(MWA16_RAM ) // @@ -2220,7 +2206,7 @@ static ADDRESS_MAP_START( drgnunit_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x200000, 0x200001) AM_WRITE(MWA16_NOP ) // Watchdog AM_RANGE(0x300000, 0x300001) AM_WRITE(MWA16_NOP ) // ? IRQ Ack AM_RANGE(0x500000, 0x500001) AM_WRITE(seta_vregs_w) AM_BASE(&seta_vregs ) // Coin Lockout + Video Registers - AM_RANGE(0x700000, 0x7003ff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700000, 0x7003ff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x800000, 0x800005) AM_WRITE(MWA16_RAM) AM_BASE(&seta_vctrl_0 ) // VRAM Ctrl AM_RANGE(0x900000, 0x903fff) AM_WRITE(seta_vram_0_w) AM_BASE(&seta_vram_0 ) // VRAM AM_RANGE(0x904000, 0x90ffff) AM_WRITE(MWA16_NOP ) // unused (qzkklogy) @@ -2268,7 +2254,7 @@ static ADDRESS_MAP_START( extdwnhl_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x40000c, 0x40000d) AM_WRITE(watchdog_reset16_w ) // Watchdog (sokonuke) AM_RANGE(0x500000, 0x500003) AM_WRITE(seta_vregs_w) AM_BASE(&seta_vregs ) // Coin Lockout + Video Registers AM_RANGE(0x500004, 0x500007) AM_WRITE(MWA16_NOP ) // IRQ Ack (sokonuke) - AM_RANGE(0x600400, 0x600fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x600400, 0x600fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x601000, 0x610bff) AM_WRITE(MWA16_RAM ) // AM_RANGE(0x800000, 0x803fff) AM_WRITE(seta_vram_0_w) AM_BASE(&seta_vram_0 ) // VRAM 0 AM_RANGE(0x804000, 0x80ffff) AM_WRITE(MWA16_RAM ) // @@ -2317,7 +2303,7 @@ static ADDRESS_MAP_START( kamenrid_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x600000, 0x600005) AM_WRITE(seta_vregs_w) AM_BASE(&seta_vregs ) // ? Coin Lockout + Video Registers AM_RANGE(0x600006, 0x600007) AM_WRITE(MWA16_NOP ) // ? AM_RANGE(0x700000, 0x7003ff) AM_WRITE(MWA16_RAM ) // Palette RAM (tested) - AM_RANGE(0x700400, 0x700fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700400, 0x700fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x701000, 0x703fff) AM_WRITE(MWA16_RAM ) // Palette AM_RANGE(0x800000, 0x803fff) AM_WRITE(seta_vram_0_w) AM_BASE(&seta_vram_0 ) // VRAM 0 AM_RANGE(0x804000, 0x807fff) AM_WRITE(MWA16_RAM ) // tested @@ -2361,7 +2347,7 @@ static ADDRESS_MAP_START( madshark_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x50000c, 0x50000d) AM_WRITE(watchdog_reset16_w ) // Watchdog AM_RANGE(0x600000, 0x600005) AM_WRITE(seta_vregs_w) AM_BASE(&seta_vregs ) // ? Coin Lockout + Video Registers AM_RANGE(0x600006, 0x600007) AM_WRITE(MWA16_NOP ) // ? - AM_RANGE(0x700400, 0x700fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700400, 0x700fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x800000, 0x803fff) AM_WRITE(seta_vram_0_w) AM_BASE(&seta_vram_0 ) // VRAM 0 AM_RANGE(0x880000, 0x883fff) AM_WRITE(seta_vram_2_w) AM_BASE(&seta_vram_2 ) // VRAM 2 AM_RANGE(0x900000, 0x900005) AM_WRITE(MWA16_RAM) AM_BASE(&seta_vctrl_0 ) // VRAM 0&1 Ctrl @@ -2433,7 +2419,7 @@ static ADDRESS_MAP_START( krzybowl_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x8000f0, 0x8000f1) AM_WRITE(MWA16_RAM ) // NVRAM AM_RANGE(0x800100, 0x8001ff) AM_WRITE(MWA16_RAM ) // NVRAM AM_RANGE(0xa00000, 0xa03fff) AM_WRITE(seta_sound_word_w ) // Sound - AM_RANGE(0xb00000, 0xb003ff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0xb00000, 0xb003ff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0xc00000, 0xc03fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16_2 ) // Sprites Code + X + Attr AM_RANGE(0xd00000, 0xd00001) AM_WRITE(MWA16_RAM ) // ? 0x4000 AM_RANGE(0xe00000, 0xe00607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y @@ -2486,7 +2472,7 @@ static ADDRESS_MAP_START( msgundam_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x400000, 0x400001) AM_WRITE(MWA16_NOP ) // Lev 2 IRQ Ack AM_RANGE(0x400004, 0x400005) AM_WRITE(MWA16_NOP ) // Lev 4 IRQ Ack AM_RANGE(0x500000, 0x500005) AM_WRITE(msgundam_vregs_w) AM_BASE(&seta_vregs ) // Coin Lockout + Video Registers - AM_RANGE(0x700400, 0x700fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700400, 0x700fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x800000, 0x800607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y AM_RANGE(0x880000, 0x880001) AM_WRITE(MWA16_RAM ) // ? 0x4000 AM_RANGE(0x900000, 0x903fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16_2 ) // Sprites Code + X + Attr @@ -2544,7 +2530,7 @@ static ADDRESS_MAP_START( oisipuzl_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0xa00000, 0xa00607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y AM_RANGE(0xa80000, 0xa80001) AM_WRITE(MWA16_RAM ) // ? 0x4000 AM_RANGE(0xb00000, 0xb03fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16_2 ) // Sprites Code + X + Attr - AM_RANGE(0xc00400, 0xc00fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0xc00400, 0xc00fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette ADDRESS_MAP_END /*************************************************************************** @@ -2588,7 +2574,7 @@ static ADDRESS_MAP_START( triplfun_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0xa00000, 0xa00607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y AM_RANGE(0xa80000, 0xa80001) AM_WRITE(MWA16_RAM ) // ? 0x4000 AM_RANGE(0xb00000, 0xb03fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16_2 ) // Sprites Code + X + Attr - AM_RANGE(0xc00400, 0xc00fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0xc00400, 0xc00fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette ADDRESS_MAP_END /*************************************************************************** @@ -2651,7 +2637,7 @@ static ADDRESS_MAP_START( kiwame_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x800000, 0x803fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16_2 ) // Sprites Code + X + Attr AM_RANGE(0x900000, 0x900001) AM_WRITE(MWA16_RAM ) // ? 0x4000 AM_RANGE(0xa00000, 0xa00607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y - AM_RANGE(0xb00000, 0xb003ff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0xb00000, 0xb003ff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0xc00000, 0xc03fff) AM_WRITE(seta_sound_word_w ) // Sound ADDRESS_MAP_END @@ -2698,7 +2684,7 @@ static ADDRESS_MAP_START( thunderl_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x300000, 0x300001) AM_WRITE(MWA16_NOP ) // ? AM_RANGE(0x400000, 0x40ffff) AM_WRITE(thunderl_protection_w ) // Protection (not in wits) AM_RANGE(0x500000, 0x500001) AM_WRITE(seta_vregs_w) AM_BASE(&seta_vregs ) // Coin Lockout - AM_RANGE(0x700000, 0x7003ff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700000, 0x7003ff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0xc00000, 0xc00001) AM_WRITE(MWA16_RAM ) // ? 0x4000 AM_RANGE(0xd00000, 0xd00607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y AM_RANGE(0xe00000, 0xe03fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16_2 ) // Sprites Code + X + Attr @@ -2758,7 +2744,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( umanclub_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x03ffff) AM_WRITE(MWA16_ROM ) // ROM AM_RANGE(0x200000, 0x20ffff) AM_WRITE(MWA16_RAM ) // RAM - AM_RANGE(0x300000, 0x3003ff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x300000, 0x3003ff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x300400, 0x300fff) AM_WRITE(MWA16_RAM ) // AM_RANGE(0x400000, 0x400001) AM_WRITE(MWA16_NOP ) // ? (end of lev 2) AM_RANGE(0x400004, 0x400005) AM_WRITE(MWA16_NOP ) // ? (end of lev 2) @@ -2802,7 +2788,7 @@ static ADDRESS_MAP_START( utoukond_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x0fffff) AM_WRITE(MWA16_ROM ) // ROM AM_RANGE(0x200000, 0x20ffff) AM_WRITE(MWA16_RAM ) // ROM AM_RANGE(0x500000, 0x500005) AM_WRITE(seta_vregs_w) AM_BASE(&seta_vregs ) // ? Coin Lockout + Video Registers - AM_RANGE(0x700400, 0x700fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x700400, 0x700fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x800000, 0x803fff) AM_WRITE(seta_vram_0_w) AM_BASE(&seta_vram_0 ) // VRAM 0 AM_RANGE(0x880000, 0x883fff) AM_WRITE(seta_vram_2_w) AM_BASE(&seta_vram_2 ) // VRAM 2 AM_RANGE(0x900000, 0x900005) AM_WRITE(MWA16_RAM) AM_BASE(&seta_vctrl_0 ) // VRAM 0&1 Ctrl @@ -3067,7 +3053,7 @@ static ADDRESS_MAP_START( pairlove_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x400000, 0x400001) AM_WRITE(seta_vregs_w) AM_BASE(&seta_vregs ) // Coin Lockout + Sound Enable (bit 4?) AM_RANGE(0x900000, 0x9001ff) AM_WRITE(pairlove_prot_w) AM_RANGE(0xa00000, 0xa03fff) AM_WRITE(seta_sound_word_w ) // Sound - AM_RANGE(0xb00000, 0xb00fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0xb00000, 0xb00fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0xc00000, 0xc03fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16_2 ) // Sprites Code + X + Attr AM_RANGE(0xd00000, 0xd00001) AM_WRITE(MWA16_RAM ) // ? 0x4000 AM_RANGE(0xe00000, 0xe00607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y @@ -3091,7 +3077,7 @@ static ADDRESS_MAP_START( crazyfgt_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x610006, 0x610007) AM_WRITENOP AM_RANGE(0x620000, 0x620003) AM_WRITENOP // protection AM_RANGE(0x630000, 0x630003) AM_READ(seta_dsw_r) - AM_RANGE(0x640400, 0x640fff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0x640400, 0x640fff) AM_WRITE(MWA16_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette AM_RANGE(0x650000, 0x650001) AM_WRITE(YM3812_control_port_0_lsb_w) AM_RANGE(0x650002, 0x650003) AM_WRITE(YM3812_write_port_0_lsb_w) AM_RANGE(0x658000, 0x658001) AM_WRITE(OKIM6295_data_0_lsb_w) @@ -6867,12 +6853,11 @@ static MACHINE_DRIVER_START( usclssic ) MDRV_SCREEN_SIZE(64*8, 32*8) MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 1*8, 31*8-1) MDRV_GFXDECODE(usclssic) - MDRV_PALETTE_LENGTH(16*32+0x200) - MDRV_COLORTABLE_LENGTH(16*32 + 64*32) /* sprites, layer */ + MDRV_PALETTE_LENGTH(16*32 + 64*32) /* sprites, layer */ MDRV_PALETTE_INIT(usclssic) /* layer is 6 planes deep */ MDRV_VIDEO_START(seta_1_layer) - MDRV_VIDEO_UPDATE(seta) + MDRV_VIDEO_UPDATE(usclssic) /* sound hardware */ MDRV_SPEAKER_STANDARD_STEREO("left", "right") @@ -7035,8 +7020,7 @@ static MACHINE_DRIVER_START( blandia ) MDRV_SCREEN_SIZE(64*8, 32*8) MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 1*8, 31*8-1) MDRV_GFXDECODE(blandia) - MDRV_PALETTE_LENGTH(16*32+16*32+16*32) - MDRV_COLORTABLE_LENGTH(16*32+64*32+64*32) /* sprites, layer1, layer2 */ + MDRV_PALETTE_LENGTH(16*32+64*32+64*32) /* sprites, layer1, layer2 */ MDRV_PALETTE_INIT(blandia) /* layers 1&2 are 6 planes deep */ MDRV_VIDEO_START(seta_2_layers) @@ -7068,8 +7052,7 @@ static MACHINE_DRIVER_START( blandiap ) MDRV_SCREEN_SIZE(64*8, 32*8) MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 1*8, 31*8-1) MDRV_GFXDECODE(blandia) - MDRV_PALETTE_LENGTH(16*32+16*32+16*32) - MDRV_COLORTABLE_LENGTH(16*32+64*32+64*32) /* sprites, layer1, layer2 */ + MDRV_PALETTE_LENGTH(16*32+64*32+64*32) /* sprites, layer1, layer2 */ MDRV_PALETTE_INIT(blandia) /* layers 1&2 are 6 planes deep */ MDRV_VIDEO_START(seta_2_layers) @@ -7291,8 +7274,7 @@ static MACHINE_DRIVER_START( extdwnhl ) MDRV_SCREEN_SIZE(64*8, 32*8) MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1) MDRV_GFXDECODE(zingzip) - MDRV_PALETTE_LENGTH(16*32+16*32+16*32) - MDRV_COLORTABLE_LENGTH(16*32+16*32+64*32) /* sprites, layer2, layer1 */ + MDRV_PALETTE_LENGTH(16*32+16*32+64*32) /* sprites, layer2, layer1 */ MDRV_PALETTE_INIT(zingzip) /* layer 1 gfx is 6 planes deep */ MDRV_VIDEO_START(seta_2_layers) @@ -7353,8 +7335,7 @@ static MACHINE_DRIVER_START( gundhara ) MDRV_SCREEN_SIZE(64*8, 32*8) MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 1*8, 31*8-1) MDRV_GFXDECODE(jjsquawk) - MDRV_PALETTE_LENGTH(16*32+16*32+16*32) - MDRV_COLORTABLE_LENGTH(16*32+64*32+64*32) /* sprites, layer2, layer1 */ + MDRV_PALETTE_LENGTH(16*32+64*32+64*32) /* sprites, layer2, layer1 */ MDRV_PALETTE_INIT(gundhara) /* layers are 6 planes deep (but have only 4 palettes) */ MDRV_VIDEO_START(seta_2_layers) @@ -7394,8 +7375,7 @@ static MACHINE_DRIVER_START( jjsquawk ) MDRV_SCREEN_SIZE(64*8, 32*8) MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 1*8, 31*8-1) MDRV_GFXDECODE(jjsquawk) - MDRV_PALETTE_LENGTH(16*32+16*32+16*32) - MDRV_COLORTABLE_LENGTH(16*32+64*32+64*32) /* sprites, layer2, layer1 */ + MDRV_PALETTE_LENGTH(16*32+64*32+64*32) /* sprites, layer2, layer1 */ MDRV_PALETTE_INIT(jjsquawk) /* layers are 6 planes deep */ MDRV_VIDEO_START(seta_2_layers) @@ -7547,8 +7527,7 @@ static MACHINE_DRIVER_START( madshark ) MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 2*8, 30*8-1) MDRV_GFXDECODE(jjsquawk) - MDRV_PALETTE_LENGTH(16*32+16*32+16*32) - MDRV_COLORTABLE_LENGTH(16*32+64*32+64*32) /* sprites, layer2, layer1 */ + MDRV_PALETTE_LENGTH(16*32+64*32+64*32) /* sprites, layer2, layer1 */ MDRV_PALETTE_INIT(jjsquawk) /* layers are 6 planes deep */ @@ -8008,8 +7987,7 @@ static MACHINE_DRIVER_START( zingzip ) MDRV_SCREEN_SIZE(64*8, 32*8) MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 1*8, 31*8-1) MDRV_GFXDECODE(zingzip) - MDRV_PALETTE_LENGTH(16*32+16*32+16*32) - MDRV_COLORTABLE_LENGTH(16*32+16*32+64*32) /* sprites, layer2, layer1 */ + MDRV_PALETTE_LENGTH(16*32+16*32+64*32) /* sprites, layer2, layer1 */ MDRV_PALETTE_INIT(zingzip) /* layer 1 gfx is 6 planes deep */ MDRV_VIDEO_START(seta_2_layers) @@ -8088,8 +8066,7 @@ static MACHINE_DRIVER_START( crazyfgt ) MDRV_SCREEN_SIZE(64*8, 32*8) MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 2*8-4, 30*8-1-4) MDRV_GFXDECODE(crazyfgt) - MDRV_PALETTE_LENGTH(16*32+16*32+16*32) - MDRV_COLORTABLE_LENGTH(16*32+64*32+64*32) /* sprites, layer1, layer2 */ + MDRV_PALETTE_LENGTH(16*32+64*32+64*32) /* sprites, layer1, layer2 */ MDRV_PALETTE_INIT(gundhara) /* layers are 6 planes deep (but have only 4 palettes) */ MDRV_VIDEO_START(seta_2_layers) @@ -8152,7 +8129,7 @@ static MACHINE_DRIVER_START( inttoote ) MDRV_PALETTE_INIT(inttoote) MDRV_VIDEO_START(seta_1_layer) - MDRV_VIDEO_UPDATE(seta) + MDRV_VIDEO_UPDATE(inttoote) /* sound hardware */ MDRV_SPEAKER_STANDARD_STEREO("left", "right") @@ -9557,8 +9534,8 @@ GAME( 1991, rezon, 0, rezon, rezon, rezon, ROT0, "Allumer", GAME( 1992, rezont, rezon, rezon, rezont, rezon, ROT0, "Allumer (Taito license)","Rezon (Taito)", 0 ) GAME( 1991, stg, 0, drgnunit, stg, 0, ROT270, "Athena / Tecmo", "Strike Gunner S.T.G", 0 ) GAME( 1991, pairlove, 0, pairlove, pairlove, 0, ROT270, "Athena", "Pairs Love", 0 ) -GAME( 1992, blandia, 0, blandia, blandia, blandia, ROT0, "Allumer", "Blandia", 0 ) -GAME( 1992, blandiap, blandia, blandiap, blandia, 0, ROT0, "Allumer", "Blandia (prototype)", 0 ) +GAME( 1992, blandia, 0, blandia, blandia, blandia, ROT0, "Allumer", "Blandia", GAME_IMPERFECT_GRAPHICS ) +GAME( 1992, blandiap, blandia, blandiap, blandia, 0, ROT0, "Allumer", "Blandia (prototype)", GAME_IMPERFECT_GRAPHICS ) GAME( 1992, blockcar, 0, blockcar, blockcar, 0, ROT90, "Visco", "Block Carnival / Thunder & Lightning 2" , 0) // Title: DSW GAME( 1992, qzkklogy, 0, drgnunit, qzkklogy, 0, ROT0, "Tecmo", "Quiz Kokology", 0 ) GAME( 1992, neobattl, 0, umanclub, neobattl, 0, ROT270, "Banpresto / Sotsu Agency. Sunrise", "SD Gundam Neo Battling (Japan)", 0 ) diff --git a/src/mame/includes/seta.h b/src/mame/includes/seta.h index a0f1c600720..0106ebe471e 100644 --- a/src/mame/includes/seta.h +++ b/src/mame/includes/seta.h @@ -11,6 +11,7 @@ extern UINT16 *seta_vram_0, *seta_vctrl_0; extern UINT16 *seta_vram_2, *seta_vctrl_2; extern UINT16 *seta_vregs; +extern size_t seta_paletteram_size; extern UINT16 *seta_workram; // Needed for zombraid Crosshair hack @@ -39,6 +40,8 @@ VIDEO_START( oisipuzl_2_layers ); VIDEO_UPDATE( seta ); VIDEO_UPDATE( seta_no_layers ); +VIDEO_UPDATE( usclssic ); +VIDEO_UPDATE( inttoote ); /*----------- defined in video/seta2.c -----------*/ diff --git a/src/mame/video/sbasketb.c b/src/mame/video/sbasketb.c index d6413e1c8aa..14740982805 100644 --- a/src/mame/video/sbasketb.c +++ b/src/mame/video/sbasketb.c @@ -7,8 +7,9 @@ ***************************************************************************/ #include "driver.h" +#include "video/resnet.h" -//UINT8 *sbasketb_scroll; +UINT8 *sbasketb_scroll; UINT8 *sbasketb_palettebank; UINT8 *sbasketb_spriteram_select; @@ -31,54 +32,69 @@ static tilemap *bg_tilemap; ***************************************************************************/ PALETTE_INIT( sbasketb ) { + static const int resistances[4] = { 2000, 1000, 470, 220 }; + double rweights[4], gweights[4], bweights[4]; int i; - #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) - #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) + /* compute the color output resistor weights */ + compute_resistor_weights(0, 255, -1.0, + 4, resistances, rweights, 1000, 0, + 4, resistances, gweights, 1000, 0, + 4, resistances, bweights, 1000, 0); - for (i = 0;i < machine->drv->total_colors;i++) + /* allocate the colortable */ + machine->colortable = colortable_alloc(machine, 0x100); + + /* create a lookup table for the palette */ + for (i = 0; i < 0x100; i++) { - int bit0,bit1,bit2,bit3,r,g,b; + int bit0, bit1, bit2, bit3; + int r, g, b; + /* red component */ + bit0 = (color_prom[i + 0x000] >> 0) & 0x01; + bit1 = (color_prom[i + 0x000] >> 1) & 0x01; + bit2 = (color_prom[i + 0x000] >> 2) & 0x01; + bit3 = (color_prom[i + 0x000] >> 3) & 0x01; + r = combine_4_weights(rweights, bit0, bit1, bit2, bit3); - bit0 = (color_prom[0] >> 0) & 0x01; - bit1 = (color_prom[0] >> 1) & 0x01; - bit2 = (color_prom[0] >> 2) & 0x01; - bit3 = (color_prom[0] >> 3) & 0x01; - r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; - bit0 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; - bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; - bit2 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; - bit3 = (color_prom[machine->drv->total_colors] >> 3) & 0x01; - g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; - bit0 = (color_prom[2*machine->drv->total_colors] >> 0) & 0x01; - bit1 = (color_prom[2*machine->drv->total_colors] >> 1) & 0x01; - bit2 = (color_prom[2*machine->drv->total_colors] >> 2) & 0x01; - bit3 = (color_prom[2*machine->drv->total_colors] >> 3) & 0x01; - b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; + /* green component */ + bit0 = (color_prom[i + 0x100] >> 0) & 0x01; + bit1 = (color_prom[i + 0x100] >> 1) & 0x01; + bit2 = (color_prom[i + 0x100] >> 2) & 0x01; + bit3 = (color_prom[i + 0x100] >> 3) & 0x01; + g = combine_4_weights(gweights, bit0, bit1, bit2, bit3); - palette_set_color(machine,i,MAKE_RGB(r,g,b)); - color_prom++; + /* blue component */ + bit0 = (color_prom[i + 0x200] >> 0) & 0x01; + bit1 = (color_prom[i + 0x200] >> 1) & 0x01; + bit2 = (color_prom[i + 0x200] >> 2) & 0x01; + bit3 = (color_prom[i + 0x200] >> 3) & 0x01; + b = combine_4_weights(bweights, bit0, bit1, bit2, bit3); + + colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); } - color_prom += 2*machine->drv->total_colors; - /* color_prom now points to the beginning of the character lookup table */ + /* color_prom now points to the beginning of the lookup table,*/ + color_prom += 0x300; - - /* characters use colors 240-255 */ - for (i = 0;i < TOTAL_COLORS(0);i++) - COLOR(0,i) = (*(color_prom++) & 0x0f) + 240; + /* characters use colors 0xf0-0xff */ + for (i = 0; i < 0x100; i++) + { + UINT8 ctabentry = (color_prom[i] & 0x0f) | 0xf0; + colortable_entry_set_value(machine->colortable, i, ctabentry); + } /* sprites use colors 0-256 (?) in 16 banks */ - for (i = 0;i < TOTAL_COLORS(1)/16;i++) + for (i = 0; i < 0x100; i++) { int j; - - for (j = 0;j < 16;j++) - COLOR(1,i + j * TOTAL_COLORS(1)/16) = (*color_prom & 0x0f) + 16 * j; - - color_prom++; + for (j = 0; j < 0x10; j++) + { + UINT8 ctabentry = (j << 4) | (color_prom[i + 0x100] & 0x0f); + colortable_entry_set_value(machine->colortable, 0x100 + ((j << 8) | i), ctabentry); + } } } @@ -103,16 +119,6 @@ WRITE8_HANDLER( sbasketb_flipscreen_w ) } } -WRITE8_HANDLER( sbasketb_scroll_w ) -{ - int col; - - for (col = 6; col < 32; col++) - { - tilemap_set_scrolly(bg_tilemap, col, data); - } -} - static TILE_GET_INFO( get_bg_tile_info ) { int code = videoram[tile_index] + ((colorram[tile_index] & 0x20) << 3); @@ -124,8 +130,7 @@ static TILE_GET_INFO( get_bg_tile_info ) VIDEO_START( sbasketb ) { - bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, - 8, 8, 32, 32); + bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); tilemap_set_scroll_cols(bg_tilemap, 32); } @@ -167,6 +172,13 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re VIDEO_UPDATE( sbasketb ) { + int col; + + for (col = 6; col < 32; col++) + { + tilemap_set_scrolly(bg_tilemap, col, *sbasketb_scroll); + } + tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); draw_sprites(machine, bitmap, cliprect); return 0; diff --git a/src/mame/video/seta.c b/src/mame/video/seta.c index 6c8536fbd50..12a40907e40 100644 --- a/src/mame/video/seta.c +++ b/src/mame/video/seta.c @@ -153,6 +153,7 @@ int seta_tiles_offset; UINT16 *seta_vram_0, *seta_vctrl_0; UINT16 *seta_vram_2, *seta_vctrl_2; UINT16 *seta_vregs; +size_t seta_paletteram_size; UINT16 *seta_workram; // Used for zombraid crosshair hack @@ -562,11 +563,15 @@ VIDEO_START( oisipuzl_2_layers ) PALETTE_INIT( blandia ) { int color, pen; - for( color = 0; color < 32; color++ ) - for( pen = 0; pen < 64; pen++ ) + + /* allocate the colortable */ + machine->colortable = colortable_alloc(machine, 0x600); + + for (color = 0; color < 0x20; color++) + for (pen = 0; pen < 0x40; pen++) { - colortable[color * 64 + pen + 16*32] = (pen % 16) + color * 0x10 + 16*32*1; - colortable[color * 64 + pen + 16*32+64*32] = pen + 16*32*2; + colortable_entry_set_value(machine->colortable, 0x200 + ((color << 6) | pen), 0x200 + ((color << 4) | (pen & 0x0f))); + colortable_entry_set_value(machine->colortable, 0xa00 + ((color << 6) | pen), 0x400 + pen); } } @@ -577,11 +582,15 @@ PALETTE_INIT( blandia ) PALETTE_INIT( gundhara ) { int color, pen; - for( color = 0; color < 32; color++ ) - for( pen = 0; pen < 64; pen++ ) + + /* allocate the colortable */ + machine->colortable = colortable_alloc(machine, 0x600); + + for (color = 0; color < 0x20; color++) + for (pen = 0; pen < 0x40; pen++) { - colortable[color * 64 + pen + 32*16 + 32*64*0] = (((color&~3) * 16 + pen)%(32*16)) + 32*16*2; - colortable[color * 64 + pen + 32*16 + 32*64*1] = (((color&~3) * 16 + pen)%(32*16)) + 32*16*1; + colortable_entry_set_value(machine->colortable, 0x200 + ((color << 6) | pen), 0x400 + ((((color & ~3) << 4) + pen) & 0x1ff)); + colortable_entry_set_value(machine->colortable, 0xa00 + ((color << 6) | pen), 0x200 + ((((color & ~3) << 4) + pen) & 0x1ff)); } } @@ -591,11 +600,15 @@ PALETTE_INIT( gundhara ) PALETTE_INIT( jjsquawk ) { int color, pen; - for( color = 0; color < 32; color++ ) - for( pen = 0; pen < 64; pen++ ) + + /* allocate the colortable */ + machine->colortable = colortable_alloc(machine, 0x600); + + for (color = 0; color < 0x20; color++) + for (pen = 0; pen < 0x40; pen++) { - colortable[color * 64 + pen + 32*16 + 32*64*0] = ((color * 16 + pen)%(32*16)) + 32*16*2; - colortable[color * 64 + pen + 32*16 + 32*64*1] = ((color * 16 + pen)%(32*16)) + 32*16*1; + colortable_entry_set_value(machine->colortable, 0x200 + ((color << 6) | pen), 0x400 + (((color << 4) + pen) & 0x1ff)); + colortable_entry_set_value(machine->colortable, 0xa00 + ((color << 6) | pen), 0x200 + (((color << 4) + pen) & 0x1ff)); } } @@ -604,9 +617,13 @@ PALETTE_INIT( jjsquawk ) PALETTE_INIT( zingzip ) { int color, pen; - for( color = 0; color < 32; color++ ) - for( pen = 0; pen < 64; pen++ ) - colortable[color * 64 + pen + 32*16*2] = ((color * 16 + pen)%(32*16)) + 32*16*2; + + /* allocate the colortable */ + machine->colortable = colortable_alloc(machine, 0x600); + + for (color = 0; color < 0x20; color++) + for (pen = 0; pen < 0x40; pen++) + colortable_entry_set_value(machine->colortable, 0x400 + ((color << 6) | pen), 0x400 + (((color << 4) + pen) & 0x1ff)); } // color prom @@ -625,24 +642,75 @@ PALETTE_INIT( usclssic ) int color, pen; int x; + /* allocate the colortable */ + machine->colortable = colortable_alloc(machine, 0x400); + /* DECODE PROM */ - for (x = 0x000; x < 0x200 ; x++) + for (x = 0; x < 0x200 ; x++) { - int data; + UINT16 data = (color_prom[x*2] <<8) | color_prom[x*2+1]; - data = (color_prom[x*2] <<8) | color_prom[x*2+1]; + rgb_t color = MAKE_RGB(pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); - if (x>=0x100) palette_set_color_rgb(machine,x,pal5bit(data >> 10),pal5bit(data >> 5),pal5bit(data >> 0)); - else palette_set_color_rgb(machine,x+0x300,pal5bit(data >> 10),pal5bit(data >> 5),pal5bit(data >> 0)); + if (x >= 0x100) + colortable_palette_set_color(machine->colortable, x + 0x000, color); + else + colortable_palette_set_color(machine->colortable, x + 0x300, color); } - for( color = 0; color < 32; color++ ) - for( pen = 0; pen < 64; pen++ ) - colortable[color * 64 + pen + 512] = ((((color & 0x1f) * 16 + pen)%512)+512); - + for (color = 0; color < 0x20; color++) + for (pen = 0; pen < 0x40; pen++) + colortable_entry_set_value(machine->colortable, 0x200 + ((color << 6) | pen), 0x200 + (((color << 4) + pen) & 0x1ff)); } +static void set_pens_no_colortable(running_machine *machine) +{ + offs_t i; + + for (i = 0; i < seta_paletteram_size / 2; i++) + { + UINT16 data = paletteram16[i]; + + rgb_t color = MAKE_RGB(pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); + + palette_set_color(machine, i, color); + } +} + + +static void set_pens_colortable(colortable_t *colortable) +{ + offs_t i; + int palette_size = colortable_palette_get_size(colortable); + + for (i = 0; i < palette_size; i++) + { + UINT16 data = paletteram16[i]; + + rgb_t color = MAKE_RGB(pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); + + colortable_palette_set_color(colortable, i, color); + } +} + + +static void usclssic_set_pens(colortable_t *colortable) +{ + offs_t i; + + for (i = 0; i < 0x200; i++) + { + UINT16 data = paletteram16[i]; + + rgb_t color = MAKE_RGB(pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); + + if (i >= 0x100) + colortable_palette_set_color(colortable, i - 0x100, color); + else + colortable_palette_set_color(colortable, i + 0x200, color); + } +} @@ -832,6 +900,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rec /* For games without tilemaps */ VIDEO_UPDATE( seta_no_layers ) { + set_pens_no_colortable(machine); fillbitmap(bitmap,machine->pens[0x1f0],cliprect); draw_sprites(machine,bitmap,cliprect); return 0; @@ -839,7 +908,7 @@ VIDEO_UPDATE( seta_no_layers ) /* For games with 1 or 2 tilemaps */ -VIDEO_UPDATE( seta ) +static VIDEO_UPDATE( seta_layers ) { int layers_ctrl = -1; int enab_0, enab_1, x_0, x_1, y_0, y_1; @@ -972,3 +1041,24 @@ if (input_code_pressed(KEYCODE_Z)) } return 0; } + + +VIDEO_UPDATE( seta ) +{ + set_pens_colortable(machine->colortable); + return VIDEO_UPDATE_CALL(seta_layers); +} + + +VIDEO_UPDATE( usclssic ) +{ + usclssic_set_pens(machine->colortable); + return VIDEO_UPDATE_CALL(seta_layers); +} + + +VIDEO_UPDATE( inttoote ) +{ + /* no palette to set */ + return VIDEO_UPDATE_CALL(seta_layers); +}