Homebrew Citra - Unofficial \ Chinese builds discussion

granville

GBAtemp Goat
Member
Joined
Aug 24, 2007
Messages
5,102
Trophies
1
Age
35
Location
Orlando, Florida
XP
3,084
Country
United States
Anyone knows if they plan to implement internal overclock on the emulator?

I would imagine overclocking the internal CPU and GPU of the 3ds would lead to better performance on the games that have an unlocked framerate and i would consider it a great boon to have.
I think Citra already has something like this. Several games that had major framerate drops on the original 3DS run immensely better on the official Citra (using the Canary build).

Rayman 3D (a port of the Dreamcast version of Rayman 2) has severe framerate problems on original 3DS hardware. It actually has a 60fps cap, but it rarely reaches it and generally hovers in the 20-40fps range (can even occasionally drop below that). But on Citra, Rayman 3D maintains a constant 60fps.

Luigi's Mansion Dark Moon is another i'll bring up. Though it's more difficult to test and compare because the game is basically broken in Citra right now. It has garbled sound and freezes in the first level, so it's basically "unplayable". It also runs around half speed for me at anything above 2x native resolution (my pc isn't weak either, i5 4670k @4ghz and a GTX 1060). Even native res can drop to 87% full speed in some of the more open complex areas. So there are still a lot of unresolved issues, they're known by the developers and hopefully will be fixed in time.

Most people probably wouldn't know this given its general performance on the original system, but Dark Moon also has a 60fps cap. Only the smallest and most basic areas (rarely found) run at that. The vast majority of the game never breaks 30fps and frequently drops to 20fps and below in the larger and more complex rooms or during combat. Despite the emulation bugs, Citra is clearly attempting to run the game at a far higher framerate than the original system. Areas which were 20-30fps on original 3DS hardware are now actually 55-60fps.

Kingdom Hearts 3D and MGS3 Snake Eater had much lower framerate caps, but also have severe framerate dips in stressful parts that I believe Citra fixes. KH3D is capped at 30fps but frequently drops to 20 and below during intense combat. The 3DS port of Snake Eater is even worse with a 20fps cap, and it too drops far below even that on a fairly frequent basis, even single digits sometimes.

Unless someone creates a hack and/or cheat code to unlock the framerate (which is entirely possible and has happened for quite a handful of games on other systems like N64, PS2, GC, PSP, DS and even Wii U), Citra can't make them run better than their cap allows. But with KH3D and Snake Eater, i'm betting their drops below the caps are also fixed. I've done some preliminary tests with Kingdom Hearts 3D. Haven't tested beyond the first world yet (the worst fps drops are in the other worlds), but fought some battles and it has yet to dip below its 30fps cap. On a real 3DS, I would already have bumped into framerate problems by now.
 
  • Like
Reactions: xmeee978

drwhojan

Well-Known Member
Member
Joined
Jul 14, 2009
Messages
4,196
Trophies
1
Age
45
Location
Where I Am!
XP
1,702
Country
United Kingdom

warweeny

Well-Known Member
Member
Joined
Apr 25, 2011
Messages
319
Trophies
0
XP
1,140
Country
Netherlands
Hmm, frame limiter is broken, i want my game to run at 500%, but the emulator is just playing it as normal, no increase in speed whatsoever.

Any solutions?
 

drwhojan

Well-Known Member
Member
Joined
Jul 14, 2009
Messages
4,196
Trophies
1
Age
45
Location
Where I Am!
XP
1,702
Country
United Kingdom
@wwylele Sorry but my account was flagged, So Hidden.

Just to cadge up.. Yes first you will need that Pipe3 three branch to do this + Some fixes..

Like this Audio hle.cpp
Code:
void DspHle::Impl::PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer) {
    switch (pipe_number) {
    case DspPipe::Audio: {
        if (buffer.size() != 4) {
            std::copy(buffer.begin(), buffer.end(),
                      std::back_inserter(pipe_data[static_cast<std::size_t>(DspPipe::Audio)]));
            LOG_ERROR(Audio_DSP, "DspPipe::Audio: Unexpected buffer length {} was written",
                      buffer.size());
        case DspPipe::Binary: {
            if (buffer.size() != 8) {
                std::copy(buffer.begin(), buffer.end(),
                          std::back_inserter(pipe_data[static_cast<std::size_t>(DspPipe::Binary)]));
                return;
            }
        }
        }

I wonder how we implement ?, This is for the Pro's side of it like yourself..
Code:
DSP_DSP::ReadPipeIfPossible:456: channel=3, peer=0, size=0x0020, pipe_readable_size=0x0020

Into Citra Test

Ok We Wright in dsp_dsp.cpp like this

Code:
void DSP_DSP::ReadPipeIfPossible(Kernel::HLERequestContext& ctx) {
    IPC::RequestParser rp(ctx, 0x10, 3, 0);
    const u32 channel = rp.Pop<u32>();
    const u32 peer = rp.Pop<u32>();
    const u16 size = rp.Pop<u16>();
    auto pipe_readable = rp.PopStaticBuffer();

    const DspPipe pipe = static_cast<DspPipe>(channel);
    const u16 pipe_readable_size = static_cast<u16>(Core:D SP().GetPipeReadableSize(pipe));

    std::vector<u8> pipe_buffer;
    if (pipe_readable_size >= size)
        pipe_buffer = Core:D SP().PipeRead(pipe, size);

    switch (pipe) {
    case DspPipe::Audio:
        ASSERT(pipe_readable.size() >= 4);
        pipe_readable[0020] = 0020;
        break;
    }

    Core:D SP().PipeRead(pipe, pipe_readable);
---------------------
Leaving pipe_readable as error this needs to be written into Audio of hle.cpp and hle.h

This was recorded of wwylele teakra from Pokemon X/Y

Might be Audio as dsp_dsp.h says
Code:
    /**
     * DSP_DSP::ReadPipeIfPossible service function
     *      A pipe is a means of communication between the ARM11 and DSP that occurs on
     *      hardware by writing to/reading from the DSP registers at 0x10203000.
     *      Pipes are used for initialisation. See also DspInterface:P ipeRead.
     *  Inputs:
     *      0 : Header Code[0x001000C0]
     *      1 : Channel (0 - 7 0D ebug from DSP 1D -DMA 2:audio 3:binary 4-7: free ?)
     *      2 : Peer (0 = from DSP, 1 = from ARM)
     *      3 : u16, Size
     *      0x41 : Virtual address of memory buffer to write pipe contents to

Code:
DSP_DSP::WriteProcessPipe:372: channel=3, size=0x20, buffer_size=20
and
DSP::DSP_DSP::WriteProcessPipe:372: channel=2, size=0x4, buffer_size=4

So
Code:
    switch (pipe) {
    case DspPipe::Binary:
        ASSERT(buffer.size() >= 8);
        buffer[4] = 4;
        buffer[5] = 0;
        buffer[6] = 0;
        buffer[7] = 0;
        buffer[20] = 20;
        break;
    }

Is Correct, Strange how the size = the buffer numbers .

Ps, Can you also please re-base you're teakra into latest master and thanks ?
 

Attachments

  • citra_log.txt
    216.7 KB · Views: 185
Last edited by drwhojan,
  • Like
Reactions: JPXZ and xmeee978

wwylele

Well-Known Member
Member
Joined
Oct 17, 2015
Messages
151
Trophies
0
Age
28
XP
395
Country
China
@drwhojan You haven't answered my question: did you actually managed to pass the famous XY intro freeze, or you just assumed that you can?

I won't read your non-sense until you answer this question.
 
  • Like
Reactions: drwhojan

drwhojan

Well-Known Member
Member
Joined
Jul 14, 2009
Messages
4,196
Trophies
1
Age
45
Location
Where I Am!
XP
1,702
Country
United Kingdom
@drwhojan You haven't answered my question: did you actually managed to pass the famous XY intro freeze, or you just assumed that you can?

I won't read your non-sense until you answer this question.

EDIT: It might not be the same intro you where thinking off, this bypass the freeze just where the music dose kick on you're branch, Not where both boy are girl walks into the window starting a new game.

I was looking at your branch on the audio/music on this.. so its picking up what could be the music at 0020 , just like 4/1 are correct at 4/4 is the extra sounds at the start of this game..

Found here between the two video with and without
https://gbatemp.net/threads/citra-unofficial-chinese-builds-discussion.431974/page-445#post-8274023


buffer[20] = 20; bypassed you're freeze after the EDIT "Start into the Freeze at Music Part", You only had one msvc that did get compiled as they was a mingw issue at the time, but other last PR you had merged with local gitgui and msvc2017 compile .

BTW you will find only one
size=0x0020, pipe_readable_size=0x0020

Until you bypass the after EDIT "Start of game" into freeze then they will be "two lots of this" written into the citra log, where the Music dose kick in..

I need a new PR into a new master as it was some time ago when I did this last, I need a new screen shot with cmd command in background.

But that print in cmd can show the speed down some what.

--------------------- MERGED ---------------------------

Ok it will bypass the freeze off ^
https://ci.appveyor.com/project/wwylele/citra/build/1.0.870/job/0i8x38pppudsqprk/artifacts

54345.png


--------------------- MERGED ---------------------------

And wtf is this non-sense shit ?.. lol well "can't make an omelette without breaking some eggs" as old saying goes..

It was mentioned buy others from github that having the missing music should fix the freeze after intro..
 
Last edited by drwhojan, , Reason: info added and image.

player594

Well-Known Member
Member
Joined
Dec 25, 2006
Messages
458
Trophies
1
XP
1,897
Country
United States
@drwhojan You haven't answered my question: did you actually managed to pass the famous XY intro freeze, or you just assumed that you can?

I won't read your non-sense until you answer this question.
Dude, dev or not, that was an uncalled for insult to drwhojan. Give respect if you want respect in return. Stop acting like an elitist.

Sent from my SM-G955U using Tapatalk
 

drwhojan

Well-Known Member
Member
Joined
Jul 14, 2009
Messages
4,196
Trophies
1
Age
45
Location
Where I Am!
XP
1,702
Country
United Kingdom
Dude, dev or not, that was an uncalled for insult to drwhojan. Give respect if you want respect in return. Stop acting like an elitist.

Sent from my SM-G955U using Tapatalk

Yes true, but some what was my fault as I meant freeze by where the music kicks in on his branch and not where it starts a new game freeze, I should have worded it better.

Not that its getting little hard for me to think correctly lately, 27 years of T1 Diabetes is starting to get at me a bit with the eyes / memory and goes a little down hill after over 40 for sure, Could possible go blandness in one, As have to go for eye laser surgery, O well is life.

It just sends my mood down a little for a day are so, but will pick back up again this sort of thing from people.

Thanks for you're kind words mate!.
 
Last edited by drwhojan, , Reason: added info
  • Like
Reactions: Sedhaild

wwylele

Well-Known Member
Member
Joined
Oct 17, 2015
Messages
151
Trophies
0
Age
28
XP
395
Country
China
Dude, dev or not, that was an uncalled for insult to drwhojan. Give respect if you want respect in return. Stop acting like an elitist.

Sent from my SM-G955U using Tapatalk
First of all, I need to clarify a point: I have already given up getting respect from drwhojan. If you look back the history of this thread, I, along with other devs, have been trying to pay respect to him (and everyone), but what I got is either equivocate reply, ignoring, and disrespect on the open source spirit. I do understand and highly agree with you on the truth of "Give respect if you want respect in return" - and also in turn, if I don't want ones respect, I don't have to pay respect to them any more.

Second, even though I don't expect respect, I think my "anti-insult" subconscious functionality was still working when I made that post, because what I described, although probably too straight forward (because I figured euphemism didn't work for him), was merely describing and asking for facts. Let me analyze my own words for you:

"You haven't answered my question"
You probably didn't know this so I don't blame you. I have asked the same question below on github (probably twice) but he hadn't answered it; instead he kept turning aside from topic to something else

"did you actually managed to pass the famous XY intro freeze, or you just assumed that you can"
This was asking to clarify his previous (again) equivocate comment "this fixes the intro freeze", and I enumerated the two possibilities that I can think of when one seems like describing a "near-fact": tested or assumed.

"I won't read your non-sense"
OK I lied a little: because I indeed first read some of his other material on github, I already knew that what he wrote was non-sense. The word "non-sense" here describes a technical state, where what he said or did didn't make sense by logic, and/or by some simple hacking knowledge. I know the "hacking knowledge" is probably too much to say here (I can continue if you want to read), so let me just give one simple example of non-sense he did: he opened a PR on github to the master branch, in order to fix a bug that exists in MY fork but doesn't exist in the master branch. (See the post above https://gbatemp.net/threads/citra-unofficial-chinese-builds-discussion.431974/page-450#post-8366749)

"until you answer this question"
This is for the sake of fairness. He kept asking me to read (and accept) what he wrote, while refusing to directly answer my question (which came from me reading his stuff). It is unfair to me if I have to accept his thing without being able to question it.

As you can see, I managed to make my words insult-free (even if I intended to insult). If one still call this insult and say I was acting like an elitist, then they are the one who find themselves weak and who admit that who lower themselves in front of me. If you are not such person, stop being hypocritical to help those who treat themselves weak, and do real talk with me. I am even fine if you "act like an elitist" over me. What I am not fine with is acting weak and attacking me from moral high ground.
 
Last edited by wwylele,

drwhojan

Well-Known Member
Member
Joined
Jul 14, 2009
Messages
4,196
Trophies
1
Age
45
Location
Where I Am!
XP
1,702
Country
United Kingdom
@wwylele It did not bypass the famous freeze.

Only the freeze on your Teakra branch where the "Music" kicks in, that gives a interesting read of

DSP: : DSP_DSP::WriteProcessPipe:372: channel=2, size=0x4, buffer_size=4
DSP_DSP::WriteProcessPipe:372: channel=3, size=0x20, buffer_size=20

And
DSP_DSP::ReadPipeIfPossible:456: channel=3, peer=0, size=0x0020, pipe_readable_size=0x0020

By implementing in DSP_DSP

buffer[4] = 4; = Extra sounds fix in pm x/y
buffer[20] = 20; = Fixes the Freeze in your Teakra Branch where the "Music" kicks in

Then they are two lots of
DSP_DSP::ReadPipeIfPossible:456: channel=3, peer=0, size=0x0020, pipe_readable_size=0x0020

pipe_readable[0020] = 0020; = Unknown..

Written into the citra_log.txt log

So its it possible on a test ?, If written into audio three locations,that ReadPipeIfPossible size and pipe_readable could fix the Music either Audio are Binary it seems to be mostly working on the Binary..

I hope to try and make it clear ?

PS: I Don't care if it's a Hack for Now, This is for only local Testing..
 
Last edited by drwhojan, , Reason: Added Info.

drwhojan

Well-Known Member
Member
Joined
Jul 14, 2009
Messages
4,196
Trophies
1
Age
45
Location
Where I Am!
XP
1,702
Country
United Kingdom
@wwylele Fire Emblem Warriors Fixed and Broken by #4392
https://github.com/citra-emu/citra/pull/4392

Needs Investigating ? :wtf: , Must have been some think added much later time...

Gone into Panic mode.
------

When tested it on a Working Build it dose CreateMemoryBlock

Code:
Kernel.SVC <Warning> core\hle\kernel\svc.cpp:Kernel::CreateMemoryBlock:1169: called addr=0x005FC000
Kernel.SVC <Warning> core\hle\kernel\svc.cpp:Kernel::CreateMemoryBlock:1169: called addr=0x005FE000
Kernel.SVC <Warning> core\hle\kernel\svc.cpp:Kernel::CreateMemoryBlock:1169: called addr=0x005FD000
Service.IR <Info> core\hle\service\ir\ir_user.cpp:Service::IR::IR_USER::InitializeIrNopShared:258: called, shared_buff_size=4096, recv_buff_size=82, recv_buff_packet_count=1, send_buff_size=18, send_buff_packet_count=1, baud_rate=4

For This Game ^
 
Last edited by drwhojan, , Reason: Added Info.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    as to you
  • K3Nv2 @ K3Nv2:
    How do you know if the night will be good when you're asleep
  • BakerMan @ BakerMan:
    because i didn't say i was asleep
  • BakerMan @ BakerMan:
    i said i was sleeping...
  • BakerMan @ BakerMan:
    sleeping with uremum
  • K3Nv2 @ K3Nv2:
    Even my mum slept on that uremum
  • TwoSpikedHands @ TwoSpikedHands:
    yall im torn... ive been hacking away at tales of phantasia GBA (the USA version) and have so many documents of reverse engineering i've done
  • TwoSpikedHands @ TwoSpikedHands:
    I just found out that the EU version is better in literally every way, better sound quality, better lighting, and there's even a patch someone made to make the text look nicer
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
    The Real Jdbye @ The Real Jdbye: never had that i don't think