General GP32 Dev FAQs
this article is an extract from the very good Dev'rs GP32 Dev FAQs - Last Update 2002-Mar-30
How do I find out what product ID & firmware version is installed on my GP32?
Enter test mode to view the product ID & firmware version by pressing following shoulder buttons sequence:
L - R - R - L - R - R - L – L
Are there any emulators for gp32 development?
There is GeePee32:
http://users.skynet.be/firefly/gp32/
How does internet gaming work on the gp32?
To do this you must have an RF link adapter or a USB cable that connects your gp32 to a PC. The RF link seems to be the standard method proposed by GamePark. However, software could be developed by others to support gaming over USB.
Is there an RF link support in the GP32?
No. You would have to buy a separate hardware adapter that plugs into the EXT port on the bottom.
I don't live in Korea. How do I get the GP Free Launcher?
http://english.gamepark.com
How do I make an .fxe file so I can run my code with the GP Free Launcher?
http://www.devrs.com/gp32/software.php#comp
Why does my code work in the emulator but not on real hardware?
The main reason appears to be due to memory alignment problems. The real ARM processor often requires data to be 4 byte aligned or else you can get unexpected results.
Why do some makefxe tools either crash or cause the emulator/hardware to crash?
This is because some tools for making fxe files REQUIRE that the input file contain a non-empty Read/Write (RW) section due to the algorithm they use to convert to fxe format (and the emu probably requires this as well). [i.e. DWORD at input file offset 0xc should not equal DWORD at input file offset 0x14] B2fxe doesn't care if your RW section is empty and creates an output file that works fine in emulators and hardware.
What do the various file extensions in gp32 dev mean?
The areas of file types that are encrypted are discussed here but there currently are no plans to provide information on the encryption method itself:
.axf - ARM Executable Format (Same as .gxb format but also can contain debug info.)
.fpk - Archive file for free stuff from GamePark
.fxe - Scrambled (light encryption) binary file & graphic icon for free games/apps from GP & third party developers. You have to use Game Park's free launcher to run these on your gp32. When the launcher unscrambles these files and removes the icon, the result is identical to a .gxb file. They are usually found in the gp:\GPMM directory.
.gpm* - Contains an SMC ID
.gps - Generated by GP's PC link software. Contains username, password, and GP32 ID... all in encrypted format.
.gxe - Binary info file : title, company, icon, encrypted stuff,.. This file can also contain the first X number of encypted bytes of the binary. The remainer of the binary is found in the .gxc file with the same name.
.gxc - Encrypted binary file. After a header, every X interval number of bytes in this type of file you will find Y number of bytes of information that is encrypted. The rest of the file is unencrypted.
Header (20 bytes long)
Encypted binary data (Y bytes)
Unencrypted binary data (X-Y bytes)
Encypted binary data (Y bytes)
Unencrypted binary data (X-Y bytes)
...etc...
If you remove the 20 byte header and unencrypt the file (placing it after any unencrypted code from the .gxe file), then the resulting data is identical in all other respects with a .gxb file.
.gxb* - Non-encrypted binary file. This is placed in gp32 ram starting at location 0xc000000. The entry point is the starting location and the entry is performed in ARM (not thumb) mode. Here is the header in ARM SDT format:
b _SkipHeader
DCD Start of Read Only section
DCD End "
DCD Start of Read/Write section
DCD End "
DCD Start of Zero Initialized section
DCD End "
DCD 0x44450011
... sometimes more info here...
_SkipHeader
... Init heap,etc ...
ldr r4,=C_Entry
bx r0
.smc - Raw SMC card data (Similar to how raw CD data = ISO format)
.zpk - Another archive file used by GamePark
* The file extensions marked this way are unofficial extensions from third-party developers.
How do I transfer a file to my gp32?
You can use the GP32<->PC USB cable or you can use a PC SMC card reader/writer such as the EMS 5in1 card reader/writer. There are reports that the EMS card reader is 20 to 30 times faster for transferring files than the USB cable.
Can I play an mp3 while also playing a game?
No. The gp32 has to devote the majority of it's processing power to the decoding & playing of mp3 files so no other functions are supported at the same time.
Where is the unique Product ID stored in each gp32 console?
In the serial IIC-bus eeprom in the gp32.
Where can I find information on the graphics or sound chips?
There basically are no separate chips for graphics or sound processing. The gp32 CPU handles most of these operations. There is an external Samsung LPC3600 LCD timing controller but this is only used for generating correct signal timing for the LCD. There is also an external Phillips UDA1330A stereo filter IIS-bus DAC but this is only used to convert the final composite sound signal from digital to analog.
The gp32 graphics hardware has no layers, tile modes, sprites, or other fancy hardware. It basically just has double-buffering of a bitmap-style screen mode.
What signals are found on the gp32 EXT connector?
Pins: 1=3.3v, 2=nRESET, 3=nTRST, 4=JTAG[TDI], 5=JTAG[TMS], 6=JTAG[TCK], 7=JTAG[TDO], 8=AIN0, 9=RXD0/GPF0, 10=TXD0/GPF2, 11=IIC-bus[SCL], 12=IIC-bus[SDA], 13=nRTS0/GPF4, 14=nCTS0/GPF5, 15=RXD1/GPF1, 16=TXD1/GPF3, 17=NoConnection(?), 18=Ground
Refer to the CPU data sheet for more info on these signals.
How are the console buttons connected to the CPU?
A=GPB14[pin19], B=GPB13[pin18], Start=EINT6/GPE6[pin125], Select=EINT7/GPE7[pin126], L=GPB12[pin17], R=GPB15[pin20], Up=GPB11[pin16], Down=GPB9[pin14], Left=GPB8[pin13], Right=GPB10[pin15]
When read, the values will be 0 when pressed & 1 when released.
What is the clock speed of the GP32?
This is software selectable from many different speeds from ~22MHz up to ~133.5MHz. The slower the selected speed, the longer the battery life that you will experience. However, just because the CPU can be set for very high speeds does not mean that the rest of the system (in particular the SDRAM) can handle this speed as well. Bios v1.5.7 defaults the clock speed to 67.8MHz. FireFly and others have managed to run their GP32 at up to 99MHz, with instruction and data cache on, without noticeable problems. Some people appear to experience problems at this speed.
Why do my assembly language swi calls sometimes cause problems?
If you are using ARM SDT tools then you must make sure that you tell the compiler what registers are being used by bios swi code so that the compiler will know what registers will be safe and what registers will be destroyed by the swi. YOU MUST ALWAYS TELL THE COMPILER THAT THE LR REGISTER WILL BE DESTROYED. Read that last sentence one more time to commit it to memory. ;-) Here is the format for passing that info:
swi 0x?, {input registers}, {output register}, {lr,destroyed registers}
If the swi call requires no input or output registers, then use the following format as an example:
swi 0x?, {}, {}, {lr,destroyed registers}
What C/C++ compiler packages can I use for gp32 development?
There are currently at least 3 approaches:
MS Visual C++ is supported by GamePark in the form of libraries that allow you to develop and test a game on a PC. The resulting compiled code will only run on a PC but this same source code can be compiled on other C compilers to generate binaries that will run on real GP32 hardware. The main drawback to VC++ is that you can not develop optimized ARM assembly language with this setup. GP will make the VC++ libraries available here when they are released: http://www.gameparkdev.co.kr
ARM SDT is a very efficient compiler but it is ~$4000USD.
GCC is also a popular approach. There are several different GCC compilers that have been targeted to the ARM platform as listed below. For each of these packages you will need additional libraries or files that can be found here: http://www.devrs.com/gp32/files/gcc/
1) Dev Kit Advance was originally intended for the GameBoy Advance, but it is basically a generic ARM GCC 3.0.2 C/C++ compiler for windows: http://www.io.com/~fenix/devkitadv Add this to your compile options for smaller code that is tuned for the ARM920T processor: -mtune=arm920
2) GCC 3.0.4 that is available from http://darkfader.net/gp32 is a slightly later version of GCC that is much smaller than Dev Kit Advance
mercredi 12 septembre 2007
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire