1997-10-12 16:30:17 +00:00
|
|
|
/*
|
|
|
|
* BIOS interrupt 15h handler
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "miscemu.h"
|
1999-06-26 19:09:08 +00:00
|
|
|
#include "debugtools.h"
|
1997-10-12 16:30:17 +00:00
|
|
|
|
2000-11-27 23:54:25 +00:00
|
|
|
DEFAULT_DEBUG_CHANNEL(int);
|
1999-04-19 14:56:29 +00:00
|
|
|
|
1997-10-12 16:30:17 +00:00
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* INT_Int15Handler
|
|
|
|
*
|
2000-08-20 18:47:48 +00:00
|
|
|
* Handler for int 15h
|
1997-10-12 16:30:17 +00:00
|
|
|
*/
|
1999-06-26 18:40:24 +00:00
|
|
|
void WINAPI INT_Int15Handler( CONTEXT86 *context )
|
1997-10-12 16:30:17 +00:00
|
|
|
{
|
|
|
|
switch(AH_reg(context))
|
|
|
|
{
|
2000-08-20 18:47:48 +00:00
|
|
|
case 0x84: /* read joystick information */
|
|
|
|
FIXME("Read joystick information not implemented\n");
|
|
|
|
|
|
|
|
/* FIXME: report status as if no game port exists */
|
|
|
|
switch(DX_reg(context))
|
|
|
|
{
|
|
|
|
case 0x0: /* read joystick switches */
|
|
|
|
AL_reg(context) = 0x0; /* all switches open */
|
|
|
|
break;
|
|
|
|
case 0x1: /* read joystick position */
|
|
|
|
AX_reg(context) = 0x0;
|
|
|
|
BX_reg(context) = 0x0;
|
|
|
|
CX_reg(context) = 0x0;
|
|
|
|
DX_reg(context) = 0x0;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
INT_BARF( context, 0x15 );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
RESET_CFLAG(context);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
1997-10-12 16:30:17 +00:00
|
|
|
case 0x88: /* get size of memory above 1 M */
|
|
|
|
AX_reg(context) = 64; /* FIXME: are 64K ok? */
|
|
|
|
RESET_CFLAG(context);
|
|
|
|
break;
|
|
|
|
|
1999-01-24 09:32:10 +00:00
|
|
|
case 0xc0: /* GET CONFIGURATION */
|
|
|
|
if (ISV86(context)) /* real */
|
2000-09-25 23:53:07 +00:00
|
|
|
context->SegEs = 0xf000;
|
1999-01-24 09:32:10 +00:00
|
|
|
else
|
2000-09-25 23:53:07 +00:00
|
|
|
context->SegEs = DOSMEM_BiosSysSeg;
|
1999-01-24 09:32:10 +00:00
|
|
|
BX_reg(context) = 0xe6f5;
|
|
|
|
AH_reg(context) = 0x0;
|
|
|
|
RESET_CFLAG(context);
|
|
|
|
break;
|
1999-03-17 15:15:14 +00:00
|
|
|
case 0xc2:
|
|
|
|
switch(AL_reg(context))
|
|
|
|
{
|
|
|
|
case 0x00: /* Enable-Disable Pointing Device (mouse) */
|
|
|
|
/* BH = newstate, 00h = disabled 01h = enabled */
|
|
|
|
switch(BH_reg(context))
|
|
|
|
{
|
|
|
|
case 0x00:
|
1999-06-26 19:09:08 +00:00
|
|
|
FIXME("Disable Pointing Device - not implemented\n");
|
1999-03-17 15:15:14 +00:00
|
|
|
break;
|
|
|
|
case 0x01:
|
1999-06-26 19:09:08 +00:00
|
|
|
FIXME("Enable Pointing Device - not implemented\n");
|
1999-03-17 15:15:14 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
INT_BARF( context, 0x15 );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
AH_reg(context) = 0x00; /* successful */
|
|
|
|
break;
|
|
|
|
case 0x02: /* Set Sampling Rate */
|
|
|
|
/* BH = sampling rate */
|
1999-06-26 19:09:08 +00:00
|
|
|
FIXME("Set Sampling Rate - not implemented\n");
|
1999-03-17 15:15:14 +00:00
|
|
|
AH_reg(context) = 0x00; /* successful */
|
|
|
|
break;
|
|
|
|
case 0x04: /* Get Pointing Device Type */
|
1999-06-26 19:09:08 +00:00
|
|
|
FIXME("Get Pointing Device Type - not implemented\n");
|
2000-12-02 20:18:08 +00:00
|
|
|
BH_reg(context) = 0x01;/*Device id FIXME what is it supposed to be?*/
|
1999-03-17 15:15:14 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
INT_BARF( context, 0x15 );
|
|
|
|
}
|
|
|
|
break;
|
1999-01-24 09:32:10 +00:00
|
|
|
|
1997-10-12 16:30:17 +00:00
|
|
|
default:
|
|
|
|
INT_BARF( context, 0x15 );
|
|
|
|
}
|
|
|
|
}
|