28 Commits
Author SHA1 Message Date
SatyandClaude Opus 5.5 eabc5d8997 Port the logic fixes from the msvc80 branch
Behaviour fixes found while byte-matching against 12340, without the
VS2005 code-shape rewrites:
- 272502f5 logic bugs (MapObjDef 0x80 flag, D3D texop, PostReenable, ...)
- 3002c17f case-sensitive KNOWNDANCES/DECLINEDWORD keys, DynamicObject
  GetTransportGUID, CShadowCache::Initialize
- OpenGl IStateSyncEnables fill/line, DsSet integer value tests
- FriendList tail padding, HandleSpellEventSound severity, selection
  index -1, negative spell id in HasPetSpell
- operator delete null checks, FMOD MemoryFile seek clamp, SErr
  HeapAlloc flags
- WOWCLIENT_CRASH_LOG option

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-15 15:18:17 +02:00
SatyandClaude Opus 5.5 5c9a9c4aac Tag deleting dtors of IOLockUnit, CWOWClientStatus, SEFileSound, PageTextCache
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-03 18:19:46 +02:00
SatyandClaude Opus 5.5 c790ecb4a0 Port Streaming/Storage/Transport/HTTP, Mopaq write path and missing-function batches
- Streaming: StreamingManager, Manifests, Storage (.part files, write queue),
  Transport (HTTP split download, throttle), Tracker/StartupReport, streaming
  filestack verbs (s_streamstack, StreamingOpen), RepairCache static
- URL: HttpRequest, InternetCallback, ReadResponseData, DownloadURL
- Mopaq write path: SFileCreateArchive/CreateFile/WriteFile, IOMpqWriteUnit,
  WriteArchiveChanges, RebuildHashTable, listfile acquire/release;
  SComp::Compress with RLE/zlib/bzip2/pkware compressors; MPQEncrypt::Encrypt
- LaunchChildProcessWithArguments, Debug::DefaultCallback/Breakpoint
- Earlier batches: ComSat, Battlenet Tumor, Glue/Ui/WowServices fixes,
  luaL_error returns in Script_ files

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-03 16:51:23 +02:00
SatyandClaude Opus 5.5 2fc01591aa Fix bugs found by asmwalk/semdiff, add luaL_error returns, typed template tags
- luaB_getfenv: look up __environment metafield like 12340
- DSPSfxReverb::setParameterInternal: set mUpdate for REFLECTIONSLEVEL and REVERBLEVEL
- CGGameUI::DestroyTotem, Script_SetTotem: test the totem GUID, not unk_0004
- Missing return 0 after luaL_error in script functions
- OFFSET tags of template instances carry their instance type: [0xXXXXXX<Type>]

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-03 10:11:32 +02:00
SatyandClaude Opus 5.5 2e418f9e08 Client bring-up: glue screen, EULA/TOS, shutdown chain, LCD, x64 fixes
- Stand-in client reaches the glue screens (intro movie, EULA/TOS accept,
  login screen) at 16:9; stand-ins are report-only on x64
- Ports on the startup/idle path: GlueScriptEvents/CharacterSelection/
  CharacterCreation/RealmList/AccountMsg/VideoOptions _Scripts, CGlueMgr
  (Initialize/Resume/Idle/Accept*/Shutdown), ClientServices, NetClient/
  WowConnection, DBCache + instances, WorldParam/World/Map/Liquid/Weather/
  shadow, InputControl, Scrn, ConsoleClient, SysMessage, LoadingScreen,
  SystemRegisterFunctions, CGameTime, Screen::GetAspectRatio
- Shutdown chain: BeginCloseGame, DestroyEngineCallback, DBCache save/
  destroy, SpellVisuals/Effect/World/Glue teardown
- Logitech LCD no-device path in Ui/UILCD/Windows (Windows-only dir);
  lgLcd is a stub library in ThirdParty/lgLcd
- CVar and console commands split into <Module>_CVar.cpp / _Console.cpp
- DivxDecoder.dll (Win32, original) and XvidDecoder.dll (x64, port with
  vendored xvidcore) both copied to the build folder
- Warden: Win32 faithful port, Win64 stub
- x64 fixes: lua_newstate gcusage/gctime init, pointer render states reset
  with nullptr, g_rndSeed defined
