Removed last user of msdos/int1a.c.
This commit is contained in:
parent
02e177759d
commit
a9fecb90c4
|
@ -53,7 +53,6 @@ C_SRCS = \
|
||||||
$(TOPOBJDIR)/msdos/int11.c \
|
$(TOPOBJDIR)/msdos/int11.c \
|
||||||
$(TOPOBJDIR)/msdos/int13.c \
|
$(TOPOBJDIR)/msdos/int13.c \
|
||||||
$(TOPOBJDIR)/msdos/int15.c \
|
$(TOPOBJDIR)/msdos/int15.c \
|
||||||
$(TOPOBJDIR)/msdos/int1a.c \
|
|
||||||
$(TOPOBJDIR)/msdos/int20.c \
|
$(TOPOBJDIR)/msdos/int20.c \
|
||||||
$(TOPOBJDIR)/msdos/int21.c \
|
$(TOPOBJDIR)/msdos/int21.c \
|
||||||
$(TOPOBJDIR)/msdos/int25.c \
|
$(TOPOBJDIR)/msdos/int25.c \
|
||||||
|
|
|
@ -30,6 +30,11 @@
|
||||||
# include <sys/mman.h>
|
# include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <time.h>
|
||||||
|
#ifdef HAVE_SYS_TIME_H
|
||||||
|
# include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "wine/winbase16.h"
|
#include "wine/winbase16.h"
|
||||||
|
|
||||||
|
@ -234,6 +239,27 @@ static BIOSDATA * DOSMEM_BiosData(void)
|
||||||
return (BIOSDATA *)(DOSMEM_sysmem + 0x400);
|
return (BIOSDATA *)(DOSMEM_sysmem + 0x400);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* DOSMEM_GetTicksSinceMidnight
|
||||||
|
*
|
||||||
|
* Return number of clock ticks since midnight.
|
||||||
|
*/
|
||||||
|
static DWORD DOSMEM_GetTicksSinceMidnight(void)
|
||||||
|
{
|
||||||
|
struct tm *bdtime;
|
||||||
|
struct timeval tvs;
|
||||||
|
time_t seconds;
|
||||||
|
|
||||||
|
/* This should give us the (approximately) correct
|
||||||
|
* 18.206 clock ticks per second since midnight.
|
||||||
|
*/
|
||||||
|
gettimeofday( &tvs, NULL );
|
||||||
|
seconds = tvs.tv_sec;
|
||||||
|
bdtime = localtime( &seconds );
|
||||||
|
return (((bdtime->tm_hour * 3600 + bdtime->tm_min * 60 +
|
||||||
|
bdtime->tm_sec) * 18206) / 1000) +
|
||||||
|
(tvs.tv_usec / 54927);
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* DOSMEM_FillBiosSegments
|
* DOSMEM_FillBiosSegments
|
||||||
|
@ -281,7 +307,7 @@ static void DOSMEM_FillBiosSegments(void)
|
||||||
pBiosData->VideoPageSize = 80 * 25 * 2;
|
pBiosData->VideoPageSize = 80 * 25 * 2;
|
||||||
pBiosData->VideoPageStartAddr = 0xb800;
|
pBiosData->VideoPageStartAddr = 0xb800;
|
||||||
pBiosData->VideoCtrlAddr = 0x3d4;
|
pBiosData->VideoCtrlAddr = 0x3d4;
|
||||||
pBiosData->Ticks = INT1A_GetTicksSinceMidnight();
|
pBiosData->Ticks = DOSMEM_GetTicksSinceMidnight();
|
||||||
pBiosData->NbHardDisks = 2;
|
pBiosData->NbHardDisks = 2;
|
||||||
pBiosData->KbdBufferStart = 0x1e;
|
pBiosData->KbdBufferStart = 0x1e;
|
||||||
pBiosData->KbdBufferEnd = 0x3e;
|
pBiosData->KbdBufferEnd = 0x3e;
|
||||||
|
|
128
msdos/int1a.c
128
msdos/int1a.c
|
@ -1,128 +0,0 @@
|
||||||
/*
|
|
||||||
* BIOS interrupt 1ah handler
|
|
||||||
*
|
|
||||||
* Copyright 1993 Erik Bos
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "wine/port.h"
|
|
||||||
|
|
||||||
#include <time.h>
|
|
||||||
#ifdef HAVE_SYS_TIME_H
|
|
||||||
# include <sys/time.h>
|
|
||||||
#endif
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "miscemu.h"
|
|
||||||
#include "wine/debug.h"
|
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(int);
|
|
||||||
|
|
||||||
#define BCD_TO_BIN(x) ((x&15) + (x>>4)*10)
|
|
||||||
#define BIN_TO_BCD(x) ((x%10) + ((x/10)<<4))
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* INT1A_GetTicksSinceMidnight
|
|
||||||
*
|
|
||||||
* Return number of clock ticks since midnight.
|
|
||||||
*/
|
|
||||||
DWORD INT1A_GetTicksSinceMidnight(void)
|
|
||||||
{
|
|
||||||
struct tm *bdtime;
|
|
||||||
struct timeval tvs;
|
|
||||||
time_t seconds;
|
|
||||||
|
|
||||||
/* This should give us the (approximately) correct
|
|
||||||
* 18.206 clock ticks per second since midnight.
|
|
||||||
*/
|
|
||||||
gettimeofday( &tvs, NULL );
|
|
||||||
seconds = tvs.tv_sec;
|
|
||||||
bdtime = localtime( &seconds );
|
|
||||||
return (((bdtime->tm_hour * 3600 + bdtime->tm_min * 60 +
|
|
||||||
bdtime->tm_sec) * 18206) / 1000) +
|
|
||||||
(tvs.tv_usec / 54927);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* INT_Int1aHandler (WPROCS.126)
|
|
||||||
*
|
|
||||||
* Handler for int 1ah
|
|
||||||
* 0x00 - 0x07 - date and time
|
|
||||||
* 0x?? - 0x?? - Microsoft Real Time Compression Interface
|
|
||||||
*/
|
|
||||||
void WINAPI INT_Int1aHandler( CONTEXT86 *context )
|
|
||||||
{
|
|
||||||
time_t ltime;
|
|
||||||
DWORD ticks;
|
|
||||||
struct tm *bdtime;
|
|
||||||
|
|
||||||
switch(AH_reg(context))
|
|
||||||
{
|
|
||||||
case 0x00:
|
|
||||||
ticks = INT1A_GetTicksSinceMidnight();
|
|
||||||
SET_CX( context, HIWORD(ticks) );
|
|
||||||
SET_DX( context, LOWORD(ticks) );
|
|
||||||
SET_AX( context, 0 ); /* No midnight rollover */
|
|
||||||
TRACE("int1a: AH=00 -- ticks=%ld\n", ticks);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x02:
|
|
||||||
ltime = time(NULL);
|
|
||||||
bdtime = localtime(<ime);
|
|
||||||
|
|
||||||
SET_CX( context, (BIN_TO_BCD(bdtime->tm_hour)<<8) |
|
|
||||||
BIN_TO_BCD(bdtime->tm_min) );
|
|
||||||
SET_DX( context, (BIN_TO_BCD(bdtime->tm_sec)<<8) );
|
|
||||||
|
|
||||||
case 0x04:
|
|
||||||
ltime = time(NULL);
|
|
||||||
bdtime = localtime(<ime);
|
|
||||||
SET_CX( context, (BIN_TO_BCD(bdtime->tm_year/100)<<8) |
|
|
||||||
BIN_TO_BCD((bdtime->tm_year-1900)%100) );
|
|
||||||
SET_DX( context, (BIN_TO_BCD(bdtime->tm_mon)<<8) |
|
|
||||||
BIN_TO_BCD(bdtime->tm_mday) );
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* setting the time,date or RTC is not allow -EB */
|
|
||||||
case 0x01:
|
|
||||||
/* set system time */
|
|
||||||
case 0x03:
|
|
||||||
/* set RTC time */
|
|
||||||
case 0x05:
|
|
||||||
/* set RTC date */
|
|
||||||
case 0x06:
|
|
||||||
/* set ALARM */
|
|
||||||
case 0x07:
|
|
||||||
/* cancel ALARM */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0xb0: /* Microsoft Real Time Compression */
|
|
||||||
switch AL_reg(context)
|
|
||||||
{
|
|
||||||
case 0x01:
|
|
||||||
/* not present */
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
INT_BARF(context, 0x1a);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
INT_BARF( context, 0x1a );
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue