AE:ONK/EXE: Difference between revisions

m
link fix
m (++cat)
m (link fix)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{fmbox
  | 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 by Iritscen in brackets which are newer than the rest of geyser's narration, which was written in 2007-2008.
  }}
Minimal changelog of the EXE so far (English a.k.a. "standard" version, 1527808 bytes)
Minimal changelog of the EXE so far (English a.k.a. "standard" version, 1527808 bytes)


Line 9: Line 13:
: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 ^^


{{Divhide|Clarification|show=yes}}
The canonical 1,527,808-byte EXE which comes from the U.S. English version of Oni did not perform a CD check; it was later distributed on the Internet as a "cracked" version that supposedly had had the CD check removed, when in reality the CD check had been added to some later EXEs like the one in geyser's TakeAdvantage copy of the game.
{{Divhide|end}}
==Ian's patch==
==Ian's patch==
{{Divhide|Full story on the patch|show=yes}}
This was Ian Patterson's fix for the "WinXP bug", so named because a [[Troubleshooting/Blam#Blam at startup|Blam at startup]] showed up around the time of Windows XP. XP was not the cause of the problem, but rather the issue occurred because Oni at startup asks the graphics card for a list of available OpenGL extensions.


===0xBDA0===
When Oni was made, the dump of OpenGL extensions was fairly short, and Bungie West did not allow space in memory for a much larger dump. As extensions were [https://wikis.khronos.org/opengl/History_of_OpenGL progressively added to OpenGL], graphics cards started overflowing Oni's buffer around the time of XP, but this was a result of changes in OpenGL, and the manifestation of the bug was dependent on the graphics card and driver in use. The so-called "WinXP fix" [https://web.archive.org/web/20060417164153/http://oni.bungie.org/help/winxp.html was distributed by Bungie.org] in the form of a patched 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 each patch 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.
{{Divhide|end}}
===0xBDA8-0xBDBE===
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 23-byte patch replaces five instructions which perform the 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 47: Line 61:
===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 54: Line 69:


===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 79: Line 97:


----
----
==Dev Mode==
==Dev Mode==
*First try was just to use the "killmequick" slot to call up the dev mode.
*First try was just to use the "killmequick" slot to call up the dev mode.
Line 86: Line 105:
: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 295: Line 315:
==mousebutton3==
==mousebutton3==
This was mistakenly bound to SHIFT
This was mistakenly bound to SHIFT
===0x3316===
===0x3316===
;OLD
;OLD
Line 322: Line 343:
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 329: Line 351:
==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
Line 338: Line 361:
;NEW:20 03
;NEW:20 03


[[Category:All AE mods]][[Category:Obsolete AE mods]]
[[Category:Obsolete AE mods]][[Category:Patches]]