fix mouse management
This commit is contained in:
parent
82724598ee
commit
9621566036
4 changed files with 98 additions and 88 deletions
41
src/bda.asm
41
src/bda.asm
|
|
@ -49,26 +49,31 @@
|
|||
;
|
||||
|
||||
%define BDA_DATA_SEG 0x0050
|
||||
%define BDA_MOUSE 0x0000
|
||||
|
||||
%define BDA_MOUSE_BUFFER 0x0000 ; dword; buffer (jusqu'à 4 octets)
|
||||
%define BDA_MOUSE_IDX 0x0004 ; byte 0..3
|
||||
%define DBA_MOUSE_PACKETLEN 0x0005
|
||||
%define DBA_CURSOR_MASK 0x0006 ; byte pixels mask (bit per pixel)
|
||||
%define BDA_MOUSE_STATUS 0x0007 ; byte
|
||||
%define BDA_MOUSE_X 0x0008 ; word
|
||||
%define BDA_MOUSE_Y 0x000A ; word
|
||||
%define BDA_MOUSE_WHEEL 0x000C ; word
|
||||
struc mouse
|
||||
.buffer resb 4 ; i8042 input buffer
|
||||
.idx resb 1 ; index in the buffer
|
||||
.packetlen resb 1 ; max buffer len (3 ou 4)
|
||||
|
||||
%define BDA_CURSOR_VISIBLE 0x000E ; byte (0/1)
|
||||
%define BDA_CURSOR_OLDX 0x000F ; word
|
||||
%define BDA_CURSOR_OLDY 0x0011 ; word
|
||||
%define BDA_CURSOR_NEWX 0x0013 ; word
|
||||
%define BDA_CURSOR_NEWY 0x0015 ; word
|
||||
%define BDA_CURSOR_BITOFF 0x0017 ; byte 0..7 bits d'offset (x&7)
|
||||
%define BDA_CURSOR_BYTES 0x0019 ; byte 2 ou 3 bytes as source for cursor image
|
||||
%define BDA_CURSOR_SAVED 0x001A ; flag if image saved
|
||||
%define BDA_CURSOR_PTR 0x001B ; pointeur vers l'image du curseur
|
||||
%define BDA_CURSOR_BG 0x0020 ; 48 bytes max (3*16)
|
||||
.status resb 1 ; mouse status (button etc)
|
||||
.wheel resb 1 ; if a packet size is 4; experimental
|
||||
.x resw 1 ;
|
||||
.y resw 1
|
||||
; cursor management
|
||||
.cur_oldx resw 1
|
||||
.cur_oldy resw 1
|
||||
.cur_newx resw 1
|
||||
.cur_newy resw 1
|
||||
.cur_visible resb 1
|
||||
.cur_seg resw 1 ; segment / offset of the pointer
|
||||
.cur_ofs resw 1
|
||||
.cur_mask resb 1 ; pixels mask (bit per pixel)
|
||||
.cur_bit_ofs resb 1 ; 0..7 bits d'offset (x&7)
|
||||
.cur_bytes resb 1 ; byte 2 ou 3 bytes as source for cursor image
|
||||
.bkg_saved resb 1 ; background saved
|
||||
.bkg_buffer resb 48 ; buffer for saved background
|
||||
endstruc
|
||||
|
||||
; -----------------------------------------------------------------------------------
|
||||
; PC components I/O ports
|
||||
|
|
|
|||
Loading…
Reference in a new issue