Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement or stub H264 decoding functions #229

Closed
exjam opened this issue Jul 28, 2016 · 8 comments
Closed

Implement or stub H264 decoding functions #229

exjam opened this issue Jul 28, 2016 · 8 comments

Comments

@exjam
Copy link
Member

exjam commented Jul 28, 2016

We either want to implement h264 decoding (which would take a reasonable amount of effort to do), or for now we can stub functions to fake playback in order to get games to continue.

Tank tank tank! will infinitely call H264DECFindDecstartpoint as it is trying to find the decoding start point.

[info:w108] Unimplemented kernel function h264.rpl::H264DECMemoryRequirement called from 0x02071640
[info:w108] Unimplemented kernel function h264.rpl::H264DECCheckMemSegmentation called from 0x0207165C
[info:w108] Unimplemented kernel function h264.rpl::H264DECCheckMemSegmentation called from 0x02071684
[info:w108] Unimplemented kernel function h264.rpl::H264DECInitParam called from 0x020716A0
[info:w108] Unimplemented kernel function h264.rpl::H264DECSetParam called from 0x020716B4
[info:w108] Unimplemented kernel function h264.rpl::H264DECSetParam called from 0x020716BC
[info:w108] Unimplemented kernel function h264.rpl::H264DECOpen called from 0x020716C4
[info:w108] Unimplemented kernel function h264.rpl::H264DECBegin called from 0x020717D0
[info:w108] Unimplemented kernel function h264.rpl::H264DECFindDecstartpoint called from 0x020717F0
[info:w108] Unimplemented kernel function h264.rpl::H264DECFindDecstartpoint called from 0x020717F0
[info:w108] Unimplemented kernel function h264.rpl::H264DECFindDecstartpoint called from 0x020717F0
[info:w108] Unimplemented kernel function h264.rpl::H264DECFindDecstartpoint called from 0x020717F0
[info:w108] Unimplemented kernel function h264.rpl::H264DECFindDecstartpoint called from 0x020717F0
....

In case someone wanted to actually implement h264 decoding, the full list of H264.rpl functions that Tank Tank Tank! imports is:

h264.rpl::H264DECBegin
h264.rpl::H264DECCheckDecunitLength
h264.rpl::H264DECCheckMemSegmentation
h264.rpl::H264DECClose
h264.rpl::H264DECEnd
h264.rpl::H264DECExecute
h264.rpl::H264DECFindDecstartpoint
h264.rpl::H264DECFindIdrpoint
h264.rpl::H264DECGetImageSize
h264.rpl::H264DECInitParam
h264.rpl::H264DECMemoryRequirement
h264.rpl::H264DECOpen
h264.rpl::H264DECSetBitstream
h264.rpl::H264DECSetParam
@exjam exjam changed the title Stub or implement H264 functions Implement or stub H264 decoding functions Jul 28, 2016
@exjam
Copy link
Member Author

exjam commented Jul 30, 2016

For a full list of exports from h264.rpl see:
https://github.com/decaf-emu/decaf-emu/wiki/h264.rpl

@tykel
Copy link

tykel commented Aug 2, 2016

Taking a look into this, already getting to TANK TANK TANK!'s main menu with mostly shims.

@ttay24
Copy link
Contributor

ttay24 commented Aug 18, 2016

is there a good way/process to find out the parameters for these functions?

@exjam
Copy link
Member Author

exjam commented Aug 18, 2016

Reversing from h264.rpl or games which use h264.rpl is the only way to do it, there are IDA RPL/RPX loader plugins available if you use IDA.

@godofgrunts
Copy link

IDA is extremely expensive... Is there an open source decompiler that works?

@exjam
Copy link
Member Author

exjam commented Aug 19, 2016

Only if someone writes a loader for them... Good luck finding a PowerPC disassembler which even comes close to as being as good as IDA though!

@Sammi-Husky
Copy link

Iirc you should also be able to use rpl2elf then load the resulting elf in any dissassembler you like, provided it supports the architecture. But yea nothing i've used in the past can even come close to IDA, and with them coming out with HexRays decompiler support for PPC the draw to it is even greater

@exjam exjam added the h264 label Feb 22, 2017
@exjam exjam closed this as completed Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@godofgrunts @exjam @tykel @ttay24 @Sammi-Husky and others