mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
use mixer regs (nw)
This commit is contained in:
parent
34a7398cb9
commit
0211f03919
@ -279,8 +279,8 @@ static ADDRESS_MAP_START( gstriker_map, AS_PROGRAM, 16, gstriker_state )
|
||||
AM_RANGE(0x1c0000, 0x1c0fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
|
||||
|
||||
AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE("zoomtilemap", mb60553_zooming_tilemap_device, regs_r, regs_w )
|
||||
AM_RANGE(0x200040, 0x20005f) AM_RAM
|
||||
AM_RANGE(0x200060, 0x20007f) AM_RAM
|
||||
AM_RANGE(0x200040, 0x20005f) AM_RAM AM_SHARE("mixerregs1")
|
||||
AM_RANGE(0x200060, 0x20007f) AM_RAM AM_SHARE("mixerregs2")
|
||||
AM_RANGE(0x200080, 0x200081) AM_READ_PORT("P1")
|
||||
AM_RANGE(0x200082, 0x200083) AM_READ_PORT("P2")
|
||||
AM_RANGE(0x200084, 0x200085) AM_READ_PORT("SYSTEM")
|
||||
@ -315,7 +315,8 @@ static ADDRESS_MAP_START( vgoal_map, AS_PROGRAM, 16, gstriker_state )
|
||||
AM_RANGE(0x181000, 0x181fff) AM_DEVREADWRITE("zoomtilemap", mb60553_zooming_tilemap_device, line_r, line_w )
|
||||
AM_RANGE(0x1c0000, 0x1c4fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
|
||||
AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE("zoomtilemap", mb60553_zooming_tilemap_device, regs_r, regs_w )
|
||||
AM_RANGE(0x200040, 0x20005f) AM_RAM
|
||||
AM_RANGE(0x200040, 0x20005f) AM_RAM AM_SHARE("mixerregs1")
|
||||
AM_RANGE(0x200060, 0x20007f) AM_RAM AM_SHARE("mixerregs2")
|
||||
|
||||
AM_RANGE(0x200080, 0x200081) AM_READ_PORT("P1")
|
||||
AM_RANGE(0x200082, 0x200083) AM_READ_PORT("P2")
|
||||
@ -565,7 +566,6 @@ static MACHINE_CONFIG_START( gstriker, gstriker_state )
|
||||
|
||||
MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0)
|
||||
MCFG_VSYSTEM_SPR_SET_GFXREGION(2)
|
||||
MCFG_VSYSTEM_SPR_SET_PALBASE(0x10)
|
||||
MCFG_VSYSTEM_SPR_SET_PALMASK(0x1f)
|
||||
MCFG_VSYSTEM_SPR_SET_TRANSPEN(0)
|
||||
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
|
||||
@ -583,14 +583,6 @@ static MACHINE_CONFIG_START( gstriker, gstriker_state )
|
||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( twrldc94, gstriker )
|
||||
MCFG_VIDEO_START_OVERRIDE(gstriker_state, twrldc94 )
|
||||
|
||||
MCFG_DEVICE_MODIFY("vsystem_spr")
|
||||
MCFG_VSYSTEM_SPR_SET_PALBASE(0x60)
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( vgoal, gstriker_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 16000000)
|
||||
@ -622,11 +614,10 @@ static MACHINE_CONFIG_START( vgoal, gstriker_state )
|
||||
|
||||
MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0)
|
||||
MCFG_VSYSTEM_SPR_SET_GFXREGION(2)
|
||||
MCFG_VSYSTEM_SPR_SET_PALBASE(0x00)
|
||||
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
|
||||
MCFG_VSYSTEM_SPR_PALETTE("palette")
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(gstriker_state,vgoalsoc)
|
||||
MCFG_VIDEO_START_OVERRIDE(gstriker_state,gstriker)
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
@ -1109,5 +1100,5 @@ GAME( 1993, gstrikerj, gstriker, gstriker, gstriker, driver_device, 0, RO
|
||||
/* Similar, but not identical hardware, appear to be protected by an MCU :-( */
|
||||
GAME( 1994, vgoalsoc, 0, vgoal, vgoalsoc, gstriker_state, vgoalsoc, ROT0, "Tecmo", "V Goal Soccer (set 1)", GAME_NOT_WORKING )
|
||||
GAME( 1994, vgoalsca, vgoalsoc, vgoal, vgoalsoc, gstriker_state, vgoalsoc, ROT0, "Tecmo", "V Goal Soccer (set 2)", GAME_NOT_WORKING )
|
||||
GAME( 1994, twrldc94, 0, twrldc94, twrldc94, gstriker_state, twrldc94, ROT0, "Tecmo", "Tecmo World Cup '94 (set 1)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS )
|
||||
GAME( 1994, twrldc94a,twrldc94, twrldc94, twrldc94, gstriker_state, twrldc94a, ROT0, "Tecmo", "Tecmo World Cup '94 (set 2)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS )
|
||||
GAME( 1994, twrldc94, 0, gstriker, twrldc94, gstriker_state, twrldc94, ROT0, "Tecmo", "Tecmo World Cup '94 (set 1)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS )
|
||||
GAME( 1994, twrldc94a,twrldc94, gstriker, twrldc94, gstriker_state, twrldc94a, ROT0, "Tecmo", "Tecmo World Cup '94 (set 2)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS )
|
||||
|
@ -21,7 +21,10 @@ public:
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette") { }
|
||||
m_palette(*this, "palette"),
|
||||
m_mixerregs1(*this, "mixerregs1"),
|
||||
m_mixerregs2(*this, "mixerregs2")
|
||||
{ }
|
||||
|
||||
virtual void machine_start()
|
||||
{
|
||||
@ -58,8 +61,8 @@ public:
|
||||
DECLARE_DRIVER_INIT(vgoalsoc);
|
||||
DECLARE_DRIVER_INIT(twrldc94);
|
||||
DECLARE_VIDEO_START(gstriker);
|
||||
DECLARE_VIDEO_START(vgoalsoc);
|
||||
DECLARE_VIDEO_START(twrldc94);
|
||||
|
||||
|
||||
UINT32 screen_update_gstriker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
|
||||
@ -70,6 +73,8 @@ public:
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
required_shared_ptr<UINT16> m_mixerregs1;
|
||||
required_shared_ptr<UINT16> m_mixerregs2;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -11,6 +11,13 @@ UINT32 gstriker_state::screen_update_gstriker(screen_device &screen, bitmap_ind1
|
||||
{
|
||||
bitmap.fill(m_palette->black_pen(), cliprect);
|
||||
|
||||
popmessage("%04x %04x %04x %04x %04x %04x %04x %04x | %04x %04x %04x %04x %04x %04x %04x %04x", m_mixerregs1[0],m_mixerregs1[1],m_mixerregs1[2],m_mixerregs1[3],m_mixerregs1[4],m_mixerregs1[5],m_mixerregs1[6],m_mixerregs1[7], m_mixerregs1[8],m_mixerregs1[9],m_mixerregs1[10],m_mixerregs1[11],m_mixerregs1[12],m_mixerregs1[13],m_mixerregs1[14],m_mixerregs1[15] );
|
||||
|
||||
m_spr->set_pal_base( (m_mixerregs1[0]&0xf000)>>8 );
|
||||
m_bg->set_pal_base( (m_mixerregs1[1]&0xf000)>>8 );
|
||||
m_tx->set_pal_base( (m_mixerregs1[2]&0xf000)>>8 );
|
||||
|
||||
|
||||
// Sandwitched screen/sprite0/score/sprite1. Surely wrong, probably
|
||||
// needs sprite orthogonality
|
||||
m_bg->draw( screen, bitmap,cliprect, 0);
|
||||
@ -24,47 +31,13 @@ UINT32 gstriker_state::screen_update_gstriker(screen_device &screen, bitmap_ind1
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(gstriker_state,gstriker)
|
||||
VIDEO_START_MEMBER(gstriker_state, gstriker)
|
||||
{
|
||||
// Palette bases are hardcoded, but should be probably extracted from the mixer registers
|
||||
|
||||
// Initalize the chip for the score plane
|
||||
m_tx->set_gfx_region(0);
|
||||
m_tx->set_pal_base(0x30);
|
||||
m_tx->get_tilemap()->set_transparent_pen(0xf);
|
||||
|
||||
// Initalize the chip for the screen plane
|
||||
m_bg->set_gfx_region( 1);
|
||||
m_bg->set_pal_base( 0);
|
||||
m_bg->get_tilemap()->set_transparent_pen(0xf);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(gstriker_state,twrldc94)
|
||||
{
|
||||
// Palette bases are hardcoded, but should be probably extracted from the mixer registers
|
||||
|
||||
// Initalize the chip for the score plane
|
||||
m_tx->set_gfx_region(0);
|
||||
m_tx->set_pal_base(0x40);
|
||||
m_tx->get_tilemap()->set_transparent_pen(0xf);
|
||||
|
||||
// Initalize the chip for the screen plane
|
||||
m_bg->set_gfx_region( 1);
|
||||
m_bg->set_pal_base( 0x50);
|
||||
m_bg->get_tilemap()->set_transparent_pen(0xf);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(gstriker_state,vgoalsoc)
|
||||
{
|
||||
// Palette bases are hardcoded, but should be probably extracted from the mixer registers
|
||||
|
||||
// Initalize the chip for the score plane
|
||||
m_tx->set_gfx_region(0);
|
||||
m_tx->set_pal_base(0x30);
|
||||
m_tx->get_tilemap()->set_transparent_pen(0xf);
|
||||
|
||||
// Initalize the chip for the screen plane
|
||||
m_bg->set_gfx_region( 1);
|
||||
m_bg->set_pal_base( 0x20);
|
||||
m_bg->set_gfx_region(1);
|
||||
m_bg->get_tilemap()->set_transparent_pen(0xf);
|
||||
}
|
||||
|
@ -148,6 +148,12 @@ void vsystem_spr_device::CG10103_set_pal_base(device_t &device, int pal_base)
|
||||
dev.m_pal_base = pal_base;
|
||||
}
|
||||
|
||||
|
||||
void vsystem_spr_device::set_pal_base(int pal_base)
|
||||
{
|
||||
m_pal_base = pal_base;
|
||||
}
|
||||
|
||||
// static
|
||||
void vsystem_spr_device::set_pal_mask(device_t &device, int pal_mask)
|
||||
{
|
||||
|
@ -67,6 +67,7 @@ public:
|
||||
void common_sprite_drawgfx(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap);
|
||||
|
||||
void draw_sprites( UINT16* spriteram, int spriteram_bytes, screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int prihack_mask = -1, int prihack_val = -1 );
|
||||
void set_pal_base(int pal_base);
|
||||
|
||||
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user