Previous 15994 Revisions Next

r12301 Friday 22nd July, 2011 at 14:18:04 UTC by Angelo Salese
Implemented transfer type 254, used by Lunar 2
[src/mame/machine]stvcd.c

src/mame/machine/stvcd.c
r12300r12301
449449               }
450450               break;
451451
452            case XFERTYPE_FILEINFO_254:
453               printf("STVCD: Unhandled xfer type 254\n");
452            case XFERTYPE_FILEINFO_254: // Lunar 2
453               if((xfercount % (6 * 2)) == 0)
454               {
455                  UINT32 temp = 2 + (xfercount / (0x6 * 2));
456
457                  // first 4 bytes = FAD
458                  finfbuf[0] = (curdir[temp].firstfad>>24)&0xff;
459                  finfbuf[1] = (curdir[temp].firstfad>>16)&0xff;
460                  finfbuf[2] = (curdir[temp].firstfad>>8)&0xff;
461                  finfbuf[3] = (curdir[temp].firstfad&0xff);
462                  // second 4 bytes = length of file
463                  finfbuf[4] = (curdir[temp].length>>24)&0xff;
464                  finfbuf[5] = (curdir[temp].length>>16)&0xff;
465                  finfbuf[6] = (curdir[temp].length>>8)&0xff;
466                  finfbuf[7] = (curdir[temp].length&0xff);
467                  finfbuf[8] = 0x00;
468                  finfbuf[9] = 0x00;
469                  finfbuf[10] = temp;
470                  finfbuf[11] = curdir[temp].flags;
471               }
472
473               rv = finfbuf[xfercount % (6 * 2)]<<8 | finfbuf[(xfercount % (6 * 2)) +1];
474
475               xfercount += 2;
476               xferdnum += 2;
477
478               if (xfercount > (254 * 6 * 2))
479               {
480                  xfercount = 0;
481                  xfertype = XFERTYPE_INVALID;
482               }
454483               break;
455484
456485            default:
r12300r12301
560589   case 0x0018:
561590   case 0x001a:
562591//              CDROM_LOG(("WW CR1: %04x\n", data))
592      /* these are ERRORS from our core and mustn't happen! */
593      if(data == 0x2100 || data == 0x2300)
594         debugger_break(machine);
595
563596      cr1 = data;
564597      cd_stat &= ~CD_STAT_PERI;
565598      break;
r12300r12301
893926         hirqreg |= CMOK|DRDY;
894927         break;
895928
896      /* these are ERRORS from our core and mustn't happen! */
897      case 0x2100:
898      case 0x2300:
899         debugger_break(machine);
900         break;
901
902929      case 0x3000:   // Set CD Device connection
903930         {
904931            UINT8 parm;
r12300r12301
13991426                     // - file #
14001427                     // attributes flags
14011428
1402            cr3 = cr4 = 0;
1429            cr3 = 0;
1430            cr4 = 0;
14031431
14041432            // first 4 bytes = FAD
14051433            finfbuf[0] = (curdir[temp].firstfad>>24)&0xff;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team