| Posted on: Jan 28 2007, 21:17 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
I know you guys are think'n.. what the heck.. Why am I releasing an update on Januari 2007? because I have a C600 for 7 months right now and Wm2005 QVGA devices are getting quite common right now. My game always ran in the 176x220 resolution. Although it could scale-up to 240x320 using a bilinear filtering technique. But it will never look as good as a native 240x320 app. So I have decided to upgrade the graphics and port the game to QVGA (240x320).. Took me 4 hours to complete. Especially I am not such good graphics designer. and the graphics from DaddyCool were awesome. but I have worked hard for native 240x320 graphics.. And I have to say.. They turned out pretty well. It gives a whole new experience @ native resolution. Game runs great on SPV C500/C550/C600/F600 (tested). Also on PDA's @ 240x320. You are wondering? C500??? yeah the QVGA runs on the C500 too.. Although the image quality isn't as good on the 550+ models because it will scale down to 176x220 If you liked this kind of game. You should try it.. It's really worth it. Columns version 0.41qvga released on sun 28 jan 2007. |
| Forum: Smartphone Software - Games · Post Preview: #803131 · Replies: 26 · Views: 3,899 |
| Posted on: Jul 30 2005, 15:24 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(puso @ Jul 28 2005, 14:07) Hi, I'm writing a program for smartphone 2003 device with eVC++ 4.0. The program has a simple interface that consists of couple of buttons.(I used the PUSHBUTTON type for that). There is one IMPLEMENT button and 1 CANCEL button. If IMPLEMENT button is pressed, the program implements, I want the CANCEL button to work the job of cancelling the process if pressed. My problem is that once the IMPLEMENT btn is pressed, the screen of my device freezes, you cannot press or do anything to other btns. If you still press the other btns, it waits until the process is finished, it then implements other command. Does anyone know a function to make the CANCEL btn work in this case? Or any suggestion is welcome. Thanks a bunch. As with the above reply.. your "Implement" function is a blocking function.. meaning Windows CE cannot recieve messages.. and will be only recieving messages when your function stops.. you can always return "control".. if your "implement" function has a lot of iterations (like 100 of them).. you can poll the messages every 5 iterations or so. (not 10 / 15 / 20.. since the response will get sluggisch.. depending how much time a iteration takes).. example: (quicky quicky) CODE void longwaitingcode () { int poll = 0; MSG msg; for (int i = 0; i < 1000; i++) { // does things.. quite cpu demanding... poll++; if (poll == 5) { GetMessage (&msg, NULL, 0, 0)); TranslateMessage (&msg); DispatchMessage (&msg); poll = 0; } if (__global_cancel_button) break; // some global bool var gets true when cancel button is pressed } } this ^^ was a rough explanation of what I meant.. a better but tougher method is using threads.. this way you can execute more functions at the same time.. but things can go wrong easier. |
| Forum: Windows Mobile Development - Visual C++ · Post Preview: #651870 · Replies: 3 · Views: 950 |
| Posted on: Jul 27 2005, 17:22 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(muff @ Jul 25 2005, 12:18) Hiya since people were reporting the issues with GAPI games on the 550 (i.e. they are small in the center of the screen) I decided to take a very quick pass at fixing Eclipse to at least be full screen (A HUGE thanks to mavisdavis for doing my testing for me and grabbing the screenshots below) remaking it to make it fullscreen is out of the question as that's pretty much a complete rewrite, so a quick hack was in order the quick hack in question basically 'stretches' the normal image to fill the 550 screen this does mean that the graphics get a little distorted, but it does mean that it's fullscreen on the 550 So my question is, will people accept these gfx to get fullscreen?? here are some sample gfx :- [attachment=14774:attachment][attachment=14775:attachment][attachment=14776:atta hment][attachment=14772:attachment][attachment=14777:attachment][attachment=1477 :attachment][attachment=14779:attachment][attachment=14780:attachment] (though apparently it does look better in motion) all thoughts welcome, muff p.s. I do intend to support the 550 properly in future games I have written a linear scaling algorithm.. which useally produces a smoother resized image at the cost of performance.. but maybe that is something we can get away with the C550.. (prolly strong CPU?) |
| Forum: Hurricane & Variants - Hurricane.MoDaCo.com · Post Preview: #650994 · Replies: 3 · Views: 769 |
| Posted on: Jul 27 2005, 16:52 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(RussH @ Jul 27 2005, 17:35) Hi, I've pretty much decided to swap over to a C550 from a 6230. I question before jump...... Can I sync both a C550 and a Dell 50v PPC on the same desktop PC or will it cause conflicts?? Cheers Russ P.S. Can someone confirm if you can listen to music in stereo - the Orange shop says NO.....the telephone supoort says YES??? :?: :roll: if my SPV C500 can play MP3/WMA in full fledged stereo.. You can assume that the C550 also plays this in stereo.. you have to use headphones though.. |
| Forum: Hurricane & Variants - Hurricane.MoDaCo.com · Post Preview: #650981 · Replies: 4 · Views: 535 |
| Posted on: Jul 27 2005, 16:39 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
Long time.. I am posting the C550 compatible version now.. 99,9% change of it working fine. PDA users still can get the older versions.. this version is specially designed for C550 smartphones.. although it works fine on C500, MDA or any other 2003 smartphone. |
| Forum: Smartphone Software - Games · Post Preview: #650979 · Replies: 26 · Views: 3,899 |
| Posted on: Jul 27 2005, 15:55 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(muff @ Jul 27 2005, 15:41) yeah, stride is indeed pitch look at the debug.txt file in the post at the bottom of page http://www.modaco.com/SPVMan_port_for_550_...223593-s15.html you'll see the debug returns that I did on SPVMan yeah.. my brother just got home.. He has a T-Mobile MDA (pocketpc).. I tried my binary on that thing. although GX reports 240,320 back (as it should).. I was curious if that thing also returned zeroes.. but it was not the case.. CODE GXGFX Engine 0.32a Alpha Hi-Res Version debug file GXGetDisplayProperties() returns .cxWidth = 240 .cyHeight = 320 .cbxPitch = 2 .cbyPitch = 480 Library assuming hi-res support: 0 rfbi (RawFrameBufferInfo) returns .cxPixels = 240 .cyPixels = 320 .cxStride = 2 .cyStride = 480 .pFramePointer = a8500020 .wFormat = 1 .wBPP = 16 This means it was still using GXBeginDraw(); GXEndDraw(); functions.. but upon forcing the new method (ExtEscape).. it rendered the game flawlessy on the device.. meaning both functions were functioning.. I have good reason to believe that this latest binary will run 100% fine on a C550 including the HQ scaling routine (linear filtering).. I am a happy coder now You can download the Full Version (0.33a) here.. it's a CAB installer. |
| Forum: Smartphone Software - Games · Post Preview: #650966 · Replies: 42 · Views: 5,339 |
| Posted on: Jul 27 2005, 14:34 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(muff @ Jul 27 2005, 15:31) nope, I dont have a C550 when u attempt to access the hires values on a device that does not have hires - these extended GAPI function calls will indeed return 0's the best route I've thought of is the following :- 1 - use GetSystemMetrics to get the screen dimensions as the OS sees them 2 - then use the GXGetDisplayProperties to get the dimensions as the old GAPI functions see them and if they dont match THEN 3 - you call the ExtEscape functions to get the hires values and assuming that doesn't return 0's then you know the capabilities of the device with these 3 checks you will 100% know what the device is capable of you will then either have to :- 1 - write 2 different blit-to-screen functions (one lores, one hires) and then use pathing applicable to which one u want to use OR 2 - using the info returned from the above functions, set some global vars that are then used by the blit-to-screen function hope that helps muff p.s. also be aware that square screen res's are around the corner, as well as portrait OR landscape as default if you say it's true.. then technically my latest binary might support the C550.. unless c(x)(y)Stride does something different from what I expect.. (I expect the stride var's to equal function as the Pitch vars) |
| Forum: Smartphone Software - Games · Post Preview: #650930 · Replies: 42 · Views: 5,339 |
| Posted on: Jul 27 2005, 13:54 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(muff @ Jul 27 2005, 14:40) first off, make sure you have put in the resource entry as specified in the article to tell the device that the app is hires aware second, your 500 does not HAVE any different res to report - unless the device has hires support then it will either return 0's or else return the same info as the old GAPI requests with SPVMan.. I know that you succeeded getting 240x320 support.. but one question.. Do you own a C550 (your posts in the SPV C550 tv-3 topic suggests you have not).. what happens when you run SPVMan 550 on a device which only supports 176x220.. does it return 0's or 176x220?? I was expecting my C500 to report back 176x220.. instead it reports 0, 0 and the framebuffer being at 0x00000000.. (with the resourcething "CUEX" "HI_RES_AWARE" 0x0001) which can't be right. I have made another binary.. which spits out a more readable debug file. if anyone with a C550 wants to try please do so.. and upload the debug.txt file here.. So I can see if it goes wrong.. why it goes wrong.. this is what I am getting with my C500 CODE GXGFX Engine 0.32a Alpha Hi-Res Version debug file GXGetDisplayProperties() returns .cxWidth = 176 .cyHeight = 220 .cbxPitch = 2 .cbyPitch = 352 Library assuming hi-res support: 0 rfbi (RawFrameBufferInfo) returns .cxPixels = 0 .cyPixels = 0 .cxStride = 0 .cyStride = 0 .pFramePointer = 0 .wFormat = 1 .wBPP = 0 Can anyone confirm that this is correct behaivor of a C500? |
| Forum: Smartphone Software - Games · Post Preview: #650911 · Replies: 42 · Views: 5,339 |
| Posted on: Jul 27 2005, 11:56 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(muff @ Jul 27 2005, 12:33) as I said old GAPI calls only access the compatability mode. see this article :- http://msdn.microsoft.com/library/default....i_awareness.asp as for your framebuffer, well that's up to you and how you are coding it - the actual device is 16bit, tho the screen is probably capable of more I have found this article already.. but things aren't going a "smooth" as I wanted it to be.. for some reason the ExtEscape does nothing to my "RawFrameBufferInfo" structure.. the code. CODE HDC hdc = GetDC (NULL); ExtEscape (hdc, GETRAWFRAMEBUFFER, 0, NULL, sizeof (RawFrameBufferInfo), (char *) &rfbi); ReleaseDC (NULL, hdc); // thank you.. the defines CODE #define GETRAWFRAMEBUFFER 0x00020001 #define FORMAT_565 1 #define FORMAT_555 2 #define FORMAT_OTHER 3 What am I doing wrong here?? getting frustrated.. could it be that my C500 (which is using 2003SE) does not support the ExtEscape (xx, GETRAWFRAMEBUFFER, xx, xx, xx) function? I write the results binary to a file named "debug.dat" and it only shows zeroes.. meaning nothing is in there.. not even the width, height & pitches of the resolution.. extremely bothersome. I have upped my "alpha" hi-res version (which I do not know if it even works or not on a C550). I hate Microsoft for doing those things.. really.. but really bothersome. if you run the binary.. please upload the debug.dat file it creates... I am really curious how a C550 fills in this structure.. |
| Forum: Smartphone Software - Games · Post Preview: #650858 · Replies: 42 · Views: 5,339 |
| Posted on: Jul 27 2005, 10:36 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(pd.ryder @ Jul 26 2005, 21:49) nIghtorious - all works fine except for the dratted screen res. Like most games, its in the middle with a border. Is there a setting menu I'm missing for altering the res? However, strangely addictive So it basicly means that a C550 reports a 176x220 resolution even when it has a 240x320 display? if that's the case.. it won't make things easier.. hardlocking the res on 240x320 on C550 isn't going to help either if the "postage" sized image is centered nicely on the screen.. there is some "compatibility" modus going on here... which is very effective in undermining my "future-proof" programming. Is there a way to bypass this compatibility thing? even more questions.. * Has it a 16-bit framebuffer (or support for it). (since specs says it has ~162144 colors) * if so (16-bit framebuffer).. does it trigger the "compatibility-mode"? * is it possible to have framebuffers > 16-bits? * is it possible to create a 240x320x16bpp framebuffer? so many questions.. |
| Forum: Smartphone Software - Games · Post Preview: #650821 · Replies: 42 · Views: 5,339 |
| Posted on: Jul 26 2005, 19:51 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(muff @ Jul 26 2005, 20:00) nIghtorius - not sure how you are accessing the screen - if you are using GDI and a stretched blit (or indeed the new hires GAPI code) then your game will be fine on the 550 if you are using GAPI and GXBeginDraw(); and GXEndDraw(); functions then it will be postage sized as per other games No it will not be postage sized.. since it also runs full screen on PDA's (320x240 and even 640x480 ones).. I was smart enough to read out the display's maximum resolution (width, height). and if needed be. scale up to those resolutions.. and pressing the right button in the main menu will also enable a higher quality (linear filtered) scaling technique QUOTE(pd.ryder @ Jul 26 2005, 20:26) nIghtorious - downloaded and extracted. Do all the files need pasting into a folder on the m-SD card then a shortcut creating in the games directory, or am I off the mark here? Dump it in any newly created folder on your m-SD card and enjoy it.. unless some certificate crap comes up. (I do not know if the C550 is application unlocked) |
| Forum: Smartphone Software - Games · Post Preview: #650609 · Replies: 42 · Views: 5,339 |
| Posted on: Jul 26 2005, 18:52 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(adamkandel @ Jul 16 2005, 23:25) As many of you c550 holders may already know. Their is a lot of problems with playing games on the handset. First of all a few of the games have got the keypad messed up because they were designed for older smartphones. And practically all of the games won't run in full screen. they occupy around 75% instead. What i wanted to know is has anybody figured out how to get any games working in full screen? Adam try my game.. (it was never designed for a C550.. but it was designed to be run in multiple resolutions.. be it lower or higher then 176x220).. Columns SPV/CE |
| Forum: Smartphone Software - Games · Post Preview: #650578 · Replies: 42 · Views: 5,339 |
| Posted on: May 28 2005, 19:21 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
|
| Forum: Smartphone Software - Games · Post Preview: #588732 · Replies: 5 · Views: 1,144 |
| Posted on: May 11 2005, 17:19 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(styreh @ May 11 2005, 18:06) Hello can i install windows mobile 5.0 on my spv c500 without any hardware changes when it comes out? Well it depends on orange releasing a WM2005 ROM and to be blunt I don't think this is going to happen.. (although I loved to be proved wrong here since I also own a SPV C500) If you like a bit dangerous: You could try to install the french orange update ROM.. try searching this forum on how to do it. it will give you: * no more flickering bug (GAPI) * GPRS Class 10 instead of Class 8 (goes faster) * Windows Media Player Mobile 10.0 instead of version 9.0 * No more annoying HTTP:/ when holding the <- button in IE (now it sticks @ http://) * Phone won't vibrate when talking. * no more bling when holding the "#" key for special characters downsides are: * multikeypressing trouble with the 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 keys |
| Forum: Smartphone Software - Applications · Post Preview: #582600 · Replies: 32 · Views: 7,689 |
| Posted on: May 11 2005, 17:09 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
That just nice about the SPV C500 and ppl who do not know that phone.. they usually see a "large bulky" phone.. never ever realizing the potential it has.. Really.. right now.. no one freaking nokia gets close to the performance, usebility and diversity of a C500. nice conversations from some nokia users are: nokia user : "Damn that thing of yours is quite bulky.." ** I show the phone nokia user : "ooh.. that's a big screen" me : "well." ** I am opening an AVI file with Beta Player. nokia user : "WTF! that thing plays videoclips" me : "heh. watch this!" ** i am opening MSN Messenger on that thing (that mostly gets them) nokia user : "MSN Messenger? what the hell.. is this thing running Windows or something like that" me : "Yeah.. it's running windows.. so what?" nokia user is mostly speechless after that Damn.. if a phone doesn't have a 200Mhz+ ARM processor + Windows Mobile 200x (SE) I don't want it anymore. I am not even going to start about "synchronisation" with nokia's.. There is one thing I really hate.. and that's bulky software on my PC if it could be small & compact. |
| Forum: Typhoon & Variants - Typhoon.MoDaCo.com · Post Preview: #582595 · Replies: 6 · Views: 1,074 |
| Posted on: May 9 2005, 20:42 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
For ppl who want a insight of "integer"-based interpolation scaling algorithm. I have decided to give my "unoptimised" version of my bilinear filter.. CODE void bltgapi_stretchHQ (gxImage Source) { // if source != displayadapter.. if ( ( Source.width == (signed)gx_displayprop.cxWidth) && (Source.height == (signed)gx_displayprop.cyHeight) ) { bltgapi (Source); return; } unsigned short * buffer = (unsigned short *) GXBeginDraw(); if (buffer == NULL) return; // do not draw frame int dx = (Source.width << 16) / (gx_displayprop.cxWidth << 8); int dy = (Source.height << 16) / (gx_displayprop.cyHeight<< 8); int rx = 0, ry = 0; int ybump = gx_displayprop.cbyPitch >> 1; int ddx, ddy, xi; int idx, idy; unsigned short * sc1; unsigned short * sc2; unsigned short pix; int r, g, b, r2, g2, b2; for (unsigned int y = gx_displayprop.cyHeight - 1; y != 0; y--) { sc1 = &Source.framebuffer [ ( ry >> 8 ) * Source.width ]; sc2 = &Source.framebuffer [ ( ( ry >> 8 ) + 1 ) * Source.width ]; // interpolation won't come freely.. expect a huge performance hit. // but it looks so pretty ddy = ry - ( ( ry >> 8) << 8 ); idy = 256 - ddy; for (unsigned int x = 0; x < gx_displayprop.cxWidth; x++) { // buffer [x] = sc1 [(rx >> 8)]; ///// toooooo easyyyy .. :) xi = rx >> 8; ddx = rx - ( (rx >> 8) << 8 ); idx = 256 - ddx; // every pixel is formatted rrrr rggg gggb bbbb pix = sc1 [xi]; r = (( ((pix & 0xF800) >> 11) << 8 ) * idx ) >> 16; g = (( ((pix & 0x07E0) >> 5) << 8 ) * idx ) >> 16; b = (( ((pix & 0x001F)) << 8 ) * idx ) >> 16; pix = sc1 [xi + 1]; r+= (( ((pix & 0xF800) >> 11) << 8 ) * ddx ) >> 16; g+= (( ((pix & 0x07E0) >> 5) << 8 ) * ddx ) >> 16; b+= (( ((pix & 0x001F)) << 8 ) * ddx ) >> 16; pix = sc2 [xi]; r2 = (( ((pix & 0xF800) >> 11) << 8 ) * idx ) >> 16; g2 = (( ((pix & 0x07E0) >> 5) << 8 ) * idx ) >> 16; b2 = (( ((pix & 0x001F)) << 8 ) * idx ) >> 16; pix = sc2 [xi + 1]; r2+= (( ((pix & 0xF800) >> 11) << 8 ) * ddx ) >> 16; g2+= (( ((pix & 0x07E0) >> 5) << 8 ) * ddx ) >> 16; b2+= (( ((pix & 0x001F)) << 8 ) * ddx ) >> 16; // hor-fusion. r = (((r << 8) * idy) >> 16) + (((r2 << 8) * ddy) >> 16); g = (((g << 8) * idy) >> 16) + (((g2 << 8) * ddy) >> 16); b = (((b << 8) * idy) >> 16) + (((b2 << 8) * ddy) >> 16); buffer [x] = (r << 11) + (g << 5) + b; rx+=dx; } ry+=dy; rx = 0; buffer += ybump; } GXEndDraw(); } I think this is interesting material for future game-programmers. |
| Forum: Smartphone Software - Games · Post Preview: #581757 · Replies: 26 · Views: 3,899 |
| Posted on: May 9 2005, 20:35 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
The most important thing for me was (when used to programming for a x86 WinXP system) is the lack of working directories on CE platforms. I have written a "default" function for this: CODE LPWSTR GetParentDir () { LPWSTR AppPath = (LPWSTR)malloc (256); GetModuleFileName (NULL, AppPath, 256); int pos = 0; int ptr; do { if (AppPath[pos] == '\\') ptr = pos; pos++; } while (AppPath[pos] != 0); AppPath [ptr+1] = 0; // terminate string.;) return AppPath; } what does it do: * first it allocates some space for a LPWSTR (unicode).. 2 bytes per character.. filename max length 128 characters here. * Get the module filename of NULL (meaning itself).. for example \Storage Card\Games\My First Game\game.exe * find the last "\" \Storage Card\Games\My First Game\game.exe * place a #00 character (EOS) @ the position where the g of game.exe starts. effectively truncating the string @ the last "\" * return pointer to the LPWSTR structure. what do you have to do: everytime you use the function and are done with his value invoke a: delete ; So you can your make applications/games run anywhere on the storage instead of having a "fixed" location.. (which sucks) |
| Forum: Smartphone Software - Games · Post Preview: #581750 · Replies: 14 · Views: 5,517 |
| Posted on: May 8 2005, 00:45 | |||
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
version 0.3a built. * huge improvements in image quality on PDA's. it's toggleable since I do not know how much performance impact it may have on older PDA's. * more optimisations in code to make it run faster image quality improvement.. how? I have implemented a reasonably fast algorithm bi-linear stretched filter (for stretching up the 176x220 image to 240x320 or 480x640) ** edit: upped 0.31a.. contains huge "optimisation".. it uses a shadow buffer to figure out which parts of the image needs to be updated (and ofcourse bilinearly filtered).. this means around 50 upto 80% performance improvement ^^ this makes the game perfectly playable on the T-Mobile MDA instead having it crawling (running dogslow) on the 416Mhz Intel ARM processor with the HQ (High Quality) rendering. This is how it looks: before after HQ mode (press -> in the mainmenu) install the latest version of columns on your PDA/Smartphone and replace the columns.exe file with this version:
columns.exe ( 22.98K )
Number of downloads: 36 |
||
| Forum: Smartphone Software - Games · Post Preview: #581078 · Replies: 26 · Views: 3,899 |
| Posted on: May 6 2005, 23:43 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
I have optimized the binaries a bit.. faster blitting code.. more compatible code.. and I am even trying to get it working on WM2002.. replaced most WCE420 code with WCE300 compatible code. Still I cannot verify this since I am not in posession of a WM2002 telephone. you can fetch the optimized binaries here: |
| Forum: Smartphone Software - Games · Post Preview: #580813 · Replies: 26 · Views: 3,899 |
| Posted on: May 3 2005, 10:44 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(DaddyCool @ May 2 2005, 21:50) OMG! put some better graphics in it.. OMG.. wow.. I am speechless.. (For now I really know my graphics sucks ass As I really liked those new graphics by DaddyCool. I have upped the "optimised" version 0.25a. added some credits to DaddyCool in the gamecode.. (loadingscreen/mainscreen).. and when game over it shows your score and you have to press the action key to return to the main menu. two attachments again: (with DaddyCool's GFX pack applied + some fixes) the ZIP and CAB. |
| Forum: Smartphone Software - Games · Post Preview: #579267 · Replies: 26 · Views: 3,899 |
| Posted on: May 1 2005, 00:57 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(muff @ Apr 30 2005, 12:35) and shortints too QUOTE · shortint 1 Byte 8 bits @ http://www.fsref.com/Fatal/FE090500.SHTML |
| Forum: Smartphone Software - Games · Post Preview: #578669 · Replies: 26 · Views: 3,899 |
| Posted on: Apr 30 2005, 10:52 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(muff @ Apr 30 2005, 10:46) also converted x+y to ordinary int's instead of unsigned ones - personally think that signed int's are easier on the CPU than signed ones That one point I beg to differ.. good example: as we take 8-bit signed/unsigned integers. (shortint if I am correct) computation: 32+64 = 96 (unsigned) 0010 0000 0100 0000+ ------------ 0110 0000 = 96 (unsigned) now 128 + 32 = 160 (unsigned) 1000 0000 0010 0000+ ------------ 1010 0000 = 160 what if -32 + 32 = 0 (signed) 1110 0000 (!!! -32 signed var) 0010 0000+ ------------ 0000 0000 = 0 8) (signed) meaning.. signed or unsigned integers is treated the same by the CPU.. actually there is no difference in arithmetic. another example: heftier one.. -44 + 80 = 36 (signed) 1101 0100 0101 0000+ ------------ 0010 0100 = 32 + 4 = 36 (signed) and again.. the right answer popped up. never ever had to change the method of computation here. that is the beauty of 2-complement numbers |
| Forum: Smartphone Software - Games · Post Preview: #578472 · Replies: 26 · Views: 3,899 |
| Posted on: Apr 30 2005, 09:29 | |
|
Newbie Group: Posters Posts: 28 Joined: 25th March 2005 Member No.: 119,535 |
QUOTE(muff @ Apr 30 2005, 00:36) the first optimisation you did there was the obvious one I meant only thing I'd then look at is reversing the x&y loops to do -- instead of ++ [ this means that the compiled code will be doing the equivalent of "branch if not zero" test, instead of actually doing a comparison ] precalc the y line buffer bump as well? - instead of recalcing each time as well oh, and on a device that has the original resolution, obviously dont do any scaling, have a tighter code specifically for that scenario - only add's an 'if' as overhead (actually on re-reading u might already have done this) are you allowing for the different aspect ratio's at all? there are loads more potential optimisations that are based on experience with the devices (like PPC's executing a blit loop like above slower than the Smartphones - so you end up writing specific blit's) please dont take these as criticisms of your code though - think of it as enthusiatic fellow coder assistance it's good to see a new coder on the block muff don't worry.. there is a if statement which checks if the resolution and output are equal and executes a much faster (just a bunch of memcpy's) method.. I haven't shown this piece of code as it is too obvious how to code such thing. I am quite new to "C/C++" compilers.. But what you just said about "branch if not zero" sounds about right. at least I think it is.. since my "old" assembly days the "JNZ" instruction was far more efficient to use then "CMP AX, xxxx; JZ" about the specific blits.. that alone defeats my purpose of having one piece of readable code for all PocketPC devices. I try to find the slowest piece of hardware I can find and if it still runs great then it is fine by me about the y line buffer bump precalculation.. did you mean like this: CODE scanline += ylbump; I would love to do such optimization.. but my "ylbump" is irregular. It may bump or it may not bump.. But there is a way.. but then I am wondering if it actually goes faster.. this is the optimisation I mean CODE unsigned short * buffer = (unsigned short *) GXBeginDraw(); if (buffer == NULL) return; int dx = (Source.width << 16) / (gx_displayprop.cxWidth << 8); int dy = (Source.height << 16) / (gx_displayprop.cyHeight << 8); int rx = 0, ry = 0, by = 0; unsigned short * scanline; scanline = Source.framebuffer; for (unsigned int y = gx_displayprop.cyHeight; y > 0; y--) { if ( (by >> 8) != ry) { ry = ( by >> 8 ); scanline += Source.width; } for (unsigned int x = gx_displayprop.cxWidth; x > 0; x--) { buffer [x] = scanline [(rx >> 8)]; rx+=dx; } ry+=dy; rx = 0; buffer+=gx_displayprop.cbyPitch >> 1; } GXEndDraw(); ps) this is a nice discussion.. it forces me to perform better. 8) btw) as a fellow coder.. What programming-tools are you using for your games? I am using eMbedded VC++ 4.0 for my programming needs ps2) aren't you the one who made SPVMan? since there is also a "SPVMan by Muff" in there |
| Forum: Smartphone Software - Games · Post Preview: #578448 · Replies: 26 · Views: 3,899 |