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

Add Nintendo 3DS port #869

Merged
merged 81 commits into from
Apr 27, 2016
Merged

Add Nintendo 3DS port #869

merged 81 commits into from
Apr 27, 2016

Conversation

Ghabry
Copy link
Member

@Ghabry Ghabry commented Apr 19, 2016

Finally! Thanks to @Zegeri for the initial port and @Rinnegatamante for bringing the prototype in a usable state over the last weeks :).
Together with my performance improvments we went up from 16 FPS to ~56-59 FPS on old 3DS for the TestGame world map.

What makes this port special is that it does not depend on SDL and that it has a dedicated maintainer giving this port much more love.
This currently lacks MP3 and MIDI support, which will come later when mpg123 and fmmidi integration are pushed upstream.

Rinne is still adding code daily, so I suggest waiting a few more days and I will cherry pick his stuff... :)

This branch uses a slightly altered Makefile. Compile steps needed:

export TOOLCHAIN_DIR=[easyrpg_3ds_toolchain-dir]
# LIBLCF is extra because this is our lib and needs recompiles
export LIBLCF_DIR=[liblcf_crosscompile-dir]

cd builds/3ds
make -j2

Fixes #863

@Ghabry
Copy link
Member Author

Ghabry commented Apr 19, 2016

The commit order looks a bit wrong. Some of my commits are placed in between Rinnes o.O

@Ghabry
Copy link
Member Author

Ghabry commented Apr 19, 2016

But a local git log shows the correct order. Probably gets confused because of the dates.

Or here: https://github.com/Ghabry/easyrpg-player/commits/3ds

