- overwrite (rather than append) the output file if we have no separator
[wine/multimedia.git] / msdos / int15.c
blobc8c183a3b165707494bb11d5610d34c889754bca
1 /*
2 * BIOS interrupt 15h handler
3 */
5 #include <stdlib.h>
6 #include "miscemu.h"
7 #include "debugtools.h"
9 DEFAULT_DEBUG_CHANNEL(int);
12 /**********************************************************************
13 * INT_Int15Handler
15 * Handler for int 15h
17 void WINAPI INT_Int15Handler( CONTEXT86 *context )
19 switch(AH_reg(context))
21 case 0x84: /* read joystick information */
22 FIXME("Read joystick information not implemented\n");
24 /* FIXME: report status as if no game port exists */
25 switch(DX_reg(context))
27 case 0x0: /* read joystick switches */
28 AL_reg(context) = 0x0; /* all switches open */
29 break;
30 case 0x1: /* read joystick position */
31 AX_reg(context) = 0x0;
32 BX_reg(context) = 0x0;
33 CX_reg(context) = 0x0;
34 DX_reg(context) = 0x0;
35 break;
36 default:
37 INT_BARF( context, 0x15 );
38 break;
41 RESET_CFLAG(context);
43 break;
45 case 0x88: /* get size of memory above 1 M */
46 AX_reg(context) = 64; /* FIXME: are 64K ok? */
47 RESET_CFLAG(context);
48 break;
50 case 0xc0: /* GET CONFIGURATION */
51 if (ISV86(context)) /* real */
52 context->SegEs = 0xf000;
53 else
54 context->SegEs = DOSMEM_BiosSysSeg;
55 BX_reg(context) = 0xe6f5;
56 AH_reg(context) = 0x0;
57 RESET_CFLAG(context);
58 break;
59 case 0xc2:
60 switch(AL_reg(context))
62 case 0x00: /* Enable-Disable Pointing Device (mouse) */
63 /* BH = newstate, 00h = disabled 01h = enabled */
64 switch(BH_reg(context))
66 case 0x00:
67 FIXME("Disable Pointing Device - not implemented\n");
68 break;
69 case 0x01:
70 FIXME("Enable Pointing Device - not implemented\n");
71 break;
72 default:
73 INT_BARF( context, 0x15 );
74 break;
76 AH_reg(context) = 0x00; /* successful */
77 break;
78 case 0x02: /* Set Sampling Rate */
79 /* BH = sampling rate */
80 FIXME("Set Sampling Rate - not implemented\n");
81 AH_reg(context) = 0x00; /* successful */
82 break;
83 case 0x04: /* Get Pointing Device Type */
84 FIXME("Get Pointing Device Type - not implemented\n");
85 BH_reg(context) = 0x01;/*Device id FIXME what is it supposed to be?*/
86 break;
87 default:
88 INT_BARF( context, 0x15 );
90 break;
92 default:
93 INT_BARF( context, 0x15 );