Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

IVTUTIL: investigating Apogee's Bio Menace BUG - part 2/2 (Users)

posted by Arjay(R), 15.12.2009, 11:25
(edited by Arjay on 15.12.2009, 11:45)

> First of all, there are newer UnRAR tools for DOS (compiled by rr,
> no less!), but they require 386+.
That's ok I tend to use 386+'s myself... :) Thank you for the compile/link!

> Anyways, back on topic, here's what I quickly wrote up (using QBix's
> BIO.COM) with some guidance by Eric Auer:
> If you want to run under old versions of DOSBox (before 0.70),
> FreeDOS, DR-DOS, etc. you'll need to use this .BAT to create BIO.COM
> and run that .COM before every game session. (MS-DOS doesn't need it.

Thank you for sharing this additional info / QBIX's source so that others can also see it. To aid anyone who might be reading this who is starting out in assembler I have commented QBIX's source with links to more info; as well as also highlighting the minor BUG that this short program also contains:

a cs:100         ;  note as we are a .COM file, so CS=DS=ES=SS
mov    dx,0125   ;  Set DX pointing @ "BIOMENACE Patch for DOSBox" string
mov    ax,0900   ;  Print string via DOS function 09h
int    21        ;  Call DOS to print $ terminated string
mov    ax,006F   ;  Following code is to set Ints 01h to 04h to 006F:0014
mov    ds,ax     ;  Set our new Interrupt segment = 006F
mov    dx,0014   ;  Set our new Interrupt offset  = 0014
mov    ax,2501   ;  2501=Set Interrupt [DS:DX = address of new interrupt handler]
int    21        ;  Call DOS to set Int 01h to 006F:0014
inc    al        ;  al = 2
int    21        ;  Call DOS to set Int 02h to 006F:0014
inc    al        ;  al = 3
int    21        ;  Call DOS to set Int 03h to 006F:0014
int    21        ;  *** BUG!!!!  This Int 21h call is NOT needed! ***
inc    al        ;  al = 4
int    21        ;  Call DOS to set Int 04h to 006F:0014
int    20        ;  Terminate Program via Int 20h

;  ds:0125
db "BIOMENACE Patch for DOSBox 0.61-0.65 loaded!",0a,0d
db "Don't use it with other games!$"

> "3D Realms' BioMenace crashes when firing on an enemy"

> P.S. Kudos to Jim Norwood for his excellent work!
Totally agree! For people unfamiliar with his other great games, please see the rap sheet for Jim Norwood over on the excellent

Note: 006F:0014 is a direct link into the DOS kernel. I'm not sure what is there on DOSBox (as I don't use it) however I would not recommend using this patch outside of DOSBox as it makes direct assumptions with regards to the layout of the DOS kernel (always a bad idea). However this patch was specifically written for DOSBox and NOT other DOS variants, so the programmer (QBIX) can be forgiven!

> I should've mentioned that, but I didn't think you were interested. :-D
Ah but I was ! :)

Note: I now have some ideas how to incorporate safer interrupt patching and restoration for situations like this with regards to some other IVTUTIL related tools that already exist and others that I have planned to aid those involved with software preservation/OS/DOS development/general curiosity.


Complete thread:

Back to the forum
Board view  Mix view
15297 Postings in 1378 Threads, 254 registered users, 14 users online (0 registered, 14 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum