ld_tr.com

ld_tr.com


Replies | Reply | Tomb Raider Level Editor & Utility Discussion Forum

Posted by odjo on June 04, 2000 at 14:07:06:

In reply to: Re: Announcement ( or Soliloquy? ): began considering TR_Recorder/TR_Replayer posted by Turbo Pascal on June 03, 2000 at 11:34:45:


> Hey, are you making some kind of TSR?


Hi, Turbo Pascal, thank you for commenting.


My idea was: Patch tomb.exe and embed int xx code in its 32 bit code segment.
Int xx handler in protected mode records some register value
in game loop and when buffer is full, flushes the buffer via
"Call Real Mode Procedure With Far Return Frame" DPMI API.


But DPMI 0.9 seems not to support protected mode TSR.
So my prototypical program ld_tr.com now loads tomb.exe as a child process.


ld_tr.com real mode code ( 16 bit segment )
check DPMI then call DPMI protected mode entrance


loader subroutine loads/executes tomb.exe
gamelog handling subroutines


gamelog buffer ( accessible both from real/protected modes )




ld_tr.com protected mode code ( 16 bit segment )
set up protected mode
set up int 80/81 interrupt handlers
mov al, 00h ; begin gamelog ( create gamelog )
int 81h
call load_tr ; load_tr calls real mode loader through DPMI host


childprocess tomb.exe executes int 80h in gameloop
quit tombraider


mov al,0ffh ; stop gamelog ( flush buf, close gamelog )
int 81h
some aftercare and exit to real mode dos




int 80 handler ( 32 bit segment ) - records game data in buffer
( should be in 32 bit seg if you want extended register value preserved )
int 81 handler ( this may be unnecessary ) - create/close game log, flush buffer






It treats tomb.exe/dos4gw.exe as black boxes. Few bytes overwritten by patched int xx can be
compensated within int xx handler.
If this tiny program runs successfull, it may be usefull for other monitoring purposes :).


> Also i have info on how to call 16bit code from a
> Win 32bit code; this is usefull when you make a
> Win95 program and want to call BIOS or DOS function or
> any INT call to 16bit code function. So if you need it Emailme.


Thank you! Though I never wrote in C or in Pascal other than that salute to the world
nor wrote Win programs, it'll help me. I'll send you the source if all goes well.




odjo




Replies:



Reply

Name:

Email:

Subject:

Message:

Optional
Link URL:

Link Title:

Image URL:


Replies | Reply | Tomb Raider Level Editor & Utility Discussion Forum