sharpemu icon indicating copy to clipboard operation
sharpemu copied to clipboard

Quake [PPSA01880]

Open AlexsandroZanella2 opened this issue 4 months ago • 3 comments

Game Name

Quake

Title ID

PPSA01880

Game Version

1.009

Current Status

Nothing happens

Description

crashes with Access Violation Error

Log File

PPSA01880-20260722-104646.log

Last Milestone / First Error

[10:46:51.791] [LOADER][ERROR] Type: Access Violation

Operating System

Windows 11

CPU

i5 8400

GPU

NVIDEA GeForce RTX 2060 OC Asus TUF 6GB

RAM

16 GB

Emulator Version / Commit

5f97031

Renderer

Software

Additional Notes

[10:46:51.791] [LOADER][ERROR] Type: Access Violation [10:46:51.791] [LOADER][ERROR] This usually means: [10:46:51.791] [LOADER][ERROR] - Guest code called an unmapped import [10:46:51.791] [LOADER][ERROR] - Guest code accessed unmapped memory [10:46:51.791] [LOADER][ERROR] - Need to implement HLE for this NID

AlexsandroZanella2 avatar Jul 22 '26 13:07 AlexsandroZanella2

How do you get the games?

beso112 avatar Jul 22 '26 14:07 beso112

beso112 dumping the discs w my ps5 pro jailbroked

AlexsandroZanella2 avatar Jul 22 '26 17:07 AlexsandroZanella2

Pulled the attached log for more detail (the crash type alone doesn't say much). Some findings from static inspection - I don't have a fix, but this narrows down where to look.

The fault happens with r14 pointing at 0x656D697477617264, which decodes as the ASCII string "drawtime" - i.e. r14 doesn't hold a valid pointer, it holds what looks like a format-string/debug-label constant baked into the binary (Quake's engine has a well-known r_speeds/drawtime console stat). That's a classic "wrong value ended up in a register that should hold a pointer/number" signature, not a plain unmapped-memory access.

The last few non-repeating HLE calls right before the fault (the trace is otherwise dominated by ordinary scePthreadMutexLock spam) are, in order: sceSysmoduleLoadModule and several unlabeled helper NIDs, then a tight sequence of fputs → clock_gettime → __tls_get_addr → memchr. That specific chain (format-string scan, timestamp, TLS address resolution, then output) looks like a libc/CRT string-formatting routine doing a periodic console print - plausibly the "drawtime" stat itself - immediately before the fault.

My working hypothesis (unverified - static log reading only, I haven't reproduced this live yet): something in how __tls_get_addr resolves/returns in this call chain leaves a register holding the format-string address instead of the value the caller expected, and the very next dereference lands on that string's bytes instead of real data. Worth checking __tls_get_addr's implementation and calling-convention handling first if someone picks this up - it's the most specific, least-generic call in that immediate sequence.

I have Quake locally and could reproduce this live with fuller tracing in a future session if useful.

zambasaurus avatar Jul 26 '26 08:07 zambasaurus