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

kr0.pgf is unimplemented on PPSSPP #13190

Open
Panderner opened this issue Jul 23, 2020 · 64 comments
Open

kr0.pgf is unimplemented on PPSSPP #13190

Panderner opened this issue Jul 23, 2020 · 64 comments
Labels
PGF / sceFont Issue involves PGF fonts.
Milestone

Comments

@Panderner
Copy link
Contributor

Some games uses PGF/sceFont i've mentioned in #2788 but kr0.pgf is used for korean fonts are unimplemented on PPSSPP and it's replaced by blank spaces even i used a real PSP font.

LocoRoco 2
Screenshot_2020-07-23-18-27-53-12_2f85358b2198d26f8aca533d68bee793
Screenshot_2020-07-23-18-28-27-30_2f85358b2198d26f8aca533d68bee793

BlazBlue: Continuum Shift II
Screenshot_2020-07-23-18-28-45-55_2f85358b2198d26f8aca533d68bee793
Screenshot_2020-07-23-18-29-30-81_2f85358b2198d26f8aca533d68bee793

@hrydgard hrydgard added the Font Atlas Related to UI fonts, not in game fonts. label Jul 23, 2020
@hrydgard hrydgard added this to the v1.11.0 milestone Jul 23, 2020
@Panderner
Copy link
Contributor Author

Panderner commented Jul 24, 2020

Although The UI, Memory Stick Warning Messages and Save/Load Screens are ok
Screenshot_2020-07-24-16-36-48-44_2f85358b2198d26f8aca533d68bee793
Screenshot_2020-07-24-17-17-24-79_2f85358b2198d26f8aca533d68bee793

@unknownbrackets
Copy link
Collaborator

Well, I think it is "implemented":

{ 0x288, 0x288, 0x2000, 0x2000, 0, 0, FONT_FAMILY_SANS_SERIF, FONT_STYLE_REGULAR, 0, FONT_LANGUAGE_KOREAN, 0, 3, "kr0.pgf", "AsiaNHH(512Johab)", 0, 0, 394192, 51856 },

It might be a separate problem with PGF support, such as picking the wrong font in the OptimalFont call. I don't know that this is atlas related.

-[Unknown]

@Panderner
Copy link
Contributor Author

Korean fonts in menus are ok. but the PGF used in some games are missing.
Screenshot_2020-11-11-12-19-14-87_2f85358b2198d26f8aca533d68bee793

@hrydgard
Copy link
Owner

Yeah in the menus we are using fonts of the system the emulator is running on.

Can't really do that in-game as the PGF font system is so different.

@Panderner
Copy link
Contributor Author

Gran Turismo also affected this issue:
Screenshot_2020-11-19-17-39-24-92_2f85358b2198d26f8aca533d68bee793
Screenshot_2020-11-19-17-38-50-85_2f85358b2198d26f8aca533d68bee793
Screenshot_2020-11-19-17-39-47-73_2f85358b2198d26f8aca533d68bee793
Screenshot_2020-11-19-17-38-06-57_2f85358b2198d26f8aca533d68bee793

@nassau-tk
Copy link
Contributor

@Panderner

Can you test on EXIT(Pure Korea ver.)?
If you can do it then please upload the screenshot.

@Panderner
Copy link
Contributor Author

@Panderner

Can you test on EXIT(Pure Korea ver.)?
If you can do it then please upload the screenshot.

Screenshot_2020-11-24-18-37-19-71_2f85358b2198d26f8aca533d68bee793
@nassau-tk The Korean version of EXIT (ULKS46054) is entirely japanese like Korean Copy of Monster Hunter Portable (UCKS45036) which is entirely english.

@nassau-tk
Copy link
Contributor

Really?!

OK. I understood it.

@nassau-tk
Copy link
Contributor

nassau-tk commented Nov 24, 2020

@Panderner

If you can try this kr0.pgf then download and test it.
https://drive.google.com/file/d/1X31Eea5_LTEkoPxBmjZfGGis1Z-ZScSn/view?usp=sharing

@nassau-tk
Copy link
Contributor

@Panderner
And, I don't have a information about korean PSP games.
So,Please tell me.
Is these games language patched?
Or pure korean language package?

@Panderner
Copy link
Contributor Author

@Panderner
And, I don't have a information about korean PSP games.
So,Please tell me.
Is these games language patched?
Or pure korean language package?

These are games that uses PGF. like Locoroco2, Blazblue Continuum Shift II and Gran Turismo

@Panderner
Copy link
Contributor Author

