trunk/src/emu/sound/spu.c
| r22579 | r22580 | |
| 2482 | 2482 | INT16 vl = ((sp[0]*voll)>>15); |
| 2483 | 2483 | INT16 vr = ((sp[1]*volr)>>15); |
| 2484 | 2484 | |
| 2485 | | *(signed short *)(spu_ram+m_cd_out_ptr)=vl; |
| 2486 | | *(signed short *)(spu_ram+m_cd_out_ptr+0x400)=vr; |
| 2485 | // if the volume adjusted samples are stored here, vibribbon does nothing |
| 2486 | *(signed short *)(spu_ram+m_cd_out_ptr)=sp[0]; |
| 2487 | *(signed short *)(spu_ram+m_cd_out_ptr+0x400)=sp[1]; |
| 2487 | 2488 | m_cd_out_ptr=(m_cd_out_ptr+2)&0x3ff; |
| 2488 | 2489 | |
| 2489 | | if((m_cd_out_ptr == (spureg.irq_addr & ~0x401)) && (spureg.ctrl & spuctrl_irq_enable)) |
| 2490 | | m_irq_handler(1); |
| 2490 | //if((m_cd_out_ptr == ((spureg.irq_addr << 3) & ~0x400)) && (spureg.ctrl & spuctrl_irq_enable)) |
| 2491 | // m_irq_handler(1); |
| 2491 | 2492 | |
| 2492 | 2493 | dp[0]=clamp(dp[0]+vl); |
| 2493 | 2494 | dp[1]=clamp(dp[1]+vr); |
| r22579 | r22580 | |
| 2513 | 2514 | |
| 2514 | 2515 | // if (n>0) printf("cdda buffer underflow (n=%d cdda_in=%d spf=%d)\n",n,cdda_buffer->get_bytes_in(),cdda_spf); |
| 2515 | 2516 | } |
| 2516 | | else if((spureg.irq_addr < 0x800) && (spureg.ctrl & spuctrl_irq_enable)) |
| 2517 | else if(((spureg.irq_addr << 3) < 0x800) && (spureg.ctrl & spuctrl_irq_enable)) |
| 2517 | 2518 | { |
| 2518 | | UINT16 irq_addr = spureg.irq_addr & ~0x401; |
| 2519 | UINT16 irq_addr = (spureg.irq_addr << 3) & ~0x400; |
| 2519 | 2520 | UINT32 end = m_cd_out_ptr + (sz >> 1); |
| 2520 | 2521 | if(((m_cd_out_ptr < irq_addr) && (end > irq_addr)) || ((m_cd_out_ptr > (end & 0x3ff)) && ((end & 0x3ff) > irq_addr))) |
| 2521 | 2522 | m_irq_handler(1); |
| r22579 | r22580 | |
| 3009 | 3010 | } |
| 3010 | 3011 | |
| 3011 | 3012 | // Return that we processed the sector |
| 3012 | | |
| 3013 | 3013 | return true; |
| 3014 | 3014 | } |
| 3015 | 3015 | |
| r22579 | r22580 | |
| 3052 | 3052 | flip[i] = flip[i+1]; |
| 3053 | 3053 | flip[i+1] = temp; |
| 3054 | 3054 | } |
| 3055 | // this should be done in generate but sound_stream_update may not be called frequently enough |
| 3056 | if(((spureg.irq_addr << 3) < 0x800) && (spureg.ctrl & spuctrl_irq_enable)) |
| 3057 | m_irq_handler(1); |
| 3055 | 3058 | |
| 3056 | 3059 | return true; |
| 3057 | 3060 | } |
trunk/src/mess/machine/psxcd.c
| r22579 | r22580 | |
| 517 | 517 | verboselog(machine(), 1, "psxcd: mute\n"); |
| 518 | 518 | |
| 519 | 519 | m_mute = true; |
| 520 | | send_result(intr_acknowledge); |
| 520 | send_result(intr_complete); |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | void psxcd_device::cdcmd_demute() |
| r22579 | r22580 | |
| 525 | 525 | verboselog(machine(), 1, "psxcd: demute\n"); |
| 526 | 526 | |
| 527 | 527 | m_mute = false; |
| 528 | | send_result(intr_acknowledge); |
| 528 | send_result(intr_complete); |
| 529 | 529 | } |
| 530 | 530 | |
| 531 | 531 | void psxcd_device::cdcmd_setfilter() |
| r22579 | r22580 | |
| 705 | 705 | break; |
| 706 | 706 | |
| 707 | 707 | default: |
| 708 | | verboselog(machine(), 0, "psxcd: unimplemented test cmd %02x", cmdbuf[0]); |
| 708 | verboselog(machine(), 0, "psxcd: unimplemented test cmd %02x\n", cmdbuf[0]); |
| 709 | 709 | cmd_complete(prepare_result(intr_diskerror, NULL, 0, 0x10)); |
| 710 | 710 | break; |
| 711 | 711 | } |