Hello,
really, if we are about to add new screen modi, i would suggest to add
at least two:
- one high resolution mode, may be monochrome, for text output
- one high color mode for graphics.
flash bit:
if you like forget it. if sinclair only had made the pen color flash
only... flashing can be achieved by an interrupt routine, and most time
there is nearly nothing flashing on the screen. but i'd like to keep a
compatibility mode!
programming screen modi and color palettes:
please only by output! we could start collecting used out addresses and
then decide which one we'll use.
i suggest to use only one master address in the lower address byte with
fully decoded 8 bits for all screen related outputs and use the high
byte of the address as sub address to select the function and the data
byte to transfer data (hey, seems to be intended that way by the zilog
engineers :-)
so for the start ignore the master address issue until we have collected
enough addresses already used by other devices.
now asuggestion for a list of sub address functions:
[clut = color look up table = table for ink to color conversion]
[ink = index in clut]
%01xxxxxx set clut[data].red to %xxxxxx
%10xxxxxx set clut[data].green to %xxxxxx
%11xxxxxx set clut[data].blue to %xxxxxx
%00000000 select screen mode 0: classic specci (data ignored)
%00000001 select screen mode 1: hires text ""
%00000010 select screen mode 2: game mode 1 ""
%00000011 select screen mode 3: game mode 2 ""
special switches (see below) (ordered sub addresses starting from $04)
%00000100 select 3+3 bit inks + bright + flash (classic specci)
%00000101 select 4+4 bit inks
%00000110 select 3+5 bit inks
.... select 2+6 bit inks
... select 1+7 bit inks
... select 0+8 bit inks
.. trigger interrupt every [data] lines
.. set high bits for inks from screen memory to [data]
. lock all settings
. reset to classic specci (soft reset command)
. more switches
this would implement a clut with 256 inks with 6 bit components (262144
colors).
mode 0: (classic specci mode) 3-bit true color could be interpreted as
inks. then the clut should reset to the specci colors on reset. programs
could change inks to use own colors. bright and flash bit working.
some of the special switches select other attribute conversions: e.g.
2x4-bit inks or a 3-bit paper ink plus 5-bit pen ink with no bright and
flash bits. if 0+8 bit mode is selected, the paper color will always
come from ink 0. (6144+768 bytes)
mode 1: (text mode) could be 512x192 like Sam Coupé or Timex2068. How is
this screen organized im ram? color? layout? size?
mode 2/3: attribute table is expanded to hold 1 attribute byte per pixel
byte. attribute table has to go somewhere else in memory. [i would not
really like this mode] (12288 bytes)
mode 2/3: no attribute table but 4 bit per pixel indexed colors.
(24576 bytes)
mode 2/3: no attribute table but 8 bit per pixel indexed colors.
(49152 bytes)
special switch to enable interrupts at certain scan lines to make
switching the screen mode for split screens easy.
special switch to set the default value for inks: if we use ink sizes
less than 8 bit the unset upper bits come from this byte. this can be
used to implement multiple palettes with fast switching between them.
more special switches could be added on public request.
we need to decide how to organize the video ram in each mode. how is the
512x192 pixel mode on a Sam Coupé handled? this could serve as example.
how to handle border color? i suggest to interpret it's 3 bits as an ink
index too.
we could also add programming of the 'first scanline' and 'last
scanline' and even 'fist pixel column' and 'last pixel column'. this way
we could enlarge the writable screen. Cinemax display on a Specci :-)
all those special switches could be added step by step. so lets start
with the color palette thing first.
hey, i got fun thinking about it.
comments appreciated.
... kio !
--
http://little-bat.de
http://little-bat.de/zx_spectrum.html
k...@little-bat.de (private)