|
|
@ -1,5 +1,5 @@ |
|
|
\define{doc_title}{Architecture} |
|
|
|
|
|
\include{"Common.h"} |
|
|
|
|
|
|
|
|
$define{doc_title}{Architecture}$ |
|
|
|
|
|
$include{"Common.h"}$ |
|
|
|
|
|
|
|
|
Overview |
|
|
Overview |
|
|
======== |
|
|
======== |
|
|
@ -134,7 +134,7 @@ the same area that is bank switched. |
|
|
|
|
|
|
|
|
Boot Phase 1 copies the phase 2 code to upper memory and jumps to it to |
|
|
Boot Phase 1 copies the phase 2 code to upper memory and jumps to it to |
|
|
continue the boot process. This is required because the CPU starts at |
|
|
continue the boot process. This is required because the CPU starts at |
|
|
address \$0000 in low memory. However, low memory is used as the area |
|
|
|
|
|
|
|
|
address $0000 in low memory. However, low memory is used as the area |
|
|
for switching ROM/RAM banks in and out. Therefore, it is necessary to |
|
|
for switching ROM/RAM banks in and out. Therefore, it is necessary to |
|
|
relocate execution to high memory in order to initialize the RAM memory |
|
|
relocate execution to high memory in order to initialize the RAM memory |
|
|
banks. |
|
|
banks. |
|
|
@ -184,7 +184,7 @@ ROM Boot |
|
|
At power on (or hardware reset), ROM page 0 is automatically mapped to |
|
|
At power on (or hardware reset), ROM page 0 is automatically mapped to |
|
|
lower memory by hardware level system initialization. Page Zero (first |
|
|
lower memory by hardware level system initialization. Page Zero (first |
|
|
256 bytes of the CPU address space) is reserved to contain dispatching |
|
|
256 bytes of the CPU address space) is reserved to contain dispatching |
|
|
instructions for interrupt instructions. Address \$0000 performs a jump |
|
|
|
|
|
|
|
|
instructions for interrupt instructions. Address $0000 performs a jump |
|
|
to the start of the phase 1 code so that this first page can be |
|
|
to the start of the phase 1 code so that this first page can be |
|
|
reserved. |
|
|
reserved. |
|
|
|
|
|
|
|
|
@ -210,13 +210,13 @@ initiate an Application Boot using the system image contained in the |
|
|
application file itself. |
|
|
application file itself. |
|
|
|
|
|
|
|
|
Upon execution, the Application Boot program is loaded into memory by |
|
|
Upon execution, the Application Boot program is loaded into memory by |
|
|
the previously running operating system starting at \$0100. Note that |
|
|
|
|
|
|
|
|
the previously running operating system starting at $0100. Note that |
|
|
program image contains a copy of the HBIOS to be installed and run. Once |
|
|
program image contains a copy of the HBIOS to be installed and run. Once |
|
|
the Application Boot program is loaded by the previous operating system, |
|
|
the Application Boot program is loaded by the previous operating system, |
|
|
control is passed to it and it performs a system initialization similar |
|
|
control is passed to it and it performs a system initialization similar |
|
|
to the ROM Boot, but using the image loaded in RAM. |
|
|
to the ROM Boot, but using the image loaded in RAM. |
|
|
|
|
|
|
|
|
Specifically, the code at \$0100 (in low memory) copies phase 2 boot |
|
|
|
|
|
|
|
|
Specifically, the code at $0100 (in low memory) copies phase 2 boot |
|
|
code to upper memory and transfers control to it. The phase 2 boot code |
|
|
code to upper memory and transfers control to it. The phase 2 boot code |
|
|
copies the HBIOS image from application RAM to RAM, then calls the HBIOS |
|
|
copies the HBIOS image from application RAM to RAM, then calls the HBIOS |
|
|
initialization routine. At this point, the prior HBIOS code has been |
|
|
initialization routine. At this point, the prior HBIOS code has been |
|
|
@ -387,7 +387,7 @@ _Bits_ | _Function_ |
|
|
2 | Stop Bits (???) |
|
|
2 | Stop Bits (???) |
|
|
1-0 | Data Bits (???) |
|
|
1-0 | Data Bits (???) |
|
|
|
|
|
|
|
|
The 5-bit baud rate value (V) is encoded as V = 75 \* 2\^X \* 3\^Y. The |
|
|
|
|
|
|
|
|
The 5-bit baud rate value (V) is encoded as V = 75 * 2^X * 3^Y. The |
|
|
bits are defined as YXXXX. |
|
|
bits are defined as YXXXX. |
|
|
|
|
|
|
|
|
### Function 0x00 -- Character Input (CIOIN) |
|
|
### Function 0x00 -- Character Input (CIOIN) |
|
|
@ -526,17 +526,17 @@ types. |
|
|
|
|
|
|
|
|
**Media ID** | **Value** | **Format** |
|
|
**Media ID** | **Value** | **Format** |
|
|
------------ | --------- | ---------- |
|
|
------------ | --------- | ---------- |
|
|
MID\_NONE | 0 | No media installed |
|
|
|
|
|
MID\_MDROM | 1 | ROM Drive |
|
|
|
|
|
MID\_MDRAM | 2 | RAM Drive |
|
|
|
|
|
MID\_RF | 3 | RAM Floppy (LBA) |
|
|
|
|
|
MID\_HD | 4 | Hard Disk (LBA) |
|
|
|
|
|
MID\_FD720 | 5 | 3.5" 720K Floppy |
|
|
|
|
|
MID\_FD144 | 6 | 3.5" 1.44M Floppy |
|
|
|
|
|
MID\_FD360 | 7 | 5.25" 360K Floppy |
|
|
|
|
|
MID\_FD120 | 8 | 5.25" 1.2M Floppy |
|
|
|
|
|
MID\_FD111 | 9 | 8" 1.11M Floppy |
|
|
|
|
|
MID\_HDNEW | 10 | Hard Disk with 1024 Directory entries |
|
|
|
|
|
|
|
|
MID_NONE | 0 | No media installed |
|
|
|
|
|
MID_MDROM | 1 | ROM Drive |
|
|
|
|
|
MID_MDRAM | 2 | RAM Drive |
|
|
|
|
|
MID_RF | 3 | RAM Floppy (LBA) |
|
|
|
|
|
MID_HD | 4 | Hard Disk (LBA) |
|
|
|
|
|
MID_FD720 | 5 | 3.5" 720K Floppy |
|
|
|
|
|
MID_FD144 | 6 | 3.5" 1.44M Floppy |
|
|
|
|
|
MID_FD360 | 7 | 5.25" 360K Floppy |
|
|
|
|
|
MID_FD120 | 8 | 5.25" 1.2M Floppy |
|
|
|
|
|
MID_FD111 | 9 | 8" 1.11M Floppy |
|
|
|
|
|
MID_HDNEW | 10 | Hard Disk with 1024 Directory entries |
|
|
|
|
|
|
|
|
### Function 0x10 -- Disk Status (DIOSTATUS) |
|
|
### Function 0x10 -- Disk Status (DIOSTATUS) |
|
|
|
|
|
|
|
|
@ -950,22 +950,22 @@ possible 16 values for foreground or background: |
|
|
|
|
|
|
|
|
**Foreground** | **Background** | **Color** |
|
|
**Foreground** | **Background** | **Color** |
|
|
------------------ | ------------------ | ---------------- |
|
|
------------------ | ------------------ | ---------------- |
|
|
\_0 \_\_\_\_0000 | 0\_ 0000\_\_\_\_ | Black |
|
|
|
|
|
\_1 \_\_\_\_0001 | 1\_ 0001\_\_\_\_ | Red |
|
|
|
|
|
\_2 \_\_\_\_0010 | 2\_ 0010\_\_\_\_ | Green |
|
|
|
|
|
\_3 \_\_\_\_0011 | 3\_ 0011\_\_\_\_ | Brown |
|
|
|
|
|
\_4 \_\_\_\_0100 | 4\_ 0100\_\_\_\_ | Blue |
|
|
|
|
|
\_5 \_\_\_\_0101 | 5\_ 0101\_\_\_\_ | Magenta |
|
|
|
|
|
\_6 \_\_\_\_0110 | 6\_ 0110\_\_\_\_ | Cyan |
|
|
|
|
|
\_7 \_\_\_\_0111 | 7\_ 0111\_\_\_\_ | White |
|
|
|
|
|
\_8 \_\_\_\_1000 | 8\_ 1000\_\_\_\_ | Gray |
|
|
|
|
|
\_9 \_\_\_\_1001 | 9\_ 1001\_\_\_\_ | Light Red |
|
|
|
|
|
\_A \_\_\_\_1010 | A\_ 1010\_\_\_\_ | Light Green |
|
|
|
|
|
\_B \_\_\_\_1011 | B\_ 1011\_\_\_\_ | Yellow |
|
|
|
|
|
\_C \_\_\_\_1100 | C\_ 1100\_\_\_\_ | Light Blue |
|
|
|
|
|
\_D \_\_\_\_1101 | D\_ 1101\_\_\_\_ | Light Magenta |
|
|
|
|
|
\_E \_\_\_\_1110 | E\_ 1110\_\_\_\_ | Light Cyan |
|
|
|
|
|
\_F \_\_\_\_1111 | F\_ 1111\_\_\_\_ | Bright White |
|
|
|
|
|
|
|
|
n0 nnnn0000 | 0n 0000nnnn | Black |
|
|
|
|
|
n1 nnnn0001 | 1n 0001nnnn | Red |
|
|
|
|
|
n2 nnnn0010 | 2n 0010nnnn | Green |
|
|
|
|
|
n3 nnnn0011 | 3n 0011nnnn | Brown |
|
|
|
|
|
n4 nnnn0100 | 4n 0100nnnn | Blue |
|
|
|
|
|
n5 nnnn0101 | 5n 0101nnnn | Magenta |
|
|
|
|
|
n6 nnnn0110 | 6n 0110nnnn | Cyan |
|
|
|
|
|
n7 nnnn0111 | 7n 0111nnnn | White |
|
|
|
|
|
n8 nnnn1000 | 8n 1000nnnn | Gray |
|
|
|
|
|
n9 nnnn1001 | 9n 1001nnnn | Light Red |
|
|
|
|
|
nA nnnn1010 | An 1010nnnn | Light Green |
|
|
|
|
|
nB nnnn1011 | Bn 1011nnnn | Yellow |
|
|
|
|
|
nC nnnn1100 | Cn 1100nnnn | Light Blue |
|
|
|
|
|
nD nnnn1101 | Dn 1101nnnn | Light Magenta |
|
|
|
|
|
nE nnnn1110 | En 1110nnnn | Light Cyan |
|
|
|
|
|
nF nnnn1111 | Fn 1111nnnn | Bright White |
|
|
|
|
|
|
|
|
Attribute byte values are constructed using the following bit encoding: |
|
|
Attribute byte values are constructed using the following bit encoding: |
|
|
|
|
|
|
|
|
@ -1087,12 +1087,12 @@ The currently defined video device types are: |
|
|
|
|
|
|
|
|
VDA ID | Value | Device |
|
|
VDA ID | Value | Device |
|
|
---------- | ----- | ------ |
|
|
---------- | ----- | ------ |
|
|
VDA\_NONE | 0x00 | No VDA |
|
|
|
|
|
VDA\_VDU | 0x10 | ECB VDU board |
|
|
|
|
|
VDA\_CVDU | 0x20 | ECB Color VDU board |
|
|
|
|
|
VDA\_7220 | 0x30 | ECB uPD7220 video display board |
|
|
|
|
|
VDA\_N8 | 0x40 | TMS9918 video display built-in to N8 |
|
|
|
|
|
VDA\_VGA | 0x50 | ECB VGA board |
|
|
|
|
|
|
|
|
VDA_NONE | 0x00 | No VDA |
|
|
|
|
|
VDA_VDU | 0x10 | ECB VDU board |
|
|
|
|
|
VDA_CVDU | 0x20 | ECB Color VDU board |
|
|
|
|
|
VDA_7220 | 0x30 | ECB uPD7220 video display board |
|
|
|
|
|
VDA_N8 | 0x40 | TMS9918 video display built-in to N8 |
|
|
|
|
|
VDA_VGA | 0x50 | ECB VGA board |
|
|
|
|
|
|
|
|
### Function 0x44 -- Video Set Cursor Style (VDASCS) |
|
|
### Function 0x44 -- Video Set Cursor Style (VDASCS) |
|
|
|
|
|
|
|
|
@ -1107,7 +1107,7 @@ VDA\_VGA | 0x50 | ECB VGA board |
|
|
|
|
|
|
|
|
If supported by the video hardware, adjust the format of the cursor such |
|
|
If supported by the video hardware, adjust the format of the cursor such |
|
|
that the cursor starts at the pixel specified in the top nibble of D and |
|
|
that the cursor starts at the pixel specified in the top nibble of D and |
|
|
end at the pixel specified in the bottom nibble of D. So, if D=\$08, a |
|
|
|
|
|
|
|
|
end at the pixel specified in the bottom nibble of D. So, if D=$08, a |
|
|
block cursor would be used that starts at the top pixel of the character |
|
|
block cursor would be used that starts at the top pixel of the character |
|
|
cell and ends at the ninth pixel of the character cell. |
|
|
cell and ends at the ninth pixel of the character cell. |
|
|
|
|
|
|
|
|
@ -2150,23 +2150,24 @@ The following section outlines the read only data referenced by the |
|
|
|
|
|
|
|
|
#### TMS9918 Driver: |
|
|
#### TMS9918 Driver: |
|
|
|
|
|
|
|
|
| Name | Offset | Size (bytes)| Description | |
|
|
|
|
|
|--------|--------|-------------|-------------| |
|
|
|
|
|
|
|
|
| **Name** | **Offset** | **Bytes** | **Description** | |
|
|
|
|
|
|--------|----|----|-----------------------| |
|
|
| PPIA | 0 | 1 | PPI PORT A | |
|
|
| PPIA | 0 | 1 | PPI PORT A | |
|
|
| PPIB | 1 | 1 | PPI PORT B | |
|
|
| PPIB | 1 | 1 | PPI PORT B | |
|
|
| PPIC | 2 | 1 | PPI PORT C | |
|
|
| PPIC | 2 | 1 | PPI PORT C | |
|
|
| PPIX | 3 | 1 | PPI CONTROL PORT | |
|
|
| PPIX | 3 | 1 | PPI CONTROL PORT | |
|
|
| DATREG | 4 | 1 | IO PORT ADDRESS FOR MODE 0 | |
|
|
| DATREG | 4 | 1 | IO PORT ADDRESS FOR MODE 0 | |
|
|
| CMDREG | 5 | 1 | IO PORT ADDRESS FOR MODE 1 | |
|
|
| CMDREG | 5 | 1 | IO PORT ADDRESS FOR MODE 1 | |
|
|
| The following are the register mirror values that HBIOS used for initialisation | |
|
|
|
|
|
|
|
|
| | | | _Below are the register mirror values_ | |
|
|
|
|
|
| | | | _that HBIOS used for initialisation_ | |
|
|
| REG. 0 | 6 | 1 | $00 - NO EXTERNAL VID |
|
|
| REG. 0 | 6 | 1 | $00 - NO EXTERNAL VID |
|
|
| REG. 1 | 7 | 1 | $50 or $70 - SET MODE 1 and interrupt if enabled | |
|
|
| REG. 1 | 7 | 1 | $50 or $70 - SET MODE 1 and interrupt if enabled | |
|
|
| REG. 2 | 8 | 1 | $00 - PATTERN NAME TABLE := 0 |
|
|
|
|
|
| REG. 3 | 9 | 1 | $00 - NO COLOR TABLE |
|
|
|
|
|
| REG. 4 | 10 | 1 | $01 - SET PATTERN GENERATOR TABLE TO $800 |
|
|
|
|
|
| REG. 5 | 11 | 1 | $00 - SPRITE ATTRIBUTE IRRELEVANT |
|
|
|
|
|
| REG. 6 | 12 | 1 | $00 - NO SPRITE GENERATOR TABLE |
|
|
|
|
|
| REG. 7 | 13 | 1 | $F0 - WHITE ON BLACK |
|
|
|
|
|
|
|
|
| REG. 2 | 8 | 1 | $00 - PATTERN NAME TABLE := 0 | |
|
|
|
|
|
| REG. 3 | 9 | 1 | $00 - NO COLOR TABLE | |
|
|
|
|
|
| REG. 4 | 10 | 1 | $01 - SET PATTERN GENERATOR TABLE TO $800 | |
|
|
|
|
|
| REG. 5 | 11 | 1 | $00 - SPRITE ATTRIBUTE IRRELEVANT | |
|
|
|
|
|
| REG. 6 | 12 | 1 | $00 - NO SPRITE GENERATOR TABLE | |
|
|
|
|
|
| REG. 7 | 13 | 1 | $F0 - WHITE ON BLACK | |
|
|
| DCNTL* | 14 | 1 | Z180 DMA/WAIT CONTROL | |
|
|
| DCNTL* | 14 | 1 | Z180 DMA/WAIT CONTROL | |
|
|
|
|
|
|
|
|
* ONLY PRESENT FOR Z180 BUILDS |
|
|
* ONLY PRESENT FOR Z180 BUILDS |
|
|
|