<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.sizecoding.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ToBach</id>
		<title>SizeCoding - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.sizecoding.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ToBach"/>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/wiki/Special:Contributions/ToBach"/>
		<updated>2026-05-02T16:19:07Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.0</generator>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Dragon_32/64&amp;diff=1491</id>
		<title>Dragon 32/64</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Dragon_32/64&amp;diff=1491"/>
				<updated>2024-04-13T13:45:00Z</updated>
		
		<summary type="html">&lt;p&gt;ToBach: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dragon32 / Dragon64 ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
To set up your , first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: asm6809 ( https://www.6809.org.uk/asm6809/ )&lt;br /&gt;
* Emulator(s): xroar ( https://www.6809.org.uk/xroar/ )&lt;br /&gt;
&lt;br /&gt;
=== Memory map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6809&amp;quot;&amp;gt;&lt;br /&gt;
$0000-03ff	System variables&lt;br /&gt;
$0400-05ff	Default Text screen&lt;br /&gt;
$0600-1dff	Available graphics pages w/o DOS&lt;br /&gt;
$0600-0bff	DOS - workspace area see also $00ea-$00f6&lt;br /&gt;
$0600-0dff	CoCo DOS workspace area (no more info)&lt;br /&gt;
$0c00-23ff	DOS - Available graphics pages&lt;br /&gt;
$8000-bfff	BASIC ROM in 32K mode&lt;br /&gt;
$8000-9fff	CoCo - Extended Color BASIC ROM&lt;br /&gt;
$a000-bfff	CoCo - Color BASIC ROM&lt;br /&gt;
$bff0-bfff	These addresses mapped from ROM to $fff0-$ffff by the SAM&lt;br /&gt;
$c000-dfff	DOS - Dos ROM&lt;br /&gt;
$c000-feff	DOS - Cumana DOS ROM only&lt;br /&gt;
$c000-feff	Available address range to cartridge expansion port 32K mode&lt;br /&gt;
$c000-feff	D64 - 64K mode - copy of BASIC ROM 2 exists in RAM here&lt;br /&gt;
$ff00-ff48	PIA / D64 / DOS Control and Data registers&lt;br /&gt;
$ffc0-ffdf	SAM (Synchronous Address Multiplexer) register bits - use&lt;br /&gt;
		  even address to clear, odd address to set&lt;br /&gt;
$ffec-ffef	PC-Dragon - Used by Paul Burgin's emulator to provide enhanced&lt;br /&gt;
		  services&lt;br /&gt;
$fff0-ffff	6809 interrupt vectors mapped from $bff0-$bfff by SAM&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check out http://dragon32.info/info/memmap.html for a complete memory map&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The Dragon uses the Motorola 6847 VDG, it has the following native video modes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mode !! RAM Used !! Resolution !! Colours&lt;br /&gt;
|-&lt;br /&gt;
| Alphanumeric (IA) || 512 || 32x16 || Up to 11*&lt;br /&gt;
|-&lt;br /&gt;
| D || 1,024 || 64x64 || 4&lt;br /&gt;
|-&lt;br /&gt;
| E || 1,024 || 128x64 || 2&lt;br /&gt;
|-&lt;br /&gt;
| F || 1,536|| 128x64 || 4&lt;br /&gt;
|-&lt;br /&gt;
| PMODE0 || 1,536 || 128x96 || 2&lt;br /&gt;
|-&lt;br /&gt;
| PMODE1 || 3,072 || 128x96 || 4&lt;br /&gt;
|-&lt;br /&gt;
| PMODE2 || 3,072 || 128x192 || 2&lt;br /&gt;
|-&lt;br /&gt;
| PMODE3 || 6,144 || 128x192 || 4&lt;br /&gt;
|-&lt;br /&gt;
| PMODE4 || 6,144 || 256x192 || 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can also use what are called &amp;quot;Semigraphics&amp;quot; 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).&lt;br /&gt;
&lt;br /&gt;
==== Sync with frame  ====&lt;br /&gt;
Syncing with VSYNC can be done in a few ways, the most common being:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
wait_for_vsync&lt;br /&gt;
    lda $ff03   ;polling vsync&lt;br /&gt;
    bpl wait_for_vsync&lt;br /&gt;
    lda $ff02   ;acknowledge vsync&lt;br /&gt;
    ;rest of your code...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
    sync&lt;br /&gt;
    ;rest of your code...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Plot in Bitmap modes ====&lt;br /&gt;
Here is a routine that will allow you to plot a single point in bitmap mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Text mode ====&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
==== Make some noise ====&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources ===&lt;br /&gt;
* Dragon32 Info page - http://dragon32.info/&lt;br /&gt;
* World of Dragon forums - https://archive.worldofdragon.org/phpBB3/&lt;br /&gt;
* 6809.org.uk Website - https://www.6809.org.uk/&lt;br /&gt;
* CoCoCoding - https://sites.google.com/a/aaronwolfe.com/cococoding/home&lt;/div&gt;</summary>
		<author><name>ToBach</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Dragon_32/64&amp;diff=1490</id>
		<title>Dragon 32/64</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Dragon_32/64&amp;diff=1490"/>
				<updated>2024-04-13T13:33:10Z</updated>
		
		<summary type="html">&lt;p&gt;ToBach: /* Sync with frame */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dragon32 / Dragon64 ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
To set up your , first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: asm6809 ( https://www.6809.org.uk/asm6809/ )&lt;br /&gt;
* Emulator(s): xroar ( https://www.6809.org.uk/xroar/ )&lt;br /&gt;
&lt;br /&gt;
=== Memory map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6809&amp;quot;&amp;gt;&lt;br /&gt;
$0000-03ff	System variables&lt;br /&gt;
$0400-05ff	Default Text screen&lt;br /&gt;
$0600-1dff	Available graphics pages w/o DOS&lt;br /&gt;
$0600-0bff	DOS - workspace area see also $00ea-$00f6&lt;br /&gt;
$0600-0dff	CoCo DOS workspace area (no more info)&lt;br /&gt;
$0c00-23ff	DOS - Available graphics pages&lt;br /&gt;
$8000-bfff	BASIC ROM in 32K mode&lt;br /&gt;
$8000-9fff	CoCo - Extended Color BASIC ROM&lt;br /&gt;
$a000-bfff	CoCo - Color BASIC ROM&lt;br /&gt;
$bff0-bfff	These addresses mapped from ROM to $fff0-$ffff by the SAM&lt;br /&gt;
$c000-dfff	DOS - Dos ROM&lt;br /&gt;
$c000-feff	DOS - Cumana DOS ROM only&lt;br /&gt;
$c000-feff	Available address range to cartridge expansion port 32K mode&lt;br /&gt;
$c000-feff	D64 - 64K mode - copy of BASIC ROM 2 exists in RAM here&lt;br /&gt;
$ff00-ff48	PIA / D64 / DOS Control and Data registers&lt;br /&gt;
$ffc0-ffdf	SAM (Synchronous Address Multiplexer) register bits - use&lt;br /&gt;
		  even address to clear, odd address to set&lt;br /&gt;
$ffec-ffef	PC-Dragon - Used by Paul Burgin's emulator to provide enhanced&lt;br /&gt;
		  services&lt;br /&gt;
$fff0-ffff	6809 interrupt vectors mapped from $bff0-$bfff by SAM&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check out http://dragon32.info/info/memmap.html for a complete memory map&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The Dragon 32 / Dragon 64 have the following native video modes:&lt;br /&gt;
* Standard text modes&lt;br /&gt;
* Bitmap modes&lt;br /&gt;
&lt;br /&gt;
==== Sync with frame  ====&lt;br /&gt;
Syncing with VSYNC can be done in a few ways, the most common being:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
wait_for_vsync&lt;br /&gt;
    lda $ff03   ;polling vsync&lt;br /&gt;
    bpl wait_for_vsync&lt;br /&gt;
    lda $ff02   ;acknowledge vsync&lt;br /&gt;
    ;rest of your code...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
    sync&lt;br /&gt;
    ;rest of your code...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Plot in Bitmap modes ====&lt;br /&gt;
Here is a routine that will allow you to plot a single point in bitmap mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Text mode ====&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
==== Make some noise ====&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources ===&lt;br /&gt;
* Dragon32 Info page - http://dragon32.info/&lt;br /&gt;
* World of Dragon forums - https://archive.worldofdragon.org/phpBB3/&lt;br /&gt;
* 6809.org.uk Website - https://www.6809.org.uk/&lt;br /&gt;
* CoCoCoding - https://sites.google.com/a/aaronwolfe.com/cococoding/home&lt;/div&gt;</summary>
		<author><name>ToBach</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Dragon_32/64&amp;diff=1489</id>
		<title>Dragon 32/64</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Dragon_32/64&amp;diff=1489"/>
				<updated>2024-04-13T13:31:26Z</updated>
		
		<summary type="html">&lt;p&gt;ToBach: /* Sync with frame */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dragon32 / Dragon64 ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
To set up your , first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: asm6809 ( https://www.6809.org.uk/asm6809/ )&lt;br /&gt;
* Emulator(s): xroar ( https://www.6809.org.uk/xroar/ )&lt;br /&gt;
&lt;br /&gt;
=== Memory map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6809&amp;quot;&amp;gt;&lt;br /&gt;
$0000-03ff	System variables&lt;br /&gt;
$0400-05ff	Default Text screen&lt;br /&gt;
$0600-1dff	Available graphics pages w/o DOS&lt;br /&gt;
$0600-0bff	DOS - workspace area see also $00ea-$00f6&lt;br /&gt;
$0600-0dff	CoCo DOS workspace area (no more info)&lt;br /&gt;
$0c00-23ff	DOS - Available graphics pages&lt;br /&gt;
$8000-bfff	BASIC ROM in 32K mode&lt;br /&gt;
$8000-9fff	CoCo - Extended Color BASIC ROM&lt;br /&gt;
$a000-bfff	CoCo - Color BASIC ROM&lt;br /&gt;
$bff0-bfff	These addresses mapped from ROM to $fff0-$ffff by the SAM&lt;br /&gt;
$c000-dfff	DOS - Dos ROM&lt;br /&gt;
$c000-feff	DOS - Cumana DOS ROM only&lt;br /&gt;
$c000-feff	Available address range to cartridge expansion port 32K mode&lt;br /&gt;
$c000-feff	D64 - 64K mode - copy of BASIC ROM 2 exists in RAM here&lt;br /&gt;
$ff00-ff48	PIA / D64 / DOS Control and Data registers&lt;br /&gt;
$ffc0-ffdf	SAM (Synchronous Address Multiplexer) register bits - use&lt;br /&gt;
		  even address to clear, odd address to set&lt;br /&gt;
$ffec-ffef	PC-Dragon - Used by Paul Burgin's emulator to provide enhanced&lt;br /&gt;
		  services&lt;br /&gt;
$fff0-ffff	6809 interrupt vectors mapped from $bff0-$bfff by SAM&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check out http://dragon32.info/info/memmap.html for a complete memory map&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The Dragon 32 / Dragon 64 have the following native video modes:&lt;br /&gt;
* Standard text modes&lt;br /&gt;
* Bitmap modes&lt;br /&gt;
&lt;br /&gt;
==== Sync with frame  ====&lt;br /&gt;
Syncing with VSYNC can be done in a few ways, the most common being:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
vskip&lt;br /&gt;
    lda $ff03   ;polling vsync&lt;br /&gt;
    bpl vskip&lt;br /&gt;
    lda $ff02   ;acknowledge vsync&lt;br /&gt;
    ;rest of your code...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
    sync&lt;br /&gt;
    ;rest of your code...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Plot in Bitmap modes ====&lt;br /&gt;
Here is a routine that will allow you to plot a single point in bitmap mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Text mode ====&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
==== Make some noise ====&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources ===&lt;br /&gt;
* Dragon32 Info page - http://dragon32.info/&lt;br /&gt;
* World of Dragon forums - https://archive.worldofdragon.org/phpBB3/&lt;br /&gt;
* 6809.org.uk Website - https://www.6809.org.uk/&lt;br /&gt;
* CoCoCoding - https://sites.google.com/a/aaronwolfe.com/cococoding/home&lt;/div&gt;</summary>
		<author><name>ToBach</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Dragon_32/64&amp;diff=1488</id>
		<title>Dragon 32/64</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Dragon_32/64&amp;diff=1488"/>
				<updated>2024-04-13T13:30:40Z</updated>
		
		<summary type="html">&lt;p&gt;ToBach: /* Sync with frame */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dragon32 / Dragon64 ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
To set up your , first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: asm6809 ( https://www.6809.org.uk/asm6809/ )&lt;br /&gt;
* Emulator(s): xroar ( https://www.6809.org.uk/xroar/ )&lt;br /&gt;
&lt;br /&gt;
=== Memory map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6809&amp;quot;&amp;gt;&lt;br /&gt;
$0000-03ff	System variables&lt;br /&gt;
$0400-05ff	Default Text screen&lt;br /&gt;
$0600-1dff	Available graphics pages w/o DOS&lt;br /&gt;
$0600-0bff	DOS - workspace area see also $00ea-$00f6&lt;br /&gt;
$0600-0dff	CoCo DOS workspace area (no more info)&lt;br /&gt;
$0c00-23ff	DOS - Available graphics pages&lt;br /&gt;
$8000-bfff	BASIC ROM in 32K mode&lt;br /&gt;
$8000-9fff	CoCo - Extended Color BASIC ROM&lt;br /&gt;
$a000-bfff	CoCo - Color BASIC ROM&lt;br /&gt;
$bff0-bfff	These addresses mapped from ROM to $fff0-$ffff by the SAM&lt;br /&gt;
$c000-dfff	DOS - Dos ROM&lt;br /&gt;
$c000-feff	DOS - Cumana DOS ROM only&lt;br /&gt;
$c000-feff	Available address range to cartridge expansion port 32K mode&lt;br /&gt;
$c000-feff	D64 - 64K mode - copy of BASIC ROM 2 exists in RAM here&lt;br /&gt;
$ff00-ff48	PIA / D64 / DOS Control and Data registers&lt;br /&gt;
$ffc0-ffdf	SAM (Synchronous Address Multiplexer) register bits - use&lt;br /&gt;
		  even address to clear, odd address to set&lt;br /&gt;
$ffec-ffef	PC-Dragon - Used by Paul Burgin's emulator to provide enhanced&lt;br /&gt;
		  services&lt;br /&gt;
$fff0-ffff	6809 interrupt vectors mapped from $bff0-$bfff by SAM&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check out http://dragon32.info/info/memmap.html for a complete memory map&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The Dragon 32 / Dragon 64 have the following native video modes:&lt;br /&gt;
* Standard text modes&lt;br /&gt;
* Bitmap modes&lt;br /&gt;
&lt;br /&gt;
==== Sync with frame  ====&lt;br /&gt;
Syncing with VSYNC can be done in a few ways, the most common being:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
vskip&lt;br /&gt;
    lda $ff03   ;polling vsync&lt;br /&gt;
    bpl vskip&lt;br /&gt;
    lda $ff02   ;acknowledge vsync&lt;br /&gt;
    ;rest of your code...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However 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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
    sync&lt;br /&gt;
    ;rest of your code...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Plot in Bitmap modes ====&lt;br /&gt;
Here is a routine that will allow you to plot a single point in bitmap mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Text mode ====&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
==== Make some noise ====&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources ===&lt;br /&gt;
* Dragon32 Info page - http://dragon32.info/&lt;br /&gt;
* World of Dragon forums - https://archive.worldofdragon.org/phpBB3/&lt;br /&gt;
* 6809.org.uk Website - https://www.6809.org.uk/&lt;br /&gt;
* CoCoCoding - https://sites.google.com/a/aaronwolfe.com/cococoding/home&lt;/div&gt;</summary>
		<author><name>ToBach</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=6809&amp;diff=1452</id>
		<title>6809</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=6809&amp;diff=1452"/>
				<updated>2024-04-13T01:48:10Z</updated>
		
		<summary type="html">&lt;p&gt;ToBach: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Wanting to start sizecoding on a 6809 platform in this day and age can be tough.&lt;br /&gt;
So here is a bit of help to get you started:&lt;br /&gt;
&lt;br /&gt;
== 6809 Based Plaforms ==&lt;br /&gt;
*'''[[Dragon 32/64]]''' - Dragon Sizecoding information&lt;br /&gt;
*'''[[Vectrex]]''' - Vectrex Sizecoding information&lt;br /&gt;
&lt;br /&gt;
== The 6809 CPU ==&lt;br /&gt;
=== Registers ===&lt;br /&gt;
&lt;br /&gt;
These are the internal registers of the 6809:&lt;br /&gt;
&lt;br /&gt;
* A + B (D): Two 8-bit accumulators which can be combined into one 16-bit accumulator.&lt;br /&gt;
* X + Y: Two 16-bit index registers.&lt;br /&gt;
* S + U: Two 16-bit stack pointers, which can also be used as index registers.&lt;br /&gt;
* PC: 16-bit Program Counter&lt;br /&gt;
* DP: 8-bit Direct Page value, a pointer to a page in RAM to set the Direct Page (Moveable Zero Page)&lt;br /&gt;
* CC: 8-bit Condition Codes&lt;br /&gt;
&lt;br /&gt;
== Instruction Set ==&lt;br /&gt;
The 6502's instruction set was inspired by the 6800 series (Predecessor to the 6809), so there are a few similarities between the two.&lt;br /&gt;
If you are coming from a 6502 background, you may get the jist of it sooner than others.&lt;br /&gt;
&lt;br /&gt;
Here is a handy sheet with all the instructions of the 6809: https://www.chibiakumas.com/6809/CheatSheet.pdf&lt;br /&gt;
&lt;br /&gt;
== Techniques ==&lt;br /&gt;
=== Stack Blasting ===&lt;br /&gt;
The 6809 has quick methods of pushing and pulling registers onto and off the stack, which only take 5 cycles plus one per byte you are pushing/pulling. This can be used for fast memory copying.&lt;br /&gt;
&lt;br /&gt;
Although the 6809 does have auto-incrementing it can take up to 16 cycles per two bytes to copy. With stack blasting we can speed it up to 7 bytes in 24 cycles.&lt;br /&gt;
&lt;br /&gt;
Due to using almost every register you will have to back up certain registers before utilising this method.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasm&amp;quot;&amp;gt;&lt;br /&gt;
;The conventional method:&lt;br /&gt;
LDX #SOURCE&lt;br /&gt;
LDY #DESTINATION&lt;br /&gt;
LDD ,X++&lt;br /&gt;
STD ,Y++&lt;br /&gt;
&lt;br /&gt;
;Stack blasting:&lt;br /&gt;
LDS #SOURCE&lt;br /&gt;
LDU #DESTINATION&lt;br /&gt;
PULS D,X,Y,DP&lt;br /&gt;
PSHU D,X,Y,DP&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>ToBach</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Main_Page&amp;diff=1451</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Main_Page&amp;diff=1451"/>
				<updated>2024-04-13T01:28:17Z</updated>
		
		<summary type="html">&lt;p&gt;ToBach: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Welcome to SizeCoding.org! ==&lt;br /&gt;
&lt;br /&gt;
'''SizeCoding.org is a wiki dedicated to the art of creating very tiny programs for most popular types of CPUs. As sizecoding is also popular on other hardware, we recently opened the website for other platforms as well, check the links below.'''  &lt;br /&gt;
&lt;br /&gt;
By &amp;quot;very tiny programs&amp;quot;, we mean programs that are '''256 bytes or less in size''', typically created by members of the [https://en.wikipedia.org/wiki/Demoscene demoscene] as a show of programming skill. The size of these tiny programs is measured by their total size in opcode bytes, and are usually presented as an executable binary.  &lt;br /&gt;
&lt;br /&gt;
'''Despite their tiny size, these programs are able to produce amazing graphical displays, playable games, and sometimes music.'''  There are even some surprisingly effective programs in just '''16 bytes'''  [https://demozoo.org/productions/?platform=&amp;amp;production_type=55] or even '''8 bytes''' [https://demozoo.org/productions/?platform=&amp;amp;production_type=54]. &lt;br /&gt;
&lt;br /&gt;
'''The intent of this wiki is to teach assembler programmers the various techniques used to create tiny demoscene intros.''' &lt;br /&gt;
While these techniques can be used for other applications (boot sectors, ROM, BIOS and firmware code, etc.), the information presented here is firmly oriented towards the demoscene. Practicality and common sense are sometimes thrown out the window just to shave a single byte. Consider yourself warned.&lt;br /&gt;
&lt;br /&gt;
Here is the list of active platforms available on this wiki:&lt;br /&gt;
&lt;br /&gt;
*'''[[Windows]]''' - Sizecoding for Windows.&lt;br /&gt;
*'''[[Fantasy consoles]]''' - Fantasy Consoles (TIC-80 , PICO-8, MicroW8), Processing and other Virtual Machine languages (such as JavaScript).&lt;br /&gt;
*'''[[DOS]]''' - Sizecoding for X86 / DOS.&lt;br /&gt;
*'''[[Linux]]''' - Sizecoding for Linux.&lt;br /&gt;
*'''[[ARM]]''' - ARM-based platforms (RISC OS, Acorn Archimedes, Gameboy Advance, etc.)&lt;br /&gt;
*'''[[RISC-V]]''' - RISC−V micro-processors. &lt;br /&gt;
*'''[[ReGIS]]''' - VT125, VT230, VT240/241 and more terminal display vector graphics language.&lt;br /&gt;
*'''[[Bytebeat]]''' - Tiny music created from mathematical expressions.&lt;br /&gt;
&lt;br /&gt;
8-bit and 16-bit platforms:&lt;br /&gt;
*'''[[Motorola 68000]]''' - Commodore Amiga, Atari ST, Atari Jaguar, Spectrum QL, etc.&lt;br /&gt;
*'''[[6502]]''' - Commodore 64, Atari XE/XL, Apple II, Atari Lynx, BBC Micro, etc.&lt;br /&gt;
*'''[[Z80]]''' - ZX Spectrum, Amstrad CPC, etc.&lt;br /&gt;
*'''[[PDP-11]]''' - BK-0010 / BK-0011, etc.&lt;br /&gt;
*'''[[6809]]''' - Dragon 32/64, Tandy CoCo, Vectrex, etc.&lt;/div&gt;</summary>
		<author><name>ToBach</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=6809&amp;diff=1450</id>
		<title>6809</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=6809&amp;diff=1450"/>
				<updated>2024-04-13T01:26:00Z</updated>
		
		<summary type="html">&lt;p&gt;ToBach: created page and added basic information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Wanting to start sizecoding on a 6809 platform in this day and age can be tough.&lt;br /&gt;
So here is a bit of help to get you started:&lt;br /&gt;
&lt;br /&gt;
== 6809 Based Plaforms ==&lt;br /&gt;
*'''[[Dragon 32/64]]''' - Dragon Sizecoding information&lt;br /&gt;
*'''[[Vectrex]]''' - Vectrex Sizecoding information&lt;br /&gt;
&lt;br /&gt;
== The 6809 CPU ==&lt;br /&gt;
=== Registers ===&lt;br /&gt;
The 6502's instruction set was inspired by the 6800 series (Predecessor to the 6809), so there are a few similarities between the two.&lt;br /&gt;
If you are coming from a 6502 background, you may get the jist of it sooner than others.&lt;br /&gt;
&lt;br /&gt;
These are the internal registers of the 6809:&lt;br /&gt;
&lt;br /&gt;
* A + B (D): Two 8-bit accumulators which can be combined into one 16-bit accumulator.&lt;br /&gt;
* X + Y: Two 16-bit index registers.&lt;br /&gt;
* S + U: Two 16-bit stack pointers, which can also be used as index registers.&lt;br /&gt;
* PC: 16-bit Program Counter&lt;br /&gt;
* DP: 8-bit Direct Page value, a pointer to a page in RAM to set the Direct Page (Moveable Zero Page)&lt;br /&gt;
* CC: 8-bit Condition Codes&lt;br /&gt;
&lt;br /&gt;
== Instruction Set ==&lt;br /&gt;
Here is a handy sheet with all the instructions of the 6809: https://www.chibiakumas.com/6809/CheatSheet.pdf&lt;br /&gt;
&lt;br /&gt;
== Techniques ==&lt;br /&gt;
=== Stack Blasting ===&lt;br /&gt;
The 6809 has quick methods of pushing and pulling registers onto and off the stack, which only take 5 cycles plus one per byte you are pushing/pulling. This can be used for fast memory copying.&lt;br /&gt;
&lt;br /&gt;
Although the 6809 does have auto-incrementing it can take up to 16 cycles per two bytes to copy. With stack blasting we can speed it up to 7 bytes in 24 cycles.&lt;br /&gt;
&lt;br /&gt;
Due to using almost every register you will have to back up certain registers before utilising this method.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasm&amp;quot;&amp;gt;&lt;br /&gt;
;The conventional method:&lt;br /&gt;
LDX #SOURCE&lt;br /&gt;
LDY #DESTINATION&lt;br /&gt;
LDD ,X++&lt;br /&gt;
STD ,Y++&lt;br /&gt;
&lt;br /&gt;
;Stack blasting:&lt;br /&gt;
LDS #SOURCE&lt;br /&gt;
LDU #DESTINATION&lt;br /&gt;
PULS D,X,Y,DP&lt;br /&gt;
PSHU D,X,Y,DP&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>ToBach</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Acorn_Archimedes&amp;diff=1423</id>
		<title>Acorn Archimedes</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Acorn_Archimedes&amp;diff=1423"/>
				<updated>2024-04-08T19:50:21Z</updated>
		
		<summary type="html">&lt;p&gt;ToBach: added assembler and emulator&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Acorn Archimedes ==&lt;br /&gt;
Acorn Archimedes is a family of personal computers designed by Acorn Computers of Cambridge, England. The systems are based on Acorn's own ARM architecture processors and the proprietary operating systems Arthur and RISC OS. The first models were introduced in 1987, and systems in the Archimedes family were sold until the mid-1990s.&lt;br /&gt;
&lt;br /&gt;
The ARM RISC design, a 32-bit CPU (using 26-bit addressing), running at 8 MHz, was stated as achieving 4 MIPS, which provided a significant upgrade from 8-bit home computers, such as Acorn's previous machines. &lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
Setting up your development platform for the Gameboy Advance:&lt;br /&gt;
&lt;br /&gt;
* Assembler: - vasm ( http://sun.hasenbraten.de/vasm/ )&lt;br /&gt;
* Emulator(s): - Arculator ( https://b-em.bbcmicro.com/arculator/ )&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
To be added  &lt;br /&gt;
&lt;br /&gt;
==== Getting something on screen ====&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
To be added&lt;br /&gt;
&lt;br /&gt;
==== Make some noise ====&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources ===&lt;br /&gt;
* [https://demozoo.org/productions/?platform=35&amp;amp;production_type=19] - Tiny Intros for the Acorn Archimedes&lt;/div&gt;</summary>
		<author><name>ToBach</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=BBC_Micro&amp;diff=1392</id>
		<title>BBC Micro</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=BBC_Micro&amp;diff=1392"/>
				<updated>2024-04-08T15:42:50Z</updated>
		
		<summary type="html">&lt;p&gt;ToBach: updated assembler and emulators and added some additional hardware information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== BBC Micro / Acorn Electron ==&lt;br /&gt;
The Acorn 8-bit systems consist of a 6502 processor @ 2MHz (65SC12 in Master 128) with a 6845 CRTC for bitmap graphics, SAA5050 for teletext graphics, and a TI SN76489 sound chip.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
To set up your , first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: BeebAsm ( https://github.com/stardot/beebasm )&lt;br /&gt;
* Emulator(s): BeebEm, b2 ( http://www.mkw.me.uk/beebem/ ) ( https://github.com/tom-seddon/b2 )&lt;br /&gt;
&lt;br /&gt;
=== Memory map ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
0000 	Current Language Zero Page &lt;br /&gt;
0090 	Operating System Zero Page&lt;br /&gt;
0100 	Processor Stack&lt;br /&gt;
0200 	Operating System Workspace&lt;br /&gt;
0300&lt;br /&gt;
0400 	Current Language Workspace&lt;br /&gt;
0500&lt;br /&gt;
0600&lt;br /&gt;
0700&lt;br /&gt;
0800 	Sound &amp;amp; Printer Buffer&lt;br /&gt;
0900 	RS423, Speech &amp;amp; Tape output Buffer&lt;br /&gt;
0A00 	RS423 &amp;amp; Tape input Buffer&lt;br /&gt;
0B00 	Function Keys&lt;br /&gt;
0C00 	User defined graphics&lt;br /&gt;
0D00 	NMI routines (Disk/Econet)&lt;br /&gt;
0D9F 	Expander vector set&lt;br /&gt;
0DF0 	Paged ROM workspace storage locations&lt;br /&gt;
0E00 	USER workspace 	/ DFS workspace (not Master)&lt;br /&gt;
...&lt;br /&gt;
3000 	Screen (Mode 0, 1, 2) 	USER workspace with shadow Mode 128…134&lt;br /&gt;
4000 	Screen (Mode 3)&lt;br /&gt;
5800 	Screen (Mode 4, 5)&lt;br /&gt;
6000 	Screen (Mode 6)&lt;br /&gt;
7B00 	Screen (Mode 7)&lt;br /&gt;
C000 	OS ROM 	Paged rom workspace&lt;br /&gt;
DC00 	MOS CLI Buffer&lt;br /&gt;
DD00 	*MOVE workspace&lt;br /&gt;
DF00 	MOS private workspace&lt;br /&gt;
E000 	OS ROM&lt;br /&gt;
FC00 	FRED 1MHz bus&lt;br /&gt;
FD00 	JIM 1MHz bus&lt;br /&gt;
FE00 	SHIELA I/O Memory&lt;br /&gt;
FF00 	OS ROM Vectors&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check out https://mdfs.net/Docs/Comp/BBC/AllMem for a complete memory map&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The BBC Micro / Acorn Electron have the following native video modes:&lt;br /&gt;
* Standard text modes&lt;br /&gt;
* Bitmap modes&lt;br /&gt;
* Teletext / Mode 7 (BBC Micro only)&lt;br /&gt;
&lt;br /&gt;
==== Sync with frame  ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
-&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Plot in Bitmap modes ====&lt;br /&gt;
Here is a routine that will allow you to plot a single point in bitmap mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Text mode ====&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;6502&amp;quot;&amp;gt;&lt;br /&gt;
To be added&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
==== Make some noise ====&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources ===&lt;br /&gt;
* Stardot forums https://stardot.org.uk/forums/&lt;/div&gt;</summary>
		<author><name>ToBach</name></author>	</entry>

	</feed>