Previous 199869 Revisions Next

r41838 Monday 23rd November, 2015 at 14:25:23 UTC by David Haywood
added dynamic resolution stuff, donghaer 2 player mode sets a 640x480 mode, although scrolling in that mode doesn't currently work properly (nw)
[src/mame/drivers]crystal.cpp

trunk/src/mame/drivers/crystal.cpp
r250349r250350
140140      m_reset_patch(*this, "reset_patch"),
141141      m_maincpu(*this, "maincpu"),
142142      m_vr0(*this, "vr0"),
143      m_ds1302(*this, "rtc") { }
143      m_ds1302(*this, "rtc"),
144      m_screen(*this, "screen")
145      { }
144146
145147   /* memory pointers */
146148   required_shared_ptr<UINT32> m_sysregs;
r250349r250350
155157   required_device<cpu_device> m_maincpu;
156158   required_device<vr0video_device> m_vr0;
157159   required_device<ds1302_device> m_ds1302;
160   required_device<screen_device> m_screen;
158161
159162#ifdef IDLE_LOOP_SPEEDUP
160163   UINT8     m_FlipCntRead;
r250349r250350
215218   void PatchReset(  );
216219   UINT16 GetVidReg( address_space &space, UINT16 reg );
217220   void SetVidReg( address_space &space, UINT16 reg, UINT16 val );
221
222
218223};
219224
220225void crystal_state::IntReq( int num )
r250349r250350
722727
723728UINT32 crystal_state::screen_update_crystal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
724729{
730   int xres = 320;
731   int yres = 240;
732
733   // probably more registers around here control height / interlace enable etc.
734   // 0x341c looks like height, but doesn't change for interlace mode.
735   xres = m_sysregs[0x340c / 4]+1;
736   if (xres > 640) xres = 640;
737
738   // force double height if 640 wide (probably a reg for this)
739   if (xres == 640) yres = 480;
740
741
742   rectangle visarea;
743   visarea.set(0, xres-1, 0, yres-1);
744   m_screen->configure(xres, yres, visarea, m_screen->frame_period().attoseconds() );
745
746
747
725748   address_space &space = m_maincpu->space(AS_PROGRAM);
726749   int DoFlip;
727750
r250349r250350
10561079   MCFG_SCREEN_ADD("screen", RASTER)
10571080   MCFG_SCREEN_REFRESH_RATE(60)
10581081   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1059   MCFG_SCREEN_SIZE(320, 240)
1060   MCFG_SCREEN_VISIBLE_AREA(0, 319, 0, 239)
1082   MCFG_SCREEN_SIZE(640, 480)
1083   MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
10611084   MCFG_SCREEN_UPDATE_DRIVER(crystal_state, screen_update_crystal)
10621085   MCFG_SCREEN_VBLANK_DRIVER(crystal_state, screen_eof_crystal)
10631086   MCFG_SCREEN_PALETTE("palette")
r250349r250350
10771100   MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
10781101MACHINE_CONFIG_END
10791102
1080/*
1081    Top blade screen is 32 pixels wider
1082*/
1083static MACHINE_CONFIG_DERIVED( topbladv, crystal )
10841103
1085   MCFG_SCREEN_MODIFY("screen")
1086   MCFG_SCREEN_SIZE(320+32, 240)
1087   MCFG_SCREEN_VISIBLE_AREA(0, 319+32, 0, 239)
1088
1089MACHINE_CONFIG_END
1090
10911104static MACHINE_CONFIG_DERIVED( trivrus, crystal )
10921105   MCFG_CPU_MODIFY("maincpu")
10931106   MCFG_CPU_PROGRAM_MAP(trivrus_mem)
1094
1095   MCFG_SCREEN_MODIFY("screen")
1096   MCFG_SCREEN_SIZE(640, 480)
1097   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
10981107MACHINE_CONFIG_END
10991108
11001109
r250349r250350
13061315GAME( 2001, crysbios,        0, crystal,  crystal, driver_device,         0, ROT0, "BrezzaSoft",          "Crystal System BIOS",                  MACHINE_IS_BIOS_ROOT )
13071316GAME( 2001, crysking, crysbios, crystal,  crystal, crystal_state,  crysking, ROT0, "BrezzaSoft",          "The Crystal of Kings",                 0 )
13081317GAME( 2001, evosocc,  crysbios, crystal,  crystal, crystal_state,  evosocc,  ROT0, "Evoga",               "Evolution Soccer",                     0 )
1309GAME( 2003, topbladv, crysbios, topbladv, crystal, crystal_state,  topbladv, ROT0, "SonoKong / Expotato", "Top Blade V",                          0 )
1318GAME( 2003, topbladv, crysbios, crystal, crystal, crystal_state,  topbladv, ROT0, "SonoKong / Expotato", "Top Blade V",                          0 )
13101319GAME( 2001, officeye,        0, crystal,  officeye,crystal_state,  officeye, ROT0, "Danbi",               "Office Yeo In Cheon Ha (version 1.2)", MACHINE_NOT_WORKING ) // still has some instability issues
13111320GAME( 2001, donghaer,        0, crystal,  crystal, crystal_state,  donghaer, ROT0, "Danbi",               "Donggul Donggul Haerong",              MACHINE_NOT_WORKING )
13121321GAME( 2009, trivrus,         0, trivrus,  trivrus, driver_device,         0, ROT0, "AGT",                 "Trivia R Us (v1.07)",                  0 )


Previous 199869 Revisions Next


© 1997-2024 The MAME Team