So lets look at more details about each feature.
Other modes include many software compatible with matchbox coco modes eight full screen background graphics modes and special text modes such as a 40x132 16 level gray scale text mode available as a special Background overlay mode for the VGA monitor and a similar 20x66x128 color Text mode for the Composite Monitor(note this mode uses the high bit of the color byte to designate a flashing pixel) .
There is dual monitor support and built into the CoCo 5 to
support a third monitor the Advanced Adaptor Add-On card must
provide suitable software in its ROM otherwise adding that card will
disable the VGA port.
Virtual Screens are
rendered by the GPU's but are managed by CPU #0. Other CPU's may make
requests for specific layouts through CPU#0's
Executive Supervisory Program API thus CPU#0 has the last say
and the Executive Supervisory Program resolves any conflicting
requests.
Virtual Screen and Sprite Spec Format:
ScreenGroup.LayerCode.ScreenID some examples with comments:
GA.t.SV09 Group
A . top layer . ID=SV09
(S00 is the background S01 to S08 reserved for system popups
regular screens start at 9)
GA.m.SV10
GroupA . middle layer . ID=SV10
(.m for middle layer , .t for top layer and .b for bottom
layer)
GB.B.SV00 This screen
exists if you have a VGA monitor attached to the VGA out
port it a the system background screen.
GB.B.SC00 This screen
exists if you have a Composite monitor attached to the
Composite out port it a the system background screen.
GB.B.SA00 This screen exists
if you have a monitor attached to the Advanced Adapter out
port it a the system background screen.
GB.B.SV00CC This screen exists if
you have set the VGA screen to be a clone of the composite screen.
GB.B.SA00CV This screen exists if you
have set the Advanced Adapter Screen to be a clone of
the VGA screen.
(ie. DVI mirroring or replacing VGA.)
GB.B.SA00CC This screen exists if
you have set the Advanced Adapter Screen to be a clone of
the composite screen.
(ie. RGB monitor mirroring or replacing the
composite screen.)
GC.t.SV011
Group C . top layer . ID=SV09
(Screen groups are different, non overlapping areas of the
screen. )
ScreenGroup.SpriteLevelNumber.SpriteNumber.InstanceNumber
So how do we set up a set of Virtual Screens.
There are two main steps and in some cases a third:
Step #1 (Virtual Screen Group Setup
Direct method)
There might also be an API method but we will not describe it.
Virtual Windows setup directly by CPU#0 via X prompt. (some examples)
Where each color block above repersents an assignment of that section to
a different "Screen Group" and the Dark Blue is unassigned.
The command to achieve this layout would be:
X>SCREEN VGA="BBBG,AAAC, AAAC,AAAC,AAAC,HJOR"
seems rather abstract but but lets look at the alternative way of
doing the same thing supposing that we start with a completely
unassigned screen.
This screen would show only the background picture and when the
system mouse hovers over the bottom of the screen the STATUS and X>
lines.
OK using the command X>SCREEN LAYOUT VGA
you get this
screen poping up the Status line turning to a help line and the X>
changing to an S> prompt.
clicking the mouse over fourth box in the top row
and typing the key sequence below,
G→AAAC→AAAC→AAAC→AAAC→HJORX
what does this mean
first understand that each block here is a 320x113 block of the screen
the first G says assign this block to "Screen Group G" since you
are at
the end of a row → must be pressed to move the cursor to the
next row
pressing A to set this block as part of "Screen Group A"
the cursor will
automatically move to the next entry in the row so AA assigns
the next
two screen sections to "Screen Group A" as-well, the C→
assigns the
next section of screen to "Screen Group C" and then moves the
cursor
to the next row. The final X is to close the screen setup window
and exit
to the S prompt.
At the S prompt the command VGA S or VGA SHOW
will pop up the
screen layout window which looks like this.
gets you a temporary screen setup that you can use right away but
that you will loose after you power down.
But the command VGA SAVE at the S prompt will save your changes
to NVR. After saving VGA SHOW will show
As you can see the lower case letters are the setup currently in use
while the upper case letters indicate what is stored in NVR Settings.
Finally at
But this time will make some mistakes and then show how to correct
them.
Once again we will start with nothing assigned to the screen.
If you have been following this as an exercise the commands
X>SCREEN VGA="BBBB,BBBB,BBBB,BBBB,BBBB,BBBB"
X>SCREEN VGA SAVE
will get you back to an unassigned (Background Only) screen.
X>SCREEN VGA S
will show this layout.
Now suppose you type at the x prompt.
X>SCREEN LAYOUT
you will get the S prompt
S>
Type
S>VGA
of course you could have typed X>SCREEN LAYOUT VGA
you would come to the same place.
Now clicking on the fourth cell in the first row and typing
G→AAAC→AAAC→AAAC→AACC→HJORX at this prompt
screen will come up looking like.
Oh Oh not what you wanted. So how to fix ?
just type S>VGA you will get this
The area surrounded by the red flashing border contains the mistake.
If instead or typing
G→AAAC→AAAC→AAAC→AACC→HJORX
G→AAAC→AAAC→AAAC→AAAC→HJORX
you would have had what you wanted so now to fix it just click on
the cell 5 rows down and 3 columns over and then type
AX so now you have the proper setup.
What if you don't have a USB mouse attached.
In that case every time you type S>VGA or S>CMP
you get the cursor flashing in the top row first column and in this
case the key sequence →→↓↓↓↓AX will get the problem cell fixed.
In this second case you are saying
NEXT column NEXT column NEXT row NEXT row
NEXT row NEXT row Assign Cell to Screen Group A Exit
Ok hopefully that is enough description that you understand what I have
in mind to assign various sections of the screen to a screen group.
Lets summarize the codes you use in the screen layout editor:
ACDEFGHJKLMNOPQRST are codes to (assign to up to 18
different screen groups A --> T)
B is the code to assign a screen area to the System
Background.
I is the code to display enhanced info about each screen
area.
U is the code to undo last change.
→ is the code to skip to next entry in row leaving the
current entry unchanged and also the code to continue to the start of
next row if you are already at the end of a row.
← is the code to go pack to the previous entry.
↓ is the code to go down to the next row staying in the
current column.
↑ is the code to go up to the previous row staying in the
current column.
V is the code to verify that all chosen screen
areas are rectangular and that a screen area has been uniquely defined
.
W is the code to write the current screen areas to NVR
X is the code to exit applying all changes as a temporary
screen setup.
Yd is the code to yank a whole screen area
to the d provided no existing screen areas are in the
way d refers to the direction you want to yank and can
be any of .↑→↓← so Y→
would mean yank "screen group A" to the right if it was keyed
in while the current entry is A.
Zsa is the code to zero out screen(s) sa
so ZHJO← would eliminate screen groups HJ and O. The syntax is
Z followed by one or more screen group identification letters
the screens disappear as you type and you can type U to undo a
mistake.
Ok so far we have divided the screen into sections but how do we run programs or send graphics to these sections ?
To do that we must assign a Virtual Screen or Virtual Screen(s) to each
screen group we wish to use.
There are two versions of the assign command:
Examples
Example 1. In this example we will assume that we are in TriCoCo
mode with CPU#2(CoCo GREEN) in Coco 3 mode have:
We will also assume that we initially have no virtual screen groups
assigned.
The VGA screen which for this example is 720 vertical pixels by
1280 horizontal pixels looks like this.
Note illustration above at 3'4 scale, CPU#0 is selected focus and
that STATUS & AUTO-HIDE are OFF.
Ok so lets set up the screen groups for a 720x1280 SVGA system.
X>SCREEN VGA="ACCC, ACCC,DCCC,DCCC,FCCC,FCCC"
This gives us this screen layout.
We now also have an S prompt. So at that S prompt we type.
As soon as we move the system mouse or Joystick or press any key
the screen layout display goes but may be brought back with the command
LAYOUT from the S prompt or SHOW LAYOUT
from the X prompt.
S>ASSIGN VsgC #3,#3.1,#3.2 SCALE
this assigns the output of CPU #3 to Screen Group C and
reserves the
middle and bottom layers of sgC for control by CPU#3 as well.
(The important thing to note here is that by assigning #3 to
C we have directed the
standard output of virtual CPU #3) Assuming
CoCo Red has just booted we
see something like this.
Now the next step is to assign CPU #1 (CoCoBlue) to Screen Group F
We could use the command S>ASSIGN VsgF
#1 SCALE to get a screen like this:
OR we could use the command S>ASSIGN
VsgF #1 to get
a screen like this:
Now there is a program for RS-DOS on the Coco 3 out there that shows all
64 colors on the screen.
Assuming you have that program copied to drive 1 you
could type
LOADM "64: EXEC at the RS-DOS Prompt.
The 64 Colors for the chosen mode RGB CMPo or CMPe
would be shown as below.
Ok lets continue we still have not assigned video outputs to Screen
Groups A & D.
The following two commands will be used to make these
assignments.
S>ASSIGN VsgA #2
SCALE
S>ASSIGN VsgD #2/w5 SCALE
The result will be
We note that CPU #2 is now waiting in RS-DOS and while most of
Screen Group D is still showing the
system wallpaper as if it had not yet been assigned there is a
notice indicating that "w5 Not Available"
because an NitrOS9 instance is not running on CPU#2. ** See Note re.
Alt Views
Starting NitrOS9 with the DOS command on the CoCo
Green we see.
When fully booted we still see
"w5 Not Available" in the
Screen Group D section of the screen because NitrOS9 has no
/w5 is defined.
Later if we open /w5 from the Nitros9 instance
on CoCoGREEN we get
Note that
S>ASSIGN VsgD #2/w5 SCALE
did not cause /w5 to
fill the entire area assigned to Screen Group D
even though the SCALE
option was specified.
this is because the window /w5
created in MultiVue was not assigned the entire
Screen Group D that is being mapped
into Screen
Group D.
Note if we had given the Command
S>ASSIGN VsgD #2/w5 SCALE
FS
instead
the screen would look the same if no other windows had been
opened on that Screen Group D
but
suppose we had also opened a calculator and a clock the screen
would now appear as below.
We will study this situation further when we study "FOCUS"
First we will check the Alt View commands available at the X prompt. **
See Note re. Alt View
IF we had typed X at the S prompt we would fall back into the X prompt.
S>X
X>SHOW SCREEN GROUPS
X>STATUS SHOW
X>
After typing these into the executive interface and
pressing the FOCUS key until CPU #3 has focus you get
to turn off this display mode use the commands:
X>HIDE SCREEN GROUPS
X>STATUS OFF
There are actually 3072 base colors any specific monitor must use either the Background Set or the Virtual Screen Set for its background. Only the Virtual Screen Set can be used for Virtual Screens.
Mode | Real Color Code | Color Read As | Notes |
---|---|---|---|
00 | 0-63 | 0-63 | Coco3 Composite |
01 | 64-127 | 0-63 | Coco3 RGB |
Enhanced Composite | 128-191 | 0-63 | A
address in settings determines whether standard or Enhanced Composite is active. |
10 | 192-447 | 0-255 | Xterm Colors |
Grayscale* | 424-487 | 0-64 | 5
bit Gray for Background Only Screen mode. |
Extra Colors | 488-511 | N/A | Extra
Colors possibly including Matchbox CoCo Colors. |
11 | 512-1023 | 0-511 | GIMEx Colors |
Background
Color (Red Set) |
0-1023 | 0-1023 | 10
bit Color RRRRGGGBBB for Background Screen Only. |
Background
Color (Green Set) |
0-1023 | 0-1023 | 10
bit Color RRRGGGGBBB for Background Screen Only. |
* Note above Xterm Colors 231 to 255 are
grey scale so we overlap those grey scale colors with the rest of the
greyscale.
Background Set refers to a set of colors that are only available only on the background layer.
These colors would be specified as 2:n for the red set or 3:n for the green set where n=0 to 1023.
Virtual Screen Set refers to a set of colors that are used by the Virtual Screen Groups that form the three layers stacked above the background.
Background Status Bits are read from the NV-RAM settings on system startup they may be one of:Further there are several different ways to specify a precise color.
The Color Blender is a feature of the GPU that allows multiple planes stacked above the background in a WINDOW to be given opacity values from 0 to F corresponding to 0 opacity which hides a plane to F for Full opacity which would hide all planes under it and for a color in each plane to be set as transparent.
Code | % Transparency |
---|---|
0 | 0.00(Hides Background) |
1 | 6.25 |
2 | 12.50 |
3 | 18.75 |
4 | 25.00 |
5 | 31.25 |
6 | 37.50 |
7 | 43.75 |
8 | 50.00 (half) |
9 | 56.25 |
A | 62.50 |
B | 68.75 |
C | 75.00 |
D | 81.25 |
E | 87.50 |
F | 100.00 (Full Transparency*) |
Note Full Transparency would hide the layer in question because all it's elements would be invisible.
1. Every Virtual Screen group may consist of one two or three layers.
For example the screen command S>ASSIGN
VsgC #3,#3.1,#3.2 SCALE
assigns three layers to VGA screen group C if we had typed just
S>ASSIGN VsgC #3,#3.1 SCALE
then only two layers would be assigned to VsgC and
if the command
S>ASSIGN VsgC #3 SCALE
was used then only the one screen group would bs assigned.
Now if all these layers were opaque then they would not be of much use however we can use the CBlend command to set the transparency of each layer. For example
COLOR Blend #3 8,8,0
Sets the transparency for cpu #3's Top Mid and Base layers to Half,Half and No Transparency for example. This gives you three equitably weighted layers with no effect from the background .
On the other hand
COLOR Blend #2 B,F,1
would set the layers for CPU #2 to 75% 100% and 6.25% respectively very much dimming the top layer making the mid layer completely invisible and allowing a hint of the system background to be seen through the base layer.
Another variation of the COLOR Blend command specifies a Screen
Group instead of a CPU #.
For example
COLOR Blend CsgR 6
sets the Composite Monitor Screen Group R to a transparency of
6 but can only set this screen group if it only consists of a single
layer and does not apply to Focus or Overflow
screen groups as these use the settings of there parent window.
For example if you used the command Assign CcgR #3.1 to
set up CcgR then the CBlend CsgR 6 works
but if you had used Assign CcgR #3.0,3.1 to set
up CcgR then the CBlend CsgR 6 does not
work .
Another screen command is GRAB to get the color at a chosen point.
GRAB COLOR@ x,y ON m Gets the color code
of the specified x,y coordinate on m= VGA or CMP and
pushes that value to the color stack.
The color code is also displayed at the X prompt.
GRAB COLOR@ CLICK Gets the color code of the point
clicked on and pushes that value to the color stack.
The color code is also displayed at the X prompt.
These features maybe used not only from the X prompt but also called
from BASIC4 or Assembly language via the XAPI.
The next few illustrations show how such features nay be used.
For this example we will imagine a assembly language program XCanvas
that runs in a BASIC4 environment making use of these advanced features.
We will go back to our VGA screen group example layout to illustrate the
interface. So if we are runing XCanvas on the CoCoRED ie. CPU #3 then it
will be displayed
on VsgC the first illustration will just focus on what's
happening in that Screen Group.
Note the "Layer Transparency" menu item does it's work by calling the
XAPI that executes COLOR Blend
it then passes the CPU number of the calling program #3
and fills in the transparency data from the user input form 8,8,0.
As illustrated above just click on Colors in the drop-down menu and then Layer Transparency fill out the values 8 8 and 0 and then click Change Transparency.
Now lets look at another example GRAB COLOR@ CLICK is called by XCanvas through the XAPIIn TriCoCo Mode each processor each processor can claim 24 Sprites.
4 Large Sprites and 20 Small Sprites.
In DualCoCo Mode each processor can claim up to 6 Large
Sprites and 30 Small Sprites.
In any case there are also four Admin Sprites available for CPU #0
( One is used as the USB Mouse Pointer ) .
Every Sprite in use must be entered into the Sprite Directory in
the "All Share" Super Block.
The Directory element consists of:
User CPU# | Palette Color Depth | Palette Block Address | Palette Offset Address High | Palette Offset Address Low | Transparency Assignment |
---|---|---|---|---|---|
3 |
#10 |
#1B |
#00 |
#88 |
03 |
R | G | B | R | G | B |
0 |
0 |
0 |
4 |
0 |
1 |
1 |
7 |
7 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
0 |
0 |
3 |
2 |
1 |
0 |
0 |
7 |
3 |
1 |
5 |
6 |
6 |
2 |
1 |
3 |
5 |
7 |
4 |
1 |
3 |
1 |
1 |
1 |
3 |
6 |
1 |
5 |
5 |
5 |
1 |
1 |
Note that Three Sprite Planes are above the Top Screen layer
so any sprites here will hide a portion of the top layer behind
them.
Suppose you were creating a game where a drone
plane could be launched from a submarine under the sea and fly up
into the sky then if the background layer showed a sea
bottom picture and on Sprite Plane #1 we have the "Submarine
Sprite" then "Airplane Sprites" not yet launched could hide in Plane#0
when launched they show up next to the submarine on Level #1 as
they climb to Level#2 Virtual Screen Bottom Layer could show
splashing waves then as the Plane Sprite rises to Planes
#3 & #4 virtual screen Mid Layer shows landscape
shrinking below finally when the plane reaches Plane #5 it is
above the cloud deck with clouds being handled by the Virtual
Screen Top Layer where it dogfights other planes..
Just an example of how multi screen layers could be leveraged to
achieve a game not possible on a standard color computer.
Math
The inclusion of math co-processing capabilities would be useful for
programs aiming for realistic physics and for the GPU's
automatic calculation of Sprite position based on physics.
If we reserve 55 of the 255 possible single byte opcodes available for
the GIMMEx32 for math co-processing instructions we could have most of
the instructions of the 8087.
Add on Cards
These cards occupy the location where the RF Out would be on coco
3.
Some possible cards could be.
Video Data Refresh/GPU/CPU Clocks (Highly Speculative)
There are two Master System Clocks @114.3 MHz we call these +MCLK and -MCLK idealy they are derived from a single 228.6 MHz. Master Clock but if not that then synced with a PLL.
In the tabels below the highest levels refer to Higher
Clock Rates When there is a mini table within a table cel it
means that
+MCLK master clock divides down as as follows.
+MCLK (114.4 MHz.)
Graphics Master
Clock (57.2 MHz.)
+Blender
Clock (57.2MHz.)
GPU Processor Clock (28.6MHz.) Blitter Clock (28.6MHz.)
*See Note #1
* * * * * * * *
* Note #1: The Plus Blender Processor goes through the following cycles for each pixel each cycle at 57.2 MHz which results results at a rate of 7.14MHz these mixing are .
- Get Sprite Plane #7 pixel if any.
- Mix with Sprite Plane #6 pixel if any.
- Mix with Sprite Plane #5 pixel if any.
- Mix with Virtual Screen Level #3 (Top)
- Mix with Sprite Plane #4 pixel if any.
- Mix with Sprite Plane #3 pixel if any.
- Mix with the results of -Blender.
- Output results if VGA Pixel to VGA Monitor DAC.
-MCLK is the master clock for the Composite system every 16 pulses are directed as follows.
-MCLK (114.4 MHz)
CPU
Clock (57.2MHz.)
-Blender
Clock (57.2MHz.)
*See Note #2
* * * * * * * *
CPU Processors
Master Clock (28.6MHz.)Video Signal
Master Clock (28.6MHz.)CPU Master Clocks
#0 #1 #2 #3
each @7.14 MHz. **
VGA Composite
* Note#2:The Minus Blender Processor goes through the following cycles for each pixel each cycle at 57.2 MHx results at a rate of 7.14MHz these mixing are .
Note also how each CPU gets a 7.14MH Clock and how
the Master VGA & Composite clocks are 14.3 MHz.