Closed hogsy closed 1 year ago
The Sony Playstation 1 has a RISC R3000A processor which uses the MIPS 1 instruction set.
It has a branch delay slot which means...
beq t0,zero,exit ; Zero byte indicates end of data
andi t0,t0,$003f ; Mask bits 0 to 5
... andi
is executed before and regardless of beq
being taken or not.
This unmangle implementation is compatible with the mangled files in hogs of war.
Fortunately this can sit low on our list of priorities as at this time supporting both the PSX and PC releases would be an absolute mess - and the PC version only appears to have the frontend resources mangled.
The original PSX implementation can be found here - keep in mind this is written using the MIPS instruction set, so it's going to need conversion.
Can probably just be added to
pork_utils.c
aspork_unmangle