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

Danganronpa bug #1686

Closed
CPkmn opened this issue May 5, 2013 · 180 comments

Comments

Projects
None yet
@CPkmn
Copy link
Contributor

commented May 5, 2013

I tried a search in the issues here to see if anyone reported this yet, but it seems no one did.

While playing Danganronpa (both the demo and the full release) in PPSSPP I noticed objects are not interactable. This basically makes the game unplayable since the requires object interaction on many occasions. I notice the same issue on JPCSP, however the software rendering mode in JPCSP works with the objects (and has since at least revision 2450, the first software rendering public release; https://code.google.com/p/jpcsp/source/detail?r=2450). Unfortunately I can't check earlier releases' software rendering modes since I don't know how to compile JPCSP.

I'll attach a picture of what PPSSPP and JPCSP (in software rendering mode) get when hovering over a should-be-interactable object.

(JPCSP in software rendering mode)
danganronpa_correct

(PPSSPP)
danganronpa_wrong

@hrydgard

This comment has been minimized.

Copy link
Owner

commented May 5, 2013

I bet it reads pixels using the CPU to figure out what's under the cursor, or something like that. Hard to emulate without readbacks at just the right moment or software rendering.

@CPkmn

This comment has been minimized.

Copy link
Contributor Author

commented May 5, 2013

I noticed something else interesting :

When you use software rendering in JPCSP, then switch out of software rendering, the objects are detectable.

danganronpa_correct_nonsw

This makes the graphics nicer, however every time a scene comes up this would need to be done (which would be annoying)

@sum2012

This comment has been minimized.

Copy link
Collaborator

commented May 6, 2013

@CPkmn
I have a post of this game
#844
edit:I don't need to enable software rendering.Leave all setting blank.I am using Nvidia card

@CPkmn

This comment has been minimized.

Copy link
Contributor Author

commented May 12, 2013

@sum2012 thanks. I did some testing after hearing that.

I noticed when changing some options, more specifically the "Save GE screen to Textures instead of Memory" needed to be turned off in order to emulate the cursor correctly (other options didn't affect the cursor issue). Would it be possible to save the GE screen to Memory in PPSSPP? Just curious.

@unknownbrackets

This comment has been minimized.

Copy link
Collaborator

commented May 12, 2013

It may be possible using e.g. glReadPixels. That's #618. Doing it too often could cripple performance.

-[Unknown]

@HermitCrap

This comment has been minimized.

Copy link

commented Jun 24, 2013

Is there a way to fix this? Or is it possible to make a beta version with the glReadPixels and test it out since the newer versions of PPSSPP is now pretty stable? The performance is also pretty good, maxed out settings getting 60VPS thought I disable them all as there are graphical glitches in some other games except for V-Sync to prevent tearing. I referring to turning off the "Save GE screen to Textures instead of Memory" for the beta inclusion of course.

@CPkmn

This comment has been minimized.

Copy link
Contributor Author

commented Jun 24, 2013

Actually there is something interesting about this case.

PPSSPP works for Danganronpa's Nonstop Debates (demo and full version), but not when investigating/exploring.

Yes, the GE screen->Memory (disabling save GE screen to Textures) seems to be the solution. I would work on implementing that, but I'm not exactly sure where it would go in PPSSPP's coding. I know where to find it in JPCSP's coding though.

Just started a nonstop debate in PPSSPP on the full version ~

danganronpa_debate_begin

(Don't mind the red square; I don't want to spoil who died since there will probably be many new players because the translation was very recently released)

@HermitCrap

This comment has been minimized.

Copy link

commented Jun 24, 2013

LOL, I accidentally spoil myself with who the mastermind is even before I played the game when I was reading the player profiles on the wikia -_- Will take a look at the source and continue the talk in thread #618.

@doggydogworld

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2013

For the Nonstop Debates, I think the game uses its own rectangular hitboxes. After all, it's possible for the user to fire the bullet at a small crevice in the middle of the text glyphs, and I believe that that counts as a hit.

@HermitCrap

This comment has been minimized.

Copy link

commented Jun 24, 2013

I believe it's more like an entity. Like an enemy in a game that will interact with you unlike the investigation which uses "pixel detection" since it's part of the background. Since the words will move around in the debate unlike the items which stay in place like the background or doors etc thus being unable to interact as well. The only way to fix it is to implement #618.

@arnastia

This comment has been minimized.

Copy link
Contributor

commented Jun 25, 2013

I took a stab at this and I seemingly managed to fix the problem basically by calling glReadPixels whenever a framebuffer object was either displayed (in FramebufferManager::CopyDisplayToOutput()) or switched for a new one for rendering (in FramebufferManager::SetRenderFrameBuffer(); Danganronpa draws a certain FBO every frame but never actually displays it) and Memcpy'ing the results to the address the game expects them to be in. Since just calling glReadPixels won't yield the correct results when the user's playing in a larger render resolution, whenever needed I use a separate, native resolution FBO blit'd with glBlitFramebuffer to resize the render and get glReadPixels to return the correct data (well, likely not as correct as if it were originally rendered 1x, but at least for 2x linear filtering seems close enough).

While I didn't really try to measure it, I have a feeling this did have a slightly noticeable negative impact on performance (just doesn't seem to flow as nicely?). Framerate-wise the game seems completely playable, though I only tried it on a fairly decent desktop PC. Eitherway, this is a hackish fix, but should keep folks wanting to play the translation happy.

I didn't post this in #618 for now since though the end problem is the same, the approach I took is slightly different because Danganronpa doesn't call sceDmacMemcpy.

I'll get around to pushing the branch online tomorrow, since it's fairly late here right now.

Other than this, the game seems to have two other problems, that would probably be better off on different issues, but I'll just list them briefly here:

  • Occasionally messages are displayed as gibberish, though they usually redisplay nicely after a few seconds.
  • Voices completely die out if text dialogs are advanced too fast. Afterwards only saving/resetting/loading the game brings any voice back.
@HermitCrap

This comment has been minimized.

Copy link

commented Jun 25, 2013

I believe the voice problem is an issue with the atrac3+ plugin as the sound in other games that require it sounds horrendous. This problem can be ignored for now until someone comes up with a better atrac3+ option since the Devs do not want to use the current plugin. The displayed message is fixed for me when I enable buffered rendering for some reason. I only get them when I fast forward it to unlimited, I would then have to rest the game for it to work. Looking forward to your build, I shall test them for you as well. Cheers! :)

