Share

Fuse - the Free Unix Spectrum Emulator

Tracker: Patches

5 Implement Spectrum SE 64 colour mode on SDL backend - ID: 2895798
Last Update: Comment added ( fredm )

- Implement the Spec SE 64 colour mode (on SDL backend only).
+ Added a uidisplay_plot8_64() that extends the existing uidisplay_plot8()
and uses the full ATTR byte rather than just separate INK and PAPER.
+ Added clut_update_palette() to sync SE's CLUT with SDL's RGB palette.


Gilberto Almeida ( quazatr0n ) - 2009-11-11 09:37

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 3 )




Date: 2009-11-11 12:53
Sender: fredm

The standard Fuse code has a 16 colour palette in each UI corresponding to
the standard Spectrum colour scheme (e.g. for SDL colour_values[]). The
proposed ULA+ has a fixed 256 colour palette instead (with up to 64 colours
"active" at one time), so this could be supported by extending e.g.
colour_values[] to 256 entries for the full palette of the ULA+.

The ink and paper arguments to uidisplay_plot8() are indexes to the above
array, so uidisplay_plot8() would not need to be otherwise modified to
handle plotting in all the ULA+ colours. The code that maps the attribute
to a colour index in the above array in display.c display_parse_attr()
would need to be aware of the CLUT indexes. I'd suggest making this
function a function pointer like the flashing function (see
display_dirty_flashing_fn in display.h).


Date: 2009-11-11 12:05
Sender: quazatr0n

I don't quite see what you mean, maybe you can give me a few more
pointers?
I was not happy with having to replace uidisplay_plot8, but it was the
only way I could think of making it work, as I am not familiarized with
FUSE's source code.
I'd like to add this feature with as little changes to FUSE as possible,
so I'll rework the code according to your indications.


Date: 2009-11-11 11:25
Sender: fredm

The ULA+ has a fixed 256 colour palette, I'd suggest that should just be
assigned in each UI instead of the existing 16 colour palette and then you
could use the existing uidisplay_plot8 to draw pixels.
clut_update_palette() would also then not be required.


Log in to comment.

Attached File ( 1 )

Filename Description Download
0001-Implement-the-Spec-SE-64-colour-mode-on-SDL-backend-.patch Download

Change ( 1 )

Field Old Value Date By
File Added 350398: 0001-Implement-the-Spec-SE-64-colour-mode-on-SDL-backend-.patch 2009-11-11 09:37 quazatr0n