yashsingh1/xdaforums huggingface dataset:
[Touch HD Windows Mobile ROM Development] orux:
Hello all;

This is my blackstone after changing one register in epson controller. I am working with my 020209 diff (this means no detour, bad display output)

I have dumped all the registers (from linux).

Reg nº 0x0400 controls "Host interface data type selected"

Value in linux --> 0x8001 (means rgb666)

If we put -->0x8000 (means rgb565) the displays seems ok, but compressed to 2/3 of screen?

There are a lot lot lot of registers, with different purposes. We need study them, and compare linux values with wince values.
[Touch HD Windows Mobile ROM Development] orux:
Linux lets you change epson controller registers from user space (see mddi.c)

If any one (WHO KNOWS WHAT HE IS DOING) want to try, after studying epson docs, this is the way.
[Touch HD Windows Mobile ROM Development] patp:
That's very cool. It's not chopping the ends of the lines off, that left portion is behaving properly and wrapping lines of text. How many pixels wide is the "good" portion?

I'd happily have a go at playing with these registers, as long as I can learn enough to do it in a way that has a very low chance of bricking my phone.
[Touch HD Windows Mobile ROM Development] orux:
The good side it is exactly 2/3 = 320 pixels = 0x140.
[Touch HD Windows Mobile ROM Development] patp:
Orux does this mean you are now addressing the screen through the mdp? It seems like you'v enearly solved this!
[Touch HD Windows Mobile ROM Development] orux:
Yes, the framebuffer is using mdp.

I have a compressed to 2/3, but functional (with very small font size) display now :)

touchscreen works, keyborard works.

There are four registers with value 0x13f=0x140-1. I have test changing values to 0x1df, but nothing happens.

Need more investigation.

If anyone knows how to dump those registers in wince, plz tell me.
[Touch HD Windows Mobile ROM Development] dedafmonteur:
omg this is so awsome, i hope it all works soon.

props to the guys who code and do stuff i dont understnad...lol

if you need to know something about a car ask me im mecaninc, thats the only thing i understand..lol

I really hope this will work and that maybe you can make a ROM from this.
[Touch HD Windows Mobile ROM Development] patp:
Bootloader must be doing the same thing to initialize the panel. Can you figure out the address of the registers by looking for where it writes 0x08000? Maybe it also puts 0x1df somewhere.
[Touch HD Windows Mobile ROM Development] orux:
I have got the spl epson init routine. There are some differences with dumped values.

I am going to examine those values. And take a look inside disptools.dll, because wince initiates lcd through this dll.

Could this strange behaviour be caused by a pixclock too fast?
[Touch HD Windows Mobile ROM Development] JanSchotsmans:
Is it the panel itself that only supports 565 RGB?

From the documentation I get that the epson controller supports 565, 666 and even 888 rgb formats.
[Touch HD Windows Mobile ROM Development] patp:
No, if it was a clock problem surely it would just be a mess all over. Not at exactly 320px.

Seems like the fb is defined at the wrong size. What if the screen memory runs down the columns rather than across the rows? If the memory allocated for fb was too small, you would get this effect.

Where is the epson document?
[Touch HD Windows Mobile ROM Development] JanSchotsmans:
Posted a few pages back:

http://vdc.epson.com/index.php?option=com_docman&task=cat_view&gid=278&Itemid=40
[Touch HD Windows Mobile ROM Development] patp:
Thanks. What a lot of registers!

[0520h] is the Horizontal image size. What's in it? In fact, Orux, have you dumped all the Epson registers? If so, could you post them (or briefly explain how to query them)?
[Touch HD Windows Mobile ROM Development] Rewpparo:
Orux, you're my god !

I'll be home tomorrow evening, I'll check it then. Thanks a bunch man ! could you send a diff to your 0202 ?
[Touch HD Windows Mobile ROM Development] orux:
A heap of docs dumps and diffs.

The one important now is mddi_remote_regs.txt, those are epson linux register values.

This evening I´ll have wince values.
[Touch HD Windows Mobile ROM Development] orux:
It was easy;

