rhaleblian / dslibris

An ebook reader for the Nintendo DS, DS Lite, and DSi.
73 stars 5 forks source link

Modernize and refactor toolchain #9

Closed rhaleblian closed 4 years ago

rhaleblian commented 4 years ago

Some tool maintainers (devkitPro?) discussed with @rhaleblian about preferred packaging and toolchain dependencies. The notes regarding upgrading this codebase to the current library paradigm are either lost or embodied in some branch that needs to be found.

The most recent release used devkitARM r45, so we must have gotten somewhere with this.

WinterMute commented 4 years ago

that would be devkitARM r45. devkitPro is the organisation.

Looking at the dates on https://github.com/rhaleblian/dslibris/issues/1 and https://github.com/rhaleblian/dslibris/issues/4 I think I was probably building with devkitARM r48.

Sorry, it looks like I deleted the repo where I updated but it looks like the commits were merged into https://github.com/rhaleblian/dslibris/pull/7

The codebase looks like everything should just work with latest tools/libs although you seem to have stuck with freetype 2.5.5 while we have 2.9 in our package repos. You also seem to be building it without libpng, not sure if that makes a difference. I'm guessing fonts stopped rendering past 2.5.5 and you didn't figure out why?

rhaleblian commented 4 years ago

Build succeeds on the latest devkitARM, no dep builds required. Test on DeSMuME fails, it may be DLDI patching again, notes say MPCF.

rhaleblian commented 4 years ago

Yes, must patch. Also, must use a cflash image as opposed to a folder/path. Using FreeType 2.9 from pacman. Text does not draw, or is invisible or transformed offscreen. Backing out to amd64 to see an isolated toy programs does the same thing.

rhaleblian commented 4 years ago

Thanks for coming by @WinterMute . For bonus points i'm going to try to get the FT cache to work this time.

rhaleblian commented 4 years ago

libpng, from pacman, will now be included with the build.

rhaleblian commented 4 years ago

@WinterMute @fincs nice job releasing so many support libraries under pacman. After getting the hang of pacman, this is a comfortable and traceable way to get configured.

rhaleblian commented 4 years ago

3

rhaleblian commented 4 years ago

Spawned #13 .

rhaleblian commented 4 years ago

Leaving #13 open as the last loose end. All other tools and dependencies come from dkp-pacman.

rhaleblian commented 4 years ago

@WinterMute do you know anyone who could test the product of the current dev branch on hardware? i am not sure if my hardware reflects general probability of success...

WinterMute commented 4 years ago

I had a go at this yesterday. Built fine but crashed unfortunately. I think might be blowing stack but I'm not 100% sure.

I should really look at overlaying ditch on to the top of ewram. It was something I always meant to do but never got round to.

rhaleblian commented 4 years ago

Hey thanks for taking the time. When i can, i'm going to walk backwards to a working configuration (i have not seen any build working on hardware recently) and then reason from there.

WinterMute commented 4 years ago

As I suspected it was blowing the stack - usually large local arrays somewhere when this happens but, being honest, 16KiB stack is pretty restrictive and I always meant to overlay ewram with dtcm at some point so the stack has somewhere to go instead of segfaulting.

Latest crtls do just that & it seems to work fine on hardware now.

rhaleblian commented 4 years ago

Meaning text gets drawn? Is there an aspect to dslibris that triggers blowing stack? Are we literally talking about a particular call stack, and it that stack on the application side? I'm sure i'm allocating dumbly in a lot of this code.

WinterMute commented 4 years ago

Yep. There's a missing font for one of the samples but the other 2 render fine. 20200605_180905

rhaleblian commented 4 years ago

WOOHOO! The dev branch has gone into master.