<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.temlib.org/AtariForumWiki/index.php?action=history&amp;feed=atom&amp;title=Earxtutchap10</id>
	<title>Earxtutchap10 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.temlib.org/AtariForumWiki/index.php?action=history&amp;feed=atom&amp;title=Earxtutchap10"/>
	<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap10&amp;action=history"/>
	<updated>2026-05-13T19:13:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap10&amp;diff=13006&amp;oldid=prev</id>
		<title>&gt;Wongck at 15:31, 12 October 2011</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap10&amp;diff=13006&amp;oldid=prev"/>
		<updated>2011-10-12T15:31:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:31, 12 October 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l226&quot;&gt;Line 226:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 226:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[ASM_Tutorial]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[ASM_Tutorial]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Programming&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Making optimized assembly code by Earx&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>&gt;Wongck</name></author>
	</entry>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap10&amp;diff=13005&amp;oldid=prev</id>
		<title>&gt;Silver Surfer: Added category</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap10&amp;diff=13005&amp;oldid=prev"/>
		<updated>2009-05-02T17:09:41Z</updated>

		<summary type="html">&lt;p&gt;Added category&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:09, 2 May 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l226&quot;&gt;Line 226:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 226:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[ASM_Tutorial]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[ASM_Tutorial]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Programming]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>&gt;Silver Surfer</name></author>
	</entry>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap10&amp;diff=13004&amp;oldid=prev</id>
		<title>&gt;Zorro 2 at 08:14, 9 October 2006</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap10&amp;diff=13004&amp;oldid=prev"/>
		<updated>2006-10-09T08:14:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:14, 9 October 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l224&quot;&gt;Line 224:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 224:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                        programflow (NOT from within an interrupt!)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                        programflow (NOT from within an interrupt!)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Back to [[ASM_Tutorial]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>&gt;Zorro 2</name></author>
	</entry>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap10&amp;diff=13003&amp;oldid=prev</id>
		<title>&gt;Simonsunnyboy at 17:50, 6 October 2006</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap10&amp;diff=13003&amp;oldid=prev"/>
		<updated>2006-10-06T17:50:33Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
                          CHAPTER 10 : ATARI HARDWARE&lt;br /&gt;
&lt;br /&gt;
As you might have read in the precious chapters the Atari hardware (video,&lt;br /&gt;
audio, I/O, etc.) can be used in two ways:&lt;br /&gt;
1) By using the OS-calls supplied by BIOS, GEMDOS and XBIOS.&lt;br /&gt;
2) By using the hardwareregister in highmemory directly.&lt;br /&gt;
&lt;br /&gt;
Using the hardware directly is always faster, because the OS-routines are&lt;br /&gt;
incredibly slow and often not flexible enough. For games and demos it's&lt;br /&gt;
always a better solution to use the hardware directly.&lt;br /&gt;
&lt;br /&gt;
Only for a few purposes the OS need still be used:&lt;br /&gt;
* I/O (loading and saving)&lt;br /&gt;
* memoryallocation (reserving ST-RAM and reserving temporary buffers)&lt;br /&gt;
&lt;br /&gt;
For serious applications using the hardware directly is definitely more of a&lt;br /&gt;
risk, since these need to be far more stabile. The hardwareregisters have&lt;br /&gt;
been modified in almost every Atari throughout the years and this causes&lt;br /&gt;
major incompatibility.&lt;br /&gt;
&lt;br /&gt;
This is the main reason for old ST games not working on TT or Falcon (or any&lt;br /&gt;
clone, cos these have completely different hardware). Nicely written ST-&lt;br /&gt;
applications only using textdisplay or GEM, will work on every ATARI and&lt;br /&gt;
even clones.&lt;br /&gt;
&lt;br /&gt;
But this chapter is only dedicated to how to use the hardwareregisters. So&lt;br /&gt;
let's get down to bussiness. I will explain the ST and Falcon specific&lt;br /&gt;
hardwareregisters here. The TT was never used for games or demos and coders&lt;br /&gt;
always used OS-calls (well, Jeff Minter did a TT version of Mutant Camels&lt;br /&gt;
and there was a great StarWars demo).&lt;br /&gt;
&lt;br /&gt;
ST registers:&lt;br /&gt;
&lt;br /&gt;
Most ST registers are still aboard every Atari (megaST, (mega)STe, TT,&lt;br /&gt;
Falcon) and there aren't that many. They are used for basic stuff such as&lt;br /&gt;
reading or installing a new screenaddress, modifying the pallette of the&lt;br /&gt;
screen, switching the three resolutions, etc. Furthermore there's stuff like&lt;br /&gt;
getting blip &amp;amp; blop sounds out of the YM2149 and reading mouse/joystick/&lt;br /&gt;
keyboard.&lt;br /&gt;
&lt;br /&gt;
* Screenbaseaddress:&lt;br /&gt;
&lt;br /&gt;
Games use two or three screenbuffers and you have to use new locations for&lt;br /&gt;
those. So you need to save and restore the systems screenaddress and kick in&lt;br /&gt;
your own. This is done by addressing the screenbase registers:&lt;br /&gt;
&lt;br /&gt;
screenbase high: $ffff8201&lt;br /&gt;
                 This specifies the high byte of the screenbase-address.&lt;br /&gt;