spl epson init secuence:
[Touch HD Windows Mobile ROM Development] daniel.hunt:
I find this kind of discussion fascinating. I just wish I knew what the hell was being discussed :D
[Touch HD Windows Mobile ROM Development] patp:
longshot... fb console is not the same code a fb gui? screen sizes not correctly set in console code?

or... fb is correct input image size but screen is scaling it down. Q: are the letters on your 2/3 screen smaller than the full screen console. if so, it's scaling and prob epson setup. if not, more likely incorrect fb size
[Touch HD Windows Mobile ROM Development] patp:
These appear to be the most relevant registers. The spl does it very differntly.

reg 500 --> 120 = 100100000

Bit 9 (set here) Sub Memory Write Path Overflow Flag

This bit indicates the raw status of the Sub Memory Write Path Overflow flag.

When this bit = 0b, an overflow has not occurred.

****When this bit = 1b, an overflow has occurred****

Bit 6 is Reserved, default is 0 but here it has been set, we don't know why.

reg 504 --> 1

Rotation Mode Select bits [1:0]

These bits select the rotation applied for writes using the Main Memory Write Path.

Set to 01=90deg (not set in spl)

reg 508 --> 0

reg 50c --> 0

reg 510 --> 0

reg 514 --> 0

These 4 are buffer addresses, default is 0x000, same in spl

reg 518 --> 2e

REG[0518h] Main Memory Line Address Offset Register

REG[0518h] bits 6-0 = line address offset in bytes ÷ 32

same in spl

reg 51c --> c7

Main Memory Vertical Size Register

bits 7-0 = vertical size in lines ÷ 4 - 1

c7=199 so this is correct (800/4 -1)

same in spl

reg 520 --> 7

Main Image Horizontal Size bits [9:0]

These bits determine the write window horizontal size before rotation is applied (***note we have rotation here)

bits 9-0 = horizontal size in pixels - 1

The write window horizontal size can range from

a minimum of 1 pixel (REG[0520h] = 0000h) to a maximum of 864 pixels

(REG[0520h] = 035Fh).

On the spl dump of registers this value is 1df (479) which is what it should be.

in linux is is 7

reg 524 --> 0

Main Image Vertical Size bits [9:0]

These bits determine the write window vertical size before rotation is applied

bits 9-0 = vertical size in lines - 1

***set to 31f in spl = 799.

reg 528 --> 100

Main Image X Start Position Register

bits 9-0 = X start position in pixels

linux=100h (256decimal)

spl=0

reg 52c --> 31f

Main Image Y Start Position Register

bits 9-0 = Y start position in lines.

linux: 31f=799

spl: 0

spl registers:

0500 0000

0504 8000

0508 0000

050c 0000

0510 0000

0514 0000

0518 002e

051c 00c7

0520 01df

0524 031f

0528 0000

052c 0000

Orux, have you tried changing reg 520 and 528, they seem the most relevant.
[Touch HD Windows Mobile ROM Development] orux:
The attached Sharp panel to the controller is rbg666. Epson controler input is rgb565, rgb666 or rgb888. Then, epson output it is set to rgb666.
[Touch HD Windows Mobile ROM Development] orux:
Spl uses the init secuence that the controller needs. You can play with CFG.exe (you can download it, epson web link), a windows application that creates a initdata.c file.

Perhaps we have a 800X480 panel, instead of 480X800. CFG.exe lets you select different Sharp panels (LCD1 option). There is a Sharp 800X480 panel; our panel?

I'm not sure; this afternoon I'll try.
[Touch HD Windows Mobile ROM Development] patp:
I wondered about this too. But spl sets the width.height the same as linux later on - there is a set of registers that does screen configuration. The one's I described above refer to the memory structure. But nothing describes the 2/3 screen width issue.

BTW, have you tried booting the android gui? the way the screen looks might tell us something extra.
[Touch HD Windows Mobile ROM Development] JanSchotsmans:
So both Linux (in general), Epson Controller and Sharp Panel support 666, why are we talking about all these conversion for 565 then?

