First post, by llm
hi,
im currently working on an call-hijacker (something like detours for 16bit calls) for an game-reverse engineering project
i want to merge 16bit code running inside of the emulator and combine that with normal 32/64bit code from the ouside (to ease traceing, and the step by step porting) - so its would not realy become a mainline patch (that means i can (and will maybe) use dirty tricks)
what i've got so far is (ugly) code that runnes my code when near,relative or far calls are occuring - i can use the stack through the Push/Pop16 (im was missing Read Variants for inspection of the stack-values but that was no problem) --> that gives me a nice call-trace with parameters
but what im realy missing is something like a pointer which gives me direct access to the dos memory - i want to use my C structs with casting them onto the linear dos mem - so that im be able to read,change values
(without using the write/readmem functions - i hope that this will ease the porting an that i can use the resulting ported code without much changes in an dosbox-free pure port)
but i can only find paging-mem-access stuff ... is there a way to go around the paging and get direct access to the memory?
i know that this is a very freaky idea - but the current porting evironment is a wild mixture of tasm32, wlink and bc3.1 ... and extending the real game code very carefully - without the possibility of doing good tests
there are ~850 functions waiting to be ported ... and it is all 16bit - with all the 16bit problems
thx