diff options
| author | Javier <dev.git@javispedro.com> | 2026-11-29 18:01:42 +0100 |
|---|---|---|
| committer | Javier <dev.git@javispedro.com> | 2026-11-29 18:01:42 +0100 |
| commit | 8e9df5624d56a91eaa71a1ceac4932b7c5c5ee48 (patch) | |
| tree | 706626bebee8e67ddc3d500dd36c99ff1220140f | |
| parent | 25777cb272ed89e2dc7e4f7680540407417bb2bb (diff) | |
| download | vbados-8e9df5624d56a91eaa71a1ceac4932b7c5c5ee48.tar.gz vbados-8e9df5624d56a91eaa71a1ceac4932b7c5c5ee48.zip | |
w16mouse: wmake vbmouse2.drv now builds the windows2.x version
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | dosstub.asm | 11 | ||||
| -rw-r--r-- | makefile | 7 | ||||
| -rw-r--r-- | mousew2.lnk | 19 |
4 files changed, 36 insertions, 2 deletions
@@ -3,6 +3,7 @@ vbados.zip vbmouse.exe vbmouse.drv vbsf.exe +dosstub.exe *.o *.obj *.map diff --git a/dosstub.asm b/dosstub.asm new file mode 100644 index 0000000..fd5c164 --- /dev/null +++ b/dosstub.asm @@ -0,0 +1,11 @@ +.8086 +.model small +.code +PUBLIC main +main: +; This just builds a stub MZ exec that is exactly 1K long, see mousew2.lnk for details +mov ax,0x4c01 +int 0x21 ; just end with error code +db 400h-40h-5h dup(0) ; 1K - sizeof full MZ header - size of above code +.stack +END main @@ -72,8 +72,11 @@ mousew16.obj: mousew16.c .AUTODEPEND # Windows 2.x version # TODO 2.x setup.exe expects an exactly 400byte long stub (option stub=...) -vbmouse2.drv: mousew16.lnk $(mousew16_objs) - *wlink @$[@ name $@ file { $(mousew16_objs) } option version=2.0 option alignment=16 +vbmouse2.drv: mousew16.lnk mousew2.lnk dosstub.exe $(mousew16_objs) + *wlink @mousew16.lnk @mousew2.lnk name $@ file { $(mousew16_objs) } + +dosstub.exe: dosstub.asm .AUTODEPEND + *wcl -fo=$^@ $[@ -\"option fullheader\" # DOS shared folders vbsf.exe: vbsf.lnk $(sfdos_objs) kittenc.exe diff --git a/mousew2.lnk b/mousew2.lnk new file mode 100644 index 0000000..c0bc8b6 --- /dev/null +++ b/mousew2.lnk @@ -0,0 +1,19 @@ +# Additional link options for vbmouse2.drv, the version for Windows 2.x + +option map=mousew2.map +option description 'VBMouse int33 absolute mouse driver for 2.x' + +# Sadly the 3.x/95 NE loader requires an min Windows version >=3.0, +# while the 1.x/2.x loader requires a min Windows version <=2.0 +# so even though the code is the same, no idea how to provide +# a single exec that satisfies both OSes. + +# Set min windows version required to 1.0 +option version=1.0 + +# The 1.x/2.x loader in SETUP.EXE is also way more picky than the regular one +# Fortunately, we have the source for SETUP.EXE, so we know what it needs: +# Paragraph alignment, and for the NE header to start at exactly 0x400, +# which means we need a custom stub exe that is exactly 1K long. +option alignment=16 +option stub=dosstub.exe |