- 37 class/struct forward-declaration mismatches fixed (false stand-ins)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 21:47:34 +02:00
SatyandClaude Opus 5.5 6ee0c14d69 Verify remaining functions; SI2::ChaosModeUpdate; SE2::StopAllSounds arg
ChaosModeUpdate (0x4C74F0) reordered to the binary's switch case layout
and case 15 written as 8 statements; verified. SE2::StopAllSounds takes
the unused int every 12340 caller pushes. Approval stamps for the
functions unblocked by the IDB splits (Button/Checkbox IsA, Checkbox
dtor, CSimpleFrame::NotifyDelayedLoad, CGxDeviceD3d9Ex ctor,
CM2Cache dtor) and for the re-reviewed IsSequenceLoaded,
OsGuiMessageBox, TexturePickAlternateFilename, three FMOD ctors and
luaG_concaterror.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 15:51:40 +02:00
SatyandClaude Opus 5.5 34770ee7ab Frame: port Engine/Frame (waves 1-4), 1667 of 1669 functions
Core (CSimpleFrame + Lua, CSimpleTop/CFrameStrata/CSimpleRender/
CRenderBatch, CSimpleRegion/CBackdropGenerator/CScriptRegion), animation,
text (FontString/Font/Fontable), texture and model, buttons, EditBox,
MessageFrame/MessageScrollFrame, MovieFrame/ColorSelect/StatusBar,
Slider/ScrollFrame/HTML/HyperlinkedFrame, all Lua method tables and
RegisterScriptMethods. Layouts, vtables and sizes rebuilt from the
12340 ctors, vtables and allocator initializers; CScriptObject vtable
slots 5/6 fixed; CSimpleFontedFrame is a real secondary base. Lua error
paths return after luaL_error as in 12340 (209 sites; 5 fall through).
Binary quirks kept and documented in docs/.

Supporting additions: Event key/char/ime/focus/size event headers,
Scrn/Scrn.h (ScrnLayerCreate), DivxDecoder import declarations,
C2Vector/CRect helpers, CM2Light dtor, OsInputEnableSecureMode, stpl.h
instance addresses, FrameXML LoadXML_AnimGroup/Create_SimpleMovieFrame.
Engine->WoW includes where 12340 calls directly: CSimpleModelFFX,
StringToMouseButton, GetDeclinedWord, EmblemTextureUpdate.

Also drops stale VERIFY stamps found invalid by the harness recheck.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 15:32:18 +02:00
SatyandClaude Opus 5.5 2df85b1eb9 fmodex: define FMOD_DEBUG_DISPLAY_THREAD for the Debug build
fmod_debug.cpp (compiled only with DEBUG) uses the thread-id display
flag; 4.09's fmod.h lacked it. Defined as 0x08000000, the unused bit in
FMOD_DEBUG_DISPLAY_ALL (0x0F000000). Not in 12340 (release lib).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 04:03:46 +02:00
SatyandClaude Opus 5.5 432e950eee SoundEngine: SESoundUserData base destructor and empty Release
The base vtable 0xAABB60 has an empty Release (0x5EEB70), not a pure one;
the destructor maps to its scalar deleting destructor 0x9C1820.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 03:04:04 +02:00
SatyandClaude Opus 5.5 ac2a395656 SoundEngine: cover the two scalar deleting destructors
CacheChunkRecycler::~CacheChunkRecycler (0x877410) and the deleting
destructor of SEChatSound (0x87C480, added to its OFFSET list). SoundEngine
is now 154/154.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 01:09:05 +02:00
SatyandClaude Opus 5.5 4f79f0867f FrameScript: port the FrameScript TU (0x816790-0x81B714)
- FrameScript.cpp/.h: Lua state, execute/compile/load, variables, text,
  sprintf/print/pack, events and CPU usage
- FrameScript_Object.cpp/.h: FrameScript_Object and its methods
- FrameScript_Scripts.cpp: the _G extras (strtrim, securecall, date, ...),
  static, table s_extraFuncs at the end
- Types.h: FRAMESCRIPT_GENDER, PLURAL_RULE (best-guess value names)
- CScriptObject moved from _Triage to Frame; stale FrameScript triage
  headers removed
- Win32: _USE_32BIT_TIME_T like the original build
- MD5Update declared in Storm MD5.h (0x779A30, not ported)

