src/mame/machine/stvcd.c
| r12300 | r12301 | |
| 449 | 449 | } |
| 450 | 450 | break; |
| 451 | 451 | |
| 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 | } |
| 454 | 483 | break; |
| 455 | 484 | |
| 456 | 485 | default: |
| r12300 | r12301 | |
| 560 | 589 | case 0x0018: |
| 561 | 590 | case 0x001a: |
| 562 | 591 | // 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 | |
| 563 | 596 | cr1 = data; |
| 564 | 597 | cd_stat &= ~CD_STAT_PERI; |
| 565 | 598 | break; |
| r12300 | r12301 | |
| 893 | 926 | hirqreg |= CMOK|DRDY; |
| 894 | 927 | break; |
| 895 | 928 | |
| 896 | | /* these are ERRORS from our core and mustn't happen! */ |
| 897 | | case 0x2100: |
| 898 | | case 0x2300: |
| 899 | | debugger_break(machine); |
| 900 | | break; |
| 901 | | |
| 902 | 929 | case 0x3000: // Set CD Device connection |
| 903 | 930 | { |
| 904 | 931 | UINT8 parm; |
| r12300 | r12301 | |
| 1399 | 1426 | // - file # |
| 1400 | 1427 | // attributes flags |
| 1401 | 1428 | |
| 1402 | | cr3 = cr4 = 0; |
| 1429 | cr3 = 0; |
| 1430 | cr4 = 0; |
| 1403 | 1431 | |
| 1404 | 1432 | // first 4 bytes = FAD |
| 1405 | 1433 | finfbuf[0] = (curdir[temp].firstfad>>24)&0xff; |