Orcus 1.1.0


Orkie

Super Duper Mega GP Mania
Joined
Mar 22, 2006
Messages
2,357
Location
UK
Website
www.gp2x.dev
As previously promised in the Open2x bootloader post, the environment and libraries for building bare metal binaries are now available. Orcus, punisher of broken promises, and god of the underworld, finally delivers what used to be called 'HH' - the ability to write homebrew which doesn't depend on Linux. This makes certain things like using the ARM940T a little more user friendly, and may open up some interesting possibilities if anybody cares to take advantage of them. I've tried to abstract the hardware to the point it is usable without needing to poke around in the MMSP2 registers, but no further, so you may wish to have a copy of the reference manual to hand if something doesn't make sense!

To get started, you'll need to get yourself set up with the devkitPro pacman, and install the gp2x-dev group. Full details are available here: https://github.com/devkitPro/orcus/wiki

I've uploaded the API reference to my website (I'll try to tidy this up with the next release) so you don't have to download it from the release page: https://gp2x.dev/orcus/a00011.html

A few examples are available in the gp2x-examples package (of course, the source code for the bootloader is also available) which is part of the gp2x-dev group, but can also be viewed here: https://github.com/devkitPro/gp2x-examples

These will build o2x files, which is essentially a list of binaries with addresses to copy them to in memory before executing, along with a name, icon and a couple of other things. The gp2x-tools package includes a tool mko2x to create these, but if you follow the standard Makefile templates you won't need to do this yourself. You'll need the Open2x bootloader to launch them.

Current hardware supported:
  • Buttons
  • RGB layers (palette modes not yet fully supported)
  • ARM940T (best to read the page on this and look at the example, you can treat the 940 almost exactly the same as the 920 and call almost all Orcus functions from the 940, but there are a couple of things about pointers which are worth having a think about)
  • Audio
  • SD card (read-only at present)
  • UART (by default set up with 11520 8N1 serial)
  • NAND (useful for firmware development, like the Open2x bootloader)
  • Hardware timer
  • DMA copying
UART and SD support are integrated with newlib, so you can printf directly to the serial port for example, as well as use fopen etc. for files (thanks to libfat). All the regular parts of newlib are there, so no need to implement your own memory manager (unless you wish to!), malloc and family all work fine.

I'm currently working on the 2D accelerator, which hopefully will be available in the next release (blit copies, pattern fill, limited rotation). Also I'd like to add some functions to make the use of the MMU/PU/caches easier - at the moment gp2xInit will enable the icache on the 920, but anything else and you're on your own which may have performance implications if you aren't prepared to write some inline assembly!

Would be interested to know how anybody gets on with this.
 

Orkie

Super Duper Mega GP Mania
Joined
Mar 22, 2006
Messages
2,357
Location
UK
Website
www.gp2x.dev
If anybody is actually following this..!

Had a few weeks off, making progress with the 2D accelerator (aka blitter, which is only part of what it does).

DSC_0494.JPG
 
  • Like
Reactions: rSl

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
12,610
Location
Somewhere off the coast of the EU
I never actually got round to buying any GPH devices, and only paid up when it came to the Pandora, but I followed along for a number of years. I liked your post because it's cool that devs are still supporting these old devices, but I can't really add anything beyond that.
 
  • Like
Reactions: rSl
Top