@nassau-tk That kr0.pgf file that cause issues that Locoroco 2 Crashed for me and some issues for LocoRoco Midnight Carnival:
The letters are too small compared to PPSSPP font and real PSP font:
Screenshot_2020-11-25-07-38-27-07_2f85358b2198d26f8aca533d68bee793
Screenshot_2020-11-25-07-37-47-59_2f85358b2198d26f8aca533d68bee793

and here's a warning screen that does not render correctly:
Screenshot_2020-11-25-07-39-52-92_2f85358b2198d26f8aca533d68bee793
Screenshot_2020-11-25-07-36-57-70_2f85358b2198d26f8aca533d68bee793

@Panderner
Copy link
Contributor Author

Here's a crash message for LocoRoco 2 using @nassau-tk's kr0.pgf:
Screenshot_2020-11-25-07-41-12-19_2f85358b2198d26f8aca533d68bee793

@Panderner
Copy link
Contributor Author

but using save state to get past loading save crash but some missing letters in the screenshot:
Screenshot_2020-11-25-11-09-04-69_2f85358b2198d26f8aca533d68bee793

@nassau-tk
Copy link
Contributor

@Panderner
Character size is not tuned.
It's "just test version".

@nassau-tk
Copy link
Contributor

@hrydgard
I have a question about "State Save of PPSSPP". (It's Not Means Save System of The Game.)
If we used "PPSSPP State Save" then it's not change the font file on my knowledge.
The font file is memoried at making save state.
(Will state save data inclued font data?)

  1. "Font-A1" installed.
  2. Start the game and get state save.
  3. Finish the game.
  4. "Font-A1" change to "Font-A2"
  5. Boot the game and load the state save.
  6. It's not change the font. It will appear the "Font-A1".

Is that right?

@hrydgard
Copy link
Owner

PGF::DoState appears to save all the loaded glyph state so yes, it should appear as Font-A1 I think. This is probably not the most well tested scenario we have :)

@nassau-tk
Copy link
Contributor

@hrydgard

Thanks!!
I understood it.

@nassau-tk
Copy link
Contributor

nassau-tk commented Nov 28, 2020

I tested to check the Real PSP's kr0.pgf header by pgftool.

Result.
"Can't read it."
jpn0.pgf / ltn0.pgf~ltn15.pgf is OK.(It can read header.)
But,It's no responsed on pgftool only "kr0.pgf" .
I don't know why.:tired_face:

@nassau-tk
Copy link
Contributor

nassau-tk commented Nov 29, 2020

@Panderner
Hi!!
Comming "Time of Test "!!
Can you?

I have begun to consider a possibility of "the problem of a PGF file" by the other day's test.
Point is 2 things.These point was move my making mind.

  1. A few Hangul appeared on my test file .
  2. Real PSP's kr0.pgf couldn't dump.(not appear error code. just through.)

https://drive.google.com/file/d/1X31Eea5_LTEkoPxBmjZfGGis1Z-ZScSn/view?usp=sharing

I don't know about "Hangul".
So everything is made by "only my sense".
If appear the Hangul then it's good.
But I think it can't be adjusted small.

If you have interest then let's try it and please give me report.:construction_worker:

@nassau-tk
Copy link
Contributor

nassau-tk commented Nov 29, 2020

@hrydgard

If appeared the Hangul characters by this pgf file then we need rethink about the issue tag change or add "PGF / Scefont" don't you?

Of course,If Hangul "appear".:grin:

@Panderner
Copy link
Contributor Author

Panderner commented Nov 29, 2020

@Panderner
Hi!!
Comming "Time of Test "!!
Can you?

I have begun to consider a possibility of "the problem of a PGF file" by the other day's test.
Point is 2 things.These point was move my making mind.

  1. A few Hnagul appeared on my test file .
  2. Real PSP's kr0.pgf couldn't dump.(not appear error code. just through.)

https://drive.google.com/file/d/1X31Eea5_LTEkoPxBmjZfGGis1Z-ZScSn/view?usp=sharing

I don't know about "Hangul".
So everything is made by "only my sense".
If appear the Hangul then it's good.
But I think it can't be adjusted small.

If you have interest then let's try it and please give me report.👷

@nassau-tk that font can cause issues for LocoRoco and Gran Turismo:

Korean text in Gran Turismo is spammed by same letters:
Screenshot_2020-11-29-16-26-13-57_2f85358b2198d26f8aca533d68bee793
Screenshot_2020-11-29-16-26-38-65_2f85358b2198d26f8aca533d68bee793

and here's LocoRoco 2 and LocoRoco Midnight Carnival the all letters stretched horizontally and warning screen still not aligned correctly:
Screenshot_2020-11-29-16-27-25-75_2f85358b2198d26f8aca533d68bee793
Screenshot_2020-11-29-16-27-36-57_2f85358b2198d26f8aca533d68bee793

