send messagemessage
articles
journals
info

GP32 Executable format

sang's profile picture
Published in 
 · 14 Mar 2024
Executeables, "Program Files": ------------------------------ GXB*,AXF,BIN Arm eXecutable Format: binary executable which starts with a branch and 6 address fields 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 format: b SkipHeader DCD Start Of Rom Code @ (?) DCD End Of Rom Code @ (?) DCD Start Of BSS Section @ (?) DCD End Of RAM Sections @ (?) DCD Start Of DATA Section @ (?) DCD End Of RAM Sections @ (?) DCD 0x44450011 @ ... sometimes more info here... SkipHeader: b EntryPoint GXE Gamepark eXecutable Encryption inf...

GP32 MemoryMap

sang's profile picture
Published in 
 · 14 Mar 2024
GP32 MemoryMap v0.0.1 02.03.2002 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- 0x00000000 - 0x0003ffff 512kb system rom (BOOT_ROM) Exception Vectors 0x00000000 Reset Supervisor 0x00000004 Undefined instruction Undefined 0x00000008 Software Interrupt Supervisor 0x0000000C Abort (prefetch) Abort 0x00000010 Abort (data) Abort 0x00000014 Reserved Reserved 0x00000018 IRQ IRQ 0x0000001C FIQ FIQ ------------------------------------------------------------------------------- 0x0c000000 - 0x0c7fffff 8mb workram (WORK_RAM) 0x0c780000 -...

GP32 demo code (VBlank)

sang's profile picture
Published in 
 · 4 Mar 2024
This simple source (in C and for GCC) shows how to emulate VBlank interrupt on GP32. Because of my own reasons the code is not 100% SDK "pure". vblank.c // // VBlank interrupt emulation example using timer4 interrupt // and line synchronization. // Version 0.1 // // (c) 2002 Jouni 'Mr.Spiv' korhonen // // Tested on Firmware 1.5.7e and compiled with gcc 3.0.4 // // Use at own risk!!! The code uses timer4 interrupt although // everything could be done using SDK's timer interrupts (i.e. // using GpTimerOptSet() ) // // ...

GP32 demo code (mummu)

sang's profile picture
Published in 
 · 4 Mar 2024
Yet another stuuuupid demo.. featuring slightly modified crossfade (tm) routine by Costis (tm).. I was just experimenting some DMA and MMU stuff. Btw the screen is 640x480x16bits and won't fit into BIOS provided memory area. Blah blah blah blah.. mummu.c // DMA & MMU demo (c) 2002 Jouni 'Mr.Spiv' korhonen // Really simple & stuuuupid // // The 'crossfade' routine originally (c) Costis // from his Crossfade-demo #include "gpdef.h" #include "gpstdlib.h" #include "gpgraphic.h" #include "gpmain.h" #include "gpfont.h" #include "gpmem.h" #include <stdlib.h> #include <s...

GP32 demo code (offscr)

sang's profile picture
Published in 
 · 4 Mar 2024
This simple demo demonstrates vertical scrolling using virtual screens and changing frame buffer pointers. This demo bangs the hardware bypassing the BIOS (tested with 157e FW). offscr.c // (c) 13-Jul-2002 Jouni 'Mr.Spiv' Korhonen // #include "gpdef.h" #include "gpstdlib.h" #include "gpgraphic.h" #include "gpmain.h" #include "gpfont.h" #include <stdlib.h> #include <string.h> // strcoll, ptrdiff_t, memcmp, strspn strerror GPDRAWSURFACE gpDraw; GPDRAWTAG gpDrawTag; volatile long* tpal = (long*)0x14a00050; volatile long* lcdcon1 = (long*)0x14a00000; volatile long* lcdcon2 = (long*)0x14a00004; volat...

Screen mode 14

sang's profile picture
Published in 
 · 4 Mar 2024
What? Didn't the screen mode 12 i.e. 16 bits screen mode be the last available?! Yes.. but there is an undocumented screen mode available in GP32 LCD hardware. If you set the screen mode to 14 you will get a fancy 16 bits screen mode, which seems to cause LCD DMA to skip every second half word in memory. So the visible effect is that instead of 1 picture you will see 4 small shrinked pictures. So is this useful for anything? I really don't know yet :) Thanks must go to ZardozJones for finding this effect for the first time!

GP32 and HBLANK Emulation

sang's profile picture
Published in 
 · 4 Mar 2024
Following text describes basic principles for CPU friendly HBLANK emulation. Basically HBLANK allows you to do raster effects on each raster line without busy-wait polling/waiting for certain raster line position. There are actually two different approaches how to achieve one raster line granularity on GP32 LCD manipulation. Either you use Timer Interrupts or Timer Synchronized DMA. The DMA is very clever and elegant as a solution and works on background without any "maintenance". Interrupts allow more flexibility but on the other hand have larger CPU cycle penalty due interrupt latencies and mandatory interrupt handling code. Remembe...

1 Bits Per Pixel Screen Mode

sang's profile picture
Published in 
 · 4 Mar 2024
Anyone wondered why the 1bpp screen mode does not work? The answer is simple: GP32 BIOS GpGraphicModeSet() call does it wrong and the Samsung data sheet tells incorrect information. That is indeed a good start. The trick in order to get the 1bpp mode set up correctly is to poke some "not that obvious" values into LCDSADDR3 register. 240 pixels requires 15 half words (15 * 2 * 8 = 240). One might think that LCDSADDR3.OFFSIZE=0 and LCDSADDR3.PAGEWIDTH=15 would produce a 240 pixels high screen without offscreen area. Well no.. The screen starts wandering around. In order to get a stable screen you need to define LCDSADDR3.OFFSIZE=1 and LCDSA...