All 87 definitions verified against 12340 (58 pass, 29 reviewed suspects).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 21:48:32 +02:00
SatyandClaude Opus 5.5 341cbae7a4 SoundEngine: fix 4 suspects from binary review (Stop NaN, GetChannelInfo sum order, void SetReverb/SetListenerAttributes)
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 16:04:54 +02:00
SatyandClaude Opus 5.5 c93c433251 SoundEngine: port SoundCache.h (chunk cache, 7 definitions verified)
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 10:31:22 +02:00
SatyandClaude Opus 5.5 509a43e7cb SoundEngine: port 12340 SoundEngine.cpp (SE2), 146 definitions verified
SESoundInternal + file/memory/chat subclasses, SESound handle, wave cache,
channel groups, drivers, capture, Init/InitCapture/ShutDown. SoundCache.h
declared only. Adds CRndSeed::SetSeed, IsNaN, SFile::SetReadFatal,
FMOD_ErrorString OFFSET; SoundEngine becomes a static library. Note re/305.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 10:23:03 +02:00
SatyandClaude Opus 5.5 5f720dfc64 fmodex completion pass; CMake integration; vsnprintf fixes
- OFFSETs/reconstruction from 12340: System::getDriverName,
  setRecordDriver, getRecordDriverName; Sound/SoundI/Codec::readyForRelease
  (new, non-virtual); SoundI::getNumTags; OutputWASAPI::getDriverName;
  OutputWavWriter::getHandleCallback (folded with WASAPI's
  recordGetPositionCallback); LocalCriticalSection::enter; ASIO stopCallback.
- fmodex in the wowdecomp CMake build (Win32 + x64, NASM on Win32,
  WIN32_LEAN_AND_MEAN/NOMINMAX removed for SoundEngine, LoadOAL.cpp);
  x64 portability casts; libFLAC fseeko/ftello -> fseek/ftell on MSVC.
- CGxDevice::Log(va_list), SysMsgPrintf, SysMsgVPrintf: _vsnprintf as in
  12340 (were C99 vsnprintf; hidden by a harness overload-pairing bug).
- VERIFY stamps.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 09:08:31 +02:00
SatyandClaude Opus 5.5 311a1c26fc fmodex: FMOD_Mpeg_Synth_FPU_Float, SIMD calls guarded for x64
- FMOD_Mpeg_Synth_FPU_Float (0x94BB60, name ours): the unreferenced
  float-output sibling in 12340's MPEG synth object, byte-identical.
- DSPDistortion and FMOD_Resampler_Linear: SIMD prototypes and calls
  under #ifdef FMOD_SUPPORT_SIMD like fmod_dsp_convert.cpp, so x64 takes
  the C path; Win32 code unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 08:34:38 +02:00
SatyandClaude Opus 5.5 8fbb164623 fmodex: 12340's hand-written assembly, VST/Winamp hookups, syncpoint signedness
- FMOD's win32/src/*_asm.s (11 SIMD/SSE routines) annotated; byte-identical
  to 12340 with NASM -O0. %include "c32.mac".
- FMOD_Mpeg_Synth_FPU (0x94B920) as win32/src/fmod_codec_mpeg_asm.s,
  byte-identical to 12340; synth calls it on Win32 x86, C synthC elsewhere.
- libFLAC 1.1.4 ia32 nasm (cpu_asm, lpc_asm; fixed_asm unused) added,
  byte-identical to 12340; FLAC__CPU_IA32/HAS_NASM/USE_3DNOW on Win32.
- FMOD_SUPPORT_VSTPLUGIN/WINAMPPLUGIN on for Win32 (createDSP hookups);
  4.30-only SystemI mVSTPluginsListHead/updateVSTPlugins removed
  (SystemI stays 0x8668); DSPVSTPlugin loses the 4.30 idle support.
- ChannelI::updateSyncPoints: signed compares on the forward path.
- VERIFY stamps; CreateDetached and Octree::insertInternal re-stamped
  manual (their auto passes came from harness bugs, now fixed).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 08:30:11 +02:00
SatyandClaude Opus 5.5 2b16bc79ef fmodex: library triage against 12340
- libvorbis mapping0/res0/floor1 back from 1.2.3 to 1.2.0 (plus FMOD's
  NULL checks); vorbis_look_floor1 regains sorted_index[65] (0x520).
- OFFSETs for the 22 mapping0/res0-2/floor1/floor0 functions and
  _ov_open2 (0x46BFF0) that were defined in the IDB from the export
  bundle tables.
- 104 library functions approved as codegen (VERIFY stamps), reasons
  in re/data/fmod_triage_verdicts.tsv.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 07:53:37 +02:00
