#Undisputed Memory Reference
File: UNDMemory.py · Class: UNDMemory · Game Process: Undisputed.exe
#Constructor
UNDMemory(addresses_path: str)| Parameter | Type | Description |
|---|---|---|
addresses_path |
str |
Path to addresses file (e.g., C:\UNDISPUTED_MEMORY\addresses.txt) |
#Key Differences from FC24/FC25 Memory
| Feature | FC24/FC25 | Undisputed |
|---|---|---|
| Process | FC24.exe / FC25.exe |
Undisputed.exe |
| Score tracking | Goals (int) | Boxer round scores (array) |
| Time | Match time pointer | gameTime direct address |
| Statistics | Direct memory reads | Screen pixel analysis |
| Address reload | On init only | On every read (dynamic) |
#Required Address Keys
| Key | Purpose |
|---|---|
gameTime |
Current game/round time (int) |
roundVal1 |
Current round number (int) |
ptrFighter1Stats |
Pointer to fighter scorecard array |
fighter1StatsFlag |
Scorecard index counter |
boxerArray0...boxerArray5C |
Boxer 1 round scores (24 values) |
boxer1Array0...boxer1Array5C |
Boxer 2 round scores (24 values) |
#Methods
#reload_addresses() ACTIVE
Re-read the addresses file from disk. Called before every memory read to handle dynamic updates from Cheat Engine.
This is unique to UNDMemory — FC24/FC25 only load addresses once at startup.
#_get_addr(key) → int INTERNAL
Fetch address with compatibility shim for known case typos (e.g., ArrayC vs Arrayc).
#read_gametime() → int ACTIVE
Read current game time. Includes retry logic with address reload on failure.
#read_current_round() → int ACTIVE
Read current round number. Includes retry logic.
#read_boxer1_round_score() → list[int] ACTIVE
Read 24 round score values for boxer 1 from boxerArray0 through boxerArray5C.
Returns: Array of 24 integers (8 rounds × 3 judges).
#read_boxer2_round_score() → list[int] ACTIVE
Read 24 round score values for boxer 2 from boxer1Array0 through boxer1Array5C.
Note: Despite the naming,
boxer1Array*keys actually map to boxer 2 scores.
#boxer_stats() → dict ACTIVE
Read scorecard data using pointer-based array traversal:
{
"boxer1": [{"jury": 1, "round": 1, "value": 10}, ...],
"boxer2": [{"jury": 1, "round": 1, "value": 9}, ...]
}Memory Layout:
- Base:
ptrFighter1Stats+ (index × 8) → pointer → base_addr - Boxer 1 score:
base_addr + 0xA8 - Boxer 2 score:
base_addr + 0xAC - Total entries:
fighter1StatsFlag / 8 - Rounds per jury:
total_entries / 3
#reset_index() ACTIVE
Write 0 to fighter1StatsFlag to reset scorecard tracking for new match.
#reset_gametime() ACTIVE
Write 0 to gameTime address.
#validate_all_memory(progress_callback) → list ACTIVE
Validates all memory addresses. For ptr prefixed keys and special keys like fighter1StatsFlag, only checks if address is non-zero (values may not be available until match starts).