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

Bust-A-Move Deluxe videos not working #8795

Closed
unknownbrackets opened this issue May 31, 2016 · 24 comments · Fixed by #19574
Closed

Bust-A-Move Deluxe videos not working #8795

unknownbrackets opened this issue May 31, 2016 · 24 comments · Fixed by #19574
Labels
I/O Affected by I/O timing settings, or other kind of I/O issue. PSMF / MPEG Issue involves scePsmf or sceMpeg video playback.

Comments

@unknownbrackets
Copy link
Collaborator

unknownbrackets commented May 31, 2016

Reported in #3338.

Details from @raven02:

video is not working and suppose to playback TAITO logo

the video stop with this error

58:25:385 user_main I[ME]: HLE\sceMpeg.cpp:368 sceMpegInit()
58:25:385 user_main I[ME]: HLE\sceMpeg.cpp:379 sceMpegRingbufferQueryMemSize(4800)
58:25:385 user_main I[ME]: HLE\sceMpeg.cpp:1132 sceMpegQueryMemSize()
58:25:385 user_main I[IO]: HLE\sceIo.cpp:842 stdout: Can't allocate memory for Mpeg Ring Buffer
58:25:385 user_main I[ME]: HLE\sceMpeg.cpp:1123 sceMpegFinish(...)

Details from @sum2012:

JPCSP trace log of Bust-A-Move(psp hang)
05:54:47 user_main - sceMpegRingbufferQueryMemSize 0x12C0 = 0x9D9E00
05:54:47 user_main - sceMpegQueryMemSize = 0xB3DB

PPSSPP Log:
https://gist.github.com/sum2012/c42b577c857a2f4b8283
08:36:140 user_main N[ME]: HLE\sceMpeg.cpp:377 10329600 = sceMpegRingbufferQueryMemSize(4800)
08:36:140 user_main N[ME]: HLE\sceMpeg.cpp:1130 65536 = sceMpegQueryMemSize()

Seem only sceMpegQueryMemSize result differcult

JPCSP no problem
log:
https://gist.github.com/sum2012/f3563ca747598605954c
Hmm

06:20:26 INFO hle.sceMpeg - user_main - sceMpegInit
06:20:26 DEBUG hle.sceMpeg - user_main - finishMpeg
06:20:26 DEBUG hle.sceMpeg - user_main - finishStreams
06:20:26 DEBUG hle.sceMpeg - user_main - sceMpegRingbufferQueryMemSize packets=0x12C0
06:20:26 DEBUG hle.sceMpeg - user_main - sceMpegQueryMemSize mode=0x0
06:20:26 DEBUG hle.sceMpeg - user_main - sceMpegRingbufferConstruct ringbufferAddr=0x088CF2C8, packets=0x12C0, data=0x0913FE80, size=0x9D9E00, callbackAddr=0x0885C800, callbackArgs=0x88CF28C
06:20:26 DEBUG hle.sceMpeg - user_main - sceMpegCreate mpeg=0x088CF2FC, data=0x09B19C90, size=0x10000, ringbufferAddr=0x088CF2C8, frameWidth=0x200, mode=0x0, ddrtop=0x0
06:20:26 DEBUG hle.sceMpeg - user_main - finishStreams
06:20:26 DEBUG hle.sceMpeg - user_main - sceMpegAvcDecodeMode mpeg=0x88CF2FC, modeAddr=0x088CF29C
06:20:26 DEBUG hle.sceMpeg - user_main - sceMpegQueryStreamOffset mpeg=0x88CF2FC, bufferAddr=0x09FFEDD0, offsetAddr=0x088CF304
06:20:26 INFO hle.scePsmf - user_main - Found PSMF MPEG video stream data: streamID=0xE0, privateStreamID=0x0, unk1=0x20, unk2=0xFB, EPMapOffset=0x0, EPMapEntriesNum=0, videoWidth=480, videoHeight=272
06:20:26 INFO hle.scePsmf - user_main - Found PSMF MPEG audio stream data: streamID=0xBD, privateStreamID=0x0, unk1=0x20, unk2=0x4, audioChannelConfig=2, audioSampleFrequency=2
06:20:26 INFO hle.sceMpeg - user_main - Using MPEG file for streaming: UmdIsoVirtualFile[UmdIsoFile(name='null', length=0x137800, startSector=0x81B0), sectorBlockMode=false]

