x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Compilepalooza!

« Prev 1 2 3 4 5 6 7 8 ... Next »
I dunk for bananas Page Icon Posted 2022-12-09 6:38 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
702
Location:
Europe
Status:
Progress? a chunk is missing sadly, I wonder what could be causing it?



(Untitled.jpg)



Attachments
----------------
Attachments Untitled.jpg (77KB - 0 downloads)
 Top of the page
torch Page Icon Posted 2022-12-09 6:42 PM
#
Avatar image of torch
Subscribers
H/PC Guru

Posts:
5,713
Location:
United States 
Status:
I compiled it for Windows CE 5.0 x86.
Should I try compiling it for PocketPC 2002 x86 just to see if it’s any different ?
edit try the first normal file,
then try the second one

Edited by torch 2022-12-09 6:52 PM
 Top of the page
C:Amie Page Icon Posted 2022-12-09 7:10 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,976
Location:
United Kingdom
Status:
A quick guess as to how to make the resolution dynamic:

// Get the device context of the screen 
HDC hScreenDC = CreateDC(_T("DISPLAY"), NULL, NULL, NULL);      

int cxWidth = GetDeviceCaps(hScreenDC, HORZRES); // cxWidth or GetSystemMetrics(SM_CXFULLSCREEN);
int cyHight = GetDeviceCaps(hScreenDC, VERTRES); // cxHeight or GetSystemMetrics(SM_CYFULLSCREEN);
// cbxPitch [number of bytes to move right one x pixel, can be negative]
// cbyPitch [number of bytes to move down one y pixel, can be negative]
int cBPP = GetDeviceCaps(hScreenDC, BITSPIXEL); // bpp
int ffFormat = (kfDirect | kfDirect565); // format
BOOL bBuffer = TRUE // bDRAMBuffer

DeleteDC(hScreenDC);

// Configuration, select what you want from above list
Config l_config = { cxWidth, cyHeight, 480, -2, cBPP, ffFormat, bBuffer };



I am not sure how to ascertain programmatically if there is a screen buffer or what the format and pitch are. They are supposed to come out of GXGetDisplayProperties, but obviously this is being stubbed by this fake DLL. WinCeSoft uses a configuration database in the GAPI settings.
As for the cb Pitch values, currenty I'm vague on the maths on that one to even begin to guess. Anyone here understand how it is defined?

cxWidth
The number of visible pixels across the display. Width is considered the left to right measurement when looking at the physical device.

cyHeight
The number of visible pixels along the height of the display.

cbxPitch
The number of bytes to add to move a pointer to the right one pixel. See note below about display depths that are less than 8 bpp.

cbyPitch
The number of bytes to add to move a pointer down one pixel. See note below about display depths that are less than 8 bpp.

cBPP
The number of bits per pixel. Always a power of 2.

ffFormat
Information about the display format. Code member is one of the following format flags.
Flag Description:

KfLandscape
Display is oriented on its side. 0,0 is in the lower-left corner; increasing addresses move up the screen. Generally, it is not an issue if you use cbxPitch and cbyPitch. See Remarks below about display depths that are less than 8 bpp.

KfPalette
Display is palette based.

KfDirect
Display is direct mapped, no palette. This is a "helper" bit, so you do not have to check all the direct flags manually.

KfDirectInverted
Indicates the display colors are inverted. For example, with black and white colors, white is black.

kfDirect555
kfDirect565
kfDirect888
Format of a direct mapped pixel. Numbers specify bits per color in red-green-blue order. The Intel byte order is assumed: for kfDirect565 a
left shift of 11 will put the low-order bits of a short or long into the red position.
 Top of the page
C:Amie Page Icon Posted 2022-12-09 7:12 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,976
Location:
United Kingdom
Status:
Quote
I dunk for bananas - 2022-12-09 6:38 PM

Progress? a chunk is missing sadly, I wonder what could be causing it?

Probably because the pitch calculation has not been adjusted.
 Top of the page
I dunk for bananas Page Icon Posted 2022-12-09 7:40 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
702
Location:
Europe
Status:
Quote
torch - 2022-12-09 6:42 PM

I compiled it for Windows CE 5.0 x86.
Should I try compiling it for PocketPC 2002 x86 just to see if it’s any different ?
edit try the first normal file,
then try the second one


One worked but had the same problem as the previous one, and the other caused a fatal error
Do you think we could try the LANDSCAPE_565 and change its resolution to 720x576? That would involve going to line 75 and changing "240, 320" to "720, 576" and changing "SIMPLE_565" on line 98 to "LANDSCAPE_565". The official site also mentions a thing about that configuration
 Top of the page
torch Page Icon Posted 2022-12-09 8:07 PM
#
Avatar image of torch
Subscribers
H/PC Guru

Posts:
5,713
Location:
United States 
Status:
Ok here
 Top of the page
I dunk for bananas Page Icon Posted 2022-12-09 8:17 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
702
Location:
Europe
Status:
It gave me a fatal application error sadly
 Top of the page
torch Page Icon Posted 2022-12-09 8:20 PM
#
Avatar image of torch
Subscribers
H/PC Guru

Posts:
5,713
Location:
United States 
Status:
I put it in order like you told me with 720 576 instead of 576 720
 Top of the page
I dunk for bananas Page Icon Posted 2022-12-09 8:31 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
702
Location:
Europe
Status:
Could you revert it back to what it was previously but leave it at LANDSCAPE_565, on line 98?
 Top of the page
torch Page Icon Posted 2022-12-09 8:33 PM
#
Avatar image of torch
Subscribers
H/PC Guru

Posts:
5,713
Location:
United States 
Status:
Yeah I want to delete all of the project code and start over again. I’m heading to work now but do me a favor.
Give me 3-4 different variation coding ideas (if you’re able and more if you want) and I’ll compile them all for you tonight or tomorrow.
 Top of the page
I dunk for bananas Page Icon Posted 2022-12-09 8:58 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
702
Location:
Europe
Status:
Of course!

  • As is, but change mode to LANDSCAPE_565, on line 98



That's sadly it for now in terms of what I can think of to try

This has explanations of what each value does!!!

@C:Amie perhaps this helps you make a little more sense of it?

edit: This has more info on pixel pitch!

Edited by I dunk for bananas 2022-12-09 9:11 PM
 Top of the page
stingraze Page Icon Posted 2022-12-10 12:51 AM
#
Avatar image of stingraze
Subscribers
H/PC Vanguard

Posts:
3,677
Location:
Japan
Status:
Quote
torch - 2022-12-09 7:05 PM

Thank you for testing it for us, I’ll add screenshots soon, stingraze.
Yeah I was following it but it seemed too confusing for me to deal with. I’ll try again soon
Also. I want to try to see if those Korean MIPS ce 5.0 programs with the source code can be ported to x86
https://m.blog.naver.com/PostView.naver?blogId=copjoker&logNo=120042...

I’m especially interested in getting a newer ScummVM release for us. But I’ll run through to see what else I can do

I’ve been playing with the source code for everything that said “open source “ in the SCL to try and get more x86 but I haven’t been successful.

So if you have something else that you can think of for me to try and have a go at (different program you’ve been wanting compiled perhaps?), let me know

You're welcome.
Good luck with compiling! You're making real progress.

-stingraze
 Top of the page
torch Page Icon Posted 2022-12-10 5:03 AM
#
Avatar image of torch
Subscribers
H/PC Guru

Posts:
5,713
Location:
United States 
Status:
Quote
I dunk for bananas - 2022-12-09 1:58 PM

  • As is, but change mode to LANDSCAPE_565, on line 98



File named dll 2
   Config      l_config         = LANDSCAPE_565; 
#define LANDSCAPE_565       { 240, 320, 480,  -2, 16, kfDirect | kfDirect565,                    TRUE } 

Quote
I dunk for bananas - 2022-12-09 1:31 PM
Could you revert it back to what it was previously but leave it at LANDSCAPE_565, on line 98?

File named dll 1
#define LANDSCAPE_565       { 576, 720, 480,  -2, 16, kfDirect | kfDirect565,                    TRUE } 

Quote
stingraze - 2022-12-09 5:51 PM
You're welcome.
Good luck with compiling! You're making real progress.
-stingraze

Thank you, stingraze. Honestly, I couldn't have asked for a better online community - you lot are unique, one of a kind, and fun! (I added those screenshots btw, thanks again. A part of me still wants a JP CE device ha!)
 Top of the page
C:Amie Page Icon Posted 2022-12-10 10:00 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,976
Location:
United Kingdom
Status:
Quote
I dunk for bananas - 2022-12-09 8:58 PM

Of course!

  • As is, but change mode to LANDSCAPE_565, on line 98



That's sadly it for now in terms of what I can think of to try

This has explanations of what each value does!!!

@C:Amie perhaps this helps you make a little more sense of it?

edit: This has more info on pixel pitch!


No, I had seen them before. I know what it is, I explained them in my markup above, it doesn't explain the calculation or how to programmatically ascertain the values needed to define the pitch calculation.
 Top of the page
C:Amie Page Icon Posted 2022-12-10 11:20 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,976
Location:
United Kingdom
Status:
Looking at WinCESoft's GAPI, there is a monstrous great big lookup table (65KB) in gx.dll, so it may simply be the case that CE doesn't have the API support to automate this >_<

It might be possible to use SystemParametersInfo() and SPI_GETOEMINFO and possibly SPI_GETPLATFORMMANUFACTURER, SPI_GETPLATFORMNAME and SPI_GETPLATFORMVERSION on newer CE version to automate the lookup
 Top of the page
« Prev 1 2 3 4 5 6 7 8 ... Next »
Jump to forum:
Seconds to generate: 0.218 - Cached queries : 73 - Executed queries : 9