CMPCodeDatabase v1.06.1
What’s new in 1.06.1
✨ New
- PCSX2 ELF CRC tool (Collector → Options → Tools → Get ELF CRC…)
- New drag-and-drop dialog (with “PLEASE DROP FILE HERE” and a Browse… button).
- Computes PCSX2 “CRC” from a PS2 ELF via XOR of 32-bit LE words.
- Auto-formats a preferred base name (e.g.,
SLES-52641_A1FD63D6) and:- Copies it to clipboard.
- Stores it in Collector for export defaults.
- Codes view: Expand/Collapse toggle
- Button added next to Reload DB that flips between Expand All ↔ Collapse All.
- Label stays correct across game switches / tree rebuilds.
- Hotkeys restored when Codes tree is focused:
- Ctrl+E → Expand All
- Ctrl+Shift+E → Collapse All
⚙️ Improvements
- Collector: moving codes to the Collector now preserves their group name/path to prevent clashes and keep context in previews/exports.
- .pnach export & preview now prefer the stored ELF-based filename:
- Uses
GetPreferredPnachDefaultFileName_META()(e.g.,SLES-52641_A1FD63D6.pnach) when present. - Falls back to your previous
GuessPnachFileName(...)and then a generic name.
- Uses
- Toggle label accuracy
- Treats an empty/newly loaded Codes tree as “not expanded” so the button shows Expand All after a fresh load.
- Added
NotifyCodesTreeRebuilt_REFRESH()helper and hooked it after Codes-tree population.
🗂️ Files added
Tools/Pcsx2ElfCrc.cs(utility; namespaceCMPCodeDatabase.Tools)UI/Forms/Collector/CollectorForm.Tools.ELFCRC.cs(adds Options → Tools → Get ELF CRC…; opens the dialog; stores preferred base name)UI/Forms/Collector/CollectorForm.Tools.ELFCRC.Dialog.cs(drag-and-drop Get ELF CRC window with “PLEASE DROP FILE HERE” + Browse)UI/Forms/MainForm/Helpers/MainForm.Codes.ExpandCollapse.Toggle.cs(toggle button, hotkeys, auto-label, andNotifyCodesTreeRebuilt_REFRESH())
✏️ Files modified (light edits)
UI/Forms/Collector/CollectorForm.Pnach.Export.cs- Use preferred name for Export and Preview temp files when available.
UI/Forms/MainForm/Database/MainForm.Database.csUI/Forms/MainForm/Database/MainForm.Database.FilesRoot.cs- Call
NotifyCodesTreeRebuilt_REFRESH()at the end of Codes-tree builds to keep the toggle label in sync.
- Call
🔧 Wire-up notes
- In CollectorForm.OnShown:
try { EnsureCollectorTools_ELFCRC(); } catch {} - In MainForm.OnShown:
try { WireCodesExpandCollapseToggle(); } catch {} - After you repopulate the Codes tree (end of
LoadCodes(...)/LoadCodesFromSingleFile(...)):try { NotifyCodesTreeRebuilt_REFRESH(); } catch {}
Full Changelog: v1.06...v1.06.1