Repository navigation
Conversation
|
Heads-up from a related case, so the two don't get confused: I hit the same kind of hang in Def Jam: Fight for NY (SLUS-21004), but on a different libcdvd call, and this PR doesn't cover it (nor does my fix cover this one). There, Two notes:
|
…oadImage/StoreImage
|
@danfreitas97 Hey! I'm still working on this. I've moved this PR into draft so we don't step on each other foot. Also, feel free to address me in brazilian portuguese, up to your preference. Bora fazer esse projeto acontecer! 🇧🇷 |
…mes draw into them
… time, loads ahead of stores
… the next function starts on it
…IOP printf/sprintf args
…nterlaced field mode, like libgraph
…he matrix, like libvu0
…mode truncates z/w with FTOI0
…o flags and test w against its bounds
… back to the caller's stack
…he way libgraph does
…COLOR the way libgraph does
…isplay values to SCISSOR_2/ALPHA_1
…ng TIE, like libdma
…of treating the tag as a pair
…ne-doubling one field
… and report the first 16 missing targets
…ving when the IOP clock drifts
|
@danfreitas97 tá pronto pra revisar mano! |
|
@AlenDavid Brabo, patrão! Logo mais eu olho. Nice work! |
Closes #358
Three fixes, one per commit, for the boot hangs described in the issue:
sceCdLayerSearchFile: new runtime handler that forwards tosceCdSearchFile. The first two arguments are the same, and host files have no disc layers, so the layer argument is ignored. Added to the call list and the Ghidra export list, so the analyzer binds it automatically.sceSifLoadModuleBuffer:IopEmulator::loadModuleBuffernow reads the ELF from IOP RAM, wheresceSifSetDmaput it. If there's no ELF there it still falls back to EE RAM, so hosts and tests that stage images in EE memory keep working. It also logs a warning when neither memory holds an image, where before it failed silently.sceSifSearchModuleByAddress: new runtime handler backed by a newIopSubsystem::findModuleByAddress, which looks the address up in the emulator's module table (KSEG addresses are masked). On a miss it returnsKE_UNKNOWN_MODULE(-202), the same as loadcore.Testing
ps2x_tests: all 446 pass, including a newsceCdLayerSearchFilecase.main.RPK.BIN, all 13 IRX modules load and start (SDRDRV, EzMIDI, CRI ADX…) and it starts GIF DMA. It then stops at a separate problem, a failingsceSifAllocIopHeapin CRI'sps2rna_init_psj, which is out of scope here.Black frames and frame rate during gameplay
GS thread presentation shows the frame finished at the latest vblank it reached.DrawTriangle. The scenes are GS fill-rate bound. The default raster thread count is now all cores but two instead of half the cores. On an 8-core M1 Pro, field gameplay goes from 20 to 27 vblanks/s, and it doesn't improve beyond 6 threads.PS2X_GS_THREADSstill overrides it.Mana Khemia gameplay: SDK stub accuracy, GS rasterizer, recompiler coverage, audio
Thirty-nine more commits, grouped by area:
sceGsResetGraph,sceGsSetDefDispEnv/SetDefDBuffDc/SetDefDrawEnv2/SetDefClear,sceGsPutDrawEnv,sceGszbufaddr, thesceVu0*matrix/vector/clip routines,sceDmaSend*,rand/srand, argument 5-7 reads fromt0-t2, IRXargc/argvandlook_ctype_table. Each commit names the behaviour it corrects; together they fix stretched geometry, wrong clears and the interlaced field-mode presentation.PS2X_GS_STATScounts primitives, batches, flush reasons, pixels and GS thread time. Field scenes run at 58-60 vblanks/s on an 8-core M1 Pro..dataare discovered as functions (Mana Khemia's battle command handlers were merged into a neighbour, so opening Skill in battle dispatched to a missing target and froze); the delay slot of a branch in a function's last word is decoded; and every block start after an unconditional transfer is registered as a resume entry (14,203 in Mana Khemia), so an indirect call into a merged routine lands on its owner instead of leaving the thread dormant. The runtime now reports the first 16 missing targets instead of one.DISPFBmoved, giving 4-21 black frames per 5 s while walking; now 0-4, all around load stalls.PS2X_PERF_LOG): guest vblanks and host frames per second, black frames with the last offending tick andDISPFB/source pointers, audio underruns, dropped frames and resample rate. A vblank that fires more than a period late is re-anchored so a slow stretch is not repaid by running faster than real time.Testing:
ps2x_tests522 pass. Mana Khemia: title, Load Game, field (The Heights) and battle with the Skill list open, no missing targets, zero audio underruns or drops.