PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Request for Dev info.

Hi All,
I'm about to start my first Pocket PC game and I'd like a some ideas on what pixel formats I should support. Is it worth still supporting 8 bit displays anymore, or just go for 16 bit? I assume its possible to inline _asm {} where you want? There seems to be a lot of sample code around with pixel loops in C, whats all that about? Surely you want your blits / blends in asm? Also is the screen address returned in GAPI guaranteed to be 4 byte aligned to allow 32 bit load/stores? I'm going to be using eVC & emulator to debug, is everyone else's single step (through source) very sllloooow?

Thanks for your help.

Steve.
1.most ppl use 16bpp only
2.you can't use inline asm in evc++ as far as I know.
3.what's wrong with pixel loops in C? Ok, they aren't as fast as possible, but they still do the job well.
4.4 byte aligned? well, I think it is, at least on the 16bpp devices.
5.I use emu also, and everything works fine.
Emu complaining HA. Back in my day (about 3 weeks ago), I debugged by single stepping on the device. Now that is slow. Try going through the entire PL source (when I first started out) to find where the crash was created. (because of course the crash has to occur in a precompiled file from microsoft that is recieving bad paramiters) Those were the days. You lazy youths and your Winders 2 million and shit. You don't know how good you have it.~

Also, only arm processors are incapable of accepting inline asm, mips and sh3(or sh4, or maybe both) work just fine with it.

And, I have never recieved an alignment error when it comes to display something on the screen, and trust me, windows ce doesn't even try to handle allignment errors on its own, but let's not get into that.
Varkentje? Dat moet een Nederlander zijn. :) Welcome aboard!
Hi All, thanks for the info.

>1.most ppl use 16bpp only

Cool, that removes a load of dodgy paletting code I was tring to avoid. 12BPP is a baaad idea too!

>2.you can't use inline asm in evc++ as far as I >know.

It looks like you can do it for all of them except ARM asm.

>3.what's wrong with pixel loops in C? Ok, they >aren't as fast as possible, but they still do the >job well.

It depends what you mean by 'well'. I'm all for using C for 99% of the game, but hand optimised pixel loops may well double your frame rate. I did SH asm on Sega Saturn (before it sank), ARM on Archimedes (before that sank) and MIPS on PS1 & PS2, and you can get big speed gains all over the place. You have a bunch of extra CPU registers you can preload to stop load/store stalling (Esp on MIPS).

>4.4 byte aligned? well, I think it is, at least on >the 16bpp devices.

Great.

>5.I use emu also, and everything works fine.

Mine works...it still takes seconds to single step though... :( I've switched to using the PocketFrog GAPI emulation. I develop just as if you were doing a PC game, no using that shabby emulator and all the copying of files to from the emu. I might look to porting GAPI emulation to DirectX so I can stretch that tiny window or change the screen res. Its a lot quicker. I'm keeping all the PPC source seperated from the the Windows filth. Obviously I dont get any speed indications, so I'll have to get around to buying / borrowing a PPC at some point!

>You lazy youths and your Winders 2 million and >shit. You don't know how good you have it.~

Ha, ha ha! Thats first time in ages I've been called a youth!
You should try 'blind' debuging VU0 code on PS2. You can't even see whats going on. Either that or try using a Sega Mega CD devkit :(

>Also, only arm processors are incapable of >accepting inline asm, mips and sh3(or sh4, or maybe >both) work just fine with it.

Wahoo. Shame about ARM though. No chance of a seperate ARM assembler that produces linkable .obj's then?

>Varkentje? Dat moet een Nederlander zijn. Welcome >aboard!

Nope UK. Got the name from a Dutch game programmer though (and yes, I do know what it means!)

Thanks again for your help.

Steve.
There is a seperate armasm.exe that compiles ARM assembly to obj files. there is also one for the SH3, but none for the MIPS (I think you can purchase one, though). The syntax is described in the help files. You can also tell eVC to show the ASM output the C compiler creates through the project settings page.