fix mscdex get audio position
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2838
This commit is contained in:
parent
d104eea175
commit
04ade3cc82
1 changed files with 5 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_mscdex.cpp,v 1.45 2007-01-21 16:21:22 c2woody Exp $ */
|
||||
/* $Id: dos_mscdex.cpp,v 1.46 2007-04-15 11:39:33 c2woody Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
@ -876,7 +876,10 @@ static Bit16u MSCDEX_IOCTL_Input(PhysPt buffer,Bit8u drive_unit) {
|
|||
mscdex->GetCurrentPos(drive_unit,pos);
|
||||
Bit8u addr_mode = mem_readb(buffer+1);
|
||||
if (addr_mode==0) { // HSG
|
||||
mem_writed(buffer+2,MSF_TO_FRAMES (pos.min, pos.sec, pos.fr));
|
||||
Bit32u frames=MSF_TO_FRAMES(pos.min, pos.sec, pos.fr);
|
||||
if (frames<150) LOG_MSG("MSCDEX: Get position: invalid position %d:%d:%d", pos.min, pos.sec, pos.fr);
|
||||
else frames-=150;
|
||||
mem_writed(buffer+2,frames);
|
||||
} else if (addr_mode==1) { // Red book
|
||||
mem_writeb(buffer+2,pos.fr);
|
||||
mem_writeb(buffer+3,pos.sec);
|
||||
|
|
Loading…
Add table
Reference in a new issue