SatyandClaude Opus 5.5 d4c6021753 fmodex: libraries to the versions 12340 linked
- FMOD 4.30's `void *context` parameter removed from libogg, libvorbis
  and libFLAC; CodecFLAC/CodecOggVorbis lose mMemUsed (0xE0 / 0x4D0).
  Ogg allocations go through FMOD_Memory_Alloc & co (12340 calls
  FMOD_Memory_allocC); FMOD_OggVorbis_*/FMOD_FLAC_* allocators take no
  context and are compiled unconditionally.
- libFLAC 1.2.1 -> 1.1.4 ("reference libFLAC 1.1.4 20070213" in 12340),
  folder renamed flac-1.2.1 -> flac-1.1.4, ogg decoder aspect added
  (FLAC__HAS_OGG=1).
- libogg framing.c -> 1.1.3 plus FMOD's changes.
- libvorbis -> 1.2.0 plus FMOD's changes: vorbisfile, block, info,
  codebook, sharedbook, lsp (FLOAT_LOOKUP), mdct; restored psy/envelope
  cleanup and floor0; OggVorbis_File 0x2C8, vorbis_dsp_state and
  vorbis_block 0x70, private_state 0x80, codec_setup_info 0xDD0.
- VERIFY stamps for the FLAC/Ogg codec functions.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 07:34:21 +02:00
SatyandClaude Opus 5.5 ca58254036 fmodex: CodecMIDI to the 12340 layout (0x2EBC)
Remove mDSPTick, mMillisecondsPlayed, mDLSCache and the post-4.09 DLS
cache (CodecMIDIDLSCache, gDLSCacheHead). openInternal creates the DLS
sound directly, keeps the played milliseconds local, rescales timing by
512/samplespertick, loads included samples without a loaded check and
does not set mDSPMixTarget; closeInternal releases in the binary order.
Offsets from CodecMIDI::openInternal/play/update/readInternal 0x8FC850,
0x8FB270, 0x8FC3B0, 0x8FC430. Remaining MIDI suspects approved as
codegen with VERIFY stamps.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 06:49:26 +02:00
SatyandClaude Opus 5.5 692ebcc4f6 fmodex: verify.py suspect triage against 12340
790 fmodex suspects triaged in three rounds against the 12340 asm and
Hex-Rays; verdicts in re/data/fmod_triage_verdicts.tsv, summary in
re/notes/304_fmod_offsets.md.

- 73 fixes to 12340 behaviour: ASfxDsp (0x500), DSPITEcho (0x140),
  DSPConnectionI (0xF0), CodecMIDIChannel (0x2AC), CodecVAG (0x278),
  CodecASF and OutputTimer layouts; DSPI::execute overload order;
  32-bit SoundI::getBytesFromSamples; 4.30 leftovers removed in MPEG,
  music codecs, outputs, codecs and DSP; ASYNC_STACKSIZE 32 KB.
- 693 codegen-only suspects stamped `// VERIFY: <hash> manual`, plus
  new auto stamps for passes.
- Open: CodecMIDI layout, FLAC/Ogg library context, synthC asm,
  VST/Winamp hookups in createDSP, updateSyncPoints signedness.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 06:41:54 +02:00
SatyandClaude Opus 5.5 5999ac4e1f fmodex: fixes from the first verify.py pass
- File::open/close/cancel/read/seek/tell are F_API (__stdcall) as in 12340.
- ChannelPool::allocateChannel: 4 arguments; skips ALLOCATED, IN_USE,
  ENDDELAY and RESERVED channels (0x8E8A50).
- CodecXM::updateFlags(vcptr, sptr) without a flush after stop (0x903AE0).
- CodecMPEG::synthC is static (__cdecl, 0x94B920).
- MeteredSection: FILEMAPPING build (shared view + interlocked spin lock),
  as the 12340 functions at 0x8E4D60..0x8E50C0.
- CodecASF::closeInternal frees only the PCM buffer (0x8F7D50).
- 724 `// VERIFY: <hash> auto` stamps written by verify.py on the fmodex
  definitions that pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 04:46:12 +02:00
SatyandClaude Opus 5.5 fe133bbc9f fmodex: port core to 4.09 / 12340 behaviour and layout
Port the FMOD Ex core from the 4.30 source to the 4.09.07 behaviour and
layout of 12340, function by function against the binary.