@@ -117,7 +117,7 @@ void Graphics::Update(bool time_left) {
fps = 0;

next_fps_time = current_time + 1000;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eeek

@Rinnegatamante
Copy link
Member

A little thing. Release build should be compiled with -DNO_DEBUG and -DUSE_CACHE since right now NO_DEBUG will substitute bottom screen keyboard with a debug console and USE_CACHE allows usage of sounds cache (essential for a good stable framerate on a lot of games).

@Ghabry
Copy link
Member Author

Ghabry commented Apr 19, 2016

My build crashes on the 3DS but works in Citra :(

@Rinnegatamante
Copy link
Member

Rinnegatamante commented Apr 19, 2016

My repository compiles fine and works, if you need, i can send you MD5 checksums for libctru/libsf2d/libkhax.

@Ghabry
Copy link
Member Author

Ghabry commented Apr 19, 2016

Which toolchain do you currently use? Could you try with the latest I linked in the forum: https://community.easyrpg.org/t/working-on-a-3ds-port/201

And did you compile your repository or my pull request?

@Ghabry
Copy link
Member Author

Ghabry commented Apr 21, 2016

Update: Found the crash reason \o/

@Ghabry Ghabry force-pushed the 3ds branch 4 times, most recently from 3e9081a to d696a34 Compare April 21, 2016 19:57
@Ghabry
Copy link
Member Author

Ghabry commented Apr 21, 2016

The 3DS build is ready now and works 👍 . There are some toolchain problems but they are not Player related. Something with pixman is wrong, my older lib of it works. hm

img_2817
img_2819

@Rinnegatamante
Copy link
Member

Nice! :P I think the icon i'm currently using in my repo is cooler however <.<

@Ghabry
Copy link
Member Author

Ghabry commented Apr 21, 2016

The problem with your icon is that it doesn't follow the EasyRPG branding. <.<
But you make a valid point because the HB launcher lacks background alpha

@Rinnegatamante
Copy link
Member

It's just a zoomed version of the EasyRPG logo.

@Ghabry Ghabry force-pushed the 3ds branch 2 times, most recently from 55e7707 to 2916847 Compare April 21, 2016 20:44
@Ghabry
Copy link
Member Author

Ghabry commented Apr 21, 2016

Replaced the icon with a rectangular one.

@Rinnegatamante
Copy link
Member

I've noticed you have deleted the buildscript for CIA generation. What about it? It should be included in releases i think.

@Ghabry
Copy link
Member Author

Ghabry commented Apr 21, 2016

I skipped that commit because it contained lots of Windows binaries.
I will manually readd everything except the exe/dll files.

Jenkins will also offer a elf file to make creating CIAs easier.

@gnmmarechal
Copy link

gnmmarechal commented Apr 21, 2016

Hum, you managed to actually put the whole icon in there. Although it probably will look weird on gridlauncher cuz the transparent part will be black. I'd rather have the zoomed-in one. In fact, the one I uploaded at my server for the easyRPG Updater to use if no icon is found is a zoomed-in EasyRPG icon (because pixelation occurs if I decrease the size of the icon too much). Also, I like the square.

Just looked at Ghabry's icon, looks different, but quite nice.

@Ghabry
Copy link
Member Author

Ghabry commented Apr 22, 2016

I want to replace the sample if the CIA channel with one that we also (plan) to use for the Wii channel.
I read on gbatemp that the maximal WAV length is 3 seconds. But I don't trust gbatemp and don't see this documented anywhere. Can you confirm @Rinnegatamante

@Rinnegatamante
Copy link
Member

Rinnegatamante commented Apr 22, 2016

Not really 3 secs but something really near, like 3.4 secs. Also 3D models can be loaded so it could be cool to create a little model for the banner. (You can use Ohana 3DS to make it. A sample of 3D banner is in my CHMM/CHMM2 CIA version: https://youtu.be/ZoH2PQi71yo?t=4m38s i know it can also be animated but never tried so. This is the banner file of CHMM if it can help: https://github.com/Rinnegatamante/CHMM2/blob/master/banner.bin).

@Ghabry
Copy link
Member Author

Ghabry commented Apr 22, 2016

I ask @Rinnegatamante or @gnmmarechal to verify that the stuff in the cia_builder folder works. Especially the audio file. It is a 11025 Hz 16 PCM (Stereo). Compressed it quite heavy because I couldn't hear a difference.
I will provide an .elf later for testing romfs (from CIA) because I moved that code to main_data completely.

A 3D banner is out of scope for me currently. But should be considered later.

@Rinnegatamante
Copy link
Member

hex_set is not a "released" tool but it's just a (really bad made) program that modifies Unique ID in workaround. Also the asked tools are not for common uses and a lot of people will not even know what PATH is.

@Ghabry
Copy link
Member Author

Ghabry commented Apr 22, 2016

That's why I wrote "or copy them in this directory". I expect from the users to know how to get the required stuff for CIA building.
Found the sourcecode of hex_set, this should be easy to replicate...

Except on Windows because batch sucks. Good that since Vista powershell is preinstalled.

@Ghabry
Copy link
Member Author

Ghabry commented Apr 26, 2016

okay now I know how to do it from the command line. I quickly pressed pause when a command line window popped up and looked in the taskmgr to figure out the command line. :D

@Ghabry
Copy link
Member Author

Ghabry commented Apr 26, 2016

@Rinnegatamante or @gnmmarechal
Here is a new CIA: http://easyrpg.org/downloads/easyrpg-player-cia.zip Could you please test if this has the 3d banner of Rinne and a working sound effect?

Games are expected in sdmc:/3ds/easyrpg-player

@carstene1ns
Copy link
Member

@Siltala reports the CIA shows the banner correctly and plays the sound fine, however it crashes on startup.

@Ghabry
Copy link
Member Author

Ghabry commented Apr 27, 2016

The download link in my previous post got updated

@fdelapena fdelapena merged commit 77aa34c into EasyRPG:master Apr 27, 2016
@Rinnegatamante
Copy link
Member

So does the CIA still needs a test or not since it has been merged? I have enough time for a couple of tests if needed.

@gnmmarechal
Copy link

gnmmarechal commented Apr 27, 2016

Awesome! The easyrpg updater now downloads the latest build from jenkins :)

@Ghabry
Copy link
Member Author

Ghabry commented Apr 28, 2016

@Rinnegatamante
We found somebody else in our IRC channel to do the test for us and he said it works :)

The elf is now also available in a zip archive. Please update your links to point to that zip, I will remove the gigantic elf in a day or two.

@gnmmarechal
You can extract the last build jenkins version via the XML or JSON Api:
https://ci.easyrpg.org/job/player-3ds/lastSuccessfulBuild/api/xml

lastBuiltRevision/SHA1 looks like a good candidate.

Then the updater can detect whether an update is needed or not by remembering that SHA1.

Or get the timestamp for displaying a human readable date. :D

@gnmmarechal
Copy link

@Ghabry I may implement that, but I don't know if it really is necessary - after all, it's a really small download anyway.

@Ghabry
Copy link
Member Author

Ghabry commented Apr 28, 2016

Well it is a useful information to the user imo. I don't care about the download, we have more then enough free traffic, I'm just suggesting some ideas if you should be bored and want to do more programming :D

@gnmmarechal
Copy link

I see. I may add it, whenever I get the time. Atm I have some more ideas
(ex. direct game download & installation, there's a ton of RPGM2k/2k3
freeware that I can add to make some sort of... PS Store for RPGs? I guess)

On Thu, Apr 28, 2016 at 1:47 PM, Ghabry notifications@github.com wrote:

Well it is a useful information to the user imo. I don't care about the
download, we have more then enough free traffic, I'm just suggesting some
ideas if you should be bored and want to do more programming :D


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#869 (comment)

@Ghabry Ghabry deleted the 3ds branch May 1, 2016 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Integrate 3DS port
7 participants