Window manager

The place to share and discuss your Ultibo projects.
pik33
Posts: 788
Joined: Fri Sep 30, 2016 6:30 pm
Location: Poland
Contact:

Re: Window manager

Postby pik33 » Thu Dec 21, 2017 6:46 pm

To make things simpler I added a release https://github.com/pik33/ultibo_retro_g ... g/20171221 - this is the project as it is now. Maybe after Christmas I can find some time to restart the project.
pik33
Posts: 788
Joined: Fri Sep 30, 2016 6:30 pm
Location: Poland
Contact:

Re: Window manager

Postby pik33 » Sun Jan 28, 2018 8:20 pm

New commit. Some garbage aded automagically but then the main change is: the screen is now split into rectangles and invisible rectangles are no more redrawn at every frame. This opens a possibility to go from 8 bit graphics (as it is now) to true color 32-bit windows.
pik33
Posts: 788
Joined: Fri Sep 30, 2016 6:30 pm
Location: Poland
Contact:

Re: Window manager

Postby pik33 » Wed Apr 25, 2018 12:47 pm

Some more time, some more commits to the project.

The 'screen' unit disappeared: its code was mostly unused/not needed; a few lines which remained after the cleanup were moved to other units
I got rid of all VC4 hardware decelerated stuff. The mouse cursor is now again software sprite, no more slowdowns and visible delays when moving the mouse.
The SID is now emulated at near full speed (961 kHz while PAL C64 has SID clock ~985 kHz) Full speed is not possible with current version of SimpleAudio driver because 250 MHz (PLLD div 2) divided by 256 (8-bit sampls) gives something less than this and I needed some "space" added to 8-bit range to avoid disortions. So there it is: 250 MHz/260=961 kHz, maximum sample rate available. To compensate this, the frequency registers of emulated SID are multiplied by constant (about 1.02)
Trying to output the sound at 960 kHz sample rate discovered bugs in SimpleAudio unit. They will be patched soon in the github repository. Intermediate audio buffers were declared too short which was not a problem at lower sample rates.
pjde
Posts: 425
Joined: Tue Feb 09, 2016 6:21 am
Location: Sydney, Australia

Re: Window manager

Postby pjde » Wed Nov 28, 2018 10:44 pm

Hi Piotr

I noticed that the retro window uses a 8 bit colour scheme.

Which flavour ot this do you use?

Regards

Paul
pik33
Posts: 788
Joined: Fri Sep 30, 2016 6:30 pm
Location: Poland
Contact:

Re: Window manager

Postby pik33 » Thu Nov 29, 2018 8:35 am

It is 8-bit Atari PALtype pallette (NTSC version had different colors at the same color values than PAL/SECAM): 16 colors in 16 brightness levesl; 0..15 is grayscale.
These are not the same colors as in Atari, but similar.

Of course this is redefinable, the current pallette can be found at the address base+ $10000 - 4 bytes per entry; the color will change immediately after the palete entry change.

Pallettes, fonts, cursor shapes definitions can be found in retro.pas unit

What I am doing now is moving all this stuff to 32-bit color space, allowing mixing new 32-bit stuff with 8-bit windows. This is non trivial task but it has to be done - the new repository "Ultibo-retro-os" was created to do this without destroing existing code.
pjde
Posts: 425
Joined: Tue Feb 09, 2016 6:21 am
Location: Sydney, Australia

Re: Window manager

Postby pjde » Thu Nov 29, 2018 9:55 pm

Hi Piotr

Was trying to add a LoadICONFromFile function.

Will wait for the 32 bit version as this will be easier to match colours.

Keep up the good work.

Paul
pik33
Posts: 788
Joined: Fri Sep 30, 2016 6:30 pm
Location: Poland
Contact:

Re: Window manager

Postby pik33 » Fri Nov 30, 2018 5:35 am

Was trying to add a LoadICONFromFile function.

Declare a TIcon48 variable
Read a pixel, find which color from ataripallette (in retro unit)
Find the nearest color
Put the 8-bit index into the icon variable
Zero is transparent
Add the icon to the desktop (as it is done in the main file project1)
pjde
Posts: 425
Joined: Tue Feb 09, 2016 6:21 am
Location: Sydney, Australia

Re: Window manager

Postby pjde » Sun Dec 02, 2018 11:31 pm

Try this

As a demo, it loads different icons for the Calculator and the Text Editor.

Regards

Paul
Attachments
retro bits.zip
(27.3 KiB) Downloaded 7 times
pik33
Posts: 788
Joined: Fri Sep 30, 2016 6:30 pm
Location: Poland
Contact:

Re: Window manager

Postby pik33 » Mon Dec 03, 2018 5:29 pm

Tested, merged and pushed to the github.

What I changed is instead of loading icons from the main directory, I load them from Colors\Icons directory:

textedit.LoadICONFromFile(drive+'Colors\Icons\Text-Edit-icon.png');

When using multi drive environment (as in my case) I have to find the boot drive first, so the pogram does it at the start and keeps it in "drive" string variable.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest