AE:ONK/EXE: Difference between revisions

added more info on the IanPatt patch and wrote new fmbox note
m (+cat)
(added more info on the IanPatt patch and wrote new fmbox note)
Line 1: Line 1:
{{fmbox
{{fmbox
   | text = This information has been marked "obsolete" because it is no longer being added to, and because these features have been added to the [[Daodan DLL]].
   | text = This page is preserved for historical reasons; development stopped long ago. ONK was a successor to [[AE:BIP|BIP]]. Patches below have generally been added to or superseded by the [[Daodan DLL]]. A couple editor's notes have been inserted in brackets which are newer than the rest of the narration, which was written in 2007-2008.
   }}
   }}


Line 12: Line 12:
Possibly it is what Ian refers to as a "prepatched" version
Possibly it is what Ian refers to as a "prepatched" version
:I have no idea what original EXE it was obtained from, and what modifications that involved ^^
:I have no idea what original EXE it was obtained from, and what modifications that involved ^^
''[The canonical 1527808-byte EXE which comes from the U.S. English version of Oni did not perform a CD check, so it was later distributed as a "hacked" version with the CD check "removed", when really the CD check had been added to some later versions like geyser's TakeAdvantage copy. -Iritscen]''


==Ian's patch==
==Ian's patch==
''[This was Ian Patterson's fix for the so-called "WinXP bug", so named because it showed up around the time of Windows XP, though the actual manifestation of the bug was dependent on the graphics card and driver in use. His fix was distributed as a patched "IanPatt" version of Oni.exe. Ian was rather zealous in trying to eliminate possible buffer overflows such as the one which was causing the crash: the patches after the first two below are unnecessary and additionally disable any writing to debugger.txt, startup.txt, and the dev console. I have filled in more information below about those patches to serve as documentation of Ian's work, so keep in mind that geyser's narration on other parts of the page does not take this newer information into account. -Iritscen]''


===0xBDA0===
===0xBDA0===
Disabling the OpenGL extensions list in startup.txt.
Disabling the OpenGL extensions list in startup.txt.
This part replaces the function call UUrStartupMessage("OpenGL extensions = %s", extensions); with noops (0x90).
 
This part replaces Oni's function call <code>UUrStartupMessage("OpenGL extensions = %s", extensions);</code> with noops (0x90), preventing a long list of GL extensions returned by the graphics card from overflowing the fixed-size buffer in UUrStartupMessage().
;OLD
;OLD
{|cellspacing=0
{|cellspacing=0
Line 51: Line 55:
===0xBDD8===
===0xBDD8===
Disabling the OpenGL extensions list in startup.txt.
Disabling the OpenGL extensions list in startup.txt.
This bit fixes up the stack pointer.
This bit fixes up the stack pointer.
;OLD
;OLD
Line 58: Line 63:


===0x247F0===
===0x247F0===
Disables a function by replacing the first byte with a retn opcode (0xC3).
Disables UUrDebuggerMessage() by replacing the first byte with a retn opcode (0xC3). Prevents all messages from being written to debugger.txt. The function uses a 2048-byte buffer which could be overwhelmed by a large message and cause a crash.
;OLD
;OLD
:0x8B
:0x8B
;NEW
;NEW
:0xC3
:0xC3
===0x24860===
===0x24860===
Disables UUrStartupMessage by replacing the first byte with a retn opcode (0xC3). This effectively creates a blank function so startup.txt never gets created.
Disables UUrStartupMessage(). Prevents all messages from being written to startup.txt. The function uses a 8192-byte fixed-size buffer, which is only likely to be overwhelmed by the GL extension list.
;OLD
;OLD
:0x8B
:0x8B
;NEW
;NEW
:0xC3
:0xC3
===0x31C40===
===0x31C40===
Disables another function. (console output?)
Disables COrConsole_Printf(). This disables on-screen developer console output. Function uses a 2048-byte buffer.
;OLD
;OLD
:0x8B
:0x8B
;NEW
;NEW
:0xC3
:0xC3
===0x7A0D0===
===0x7A0D0===
Disables another function.
Disables SLrScript_DisplayError(), which receives errors issued by BSL commands and which prints these messages to the on-screen dev console. Function uses a 2048-byte buffer.
;OLD
;OLD
:0x8B
:0x8B
Line 90: Line 98:
:Not sure which is which: looks like I eventually reverted all 4 (since I don't get a Blam at startup).
:Not sure which is which: looks like I eventually reverted all 4 (since I don't get a Blam at startup).
Anyway, eventually I gave up on "minor" patching, and did the thing below...
Anyway, eventually I gave up on "minor" patching, and did the thing below...
===0x1533F0===
===0x1533F0===
Massively reordered cheatcode table
Massively reordered cheatcode table
Line 299: Line 308:
==mousebutton3==
==mousebutton3==
This was mistakenly bound to SHIFT
This was mistakenly bound to SHIFT
===0x3316===
===0x3316===
;OLD
;OLD
Line 326: Line 336:
Eventually I got fed up with typing the cheat every time I reloaded Oni (because of '''level0_Final''' hacking).
Eventually I got fed up with typing the cheat every time I reloaded Oni (because of '''level0_Final''' hacking).
:So I changed the Dev Mode cheat to "x" (the only letter that's not used by any of Oni's cheats)
:So I changed the Dev Mode cheat to "x" (the only letter that's not used by any of Oni's cheats)
===0x1537AC===
===0x1537AC===
just overwriting the "th" of thedayismine with an "x" and null char
just overwriting the "th" of thedayismine with an "x" and null char
Line 333: Line 344:
==1280x800x32bit==
==1280x800x32bit==
Any other resolution would work the same way.
Any other resolution would work the same way.
===0x8477===
===0x8477===
x resolution of 800x600x32bit mode
x resolution of 800x600x32bit mode