This site is no longer active and is available for archival purposes only. Registration and login is disabled.

15bit to 16 bit


Postby refractor » Jun 20, 2002 @ 4:20pm

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby R0B » Jun 20, 2002 @ 6:03pm

I think I remember hearing about this from somewhere else. I will probably just make an ipaq version and a nonipaq version. If you notice, ziosoft ran into the same problem with their tiger woods golf, and that is why there is two versions. Try to switch to landscape on the e200, and the screen becomes all garbled.
"1011001010 NNNNNNNNNNOOOOOOOOOOOOOOOO!!!!!!" -Bender
User avatar
R0B
got muffins?
 
Posts: 1894
Joined: Jun 22, 2001 @ 12:04pm


Postby R0B » Jun 23, 2002 @ 10:30pm

"1011001010 NNNNNNNNNNOOOOOOOOOOOOOOOO!!!!!!" -Bender
User avatar
R0B
got muffins?
 
Posts: 1894
Joined: Jun 22, 2001 @ 12:04pm


Postby refractor » Jun 24, 2002 @ 9:55am

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby R0B » Jun 25, 2002 @ 3:48am

"1011001010 NNNNNNNNNNOOOOOOOOOOOOOOOO!!!!!!" -Bender
User avatar
R0B
got muffins?
 
Posts: 1894
Joined: Jun 22, 2001 @ 12:04pm


Postby billcow » Jun 25, 2002 @ 7:21am

Most people don't know that "A highly technical term" is actually a highly technical term used to describe something that doesn't mean anything
User avatar
billcow
pm Member
 
Posts: 81
Joined: Jan 6, 2002 @ 12:22am
Location: Dryden, NY


Postby refractor » Jun 25, 2002 @ 12:49pm

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby R0B » Jun 25, 2002 @ 3:58pm

Those are some very interesting concepts that you have taught me. Now, here is the thing. Because of the way casio has their vram set up(it's 240x320, not 320x240), you have to perform a rotated blit for landscape mode, which means that every pixel is 480 bytes apart in a row (this is in landscape mode). So, is there a way to copy 2 pixels at a time with this setup?
"1011001010 NNNNNNNNNNOOOOOOOOOOOOOOOO!!!!!!" -Bender
User avatar
R0B
got muffins?
 
Posts: 1894
Joined: Jun 22, 2001 @ 12:04pm


Postby refractor » Jun 25, 2002 @ 4:12pm

Well, the screen is still usually a linear buffer... i.e. a contiguous chunk of memory.

So, it really shouldn't shouldn't matter the orientation of the screen. Just because GAPI tells you you have to do stupid things like move the pointer along 480 to access the "next" pixel horizontally doesn't mean that you have to play by its rules and actually do it.

Ask GAPI to give you the start address of the screen and the orientation, and then shove a full, contiguous row/column into it (depending on the orientation), and move along to the next row/column (on the iPAQ you don't even need to move along to the next row, but on some devices you might). All you've got to do is watch out for variations in the "pitch".

If you're plucking pixels from a rotated buffer it should be fairly simple to pick them out two at a time, transform them and plot them.

If you always try and load and store in the same "grain" as the memory/cache-lines you're going to produce fast code.

If you start loading and plotting 16-bit pixels one at a time, all over the memory it's going to be slow as hell. You need to try to do at least one side of things (loading or storing) contiguously in memory.

Cheers,

Refractor
User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby R0B » Jun 25, 2002 @ 4:34pm

"1011001010 NNNNNNNNNNOOOOOOOOOOOOOOOO!!!!!!" -Bender
User avatar
R0B
got muffins?
 
Posts: 1894
Joined: Jun 22, 2001 @ 12:04pm


Postby refractor » Jun 25, 2002 @ 5:01pm

You might not be grabbing pixels from contiguous blocks, but you should be able to store them contiguously. Even if you load eight individual pixels from your (rotated) source using LDRH then transform and store them using a STMIA you're going to gain speed, IMO. Essentially you want to implement a simple form of write-buffering.

You should at least try and combine the operations, otherwise you're just loading and processing the same data over again (and a screen-full of data is much larger than the cache so the cache isn't going to help).

Cheers,

Refractor
User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby britcode » Jun 25, 2002 @ 5:58pm

britcode
 


Postby billcow » Jun 25, 2002 @ 8:04pm

Most people don't know that "A highly technical term" is actually a highly technical term used to describe something that doesn't mean anything
User avatar
billcow
pm Member
 
Posts: 81
Joined: Jan 6, 2002 @ 12:22am
Location: Dryden, NY


Postby refractor » Jun 25, 2002 @ 8:36pm

Non-contiguous is bad because on a cached area of memory, every read loads an entire 32-byte cache line (and stalls the data bus while it's doing it). The same kind of thing goes for writing - if you're writing contiguous blocks of memory to a buffered area then the write-buffer is used and you get less stalls on the data-bus.

As billcow says, though, the screen on most systems isn't actually cached, or buffered, so writing to the screen isn't affected as much as writing elsewhere... but IMO it's almost always worth doing it "properly".

Cheers,

Refractor
User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby Varkentje » Jul 7, 2002 @ 12:45am

Varkentje
pm Member
 
Posts: 4
Joined: Mar 16, 2002 @ 8:35pm


PreviousNext

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron