namitas9799 / mupen64plus

Automatically exported from code.google.com/p/mupen64plus
0 stars 0 forks source link

Emulation bugs (JPEG + audio RSP) in Pocket Monsters Stadium (J) #538

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
mupen64plus-1.99.5, OpenBSD amd64, default plugins

Core: Goodname: Pocket Monsters Stadium (J) [!]
Core: Name: POKEMON STADIUM
Core: MD5: C46E087D966A35095DF96799B0B4FFAE
Core: CRC: 665e8259 d098bd1d

Problem 1: No audio at all, ever. Possibly related, constant console spam:
RSP Warning: unknown task:  type:2  sum:74a02  PC:14968210e860 (constant)

Problem 2: Title screen is completely black except for the text “Press 
Start.” Possibly related, console spam when the title screen comes up:
RSP Warning: unknown jpeg task:  sum:2de1f

Problem 3: Garbled images within the game (possibly related to the above and/or 
#445).

Note: This is not the same game as Pokémon Stadium (which was Pocket Monsters 
Stadium 2 in Japan). This game never saw an international release.

Original issue reported on code.google.com by anth...@cathet.us on 16 Jan 2013 at 7:09

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Did you try LLE plugins like rsp-z64 and video-z64?

Original comment by s...@narfation.org on 16 Jan 2013 at 8:20

GoogleCodeExporter commented 8 years ago
I forgot that some relevant changes had been made since the last release. 
Problem 1 is no longer present as of latest hg (no RSP warning, and audio works 
fine). However, there is a new, worse bug: the game freezes at the title 
screen, with:

RSP Warning: unknown OSTask: sum 2c85a PC:0

Original comment by anth...@cathet.us on 16 Jan 2013 at 8:21

GoogleCodeExporter commented 8 years ago
With the Z64 plugins (latest hg):

Problem 2 still exists; black title screen except for text. Doesn't freeze. 
Console spam:
Video Warning: unsuported format YUV size 2

Problem 3 disappears, as expected.

Original comment by anth...@cathet.us on 16 Jan 2013 at 8:51

GoogleCodeExporter commented 8 years ago
Problems 2 in HLE plugin comes indeed from unimplemented jpeg ucode.
Fixing this properly requires to reverse engineer said ucode.

If you can't wait for the reverse engineering to happen (can take some times), 
you can still avoid the freeze by adding this case to the switch statement in 
the DoJPEGTask function in main.c

case 0x2c85a: // Pokemon Stadium (J)
    // FIXME: reverse engineer this jpeg decoding ucode
    taskdone();
    return 1;

This way, even if you'll get some corrupted textures, you'll still be able to 
play.

Original comment by bobby.sm...@gmail.com on 16 Jan 2013 at 5:20

GoogleCodeExporter commented 8 years ago
I made some patches to the hle plugin to improve partially the situation.
First patch refactor the jpeg module (indeed the new ucode share many 
functionalities with other versions). Second patch implement the new ucode.

Notes:
-It seems that glide64 (the old one, I didn't test with the the new mk2 
version) doesn't support the output format, so you won't see the pretty pokemon 
picture.
-It does sort of work with rice, but the image appeared too dark so I tweaked 
experimentally some Y value (there is a comment in the code not to forget about 
it).
-The patch has been sent to richard few days ago, but he might have issed it 
that's why I posted here.

Feel free to improve upon it.

Original comment by bobby.sm...@gmail.com on 7 Feb 2013 at 6:17

Attachments:

GoogleCodeExporter commented 8 years ago
Patches are now applied

Original comment by s...@narfation.org on 8 Feb 2013 at 8:31