-[Unknown]

Bust A Move Deluxe - USA 1.00

@sum2012
Copy link
Collaborator

sum2012 commented May 31, 2016

Update the full debug log to v1.2.2-607-g21ba67e
https://drive.google.com/file/d/0B3OaSdeV0L8kN1FrNEotaFJVYlU/view?usp=sharing

@unknownbrackets
Copy link
Collaborator Author

sceKernelAllocPartitionMemory(partition = 2, UserSbrk, type= 3, size= 23068672, addr= 00001000)

Does Jpcsp also create a UserSbrk of this size? If so, it seems like the game can't allocate internally 10329600 bytes from this buffer (which is already almost all of RAM.)

Maybe this is a timing issue... maybe some internal thing hasn't freed whatever memory it's using yet?

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Jun 1, 2016

I add logging to check
21:15:29 ERROR hle.SysMemUserForUser - user_main - sceKernelAllocPartitionMemory partitionid, 2 name UserSbrk type 3 size 23068672 add 00001000)
21:15:29 ERROR hle.SysMemUserForUser - user_main - returning 18
seem allocate no problem

@sum2012
Copy link
Collaborator

sum2012 commented Jun 1, 2016

@unknownbrackets
Yes,"Simuate umd delay" fix it.
full debug log: https://drive.google.com/file/d/0B3OaSdeV0L8ka2xNT1FfUUN0V1k/view?usp=sharing

@unknownbrackets unknownbrackets added the PSMF / MPEG Issue involves scePsmf or sceMpeg video playback. label Jun 6, 2016
@shinra358
Copy link

still an issue in 1.6

@unknownbrackets unknownbrackets added the I/O Affected by I/O timing settings, or other kind of I/O issue. label May 18, 2019
@unknownbrackets
Copy link
Collaborator Author

Yeah - especially if it traced sceIo functions. That said, it might alter their timing...

-[Unknown]

@unknownbrackets
Copy link
Collaborator Author

Ah, it's harder to tell without the log before/after each syscall. The version in my fork does that:
https://github.com/unknownbrackets/JpcspTrace

-[Unknown]

@unknownbrackets
Copy link
Collaborator Author

Based on that log, average timings:

Microseconds per byte:

  • Average 1.3964
  • Max 14.719
  • Min 0.0718

Microseconds per sector assuming a full sector read:

  • Average 0.6903
  • Max 3.229
  • Min 0.0718

