Repository navigation
iw5: add MP console overlay (TU24) - #245
Open
elliot1377 wants to merge 2 commits into
Open
elliot1377 wants to merge 2 commits into
elliot1377 wants to merge 2 commits into
Conversation
michaeloliverx
force-pushed
the
iw5-console
branch
from
October 7, 2026 06:14
36e32aa to
afcca61
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IW5 MP (TU24): console overlay
Retail MW3 has the interactive console compiled out, so the IW4 MP TU6 approach (calling
Con_ToggleConsoleetc.) can't be ported:toggleconsolestring/command, no console colour dvars, no dvar-protection messagesmonkeytoyis registered but never read; the console input field is initialised but never usedcls.consoleMaterialis loaded but never drawnThis adds a small overlay module instead (
src/game/iw5/mp/console.cpp):XInputGetKeystroke(0, XINPUT_FLAG_KEYBOARD, ...), same as the IW3/IW4/T4 consoles`/~toggles, Enter runs the line throughCbuf_AddText, Backspace, Esc closes, PgUp/PgDn scrollCL_ConsolePrintinto a ring buffer, drawn withUI_DrawText+sharedUiInfo->assets.consoleFontNew TU24 symbols
Cbuf_AddText(int localClientNum, const char *text)0x82287F68p0-p3prefix parsevoid (LocalClientNum_t)0x822F82E80x8217CB60in-game,0x8217CF90menu); callsUI_DrawBuildNumber(0x822ECA88) only when disconnected with a menu open, which is why that hook can't be used in-gameHow they were found: located in a TU0 IDB, then translated to TU24 against a memory dump of the running TU24 image using masked PPC signatures (branch targets and data-address immediates masked, unique matches only). Validated on existing CoD Xe TU24 symbols: 9/12 map exactly onto TU0 function starts (the 3 misses are functions CoD Xe detours). The UI refresh address is also confirmed by its call to the known
UI_DrawBuildNumberat the same position as in TU0.Other changes
patches.cpp: removed the debug-onlyCL_ConsolePrintdetour; the Console module owns it now and keeps the sameDbgPrintin debug builds (avoids two detours on one function).codxe.vcxproj: addedconsole.cpp.Not tested
I don't have the Xbox 360 SDK, so this hasn't been compiled or run. If you can make a test build I'm happy to test it in Xenia on TU24 (keyboard passthrough,
keyboard_mode = 2).