hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.18k stars 2.17k forks source link

Broken font rendering in Kingdom Hearts: Birth By Sleep in git revision v0.7.6-866-gc32e122 (UPDATED, issue exhibited since v0.7.6-860-ge7da2c0) #1952

Closed solarmystic closed 11 years ago

solarmystic commented 11 years ago

As per the ppsspp thread, posted by FinalBlast:-

http://forums.ppsspp.org/showthread.php?tid=445&pid=24490#pid24490

The game fails to render fonts properly.

(US Version)

kingdomheartsfontproble

(JP Final Mix Version with English translation patch, first Information screen)

capture

(JP Final Mix Version with English translation patch, Font rendered correctly for first info screen)

capture2

Notice that both screens (proper and broken font rendering) are from the same git revision v0.7.6-860-ge7da2c0.

Which implies that the issue may or may not appear at random, and none of the settings were changed in between the restarts of the game. Which also made repro really tricky, and required a large number of attempts (x=10)

Problem reproduction:-

  1. Start PPSSPP
  2. Start KH BBS, and the first INFORMATION screen you see should tell you whether the fonts are broken or not.
  3. Stop the game, and restart it again by clicking on its icon in the main UI.
  4. Problem may or may not occur, requires a few tries of steps 1 to 3. It's like a phantom, and randomly appears.

The latest tested build that did not have this issue at all after a large number (x=10) of attempts to elicit the issue is git revision v0.7.6-853-g8438f0f-windows-x86.

http://buildbot.orphis.net/ppsspp/index.php?m=get&rev=v0.7.6-853-g8438f0f&platform=windows-x86

https://github.com/hrydgard/ppsspp/commit/8438f0f4d287ac74f568b7350f793e5c941f46db

It would seem like one of the clut updates introduced by @unknownbrackets https://github.com/hrydgard/ppsspp/commit/e7da2c03facdfb2575893849fdd9f71612232d4b merged to master in v0.7.6-860-ge7da2c0 could be responsible for the somewhat random appearance of the issue. It is not replicable 100% of time and requires a few tries of restarting the game to catch it. A 50/50 chance of occuring in builds since 853.

Thanks for reading.

EDIT:- Scratch that, sometimes the font renders correctly in 866 too. It seems to occur randomly.

EDIT2:- 860 also has the issue occur randomly. Argh. You can force it to appear by replicating the following steps:-

  1. Start PPSSPP
  2. Start KH BBS, and the first INFORMATION screen you see should tell you whether the fonts are broken or not.
  3. Stop the game, and restart it again by clicking on its icon in the main UI.
  4. Problem may or may not occur, requires a few tries of steps 1 to 3. It's like a phantom, and randomly appears.

EDIT3:-

Trying to trace the history of the issue has yielded the following results:-

v0.7.6-866-gc32e122-windows-x86- Similar observations to 860.

v0.7.6-860-ge7da2c0-windows-x86- Out of ten attempts, the issue shows up 5 times.

v0.7.6-853-g8438f0f-windows-x86- okay, 10 consecutive attempts did not cause the issue to appear

v0.7.6-848-g8e6c093-windows-x86- okay, 10 consecutive attempts did not cause the issue to appear

v0.7.6-840-g66129b6-windows-x86- okay, 10 consecutive attempts did not cause the issue to appear

v0.7.6-837-g315559a-windows-x86- okay, 10 consecutive attempts did not cause the issue to appear

dbz400 commented 11 years ago

Same issue here in Shin Sangoku Musou Multi Raid since 860 .

dbz400 commented 11 years ago

It is texture cache issue from "Switch to a weaker, but faster clut hash"

clutHash = QuickClutHash((const u8 *)clutBufRaw, clutTotalBytes_);

solarmystic commented 11 years ago

@raven02

You've identified the main problem already? That's awesome. Hopefully @unknownbrackets catches this and reverts whatever broke it.

dbz400 commented 11 years ago

Yep, will leave it to @unknownbrackets , should be easy fix for him :)

solarmystic commented 11 years ago

Should I close this issues page?

Issue seems to have been fixed with https://github.com/hrydgard/ppsspp/commit/99634a913a7f6f8ca1922bc7311cb9e69470a939

@hrydgard disabling the quick clut in 0.7.6-872 seems to have done the trick. 0.7.6-876 doesn't exhibit the font issue in KH: BBS anymore.

unknownbrackets commented 11 years ago

Looks like this was fixed by switching back to CityHash32. I was just trying to shave off some time (the weaker one was probably 2x as fast for some games), but if it doesn't work it's no good.

-[Unknown]

Squall-Leonhart commented 11 years ago

is this related at all to imnottakingtheblameforthis

unknownbrackets commented 11 years ago

No, that means you have an old ui_atlas.zim file.

-[Unknown]

Squall-Leonhart commented 11 years ago

Yes, yes i did!. :D