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), 14.12.2009, 17:06
(edited by Arjay on 14.12.2009, 18:32)

Conclusions
-----------
Well firstly thank you for the authors of these patches in helping people run Bio Menance on modern hardware. "Technically" although not to my own liking, all of these patches do provide a way of allow BioMenance to run. However my advice to anyone looking to use them is to use them only if you are using a single session DOSVM just to run Bio Menance, in otherwords if you are using these patches outside of DOSBOX and particularly if you are using them to run other programs after using them please be aware of their watchouts!

So what are the alternatives to the existing patches?
-----------------------------------------------------
Well in theory we should be able to use IVTUTIL undocumented interrupt patching feature. (Note: it is undocumented from the command-line to help force people to read IVTUTIL's text file before attempting to using it).

Well firstly we can use IVTUTIL to save what the "current" value of Int 01h is using this command (best to do this using a standard configuration):

C:\BIOMEN>ivtutil mem current.txt

IVTUTIL v1.00 - utility for processing/converting Interrupt Vector Table files
                Source and util released as PUBLIC DOMAIN by Richard L. James

INPUT  filename:   MEMORY.MEM
OUTPUT filename:  CURRENT.TXT
Conversion Type: MEM2TXT

C:\BIOMEN>


and then we can copy out the value of Int 01h into a IVTUTIL patch file, e.g:

[Patches2VectorTable]
Int01=0070:018B


We should then in theory just be able to write another IVTUTIL patch file which say sets the interrupt vector to 0000:0000 which although not ideal, should be ok:


[Patches2VectorTable]
Int01=0000:0000


and then simply running IVTUIL as follows:
C:\BIOMEN>ivtutil biopatch.ivt mem

However...THIS WILL CURRENTLY NOT WORK! - there is a slight problem here in, as for safety I designed IVTUTIL so that the patching feature could NOT be used to set interrupts to null pointers!! I can now see that this might be useful at times.... so the next version of IVTUTIL will support this by removing that safety feature which prevents this from working today. Saying this it is still possible to use IVTUTIL to provide a patch if you know of a good non-null pointer value in Segment 0000h e.g. preferably a IRET (C3h) return to which to set Int 01h (for safety!). That said the value below will also work (but again I don't like this):


[Patches2VectorTable]
Int01=0000:FFFF


Thus you could then do:
C:\test\BIOMEN>ivtutil biopatch.ivt mem

IVTUTIL v1.00 - utility for processing/converting Interrupt Vector Table files
                Source and util released as PUBLIC DOMAIN by Richard L. James

INPUT  filename: BIOPATCH.IVT
OUTPUT filename:   MEMORY.MEM
Conversion Type: IVT2MEM
*** Use this undocumented function with extreme care!!!! ***
INI SECTION: [PATCHES2VECTORTABLE]
PATCHing current Interrupt $01 from 0070:018B to 0000:FFFF
*** Use this undocumented function with extreme care!!!! ***

C:\BIOMEN>(run Bio Menance)
C:\BIOMEN>ivtutil orgint1.ivt mem

IVTUTIL v1.00 - utility for processing/converting Interrupt Vector Table files
                Source and util released as PUBLIC DOMAIN by Richard L. James

INPUT  filename:  ORGINT1.IVT
OUTPUT filename:   MEMORY.MEM
Conversion Type: IVT2MEM
*** Use this undocumented function with extreme care!!!! ***
INI SECTION: [PATCHES2VECTORTABLE]
PATCHing current Interrupt $01 from 0000:FFFF to 0070:018B
*** Use this undocumented function with extreme care!!!! ***

C:\BIOMEN>


which will work... but I still don't like this. Thus I plan to find some time over Christmas to write a more portable safer patch for Bio Menance to take into consideration all DOS versions. I also am going to have a think about how I could improve the interrupt patching functionality in IVTUTIL.

 

Complete thread:

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