This commit is contained in:
nephacks
2025-06-04 03:22:50 +02:00
parent f234f23848
commit f12416cffd
14243 changed files with 6446499 additions and 26 deletions

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrCsrButtonMap, 6, Wintab, -, 182

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrConfigReplace, 4, Wintab, -, 141

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrConfigReplaceEx, 6, Wintab, -, 202

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTClose, 1, Wintab, -, 22

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTConfig, 2, Wintab, -, 60

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrCsrEnable, 3, Wintab, -, 181

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrCsrExt, 5, Wintab, -, 185

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrContextEnum, 5, Wintab, -, 120

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrContextOwner, 2, Wintab, -, 121

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTDataGet, 8, Wintab, -, 81

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTDataPeek, 8, Wintab, -, 82

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrDefContext, 2, Wintab, -, 122

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrDefContextEx, 3, Wintab, -, 206

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrDeviceConfig, 3, Wintab, -, 140

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTEnable, 2, Wintab, -, 40

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrExt, 4, Wintab, -, 180

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTExtGet, 3, Wintab, -, 63

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTExtSet, 4, Wintab, -, 64

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE PktFaceProc, 3, Wintab, -, 501

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTGet, 4, Wintab, -, 61

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTInfo, 4, Wintab, -, 20

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrClose, 1, Wintab, -, 101

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrOpen, 2, Wintab, -, 100

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTOpen, 4, Wintab, -, 21

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTOverlap, 2, Wintab, -, 41

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTPacket, 4, Wintab, -, 24

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrPacketHookDefProc, 6, Wintab, -, 161

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrPacketHookNext, 5, Wintab, -, 205

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrPacketHookEx, 6, Wintab, -, 203

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrPacketHook, 5, Wintab, -, 160

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTPacketsGet, 4, Wintab, -, 23

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTPacketsPeek, 4, Wintab, -, 80

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrPacketUnhook, 1, Wintab, -, 204

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrCsrPressureBtnMarks, 6, Wintab, -, 183

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrCsrPressureBtnMarksEx, 6, Wintab, -, 201

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTMgrCsrPressureResponse, 6, Wintab, -, 184

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTQueuePackets, 1, Wintab, -, 83

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTQueuePacketsEx, 5, Wintab, -, 200

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTQueueSizeGet, 1, Wintab, -, 84

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTQueueSizeSet, 2, Wintab, -, 85

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTRestore, 3, Wintab, -, 66

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTSave, 3, Wintab, -, 65

View File

@ -0,0 +1,3 @@
include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTSet, 4, Wintab, -, 62

View File

@ -0,0 +1,3 @@
include xlibmod.inc
include Wintab.inc
MODULE_TEMPLATE Wintab, , <>

View File

@ -0,0 +1 @@
UNLINK=1

View File

@ -0,0 +1,18 @@
PROCD_STRUC struc
pdPtr dd ?
if UNLINK
pdNext dw ?
endif
PROCD_STRUC ends
PROCC_STRUC struc
pcData dw ?
if UNLINK
pcLinkProc dw ?
endif
pcRetF db 3 dup(?)
pcStr db ?
PROCC_STRUC ends


View File

