Difference between revisions of "Dragon 32/64"

From SizeCoding
Jump to: navigation, search
 
(4 intermediate revisions by 2 users not shown)
Line 11: Line 11:
  
 
<syntaxhighlight lang="6809">
 
<syntaxhighlight lang="6809">
 +
$0000-03ff System variables
 +
$0400-05ff Default Text screen
 +
$0600-1dff Available graphics pages w/o DOS
 +
$0600-0bff DOS - workspace area see also $00ea-$00f6
 +
$0600-0dff CoCo DOS workspace area (no more info)
 +
$0c00-23ff DOS - Available graphics pages
 +
$8000-bfff BASIC ROM in 32K mode
 +
$8000-9fff CoCo - Extended Color BASIC ROM
 +
$a000-bfff CoCo - Color BASIC ROM
 +
$bff0-bfff These addresses mapped from ROM to $fff0-$ffff by the SAM
 +
$c000-dfff DOS - Dos ROM
 +
$c000-feff DOS - Cumana DOS ROM only
 +
$c000-feff Available address range to cartridge expansion port 32K mode
 +
$c000-feff D64 - 64K mode - copy of BASIC ROM 2 exists in RAM here
 +
$ff00-ff48 PIA / D64 / DOS Control and Data registers
 +
$ffc0-ffdf SAM (Synchronous Address Multiplexer) register bits - use
 +
  even address to clear, odd address to set
 +
$ffec-ffef PC-Dragon - Used by Paul Burgin's emulator to provide enhanced
 +
  services
 +
$fff0-ffff 6809 interrupt vectors mapped from $bff0-$bfff by SAM
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Check out - for a complete memory map
+
Check out http://dragon32.info/info/memmap.html for a complete memory map
  
 
=== Video display ===
 
=== Video display ===
The Dragon 32 / Dragon 64 have the following native video modes:
+
The Dragon uses the Motorola 6847 VDG, it has the following native video modes:
* Standard text modes
+
{| class="wikitable"
* Bitmap modes
+
|-
 +
! Mode !! RAM Used !! Resolution !! Colours
 +
|-
 +
| Alphanumeric (IA) || 512 || 32x16 || Up to 11*
 +
|-
 +
| D || 1,024 || 64x64 || 4
 +
|-
 +
| E || 1,024 || 128x64 || 2
 +
|-
 +
| F || 1,536|| 128x64 || 4
 +
|-
 +
| PMODE0 || 1,536 || 128x96 || 2
 +
|-
 +
| PMODE1 || 3,072 || 128x96 || 4
 +
|-
 +
| PMODE2 || 3,072 || 128x192 || 2
 +
|-
 +
| PMODE3 || 6,144 || 128x192 || 4
 +
|-
 +
| PMODE4 || 6,144 || 256x192 || 2
 +
|}
 +
 
 +
You can also use what are called "Semigraphics" modes, where you can increase the rows of characters displayed in the alphanumeric modes, and write to it like a bitmap, giving you a resolution of up to 64x192. However this will not be covered in this article (yet).
  
 
==== Sync with frame  ====
 
==== Sync with frame  ====
 +
Syncing with VSYNC can be done in a few ways, the most common being:
 +
<syntaxhighlight lang="6502">
 +
wait_for_vsync
 +
    lda $ff03  ;polling vsync
 +
    bpl wait_for_vsync
 +
    lda $ff02  ;acknowledge vsync
 +
    ;rest of your code...
 +
</syntaxhighlight>
 +
 +
If you really want to save the bytes, it can be done with just one instruction. However it will not only wait for VSYNC but also other system interrupts that may be going on, so don't expect 100% reliability. It will also do the acknowledgement for you.
 
<syntaxhighlight lang="6502">
 
<syntaxhighlight lang="6502">
-
+
    sync
 +
    ;rest of your code...
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Latest revision as of 07:45, 13 April 2024

Dragon32 / Dragon64

The Dragon 32 and Dragon 64 are home computers that were built in the 1980s. The Dragons are very similar to the TRS-80 Color Computer, and were produced for the European market by Dragon Data, Ltd., initially in Swansea, Wales before moving to Port Talbot, Wales (until 1984) and by Eurohard S.A. in Casar de Cáceres, Spain (from 1984 to 1987), and for the US market by Tano Corporation of New Orleans, Louisiana. The model numbers reflect the primary difference between the two machines, which have 32 and 64 kilobytes of RAM, respectively.

Setting up

To set up your , first get the following tools:

Memory map

$0000-03ff	System variables
$0400-05ff	Default Text screen
$0600-1dff	Available graphics pages w/o DOS
$0600-0bff	DOS - workspace area see also $00ea-$00f6
$0600-0dff	CoCo DOS workspace area (no more info)
$0c00-23ff	DOS - Available graphics pages
$8000-bfff	BASIC ROM in 32K mode
$8000-9fff	CoCo - Extended Color BASIC ROM
$a000-bfff	CoCo - Color BASIC ROM
$bff0-bfff	These addresses mapped from ROM to $fff0-$ffff by the SAM
$c000-dfff	DOS - Dos ROM
$c000-feff	DOS - Cumana DOS ROM only
$c000-feff	Available address range to cartridge expansion port 32K mode
$c000-feff	D64 - 64K mode - copy of BASIC ROM 2 exists in RAM here
$ff00-ff48	PIA / D64 / DOS Control and Data registers
$ffc0-ffdf	SAM (Synchronous Address Multiplexer) register bits - use
		  even address to clear, odd address to set
$ffec-ffef	PC-Dragon - Used by Paul Burgin's emulator to provide enhanced
		  services
$fff0-ffff	6809 interrupt vectors mapped from $bff0-$bfff by SAM

Check out http://dragon32.info/info/memmap.html for a complete memory map

Video display

The Dragon uses the Motorola 6847 VDG, it has the following native video modes:

Mode RAM Used Resolution Colours
Alphanumeric (IA) 512 32x16 Up to 11*
D 1,024 64x64 4
E 1,024 128x64 2
F 1,536 128x64 4
PMODE0 1,536 128x96 2
PMODE1 3,072 128x96 4
PMODE2 3,072 128x192 2
PMODE3 6,144 128x192 4
PMODE4 6,144 256x192 2

You can also use what are called "Semigraphics" modes, where you can increase the rows of characters displayed in the alphanumeric modes, and write to it like a bitmap, giving you a resolution of up to 64x192. However this will not be covered in this article (yet).

Sync with frame

Syncing with VSYNC can be done in a few ways, the most common being:

wait_for_vsync
    lda $ff03   ;polling vsync
    bpl wait_for_vsync
    lda $ff02   ;acknowledge vsync
    ;rest of your code...

If you really want to save the bytes, it can be done with just one instruction. However it will not only wait for VSYNC but also other system interrupts that may be going on, so don't expect 100% reliability. It will also do the acknowledgement for you.

    sync
    ;rest of your code...

Plot in Bitmap modes

Here is a routine that will allow you to plot a single point in bitmap mode.

To be added

Text mode

To be added

To be added

Sound

To be added soon.

Make some noise

To be added soon.

Additional Resources