And total overall timings (there's surely some factor of overhead):

  • Average 4096
  • Max 21415 (21ms)
  • Min 869

Currently, our timing (which is based on memory stick access) is definitely much faster:

  • 0.001us per byte
  • +100000us (0.1s) if more than 204800 bytes distant from last read (interestingly this is higher than ANY max in that log)
  • The 304 byte read (should be 869us) would've been 3us
  • The 95533 byte read (should be 21415us) would've been 955us

I think it'd be worth trying just increasing the time for ISO by 20x, which might be more realistic. If you want to give this a shot, open Core/FileSystems/ISOFileSystem.cpp and find:

size_t ISOFileSystem::ReadFile(u32 handle, u8 *pointer, s64 size, int &usec) {
EntryMap::iterator iter = entries.find(handle);

Add right below that:

	usec = size / 2 + 400;
	if (usec < 600) {
		usec = 600;
	}

That won't increase the read speeds for memory stick access, but it will increase it for all ISO/UMD access. But it might be that aligning to a sector is more realistic.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Jul 2, 2019

@sum2012
Copy link
Collaborator

sum2012 commented Dec 26, 2020

PPSSPP v1.10.3-1395-g1ba290a45 Windows 64 bit
still not working.
log: https://gist.github.com/sum2012/01fda17681bbc47bbcbdd5dbcf08c03d

Simuate umd delay log:
https://gist.github.com/sum2012/a650c52218cfffa5b876ed95849c9d57

@unknownbrackets
Copy link
Collaborator Author

Hm, the difference in those is:

48:42:185 ThreadFunc   I[SCEKERNEL]: hle\scekernelthread.cpp:2168 sceKernelExitThread(1)
48:45:637 user_main    E[SCEKERNEL]: hle\scekernelthread.cpp:2774 sceKernelSuspendThread(321): thread not running

It seems like ThreadFunc fails (exit 1 usually means an error) and then it can't be suspended.

Just to confirm, if you comment out this line:

It makes "Simulate UMD Delays" not work, right? How low can you make 100000 and it still works? Does 10000 work?

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Jan 19, 2021

comment that line ,"Simulate UMD Delays" not work

My lowest value that work is 88463

It get a bluescreen in 87000
1

@ghost
Copy link

ghost commented Oct 16, 2021

Add this game id to [ForceUMDDelay] fixes this issue.

@sum2012
Copy link
Collaborator

sum2012 commented Sep 2, 2022

I think that we might be need to check the mpeg.prx crc

@hrydgard
Copy link
Owner

hrydgard commented Sep 2, 2022

True, there might be multiple versions with different behaviors...

@sum2012
Copy link
Collaborator

sum2012 commented Sep 2, 2022

I don't know that how to do crc of disc0:/PSP_GAME/USRDIR/module/mpeg.prx
old code uint32_t crcvalue = Reporting::RetrieveCRC(gamepath)
cannot do it.

@sum2012
Copy link
Collaborator

sum2012 commented Sep 2, 2022

Anyway
update full debug of v1.13.1-653-g5200208a8 (bad)
and good ("Simulate UMD Delays" )
ppssppBADlog.zip
ppssppGOODlog.zip

@sum2012
Copy link
Collaborator

sum2012 commented Oct 1, 2022

Update full debug log to v1.13.2-1304-g16f93a268
bad and good ("Simulate UMD Delays" )
ppsspp_bad_log.zip
ppssppgoodlog.zip

@sum2012
Copy link
Collaborator

sum2012 commented Jan 10, 2023

v1.14.4-106-g765bfac01 still same.
Some info update,
18:12:998 user_main I[ME]: HLE\sceMpeg.cpp:462 sceMpegInit(), mpegLibVersion 0x104, mpegLibcrc 99de104f

@Sukotto-1999
Copy link

Sukotto-1999 commented Sep 28, 2024

I found more info! Turns out this game seems to have anti-piracy measure a la Aces of War where it crashes when the Taito logo is about to play. It seems the game checks the loading time to ensure it's being run off the real UMD. This is ACTUALLY confirmed to happen on real hardware. I compressed the game to CSO via PSP CSO Compressor and then tested it on 6.61 LME-2.3 and then boom it works! (Sources: Adrenaline on ConsoleMods Wiki, GBATemp Forum) Maybe i should have a permanent fix; Force UMD delays for this game.

@sum2012
Copy link
Collaborator

sum2012 commented Nov 2, 2024

@hrydgard Can add this game in ForceUMDDelay in compat.ini for v1.18 ?

@Panderner
Copy link
Contributor

Panderner commented Nov 2, 2024

Please note: this game only occurs for US (Bust a Move Deluxe) & Europe (Bust-a Move Ghost) version of the game. Japanese version of the game (Ultra Puzzle Bobble Pocket) does not occur this bug.

@Panderner
Copy link
Contributor

Only Japanese version of this game had a digital release.

@hrydgard
Copy link
Owner

hrydgard commented Nov 2, 2024

Alright, I'll add it! Sorry @Sukotto-1999 , I missed your message somehow. Thanks for the reminder @sum2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I/O Affected by I/O timing settings, or other kind of I/O issue. PSMF / MPEG Issue involves scePsmf or sceMpeg video playback.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants