Robster
Dodgy hardware mod maker
This is just a suggestion! I think it's a good idea to have a fixed format so that (for example) app launchers or file managers can display metadata about the files on SD. Inside Linux things are already defined, this is for apps that run outside of Linux.
	
	
	
		
Comments welcome!
				
			
		Code:
	
	GP2X "Open Executable" format (name thanks to DJWillis)
 
- filename extension is ".g2x"
- executable files go in "/GP2XBIN"
- game data files go in "/GP2XGAME/<gamename>"
- all data is little-endian
 
Base is 0x00008000
 
Contents of executable file:
 
Address
0x00008000     4 bytes   Jump to start code
0x00008004     4 bytes   Header version. Will start at zero and increase willy-nilly :)
0x00008008     4 bytes   Address of start of bss section
0x0000800C     4 bytes   Address of end of bss section
                         (if start and end of bss are the same, then don't clear anything)
0x00008010     4 bytes   Address of start of data section
0x00008014     4 bytes   Address of end of data section
                         (if start and end of data are the same, then there is no data section)
0x00008018    32 bytes   Application name
0x00008038    32 bytes   Application author
0x00008058    32 bytes   Application description
0x00008078     4 bytes   Application version
                         bits 31-24 are major version
                         bits 23-16 are minor version
                         bits 15-0 are build number
                         So version is "1.2.3456" sort of thing
0x0000807C     4 bytes   bits 31-16 are number of frames in application icon animation
                         (1 for a still image)
                         (if this number is zero, then there is no application icon and the loader should display a default)
                         bits 15-0 are animation speed, milliseconds per frame (a value of zero means 65536 ms/frame)
0x00008080  2048 bytes   32x32, 16-bit hicolour application icon
                         As many icons are included as there are frames in the animation
0x??????80  xxxx bytes   application code
 
stack can go at the top of RAM, perhaps backed off a bit so that a stack underflow won't immediately cause a crash... say, 0x03FF F000 (4k down from the top of RAM).
	Comments welcome!
	