- Plugins, files and DSP: PluginFactory index API, File, DSPNet, the DSP
  units (resampler, wavetable, codec, soundcard, filter), DSPI mix API.
- Sounds: SoundI, Sample/SampleSoftware, Stream, sync points.
- Channels: ChannelReal (37-slot vtable), ChannelSoftware, ChannelStream,
  ChannelEmulated, ChannelRealManual3D, ChannelI (stopEx with 7 bools),
  ChannelGroupI, SoundGroupI, SpeakerLevelsPool.
- System: all 72 SystemI functions of 12340, the System wrappers, and
  the unused 4.09 API on the public signatures.
- Async, memory (LocalMemoryCounter), thread, geometry.
- Outputs: DirectSound, OpenAL, WinMM, WASAPI (timer based), ASIO,
  polled and software; single-device recording.
- Codecs: FSB, MPEG memory block, IT/XM/S3M/MOD/MIDI.
- fmod.hpp: Channel::getFadeVolume (0x8D0F60, used by the client).

fmod_build.sh: 0 errors. Layout: all rows match 12340 except CodecMIDI,
CodecFLAC, CodecOggVorbis and CodecVAG. Not yet run through verify.py.
Notes: re/notes/304_fmod_offsets.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 03:54:45 +02:00
SatyandClaude Opus 5.5 3c1c538197 fmodex: FMOD Ex 4.09.07 public headers
fmod.h, fmod.hpp, fmod_codec.h, fmod_dsp.h, fmod_output.h, fmod_errors.h
from the official 4.08.06 SDK (archived fmodapi40806win32-installer.exe),
plus the 4.09.01-4.09.07 API additions from revision.txt:
FMOD_VERSION 0x00040907, FMOD_INIT_ENABLE_DSPNET 0x20 (tested by 12340
SystemI::init), System::getRecordDriverCaps, ChannelGroup::set3DOcclusion/
get3DOcclusion (C++ and C). sizeof(FMOD_CREATESOUNDEXINFO) 0x6C matches the
cbsize check in 12340 SystemI::createSoundInternal.

The 4.30.04 sources do not compile against these yet (763 error sites);
that is the porting work list.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 00:39:05 +02:00
SatyandClaude Opus 5.5 0a9576cfc5 fmodex: trim to 12340's feature set
12340 registers 19 codecs, 16 DSPs and the NoSound/WavWriter/OpenAL/ASIO/
WASAPI/WinMM/DSound outputs (SystemI::setUpPlugins 0x8D35C0,
FMOD_OS_Output_Register 0x915FC0).

- fmod_settings.h: CELT, DLMALLOC, MEMORYTRACKER, PROFILE (+sub-switches),
  DELAY, TREMOLO off; Win32 VSTPLUGIN/WINAMPPLUGIN/NEURAL off; Win64
  NEURAL/I3DL2 off.
- Deleted post-4.09.07 features (not in revision.txt up to 4.09.07, no
  function in 12340): lib/libcelt, lib/neural_thx, lib/dlmalloc, CELT codec,
  Tremolo/Delay DSPs, MyEars/Neural downmix, fmod_profile*.
- VST/Winamp (existed in 4.09, compiled out of 12340) and the memory tracker
  are kept but switched off.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 00:34:50 +02:00
SatyandClaude Opus 5.5 73d08005cb fmodex: OFFSET annotations for 1828 12340 functions
1829 // OFFSET lines (1830 addresses; Codec::Codec is emitted twice) in 199
files. Matched by qualified name against the IDB (binana/Mac names), plus
59 manual resolutions (overloads, #if variants, duplicate statics).
227 of 230 functions that reference a __FILE__ string agree with the file.
Note: this tree is FMOD Ex 4.30.04 relabeled 4.09.07; 12340 is 4.09.07.
See re/notes/304_fmod_offsets.md. No code changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 00:34:50 +02:00
SatyandClaude Opus 5.5 ea3c081245 fmodex: FMOD Ex 4.09.07 sources (E:\Github\fmodex)
Unmodified copy of fmodex/fmod (lib/, src/, win32/) plus LICENSE.TXT and
revision.txt, at the original location Engine/Source/SoundEngine/fmodex
(12340/Mac 13682 paths). 12340's exact FMOD version is unknown; version
differences are expected. Not built yet.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 23:44:43 +02:00
Saty 5137298335 Initial commit 2026-09-23 18:24:00 +02:00