Sunday, December 27, 2009

T|X internal storage

TX internal storage is a NAND flash chip. This is difficult for a few reasons, mostly, because NAND needs wear-leveling, and special filesystems, neither of which is standardized. There isn't even a standard way to lay out a partition table! Thus to get TX internal storage to work there are three components to be created: BlockDevice driver to talk to the NAND chip, PartitionManager plugin to figure out the partitions on the device, and filesystem driver for the FS used in the TX (something called "BFFS").

I am happy to report that the first two pats are complete and working. The third is harder, however I've had some help from a programmer in China (irc handle tech_junkie_chz_5481), who seems to know a lot about this BFFS and has helped me craft a driver for it all in one night. The testing is going to start soon.


PS: Hello from Buenos Aires!

Thursday, December 17, 2009

UiLib

Did some work on UiLib and various UI components.

Now off to a 2-week vacation :)

Wednesday, December 16, 2009

E2 final update

T|E2 now boot reliably into DGOS. Now i will go back to userspace work.

Sunday, December 13, 2009

T|E2

T|E2's processor is a generation older then TX's and LD's (and htu slacks some features DGOS kernel uses), but the kernel comes up (somewhat) on it. Will work today on making that 100%

Saturday, December 12, 2009

TX NAND further updates

TX NAND speaks to me just fine, AND i am able to parse palm's strange partition table, ECC codes, as well as bad block chains. Next: parsing their filesystem used on the TX: It's called "blunk flash file system" and getting an official copy of the spec for it costs $15,000

Friday, December 11, 2009

TX NAND speaketh...

...and it says CE F1 80 15



[for those who have no idea what that means - the TX internal storage driver had been started, and just successfully spoke to the flash chip. Those numbers are the chip's ID number]

Thursday, December 10, 2009

Update

My new job is getting me into habit of daily status updates, so here goes :).

LD usb driver still being stubborn, TX internal memory chip can be read/written/erased, but data is still somewhat cryptic, next demo will demonstrate a functionality like CardExport, but under DGOS on an LD, and the one after that will be a TX demo. Lots of work needs to be done on the UI, and I welcome all takers, who want to make an effort to develop/help with the UI design/programming (I am just one man, working an average of 45 minutes a day on this, afterall)

Tuesday, December 8, 2009

Small update

A small but important bug was fixed in module makefiles, and lifedrive USB driver has been split off into its own module, and some more work was done on it. now it's maybe 60% done :)

Look for more updates soon.

Monday, December 7, 2009

GfxLib transparency works well

A small video. Shows two semitransparent layers interacting using GfxLib. Also shown is the boot process. Enjoy.






The quickly-written and messy source code to this simple test app is as follows:

#include <kTypes.h>
#include <errors.h>
#include <RtLib.h>
#include <GfxLib.h>



static char __x[128];
#define printf(...) do{sprintf(__x,__VA_ARGS__);_DGOS_DEBUG_TMP_printStr(__x);}while(0)
#define perr(...) do{printf(__VA_ARGS__); while(1) SchedYield();}while(0)

int _start(){

GfxImage* i;
GfxLayer* L;
GfxLayer* L2;
UInt32 iw, ih, sw = 324, sh = 484;
Int32 x = 0, y = 0, dx = 1, dy = 1;
UInt16* d;
Err e;

printf("TEST RUNNING\n");

if(!GfxLayersInit(GFX_LIB_ROTATION_NORMAL)){
perr("cannot init GfxLayers\n");
}

printf("setting color\n");
GfxLayersSetBackground(GfxColorMakeRGB(192,255,192));

printf("creating layer\n");
L2 = GfxLayerCreate(0, 0, 324, 484);
if(!L2) perr("cannot create layer with bg\n");


printf("calculating layer\n");
printf("L=0x%08x\n", L2);
printf("I=0x%08x\n", GfxLayerGetImage(L2));
printf("D=0x%08x\n", GfxImageGetData(GfxLayerGetImage(L2)));
printf("A=0x%08x\n", GfxImageGetAlpha(GfxLayerGetImage(L2)));

d = GfxImageGetData(GfxLayerGetImage(L2));
MemSet(GfxImageGetAlpha(GfxLayerGetImage(L2)), 324*484, 0xFF);

for(y = 0; y < 484; y++){
for(x = 0; x < 324; x++){
UInt32 r,g,b;

r = y * 256 / 484;
g = y * 256 / 484;
b = y * 256 / 484;

r = ((r * x) + (256 * (323 - x))) / 323;
g = ((256 * x) + (g * (323 - x))) / 323;


*d++ = (((y / 10) & 1) == ((x / 10) & 1)) ? \
GfxColorMakeRGB(r,g,b) : \
GfxColorMakeRGB(0,0,b);
}
}

printf("drawing layer\n");
GfxLayerRedraw(L2);


printf("loading img\n");

e = GfxLibLoadPng(3,L"/test.png", &i, false);
if(e) perr("cannot load image: 0x%04x\n",e);

GfxImageGetDimensions(i, &iw, &ih);

printf("img is %dx%d\n",iw,ih);

L = GfxLayerCreateWithImage(0, 0, i);
if(!L) perr("cannot create layer with image\n");


x = 0;
y = 0;

while(1){

x += dx;
y += dy;

if((x + iw >= sw) || x <0){
dx = -dx;
x += 2 * dx;
}
if((y + ih >= sh) || y < 0){
dy = -dy;
y += 2 * dy;
}

GfxLayerSetLocation(L, x, y);
}

while(1) SchedYield(); //idle well
}

Wednesday, December 2, 2009

Demo Time?

Perhaps it's time for a small demo? Perhaps a video of the boot process on an LD or a TX? Or maybe a small demo of a simple doodling app. While hardly impressive by itself, both of these build on an entirely new OS, which makes them impressive.

Or perhaps wait till the UI lib is finished, and a new semi-transparent UI can be demoed as well?

Or perhaps both?

What do you think. Comment to reply.


[currently LD is the most supported device, with TX close behind given that it is so similar. T|E2 was tested a few times and worked reasonably well, to some extent, but lately it doesn't. I think my new scheduler code is to blame. I'll look inot it later.]