Developer Mode: Difference between revisions

correcting info on original Mac build's cheat tables, based on actual hex-editing and tests in OS 9
(continuing the rewrite for Intel Macs)
(correcting info on original Mac build's cheat tables, based on actual hex-editing and tests in OS 9)
Line 4: Line 4:
|http://geyser.oni2.net/Developer_Mode/TheDayIsMine0.png
|http://geyser.oni2.net/Developer_Mode/TheDayIsMine0.png
|}
|}
<div class="toclimit-3">__TOC__</div>
Developer Mode is a bundle of features created by [[Bungie West]] to help them develop Oni -- a console, camera controls, and various debugging features -- that was associated with the cheat code '''thedayismine''' (see picture, right). This cheat code did not work upon Oni's release, and it was long believed that Developer Mode had been cut from retail versions of Oni; it had only been observed to work in the [[Mac beta]] that was leaked around the time of Oni's beta testing. However, this mode is actually present in ''all'' available versions of Oni (except PS2). It just needs to be unlocked, as the community learned [[History_of_Oni_modding/The_tale_of_Dev_Mode|back in 2006]].
Developer Mode is a bundle of features created by [[Bungie West]] to help them develop Oni -- a console, camera controls, and various debugging features -- that was associated with the cheat code '''thedayismine''' (see picture, right). This cheat code did not work upon Oni's release, and it was long believed that Developer Mode had been cut from retail versions of Oni; it had only been observed to work in the [[Mac beta]] that was leaked around the time of Oni's beta testing. However, this mode is actually present in ''all'' available versions of Oni (except PS2). It just needs to be unlocked, as the community learned [[History_of_Oni_modding/The_tale_of_Dev_Mode|back in 2006]].


Line 14: Line 15:
{{Divhide|...or do it yourself}}
{{Divhide|...or do it yourself}}
===...or do it yourself===
===...or do it yourself===
You may want to read this if your version of Oni is not covered by the above DLL (e.g. if you have an odd language version).
You may want to read this if your Windows version of Oni is not covered by the above DLL (e.g. if you have an odd language version) or if your Mac is not running the Intel build.