Because WinMO does it?

It wouldn't be the first time HTC and Microsoft did things backward while simple and clean can be done by just having everything 666, with no conversions needed anywhere.(Which would increase performance no doubt).
[Touch HD Windows Mobile ROM Development] muld3r_fbi:
mddi/mdp regs in wince

First of all, hello to everyone(this is my first post on this form :) ).

orux, are the vaules in "dump_wince_mddi_regs" and "dump_mdp_wince_linux" from a blackstone? because i dumped the same addresses and noticed that the values are slightly different. i dont know if this is really important but maybe it can help.
[Touch HD Windows Mobile ROM Development] JanSchotsmans:
What rom are you using muld3r?

Considering many roms include different WinCE, dll's and especialy Dutty v1.8 a different Manilla, could these value's shift slightly?
[Touch HD Windows Mobile ROM Development] muld3r_fbi:
i'am using rom version 1.14.407.3(22273)GER. it was installed when i bought my hd ;)
[Touch HD Windows Mobile ROM Development] orux:
Thanks, muld3r_fbi;

I have checked the differences; Those registers have got variable content (status, pointers,...)
[Touch HD Windows Mobile ROM Development] orux:
All OS work with rgb565 (2 bytes) or rgb888 (3 bytes). It is very difficult, by software, work with rgb666 (2 bytes + 2 bits). By hardware it is easy work with rgb666, and make conversions like rgb565 to rgb666, or rgb565 to rgb888.
[Touch HD Windows Mobile ROM Development] orux:
fb, in main memory (RAM, not epson internal fb) is correct, in rgb565 format. You can take a snapshot from /dev/fb.

It is an horizontal 2/3 scaled image (100% RAM fb image). Lcd controler can do that, and more things!!!

Tested; They are variable registers; If you change them, return to the old value next frame (immediately).
[Touch HD Windows Mobile ROM Development] JanSchotsmans:
Orux: from the image you posted with the 2/3 image, the way the letters are pushed against eachother and certain parts of letters are doubled, it reminds me of compression artifacting you classicly get from LCD Computer Displays displaying a different size image then their native one.

So I'm thinking the controller is doing the 2/3 thing and then compressing your 800x480 input to fit the new windowsize (800x320).

The documentation implies that alot of the compression, sizing and conversion of input imagery happens completely automatic.

Also, I saw in the documentation that there are several feed formats for 666 and 888 data. But If I understand correctly, your feeding 565 wich only seems to have 1 format.
[Touch HD Windows Mobile ROM Development] orux:
This is the epson init code with values added or modified by wince (right column).

The last value puts controller in rgb666 input format.

I'm going mad;

IN BRIEF:

fb in rgb565.

mdp configured to take rgb565 and output rgb666.

lcd controller in rgb666 input format

(this works fine in other pdas)----------->BAD DISPLAY OUTPUT.

fb in rgb565.

mdp configured to take rgb565 and output rgb666.

lcd controller in rgb565 input format

----------->2/3 SCALED DISPLAY OUTPUT. WHY???

clocks, vsync signals,... ????
[Touch HD Windows Mobile ROM Development] xmoo:
When booting 0.8, you are able to calibrate.

Red dots on the screen (Left-top, Right-botoom).

When booting 1.0, you were not able to Calibrate.

But now you ar able to calibrate.

When booting you will see a lot of vsync blablabla text.

When seeing that, tap Left top and the right bottom, and wait till Android boots.

Then the screen should be calibrated.

I've lent some money from my dad, and getting a Touch HD around sunday.

Cheers.
[Touch HD Windows Mobile ROM Development] jim256:
AWESOME news.

And Ok I will try that now just hang on a sec
[Touch HD Windows Mobile ROM Development] xmoo:
I'm gonna holla @ dcordes, to see if he knows what the problem could be.
[Touch HD Windows Mobile ROM Development] jim256:
No go.

Nothing happened except for the usual.

I tapped the top and bottom corners, but the text just ran a little longer then the screen went black and the device was unresponsive.

Two questions:

1. Do I tap the top left and bottom right corners of the screen

the moment

I start seeing the text? Or...when?

2. Should I just wait after the screen goes black? Maybe its booting? I gave it about 9 seconds...?

EDIT: Just tried it again and I did see that tiny keyboard at the top for a second. I have waited over 20 seconds this time. Rebooting to try again...
[Touch HD Windows Mobile ROM Development] jim256:
Alrighty. Should I have any radio's turned on or off? Or any certain settings done? For example one time I was plugged in via usb and connected to wmdc. Everytime but the last I have had wifi and the phone radio on...any of this make any sort of difference?

EDIT: I guess the main problem right now is that I am confused at what point exactly I am supposed to hurry and tap the upper left then bottom right. At first the text goes for a bit..then freezes. And at the bottom wm is still showing. Then WM disappears and tons more text starts coming. When exactly should I be doing this?
[Touch HD Windows Mobile ROM Development] xmoo:
Don't think that should be a issue.

I think it has to do with the gfx.

Looks xperia. The GFX is fu up but it still show's cause of the small screen.

On blackstone the colours would probably be fu up and the screen is big....

So that would be the thing cause the issue. But I think it could be fixed with edited drivers or other Android build mayb.

Mayb the build they use for tablet pc's or somethin.....
[Touch HD Windows Mobile ROM Development] jim256:
Hmm ok. Well unless you've got anything else for me to try, its off to bed for me.

I do want to note though that I got a lot farther that time. Probably 3 more seconds of text scrolling past. I had the device in airplane mode before trying (just in case) and didn't try tapping upper left then lower right until the text had stopped then started again.

Saw the tiny keyboard blurred at the top of the screen again.

Thank you!

Really

looking forward to you getting your HD...anything else I should test / try right away or am I free to go?

Thanks,

Jim.
[Touch HD Windows Mobile ROM Development] xmoo:
A.t.m no testing.

Dcordes is getting a Xperia test deviece from me....

I'm getting a Touch HD......

So both phones have to wait a bit.
[Touch HD Windows Mobile ROM Development] jim256:
Got it.

Guess we will just sit tight.

Thanks for your work,

Jim.
[Touch HD Windows Mobile ROM Development] Cyclone_storm:
Because jim256 already tried all of your options, i'll wait for the next ones and

try to help you out aswell for as much that is possible. :D :D :D
[Touch HD Windows Mobile ROM Development] xmoo:
I've founded a phone store in Nijmegen, who has Blackstones for 350 euros.

So gonna order one 2night, so I would get it around sunday.
[Touch HD Windows Mobile ROM Development] patp:
Where did the gfx driver come from? Blackstone has the same chipset as the G1, perhaps the appropriate files from the G1 rom would work?
[Touch HD Windows Mobile ROM Development] Cyclone_storm:
Hey that sounds really nice. :D :D :D
[Touch HD Windows Mobile ROM Development] xmoo:
Yeah, but don't know if it's trustable.

They got KVK and everything, but then Again.

It's 2 cheap, See there list:

Nokia N96	€369,99

HTC G1 Android	€459,99

Samsung Omnia	€329,99

HTC Touch HD	€349,99

Sony Ericsson X1 Xperia	€399,99

LG Renoir	€269,99

Apple iPhone 3G	€319,99

All phones are unlocked with 1 year warrenty.
[Touch HD Windows Mobile ROM Development] heatsha:
iPhone 3G 320 euro?? Damn thats very cheap!!! second hand or new??
[Touch HD Windows Mobile ROM Development] Cyclone_storm:
Yeah indeed it does sound cheap. The last time I checked the cheapest HD

I could find was 550 euro's. Kvk is nice but not always trustable. Can't you

pick it up there, thats a lot more save then just ordering it online and get it

with the mail. :D :D :D
[Touch HD Windows Mobile ROM Development] xmoo:
Well there saying it's a sale cause of them rebuilding there store.

