TalonBraveInfo / OpenHoW

Open-source reimplementation of Gremlin's Hogs of War (PC/PSX).
http://talonbrave.info
GNU General Public License v3.0
166 stars 13 forks source link

Implement unmangle function to deal with frontend resources #20

Closed hogsy closed 1 year ago

hogsy commented 6 years ago

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 as pork_unmangle

DummkopfOfHachtenduden commented 6 years 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.

DummkopfOfHachtenduden commented 6 years ago

UNMANGLE.H UNMANGLE.C

This unmangle implementation is compatible with the mangled files in hogs of war.

hogsy commented 5 years ago

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.