Previous 15994 Revisions Next

r12647 Tuesday 16th August, 2011 at 21:06:21 UTC by Angelo Salese
Fixed FAD range check, fixes sound in Rockman X4 and Vampire Hunter
[src/mame/drivers]saturn.c
[src/mame/machine]stvcd.c
[src/mame/video]stvvdp2.c

src/mame/machine/stvcd.c
r12646r12647
305305         CDROM_LOG(("%s:CD: Initialize CD system\n", machine.describe_context()))
306306         if((cr1 & 0x81) == 0x00) //guess
307307         {
308            int i;
308            //int i;
309309            cd_stat = CD_STAT_PAUSE;
310310            cd_curfad = 150;
311311            //cur_track = 1;
r12646r12647
318318            /* reset filter connections */
319319            /* Guess: X-Men COTA sequence is 0x48->0x48->0x04(01)->0x04(00)->0x30 then 0x10, without this game throws a FAD reject error */
320320            /* X-Men vs. SF is even fussier, sequence is  0x04 (1) 0x04 (0) 0x03 (0) 0x03 (1) 0x30 */
321            #if 0
321322            for(i=0;i<MAX_FILTERS;i++)
322323            {
323324               filters[i].fad = 0;
r12646r12647
330331               filters[i].smval = 0;
331332               filters[i].cival = 0;
332333            }
334            #endif
333335
334336            /* reset CD device connection */
335337            //cddevice = (filterT *)NULL;
r12646r12647
653655
654656            CDROM_LOG(("%s:CD: Set Filter Range\n",   machine.describe_context()))
655657
658            printf("%08x %08x %d\n",filters[fnum].fad,filters[fnum].range,fnum);
659
656660            filters[fnum].fad = ((cr1 & 0xff)<<16) | cr2;
657661            filters[fnum].range = ((cr3 & 0xff)<<16) | cr4;
658662
r12646r12647
21422146   // loop on the filters
21432147   do
21442148   {
2149      // FAD range check?
2150      /* according to an obscure document note, this switches the filter connector to be false if the range fails ... I think ... */
2151      if (flt->mode & 0x40)
2152      {
2153         if ((cd_curfad < flt->fad) || (cd_curfad > (flt->fad + flt->range)))
2154         {
2155            printf("curfad reject %08x %08x %08x %08x\n",cd_curfad,fadstoplay,flt->fad,flt->fad+flt->range);
2156            //match = 0;
2157            lastbuf = flt->condfalse;
2158            flt = &filters[lastbuf];
2159
2160            keepgoing--;
2161         }
2162      }
2163
21452164      if ((trktype != CD_TRACK_AUDIO) && (curblock.data[15] == 2))
21462165      {
21472166         if (flt->mode & 1)   // file number
r12646r12647
21862205         }
21872206      }
21882207
2189      // FAD range check?
2190      if (flt->mode & 0x40)
2191      {
2192         if ((cd_curfad < flt->fad) || (cd_curfad > (flt->fad + flt->range)))
2193         {
2194            printf("curfad reject %08x %08x %08x %08x\n",cd_curfad,fadstoplay,flt->fad,flt->fad+flt->range);
2195            match = 0;
2196         }
2197      }
2198
21992208      if (match)
22002209      {
22012210         lastbuf = flt->condtrue;
src/mame/video/stvvdp2.c
r12646r12647
39003900         }
39013901/* WE'VE GOT THE TILE INFO ... */
39023902
3903         if(!STV_VDP2_VRAMSZ)
3904            tilecode &= 0x3fff;
3905
39063903         if ( tilecode < tilecodemin ) tilecodemin = tilecode;
39073904         if ( tilecode > tilecodemax ) tilecodemax = tilecode;
39083905
r12646r12647
39333930         }
39343931/* TILES ARE NOW DECODED */
39353932
3933         if(!STV_VDP2_VRAMSZ)
3934            tilecode &= 0x3fff;
3935
39363936/* DRAW! */
39373937         if(stv2_current_tilemap.incx != 0x10000 ||
39383938            stv2_current_tilemap.incy != 0x10000 ||
src/mame/drivers/saturn.c
r12646r12647
13771377   PORT_CONFSETTING(0x01,"Racing Device") /* steering wheel only */
13781378   PORT_CONFSETTING(0x02,"Analog Device") //Nights pad?
13791379//  PORT_CONFSETTING(0x03,"Lightgun Device")
1380   PORT_CONFSETTING(0x04,"Pointing Device") // TODO: what's this? trackball?
1380   PORT_CONFSETTING(0x04,"Trackball") // TODO: according to the docs this ID is labeled "Pointing Device"
13811381   PORT_CONFSETTING(0x05,"Keyboard Device")
13821382     PORT_CONFSETTING(0x06,"Megadrive 3B Pad")
13831383   PORT_CONFSETTING(0x07,"Megadrive 6B Pad")
r12646r12647
16781678}
16791679#endif
16801680
1681#ifdef UNUSED_FUNCTION
1682static void print_game_info(void);
1683#endif
1684
16851681DRIVER_INIT ( stv )
16861682{
16871683   saturn_state *state = machine.driver_data<saturn_state>();

Previous 15994 Revisions Next


© 1998-2018 The MESS Team