The store is back @ march, but then I'm on Barcelona for 6 months of study!
[Touch HD Windows Mobile ROM Development] xmoo:
New with warrenty
[Touch HD Windows Mobile ROM Development] heatsha:
Can you give me the internetsite plz??
[Touch HD Windows Mobile ROM Development] xmoo:
Well it's not a site.

I got this from a friend.

It's a order form.

I've spoken with them.

You pay 60% of the phone,

Then they gonna send the phone.

When you get the phone you pay the last 40%.

Don't know. I think I'm going to get a new one from the store.

It's 50 euros more, but trustable.

I'm making a tutorial now on how to boot Android 1.0 on Xperia.
[Touch HD Windows Mobile ROM Development] daniel.hunt:
*twitches*

Every time I get an email telling me there's a reply, I'm hoping, and praying, that someone has figured this out and created a test ROM :)
[Touch HD Windows Mobile ROM Development] Rayzer HD:
Sry, daniel i believe you are a kindly guy but this type of post is realy useless! so let the guys work without useless breakings, because so you help them in the best way. :)

MfG Rayzer HD
[Touch HD Windows Mobile ROM Development] orux:
Last message today

Last message today:

Sharp panel init code sequence. This goes after epson init code sequence.

The panel is initiated through epson controler with those commands.
[Touch HD Windows Mobile ROM Development] Thegn:
Hi,

Have you've been visiting IRC at HTC-Linux? I think with the findings you now have made, a breakthrough is close. I know Maejrep was working with the LCD issue, and maybe you could help eachother out? They are working to get a general boot, with support for different devices. If your findings could be added to that, it would be indeed very interesting!

As I've said before, I'm not a programmer. But I see a lot of work is being done on different places, and things are moving forward!

Thank you for all the great work!
[Touch HD Windows Mobile ROM Development] audscott:
It's all greek to me.
[Touch HD Windows Mobile ROM Development] orux:
New test:

1.-If we send (using mdp DMA path) line by line instead of all fb in one stride -->KO

2.-(see picture)

Put epson controller in rbg565 input format.

Modify my hack:

-->comment rgb565to666 function (we dont need it because epson expects 565 format)

-->rewrite some code

We have: a fast response display scaled to 2/3.

If we do not find another solution, I think that, with a lot of work, we can use this 2º way.
[Touch HD Windows Mobile ROM Development] Rewpparo:
Nice, it even got rid of all the snow we had with previous tests. Looks a lot cleaner.

Did you plan to have two angstrom welcome messages, or is the bottom part of the screen duplicated ? Is it correctly printing on the whole height of the screen ?

I can't really see Tux's colors, are they fine or distorded like on raphael ?
[Touch HD Windows Mobile ROM Development] WendigoNL:
is it stable, and is android bootable? and what if you first use VGA fix, or an adapted version to stretch it tru windows, and then boot it using haret... or is that not working?

KEEP UP THE GOOD WORK, WE ARE APPRICIATING IT !!!
[Touch HD Windows Mobile ROM Development] orux:
There is a continuous and quick scroll. Font size very small (scaled down, horizontal and vertical). A lot of noise. Strange colours (because of scaled?)

Need more improve :)
[Touch HD Windows Mobile ROM Development] chrisnicola:
htc toch hd

nauw het werkt hier nog niet he boot wel iets maar komt niks op voor zo ver nu dan .
[Touch HD Windows Mobile ROM Development] xmoo:
Beste Chrisnicola,

Dit is een engelse forum, dus gelieve engels praten!

Gebruik jij de on-ram of off-ram??

Pplz, I'ma try to coock a stable lite rom, so we can test Android on it.
[Touch HD Windows Mobile ROM Development] WendigoNL:
xmoo, there are different lite roms out there, maybe a step in the good direction?

[ROM][WWE][2-12-2009][lite] By onkolog

"Third version of ROM is ready. It's SUPER LiTE version.

no Manila

no Opera

no CommManager

no QuickGPS

no Java

Only necessary application

