GP32 Quark3d And Gp32 Screen Layout.


cdoty

Still Fresh
Joined
Aug 1, 2006
Messages
17
Age
54
Location
Houston, TX
Website
www.rastersoft.net
I am in the process of porting Quark3D (http://pierrel5.free.fr/Quark3D/Q3DArm.htm) to the GP32.

So far, I've got the graphics working fine, but I have to tell the library that the screen is 240x320, and of course it draws the screen rotated.

Is there a way to configure the GP32 to allow the buffer to be accessed as a 320x240 buffer, or do I have to manually copy the buffer to rotate the screen?

The Quark3D library is pretty amazing. The main application is in an ARM binary file that is shared with all versions (PocketPC, Symbian and, Palm. I've added Gizmondo and soon GP32.).

I ported it to the Gizmondo and changed less than 30 lines. Getting it to run on the GP32 was a matter of setting up the display, allocating memory, reading in two files, getting the current tick count and, flipping the graphics surfaces (probably less than 80 lines of code). The only things left are the input and solving the screen rotation issue.
 
cdoty posted on Aug 4 2006 at 06:01 AM said:
Is there a way to configure the GP32 to allow the buffer to be accessed as a 320x240 buffer, or do I have to manually copy the buffer to rotate the screen?

You have to copy it manually.

Tips : just rotate the whole 3D scene on the z axis with an angle equals to (+ or -) PI/2 and you won't have to rotate the final framebuffer.
 
Last edited by a moderator:
why does it require 240x320? is it hard coded for that aspect ratio for PDAs?
 
Sparr posted on Aug 4 2006 at 06:07 AM said:
why does it require 240x320? is it hard coded for that aspect ratio for PDAs?

Yes, the screen itself is rotated that way. Made stuff a real pain in the ass.
 
Last edited by a moderator:
rtb7 posted on Aug 4 2006 at 01:34 AM said:
Tips : just rotate the whole 3D scene on the z axis with an angle equals to (+ or -) PI/2 and you won't have to rotate the final framebuffer.

I looked into this, but the library uses direct buffer access for draw 2d sprites and stuff, and 3d for models and stuff.

The library does have a vertical blit that works, but it is slow. I'm going to rewrite it in ARM asm. The normal blit is written in ARM asm.

murak posted on Aug 4 2006 at 06:46 AM said:
Nice work cdoty! Maby you have a GP2X version planned also? ; )

I don't have a GP2X, yet. But, it would probably be very easy to do.

Sparr posted on Aug 4 2006 at 08:07 AM said:
why does it require 240x320? is it hard coded for that aspect ratio for PDAs?

No it's flexible, but the optimized blitting routine expects a linear screen. So, by setting it to 240x320 it worked out of the box.

As I said the library has a vertical blit routine, but it's not optimized yet. That's my next goal.
 
Last edited by a moderator:
Yep, both work just fine. Quite impressive too!

Vertical does indeed run slower, but the fps difference on a real GP32 is a lot less than on the emulator.
 
it's very impressive :eek: but it is slowly

i have upload picture to my ftp

1.JPG
2.JPG
 
ninjak posted on Aug 6 2006 at 09:42 PM said:
Rotating the Screen on the GP2x will be even easier with the hardware screen rotation.

Theres no need to on the GP2X...
 
Last edited by a moderator:
fougere posted on Aug 6 2006 at 05:26 AM said:
it's very impressive :eek: but it is slowly

Which Gp32 did you try it on?

Currently the program only sets the processor speed to 133Mhz. The 166Mhz code is commented out. From what I understand, this is a safe speed on all Gp32s.
 
Last edited by a moderator:
cdoty posted on Aug 7 2006 at 05:16 PM said:
fougere posted on Aug 6 2006 at 05:26 AM said:
it's very impressive :eek: but it is slowly

Which Gp32 did you try it on?

All GP32s run the same (be it nonlit, FLU or BLU(+)). However, he is right. Those two demos that he took pictures of chugged quite a bit, around 4-6 frames if that frame count in the corner is correct.
 
Last edited by a moderator:
Best people to ask about screen rotation are those that have worked on other ports. i can remember a discussion about it many (many) months ago.

Perhaps ask thunderz - he had to deal with it for his 3D engine based on cube?
 
Back
Top