&lt;br /&gt;
screenbase mid:  $ffff8203&lt;br /&gt;
                 This specifies the middle byte of the screenbase-address.&lt;br /&gt;
&lt;br /&gt;
screenbase low:  $ffff820d&lt;br /&gt;
                 This specifies the low byte of the screenbase-address.&lt;br /&gt;
                 This is only avaibable on (mega)STe, TT and Falcon!&lt;br /&gt;
&lt;br /&gt;
You can read and write to all these registers but is required to write in&lt;br /&gt;
the following order: high, mid, low. Otherwise the address won't be put in&lt;br /&gt;
correctly!&lt;br /&gt;
&lt;br /&gt;
The address is 24bits and so you can see the screen can only be located in&lt;br /&gt;
the ST-RAM: the first 16MB of RAM. On a basic ST you must always set the&lt;br /&gt;
address on a 256byte boundary because is has no lowbyte register.&lt;br /&gt;
&lt;br /&gt;
The low register is only handy is when want to do hardware scrolling. On the&lt;br /&gt;
STe you can set addresses on 2byte boundaries. The Falcon has to settle for&lt;br /&gt;
4byte boundaries and the TT for 8byte ones. It's recommended to stay off the&lt;br /&gt;
lowbyte unless you want to do hardwarescroll, because setting the screen&lt;br /&gt;
will then work on all Atari's.&lt;br /&gt;
&lt;br /&gt;
* ST Palette:&lt;br /&gt;
&lt;br /&gt;
The ST palette is used in ST-low and ST-medium resolutions. They are 16&lt;br /&gt;
words containing red,green and blue intensities.&lt;br /&gt;
&lt;br /&gt;
$ffff8240: ____rRRRgGGGbBBB&lt;br /&gt;
.........&lt;br /&gt;
$ffff825e:&lt;br /&gt;
&lt;br /&gt;
Chapter 2 explains how these work exaclty. The basic ST support only 9 bits&lt;br /&gt;
colorcodes (512), whilst the (mega)STe, TT and Falcon support 12 bits&lt;br /&gt;
(4096).&lt;br /&gt;
&lt;br /&gt;
The good thing about the ST-palette is that you can change it very fast. You&lt;br /&gt;
can give every scanline a different palette, by using some clever tricks.&lt;br /&gt;
&lt;br /&gt;
* YM2149 soundchip:&lt;br /&gt;
&lt;br /&gt;
The previous registers are all easily programmable (i.e. one register always&lt;br /&gt;
has one function). The sounchip is not so easy to access. It relies on&lt;br /&gt;
selecting registers with one selector-register.&lt;br /&gt;
&lt;br /&gt;
$ffff8800: writing = registerselect (0-15)&lt;br /&gt;
           reading = read data from selected register&lt;br /&gt;