@unknownbrackets

This comment has been minimized.

Copy link
Collaborator

commented Jun 25, 2013

Copying to memory all the time is definitely gonna have a performance impact. I think we need to find a smarter method.

The gibberish is the texture cache. It corrects itself, and notes that those textures are "annoying." There might be options to improve its detection.

I think this game also uses that atrac context thing, so it will probably be helped when Sol Trigger et al are.

-[Unknown]

@CPkmn

This comment has been minimized.

Copy link
Contributor Author

commented Jun 25, 2013

@unknownbrackets The game does use _sceAtracGetContextAddress for its voices.
Interestingly, I notice some values JPCSP sets in memory during _sceAtracGetContextAddress that PPSSPP doesn't yet. I was thinking of getting around to checking them out soon, but I haven't missed any voices while playing the debates in the demo and full version so far (although the voice volume is a little lower than it should be - that might just be my problem though since I don't use the same sceAtrac as you guys anymore).

@HermitCrap

This comment has been minimized.

Copy link

commented Jun 25, 2013

@CPkmn, Can you tell me how to get the custom sceAtrac you got? I think it's alright if it is soft as most Android device can't handle the extreme loudness of most game, Oreimo give my speaker tearing to the point I stop playing it. Playing it on the PC on the other hand is alright. Still, I rather have working sound than loud sound.

@unknownbrackets, I think it's alright to retain this idea for now right? At least for experimental PC builds since most texture in 3D games also save their Graphics to VRAM. I think it will only affect the performance on Android device. Since the above method only works ideally when on 1x Rendering Size, I believe the performance won't be too big. Maybe you could try implementing it and experiment with it? Since this can fix some games at the moment.

@hrydgard

This comment has been minimized.

Copy link
Owner

commented Jun 25, 2013

If copying to memory every frame is what it takes, then we might just have to do it. It will probably make things unplayable on many mobile devices so we might have to do it as a per-game option, when I add support for that...

@fagoatse

This comment has been minimized.

Copy link

commented Jun 25, 2013

It could be implemeneted as a hack. However, if this function is used extensively in many games, a multithreaded software renderer like in pcsx2 would solve majorty of gfx issues and would be fast enough on modern x86 cpus. Displaying at the native resolution only isnt much of drawback either as there are many 2D games or games that scale poorly(3D on 2D background etc).

@CPkmn

This comment has been minimized.

Copy link
Contributor Author

commented Jun 25, 2013

@HermitCrap I've been working on modifying things in my local copy for about a month now; you can't find it anywhere since I haven't released it, nor should you guys need my local copy since there is already a working version in the master.
I just prefer mine is all.

Anyways, what I mean by "I don't miss any voices" is all voices have played for me so far, and just about all of them play fully, but a select few cut off a few words early (but they do play).

Also, I tried implementing memory writes in _sceAtracGetContextAddress according to JPCSP but I didn't notice anything different.

@hrydgard

This comment has been minimized.

Copy link
Owner

commented Jun 25, 2013

@fagoatse yes, adding a software renderer is also solution that will work, although that's a lot more work than glreadpixels and an extra fbo.

@HermitCrap

This comment has been minimized.

Copy link

commented Jun 25, 2013

@CPkmn, For me, It's when I skip a dialogue, the voice just stop playing for the whole game until I reset even for the master version. I think you should consider implementing your copy as the main for the coming release :P Software rendering will make games like Dangan Ronpa work and not suffer so much for Android device. But I still think that implementing this for experimenting should be a good idea just for the PC and Super Duper High Sch... End Device! The best way to do this now is to either make a per-game option or a GE Profiler now.

@CPkmn

This comment has been minimized.

Copy link
Contributor Author

commented Jun 25, 2013

@HermitCrap you mean like if you press X in the middle of the sentence, no more voices will play? Anyways, I have no intention of committing my modifications of sceAtrac (at least, not the majority of them). Most of what I've done no longer applies to the master since I don't use Mai's AT3+ decoder.

@HermitCrap

This comment has been minimized.

Copy link

commented Jun 25, 2013

@CPkmn, Yeah, that's what I meant. How did you get the sounds to work without the decoder? SoundSonic? Mai's AT3+ Decoder is pretty buggy. Seems like I just gotta wait for someone to make another from the source and not Whitebox Reverse Engineer it.

@CPkmn

This comment has been minimized.

Copy link
Contributor Author

commented Jun 25, 2013

@HermitCrap Mine works perfectly when I do that. I have a special trick for decoding my atrac3(+) sounds, but like I said, mine isn't the same as the master. Some of the methods I use have either been removed or have changed in the master while I was working on mine.

@HermitCrap

This comment has been minimized.

Copy link

commented Jun 25, 2013

@CPkmn, can you upload your copy of the source to your PPSSPP Repository/fork or make a pull request to Hrydgard's repo? I your coding for the sound will be beneficial to the devs and users since Mai's decoder is rather unreliable.

@CPkmn

This comment has been minimized.

Copy link
Contributor Author

commented Jun 25, 2013

@HermitCrap You mean my version of sceAtrac, right? I can't pull request my copy of the game (and, well, it would be illegal if I did). The version I've been working on may be better for some things, but I only intended it to be personal - that is, the code doesn't contain comments (or, nothing besides the ones left originally) and is sorta messy. I'm not interested in having a lot of questions to answer if I was to send a pull request with it (and I'm sure there would be questions upon being reviewed). I don't see it as a priority since you guys already have a way to listen to sceAtrac music. :p

Also, I just added arnastia's fix to my local copy and I can confirm it works.

fbo_fix
I don't notice any lag either.

@lKomus

This comment has been minimized.

Copy link

commented Jun 26, 2013

Using PPSSPP 0.8.1-37 with framebuffer with memory on, I can examine items in Investigation Mode, but not all the items you examine are the right ones, like you want to examine the drawer but you end examining a lint roller.
This prevents progression very early in the game in chapter 1 where you must examine everything in your room, but no matter what you do, you can't examine your drawer.

Link for the save : http://www.mediafire.com/?mjzbhfdvrecycu2

@arnastia

This comment has been minimized.

Copy link
Contributor

commented Jun 27, 2013

Well, I know you can get past that because some people I compiled the code for before I even pushed it here had already got out of the room. I'm writing some changes to the code, but I tried your save right now and on my version I can examine the drawer.

What I'm guessing can happen is the blitting of the framebuffer to a smaller resolution giving edges weird values because of the filtering, which should only happen if you were playing at 2x or above render resolution. Try to either play at 1x render resolution when that happens or maybe just change the viewing angle or position of the cursor a little.

@Zindolence

This comment has been minimized.

Copy link

commented Jun 27, 2013

I'm encountering the same problem as lKomus (as well as several other people from various forums).
I tried to play at 1x render resolution, then disabled every option in graphics save for buffered rendering (since it's required for your fix), and finally tried V-sync on. None of those worked, and I reloaded my save before each try. I deactivated anti-aliasing/anisotropic filtering/texture scaling as well.

On top of the room IKomus mentioned, I met another instance where the locations of items were wrongly swapped. In the prologue, after the first classroom, when you're in the hallway trying to enter the toilet doors will point to wrong locations. About the investigation part with the drawer sending you to the lint roller : changing the camera angle unfortunately doesn't help. I even tried to point the cursor everywhere on the screen, including blank spaces, but the game never seems to find the drawer.
I haven't gone further than chapter 1 but there might probably be other similar instances. The same bug happened on JPCSP as well, and temporarily switching to software rendering was the only solution.

If that is of any indication, I am using rev v0.8.1-41-ge440fa6 on Win8 64Bit, with an AMD HD7850 video card and an i3 3220 processor. I'm suspecting this bug might have to do with hardware since some people are unaffected.

@yugioh5552

This comment has been minimized.

Copy link

commented Jul 13, 2013

can someone give me step by step directions on FramebufferstoMem = True and such.....

Edit: I found it but every time i use it ppsspp just crashes

@rendy911

This comment has been minimized.

Copy link

commented Jul 16, 2013

i have problem with SDR 2 can't interact object and character

how to fix it?
I have set the FramebufferstoMem and FramebuffersCPUConvert to True and buffered rendering on

@CPkmn

This comment has been minimized.

Copy link
Contributor Author

commented Jul 16, 2013

@rendy911 my build seems to work fine with interacting with objects and characters in SDR 2.

screen00021

Not sure what's wrong with the official build though.

@feRfe

This comment has been minimized.

Copy link

commented Jul 16, 2013

how can we usey our build then?

@Nezarn

This comment has been minimized.

Copy link
Contributor

commented Jul 16, 2013

@CPkmn if your build is better in x games then why dont you upload your source code so that ppsspp devs can see it and fix up the master ? :/

@rendy911

This comment has been minimized.

Copy link

commented Jul 17, 2013

@CPkmn what's your build?

@rendy911

This comment has been minimized.

Copy link

commented Jul 17, 2013

bug
my build

@CPkmn

This comment has been minimized.

Copy link
Contributor Author

commented Jul 18, 2013

@rendy911 I use a custom build. Unfortunately it's overbright whenever the sun is around (ie on the beach and islands) but it detects people and objects to interact with.

screen00031

@adhitiyad

This comment has been minimized.

Copy link

commented Jul 19, 2013

I'm playing Danganronpa, now in Chapter 2 Class Trial
until suddenly this appears http://puu.sh/3BQ6a
ss 2013-07-13 at 06 41 25

I've tried to start over but now it always crashed here http://puu.sh/3BQAR
ss 2013-07-13 at 07 03 23

I have set the FramebufferstoMem and FramebuffersCPUConvert to True, but I set off the Buffered Rendering (F5) sometimes because it's laggy, I only used it in investigation.
Btw I use Nvidia and the latest version of PPSSPP (v0.8.1-549-g8eab028)
Do you guys know how to fix this?
Thanks before :)

@ScarletRhapsody

This comment has been minimized.

Copy link

commented Jul 20, 2013

I've been trying to emulate Danganranpa on the latest version of PPSSPP but for some reason no matter what I try, the cursor still won't function properly, either that or it crashes upon startup. If its of any help, my GPU is something from intel; can't remember the specific name

@adhitiyad

This comment has been minimized.

Copy link

commented Jul 20, 2013

I've post my problem here for a week (and repost it three times) and got exactly no response. What should I do? I really need to play this game.

@MB48

This comment has been minimized.

Copy link

commented Aug 3, 2013

Did anyone get this to work on Android?
On android it works with framebufferstomem, however this cauises the FPS to drop from 60 to 4, rednering it unplayable.

Any way to play this with "Buffered Rendering" enabled?

Talking about the cursor not being able to select objects.

@scraggles80

This comment has been minimized.

Copy link

commented Aug 4, 2013

@adhitiyad
if you really need to play it
play it on your psp

@woonie

This comment has been minimized.

Copy link

commented Aug 6, 2013

I'm currently on v.0.8.1-125, playing SDGRP2. Both my friend and I couldn't select on this Hidden Monokuma:
screen00074

as it would cause the desk to be selected instead.
screen00075

I also face a problem selecting Togami's cottage as it would redirect me to Souda's instead.
Any possible fixes?

@bebis

This comment has been minimized.

Copy link

commented Aug 6, 2013

Er, okay I go through the ppsspp.ini file and I can't find anything that says Framebufferstomem, is something wrong?

@lKomus

This comment has been minimized.

Copy link

commented Aug 6, 2013

@bebis In the newer dev builds, this option is not in the .ini anymore, now you must go in the graphics settings of PPSSPP and either tick Read Framebuffers to Memory (CPU) or (GPU).

@bebis

This comment has been minimized.

Copy link

commented Aug 6, 2013

@lKomus I'm not seeing anything that says that either, do i still need to do something before I go to settings am I missing something?

@lKomus

This comment has been minimized.

Copy link

commented Aug 6, 2013

@bebis I think you've downloaded the official 0.8.1 version, to get the "Framebuffers to Memory" option you need to download a development build, you can find them at the bottom of the download page of the PPSSPP website.
Take the most recent one that you can download for your OS.

@bebis

This comment has been minimized.

Copy link

commented Aug 6, 2013

@lKomus Alright, found that but whenever I try to load Dangan Ronpa it seems to crash immediately after (uugh sorry for asking so many questions)

@lKomus

This comment has been minimized.

Copy link

commented Aug 6, 2013

Weird, that shouldn't happen. Maybe check that you downloaded the x64 build if you have a 64 bits Windows (right click on "Computer" and choose Properties to know if you have a 32 or 64 bits Windows).
Worst-case scenario you can wait for the official 0.9 version which should come out in one or two weeks if it's planned for Mid-August.

@ghost

This comment has been minimized.

Copy link

commented Aug 7, 2013

Yeah, I think I have a problem similar to bebis'.

Right now, I'm using a computer with Windows XP, and it's happening with me.

Thing is, whenever I try using the latest format of PPSSPP, Dangan Ronpa starts - and you know this because of the music playing - it gives me a black screen and refuses to show me any images. When I tried going into the older versions of PPSSPP, like v0.8.1-430-g0019666 or v8.1-370-g87f6d14, instead of it giving me a black screen whenever I attempt to load Dangan Ronpa it'll just crash with a message popping up saying that it's not responding and that a problem has occurred.

My problem isn't about me even trying to get anywhere in the game, it's about me being able to even start the game itself.

@thedax

This comment has been minimized.

Copy link
Collaborator

commented Sep 25, 2013

Should we close the issue, since the game is playable via Read FB to Memory (CPU/GPU)? Or should we keep it open in the hope that we won't need this hack one day?

@hrydgard

This comment has been minimized.

Copy link
Owner

commented Sep 26, 2013

It will always require Read FB or softgpu. So closing.

@hrydgard hrydgard closed this Sep 26, 2013

@woonie

This comment has been minimized.

Copy link

commented Sep 26, 2013

So um, is anyone able to help with my issue from 2 months ago? #1686 (comment)

@lKomus

This comment has been minimized.

Copy link

commented Feb 28, 2017

No.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.