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

Code Geass Hangyaku no Lelouch Lost Colors Chinese translate blackscreen on startup #8384

Closed
daniel229 opened this issue Jan 4, 2016 · 7 comments
Labels
Kernel mode Affects code bypassing user-mode restrictions (e.g. not commercial games.) Patched-game Occurs only on patched or modified version of a game.
Milestone

Comments

@daniel229
Copy link
Collaborator

PSP1000 and PSP2000 both blackscreen since unknownbrackets@d273dee in #8296

Since #7952 only PSP2000 works fine

@daniel229 daniel229 changed the title Code Geass Hangyaku no Lelouch Lost Colors blackscreen on startup Code Geass Hangyaku no Lelouch Lost Colors Chinese translate blackscreen on startup Jan 4, 2016
@unknownbrackets
Copy link
Collaborator

Are there any sceIo errors logged now? Perhaps we could JpcspTrace those functions to see if something different is happening.

-[Unknown]

@daniel229
Copy link
Collaborator Author

I saw this,then get the Invalid address

user_main    E[HLE]: Util\BlockAllocator.cpp:139 Block Allocator (08800000-0a000000) failed to allocate 21991424 (014f9000) bytes of contiguous memory

@unknownbrackets
Copy link
Collaborator

What does it allocate before that? We could log the allocation calls.

-[Unknown]

@daniel229
Copy link
Collaborator Author

@unknownbrackets
Copy link
Collaborator

Hmm. Here it looks like the timing of root being deallocated is wrong.

When root first exists and creates the main_thread:

41:44:492 main_thread  I[HLE]: Util\BlockAllocator.cpp:395 Block: 08800000 - 08804000 size 00004000 taken=1 tag=usersystemlib
41:44:492 main_thread  I[HLE]: Util\BlockAllocator.cpp:395 Block: 08804000 - 08a71100 size 0026d100 taken=1 tag=ELF/simple
41:44:492 main_thread  I[HLE]: Util\BlockAllocator.cpp:395 Block: 08a71100 - 09fbf000 size 0154df00 taken=0 tag=(untitled)
41:44:492 main_thread  I[HLE]: Util\BlockAllocator.cpp:395 Block: 09fbf000 - 09fc0000 size 00001000 taken=1 tag=stack/main_thread
41:44:492 main_thread  I[HLE]: Util\BlockAllocator.cpp:395 Block: 09fc0000 - 0a000000 size 00040000 taken=1 tag=stack/root

After that, root frees itself as it should:

41:44:515 main_thread  I[MODULE]: HLE\sceKernelModule.cpp:1729 277=sceKernelLoadModule(name=disc0:/PSP_GAME/SYSDIR/BOOT.BIN,flag=00000000,(...))
41:44:515 root         D[KERNEL]: HLE\sceKernelThread.cpp:2952 Context switch: main_thread -> root (276->275, pc: 082214e4->08220c90, module loaded) +12us

And then "simple" is created:

41:44:516 simple       D[KERNEL]: HLE\sceKernelThread.cpp:2952 Context switch: main_thread -> simple (276->278, pc: 0822150c->0883c95c, started module) +164us

Next we have user_main get created:

41:44:516 simple       I[KERNEL]: HLE\sceKernelThread.cpp:1943 279=sceKernelCreateThread(user_main, 0883ca70, 00000020, 262144, 80000000, 00000000)

And then user_main frees simple:

41:44:516 user_main    D[KERNEL]: HLE\sceKernelThread.cpp:2189 sceKernelDeleteThread(278)
41:44:516 user_main    D[KERNEL]: HLE\sceKernelThread.cpp:444 Freeing thread stack simple

And then it fails to allocate:

41:44:517 user_main    I[HLE]: Util\BlockAllocator.cpp:391 -----------
41:44:517 user_main    I[HLE]: Util\BlockAllocator.cpp:395 Block: 08800000 - 08804000 size 00004000 taken=1 tag=usersystemlib
41:44:517 user_main    I[HLE]: Util\BlockAllocator.cpp:395 Block: 08804000 - 08a71100 size 0026d100 taken=1 tag=ELF/simple
41:44:517 user_main    I[HLE]: Util\BlockAllocator.cpp:395 Block: 08a71100 - 08a72000 size 00000f00 taken=0 tag=(untitled)
41:44:517 user_main    I[HLE]: Util\BlockAllocator.cpp:395 Block: 08a72000 - 08a8b000 size 00019000 taken=1 tag=UserSbrk
41:44:517 user_main    I[HLE]: Util\BlockAllocator.cpp:395 Block: 08a8b000 - 09f7f000 size 014f4000 taken=0 tag=(untitled)
41:44:517 user_main    I[HLE]: Util\BlockAllocator.cpp:395 Block: 09f7f000 - 09fbf000 size 00040000 taken=1 tag=stack/user_main
41:44:517 user_main    I[HLE]: Util\BlockAllocator.cpp:395 Block: 09fbf000 - 09fc0000 size 00001000 taken=1 tag=stack/main_thread
41:44:517 user_main    I[HLE]: Util\BlockAllocator.cpp:395 Block: 09fc0000 - 0a000000 size 00040000 taken=0 tag=(untitled)
41:44:517 user_main    I[HLE]: Util\BlockAllocator.cpp:397 -----------
41:44:517 user_main    E[HLE]: Util\BlockAllocator.cpp:139 Block Allocator (08800000-0a000000) failed to allocate 21991424 (014f9000) bytes of contiguous memory

Notice that 014f9000 fails because only 014f4000 is available. It's actually missing 0x5000. If simple had not been using the top slot, user_main would go there instead. And then there would be more than enough space (0x40000 more.)

But, maybe that's actually right, and it's trying to do something else. There's a bunch of kernel syscalls earlier that aren't really supported, and they could even be doing things to fix this situation.

-[Unknown]

@sum2012 sum2012 added Patched-game Occurs only on patched or modified version of a game. Kernel mode Affects code bypassing user-mode restrictions (e.g. not commercial games.) labels Jan 6, 2016
@sum2012
Copy link
Collaborator

sum2012 commented Jun 8, 2020

After #12986 , the game should improve,
@daniel229 can you re-test ?

@sum2012
Copy link
Collaborator

sum2012 commented Jan 3, 2021

I test v1.9.3-981-g288fe3ade which merged #12986
It fixed
Closing this issue

@sum2012 sum2012 closed this as completed Jan 3, 2021
@unknownbrackets unknownbrackets added this to the v1.10.0 milestone Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kernel mode Affects code bypassing user-mode restrictions (e.g. not commercial games.) Patched-game Occurs only on patched or modified version of a game.
Projects
None yet
Development

No branches or pull requests

3 participants