O HAI THIS BLOG PURPZIEZ 2 B UZED AZ MAH PLESIOUS MEM. :)

2009/02/28

NetSurf / FrameBuffer #2

今日もframe buffer portをモニョった.

FTC_CMapCache_Lookup()でsegvるのは,error handlingがタコだったのとフォントへのパスがhardcodedで間違ってたのが原因.で,まずはSDL+freetype on Xで動くようになった.


さすがに黄色過ぎるので,internal pixel-colour変換を直すと,テキストの色は正しくなった.



endian dependな部分は泥臭くもあり,面白くもある.変な風にinternal pixel-colour変換がぶっ壊れると色がぶっ飛ぶ. :DDD

 02/28 01:24:33 hiyuh
any idea? http://dev.gentoo.gr.jp/~hiyuh/misc/BE2.patch
http://dev.gentoo.gr.jp/~hiyuh/misc/nsfb-BE2.png
02/28 01:25:15 hiyuh
it looks like only image ablend is broken, I guess.
02/28 01:25:54 Kinnison
looks like that
02/28 01:26:13 kyllikki
blue and green traded in your pixel to colour
02/28 01:32:15 hiyuh
http://dev.gentoo.gr.jp/~hiyuh/misc/nsfb-BE2-web-colors.png
02/28 01:32:35 hiyuh
text color is correct?
02/28 01:33:03 kyllikki
yes
02/28 01:33:29 kyllikki
the alpha blending is broken because the values its reading in to
mix are wrong
02/28 01:34:23 tlsa
opaque images are wrong too
02/28 01:34:33 hiyuh
wtf :)
02/28 01:34:57 tlsa
well the screenshot is opaque, so is the logo image
02/28 01:35:20 kyllikki
I have no idea then
02/28 01:35:38 kyllikki
maybe the image formatters are getting it wrong on big endian systems?
02/28 01:35:58 tlsa
they'd be bust when he runs nsgtk
02/28 01:38:40 hiyuh
nsgtk works correctly on BE.
02/28 01:40:11 tlsa
there's something more wrong than just channel swapping
02/28 01:40:36 tlsa
cos the logo in the download box and the logo in the mast head should
be the same colour
02/28 01:40:46 tlsa
but they are completely different
02/28 01:45:01 tlsa
actually, that's cos the background is different and the images are
incorrectly getting alpha values other than opaque
02/28 01:47:36 tlsa
does the gtk build swap bitmap data round on BE?
02/28 01:49:11 tlsa
cos it looks perfect except for bitmaps
02/28 01:54:21 hiyuh
IIRC, nsgtk's image problems on BE was only in libnsgif code base
(maybe it was in netsurf/image/gifread.c).
02/28 01:56:37 tlsa
well there's something certainly wrong with images
02/28 01:56:50 tlsa
and nothing wrong with text colours
02/28 01:57:20 hiyuh
true

と言う訳で,もう少しゴニョる必要があるのだったのだった. :)

2009/02/27

NetSurf / FrameBuffer

#netsurfがframbuffer portで盛り上がっていたので,モニョる. :DDD
 02/26 21:01:19 hiyuh
what does NETSURF_FB_FRONTEND=able mean?
02/26 21:01:50 hiyuh
runtime linux/sdl detection?
02/26 21:02:29 tlsa
to pick whether to build nsfb for the linux, able or other framebuffer
02/26 21:02:54 kyllikki
the list is now able, sdl, linux and vnc
02/26 21:03:16 kyllikki
sdl, linux and vnc are mostly what you will be interested in

02/26 21:24:47 hiyuh
nsfb-{sdl,linux} doesn't work here. :(
02/26 21:26:09 rjek
You won't get much help without details :)
02/26 21:26:54 hiyuh
http://dev.gentoo.gr.jp/~hiyuh/misc/nsfb-linux-r6625-fsckedup.jpg
 02/26 21:27:11 hiyuh
