3D rendering
3D Rendering engine
The Nintendo DS dispose of hardware that can perform 3D rendering in addition to it’s dedicated 2D system. EoS mostly use the 2D system, but occasionally make use of the 3D engine for some effects. Those are:
- The dialogue box border and background
- Rendering of the quick status at the top of the bottom screen during a dungeon
- The various weather effect
- Boss transition wipe
- A few other effect during cutscenes
- (TODO: which one?)
- (TODO: check that I forgot none)
The 3D engine is totally capable of rendering in 2D, simply by rendering rectangle in front of the virtual camera, which is what EoS always does. The way this game work is by first buffering the things to render to a buffer and then a function will submit those to render (probably during VBlank), which will then take effect on the next frame.
The 3D engine can only render on the main screen, which in EoS is the bottom screen. Some game (but not EoS) render on both screen by switching the main screen every frame, dividing by two the framerate from 60 to 30 FPS.
Memory
The bank D is dedicated to store the textures used for the 3D render, and bank F is used to store the palettes. Bank D is 128KiB large, and bank F is 16KiB large. The game seems to only allocate texture on a multiple of 1KiB, and palette on a multiple of 0x100B, but there it is possible to perform allocation not aligned on those arbitrary values (but it still (maybe, untested) need to be 4-bytes aligned).
TODO: