Alexandre Julliard | 17216f5 | 1997-10-12 16:30:17 +0000 | [diff] [blame] | 1 | /* |
| 2 | * BIOS interrupt 15h handler |
| 3 | */ |
| 4 | |
Alexandre Julliard | 17216f5 | 1997-10-12 16:30:17 +0000 | [diff] [blame] | 5 | #include <stdlib.h> |
| 6 | #include "miscemu.h" |
Alexandre Julliard | 61fece0 | 1999-06-26 19:09:08 +0000 | [diff] [blame] | 7 | #include "debugtools.h" |
Alexandre Julliard | 17216f5 | 1997-10-12 16:30:17 +0000 | [diff] [blame] | 8 | |
Patrik Stridvall | b4b9fae | 1999-04-19 14:56:29 +0000 | [diff] [blame] | 9 | DEFAULT_DEBUG_CHANNEL(int) |
| 10 | |
Alexandre Julliard | 17216f5 | 1997-10-12 16:30:17 +0000 | [diff] [blame] | 11 | |
| 12 | /********************************************************************** |
| 13 | * INT_Int15Handler |
| 14 | * |
| 15 | * Handler for int 15h (old cassette interrupt). |
| 16 | */ |
Alexandre Julliard | 617955d | 1999-06-26 18:40:24 +0000 | [diff] [blame] | 17 | void WINAPI INT_Int15Handler( CONTEXT86 *context ) |
Alexandre Julliard | 17216f5 | 1997-10-12 16:30:17 +0000 | [diff] [blame] | 18 | { |
| 19 | switch(AH_reg(context)) |
| 20 | { |
| 21 | case 0x88: /* get size of memory above 1 M */ |
| 22 | AX_reg(context) = 64; /* FIXME: are 64K ok? */ |
| 23 | RESET_CFLAG(context); |
| 24 | break; |
| 25 | |
Andreas Mohr | a7894d9 | 1999-01-24 09:32:10 +0000 | [diff] [blame] | 26 | case 0xc0: /* GET CONFIGURATION */ |
| 27 | if (ISV86(context)) /* real */ |
| 28 | ES_reg(context) = 0xf000; |
| 29 | else |
| 30 | ES_reg(context) = DOSMEM_BiosSysSeg; |
| 31 | BX_reg(context) = 0xe6f5; |
| 32 | AH_reg(context) = 0x0; |
| 33 | RESET_CFLAG(context); |
| 34 | break; |
Jess Haas | d11443e | 1999-03-17 15:15:14 +0000 | [diff] [blame] | 35 | case 0xc2: |
| 36 | switch(AL_reg(context)) |
| 37 | { |
| 38 | case 0x00: /* Enable-Disable Pointing Device (mouse) */ |
| 39 | /* BH = newstate, 00h = disabled 01h = enabled */ |
| 40 | switch(BH_reg(context)) |
| 41 | { |
| 42 | case 0x00: |
Alexandre Julliard | 61fece0 | 1999-06-26 19:09:08 +0000 | [diff] [blame] | 43 | FIXME("Disable Pointing Device - not implemented\n"); |
Jess Haas | d11443e | 1999-03-17 15:15:14 +0000 | [diff] [blame] | 44 | break; |
| 45 | case 0x01: |
Alexandre Julliard | 61fece0 | 1999-06-26 19:09:08 +0000 | [diff] [blame] | 46 | FIXME("Enable Pointing Device - not implemented\n"); |
Jess Haas | d11443e | 1999-03-17 15:15:14 +0000 | [diff] [blame] | 47 | break; |
| 48 | default: |
| 49 | INT_BARF( context, 0x15 ); |
| 50 | break; |
| 51 | } |
| 52 | AH_reg(context) = 0x00; /* successful */ |
| 53 | break; |
| 54 | case 0x02: /* Set Sampling Rate */ |
| 55 | /* BH = sampling rate */ |
Alexandre Julliard | 61fece0 | 1999-06-26 19:09:08 +0000 | [diff] [blame] | 56 | FIXME("Set Sampling Rate - not implemented\n"); |
Jess Haas | d11443e | 1999-03-17 15:15:14 +0000 | [diff] [blame] | 57 | AH_reg(context) = 0x00; /* successful */ |
| 58 | break; |
| 59 | case 0x04: /* Get Pointing Device Type */ |
Alexandre Julliard | 61fece0 | 1999-06-26 19:09:08 +0000 | [diff] [blame] | 60 | FIXME("Get Pointing Device Type - not implemented\n"); |
Jess Haas | d11443e | 1999-03-17 15:15:14 +0000 | [diff] [blame] | 61 | BH_reg(context) = 0x01;/*Device id FIXME what is it suposed to be?*/ |
| 62 | break; |
| 63 | default: |
| 64 | INT_BARF( context, 0x15 ); |
| 65 | } |
| 66 | break; |
Andreas Mohr | a7894d9 | 1999-01-24 09:32:10 +0000 | [diff] [blame] | 67 | |
Alexandre Julliard | 17216f5 | 1997-10-12 16:30:17 +0000 | [diff] [blame] | 68 | default: |
| 69 | INT_BARF( context, 0x15 ); |
| 70 | } |
| 71 | } |