<?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=TIn</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=TIn"/>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/wiki/Special:Contributions/TIn"/>
		<updated>2026-04-22T23:20:55Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.0</generator>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=718</id>
		<title>Motorola 68000</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=718"/>
				<updated>2020-09-10T20:03:05Z</updated>
		
		<summary type="html">&lt;p&gt;TIn: /* Video display */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Wanting to start sizecoding on a Motorola 68k platform in this day and age can be tough. &lt;br /&gt;
&lt;br /&gt;
So here is a bit of help to get you started:&lt;br /&gt;
&lt;br /&gt;
=== The Motorola 68k processor  ===&lt;br /&gt;
The Motorola 68k processor... &lt;br /&gt;
&lt;br /&gt;
Note:  Assigment direction is source,dest instead of dest,source !!!&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
To be added.&lt;br /&gt;
&lt;br /&gt;
== Atari ST ==&lt;br /&gt;
The Atari ST systems consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
Setting up your development platform for the Atari ST systems is quite easy, first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: VASM - This assembler is able to assemble directly to a TOS image &lt;br /&gt;
* Emulator(s): -. Make sure to use the original TOS 1.62 Image for best compatibility.&lt;br /&gt;
&lt;br /&gt;
==== Compiling to a TOS image ====&lt;br /&gt;
Vasm -Ftos source.s -o source.tos&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The Atari ST uses an interleaved planar memory layout to represent its paletted display modes (we'll concentrate on 320x200x16 colours here). &lt;br /&gt;
&lt;br /&gt;
==== Paletted? ====&lt;br /&gt;
The Atari ST uses index values into a palette of colours. Index 0 is the background colour (that's also used for the border) and a maximum of 16 colours can be defined and indexed.&lt;br /&gt;
&lt;br /&gt;
==== Planes? ====&lt;br /&gt;
Every plane contains one bit of a pixel's colour index value. The bits of the binary representation of a colour index like %1010 (% Bit3,Bit2,Bit1,Bit0) will end up in 4 different planes (bits most significant to least significant aka left to right): Plane4 Plane3 Plane2 Plane1. &lt;br /&gt;
&lt;br /&gt;
So basicly Plane1 contains all of the Bit0s of all pixels, Plane2 all Bit1s, Plane3 all Bit2s and Plabe4 all Bit3s.&lt;br /&gt;
&lt;br /&gt;
The first pixel on a plane is described by the leftmost (aka most significant) bit in a word, the second one by the second-leftmost etc. - just like this %0123456789abcdef with 0-f=pixels 1-16. %1000000000000000=$8000=pixel 1 in a plane word set. The 16th pixel will use the leftmost bit of the next word in this plane. etc.&lt;br /&gt;
&lt;br /&gt;
==== Interleaved? ====&lt;br /&gt;
16 pixels worth of data are represented as a full graphicword, meaning all information to display 16 pixels are stored together, followed by the data to represent the next 16 pixels etc. One row worth of display data has 20 graphicwords (20*16 pixels=320 pixels).&lt;br /&gt;
&lt;br /&gt;
16 pixels are stored in 4 words - which contain 4 of the aforementioned planes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
So a 320x200x16 colour display is a contiuous memory buffer containing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
Pixels 0-15, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
Pixels 16-31, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
Pixels 32-47, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
......&lt;br /&gt;
Pixels 304-319, row 199:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To be refined soon.&lt;br /&gt;
&lt;br /&gt;
==== Setting a palette ====&lt;br /&gt;
Here is some code that will help you setup a palette&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
pea	palette(pc)&lt;br /&gt;
	move.w	#6,-(sp)&lt;br /&gt;
	trap	#14&lt;br /&gt;
&lt;br /&gt;
; Palette data&lt;br /&gt;
palette:	&lt;br /&gt;
	dc.w	$000,$100,$200,$311,$422,$533,$644,$755&lt;br /&gt;
	dc.w	$575,$464,$353,$242,$131,$020,$010,$000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting something on screen ====&lt;br /&gt;
Here is a bit of code to get you started:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	;-----------------------&lt;br /&gt;
	; Line-A Initialization&lt;br /&gt;
	;-----------------------&lt;br /&gt;
; After calling this function, data register D0 and address register A0 point to a table ; with the starting address of the Line A variables. &lt;br /&gt;
; Address register A1 points to a table with the starting addresses for the three system ; font headers, &lt;br /&gt;
; and address register A2 points to a table that specifies the starting addresses of the; 15 Line A opcodes. There's no parameter required for this function, so all you have&lt;br /&gt;
; to do is call the word opcode label that you specified for the $A000 (Initialize)&lt;br /&gt;
; function.&lt;br /&gt;
	dc.w	$A000&lt;br /&gt;
	movem.l	(a0),a1-a4		; A3=INTIN, A4=PTSIN&lt;br /&gt;
&lt;br /&gt;
	;---------&lt;br /&gt;
	; For X&amp;amp;Y&lt;br /&gt;
	;---------&lt;br /&gt;
frameloop:&lt;br /&gt;
	move.w	#200-1,d7		; y&lt;br /&gt;
yLoop:	&lt;br /&gt;
	move.w	#320-1,d6		; x&lt;br /&gt;
xLoop:&lt;br /&gt;
&lt;br /&gt;
	; Putpixel&lt;br /&gt;
put_pixel:	&lt;br /&gt;
	move.b d6,d0		; d0=x&lt;br /&gt;
	eor d7,d0			; d0=x^y&lt;br /&gt;
	lsr.b #2,d0			; d0&amp;gt;&amp;gt;=4&lt;br /&gt;
	and #42,d0			; d0&amp;amp;42&lt;br /&gt;
	&lt;br /&gt;
	move.w	d0,(a3)		; a3=color(d0)&lt;br /&gt;
	movem.w	d6/d7,(a4)	; a4=x,y`&lt;br /&gt;
	&lt;br /&gt;
	dc.w	$A001		; put pixel command&lt;br /&gt;
&lt;br /&gt;
	dbra	d6,xLoop		; decrease and branch&lt;br /&gt;
    dbra	d7,yLoop&lt;br /&gt;
&lt;br /&gt;
; Wait loop&lt;br /&gt;
	bra frameloop ; .s	*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
The Atari ST systems use the YM2149 chip to generate sound.\&lt;br /&gt;
&lt;br /&gt;
For more information check out https://www.atarimagazines.com/v4n7/stsound.html&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;
Sizecoding on the Atari ST is not very huge yet, so resources are sparse.&lt;br /&gt;
* ST Soundchip: https://www.atarimagazines.com/v4n7/stsound.html&lt;br /&gt;
* Spkr's Github: to be added&lt;br /&gt;
&lt;br /&gt;
== Commodore Amiga ==&lt;br /&gt;
The Commodore Amiga system consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
* Assembler: -&lt;br /&gt;
* Emulator(s): WinUAE&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
No information yet&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
No information yet&lt;/div&gt;</summary>
		<author><name>TIn</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=717</id>
		<title>Motorola 68000</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=717"/>
				<updated>2020-09-10T19:30:07Z</updated>
		
		<summary type="html">&lt;p&gt;TIn: /* Planes? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Wanting to start sizecoding on a Motorola 68k platform in this day and age can be tough. &lt;br /&gt;
&lt;br /&gt;
So here is a bit of help to get you started:&lt;br /&gt;
&lt;br /&gt;
=== The Motorola 68k processor  ===&lt;br /&gt;
The Motorola 68k processor... &lt;br /&gt;
&lt;br /&gt;
Note:  Assigment direction is source,dest instead of dest,source !!!&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
To be added.&lt;br /&gt;
&lt;br /&gt;
== Atari ST ==&lt;br /&gt;
The Atari ST systems consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
Setting up your development platform for the Atari ST systems is quite easy, first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: VASM - This assembler is able to assemble directly to a TOS image &lt;br /&gt;
* Emulator(s): -. Make sure to use the original TOS 1.62 Image for best compatibility.&lt;br /&gt;
&lt;br /&gt;
==== Compiling to a TOS image ====&lt;br /&gt;
Vasm -Ftos source.s -o source.tos&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The Atari ST uses an interleaved planar memory layout to represent it's paletted display modes (we'll concentrate on 320x200x16 colours here). &lt;br /&gt;
&lt;br /&gt;
==== Paletted? ====&lt;br /&gt;
The Atari ST uses index values into a palette of colours. Index 0 is the background colour (that's also used for the border) and a maximum of 16 colours can be defined and indexed.&lt;br /&gt;
&lt;br /&gt;
==== Planes? ====&lt;br /&gt;
Every plane contains one bit of a pixel's colour index value. The bits of the binary representation of a colour index like %1010 (% Bit3,Bit2,Bit1,Bit0) will end up in 4 different planes (bits most significant to least significant aka left to right): Plane4 Plane3 Plane2 Plane1. &lt;br /&gt;
&lt;br /&gt;
So basicly Plane1 contains all of the Bit0s of all pixels, Plane2 all Bit1s, Plane3 all Bit2s and Plabe4 all Bit3s.&lt;br /&gt;
&lt;br /&gt;
The first pixel on a plane is described by the leftmost (aka most significant) bit in a word, the second one by the second-leftmost etc. - just like this %0123456789abcdef with 0-f=pixels 1-16. %1000000000000000=$8000=pixel 1 in a plane word set. The 16th pixel will use the leftmost bit of the next word in this plane. etc.&lt;br /&gt;
&lt;br /&gt;
==== Interleaved? ====&lt;br /&gt;
16 pixels worth of data are represented as a full graphicword, meaning all information to display 16 pixels are stored together, followed by the data to represent the next 16 pixels etc. One row worth of display data has 20 graphicwords (20*16 pixels=320 pixels).&lt;br /&gt;
&lt;br /&gt;
16 pixels are stored in 4 words - which contain 4 of the aforementioned planes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
So a 320x200x16 colour display is a contiuous memory buffer containing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
Pixels 0-15, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
Pixels 16-31, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
Pixels 32-47, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
......&lt;br /&gt;
Pixels 304-319, row 199:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To be refined soon.&lt;br /&gt;
&lt;br /&gt;
==== Setting a palette ====&lt;br /&gt;
Here is some code that will help you setup a palette&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
pea	palette(pc)&lt;br /&gt;
	move.w	#6,-(sp)&lt;br /&gt;
	trap	#14&lt;br /&gt;
&lt;br /&gt;
; Palette data&lt;br /&gt;
palette:	&lt;br /&gt;
	dc.w	$000,$100,$200,$311,$422,$533,$644,$755&lt;br /&gt;
	dc.w	$575,$464,$353,$242,$131,$020,$010,$000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting something on screen ====&lt;br /&gt;
Here is a bit of code to get you started:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	;-----------------------&lt;br /&gt;
	; Line-A Initialization&lt;br /&gt;
	;-----------------------&lt;br /&gt;
; After calling this function, data register D0 and address register A0 point to a table ; with the starting address of the Line A variables. &lt;br /&gt;
; Address register A1 points to a table with the starting addresses for the three system ; font headers, &lt;br /&gt;
; and address register A2 points to a table that specifies the starting addresses of the; 15 Line A opcodes. There's no parameter required for this function, so all you have&lt;br /&gt;
; to do is call the word opcode label that you specified for the $A000 (Initialize)&lt;br /&gt;
; function.&lt;br /&gt;
	dc.w	$A000&lt;br /&gt;
	movem.l	(a0),a1-a4		; A3=INTIN, A4=PTSIN&lt;br /&gt;
&lt;br /&gt;
	;---------&lt;br /&gt;
	; For X&amp;amp;Y&lt;br /&gt;
	;---------&lt;br /&gt;
frameloop:&lt;br /&gt;
	move.w	#200-1,d7		; y&lt;br /&gt;
yLoop:	&lt;br /&gt;
	move.w	#320-1,d6		; x&lt;br /&gt;
xLoop:&lt;br /&gt;
&lt;br /&gt;
	; Putpixel&lt;br /&gt;
put_pixel:	&lt;br /&gt;
	move.b d6,d0		; d0=x&lt;br /&gt;
	eor d7,d0			; d0=x^y&lt;br /&gt;
	lsr.b #2,d0			; d0&amp;gt;&amp;gt;=4&lt;br /&gt;
	and #42,d0			; d0&amp;amp;42&lt;br /&gt;
	&lt;br /&gt;
	move.w	d0,(a3)		; a3=color(d0)&lt;br /&gt;
	movem.w	d6/d7,(a4)	; a4=x,y`&lt;br /&gt;
	&lt;br /&gt;
	dc.w	$A001		; put pixel command&lt;br /&gt;
&lt;br /&gt;
	dbra	d6,xLoop		; decrease and branch&lt;br /&gt;
    dbra	d7,yLoop&lt;br /&gt;
&lt;br /&gt;
; Wait loop&lt;br /&gt;
	bra frameloop ; .s	*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
The Atari ST systems use the YM2149 chip to generate sound.\&lt;br /&gt;
&lt;br /&gt;
For more information check out https://www.atarimagazines.com/v4n7/stsound.html&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;
Sizecoding on the Atari ST is not very huge yet, so resources are sparse.&lt;br /&gt;
* ST Soundchip: https://www.atarimagazines.com/v4n7/stsound.html&lt;br /&gt;
* Spkr's Github: to be added&lt;br /&gt;
&lt;br /&gt;
== Commodore Amiga ==&lt;br /&gt;
The Commodore Amiga system consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
* Assembler: -&lt;br /&gt;
* Emulator(s): WinUAE&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
No information yet&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
No information yet&lt;/div&gt;</summary>
		<author><name>TIn</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=716</id>
		<title>Motorola 68000</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=716"/>
				<updated>2020-09-10T19:25:37Z</updated>
		
		<summary type="html">&lt;p&gt;TIn: /* Interleaved? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Wanting to start sizecoding on a Motorola 68k platform in this day and age can be tough. &lt;br /&gt;
&lt;br /&gt;
So here is a bit of help to get you started:&lt;br /&gt;
&lt;br /&gt;
=== The Motorola 68k processor  ===&lt;br /&gt;
The Motorola 68k processor... &lt;br /&gt;
&lt;br /&gt;
Note:  Assigment direction is source,dest instead of dest,source !!!&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
To be added.&lt;br /&gt;
&lt;br /&gt;
== Atari ST ==&lt;br /&gt;
The Atari ST systems consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
Setting up your development platform for the Atari ST systems is quite easy, first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: VASM - This assembler is able to assemble directly to a TOS image &lt;br /&gt;
* Emulator(s): -. Make sure to use the original TOS 1.62 Image for best compatibility.&lt;br /&gt;
&lt;br /&gt;
==== Compiling to a TOS image ====&lt;br /&gt;
Vasm -Ftos source.s -o source.tos&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The Atari ST uses an interleaved planar memory layout to represent it's paletted display modes (we'll concentrate on 320x200x16 colours here). &lt;br /&gt;
&lt;br /&gt;
==== Paletted? ====&lt;br /&gt;
The Atari ST uses index values into a palette of colours. Index 0 is the background colour (that's also used for the border) and a maximum of 16 colours can be defined and indexed.&lt;br /&gt;
&lt;br /&gt;
==== Planes? ====&lt;br /&gt;
Every plane contains one bit of a pixel's colour index value. The bits of the binary represantation of a colour index like %1010 (% Bit3,Bit2,Bit1,Bit0) will end up in 4 different planes (bits most significant to least significant aka left to right): Plane4 Plane3 Plane2 Plane1. &lt;br /&gt;
&lt;br /&gt;
So basicly Plane1 contains all of the Bit0s of all pixels, Plane2 all Bit1s, Plane3 all Bit2s and Plabe4 all Bit3s.&lt;br /&gt;
&lt;br /&gt;
The first pixel on a plane is described by the leftmost (aka most significant) bit in a word, the second one by the second-leftmost etc. - just like this %0123456789abcdef with 0-f=pixels 1-16. %1000000000000000=$8000=pixel 1 in a plane word set.&lt;br /&gt;
&lt;br /&gt;
==== Interleaved? ====&lt;br /&gt;
16 pixels worth of data are represented as a full graphicword, meaning all information to display 16 pixels are stored together, followed by the data to represent the next 16 pixels etc. One row worth of display data has 20 graphicwords (20*16 pixels=320 pixels).&lt;br /&gt;
&lt;br /&gt;
16 pixels are stored in 4 words - which contain 4 of the aforementioned planes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
So a 320x200x16 colour display is a contiuous memory buffer containing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
Pixels 0-15, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
Pixels 16-31, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
Pixels 32-47, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
......&lt;br /&gt;
Pixels 304-319, row 199:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To be refined soon.&lt;br /&gt;
&lt;br /&gt;
==== Setting a palette ====&lt;br /&gt;
Here is some code that will help you setup a palette&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
pea	palette(pc)&lt;br /&gt;
	move.w	#6,-(sp)&lt;br /&gt;
	trap	#14&lt;br /&gt;
&lt;br /&gt;
; Palette data&lt;br /&gt;
palette:	&lt;br /&gt;
	dc.w	$000,$100,$200,$311,$422,$533,$644,$755&lt;br /&gt;
	dc.w	$575,$464,$353,$242,$131,$020,$010,$000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting something on screen ====&lt;br /&gt;
Here is a bit of code to get you started:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	;-----------------------&lt;br /&gt;
	; Line-A Initialization&lt;br /&gt;
	;-----------------------&lt;br /&gt;
; After calling this function, data register D0 and address register A0 point to a table ; with the starting address of the Line A variables. &lt;br /&gt;
; Address register A1 points to a table with the starting addresses for the three system ; font headers, &lt;br /&gt;
; and address register A2 points to a table that specifies the starting addresses of the; 15 Line A opcodes. There's no parameter required for this function, so all you have&lt;br /&gt;
; to do is call the word opcode label that you specified for the $A000 (Initialize)&lt;br /&gt;
; function.&lt;br /&gt;
	dc.w	$A000&lt;br /&gt;
	movem.l	(a0),a1-a4		; A3=INTIN, A4=PTSIN&lt;br /&gt;
&lt;br /&gt;
	;---------&lt;br /&gt;
	; For X&amp;amp;Y&lt;br /&gt;
	;---------&lt;br /&gt;
frameloop:&lt;br /&gt;
	move.w	#200-1,d7		; y&lt;br /&gt;
yLoop:	&lt;br /&gt;
	move.w	#320-1,d6		; x&lt;br /&gt;
xLoop:&lt;br /&gt;
&lt;br /&gt;
	; Putpixel&lt;br /&gt;
put_pixel:	&lt;br /&gt;
	move.b d6,d0		; d0=x&lt;br /&gt;
	eor d7,d0			; d0=x^y&lt;br /&gt;
	lsr.b #2,d0			; d0&amp;gt;&amp;gt;=4&lt;br /&gt;
	and #42,d0			; d0&amp;amp;42&lt;br /&gt;
	&lt;br /&gt;
	move.w	d0,(a3)		; a3=color(d0)&lt;br /&gt;
	movem.w	d6/d7,(a4)	; a4=x,y`&lt;br /&gt;
	&lt;br /&gt;
	dc.w	$A001		; put pixel command&lt;br /&gt;
&lt;br /&gt;
	dbra	d6,xLoop		; decrease and branch&lt;br /&gt;
    dbra	d7,yLoop&lt;br /&gt;
&lt;br /&gt;
; Wait loop&lt;br /&gt;
	bra frameloop ; .s	*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
The Atari ST systems use the YM2149 chip to generate sound.\&lt;br /&gt;
&lt;br /&gt;
For more information check out https://www.atarimagazines.com/v4n7/stsound.html&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;
Sizecoding on the Atari ST is not very huge yet, so resources are sparse.&lt;br /&gt;
* ST Soundchip: https://www.atarimagazines.com/v4n7/stsound.html&lt;br /&gt;
* Spkr's Github: to be added&lt;br /&gt;
&lt;br /&gt;
== Commodore Amiga ==&lt;br /&gt;
The Commodore Amiga system consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
* Assembler: -&lt;br /&gt;
* Emulator(s): WinUAE&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
No information yet&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
No information yet&lt;/div&gt;</summary>
		<author><name>TIn</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=715</id>
		<title>Motorola 68000</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=715"/>
				<updated>2020-09-10T19:25:12Z</updated>
		
		<summary type="html">&lt;p&gt;TIn: /* Interleaved? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Wanting to start sizecoding on a Motorola 68k platform in this day and age can be tough. &lt;br /&gt;
&lt;br /&gt;
So here is a bit of help to get you started:&lt;br /&gt;
&lt;br /&gt;
=== The Motorola 68k processor  ===&lt;br /&gt;
The Motorola 68k processor... &lt;br /&gt;
&lt;br /&gt;
Note:  Assigment direction is source,dest instead of dest,source !!!&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
To be added.&lt;br /&gt;
&lt;br /&gt;
== Atari ST ==&lt;br /&gt;
The Atari ST systems consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
Setting up your development platform for the Atari ST systems is quite easy, first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: VASM - This assembler is able to assemble directly to a TOS image &lt;br /&gt;
* Emulator(s): -. Make sure to use the original TOS 1.62 Image for best compatibility.&lt;br /&gt;
&lt;br /&gt;
==== Compiling to a TOS image ====&lt;br /&gt;
Vasm -Ftos source.s -o source.tos&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The Atari ST uses an interleaved planar memory layout to represent it's paletted display modes (we'll concentrate on 320x200x16 colours here). &lt;br /&gt;
&lt;br /&gt;
==== Paletted? ====&lt;br /&gt;
The Atari ST uses index values into a palette of colours. Index 0 is the background colour (that's also used for the border) and a maximum of 16 colours can be defined and indexed.&lt;br /&gt;
&lt;br /&gt;
==== Planes? ====&lt;br /&gt;
Every plane contains one bit of a pixel's colour index value. The bits of the binary represantation of a colour index like %1010 (% Bit3,Bit2,Bit1,Bit0) will end up in 4 different planes (bits most significant to least significant aka left to right): Plane4 Plane3 Plane2 Plane1. &lt;br /&gt;
&lt;br /&gt;
So basicly Plane1 contains all of the Bit0s of all pixels, Plane2 all Bit1s, Plane3 all Bit2s and Plabe4 all Bit3s.&lt;br /&gt;
&lt;br /&gt;
The first pixel on a plane is described by the leftmost (aka most significant) bit in a word, the second one by the second-leftmost etc. - just like this %0123456789abcdef with 0-f=pixels 1-16. %1000000000000000=$8000=pixel 1 in a plane word set.&lt;br /&gt;
&lt;br /&gt;
==== Interleaved? ====&lt;br /&gt;
16 pixels worth of data are represented as a full graphicword, meaning all information to display 16 pixels are stored together, followed by the data to represent the next 16 pixels etc. One row worth of display data has 20 graphicwords (20*16 pixels=320 pixels).&lt;br /&gt;
&lt;br /&gt;
16 pixels are stored in 4 words - which contain 4 of the aforementioned planes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
So a 320x200x16 colour display is a contiuous memory buffer containing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
Pixels 0-15, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pixels 16-31, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pixels 32-47, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&amp;lt;br /&amp;gt;&lt;br /&gt;
....&amp;lt;br /&amp;gt;&lt;br /&gt;
Pixels 304-319, row 199:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To be refined soon.&lt;br /&gt;
&lt;br /&gt;
==== Setting a palette ====&lt;br /&gt;
Here is some code that will help you setup a palette&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
pea	palette(pc)&lt;br /&gt;
	move.w	#6,-(sp)&lt;br /&gt;
	trap	#14&lt;br /&gt;
&lt;br /&gt;
; Palette data&lt;br /&gt;
palette:	&lt;br /&gt;
	dc.w	$000,$100,$200,$311,$422,$533,$644,$755&lt;br /&gt;
	dc.w	$575,$464,$353,$242,$131,$020,$010,$000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting something on screen ====&lt;br /&gt;
Here is a bit of code to get you started:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	;-----------------------&lt;br /&gt;
	; Line-A Initialization&lt;br /&gt;
	;-----------------------&lt;br /&gt;
; After calling this function, data register D0 and address register A0 point to a table ; with the starting address of the Line A variables. &lt;br /&gt;
; Address register A1 points to a table with the starting addresses for the three system ; font headers, &lt;br /&gt;
; and address register A2 points to a table that specifies the starting addresses of the; 15 Line A opcodes. There's no parameter required for this function, so all you have&lt;br /&gt;
; to do is call the word opcode label that you specified for the $A000 (Initialize)&lt;br /&gt;
; function.&lt;br /&gt;
	dc.w	$A000&lt;br /&gt;
	movem.l	(a0),a1-a4		; A3=INTIN, A4=PTSIN&lt;br /&gt;
&lt;br /&gt;
	;---------&lt;br /&gt;
	; For X&amp;amp;Y&lt;br /&gt;
	;---------&lt;br /&gt;
frameloop:&lt;br /&gt;
	move.w	#200-1,d7		; y&lt;br /&gt;
yLoop:	&lt;br /&gt;
	move.w	#320-1,d6		; x&lt;br /&gt;
xLoop:&lt;br /&gt;
&lt;br /&gt;
	; Putpixel&lt;br /&gt;
put_pixel:	&lt;br /&gt;
	move.b d6,d0		; d0=x&lt;br /&gt;
	eor d7,d0			; d0=x^y&lt;br /&gt;
	lsr.b #2,d0			; d0&amp;gt;&amp;gt;=4&lt;br /&gt;
	and #42,d0			; d0&amp;amp;42&lt;br /&gt;
	&lt;br /&gt;
	move.w	d0,(a3)		; a3=color(d0)&lt;br /&gt;
	movem.w	d6/d7,(a4)	; a4=x,y`&lt;br /&gt;
	&lt;br /&gt;
	dc.w	$A001		; put pixel command&lt;br /&gt;
&lt;br /&gt;
	dbra	d6,xLoop		; decrease and branch&lt;br /&gt;
    dbra	d7,yLoop&lt;br /&gt;
&lt;br /&gt;
; Wait loop&lt;br /&gt;
	bra frameloop ; .s	*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
The Atari ST systems use the YM2149 chip to generate sound.\&lt;br /&gt;
&lt;br /&gt;
For more information check out https://www.atarimagazines.com/v4n7/stsound.html&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;
Sizecoding on the Atari ST is not very huge yet, so resources are sparse.&lt;br /&gt;
* ST Soundchip: https://www.atarimagazines.com/v4n7/stsound.html&lt;br /&gt;
* Spkr's Github: to be added&lt;br /&gt;
&lt;br /&gt;
== Commodore Amiga ==&lt;br /&gt;
The Commodore Amiga system consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
* Assembler: -&lt;br /&gt;
* Emulator(s): WinUAE&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
No information yet&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
No information yet&lt;/div&gt;</summary>
		<author><name>TIn</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=714</id>
		<title>Motorola 68000</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=714"/>
				<updated>2020-09-10T19:24:37Z</updated>
		
		<summary type="html">&lt;p&gt;TIn: /* Interleaved? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Wanting to start sizecoding on a Motorola 68k platform in this day and age can be tough. &lt;br /&gt;
&lt;br /&gt;
So here is a bit of help to get you started:&lt;br /&gt;
&lt;br /&gt;
=== The Motorola 68k processor  ===&lt;br /&gt;
The Motorola 68k processor... &lt;br /&gt;
&lt;br /&gt;
Note:  Assigment direction is source,dest instead of dest,source !!!&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
To be added.&lt;br /&gt;
&lt;br /&gt;
== Atari ST ==&lt;br /&gt;
The Atari ST systems consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
Setting up your development platform for the Atari ST systems is quite easy, first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: VASM - This assembler is able to assemble directly to a TOS image &lt;br /&gt;
* Emulator(s): -. Make sure to use the original TOS 1.62 Image for best compatibility.&lt;br /&gt;
&lt;br /&gt;
==== Compiling to a TOS image ====&lt;br /&gt;
Vasm -Ftos source.s -o source.tos&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The Atari ST uses an interleaved planar memory layout to represent it's paletted display modes (we'll concentrate on 320x200x16 colours here). &lt;br /&gt;
&lt;br /&gt;
==== Paletted? ====&lt;br /&gt;
The Atari ST uses index values into a palette of colours. Index 0 is the background colour (that's also used for the border) and a maximum of 16 colours can be defined and indexed.&lt;br /&gt;
&lt;br /&gt;
==== Planes? ====&lt;br /&gt;
Every plane contains one bit of a pixel's colour index value. The bits of the binary represantation of a colour index like %1010 (% Bit3,Bit2,Bit1,Bit0) will end up in 4 different planes (bits most significant to least significant aka left to right): Plane4 Plane3 Plane2 Plane1. &lt;br /&gt;
&lt;br /&gt;
So basicly Plane1 contains all of the Bit0s of all pixels, Plane2 all Bit1s, Plane3 all Bit2s and Plabe4 all Bit3s.&lt;br /&gt;
&lt;br /&gt;
The first pixel on a plane is described by the leftmost (aka most significant) bit in a word, the second one by the second-leftmost etc. - just like this %0123456789abcdef with 0-f=pixels 1-16. %1000000000000000=$8000=pixel 1 in a plane word set.&lt;br /&gt;
&lt;br /&gt;
==== Interleaved? ====&lt;br /&gt;
16 pixels worth of data are represented as a full graphicword, meaning all information to display 16 pixels are stored together, followed by the data to represent the next 16 pixels etc. One row worth of display data has 20 graphicwords (20*16 pixels=320 pixels).&lt;br /&gt;
&lt;br /&gt;
16 pixels are stored in 4 words - which contain 4 of the aforementioned planes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
So a 320x200x16 colour display is a contiuous memory buffer containing:&lt;br /&gt;
&lt;br /&gt;
Pixels 0-15, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pixels 16-31, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pixels 32-47, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&amp;lt;br /&amp;gt;&lt;br /&gt;
....&amp;lt;br /&amp;gt;&lt;br /&gt;
Pixels 304-319, row 199:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To be refined soon.&lt;br /&gt;
&lt;br /&gt;
==== Setting a palette ====&lt;br /&gt;
Here is some code that will help you setup a palette&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
pea	palette(pc)&lt;br /&gt;
	move.w	#6,-(sp)&lt;br /&gt;
	trap	#14&lt;br /&gt;
&lt;br /&gt;
; Palette data&lt;br /&gt;
palette:	&lt;br /&gt;
	dc.w	$000,$100,$200,$311,$422,$533,$644,$755&lt;br /&gt;
	dc.w	$575,$464,$353,$242,$131,$020,$010,$000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting something on screen ====&lt;br /&gt;
Here is a bit of code to get you started:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	;-----------------------&lt;br /&gt;
	; Line-A Initialization&lt;br /&gt;
	;-----------------------&lt;br /&gt;
; After calling this function, data register D0 and address register A0 point to a table ; with the starting address of the Line A variables. &lt;br /&gt;
; Address register A1 points to a table with the starting addresses for the three system ; font headers, &lt;br /&gt;
; and address register A2 points to a table that specifies the starting addresses of the; 15 Line A opcodes. There's no parameter required for this function, so all you have&lt;br /&gt;
; to do is call the word opcode label that you specified for the $A000 (Initialize)&lt;br /&gt;
; function.&lt;br /&gt;
	dc.w	$A000&lt;br /&gt;
	movem.l	(a0),a1-a4		; A3=INTIN, A4=PTSIN&lt;br /&gt;
&lt;br /&gt;
	;---------&lt;br /&gt;
	; For X&amp;amp;Y&lt;br /&gt;
	;---------&lt;br /&gt;
frameloop:&lt;br /&gt;
	move.w	#200-1,d7		; y&lt;br /&gt;
yLoop:	&lt;br /&gt;
	move.w	#320-1,d6		; x&lt;br /&gt;
xLoop:&lt;br /&gt;
&lt;br /&gt;
	; Putpixel&lt;br /&gt;
put_pixel:	&lt;br /&gt;
	move.b d6,d0		; d0=x&lt;br /&gt;
	eor d7,d0			; d0=x^y&lt;br /&gt;
	lsr.b #2,d0			; d0&amp;gt;&amp;gt;=4&lt;br /&gt;
	and #42,d0			; d0&amp;amp;42&lt;br /&gt;
	&lt;br /&gt;
	move.w	d0,(a3)		; a3=color(d0)&lt;br /&gt;
	movem.w	d6/d7,(a4)	; a4=x,y`&lt;br /&gt;
	&lt;br /&gt;
	dc.w	$A001		; put pixel command&lt;br /&gt;
&lt;br /&gt;
	dbra	d6,xLoop		; decrease and branch&lt;br /&gt;
    dbra	d7,yLoop&lt;br /&gt;
&lt;br /&gt;
; Wait loop&lt;br /&gt;
	bra frameloop ; .s	*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
The Atari ST systems use the YM2149 chip to generate sound.\&lt;br /&gt;
&lt;br /&gt;
For more information check out https://www.atarimagazines.com/v4n7/stsound.html&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;
Sizecoding on the Atari ST is not very huge yet, so resources are sparse.&lt;br /&gt;
* ST Soundchip: https://www.atarimagazines.com/v4n7/stsound.html&lt;br /&gt;
* Spkr's Github: to be added&lt;br /&gt;
&lt;br /&gt;
== Commodore Amiga ==&lt;br /&gt;
The Commodore Amiga system consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
* Assembler: -&lt;br /&gt;
* Emulator(s): WinUAE&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
No information yet&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
No information yet&lt;/div&gt;</summary>
		<author><name>TIn</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=713</id>
		<title>Motorola 68000</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=713"/>
				<updated>2020-09-10T19:24:13Z</updated>
		
		<summary type="html">&lt;p&gt;TIn: /* Interleaved? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Wanting to start sizecoding on a Motorola 68k platform in this day and age can be tough. &lt;br /&gt;
&lt;br /&gt;
So here is a bit of help to get you started:&lt;br /&gt;
&lt;br /&gt;
=== The Motorola 68k processor  ===&lt;br /&gt;
The Motorola 68k processor... &lt;br /&gt;
&lt;br /&gt;
Note:  Assigment direction is source,dest instead of dest,source !!!&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
To be added.&lt;br /&gt;
&lt;br /&gt;
== Atari ST ==&lt;br /&gt;
The Atari ST systems consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
Setting up your development platform for the Atari ST systems is quite easy, first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: VASM - This assembler is able to assemble directly to a TOS image &lt;br /&gt;
* Emulator(s): -. Make sure to use the original TOS 1.62 Image for best compatibility.&lt;br /&gt;
&lt;br /&gt;
==== Compiling to a TOS image ====&lt;br /&gt;
Vasm -Ftos source.s -o source.tos&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The Atari ST uses an interleaved planar memory layout to represent it's paletted display modes (we'll concentrate on 320x200x16 colours here). &lt;br /&gt;
&lt;br /&gt;
==== Paletted? ====&lt;br /&gt;
The Atari ST uses index values into a palette of colours. Index 0 is the background colour (that's also used for the border) and a maximum of 16 colours can be defined and indexed.&lt;br /&gt;
&lt;br /&gt;
==== Planes? ====&lt;br /&gt;
Every plane contains one bit of a pixel's colour index value. The bits of the binary represantation of a colour index like %1010 (% Bit3,Bit2,Bit1,Bit0) will end up in 4 different planes (bits most significant to least significant aka left to right): Plane4 Plane3 Plane2 Plane1. &lt;br /&gt;
&lt;br /&gt;
So basicly Plane1 contains all of the Bit0s of all pixels, Plane2 all Bit1s, Plane3 all Bit2s and Plabe4 all Bit3s.&lt;br /&gt;
&lt;br /&gt;
The first pixel on a plane is described by the leftmost (aka most significant) bit in a word, the second one by the second-leftmost etc. - just like this %0123456789abcdef with 0-f=pixels 1-16. %1000000000000000=$8000=pixel 1 in a plane word set.&lt;br /&gt;
&lt;br /&gt;
==== Interleaved? ====&lt;br /&gt;
16 pixels worth of data are represented as a full graphicword, meaning all information to display 16 pixels are stored together, followed by the data to represent the next 16 pixels etc. One row worth of display data has 20 graphicwords (20*16 pixels=320 pixels).&lt;br /&gt;
&lt;br /&gt;
16 pixels are stored in 4 words - which contain 4 of the aforementioned planes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
So a display is a contiuous memory buffer containing:&lt;br /&gt;
&lt;br /&gt;
Pixels 0-15, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pixels 16-31, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pixels 32-47, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&amp;lt;br /&amp;gt;&lt;br /&gt;
....&amp;lt;br /&amp;gt;&lt;br /&gt;
Pixels 304-319, row 199:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To be refined soon.&lt;br /&gt;
&lt;br /&gt;
==== Setting a palette ====&lt;br /&gt;
Here is some code that will help you setup a palette&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
pea	palette(pc)&lt;br /&gt;
	move.w	#6,-(sp)&lt;br /&gt;
	trap	#14&lt;br /&gt;
&lt;br /&gt;
; Palette data&lt;br /&gt;
palette:	&lt;br /&gt;
	dc.w	$000,$100,$200,$311,$422,$533,$644,$755&lt;br /&gt;
	dc.w	$575,$464,$353,$242,$131,$020,$010,$000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting something on screen ====&lt;br /&gt;
Here is a bit of code to get you started:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	;-----------------------&lt;br /&gt;
	; Line-A Initialization&lt;br /&gt;
	;-----------------------&lt;br /&gt;
; After calling this function, data register D0 and address register A0 point to a table ; with the starting address of the Line A variables. &lt;br /&gt;
; Address register A1 points to a table with the starting addresses for the three system ; font headers, &lt;br /&gt;
; and address register A2 points to a table that specifies the starting addresses of the; 15 Line A opcodes. There's no parameter required for this function, so all you have&lt;br /&gt;
; to do is call the word opcode label that you specified for the $A000 (Initialize)&lt;br /&gt;
; function.&lt;br /&gt;
	dc.w	$A000&lt;br /&gt;
	movem.l	(a0),a1-a4		; A3=INTIN, A4=PTSIN&lt;br /&gt;
&lt;br /&gt;
	;---------&lt;br /&gt;
	; For X&amp;amp;Y&lt;br /&gt;
	;---------&lt;br /&gt;
frameloop:&lt;br /&gt;
	move.w	#200-1,d7		; y&lt;br /&gt;
yLoop:	&lt;br /&gt;
	move.w	#320-1,d6		; x&lt;br /&gt;
xLoop:&lt;br /&gt;
&lt;br /&gt;
	; Putpixel&lt;br /&gt;
put_pixel:	&lt;br /&gt;
	move.b d6,d0		; d0=x&lt;br /&gt;
	eor d7,d0			; d0=x^y&lt;br /&gt;
	lsr.b #2,d0			; d0&amp;gt;&amp;gt;=4&lt;br /&gt;
	and #42,d0			; d0&amp;amp;42&lt;br /&gt;
	&lt;br /&gt;
	move.w	d0,(a3)		; a3=color(d0)&lt;br /&gt;
	movem.w	d6/d7,(a4)	; a4=x,y`&lt;br /&gt;
	&lt;br /&gt;
	dc.w	$A001		; put pixel command&lt;br /&gt;
&lt;br /&gt;
	dbra	d6,xLoop		; decrease and branch&lt;br /&gt;
    dbra	d7,yLoop&lt;br /&gt;
&lt;br /&gt;
; Wait loop&lt;br /&gt;
	bra frameloop ; .s	*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
The Atari ST systems use the YM2149 chip to generate sound.\&lt;br /&gt;
&lt;br /&gt;
For more information check out https://www.atarimagazines.com/v4n7/stsound.html&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;
Sizecoding on the Atari ST is not very huge yet, so resources are sparse.&lt;br /&gt;
* ST Soundchip: https://www.atarimagazines.com/v4n7/stsound.html&lt;br /&gt;
* Spkr's Github: to be added&lt;br /&gt;
&lt;br /&gt;
== Commodore Amiga ==&lt;br /&gt;
The Commodore Amiga system consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
* Assembler: -&lt;br /&gt;
* Emulator(s): WinUAE&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
No information yet&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
No information yet&lt;/div&gt;</summary>
		<author><name>TIn</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=712</id>
		<title>Motorola 68000</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=712"/>
				<updated>2020-09-10T19:20:54Z</updated>
		
		<summary type="html">&lt;p&gt;TIn: Some more information about ST 320x200x16 colours display mode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Wanting to start sizecoding on a Motorola 68k platform in this day and age can be tough. &lt;br /&gt;
&lt;br /&gt;
So here is a bit of help to get you started:&lt;br /&gt;
&lt;br /&gt;
=== The Motorola 68k processor  ===&lt;br /&gt;
The Motorola 68k processor... &lt;br /&gt;
&lt;br /&gt;
Note:  Assigment direction is source,dest instead of dest,source !!!&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
To be added.&lt;br /&gt;
&lt;br /&gt;
== Atari ST ==&lt;br /&gt;
The Atari ST systems consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
Setting up your development platform for the Atari ST systems is quite easy, first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: VASM - This assembler is able to assemble directly to a TOS image &lt;br /&gt;
* Emulator(s): -. Make sure to use the original TOS 1.62 Image for best compatibility.&lt;br /&gt;
&lt;br /&gt;
==== Compiling to a TOS image ====&lt;br /&gt;
Vasm -Ftos source.s -o source.tos&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The Atari ST uses an interleaved planar memory layout to represent it's paletted display modes (we'll concentrate on 320x200x16 colours here). &lt;br /&gt;
&lt;br /&gt;
==== Paletted? ====&lt;br /&gt;
The Atari ST uses index values into a palette of colours. Index 0 is the background colour (that's also used for the border) and a maximum of 16 colours can be defined and indexed.&lt;br /&gt;
&lt;br /&gt;
==== Planes? ====&lt;br /&gt;
Every plane contains one bit of a pixel's colour index value. The bits of the binary represantation of a colour index like %1010 (% Bit3,Bit2,Bit1,Bit0) will end up in 4 different planes (bits most significant to least significant aka left to right): Plane4 Plane3 Plane2 Plane1. &lt;br /&gt;
&lt;br /&gt;
So basicly Plane1 contains all of the Bit0s of all pixels, Plane2 all Bit1s, Plane3 all Bit2s and Plabe4 all Bit3s.&lt;br /&gt;
&lt;br /&gt;
The first pixel on a plane is described by the leftmost (aka most significant) bit in a word, the second one by the second-leftmost etc. - just like this %0123456789abcdef with 0-f=pixels 1-16. %1000000000000000=$8000=pixel 1 in a plane word set.&lt;br /&gt;
&lt;br /&gt;
==== Interleaved? ====&lt;br /&gt;
16 pixels worth of data are represented as a full graphicword, meaning all information to display 16 pixels are stored together, followed by the data to represent the next 16 pixels etc. One row worth of display data has 20 graphicwords (20*16 pixels=320 pixels).&lt;br /&gt;
&lt;br /&gt;
16 pixels are stored in 4 words - which contain 4 of the aforementioned planes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
So a display is a contiuous memory buffer containing of:&lt;br /&gt;
&lt;br /&gt;
Pixels 0-15, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pixels 16-31, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pixels 32-47, row 0:(Plane1.w Plane2.w Plane3.w Plane4.w)&amp;lt;br /&amp;gt;&lt;br /&gt;
....&amp;lt;br /&amp;gt;&lt;br /&gt;
Pixels 304-319, row 199:(Plane1.w Plane2.w Plane3.w Plane4.w)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To be refined soon.&lt;br /&gt;
&lt;br /&gt;
==== Setting a palette ====&lt;br /&gt;
Here is some code that will help you setup a palette&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
pea	palette(pc)&lt;br /&gt;
	move.w	#6,-(sp)&lt;br /&gt;
	trap	#14&lt;br /&gt;
&lt;br /&gt;
; Palette data&lt;br /&gt;
palette:	&lt;br /&gt;
	dc.w	$000,$100,$200,$311,$422,$533,$644,$755&lt;br /&gt;
	dc.w	$575,$464,$353,$242,$131,$020,$010,$000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting something on screen ====&lt;br /&gt;
Here is a bit of code to get you started:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	;-----------------------&lt;br /&gt;
	; Line-A Initialization&lt;br /&gt;
	;-----------------------&lt;br /&gt;
; After calling this function, data register D0 and address register A0 point to a table ; with the starting address of the Line A variables. &lt;br /&gt;
; Address register A1 points to a table with the starting addresses for the three system ; font headers, &lt;br /&gt;
; and address register A2 points to a table that specifies the starting addresses of the; 15 Line A opcodes. There's no parameter required for this function, so all you have&lt;br /&gt;
; to do is call the word opcode label that you specified for the $A000 (Initialize)&lt;br /&gt;
; function.&lt;br /&gt;
	dc.w	$A000&lt;br /&gt;
	movem.l	(a0),a1-a4		; A3=INTIN, A4=PTSIN&lt;br /&gt;
&lt;br /&gt;
	;---------&lt;br /&gt;
	; For X&amp;amp;Y&lt;br /&gt;
	;---------&lt;br /&gt;
frameloop:&lt;br /&gt;
	move.w	#200-1,d7		; y&lt;br /&gt;
yLoop:	&lt;br /&gt;
	move.w	#320-1,d6		; x&lt;br /&gt;
xLoop:&lt;br /&gt;
&lt;br /&gt;
	; Putpixel&lt;br /&gt;
put_pixel:	&lt;br /&gt;
	move.b d6,d0		; d0=x&lt;br /&gt;
	eor d7,d0			; d0=x^y&lt;br /&gt;
	lsr.b #2,d0			; d0&amp;gt;&amp;gt;=4&lt;br /&gt;
	and #42,d0			; d0&amp;amp;42&lt;br /&gt;
	&lt;br /&gt;
	move.w	d0,(a3)		; a3=color(d0)&lt;br /&gt;
	movem.w	d6/d7,(a4)	; a4=x,y`&lt;br /&gt;
	&lt;br /&gt;
	dc.w	$A001		; put pixel command&lt;br /&gt;
&lt;br /&gt;
	dbra	d6,xLoop		; decrease and branch&lt;br /&gt;
    dbra	d7,yLoop&lt;br /&gt;
&lt;br /&gt;
; Wait loop&lt;br /&gt;
	bra frameloop ; .s	*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
The Atari ST systems use the YM2149 chip to generate sound.\&lt;br /&gt;
&lt;br /&gt;
For more information check out https://www.atarimagazines.com/v4n7/stsound.html&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;
Sizecoding on the Atari ST is not very huge yet, so resources are sparse.&lt;br /&gt;
* ST Soundchip: https://www.atarimagazines.com/v4n7/stsound.html&lt;br /&gt;
* Spkr's Github: to be added&lt;br /&gt;
&lt;br /&gt;
== Commodore Amiga ==&lt;br /&gt;
The Commodore Amiga system consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
* Assembler: -&lt;br /&gt;
* Emulator(s): WinUAE&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
No information yet&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
No information yet&lt;/div&gt;</summary>
		<author><name>TIn</name></author>	</entry>

	<entry>
		<id>http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=711</id>
		<title>Motorola 68000</title>
		<link rel="alternate" type="text/html" href="http://www.sizecoding.org/index.php?title=Motorola_68000&amp;diff=711"/>
				<updated>2020-09-10T18:39:46Z</updated>
		
		<summary type="html">&lt;p&gt;TIn: Fixed soundchip name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Wanting to start sizecoding on a Motorola 68k platform in this day and age can be tough. &lt;br /&gt;
&lt;br /&gt;
So here is a bit of help to get you started:&lt;br /&gt;
&lt;br /&gt;
=== The Motorola 68k processor  ===&lt;br /&gt;
The Motorola 68k processor... &lt;br /&gt;
&lt;br /&gt;
Note:  Assigment direction is source,dest instead of dest,source !!!&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
To be added.&lt;br /&gt;
&lt;br /&gt;
== Atari ST ==&lt;br /&gt;
The Atari ST systems consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
Setting up your development platform for the Atari ST systems is quite easy, first get the following tools:&lt;br /&gt;
&lt;br /&gt;
* Assembler: VASM - This assembler is able to assemble directly to a TOS image &lt;br /&gt;
* Emulator(s): -. Make sure to use the original TOS 1.62 Image for best compatibility.&lt;br /&gt;
&lt;br /&gt;
==== Compiling to a TOS image ====&lt;br /&gt;
Vasm -Ftos source.s -o source.tos&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
The Atari ST has a linear 320x200x4bit address space, which each nibble representing a color index 0..F from the palette.&lt;br /&gt;
&lt;br /&gt;
To be added soon.&lt;br /&gt;
&lt;br /&gt;
==== Setting a palette ====&lt;br /&gt;
Here is some code that will help you setup a palette&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
pea	palette(pc)&lt;br /&gt;
	move.w	#6,-(sp)&lt;br /&gt;
	trap	#14&lt;br /&gt;
&lt;br /&gt;
; Palette data&lt;br /&gt;
palette:	&lt;br /&gt;
	dc.w	$000,$100,$200,$311,$422,$533,$644,$755&lt;br /&gt;
	dc.w	$575,$464,$353,$242,$131,$020,$010,$000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting something on screen ====&lt;br /&gt;
Here is a bit of code to get you started:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	;-----------------------&lt;br /&gt;
	; Line-A Initialization&lt;br /&gt;
	;-----------------------&lt;br /&gt;
; After calling this function, data register D0 and address register A0 point to a table ; with the starting address of the Line A variables. &lt;br /&gt;
; Address register A1 points to a table with the starting addresses for the three system ; font headers, &lt;br /&gt;
; and address register A2 points to a table that specifies the starting addresses of the; 15 Line A opcodes. There's no parameter required for this function, so all you have&lt;br /&gt;
; to do is call the word opcode label that you specified for the $A000 (Initialize)&lt;br /&gt;
; function.&lt;br /&gt;
	dc.w	$A000&lt;br /&gt;
	movem.l	(a0),a1-a4		; A3=INTIN, A4=PTSIN&lt;br /&gt;
&lt;br /&gt;
	;---------&lt;br /&gt;
	; For X&amp;amp;Y&lt;br /&gt;
	;---------&lt;br /&gt;
frameloop:&lt;br /&gt;
	move.w	#200-1,d7		; y&lt;br /&gt;
yLoop:	&lt;br /&gt;
	move.w	#320-1,d6		; x&lt;br /&gt;
xLoop:&lt;br /&gt;
&lt;br /&gt;
	; Putpixel&lt;br /&gt;
put_pixel:	&lt;br /&gt;
	move.b d6,d0		; d0=x&lt;br /&gt;
	eor d7,d0			; d0=x^y&lt;br /&gt;
	lsr.b #2,d0			; d0&amp;gt;&amp;gt;=4&lt;br /&gt;
	and #42,d0			; d0&amp;amp;42&lt;br /&gt;
	&lt;br /&gt;
	move.w	d0,(a3)		; a3=color(d0)&lt;br /&gt;
	movem.w	d6/d7,(a4)	; a4=x,y`&lt;br /&gt;
	&lt;br /&gt;
	dc.w	$A001		; put pixel command&lt;br /&gt;
&lt;br /&gt;
	dbra	d6,xLoop		; decrease and branch&lt;br /&gt;
    dbra	d7,yLoop&lt;br /&gt;
&lt;br /&gt;
; Wait loop&lt;br /&gt;
	bra frameloop ; .s	*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
The Atari ST systems use the YM2149 chip to generate sound.\&lt;br /&gt;
&lt;br /&gt;
For more information check out https://www.atarimagazines.com/v4n7/stsound.html&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;
Sizecoding on the Atari ST is not very huge yet, so resources are sparse.&lt;br /&gt;
* ST Soundchip: https://www.atarimagazines.com/v4n7/stsound.html&lt;br /&gt;
* Spkr's Github: to be added&lt;br /&gt;
&lt;br /&gt;
== Commodore Amiga ==&lt;br /&gt;
The Commodore Amiga system consists of the M68k system with custom hardware for graphics and sound.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
* Assembler: -&lt;br /&gt;
* Emulator(s): WinUAE&lt;br /&gt;
&lt;br /&gt;
=== Video display ===&lt;br /&gt;
No information yet&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
No information yet&lt;/div&gt;</summary>
		<author><name>TIn</name></author>	</entry>

	</feed>