First, get a good hex editor. Ideally, it should allow you to search for sequences containing joker characters (that is, wildcards or bit masks). One such editor for PC is [http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm XVI32]. On Macs, [http://www.ufsexplorer.com/cihex.php CI Hex Viewer] is free, powerful, and can perform the search you need, but [http://ridiculousfish.com/hexfiend/ Hex Fiend] has a better comparison function so you can check your work afterward (open original and edited binaries and choose File>Compare "Oni" and "Oni").
First, get a good hex editor. Ideally, it should allow you to search for sequences containing joker characters (that is, wildcards or bit masks). One such editor for PC is [http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm XVI32]. On Macs, [http://www.ufsexplorer.com/cihex.php CI Hex Viewer] is free, powerful, and can perform the search you need, but [http://ridiculousfish.com/hexfiend/ Hex Fiend] has a better comparison function so you can check your work afterward (open original and edited binaries and choose File>Compare "Oni" and "Oni").
Line 36: Line 37:
|0x03
|0x03
|-
|-
|fatloot
|''fatloot''
|0x04
|0x04
|-
|-
Line 42: Line 43:
|0x05
|0x05
|-
|-
|winlevel
|''winlevel''
|0x06
|0x06
|-
|-
|loselevel
|''loselevel''
|0x07
|0x07
|-
|-
Line 81: Line 82:
|0x11
|0x11
|-
|-
|munitionfrenzy
|''munitionfrenzy''
|0x12
|0x12
|-
|-
Line 109: Line 110:
There is an row for every cheat, and they appear by order of increasing ID. In most Oni builds, the developer mode cheat (ID 0x0B) is simply skipped over; '''reservoirdogs''' (0x0C) comes right after '''superammo''' (0x0A).
There is an row for every cheat, and they appear by order of increasing ID. In most Oni builds, the developer mode cheat (ID 0x0B) is simply skipped over; '''reservoirdogs''' (0x0C) comes right after '''superammo''' (0x0A).
;Data size on different platforms
;Data size on different platforms
:In the PC, PC demo and Mac OS X (PPC) builds, every row of the lookup table takes up 16 bytes; the 3 pointers and the ID are 4-byte data words (Little Endian on PC, Big Endian on PPC Macs); if a cheat has no "disabled" message, the row's third pointer is null
:In the PC, PC demo and Mac OS X (PPC) builds, every row of the lookup table takes up 16 bytes; the 3 pointers and the ID are 4-byte data words (Little Endian on PC, Big Endian on PPC Macs); if a cheat has no "disabled" message, the row's third pointer is null.
:In the Mac OS 9 retail and demo, every row of the lookup table takes up 12 bytes; the 3 pointers and the ID are 3-byte data words (Big Endian); if a cheat has no disabled message, the last byte of the third element is taken up by the ID (the remaining 2 bytes are garbage, as well as the ID field)
<!--This does not appear to be true, not sure what version geyser was looking at. The item below this claimed to be for the Mac beta, but it's actually true of the Mac retail app. --Iritscen
:In the Mac OS 9 beta, the pointers and the ID are 2-byte words (Big Endian); regular elements take up 8 bytes; if a cheat has no "disabled" message, weird stuff happens to the third pointer and to the ID, and the element takes up 10 bytes... the ID can be found in what would be the first byte of the ID field.
:In the Mac OS 9 retail and demo, every row of the lookup table takes up 8 bytes; the 3 pointers and the ID are 3-byte data words (Big Endian); if a cheat has no "disabled" message, the last byte of the third element is taken up by the ID (the remaining 2 bytes are garbage, as well as the ID field).-->
:In the Mac OS 9 builds, the pointers and the ID are 2-byte words (Big Endian); regular rows take up 8 bytes; if a cheat has no "disabled" message, weird stuff happens to the third pointer and to the ID, and the row takes up 10 bytes... the ID can be found in what would be the first byte of the ID field instead of the second, and the remaining 3 bytes are garbage. An additional garbage byte is added between consecutive one-way cheats (0x06 and 0x07).


====killmequick====
====Let's kill killmequick====
In the PC, PC demo and Mac OS X (PPC) builds, there's extra space at the end of the lookup table and where the cheat codes/messages are stored, so one can ''add'' '''thedayismine''' as an extra cheat. On Mac OS 9, the data is packed tighter (and the text strings are stored together with their size), so the only easy way is to replace an existing cheat. Since replacing an existing cheat is the only solution that works on all platforms, the following mini-tutorial will explain how to bind the Developer Mode cheat event to the Ultra Mode cheat code, '''killmequick''' (since hardly anyone uses that cheat).
In the PC, PC demo and Mac OS X (PPC) builds, there's extra space at the end of the lookup table and where the cheat codes/messages are stored, so one can add '''thedayismine''' as an extra cheat. On Mac OS 9, the data is packed tighter (and the text strings are stored together with their size), so the only easy way is to replace an existing cheat. Since replacing an existing cheat is the only solution that works on all platforms, the following mini-tutorial will explain how to bind the Developer Mode cheat event to the Ultra Mode cheat code '''killmequick''' (since hardly anyone uses that cheat).


====Finding the lookup table====
====Finding the lookup table====
Open the executable (or the data fork of the executable on Mac), after backing it up of course... We shall look for the last three elements of the table, corresponding to '''fistsoflegend''', '''killmequick''' and '''carousel'''.
Open the executable (or the data fork of the executable in the Mac OS 9 build), after backing it up of course.... We shall look for the last three elements of the table, corresponding to '''fistsoflegend''', '''killmequick''' and '''carousel'''.
;On PC and PC demo : look for '''13 00 00 00 ## ## ## ## ## ## ## ## ## ## ## ## 14 00 00 00 ## ## ## ## ## ## ## ## ## ## ## ## 15 00 00 00'''
;In the PC retail and PC demo builds, look for '''13 00 00 00 ## ## ## ## ## ## ## ## ## ## ## ## 14 00 00 00 ## ## ## ## ## ## ## ## ## ## ## ## 15 00 00 00'''
;On Mac OS X : look for '''00 00 00 13 ## ## ## ## ## ## ## ## ## ## ## ## 00 00 00 14 ## ## ## ## ## ## ## ## ## ## ## ## 00 00 00 15'''
;In the Mac OS X (PPC) build, look for '''00 00 00 13 ## ## ## ## ## ## ## ## ## ## ## ## 00 00 00 14 ## ## ## ## ## ## ## ## ## ## ## ## 00 00 00 15''' ([[:File:Finding killmequick - Omni build.jpg|sample pic]])
;On Mac OS 9 retail/demo : look for '''00 00 13 ## ## ## ## ## ## ## ## ## 00 00 14 ## ## ## ## ## ## ## ## ## 00 00 15'''
;In the Mac OS 9 builds, look for '''00 13 ## ## ## ## ## ## 00 14 ## ## ## ## ## ## 00 15''' ([[:File:Finding killmequick - Mac OS 9 build.jpg|sample pic]])
;
;
where the ## are joker chars. Once you've found that data (make sure it occurs only once in the file), replace the '''14''' with a '''0B'''.
where the ## are joker characters (hex wildcards). Once you've found that data (make sure it occurs only once in the file), replace the '''14''' with a '''0B'''.


Developer mode will now be enabled/disabled every time you type '''killmequick''' at the pause screen : you'll get "Ultra Mode Enabled" and "Ultra Mode Disabled" as confirmation messages.
Developer mode will now be enabled/disabled every time you type '''killmequick''' at the pause screen : you'll get "Ultra Mode Enabled" and "Ultra Mode Disabled" as confirmation messages.