GP32 and Pseudo Two Layers Screen Mode

sang's profile picture
Published in 
 · 4 Mar 2024
It is possible to create 50Hz screen mode that actually has two independent layers.. with minimal CPU involvement. I call this a Dual Playfield screen mode. You can also scroll both playfields (layers) independently using those hardware scrolling techniques and even split screen effects can be applied. The Dual Playfield screen mode works on 4, 8, and 16 bits color depths. The following text is from #gp32dev irc channel (that I wrote in a frustration and rage at 02:38am): [2:38] spiv|ZzZz well doods.. to enable pseudo usefull for nothind mr.spiv (tm) two layer screen mode with annoying transparency just pump the frame refresh rate over 10...

GP32 and LCD DMA

sang's profile picture
Published in 
 · 4 Mar 2024
Those who has taken a closer look at GP32's LCD hardware know that the GP32 really does not have any special LCD features you would expect from a handheld games machine. The virtual screen feature is almost the only positive exception. There are no VBlank interrupt, no HBlank interrupt, no LCD controlled DMA triggering, no sprites, no multiple playfields, no tiled modes (well some think this is just a positive thing) and so on. Also the LCD is somewhat *hard* to set up due its support for varying frame rates and screen sizes. But the GP32 LCD has linear frame buffer albeit it is rotated 90 degrees counter-clockwise. So the GP32 somewh...

Modify GP32's MMU tables and change caching settings

sang's profile picture
Published in 
 · 4 Mar 2024
The following simple example shows how to modify GP32's MMU tables in order to change caching settings. This is especially useful if you want to move your frame buffers into " user RAM area " i.e. somewhere between 0x0C000000 and 0x0C79C000. The example uses BIOS call to do the job. Keep in mind that the granularity of MMU pages is 4KB, which means that the addresses you feed into the BIOS call must 4KB aligned addresses. // C example and using SDK - libgpstdlib.a // void swi_mmu_change( void* start_addr, void* end_addr, ulong flags ); start_addr - a starting address of the memory region you want these MMU changes to a...

ARM code optimization for the GP32

sang's profile picture
Published in 
 · 4 Mar 2024
Okay, so here goes: The GP32 has a samsung chip with among other things, a ARM920T core. I suggest you to check www.arm.com and download the proper docs there. The core is similar to the ARM9TDMI core (the GBA has an ARM7TDMI core, so GBA coders will feel right at home) but has some extra features which might be a bit confusing. I read some docs, figured some things out and here are my findings. WARNING! This info I gathered from various docs and therefore may well be erroneous, if you spot errors in this doc don't mail me because I never read mail and especially not from people I don't know, so it's best to just bother me on ...

GP32 Palette Configuration and Examples

sang's profile picture
Published in 
 · 18 Aug 2021
GP32 Palette Configuration and Examples
December 20, 2001 Coauthored by Nak-Hi Kim and Chang-Hyeop Yoo GP32 Color Palette GP32 supports 16-bit color and its graphics design is almost the same as the one for the existing PC game (8-bit, 16-bit). While in ARM7 version a developer is forced to use the default palette for 8-bit graphic design (256 colors), in ARM9 version a developer can either freely change colors or select very useful multiple palette options. Whereas, you have to use the system default pallet to design the icon used when loading games (downloading games from SMC card to GP32). Please note that during the graphic design, the monitor can differ from the GP32 disp...

I/O PORT PIN DEFINE

sang's profile picture
Published in 
 · 17 Aug 2021
pin #name description 1 3.0V(+) power +3.0V 2 RESET Machine reset 3 nTRST nTRST (TAP Controller Reset)resets the TAP controller at start. 4 TDI TDI(TAP Controller Data Input)is the serial input fot test instructions and data. 5 TMS TMS(TAP Controller Mode Select)controls the sequence of the TAP controller’s states. 6 TCK TCK(TAP Controller Clock)provides the clock input for the JTAG logic. 7 TDO TDO(TAP Controller Data Output)is the serial output for test instructions and data. 8 AIN0 Analog to Digital Input 0 Port. 9 UART Rx UART receives data input. 10 UART Tx UART transmits data output. 11 IICSCL IIC-bus clock 12 IICSDA IIC-bus data 1...

creating project file for Visual C++

sang's profile picture
Published in 
 · 17 Aug 2021
you can start from an empty project file as follows. create an empty project file. select the menu "File/New...", select "Win32 Application" in "Projects" tab and type the name as you wish. select the location where you want your project file to be created in "Location" field. (refer to "project structure recommended by Gamepark") as default, Visual Studio create a subfolder under the folder you select as location. be careful. if all completed, press "OK" button. select "An empty project" in "Step 1 of 1" and click "Finish" button. you may see the summary about project file generation. adding file(s) first, you should create a resour...

GP32 main file list

sang's profile picture
Published in 
 · 17 Aug 2021
work/lib/gp/gplib/include/*.h where all the GP32 ARM version library files are located file list gpcomm.h : R/F communication gpdef.h : GP32 specific defined values gpfont.h : font / text display gpgraphic.h : graphics gpmem.h : memory / strings management gpmm.h : sound gpnetlib.h : socket gpos_def.h : ketnal / timer gpsockdef.h : PPP/socket gpstdio.h : file I/O gpstdlib.h : keyboard/CPU/random variable work/lib/gp/gplib/gplib/debug/*.alf work/lib/gp/gplib/gplib/release/*.alf GP32 ARM version library files for SDT(Software Development Too...
loading
Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT