Pin napisał/a:wieczor :) - nic nie mówię, lecz wydaje mi się, iż dostosowanie GUI ze zwykłego Atari do pracy pod VBXE oznacza jego napisanie od zera :)
What - rewriting the whole GUI from scratch? I have around 2,500 lines of code, and only 500 lines of code (those in the GFX.S module) are concerned with drawing to the screen. And of those 500 lines of code, there are about 20-30 direct writes to the screen RAM. Moreover, GFX.S hasn't grown in size for weeks (while GUILIB.S grows exponentially). There is much more to a GUI than drawing lines and blitting. The bulk of the system is all about object manipulation.
wieczor napisał/a:A skadze znowu. To tylko kwestia zalozen przy tworzeniu i o to wlasnie chodzi - zanim zacznie sie tworzyc. GUI to nie stawianie pikseli na ekranie, czy rysowanie okien a do tego sprowadza się kwestia sterownika.
Jesli zaczniesz robic GUI koncentrujac sie na rysowaniu, to nie osiagniesz sukcesu bo to jest samo dno hierarchii kodu, zaplaczesz sie w szczegolach technicznych. Dlatego takie rzeczy robi sie dwuwarstwowo - tworzy sie biblioteke operacji ekranowych a nastepnie logike ktora z nich korzysta. Zmiana urzadzenia - to zmiana biblioteki. Przeciez GUI ma robic znacznie wiecej nic narysowac okienko.
Exactly so. Most of the GUI operations are reducible to:
- Clear an area of the screen
- Move an area of the screen to a back-buffer
- Move buffered background data back to the screen
- XOR an area of the screen
- Draw a horizontal/vertical line
- Blit a bitmap to the screen (an icon or alpha character)
This is all pretty straightforward and re-usable code (e.g. the code to draw boxes and drop-shadow boxes simply calls the draw horizontal/vertical line routine a few times). To implement VBXE support, one would change the clipping limits, re-write PARTS of GFX.S, replace certain code with blitter operations, etc. Not a trivial task, but probably only a month's work.
As for drivers, why on earth would I concern myself with a device independent screen driver when I'm writing a GUI for an Atari 8-bit? 99.9% of these machines have a fixed 1bpp 320x192 display. Why overload screen draw operations with multiple levels of indirection, varying screen dimensions, etc, just to have a system which runs sluggishly but which is easier to convert for VBXE use?
The fact is, it would be better to regard GFX.S as the "driver", and to think in terms of "draw line", "render bitmap", and "clear screen area" as the lowest-level operations. There are half a dozen such operations at the moment, and this code is all we need to re-write to implement support for VBXE modes.
Programujac liniowo albo nie zrobi sie tego w ogole albo zajmie to lata, a i tak sledzenie bledow bedzie koszmarem. Wszystko jest kwestia kompromisu
Well said. Of course the "proper" way would be to render everything at the pixel level and simply implement a driver which provides the low-level interaction with the screen. But this is an Atari 8-bit with a 6502 processor. I said at the start that the GUI would have to employ "techniques normally seen in games and demos". How many demos draw to the screen using the CIO? :D