$ffff8802: write data to selected register&lt;br /&gt;
&lt;br /&gt;
So writing a number to $ffff8800 will cause a select on one of the internal&lt;br /&gt;
registers:&lt;br /&gt;
0 =  PSG_APITCHLOW&lt;br /&gt;
1 =  PSG_BPITCHHIGH&lt;br /&gt;
2 =  PSG_BPITCHLOW&lt;br /&gt;
3 =  PSG_BPITCHHIGH&lt;br /&gt;
4 =  PSG_CPITCHLOW&lt;br /&gt;
5 =  PSG_CPITCHHIGH&lt;br /&gt;
6 =  PSG_NOISEPITCH&lt;br /&gt;
7 =  PSG_MODULATION&lt;br /&gt;
8 =  PSG_AVOLUME&lt;br /&gt;
9 =  PSG_BVOLUME&lt;br /&gt;
10 = PSG_CVOLUME&lt;br /&gt;
11 = PSG_FREQLOW&lt;br /&gt;
12 = PSG_FREQHIGH&lt;br /&gt;
13 = PSG_ENVELOPE&lt;br /&gt;
14 = PORT A&lt;br /&gt;
15 = PORT B&lt;br /&gt;
&lt;br /&gt;
The first 14 registers can be used for normal soundprogramming. Things like&lt;br /&gt;
changing frequency, volume, waveformtype, noisegeneration are included. The&lt;br /&gt;
Yammy is not hard to program once you've got a good interruptroutine able&lt;br /&gt;
to access all these bits, but the Yammy doesn't sound very impressive. Only&lt;br /&gt;
the elite of musicians can get great stuff out of it.&lt;br /&gt;
&lt;br /&gt;
For non-musicians the last two registers are important! PORT A is used for&lt;br /&gt;
all kinds of purposes. With it you can select between diskdrives and check&lt;br /&gt;
the printer status. On falcon you can turn off the internal speaker, IDE-&lt;br /&gt;
drive and reset the DSP.&lt;br /&gt;
&lt;br /&gt;
PORT B is used to read/write from/to the parallel port (aka centronics or&lt;br /&gt;
printerport).&lt;br /&gt;
&lt;br /&gt;
* Multi Function Peripheral:&lt;br /&gt;
&lt;br /&gt;
I see this as the nastiest piece of work in the basic ST. The MFP has got&lt;br /&gt;
tons of registers that can be used to program interrupts and communicate&lt;br /&gt;
with hardware such as the keyboard/mouse/joystick and monitor detect,&lt;br /&gt;
RS232 control, midi, etc.&lt;br /&gt;
&lt;br /&gt;
Only keyboard/mouse/joystick and timer B/C I'll talk about here. The only&lt;br /&gt;
100% correct way to get keyboard/mouse info either to use GEM (AES) calls&lt;br /&gt;
or write your own IKBD interruptroutine. Using GEM is slow, requires&lt;br /&gt;
memory and doesn't support the joystick. Coding your own routine is a very&lt;br /&gt;
tricky afair.&lt;br /&gt;
&lt;br /&gt;
The MFP has many registers which workings can be quite extreme in some&lt;br /&gt;
cases. I'm not going further into it and I refer to the ProfiBuch which&lt;br /&gt;
contains all information you'd ever want to know about coding the MFP.&lt;br /&gt;
&lt;br /&gt;
* Intelligent KeyBoarD proccessor (ACIA):&lt;br /&gt;
&lt;br /&gt;
This is the chip that sends interrupt signals to the MFP when a key is&lt;br /&gt;
pressed or the mouse and joystick are moved. You can also &amp;quot;poll&amp;quot; from it.&lt;br /&gt;
Which means you can directly ask it's status by accessing a hardware&lt;br /&gt;
register. This is only useful for reading the keyboard.&lt;br /&gt;
&lt;br /&gt;
Polling for the mouse or joystick is virtually impossible. You need to&lt;br /&gt;
install your own interrupt-routine at address $118 for that.&lt;br /&gt;
&lt;br /&gt;
$fffffc00: IKBD command-register&lt;br /&gt;
&lt;br /&gt;
This allows you to change the modi of the keyboard/mouse/joystick. You can&lt;br /&gt;
for instance set the mouse-information to relative offsets or absolute&lt;br /&gt;
offsets.&lt;br /&gt;
&lt;br /&gt;
$fffffc02: IKBD data-register&lt;br /&gt;
&lt;br /&gt;
From here you can read a byte that represents a keycode. If you use an&lt;br /&gt;
interrupt you can also use it to figure out if the mouse/joystick status&lt;br /&gt;
is changed.&lt;br /&gt;
&lt;br /&gt;
Eventhough these are only two registers, the IKBD isn't that easy to code.&lt;br /&gt;
To initialize it you must switch off interrupts, put a few bytes on the&lt;br /&gt;
command-register, install your own $118 routine that does the reading from&lt;br /&gt;
the data-register whenever something happens. These can be packets of 5&lt;br /&gt;
bytes in a row. And there are a lot of different possible packets.&lt;br /&gt;
&lt;br /&gt;
Enhanced joystick ports (STe/Falcon):&lt;br /&gt;
&lt;br /&gt;
These are much easier to use than the IKBD. But this is becuase the enhanced&lt;br /&gt;
joystickports are quite new stuff. In 1990 they were first used. Probably it&lt;br /&gt;
was quite expensive to fit many directly mapped registers into the first ST.&lt;br /&gt;
The STe has these ports and they are far superior to the old joystick ports.&lt;br /&gt;
(and easy to reach as well :))&lt;br /&gt;
&lt;br /&gt;
It's strange noone wanted to use these in the beginning.. Maybe because&lt;br /&gt;
Atari never made joysticks for them in the beginning? Who knows ;-) Paddles&lt;br /&gt;
and lightpens can also be connected to them, but the problem was that this&lt;br /&gt;
can of apparatus is rare. Only in 1994 ATARI started making the Jaguar&lt;br /&gt;
Joypads (quite sturdy and excellent control).&lt;br /&gt;
&lt;br /&gt;
$ffff9200: Joyad buttons&lt;br /&gt;
$ffff9202: Joypad movement&lt;br /&gt;
$ffff9210: Paddle0 position&lt;br /&gt;
$ffff9212: Paddle1 position&lt;br /&gt;
$ffff9214: Paddle2 position&lt;br /&gt;
$ffff9216: Paddle3 position&lt;br /&gt;
$ffff9220: Lightpen X&lt;br /&gt;
$ffff9222: Lightpen Y&lt;br /&gt;
&lt;br /&gt;
All these registers can simply be polled. As far as I know there isn't an&lt;br /&gt;
OS-call to get the values of these registers for you, but who cares. All&lt;br /&gt;
registers are full-words and aren't overlapped in any way (luckily).&lt;br /&gt;
&lt;br /&gt;
For nowadays game-coding it's best to poll the registers every VBL. Only&lt;br /&gt;
every animation frame could not be exact enough. Also you can ignore the&lt;br /&gt;
paddle and lightpen position registers. The jagpad doesn't use any of these.&lt;br /&gt;
&lt;br /&gt;
Hardware scrolling registers ((mega) STe/TT/Falcon):&lt;br /&gt;
&lt;br /&gt;
Since the STe (1990) every ATARI is equipped with hardware scrolling.&lt;br /&gt;
Hardware scrolling is pixelwise scrolling by using the lowbyte screenbase&lt;br /&gt;
register and some more interesting registers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enhanced joy ports:    Ports on the side of the STe and Falcon which jaguar&lt;br /&gt;
                       pads can be connected to.&lt;br /&gt;
Hardware scrolling:    Pixelwise scrolling with almost 0% CPU-time. Can be&lt;br /&gt;
                       done by writing to a few registers every VBL.&lt;br /&gt;
Joypad:                Jaguar joypad. Has 3 firebuttons, a direction-pad,&lt;br /&gt;
                       select and option buttons as well as 12 general&lt;br /&gt;
                       purpose buttons.&lt;br /&gt;
Polling:               Reading from a hardwareregister in normal&lt;br /&gt;
                       programflow (NOT from within an interrupt!)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>&gt;Simonsunnyboy</name></author>
	</entry>
</feed>