I built this with a layer-cake of various homebrew libraries from 20 years of nintendo ds development!
sitting at the bottom is devKitARM and libnds. above those two I use two main libraries for graphics:
NightFoxLib (for 2d - bottom screen) & nitro-engine for 3d (top screen)!