@ -0,0 +1,181 @@
MODULE_TEMPLATE MACRO mod, style, mod_list
include cmacros.inc
include xlib.inc
fNOLOADLIBRARY = 0
IFNB <style>
IRP astyle,<style>
IFIDN <astyle>,<NOLOADLIBRARY>
fNOLOADLIBRARY = 1
ENDIF
ENDM
ENDIF
externFP GetProcAddress
IFE fNOLOADLIBRARY
externFP LoadLibrary
externFP SetErrorMode
IF UNLINK
externFP FreeLibrary
ENDIF
ELSE
externFP GetModuleHandle
ENDIF
sBegin Data
globalW __h&mod, 0
staticW procptr, 0
sEnd Data
sBegin Code
assumes cs,Code
assumes ds,Data
IF fNOLOADLIBRARY
IFNB <mod_list>
__&mod&string label byte
IRP amod, <mod_list>
db "&amod&",0
ENDM
db 0
ELSE
__&mod&string db "&mod&",0
ENDIF
ELSE
__&mod&string db "&mod&",0
__&mod&file db "&mod&.dll",0
ENDIF
__&mod&dynlink proc far
public __&mod&dynlink
IF UNLINK
mov ax, procptr
ENDIF
mov procptr, bx
IF UNLINK
mov bx, cs:[bx].pcData
mov [bx].pdNext, ax
ENDIF
cmp __h&mod, 0
jne get_proc
farPtr mstr,cs,bx
IF fNOLOADLIBRARY
lea bx, __&mod&string
mod_loop:
save <bx, si, di, es>
cCall GetModuleHandle,<mstr>
or ax, ax
jz no_link
ELSE
mov ax,08000h ;SEM_NOOPENFILEERRORBOX 0x8000
save <si, di, es>
cCall SetErrorMode,<ax>
mov dx, ax ; old error flags to DX
lea bx, __&mod&file
save <dx, si, di, es>
cCall LoadLibrary,<mstr>
xchg dx, ax ; old error flags to AX, LoadLibrary ret to DX
save <dx, si, di, es>
cCall SetErrorMode,<ax>
cmp dx, 32
jb no_link
ENDIF
mov __h&mod, ax
get_proc:
push bx ;; save ptr into module name list
push es
push cs
pop es
mov bx, procptr
farPtr pstr,es,bx
lea bx, cs:[bx].pcStr
cmp byte ptr cs:[bx], 0
jnz @f
les bx, cs:[bx+1]
@@:
mov ax, __h&mod
save <si, di>
cCall GetProcAddress,<ax,pstr>
push ax
or ax,dx
pop ax
pop es
pop bx ;; restore module name list ptr
jz no_link
mov bx, procptr
mov bx, cs:[bx].pcData
lea bx, [bx].pdPtr
mov [bx], ax
mov [bx+2], dx
jmp dword ptr [bx]
no_link:
IF fNOLOADLIBRARY
IFNB <mod_list>
@@:
cmp byte ptr cs:[bx], 0
jz @f
inc bx
jmp short @b
@@:
inc bx
cmp byte ptr cs:[bx], 0
jz @f
jmp mod_loop
@@:
ENDIF
ENDIF
xor ax, ax
xor dx, dx
mov bx, procptr
lea bx, cs:[bx].pcRetF
jmp bx
__&mod&dynlink endp
IF UNLINK
__Unlink&mod proc far
public __Unlink&mod
mov bx, __h&mod
cmp bx, 0
jz unlink_done
mov __h&mod, 0
IFE fNOLOADLIBRARY
cCall FreeLibrary,<bx>
ENDIF
unlink_procs:
mov bx, procptr
@@:
cmp bx, 0
jz unlink_done
mov ax, cs:[bx].pcLinkProc
mov bx, cs:[bx].pcData
mov word ptr [bx].pdPtr, ax
mov ax, cs
mov word ptr [bx].pdPtr+2, ax
mov bx, [bx].pdNext
jmp @b
unlink_done:
mov procptr, 0
ret
__Unlink&mod endp
ENDIF
sEnd Code
end
ENDM


View File

@ -0,0 +1,77 @@
PROC_TEMPLATE MACRO procname, retpop, mod, internal, ord
.errb <retpop> ;; require non-blank
include cmacros.inc
include xlib.inc
externFP __&mod&dynlink
sBegin Data
Data&procname PROCD_STRUC <LinkProc&procname>
sEnd Data
sBegin Code
assumes cs,Code
assumes ds,Data
;; the data structure
Ptr&procname label word
.errnz pcData-($-Ptr&procname)
dw DataOFFSET Data&procname
IF UNLINK
.errnz pcLinkProc-($-Ptr&procname)
dw CodeOFFSET LinkProc&procname
ENDIF
.errnz pcRetF-($-Ptr&procname)
bogus proc far
IF retpop
retf retpop*2
ELSE
retf
dw 0
ENDIF
bogus endp
.errnz pcStr-($-Ptr&procname)
IFNB <ord>
db 0
dw ord, 0
ELSE
db "&procname&",0
ENDIF
;; the dynlinking stub proc
LinkProc&procname proc far
lea bx, Ptr&procname
jmp __&mod&dynlink
LinkProc&procname endp
;; the glue routine
IFNB <internal>
IFDIF <internal>,<->
internal proc far
public internal
jmp Data&procname.pdPtr
internal endp
ELSE
procname proc far
public procname
jmp Data&procname.pdPtr
procname endp
ENDIF
ELSE
procname proc far
public procname
jmp Data&procname.pdPtr
procname endp
ENDIF
sEnd Code
end
ENDM