Previous 199869 Revisions Next

r30967 Friday 13th June, 2014 at 22:55:11 UTC by David Haywood
use mixer regs (nw)
[src/mame/drivers]gstriker.c
[src/mame/includes]gstriker.h
[src/mame/video]gstriker.c vsystem_spr.c vsystem_spr.h

trunk/src/mame/includes/gstriker.h
r30966r30967
2121      m_audiocpu(*this, "audiocpu"),
2222      m_gfxdecode(*this, "gfxdecode"),
2323      m_screen(*this, "screen"),
24      m_palette(*this, "palette") { }
24      m_palette(*this, "palette"),
25      m_mixerregs1(*this, "mixerregs1"),
26      m_mixerregs2(*this, "mixerregs2")
27   { }
2528
2629   virtual void machine_start()
2730   {
r30966r30967
5861   DECLARE_DRIVER_INIT(vgoalsoc);
5962   DECLARE_DRIVER_INIT(twrldc94);
6063   DECLARE_VIDEO_START(gstriker);
61   DECLARE_VIDEO_START(vgoalsoc);
62   DECLARE_VIDEO_START(twrldc94);
64
65
6366   UINT32 screen_update_gstriker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6467
6568
r30966r30967
7073   required_device<gfxdecode_device> m_gfxdecode;
7174   required_device<screen_device> m_screen;
7275   required_device<palette_device> m_palette;
76   required_shared_ptr<UINT16> m_mixerregs1;
77   required_shared_ptr<UINT16> m_mixerregs2;
7378};
7479
7580#endif
trunk/src/mame/video/gstriker.c
r30966r30967
1111{
1212   bitmap.fill(m_palette->black_pen(), cliprect);
1313   
14   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] );
15
16   m_spr->set_pal_base( (m_mixerregs1[0]&0xf000)>>8 );
17   m_bg->set_pal_base( (m_mixerregs1[1]&0xf000)>>8 );
18   m_tx->set_pal_base( (m_mixerregs1[2]&0xf000)>>8 );
19
20
1421   // Sandwitched screen/sprite0/score/sprite1. Surely wrong, probably
1522   //  needs sprite orthogonality
1623   m_bg->draw( screen, bitmap,cliprect, 0);
r30966r30967
2431   return 0;
2532}
2633
27VIDEO_START_MEMBER(gstriker_state,gstriker)
34VIDEO_START_MEMBER(gstriker_state, gstriker)
2835{
29   // Palette bases are hardcoded, but should be probably extracted from the mixer registers
30
3136   // Initalize the chip for the score plane
3237   m_tx->set_gfx_region(0);
33   m_tx->set_pal_base(0x30);
3438   m_tx->get_tilemap()->set_transparent_pen(0xf);
3539
3640   // Initalize the chip for the screen plane
37   m_bg->set_gfx_region( 1);
38   m_bg->set_pal_base( 0);
41   m_bg->set_gfx_region(1);
3942   m_bg->get_tilemap()->set_transparent_pen(0xf);
4043}
41
42VIDEO_START_MEMBER(gstriker_state,twrldc94)
43{
44   // Palette bases are hardcoded, but should be probably extracted from the mixer registers
45
46   // Initalize the chip for the score plane
47   m_tx->set_gfx_region(0);
48   m_tx->set_pal_base(0x40);
49   m_tx->get_tilemap()->set_transparent_pen(0xf);
50
51   // Initalize the chip for the screen plane
52   m_bg->set_gfx_region( 1);
53   m_bg->set_pal_base( 0x50);
54   m_bg->get_tilemap()->set_transparent_pen(0xf);
55}
56
57VIDEO_START_MEMBER(gstriker_state,vgoalsoc)
58{
59   // Palette bases are hardcoded, but should be probably extracted from the mixer registers
60
61   // Initalize the chip for the score plane
62   m_tx->set_gfx_region(0);
63   m_tx->set_pal_base(0x30);
64   m_tx->get_tilemap()->set_transparent_pen(0xf);
65
66   // Initalize the chip for the screen plane
67   m_bg->set_gfx_region( 1);
68   m_bg->set_pal_base( 0x20);
69   m_bg->get_tilemap()->set_transparent_pen(0xf);
70}
trunk/src/mame/video/vsystem_spr.c
r30966r30967
148148   dev.m_pal_base = pal_base;
149149}
150150
151
152void vsystem_spr_device::set_pal_base(int pal_base)
153{
154   m_pal_base = pal_base;
155}
156
151157// static
152158void vsystem_spr_device::set_pal_mask(device_t &device, int pal_mask)
153159{
trunk/src/mame/video/vsystem_spr.h
r30966r30967
6767   void common_sprite_drawgfx(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap);
6868
6969   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 );
70   void set_pal_base(int pal_base);
7071
7172
7273protected:
trunk/src/mame/drivers/gstriker.c
r30966r30967
279279   AM_RANGE(0x1c0000, 0x1c0fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
280280
281281   AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE("zoomtilemap", mb60553_zooming_tilemap_device,  regs_r, regs_w )
282   AM_RANGE(0x200040, 0x20005f) AM_RAM
283   AM_RANGE(0x200060, 0x20007f) AM_RAM
282   AM_RANGE(0x200040, 0x20005f) AM_RAM AM_SHARE("mixerregs1")
283   AM_RANGE(0x200060, 0x20007f) AM_RAM AM_SHARE("mixerregs2")
284284   AM_RANGE(0x200080, 0x200081) AM_READ_PORT("P1")
285285   AM_RANGE(0x200082, 0x200083) AM_READ_PORT("P2")
286286   AM_RANGE(0x200084, 0x200085) AM_READ_PORT("SYSTEM")
r30966r30967
315315   AM_RANGE(0x181000, 0x181fff) AM_DEVREADWRITE("zoomtilemap", mb60553_zooming_tilemap_device,  line_r, line_w )
316316   AM_RANGE(0x1c0000, 0x1c4fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
317317   AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE("zoomtilemap", mb60553_zooming_tilemap_device,  regs_r, regs_w )
318   AM_RANGE(0x200040, 0x20005f) AM_RAM
318   AM_RANGE(0x200040, 0x20005f) AM_RAM AM_SHARE("mixerregs1")
319   AM_RANGE(0x200060, 0x20007f) AM_RAM AM_SHARE("mixerregs2")
319320
320321   AM_RANGE(0x200080, 0x200081) AM_READ_PORT("P1")
321322   AM_RANGE(0x200082, 0x200083) AM_READ_PORT("P2")
r30966r30967
565566
566567   MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0)
567568   MCFG_VSYSTEM_SPR_SET_GFXREGION(2)
568   MCFG_VSYSTEM_SPR_SET_PALBASE(0x10)
569569   MCFG_VSYSTEM_SPR_SET_PALMASK(0x1f)
570570   MCFG_VSYSTEM_SPR_SET_TRANSPEN(0)
571571   MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
r30966r30967
583583   MCFG_SOUND_ROUTE(2, "rspeaker", 1.0)
584584MACHINE_CONFIG_END
585585
586static MACHINE_CONFIG_DERIVED( twrldc94, gstriker )
587   MCFG_VIDEO_START_OVERRIDE(gstriker_state, twrldc94 )
588586
589   MCFG_DEVICE_MODIFY("vsystem_spr")
590   MCFG_VSYSTEM_SPR_SET_PALBASE(0x60)
591
592MACHINE_CONFIG_END
593
594
595587static MACHINE_CONFIG_START( vgoal, gstriker_state )
596588   MCFG_CPU_ADD("maincpu", M68000, 16000000)
597589   MCFG_CPU_PROGRAM_MAP(vgoal_map)
r30966r30967
622614
623615   MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0)
624616   MCFG_VSYSTEM_SPR_SET_GFXREGION(2)
625   MCFG_VSYSTEM_SPR_SET_PALBASE(0x00)
626617   MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
627618   MCFG_VSYSTEM_SPR_PALETTE("palette")
628619
629   MCFG_VIDEO_START_OVERRIDE(gstriker_state,vgoalsoc)
620   MCFG_VIDEO_START_OVERRIDE(gstriker_state,gstriker)
630621
631622   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
632623
r30966r30967
11091100/* Similar, but not identical hardware, appear to be protected by an MCU :-( */
11101101GAME( 1994, vgoalsoc, 0,        vgoal,    vgoalsoc, gstriker_state, vgoalsoc,   ROT0, "Tecmo", "V Goal Soccer (set 1)", GAME_NOT_WORKING )
11111102GAME( 1994, vgoalsca, vgoalsoc, vgoal,    vgoalsoc, gstriker_state, vgoalsoc,   ROT0, "Tecmo", "V Goal Soccer (set 2)", GAME_NOT_WORKING )
1112GAME( 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 )
1113GAME( 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 )
1103GAME( 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 )
1104GAME( 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 )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team