color is fscked up completely. :)
02/26 21:27:22 rjek
Oh, an endianess problem.
02/26 21:27:30 rjek
TTOTD: Don't use big-endian machines.
02/26 21:27:33 rjek
:)
02/26 21:28:09 hiyuh
keyboard/mouse doesn't work too, so I did force powerdown this
powerbook. :DDD
02/26 21:29:22 hiyuh
tested only x86 boxes?
02/26 21:29:27 rjek
And ARM.
02/26 21:29:33 rjek
Extensively on ARM, in fact.
02/26 21:29:39 hiyuh
ah, k
02/26 21:31:10 jmb
awesome
02/26 21:31:17 jmb
kyllikki: that rocks
02/26 21:41:02 jmb
hiyuh: I assume keyboard/mouse work correctly under sdl?
02/26 21:43:45 jmb
as for endianness, it's likely in the plotters
02/26 21:45:18 hiyuh
jmb: sadly, nope. sdl's one said "Unable to init SDL: Unable to open
mouse" then segv immediately (was tested on X/fbconsole).
02/26 21:45:29 jmb
hiyuh: oddness
02/26 21:46:59 jmb
hiyuh: I assume other SDL apps work?
02/26 21:47:16 hiyuh
jmb: let me check
02/26 21:47:51 jmb
hiyuh: because the SDL_Init() call we have is entirely standard :)
02/26 21:51:09 hiyuh
jmb: it works on X, but it doesn't work on fb. maybe, causes of
"sdl's ones didn't work on X/fbconsole" are different.
02/26 21:52:13 jmb
hiyuh: right
02/26 21:57:48 hiyuh
jmb: I guess X blocks mouse device access from SDL when I was on
fbconsole, I'll check w/o running X (no VT switch).
02/26 21:57:50 jmb
there. updated the application
02/26 21:58:02 jmb
hiyuh: wouldn't surprise me
02/26 21:58:09 hiyuh
yup, bbl

02/27 00:17:11 hiyuh
jmb: cause of SDL_init error comes from my udev rules were
fscked up, sorry. even though, sdl's one still rocks. :)
http://dev.gentoo.gr.jp/~hiyuh/misc/nsfb-sdl-r6625-fsckedup-270.jpg
 02/27 00:18:34 Kinnison
hiyuh: are colours in web pages wrong too?
02/27 00:18:40 Kinnison
Or just the furniture?
02/27 00:21:05 hiyuh
nope, it can not show any page ATM.
02/27 00:21:51 Kinnison
Odd
02/27 00:21:56 Kinnison
why not?
02/27 00:23:24 tlsa
Kinnison: web page colours were wrong in is photo:
http://dev.gentoo.gr.jp/~hiyuh/misc/nsfb-linux-r6625-fsckedup.jpg
02/27 00:27:06 Kinnison
hmm
02/27 00:27:39 Kinnison
presumably this is kyllikki needing to support endianness stuff in
his plotters?
02/27 00:28:54 hiyuh
fb_plotters_ablend()?
02/27 00:30:37 Kinnison
that's the alphablend isn't it?
02/27 00:31:16 hiyuh
I guess. it calculates r/g/b.
02/27 00:50:09 kyllikki
hi
02/27 00:50:14 tlsa
re k
02/27 00:50:59 kyllikki
right for big endien the least invasive way is to have different
plotter c files built
02/27 00:51:44 kyllikki
e.g. fb_32bpp_plotters_be.c
02/27 00:52:14 kyllikki
because although the machines words are BE it appears the framebuffer
display is LE
02/27 00:52:39 kyllikki
I suppose I could make it generic but...
02/27 00:52:44 rjek
How much of the code is actually different?
02/27 00:52:47 rjek
Might #ifdefing be better?
02/27 00:53:08 kyllikki
rjek: I really didnt want a load more #ifdeffery
02/27 00:53:20 rjek
Well, if large bits of the function will be different, I agree.
02/27 00:53:30 kyllikki
I am thinking of ways to remove the existing ifdefery
02/27 00:53:52 kyllikki
rjek: its every time an output colour is computed
02/27 00:54:04 kyllikki
so its not everso often
02/27 00:57:04 kyllikki
no, i see it
02/27 00:57:08 kyllikki
I can generalise it
02/27 00:57:24 kyllikki
in fact i ought to
02/27 01:02:11 tlsa
is it easy to add the rest of those pointers?
02/27 01:06:42 kyllikki
what #define can i use to determine endiness at compile time?
02/27 01:09:55 hiyuh
? http://dev.gentoo.gr.jp/~hiyuh/misc/netsurf-gifread-try2fixonBE.diff
02/27 01:11:02 kyllikki
cool
02/27 01:14:53 kyllikki
try that?
02/27 01:15:04 kyllikki
I *think* my shifts are right
02/27 01:15:50 kyllikki
you get to test if #if __BYTE_ORDER == __BIG_ENDIAN is right
02/27 01:16:45 hiyuh
ACK
02/27 01:19:38 *
kyllikki waits paitently

02/27 01:29:08 hiyuh
lol
02/27 01:29:09 hiyuh
http://dev.gentoo.gr.jp/~hiyuh/misc/nsfb-sdl-r6635-onX-fsckedup.jpg
 02/27 01:29:46 hiyuh
mouse/keyboard works. :)
02/27 01:29:49 kyllikki
hmm thats 32bpp?
02/27 01:30:12 hiyuh
dunno, just run nsfb on X.
02/27 01:30:23 kyllikki
well 32bpp is the default
02/27 01:32:49 hiyuh
let me try -linux.

02/27 03:39:52 hiyuh
on 32bpp nvidiafb, -linux shows red screen, keyboard/mouse doesn't
work and cpu usage goes 100% then I did force poweroff.
02/27 03:40:01 hiyuh
FYI, generic ppc machine uses offb which is 8bpp by default.
02/27 03:40:05 hiyuh
kyllikki: ^^
02/27 03:40:39 kyllikki
right, the 8bpp plotters may indeed be funted
02/27 03:41:07 kyllikki
hiyuh: I will take a look, maybe later maybe morrow
02/27 03:41:15 kyllikki
tired atm
02/27 03:41:20 hiyuh
k, thx
02/27 03:41:24 kyllikki
np
つーわけで,次回に持ち越し.
今のところ,一番まともなのは-sdlを32bpp nvidiafbで動かす場合かな.
nouveauの中の人は{nvidia,riva}fbはstateがゴチャゴチャになるからofonlyにしろって言うし,offbは32bppにならねーし,どーすっか.


で,NETSURF_FB_FONTLIB=freetypeにしたら,FTC_CMapCache_Lookup()でSEGVるのを発見.
gcc-4.3.3のbugかもしれんので,熟成の方向で. :P

2009/02/20

tanslate(mercurial_ref, "ja_JP.UTF-8");

例のAでLな"ぷろじぇくつ"の残務も一段落したし,matsuu先生がブツの日本語訳を御所望なのでモニョる.
PowerBookにmedia-gfx/inkscapeをemergeするのはgnome depでコンパイルがダルいので,会社のパソコンにWindows版のinkscapeをぶち込んで仕事をしているフリをする. :DDD

で,出来たので晒す.


もっと大きいのが欲しいひとはここここにあるので,御自由にどうぞ.
SVGはここに突っ込んだ.訳がヘチョいのとフォントがMS-Gothicになってるのが御愛嬌と言うことで. :P

2009/02/19

emerge nouveau

AでLな"ぷろじぇくつ"に20kLOC overのVHDLを書きまくって,なんとか終わったのでnouveauで遊ぶ.

一応,upstream(?)のもあるにはあるが頑なにGallium3D対応にしようとしないので,今までmedia-libs/mesaだけ野良buildしていたがebuildにしてみた.proj/x11.gitとかからlive ebuildをパクってきてモニョる. :DDD

まだTTMがアレなので,アレだのう. :S

2009/02/17

if (!open("/dev/code", O_RDONLY)) { ...; }



NWCCの中の人とのメールの一部.

俺の好きなマイナーなブツに限らず,dev codeを拝めないことは良くある.メジャー/マイナーに関わらず,dev codeは爆弾な訳で,だからこそ見る側からすれば面白かったりするのだが,出す方は迷いもある.作り手である分,被害が具体的に予想出来てしまうのが原因,多分.

DSCMで気軽にブツを晒せる昨今になっても,changesetを綺麗にしてから出直して来いとか言ってrejectするメジャードコロでもあるまいし,自家製爆弾くらいを公開したって別に良くね?一つや二つ程度の地雷を踏んだ程度でupstreamの追っかけを止めるくらいなら,最初っから追っかけなんかやってんな,と.LICENSEは読んだか?ちゃんと,「爆発しても知らねーからな!!1」って書いてあるよ,だいたい.爆弾だったとき文句を言われのが嫌?別に爆弾じゃなくても文句なんていつも言うだろ,実際. :DDD