Hello Ole
On 01.06.10, you wrote:
> Hello,
>
> I was just trying to apply your Amiga patches. But there seems to be
> something incomplete #if __BYTE_ORDER == __BIG_ENDIAN
>
> colour_to_pixe & pixel_to_color is just defined when
> __BIG_ENDIAN_BGRA__ is defined.
the set of the define depend on the native Pixel Format your Atari GFX Card
have and the Mode SDL
work.
Do you know what native Pixel Format the GFX Cards that use on Atari have ?
On amiga work this way, the system is in Big Endian because 68k, but the Pixel
format of the GFX
Card is in 32 bit BGRA and 16 bit RGB PC by most cards.this come because the
GFX Cards are from PC,
so they use little endian.
in libnsfb/src/surface/sdl.c
static int sdl_initialise(nsfb_t *nsfb)
{
...
if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
return -1;
}
atexit(SDL_Quit);
there is in Amiga Version code add that Hardware surface is use and in window
mode the depth from
the Desktop is used (SDL_VideoModeOK return value of the desktop bitdepth in
window mode.)
the default netsurf open a SDL window with SDL_SWSURFACE.
when this is done, there need additional pixel convert routines add, and
another define.
__BIG_ENDIAN_RGBA__ i think.
such a define is not need on 16 bit, here the same pixel convert routines work
in SDL_SWSURFACE or
SDL_HWSURFACE well.
so best is you get netsurf working on 16 bit first.
bpp = SDL_VideoModeOK(nsfb->width,nsfb->height,16, SDL_HWSURFACE);
if (!bpp)return 0;
if ((bpp == 8) || (bpp == 24) || (option_fullscreen == 1))
{ flags = SDL_HWSURFACE | SDL_FULLSCREEN; bpp = nsfb->bpp;}
else flags = SDL_HWSURFACE | SDL_RESIZABLE;
sdl_screen = SDL_SetVideoMode(nsfb->width,
nsfb->height,
bpp,
flags);
if (nsfb_set_geometry(nsfb, 0, 0, bpp) == -1) {
return -1;
}
>
> It is not defined by just copying the plotter files. So I'm in doubt If I
> have to define something like __BIG_ENDIAN_RGBA or something like that for
> Atari machines, and then code my own colour_to_pixe & pixel_to_color
> routines... sorry for this Zero knowledge... :( I succesfully avoided
> coding graphics stuff until now ;)
>
> I'm going to try __BIG_ENDIAN_BGRA__ for this run...
>
> OK, done. the Libnsfb test show yellow backgrounds, as before... but the
> first test did show some more graphics ( like an ball...) but there is
> some flickering in the upper right corner...
>
> Just compiling the nsfb executable now, but that takes some time :)
>
> ... after a long while make existed with an error - the freetype lib that
> my system offers seems to be to old... :(
>
> I'll post this message anyway. I'll have to talk to some Atari-Developers
> about the color_to_pixel stuff...
>
> greets,
> ole
>
>
>
> Am Mo, 31.05.2010, 15:33 schrieb Bernd Roesch:
>> Hello
>>
>> On 31.05.10, you wrote:
>>
>>>
>>> Well, I didn't even noticed mad colors. a.) Maybe thats because I'm
>>> color
>>> blind b.) Maybe that's because of the screenshot program. c.) Maybe it's
>>> really mad. :)
>>>
>>
>> the colors on your GUI are wrong.more you can see when you go online and
>> show a page.
>>
>> coldfire is big endian same as 68k, and nsfb work only little endian with
>> offical source.even with
>> native GUI you need pixel convert routines for Big endian
>>
>> you can use the amiga nsfb code attached.it should bring you correct
>> colors when this statement is
>> true.
>>
>> #if __BYTE_ORDER == __BIG_ENDIAN
>>
>> there is also a Bug fixed i report some time ago in the 16bit plotter file
>>
>> fgcol must be 32 bit var.
>>
>> the attached files work on Amiga 68k CPU for 16 bit and 32 bit screen.but
>> you should use
>> SDL_HWSURFACE
>>
>> static bool
>> glyph8(nsfb_t *nsfb,
>> nsfb_bbox_t *loc,
>> const uint8_t *pixel,
>> int pitch,
>> nsfb_colour_t c)
>> {
>> uint16_t *pvideo;
>> nsfb_colour_t abpixel; /* alphablended pixel */
>> int xloop, yloop;
>> int xoff, yoff; /* x and y offset into image */
>> int x = loc->x0;
>> int y = loc->y0;
>> int width = loc->x1 - loc->x0;
>> int height = loc->y1 - loc->y0;
>> - uint16_t fgcol;
>> + uint32_t fgcol;
>>
>>
>>>> As for text not appearing, have you tried it with both the internal
>>>> text
>>>> and freetype text? It's a build option.
>>>
>>> I did not inspected these options, I will have a look.
>>
>> internal Fonts do not work on amiga 68k, only freetype with antialiasing
>> work.
>>
>> there seem a problem in static bool
>> glyph1(nsfb_t *nsfb,
>>
>> older netsurf work, but newer not.maybe its a endian issue when it work on
>> your Linux build and
>> internal fonts
>> maybe you can confirm this
>>
>
Regards