It's completely naked Windows)))all in your hands)))

You can install whatever you want...

"
[Touch HD Windows Mobile ROM Development] JanSchotsmans:
chrisnicola: did you try with USB unplugged? For me it wouldn't ever boot untill I unplugged USB and now it boots consistenly.

For getting the screen to work, did you try making a landscape format framebuffer and using the screen in landscape mode for console? Like a regular screen would be? I'm asking because maybe that makes things a bit simpler and comparable to PC fb drivers out there.

As for the 2/3'd screen, the docs have the main window size registers on page 180.

But from the docs I get that setting just those might not be enough and you also have to set registers 0x0600 and 0x0680 to make the panel reset and update.
[Touch HD Windows Mobile ROM Development] patp:
can anyone walk me through getting usb networking working on windows xp? I can boot into Angstrom, but windows then detects new hardware "MSM USB" - for which I don't have a driver. Tutorials say use linux.inf to get Windows to use RNDIS driver, but it isn't accepting that driver.

Stuck.
[Touch HD Windows Mobile ROM Development] JanSchotsmans:
Here's some more stuff on Epson LCD controllers and Linux:

http://docwiki.gumstix.org/Connection_and_Setup_of_Nokia_6100_Knockoff

and what seems to be a generic driver thats GPL and someone used it to control a Nokia 6100 panel with it a self built arm system:
[Touch HD Windows Mobile ROM Development] patp:
I fixed it!!!!

REG[0680h] Main Window Control Register

bit 7 Main Window Input Format Select

This bit selects the input format for the Main window.

When this bit = 0b, RGB 5:6:5 format is selected.

When this bit = 1b, RGB 8:8:8 format is selected.

Value in linux is 0x80, which selects 888 (24bit). We want 565 (16bit). I noticedthe ratio of these is 24:16 = 3:2 - in other words it's not getting enough data, by 2/3, because it expects 24 bits per pixel. Somehow it still manages to look alright, but compressed sideways.

If you send 0x8000 to reg 680 it sets bit 7 to 0 and initiates a reset (blue screen). Then send 0x4000 to reg 600 and hey presto!

It's not totally stable for some reason, but it mostly looks great!

Picture to follow. Orux - can we implement these into the kernel and then try booting Android?
[Touch HD Windows Mobile ROM Development] xmoo:
Good job!!!!
[Touch HD Windows Mobile ROM Development] orux:
Tested.

A great step for this community.

Today is the day.

Thanks patp. I was near of desperation

Give me 30 '
[Touch HD Windows Mobile ROM Development] patp:
Here it is - first good screen on Blackstone

This is all thanks to Orux.

If you want to try:

Boot with Angstrom. Don't touch screen yet.

Connect over SSH, and update registers as follows:

0x400 < 0x8000

0x680 < 0x8000

0x600 < 0x4000

Then touch screen and do calibration!

All looks good - the penguin colours are fine. First time round it was glitchy, but I had already been playing with registers. This time with good calibration, it seems solid.

I can't compile kernel, so Orux, maybe you can make me one for trying with an Android image!!!
[Touch HD Windows Mobile ROM Development] BigDaemon:
Signed!

patp, you are my man of the day!!!

This is not only one step in the direction, this is the biggest step since a few weeks!!!

If this works correctly, we are VERY CLOSE on getting Android/Linux running correctly and ca nstart working on the Android-things (GSM, etc.)

Nice work!!
[Touch HD Windows Mobile ROM Development] orux:
Here it is the waited file.

disabled initial htc_fb_console

corrected display keyboard

Colours are not correct, but we have time.
[Touch HD Windows Mobile ROM Development] ddhb:
It looks so great and it runs very smooth... You are the best guys on earth ;-)
[Touch HD Windows Mobile ROM Development] WendigoNL:
colors in android are still strange, but up til now no error

but not perfect in android

much smoother!!

when i clicked the no service tab, it froze up on me
[Touch HD Windows Mobile ROM Development] ddhb:
So am I right that now the real work on android can begin?