ULAplus: Difference between revisions

Jump to navigation Jump to search
1,045 bytes added ,  8 July 2014
updated to revision 1.1
m (s/SZX/ZX-State (SZX)/ and capitalisation tweaks)
(updated to revision 1.1)
Line 2: Line 2:
[[Category:Spectrum]]
[[Category:Spectrum]]
[[Category:Video]]
[[Category:Video]]
The ULAplus specification is an enhanced ULA for the ZX Spectrum designed by Cheveron, Nikki, CSmith and KLP2. It can be implemented as a plug-in replacement for the ULA in the 48K machines, in emulators, or in clones. It is designed to make it easy to re-colour existing software with the minimum of effort.
The ULAplus specification describes an enhanced ULA for the ZX Spectrum designed by Cheveron, Nikki, CSmith and KLP2. It can be implemented as a plug-in replacement for the ULA, in emulators, or in clones. It is designed for maximum compatibility with existing software.


==Colour modes==
The current version of the specification is '''1.1'''.
The current specification allows for four colour spaces:


* original spectrum behaviour
==Revision History==
* RGB
* HSL (not yet finalized)
* CMYK


Any hardware implementing ULAplus must implement at least the original spectrum attributes and one other to be considered a ULAplus device.
'''Version 1.1'''
 
Revised for the release of ZXDS 1.3 incorporating changes from the OpenCores ULAplus implementation. This version rationalizes the specification. Software written for the standard mode of the new specification will run unmodified on earlier implementations.
 
* Includes the Timex video modes (optional)
* Changes the preferred way of multiplexing the 2-bit blue value to obtain a 3-bit blue value.
* Adds 256 greyscale support (optional)
* Deprecates HSL and CMYK support
 
'''"Version 1.0"'''
 
First published version of the specification.


==I/O ports==
==I/O ports==
Line 31: Line 38:
     01 - mode group
     01 - mode group


           The sub-group must be zero. Sub-group entries 1-63 are reserved for mode specific controls.</pre>
           The sub-group must be zero (colour) or one (greyscale). Sub-group entries 2-63 are reserved.</pre>


[[ZXI_standard|0xFF3B]] is the data port (read/write)
[[ZXI_standard|0xFF3B]] is the data port (read/write)


When the palette group is selected, the byte written will describe the colour.
When the palette group is selected, the byte written will describe the color.


When the mode group is selected, the byte output will be interpreted as follows:
When the mode group is selected, the byte output will be interpreted as follows:


<pre>Bit 0: Palette mode select; on when set.</pre>
<pre>Bit 0: Palette mode select; on when set.</pre>
Implementations that support the Timex video modes use the #FF register to set the video mode, as per the Timex machines. It is left to the individual implementations to determine if reading the port returns the previous write or the floating bus.


===RGB palette entries===
===RGB palette entries===
Line 48: Line 57:
Bits 5-7: Green intensity.</pre>
Bits 5-7: Green intensity.</pre>


This colour space uses a sub-set of 9-bit RGB. The low bit is duplicated (Bb becomes Bbb). This gives access to a fixed half the potential 512 colour palette. The jump in intensity happens in the lower range where it is less noticeable.
This colour space uses a sub-set of 9-bit RGB. The missing lowest blue bit is set to OR of the other two blue bits (Bb becomes 000 for 00, and Bb1 for anything else). This gives access to a fixed half the potential 512 colour palette. The reduces the jump in intensity in the lower range in the earlier version of the specification. It also means the standard palette can now be represented by the ULAplus palette.
 
===Greyscale palette entries===
In greyscale mode, each palette entry describes an intensity from zero to 255. This can be achieved by simply removing the colour from the output signal.


==Software==
==Software==
Line 74: Line 86:
  ink_colour = (FLASH * 2 + BRIGHT) * 16 + INK
  ink_colour = (FLASH * 2 + BRIGHT) * 16 + INK
  paper_colour = (FLASH * 2 + BRIGHT) * 16 + PAPER + 8
  paper_colour = (FLASH * 2 + BRIGHT) * 16 + PAPER + 8
When scaling 3-bits of colour data to 8-bits for emulators that operate in high colour mode the following conversion should be used:
When scaling 3-bits of colour data to more bits for emulators that operate in high colour mode, simply concatenate the bits repeatedly and then truncate to as many bits as needed. For example, for 8-bits the following conversion should be used:
76543210  
    76543210
    hmlhmlhm
hmlhmlml
where h is the high bit, m is the middle bit, and l is the low bit of the original 3-bit value.
where h is the high bit, m is the middle bit, and l is the low bit of the original 3-bit value.


87

edits

Navigation menu