@nassau-tk
Copy link
Contributor

nassau-tk commented Nov 29, 2020

@Panderner
image

#13458 (comment)
GranTurismo is needs turn off "Lazy texture caching (speedup)" option.
Maybe you turn on the option's check box aren't you?
Please Check & ReTest it.

LocoLoco...um...
It seems shrinking about half size(horizonal).
It has possible to fix.(Maybe)

How about BlazBlue?
Not good?

@nassau-tk
Copy link
Contributor

@hrydgard
These result means that the issue was happened by "PGF files" I think.
How do you think about this?

This is an amature's idea (Delusion) below.:smile:
For example.

  • Real PSP's kr0.pgf has locked or encryption. (Only This pgf?)
  • And,PPSSPP has not key of decrypt.

@hrydgard
Copy link
Owner

I am just thoroughly confused here :) Really no idea what's going on with kr0.pgf.

There might be bugs in our implementation of sceFont, too...

@nassau-tk
Copy link
Contributor

nassau-tk commented Nov 29, 2020

😆

I feel that most strange point is "Can't see header only kr0.pgf by pgftool's dump".
But,other pgf files has no major problem now.

So,We should think light.
Like this.
"If we fixed about kr0.pgf then we will free from all about pgf issue! "(Imprudent?:sunglasses:)

Well,I will think how to way this issue solved.

@nassau-tk
Copy link
Contributor

nassau-tk commented Nov 29, 2020

@hrydgard

There might be bugs in our implementation of sceFont, too...

I think that's "Right".
See,below link.
#11055
This issue will happening when loading plural PGF files I think.
It should loaded "jpn0.pgf & ltn15.pgf".
But "ltn15.pgf" is not load.

Well,I will try some font making.

P.S:Please rethink about tag about this issue.

@Panderner
Copy link
Contributor Author

@Panderner
image

#13458 (comment)
GranTurismo is needs turn off "Lazy texture caching (speedup)" option.
Maybe you turn on the option's check box aren't you?
Please Check & ReTest it.

LocoLoco...um...
It seems shrinking about half size(horizonal).
It has possible to fix.(Maybe)

How about BlazBlue?
Not good?

I've tried turned off lazy cache texturing and it worked
Screenshot_2020-11-29-19-14-46-58_2f85358b2198d26f8aca533d68bee793

@nassau-tk
Copy link
Contributor

nassau-tk commented Nov 30, 2020

@hrydgard

Well,What should we do?

Note : I will sleep tonight.Good night!

@hrydgard
Copy link
Owner

We shall merge your new kr0 font :)

@nassau-tk
Copy link
Contributor

@hrydgard
Morning came in Japan!!
And, Thank you for merging it!!

Well,My Font Working is finished roughlly isn't it?

@Panderner
Copy link
Contributor Author

The @nassau-tk's latest kr0.pgf is merged but please do not close this issue until the real PSP's kr0.pgf is fixed.

@nassau-tk
Copy link
Contributor

Yes, Right!

@nassau-tk
Copy link
Contributor

nassau-tk commented Dec 1, 2020

@hrydgard
I propose for you that this issue should be "PGF / sceFont" tag.
How do you think about it?

@hrydgard hrydgard added PGF / sceFont Issue involves PGF fonts. and removed Font Atlas Related to UI fonts, not in game fonts. labels Dec 1, 2020
@hrydgard
Copy link
Owner

hrydgard commented Dec 1, 2020

That's right! I changed the tag.

@Panderner
Copy link
Contributor Author

This is the real PSP's kr0.pgf
IMG_20201203_161041

@hrydgard hrydgard removed this from the v1.11.0 milestone Dec 7, 2020
@nassau-tk
Copy link
Contributor

nassau-tk commented Dec 12, 2020

I checked by PSP (Real Device).
Maybe,The original kr0.pgf would not corrupted.

[ Testing on Real PSP Device & Real PGF Fonts. ]
Of course,"No problem!!"
See those screen shots below.
PSP_RealHard Font_TBLAZABLUECS2

[ Talking on PPSSPP. ]
And,Even If deleted the kr0.pgf from PPSSPP then The game is can boot.
Not become "Invalid Memory Access Error".
Maybe,If PPSSPP is missing kr0.pgf then it would loading "jpn0.pgf".
If it was installed the "Real PSP's kr0.pgf" then PPSSPP can't load the "kr0.pgf".
So,It will loading jpn0.pgf for the substitution of kr0.pgf.
Can't load the "kr0.pgf" = PPSSPP is missing the PGF.

Then not appear the korean characters and appear the "_ (Underline)."
It's meaning "The inside of font file(=jpn0.pgf) has not the Korean character."(Of course, Korean isn't included.)

[ An amature's thinking. ]
So,I think the cause of issue is PPSSPP will not loading kr0.pgf's "header".
pgftool couldn't read only the header infomation of Real PSP's kr0.pgf .
This is the point that I'm very interested.

How do you think about it?

@nassau-tk
Copy link
Contributor

@hrydgard

I got a answer for kr0.pgf from @tpunix .
Please, See below.
tpunix/pgftool#4

@hrydgard
Copy link
Owner

Oh, that's interesting. Makes sense given that Korean characters consists of groups of smaller characters and there are many, many combinations... so they save space by combining them. Means that getting real korean font to work in PPSSPP will probably be very challenging...

@nassau-tk
Copy link
Contributor

But...Why my font is working?
I'm not making that Korean puzzle font.
It was made by same way with other pgf.
That's "Unicode font".
Hm...I can't understand!!

@nassau-tk
Copy link
Contributor

By the way.
Should we make system priority that our custom kr0.pgf higher priority than flash0>kr0.pgf on Android?

And, In other OS...How should do to avoidance?

How do you think?

@hrydgard
Copy link
Owner

Your font is working because you have generated it like the other fonts, and we use our own PGF implementation that can read "normal" fonts that are not made of many small pieces.

So yes, we should not recommend to use original kr0.pgf until we figure out how it works...

@Panderner
Copy link
Contributor Author

I don't think we need a decryption of original kr0.pgf.

@anr2me
Copy link
Collaborator

anr2me commented Jan 12, 2021

Oh, that's interesting. Makes sense given that Korean characters consists of groups of smaller characters and there are many, many combinations... so they save space by combining them. Means that getting real korean font to work in PPSSPP will probably be very challenging...

Constructing Hangeul syllables from glyphs like this? https://glyphsapp.com/learn/creating-a-hangeul-font

Congratulations! You made your first “in-frame style” Hangeul syllable! 
Now, just repeat the process for all 2,780 basic Hangeul syllables, and you’ll be done. 
Easy, right?

@hrydgard
Copy link
Owner

Yeah, it's gotta be something like that. How that is represented in the font format, or what lookup tables you need to put them together, I have no idea...

@nassau-tk
Copy link
Contributor

Me too...

@anr2me
Copy link
Collaborator

anr2me commented Jan 12, 2021

Looks like arib is even more complicated (ie. too many glyphs) than kr0 font :D https://github.com/libcg/intraFont-G

font:   ¦ INTRAFONT_CACHE_MED (def) ¦  INTRAFONT_CACHE_LARGE  ¦ INTRAFONT_CACHE_ASCII ¦  INTRAFONT_CACHE_ALL
--------+---------------------------+-------------------------+-----------------------+--------------------------
ltn0-7  ¦   52ms,  114kB, 2.5kCPS(*)¦   52ms,  210kB, 2.5kCPS ¦  83ms, 33kB, 100kCPS  ¦  191ms, 119kB, 100kCPS
ltn8-15 ¦   36ms,   83kB, 4.1kCPS   ¦   36ms,  179kB, 4.1kCPS ¦  54ms, 20kB, 100kCPS  ¦   95ms,  64kB, 100kCPS
jpn0    ¦ 1020ms, 1763kB, 0.5kCPS   ¦ 1020ms, 1859kB, 0.5kCPS ¦ 997ms, 33kB, 100kCPS  ¦   - too many glyphs -
kr0     ¦  350ms,  625kB, 0.6kCPS   ¦  350ms,  721kB, 0.6kCPS ¦  - no ASCII glyphs -  ¦ 1936ms, 440kB, 67kCPS(**)
arib    ¦  177ms,  266kB, 1.9kCPS   ¦  177ms,  362kB, 1.9kCPS ¦  - no ASCII glyphs -  ¦   - too many glyphs -
--------+---------------------------+-------------------------+-----------------------+--------------------------
(*)  Low speeds (<10kCPS) occur when characters are not cached. Printing the same characters a second time 
     results in 100 kCPS, i.e. the speed penalty is gone.
(**) kr0 is slower because one character can consist of up to three glyphs.

@nassau-tk
Copy link
Contributor

@hrydgard

I think that we should put on "Future milestone" about this "Can't load the original kr0.pgf" issue.
Of course, At first we must thinking about "should solve? or not?".

@anr2me
I can't understand to reason of exist of "arib.pgf". 😄
It's included "Special mark" more than 50%.

[arib.pgf / Animation Gif.]
nbUBNMD7w7e8guHbmaQa1611109595-1611109662

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PGF / sceFont Issue involves PGF fonts.
Projects
None yet
Development

No branches or pull requests

5 participants