GP32 Gpdesktop Progress


pea

developer
Joined
Oct 3, 2004
Messages
1,089
Age
46
Location
New Zealand
Website
www.projectitis.com
Hi all,

Just an update to anyone who is interested.

Have been working mostly on the windows manager library. It features functions to create windows and widgets. So far only a few widgets are done for testing, but support so far includes:

1) Desktop from 320x240 up to max memory size. 640x480 is good - desktop scrolls if user moves mouse past edge of screen.
2) Desktop wallpaper image or plain colour (saves heaps of memory - a 640x480 wallpaper takes up 600k - but it looks nice :) )
3) Create windows at any size and add to windowManager to handle
4) Create widgets and add to windows
5) Widgets support child widgets (no limit on levels) e.g. A panel widget could have another panel on it as a child, which could have text boxes on it.
6) Widgets and windows are fully event driven by pointer/mouse.
7) Widgets so far support onMouseIn, onMouseOut, onButtonClick, onButtonDown, onButtonUp.
8) Widgets can capture the mouse (e.g. a test box widget can capture the mouse and use all input for text entry rather than mouse movement)
9) The mouse supports accelleration
10) The button press types are single-click, long-press, double-click, double-click-and-hold
11) The widgets I have done so far are Window panel, Window caption, Image, Image button (with rollover), caption - many more to come including textbox, menu etc
12) Runs fine at 22MHz (lowest i can set clock to using this SDK)

Unfortunately, since my SDK is based on Mr.Mirkos latest release, I am unable to run my app in geepee32, so I can't take screenies. I have changed/added to the SDK way to much to just swap to using the precompiled geepee version supplied.

If anyone knows what changes I need to make to Mr.Mirkos SDK to make it geepee32 compatible that would be cool.

GP32 is not dead :)

Cheers
 
This is sounding very nice B)

As for the SDK fix, the following was posted in the thread mentioning the problem way back when from Mr.Mirko himself:

In the latest (0.95) SDK, i updated the vsync with a hsync to get less screen flicker then someone is changing the framebuffer. Geepee32 is not suporting the hsync registers, so my setup is waiting endless in a loop. To get the 0.95 SDk version running on geepee32 you must mark out this lines in gp_grafik.c.
Line 66-67:

if (vsync) {
while(1) {if(((rLCDCON5>>17)&3)==2) break;} // wait for active line
while(1) {if(((rLCDCON5>>17)&3)!=2) break;} // wait for active line to end - start of front porch and hsync
}

And your stuff will still run on geepee32. But this is only a bad solution, a better one would be, if the geepee32 author would support hsync.
 
lux posted on Dec 9 2005 at 04:37 PM said:
This program is only for gp32 <_< ?
You would be able to say the opposite about most GP2X programs, many of them would run full speed on the GP32 :p

Great, Pea! Keep up the good work!
 
Last edited by a moderator:
Talyz posted on Dec 9 2005 at 09:02 PM said:
lux posted on Dec 9 2005 at 04:37 PM said:
This program is only for gp32 <_< ?
You would be able to say the opposite about most GP2X programs, many of them would run full speed on the GP32 :p

In fact, most do already. :-D
The only thing that runs better on GP2X right now would be the PSX emulator, if I'm not mistaken.
 
Last edited by a moderator:
Hi,

Thanks for the info on the vsync - that did the trick! I might add it as a flag to the swapFrameBuffer functions so that you can choose whether to sync...

Anyway, some more info about my SDK and GPDesktop libraries.

FULL SCREEN WINDOW
Code:
#include "gp32.h"
#include "gpd_system.h"

// Callback to update the system every 1/32 seconds (mouse, events etc)
void updateSystem( unsigned long counter, void *data ){
	gpd_systemUpdate( (tGPD_system*)data, counter );
}

int main(){
	tGPD_system *system;
	tGP_LCD *lcd;
	tGP_window *window;
	int res;
	
	// Set CPU speed
	gp_setCpuspeed(22);

	// Init graphics
	lcd = gp_lcdCreate( 85, 0xfffe );

	// Create the GPD system object
	system = gpd_systemCreate( lcd );

	// Create the main window
	window = gp_windowCreate( "Global Navigator", 320, 240, 0, 0, system->theme, &res );
	
	// Add it to the system
	gpd_systemAddWindow( system, window );
	
	// Start RTC with callback
	gp_initRTC( 32, &updateSystem, (void*)system );
	
	// Wait until long click on start button
	while(system->input->keyStart->clickType != CLICK_LONG){ }
	
	// Kill input
	gpd_systemFree( system );

	// Kill LCD
	gp_lcdFree( lcd );
	
	// Reset GP
	gp_Reset();
	
	return 0;
} // Main

Generates the following window fullscreen with a 320x240 desktop:
ss_fullscreen.jpg


Changing this line of code:
Code:
// Create the main window
	window = gp_windowCreate( "Global Navigator", 200, 120, 40, 40, system->theme, &res );

Generates a 200x120 window at position 40,40:
ss_windowed.jpg

Showing rollover:
ss_rollover.jpg


EDIT: In case you are wondering, 'Global Navigator' is the start of my GPS interface program. To start with will just have simple functions, like entering waypoints, distances/directions between waypoints, travel speed, compass etc.

EDIT 2: In geepee32 the pointer moves way faster than on the GP32. I think it may be something to do with the RTC (well, it must be, really). Because pointer and events runs off RTC at 1/32 seconds, the pointer moves at the same speed regardless of clock speed...
 
Awesome work Pea, this could be really handy indeed. Hmm, maybe I can convince The Wub to use it for the SEUCK GUI ;)

Great to see people still supporting the GP32 :)

Which reminds me... Really should get to work on a certain mag! :ph34r:
 
Back
Top