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

Add citro[23]d based 3dsui #1422

Merged
merged 6 commits into from Oct 4, 2018

Conversation

Projects
None yet
3 participants
@Ghabry
Member

Ghabry commented Sep 25, 2018

Fix #1398

Most of the code is by carstene1ns, I just did tons of performance tuning.

carstene1ns and others added some commits Jul 29, 2018

Change RTP Table from map of std::string to const char*. Fixes a segf…
…ault on 3ds (maybe stack overflow).

This reduces compile time and function size significantly (because the std::string constructor doesn't need to run?).
The function size was probably the problem on the 3ds.
@carstene1ns

This comment has been minimized.

Member

carstene1ns commented Sep 26, 2018

Open question is if we want to do the top screen stuff with pure c3d instead (the only thing c2d is doing for us here is centering the image and abstract away some texture stuff).

Also, maybe is not a good idea to ship the whole midi patchset with every 3dsx. Needs some hardware test, but i think shipping a minimal soundfont (GMGSx.sf2 - info, download) and fluidlite might be better for 3DS.

@carstene1ns carstene1ns added this to the 0.5.4 milestone Sep 26, 2018

@Ghabry

This comment has been minimized.

Member

Ghabry commented Sep 26, 2018

Good point. Do you have any working sample code for rendering the texture with citro3d?

I fully agree that this huge patch file is terrible and a smaller file would help almost every port. Also bonus points for "It sounded like standard Microsoft GM.dls from Roland". But we need upstream fluidlite support first ;).

// reset state
touch_state =
touch_state == 1 ? 2 :
touch_state == 2 ? 2 : 0;

This comment has been minimized.

@carstene1ns

carstene1ns Sep 27, 2018

Member

This does not really make sense to me.

This comment has been minimized.

@Ghabry

Ghabry Sep 27, 2018

Member

This is for improving the frame rate by only redrawing the bottom screen when a touch happened (1) or one frame after a touch is finished (2). I can improve the naming.

This comment has been minimized.

@carstene1ns

carstene1ns Sep 27, 2018

Member

I understand what it should do, just the logic seems off here.

1 → 2
2 → 2 ?
0 → 0 ?

This comment has been minimized.

@Ghabry

Ghabry Sep 28, 2018

Member

When 2 it stays in 2 because the reset to 0 is in "UpdateDisplay". I can't reset it to 0 here because when there is a frameskip "UpdateDisplay" will miss the chance for a redraw.

This comment has been minimized.

@Ghabry

Ghabry Sep 28, 2018

Member

but maybe I can replace it with an if, because there is only one case where the value changes ;)

This comment has been minimized.

@Ghabry

Ghabry Sep 28, 2018

Member

replaced that nonsense with an if ^^', don't be sleepy and code I guess ;)

GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO));
// Doing this after FrameBegin corrupts the output, probably because this
// is asynchronous and FrameBegin will block until it finishes

This comment has been minimized.

@carstene1ns

carstene1ns Sep 27, 2018

Member

Actually C3D_FRAME_SYNCDRAW was used here before.

This comment has been minimized.

@Ghabry

Ghabry Sep 27, 2018

Member

I have no idea what C3D_FRAME_SYNC is supposed to do, I always got corrupted output when using it. It will wait for the GPU when you pass "0", But when you pass "0" it will wait until the GPU is ready, as the C3D_FRAME_NONBLOCK doc says: "Return false instead of waiting if the GPU is busy", therefore "0" should mean: Wait.

@fdelapena

3dsx and cia test builds from downloads/tmp boot in Citra 👍

@carstene1ns

This comment has been minimized.

Member

carstene1ns commented Oct 4, 2018

I am thinking of letting this state be 0.5.4. Further optimizations can come later with 0.6.0 (or when something breaks again)

@carstene1ns

Need to approve here ;-)

@carstene1ns carstene1ns merged commit 1c42e33 into EasyRPG:master Oct 4, 2018

7 checks passed

Android (armeabi-v7a) Build finished.
Details
GCW0 Build finished.
Details
GNU/Linux Build finished.
Details
OSX Build finished.
Details
Windows (x64) Build finished.
Details
Windows (x86) Build finished.
Details
web Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment