PocketMatrix forums

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

Sanity check (with platform builder)..

Hi there.

I have an "interesting" problem. While playing with the framebuffer bits and pieces I've come across something strange.

If somebody with an ARM device and PlatformBuilder (or preferably lots of people with lots of different ARM devices) can run this code:

Code:

unsigned short buffer[128];
unsigned short buffer2[128];


for(int i=0;i<4;i++)
{
_ultow( UserKInfo[i], buffer, 16 );
_itow(i,buffer2,10);
MessageBox(NULL,buffer,buffer2,MB_OK);
}


(include "pkfuncs.h", and the messageboxes may hide behind other windows when they come up :( )
and tell me what you get.

Just for the record, I get:

0x8c0b9600
0x1000
0 <---- I expected 12 here
0xfffff000


What I'm concerned about is that the 3rd value ([2]), KINX_PFN_SHIFT, returns *ZERO* on my iPAQ. This was not what I was expecting.

The KINX_PAGESIZE /is/ correct - 4KB, and the mask masks the correct 12 bits... However, I was expecting the shift to return the shift to go from a physical address to a page number (i.e. log2(KINX_PAGESIZE)==12).

It's work-roundable, of course, but it just isn't what I expected and I thought that maybe the iPAQ's config was screwy, so if people can run the proggie and post the values they get, I'd be obliged.

Thanks very much,

Refractor
If you would be kind enough to put it in the form of an exec, I would be happy to run it on my e200.

[edit]Just read that you want us to have platform builder, nm.
Here it is:

<a href="ftp://217.115.144.38/pub/iPAQ/Hardware.exe">Hardware.exe</a>

Please post the results. Note that the messageboxes seem to like hiding behind other windows on my iPAQ.

The code for the program is:

Code:
// Hardware.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "pkfuncs.h"
#include "winuser.h"
//#include "dbgapi.h"

int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{

unsigned short buffer[128];
unsigned short buffer2[128];

for(int i=0;i<4;i++)
{
_ultow( UserKInfo[i], buffer, 16 );
_itow(i,buffer2,10);
MessageBox(NULL,buffer,buffer2,MB_OK);
}

return 0;
}


Cheers,

Refractor
Ok, here are the results from an e200.

Dialog results.
0=8c131c80
1=1000
2=0
3=fffff000
Ok. Looks like it's me being insane.

Thanks very much, R0B. :)