<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.neogeodev.org//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hpman</id>
	<title>NeoGeo Development Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.neogeodev.org//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hpman"/>
	<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php/Special:Contributions/Hpman"/>
	<updated>2026-05-16T04:42:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Backup_RAM&amp;diff=8490</id>
		<title>Backup RAM</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Backup_RAM&amp;diff=8490"/>
		<updated>2025-05-24T15:42:09Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The backup RAM is a [[battery-backed_RAM|battery-powered]] 64KiB RAM space used by the [[MVS]] to store game scores, cab infos and income logs. Access can be handled by [[BIOS calls]].&lt;br /&gt;
&lt;br /&gt;
[[68k memory map|Memory region]]: $D00000~$D0FFFF (Mirrored up to $DFFFFF ?).&lt;br /&gt;
&lt;br /&gt;
== Data structure ==&lt;br /&gt;
&lt;br /&gt;
All offset are taken from the sp-s2.bin system ROM.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Start&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;End&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Data&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$D00000&lt;br /&gt;
|$D0000F&lt;br /&gt;
|16&lt;br /&gt;
|$00&lt;br /&gt;
|Unused, fill with $00&lt;br /&gt;
|-&lt;br /&gt;
|$D00010&lt;br /&gt;
|$D0001F&lt;br /&gt;
|16&lt;br /&gt;
|&amp;quot;BACKUP RAM OK!Ç&amp;quot;&lt;br /&gt;
|The routine at $C125C8 will check if this string is present, if not it will test the ram (using the test_ram routine at $C13134) and re-init the backupram&lt;br /&gt;
|-&lt;br /&gt;
|$D00020&lt;br /&gt;
|$D00021&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|Coin deposit related (rising edge finding), old and new value of REG_STATUS_A&lt;br /&gt;
|-&lt;br /&gt;
|$D00022&lt;br /&gt;
|$D00023&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|Temp value for the coin deposit rising edge finding&lt;br /&gt;
|-&lt;br /&gt;
|$D00024&lt;br /&gt;
|$D00025&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|Internal coin counter (not credit)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D00026&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D0002F&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00034&lt;br /&gt;
|$D00035&lt;br /&gt;
|2&lt;br /&gt;
|$00&lt;br /&gt;
|&amp;quot;Internal&amp;quot; credit counters for player 1 and player 2 (BCD)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D00036&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D00039&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D0003A&lt;br /&gt;
|$D00045&lt;br /&gt;
|12&lt;br /&gt;
|&lt;br /&gt;
|Cab settings.&lt;br /&gt;
;$D0003A: Coins needed for crediting player 1 (initialized to $01)&lt;br /&gt;
;$D0003B: Credits added to player 1 (initialized to $01)&lt;br /&gt;
;$D0003C: Coins needed for crediting player 2 (initialized to $01)&lt;br /&gt;
;$D0003D: Credits added to player 2 (initialized to $02)&lt;br /&gt;
;$D00042: Game select (1=Free, 0=Only when credited) (initialized to 0)&lt;br /&gt;
;$D00043: Game start compulsion (0 = enabled, 1 = disabled)&lt;br /&gt;
;$D00044: Game start compulsion time (max time in seconds in BCD between inserting a coin and starting the game) (initialized to $30)&lt;br /&gt;
;$D00046: Demo sound (1=Without) (initialized to 0)&lt;br /&gt;
|-&lt;br /&gt;
|$D00046&lt;br /&gt;
|$D00046&lt;br /&gt;
|1&lt;br /&gt;
|SOUND_STOP&lt;br /&gt;
|No sound at all if non-zero (except coinage sound effect)&lt;br /&gt;
|-&lt;br /&gt;
|$D00047&lt;br /&gt;
|$D00047&lt;br /&gt;
|1&lt;br /&gt;
|SLOT NUMBER&lt;br /&gt;
|Number of detected slots (2 for slot1)&lt;br /&gt;
|-&lt;br /&gt;
|$D00048&lt;br /&gt;
|$D0004B&lt;br /&gt;
|4&lt;br /&gt;
|PLAY TIME&lt;br /&gt;
|Counter of second played on the game in hex.&lt;br /&gt;
&lt;br /&gt;
Reset to 0 by [[SYSTEM_RETURN]].&lt;br /&gt;
|-&lt;br /&gt;
|$D0004C&lt;br /&gt;
|$D0004C&lt;br /&gt;
|1&lt;br /&gt;
|PLAY_TIME_FRAME_TIMER&lt;br /&gt;
|Frame timer, start at $3C, decremented each frame. When the counter reach $00, PLAY_TIME is incremented and the counter is reseted to $3C&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D0004D&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D00057&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00058&lt;br /&gt;
|$D00058&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|First slot number with a boot logo flag to 0 (playable by the system ROM)&lt;br /&gt;
|-&lt;br /&gt;
|$D0005A&lt;br /&gt;
|$D0005D&lt;br /&gt;
|4&lt;br /&gt;
|HHMMSSFF&lt;br /&gt;
|Timer based on frames.&lt;br /&gt;
*FF: frame down-counter ($3C to $00)&lt;br /&gt;
*SS: second counter ($00 to $3B)&lt;br /&gt;
*MM: minute counter ($00 to $3B)&lt;br /&gt;
*HH: hour counter *4 ($00 to $60 by 4 steps)&lt;br /&gt;
|-&lt;br /&gt;
|$D0005E&lt;br /&gt;
|$D00103&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00104&lt;br /&gt;
|$D00107&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Current date&lt;br /&gt;
|-&lt;br /&gt;
|$D00108&lt;br /&gt;
|$D00108&lt;br /&gt;
|1&lt;br /&gt;
|Selected slot number (start at 0)&lt;br /&gt;
|Output directly to the EL panels&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D00109&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D00109&#039;&#039;&#039;&lt;br /&gt;
|1&lt;br /&gt;
|EL_PANEL&lt;br /&gt;
|State of the EL-PANEL ???&lt;br /&gt;
|-&lt;br /&gt;
|$D0010A&lt;br /&gt;
|$D0010D&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Detailed game start book address&lt;br /&gt;
|-&lt;br /&gt;
|$D0010E&lt;br /&gt;
|$D00111&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Total game start book address&lt;br /&gt;
|-&lt;br /&gt;
|$D00112&lt;br /&gt;
|$D00115&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Detailed cabinet coin book address (add 0x240 for the start book one)&lt;br /&gt;
|-&lt;br /&gt;
|$D00116&lt;br /&gt;
|$D00119&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Current month cabinet coin book address (add 0xC0 for the start book one)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D0011A&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D00121&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00122&lt;br /&gt;
|$D00122&lt;br /&gt;
|1&lt;br /&gt;
|Changes daily&lt;br /&gt;
|Slot index ($0 to $23) for book keeping data.&lt;br /&gt;
&lt;br /&gt;
Updated each time system is turned on on a new day&lt;br /&gt;
|-&lt;br /&gt;
|$D00124&lt;br /&gt;
|$D00127&lt;br /&gt;
|4&lt;br /&gt;
|Slot-1 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00128&lt;br /&gt;
|$D0012B&lt;br /&gt;
|4&lt;br /&gt;
|Slot-2 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID.&lt;br /&gt;
On a slot1 always unset (slot1 are slot2 with the second one empty)&lt;br /&gt;
|-&lt;br /&gt;
|$D0012C&lt;br /&gt;
|$D0012F&lt;br /&gt;
|4&lt;br /&gt;
|Slot-3 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00130&lt;br /&gt;
|$D00133&lt;br /&gt;
|4&lt;br /&gt;
|Slot-4 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00134&lt;br /&gt;
|$D00137&lt;br /&gt;
|4&lt;br /&gt;
|Slot-5 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00138&lt;br /&gt;
|$D0013B&lt;br /&gt;
|4&lt;br /&gt;
|Slot-6 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D0013C&lt;br /&gt;
|$D0013F&lt;br /&gt;
|4&lt;br /&gt;
|Slot-7 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00140&lt;br /&gt;
|$D00143&lt;br /&gt;
|4&lt;br /&gt;
|Slot-8 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00144&lt;br /&gt;
|$D00147&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-1 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00148&lt;br /&gt;
|$D0014B&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-2 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D0014C&lt;br /&gt;
|$D0014F&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-3 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00150&lt;br /&gt;
|$D00153&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-4 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00154&lt;br /&gt;
|$D00157&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-5 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00158&lt;br /&gt;
|$D0015B&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-6 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D0015C&lt;br /&gt;
|$D0015F&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-7 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00160&lt;br /&gt;
|$D00163&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-8 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D00164&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D001A3&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D001A4&lt;br /&gt;
|$D001A7&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Current month game start book&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D001A8&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D0021F&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00220&lt;br /&gt;
|$D0029F&lt;br /&gt;
|16*8&lt;br /&gt;
|&lt;br /&gt;
|Games soft DIPs settings (in which order ?)&lt;br /&gt;
|-&lt;br /&gt;
|$D002A0&lt;br /&gt;
|$D002AF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 0 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002B0&lt;br /&gt;
|$D002BF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 1 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002C0&lt;br /&gt;
|$D002CF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 2 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002D0&lt;br /&gt;
|$D002DF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 3 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002E0&lt;br /&gt;
|$D002EF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 4 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002F0&lt;br /&gt;
|$D002FF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 5 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D00300&lt;br /&gt;
|$D0030F&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 6 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D00310&lt;br /&gt;
|$D0031F&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 7 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D00320&lt;br /&gt;
|$D0131F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 1 data&lt;br /&gt;
|-&lt;br /&gt;
|$D01320&lt;br /&gt;
|$D0231F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 2 data&lt;br /&gt;
|-&lt;br /&gt;
|$D02320&lt;br /&gt;
|$D0331F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 3 data&lt;br /&gt;
|-&lt;br /&gt;
|$D03320&lt;br /&gt;
|$D0431F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 4 data&lt;br /&gt;
|-&lt;br /&gt;
|$D04320&lt;br /&gt;
|$D0531F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 5 data&lt;br /&gt;
|-&lt;br /&gt;
|$D05320&lt;br /&gt;
|$D0631F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 6 data&lt;br /&gt;
|-&lt;br /&gt;
|$D06320&lt;br /&gt;
|$D0731F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 7 data&lt;br /&gt;
|-&lt;br /&gt;
|$D07320&lt;br /&gt;
|$D0831F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 8 data&lt;br /&gt;
|-&lt;br /&gt;
|$D08320&lt;br /&gt;
|$D0951F&lt;br /&gt;
|$1200&lt;br /&gt;
|YYMMDDdd - PLAY - CONTINUE - TIME&lt;br /&gt;
|Bookkeeping - Daily game play data (8 slots of $24 * $10 entries)&lt;br /&gt;
|-&lt;br /&gt;
|$D09520&lt;br /&gt;
|$D09B1F&lt;br /&gt;
|$600&lt;br /&gt;
|YYMMDDdd - PLAY - CONTINUE - TIME&lt;br /&gt;
|Bookkeeping - Monthly game play data (8 slots of 12 * $10 entries)&lt;br /&gt;
|-&lt;br /&gt;
|$D09B20&lt;br /&gt;
|$D09B9F&lt;br /&gt;
|$80&lt;br /&gt;
|YYMMDDdd - PLAY - CONTINUE - TIME&lt;br /&gt;
|Bookkeeping - Total game play data (8 slots $10 entries)&lt;br /&gt;
|-&lt;br /&gt;
|$D09BA0&lt;br /&gt;
|$D09DDF&lt;br /&gt;
|$240&lt;br /&gt;
|YYMMDDdd - COIN1 - COIN2 - SERVICE&lt;br /&gt;
|Bookkeeping - Daily cab coin data&lt;br /&gt;
&lt;br /&gt;
Each entry is $10 byte long&lt;br /&gt;
|-&lt;br /&gt;
|$D09DE0&lt;br /&gt;
|$D0A01F&lt;br /&gt;
|$240&lt;br /&gt;
|YYMMDDdd - PLAY - CONTINUE - TIME&lt;br /&gt;
|Bookkeeping - Daily cab play data&lt;br /&gt;
&lt;br /&gt;
Each entry is $10 byte long&lt;br /&gt;
|-&lt;br /&gt;
|$D0A020&lt;br /&gt;
|$D0A0DF&lt;br /&gt;
|$C0&lt;br /&gt;
|00000000 - COIN1 - COIN2 - SERVICE&lt;br /&gt;
|Bookkeeping - Monthly cab coin data ($10 bytes entries * 12)&lt;br /&gt;
|-&lt;br /&gt;
|$D0A0E0&lt;br /&gt;
|$D0A19F&lt;br /&gt;
|$C0&lt;br /&gt;
|00000000 - PLAY - CONTINUE - TIME&lt;br /&gt;
|Bookkeeping - Monthly cab play data ($10 bytes entries * 12)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cartridge systems]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Backup_RAM&amp;diff=8489</id>
		<title>Backup RAM</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Backup_RAM&amp;diff=8489"/>
		<updated>2025-05-24T15:39:04Z</updated>

		<summary type="html">&lt;p&gt;Hpman: Bookkeeping info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The backup RAM is a [[battery-backed_RAM|battery-powered]] 64KiB RAM space used by the [[MVS]] to store game scores, cab infos and income logs. Access can be handled by [[BIOS calls]].&lt;br /&gt;
&lt;br /&gt;
[[68k memory map|Memory region]]: $D00000~$D0FFFF (Mirrored up to $DFFFFF ?).&lt;br /&gt;
&lt;br /&gt;
== Data structure ==&lt;br /&gt;
&lt;br /&gt;
All offset are taken from the sp-s2.bin system ROM.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Start&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;End&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Data&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$D00000&lt;br /&gt;
|$D0000F&lt;br /&gt;
|16&lt;br /&gt;
|$00&lt;br /&gt;
|Unused, fill with $00&lt;br /&gt;
|-&lt;br /&gt;
|$D00010&lt;br /&gt;
|$D0001F&lt;br /&gt;
|16&lt;br /&gt;
|&amp;quot;BACKUP RAM OK!Ç&amp;quot;&lt;br /&gt;
|The routine at $C125C8 will check if this string is present, if not it will test the ram (using the test_ram routine at $C13134) and re-init the backupram&lt;br /&gt;
|-&lt;br /&gt;
|$D00020&lt;br /&gt;
|$D00021&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|Coin deposit related (rising edge finding), old and new value of REG_STATUS_A&lt;br /&gt;
|-&lt;br /&gt;
|$D00022&lt;br /&gt;
|$D00023&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|Temp value for the coin deposit rising edge finding&lt;br /&gt;
|-&lt;br /&gt;
|$D00024&lt;br /&gt;
|$D00025&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|Internal coin counter (not credit)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D00026&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D0002F&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00034&lt;br /&gt;
|$D00035&lt;br /&gt;
|2&lt;br /&gt;
|$00&lt;br /&gt;
|&amp;quot;Internal&amp;quot; credit counters for player 1 and player 2 (BCD)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D00036&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D00039&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D0003A&lt;br /&gt;
|$D00045&lt;br /&gt;
|12&lt;br /&gt;
|&lt;br /&gt;
|Cab settings.&lt;br /&gt;
;$D0003A: Coins needed for crediting player 1 (initialized to $01)&lt;br /&gt;
;$D0003B: Credits added to player 1 (initialized to $01)&lt;br /&gt;
;$D0003C: Coins needed for crediting player 2 (initialized to $01)&lt;br /&gt;
;$D0003D: Credits added to player 2 (initialized to $02)&lt;br /&gt;
;$D00042: Game select (1=Free, 0=Only when credited) (initialized to 0)&lt;br /&gt;
;$D00043: Game start compulsion (0 = enabled, 1 = disabled)&lt;br /&gt;
;$D00044: Game start compulsion time (max time in seconds in BCD between inserting a coin and starting the game) (initialized to $30)&lt;br /&gt;
;$D00046: Demo sound (1=Without) (initialized to 0)&lt;br /&gt;
|-&lt;br /&gt;
|$D00046&lt;br /&gt;
|$D00046&lt;br /&gt;
|1&lt;br /&gt;
|SOUND_STOP&lt;br /&gt;
|No sound at all if non-zero (except coinage sound effect)&lt;br /&gt;
|-&lt;br /&gt;
|$D00047&lt;br /&gt;
|$D00047&lt;br /&gt;
|1&lt;br /&gt;
|SLOT NUMBER&lt;br /&gt;
|Number of detected slots (2 for slot1)&lt;br /&gt;
|-&lt;br /&gt;
|$D00048&lt;br /&gt;
|$D0004B&lt;br /&gt;
|4&lt;br /&gt;
|PLAY TIME&lt;br /&gt;
|Counter of second played on the game in hex.&lt;br /&gt;
&lt;br /&gt;
Reset to 0 by [[SYSTEM_RETURN]].&lt;br /&gt;
|-&lt;br /&gt;
|$D0004C&lt;br /&gt;
|$D0004C&lt;br /&gt;
|1&lt;br /&gt;
|PLAY_TIME_FRAME_TIMER&lt;br /&gt;
|Frame timer, start at $3C, decremented each frame. When the counter reach $00, PLAY_TIME is incremented and the counter is reseted to $3C&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D0004D&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D00057&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00058&lt;br /&gt;
|$D00058&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|First slot number with a boot logo flag to 0 (playable by the system ROM)&lt;br /&gt;
|-&lt;br /&gt;
|$D0005A&lt;br /&gt;
|$D0005D&lt;br /&gt;
|4&lt;br /&gt;
|HHMMSSFF&lt;br /&gt;
|Timer based on frames.&lt;br /&gt;
*FF: frame down-counter ($3C to $00)&lt;br /&gt;
*SS: second counter ($00 to $3B)&lt;br /&gt;
*MM: minute counter ($00 to $3B)&lt;br /&gt;
*HH: hour counter *4 ($00 to $60 by 4 steps)&lt;br /&gt;
|-&lt;br /&gt;
|$D0005E&lt;br /&gt;
|$D00103&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00104&lt;br /&gt;
|$D00107&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Current date&lt;br /&gt;
|-&lt;br /&gt;
|$D00108&lt;br /&gt;
|$D00108&lt;br /&gt;
|1&lt;br /&gt;
|Selected slot number (start at 0)&lt;br /&gt;
|Output directly to the EL panels&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D00109&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D00109&#039;&#039;&#039;&lt;br /&gt;
|1&lt;br /&gt;
|EL_PANEL&lt;br /&gt;
|State of the EL-PANEL ???&lt;br /&gt;
|-&lt;br /&gt;
|$D0010A&lt;br /&gt;
|$D0010D&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Detailed game start book address&lt;br /&gt;
|-&lt;br /&gt;
|$D0010E&lt;br /&gt;
|$D00111&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Total game start book address&lt;br /&gt;
|-&lt;br /&gt;
|$D00112&lt;br /&gt;
|$D00115&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Detailed cabinet coin book address (add 0x240 for the start book one)&lt;br /&gt;
|-&lt;br /&gt;
|$D00116&lt;br /&gt;
|$D00119&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Current month cabinet coin book address (add 0xC0 for the start book one)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D0011A&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D00121&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00122&lt;br /&gt;
|$D00122&lt;br /&gt;
|1&lt;br /&gt;
|Changes daily&lt;br /&gt;
|Slot index for book keeping data.&lt;br /&gt;
&lt;br /&gt;
Updated each time system is turned on on a new day&lt;br /&gt;
|-&lt;br /&gt;
|$D00124&lt;br /&gt;
|$D00127&lt;br /&gt;
|4&lt;br /&gt;
|Slot-1 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00128&lt;br /&gt;
|$D0012B&lt;br /&gt;
|4&lt;br /&gt;
|Slot-2 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID.&lt;br /&gt;
On a slot1 always unset (slot1 are slot2 with the second one empty)&lt;br /&gt;
|-&lt;br /&gt;
|$D0012C&lt;br /&gt;
|$D0012F&lt;br /&gt;
|4&lt;br /&gt;
|Slot-3 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00130&lt;br /&gt;
|$D00133&lt;br /&gt;
|4&lt;br /&gt;
|Slot-4 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00134&lt;br /&gt;
|$D00137&lt;br /&gt;
|4&lt;br /&gt;
|Slot-5 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00138&lt;br /&gt;
|$D0013B&lt;br /&gt;
|4&lt;br /&gt;
|Slot-6 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D0013C&lt;br /&gt;
|$D0013F&lt;br /&gt;
|4&lt;br /&gt;
|Slot-7 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00140&lt;br /&gt;
|$D00143&lt;br /&gt;
|4&lt;br /&gt;
|Slot-8 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00144&lt;br /&gt;
|$D00147&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-1 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00148&lt;br /&gt;
|$D0014B&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-2 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D0014C&lt;br /&gt;
|$D0014F&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-3 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00150&lt;br /&gt;
|$D00153&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-4 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00154&lt;br /&gt;
|$D00157&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-5 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00158&lt;br /&gt;
|$D0015B&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-6 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D0015C&lt;br /&gt;
|$D0015F&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-7 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00160&lt;br /&gt;
|$D00163&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-8 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D00164&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D001A3&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D001A4&lt;br /&gt;
|$D001A7&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Current month game start book&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D001A8&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D0021F&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00220&lt;br /&gt;
|$D0029F&lt;br /&gt;
|16*8&lt;br /&gt;
|&lt;br /&gt;
|Games soft DIPs settings (in which order ?)&lt;br /&gt;
|-&lt;br /&gt;
|$D002A0&lt;br /&gt;
|$D002AF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 0 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002B0&lt;br /&gt;
|$D002BF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 1 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002C0&lt;br /&gt;
|$D002CF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 2 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002D0&lt;br /&gt;
|$D002DF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 3 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002E0&lt;br /&gt;
|$D002EF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 4 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002F0&lt;br /&gt;
|$D002FF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 5 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D00300&lt;br /&gt;
|$D0030F&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 6 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D00310&lt;br /&gt;
|$D0031F&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 7 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D00320&lt;br /&gt;
|$D0131F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 1 data&lt;br /&gt;
|-&lt;br /&gt;
|$D01320&lt;br /&gt;
|$D0231F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 2 data&lt;br /&gt;
|-&lt;br /&gt;
|$D02320&lt;br /&gt;
|$D0331F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 3 data&lt;br /&gt;
|-&lt;br /&gt;
|$D03320&lt;br /&gt;
|$D0431F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 4 data&lt;br /&gt;
|-&lt;br /&gt;
|$D04320&lt;br /&gt;
|$D0531F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 5 data&lt;br /&gt;
|-&lt;br /&gt;
|$D05320&lt;br /&gt;
|$D0631F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 6 data&lt;br /&gt;
|-&lt;br /&gt;
|$D06320&lt;br /&gt;
|$D0731F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 7 data&lt;br /&gt;
|-&lt;br /&gt;
|$D07320&lt;br /&gt;
|$D0831F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 8 data&lt;br /&gt;
|-&lt;br /&gt;
|$D08320&lt;br /&gt;
|$D0951F&lt;br /&gt;
|$1200&lt;br /&gt;
|YYMMDDdd - PLAY - CONTINUE - TIME&lt;br /&gt;
|Bookkeeping - Daily game play data (8 slots of $24 * $10 entries)&lt;br /&gt;
|-&lt;br /&gt;
|$D09520&lt;br /&gt;
|$D09B1F&lt;br /&gt;
|$600&lt;br /&gt;
|YYMMDDdd - PLAY - CONTINUE - TIME&lt;br /&gt;
|Bookkeeping - Monthly game play data (8 slots of 12 * $10 entries)&lt;br /&gt;
|-&lt;br /&gt;
|$D09B20&lt;br /&gt;
|$D09B9F&lt;br /&gt;
|$80&lt;br /&gt;
|YYMMDDdd - PLAY - CONTINUE - TIME&lt;br /&gt;
|Bookkeeping - Total game play data (8 slots $10 entries)&lt;br /&gt;
|-&lt;br /&gt;
|$D09BA0&lt;br /&gt;
|$D09DDF&lt;br /&gt;
|$240&lt;br /&gt;
|YYMMDDdd - COIN1 - COIN2 - SERVICE&lt;br /&gt;
|Bookkeeping - Daily cab coin data&lt;br /&gt;
&lt;br /&gt;
Each entry is $10 byte long&lt;br /&gt;
|-&lt;br /&gt;
|$D09DE0&lt;br /&gt;
|$D0A01F&lt;br /&gt;
|$240&lt;br /&gt;
|YYMMDDdd - PLAY - CONTINUE - TIME&lt;br /&gt;
|Bookkeeping - Daily cab play data&lt;br /&gt;
&lt;br /&gt;
Each entry is $10 byte long&lt;br /&gt;
|-&lt;br /&gt;
|$D0A020&lt;br /&gt;
|$D0A0DF&lt;br /&gt;
|$C0&lt;br /&gt;
|00000000 - COIN1 - COIN2 - SERVICE&lt;br /&gt;
|Bookkeeping - Monthly cab coin data ($10 bytes entries * 12)&lt;br /&gt;
|-&lt;br /&gt;
|$D0A0E0&lt;br /&gt;
|$D0A19F&lt;br /&gt;
|$C0&lt;br /&gt;
|00000000 - PLAY - CONTINUE - TIME&lt;br /&gt;
|Bookkeeping - Monthly cab play data ($10 bytes entries * 12)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cartridge systems]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Backup_RAM&amp;diff=8485</id>
		<title>Backup RAM</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Backup_RAM&amp;diff=8485"/>
		<updated>2025-05-14T16:06:05Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The backup RAM is a [[battery-backed_RAM|battery-powered]] 64KiB RAM space used by the [[MVS]] to store game scores, cab infos and income logs. Access can be handled by [[BIOS calls]].&lt;br /&gt;
&lt;br /&gt;
[[68k memory map|Memory region]]: $D00000~$D0FFFF (Mirrored up to $DFFFFF ?).&lt;br /&gt;
&lt;br /&gt;
== Data structure ==&lt;br /&gt;
&lt;br /&gt;
All offset are taken from the sp-s2.bin system ROM.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Start&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;End&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Data&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$D00000&lt;br /&gt;
|$D0000F&lt;br /&gt;
|16&lt;br /&gt;
|$00&lt;br /&gt;
|Unused, fill with $00&lt;br /&gt;
|-&lt;br /&gt;
|$D00010&lt;br /&gt;
|$D0001F&lt;br /&gt;
|16&lt;br /&gt;
|&amp;quot;BACKUP RAM OK!Ç&amp;quot;&lt;br /&gt;
|The routine at $C125C8 will check if this string is present, if not it will test the ram (using the test_ram routine at $C13134) and re-init the backupram&lt;br /&gt;
|-&lt;br /&gt;
|$D00020&lt;br /&gt;
|$D00021&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|Coin deposit related (rising edge finding), old and new value of REG_STATUS_A&lt;br /&gt;
|-&lt;br /&gt;
|$D00022&lt;br /&gt;
|$D00023&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|Temp value for the coin deposit rising edge finding&lt;br /&gt;
|-&lt;br /&gt;
|$D00024&lt;br /&gt;
|$D00025&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|Internal coin counter (not credit)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D00026&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D0002F&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00034&lt;br /&gt;
|$D00035&lt;br /&gt;
|2&lt;br /&gt;
|$00&lt;br /&gt;
|&amp;quot;Internal&amp;quot; credit counters for player 1 and player 2 (BCD)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D00036&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D00039&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D0003A&lt;br /&gt;
|$D00045&lt;br /&gt;
|12&lt;br /&gt;
|&lt;br /&gt;
|Cab settings.&lt;br /&gt;
;$D0003A: Coins needed for crediting player 1 (initialized to $01)&lt;br /&gt;
;$D0003B: Credits added to player 1 (initialized to $01)&lt;br /&gt;
;$D0003C: Coins needed for crediting player 2 (initialized to $01)&lt;br /&gt;
;$D0003D: Credits added to player 2 (initialized to $02)&lt;br /&gt;
;$D00042: Game select (1=Free, 0=Only when credited) (initialized to 0)&lt;br /&gt;
;$D00043: Game start compulsion (0 = enabled, 1 = disabled)&lt;br /&gt;
;$D00044: Game start compulsion time (max time in seconds in BCD between inserting a coin and starting the game) (initialized to $30)&lt;br /&gt;
;$D00046: Demo sound (1=Without) (initialized to 0)&lt;br /&gt;
|-&lt;br /&gt;
|$D00046&lt;br /&gt;
|$D00046&lt;br /&gt;
|1&lt;br /&gt;
|SOUND_STOP&lt;br /&gt;
|No sound at all if non-zero (except coinage sound effect)&lt;br /&gt;
|-&lt;br /&gt;
|$D00047&lt;br /&gt;
|$D00047&lt;br /&gt;
|1&lt;br /&gt;
|SLOT NUMBER&lt;br /&gt;
|Number of detected slots (2 for slot1)&lt;br /&gt;
|-&lt;br /&gt;
|$D00048&lt;br /&gt;
|$D0004B&lt;br /&gt;
|4&lt;br /&gt;
|PLAY TIME&lt;br /&gt;
|Counter of second played on the game in hex.&lt;br /&gt;
&lt;br /&gt;
Reset to 0 by [[SYSTEM_RETURN]].&lt;br /&gt;
|-&lt;br /&gt;
|$D0004C&lt;br /&gt;
|$D0004C&lt;br /&gt;
|1&lt;br /&gt;
|PLAY_TIME_FRAME_TIMER&lt;br /&gt;
|Frame timer, start at $3C, decremented each frame. When the counter reach $00, PLAY_TIME is incremented and the counter is reseted to $3C&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D0004D&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D00057&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00058&lt;br /&gt;
|$D00058&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|First slot number with a boot logo flag to 0 (playable by the system ROM)&lt;br /&gt;
|-&lt;br /&gt;
|$D0005A&lt;br /&gt;
|$D0005D&lt;br /&gt;
|4&lt;br /&gt;
|HHMMSSFF&lt;br /&gt;
|Timer based on frames.&lt;br /&gt;
*FF: frame down-counter ($3C to $00)&lt;br /&gt;
*SS: second counter ($00 to $3B)&lt;br /&gt;
*MM: minute counter ($00 to $3B)&lt;br /&gt;
*HH: hour counter *4 ($00 to $60 by 4 steps)&lt;br /&gt;
|-&lt;br /&gt;
|$D0005E&lt;br /&gt;
|$D00103&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00104&lt;br /&gt;
|$D00107&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Current date&lt;br /&gt;
|-&lt;br /&gt;
|$D00108&lt;br /&gt;
|$D00108&lt;br /&gt;
|1&lt;br /&gt;
|Selected slot number (start at 0)&lt;br /&gt;
|Output directly to the EL panels&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D00109&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D00109&#039;&#039;&#039;&lt;br /&gt;
|1&lt;br /&gt;
|EL_PANEL&lt;br /&gt;
|State of the EL-PANEL ???&lt;br /&gt;
|-&lt;br /&gt;
|$D0010A&lt;br /&gt;
|$D0010D&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Detailed game start book address&lt;br /&gt;
|-&lt;br /&gt;
|$D0010E&lt;br /&gt;
|$D00111&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Total game start book address&lt;br /&gt;
|-&lt;br /&gt;
|$D00112&lt;br /&gt;
|$D00115&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Detailed cabinet coin book address (add 0x240 for the start book one)&lt;br /&gt;
|-&lt;br /&gt;
|$D00116&lt;br /&gt;
|$D00119&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Current month cabinet coin book address (add 0xC0 for the start book one)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D0011A&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D00121&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00122&lt;br /&gt;
|$D00123&lt;br /&gt;
|2&lt;br /&gt;
|$23&lt;br /&gt;
|The init_backupram routine write $23 there, purpose unknown.&lt;br /&gt;
|-&lt;br /&gt;
|$D00124&lt;br /&gt;
|$D00127&lt;br /&gt;
|4&lt;br /&gt;
|Slot-1 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00128&lt;br /&gt;
|$D0012B&lt;br /&gt;
|4&lt;br /&gt;
|Slot-2 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID.&lt;br /&gt;
On a slot1 always unset (slot1 are slot2 with the second one empty)&lt;br /&gt;
|-&lt;br /&gt;
|$D0012C&lt;br /&gt;
|$D0012F&lt;br /&gt;
|4&lt;br /&gt;
|Slot-3 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00130&lt;br /&gt;
|$D00133&lt;br /&gt;
|4&lt;br /&gt;
|Slot-4 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00134&lt;br /&gt;
|$D00137&lt;br /&gt;
|4&lt;br /&gt;
|Slot-5 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00138&lt;br /&gt;
|$D0013B&lt;br /&gt;
|4&lt;br /&gt;
|Slot-6 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D0013C&lt;br /&gt;
|$D0013F&lt;br /&gt;
|4&lt;br /&gt;
|Slot-7 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00140&lt;br /&gt;
|$D00143&lt;br /&gt;
|4&lt;br /&gt;
|Slot-8 [[NGH number]] and bram game block ID (see below)&lt;br /&gt;
|If not present $0000 as NGH and $FFFF as game name ID&lt;br /&gt;
|-&lt;br /&gt;
|$D00144&lt;br /&gt;
|$D00147&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-1 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00148&lt;br /&gt;
|$D0014B&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-2 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D0014C&lt;br /&gt;
|$D0014F&lt;br /&gt;
|$4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-3 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00150&lt;br /&gt;
|$D00153&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-4 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00154&lt;br /&gt;
|$D00157&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-5 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00158&lt;br /&gt;
|$D0015B&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-6 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D0015C&lt;br /&gt;
|$D0015F&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-7 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|$D00160&lt;br /&gt;
|$D00163&lt;br /&gt;
|4&lt;br /&gt;
|YYMMDDdd&lt;br /&gt;
|Slot-8 book creation time YEAR-MONTH-DAY-day number&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D00164&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D001A3&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D001A4&lt;br /&gt;
|$D001A7&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|Current month game start book&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;$D001A8&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;$D0021F&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$D00220&lt;br /&gt;
|$D0029F&lt;br /&gt;
|16*8&lt;br /&gt;
|&lt;br /&gt;
|Games soft DIPs settings (in which order ?)&lt;br /&gt;
|-&lt;br /&gt;
|$D002A0&lt;br /&gt;
|$D002AF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 0 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002B0&lt;br /&gt;
|$D002BF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 1 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002C0&lt;br /&gt;
|$D002CF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 2 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002D0&lt;br /&gt;
|$D002DF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 3 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002E0&lt;br /&gt;
|$D002EF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 4 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D002F0&lt;br /&gt;
|$D002FF&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 5 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D00300&lt;br /&gt;
|$D0030F&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 6 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D00310&lt;br /&gt;
|$D0031F&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|bram block 7 game name&lt;br /&gt;
|-&lt;br /&gt;
|$D00320&lt;br /&gt;
|$D0131F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 1 data&lt;br /&gt;
|-&lt;br /&gt;
|$D01320&lt;br /&gt;
|$D0231F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 2 data&lt;br /&gt;
|-&lt;br /&gt;
|$D02320&lt;br /&gt;
|$D0331F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 3 data&lt;br /&gt;
|-&lt;br /&gt;
|$D03320&lt;br /&gt;
|$D0431F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 4 data&lt;br /&gt;
|-&lt;br /&gt;
|$D04320&lt;br /&gt;
|$D0531F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 5 data&lt;br /&gt;
|-&lt;br /&gt;
|$D05320&lt;br /&gt;
|$D0631F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 6 data&lt;br /&gt;
|-&lt;br /&gt;
|$D06320&lt;br /&gt;
|$D0731F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 7 data&lt;br /&gt;
|-&lt;br /&gt;
|$D07320&lt;br /&gt;
|$D0831F&lt;br /&gt;
|$1000&lt;br /&gt;
|&lt;br /&gt;
|bram block 8 data&lt;br /&gt;
|-&lt;br /&gt;
|$D09BA0&lt;br /&gt;
|$D09DE0&lt;br /&gt;
|$240&lt;br /&gt;
|YYMMDDdd - COIN1 - COIN2 - SERVICE&lt;br /&gt;
|Bookkeeping - Current month coin&lt;br /&gt;
&lt;br /&gt;
Each entry is $10 byte long&lt;br /&gt;
|-&lt;br /&gt;
|$D09DE0&lt;br /&gt;
|$D0A01F&lt;br /&gt;
|$240&lt;br /&gt;
|YYMMDDdd - PLAY - CONTINUE - TIME&lt;br /&gt;
|Bookkeeping - Current month play&lt;br /&gt;
&lt;br /&gt;
Each entry is $10 byte long&lt;br /&gt;
|-&lt;br /&gt;
|$D0A020&lt;br /&gt;
|$D0A0DF&lt;br /&gt;
|$C0&lt;br /&gt;
|00000000 - COIN1 - COIN2 - SERVICE&lt;br /&gt;
|Bookkeeping - Year coin&lt;br /&gt;
|-&lt;br /&gt;
|$D0A0E0&lt;br /&gt;
|$D0A19F&lt;br /&gt;
|$C0&lt;br /&gt;
|00000000 - PLAY - CONTINUE - TIME&lt;br /&gt;
|Bookkeeping - Year play&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cartridge systems]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=BIOSF_CDDACMD&amp;diff=6511</id>
		<title>BIOSF CDDACMD</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=BIOSF_CDDACMD&amp;diff=6511"/>
		<updated>2019-07-10T16:25:20Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==BIOSF_CDDACMD ($C0056A): Issue CDDA command ==&lt;br /&gt;
&lt;br /&gt;
Command.b/track.b pair in D0. Can hook the [[68k interrupts|VBL interrupt]] for a while, depending on command.&lt;br /&gt;
&lt;br /&gt;
See [[CDDA]].&lt;br /&gt;
&lt;br /&gt;
[[Category:BIOS calls]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=CDDA&amp;diff=6510</id>
		<title>CDDA</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=CDDA&amp;diff=6510"/>
		<updated>2019-07-10T16:07:28Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This article needs checking and research&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
CDDA stands for &amp;quot;CD Digital Audio&amp;quot;. When loading a game, the &amp;quot;CDDA flag&amp;quot; byte at location $107 in the [[68k program header]] is checked with bit 7 masked off.&lt;br /&gt;
&lt;br /&gt;
* $00 or $01 is for games which use the Z80 RAM default location $FEF8 to play CDDA tracks.&lt;br /&gt;
* $02 and up seems to be for games which either use a custom Z80 RAM location, or the BIOS call.&lt;br /&gt;
&lt;br /&gt;
==Z80 RAM check method==&lt;br /&gt;
This method was probably implemented to simplify the porting of small games to the NeoGeo CD. Games that didn&#039;t need in-game file loading only had to have their vector table and [[sound driver]] code replaced. The sound driver itself translates the regular music commands to CDDA command/track pairs and drops them to a specific location in its RAM, which is then read back and executed by the BIOS when using the [[SYSTEM_IO]] ($C0044A) [[BIOS calls|call]] (see difference between the MVS and CD versions of Puzzled: no calls for music, M1 replaced).&lt;br /&gt;
&lt;br /&gt;
In the sound drivers of CD games, a table is used to figure out if a received command concerns the YM2610 (mostly sound effects) or is a CDDA track.&lt;br /&gt;
&lt;br /&gt;
Putting the CDDA flag byte at $107 to 0 or 1 enables this method and sets the Z80 return address to $FEF8.&lt;br /&gt;
Setting the CDDA flag to any other values allows to choose the address (word at $13A). If the address is 0, this method isn&#039;t used.&lt;br /&gt;
&lt;br /&gt;
For example, [[Puzzled]] uses this method. The CDDA flag is set to 0 in the program header. The 68k sends the exact same &amp;quot;play music&amp;quot; Z80 commands as the MVS version of the game, the sound driver then converts them to CDDA ones and drops them at $FEF8. Command $0743 gets translated to $0532 (intro music, track 32).&lt;br /&gt;
&lt;br /&gt;
==Direct method==&lt;br /&gt;
&lt;br /&gt;
BIOS call $C0056A. Command/track pair in D0. (track number in BCD format).&lt;br /&gt;
&lt;br /&gt;
Metal Slug 2 waits for a location in the BIOS RAM to be non-zero before calling $C0056A (?):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#:&lt;br /&gt;
	move.b	d0,$300001    ;Watchdog kick, interrupts are disabled ?&lt;br /&gt;
	tst.b	$10F6D9&lt;br /&gt;
	beq.s	#&lt;br /&gt;
	jsr	$C0056A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Viewpoint sends the command 4 ($04xx, xx being the track number):&lt;br /&gt;
The CDDA flag ($107) is $02, and $13A is $0000.&lt;br /&gt;
&lt;br /&gt;
==Commands==&lt;br /&gt;
&lt;br /&gt;
Commands are a two bytes (command type/track) put together into a short (ex: 0x0102)&lt;br /&gt;
&lt;br /&gt;
{{16BitRegister|?|1|-|4|Sync|1|Command|2|Track # (BCD)|8}}&lt;br /&gt;
&lt;br /&gt;
Commands are:&lt;br /&gt;
*0x0: read track (loop)&lt;br /&gt;
*0x1: read track (no loop)&lt;br /&gt;
*0x2: pause (ignores track parameter)&lt;br /&gt;
*0x3: resume (ignores track parameter)&lt;br /&gt;
&lt;br /&gt;
Sync bit setting is:&lt;br /&gt;
*0: Seamless play&lt;br /&gt;
*1: Halt gameplay while drive is seeking&lt;br /&gt;
&lt;br /&gt;
Commands over $07 are ignored.&lt;br /&gt;
&lt;br /&gt;
Set $13A to $0000 if not using the Z80 RAM.&lt;br /&gt;
Set to $FFFF if using the default $FEF8 value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BIOSF_SYSTEM_IO must be called every VBlank for direct CDDA commands to work.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
CDDA data can be picked up through [[memory mapped registers]] CDDA_LEFTSTREAM and CDDA_RIGHTSTREAM.&lt;br /&gt;
&lt;br /&gt;
[[Category:Audio system]]&lt;br /&gt;
[[Category:CD systems]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=CDDA&amp;diff=6509</id>
		<title>CDDA</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=CDDA&amp;diff=6509"/>
		<updated>2019-07-10T16:07:15Z</updated>

		<summary type="html">&lt;p&gt;Hpman: CDDA Commands&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This article needs checking and research&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
CDDA stands for &amp;quot;CD Digital Audio&amp;quot;. When loading a game, the &amp;quot;CDDA flag&amp;quot; byte at location $107 in the [[68k program header]] is checked with bit 7 masked off.&lt;br /&gt;
&lt;br /&gt;
* $00 or $01 is for games which use the Z80 RAM default location $FEF8 to play CDDA tracks.&lt;br /&gt;
* $02 and up seems to be for games which either use a custom Z80 RAM location, or the BIOS call.&lt;br /&gt;
&lt;br /&gt;
==Z80 RAM check method==&lt;br /&gt;
This method was probably implemented to simplify the porting of small games to the NeoGeo CD. Games that didn&#039;t need in-game file loading only had to have their vector table and [[sound driver]] code replaced. The sound driver itself translates the regular music commands to CDDA command/track pairs and drops them to a specific location in its RAM, which is then read back and executed by the BIOS when using the [[SYSTEM_IO]] ($C0044A) [[BIOS calls|call]] (see difference between the MVS and CD versions of Puzzled: no calls for music, M1 replaced).&lt;br /&gt;
&lt;br /&gt;
In the sound drivers of CD games, a table is used to figure out if a received command concerns the YM2610 (mostly sound effects) or is a CDDA track.&lt;br /&gt;
&lt;br /&gt;
Putting the CDDA flag byte at $107 to 0 or 1 enables this method and sets the Z80 return address to $FEF8.&lt;br /&gt;
Setting the CDDA flag to any other values allows to choose the address (word at $13A). If the address is 0, this method isn&#039;t used.&lt;br /&gt;
&lt;br /&gt;
For example, [[Puzzled]] uses this method. The CDDA flag is set to 0 in the program header. The 68k sends the exact same &amp;quot;play music&amp;quot; Z80 commands as the MVS version of the game, the sound driver then converts them to CDDA ones and drops them at $FEF8. Command $0743 gets translated to $0532 (intro music, track 32).&lt;br /&gt;
&lt;br /&gt;
==Direct method==&lt;br /&gt;
&lt;br /&gt;
BIOS call $C0056A. Command/track pair in D0. (track number in BCD format).&lt;br /&gt;
&lt;br /&gt;
Metal Slug 2 waits for a location in the BIOS RAM to be non-zero before calling $C0056A (?):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#:&lt;br /&gt;
	move.b	d0,$300001    ;Watchdog kick, interrupts are disabled ?&lt;br /&gt;
	tst.b	$10F6D9&lt;br /&gt;
	beq.s	#&lt;br /&gt;
	jsr	$C0056A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Viewpoint sends the command 4 ($04xx, xx being the track number):&lt;br /&gt;
The CDDA flag ($107) is $02, and $13A is $0000.&lt;br /&gt;
&lt;br /&gt;
==Commands==&lt;br /&gt;
&lt;br /&gt;
Commands are a two bytes (command type/track) ut together into a short (ex: 0x0102)&lt;br /&gt;
&lt;br /&gt;
{{16BitRegister|?|1|-|4|Sync|1|Command|2|Track # (BCD)|8}}&lt;br /&gt;
&lt;br /&gt;
Commands are:&lt;br /&gt;
*0x0: read track (loop)&lt;br /&gt;
*0x1: read track (no loop)&lt;br /&gt;
*0x2: pause (ignores track parameter)&lt;br /&gt;
*0x3: resume (ignores track parameter)&lt;br /&gt;
&lt;br /&gt;
Sync bit setting is:&lt;br /&gt;
*0: Seamless play&lt;br /&gt;
*1: Halt gameplay while drive is seeking&lt;br /&gt;
&lt;br /&gt;
Commands over $07 are ignored.&lt;br /&gt;
&lt;br /&gt;
Set $13A to $0000 if not using the Z80 RAM.&lt;br /&gt;
Set to $FFFF if using the default $FEF8 value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BIOSF_SYSTEM_IO must be called every VBlank for direct CDDA commands to work.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
CDDA data can be picked up through [[memory mapped registers]] CDDA_LEFTSTREAM and CDDA_RIGHTSTREAM.&lt;br /&gt;
&lt;br /&gt;
[[Category:Audio system]]&lt;br /&gt;
[[Category:CD systems]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=BIOSF_CDDACMD&amp;diff=6508</id>
		<title>BIOSF CDDACMD</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=BIOSF_CDDACMD&amp;diff=6508"/>
		<updated>2019-07-10T15:44:43Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==BIOSF_CDDACMD ($C0056A): Issue CDDA command ==&lt;br /&gt;
&lt;br /&gt;
Command.b/track.b pair in D0. Can hooks the [[68k interrupts|VBL interrupt]] for a while, depending on command.&lt;br /&gt;
&lt;br /&gt;
See [[CDDA]].&lt;br /&gt;
&lt;br /&gt;
[[Category:BIOS calls]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=L0_ROM&amp;diff=6499</id>
		<title>L0 ROM</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=L0_ROM&amp;diff=6499"/>
		<updated>2019-06-10T21:50:59Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* Example of GPU processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:aes_lo.jpg|right|thumb|Toshiba LO ROM chip taken from an AES system.]]&lt;br /&gt;
[[File:cd2_lo.jpg|right|thumb|LO ROM chip found on a CDM3-2 board.]]&lt;br /&gt;
&lt;br /&gt;
The L0 ROM is a 64KiB (sometimes 128KiB with A16 tied to ground) ROM chip found in every NeoGeo systems, which contains byte values used by {{Chipname|LSPC}} to shrink [[sprites]] &#039;&#039;&#039;vertically&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The dump is called 000-lo.lo in [[system ROM]] sets.&lt;br /&gt;
&lt;br /&gt;
=Hash=&lt;br /&gt;
&lt;br /&gt;
* CRC32: 5A86CFF2&lt;br /&gt;
* SHA-1: 5992277DEBADEB64D1C1C64B0A92D9293EAF7E4A&lt;br /&gt;
&lt;br /&gt;
=Data format=&lt;br /&gt;
&lt;br /&gt;
The data is made of 256 tables of 256 bytes, each table corresponding to a vertical shrinking value for sprites.&lt;br /&gt;
&lt;br /&gt;
For the first 256 lines (top half of a full sprite), the index in the table is the line number of the sprite currently being drawn (scanline - Y position).&lt;br /&gt;
&lt;br /&gt;
Each byte entry in the table is used as 2 nibbles:&lt;br /&gt;
*The upper nibble is the tile number index to read in the tilemap in [[VRAM]] SCB1 (0 to 15).&lt;br /&gt;
*The lower nibble is the line number of that tile to fetch in the [[C ROM]]s.&lt;br /&gt;
&lt;br /&gt;
For the last 256 lines (bottom half of a full sprite), the index in the table is complemented: the table is read backwards.&lt;br /&gt;
&lt;br /&gt;
*The upper nibble is the tile number index XOR $1F to read in the tilemap in VRAM SCB1 (16 to 31).&lt;br /&gt;
*The lower nibble is the line number XOR $F of that tile to fetch in the C ROMs.&lt;br /&gt;
&lt;br /&gt;
==Example of GPU processing==&lt;br /&gt;
[[File:Ngscaling.png|right|thumb]]&lt;br /&gt;
&lt;br /&gt;
(Maybe place this part in the LSPC page ?)&lt;br /&gt;
&lt;br /&gt;
Sprite with Y zoom value = $1B and tile height = 2 (32 pixels).&lt;br /&gt;
&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
!Sprite line #&lt;br /&gt;
!L0 address&lt;br /&gt;
!L0 data&lt;br /&gt;
!Tilemap index&lt;br /&gt;
!Tile line used&lt;br /&gt;
|-&lt;br /&gt;
|0||$1B00||$00||0||0&lt;br /&gt;
|-&lt;br /&gt;
|1||$1B01||$08||0||8&lt;br /&gt;
|-&lt;br /&gt;
|2||$1B02||$10||1||0&lt;br /&gt;
|-&lt;br /&gt;
|colspan=5|...&lt;br /&gt;
|-&lt;br /&gt;
|26||$1B1A||$E8||14||8&lt;br /&gt;
|-&lt;br /&gt;
|27||$1B1B||$F8||15||8&lt;br /&gt;
|-&lt;br /&gt;
|28||$1B1C||$FF||15||15&lt;br /&gt;
|-&lt;br /&gt;
|29||$1B1D||$FF||15||15&lt;br /&gt;
|-&lt;br /&gt;
|colspan=5|...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Datasheet==&lt;br /&gt;
&lt;br /&gt;
Official TC531001 datasheet: [[http://www.alldatasheet.com/datasheet-pdf/pdf/115078/TOSHIBA/TC531001.html]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Chips]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Fix_bankswitching&amp;diff=6425</id>
		<title>Fix bankswitching</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Fix_bankswitching&amp;diff=6425"/>
		<updated>2019-02-24T02:39:06Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In some late games, the [[S ROM]] 128KiB size limit was expanded with the use of {{Chipname|NEO-CMC}} chips.&lt;br /&gt;
&lt;br /&gt;
This was devised as some sort of hack, taking advantage that the [[VDC]] continues rendering the [[fix layer]] outside of the visible screen area. This allows the chips to use the normally unused $7500~$75FF [[VRAM]] region to add bits to the tile numbers.&lt;br /&gt;
&lt;br /&gt;
The chips use latches to store the additional bits at the beginning of a line, and &amp;quot;distributes&amp;quot; them during render. Synchronization might just be free running, started by /RESET and clocked with 6MB ?&lt;br /&gt;
&lt;br /&gt;
Games marked [*] do hold 512KB fix data, however they ultimately only use a 128KB section, making the banking mechanism pointless.&lt;br /&gt;
&lt;br /&gt;
NEO-CMC 042 has been observed using type 1 only. NEO-CMC 050 has been observed using both type 1 and type 2.&lt;br /&gt;
&lt;br /&gt;
==Type 1 (per line banking)==&lt;br /&gt;
&lt;br /&gt;
Infos from Mr K (MAME).&lt;br /&gt;
&lt;br /&gt;
Used by:&lt;br /&gt;
* [[Garou - Mark of the Wolves]] (NEO-CMC 042)&lt;br /&gt;
* [[Metal Slug 3]] (NEO-CMC 042) [*]&lt;br /&gt;
* [[Metal Slug 4]] (NEO-CMC 050) [*] (parental advisory screen glitched due to wrong banking)&lt;br /&gt;
&lt;br /&gt;
Type 1 allows fix data up to 512KiB (16384 tiles instead of 4096), by changing the bank (4 maximum) for groups of 2 line of tiles (or more ?). For this, the $7500~$75BF area in VRAM is used.&lt;br /&gt;
&lt;br /&gt;
* The $7500~$753F area even words (32 total) contain a flag to indicate if the bank has to be changed for the corresponding tile line.&lt;br /&gt;
* The $7580~$75BF area even words (32 total) contain bank numbers for each of the tile lines.&lt;br /&gt;
&lt;br /&gt;
If for a given line, the flag is set to $0200 (group size ?), the bank is read, changed, and will remain the same until it&#039;s changed again (it doesn&#039;t go back to 0 if the next line doesn&#039;t have the flag set).&lt;br /&gt;
&lt;br /&gt;
Bank number:&lt;br /&gt;
{{16BitRegister|Has to be $FF ($0F works?)|8|Unused ?|6|Bank number|2}}&lt;br /&gt;
&lt;br /&gt;
Bank bits are inverted (00 = bank 3, 11 = bank 0).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This needs further research, see MAME video/neogeo.c&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Type 2 (per tile banking)==&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc50bs.png|400px|right]]&lt;br /&gt;
&lt;br /&gt;
Used by:&lt;br /&gt;
* [[The King of Fighters 2000]] (NEO-CMC 050)&lt;br /&gt;
* [[Matrimelee]] (NEO-CMC 050) [*]&lt;br /&gt;
* [[SNK vs. Capcom - SVC Chaos]] (NEO-CMC 050)&lt;br /&gt;
* [[The King of Fighters 2003]] (NEO-CMC 050)&lt;br /&gt;
&lt;br /&gt;
Type 2 allows to add 2 bits to all the fix tile indexes individually, also allowing to use 16384 tiles at most but in a simpler manner and with no restrictions. For this, the $7500~$75DF area of VRAM is used.&lt;br /&gt;
&lt;br /&gt;
Each word in this area gives the bank number for 6 horizontally consecutive fix tiles corresponding to the line:&lt;br /&gt;
{{16BitRegister|Unused ?|4|a|2|b|2|c|2|d|2|e|2|f|2}}&lt;br /&gt;
&lt;br /&gt;
Those bank bits are inverted (00 = bank 3, 11 = bank 0).&lt;br /&gt;
&lt;br /&gt;
The words are organized as in the fix map for a PAL screen (first and last lines aren&#039;t used): from top to bottom and left to right. The &amp;quot;e&amp;quot; and &amp;quot;f&amp;quot; group of bits are unused in the last column ($75C0+).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
*Tile at X=0, Y=1 has its bank number in bits a of $7500&lt;br /&gt;
*Tile at X=0, Y=5 has its bank number in bits a of $7504&lt;br /&gt;
*Tile at X=3, Y=2 has its bank number in bits d of $7501&lt;br /&gt;
*Tile at X=7, Y=9 has its bank number in bits b of $7528&lt;br /&gt;
&lt;br /&gt;
[[Category:Video system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Fix_bankswitching&amp;diff=6424</id>
		<title>Fix bankswitching</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Fix_bankswitching&amp;diff=6424"/>
		<updated>2019-02-24T01:53:53Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In some late games, the [[S ROM]] 128KiB size limit was expanded with the use of {{Chipname|NEO-CMC}} chips.&lt;br /&gt;
&lt;br /&gt;
This was devised as some sort of hack, taking advantage that the [[VDC]] continues rendering the [[fix layer]] outside of the visible screen area. This allows the chips to use the normally unused $7500~$75FF [[VRAM]] region to add bits to the tile numbers.&lt;br /&gt;
&lt;br /&gt;
The chips use latches to store the additional bits at the beginning of a line, and &amp;quot;distributes&amp;quot; them during render. Synchronization might just be free running, started by /RESET and clocked with 6MB ?&lt;br /&gt;
&lt;br /&gt;
Games marked [*] do hold 512KB fix data, however they ultimately only use a 128KB section, making the banking mechanism pointless.&lt;br /&gt;
&lt;br /&gt;
NEO-CMC 042 has been observed using type 1 only. NEO-CMC 050 has been observed using both type 1 and type 2.&lt;br /&gt;
&lt;br /&gt;
==Type 1 (per line banking)==&lt;br /&gt;
&lt;br /&gt;
Infos from Mr K (MAME).&lt;br /&gt;
&lt;br /&gt;
Used by:&lt;br /&gt;
* [[Garou - Mark of the Wolves]] (NEO-CMC 042)&lt;br /&gt;
* [[Metal Slug 3]] (NEO-CMC 042) [*]&lt;br /&gt;
* [[Metal Slug 4]] (NEO-CMC 050) [*] (parental advisory screen glitched due to wrong banking)&lt;br /&gt;
&lt;br /&gt;
The 042 version of NEO-CMC allows fix data up to 512KiB (16384 tiles instead of 4096), by changing the bank (4 maximum) for groups of 2 line of tiles (or more ?). For this, the $7500~$75BF area in VRAM is used.&lt;br /&gt;
&lt;br /&gt;
* The $7500~$753F area even words (32 total) contain a flag to indicate if the bank has to be changed for the corresponding tile line.&lt;br /&gt;
* The $7580~$75BF area even words (32 total) contain bank numbers for each of the tile lines.&lt;br /&gt;
&lt;br /&gt;
If for a given line, the flag is set to $0200 (group size ?), the bank is read, changed, and will remain the same until it&#039;s changed again (it doesn&#039;t go back to 0 if the next line doesn&#039;t have the flag set).&lt;br /&gt;
&lt;br /&gt;
Bank number:&lt;br /&gt;
{{16BitRegister|Has to be $FF ($0F works?)|8|Unused ?|6|Bank number|2}}&lt;br /&gt;
&lt;br /&gt;
Bank bits are inverted (00 = bank 3, 11 = bank 0).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This needs further research, see MAME video/neogeo.c&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Type 2 (per tile banking)==&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc50bs.png|400px|right]]&lt;br /&gt;
&lt;br /&gt;
Used by:&lt;br /&gt;
* [[The King of Fighters 2000]] (NEO-CMC 050)&lt;br /&gt;
* [[Matrimelee]] (NEO-CMC 050) [*]&lt;br /&gt;
* [[SNK vs. Capcom - SVC Chaos]] (NEO-CMC 050)&lt;br /&gt;
* [[The King of Fighters 2003]] (NEO-CMC 050)&lt;br /&gt;
&lt;br /&gt;
The 050 version of NEO-CMC allows to add 2 bits to all the fix tile indexes individually, also allowing to use 16384 tiles at most but in a simpler manner and with no restrictions. For this, the $7500~$75DF area of VRAM is used.&lt;br /&gt;
&lt;br /&gt;
Each word in this area gives the bank number for 6 horizontally consecutive fix tiles corresponding to the line:&lt;br /&gt;
{{16BitRegister|Unused ?|4|a|2|b|2|c|2|d|2|e|2|f|2}}&lt;br /&gt;
&lt;br /&gt;
Those bank bits are inverted (00 = bank 3, 11 = bank 0).&lt;br /&gt;
&lt;br /&gt;
The words are organized as in the fix map for a PAL screen (first and last lines aren&#039;t used): from top to bottom and left to right. The &amp;quot;e&amp;quot; and &amp;quot;f&amp;quot; group of bits are unused in the last column ($75C0+).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
*Tile at X=0, Y=1 has its bank number in bits a of $7500&lt;br /&gt;
*Tile at X=0, Y=5 has its bank number in bits a of $7504&lt;br /&gt;
*Tile at X=3, Y=2 has its bank number in bits d of $7501&lt;br /&gt;
*Tile at X=7, Y=9 has its bank number in bits b of $7528&lt;br /&gt;
&lt;br /&gt;
[[Category:Video system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Fix_bankswitching&amp;diff=6423</id>
		<title>Fix bankswitching</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Fix_bankswitching&amp;diff=6423"/>
		<updated>2019-02-24T01:51:00Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In some late games, the [[S ROM]] 128KiB size limit was expanded with the use of {{Chipname|NEO-CMC}} chips.&lt;br /&gt;
&lt;br /&gt;
This was devised as some sort of hack, taking advantage that the [[VDC]] continues rendering the [[fix layer]] outside of the visible screen area. This allows the chips to use the normally unused $7500~$75FF [[VRAM]] region to add bits to the tile numbers.&lt;br /&gt;
&lt;br /&gt;
The chips use latches to store the additional bits at the beginning of a line, and &amp;quot;distributes&amp;quot; them during render. Synchronization might just be free running, started by /RESET and clocked with 6MB ?&lt;br /&gt;
&lt;br /&gt;
Games marked [*] do hold 512KB fix data, however they ultimately only use a 128KB section, making the banking mechanism pointless.&lt;br /&gt;
&lt;br /&gt;
NEO-CMC 042 has been observed using type 1 only. NEO-CMC 050 has been observed using both type 1 and type 2.&lt;br /&gt;
&lt;br /&gt;
==Type 1 (per line banking)==&lt;br /&gt;
&lt;br /&gt;
Infos from Mr K (MAME).&lt;br /&gt;
&lt;br /&gt;
Used by:&lt;br /&gt;
* [[Garou - Mark of the Wolves]] (NEO-CMC 042)&lt;br /&gt;
* [[Metal Slug 3]] (NEO-CMC 042) [*]&lt;br /&gt;
* [[Metal Slug 4]] (NEO-CMC 050) [*]&lt;br /&gt;
&lt;br /&gt;
The 042 version of NEO-CMC allows fix data up to 512KiB (16384 tiles instead of 4096), by changing the bank (4 maximum) for groups of 2 line of tiles (or more ?). For this, the $7500~$75BF area in VRAM is used.&lt;br /&gt;
&lt;br /&gt;
* The $7500~$753F area even words (32 total) contain a flag to indicate if the bank has to be changed for the corresponding tile line.&lt;br /&gt;
* The $7580~$75BF area even words (32 total) contain bank numbers for each of the tile lines.&lt;br /&gt;
&lt;br /&gt;
If for a given line, the flag is set to $0200 (group size ?), the bank is read, changed, and will remain the same until it&#039;s changed again (it doesn&#039;t go back to 0 if the next line doesn&#039;t have the flag set).&lt;br /&gt;
&lt;br /&gt;
Bank number:&lt;br /&gt;
{{16BitRegister|Has to be $FF ($0F works?)|8|Unused ?|6|Bank number|2}}&lt;br /&gt;
&lt;br /&gt;
Bank bits are inverted (00 = bank 3, 11 = bank 0).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This needs further research, see MAME video/neogeo.c&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Type 2 (per tile banking)==&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc50bs.png|400px|right]]&lt;br /&gt;
&lt;br /&gt;
Used by:&lt;br /&gt;
* [[The King of Fighters 2000]] (NEO-CMC 050)&lt;br /&gt;
* [[Matrimelee]] (NEO-CMC 050) [*]&lt;br /&gt;
* [[SNK vs. Capcom - SVC Chaos]] (NEO-CMC 050)&lt;br /&gt;
* [[The King of Fighters 2003]] (NEO-CMC 050)&lt;br /&gt;
&lt;br /&gt;
The 050 version of NEO-CMC allows to add 2 bits to all the fix tile indexes individually, also allowing to use 16384 tiles at most but in a simpler manner and with no restrictions. For this, the $7500~$75DF area of VRAM is used.&lt;br /&gt;
&lt;br /&gt;
Each word in this area gives the bank number for 6 horizontally consecutive fix tiles corresponding to the line:&lt;br /&gt;
{{16BitRegister|Unused ?|4|a|2|b|2|c|2|d|2|e|2|f|2}}&lt;br /&gt;
&lt;br /&gt;
Those bank bits are inverted (00 = bank 3, 11 = bank 0).&lt;br /&gt;
&lt;br /&gt;
The words are organized as in the fix map for a PAL screen (first and last lines aren&#039;t used): from top to bottom and left to right. The &amp;quot;e&amp;quot; and &amp;quot;f&amp;quot; group of bits are unused in the last column ($75C0+).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
*Tile at X=0, Y=1 has its bank number in bits a of $7500&lt;br /&gt;
*Tile at X=0, Y=5 has its bank number in bits a of $7504&lt;br /&gt;
*Tile at X=3, Y=2 has its bank number in bits d of $7501&lt;br /&gt;
*Tile at X=7, Y=9 has its bank number in bits b of $7528&lt;br /&gt;
&lt;br /&gt;
[[Category:Video system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Phantom&amp;diff=6407</id>
		<title>Phantom</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Phantom&amp;diff=6407"/>
		<updated>2019-01-25T14:39:53Z</updated>

		<summary type="html">&lt;p&gt;Hpman: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Made by [[!Arcade!]].&lt;br /&gt;
&lt;br /&gt;
Completely passive PROG board.&lt;br /&gt;
&lt;br /&gt;
CHA board has a potted [[NEO-ZMC2]] or [[NEO-CMC]].&lt;br /&gt;
&lt;br /&gt;
[[Metal Slug X - Super Vehicle-001]] fix suggested by DavidG: patch CHA A29 (SDRD1) to PROG B35 (/RESET).&lt;br /&gt;
&lt;br /&gt;
[[Metal Slug X - Super Vehicle-001]] fix, making sense edition: attach a pullup resistor to the /RESET line.&lt;br /&gt;
&lt;br /&gt;
/SLOTCS is routed to 4MB, because reasons. Re-route to ground to fix link cable features.&lt;br /&gt;
&lt;br /&gt;
[[Category:Cartridge systems]]&lt;br /&gt;
[[Category:Chips]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Phantom&amp;diff=6406</id>
		<title>Phantom</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Phantom&amp;diff=6406"/>
		<updated>2019-01-25T14:28:08Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Made by [[!Arcade!]].&lt;br /&gt;
&lt;br /&gt;
Completely passive PROG board.&lt;br /&gt;
&lt;br /&gt;
CHA board has a potted [[NEO-ZMC2]] or [[NEO-CMC]].&lt;br /&gt;
&lt;br /&gt;
[[Metal Slug X - Super Vehicle-001]] fix suggested by DavidG: patch CHA A29 (SDRD1) to PROG B35 (/RESET).&lt;br /&gt;
&lt;br /&gt;
[[Metal Slug X - Super Vehicle-001]] fix, making sense edition: attach a pullup resistor to the /RESET line.&lt;br /&gt;
&lt;br /&gt;
/SLOTCS is routed to 4MB, because reasons. Re-oute to ground to fix link cable features.&lt;br /&gt;
&lt;br /&gt;
[[Category:Cartridge systems]]&lt;br /&gt;
[[Category:Chips]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=6355</id>
		<title>68k instructions timings</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=6355"/>
		<updated>2018-11-25T16:44:10Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* JMP, JSR, LEA, PEA and MOVEM instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mirrored information from [[http://oldwww.nvg.ntnu.no/amiga/MC680x0_Sections/mc68000timing.HTML oldwww.nvg.ntnu.no]]&lt;br /&gt;
&lt;br /&gt;
The number of bus &#039;&#039;&#039;r&#039;&#039;&#039;ead and &#039;&#039;&#039;w&#039;&#039;&#039;rite cycles are shown in parenthesis as (r/w). Any other cycles are internal.&lt;br /&gt;
&lt;br /&gt;
In the following tables, the headings have the following meanings:&lt;br /&gt;
* An : Address register operand&lt;br /&gt;
* Dn : Data register operand&lt;br /&gt;
* ea : Operand specified by an effective address&lt;br /&gt;
* M : Memory effective address operand&lt;br /&gt;
&lt;br /&gt;
To get the real execution time, multiply the total cycles count by 83.33ns ([[Clock|1/12MHz]]). An example is given in each section.&lt;br /&gt;
&lt;br /&gt;
The [[68k interrupts|vertical blank]] lasts exactly 40 lines * 384 pixels * 2 cycles per pixel = 30720 cycles (2.56ms).&lt;br /&gt;
&lt;br /&gt;
See [[optimization]].&lt;br /&gt;
&lt;br /&gt;
=Effective address operand calculation=&lt;br /&gt;
&lt;br /&gt;
This table lists the number of clock periods required to compute an instruction&#039;s effective address. It includes fetching of any extension words, the address computation, and fetching of the memory operand.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax||Adressing mode||B,W||L&lt;br /&gt;
|-&lt;br /&gt;
|Dn&lt;br /&gt;
|Data register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|An&lt;br /&gt;
|Address register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)&lt;br /&gt;
|Address register indirect&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)+&lt;br /&gt;
|Address register indirect, post inc.&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
| -(An)&lt;br /&gt;
|Address register indirect, pre dec.&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An)&lt;br /&gt;
|Address register indirect, displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An,ix)&lt;br /&gt;
|Address register indirect, index&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.w&lt;br /&gt;
|Absolute short&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.l&lt;br /&gt;
|Absolute long&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|16(4/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC)&lt;br /&gt;
|PC with displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC,ix)&lt;br /&gt;
|PC with index&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|#xxx&lt;br /&gt;
|Immediate&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Pre-dec is slower than post-inc&lt;br /&gt;
* There are no write cycles involved in processing the effective address&lt;br /&gt;
* The size of the index register (ix) does not affect execution time&lt;br /&gt;
&lt;br /&gt;
=Move instructions=&lt;br /&gt;
&lt;br /&gt;
These following two tables indicate the number of clock periods for the move instruction. This data includes instruction fetch, operand reads, and operand writes.&lt;br /&gt;
&lt;br /&gt;
==Byte and word==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.b (a0)+,$10201D&#039;&#039;&#039; (Byte (An)+ to xxx.L) takes 20 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|22(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|26(5/1)||class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|28(6/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
==Long==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.l $05012C,4(a1,d0)&#039;&#039;&#039; (Long xxx.L to d(An,ix)) takes 34 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|28(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;red&amp;quot;|30(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|34(6/2)||class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|36(7/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
=Standard instructions=&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;add.w d3,a7&#039;&#039;&#039; (Word ea Dn + An) takes 8 cycles.&lt;br /&gt;
&lt;br /&gt;
The number of clock periods shown in this table indicates the time required to perform the operations, store the results and read the next instruction. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || &amp;lt;ea&amp;gt;,An * || &amp;lt;ea&amp;gt;,Dn || Dn,&amp;lt;M&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADD&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|AND&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMP&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;yellow&amp;quot;|6(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|158(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|140(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EOR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) ***||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;orange&amp;quot;|8(1/0) ***||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!MULS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!MULU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|OR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) +**||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0) +**||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUB&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
notes:	+ Add effective address calculation time&lt;br /&gt;
	^ Word or long only&lt;br /&gt;
	* Indicates maximum value&lt;br /&gt;
       ** The base time of six clock periods is increased to eight		&lt;br /&gt;
	  if the effective address mode is register direct or &lt;br /&gt;
	  immediate (effective address time should also be added)&lt;br /&gt;
      *** Only available effective address mode is data register direct&lt;br /&gt;
	  &lt;br /&gt;
	DIVS,DIVU - The divide algorithm used by the MC68000 provides less&lt;br /&gt;
		    than 10% difference between the best and the worst case&lt;br /&gt;
		    timings.&lt;br /&gt;
	MULS,MULU - The multiply algorithm requires 38+2n clocks where&lt;br /&gt;
		    n is defined as:&lt;br /&gt;
		MULU: n = the number of ones in the &amp;lt;ea&amp;gt;&lt;br /&gt;
		MULS: n = concatenate the &amp;lt;ea&amp;gt; with a zero as the LSB;&lt;br /&gt;
			  n is the resultant number of 10 or 01 patterns&lt;br /&gt;
			  in the 17-bit source; i.e., worst case happens&lt;br /&gt;
			  when the source is $5555&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Immediate instructions=&lt;br /&gt;
&lt;br /&gt;
The number of clock periods periods shown in this table includes the time to fetch immediate operands, perform the operations, store the results and read the next operation. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || #,Dn || #,An || #,M&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ANDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMPI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;green&amp;quot;|8(2/0)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!MOVEQ&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)|| - || -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;yellow&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
	+ Add effective address calculation time&lt;br /&gt;
	* word only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Single operand instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the single operand&lt;br /&gt;
instructions. The number of clock periods and the number of read and write cycles&lt;br /&gt;
must be added respectively to those of the effective address calculation&lt;br /&gt;
where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	 memory&lt;br /&gt;
&lt;br /&gt;
CLR			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NBCD		  byte		6(1/0)		 8(1/1) +&lt;br /&gt;
NEG			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NEGX		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NOT			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
Scc			byte,false	4(1/0)		 8(1/1) +&lt;br /&gt;
			byte,true	6(1/0)		 8(1/1) +&lt;br /&gt;
TAS #		  byte		4(1/0)		10(1/1) +&lt;br /&gt;
TST			byte,word	4(1/0)		 4(1/0) +&lt;br /&gt;
			  long		4(1/0)		 4(1/0) +&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
        # This instruction should never be used on the Amiga as its invisiable&lt;br /&gt;
          read/write cycle can disrupt system DMA.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Shift and rotate instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the shift and rotate&lt;br /&gt;
instructions. The number of clock periods and the number of read and write&lt;br /&gt;
cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	memory&lt;br /&gt;
&lt;br /&gt;
ASR,ASL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
LSR,LSL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROR,ROL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROXR,ROXL	byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	n is the shift or rotate count&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Bit manipulation instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods required for the bit&lt;br /&gt;
manipulation instructions. The number of clock periods and the number of read and &lt;br /&gt;
write cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated. Dynamic: register, static: immediate.&lt;br /&gt;
&lt;br /&gt;
instruction  size            dynamic                 static&lt;br /&gt;
                        register   memory       register   memory	&lt;br /&gt;
BCHG         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BCLR         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long       10(1/0) *    -          14(2/0) *     -&lt;br /&gt;
BSET         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BTST         byte          -  	   4(1/0) +        -        8(2/0) +&lt;br /&gt;
             long        6(1/0)      -          10(2/0)       -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* indicates maximum value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conditional instructions=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Mnemonic || Displacement || Branch taken || Not taken&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Bcc&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|8(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;orange&amp;quot;|12(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BRA&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BSR&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|DBcc&lt;br /&gt;
|cc true&lt;br /&gt;
|&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|cc false&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=JMP, JSR, LEA, PEA and MOVEM instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This Table indicates the number of clock periods required for the jump,&lt;br /&gt;
jump-to-subroutine, load effective address, push effective address and&lt;br /&gt;
move multiple registers instructions.&lt;br /&gt;
&lt;br /&gt;
instr	size    (An)		(An)+		-(An)	 d(An)		d(An,ix)+   xxx.W      xxx.L      d(PC)      d(PC,ix)*&lt;br /&gt;
JMP     -	    8(2/0)	     -		      -    10(2/0)		 14(3/0)    10(2/0)    12(3/0)	  10(2/0)    14(3/0)&lt;br /&gt;
JSR     -	   16(2/2)	     -		      -	   18(2/2)		 22(2/2)    18(2/2)    20(3/2)	  18(2/2)    22(2/2)&lt;br /&gt;
LEA     -	    4(1/0)	     -		      -	    8(2/0)		 12(2/0)     8(2/0)    12(3/0)	   8(2/0)    12(2/0)&lt;br /&gt;
PEA     -	   12(1/2)	     -		      -	   16(2/2)		 20(2/2)    16(2/2)    20(3/2)	  16(2/2)    20(2/2)&lt;br /&gt;
MOVEM   word     12+4n       12+4n	      -      16+4n		   18+4n      16+4n      20+4n	    16+4n      18+4n&lt;br /&gt;
M-&amp;gt;R           (3+n/0)	   (3+n/0)	      -	   (4+n/0)		 (4+n/0)    (4+n/0)    (5+n/0)	  (4+n/0)    (4+n/0)&lt;br /&gt;
	    long     12+8n	     12+8n	      -	     16+8n		   18+8n      16+8n      20+8n	    16+8n      18+8n&lt;br /&gt;
		      (3+2n/0)    (3+2n/0)	      -   (4+2n/0)		(4+2n/0)   (4+2n/0)   (5+2n/0)	 (4+2n/0)   (4+2n/0)&lt;br /&gt;
MOVEM	word	  8+4n	     -		     8+4n	 12+4n  	   14+4n      12+4n      16+4n	    -			-&lt;br /&gt;
R-&amp;gt;M		     (2/n)	     -		    (2/n)	 (3/n)		   (3/n)      (3/n)      (4/n)	    -			-&lt;br /&gt;
	    long	  8+8n	     -		     8+8n	 12+8n  	   14+8n      12+8n      16+8n	    -			-&lt;br /&gt;
                (2/2n)	     -		   (2/2n)	(3/2n)		  (3/2n)     (3/2n)     (4/2n)	    -			-&lt;br /&gt;
&lt;br /&gt;
n is the number of registers to move&lt;br /&gt;
* is the size of the index register (ix) does not affect the instruction&#039;s&lt;br /&gt;
  execution time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Multi-precision instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the multi-precision&lt;br /&gt;
instructions. The number of clock periods includes the time to fetch both&lt;br /&gt;
operands, perform the operations, store the results and read the next &lt;br /&gt;
instructions.&lt;br /&gt;
&lt;br /&gt;
instruction	size		op Dn,Dn	op M,M&lt;br /&gt;
&lt;br /&gt;
ADDX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
			  long		8(1/0)		30(5/2)&lt;br /&gt;
CMPM		byte,word	  -			12(3/0)&lt;br /&gt;
			  long		  -			20(5/0)&lt;br /&gt;
SUBX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
			  long		8(1/0)		30(5/2)&lt;br /&gt;
ABCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
SBCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the following &lt;br /&gt;
miscellaneous instructions. The number of clock periods and plus the number&lt;br /&gt;
of read and write cycles must be added to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction		size	register	memory&lt;br /&gt;
&lt;br /&gt;
ANDI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ANDI to SR		word	 20(3/0)	   -&lt;br /&gt;
CHK				 -		 10(1/0) +	   -&lt;br /&gt;
EORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
EORI to SR		word	 20(3/0)	   -&lt;br /&gt;
ORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ORI to SR		word	 20(3/0)	   -&lt;br /&gt;
MOVE from SR	 -	 	  6(1/0)	 8(1/1)+&lt;br /&gt;
MOVE to CCR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
MOVE to SR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
EXG				 -		  6(1/0)	   -&lt;br /&gt;
EXT				word	  4(1/0)	   -&lt;br /&gt;
				long	  4(1/0)	   -&lt;br /&gt;
LINK		 	 -		 16(2/2)	   -&lt;br /&gt;
MOVE from USP	 -		  4(1/0)	   -&lt;br /&gt;
MOVE to USP	 	 -		  4(1/0)	   -&lt;br /&gt;
NOP				 -		  4(1/0)	   -&lt;br /&gt;
RESET			 -		132(1/0)	   -&lt;br /&gt;
RTE				 -		 20(5/0)	   -&lt;br /&gt;
RTR				 -		 20(5/0)	   -&lt;br /&gt;
RTS				 -		 16(4/0)	   -&lt;br /&gt;
STOP		 	 -		  4(0/0)	   -&lt;br /&gt;
SWAP		 	 -		  4(1/0)	   -&lt;br /&gt;
TRAPV (No Trap)	 -		  4(1/0)	   -&lt;br /&gt;
UNLK		 	 -		 12(3/0)	   -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Move Peripheral instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
instruction	size	register-&amp;gt;memory	memory-&amp;gt;register&lt;br /&gt;
&lt;br /&gt;
MOVEP		word	16(2/2)				16(4/0)	&lt;br /&gt;
			long	24(2/4)				24(6/0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Exception processing=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for exception processing.&lt;br /&gt;
The number of clock periods includes the time for all stacking, the vector&lt;br /&gt;
fetch and the fetch of the first two instruction words of the handler routine.&lt;br /&gt;
&lt;br /&gt;
	exception						periods&lt;br /&gt;
&lt;br /&gt;
	address error					50(4/7)&lt;br /&gt;
	bus error						50(4/7)&lt;br /&gt;
	CHK instruction (trap taken)	44(5/3)+&lt;br /&gt;
	Divide by Zero					42(5/3)&lt;br /&gt;
	illegal instruction				34(4/3)&lt;br /&gt;
	interrupt						44(5/3)*&lt;br /&gt;
	privilege violation				34(4/3)&lt;br /&gt;
	_____&lt;br /&gt;
	RESET **						40(6/0)&lt;br /&gt;
	trace							34(4/3)&lt;br /&gt;
	TRAP instruction				38(4/3)&lt;br /&gt;
	TRAPV instruction (trap taken)	34(4/3)&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* the interrupt acknowledge cycle is assumed to take four&lt;br /&gt;
	  clock periods&lt;br /&gt;
                                    _____     ____&lt;br /&gt;
	** indicates the time from when RESET and HALT are first&lt;br /&gt;
	  sampled as negated to when instruction execution starts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Base system]]&lt;br /&gt;
[[Category:Code]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Fatal_Fury_2&amp;diff=6325</id>
		<title>Fatal Fury 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Fatal_Fury_2&amp;diff=6325"/>
		<updated>2018-10-22T10:55:23Z</updated>

		<summary type="html">&lt;p&gt;Hpman: Build date&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GameInfo|right&lt;br /&gt;
|en_title=Fatal Fury 2 &lt;br /&gt;
|jp_title=Garou Densetsu 2 - arata-naru tatakai&lt;br /&gt;
|jp_title2=餓狼伝説 2&lt;br /&gt;
|developer=SNK&lt;br /&gt;
|ngh_id=047&lt;br /&gt;
|megcount=106&lt;br /&gt;
|mvs_release=yes&lt;br /&gt;
|mvs_release_en=y&lt;br /&gt;
|mvs_release_jp=y&lt;br /&gt;
|mvs_romset=fatfury2&lt;br /&gt;
|mvs_date=1992&lt;br /&gt;
|mvs_pchip=&lt;br /&gt;
|mvs_pboard=PROG-G2&lt;br /&gt;
|mvs_cboard=CHA42G-1&lt;br /&gt;
|aes_release=y&lt;br /&gt;
|aes_release_jp=y&lt;br /&gt;
|aes_release_en=y&lt;br /&gt;
|aes_romset=fatfury2&lt;br /&gt;
|aes_date=05/03/93&lt;br /&gt;
|cd_release=y&lt;br /&gt;
|cd_release_jp=y&lt;br /&gt;
|cd_release_en=y&lt;br /&gt;
|cd_date=09/09/94&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;320&amp;quot; heights=&amp;quot;240&amp;quot;&amp;gt;&lt;br /&gt;
File:FF2build.png|Fatal Fury 2 build date.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Protection==&lt;br /&gt;
&lt;br /&gt;
Uses {{Chipname|PRO-CT0}} as a protection chip.&lt;br /&gt;
&lt;br /&gt;
If one of the multiple protection checks fail, a flag is silently set. The game runs correctly during the first match, but the opponent in the second match will not be able to get hit, and the timer in next matches will be set to 2 seconds.&lt;br /&gt;
&lt;br /&gt;
If this happens on a real system, the cartridge might be a [[bootleg]] or simply defective.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Protection code==&lt;br /&gt;
&lt;br /&gt;
Uses lots of bogus addresses to confuse hackers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
00296A:&lt;br /&gt;
	move	#$5555,$255552		;LOAD&lt;br /&gt;
	move.b	$255551,$10AC2E		;Read GAD/GBD: $FF&lt;br /&gt;
	move.b	d0,$255551		;Clock&lt;br /&gt;
	move.b	$2FFFF1,$10AC2F		;Read GAD/GBD: $00&lt;br /&gt;
	move.b	d0,$2FFFF1		;Clock&lt;br /&gt;
	move.b	$200001,$10AC30		;Read GAD/GBD: $FF&lt;br /&gt;
	move.b	d0,$2FF001		;Clock&lt;br /&gt;
	move.b	$2FF001,$10AC31		;Read GAD/GBD: $00&lt;br /&gt;
	cmpi.l	#$FF00FF00,$10AC2E	;Compare reads&lt;br /&gt;
	beq	+&lt;br /&gt;
	move	#$3328,24580(a5)	;Lock up flag ?&lt;br /&gt;
+:&lt;br /&gt;
	rts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Load C: 00110011001100110011001100110011 ($33333333)&lt;br /&gt;
&lt;br /&gt;
PRO-CT0 serialize:&lt;br /&gt;
00110011 3&lt;br /&gt;
00110011 2&lt;br /&gt;
00110011 1&lt;br /&gt;
00110011 0&lt;br /&gt;
&lt;br /&gt;
GAD/GBD to D7~D0 remap (no effect): &lt;br /&gt;
&lt;br /&gt;
00110011 1&lt;br /&gt;
00110011 0&lt;br /&gt;
00110011 3&lt;br /&gt;
00110011 2&lt;br /&gt;
||||||||&lt;br /&gt;
00FF00FF -&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
012530:&lt;br /&gt;
	move	#$1234,$256782		;LOAD C $366A061A (00110110 01101010 00000110 00011010)&lt;br /&gt;
	move.b	$236001,18642(a5)	;Read GAD/GBD&lt;br /&gt;
	move.b	#$20,$236001		;Clock&lt;br /&gt;
	move.b	$236001,18643(a5)	;Read GAD/GBD&lt;br /&gt;
	move.b	#$20,$236001		;Clock&lt;br /&gt;
	move.b	$236001,18644(a5)	;Read GAD/GBD&lt;br /&gt;
	move.b	#$20,$236001		;Clock&lt;br /&gt;
	move.b	$236001,18645(a5)	;Read GAD/GBD&lt;br /&gt;
	move.b	#$20,$236001		;Clock&lt;br /&gt;
	move.l	18642(a5),d0&lt;br /&gt;
	subi.l	#$F05A3601,d0		;Compare reads&lt;br /&gt;
	rts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Load C: 00110110011010100000011000011010 ($366A061A)&lt;br /&gt;
&lt;br /&gt;
PRO-CT0 serialize:&lt;br /&gt;
00110110 3&lt;br /&gt;
01101010 2&lt;br /&gt;
00000110 1&lt;br /&gt;
00011010 0&lt;br /&gt;
&lt;br /&gt;
GAD/GBD to D7~D0 remap: &lt;br /&gt;
&lt;br /&gt;
00000110 1&lt;br /&gt;
00011010 0&lt;br /&gt;
00110110 3&lt;br /&gt;
01101010 2&lt;br /&gt;
||||||||&lt;br /&gt;
01365AF0 -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
	move	#$1824,$242812		;LOAD C&lt;br /&gt;
	move.b	$236009,18642(a5)	;Read GAD/GBD with H (reverse)&lt;br /&gt;
	move.b	#$20,$236009		;Clock&lt;br /&gt;
	move.b	$236009,18643(a5)	;Read GAD/GBD with H (reverse)&lt;br /&gt;
	move.b	#$20,$236009		;Clock&lt;br /&gt;
	move.b	$236009,18644(a5)	;Read GAD/GBD with H (reverse)&lt;br /&gt;
	move.b	#$20,$236009		;Clock&lt;br /&gt;
	move.b	$236009,18645(a5)	;Read GAD/GBD with H (reverse)&lt;br /&gt;
	move.b	#$20,$236009		;Clock&lt;br /&gt;
	move.l	18642(a5),d0&lt;br /&gt;
	subi.l	#$81422418,d0		;Compare reads&lt;br /&gt;
	rts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Load C: 00100100100000010100001000011000 ($24814218)&lt;br /&gt;
&lt;br /&gt;
PRO-CT0 serialize:&lt;br /&gt;
00100100 3&lt;br /&gt;
10000001 2&lt;br /&gt;
01000010 1&lt;br /&gt;
00011000 0&lt;br /&gt;
&lt;br /&gt;
GAD/GBD to D7~D0 remap: &lt;br /&gt;
&lt;br /&gt;
01000010 1&lt;br /&gt;
00011000 0&lt;br /&gt;
00100100 3&lt;br /&gt;
10000001 2&lt;br /&gt;
||||||||&lt;br /&gt;
18244281 &amp;lt;-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
	move	#$1234,$256782		;LOAD C&lt;br /&gt;
	move.b	$236005,18642(a5)	;Read GAD/GBD with EVEN (nibble swap)&lt;br /&gt;
	move.b	#$20,$236005		;Clock&lt;br /&gt;
	move.b	$236005,18643(a5)	;Read GAD/GBD with EVEN (nibble swap)&lt;br /&gt;
	move.b	#$20,$236005		;Clock&lt;br /&gt;
	move.b	$236005,18644(a5)	;Read GAD/GBD with EVEN (nibble swap)&lt;br /&gt;
	move.b	#$20,$236005		;Clock&lt;br /&gt;
	move.b	$236005,18645(a5)	;Read GAD/GBD with EVEN (nibble swap)&lt;br /&gt;
	move.b	#$20,$236005		;Clock&lt;br /&gt;
	move.l	18642(a5),d0&lt;br /&gt;
	subi.l	#$0FA56310,d0		;Compare reads&lt;br /&gt;
	rts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Load C: 00110110011010100000011000011010 ($366A061A)&lt;br /&gt;
&lt;br /&gt;
PRO-CT0 serialize:&lt;br /&gt;
00110110 3&lt;br /&gt;
01101010 2&lt;br /&gt;
00000110 1&lt;br /&gt;
00011010 0&lt;br /&gt;
&lt;br /&gt;
GAD/GBD to D7~D0 remap: &lt;br /&gt;
&lt;br /&gt;
00000110 1&lt;br /&gt;
00011010 0&lt;br /&gt;
00110110 3&lt;br /&gt;
01101010 2&lt;br /&gt;
||||||||&lt;br /&gt;
01365AF0 nibble swap: 1063A50F -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
	move	#$1824,$242812		;LOAD C&lt;br /&gt;
	move.b	$23600D,18642(a5)	;Read GAD/GBD with H and EVEN&lt;br /&gt;
	move.b	#$20,$23600D		;Clock&lt;br /&gt;
	move.b	$23600D,18643(a5)	;Read GAD/GBD with H and EVEN&lt;br /&gt;
	move.b	#$20,$23600D		;Clock&lt;br /&gt;
	move.b	$23600D,18644(a5)	;Read GAD/GBD with H and EVEN&lt;br /&gt;
	move.b	#$20,$23600D		;Clock&lt;br /&gt;
	move.b	$23600D,18645(a5)	;Read GAD/GBD with H and EVEN&lt;br /&gt;
	move.b	#$20,$23600D		;Clock&lt;br /&gt;
	move.l	18642(a5),d0&lt;br /&gt;
	subi.l	#$18244281,d0		;Compare reads&lt;br /&gt;
	rts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Load C: 00100100100000010100001000011000 ($24814218)&lt;br /&gt;
&lt;br /&gt;
PRO-CT0 serialize:&lt;br /&gt;
00100100 3&lt;br /&gt;
10000001 2&lt;br /&gt;
01000010 1&lt;br /&gt;
00011000 0&lt;br /&gt;
&lt;br /&gt;
GAD/GBD to D7~D0 remap: &lt;br /&gt;
&lt;br /&gt;
01000010 1&lt;br /&gt;
00011000 0&lt;br /&gt;
00100100 3&lt;br /&gt;
10000001 2&lt;br /&gt;
||||||||&lt;br /&gt;
18244281 nibble swap: &amp;lt;- 81422418&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=File:FF2build.png&amp;diff=6324</id>
		<title>File:FF2build.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=File:FF2build.png&amp;diff=6324"/>
		<updated>2018-10-22T10:52:42Z</updated>

		<summary type="html">&lt;p&gt;Hpman: FF2 build date&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FF2 build date&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=BIOS_RAM_locations&amp;diff=6228</id>
		<title>BIOS RAM locations</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=BIOS_RAM_locations&amp;diff=6228"/>
		<updated>2018-08-20T00:05:42Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The locations are (?) guaranteed to be identical accross all [[system ROM]] versions so that games can use them regardless of the system type.&lt;br /&gt;
&lt;br /&gt;
=Game Related=&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;DEF name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Set by&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$10FD84~$10FD93&lt;br /&gt;
|BIOS_GAME_DIP&lt;br /&gt;
|16 bytes&lt;br /&gt;
|BIOS&lt;br /&gt;
|[[Software DIPs]] values (game configuration)&lt;br /&gt;
|-&lt;br /&gt;
|$10FDAE&lt;br /&gt;
|BIOS_USER_REQUEST&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Request code for the [[USER subroutine]]. 0:Init, 1:Boot animation, 2:Demo, 3:Title&lt;br /&gt;
|-&lt;br /&gt;
|$10FDAF&lt;br /&gt;
|BIOS_USER_MODE&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS/Game&lt;br /&gt;
|Used by the game to tell what it&#039;s doing: 0:Init/Boot animation, 1:Title/Demo, 2:Game&lt;br /&gt;
[[Game selection]] can only be done on MVS systems when this byte is &amp;lt; 2&lt;br /&gt;
|-&lt;br /&gt;
|$10FDB0&lt;br /&gt;
|BIOS_CREDIT_DEC&lt;br /&gt;
|4 bytes&lt;br /&gt;
|Game&lt;br /&gt;
|Credit decrement value for each player (1, 2, 3, 4) when calling [[CREDIT DOWN]].&lt;br /&gt;
|-&lt;br /&gt;
|$10FDB4&lt;br /&gt;
|BIOS_START_FLAG&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Used when calling the [[PLAYER START subroutine]]. The 4 LSBs correspond to the player who pushed start.&lt;br /&gt;
|-&lt;br /&gt;
|$10FDB6&lt;br /&gt;
|BIOS_PLAYER_MOD1&lt;br /&gt;
|byte&lt;br /&gt;
|Game&lt;br /&gt;
|rowspan=&amp;quot;4|Sets player status. 0:Never played, 1:Playing, 2:Continue option being displayed, 3:Game over&lt;br /&gt;
|-&lt;br /&gt;
|$10FDB7&lt;br /&gt;
|BIOS_PLAYER_MOD2&lt;br /&gt;
|byte&lt;br /&gt;
|Game&lt;br /&gt;
|-&lt;br /&gt;
|$10FDB8&lt;br /&gt;
|BIOS_PLAYER_MOD3&lt;br /&gt;
|byte&lt;br /&gt;
|Game&lt;br /&gt;
|-&lt;br /&gt;
|$10FDB9&lt;br /&gt;
|BIOS_PLAYER_MOD4&lt;br /&gt;
|byte&lt;br /&gt;
|Game&lt;br /&gt;
|-&lt;br /&gt;
|$10FEC5&lt;br /&gt;
|BIOS_TITLE_MODE&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS/Game&lt;br /&gt;
|Newer games set this to 1 in their command 3 [[USER subroutine]]. It prevents the system ROM from calling command 3 twice after game over if credits are already in the system.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=System Related=&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;DEF name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Set by&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$10FD80&lt;br /&gt;
|BIOS_SYSTEM_MODE&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|0:BIOS wants vblank (system mode), $80:Ok to use vblank (game mode)&lt;br /&gt;
|-&lt;br /&gt;
|$10FD81&lt;br /&gt;
|BIOS_SYSRET_STATUS&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Internal value which stores the function code that [[SYSTEM_RETURN]] will call.&lt;br /&gt;
*0 : Init bram/select valid game for eye-catcher&lt;br /&gt;
*1 : Set the EL-LED to the correct value&lt;br /&gt;
*2 : Switch to the next slot, relaunch eye-catcher&lt;br /&gt;
*3 : After a gameover, save the playtime for bookeeping, switch to DEMO mode, reset the workbackup ram&lt;br /&gt;
*4 : Switch next slot (select p1 pressed)&lt;br /&gt;
*5 : Switch to previous slot (select p2 pressed)&lt;br /&gt;
*6 : Called after a coin deposit, does nothing&lt;br /&gt;
|-&lt;br /&gt;
|$10FD82&lt;br /&gt;
|BIOS_MVS_FLAG&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|System type. 0:AES, 1:MVS&lt;br /&gt;
|-&lt;br /&gt;
|$10FD83&lt;br /&gt;
|BIOS_COUNTRY_CODE&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|0:Japan, 1:USA, 2:Europe&lt;br /&gt;
|-&lt;br /&gt;
|$10FE80&lt;br /&gt;
|BIOS_DEVMODE&lt;br /&gt;
|8 bytes&lt;br /&gt;
|BIOS&lt;br /&gt;
|All set to 0x00 in normal mode. Set to &amp;quot;1streset&amp;quot; string in developer mode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Joypad Related=&lt;br /&gt;
&lt;br /&gt;
These values are updated by calling [[SYSTEM_IO]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;DEF name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Set by&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$10FD94&lt;br /&gt;
|BIOS_P1STATUS&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|0:No connection, 1:Normal joypad, 2:Expanded joypad, 3:Mahjong controller, 4:Keyboard&lt;br /&gt;
|-&lt;br /&gt;
|$10FD95&lt;br /&gt;
|BIOS_P1PREVIOUS&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Inputs on previous frame [DCBA Right Left Down Up] (positive logic).&lt;br /&gt;
|-&lt;br /&gt;
|$10FD96&lt;br /&gt;
|BIOS_P1CURRENT&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Inputs on current frame [DCBA Right Left Down Up] (positive logic).&lt;br /&gt;
|-&lt;br /&gt;
|$10FD97&lt;br /&gt;
|BIOS_P1CHANGE&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Buttons just pressed, active edge [DCBA Right Left Down Up] (positive logic).&lt;br /&gt;
|-&lt;br /&gt;
|$10FD98&lt;br /&gt;
|BIOS_P1REPEAT&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Active edge + repeat every 8 frames after 16 frames. [DCBA Right Left Down Up] (positive logic).&lt;br /&gt;
|-&lt;br /&gt;
|$10FD99&lt;br /&gt;
|BIOS_P1TIMER&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Repeat timer (counts down from 8 to 0).&lt;br /&gt;
|-&lt;br /&gt;
|$10FD9A~$10FD9F&lt;br /&gt;
|Same for P2&lt;br /&gt;
|6 bytes&lt;br /&gt;
|BIOS&lt;br /&gt;
|See above&lt;br /&gt;
|-&lt;br /&gt;
|$10FDA0~$10FDA6&lt;br /&gt;
|Same for P3&lt;br /&gt;
|6 bytes&lt;br /&gt;
|BIOS&lt;br /&gt;
|See above&lt;br /&gt;
|-&lt;br /&gt;
|$10FDA7~$10FDAB&lt;br /&gt;
|Same for P4&lt;br /&gt;
|6 bytes&lt;br /&gt;
|BIOS&lt;br /&gt;
|See above&lt;br /&gt;
|-&lt;br /&gt;
|$10FDAC&lt;br /&gt;
|BIOS_STATCURNT&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Select P4, Start P4, Select P3, Start P3, Select P2, Start P2, Select P1, Start P1 (positive logic)&lt;br /&gt;
&lt;br /&gt;
On AES systems the select bits are always read as 0 ?&lt;br /&gt;
|-&lt;br /&gt;
|$10FDAD&lt;br /&gt;
|BIOS_STATCHANGE&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Select P4, Start P4, Select P3, Start P3, Select P2, Start P2, Select P1, Start P1 (positive logic)&lt;br /&gt;
&lt;br /&gt;
On AES systems the select bits are always read as 0 ?&lt;br /&gt;
|-&lt;br /&gt;
|$10FEDC&lt;br /&gt;
|BIOS_STATCURNT_RAW&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Select P4, Start P4, Select P3, Start P3, Select P2, Start P2, Select P1, Start P1 (positive logic)&lt;br /&gt;
|-&lt;br /&gt;
|$10FEDD&lt;br /&gt;
|BIOS_STATCHANGE_RAW&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Select P4, Start P4, Select P3, Start P3, Select P2, Start P2, Select P1, Start P1 (positive logic)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Memory Card Related=&lt;br /&gt;
&lt;br /&gt;
See [[CARD]] for more details on those variables.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;DEF name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Set by&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$10FDC4&lt;br /&gt;
|BIOS_CARD_COMMAND&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS or Game&lt;br /&gt;
|Command to execute&lt;br /&gt;
|-&lt;br /&gt;
|$10FDC5&lt;br /&gt;
|BIOS_CARD_MODE&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS?&lt;br /&gt;
|Internal use?&lt;br /&gt;
|-&lt;br /&gt;
|$10FDC6&lt;br /&gt;
|BIOS_CARD_ANSWER&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Answer code for the command&lt;br /&gt;
|-&lt;br /&gt;
|$10FDC8&lt;br /&gt;
|BIOS_CARD_START&lt;br /&gt;
|longword&lt;br /&gt;
|BIOS or Game&lt;br /&gt;
|Pointer to data&lt;br /&gt;
|-&lt;br /&gt;
|$10FDCC&lt;br /&gt;
|BIOS_CARD_SIZE&lt;br /&gt;
|word&lt;br /&gt;
|BIOS or Game&lt;br /&gt;
|Size of data&lt;br /&gt;
|-&lt;br /&gt;
|$10FDCE&lt;br /&gt;
|BIOS_CARD_FCB&lt;br /&gt;
|word&lt;br /&gt;
|BIOS or Game&lt;br /&gt;
|Game NGH number&lt;br /&gt;
|-&lt;br /&gt;
|$10FDD0&lt;br /&gt;
|BIOS_CARD_SUB&lt;br /&gt;
|byte or word&lt;br /&gt;
|BIOS or Game&lt;br /&gt;
|Game Subnumber&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=MESS OUT Related=&lt;br /&gt;
&lt;br /&gt;
See [[MESS_OUT]] to know how to use this routine.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;DEF name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Set by&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$10FDBE&lt;br /&gt;
|BIOS_MESS_POINT&lt;br /&gt;
|longword&lt;br /&gt;
|Game&lt;br /&gt;
|Buffer pointer&lt;br /&gt;
|-&lt;br /&gt;
|$10FDC2&lt;br /&gt;
|BIOS_MESS_BUSY&lt;br /&gt;
|byte&lt;br /&gt;
|Game&lt;br /&gt;
|0:Allow MESS_OUT, 1:Skip MESS_OUT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Calendar Related=&lt;br /&gt;
&lt;br /&gt;
Those value are updated when [[READ_CALENDAR]] is called&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;DEF name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Set by&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$10FDD2&lt;br /&gt;
|BIOS_YEAR&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Current year&lt;br /&gt;
|-&lt;br /&gt;
|$10FDD3&lt;br /&gt;
|BIOS_MONTH&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Current month&lt;br /&gt;
|-&lt;br /&gt;
|$10FDD4&lt;br /&gt;
|BIOS_DAY&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Current day&lt;br /&gt;
|-&lt;br /&gt;
|$10FDD5&lt;br /&gt;
|BIOS_WEEKDAY&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Current weekday (Sunday = 00, Monday = 01 ... Saturday = 06)&lt;br /&gt;
|-&lt;br /&gt;
|$10FDD6&lt;br /&gt;
|BIOS_HOUR&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Current hour (24h format)&lt;br /&gt;
|-&lt;br /&gt;
|$10FDD7&lt;br /&gt;
|BIOS_MINUTE&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Current minute&lt;br /&gt;
|-&lt;br /&gt;
|$10FDD8&lt;br /&gt;
|BIOS_SECOND&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Current minute&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Internal=&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;DEF name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Set by&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$10FCEF&lt;br /&gt;
|BIOS_SLOTCHECK&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|[[Slot check]] passed if non-zero&lt;br /&gt;
|-&lt;br /&gt;
|$10FDDA&lt;br /&gt;
|BIOS_COMPULSION_TIMER&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Timer for the game compulsion start feature, in seconds. BCD format.&lt;br /&gt;
|-&lt;br /&gt;
|$10FDDB&lt;br /&gt;
|BIOS_COMPULSION_FRAME_TIMER&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Frame-based timer for the game compulsion start feature.&lt;br /&gt;
&lt;br /&gt;
When it underflows, the timer is reset to 59 and START_COMPULSION_TIMER is decremented.&lt;br /&gt;
|-&lt;br /&gt;
|$10FE88&lt;br /&gt;
|BIOS_FRAME_COUNTER&lt;br /&gt;
|longword&lt;br /&gt;
|BIOS&lt;br /&gt;
|Frame counter, updated by SYSTEM_IO.&lt;br /&gt;
|-&lt;br /&gt;
|$10FEBF&lt;br /&gt;
|BIOS_BRAM_USED&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|0:[[Backup RAM]] not currently used, 1:Currently used&lt;br /&gt;
|-&lt;br /&gt;
|$10FEE1&lt;br /&gt;
|BIOS_FRAME_SKIP&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Number of frames to skip in the routine which checks demo_end or if the player has pressed start.&lt;br /&gt;
&lt;br /&gt;
Decremented in [[SYSTEM_IO]].&lt;br /&gt;
|-&lt;br /&gt;
|$10FEE3&lt;br /&gt;
|BIOS_INT1_SKIP&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Only used in [[SYSTEM_INT1]]. If non-zero, will only do the [[RTC]] check during INT1.&lt;br /&gt;
|-&lt;br /&gt;
|$10FEE4&lt;br /&gt;
|BIOS_INT1_FRAME_COUNTER&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Frame counter, only used in [[SYSTEM_INT1]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=4P mode related=&lt;br /&gt;
&lt;br /&gt;
Thoses will be valid on a 4P compatible bios only&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;DEF name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Set by&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$10FEF8&lt;br /&gt;
|BIOS_4P_REQUESTED&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Keeps a local copy of hard dip 2 status on bootup.&lt;br /&gt;
&lt;br /&gt;
0: dip2 wasn&#039;t set&lt;br /&gt;
&lt;br /&gt;
$2: dip 2 was on.&lt;br /&gt;
|-&lt;br /&gt;
|$10FEFA&lt;br /&gt;
|BIOS_4P_MODE&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|Main 4P flag, is set when hard dip 2 is on and 4P board is found.&lt;br /&gt;
&lt;br /&gt;
0: regular play&lt;br /&gt;
&lt;br /&gt;
$FF: 4P mode game&lt;br /&gt;
|-&lt;br /&gt;
|$10FEFB&lt;br /&gt;
|BIOS_4P_PLUGGED&lt;br /&gt;
|byte&lt;br /&gt;
|BIOS&lt;br /&gt;
|0: 4P board not found&lt;br /&gt;
&lt;br /&gt;
$FF: 4P board plugged&lt;br /&gt;
&lt;br /&gt;
4P compatible bios will check for 4P board regardless of dip2 switch status.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=CD only=&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;DEF name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Set by&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$10FEF4&lt;br /&gt;
|BIOS_UPDEST&lt;br /&gt;
|Long&lt;br /&gt;
|Game&lt;br /&gt;
|Copy destination address&lt;br /&gt;
|-&lt;br /&gt;
|$10FEF8&lt;br /&gt;
|BIOS_UPSRC&lt;br /&gt;
|Long&lt;br /&gt;
|Game&lt;br /&gt;
|Copy source address&lt;br /&gt;
|-&lt;br /&gt;
|$10FEFC&lt;br /&gt;
|BIOS_UPSIZE&lt;br /&gt;
|Long&lt;br /&gt;
|Game&lt;br /&gt;
|Copy data size&lt;br /&gt;
|-&lt;br /&gt;
|$10FEDA&lt;br /&gt;
|BIOS_UPZONE&lt;br /&gt;
|Byte&lt;br /&gt;
|Game&lt;br /&gt;
|Copy zone (0=PRG, 1=FIX, 2=SPR, 3=Z80, 4=PCM, 5=PAT, 7=OBJ, 8=A** files)&lt;br /&gt;
|-&lt;br /&gt;
|$10FEDB&lt;br /&gt;
|BIOS_UPBANK&lt;br /&gt;
|Byte&lt;br /&gt;
|Game&lt;br /&gt;
|Copy bank&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Others=&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;DEF name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Set by&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$10FCEE&lt;br /&gt;
|?&lt;br /&gt;
|byte&lt;br /&gt;
|GAME&lt;br /&gt;
|Z80/M ROM check pass&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Base system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Palettes&amp;diff=6151</id>
		<title>Palettes</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Palettes&amp;diff=6151"/>
		<updated>2018-06-30T19:01:31Z</updated>

		<summary type="html">&lt;p&gt;Hpman: Undo revision 6150 by Hpman (talk) I is stoopid&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Palmap.png|500px|thumb|Palettes organization.]]&lt;br /&gt;
There are 2 banks (one usable at a time) of 256 palettes available. Each palette has 16 color entries, the first being the transparent index (&amp;quot;color 0&amp;quot;), the 15 others are real colors, made of 16-bit RGB definitions.&lt;br /&gt;
&lt;br /&gt;
[[Sprites|Sprite]] tiles can use &#039;&#039;&#039;any&#039;&#039;&#039; of the 256 palettes, while the [[Fix layer|fix]] tiles can &#039;&#039;&#039;only use the first 16&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The maximum number of colors on screen without [[timer interrupt]] tricks is: 256 palettes * 15 colors = &#039;&#039;&#039;3840&#039;&#039;&#039; (out of 2^16 = 65536).&lt;br /&gt;
&lt;br /&gt;
=Color format=&lt;br /&gt;
&lt;br /&gt;
See [[colors]].&lt;br /&gt;
&lt;br /&gt;
=Access=&lt;br /&gt;
&lt;br /&gt;
Palettes are located at $400000 in the [[68k memory map]]. They&#039;re physically stored in the [[palette RAM]].&lt;br /&gt;
&lt;br /&gt;
Byte writes are allowed, but the value will be written to both bytes of the word (/WE pins are tied together).&lt;br /&gt;
&lt;br /&gt;
The palettes can be read and written at full speed at any time. During active display, since the CPU has priority over rendering, the color read or written will be displayed during at least one pixel, resulting in noticeable &amp;quot;snow&amp;quot; if multiple colors are updated. A workaround is to update the palettes only during blanking (horizontal or vertical), over multiple frames if necessary.&lt;br /&gt;
&lt;br /&gt;
The bank can be set by doing a byte write to registers {{Reg|REG_PALBANK1}} or {{Reg|REG_PALBANK0}}.&lt;br /&gt;
&lt;br /&gt;
=Special colors=&lt;br /&gt;
&lt;br /&gt;
There are two special colors used:&lt;br /&gt;
&lt;br /&gt;
* The first color of the palette bank ($400000) is the [[reference color|&#039;&#039;&#039;R&#039;&#039;&#039;eference color]] for the video output. It always has to be pure black ($8000) otherwise monitors won&#039;t be happy and other colors won&#039;t be displayed correctly.&lt;br /&gt;
* The last color of the palette bank ($401FFE) is the [[backdrop color|&#039;&#039;&#039;B&#039;&#039;&#039;ackdrop color]], the color of the backmost [[layer]] on the screen. Caused by line buffers in {{Chipname|NEO-B1}} being cleared to $FFF (referencing the last color of the last palette).&lt;br /&gt;
&lt;br /&gt;
[[Category:Video system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Palettes&amp;diff=6150</id>
		<title>Palettes</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Palettes&amp;diff=6150"/>
		<updated>2018-06-30T19:00:28Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Palmap.png|500px|thumb|Palettes organization.]]&lt;br /&gt;
There are 2 banks (one usable at a time) of 256 palettes available. Each palette has 16 color entries, the first being the transparent index (&amp;quot;color 0&amp;quot;), the 15 others are real colors, made of 16-bit RGB definitions.&lt;br /&gt;
&lt;br /&gt;
[[Sprites|Sprite]] tiles can use &#039;&#039;&#039;any&#039;&#039;&#039; of the 256 palettes, while the [[Fix layer|fix]] tiles can &#039;&#039;&#039;only use the first 16&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The maximum number of colors on screen without [[timer interrupt]] tricks is: 256 palettes * 15 colors + 1 (backdrop) = &#039;&#039;&#039;3841&#039;&#039;&#039; (out of 2^16 = 65536).&lt;br /&gt;
&lt;br /&gt;
=Color format=&lt;br /&gt;
&lt;br /&gt;
See [[colors]].&lt;br /&gt;
&lt;br /&gt;
=Access=&lt;br /&gt;
&lt;br /&gt;
Palettes are located at $400000 in the [[68k memory map]]. They&#039;re physically stored in the [[palette RAM]].&lt;br /&gt;
&lt;br /&gt;
Byte writes are allowed, but the value will be written to both bytes of the word (/WE pins are tied together).&lt;br /&gt;
&lt;br /&gt;
The palettes can be read and written at full speed at any time. During active display, since the CPU has priority over rendering, the color read or written will be displayed during at least one pixel, resulting in noticeable &amp;quot;snow&amp;quot; if multiple colors are updated. A workaround is to update the palettes only during blanking (horizontal or vertical), over multiple frames if necessary.&lt;br /&gt;
&lt;br /&gt;
The bank can be set by doing a byte write to registers {{Reg|REG_PALBANK1}} or {{Reg|REG_PALBANK0}}.&lt;br /&gt;
&lt;br /&gt;
=Special colors=&lt;br /&gt;
&lt;br /&gt;
There are two special colors used:&lt;br /&gt;
&lt;br /&gt;
* The first color of the palette bank ($400000) is the [[reference color|&#039;&#039;&#039;R&#039;&#039;&#039;eference color]] for the video output. It always has to be pure black ($8000) otherwise monitors won&#039;t be happy and other colors won&#039;t be displayed correctly.&lt;br /&gt;
* The last color of the palette bank ($401FFE) is the [[backdrop color|&#039;&#039;&#039;B&#039;&#039;&#039;ackdrop color]], the color of the backmost [[layer]] on the screen. Caused by line buffers in {{Chipname|NEO-B1}} being cleared to $FFF (referencing the last color of the last palette).&lt;br /&gt;
&lt;br /&gt;
[[Category:Video system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=FM&amp;diff=6125</id>
		<title>FM</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=FM&amp;diff=6125"/>
		<updated>2018-06-18T19:32:01Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FM (&#039;&#039;&#039;F&#039;&#039;&#039;requency &#039;&#039;&#039;M&#039;&#039;&#039;odulation) is part of the {{Chipname|YM2610}} sound chip. It provides &#039;&#039;&#039;4 channels&#039;&#039;&#039;, each having their own set of 4 operators, panning and amplitude values. It&#039;s the most used way of producing music in games.&lt;br /&gt;
&lt;br /&gt;
=Common registers=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Address (Z80 port 4)&lt;br /&gt;
!Data (Z80 port 5)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|$21&lt;br /&gt;
|{{8BitRegister|?|8}}&lt;br /&gt;
| Test register. Ignore or set to $00 for normal operation.&lt;br /&gt;
|-&lt;br /&gt;
|$22&lt;br /&gt;
|{{8BitRegister|-|4|On|1|Control|3}}&lt;br /&gt;
| LFO control and frequency (see below).&lt;br /&gt;
|-&lt;br /&gt;
|$28&lt;br /&gt;
|{{8BitRegister|Slot (OP4/OP3/OP2/OP1)|4|-|1|Channel|3|}}&lt;br /&gt;
| Key On/Off for each channel, with operators control.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LFO frequency values are as follows:&lt;br /&gt;
*0 &amp;amp;ndash; 3.98Hz&lt;br /&gt;
*1 &amp;amp;ndash; 5.56Hz&lt;br /&gt;
*2 &amp;amp;ndash; 6.02Hz&lt;br /&gt;
*3 &amp;amp;ndash; 6.37Hz&lt;br /&gt;
*4 &amp;amp;ndash; 6.88Hz&lt;br /&gt;
*5 &amp;amp;ndash; 9.63Hz&lt;br /&gt;
*6 &amp;amp;ndash; 48.1Hz&lt;br /&gt;
*7 &amp;amp;ndash; 72.2Hz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Channel numbering:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 !FM Channel&lt;br /&gt;
 !Binary Code&lt;br /&gt;
|-&lt;br /&gt;
  | CH1&lt;br /&gt;
  | 001&lt;br /&gt;
|-&lt;br /&gt;
  | CH2&lt;br /&gt;
  | 010&lt;br /&gt;
|-&lt;br /&gt;
  | CH3&lt;br /&gt;
  | 101&lt;br /&gt;
|-&lt;br /&gt;
  | CH4&lt;br /&gt;
  | 110&lt;br /&gt;
|}&lt;br /&gt;
This strange numbering seems to be due to the fact YM2610 is a YM2610B with 2 removed FM channels (000 and 100).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Channel registers=&lt;br /&gt;
&lt;br /&gt;
Depending on which channel you want to write to, the {{Chipname|Z80}} ports used are different:&lt;br /&gt;
* Channels 1 &amp;amp; 2: Ports 4/5&lt;br /&gt;
* Channels 3 &amp;amp; 4: Ports 6/7&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=4|Address||colspan=4|Data||rowspan=3|&lt;br /&gt;
|-&lt;br /&gt;
|CH1||CH2||CH3||CH4||CH1||CH2||CH3||CH4&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|Port 4||colspan=2|Port 6||colspan=2|Port 5||colspan=2|Port 7&lt;br /&gt;
|-&lt;br /&gt;
|$A1||$A2||$A1||$A2&lt;br /&gt;
|colspan=4|{{8BitRegister|F-Num 1|8}}&lt;br /&gt;
|F-Numbers and Block (1/2)&lt;br /&gt;
|-&lt;br /&gt;
|$A5||$A6||$A5||$A6&lt;br /&gt;
|colspan=4|{{8BitRegister|-|2|Block|3|F-Num 2|3}}&lt;br /&gt;
|F-Numbers and Block (2/2)&amp;lt;br/&amp;gt;(must set this first)&lt;br /&gt;
|-&lt;br /&gt;
|$B1||$B2||$B1||$B2&lt;br /&gt;
|colspan=4|{{8BitRegister|-|2|FB|3|ALGO|3}}&lt;br /&gt;
|Feedback (FB) and Algorithm (ALGO)&lt;br /&gt;
|-&lt;br /&gt;
|$B5||$B6||$B5||$B6&lt;br /&gt;
|colspan=4|{{8BitRegister|L|1|R|1|AMS|2|-|1|PMS|3}}&lt;br /&gt;
|Left (L)/Right (R) output, AM Sense (AMS), and PM Sense (PMS)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2CH mode additional operator frequencies:&lt;br /&gt;
* OP1 frequency is stored in the usual CH2 frequency registers ($A2/$A6)&lt;br /&gt;
* write to Z80 ports 4/5&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=3|Address||colspan=4|Data||rowspan=2|&lt;br /&gt;
|-&lt;br /&gt;
|OP2||OP3||OP4||colspan=&amp;quot;4&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
|$A8||$A9||$AA&lt;br /&gt;
|colspan=4|{{8BitRegister|2CH * F-Num 1|8}}&lt;br /&gt;
|2CH mode F-Num LSB&lt;br /&gt;
|-&lt;br /&gt;
|$AC||$AD||$AE&lt;br /&gt;
|colspan=4|{{8BitRegister|-|2|2CH * Block|3|2CH * F-Num 2|3}}&lt;br /&gt;
|2CH mode F-Num MSB &amp;amp; Block&amp;lt;br/&amp;gt;(must set this first)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Operator registers=&lt;br /&gt;
The ranges given for the address represent all of the parameter values. Each channel&#039;s operators are laid out as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operator || 1 || 3 || 2 || 4&lt;br /&gt;
|-&lt;br /&gt;
! Channels 1, 3&lt;br /&gt;
| $x1 || $x5 || $x9 || $xD&lt;br /&gt;
|-&lt;br /&gt;
! Channels 2, 4&lt;br /&gt;
| $x2 || $x6 || $xA || $xE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=4|Address||colspan=4|Data||rowspan=3|&lt;br /&gt;
|-&lt;br /&gt;
|CH1||CH2||CH3||CH4||CH1||CH2||CH3||CH4&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|Port 4||colspan=2|Port 6||colspan=2|Port 5||colspan=2|Port 7&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$31-$3E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|1|DT|3|MUL|4}}&lt;br /&gt;
|Detune (DT) and Multiple (MUL)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$41-$4E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|1|Total Level|7|}}&lt;br /&gt;
|Total Level (Volume)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$51-$5E&lt;br /&gt;
|colspan=4|{{8BitRegister|KS|2|-|1|AR|5}}&lt;br /&gt;
|Key Scale (KS) and Attack Rate (AR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$61-$6E&lt;br /&gt;
|colspan=4|{{8BitRegister|AM|1|-|2|DR|5}}&lt;br /&gt;
|AM On (AM) and Decay Rate (DR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$71-$7E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|3|SR|5}}&lt;br /&gt;
|Sustain Rate (SR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$81-$8E&lt;br /&gt;
|colspan=4|{{8BitRegister|SL|4|RR|4}}&lt;br /&gt;
|Sustain Level (SL) and Release Rate (RR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$91-$9E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|4|SSG-EG|4}}&lt;br /&gt;
|Envelope generator (not to be confused with the [[SSG]] one)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Audio system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=NEO-CMC&amp;diff=6111</id>
		<title>NEO-CMC</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=NEO-CMC&amp;diff=6111"/>
		<updated>2018-06-03T02:22:51Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* Versions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ChipInfo&lt;br /&gt;
|picture=crt_cmc.jpg&lt;br /&gt;
|pkg=QFP180&lt;br /&gt;
|manu=toshiba&lt;br /&gt;
|date=1999 ?&lt;br /&gt;
|gates=A lot&lt;br /&gt;
|used_on={{PCB|CHAFIO}}...&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[File:brd_cmcnoref.jpg|thumb|&amp;quot;CMC50&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
Late SNK custom chip used for protection, bankswitching and latching on [[CHAFIO]] [[CHA board]]s.&lt;br /&gt;
&lt;br /&gt;
Descrambling/decryption infos can be found in [[https://github.com/mamedev/mame/blob/master/src/devices/bus/neogeo/prot_cmc.cpp  MAME:prot_cmc.c]]&lt;br /&gt;
&lt;br /&gt;
==Versions==&lt;br /&gt;
This chip is a TC190G series Toshiba ASIC developed between 1990 and 1994.&lt;br /&gt;
&lt;br /&gt;
The datasheet apparently can&#039;t be found anymore for any of the known types:&lt;br /&gt;
*TC190G06CF7008&lt;br /&gt;
*TC1&#039;&#039;&#039;90G06CF7042&#039;&#039;&#039;&lt;br /&gt;
*TC1&#039;&#039;&#039;90G06CF7050&#039;&#039;&#039;&lt;br /&gt;
(probably others...)&lt;br /&gt;
&lt;br /&gt;
SNK merged the following designs into this chip:&lt;br /&gt;
*{{Chipname|NEO-ZMC}}&lt;br /&gt;
*{{Chipname|NEO-273}}&lt;br /&gt;
*{{Chipname|PRO-CT0}}&lt;br /&gt;
*New scrambling system that interlaces M1 + (C* + S1) to decrypt all the graphics ROMs data in real time.&lt;br /&gt;
&lt;br /&gt;
The first released NEO-MVS CHAFIO PCBs came out with the &#039;&#039;&#039;042&#039;&#039;&#039; version of NEO-CMC, on the following cartridges:&lt;br /&gt;
*[[Zupapa!]]&lt;br /&gt;
*[[The King of Fighters &#039;99 - Millennium Battle]]&lt;br /&gt;
*[[Ganryu]]&lt;br /&gt;
*[[Garou - Mark of the Wolves]]&lt;br /&gt;
*[[Strikers 1945 Plus]]&lt;br /&gt;
*[[Prehistoric Isle 2]]&lt;br /&gt;
*[[Metal Slug 3]]&lt;br /&gt;
*[[Bang Bead]]&lt;br /&gt;
*[[Nightmare in the Dark]]&lt;br /&gt;
*[[Sengoku 3]]&lt;br /&gt;
&lt;br /&gt;
On this version only the [[S ROM|S1]] and [[C ROM]]s are encrypted and M1 remains unencrypted. Almost one year later, SNK decided to add one more layer, this time also encrypting M1. This new NEO-CMC chip had the &#039;&#039;&#039;050&#039;&#039;&#039; reference and was found in the following cartridges:&lt;br /&gt;
*[[Jockey Grand Prix]]&lt;br /&gt;
*[[The King of Fighters 2000]]&lt;br /&gt;
*[[The King of Fighters 2001]]&lt;br /&gt;
*[[Metal Slug 4]]&lt;br /&gt;
*[[Rage of the Dragons]]&lt;br /&gt;
*[[The King of Fighters 2002]]&lt;br /&gt;
*[[Matrimelee]]&lt;br /&gt;
*[[Pochi and Nyaa]]&lt;br /&gt;
*[[Metal Slug 5]]&lt;br /&gt;
*[[SNK vs. Capcom - SVC Chaos]]&lt;br /&gt;
*[[Samurai Shodown V]]&lt;br /&gt;
*[[The King of Fighters 2003]]&lt;br /&gt;
*[[Samurai Shodown V Special]]&lt;br /&gt;
&lt;br /&gt;
Until today, nobody has released a cloned chip on the underground market.&lt;br /&gt;
&lt;br /&gt;
==Fix handling==&lt;br /&gt;
&lt;br /&gt;
See [[fix bankswitching]].&lt;br /&gt;
&lt;br /&gt;
==Encryption==&lt;br /&gt;
&lt;br /&gt;
Todo.&lt;br /&gt;
&lt;br /&gt;
=Pinout=&lt;br /&gt;
[[File:Neocmc_7050_7042_pinout.png|x600px]]&lt;br /&gt;
&lt;br /&gt;
OpenOffice Draw file: [[File:Neocmc_7050_7042.odg]]&lt;br /&gt;
&lt;br /&gt;
Signals:&lt;br /&gt;
*C_e_D[0..15]: C odd data bus&lt;br /&gt;
*C_o_D[0..15]: C even data bus&lt;br /&gt;
*CX A[0..21]: C1~8 address bus&lt;br /&gt;
*Pins 87,88 contains a RC circuit clock driver like in a 8085 with X1 and X2 pinouts&lt;br /&gt;
*Pins 89 and 92 are shorted.&lt;br /&gt;
[[Category:Chips]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=PROGBK1&amp;diff=6110</id>
		<title>PROGBK1</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=PROGBK1&amp;diff=6110"/>
		<updated>2018-06-02T14:02:51Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* P1 ROM size */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Progbk1_mvs.jpg|thumb]]&lt;br /&gt;
&lt;br /&gt;
The only non-protected board that can bankswitch and use all [[V ROM]] space. Really common and very useful for homebrew stuff or converts.&lt;br /&gt;
&lt;br /&gt;
Often used as the PROG board in [[Neo Print]] cartridges.&lt;br /&gt;
&lt;br /&gt;
=P ROMs configuration=&lt;br /&gt;
&lt;br /&gt;
[[File:Progbk1p.png|650px]]&lt;br /&gt;
&lt;br /&gt;
==EP ROMs /OE==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!J1&lt;br /&gt;
!J2&lt;br /&gt;
|-&lt;br /&gt;
|/ROMOE&lt;br /&gt;
|/PORTOE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==P2 ROM /CE==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!J3&lt;br /&gt;
!J4&lt;br /&gt;
!J5&lt;br /&gt;
|-&lt;br /&gt;
|A18&lt;br /&gt;
|/A18&lt;br /&gt;
|GND (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==P2 ROM /OE==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!J6&lt;br /&gt;
!J7&lt;br /&gt;
!JB1&lt;br /&gt;
|-&lt;br /&gt;
|/ROMOE&lt;br /&gt;
|/PORTOE (default)&lt;br /&gt;
|/PORTOE, banks 0 and 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==P1 ROM /OE==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!J8&lt;br /&gt;
!J9&lt;br /&gt;
!J10&lt;br /&gt;
!JB2&lt;br /&gt;
|-&lt;br /&gt;
|/PORTOE&lt;br /&gt;
|/PORTOE AND /ROMOE&lt;br /&gt;
|/ROMOE (default)&lt;br /&gt;
|/PORTOE, banks 2 and 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==P1 ROM /CE==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!J11&lt;br /&gt;
!J12&lt;br /&gt;
!J13&lt;br /&gt;
|-&lt;br /&gt;
|A18&lt;br /&gt;
|/A18&lt;br /&gt;
|GND (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==P1 ROM size==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!JB3&lt;br /&gt;
!JB4&lt;br /&gt;
!Nothing&lt;br /&gt;
|-&lt;br /&gt;
|A19/NC is /PORTADRS (P1 is 16Mbit)&lt;br /&gt;
|A19/NC is BANK0 (because reasons?)&lt;br /&gt;
|P1 is 8Mbit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==P2 ROM size==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!JB5&lt;br /&gt;
!JB6&lt;br /&gt;
|-&lt;br /&gt;
|A20//BYTE is VCC (P2 is 16Mbit or less)&lt;br /&gt;
|A20//BYTE is BANK1 (P2 is 32Mbit)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The [[P ROM|P1 ROM]] can be 4Mbit, 8Mbit or 16Mbit (27C400/27C800/27C160).&lt;br /&gt;
* ROMs can be halved and mapped to 0x000000~0x0FFFFF or 0x200000~0x2FFFFF.&lt;br /&gt;
* If P1 is 4Mbit or 8Mbit, then P2 can contain a bankswitched ROM (same type as P1 plus 27C322). P1 appears in 0x000000~0x0FFFFF. P2 bank appears in 0x200000~0x2FFFFF.&lt;br /&gt;
&lt;br /&gt;
[[Bankswitching]] is done with the LS74. It&#039;s not needed if the game isn&#039;t banked. Any write to an odd address in the [[68k memory map|0x200000~0x2FFFFF]] range will set the bank.&lt;br /&gt;
&lt;br /&gt;
=V ROMs configuration=&lt;br /&gt;
&lt;br /&gt;
[[File:Progbk1v.png]]&lt;br /&gt;
&lt;br /&gt;
There is a maximum of 4 [[V ROM]]s which can be 8Mbit, 16Mbit or 32Mbit (27C800/27C160) for a maximum total size of 4 * 4MiB = 16MiB.&lt;br /&gt;
&lt;br /&gt;
A 4Mbit ROM can also be used, but only if there&#039;s one and only if it&#039;s in the last used slot.&lt;br /&gt;
&lt;br /&gt;
The size of the largest V ROM is selected with a pair of jumpers on 6 spots (3 possible choices).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Largest V ROM&lt;br /&gt;
!Jumper set&lt;br /&gt;
|-&lt;br /&gt;
|8Mbit (1MiB)&lt;br /&gt;
|JV1+JV2&lt;br /&gt;
|-&lt;br /&gt;
|16Mbit (2MiB)&lt;br /&gt;
|JV3+JV4&lt;br /&gt;
|-&lt;br /&gt;
|32Mbit (4MiB)&lt;br /&gt;
|JV5+JV6&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This pair of V ROM jumpers effectively choose a set of 2 of the [[PCM]] chip address outputs to input to the LS139, which will enable one out of the 4 V ROMs at a time.&lt;br /&gt;
&lt;br /&gt;
The JV7 to JV14 jumpers need to be set according to the ROM types. If it&#039;s less than 32Mbit, the JV7/JV8/JV9/JV10 jumper needs to be set (ground). If it&#039;s 32Mbit, the JV11/JV12/JV13/JV14 needs to be set (A20). This is because 32Mbit chips have their /BYTE pin replaced by A20.&lt;br /&gt;
&lt;br /&gt;
=Other=&lt;br /&gt;
&lt;br /&gt;
The LS08 is used to AND the /PORTOEU and /PORTOEL signals to get /PORTOE.&lt;br /&gt;
&lt;br /&gt;
* 4x 1/2/4MiB V ROMs&lt;br /&gt;
* 1/2MiB P1 ROM&lt;br /&gt;
* 1/2/4MiB P2 ROM&lt;br /&gt;
* 2x 512KiB EP1/EP2 ROM&lt;br /&gt;
* {{Chipname|PCM}} chip&lt;br /&gt;
* LS139, LS08, LS74A&lt;br /&gt;
&lt;br /&gt;
[[Category:Cartridge boards]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=NEO-ZMC&amp;diff=6100</id>
		<title>NEO-ZMC</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=NEO-ZMC&amp;diff=6100"/>
		<updated>2018-05-27T01:50:03Z</updated>

		<summary type="html">&lt;p&gt;Hpman: syntax&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ChipInfo&lt;br /&gt;
|picture=crt_zmc.jpg&lt;br /&gt;
|pkg=SOIC24&lt;br /&gt;
|manu=fujitsu&lt;br /&gt;
|date=1995 ?&lt;br /&gt;
|gates=&lt;br /&gt;
|used_on=[[cartridges]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Chipname|Z80}} &#039;&#039;&#039;M&#039;&#039;&#039;emory &#039;&#039;&#039;C&#039;&#039;&#039;ontroller. Provides a hardwired 32KiB bank and [[Z80 bankswitching|switchable 16, 8, 4, and 2KiB banks]] arranged as a register file. To save pins, the Z80&#039;s upper address lines (A15~A8) are used for data input. The chip&#039;s write strobe is [[Z80 port map|port]] address decoded inside the system.&lt;br /&gt;
&lt;br /&gt;
=Pinout=&lt;br /&gt;
[[File:Neo-zmc_pinout.png]]&lt;br /&gt;
&lt;br /&gt;
OpenOffice Draw file: [[File:neo-zmc.odg]]&lt;br /&gt;
&lt;br /&gt;
Pins 10, 11, 12 are surely not connected since the addressing scheme doesn&#039;t allow mapping over 512KiB.&lt;br /&gt;
&lt;br /&gt;
* SDA0, SDA1, SDA8~15: Z80 address bus&lt;br /&gt;
* M1 A11~M1 A18: [[M1 ROM]] address lines&lt;br /&gt;
* SDRD0: Decoded write signal from {{Chipname|NEO-D0}} (latch on rising edge)&lt;br /&gt;
&lt;br /&gt;
=Operation=&lt;br /&gt;
&lt;br /&gt;
SDA8~15 is used for the bank number (data), SDA0 and SDA1 for selecting the bank zone.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!SDA1&lt;br /&gt;
!SDA0&lt;br /&gt;
!Z80 port&lt;br /&gt;
!Bank zone&lt;br /&gt;
!Address range&lt;br /&gt;
!Size&lt;br /&gt;
!Latch size&lt;br /&gt;
|-&lt;br /&gt;
|0||0||$08||0||$F000~$F7FF||2KiB||8 bits&lt;br /&gt;
|-&lt;br /&gt;
|0||1||$09||1||$E000~$EFFF||4KiB||7 bits&lt;br /&gt;
|-&lt;br /&gt;
|1||0||$0A||2||$C000~$DFFF||8KiB||6 bits&lt;br /&gt;
|-&lt;br /&gt;
|1||1||$0B||3||$8000~$BFFF||16KiB||5 bits&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
[[File:Neo-zmz_operation.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
SDRD0 must be high before configuring banks.&lt;br /&gt;
&lt;br /&gt;
To configure a bank to be accessed (e.g. bank 0 in the $8000~$BFFF range):&lt;br /&gt;
* Set SDRD0 low (prepare for new bank configuration, outputs are tri-stated)&lt;br /&gt;
* Set SDA0~15 = &#039;&#039;&#039;$8003&#039;&#039;&#039; (select bank 0 and 16k range size) Why $8003 and not just $0003 ?&lt;br /&gt;
* Set SDRD0 high (latch bank, ready to convert inputs to proper output signals)&lt;br /&gt;
* Now, when the Z80 reads the &#039;&#039;&#039;$8000~BFFF&#039;&#039;&#039; range, NEO-ZMC will map this to the M1 ROM zone &#039;&#039;&#039;$00000~$03FFF&#039;&#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
To configure a bank to be accessed (e.g. bank 1 in the $8000~$BFFF range):&lt;br /&gt;
* Set SDRD0 low (prepare for new bank configuration, outputs are tri-stated)&lt;br /&gt;
* Set SDA0~15 = &#039;&#039;&#039;$8103&#039;&#039;&#039; (select bank 1 and 16k range size) Why $8103 and not just $0103 ?&lt;br /&gt;
* Set SDRD0 high (latch bank, ready to convert inputs to proper output signals)&lt;br /&gt;
* Now, when the Z80 reads the &#039;&#039;&#039;$8000~BFFF&#039;&#039;&#039; range, NEO-ZMC will map this to the M1 ROM zone &#039;&#039;&#039;$04000~$07FFF&#039;&#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
==Logic definition==&lt;br /&gt;
&lt;br /&gt;
Not tested.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
reg [7:0] WINDOW_0;&lt;br /&gt;
reg [6:0] WINDOW_1;&lt;br /&gt;
reg [5:0] WINDOW_2;&lt;br /&gt;
reg [4:0] WINDOW_3;&lt;br /&gt;
&lt;br /&gt;
assign MA = (!SDA[15]) ? {4&#039;b0000, SDA[14:11]} :     // Pass-through&lt;br /&gt;
		(SDA[15:12] == 4&#039;b1111) ? WINDOW_0 :&lt;br /&gt;
		(SDA[15:12] == 4&#039;b1110) ? {WINDOW_1, SDA[11]} :&lt;br /&gt;
		(SDA[15:13] == 3&#039;b110) ? {WINDOW_2, SDA[12:11]} :&lt;br /&gt;
		{WINDOW_3, SDA[13:11]};&lt;br /&gt;
&lt;br /&gt;
always @(posedge nSDRD0)&lt;br /&gt;
begin&lt;br /&gt;
  case (SDA[1:0])&lt;br /&gt;
    0: WINDOW_0 &amp;lt;= SDA[15:8];&lt;br /&gt;
    1: WINDOW_1 &amp;lt;= SDA[14:8];&lt;br /&gt;
    2: WINDOW_2 &amp;lt;= SDA[13:8];&lt;br /&gt;
    3: WINDOW_3 &amp;lt;= SDA[12:8];&lt;br /&gt;
  endcase&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Audio system]]&lt;br /&gt;
[[Category:Chips]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=YM2610_timers&amp;diff=6099</id>
		<title>YM2610 timers</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=YM2610_timers&amp;diff=6099"/>
		<updated>2018-05-24T22:41:06Z</updated>

		<summary type="html">&lt;p&gt;Hpman: I lied :(     (might still not be 100% accurate)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The {{Chipname|YM2610}} provides 2 timers (called A and B), used to time music playback by triggering [[Z80 interrupts]].&lt;br /&gt;
&lt;br /&gt;
The timer A is 10 bits wide, the timer B is only 8 bits wide.&lt;br /&gt;
&lt;br /&gt;
=Ranges=&lt;br /&gt;
&lt;br /&gt;
* Timer A interval: 72*(1024-value)/4M : 18µs to 18432µs (55.56Khz to 54.25Hz)&lt;br /&gt;
* Timer B interval: 1152*(256-value)/4M : 288µs to 73.728ms (3.47kHz to 13.56Hz)&lt;br /&gt;
* Smaller value=longer interval!&lt;br /&gt;
&lt;br /&gt;
=Registers=&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Address (Z80 port 4)&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Data (Z80 port 5)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$24&lt;br /&gt;
|{{8BitRegister|TA counter load bits MSBs|8}}&lt;br /&gt;
|-&lt;br /&gt;
|$25&lt;br /&gt;
|{{8BitRegister|-|6|TA counter load bits LSBs|2}}&lt;br /&gt;
|-&lt;br /&gt;
|$26&lt;br /&gt;
|{{8BitRegister|TB counter load|8}}&lt;br /&gt;
|-&lt;br /&gt;
|$27&lt;br /&gt;
|{{8BitRegister|CSM mode|1|2CH mode|1|Flag reset TB|1|Flag reset TA|1|Enable TB IRQ|1|Enable TA IRQ|1|Load TB|1|Load TA|1}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Operation=&lt;br /&gt;
&lt;br /&gt;
The timers are decremented at regular intervals until they reach 0, at which point an interrupt will be generated (if enabled). The timer which caused the interrupt can be known by reading [[YM2610 registers|port $04]].&lt;br /&gt;
&lt;br /&gt;
When a timer expires, it is automatically reloaded. If interrupts are enabled, care must be taken to clear the appropriate flag(s) so that they can be triggered again.&lt;br /&gt;
&lt;br /&gt;
The actual counters aren&#039;t accessible, only their load value can be written.&lt;br /&gt;
&lt;br /&gt;
* Writing 0 to the load bits in register $27 will reset the timer counters to zero.&lt;br /&gt;
* Writing 1 to the load bits will copy the respective timer load value to the timer counter. This only works when the counter is at zero.&lt;br /&gt;
&lt;br /&gt;
* Flag reset refers to the same flags that are read from port $04&lt;br /&gt;
* 2CH mode allows each of FM channel 2 operators to run at their own frequency.&lt;br /&gt;
* CSM mode is for automatic key-on for operators of the second FM channel when timer A expires ?&lt;br /&gt;
&lt;br /&gt;
[[Category:Audio system]]&lt;br /&gt;
[[Category:Code]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=FM&amp;diff=6098</id>
		<title>FM</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=FM&amp;diff=6098"/>
		<updated>2018-05-22T23:19:29Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FM (&#039;&#039;&#039;F&#039;&#039;&#039;requency &#039;&#039;&#039;M&#039;&#039;&#039;odulation) is part of the {{Chipname|YM2610}} sound chip. It provides &#039;&#039;&#039;4 channels&#039;&#039;&#039;, each having their own set of 4 operators, panning and amplitude values. It&#039;s the most used way of producing music in games.&lt;br /&gt;
&lt;br /&gt;
=Common registers=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Address (Z80 port 4)&lt;br /&gt;
!Data (Z80 port 5)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|$21&lt;br /&gt;
|{{8BitRegister|?|8}}&lt;br /&gt;
| Test register. Ignore or set to $00 for normal operation.&lt;br /&gt;
|-&lt;br /&gt;
|$22&lt;br /&gt;
|{{8BitRegister|-|4|On|1|Control|3}}&lt;br /&gt;
| LFO control and frequency (see below).&lt;br /&gt;
|-&lt;br /&gt;
|$28&lt;br /&gt;
|{{8BitRegister|Slot (OP4/OP3/OP2/OP1)|4|-|1|Channel|3|}}&lt;br /&gt;
| Key On/Off for each channel, with operators control.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LFO frequency values are as follows:&lt;br /&gt;
*0 &amp;amp;ndash; 3.98Hz&lt;br /&gt;
*1 &amp;amp;ndash; 5.56Hz&lt;br /&gt;
*2 &amp;amp;ndash; 6.02Hz&lt;br /&gt;
*3 &amp;amp;ndash; 6.37Hz&lt;br /&gt;
*4 &amp;amp;ndash; 6.88Hz&lt;br /&gt;
*5 &amp;amp;ndash; 9.63Hz&lt;br /&gt;
*6 &amp;amp;ndash; 48.1Hz&lt;br /&gt;
*7 &amp;amp;ndash; 72.2Hz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Channel numbering:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 !FM Channel&lt;br /&gt;
 !Binary Code&lt;br /&gt;
|-&lt;br /&gt;
  | CH1&lt;br /&gt;
  | 001&lt;br /&gt;
|-&lt;br /&gt;
  | CH2&lt;br /&gt;
  | 010&lt;br /&gt;
|-&lt;br /&gt;
  | CH3&lt;br /&gt;
  | 101&lt;br /&gt;
|-&lt;br /&gt;
  | CH4&lt;br /&gt;
  | 110&lt;br /&gt;
|}&lt;br /&gt;
This strange numbering seems to be due to the fact YM2610 is a YM2610B with 2 removed FM channels (000 and 100).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Channel registers=&lt;br /&gt;
&lt;br /&gt;
Depending on which channel you want to write to, the {{Chipname|Z80}} ports used are different:&lt;br /&gt;
* Channels 1 &amp;amp; 2: Ports 4/5&lt;br /&gt;
* Channels 3 &amp;amp; 4: Ports 6/7&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=4|Address||colspan=4|Data||rowspan=3|&lt;br /&gt;
|-&lt;br /&gt;
|CH1||CH2||CH3||CH4||CH1||CH2||CH3||CH4&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|Port 4||colspan=2|Port 6||colspan=2|Port 5||colspan=2|Port 7&lt;br /&gt;
|-&lt;br /&gt;
|$A1||$A2||$A1||$A2&lt;br /&gt;
|colspan=4|{{8BitRegister|F-Num 1|8}}&lt;br /&gt;
|F-Numbers and Block (1/2)&lt;br /&gt;
|-&lt;br /&gt;
|$A5||$A6||$A5||$A6&lt;br /&gt;
|colspan=4|{{8BitRegister|-|2|Block|3|F-Num 2|3}}&lt;br /&gt;
|F-Numbers and Block (2/2)&amp;lt;br/&amp;gt;(must set this first)&lt;br /&gt;
|-&lt;br /&gt;
|$B1||$B2||$B1||$B2&lt;br /&gt;
|colspan=4|{{8BitRegister|-|2|FB|3|ALGO|3}}&lt;br /&gt;
|Feedback (FB) and Algorithm (ALGO)&lt;br /&gt;
|-&lt;br /&gt;
|$B5||$B6||$B5||$B6&lt;br /&gt;
|colspan=4|{{8BitRegister|L|1|R|1|AMS|2|-|1|PMS|3}}&lt;br /&gt;
|Left (L)/Right (R) output, AM Sense (AMS), and PM Sense (PMS)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2CH mode additional operator frequencies:&lt;br /&gt;
* OP1 frequency is stored in the usual CH2 frequency registers ($A2/$A6)&lt;br /&gt;
* write to Z80 ports 4/5&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=3|Address||colspan=4|Data||rowspan=2|&lt;br /&gt;
|-&lt;br /&gt;
|OP2||OP3||OP4||colspan=&amp;quot;4&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
|$A8||$A9||$AA&lt;br /&gt;
|colspan=4|{{8BitRegister|2CH * F-Num 1|8}}&lt;br /&gt;
|2CH mode F-Num LSB&lt;br /&gt;
|-&lt;br /&gt;
|$AC||$AD||$AE&lt;br /&gt;
|colspan=4|{{8BitRegister|-|2|2CH * Block|3|2CH * F-Num 2|3}}&lt;br /&gt;
|2CH mode F-Num MSB &amp;amp; Block&amp;lt;br/&amp;gt;(must set this first)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Operator registers=&lt;br /&gt;
The ranges given for the address represent all of the parameter values. Each channel&#039;s operators are laid out as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operator || 1 || 2 || 3 || 4&lt;br /&gt;
|-&lt;br /&gt;
! Channels 1, 3&lt;br /&gt;
| $x1 || $x5 || $x9 || $xD&lt;br /&gt;
|-&lt;br /&gt;
! Channels 2, 4&lt;br /&gt;
| $x2 || $x6 || $xA || $xE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=4|Address||colspan=4|Data||rowspan=3|&lt;br /&gt;
|-&lt;br /&gt;
|CH1||CH2||CH3||CH4||CH1||CH2||CH3||CH4&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|Port 4||colspan=2|Port 6||colspan=2|Port 5||colspan=2|Port 7&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$31-$3E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|1|DT|3|MUL|4}}&lt;br /&gt;
|Detune (DT) and Multiple (MUL)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$41-$4E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|1|Total Level|7|}}&lt;br /&gt;
|Total Level (Volume)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$51-$5E&lt;br /&gt;
|colspan=4|{{8BitRegister|KS|2|-|1|AR|5}}&lt;br /&gt;
|Key Scale (KS) and Attack Rate (AR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$61-$6E&lt;br /&gt;
|colspan=4|{{8BitRegister|AM|1|-|2|DR|5}}&lt;br /&gt;
|AM On (AM) and Decay Rate (DR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$71-$7E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|3|SR|5}}&lt;br /&gt;
|Sustain Rate (SR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$81-$8E&lt;br /&gt;
|colspan=4|{{8BitRegister|SL|4|RR|4}}&lt;br /&gt;
|Sustain Level (SL) and Release Rate (RR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$91-$9E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|4|SSG-EG|4}}&lt;br /&gt;
|Envelope generator (not to be confused with the [[SSG]] one)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Audio system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=FM&amp;diff=6097</id>
		<title>FM</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=FM&amp;diff=6097"/>
		<updated>2018-05-22T23:13:17Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FM (&#039;&#039;&#039;F&#039;&#039;&#039;requency &#039;&#039;&#039;M&#039;&#039;&#039;odulation) is part of the {{Chipname|YM2610}} sound chip. It provides &#039;&#039;&#039;4 channels&#039;&#039;&#039;, each having their own set of 4 operators, panning and amplitude values. It&#039;s the most used way of producing music in games.&lt;br /&gt;
&lt;br /&gt;
=Common registers=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Address (Z80 port 4)&lt;br /&gt;
!Data (Z80 port 5)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|$21&lt;br /&gt;
|{{8BitRegister|?|8}}&lt;br /&gt;
| Test register. Ignore or set to $00 for normal operation.&lt;br /&gt;
|-&lt;br /&gt;
|$22&lt;br /&gt;
|{{8BitRegister|-|4|On|1|Control|3}}&lt;br /&gt;
| LFO control and frequency (see below).&lt;br /&gt;
|-&lt;br /&gt;
|$28&lt;br /&gt;
|{{8BitRegister|Slot (OP4/OP3/OP2/OP1)|4|-|1|Channel|3|}}&lt;br /&gt;
| Key On/Off for each channel.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LFO frequency values are as follows:&lt;br /&gt;
*0 &amp;amp;ndash; 3.98Hz&lt;br /&gt;
*1 &amp;amp;ndash; 5.56Hz&lt;br /&gt;
*2 &amp;amp;ndash; 6.02Hz&lt;br /&gt;
*3 &amp;amp;ndash; 6.37Hz&lt;br /&gt;
*4 &amp;amp;ndash; 6.88Hz&lt;br /&gt;
*5 &amp;amp;ndash; 9.63Hz&lt;br /&gt;
*6 &amp;amp;ndash; 48.1Hz&lt;br /&gt;
*7 &amp;amp;ndash; 72.2Hz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Channel numbering:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 !FM Channel&lt;br /&gt;
 !Binary Code&lt;br /&gt;
|-&lt;br /&gt;
  | CH1&lt;br /&gt;
  | 001&lt;br /&gt;
|-&lt;br /&gt;
  | CH2&lt;br /&gt;
  | 010&lt;br /&gt;
|-&lt;br /&gt;
  | CH3&lt;br /&gt;
  | 101&lt;br /&gt;
|-&lt;br /&gt;
  | CH4&lt;br /&gt;
  | 110&lt;br /&gt;
|}&lt;br /&gt;
This strange numbering seems to be due to the fact YM2610 is a YM2610B with 2 removed FM channels (000 and 100).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Channel registers=&lt;br /&gt;
&lt;br /&gt;
Depending on which channel you want to write to, the {{Chipname|Z80}} ports used are different:&lt;br /&gt;
* Channels 1 &amp;amp; 2: Ports 4/5&lt;br /&gt;
* Channels 3 &amp;amp; 4: Ports 6/7&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=4|Address||colspan=4|Data||rowspan=3|&lt;br /&gt;
|-&lt;br /&gt;
|CH1||CH2||CH3||CH4||CH1||CH2||CH3||CH4&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|Port 4||colspan=2|Port 6||colspan=2|Port 5||colspan=2|Port 7&lt;br /&gt;
|-&lt;br /&gt;
|$A1||$A2||$A1||$A2&lt;br /&gt;
|colspan=4|{{8BitRegister|F-Num 1|8}}&lt;br /&gt;
|F-Numbers and Block (1/2)&lt;br /&gt;
|-&lt;br /&gt;
|$A5||$A6||$A5||$A6&lt;br /&gt;
|colspan=4|{{8BitRegister|-|2|Block|3|F-Num 2|3}}&lt;br /&gt;
|F-Numbers and Block (2/2)&amp;lt;br/&amp;gt;(must set this first)&lt;br /&gt;
|-&lt;br /&gt;
|$B1||$B2||$B1||$B2&lt;br /&gt;
|colspan=4|{{8BitRegister|-|2|FB|3|ALGO|3}}&lt;br /&gt;
|Feedback (FB) and Algorithm (ALGO)&lt;br /&gt;
|-&lt;br /&gt;
|$B5||$B6||$B5||$B6&lt;br /&gt;
|colspan=4|{{8BitRegister|L|1|R|1|AMS|2|-|1|PMS|3}}&lt;br /&gt;
|Left (L)/Right (R) output, AM Sense (AMS), and PM Sense (PMS)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2CH mode additional operator frequencies:&lt;br /&gt;
* OP1 frequency is stored in the usual CH2 frequency registers ($A2/$A6)&lt;br /&gt;
* write to Z80 ports 4/5&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=3|Address||colspan=4|Data||rowspan=2|&lt;br /&gt;
|-&lt;br /&gt;
|OP2||OP3||OP4||colspan=&amp;quot;4&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
|$A8||$A9||$AA&lt;br /&gt;
|colspan=4|{{8BitRegister|2CH * F-Num 1|8}}&lt;br /&gt;
|2CH mode F-Num LSB&lt;br /&gt;
|-&lt;br /&gt;
|$AC||$AD||$AE&lt;br /&gt;
|colspan=4|{{8BitRegister|-|2|2CH * Block|3|2CH * F-Num 2|3}}&lt;br /&gt;
|2CH mode F-Num MSB &amp;amp; Block&amp;lt;br/&amp;gt;(must set this first)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Operator registers=&lt;br /&gt;
The ranges given for the address represent all of the parameter values. Each channel&#039;s operators are laid out as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operator || 1 || 2 || 3 || 4&lt;br /&gt;
|-&lt;br /&gt;
! Channels 1, 3&lt;br /&gt;
| $x1 || $x5 || $x9 || $xD&lt;br /&gt;
|-&lt;br /&gt;
! Channels 2, 4&lt;br /&gt;
| $x2 || $x6 || $xA || $xE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=4|Address||colspan=4|Data||rowspan=3|&lt;br /&gt;
|-&lt;br /&gt;
|CH1||CH2||CH3||CH4||CH1||CH2||CH3||CH4&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|Port 4||colspan=2|Port 6||colspan=2|Port 5||colspan=2|Port 7&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$31-$3E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|1|DT|3|MUL|4}}&lt;br /&gt;
|Detune (DT) and Multiple (MUL)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$41-$4E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|1|Total Level|7|}}&lt;br /&gt;
|Total Level (Volume)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$51-$5E&lt;br /&gt;
|colspan=4|{{8BitRegister|KS|2|-|1|AR|5}}&lt;br /&gt;
|Key Scale (KS) and Attack Rate (AR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$61-$6E&lt;br /&gt;
|colspan=4|{{8BitRegister|AM|1|-|2|DR|5}}&lt;br /&gt;
|AM On (AM) and Decay Rate (DR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$71-$7E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|3|SR|5}}&lt;br /&gt;
|Sustain Rate (SR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$81-$8E&lt;br /&gt;
|colspan=4|{{8BitRegister|SL|4|RR|4}}&lt;br /&gt;
|Sustain Level (SL) and Release Rate (RR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$91-$9E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|4|SSG-EG|4}}&lt;br /&gt;
|Envelope generator (not to be confused with the [[SSG]] one)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Audio system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=VRAM&amp;diff=6096</id>
		<title>VRAM</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=VRAM&amp;diff=6096"/>
		<updated>2018-05-22T09:38:53Z</updated>

		<summary type="html">&lt;p&gt;Hpman: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;VRAM&#039;&#039;&#039; stands for Video RAM.&lt;br /&gt;
&lt;br /&gt;
[[File:Aes_cxk5814.jpg|thumb|One of two CXK5814 2KiB RAM chips used for the upper zone of the VRAM ($8000~$87FF) on a AES system]]&lt;br /&gt;
&lt;br /&gt;
The NeoGeo has 68KiB of VRAM split in two: a 64KiB lower zone, and 4KiB higher zone. Contrary to other systems, the VRAM &#039;&#039;&#039;does not contain actual graphics&#039;&#039;&#039;. It is used to store [[Sprites|sprite]] attributes, the [[fix layer]] tile map and sprite lists for video rendering.&lt;br /&gt;
&lt;br /&gt;
Access to VRAM is always done through 3 [[memory mapped registers]] handled by the [[LSPC]], it does not appear in the [[68k]] address space. Every VRAM address points to a 16-bit word, not a byte.&lt;br /&gt;
&lt;br /&gt;
* {{Reg|REG_VRAMADDR ($3C0000)}} sets the VRAM address for the next read/write operation.&lt;br /&gt;
* {{Reg|REG_VRAMRW ($3C0002)}} is the data read or to write.&lt;br /&gt;
* {{Reg|REG_VRAMMOD ($3C0004)}} is the signed value automatically added to the VRAM address after a write.&lt;br /&gt;
&lt;br /&gt;
Due to the different access slots used internally for each of the VRAM zones, the address register must be set directly instead of relying on {{Reg|REG_VRAMMOD}} to cross zones ($0000~$7FFF to/from $8000~$FFFF).&lt;br /&gt;
&lt;br /&gt;
==Memory map==&lt;br /&gt;
[[File:Vrammap.png|right|frame]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Start&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;End&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Words&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Zone&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$0000&lt;br /&gt;
|$6FFF&lt;br /&gt;
|28K&lt;br /&gt;
|rowspan=3|Lower&lt;br /&gt;
|[[Sprites#SCB1|SCB1]]&lt;br /&gt;
|-&lt;br /&gt;
|$7000&lt;br /&gt;
|$74FF&lt;br /&gt;
|rowspan=2|4K&lt;br /&gt;
|[[Fix layer|Fix map]]&lt;br /&gt;
|-&lt;br /&gt;
|$7500&lt;br /&gt;
|$7FFF&lt;br /&gt;
|[[Fix bankswitching|Extension]]&lt;br /&gt;
|-&lt;br /&gt;
|$8000&lt;br /&gt;
|$81FF&lt;br /&gt;
|512&lt;br /&gt;
|rowspan=5|Upper&lt;br /&gt;
|[[Sprites#SCB2|SCB2]]&lt;br /&gt;
|-&lt;br /&gt;
|$8200&lt;br /&gt;
|$83FF&lt;br /&gt;
|512&lt;br /&gt;
|[[Sprites#SCB3|SCB3]]&lt;br /&gt;
|-&lt;br /&gt;
|$8400&lt;br /&gt;
|$85FF&lt;br /&gt;
|512&lt;br /&gt;
|[[Sprites#SCB4|SCB4]]&lt;br /&gt;
|-&lt;br /&gt;
|$8600&lt;br /&gt;
|$867F&lt;br /&gt;
|128&lt;br /&gt;
|Sprite list for even scanlines&lt;br /&gt;
|-&lt;br /&gt;
|$8680&lt;br /&gt;
|$86FF&lt;br /&gt;
|128&lt;br /&gt;
|Sprite list for odd scanlines&lt;br /&gt;
|-&lt;br /&gt;
|$8700&lt;br /&gt;
|$87FF&lt;br /&gt;
|256&lt;br /&gt;
|Unused (free)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Acces timing==&lt;br /&gt;
&lt;br /&gt;
Even if VRAM can be modified even during active display, some timing restrictions have to be met in order to avoid skipping writes or reading incorrect data. This is because the [[LSPC]] can only provide a limited number of access slots for the CPU between the video rendering steps.&lt;br /&gt;
&lt;br /&gt;
SNK imposed minimum waiting times to always be sure that no read or write operation to VRAM will fail:&lt;br /&gt;
&lt;br /&gt;
* After writing the VRAM address, a read will return valid data after 16 CPU cycles or more (&amp;gt;32mclk).&lt;br /&gt;
* After writing the VRAM data, a new address can be set after 16 CPU cycles or more (&amp;gt;32mclk).&lt;br /&gt;
* After writing the VRAM data, another write can be done after 12 CPU cycles or more (&amp;gt;24mclk).&lt;br /&gt;
&lt;br /&gt;
Note that these restrictions only concern the VRAM access, and not the other LSPC registers.&lt;br /&gt;
&lt;br /&gt;
[[Overclocking|Overclocked]] systems often produce video glitches because games are trying to access VRAM too quickly.&lt;br /&gt;
&lt;br /&gt;
==Speed==&lt;br /&gt;
&lt;br /&gt;
* Lower (slow) VRAM must be 120ns or less (3mclk).&lt;br /&gt;
* Upper (fast) VRAM must be 35ns or less (1mclk).&lt;br /&gt;
&lt;br /&gt;
[[Category:Video system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Logo_file&amp;diff=6092</id>
		<title>Logo file</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Logo_file&amp;diff=6092"/>
		<updated>2018-05-14T00:27:28Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cdzload.png|frame|CDZ default loading screen.]]&lt;br /&gt;
&lt;br /&gt;
[[File:kof96load.png|frame|KOF 96 custom loading screen (LOGO_E.PRG).]]&lt;br /&gt;
&lt;br /&gt;
LOGO files are optional files used to create custom CD loading screens.&lt;br /&gt;
&lt;br /&gt;
The [[system ROM]] automatically loads one of the following files according to the console&#039;s [[nationality]] setting, if present in the CD&#039;s root:&lt;br /&gt;
&lt;br /&gt;
* LOGO_E.PRG for European nationality.&lt;br /&gt;
* LOGO_U.PRG for US nationality.&lt;br /&gt;
* LOGO_J.PRG for Japanese nationality.&lt;br /&gt;
&lt;br /&gt;
The files must not be larger than ?? bytes. (KOF &#039;99 uses 16.3KB files)&lt;br /&gt;
&lt;br /&gt;
=File format=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Size&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|Word&lt;br /&gt;
|Flags&lt;br /&gt;
|-&lt;br /&gt;
|Longword&lt;br /&gt;
|Data type&lt;br /&gt;
|-&lt;br /&gt;
|Longword&lt;br /&gt;
|Data pointer&lt;br /&gt;
|-&lt;br /&gt;
|Longword&lt;br /&gt;
|Data type&lt;br /&gt;
|-&lt;br /&gt;
|Longword&lt;br /&gt;
|Data pointer&lt;br /&gt;
|-&lt;br /&gt;
|...&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Longword&lt;br /&gt;
|0xFFFFFFFF terminator&lt;br /&gt;
|-&lt;br /&gt;
|?&lt;br /&gt;
|Data previously pointed to...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first word represents flags:&lt;br /&gt;
&lt;br /&gt;
* Bit 0: If set, do not draw the default &#039;NOW LOADING please wait&#039; graphic (see picture top right).&lt;br /&gt;
* Bit 1: If set, no progress bar is drawn.&lt;br /&gt;
* Bit 2: If set, no animation is drawn.&lt;br /&gt;
&lt;br /&gt;
No other bits seem to be checked by the system ROM.&lt;br /&gt;
&lt;br /&gt;
The rest of the file&#039;s contents are &amp;quot;data type - pointer&amp;quot; longword pairs. The type codes used must be sorted in an ascending order. The file is terminated with a $FFFFFFFF type code. The valid type codes are:&lt;br /&gt;
&lt;br /&gt;
*1: Fix tiles&lt;br /&gt;
*2: Palette&lt;br /&gt;
*3: Tile map&lt;br /&gt;
*4: Animation map&lt;br /&gt;
&lt;br /&gt;
The pointer values are absolute, starting from $120000.&lt;br /&gt;
&lt;br /&gt;
==Fix tiles data format==&lt;br /&gt;
&lt;br /&gt;
* Offset (longword). Example: $4000 = start at tile #512&lt;br /&gt;
* Size (longword). Example: $2000 = load 256 tiles&lt;br /&gt;
* Tile data...&lt;br /&gt;
&lt;br /&gt;
Like the regular [[fix graphics format]], but byteswapped.&lt;br /&gt;
&lt;br /&gt;
==Palette data format==&lt;br /&gt;
&lt;br /&gt;
* Palette number (word).&lt;br /&gt;
* 16 words of [[palettes|color data]].&lt;br /&gt;
&lt;br /&gt;
Note: The default progress bar seems to use palette 0, be careful not to overwrite it. Remember that fix tiles can only use the 16 first palettes.&lt;br /&gt;
&lt;br /&gt;
==Map data format==&lt;br /&gt;
&lt;br /&gt;
All values are words.&lt;br /&gt;
&lt;br /&gt;
* Start fix map address ($7102 is good).&lt;br /&gt;
* Width in tiles.&lt;br /&gt;
* Height in tiles.&lt;br /&gt;
* Fix tilemap data as found in [[VRAM]]...&lt;br /&gt;
&lt;br /&gt;
Note: Mapping is done from left to right, top to bottom.&lt;br /&gt;
&lt;br /&gt;
==Animation map data format==&lt;br /&gt;
&lt;br /&gt;
All values are words.&lt;br /&gt;
&lt;br /&gt;
* Start fix map address ($7102 is good).&lt;br /&gt;
* Width in tiles.&lt;br /&gt;
* Height in tiles.&lt;br /&gt;
* Number of frames in animation.&lt;br /&gt;
* Animation speed (in frames).&lt;br /&gt;
* Fix tilemap data as found in [[VRAM]]...&lt;br /&gt;
&lt;br /&gt;
==Using LOGO files for in-game loading==&lt;br /&gt;
&lt;br /&gt;
By default the system ROM will always use the initial LOGO file during in game loading sequences. It is possible to change this by loading new data over the buffered LOGO file data at $120000. How this gets loaded is not yet confirmed but its suspected that games request the data to be loaded as it would any other data given there is not need for &#039;LOGO&#039; to be in the file name in this situation. It may also be possible the system ROM looks out for data being loaded into this region before drawing.&lt;br /&gt;
&lt;br /&gt;
The ability to change the default progress bar (handled by the system ROM) is also available. The system ROM places the start address of its code to handle progress bar drawing at $11C80C. This code is then always called via &#039;MOVEA.L 0x11C80C,A0&#039;, &#039;JSR(A0)&#039;. To use a custom progress bar simply place the start address of your custom progress bar code at $11C80C. Current progress bar state is held at address $10F691. Your code should handle all elements of drawing the progress bar.&lt;br /&gt;
&lt;br /&gt;
It appears games plant their custom progress bar code into the default LOGO file as well as any further files that get loaded to this range. Below is the routine used by Samurai Shodown IV as seen in file &#039;JL_ST1.PRG&#039; once in RAM. The main game program code places 0x120086 to $11C80C&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
120086  4EF9 0012 4AD0             JMP      0x124AD0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
124AD0  4DF9 003C 0000             LEA      0x3C0000,A6&lt;br /&gt;
124AD6  41F9 0012 4B00             LEA      0x124B00,A0&lt;br /&gt;
124ADC  1239 0010 F691             MOVE.B   0x10F691,D1&lt;br /&gt;
124AE2  0241 00F0                  ANDI.W   #0xF0,D1&lt;br /&gt;
124AE6  D0C1                       ADDA.W   D1,A0&lt;br /&gt;
124AE8  203C 719B A200             MOVE.L   #0x719BA200,D0&lt;br /&gt;
124AEE  7E0F                       MOVEQ    #0xF,D7&lt;br /&gt;
124AF0  1018                       MOVE.B   (A0)+,D0&lt;br /&gt;
124AF2  2C80                       MOVE.L   D0,(A6)&lt;br /&gt;
124AF4  0680 0020 0000             ADDI.L   #0x200000,D0&lt;br /&gt;
124AFA  51CF FFF4                  DBF      D7,*-0xA [0xC00422]&lt;br /&gt;
124AFE  4E75                       RTS&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:CD systems]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Z80_port_map&amp;diff=6091</id>
		<title>Z80 port map</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Z80_port_map&amp;diff=6091"/>
		<updated>2018-05-14T00:21:27Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some infos from [[User:kyuusaku]]&lt;br /&gt;
&lt;br /&gt;
The decode mask for &#039;&#039;&#039;reading&#039;&#039;&#039; ports is always $0C. The one for writes is indicated for each case.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Read&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Write&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;[[Memory_mapped_registers#Address_decode_masks|Decode mask]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$00&lt;br /&gt;
|&lt;br /&gt;
*Read sound code from {{Chipname|68k}}&lt;br /&gt;
*Acknowledge [[Z80 interrupts|NMI]]&lt;br /&gt;
|Clear sound code from 68k to $00&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|$0C&lt;br /&gt;
|-&lt;br /&gt;
|$04-$07&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|[[YM2610]] I/O&lt;br /&gt;
|-&lt;br /&gt;
|$08&lt;br /&gt;
|Set [[Z80 memory map|$F000~$F7FF]] bank&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot;|Enable NMIs&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot;|$1C&lt;br /&gt;
|-&lt;br /&gt;
|$09&lt;br /&gt;
|Set $E000~$EFFF bank&lt;br /&gt;
|-&lt;br /&gt;
|$0A&lt;br /&gt;
|Set $C000~$DFFF bank&lt;br /&gt;
|-&lt;br /&gt;
|$0B&lt;br /&gt;
|Set $8000~$BFFF bank&lt;br /&gt;
|-&lt;br /&gt;
|$0C&lt;br /&gt;
|See {{Sig|SDRD1|SDRD1}}&lt;br /&gt;
|[[68k/Z80_communication|Reply]] to 68k&lt;br /&gt;
|$0C&lt;br /&gt;
|-&lt;br /&gt;
|$18&lt;br /&gt;
|See address $08&lt;br /&gt;
|Disable NMIs&lt;br /&gt;
|$1C&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that the [[M1 ROM|Z80 ROM]] [[Z80 bankswitching|bank selection]] is done by &#039;&#039;&#039;reading&#039;&#039;&#039; ports.&lt;br /&gt;
&lt;br /&gt;
SNK used an obscure feature of the Z80: when accessing ports, the entire address bus is set, not only the lower 8 bits.&lt;br /&gt;
&lt;br /&gt;
The banks can then be chosen by putting the bank number in A, the port number in C and doing IN A,(C).&lt;br /&gt;
This is handled by {{Chipname|NEO-ZMC}} in cartridges.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some [[sound driver]]s use port $C0 (and others ?) in their code. Since only SDA2 and SDA3 are used for port decoding, port $C0 maps to a mirror of port $00. It&#039;s believed to be a remnant of some development tool.&lt;br /&gt;
&lt;br /&gt;
[[Category:Base system]]&lt;br /&gt;
[[Category:Audio system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Z80_port_map&amp;diff=6090</id>
		<title>Z80 port map</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Z80_port_map&amp;diff=6090"/>
		<updated>2018-05-14T00:21:03Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some infos from [[User:kyuusaku]]&lt;br /&gt;
&lt;br /&gt;
The decode mask for &#039;&#039;&#039;reading&#039;&#039;&#039; ports is always $0C. The one for writes is indicated for each case.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Read&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Write&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;[[Memory_mapped_registers#Address_decode_masks|Decode mask]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|$00&lt;br /&gt;
|&lt;br /&gt;
*Read sound code from {{Chipname|68k}}&lt;br /&gt;
*Acknowledge [[Z80 interrupts|NMI]]&lt;br /&gt;
|Clear sound code from 68k to $00&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|$0C&lt;br /&gt;
|-&lt;br /&gt;
|$04&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|[[YM2610]] I/O&lt;br /&gt;
|-&lt;br /&gt;
|$08&lt;br /&gt;
|Set [[Z80 memory map|$F000~$F7FF]] bank&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot;|Enable NMIs&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot;|$1C&lt;br /&gt;
|-&lt;br /&gt;
|$09&lt;br /&gt;
|Set $E000~$EFFF bank&lt;br /&gt;
|-&lt;br /&gt;
|$0A&lt;br /&gt;
|Set $C000~$DFFF bank&lt;br /&gt;
|-&lt;br /&gt;
|$0B&lt;br /&gt;
|Set $8000~$BFFF bank&lt;br /&gt;
|-&lt;br /&gt;
|$0C&lt;br /&gt;
|See {{Sig|SDRD1|SDRD1}}&lt;br /&gt;
|[[68k/Z80_communication|Reply]] to 68k&lt;br /&gt;
|$0C&lt;br /&gt;
|-&lt;br /&gt;
|$18&lt;br /&gt;
|See address $08&lt;br /&gt;
|Disable NMIs&lt;br /&gt;
|$1C&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that the [[M1 ROM|Z80 ROM]] [[Z80 bankswitching|bank selection]] is done by &#039;&#039;&#039;reading&#039;&#039;&#039; ports.&lt;br /&gt;
&lt;br /&gt;
SNK used an obscure feature of the Z80: when accessing ports, the entire address bus is set, not only the lower 8 bits.&lt;br /&gt;
&lt;br /&gt;
The banks can then be chosen by putting the bank number in A, the port number in C and doing IN A,(C).&lt;br /&gt;
This is handled by {{Chipname|NEO-ZMC}} in cartridges.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some [[sound driver]]s use port $C0 (and others ?) in their code. Since only SDA2 and SDA3 are used for port decoding, port $C0 maps to a mirror of port $00. It&#039;s believed to be a remnant of some development tool.&lt;br /&gt;
&lt;br /&gt;
[[Category:Base system]]&lt;br /&gt;
[[Category:Audio system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Eyecatcher&amp;diff=6064</id>
		<title>Eyecatcher</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Eyecatcher&amp;diff=6064"/>
		<updated>2018-05-08T09:27:11Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* MAX 330 MEGA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Eyecatcher.gif|frame|Original eye-catcher animation.]]&lt;br /&gt;
&lt;br /&gt;
[[File:Eyecatcher_giga.gif|frame|&amp;quot;Giga shock&amp;quot; animation.]]&lt;br /&gt;
&lt;br /&gt;
[[File:Gigapowervliner.gif|frame|Imitated, wonky animation in[[V-Liner]].]].&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Eye-catcher&amp;quot; is the name officially given by SNK to the bootup animation.&lt;br /&gt;
&lt;br /&gt;
=Original animation=&lt;br /&gt;
&lt;br /&gt;
The [[system ROM]] takes care of the animation, but the graphics data for both [[sprites]] and [[fix layer]] must be provided by the game in its {{Chipname|C ROM}}s and {{Chipname|S ROM}}.&lt;br /&gt;
&lt;br /&gt;
==NEO-GEO logo==&lt;br /&gt;
The revolving NEO.GEO graphic consists of sprites (the bank of tiles is specified by the byte in the [[68k program header]] at address $115).&lt;br /&gt;
&lt;br /&gt;
The palette is updated on the fly from data stored in the system ROM ($01F03E in {{Chipname|SP-S2}}) to implement the fading effect.&lt;br /&gt;
&lt;br /&gt;
==MAX 330 MEGA==&lt;br /&gt;
The &amp;quot;MAX 330 MEGA&amp;quot; &amp;amp; &amp;quot;PRO-GEAR SPEC&amp;quot; text as seen on small or early cartridges (eg. [[Puzzle De Pon!]]) is drawn on the fix layer with tiles from banks 0 and 1. The tilemap is stored in the system ROM ($01F34A in SP-S2). Each line of text is 2 fix tiles in height, and is animated using a &#039;wipe in&#039; effect from left-to-right.&lt;br /&gt;
&lt;br /&gt;
The tiles used to display each line of text are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
static const uint16_t max_330_mega[2][15] =&lt;br /&gt;
{&lt;br /&gt;
  { 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F, 0x5E, 0x60, 0x7D },&lt;br /&gt;
  { 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E, 0x40, 0x5F, 0x7C, 0x7E }&lt;br /&gt;
};&lt;br /&gt;
			&lt;br /&gt;
static const uint16_t pro_gear_spec[2][17] =&lt;br /&gt;
{&lt;br /&gt;
  { 0x7F, 0x9A, 0x9C, 0x9E, 0xFF, 0xBB, 0xBD, 0xBF, 0xDA, 0xDC, 0xDE, 0xFA, 0xFC, 0x100, 0x102, 0x104, 0x106 },&lt;br /&gt;
  { 0x99, 0x9B, 0x9D, 0x9F, 0xBA, 0xBC, 0xBE, 0xD9, 0xDB, 0xDD, 0xDF, 0xFB, 0xFD, 0x101, 0x103, 0x105, 0x107 }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be useful to customize the text in a S ROM.&lt;br /&gt;
&lt;br /&gt;
==SNK logo==&lt;br /&gt;
The SNK logo is also drawn on the fix layer, with tiles of bank 2. It is always drawn but actually made visible at the end of the animation by switching its palette.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
static const uint16_t SNK[3][10] = &lt;br /&gt;
{&lt;br /&gt;
  { 0x200, 0x201, 0x202, 0x203, 0x204, 0x205, 0x206, 0x207, 0x208, 0x209 },&lt;br /&gt;
  { 0x20A, 0x20B, 0x20C, 0x20D, 0x20E, 0x20F, 0x214, 0x215, 0x216, 0x217 },&lt;br /&gt;
  { 0x218, 0x219, 0x21A, 0x21B, 0x21C, 0x21D, 0x21E, 0x21F, 0x240, 0x25E }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The copyright &amp;quot;©&amp;quot; symbol is a single tile ($7B) written to [[VRAM]] adress $7469.&lt;br /&gt;
&lt;br /&gt;
The tiles are set to [[palettes|palette]] 15. The colour 5 is initially black ($0000) and then faded-in through a cycle of progressively brighter blues to a final value of $306E.&lt;br /&gt;
&lt;br /&gt;
==Palettes==&lt;br /&gt;
Both the revolving logo and the fix layer text use palette 15.&lt;br /&gt;
&lt;br /&gt;
Here is the *final* data written to palette 15:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
static const uint16_t eye_catcher_pal[] = &lt;br /&gt;
{&lt;br /&gt;
  0x0000, 0x0fff, 0x0ddd, 0x0aaa, 0x7555, 0x306E, 0x0000, 0x0000,&lt;br /&gt;
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Customization==&lt;br /&gt;
By replacing the tile data for the above tile numbers with alternate text or graphics, it is possible to somewhat customize the eye-catcher screen without requiring a custom eye-catcher routine in the game cartridge itself.&lt;br /&gt;
&lt;br /&gt;
The only caveat is that tile $FF is used in the &amp;quot;PRO-GEAR SPEC&amp;quot; display (see array data above) and is also used as the blank/space character for the entire screen. Thus this tile cannot be changed without replicating it over the entire fix layer.&lt;br /&gt;
&lt;br /&gt;
[[Category:Code]]&lt;br /&gt;
[[Category:Video system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Rendering_logic&amp;diff=6062</id>
		<title>Rendering logic</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Rendering_logic&amp;diff=6062"/>
		<updated>2018-05-06T19:54:09Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* Sprite tiles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Depending on the chipset, video is generated by 3, 2 or one unique chip:&lt;br /&gt;
&lt;br /&gt;
* 3: [[LSPC-A0]], [[PRO-B0]], [[PRO-C0]] (early)&lt;br /&gt;
* 2: [[LSPC2-A2]], [[NEO-B1]] (most common)&lt;br /&gt;
* 1: [[NEO-GRC]] (CD systems), [[NEO-GRZ]] (CDZ, MV-1C...)&lt;br /&gt;
&lt;br /&gt;
See [[graphics pipeline]] for an overview of the interconnections between chips and cartridges. See [[Display timing]] for the sync signal&#039;s timing.&lt;br /&gt;
&lt;br /&gt;
There are two main parts in generating video:&lt;br /&gt;
&lt;br /&gt;
* An address generator (LSPC), which queries the graphics ROMs in the cartridges according to the data set in [[VRAM]].&lt;br /&gt;
* Line buffers, to which pixels can be written in any order from the graphics ROMs data.&lt;br /&gt;
&lt;br /&gt;
=Line buffers=&lt;br /&gt;
&lt;br /&gt;
To render sprites, the NeoGeo uses a pair of line buffers which are each 320 pixels long (a whole scanline). When one is used for rendering, the other one is shifted out for video output. Each new scanline, the buffers are flipped. This can be seen as a kind of double-buffering, allowing pixels to be rendered in any order.&lt;br /&gt;
&lt;br /&gt;
To increase bandwidth, pixels are rendered two by two in sub-pairs: there are actually 4, 160-pixels-long buffers interleaved in an odd/even fashion. This scheme was inherited from the [[Alpha68k]].&lt;br /&gt;
&lt;br /&gt;
The fix layer pixels are rendered in real time over the buffers output.&lt;br /&gt;
&lt;br /&gt;
==Fix tiles==&lt;br /&gt;
&lt;br /&gt;
* Fix pixels are output in time with the pixel clock (6MHz, 4mclk).&lt;br /&gt;
* One fix tile line is therefore output in: 8 pixels * 4mclk = 32mclk. No variation.&lt;br /&gt;
* The S ROM outputs 8 bits at a time so: 8 bits / 4bpp = 2 pixels at a time.&lt;br /&gt;
* S ROM reads needed for one fix tile line: 8 pixels / 2 pixels per read = 4 reads.&lt;br /&gt;
&lt;br /&gt;
Address sequence for one tile line:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! A4 !! 2H1 !! pixel pair&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || A&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || B&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || C&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || D&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2H1 bypasses the PCK* latchs.&lt;br /&gt;
&lt;br /&gt;
==Sprite tiles==&lt;br /&gt;
16mclk = 16 pixels, 8 pixels per read.&lt;br /&gt;
&lt;br /&gt;
* Sprite pixels are rendered two-by-two at 12MHz (2mclk).&lt;br /&gt;
* One sprite tile line is therefore output in: 16 pixels / 2 * 2mclk = 16mclk. No variation, even if shrinking is used.&lt;br /&gt;
* The C ROM outputs 2 * 16 = 32 bits at a time so: 32 bits / 4bpp = 8 pixels at a time.&lt;br /&gt;
* C ROM reads needed for one sprite tile line: 16 pixels / 8 pixels per read = 2 reads.&lt;br /&gt;
&lt;br /&gt;
Address sequence for one tile line:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! CA4 !! 8-pixel line&lt;br /&gt;
|-&lt;br /&gt;
| 1 || A&lt;br /&gt;
|-&lt;br /&gt;
| 0 || B&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
CA4 bypasses the PCK* latchs.&lt;br /&gt;
&lt;br /&gt;
=Active lists=&lt;br /&gt;
&lt;br /&gt;
The NeoGeo uses a pair of active lists, where the sprites numbers which need to be rendered on the next scanline are written to. As with the line buffers, the active lists are swapped every new scanline so that one is being filled by parsing, the other one is used for rendering.&lt;br /&gt;
&lt;br /&gt;
They are located in the fast VRAM at addresses $8600 and $8680. Each list is 96-entries long.&lt;br /&gt;
&lt;br /&gt;
=Slow VRAM access slots=&lt;br /&gt;
&lt;br /&gt;
Slow VRAM has four 4mclk-long access slots running in sequence with no variations:&lt;br /&gt;
&lt;br /&gt;
# Read sprite map even word&lt;br /&gt;
# Read sprite map odd word&lt;br /&gt;
# Read fix map&lt;br /&gt;
# Read/Write for CPU&lt;br /&gt;
&lt;br /&gt;
=Fast VRAM access slots=&lt;br /&gt;
&lt;br /&gt;
Fast VRAM is more complex and faster. It has 10 access slots with varying widths running in sequence with no variations, which can be seen as 5 parsing slots and 5 rendering slots:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slot # !! Duration !! Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2mclk&lt;br /&gt;
|rowspan=5|Parsing&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|1.5mclk&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|1.5mclk&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|1.5mclk&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|1.5mclk&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|2mclk&lt;br /&gt;
|Read active list&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|1.5mclk&lt;br /&gt;
|Read SCB2&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|1.5mclk&lt;br /&gt;
|Read SCB3&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|1.5mclk&lt;br /&gt;
|Read SCB4&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|1.5mclk&lt;br /&gt;
|Read/write for CPU&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yellow are parsing cycles, purple is the active list read, green is SCB* reads for rendering, red is for CPU access:&lt;br /&gt;
&lt;br /&gt;
[[file:timing_gpu1.png]]&lt;br /&gt;
&lt;br /&gt;
The parsing cycles aren&#039;t consistent, they depend on the matching of sprites. One cycle will read from SCB3 to test if its Y position matches with the current raster line. If there&#039;s a match, the next cycle will be a write to the active list. Otherwise it&#039;s another read cycle.&lt;br /&gt;
&lt;br /&gt;
Fast VRAM must be fast enough (45ns) as the shortest slots are 1.5mclk (62.5ns). 1mclk (41.6ns) would be too fast and SRAM was already expensive.&lt;br /&gt;
&lt;br /&gt;
=Sprite parsing=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;This is still a draft. The following information shouldn&#039;t be considered as correct.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
LSPC splits the workload needed to render sprites in two passes: parsing and rendering.&lt;br /&gt;
&lt;br /&gt;
* Parsing for a raster line N is done during line N-2&lt;br /&gt;
* Rendering is done during line N-1&lt;br /&gt;
* Finally the line is ready for output just at the right time.&lt;br /&gt;
&lt;br /&gt;
During parsing, the Y positions of 381 sprites are read to see if they will be visible on line N. If that&#039;s the case, the sprite number is written to the active list currently being filled. This goes on until 381 sprites were parsed, OR the active list is full (96 sprite numbers were written), whichever comes first.&lt;br /&gt;
&lt;br /&gt;
* If sprite #382 is reached, the remaining time is used to fill the active list up to 96 entries with zeros.&lt;br /&gt;
* If the active list is full, sprites are still parsed up to #382 but no writes are done to the active list, whatever the matching result.&lt;br /&gt;
&lt;br /&gt;
No matter how many sprites are matched in the scanline, there will always be 381 SCB3 reads and 96 active list writes.&lt;br /&gt;
&lt;br /&gt;
This explains why sprite #0 cannot be used: this is the value used to top-up the active list. If there are less than 96 sprite matches (like most of the time), the sprite #0 will be rendered over and over again until the end of the list is reached.&lt;br /&gt;
&lt;br /&gt;
In the next paragraphs, each character represents a parsing slot: R is an SCB3 read, W is a sprite number write to the active list, F is a filling write to the active list, - is just idle waiting. There are always 1536mclk per line / 16mclk per cycle * 5 slots per cycle = 480 slots.&lt;br /&gt;
&lt;br /&gt;
==Case 1: Not a single sprite match==&lt;br /&gt;
&lt;br /&gt;
Fast VRAM cycles:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
24M    _|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_&lt;br /&gt;
Addr     200  | 201 | 202 | 203 | 204 |  681  | 00E | 20E | 40E | 600 |  205  | 206 | 207 | 208 | 209 |  682  | 00F | 20F | 40F&lt;br /&gt;
R/W     Read   Read  Read  Read  Read                                   Read   Read  Read  Read  Read&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
381 read slots, 96 fill slots, 3 waiting slots:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR&lt;br /&gt;
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR&lt;br /&gt;
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR&lt;br /&gt;
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRFFFFFFFFFFFFFFFFFFF&lt;br /&gt;
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Case 2: Some sprites match==&lt;br /&gt;
&lt;br /&gt;
Fast VRAM cycles:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
24M    _|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_&lt;br /&gt;
Addr     200  | 201 | 600 | 202 | 203 |  681  | 00E | 20E | 40E | 600 |  601  | 204 | 205 | 602 | 206 |  682  | 00F | 20F | 40F&lt;br /&gt;
R/W     Read   Read  Write Read  Read                                   Write  Read  Read  Write Read&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If 17 sprites match: 381 read slots, 17 write slots, 96-17=79 fill slots, 3 waiting slots:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RRRRRRWRRRRRRRRRRRRRRRRRRRRWRRRRRRRRRWRRRRRRWRRRRRRWRRRRRWRWRWRRRRRRRRRWRRRRRRRRRRRRRRWRRRRRRRRRRRRR&lt;br /&gt;
RRRRRRRRRRRRRRRRRRRWRWRRRRWRWRRRRRRRRRRRRRRRRRRRRRRRRWRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR&lt;br /&gt;
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRWRRRWRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR&lt;br /&gt;
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRFF&lt;br /&gt;
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Case 3: Exactly 96 sprites match==&lt;br /&gt;
&lt;br /&gt;
Fast VRAM cycles:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
24M    _|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_|&#039;|_&lt;br /&gt;
Addr     200  | 600 | 201 | 601 | 202 |  681  | 00E | 20E | 40E | 600 |  602  | 203 | 204 | 603 | 604 |  682  | 00F | 20F | 40F&lt;br /&gt;
R/W     Read   Write Read  Write Read                                   Write  Read  Read  Write Read&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
381 read slots, 96 write slots, 0 fill slots, 3 waiting slots:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RRRRRRWRRRRWRRRRRRRWRRRRRWRWRWRRWRRRRRRRRRWRRRRRRWRRWRRRRWRRRRRWRWRWRRRRRWRRRRWRRRRRRRRWRRRRRRWRRRWR&lt;br /&gt;
WRWRRWRRRRRRRWRRRWRRRWRRRRWRRRRRRRRWRWRRRRWRWRRRRRRRRRRRRRRRRRRRRRRRRWRRRRRRRRRRRRRRWRRRWRWRWRWRRWRW&lt;br /&gt;
RRRRWRRWRRWRRRWRRRWRRWRRRRWRWRWRRWRRRWRWRWRRWRRRRWRRRRRWRRWRRWRRRRRRWRRRWRRRRWRRRRRWRRWRRRWRRRWRRRRR&lt;br /&gt;
WRWRWRWRWRWRRRWRRRWRRRRRRRWRRRWRWRRRWRRRRRRRRRWRRRRRRRWRWRWRWRRRRRRRRRRWRRWRRRRRRWRRRRRRRRRRRRRRRRRR&lt;br /&gt;
RRRRRRRRRRRRRRRWRRRWRRRRWRRRWRRRRRRRWRRRRRRRWRRRRWRWRRRWRRWRRRRWRRRRRWRRRRRWR---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Case 4: More than 96 sprites match==&lt;br /&gt;
&lt;br /&gt;
Same as case 3, except after 96 &amp;quot;W&amp;quot;s, there are only useless &amp;quot;R&amp;quot;s.&lt;br /&gt;
&lt;br /&gt;
==Rendering==&lt;br /&gt;
&lt;br /&gt;
# Read active list ($8600+ or $8680+) to get sprite #&lt;br /&gt;
# Read SCB2 zoom values ($8000+)&lt;br /&gt;
# Read SCB3 Y position, height, and chain bit ($8200+)&lt;br /&gt;
# Read SCB4 X position ($8400+)&lt;br /&gt;
&lt;br /&gt;
The tile # and its attributes are also read from slow VRAM.&lt;br /&gt;
&lt;br /&gt;
==CPU access to VRAM==&lt;br /&gt;
&lt;br /&gt;
SNK says min. 12 68kclk between writes (so 24mclk). 1 write every 24mclk = 64 per scanline.&lt;br /&gt;
&lt;br /&gt;
CPU access occurs asynchronously with the 68000 bus -&amp;gt; storage in LSPC. If no write is requested, then the slots are occupied by reads, effectively updating one of the two read buffers continuously with the value pointed by the last used VRAM address.&lt;br /&gt;
&lt;br /&gt;
=Buffers control=&lt;br /&gt;
&lt;br /&gt;
==CK signals==&lt;br /&gt;
CK1~4 signals are used to clock each of the 4 buffers.&lt;br /&gt;
&lt;br /&gt;
* During rendering, the pulses often go by pair (1+2 or 3+4) to render pixels 2 by 2 if the corresponding WE signal is asserted (opaque pixel). Horizontal shrinking causes pulses to be skipped, so that the buffer&#039;s address isn&#039;t incremented.&lt;br /&gt;
* During output, the pulses are slower and always alternate (1/2/1/2... or 3/4/3/4...) to output even/odd pixels in sequence.&lt;br /&gt;
&lt;br /&gt;
* If the corresponding LD* signal is high, the buffer pointer is incremented (rendering left to right).&lt;br /&gt;
* If the corresponding LD* signal is low, the buffer pointer is loaded from the [[P bus]] (X position of sprite, or 0 to start line output).&lt;br /&gt;
&lt;br /&gt;
Inactive during H-blank.&lt;br /&gt;
&lt;br /&gt;
==LD signals==&lt;br /&gt;
The LD1~2 signals are synchronous signals used to load the pointers for a buffer pair as two bytes.&lt;br /&gt;
&lt;br /&gt;
Example P bus values for 5 full-width sprites right next to each other, starting at X=0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0000,0808,1010,1818,2020&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example P bus values for 5 full-width sprites right next to each other, starting at X=1 (pixel pairs will be flipped by NEO-ZMC2):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0100,0908,1110,1918,2120&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As sprite lines &#039;&#039;&#039;always&#039;&#039;&#039; take 16mclk to render, there&#039;s an LD* pulse every 16mclk to set the new starting address (X position) &#039;&#039;&#039;except&#039;&#039;&#039; for chained sprites. There&#039;s also always an unique pulse just before output to reset the pointers to 0.&lt;br /&gt;
&lt;br /&gt;
==WE signals==&lt;br /&gt;
WE1~4 signals are used to tell if the pixel should be written to a buffer.&lt;br /&gt;
&lt;br /&gt;
During rendering, the pulses are synchronized to CK signals.&lt;br /&gt;
&lt;br /&gt;
* If the pixel is opaque, there are both pulses at the same time (write pixel).&lt;br /&gt;
* If the pixel is transparent, there is a CK pulse but no WE pulse (skip pixel, move to next one).&lt;br /&gt;
* If the pixel is skipped for horizontal shrink, there are no pulses at all (do nothing).&lt;br /&gt;
&lt;br /&gt;
During output, the pulses are also synchronized to CK signals and always present. This is used to clear the buffers to the backdrop color for the next rendering cycle.&lt;br /&gt;
&lt;br /&gt;
==SS signals==&lt;br /&gt;
The SS1/2 signals enable clearing of buffer pairs, active during output.&lt;br /&gt;
&lt;br /&gt;
==Others==&lt;br /&gt;
&lt;br /&gt;
* TMS0 is used to flip the buffers, related to the lowest bit of the raster counter.&lt;br /&gt;
* The rising edge of PCK1 and PCK2 latches fix or sprite pixels from the cart ROMs.&lt;br /&gt;
&lt;br /&gt;
Fix data is read 8 pixels in advance (32mclk, confirms what Charles wrote in mvstech.txt).&lt;br /&gt;
&lt;br /&gt;
[[Category:Video system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Development_tools&amp;diff=5997</id>
		<title>Development tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Development_tools&amp;diff=5997"/>
		<updated>2018-04-08T19:27:19Z</updated>

		<summary type="html">&lt;p&gt;Hpman: DATlib update!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
==68000==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=6 style=&amp;quot;background-color:#ccc&amp;quot;|Assemblers&lt;br /&gt;
|-&lt;br /&gt;
!Name !! Author(s) !! Description !! Platform(s) !! Notes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| [http://john.ccac.rwth-aachen.de:8000/as/ AS] || Alfred Arnold, et al || Multi-target assembler || (multiple) || Provided as source code and binaries (Windows, DOS) || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| [http://sun.hasenbraten.de/vasm/ vasm] || Volker Barthelmann, et al || Multi-target assembler || (multiple) || Provided as source code&amp;lt;br/&amp;gt;&amp;quot;official&amp;quot; binaries are for older versions || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| JAS || Charles Doty, Paul Lee, Michael Hope || Modified version of AS || Windows || (base AS version unknown; binary is circa 1999/12/30) || [[File:JAS.zip]]&lt;br /&gt;
|-&lt;br /&gt;
| Maccer || Michael Hope || Pre-processor for AS-series assemblers || (multiple) || Provided as source code and Windows binary || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| [http://gendev.spritesmind.net/page-macX.html MaccerX] || Kaneda || Updated version of Maccer || (multiple) || Provided as source code and Windows binary; added support for XGCC (gcc) and comments || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| SNASM68K || S.N. Systems || 680x0 assembler || Windows || &amp;amp;nbsp; || [http://segaretro.org/SNASM68K SNASM68K at Sega Retro]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;(Modified version by Nemesis)&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=6 style=&amp;quot;background-color:#ccc&amp;quot;|Compilers&lt;br /&gt;
|-&lt;br /&gt;
!Name !! Author(s) !! Description !! Platform(s) !! Notes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| NeoDev kit || Fabrice Martinez, Jeff Kurtz, et al || GCC compiler and library || (multiple) || &amp;amp;nbsp; || [[File:NeoDev001.zip]]&lt;br /&gt;
|-&lt;br /&gt;
!colspan=6 style=&amp;quot;background-color:#ccc&amp;quot;|Disassemblers&lt;br /&gt;
|-&lt;br /&gt;
!Name !! Author(s) !! Description !! Platform(s) !! Notes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| IRA || Tim Ruehsen, ported by Antirad || Intelligent ReAssembler for M680x0 || (multiple) || PC port of an Amiga app; provided as source (&amp;quot;PC&amp;quot;) and binary (Windows) || [[File:Ira.zip]]&lt;br /&gt;
|-&lt;br /&gt;
| unidasm || MAMEdev || Universal Disassembler || (multiple) || Included with the Windows MAME distribution; can be built from source || &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Z80==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=6 style=&amp;quot;background-color:#ccc&amp;quot;|Assemblers&lt;br /&gt;
|-&lt;br /&gt;
!Name !! Author(s) !! Description !! Platform(s) !! Notes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| [http://john.ccac.rwth-aachen.de:8000/as/ AS] || Alfred Arnold, et al || Multi-target assembler || (multiple) || Provided as source code and binaries (Windows, DOS) || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| [http://sun.hasenbraten.de/vasm/ vasm] || Volker Barthelmann, et al || Multi-target assembler || (multiple) || Provided as source code&amp;lt;br/&amp;gt;&amp;quot;official&amp;quot; binaries are for older versions || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/vhelin/wla-dx WLA DX] || Ville Helin, et al || Multi-target assembler || (multiple) || Provided as source code || [http://www.niksula.cs.hut.fi/~tursas/wla/wladx_binaries_20040822.zip WLA-DX 9.2 Win32 binaries]&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.nongnu.org/z80asm/ z80asm] || Bas Wijnen (and others?) || Z80 assembler || (multiple) || Provided as source code || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=6 style=&amp;quot;background-color:#ccc&amp;quot;|Compilers&lt;br /&gt;
|-&lt;br /&gt;
!Name !! Author(s) !! Description !! Platform(s) !! Notes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| ZCC || Ken Yap, et al || Z80 development package with C compiler || (multiple) || Provided as source code and binaries (Windows); circa January 1996 || [[File:zcc096.zip]]&lt;br /&gt;
|-&lt;br /&gt;
| [http://sdcc.sourceforge.net/ SDCC] || Sandeep Dutta, et al || &amp;quot;Small Device C Compiler&amp;quot; || (multiple) || Provided as source code and binaries (various platforms) || [http://sdcc.sourceforge.net/snap.php Snapshot Builds]&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.z88dk.org/forum/ z88dk] || (many people) || z80 C cross compiler with assembler/linker || (multiple) || Provided as source code and binaries (Windows, Mac) || [http://nightly.z88dk.org/?C=M;O=D Nightly Builds]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;(Hit escape as soon as you see the links for &amp;quot;latest&amp;quot;)&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=6 style=&amp;quot;background-color:#ccc&amp;quot;|Disassemblers&lt;br /&gt;
|-&lt;br /&gt;
!Name !! Author(s) !! Description !! Platform(s) !! Notes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| DASM || Charles Doty || Z80 disassembler || DOS || Source code and binary included. || [[File:dasmz80.zip]]&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.inkland.org.uk/dz80/ DZ80] || Inkland || Z80 disassembler || (multiple) || Provided as source code (command line version) and binaries (DOS command line, Windows GUI) || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| unidasm || MAMEdev || Universal Disassembler || (multiple) || Included with the Windows MAME distribution; can be built from source || &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Source Editors==&lt;br /&gt;
There are a lot of source code editors out there... Use whatever you&#039;re comfortable with (hopefully one with 68000 and Z80 syntax highlighting).&lt;br /&gt;
&lt;br /&gt;
==Sound and Music==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=6 style=&amp;quot;background-color:#ccc&amp;quot;|Music Drivers and Tools&lt;br /&gt;
|-&lt;br /&gt;
!Name !! Author(s) !! Description !! Platform(s) !! Notes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| [[MVSTracker]] || Ivan Mackintosh || FM tracker || Windows || [http://www.archaic.fr/interviews/interview-jeff-kurtz-repond-a-nos-questions/3/ Z80 driver does not work on hardware] || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| [http://gendev.spritesmind.net/page-mvst.html MVSTracker Suite] || Pascal Bosquet, Kaneda || Modified version of MVSTracker || Windows || supports Mega Drive as well. Neo-Geo driver still doesn&#039;t work on hardware. || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=6 style=&amp;quot;background-color:#ccc&amp;quot;|Sound Editors&lt;br /&gt;
|-&lt;br /&gt;
!Name !! Author(s) !! Description !! Platform(s) !! Notes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.goldwave.com/release.php GoldWave] || GoldWave Inc. || commercial sound editor || Windows || &amp;amp;nbsp; || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.sonycreativesoftware.com/soundforgesoftware Sound Forge] || Sony || commercial sound editor || Windows, Mac || &amp;amp;nbsp; || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| [http://audacity.sourceforge.net/ Audacity] || Audacity developers || open-source sound editor || (multiple) || &amp;amp;nbsp; || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=6 style=&amp;quot;background-color:#ccc&amp;quot;|Sound Encoders&lt;br /&gt;
|-&lt;br /&gt;
!Name !! Author(s) !! Description !! Platform(s) !! Notes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/freem/adpcma ADPCM-A encoder] || freem || Command-line ADPCM-A encoder || (multiple) || Provided as source code and binary (Windows) || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.smspower.org/forums/11965-VGMLoggingWithOtherEmulators?start=200#66597 ADPCM-B encoder] || ValleyBell and Fred/FRONT || Command-line ADPCM-B encoder || (multiple) || Provided as source code and binary (Windows) || [[File:ADPCM_Encode.zip]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Neo Sound Builder]] || Jeff Kurtz/Neobitz || GUI V ROM/PCM file creator || Windows || ADPCM-A only || [https://www.facebook.com/Neobitz/photos/a.462349983789893.110879.221161891242038/1093044660720419/?type=3 announcement post]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Graphics==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=6 style=&amp;quot;background-color:#ccc&amp;quot;|Graphics Viewers and Editors&lt;br /&gt;
|-&lt;br /&gt;
!Name !! Author(s) !! Description !! Platform(s) !! Notes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| [[YY-CHR]] || YY || multi-format tile editor || Windows || FIX files require plugin (YY-CHR.NET only, see below); Sprites need conversion (see tools below) || [http://www.romhacking.net/utils/119/ YY-CHR 0.99]&lt;br /&gt;
|-&lt;br /&gt;
| NGFX || blastar || Fix, Sprite, TITLE_*.SYS viewer/editor; LOGO_*.SYS viewer || Windows || WIP; not yet released. || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=6 style=&amp;quot;background-color:#ccc&amp;quot;|Graphics Converters and Tools&lt;br /&gt;
|-&lt;br /&gt;
!Name !! Author(s) !! Description !! Platform(s) !! Notes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| [[DATLib]] graphics tools || HPMAN || Tools used to process and display graphics on Neo-Geo. || Windows || Animator, BuildChar, CharSplit, Framer || [https://www.dropbox.com/s/wqviye5xxzktr6y/DATlib_0.3.rar?dl=0 download]&lt;br /&gt;
|-&lt;br /&gt;
| [[NGGTool|NeoGeo Graphics ToolSuite]] || evo || Tool to convert between SNES/SFC and Neo-Geo graphics. || Windows  || Fix conversion is botched (see page for details) || [http://furrtek.free.fr/noclass/neogeo/nggts.zip NGGTS]&lt;br /&gt;
|-&lt;br /&gt;
| Sprite graphics converter || IQ || Converts MVS graphics (.c*) to CD graphics (.SPR). || Windows || &amp;amp;nbsp; || [http://furrtek.free.fr/noclass/neogeo/gfxmvstocd.zip MVS to CD sprite converter]&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/freem/NeoSpriteConv Neo-Geo Sprite Converter] || freem || Convert 4BPP SMS/GG/WSC graphics to Neo-Geo format. || (multiple) || Provided as source code and binary (Windows)&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Further work required for converting to Cart (split files by words (2 bytes)) and CD (byteswap file)-usable files.&amp;lt;/small&amp;gt; || [http://ajworld.net/neogeodev/utils/neosprconv.zip main download]&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/Kannagi/Neoconvert Neoconvert] || Kannagi || Convert PNG to rom Cx with map, palette and HiColor. || Windows,Linux ||  || [https://github.com/Kannagi/Neoconvert download]&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/Kannagi/Neoextract Neoextract] || Kannagi || extract rom Cx or s1 to bmp. || Windows,Linux ||  || [https://github.com/Kannagi/Neoextract download]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Name !! Author(s) !! Description !! Platform(s) !! Notes !! Download&lt;br /&gt;
|-&lt;br /&gt;
| MemCardTool || Fabrice Martinez || Memory card manager || Windows || &amp;amp;nbsp; || [[File:memcardtool.zip]]&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/freem/romwak ROMwak] || Jeff Kurtz, ported by freem || Binary image manipulation tool || (multiple) || Provided as source code and binary (Windows) || &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Code]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Scanline_effects&amp;diff=5953</id>
		<title>Scanline effects</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Scanline_effects&amp;diff=5953"/>
		<updated>2018-03-05T19:12:40Z</updated>

		<summary type="html">&lt;p&gt;Hpman: Not a raster effect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Sengoku2persp.png|frame|[[Sengoku 2]] changes the shrinking and the position of a scrolling sprite block in its intro to create a mirror and perspective effect.]]&lt;br /&gt;
&lt;br /&gt;
Scanline effects are special tricks using the [[timer interrupt]] to distort [[sprites]] by updating their coordinates or shrink values mid-screen.&lt;br /&gt;
&lt;br /&gt;
These effects can be very CPU consuming as they can be triggered at tight intervals during active display. Consequently, they may have to use tables of precomputed values (constants, or calculated during the VBlank) to be applied fast enough.&lt;br /&gt;
&lt;br /&gt;
[[Neo Turf Masters]] and [[Riding Hero]] heavily rely on this effect to render the playing field.&lt;br /&gt;
&lt;br /&gt;
[[Category:Code]]&lt;br /&gt;
[[Category:Video system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=World_Heroes_2_Jet&amp;diff=5951</id>
		<title>World Heroes 2 Jet</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=World_Heroes_2_Jet&amp;diff=5951"/>
		<updated>2018-03-04T02:53:25Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GameInfo|right&lt;br /&gt;
|en_title=World Heroes 2 Jet&lt;br /&gt;
|jp_title=World Heroes 2 Jet&lt;br /&gt;
|jp_title2=ワールドヒーローズ 2 JET&lt;br /&gt;
|developer=ADK / SNK&lt;br /&gt;
|ngh_id=064&lt;br /&gt;
|megcount=178&lt;br /&gt;
|mvs_release=yes&lt;br /&gt;
|mvs_release_en=y&lt;br /&gt;
|mvs_release_jp=y&lt;br /&gt;
|mvs_romset=wh2j&lt;br /&gt;
|mvs_date=1994&lt;br /&gt;
|mvs_pchip=&lt;br /&gt;
|mvs_pboard=PROGGSC&lt;br /&gt;
|mvs_cboard=CHA256&lt;br /&gt;
|aes_release=y&lt;br /&gt;
|aes_release_jp=y&lt;br /&gt;
|aes_release_en=y&lt;br /&gt;
|aes_romset=wh2j&lt;br /&gt;
|aes_date=10/06/94&lt;br /&gt;
|cd_release=y&lt;br /&gt;
|cd_release_jp=y&lt;br /&gt;
|cd_release_en=y&lt;br /&gt;
|cd_date=11/11/94&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;320&amp;quot; heights=&amp;quot;224&amp;quot;&amp;gt;&lt;br /&gt;
File:wh2jBuild.png|World Heroes 2 Jet build dates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=World_Heroes_2_Jet&amp;diff=5950</id>
		<title>World Heroes 2 Jet</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=World_Heroes_2_Jet&amp;diff=5950"/>
		<updated>2018-03-04T02:53:02Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GameInfo|right&lt;br /&gt;
|en_title=World Heroes 2 Jet&lt;br /&gt;
|jp_title=World Heroes 2 Jet&lt;br /&gt;
|jp_title2=ワールドヒーローズ 2 JET&lt;br /&gt;
|developer=ADK / SNK&lt;br /&gt;
|ngh_id=064&lt;br /&gt;
|megcount=178&lt;br /&gt;
|mvs_release=yes&lt;br /&gt;
|mvs_release_en=y&lt;br /&gt;
|mvs_release_jp=y&lt;br /&gt;
|mvs_romset=wh2j&lt;br /&gt;
|mvs_date=1994&lt;br /&gt;
|mvs_pchip=&lt;br /&gt;
|mvs_pboard=PROGGSC&lt;br /&gt;
|mvs_cboard=CHA256&lt;br /&gt;
|aes_release=y&lt;br /&gt;
|aes_release_jp=y&lt;br /&gt;
|aes_release_en=y&lt;br /&gt;
|aes_romset=wh2j&lt;br /&gt;
|aes_date=10/06/94&lt;br /&gt;
|cd_release=y&lt;br /&gt;
|cd_release_jp=y&lt;br /&gt;
|cd_release_en=y&lt;br /&gt;
|cd_date=11/11/94&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;320&amp;quot; heights=&amp;quot;224&amp;quot;&amp;gt;&lt;br /&gt;
File:wh2jBuild.png|World heroes 2 Jet build dates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=File:Wh2jBuild.png&amp;diff=5949</id>
		<title>File:Wh2jBuild.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=File:Wh2jBuild.png&amp;diff=5949"/>
		<updated>2018-03-04T02:49:54Z</updated>

		<summary type="html">&lt;p&gt;Hpman: WH2J build dates&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
WH2J build dates&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{Non-free game screenshot}}&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5907</id>
		<title>68k instructions timings</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5907"/>
		<updated>2018-01-22T13:58:56Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* JMP, JSR, LEA, PEA and MOVEM instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mirrored information from [[http://oldwww.nvg.ntnu.no/amiga/MC680x0_Sections/mc68000timing.HTML oldwww.nvg.ntnu.no]]&lt;br /&gt;
&lt;br /&gt;
The number of bus &#039;&#039;&#039;r&#039;&#039;&#039;ead and &#039;&#039;&#039;w&#039;&#039;&#039;rite cycles are shown in parenthesis as (r/w). Any other cycles are internal.&lt;br /&gt;
&lt;br /&gt;
In the following tables, the headings have the following meanings:&lt;br /&gt;
* An : Address register operand&lt;br /&gt;
* Dn : Data register operand&lt;br /&gt;
* ea : Operand specified by an effective address&lt;br /&gt;
* M : Memory effective address operand&lt;br /&gt;
&lt;br /&gt;
To get the real execution time, multiply the total cycles count by 83.33ns ([[Clock|1/12MHz]]). An example is given in each section.&lt;br /&gt;
&lt;br /&gt;
The [[68k interrupts|vertical blank]] lasts exactly 40 lines * 384 pixels * 2 cycles per pixel = 30720 cycles (2.56ms).&lt;br /&gt;
&lt;br /&gt;
See [[optimization]].&lt;br /&gt;
&lt;br /&gt;
=Effective address operand calculation=&lt;br /&gt;
&lt;br /&gt;
This table lists the number of clock periods required to compute an instruction&#039;s effective address. It includes fetching of any extension words, the address computation, and fetching of the memory operand.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax||Adressing mode||B,W||L&lt;br /&gt;
|-&lt;br /&gt;
|Dn&lt;br /&gt;
|Data register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|An&lt;br /&gt;
|Address register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)&lt;br /&gt;
|Address register indirect&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)+&lt;br /&gt;
|Address register indirect, post inc.&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
| -(An)&lt;br /&gt;
|Address register indirect, pre dec.&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An)&lt;br /&gt;
|Address register indirect, displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An,ix)&lt;br /&gt;
|Address register indirect, index&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.w&lt;br /&gt;
|Absolute short&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.l&lt;br /&gt;
|Absolute long&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|16(4/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC)&lt;br /&gt;
|PC with displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC,ix)&lt;br /&gt;
|PC with index&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|#xxx&lt;br /&gt;
|Immediate&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Pre-dec is slower than post-inc&lt;br /&gt;
* There are no write cycles involved in processing the effective address&lt;br /&gt;
* The size of the index register (ix) does not affect execution time&lt;br /&gt;
&lt;br /&gt;
=Move instructions=&lt;br /&gt;
&lt;br /&gt;
These following two tables indicate the number of clock periods for the move instruction. This data includes instruction fetch, operand reads, and operand writes.&lt;br /&gt;
&lt;br /&gt;
==Byte and word==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.b (a0)+,$10201D&#039;&#039;&#039; (Byte (An)+ to xxx.L) takes 20 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|22(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|26(5/1)||class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|28(6/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
==Long==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.l $05012C,4(a1,d0)&#039;&#039;&#039; (Long xxx.L to d(An,ix)) takes 34 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|28(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;red&amp;quot;|30(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|34(6/2)||class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|36(7/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
=Standard instructions=&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;add.w d3,a7&#039;&#039;&#039; (Word ea Dn + An) takes 8 cycles.&lt;br /&gt;
&lt;br /&gt;
The number of clock periods shown in this table indicates the time required to perform the operations, store the results and read the next instruction. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || &amp;lt;ea&amp;gt;,An * || &amp;lt;ea&amp;gt;,Dn || Dn,&amp;lt;M&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADD&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|AND&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMP&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;yellow&amp;quot;|6(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|158(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|140(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EOR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) ***||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;orange&amp;quot;|8(1/0) ***||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!MULS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!MULU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|OR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) +**||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0) +**||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUB&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
notes:	+ Add effective address calculation time&lt;br /&gt;
	^ Word or long only&lt;br /&gt;
	* Indicates maximum value&lt;br /&gt;
       ** The base time of six clock periods is increased to eight		&lt;br /&gt;
	  if the effective address mode is register direct or &lt;br /&gt;
	  immediate (effective address time should also be added)&lt;br /&gt;
      *** Only available effective address mode is data register direct&lt;br /&gt;
	  &lt;br /&gt;
	DIVS,DIVU - The divide algorithm used by the MC68000 provides less&lt;br /&gt;
		    than 10% difference between the best and the worst case&lt;br /&gt;
		    timings.&lt;br /&gt;
	MULS,MULU - The multiply algorithm requires 38+2n clocks where&lt;br /&gt;
		    n is defined as:&lt;br /&gt;
		MULU: n = the number of ones in the &amp;lt;ea&amp;gt;&lt;br /&gt;
		MULS: n = concatenate the &amp;lt;ea&amp;gt; with a zero as the LSB;&lt;br /&gt;
			  n is the resultant number of 10 or 01 patterns&lt;br /&gt;
			  in the 17-bit source; i.e., worst case happens&lt;br /&gt;
			  when the source is $5555&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Immediate instructions=&lt;br /&gt;
&lt;br /&gt;
The number of clock periods periods shown in this table includes the time to fetch immediate operands, perform the operations, store the results and read the next operation. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || #,Dn || #,An || #,M&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ANDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMPI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;green&amp;quot;|8(2/0)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!MOVEQ&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)|| - || -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;yellow&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
	+ Add effective address calculation time&lt;br /&gt;
	* word only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Single operand instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the single operand&lt;br /&gt;
instructions. The number of clock periods and the number of read and write cycles&lt;br /&gt;
must be added respectively to those of the effective address calculation&lt;br /&gt;
where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	 memory&lt;br /&gt;
&lt;br /&gt;
CLR			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NBCD		  byte		6(1/0)		 8(1/1) +&lt;br /&gt;
NEG			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NEGX		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NOT			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
Scc			byte,false	4(1/0)		 8(1/1) +&lt;br /&gt;
			byte,true	6(1/0)		 8(1/1) +&lt;br /&gt;
TAS #		  byte		4(1/0)		10(1/1) +&lt;br /&gt;
TST			byte,word	4(1/0)		 4(1/0) +&lt;br /&gt;
			  long		4(1/0)		 4(1/0) +&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
        # This instruction should never be used on the Amiga as its invisiable&lt;br /&gt;
          read/write cycle can disrupt system DMA.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Shift and rotate instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the shift and rotate&lt;br /&gt;
instructions. The number of clock periods and the number of read and write&lt;br /&gt;
cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	memory&lt;br /&gt;
&lt;br /&gt;
ASR,ASL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
LSR,LSL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROR,ROL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROXR,ROXL	byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	n is the shift or rotate count&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Bit manipulation instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods required for the bit&lt;br /&gt;
manipulation instructions. The number of clock periods and the number of read and &lt;br /&gt;
write cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated. Dynamic: register, static: immediate.&lt;br /&gt;
&lt;br /&gt;
instruction  size            dynamic                 static&lt;br /&gt;
                        register   memory       register   memory	&lt;br /&gt;
BCHG         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BCLR         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long       10(1/0) *    -          14(2/0) *     -&lt;br /&gt;
BSET         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BTST         byte          -  	   4(1/0) +        -        8(2/0) +&lt;br /&gt;
             long        6(1/0)      -          10(2/0)       -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* indicates maximum value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conditional instructions=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Mnemonic || Displacement || Branch taken || Not taken&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Bcc&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|8(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;orange&amp;quot;|12(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BRA&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BSR&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|DBcc&lt;br /&gt;
|cc true&lt;br /&gt;
|&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|cc false&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=JMP, JSR, LEA, PEA and MOVEM instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This Table indicates the number of clock periods required for the jump,&lt;br /&gt;
jump-to-subroutine, load effective address, push effective address and&lt;br /&gt;
move multiple registers instructions.&lt;br /&gt;
&lt;br /&gt;
instr	size    (An)		(An)+		-(An)	 d(An)	&lt;br /&gt;
JMP     -	    8(2/0)	     -		      -    10(2/0)&lt;br /&gt;
JSR     -	   16(2/2)	     -		      -	   18(2/2)&lt;br /&gt;
LEA     -	    4(1/0)	     -		      -	    8(2/0)&lt;br /&gt;
PEA     -	   12(1/2)	     -		      -	   16(2/2)&lt;br /&gt;
MOVEM   word     12+4n       12+4n	      -      16+4n&lt;br /&gt;
M-&amp;gt;R           (3+n/0)	   (3+n/0)	      -	   (4+n/0)&lt;br /&gt;
	    long     12+8n	     12+8n	      -	     16+8n&lt;br /&gt;
		      (3+2n/0)    (3+2n/0)	      -   (4+2n/0)&lt;br /&gt;
MOVEM	word	  8+4n	     -		     8+4n	 12+4n&lt;br /&gt;
R-&amp;gt;M		     (2/n)	     -		    (2/n)	 (3/n)&lt;br /&gt;
	    long	  8+8n	     -		     8+8n	 12+8n&lt;br /&gt;
                (2/2n)	     -		   (2/2n)	(3/2n)&lt;br /&gt;
&lt;br /&gt;
instr	size	d(An,ix)+   xxx.W      xxx.L      d(PC)      d(PC,ix)*&lt;br /&gt;
JMP		 -		 14(3/0)    10(2/0)    12(3/0)	  10(2/0)    14(3/0)&lt;br /&gt;
JSR		 -		 22(2/2)    18(2/2)    20(3/2)	  18(2/2)    22(2/2)&lt;br /&gt;
LEA		 -		 12(2/0)     8(2/0)    12(3/0)	   8(2/0)    12(2/0)&lt;br /&gt;
PEA		 -		 20(2/2)    16(2/2)    20(3/2)	  16(2/2)    20(2/2)&lt;br /&gt;
MOVEM	word	   18+4n      16+4n      20+4n	    16+4n      18+4n&lt;br /&gt;
M-&amp;gt;R			 (4+n/0)    (4+n/0)    (5+n/0)	  (4+n/0)    (4+n/0)&lt;br /&gt;
		long	   18+8n      16+8n      20+8n	    16+8n      18+8n&lt;br /&gt;
				(4+2n/0)   (4+2n/0)   (5+2n/0)	 (4+2n/0)   (4+2n/0)&lt;br /&gt;
MOVEM	word	   14+4n      12+4n      16+4n	    -			-&lt;br /&gt;
R-&amp;gt;M			   (3/n)      (3/n)      (4/n)	    -			-&lt;br /&gt;
        long	   14+8n      12+8n      16+8n	    -			-&lt;br /&gt;
				  (3/2n)     (3/2n)     (4/2n)	    -			-&lt;br /&gt;
&lt;br /&gt;
n is the number of registers to move&lt;br /&gt;
* is the size of the index register (ix) does not affect the instruction&#039;s&lt;br /&gt;
  execution time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Multi-precision instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the multi-precision&lt;br /&gt;
instructions. The number of clock periods includes the time to fetch both&lt;br /&gt;
operands, perform the operations, store the results and read the next &lt;br /&gt;
instructions.&lt;br /&gt;
&lt;br /&gt;
instruction	size		op Dn,Dn	op M,M&lt;br /&gt;
&lt;br /&gt;
ADDX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
			  long		8(1/0)		30(5/2)&lt;br /&gt;
CMPM		byte,word	  -			12(3/0)&lt;br /&gt;
			  long		  -			20(5/0)&lt;br /&gt;
SUBX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
			  long		8(1/0)		30(5/2)&lt;br /&gt;
ABCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
SBCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the following &lt;br /&gt;
miscellaneous instructions. The number of clock periods and plus the number&lt;br /&gt;
of read and write cycles must be added to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction		size	register	memory&lt;br /&gt;
&lt;br /&gt;
ANDI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ANDI to SR		word	 20(3/0)	   -&lt;br /&gt;
CHK				 -		 10(1/0) +	   -&lt;br /&gt;
EORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
EORI to SR		word	 20(3/0)	   -&lt;br /&gt;
ORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ORI to SR		word	 20(3/0)	   -&lt;br /&gt;
MOVE from SR	 -	 	  6(1/0)	 8(1/1)+&lt;br /&gt;
MOVE to CCR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
MOVE to SR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
EXG				 -		  6(1/0)	   -&lt;br /&gt;
EXT				word	  4(1/0)	   -&lt;br /&gt;
				long	  4(1/0)	   -&lt;br /&gt;
LINK		 	 -		 16(2/2)	   -&lt;br /&gt;
MOVE from USP	 -		  4(1/0)	   -&lt;br /&gt;
MOVE to USP	 	 -		  4(1/0)	   -&lt;br /&gt;
NOP				 -		  4(1/0)	   -&lt;br /&gt;
RESET			 -		132(1/0)	   -&lt;br /&gt;
RTE				 -		 20(5/0)	   -&lt;br /&gt;
RTR				 -		 20(5/0)	   -&lt;br /&gt;
RTS				 -		 16(4/0)	   -&lt;br /&gt;
STOP		 	 -		  4(0/0)	   -&lt;br /&gt;
SWAP		 	 -		  4(1/0)	   -&lt;br /&gt;
TRAPV (No Trap)	 -		  4(1/0)	   -&lt;br /&gt;
UNLK		 	 -		 12(3/0)	   -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Move Peripheral instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
instruction	size	register-&amp;gt;memory	memory-&amp;gt;register&lt;br /&gt;
&lt;br /&gt;
MOVEP		word	16(2/2)				16(4/0)	&lt;br /&gt;
			long	24(2/4)				24(6/0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Exception processing=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for exception processing.&lt;br /&gt;
The number of clock periods includes the time for all stacking, the vector&lt;br /&gt;
fetch and the fetch of the first two instruction words of the handler routine.&lt;br /&gt;
&lt;br /&gt;
	exception						periods&lt;br /&gt;
&lt;br /&gt;
	address error					50(4/7)&lt;br /&gt;
	bus error						50(4/7)&lt;br /&gt;
	CHK instruction (trap taken)	44(5/3)+&lt;br /&gt;
	Divide by Zero					42(5/3)&lt;br /&gt;
	illegal instruction				34(4/3)&lt;br /&gt;
	interrupt						44(5/3)*&lt;br /&gt;
	privilege violation				34(4/3)&lt;br /&gt;
	_____&lt;br /&gt;
	RESET **						40(6/0)&lt;br /&gt;
	trace							34(4/3)&lt;br /&gt;
	TRAP instruction				38(4/3)&lt;br /&gt;
	TRAPV instruction (trap taken)	34(4/3)&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* the interrupt acknowledge cycle is assumed to take four&lt;br /&gt;
	  clock periods&lt;br /&gt;
                                    _____     ____&lt;br /&gt;
	** indicates the time from when RESET and HALT are first&lt;br /&gt;
	  sampled as negated to when instruction execution starts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Base system]]&lt;br /&gt;
[[Category:Code]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5906</id>
		<title>68k instructions timings</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5906"/>
		<updated>2018-01-22T13:58:19Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* JMP, JSR, LEA, PEA and MOVEM instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mirrored information from [[http://oldwww.nvg.ntnu.no/amiga/MC680x0_Sections/mc68000timing.HTML oldwww.nvg.ntnu.no]]&lt;br /&gt;
&lt;br /&gt;
The number of bus &#039;&#039;&#039;r&#039;&#039;&#039;ead and &#039;&#039;&#039;w&#039;&#039;&#039;rite cycles are shown in parenthesis as (r/w). Any other cycles are internal.&lt;br /&gt;
&lt;br /&gt;
In the following tables, the headings have the following meanings:&lt;br /&gt;
* An : Address register operand&lt;br /&gt;
* Dn : Data register operand&lt;br /&gt;
* ea : Operand specified by an effective address&lt;br /&gt;
* M : Memory effective address operand&lt;br /&gt;
&lt;br /&gt;
To get the real execution time, multiply the total cycles count by 83.33ns ([[Clock|1/12MHz]]). An example is given in each section.&lt;br /&gt;
&lt;br /&gt;
The [[68k interrupts|vertical blank]] lasts exactly 40 lines * 384 pixels * 2 cycles per pixel = 30720 cycles (2.56ms).&lt;br /&gt;
&lt;br /&gt;
See [[optimization]].&lt;br /&gt;
&lt;br /&gt;
=Effective address operand calculation=&lt;br /&gt;
&lt;br /&gt;
This table lists the number of clock periods required to compute an instruction&#039;s effective address. It includes fetching of any extension words, the address computation, and fetching of the memory operand.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax||Adressing mode||B,W||L&lt;br /&gt;
|-&lt;br /&gt;
|Dn&lt;br /&gt;
|Data register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|An&lt;br /&gt;
|Address register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)&lt;br /&gt;
|Address register indirect&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)+&lt;br /&gt;
|Address register indirect, post inc.&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
| -(An)&lt;br /&gt;
|Address register indirect, pre dec.&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An)&lt;br /&gt;
|Address register indirect, displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An,ix)&lt;br /&gt;
|Address register indirect, index&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.w&lt;br /&gt;
|Absolute short&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.l&lt;br /&gt;
|Absolute long&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|16(4/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC)&lt;br /&gt;
|PC with displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC,ix)&lt;br /&gt;
|PC with index&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|#xxx&lt;br /&gt;
|Immediate&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Pre-dec is slower than post-inc&lt;br /&gt;
* There are no write cycles involved in processing the effective address&lt;br /&gt;
* The size of the index register (ix) does not affect execution time&lt;br /&gt;
&lt;br /&gt;
=Move instructions=&lt;br /&gt;
&lt;br /&gt;
These following two tables indicate the number of clock periods for the move instruction. This data includes instruction fetch, operand reads, and operand writes.&lt;br /&gt;
&lt;br /&gt;
==Byte and word==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.b (a0)+,$10201D&#039;&#039;&#039; (Byte (An)+ to xxx.L) takes 20 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|22(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|26(5/1)||class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|28(6/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
==Long==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.l $05012C,4(a1,d0)&#039;&#039;&#039; (Long xxx.L to d(An,ix)) takes 34 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|28(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;red&amp;quot;|30(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|34(6/2)||class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|36(7/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
=Standard instructions=&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;add.w d3,a7&#039;&#039;&#039; (Word ea Dn + An) takes 8 cycles.&lt;br /&gt;
&lt;br /&gt;
The number of clock periods shown in this table indicates the time required to perform the operations, store the results and read the next instruction. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || &amp;lt;ea&amp;gt;,An * || &amp;lt;ea&amp;gt;,Dn || Dn,&amp;lt;M&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADD&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|AND&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMP&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;yellow&amp;quot;|6(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|158(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|140(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EOR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) ***||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;orange&amp;quot;|8(1/0) ***||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!MULS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!MULU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|OR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) +**||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0) +**||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUB&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
notes:	+ Add effective address calculation time&lt;br /&gt;
	^ Word or long only&lt;br /&gt;
	* Indicates maximum value&lt;br /&gt;
       ** The base time of six clock periods is increased to eight		&lt;br /&gt;
	  if the effective address mode is register direct or &lt;br /&gt;
	  immediate (effective address time should also be added)&lt;br /&gt;
      *** Only available effective address mode is data register direct&lt;br /&gt;
	  &lt;br /&gt;
	DIVS,DIVU - The divide algorithm used by the MC68000 provides less&lt;br /&gt;
		    than 10% difference between the best and the worst case&lt;br /&gt;
		    timings.&lt;br /&gt;
	MULS,MULU - The multiply algorithm requires 38+2n clocks where&lt;br /&gt;
		    n is defined as:&lt;br /&gt;
		MULU: n = the number of ones in the &amp;lt;ea&amp;gt;&lt;br /&gt;
		MULS: n = concatenate the &amp;lt;ea&amp;gt; with a zero as the LSB;&lt;br /&gt;
			  n is the resultant number of 10 or 01 patterns&lt;br /&gt;
			  in the 17-bit source; i.e., worst case happens&lt;br /&gt;
			  when the source is $5555&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Immediate instructions=&lt;br /&gt;
&lt;br /&gt;
The number of clock periods periods shown in this table includes the time to fetch immediate operands, perform the operations, store the results and read the next operation. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || #,Dn || #,An || #,M&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ANDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMPI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;green&amp;quot;|8(2/0)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!MOVEQ&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)|| - || -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;yellow&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
	+ Add effective address calculation time&lt;br /&gt;
	* word only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Single operand instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the single operand&lt;br /&gt;
instructions. The number of clock periods and the number of read and write cycles&lt;br /&gt;
must be added respectively to those of the effective address calculation&lt;br /&gt;
where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	 memory&lt;br /&gt;
&lt;br /&gt;
CLR			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NBCD		  byte		6(1/0)		 8(1/1) +&lt;br /&gt;
NEG			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NEGX		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NOT			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
Scc			byte,false	4(1/0)		 8(1/1) +&lt;br /&gt;
			byte,true	6(1/0)		 8(1/1) +&lt;br /&gt;
TAS #		  byte		4(1/0)		10(1/1) +&lt;br /&gt;
TST			byte,word	4(1/0)		 4(1/0) +&lt;br /&gt;
			  long		4(1/0)		 4(1/0) +&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
        # This instruction should never be used on the Amiga as its invisiable&lt;br /&gt;
          read/write cycle can disrupt system DMA.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Shift and rotate instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the shift and rotate&lt;br /&gt;
instructions. The number of clock periods and the number of read and write&lt;br /&gt;
cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	memory&lt;br /&gt;
&lt;br /&gt;
ASR,ASL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
LSR,LSL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROR,ROL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROXR,ROXL	byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	n is the shift or rotate count&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Bit manipulation instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods required for the bit&lt;br /&gt;
manipulation instructions. The number of clock periods and the number of read and &lt;br /&gt;
write cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated. Dynamic: register, static: immediate.&lt;br /&gt;
&lt;br /&gt;
instruction  size            dynamic                 static&lt;br /&gt;
                        register   memory       register   memory	&lt;br /&gt;
BCHG         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BCLR         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long       10(1/0) *    -          14(2/0) *     -&lt;br /&gt;
BSET         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BTST         byte          -  	   4(1/0) +        -        8(2/0) +&lt;br /&gt;
             long        6(1/0)      -          10(2/0)       -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* indicates maximum value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conditional instructions=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Mnemonic || Displacement || Branch taken || Not taken&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Bcc&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|8(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;orange&amp;quot;|12(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BRA&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BSR&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|DBcc&lt;br /&gt;
|cc true&lt;br /&gt;
|&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|cc false&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=JMP, JSR, LEA, PEA and MOVEM instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This Table indicates the number of clock periods required for the jump,&lt;br /&gt;
jump-to-subroutine, load effective address, push effective address and&lt;br /&gt;
move multiple registers instructions.&lt;br /&gt;
&lt;br /&gt;
instr	size    (An)		(An)+		-(An)	 d(An)	&lt;br /&gt;
JMP     -	    8(2/0)	     -		      -    10(2/0)&lt;br /&gt;
JSR     -	   16(2/2)	     -		      -	   18(2/2)&lt;br /&gt;
LEA     -	    4(1/0)	     -		      -	    8(2/0)&lt;br /&gt;
PEA     -	   12(1/2)	     -		      -	   16(2/2)&lt;br /&gt;
MOVEM   word     12+4n       12+4n	      -      16+4n&lt;br /&gt;
M-&amp;gt;R           (3+n/0)	   (3+n/0)	      -	   (4+n/0)&lt;br /&gt;
	    long     12+8n	     12+8n	      -	     16+8n&lt;br /&gt;
		      (3+2n/0)    (3+2n/0)	      -   (4+2n/0)&lt;br /&gt;
MOVEM	word	  8+4n	     -		     8+4n	 12+4n&lt;br /&gt;
R-&amp;gt;M		     (2/n)	     -		    (2/n)	 (3/n)&lt;br /&gt;
	    long	  8+8n	     -		     8+8n	 12+8n&lt;br /&gt;
                (2/2n)	     -		   (2/2n)	(3/2n)&lt;br /&gt;
&lt;br /&gt;
instr	size	d(An,ix)+   xxx.W      xxx.L      d(PC)      d(PC,ix)*&lt;br /&gt;
JMP		 -		 14(3/0)    10(2/0)    12(3/0)	  10(2/0)    14(3/0)&lt;br /&gt;
JSR		 -		 22(2/2)    18(2/2)    20(3/2)	  18(2/2)    22(2/2)&lt;br /&gt;
LEA		 -		 12(2/0)     8(2/0)    12(3/0)	   8(2/0)    12(2/0)&lt;br /&gt;
PEA		 -		 20(2/2)    16(2/2)    20(3/2)	  16(2/2)    20(2/2)&lt;br /&gt;
MOVEM	word	   18+4n      16+4n      20+4n	    16+4n      18+4n&lt;br /&gt;
M-&amp;gt;R			 (4+n/0)    (4+n/0)    (5+n/0)	  (4+n/0)    (4+n/0)&lt;br /&gt;
		long	   18+8n      16+8n      20+8n	    16+8n      18+8n&lt;br /&gt;
				(4+2n/0)   (4+2n/0)   (5+2n/0)	 (4+2n/0)   (4+2n/0)&lt;br /&gt;
MOVEM	word	   14+4n      12+4n      16+4n	    -		-&lt;br /&gt;
R-&amp;gt;M			   (3/n)      (3/n)      (4/n)	    -		-&lt;br /&gt;
        long	   14+8n      12+8n      16+8n	    -		-&lt;br /&gt;
				  (3/2n)     (3/2n)     (4/2n)	    -		-&lt;br /&gt;
&lt;br /&gt;
n is the number of registers to move&lt;br /&gt;
* is the size of the index register (ix) does not affect the instruction&#039;s&lt;br /&gt;
  execution time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Multi-precision instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the multi-precision&lt;br /&gt;
instructions. The number of clock periods includes the time to fetch both&lt;br /&gt;
operands, perform the operations, store the results and read the next &lt;br /&gt;
instructions.&lt;br /&gt;
&lt;br /&gt;
instruction	size		op Dn,Dn	op M,M&lt;br /&gt;
&lt;br /&gt;
ADDX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
			  long		8(1/0)		30(5/2)&lt;br /&gt;
CMPM		byte,word	  -			12(3/0)&lt;br /&gt;
			  long		  -			20(5/0)&lt;br /&gt;
SUBX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
			  long		8(1/0)		30(5/2)&lt;br /&gt;
ABCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
SBCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the following &lt;br /&gt;
miscellaneous instructions. The number of clock periods and plus the number&lt;br /&gt;
of read and write cycles must be added to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction		size	register	memory&lt;br /&gt;
&lt;br /&gt;
ANDI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ANDI to SR		word	 20(3/0)	   -&lt;br /&gt;
CHK				 -		 10(1/0) +	   -&lt;br /&gt;
EORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
EORI to SR		word	 20(3/0)	   -&lt;br /&gt;
ORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ORI to SR		word	 20(3/0)	   -&lt;br /&gt;
MOVE from SR	 -	 	  6(1/0)	 8(1/1)+&lt;br /&gt;
MOVE to CCR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
MOVE to SR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
EXG				 -		  6(1/0)	   -&lt;br /&gt;
EXT				word	  4(1/0)	   -&lt;br /&gt;
				long	  4(1/0)	   -&lt;br /&gt;
LINK		 	 -		 16(2/2)	   -&lt;br /&gt;
MOVE from USP	 -		  4(1/0)	   -&lt;br /&gt;
MOVE to USP	 	 -		  4(1/0)	   -&lt;br /&gt;
NOP				 -		  4(1/0)	   -&lt;br /&gt;
RESET			 -		132(1/0)	   -&lt;br /&gt;
RTE				 -		 20(5/0)	   -&lt;br /&gt;
RTR				 -		 20(5/0)	   -&lt;br /&gt;
RTS				 -		 16(4/0)	   -&lt;br /&gt;
STOP		 	 -		  4(0/0)	   -&lt;br /&gt;
SWAP		 	 -		  4(1/0)	   -&lt;br /&gt;
TRAPV (No Trap)	 -		  4(1/0)	   -&lt;br /&gt;
UNLK		 	 -		 12(3/0)	   -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Move Peripheral instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
instruction	size	register-&amp;gt;memory	memory-&amp;gt;register&lt;br /&gt;
&lt;br /&gt;
MOVEP		word	16(2/2)				16(4/0)	&lt;br /&gt;
			long	24(2/4)				24(6/0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Exception processing=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for exception processing.&lt;br /&gt;
The number of clock periods includes the time for all stacking, the vector&lt;br /&gt;
fetch and the fetch of the first two instruction words of the handler routine.&lt;br /&gt;
&lt;br /&gt;
	exception						periods&lt;br /&gt;
&lt;br /&gt;
	address error					50(4/7)&lt;br /&gt;
	bus error						50(4/7)&lt;br /&gt;
	CHK instruction (trap taken)	44(5/3)+&lt;br /&gt;
	Divide by Zero					42(5/3)&lt;br /&gt;
	illegal instruction				34(4/3)&lt;br /&gt;
	interrupt						44(5/3)*&lt;br /&gt;
	privilege violation				34(4/3)&lt;br /&gt;
	_____&lt;br /&gt;
	RESET **						40(6/0)&lt;br /&gt;
	trace							34(4/3)&lt;br /&gt;
	TRAP instruction				38(4/3)&lt;br /&gt;
	TRAPV instruction (trap taken)	34(4/3)&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* the interrupt acknowledge cycle is assumed to take four&lt;br /&gt;
	  clock periods&lt;br /&gt;
                                    _____     ____&lt;br /&gt;
	** indicates the time from when RESET and HALT are first&lt;br /&gt;
	  sampled as negated to when instruction execution starts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Base system]]&lt;br /&gt;
[[Category:Code]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5905</id>
		<title>68k instructions timings</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5905"/>
		<updated>2018-01-20T07:17:08Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* Exception processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mirrored information from [[http://oldwww.nvg.ntnu.no/amiga/MC680x0_Sections/mc68000timing.HTML oldwww.nvg.ntnu.no]]&lt;br /&gt;
&lt;br /&gt;
The number of bus &#039;&#039;&#039;r&#039;&#039;&#039;ead and &#039;&#039;&#039;w&#039;&#039;&#039;rite cycles are shown in parenthesis as (r/w). Any other cycles are internal.&lt;br /&gt;
&lt;br /&gt;
In the following tables, the headings have the following meanings:&lt;br /&gt;
* An : Address register operand&lt;br /&gt;
* Dn : Data register operand&lt;br /&gt;
* ea : Operand specified by an effective address&lt;br /&gt;
* M : Memory effective address operand&lt;br /&gt;
&lt;br /&gt;
To get the real execution time, multiply the total cycles count by 83.33ns ([[Clock|1/12MHz]]). An example is given in each section.&lt;br /&gt;
&lt;br /&gt;
The [[68k interrupts|vertical blank]] lasts exactly 40 lines * 384 pixels * 2 cycles per pixel = 30720 cycles (2.56ms).&lt;br /&gt;
&lt;br /&gt;
See [[optimization]].&lt;br /&gt;
&lt;br /&gt;
=Effective address operand calculation=&lt;br /&gt;
&lt;br /&gt;
This table lists the number of clock periods required to compute an instruction&#039;s effective address. It includes fetching of any extension words, the address computation, and fetching of the memory operand.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax||Adressing mode||B,W||L&lt;br /&gt;
|-&lt;br /&gt;
|Dn&lt;br /&gt;
|Data register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|An&lt;br /&gt;
|Address register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)&lt;br /&gt;
|Address register indirect&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)+&lt;br /&gt;
|Address register indirect, post inc.&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
| -(An)&lt;br /&gt;
|Address register indirect, pre dec.&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An)&lt;br /&gt;
|Address register indirect, displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An,ix)&lt;br /&gt;
|Address register indirect, index&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.w&lt;br /&gt;
|Absolute short&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.l&lt;br /&gt;
|Absolute long&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|16(4/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC)&lt;br /&gt;
|PC with displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC,ix)&lt;br /&gt;
|PC with index&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|#xxx&lt;br /&gt;
|Immediate&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Pre-dec is slower than post-inc&lt;br /&gt;
* There are no write cycles involved in processing the effective address&lt;br /&gt;
* The size of the index register (ix) does not affect execution time&lt;br /&gt;
&lt;br /&gt;
=Move instructions=&lt;br /&gt;
&lt;br /&gt;
These following two tables indicate the number of clock periods for the move instruction. This data includes instruction fetch, operand reads, and operand writes.&lt;br /&gt;
&lt;br /&gt;
==Byte and word==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.b (a0)+,$10201D&#039;&#039;&#039; (Byte (An)+ to xxx.L) takes 20 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|22(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|26(5/1)||class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|28(6/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
==Long==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.l $05012C,4(a1,d0)&#039;&#039;&#039; (Long xxx.L to d(An,ix)) takes 34 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|28(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;red&amp;quot;|30(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|34(6/2)||class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|36(7/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
=Standard instructions=&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;add.w d3,a7&#039;&#039;&#039; (Word ea Dn + An) takes 8 cycles.&lt;br /&gt;
&lt;br /&gt;
The number of clock periods shown in this table indicates the time required to perform the operations, store the results and read the next instruction. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || &amp;lt;ea&amp;gt;,An * || &amp;lt;ea&amp;gt;,Dn || Dn,&amp;lt;M&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADD&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|AND&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMP&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;yellow&amp;quot;|6(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|158(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|140(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EOR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) ***||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;orange&amp;quot;|8(1/0) ***||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!MULS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!MULU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|OR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) +**||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0) +**||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUB&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
notes:	+ Add effective address calculation time&lt;br /&gt;
	^ Word or long only&lt;br /&gt;
	* Indicates maximum value&lt;br /&gt;
       ** The base time of six clock periods is increased to eight		&lt;br /&gt;
	  if the effective address mode is register direct or &lt;br /&gt;
	  immediate (effective address time should also be added)&lt;br /&gt;
      *** Only available effective address mode is data register direct&lt;br /&gt;
	  &lt;br /&gt;
	DIVS,DIVU - The divide algorithm used by the MC68000 provides less&lt;br /&gt;
		    than 10% difference between the best and the worst case&lt;br /&gt;
		    timings.&lt;br /&gt;
	MULS,MULU - The multiply algorithm requires 38+2n clocks where&lt;br /&gt;
		    n is defined as:&lt;br /&gt;
		MULU: n = the number of ones in the &amp;lt;ea&amp;gt;&lt;br /&gt;
		MULS: n = concatenate the &amp;lt;ea&amp;gt; with a zero as the LSB;&lt;br /&gt;
			  n is the resultant number of 10 or 01 patterns&lt;br /&gt;
			  in the 17-bit source; i.e., worst case happens&lt;br /&gt;
			  when the source is $5555&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Immediate instructions=&lt;br /&gt;
&lt;br /&gt;
The number of clock periods periods shown in this table includes the time to fetch immediate operands, perform the operations, store the results and read the next operation. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || #,Dn || #,An || #,M&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ANDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMPI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;green&amp;quot;|8(2/0)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!MOVEQ&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)|| - || -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;yellow&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
	+ Add effective address calculation time&lt;br /&gt;
	* word only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Single operand instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the single operand&lt;br /&gt;
instructions. The number of clock periods and the number of read and write cycles&lt;br /&gt;
must be added respectively to those of the effective address calculation&lt;br /&gt;
where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	 memory&lt;br /&gt;
&lt;br /&gt;
CLR			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NBCD		  byte		6(1/0)		 8(1/1) +&lt;br /&gt;
NEG			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NEGX		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NOT			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
Scc			byte,false	4(1/0)		 8(1/1) +&lt;br /&gt;
			byte,true	6(1/0)		 8(1/1) +&lt;br /&gt;
TAS #		  byte		4(1/0)		10(1/1) +&lt;br /&gt;
TST			byte,word	4(1/0)		 4(1/0) +&lt;br /&gt;
			  long		4(1/0)		 4(1/0) +&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
        # This instruction should never be used on the Amiga as its invisiable&lt;br /&gt;
          read/write cycle can disrupt system DMA.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Shift and rotate instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the shift and rotate&lt;br /&gt;
instructions. The number of clock periods and the number of read and write&lt;br /&gt;
cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	memory&lt;br /&gt;
&lt;br /&gt;
ASR,ASL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
LSR,LSL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROR,ROL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROXR,ROXL	byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	n is the shift or rotate count&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Bit manipulation instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods required for the bit&lt;br /&gt;
manipulation instructions. The number of clock periods and the number of read and &lt;br /&gt;
write cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated. Dynamic: register, static: immediate.&lt;br /&gt;
&lt;br /&gt;
instruction  size            dynamic                 static&lt;br /&gt;
                        register   memory       register   memory	&lt;br /&gt;
BCHG         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BCLR         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long       10(1/0) *    -          14(2/0) *     -&lt;br /&gt;
BSET         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BTST         byte          -  	   4(1/0) +        -        8(2/0) +&lt;br /&gt;
             long        6(1/0)      -          10(2/0)       -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* indicates maximum value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conditional instructions=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Mnemonic || Displacement || Branch taken || Not taken&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Bcc&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|8(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;orange&amp;quot;|12(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BRA&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BSR&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|DBcc&lt;br /&gt;
|cc true&lt;br /&gt;
|&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|cc false&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=JMP, JSR, LEA, PEA and MOVEM instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This Table indicates the number of clock periods required for the jump,&lt;br /&gt;
jump-to-subroutine, load effective address, push effective address and&lt;br /&gt;
move multiple registers instructions.&lt;br /&gt;
&lt;br /&gt;
instr	size    (An)		(An)+		-(An)	 d(An)	&lt;br /&gt;
JMP     -	    8(2/0)	     -		      -    10(2/0)&lt;br /&gt;
JSR     -	   16(2/2)	     -		      -	   18(2/2)&lt;br /&gt;
LEA     -	    4(1/0)	     -		      -	    8(2/0)&lt;br /&gt;
PEA     -	   12(1/2)	     -		      -	   16(2/2)&lt;br /&gt;
MOVEM   word     12+4n       12+4n	      -      16+4n&lt;br /&gt;
M-&amp;gt;R           (3+n/0)	   (3+n/0)	      -	   (4+n/0)&lt;br /&gt;
	    long     12+8n	     12+8n	      -	     16+8n&lt;br /&gt;
		      (3+2n/0)    (3+2n/0)	      -   (4+2n/0)&lt;br /&gt;
MOVEM	word	  8+4n	     -		     8+4n	 12+4n&lt;br /&gt;
R-&amp;gt;M		     (2/n)	     -		    (2/n)	 (3/n)&lt;br /&gt;
	    long	  8+8n	     -		     8+8n	 12+8n&lt;br /&gt;
                (2/2n)	     -		   (2/2n)	(3/2n)&lt;br /&gt;
&lt;br /&gt;
instr	size	d(An,ix)+   xxx.W      xxx.L      d(PC)      d(PC,ix)*&lt;br /&gt;
JMP	 -	 14(3/0)    10(2/0)    12(3/0)	  10(2/0)    14(3/0)&lt;br /&gt;
JSR	 -	 22(2/2)    18(2/2)    20(3/2)	  18(2/2)    22(2/2)&lt;br /&gt;
LEA	 -	 12(2/0)     8(2/0)    12(3/0)	   8(2/0)    12(2/0)&lt;br /&gt;
PEA	 -	 20(2/2)    16(2/2)    20(3/2)	  16(2/2)    20(2/2)&lt;br /&gt;
MOVEM	word	   18+4n      16+4n      20+4n	    16+4n      18+4n&lt;br /&gt;
M-&amp;gt;R		 (4+n/0)    (4+n/0)    (5+n/0)	  (4+n/0)    (4+n/0)&lt;br /&gt;
	long	   18+8n      16+8n      20+8n	    16+8n      18+8n&lt;br /&gt;
		(4+2n/0)   (4+2n/0)   (5+2n/0)	 (4+2n/0)   (4+2n/0)&lt;br /&gt;
MOVEM	word	   14+4n      12+4n      16+4n	    -		-&lt;br /&gt;
R-&amp;gt;M		   (3/n)      (3/n)      (4/n)	    -		-&lt;br /&gt;
        long   14+8n      12+8n      16+8n	    -		-&lt;br /&gt;
		  (3/2n)     (3/2n)     (4/2n)	    -		-&lt;br /&gt;
&lt;br /&gt;
n is the number of registers to move&lt;br /&gt;
* is the size of the index register (ix) does not affect the instruction&#039;s&lt;br /&gt;
  execution time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Multi-precision instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the multi-precision&lt;br /&gt;
instructions. The number of clock periods includes the time to fetch both&lt;br /&gt;
operands, perform the operations, store the results and read the next &lt;br /&gt;
instructions.&lt;br /&gt;
&lt;br /&gt;
instruction	size		op Dn,Dn	op M,M&lt;br /&gt;
&lt;br /&gt;
ADDX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
			  long		8(1/0)		30(5/2)&lt;br /&gt;
CMPM		byte,word	  -			12(3/0)&lt;br /&gt;
			  long		  -			20(5/0)&lt;br /&gt;
SUBX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
			  long		8(1/0)		30(5/2)&lt;br /&gt;
ABCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
SBCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the following &lt;br /&gt;
miscellaneous instructions. The number of clock periods and plus the number&lt;br /&gt;
of read and write cycles must be added to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction		size	register	memory&lt;br /&gt;
&lt;br /&gt;
ANDI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ANDI to SR		word	 20(3/0)	   -&lt;br /&gt;
CHK				 -		 10(1/0) +	   -&lt;br /&gt;
EORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
EORI to SR		word	 20(3/0)	   -&lt;br /&gt;
ORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ORI to SR		word	 20(3/0)	   -&lt;br /&gt;
MOVE from SR	 -	 	  6(1/0)	 8(1/1)+&lt;br /&gt;
MOVE to CCR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
MOVE to SR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
EXG				 -		  6(1/0)	   -&lt;br /&gt;
EXT				word	  4(1/0)	   -&lt;br /&gt;
				long	  4(1/0)	   -&lt;br /&gt;
LINK		 	 -		 16(2/2)	   -&lt;br /&gt;
MOVE from USP	 -		  4(1/0)	   -&lt;br /&gt;
MOVE to USP	 	 -		  4(1/0)	   -&lt;br /&gt;
NOP				 -		  4(1/0)	   -&lt;br /&gt;
RESET			 -		132(1/0)	   -&lt;br /&gt;
RTE				 -		 20(5/0)	   -&lt;br /&gt;
RTR				 -		 20(5/0)	   -&lt;br /&gt;
RTS				 -		 16(4/0)	   -&lt;br /&gt;
STOP		 	 -		  4(0/0)	   -&lt;br /&gt;
SWAP		 	 -		  4(1/0)	   -&lt;br /&gt;
TRAPV (No Trap)	 -		  4(1/0)	   -&lt;br /&gt;
UNLK		 	 -		 12(3/0)	   -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Move Peripheral instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
instruction	size	register-&amp;gt;memory	memory-&amp;gt;register&lt;br /&gt;
&lt;br /&gt;
MOVEP		word	16(2/2)				16(4/0)	&lt;br /&gt;
			long	24(2/4)				24(6/0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Exception processing=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for exception processing.&lt;br /&gt;
The number of clock periods includes the time for all stacking, the vector&lt;br /&gt;
fetch and the fetch of the first two instruction words of the handler routine.&lt;br /&gt;
&lt;br /&gt;
	exception						periods&lt;br /&gt;
&lt;br /&gt;
	address error					50(4/7)&lt;br /&gt;
	bus error						50(4/7)&lt;br /&gt;
	CHK instruction (trap taken)	44(5/3)+&lt;br /&gt;
	Divide by Zero					42(5/3)&lt;br /&gt;
	illegal instruction				34(4/3)&lt;br /&gt;
	interrupt						44(5/3)*&lt;br /&gt;
	privilege violation				34(4/3)&lt;br /&gt;
	_____&lt;br /&gt;
	RESET **						40(6/0)&lt;br /&gt;
	trace							34(4/3)&lt;br /&gt;
	TRAP instruction				38(4/3)&lt;br /&gt;
	TRAPV instruction (trap taken)	34(4/3)&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* the interrupt acknowledge cycle is assumed to take four&lt;br /&gt;
	  clock periods&lt;br /&gt;
                                    _____     ____&lt;br /&gt;
	** indicates the time from when RESET and HALT are first&lt;br /&gt;
	  sampled as negated to when instruction execution starts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Base system]]&lt;br /&gt;
[[Category:Code]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5904</id>
		<title>68k instructions timings</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5904"/>
		<updated>2018-01-20T07:11:53Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* Single operand instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mirrored information from [[http://oldwww.nvg.ntnu.no/amiga/MC680x0_Sections/mc68000timing.HTML oldwww.nvg.ntnu.no]]&lt;br /&gt;
&lt;br /&gt;
The number of bus &#039;&#039;&#039;r&#039;&#039;&#039;ead and &#039;&#039;&#039;w&#039;&#039;&#039;rite cycles are shown in parenthesis as (r/w). Any other cycles are internal.&lt;br /&gt;
&lt;br /&gt;
In the following tables, the headings have the following meanings:&lt;br /&gt;
* An : Address register operand&lt;br /&gt;
* Dn : Data register operand&lt;br /&gt;
* ea : Operand specified by an effective address&lt;br /&gt;
* M : Memory effective address operand&lt;br /&gt;
&lt;br /&gt;
To get the real execution time, multiply the total cycles count by 83.33ns ([[Clock|1/12MHz]]). An example is given in each section.&lt;br /&gt;
&lt;br /&gt;
The [[68k interrupts|vertical blank]] lasts exactly 40 lines * 384 pixels * 2 cycles per pixel = 30720 cycles (2.56ms).&lt;br /&gt;
&lt;br /&gt;
See [[optimization]].&lt;br /&gt;
&lt;br /&gt;
=Effective address operand calculation=&lt;br /&gt;
&lt;br /&gt;
This table lists the number of clock periods required to compute an instruction&#039;s effective address. It includes fetching of any extension words, the address computation, and fetching of the memory operand.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax||Adressing mode||B,W||L&lt;br /&gt;
|-&lt;br /&gt;
|Dn&lt;br /&gt;
|Data register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|An&lt;br /&gt;
|Address register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)&lt;br /&gt;
|Address register indirect&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)+&lt;br /&gt;
|Address register indirect, post inc.&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
| -(An)&lt;br /&gt;
|Address register indirect, pre dec.&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An)&lt;br /&gt;
|Address register indirect, displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An,ix)&lt;br /&gt;
|Address register indirect, index&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.w&lt;br /&gt;
|Absolute short&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.l&lt;br /&gt;
|Absolute long&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|16(4/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC)&lt;br /&gt;
|PC with displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC,ix)&lt;br /&gt;
|PC with index&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|#xxx&lt;br /&gt;
|Immediate&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Pre-dec is slower than post-inc&lt;br /&gt;
* There are no write cycles involved in processing the effective address&lt;br /&gt;
* The size of the index register (ix) does not affect execution time&lt;br /&gt;
&lt;br /&gt;
=Move instructions=&lt;br /&gt;
&lt;br /&gt;
These following two tables indicate the number of clock periods for the move instruction. This data includes instruction fetch, operand reads, and operand writes.&lt;br /&gt;
&lt;br /&gt;
==Byte and word==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.b (a0)+,$10201D&#039;&#039;&#039; (Byte (An)+ to xxx.L) takes 20 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|22(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|26(5/1)||class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|28(6/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
==Long==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.l $05012C,4(a1,d0)&#039;&#039;&#039; (Long xxx.L to d(An,ix)) takes 34 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|28(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;red&amp;quot;|30(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|34(6/2)||class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|36(7/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
=Standard instructions=&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;add.w d3,a7&#039;&#039;&#039; (Word ea Dn + An) takes 8 cycles.&lt;br /&gt;
&lt;br /&gt;
The number of clock periods shown in this table indicates the time required to perform the operations, store the results and read the next instruction. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || &amp;lt;ea&amp;gt;,An * || &amp;lt;ea&amp;gt;,Dn || Dn,&amp;lt;M&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADD&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|AND&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMP&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;yellow&amp;quot;|6(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|158(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|140(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EOR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) ***||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;orange&amp;quot;|8(1/0) ***||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!MULS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!MULU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|OR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) +**||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0) +**||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUB&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
notes:	+ Add effective address calculation time&lt;br /&gt;
	^ Word or long only&lt;br /&gt;
	* Indicates maximum value&lt;br /&gt;
       ** The base time of six clock periods is increased to eight		&lt;br /&gt;
	  if the effective address mode is register direct or &lt;br /&gt;
	  immediate (effective address time should also be added)&lt;br /&gt;
      *** Only available effective address mode is data register direct&lt;br /&gt;
	  &lt;br /&gt;
	DIVS,DIVU - The divide algorithm used by the MC68000 provides less&lt;br /&gt;
		    than 10% difference between the best and the worst case&lt;br /&gt;
		    timings.&lt;br /&gt;
	MULS,MULU - The multiply algorithm requires 38+2n clocks where&lt;br /&gt;
		    n is defined as:&lt;br /&gt;
		MULU: n = the number of ones in the &amp;lt;ea&amp;gt;&lt;br /&gt;
		MULS: n = concatenate the &amp;lt;ea&amp;gt; with a zero as the LSB;&lt;br /&gt;
			  n is the resultant number of 10 or 01 patterns&lt;br /&gt;
			  in the 17-bit source; i.e., worst case happens&lt;br /&gt;
			  when the source is $5555&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Immediate instructions=&lt;br /&gt;
&lt;br /&gt;
The number of clock periods periods shown in this table includes the time to fetch immediate operands, perform the operations, store the results and read the next operation. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || #,Dn || #,An || #,M&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ANDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMPI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;green&amp;quot;|8(2/0)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!MOVEQ&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)|| - || -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;yellow&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
	+ Add effective address calculation time&lt;br /&gt;
	* word only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Single operand instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the single operand&lt;br /&gt;
instructions. The number of clock periods and the number of read and write cycles&lt;br /&gt;
must be added respectively to those of the effective address calculation&lt;br /&gt;
where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	 memory&lt;br /&gt;
&lt;br /&gt;
CLR			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NBCD		  byte		6(1/0)		 8(1/1) +&lt;br /&gt;
NEG			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NEGX		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
NOT			byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
			  long		6(1/0)		12(1/2) +&lt;br /&gt;
Scc			byte,false	4(1/0)		 8(1/1) +&lt;br /&gt;
			byte,true	6(1/0)		 8(1/1) +&lt;br /&gt;
TAS #		  byte		4(1/0)		10(1/1) +&lt;br /&gt;
TST			byte,word	4(1/0)		 4(1/0) +&lt;br /&gt;
			  long		4(1/0)		 4(1/0) +&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
        # This instruction should never be used on the Amiga as its invisiable&lt;br /&gt;
          read/write cycle can disrupt system DMA.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Shift and rotate instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the shift and rotate&lt;br /&gt;
instructions. The number of clock periods and the number of read and write&lt;br /&gt;
cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	memory&lt;br /&gt;
&lt;br /&gt;
ASR,ASL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
LSR,LSL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROR,ROL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROXR,ROXL	byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	n is the shift or rotate count&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Bit manipulation instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods required for the bit&lt;br /&gt;
manipulation instructions. The number of clock periods and the number of read and &lt;br /&gt;
write cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated. Dynamic: register, static: immediate.&lt;br /&gt;
&lt;br /&gt;
instruction  size            dynamic                 static&lt;br /&gt;
                        register   memory       register   memory	&lt;br /&gt;
BCHG         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BCLR         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long       10(1/0) *    -          14(2/0) *     -&lt;br /&gt;
BSET         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BTST         byte          -  	   4(1/0) +        -        8(2/0) +&lt;br /&gt;
             long        6(1/0)      -          10(2/0)       -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* indicates maximum value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conditional instructions=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Mnemonic || Displacement || Branch taken || Not taken&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Bcc&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|8(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;orange&amp;quot;|12(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BRA&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BSR&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|DBcc&lt;br /&gt;
|cc true&lt;br /&gt;
|&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|cc false&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=JMP, JSR, LEA, PEA and MOVEM instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This Table indicates the number of clock periods required for the jump,&lt;br /&gt;
jump-to-subroutine, load effective address, push effective address and&lt;br /&gt;
move multiple registers instructions.&lt;br /&gt;
&lt;br /&gt;
instr	size    (An)		(An)+		-(An)	 d(An)	&lt;br /&gt;
JMP     -	    8(2/0)	     -		      -    10(2/0)&lt;br /&gt;
JSR     -	   16(2/2)	     -		      -	   18(2/2)&lt;br /&gt;
LEA     -	    4(1/0)	     -		      -	    8(2/0)&lt;br /&gt;
PEA     -	   12(1/2)	     -		      -	   16(2/2)&lt;br /&gt;
MOVEM   word     12+4n       12+4n	      -      16+4n&lt;br /&gt;
M-&amp;gt;R           (3+n/0)	   (3+n/0)	      -	   (4+n/0)&lt;br /&gt;
	    long     12+8n	     12+8n	      -	     16+8n&lt;br /&gt;
		      (3+2n/0)    (3+2n/0)	      -   (4+2n/0)&lt;br /&gt;
MOVEM	word	  8+4n	     -		     8+4n	 12+4n&lt;br /&gt;
R-&amp;gt;M		     (2/n)	     -		    (2/n)	 (3/n)&lt;br /&gt;
	    long	  8+8n	     -		     8+8n	 12+8n&lt;br /&gt;
                (2/2n)	     -		   (2/2n)	(3/2n)&lt;br /&gt;
&lt;br /&gt;
instr	size	d(An,ix)+   xxx.W      xxx.L      d(PC)      d(PC,ix)*&lt;br /&gt;
JMP	 -	 14(3/0)    10(2/0)    12(3/0)	  10(2/0)    14(3/0)&lt;br /&gt;
JSR	 -	 22(2/2)    18(2/2)    20(3/2)	  18(2/2)    22(2/2)&lt;br /&gt;
LEA	 -	 12(2/0)     8(2/0)    12(3/0)	   8(2/0)    12(2/0)&lt;br /&gt;
PEA	 -	 20(2/2)    16(2/2)    20(3/2)	  16(2/2)    20(2/2)&lt;br /&gt;
MOVEM	word	   18+4n      16+4n      20+4n	    16+4n      18+4n&lt;br /&gt;
M-&amp;gt;R		 (4+n/0)    (4+n/0)    (5+n/0)	  (4+n/0)    (4+n/0)&lt;br /&gt;
	long	   18+8n      16+8n      20+8n	    16+8n      18+8n&lt;br /&gt;
		(4+2n/0)   (4+2n/0)   (5+2n/0)	 (4+2n/0)   (4+2n/0)&lt;br /&gt;
MOVEM	word	   14+4n      12+4n      16+4n	    -		-&lt;br /&gt;
R-&amp;gt;M		   (3/n)      (3/n)      (4/n)	    -		-&lt;br /&gt;
        long   14+8n      12+8n      16+8n	    -		-&lt;br /&gt;
		  (3/2n)     (3/2n)     (4/2n)	    -		-&lt;br /&gt;
&lt;br /&gt;
n is the number of registers to move&lt;br /&gt;
* is the size of the index register (ix) does not affect the instruction&#039;s&lt;br /&gt;
  execution time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Multi-precision instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the multi-precision&lt;br /&gt;
instructions. The number of clock periods includes the time to fetch both&lt;br /&gt;
operands, perform the operations, store the results and read the next &lt;br /&gt;
instructions.&lt;br /&gt;
&lt;br /&gt;
instruction	size		op Dn,Dn	op M,M&lt;br /&gt;
&lt;br /&gt;
ADDX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
			  long		8(1/0)		30(5/2)&lt;br /&gt;
CMPM		byte,word	  -			12(3/0)&lt;br /&gt;
			  long		  -			20(5/0)&lt;br /&gt;
SUBX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
			  long		8(1/0)		30(5/2)&lt;br /&gt;
ABCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
SBCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the following &lt;br /&gt;
miscellaneous instructions. The number of clock periods and plus the number&lt;br /&gt;
of read and write cycles must be added to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction		size	register	memory&lt;br /&gt;
&lt;br /&gt;
ANDI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ANDI to SR		word	 20(3/0)	   -&lt;br /&gt;
CHK				 -		 10(1/0) +	   -&lt;br /&gt;
EORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
EORI to SR		word	 20(3/0)	   -&lt;br /&gt;
ORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ORI to SR		word	 20(3/0)	   -&lt;br /&gt;
MOVE from SR	 -	 	  6(1/0)	 8(1/1)+&lt;br /&gt;
MOVE to CCR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
MOVE to SR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
EXG				 -		  6(1/0)	   -&lt;br /&gt;
EXT				word	  4(1/0)	   -&lt;br /&gt;
				long	  4(1/0)	   -&lt;br /&gt;
LINK		 	 -		 16(2/2)	   -&lt;br /&gt;
MOVE from USP	 -		  4(1/0)	   -&lt;br /&gt;
MOVE to USP	 	 -		  4(1/0)	   -&lt;br /&gt;
NOP				 -		  4(1/0)	   -&lt;br /&gt;
RESET			 -		132(1/0)	   -&lt;br /&gt;
RTE				 -		 20(5/0)	   -&lt;br /&gt;
RTR				 -		 20(5/0)	   -&lt;br /&gt;
RTS				 -		 16(4/0)	   -&lt;br /&gt;
STOP		 	 -		  4(0/0)	   -&lt;br /&gt;
SWAP		 	 -		  4(1/0)	   -&lt;br /&gt;
TRAPV (No Trap)	 -		  4(1/0)	   -&lt;br /&gt;
UNLK		 	 -		 12(3/0)	   -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Move Peripheral instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
instruction	size	register-&amp;gt;memory	memory-&amp;gt;register&lt;br /&gt;
&lt;br /&gt;
MOVEP		word	16(2/2)				16(4/0)	&lt;br /&gt;
			long	24(2/4)				24(6/0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Exception processing=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for exception processing.&lt;br /&gt;
The number of clock periods includes the time for all stacking, the vector&lt;br /&gt;
fetch and the fetch of the first two instruction words of the handler routine.&lt;br /&gt;
&lt;br /&gt;
	exception			periods&lt;br /&gt;
&lt;br /&gt;
	address error			50(4/7)&lt;br /&gt;
	bus error			50(4/7)&lt;br /&gt;
	CHK instruction (trap taken)	44(5/3)+&lt;br /&gt;
	Divide by Zero			42(5/3)&lt;br /&gt;
	illegal instruction		34(4/3)&lt;br /&gt;
	interrupt			44(5/3)*&lt;br /&gt;
	privilege violation		34(4/3)&lt;br /&gt;
        _____&lt;br /&gt;
	RESET **			40(6/0)&lt;br /&gt;
	trace				34(4/3)&lt;br /&gt;
	TRAP instruction		38(4/3)&lt;br /&gt;
	TRAPV instruction (trap taken)	34(4/3)&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* the interrupt acknowledge cycle is assumed to take four&lt;br /&gt;
	  clock periods&lt;br /&gt;
                                       _____     ____&lt;br /&gt;
       ** indicates the time from when RESET and HALT are first&lt;br /&gt;
	  sampled as negated to when instruction execution starts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Base system]]&lt;br /&gt;
[[Category:Code]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5903</id>
		<title>68k instructions timings</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5903"/>
		<updated>2018-01-19T08:45:41Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* Multi-precision instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mirrored information from [[http://oldwww.nvg.ntnu.no/amiga/MC680x0_Sections/mc68000timing.HTML oldwww.nvg.ntnu.no]]&lt;br /&gt;
&lt;br /&gt;
The number of bus &#039;&#039;&#039;r&#039;&#039;&#039;ead and &#039;&#039;&#039;w&#039;&#039;&#039;rite cycles are shown in parenthesis as (r/w). Any other cycles are internal.&lt;br /&gt;
&lt;br /&gt;
In the following tables, the headings have the following meanings:&lt;br /&gt;
* An : Address register operand&lt;br /&gt;
* Dn : Data register operand&lt;br /&gt;
* ea : Operand specified by an effective address&lt;br /&gt;
* M : Memory effective address operand&lt;br /&gt;
&lt;br /&gt;
To get the real execution time, multiply the total cycles count by 83.33ns ([[Clock|1/12MHz]]). An example is given in each section.&lt;br /&gt;
&lt;br /&gt;
The [[68k interrupts|vertical blank]] lasts exactly 40 lines * 384 pixels * 2 cycles per pixel = 30720 cycles (2.56ms).&lt;br /&gt;
&lt;br /&gt;
See [[optimization]].&lt;br /&gt;
&lt;br /&gt;
=Effective address operand calculation=&lt;br /&gt;
&lt;br /&gt;
This table lists the number of clock periods required to compute an instruction&#039;s effective address. It includes fetching of any extension words, the address computation, and fetching of the memory operand.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax||Adressing mode||B,W||L&lt;br /&gt;
|-&lt;br /&gt;
|Dn&lt;br /&gt;
|Data register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|An&lt;br /&gt;
|Address register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)&lt;br /&gt;
|Address register indirect&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)+&lt;br /&gt;
|Address register indirect, post inc.&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
| -(An)&lt;br /&gt;
|Address register indirect, pre dec.&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An)&lt;br /&gt;
|Address register indirect, displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An,ix)&lt;br /&gt;
|Address register indirect, index&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.w&lt;br /&gt;
|Absolute short&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.l&lt;br /&gt;
|Absolute long&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|16(4/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC)&lt;br /&gt;
|PC with displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC,ix)&lt;br /&gt;
|PC with index&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|#xxx&lt;br /&gt;
|Immediate&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Pre-dec is slower than post-inc&lt;br /&gt;
* There are no write cycles involved in processing the effective address&lt;br /&gt;
* The size of the index register (ix) does not affect execution time&lt;br /&gt;
&lt;br /&gt;
=Move instructions=&lt;br /&gt;
&lt;br /&gt;
These following two tables indicate the number of clock periods for the move instruction. This data includes instruction fetch, operand reads, and operand writes.&lt;br /&gt;
&lt;br /&gt;
==Byte and word==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.b (a0)+,$10201D&#039;&#039;&#039; (Byte (An)+ to xxx.L) takes 20 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|22(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|26(5/1)||class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|28(6/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
==Long==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.l $05012C,4(a1,d0)&#039;&#039;&#039; (Long xxx.L to d(An,ix)) takes 34 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|28(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;red&amp;quot;|30(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|34(6/2)||class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|36(7/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
=Standard instructions=&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;add.w d3,a7&#039;&#039;&#039; (Word ea Dn + An) takes 8 cycles.&lt;br /&gt;
&lt;br /&gt;
The number of clock periods shown in this table indicates the time required to perform the operations, store the results and read the next instruction. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || &amp;lt;ea&amp;gt;,An * || &amp;lt;ea&amp;gt;,Dn || Dn,&amp;lt;M&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADD&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|AND&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMP&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;yellow&amp;quot;|6(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|158(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|140(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EOR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) ***||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;orange&amp;quot;|8(1/0) ***||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!MULS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!MULU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|OR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) +**||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0) +**||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUB&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
notes:	+ Add effective address calculation time&lt;br /&gt;
	^ Word or long only&lt;br /&gt;
	* Indicates maximum value&lt;br /&gt;
       ** The base time of six clock periods is increased to eight		&lt;br /&gt;
	  if the effective address mode is register direct or &lt;br /&gt;
	  immediate (effective address time should also be added)&lt;br /&gt;
      *** Only available effective address mode is data register direct&lt;br /&gt;
	  &lt;br /&gt;
	DIVS,DIVU - The divide algorithm used by the MC68000 provides less&lt;br /&gt;
		    than 10% difference between the best and the worst case&lt;br /&gt;
		    timings.&lt;br /&gt;
	MULS,MULU - The multiply algorithm requires 38+2n clocks where&lt;br /&gt;
		    n is defined as:&lt;br /&gt;
		MULU: n = the number of ones in the &amp;lt;ea&amp;gt;&lt;br /&gt;
		MULS: n = concatenate the &amp;lt;ea&amp;gt; with a zero as the LSB;&lt;br /&gt;
			  n is the resultant number of 10 or 01 patterns&lt;br /&gt;
			  in the 17-bit source; i.e., worst case happens&lt;br /&gt;
			  when the source is $5555&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Immediate instructions=&lt;br /&gt;
&lt;br /&gt;
The number of clock periods periods shown in this table includes the time to fetch immediate operands, perform the operations, store the results and read the next operation. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || #,Dn || #,An || #,M&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ANDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMPI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;green&amp;quot;|8(2/0)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!MOVEQ&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)|| - || -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;yellow&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
	+ Add effective address calculation time&lt;br /&gt;
	* word only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Single operand instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the single operand&lt;br /&gt;
instructions. The number of clock periods and the number of read and write cycles&lt;br /&gt;
must be added respectively to those of the effective address calculation&lt;br /&gt;
where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	 memory&lt;br /&gt;
&lt;br /&gt;
CLR		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
NBCD		  byte		6(1/0)		 8(1/1) +&lt;br /&gt;
NEG		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
NEGX		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
NOT		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
Scc		byte,false	4(1/0)		 8(1/1) +&lt;br /&gt;
		byte,true	6(1/0)		 8(1/1) +&lt;br /&gt;
TAS #		  byte		4(1/0)		10(1/1) +&lt;br /&gt;
TST		byte,word	4(1/0)		 4(1/0) +&lt;br /&gt;
		  long		4(1/0)		 4(1/0) +&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
        # This instruction should never be used on the Amiga as its invisiable&lt;br /&gt;
          read/write cycle can disrupt system DMA.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Shift and rotate instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the shift and rotate&lt;br /&gt;
instructions. The number of clock periods and the number of read and write&lt;br /&gt;
cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	memory&lt;br /&gt;
&lt;br /&gt;
ASR,ASL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
LSR,LSL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROR,ROL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROXR,ROXL	byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	n is the shift or rotate count&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Bit manipulation instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods required for the bit&lt;br /&gt;
manipulation instructions. The number of clock periods and the number of read and &lt;br /&gt;
write cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated. Dynamic: register, static: immediate.&lt;br /&gt;
&lt;br /&gt;
instruction  size            dynamic                 static&lt;br /&gt;
                        register   memory       register   memory	&lt;br /&gt;
BCHG         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BCLR         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long       10(1/0) *    -          14(2/0) *     -&lt;br /&gt;
BSET         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BTST         byte          -  	   4(1/0) +        -        8(2/0) +&lt;br /&gt;
             long        6(1/0)      -          10(2/0)       -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* indicates maximum value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conditional instructions=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Mnemonic || Displacement || Branch taken || Not taken&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Bcc&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|8(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;orange&amp;quot;|12(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BRA&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BSR&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|DBcc&lt;br /&gt;
|cc true&lt;br /&gt;
|&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|cc false&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=JMP, JSR, LEA, PEA and MOVEM instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This Table indicates the number of clock periods required for the jump,&lt;br /&gt;
jump-to-subroutine, load effective address, push effective address and&lt;br /&gt;
move multiple registers instructions.&lt;br /&gt;
&lt;br /&gt;
instr	size    (An)		(An)+		-(An)	 d(An)	&lt;br /&gt;
JMP     -	    8(2/0)	     -		      -    10(2/0)&lt;br /&gt;
JSR     -	   16(2/2)	     -		      -	   18(2/2)&lt;br /&gt;
LEA     -	    4(1/0)	     -		      -	    8(2/0)&lt;br /&gt;
PEA     -	   12(1/2)	     -		      -	   16(2/2)&lt;br /&gt;
MOVEM   word     12+4n       12+4n	      -      16+4n&lt;br /&gt;
M-&amp;gt;R           (3+n/0)	   (3+n/0)	      -	   (4+n/0)&lt;br /&gt;
	    long     12+8n	     12+8n	      -	     16+8n&lt;br /&gt;
		      (3+2n/0)    (3+2n/0)	      -   (4+2n/0)&lt;br /&gt;
MOVEM	word	  8+4n	     -		     8+4n	 12+4n&lt;br /&gt;
R-&amp;gt;M		     (2/n)	     -		    (2/n)	 (3/n)&lt;br /&gt;
	    long	  8+8n	     -		     8+8n	 12+8n&lt;br /&gt;
                (2/2n)	     -		   (2/2n)	(3/2n)&lt;br /&gt;
&lt;br /&gt;
instr	size	d(An,ix)+   xxx.W      xxx.L      d(PC)      d(PC,ix)*&lt;br /&gt;
JMP	 -	 14(3/0)    10(2/0)    12(3/0)	  10(2/0)    14(3/0)&lt;br /&gt;
JSR	 -	 22(2/2)    18(2/2)    20(3/2)	  18(2/2)    22(2/2)&lt;br /&gt;
LEA	 -	 12(2/0)     8(2/0)    12(3/0)	   8(2/0)    12(2/0)&lt;br /&gt;
PEA	 -	 20(2/2)    16(2/2)    20(3/2)	  16(2/2)    20(2/2)&lt;br /&gt;
MOVEM	word	   18+4n      16+4n      20+4n	    16+4n      18+4n&lt;br /&gt;
M-&amp;gt;R		 (4+n/0)    (4+n/0)    (5+n/0)	  (4+n/0)    (4+n/0)&lt;br /&gt;
	long	   18+8n      16+8n      20+8n	    16+8n      18+8n&lt;br /&gt;
		(4+2n/0)   (4+2n/0)   (5+2n/0)	 (4+2n/0)   (4+2n/0)&lt;br /&gt;
MOVEM	word	   14+4n      12+4n      16+4n	    -		-&lt;br /&gt;
R-&amp;gt;M		   (3/n)      (3/n)      (4/n)	    -		-&lt;br /&gt;
        long   14+8n      12+8n      16+8n	    -		-&lt;br /&gt;
		  (3/2n)     (3/2n)     (4/2n)	    -		-&lt;br /&gt;
&lt;br /&gt;
n is the number of registers to move&lt;br /&gt;
* is the size of the index register (ix) does not affect the instruction&#039;s&lt;br /&gt;
  execution time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Multi-precision instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the multi-precision&lt;br /&gt;
instructions. The number of clock periods includes the time to fetch both&lt;br /&gt;
operands, perform the operations, store the results and read the next &lt;br /&gt;
instructions.&lt;br /&gt;
&lt;br /&gt;
instruction	size		op Dn,Dn	op M,M&lt;br /&gt;
&lt;br /&gt;
ADDX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
			  long		8(1/0)		30(5/2)&lt;br /&gt;
CMPM		byte,word	  -			12(3/0)&lt;br /&gt;
			  long		  -			20(5/0)&lt;br /&gt;
SUBX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
			  long		8(1/0)		30(5/2)&lt;br /&gt;
ABCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
SBCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the following &lt;br /&gt;
miscellaneous instructions. The number of clock periods and plus the number&lt;br /&gt;
of read and write cycles must be added to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction		size	register	memory&lt;br /&gt;
&lt;br /&gt;
ANDI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ANDI to SR		word	 20(3/0)	   -&lt;br /&gt;
CHK				 -		 10(1/0) +	   -&lt;br /&gt;
EORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
EORI to SR		word	 20(3/0)	   -&lt;br /&gt;
ORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ORI to SR		word	 20(3/0)	   -&lt;br /&gt;
MOVE from SR	 -	 	  6(1/0)	 8(1/1)+&lt;br /&gt;
MOVE to CCR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
MOVE to SR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
EXG				 -		  6(1/0)	   -&lt;br /&gt;
EXT				word	  4(1/0)	   -&lt;br /&gt;
				long	  4(1/0)	   -&lt;br /&gt;
LINK		 	 -		 16(2/2)	   -&lt;br /&gt;
MOVE from USP	 -		  4(1/0)	   -&lt;br /&gt;
MOVE to USP	 	 -		  4(1/0)	   -&lt;br /&gt;
NOP				 -		  4(1/0)	   -&lt;br /&gt;
RESET			 -		132(1/0)	   -&lt;br /&gt;
RTE				 -		 20(5/0)	   -&lt;br /&gt;
RTR				 -		 20(5/0)	   -&lt;br /&gt;
RTS				 -		 16(4/0)	   -&lt;br /&gt;
STOP		 	 -		  4(0/0)	   -&lt;br /&gt;
SWAP		 	 -		  4(1/0)	   -&lt;br /&gt;
TRAPV (No Trap)	 -		  4(1/0)	   -&lt;br /&gt;
UNLK		 	 -		 12(3/0)	   -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Move Peripheral instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
instruction	size	register-&amp;gt;memory	memory-&amp;gt;register&lt;br /&gt;
&lt;br /&gt;
MOVEP		word	16(2/2)				16(4/0)	&lt;br /&gt;
			long	24(2/4)				24(6/0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Exception processing=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for exception processing.&lt;br /&gt;
The number of clock periods includes the time for all stacking, the vector&lt;br /&gt;
fetch and the fetch of the first two instruction words of the handler routine.&lt;br /&gt;
&lt;br /&gt;
	exception			periods&lt;br /&gt;
&lt;br /&gt;
	address error			50(4/7)&lt;br /&gt;
	bus error			50(4/7)&lt;br /&gt;
	CHK instruction (trap taken)	44(5/3)+&lt;br /&gt;
	Divide by Zero			42(5/3)&lt;br /&gt;
	illegal instruction		34(4/3)&lt;br /&gt;
	interrupt			44(5/3)*&lt;br /&gt;
	privilege violation		34(4/3)&lt;br /&gt;
        _____&lt;br /&gt;
	RESET **			40(6/0)&lt;br /&gt;
	trace				34(4/3)&lt;br /&gt;
	TRAP instruction		38(4/3)&lt;br /&gt;
	TRAPV instruction (trap taken)	34(4/3)&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* the interrupt acknowledge cycle is assumed to take four&lt;br /&gt;
	  clock periods&lt;br /&gt;
                                       _____     ____&lt;br /&gt;
       ** indicates the time from when RESET and HALT are first&lt;br /&gt;
	  sampled as negated to when instruction execution starts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Base system]]&lt;br /&gt;
[[Category:Code]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5902</id>
		<title>68k instructions timings</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5902"/>
		<updated>2018-01-19T08:06:51Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* Shift and rotate instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mirrored information from [[http://oldwww.nvg.ntnu.no/amiga/MC680x0_Sections/mc68000timing.HTML oldwww.nvg.ntnu.no]]&lt;br /&gt;
&lt;br /&gt;
The number of bus &#039;&#039;&#039;r&#039;&#039;&#039;ead and &#039;&#039;&#039;w&#039;&#039;&#039;rite cycles are shown in parenthesis as (r/w). Any other cycles are internal.&lt;br /&gt;
&lt;br /&gt;
In the following tables, the headings have the following meanings:&lt;br /&gt;
* An : Address register operand&lt;br /&gt;
* Dn : Data register operand&lt;br /&gt;
* ea : Operand specified by an effective address&lt;br /&gt;
* M : Memory effective address operand&lt;br /&gt;
&lt;br /&gt;
To get the real execution time, multiply the total cycles count by 83.33ns ([[Clock|1/12MHz]]). An example is given in each section.&lt;br /&gt;
&lt;br /&gt;
The [[68k interrupts|vertical blank]] lasts exactly 40 lines * 384 pixels * 2 cycles per pixel = 30720 cycles (2.56ms).&lt;br /&gt;
&lt;br /&gt;
See [[optimization]].&lt;br /&gt;
&lt;br /&gt;
=Effective address operand calculation=&lt;br /&gt;
&lt;br /&gt;
This table lists the number of clock periods required to compute an instruction&#039;s effective address. It includes fetching of any extension words, the address computation, and fetching of the memory operand.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax||Adressing mode||B,W||L&lt;br /&gt;
|-&lt;br /&gt;
|Dn&lt;br /&gt;
|Data register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|An&lt;br /&gt;
|Address register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)&lt;br /&gt;
|Address register indirect&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)+&lt;br /&gt;
|Address register indirect, post inc.&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
| -(An)&lt;br /&gt;
|Address register indirect, pre dec.&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An)&lt;br /&gt;
|Address register indirect, displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An,ix)&lt;br /&gt;
|Address register indirect, index&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.w&lt;br /&gt;
|Absolute short&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.l&lt;br /&gt;
|Absolute long&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|16(4/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC)&lt;br /&gt;
|PC with displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC,ix)&lt;br /&gt;
|PC with index&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|#xxx&lt;br /&gt;
|Immediate&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Pre-dec is slower than post-inc&lt;br /&gt;
* There are no write cycles involved in processing the effective address&lt;br /&gt;
* The size of the index register (ix) does not affect execution time&lt;br /&gt;
&lt;br /&gt;
=Move instructions=&lt;br /&gt;
&lt;br /&gt;
These following two tables indicate the number of clock periods for the move instruction. This data includes instruction fetch, operand reads, and operand writes.&lt;br /&gt;
&lt;br /&gt;
==Byte and word==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.b (a0)+,$10201D&#039;&#039;&#039; (Byte (An)+ to xxx.L) takes 20 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|22(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|26(5/1)||class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|28(6/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
==Long==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.l $05012C,4(a1,d0)&#039;&#039;&#039; (Long xxx.L to d(An,ix)) takes 34 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|28(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;red&amp;quot;|30(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|34(6/2)||class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|36(7/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
=Standard instructions=&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;add.w d3,a7&#039;&#039;&#039; (Word ea Dn + An) takes 8 cycles.&lt;br /&gt;
&lt;br /&gt;
The number of clock periods shown in this table indicates the time required to perform the operations, store the results and read the next instruction. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || &amp;lt;ea&amp;gt;,An * || &amp;lt;ea&amp;gt;,Dn || Dn,&amp;lt;M&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADD&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|AND&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMP&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;yellow&amp;quot;|6(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|158(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|140(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EOR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) ***||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;orange&amp;quot;|8(1/0) ***||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!MULS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!MULU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|OR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) +**||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0) +**||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUB&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
notes:	+ Add effective address calculation time&lt;br /&gt;
	^ Word or long only&lt;br /&gt;
	* Indicates maximum value&lt;br /&gt;
       ** The base time of six clock periods is increased to eight		&lt;br /&gt;
	  if the effective address mode is register direct or &lt;br /&gt;
	  immediate (effective address time should also be added)&lt;br /&gt;
      *** Only available effective address mode is data register direct&lt;br /&gt;
	  &lt;br /&gt;
	DIVS,DIVU - The divide algorithm used by the MC68000 provides less&lt;br /&gt;
		    than 10% difference between the best and the worst case&lt;br /&gt;
		    timings.&lt;br /&gt;
	MULS,MULU - The multiply algorithm requires 38+2n clocks where&lt;br /&gt;
		    n is defined as:&lt;br /&gt;
		MULU: n = the number of ones in the &amp;lt;ea&amp;gt;&lt;br /&gt;
		MULS: n = concatenate the &amp;lt;ea&amp;gt; with a zero as the LSB;&lt;br /&gt;
			  n is the resultant number of 10 or 01 patterns&lt;br /&gt;
			  in the 17-bit source; i.e., worst case happens&lt;br /&gt;
			  when the source is $5555&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Immediate instructions=&lt;br /&gt;
&lt;br /&gt;
The number of clock periods periods shown in this table includes the time to fetch immediate operands, perform the operations, store the results and read the next operation. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || #,Dn || #,An || #,M&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ANDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMPI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;green&amp;quot;|8(2/0)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!MOVEQ&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)|| - || -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;yellow&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
	+ Add effective address calculation time&lt;br /&gt;
	* word only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Single operand instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the single operand&lt;br /&gt;
instructions. The number of clock periods and the number of read and write cycles&lt;br /&gt;
must be added respectively to those of the effective address calculation&lt;br /&gt;
where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	 memory&lt;br /&gt;
&lt;br /&gt;
CLR		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
NBCD		  byte		6(1/0)		 8(1/1) +&lt;br /&gt;
NEG		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
NEGX		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
NOT		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
Scc		byte,false	4(1/0)		 8(1/1) +&lt;br /&gt;
		byte,true	6(1/0)		 8(1/1) +&lt;br /&gt;
TAS #		  byte		4(1/0)		10(1/1) +&lt;br /&gt;
TST		byte,word	4(1/0)		 4(1/0) +&lt;br /&gt;
		  long		4(1/0)		 4(1/0) +&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
        # This instruction should never be used on the Amiga as its invisiable&lt;br /&gt;
          read/write cycle can disrupt system DMA.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Shift and rotate instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the shift and rotate&lt;br /&gt;
instructions. The number of clock periods and the number of read and write&lt;br /&gt;
cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	memory&lt;br /&gt;
&lt;br /&gt;
ASR,ASL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
LSR,LSL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROR,ROL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
ROXR,ROXL	byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
			  long		8+2n(1/0)	  -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	n is the shift or rotate count&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Bit manipulation instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods required for the bit&lt;br /&gt;
manipulation instructions. The number of clock periods and the number of read and &lt;br /&gt;
write cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated. Dynamic: register, static: immediate.&lt;br /&gt;
&lt;br /&gt;
instruction  size            dynamic                 static&lt;br /&gt;
                        register   memory       register   memory	&lt;br /&gt;
BCHG         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BCLR         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long       10(1/0) *    -          14(2/0) *     -&lt;br /&gt;
BSET         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BTST         byte          -  	   4(1/0) +        -        8(2/0) +&lt;br /&gt;
             long        6(1/0)      -          10(2/0)       -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* indicates maximum value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conditional instructions=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Mnemonic || Displacement || Branch taken || Not taken&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Bcc&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|8(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;orange&amp;quot;|12(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BRA&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BSR&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|DBcc&lt;br /&gt;
|cc true&lt;br /&gt;
|&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|cc false&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=JMP, JSR, LEA, PEA and MOVEM instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This Table indicates the number of clock periods required for the jump,&lt;br /&gt;
jump-to-subroutine, load effective address, push effective address and&lt;br /&gt;
move multiple registers instructions.&lt;br /&gt;
&lt;br /&gt;
instr	size    (An)		(An)+		-(An)	 d(An)	&lt;br /&gt;
JMP     -	    8(2/0)	     -		      -    10(2/0)&lt;br /&gt;
JSR     -	   16(2/2)	     -		      -	   18(2/2)&lt;br /&gt;
LEA     -	    4(1/0)	     -		      -	    8(2/0)&lt;br /&gt;
PEA     -	   12(1/2)	     -		      -	   16(2/2)&lt;br /&gt;
MOVEM   word     12+4n       12+4n	      -      16+4n&lt;br /&gt;
M-&amp;gt;R           (3+n/0)	   (3+n/0)	      -	   (4+n/0)&lt;br /&gt;
	    long     12+8n	     12+8n	      -	     16+8n&lt;br /&gt;
		      (3+2n/0)    (3+2n/0)	      -   (4+2n/0)&lt;br /&gt;
MOVEM	word	  8+4n	     -		     8+4n	 12+4n&lt;br /&gt;
R-&amp;gt;M		     (2/n)	     -		    (2/n)	 (3/n)&lt;br /&gt;
	    long	  8+8n	     -		     8+8n	 12+8n&lt;br /&gt;
                (2/2n)	     -		   (2/2n)	(3/2n)&lt;br /&gt;
&lt;br /&gt;
instr	size	d(An,ix)+   xxx.W      xxx.L      d(PC)      d(PC,ix)*&lt;br /&gt;
JMP	 -	 14(3/0)    10(2/0)    12(3/0)	  10(2/0)    14(3/0)&lt;br /&gt;
JSR	 -	 22(2/2)    18(2/2)    20(3/2)	  18(2/2)    22(2/2)&lt;br /&gt;
LEA	 -	 12(2/0)     8(2/0)    12(3/0)	   8(2/0)    12(2/0)&lt;br /&gt;
PEA	 -	 20(2/2)    16(2/2)    20(3/2)	  16(2/2)    20(2/2)&lt;br /&gt;
MOVEM	word	   18+4n      16+4n      20+4n	    16+4n      18+4n&lt;br /&gt;
M-&amp;gt;R		 (4+n/0)    (4+n/0)    (5+n/0)	  (4+n/0)    (4+n/0)&lt;br /&gt;
	long	   18+8n      16+8n      20+8n	    16+8n      18+8n&lt;br /&gt;
		(4+2n/0)   (4+2n/0)   (5+2n/0)	 (4+2n/0)   (4+2n/0)&lt;br /&gt;
MOVEM	word	   14+4n      12+4n      16+4n	    -		-&lt;br /&gt;
R-&amp;gt;M		   (3/n)      (3/n)      (4/n)	    -		-&lt;br /&gt;
        long   14+8n      12+8n      16+8n	    -		-&lt;br /&gt;
		  (3/2n)     (3/2n)     (4/2n)	    -		-&lt;br /&gt;
&lt;br /&gt;
n is the number of registers to move&lt;br /&gt;
* is the size of the index register (ix) does not affect the instruction&#039;s&lt;br /&gt;
  execution time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Multi-precision instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the multi-precision&lt;br /&gt;
instructions. The number of clock periods includes the time to fetch both&lt;br /&gt;
operands, perform the operations, store the results and read the next &lt;br /&gt;
instructions.&lt;br /&gt;
&lt;br /&gt;
instruction	size		op Dn,Dn	op M,M&lt;br /&gt;
&lt;br /&gt;
ADDX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
		  long		8(1/0)		30(5/2)&lt;br /&gt;
CMPM		byte,word	  -		12(3/0)&lt;br /&gt;
		  long		  -		20(5/0)&lt;br /&gt;
SUBX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
		  long		8(1/0)		30(5/2)&lt;br /&gt;
ABCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
SBCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the following &lt;br /&gt;
miscellaneous instructions. The number of clock periods and plus the number&lt;br /&gt;
of read and write cycles must be added to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction		size	register	memory&lt;br /&gt;
&lt;br /&gt;
ANDI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ANDI to SR		word	 20(3/0)	   -&lt;br /&gt;
CHK				 -		 10(1/0) +	   -&lt;br /&gt;
EORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
EORI to SR		word	 20(3/0)	   -&lt;br /&gt;
ORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ORI to SR		word	 20(3/0)	   -&lt;br /&gt;
MOVE from SR	 -	 	  6(1/0)	 8(1/1)+&lt;br /&gt;
MOVE to CCR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
MOVE to SR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
EXG				 -		  6(1/0)	   -&lt;br /&gt;
EXT				word	  4(1/0)	   -&lt;br /&gt;
				long	  4(1/0)	   -&lt;br /&gt;
LINK		 	 -		 16(2/2)	   -&lt;br /&gt;
MOVE from USP	 -		  4(1/0)	   -&lt;br /&gt;
MOVE to USP	 	 -		  4(1/0)	   -&lt;br /&gt;
NOP				 -		  4(1/0)	   -&lt;br /&gt;
RESET			 -		132(1/0)	   -&lt;br /&gt;
RTE				 -		 20(5/0)	   -&lt;br /&gt;
RTR				 -		 20(5/0)	   -&lt;br /&gt;
RTS				 -		 16(4/0)	   -&lt;br /&gt;
STOP		 	 -		  4(0/0)	   -&lt;br /&gt;
SWAP		 	 -		  4(1/0)	   -&lt;br /&gt;
TRAPV (No Trap)	 -		  4(1/0)	   -&lt;br /&gt;
UNLK		 	 -		 12(3/0)	   -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Move Peripheral instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
instruction	size	register-&amp;gt;memory	memory-&amp;gt;register&lt;br /&gt;
&lt;br /&gt;
MOVEP		word	16(2/2)				16(4/0)	&lt;br /&gt;
			long	24(2/4)				24(6/0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Exception processing=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for exception processing.&lt;br /&gt;
The number of clock periods includes the time for all stacking, the vector&lt;br /&gt;
fetch and the fetch of the first two instruction words of the handler routine.&lt;br /&gt;
&lt;br /&gt;
	exception			periods&lt;br /&gt;
&lt;br /&gt;
	address error			50(4/7)&lt;br /&gt;
	bus error			50(4/7)&lt;br /&gt;
	CHK instruction (trap taken)	44(5/3)+&lt;br /&gt;
	Divide by Zero			42(5/3)&lt;br /&gt;
	illegal instruction		34(4/3)&lt;br /&gt;
	interrupt			44(5/3)*&lt;br /&gt;
	privilege violation		34(4/3)&lt;br /&gt;
        _____&lt;br /&gt;
	RESET **			40(6/0)&lt;br /&gt;
	trace				34(4/3)&lt;br /&gt;
	TRAP instruction		38(4/3)&lt;br /&gt;
	TRAPV instruction (trap taken)	34(4/3)&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* the interrupt acknowledge cycle is assumed to take four&lt;br /&gt;
	  clock periods&lt;br /&gt;
                                       _____     ____&lt;br /&gt;
       ** indicates the time from when RESET and HALT are first&lt;br /&gt;
	  sampled as negated to when instruction execution starts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Base system]]&lt;br /&gt;
[[Category:Code]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5901</id>
		<title>68k instructions timings</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5901"/>
		<updated>2018-01-19T07:55:52Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* Miscellaneous instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mirrored information from [[http://oldwww.nvg.ntnu.no/amiga/MC680x0_Sections/mc68000timing.HTML oldwww.nvg.ntnu.no]]&lt;br /&gt;
&lt;br /&gt;
The number of bus &#039;&#039;&#039;r&#039;&#039;&#039;ead and &#039;&#039;&#039;w&#039;&#039;&#039;rite cycles are shown in parenthesis as (r/w). Any other cycles are internal.&lt;br /&gt;
&lt;br /&gt;
In the following tables, the headings have the following meanings:&lt;br /&gt;
* An : Address register operand&lt;br /&gt;
* Dn : Data register operand&lt;br /&gt;
* ea : Operand specified by an effective address&lt;br /&gt;
* M : Memory effective address operand&lt;br /&gt;
&lt;br /&gt;
To get the real execution time, multiply the total cycles count by 83.33ns ([[Clock|1/12MHz]]). An example is given in each section.&lt;br /&gt;
&lt;br /&gt;
The [[68k interrupts|vertical blank]] lasts exactly 40 lines * 384 pixels * 2 cycles per pixel = 30720 cycles (2.56ms).&lt;br /&gt;
&lt;br /&gt;
See [[optimization]].&lt;br /&gt;
&lt;br /&gt;
=Effective address operand calculation=&lt;br /&gt;
&lt;br /&gt;
This table lists the number of clock periods required to compute an instruction&#039;s effective address. It includes fetching of any extension words, the address computation, and fetching of the memory operand.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax||Adressing mode||B,W||L&lt;br /&gt;
|-&lt;br /&gt;
|Dn&lt;br /&gt;
|Data register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|An&lt;br /&gt;
|Address register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)&lt;br /&gt;
|Address register indirect&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)+&lt;br /&gt;
|Address register indirect, post inc.&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
| -(An)&lt;br /&gt;
|Address register indirect, pre dec.&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An)&lt;br /&gt;
|Address register indirect, displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An,ix)&lt;br /&gt;
|Address register indirect, index&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.w&lt;br /&gt;
|Absolute short&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.l&lt;br /&gt;
|Absolute long&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|16(4/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC)&lt;br /&gt;
|PC with displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC,ix)&lt;br /&gt;
|PC with index&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|#xxx&lt;br /&gt;
|Immediate&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Pre-dec is slower than post-inc&lt;br /&gt;
* There are no write cycles involved in processing the effective address&lt;br /&gt;
* The size of the index register (ix) does not affect execution time&lt;br /&gt;
&lt;br /&gt;
=Move instructions=&lt;br /&gt;
&lt;br /&gt;
These following two tables indicate the number of clock periods for the move instruction. This data includes instruction fetch, operand reads, and operand writes.&lt;br /&gt;
&lt;br /&gt;
==Byte and word==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.b (a0)+,$10201D&#039;&#039;&#039; (Byte (An)+ to xxx.L) takes 20 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|22(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|26(5/1)||class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|28(6/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
==Long==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.l $05012C,4(a1,d0)&#039;&#039;&#039; (Long xxx.L to d(An,ix)) takes 34 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|28(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;red&amp;quot;|30(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|34(6/2)||class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|36(7/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
=Standard instructions=&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;add.w d3,a7&#039;&#039;&#039; (Word ea Dn + An) takes 8 cycles.&lt;br /&gt;
&lt;br /&gt;
The number of clock periods shown in this table indicates the time required to perform the operations, store the results and read the next instruction. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || &amp;lt;ea&amp;gt;,An * || &amp;lt;ea&amp;gt;,Dn || Dn,&amp;lt;M&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADD&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|AND&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMP&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;yellow&amp;quot;|6(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|158(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|140(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EOR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) ***||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;orange&amp;quot;|8(1/0) ***||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!MULS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!MULU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|OR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) +**||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0) +**||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUB&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
notes:	+ Add effective address calculation time&lt;br /&gt;
	^ Word or long only&lt;br /&gt;
	* Indicates maximum value&lt;br /&gt;
       ** The base time of six clock periods is increased to eight		&lt;br /&gt;
	  if the effective address mode is register direct or &lt;br /&gt;
	  immediate (effective address time should also be added)&lt;br /&gt;
      *** Only available effective address mode is data register direct&lt;br /&gt;
	  &lt;br /&gt;
	DIVS,DIVU - The divide algorithm used by the MC68000 provides less&lt;br /&gt;
		    than 10% difference between the best and the worst case&lt;br /&gt;
		    timings.&lt;br /&gt;
	MULS,MULU - The multiply algorithm requires 38+2n clocks where&lt;br /&gt;
		    n is defined as:&lt;br /&gt;
		MULU: n = the number of ones in the &amp;lt;ea&amp;gt;&lt;br /&gt;
		MULS: n = concatenate the &amp;lt;ea&amp;gt; with a zero as the LSB;&lt;br /&gt;
			  n is the resultant number of 10 or 01 patterns&lt;br /&gt;
			  in the 17-bit source; i.e., worst case happens&lt;br /&gt;
			  when the source is $5555&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Immediate instructions=&lt;br /&gt;
&lt;br /&gt;
The number of clock periods periods shown in this table includes the time to fetch immediate operands, perform the operations, store the results and read the next operation. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || #,Dn || #,An || #,M&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ANDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMPI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;green&amp;quot;|8(2/0)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!MOVEQ&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)|| - || -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;yellow&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
	+ Add effective address calculation time&lt;br /&gt;
	* word only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Single operand instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the single operand&lt;br /&gt;
instructions. The number of clock periods and the number of read and write cycles&lt;br /&gt;
must be added respectively to those of the effective address calculation&lt;br /&gt;
where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	 memory&lt;br /&gt;
&lt;br /&gt;
CLR		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
NBCD		  byte		6(1/0)		 8(1/1) +&lt;br /&gt;
NEG		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
NEGX		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
NOT		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
Scc		byte,false	4(1/0)		 8(1/1) +&lt;br /&gt;
		byte,true	6(1/0)		 8(1/1) +&lt;br /&gt;
TAS #		  byte		4(1/0)		10(1/1) +&lt;br /&gt;
TST		byte,word	4(1/0)		 4(1/0) +&lt;br /&gt;
		  long		4(1/0)		 4(1/0) +&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
        # This instruction should never be used on the Amiga as its invisiable&lt;br /&gt;
          read/write cycle can disrupt system DMA.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Shift and rotate instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the shift and rotate&lt;br /&gt;
instructions. The number of clock periods and the number of read and write&lt;br /&gt;
cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	memory&lt;br /&gt;
&lt;br /&gt;
ASR,ASL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
		  long		8+2n(1/0)	  -&lt;br /&gt;
LSR,LSL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
		  long		8+2n(1/0)	  -&lt;br /&gt;
ROR,ROL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
		  long		8+2n(1/0)	  -&lt;br /&gt;
ROXR,ROXL	byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
		  long		8+2n(1/0)	  -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	n is the shift or rotate count&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Bit manipulation instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods required for the bit&lt;br /&gt;
manipulation instructions. The number of clock periods and the number of read and &lt;br /&gt;
write cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated. Dynamic: register, static: immediate.&lt;br /&gt;
&lt;br /&gt;
instruction  size            dynamic                 static&lt;br /&gt;
                        register   memory       register   memory	&lt;br /&gt;
BCHG         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BCLR         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long       10(1/0) *    -          14(2/0) *     -&lt;br /&gt;
BSET         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BTST         byte          -  	   4(1/0) +        -        8(2/0) +&lt;br /&gt;
             long        6(1/0)      -          10(2/0)       -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* indicates maximum value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conditional instructions=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Mnemonic || Displacement || Branch taken || Not taken&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Bcc&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|8(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;orange&amp;quot;|12(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BRA&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BSR&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|DBcc&lt;br /&gt;
|cc true&lt;br /&gt;
|&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|cc false&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=JMP, JSR, LEA, PEA and MOVEM instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This Table indicates the number of clock periods required for the jump,&lt;br /&gt;
jump-to-subroutine, load effective address, push effective address and&lt;br /&gt;
move multiple registers instructions.&lt;br /&gt;
&lt;br /&gt;
instr	size    (An)		(An)+		-(An)	 d(An)	&lt;br /&gt;
JMP     -	    8(2/0)	     -		      -    10(2/0)&lt;br /&gt;
JSR     -	   16(2/2)	     -		      -	   18(2/2)&lt;br /&gt;
LEA     -	    4(1/0)	     -		      -	    8(2/0)&lt;br /&gt;
PEA     -	   12(1/2)	     -		      -	   16(2/2)&lt;br /&gt;
MOVEM   word     12+4n       12+4n	      -      16+4n&lt;br /&gt;
M-&amp;gt;R           (3+n/0)	   (3+n/0)	      -	   (4+n/0)&lt;br /&gt;
	    long     12+8n	     12+8n	      -	     16+8n&lt;br /&gt;
		      (3+2n/0)    (3+2n/0)	      -   (4+2n/0)&lt;br /&gt;
MOVEM	word	  8+4n	     -		     8+4n	 12+4n&lt;br /&gt;
R-&amp;gt;M		     (2/n)	     -		    (2/n)	 (3/n)&lt;br /&gt;
	    long	  8+8n	     -		     8+8n	 12+8n&lt;br /&gt;
                (2/2n)	     -		   (2/2n)	(3/2n)&lt;br /&gt;
&lt;br /&gt;
instr	size	d(An,ix)+   xxx.W      xxx.L      d(PC)      d(PC,ix)*&lt;br /&gt;
JMP	 -	 14(3/0)    10(2/0)    12(3/0)	  10(2/0)    14(3/0)&lt;br /&gt;
JSR	 -	 22(2/2)    18(2/2)    20(3/2)	  18(2/2)    22(2/2)&lt;br /&gt;
LEA	 -	 12(2/0)     8(2/0)    12(3/0)	   8(2/0)    12(2/0)&lt;br /&gt;
PEA	 -	 20(2/2)    16(2/2)    20(3/2)	  16(2/2)    20(2/2)&lt;br /&gt;
MOVEM	word	   18+4n      16+4n      20+4n	    16+4n      18+4n&lt;br /&gt;
M-&amp;gt;R		 (4+n/0)    (4+n/0)    (5+n/0)	  (4+n/0)    (4+n/0)&lt;br /&gt;
	long	   18+8n      16+8n      20+8n	    16+8n      18+8n&lt;br /&gt;
		(4+2n/0)   (4+2n/0)   (5+2n/0)	 (4+2n/0)   (4+2n/0)&lt;br /&gt;
MOVEM	word	   14+4n      12+4n      16+4n	    -		-&lt;br /&gt;
R-&amp;gt;M		   (3/n)      (3/n)      (4/n)	    -		-&lt;br /&gt;
        long   14+8n      12+8n      16+8n	    -		-&lt;br /&gt;
		  (3/2n)     (3/2n)     (4/2n)	    -		-&lt;br /&gt;
&lt;br /&gt;
n is the number of registers to move&lt;br /&gt;
* is the size of the index register (ix) does not affect the instruction&#039;s&lt;br /&gt;
  execution time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Multi-precision instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the multi-precision&lt;br /&gt;
instructions. The number of clock periods includes the time to fetch both&lt;br /&gt;
operands, perform the operations, store the results and read the next &lt;br /&gt;
instructions.&lt;br /&gt;
&lt;br /&gt;
instruction	size		op Dn,Dn	op M,M&lt;br /&gt;
&lt;br /&gt;
ADDX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
		  long		8(1/0)		30(5/2)&lt;br /&gt;
CMPM		byte,word	  -		12(3/0)&lt;br /&gt;
		  long		  -		20(5/0)&lt;br /&gt;
SUBX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
		  long		8(1/0)		30(5/2)&lt;br /&gt;
ABCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
SBCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the following &lt;br /&gt;
miscellaneous instructions. The number of clock periods and plus the number&lt;br /&gt;
of read and write cycles must be added to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction		size	register	memory&lt;br /&gt;
&lt;br /&gt;
ANDI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ANDI to SR		word	 20(3/0)	   -&lt;br /&gt;
CHK				 -		 10(1/0) +	   -&lt;br /&gt;
EORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
EORI to SR		word	 20(3/0)	   -&lt;br /&gt;
ORI to CCR		byte	 20(3/0)	   -&lt;br /&gt;
ORI to SR		word	 20(3/0)	   -&lt;br /&gt;
MOVE from SR	 -	 	  6(1/0)	 8(1/1)+&lt;br /&gt;
MOVE to CCR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
MOVE to SR	 	 -		 12(1/0)	12(1/0)+&lt;br /&gt;
EXG				 -		  6(1/0)	   -&lt;br /&gt;
EXT				word	  4(1/0)	   -&lt;br /&gt;
				long	  4(1/0)	   -&lt;br /&gt;
LINK		 	 -		 16(2/2)	   -&lt;br /&gt;
MOVE from USP	 -		  4(1/0)	   -&lt;br /&gt;
MOVE to USP	 	 -		  4(1/0)	   -&lt;br /&gt;
NOP				 -		  4(1/0)	   -&lt;br /&gt;
RESET			 -		132(1/0)	   -&lt;br /&gt;
RTE				 -		 20(5/0)	   -&lt;br /&gt;
RTR				 -		 20(5/0)	   -&lt;br /&gt;
RTS				 -		 16(4/0)	   -&lt;br /&gt;
STOP		 	 -		  4(0/0)	   -&lt;br /&gt;
SWAP		 	 -		  4(1/0)	   -&lt;br /&gt;
TRAPV (No Trap)	 -		  4(1/0)	   -&lt;br /&gt;
UNLK		 	 -		 12(3/0)	   -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Move Peripheral instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
instruction	size	register-&amp;gt;memory	memory-&amp;gt;register&lt;br /&gt;
&lt;br /&gt;
MOVEP		word	16(2/2)				16(4/0)	&lt;br /&gt;
			long	24(2/4)				24(6/0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Exception processing=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for exception processing.&lt;br /&gt;
The number of clock periods includes the time for all stacking, the vector&lt;br /&gt;
fetch and the fetch of the first two instruction words of the handler routine.&lt;br /&gt;
&lt;br /&gt;
	exception			periods&lt;br /&gt;
&lt;br /&gt;
	address error			50(4/7)&lt;br /&gt;
	bus error			50(4/7)&lt;br /&gt;
	CHK instruction (trap taken)	44(5/3)+&lt;br /&gt;
	Divide by Zero			42(5/3)&lt;br /&gt;
	illegal instruction		34(4/3)&lt;br /&gt;
	interrupt			44(5/3)*&lt;br /&gt;
	privilege violation		34(4/3)&lt;br /&gt;
        _____&lt;br /&gt;
	RESET **			40(6/0)&lt;br /&gt;
	trace				34(4/3)&lt;br /&gt;
	TRAP instruction		38(4/3)&lt;br /&gt;
	TRAPV instruction (trap taken)	34(4/3)&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* the interrupt acknowledge cycle is assumed to take four&lt;br /&gt;
	  clock periods&lt;br /&gt;
                                       _____     ____&lt;br /&gt;
       ** indicates the time from when RESET and HALT are first&lt;br /&gt;
	  sampled as negated to when instruction execution starts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Base system]]&lt;br /&gt;
[[Category:Code]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5900</id>
		<title>68k instructions timings</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=68k_instructions_timings&amp;diff=5900"/>
		<updated>2018-01-19T07:46:44Z</updated>

		<summary type="html">&lt;p&gt;Hpman: /* Move Peripheral instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mirrored information from [[http://oldwww.nvg.ntnu.no/amiga/MC680x0_Sections/mc68000timing.HTML oldwww.nvg.ntnu.no]]&lt;br /&gt;
&lt;br /&gt;
The number of bus &#039;&#039;&#039;r&#039;&#039;&#039;ead and &#039;&#039;&#039;w&#039;&#039;&#039;rite cycles are shown in parenthesis as (r/w). Any other cycles are internal.&lt;br /&gt;
&lt;br /&gt;
In the following tables, the headings have the following meanings:&lt;br /&gt;
* An : Address register operand&lt;br /&gt;
* Dn : Data register operand&lt;br /&gt;
* ea : Operand specified by an effective address&lt;br /&gt;
* M : Memory effective address operand&lt;br /&gt;
&lt;br /&gt;
To get the real execution time, multiply the total cycles count by 83.33ns ([[Clock|1/12MHz]]). An example is given in each section.&lt;br /&gt;
&lt;br /&gt;
The [[68k interrupts|vertical blank]] lasts exactly 40 lines * 384 pixels * 2 cycles per pixel = 30720 cycles (2.56ms).&lt;br /&gt;
&lt;br /&gt;
See [[optimization]].&lt;br /&gt;
&lt;br /&gt;
=Effective address operand calculation=&lt;br /&gt;
&lt;br /&gt;
This table lists the number of clock periods required to compute an instruction&#039;s effective address. It includes fetching of any extension words, the address computation, and fetching of the memory operand.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax||Adressing mode||B,W||L&lt;br /&gt;
|-&lt;br /&gt;
|Dn&lt;br /&gt;
|Data register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|An&lt;br /&gt;
|Address register direct&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|0(0/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)&lt;br /&gt;
|Address register indirect&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|(An)+&lt;br /&gt;
|Address register indirect, post inc.&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|-&lt;br /&gt;
| -(An)&lt;br /&gt;
|Address register indirect, pre dec.&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An)&lt;br /&gt;
|Address register indirect, displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(An,ix)&lt;br /&gt;
|Address register indirect, index&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.w&lt;br /&gt;
|Absolute short&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|xxx.l&lt;br /&gt;
|Absolute long&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|16(4/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC)&lt;br /&gt;
|PC with displacement&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|d(PC,ix)&lt;br /&gt;
|PC with index&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|14(3/0)&lt;br /&gt;
|-&lt;br /&gt;
|#xxx&lt;br /&gt;
|Immediate&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(2/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Pre-dec is slower than post-inc&lt;br /&gt;
* There are no write cycles involved in processing the effective address&lt;br /&gt;
* The size of the index register (ix) does not affect execution time&lt;br /&gt;
&lt;br /&gt;
=Move instructions=&lt;br /&gt;
&lt;br /&gt;
These following two tables indicate the number of clock periods for the move instruction. This data includes instruction fetch, operand reads, and operand writes.&lt;br /&gt;
&lt;br /&gt;
==Byte and word==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.b (a0)+,$10201D&#039;&#039;&#039; (Byte (An)+ to xxx.L) takes 20 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;green&amp;quot;|8(1/1)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(1/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|10(2/0)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)||class=&amp;quot;yellow&amp;quot;|14(2/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|22(4/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|26(5/1)||class=&amp;quot;red&amp;quot;|24(5/1)||class=&amp;quot;red&amp;quot;|28(6/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;orange&amp;quot;|20(4/1)||class=&amp;quot;red&amp;quot;|24(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|24(4/1)||class=&amp;quot;orange&amp;quot;|22(4/1)||class=&amp;quot;red&amp;quot;|26(5/1)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;green&amp;quot;|8(2/0)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)||class=&amp;quot;yellow&amp;quot;|12(2/1)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|18(3/1)||class=&amp;quot;yellow&amp;quot;|16(3/1)||class=&amp;quot;orange&amp;quot;|20(4/1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
==Long==&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;move.l $05012C,4(a1,d0)&#039;&#039;&#039; (Long xxx.L to d(An,ix)) takes 34 cycles.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Dn || An || (An) || (An)+ || -(An) || d(An) || d(An,ix) || xxx.W || xxx.L&lt;br /&gt;
|-&lt;br /&gt;
!Dn&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!An&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)||class=&amp;quot;green&amp;quot;|12(1/2)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|18(2/2)||class=&amp;quot;yellow&amp;quot;|16(2/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!(An)+&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!-(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;yellow&amp;quot;|14(3/0)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)||class=&amp;quot;orange&amp;quot;|22(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|28(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;red&amp;quot;|30(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(An,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!xxx.L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;yellow&amp;quot;|20(5/0)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|34(6/2)||class=&amp;quot;red&amp;quot;|32(6/2)||class=&amp;quot;red&amp;quot;|36(7/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;yellow&amp;quot;|16(4/0)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;orange&amp;quot;|28(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)&lt;br /&gt;
|-&lt;br /&gt;
!d(PC,ix)&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;yellow&amp;quot;|18(4/0)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|32(5/2)||class=&amp;quot;red&amp;quot;|30(5/2)||class=&amp;quot;red&amp;quot;|34(6/2)&lt;br /&gt;
|-&lt;br /&gt;
!#xxx&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;green&amp;quot;|12(3/0)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)||class=&amp;quot;yellow&amp;quot;|20(3/2)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|26(4/2)||class=&amp;quot;orange&amp;quot;|24(4/2)||class=&amp;quot;orange&amp;quot;|28(5/2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The size of the index register (ix) does not affect execution time.&lt;br /&gt;
&lt;br /&gt;
=Standard instructions=&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;&#039;add.w d3,a7&#039;&#039;&#039; (Word ea Dn + An) takes 8 cycles.&lt;br /&gt;
&lt;br /&gt;
The number of clock periods shown in this table indicates the time required to perform the operations, store the results and read the next instruction. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || &amp;lt;ea&amp;gt;,An * || &amp;lt;ea&amp;gt;,Dn || Dn,&amp;lt;M&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADD&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|AND&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMP&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+||class=&amp;quot;yellow&amp;quot;|6(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|158(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!DIVU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|140(1/0)+|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EOR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) ***||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;orange&amp;quot;|8(1/0) ***||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!MULS&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!MULU&lt;br /&gt;
| - || - ||class=&amp;quot;red&amp;quot;|70(1/0)+*|| -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|OR&lt;br /&gt;
|B,W&lt;br /&gt;
| - ||class=&amp;quot;green&amp;quot;|4(1/0) +**||class=&amp;quot;orange&amp;quot;|8(1/1) +&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
| - ||class=&amp;quot;yellow&amp;quot;|6(1/0) +**||class=&amp;quot;red&amp;quot;|12(1/2) +&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUB&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|8(1/0)+||class=&amp;quot;green&amp;quot;|4(1/0)+||class=&amp;quot;orange&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;yellow&amp;quot;|6(1/0)+**||class=&amp;quot;red&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
notes:	+ Add effective address calculation time&lt;br /&gt;
	^ Word or long only&lt;br /&gt;
	* Indicates maximum value&lt;br /&gt;
       ** The base time of six clock periods is increased to eight		&lt;br /&gt;
	  if the effective address mode is register direct or &lt;br /&gt;
	  immediate (effective address time should also be added)&lt;br /&gt;
      *** Only available effective address mode is data register direct&lt;br /&gt;
	  &lt;br /&gt;
	DIVS,DIVU - The divide algorithm used by the MC68000 provides less&lt;br /&gt;
		    than 10% difference between the best and the worst case&lt;br /&gt;
		    timings.&lt;br /&gt;
	MULS,MULU - The multiply algorithm requires 38+2n clocks where&lt;br /&gt;
		    n is defined as:&lt;br /&gt;
		MULU: n = the number of ones in the &amp;lt;ea&amp;gt;&lt;br /&gt;
		MULS: n = concatenate the &amp;lt;ea&amp;gt; with a zero as the LSB;&lt;br /&gt;
			  n is the resultant number of 10 or 01 patterns&lt;br /&gt;
			  in the 17-bit source; i.e., worst case happens&lt;br /&gt;
			  when the source is $5555&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Immediate instructions=&lt;br /&gt;
&lt;br /&gt;
The number of clock periods periods shown in this table includes the time to fetch immediate operands, perform the operations, store the results and read the next operation. The total number of clock periods must be added respectively to those of the effective address calculation where indicated (+).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&amp;amp;nbsp; || Size || #,Dn || #,An || #,M&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ADDQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ANDI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(1/2)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|CMPI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;green&amp;quot;|8(2/0)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(3/1)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|EORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!MOVEQ&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)|| - || -&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|ORI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBI&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|8(2/0)|| - ||class=&amp;quot;yellow&amp;quot;|12(2/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|16(3/0)|| - ||class=&amp;quot;red&amp;quot;|20(3/2)+&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=2|SUBQ&lt;br /&gt;
|B,W&lt;br /&gt;
|class=&amp;quot;green&amp;quot;|4(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)*||class=&amp;quot;yellow&amp;quot;|8(1/1)+&lt;br /&gt;
|-&lt;br /&gt;
|L&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;yellow&amp;quot;|8(1/0)||class=&amp;quot;orange&amp;quot;|12(1/2)+&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
	+ Add effective address calculation time&lt;br /&gt;
	* word only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Single operand instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the single operand&lt;br /&gt;
instructions. The number of clock periods and the number of read and write cycles&lt;br /&gt;
must be added respectively to those of the effective address calculation&lt;br /&gt;
where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	 memory&lt;br /&gt;
&lt;br /&gt;
CLR		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
NBCD		  byte		6(1/0)		 8(1/1) +&lt;br /&gt;
NEG		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
NEGX		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
NOT		byte,word	4(1/0)		 8(1/1) +&lt;br /&gt;
		  long		6(1/0)		12(1/2) +&lt;br /&gt;
Scc		byte,false	4(1/0)		 8(1/1) +&lt;br /&gt;
		byte,true	6(1/0)		 8(1/1) +&lt;br /&gt;
TAS #		  byte		4(1/0)		10(1/1) +&lt;br /&gt;
TST		byte,word	4(1/0)		 4(1/0) +&lt;br /&gt;
		  long		4(1/0)		 4(1/0) +&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
        # This instruction should never be used on the Amiga as its invisiable&lt;br /&gt;
          read/write cycle can disrupt system DMA.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Shift and rotate instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the shift and rotate&lt;br /&gt;
instructions. The number of clock periods and the number of read and write&lt;br /&gt;
cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size		register	memory&lt;br /&gt;
&lt;br /&gt;
ASR,ASL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
		  long		8+2n(1/0)	  -&lt;br /&gt;
LSR,LSL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
		  long		8+2n(1/0)	  -&lt;br /&gt;
ROR,ROL		byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
		  long		8+2n(1/0)	  -&lt;br /&gt;
ROXR,ROXL	byte,word	6+2n(1/0)	8(1/1) +&lt;br /&gt;
		  long		8+2n(1/0)	  -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	n is the shift or rotate count&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Bit manipulation instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods required for the bit&lt;br /&gt;
manipulation instructions. The number of clock periods and the number of read and &lt;br /&gt;
write cycles must be added respectively to those of the effective address&lt;br /&gt;
calculation where indicated. Dynamic: register, static: immediate.&lt;br /&gt;
&lt;br /&gt;
instruction  size            dynamic                 static&lt;br /&gt;
                        register   memory       register   memory	&lt;br /&gt;
BCHG         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BCLR         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long       10(1/0) *    -          14(2/0) *     -&lt;br /&gt;
BSET         byte          -       8(1/1) +        -       12(2/1) +&lt;br /&gt;
             long        8(1/0) *    -          12(2/0) *     -&lt;br /&gt;
BTST         byte          -  	   4(1/0) +        -        8(2/0) +&lt;br /&gt;
             long        6(1/0)      -          10(2/0)       -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* indicates maximum value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conditional instructions=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Mnemonic || Displacement || Branch taken || Not taken&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Bcc&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;green&amp;quot;|8(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)||class=&amp;quot;orange&amp;quot;|12(1/0)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BRA&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|BSR&lt;br /&gt;
|byte&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|word&lt;br /&gt;
|class=&amp;quot;red&amp;quot;|18(2/2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|DBcc&lt;br /&gt;
|cc true&lt;br /&gt;
|&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|12(2/0)&lt;br /&gt;
|-&lt;br /&gt;
|cc false&lt;br /&gt;
|class=&amp;quot;yellow&amp;quot;|10(2/0)&lt;br /&gt;
|class=&amp;quot;orange&amp;quot;|14(3/0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=JMP, JSR, LEA, PEA and MOVEM instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This Table indicates the number of clock periods required for the jump,&lt;br /&gt;
jump-to-subroutine, load effective address, push effective address and&lt;br /&gt;
move multiple registers instructions.&lt;br /&gt;
&lt;br /&gt;
instr	size    (An)		(An)+		-(An)	 d(An)	&lt;br /&gt;
JMP     -	    8(2/0)	     -		      -    10(2/0)&lt;br /&gt;
JSR     -	   16(2/2)	     -		      -	   18(2/2)&lt;br /&gt;
LEA     -	    4(1/0)	     -		      -	    8(2/0)&lt;br /&gt;
PEA     -	   12(1/2)	     -		      -	   16(2/2)&lt;br /&gt;
MOVEM   word     12+4n       12+4n	      -      16+4n&lt;br /&gt;
M-&amp;gt;R           (3+n/0)	   (3+n/0)	      -	   (4+n/0)&lt;br /&gt;
	    long     12+8n	     12+8n	      -	     16+8n&lt;br /&gt;
		      (3+2n/0)    (3+2n/0)	      -   (4+2n/0)&lt;br /&gt;
MOVEM	word	  8+4n	     -		     8+4n	 12+4n&lt;br /&gt;
R-&amp;gt;M		     (2/n)	     -		    (2/n)	 (3/n)&lt;br /&gt;
	    long	  8+8n	     -		     8+8n	 12+8n&lt;br /&gt;
                (2/2n)	     -		   (2/2n)	(3/2n)&lt;br /&gt;
&lt;br /&gt;
instr	size	d(An,ix)+   xxx.W      xxx.L      d(PC)      d(PC,ix)*&lt;br /&gt;
JMP	 -	 14(3/0)    10(2/0)    12(3/0)	  10(2/0)    14(3/0)&lt;br /&gt;
JSR	 -	 22(2/2)    18(2/2)    20(3/2)	  18(2/2)    22(2/2)&lt;br /&gt;
LEA	 -	 12(2/0)     8(2/0)    12(3/0)	   8(2/0)    12(2/0)&lt;br /&gt;
PEA	 -	 20(2/2)    16(2/2)    20(3/2)	  16(2/2)    20(2/2)&lt;br /&gt;
MOVEM	word	   18+4n      16+4n      20+4n	    16+4n      18+4n&lt;br /&gt;
M-&amp;gt;R		 (4+n/0)    (4+n/0)    (5+n/0)	  (4+n/0)    (4+n/0)&lt;br /&gt;
	long	   18+8n      16+8n      20+8n	    16+8n      18+8n&lt;br /&gt;
		(4+2n/0)   (4+2n/0)   (5+2n/0)	 (4+2n/0)   (4+2n/0)&lt;br /&gt;
MOVEM	word	   14+4n      12+4n      16+4n	    -		-&lt;br /&gt;
R-&amp;gt;M		   (3/n)      (3/n)      (4/n)	    -		-&lt;br /&gt;
        long   14+8n      12+8n      16+8n	    -		-&lt;br /&gt;
		  (3/2n)     (3/2n)     (4/2n)	    -		-&lt;br /&gt;
&lt;br /&gt;
n is the number of registers to move&lt;br /&gt;
* is the size of the index register (ix) does not affect the instruction&#039;s&lt;br /&gt;
  execution time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Multi-precision instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the multi-precision&lt;br /&gt;
instructions. The number of clock periods includes the time to fetch both&lt;br /&gt;
operands, perform the operations, store the results and read the next &lt;br /&gt;
instructions.&lt;br /&gt;
&lt;br /&gt;
instruction	size		op Dn,Dn	op M,M&lt;br /&gt;
&lt;br /&gt;
ADDX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
		  long		8(1/0)		30(5/2)&lt;br /&gt;
CMPM		byte,word	  -		12(3/0)&lt;br /&gt;
		  long		  -		20(5/0)&lt;br /&gt;
SUBX		byte,word	4(1/0)		18(3/1)&lt;br /&gt;
		  long		8(1/0)		30(5/2)&lt;br /&gt;
ABCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
SBCD		  byte		6(1/0)		18(3/1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for the following &lt;br /&gt;
miscellaneous instructions. The number of clock periods and plus the number&lt;br /&gt;
of read and write cycles must be added to those of the effective address&lt;br /&gt;
calculation where indicated.&lt;br /&gt;
&lt;br /&gt;
instruction	size	register	memory&lt;br /&gt;
&lt;br /&gt;
ANDI to CCR	byte	 20(3/0)	   -&lt;br /&gt;
ANDI to SR	word	 20(3/0)	   -&lt;br /&gt;
CHK		 -	 10(1/0) +	   -&lt;br /&gt;
EORI to CCR	byte	 20(3/0)	   -&lt;br /&gt;
EORI to SR	word	 20(3/0)	   -&lt;br /&gt;
ORI to CCR	byte	 20(3/0)	   -&lt;br /&gt;
ORI to SR	word	 20(3/0)	   -&lt;br /&gt;
MOVE from SR	 -	  6(1/0)	 8(1/1)+&lt;br /&gt;
MOVE to CCR	 -	 12(1/0)	12(1/0)+&lt;br /&gt;
MOVE to SR	 -	 12(1/0)	12(1/0)+&lt;br /&gt;
EXG		 -	  6(1/0)	   -&lt;br /&gt;
EXT		word	  4(1/0)	   -&lt;br /&gt;
		long	  4(1/0)	   -&lt;br /&gt;
LINK		 -	 16(2/2)	   -&lt;br /&gt;
MOVE from USP	 -	  4(1/0)	   -&lt;br /&gt;
MOVE to USP	 -	  4(1/0)	   -&lt;br /&gt;
NOP		 -	  4(1/0)	   -&lt;br /&gt;
RESET		 -	132(1/0)	   -&lt;br /&gt;
RTE		 -	 20(5/0)	   -&lt;br /&gt;
RTR		 -	 20(5/0)	   -&lt;br /&gt;
RTS		 -	 16(4/0)	   -&lt;br /&gt;
STOP		 -	  4(0/0)	   -&lt;br /&gt;
SWAP		 -	  4(1/0)	   -&lt;br /&gt;
TRAPV (No Trap)	 -	  4(1/0)	   -&lt;br /&gt;
UNLK		 -	 12(3/0)	   -&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Move Peripheral instructions=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
instruction	size	register-&amp;gt;memory	memory-&amp;gt;register&lt;br /&gt;
&lt;br /&gt;
MOVEP		word	16(2/2)				16(4/0)	&lt;br /&gt;
			long	24(2/4)				24(6/0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Exception processing=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
This table indicates the number of clock periods for exception processing.&lt;br /&gt;
The number of clock periods includes the time for all stacking, the vector&lt;br /&gt;
fetch and the fetch of the first two instruction words of the handler routine.&lt;br /&gt;
&lt;br /&gt;
	exception			periods&lt;br /&gt;
&lt;br /&gt;
	address error			50(4/7)&lt;br /&gt;
	bus error			50(4/7)&lt;br /&gt;
	CHK instruction (trap taken)	44(5/3)+&lt;br /&gt;
	Divide by Zero			42(5/3)&lt;br /&gt;
	illegal instruction		34(4/3)&lt;br /&gt;
	interrupt			44(5/3)*&lt;br /&gt;
	privilege violation		34(4/3)&lt;br /&gt;
        _____&lt;br /&gt;
	RESET **			40(6/0)&lt;br /&gt;
	trace				34(4/3)&lt;br /&gt;
	TRAP instruction		38(4/3)&lt;br /&gt;
	TRAPV instruction (trap taken)	34(4/3)&lt;br /&gt;
&lt;br /&gt;
	+ add effective address calculation time&lt;br /&gt;
	* the interrupt acknowledge cycle is assumed to take four&lt;br /&gt;
	  clock periods&lt;br /&gt;
                                       _____     ____&lt;br /&gt;
       ** indicates the time from when RESET and HALT are first&lt;br /&gt;
	  sampled as negated to when instruction execution starts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Base system]]&lt;br /&gt;
[[Category:Code]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Todo/Mysteries&amp;diff=5716</id>
		<title>Todo/Mysteries</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Todo/Mysteries&amp;diff=5716"/>
		<updated>2017-06-26T15:17:35Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Housekeeping==&lt;br /&gt;
* Merge Sprite_scaling with Sprite_shrinking&lt;br /&gt;
* Rename GPU to VDC everywhere ? Or VDP ? LSPC isn&#039;t really a processor. Sorry :/&lt;br /&gt;
* Rename BIOS to system ROM everywhere (done ?)&lt;br /&gt;
* Use 3rd parameter of Sig template (signal polarity)&lt;br /&gt;
* Use Chipname, Reg, Sig, BR templates&lt;br /&gt;
&lt;br /&gt;
==Useful==&lt;br /&gt;
* Tooltip extension for registers ?&lt;br /&gt;
* Check everything in [[Meg count]]. Add links to game pages.&lt;br /&gt;
* Add pin numbers on [[AES cartridge pinout]]&lt;br /&gt;
* Add on to [[How to start]] page&lt;br /&gt;
* Tutorials&lt;br /&gt;
* Change DEFINE names (and register names ?) to the ones used in the AoF source code&lt;br /&gt;
* Memory chip pinouts&lt;br /&gt;
* Finish PRO chipset pinouts !&lt;br /&gt;
* M1 and S1 ROM speeds&lt;br /&gt;
* CD I/O ERROR 0001 0002 0003 ?&lt;br /&gt;
* CRC32 of all known ROMs/ISOs from MAME&#039;s neogeo.inc&lt;br /&gt;
* Add more jumper configs&lt;br /&gt;
* Memory card stuff (format, banks...)&lt;br /&gt;
* neo-mga on mv1a + PALs info&lt;br /&gt;
* Chip functions for each kind of board (even discrete logic)&lt;br /&gt;
&lt;br /&gt;
==Trivia==&lt;br /&gt;
* Add links to TCRF pages for the debug DIPs of each game&lt;br /&gt;
* CMC fix bankswitching: how/when is vram bank info sent to the cartridge?&lt;br /&gt;
* Recent security chips info (SMA, PVC...)&lt;br /&gt;
* Neo cd chip pinouts (not very useful)&lt;br /&gt;
* Are the two missing FM channels from the YM2610 actually off the die or just disabled?&lt;br /&gt;
&lt;br /&gt;
==Analysis / mysteries==&lt;br /&gt;
* Why does the L0 ROM need an output buffer ?&lt;br /&gt;
* Loading time graphs for all CD games, is MESS reliable enough ? (no)&lt;br /&gt;
* Details on CD registers&lt;br /&gt;
* CDDA playback (needs more research in CD system rom)&lt;br /&gt;
* Dump LC98000 version Neo CD system rom&lt;br /&gt;
* [[LC8953]]/98000 microcode (note: Sanyo tech support has nothing left except publicly available brief sheet)&lt;br /&gt;
&lt;br /&gt;
==Verify==&lt;br /&gt;
* Check [[Clock]] distribution diagram, especially on cart edge&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=FM&amp;diff=5715</id>
		<title>FM</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=FM&amp;diff=5715"/>
		<updated>2017-06-26T15:12:54Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FM (&#039;&#039;&#039;F&#039;&#039;&#039;requency &#039;&#039;&#039;M&#039;&#039;&#039;odulation) is part of the {{Chipname|YM2610}} sound chip. It provides &#039;&#039;&#039;4 channels&#039;&#039;&#039;, each having their own set of 4 operators, panning and amplitude values. It&#039;s the most used way of producing music in games.&lt;br /&gt;
&lt;br /&gt;
=Common registers=&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Address (Z80 port 4)&lt;br /&gt;
!Data (Z80 port 5)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|$21&lt;br /&gt;
|{{8BitRegister|?|8}}&lt;br /&gt;
| Test register. Ignore or set to $00 for normal operation.&lt;br /&gt;
|-&lt;br /&gt;
|$22&lt;br /&gt;
|{{8BitRegister|-|4|On|1|Control|3}}&lt;br /&gt;
| LFO control and frequency (see below).&lt;br /&gt;
|-&lt;br /&gt;
|$28&lt;br /&gt;
|{{8BitRegister|Slot|4|-|1|Channel|3|}}&lt;br /&gt;
| Key On/Off for each channel.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LFO frequency values are as follows:&lt;br /&gt;
*0 &amp;amp;ndash; 3.98Hz&lt;br /&gt;
*1 &amp;amp;ndash; 5.56Hz&lt;br /&gt;
*2 &amp;amp;ndash; 6.02Hz&lt;br /&gt;
*3 &amp;amp;ndash; 6.37Hz&lt;br /&gt;
*4 &amp;amp;ndash; 6.88Hz&lt;br /&gt;
*5 &amp;amp;ndash; 9.63Hz&lt;br /&gt;
*6 &amp;amp;ndash; 48.1Hz&lt;br /&gt;
*7 &amp;amp;ndash; 72.2Hz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Channel numbering:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 !FM Channel&lt;br /&gt;
 !Binary Code&lt;br /&gt;
|-&lt;br /&gt;
  | CH1&lt;br /&gt;
  | 001&lt;br /&gt;
|-&lt;br /&gt;
  | CH2&lt;br /&gt;
  | 010&lt;br /&gt;
|-&lt;br /&gt;
  | CH3&lt;br /&gt;
  | 101&lt;br /&gt;
|-&lt;br /&gt;
  | CH4&lt;br /&gt;
  | 110&lt;br /&gt;
|}&lt;br /&gt;
This strange numbering seems to be due to the fact YM2610 is a YM2610B with 2 removed FM channels (000 and 100).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Channel registers=&lt;br /&gt;
&lt;br /&gt;
Depending on which channel you want to write to, the {{Chipname|Z80}} ports used are different:&lt;br /&gt;
* Channels 1 &amp;amp; 2: Ports 4/5&lt;br /&gt;
* Channels 3 &amp;amp; 4: Ports 6/7&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=4|Address||colspan=4|Data||rowspan=3|&lt;br /&gt;
|-&lt;br /&gt;
|CH1||CH2||CH3||CH4||CH1||CH2||CH3||CH4&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|Port 4||colspan=2|Port 6||colspan=2|Port 5||colspan=2|Port 7&lt;br /&gt;
|-&lt;br /&gt;
|$A1||$A2||$A1||$A2&lt;br /&gt;
|colspan=4|{{8BitRegister|F-Num 1|8}}&lt;br /&gt;
|F-Numbers and Block (1/2)&lt;br /&gt;
|-&lt;br /&gt;
|$A5||$A6||$A5||$A6&lt;br /&gt;
|colspan=4|{{8BitRegister|-|2|Block|3|F-Num 2|3}}&lt;br /&gt;
|F-Numbers and Block (2/2)&amp;lt;br/&amp;gt;(must set this first)&lt;br /&gt;
|-&lt;br /&gt;
|$B1||$B2||$B1||$B2&lt;br /&gt;
|colspan=4|{{8BitRegister|-|2|FB|3|ALGO|3}}&lt;br /&gt;
|Feedback (FB) and Algorithm (ALGO)&lt;br /&gt;
|-&lt;br /&gt;
|$B5||$B6||$B5||$B6&lt;br /&gt;
|colspan=4|{{8BitRegister|L|1|R|1|AMS|2|-|1|PMS|3}}&lt;br /&gt;
|Left (L)/Right (R) output, AM Sense (AMS), and PM Sense (PMS)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2CH mode additional operator frequencies:&lt;br /&gt;
* OP1 frequency is stored in the usual CH2 frequency registers ($A2/$A6)&lt;br /&gt;
* write to Z80 ports 4/5&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=3|Address||colspan=4|Data||rowspan=2|&lt;br /&gt;
|-&lt;br /&gt;
|OP2||OP3||OP4||colspan=&amp;quot;4&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
|$A8||$A9||$AA&lt;br /&gt;
|colspan=4|{{8BitRegister|2CH * F-Num 1|8}}&lt;br /&gt;
|2CH mode F-Num LSB&lt;br /&gt;
|-&lt;br /&gt;
|$AC||$AD||$AE&lt;br /&gt;
|colspan=4|{{8BitRegister|-|2|2CH * Block|3|2CH * F-Num 2|3}}&lt;br /&gt;
|2CH mode F-Num MSB &amp;amp; Block&amp;lt;br/&amp;gt;(must set this first)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Operator registers=&lt;br /&gt;
The ranges given for the address represent all of the parameter values. Each channel&#039;s operators are laid out as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operator || 1 || 2 || 3 || 4&lt;br /&gt;
|-&lt;br /&gt;
! Channels 1, 3&lt;br /&gt;
| $x1 || $x5 || $x9 || $xD&lt;br /&gt;
|-&lt;br /&gt;
! Channels 2, 4&lt;br /&gt;
| $x2 || $x6 || $xA || $xE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=4|Address||colspan=4|Data||rowspan=3|&lt;br /&gt;
|-&lt;br /&gt;
|CH1||CH2||CH3||CH4||CH1||CH2||CH3||CH4&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|Port 4||colspan=2|Port 6||colspan=2|Port 5||colspan=2|Port 7&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$31-$3E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|1|DT|3|MUL|4}}&lt;br /&gt;
|Detune (DT) and Multiple (MUL)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$41-$4E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|1|Total Level|7|}}&lt;br /&gt;
|Total Level (Volume)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$51-$5E&lt;br /&gt;
|colspan=4|{{8BitRegister|KS|2|-|1|AR|5}}&lt;br /&gt;
|Key Scale (KS) and Attack Rate (AR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$61-$6E&lt;br /&gt;
|colspan=4|{{8BitRegister|AM|1|-|2|DR|5}}&lt;br /&gt;
|AM On (AM) and Decay Rate (DR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$71-$7E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|3|SR|5}}&lt;br /&gt;
|Sustain Rate (SR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$81-$8E&lt;br /&gt;
|colspan=4|{{8BitRegister|SL|4|RR|4}}&lt;br /&gt;
|Sustain Level (SL) and Release Rate (RR)&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4|$91-$9E&lt;br /&gt;
|colspan=4|{{8BitRegister|-|4|SSG-EG|4}}&lt;br /&gt;
|Envelope generator (not to be confused with the [[SSG]] one)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Audio system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=ADPCM&amp;diff=5714</id>
		<title>ADPCM</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=ADPCM&amp;diff=5714"/>
		<updated>2017-06-26T15:11:05Z</updated>

		<summary type="html">&lt;p&gt;Hpman: lolno&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A&#039;&#039;&#039;daptive &#039;&#039;&#039;D&#039;&#039;&#039;ifferential &#039;&#039;&#039;P&#039;&#039;&#039;ulse &#039;&#039;&#039;C&#039;&#039;&#039;ode &#039;&#039;&#039;M&#039;&#039;&#039;odulation is a lossy audio compression algorithm. It is essentially PCM with dynamic quantizing step adaptation. See [[https://en.wikipedia.org/wiki/Adaptive_differential_pulse-code_modulation Wikipedia article]] for more general informations.&lt;br /&gt;
&lt;br /&gt;
The NeoGeo&#039;s {{Chipname|YM2610}} uses this format for samples stored in the [[V ROM]]s or [[PCM file]]s. Each sample is coded in 4 bits and approximately reconstituted as 12 or 16 bits during playback.&lt;br /&gt;
&lt;br /&gt;
Note that the Yamaha ADPCM format is different from the common IMA and Microsoft ADPCM formats. See [[ADPCM codecs]] for encoding and decoding tools.&lt;br /&gt;
&lt;br /&gt;
The NeoGeo CD can&#039;t use ADPCM-B.&lt;br /&gt;
&lt;br /&gt;
=Status register=&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Address (Z80 port 4)&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Data (Z80 port 5)&#039;&#039;&#039;&lt;br /&gt;
|Value on [[reset]]&lt;br /&gt;
|-&lt;br /&gt;
|$1C&lt;br /&gt;
|{{8BitRegister|B|1|-|1|A6|1|A5|1|A4|1|A3|1|A2|1|A1|1|}}&lt;br /&gt;
|$00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each bit corresponds to an ADPCM channel.&lt;br /&gt;
&lt;br /&gt;
* Write 1 to reset and mask selected flag&lt;br /&gt;
* Write 0 to unmask selected flag&lt;br /&gt;
&lt;br /&gt;
Masking a flag will prevent it from being raised when a channel reaches its end address. This means it is required to write 1 to clear the flag, then 0 to keep it active.&lt;br /&gt;
&lt;br /&gt;
Flags must be manually cleared, playing a new sample on the channel won&#039;t clear it and the channel will stay silent.&lt;br /&gt;
&lt;br /&gt;
=ADPCM-A=&lt;br /&gt;
The ADPCM-A part has &#039;&#039;&#039;6 channels&#039;&#039;&#039; with a &#039;&#039;&#039;fixed&#039;&#039;&#039; playback frequency of: 8MHz ({{Sig|8M|8M}}) / 12 (prescaler) / 6 clocks per access / 6 channels = ~&#039;&#039;&#039;18.5185kHz&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Audio is compressed as 4bit per sample and played back as &#039;&#039;&#039;12bit&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Registers==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Address (Z80 port 6)&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Data (Z80 port 7)&#039;&#039;&#039;&lt;br /&gt;
|Value on [[reset]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|$00&lt;br /&gt;
|{{8BitRegister|Dump|1|-|1|CH6 ON|1|CH5 ON|1|CH4 ON|1|CH3 ON|1|CH2 ON |1|CH1 ON|1}}&lt;br /&gt;
|$00&lt;br /&gt;
|&#039;Dump&#039; is the key on/off bit. Write 0 to start playing specified channels and 1 to stop playing.&lt;br /&gt;
|-&lt;br /&gt;
|$01&lt;br /&gt;
|{{8BitRegister|-|2|Master volume|6}}&lt;br /&gt;
|$00&lt;br /&gt;
|Actually an attenuator, $3F is the loudest.&lt;br /&gt;
|-&lt;br /&gt;
|$02&lt;br /&gt;
|{{8BitRegister|?|8}}&lt;br /&gt;
|$00 ?&lt;br /&gt;
|Test register. Ignore or set to $00 for normal operation.&lt;br /&gt;
|-&lt;br /&gt;
|$08~$0D (one for each channel)&lt;br /&gt;
|{{8BitRegister|L|1|R|1|-|1|Channel volume|5}}&lt;br /&gt;
|$00&lt;br /&gt;
|Actually an attenuator, $1F is the loudest. L/R routes the output to the left and/or right channels.&lt;br /&gt;
|-&lt;br /&gt;
|$10~$15 (one for each channel)&lt;br /&gt;
|{{8BitRegister|Sample&#039;s start address/256 LSB|8}}&lt;br /&gt;
|$00&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot;|All ADPCM addresses must match a 256-byte boundary (bits 0~7 = 0)&lt;br /&gt;
|-&lt;br /&gt;
|$18~$1D (one for each channel)&lt;br /&gt;
|{{8BitRegister|Sample&#039;s start address/256 MSB|8}}&lt;br /&gt;
|$00&lt;br /&gt;
|-&lt;br /&gt;
|$20~$25 (one for each channel)&lt;br /&gt;
|{{8BitRegister|Sample&#039;s stop address/256 LSB|8}}&lt;br /&gt;
|$00&lt;br /&gt;
|-&lt;br /&gt;
|$28~$2D (one for each channel)&lt;br /&gt;
|{{8BitRegister|Sample&#039;s stop address/256 MSB|8}}&lt;br /&gt;
|$00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=ADPCM-B=&lt;br /&gt;
The ADPCM-B part only has &#039;&#039;&#039;1 channel&#039;&#039;&#039;, but the playback frequency can be set from &#039;&#039;&#039;1.85kHz&#039;&#039;&#039; to: 8MHz ({{Sig|8M|8M}}) / 2 / 12 (prescaler) / 6 clocks per access = ~&#039;&#039;&#039;55.555kHz&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Audio is compressed as 4bit per sample and played back as &#039;&#039;&#039;16bit&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Registers==&lt;br /&gt;
&lt;br /&gt;
See [[ADPCM]] for details on this part&#039;s operation.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Address (Z80 port 4)&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Data (Z80 port 5)&#039;&#039;&#039;&lt;br /&gt;
|Value on [[reset]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|$10&lt;br /&gt;
|{{8BitRegister|Start|1|-|2|Repeat|1|-|3|Reset|1|}}&lt;br /&gt;
|$00&lt;br /&gt;
|Repeat: loop when end address is reached. Reset: clears Start and Repeat.&lt;br /&gt;
|-&lt;br /&gt;
|$11&lt;br /&gt;
|{{8BitRegister|L|1|R|1|-|6|}}&lt;br /&gt;
|$00&lt;br /&gt;
|Left/Right channel output&lt;br /&gt;
|-&lt;br /&gt;
|$12&lt;br /&gt;
|{{8BitRegister|Sample&#039;s start address/256 LSB|8}}&lt;br /&gt;
|?&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot;|All ADPCM addresses must match a 256-byte boundary (bits 0~7 = 0)&lt;br /&gt;
|-&lt;br /&gt;
|$13&lt;br /&gt;
|{{8BitRegister|Sample&#039;s start address/256 MSB|8}}&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$14&lt;br /&gt;
|{{8BitRegister|Sample&#039;s stop address/256 LSB|8}}&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$15&lt;br /&gt;
|{{8BitRegister|Sample&#039;s stop address/256 MSB|8}}&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$19&lt;br /&gt;
|{{8BitRegister|Delta-N (L)|8}}&lt;br /&gt;
|?&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Playback rate is f = 8M / 12 / 12 / (65535 / Delta-N) = 55555 * (Delta-N / 65535) Hz&lt;br /&gt;
|-&lt;br /&gt;
|$1A&lt;br /&gt;
|{{8BitRegister|Delta-N (H)|8}}&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|$1B&lt;br /&gt;
|{{8BitRegister|ADPCM-B channel volume|8}}&lt;br /&gt;
|?&lt;br /&gt;
|Loudest is $FF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Format=&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
* ADPCM-A Samples can be any size from &#039;&#039;&#039;256 bytes to 1MiB, in 256 bytes steps&#039;&#039;&#039;. They must be padded with silence.&lt;br /&gt;
* ADPCM-A Samples &#039;&#039;&#039;cannot cross 1MB pages&#039;&#039;&#039; (the 4 MSBs of the end address must be equal those of the start address). Be sure to organize/map your data correctly.&lt;br /&gt;
* ADPCM-B Samples can be any size from &#039;&#039;&#039;256 bytes to 16MiB, in 256 bytes steps&#039;&#039;&#039;. They must be padded with silence.&lt;br /&gt;
&lt;br /&gt;
=Drifting=&lt;br /&gt;
&lt;br /&gt;
[[File:Adpcm_drift.png|thumb|Decoded ADPCM audio slowly drifting upwards and hitting a chunk of garbage data.]]&lt;br /&gt;
&lt;br /&gt;
Since the codec is based on the difference between samples, it is prone to drifting if buggy codecs or bad data are used.&lt;br /&gt;
&lt;br /&gt;
Clean data should always produce a zero-centered signal when decoded.&lt;br /&gt;
&lt;br /&gt;
If a cartridge has contact issues for example, the YM2610 will read corrupt data and the decoder will make the output value randomly &amp;quot;jump&amp;quot; everywhere, resulting in a horrendous screeching sound even if only one data line is disconnected.&lt;br /&gt;
&lt;br /&gt;
Many V ROMs contain garbage data between valid samples. Consequently, if the dump is decoded from start to end, the decoder will take the garbage data into account and the decoded audio output will either drift slowly or become brutally offset. This isn&#039;t an issue when the game is running because the YM2610 resets the decoder each time a sample is played (also, the [[sound driver]] shouldn&#039;t be playing garbage data).&lt;br /&gt;
&lt;br /&gt;
[[Category:Audio system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=YM2610_registers&amp;diff=5711</id>
		<title>YM2610 registers</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=YM2610_registers&amp;diff=5711"/>
		<updated>2017-06-24T18:23:29Z</updated>

		<summary type="html">&lt;p&gt;Hpman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Timers=&lt;br /&gt;
&lt;br /&gt;
See [[YM2610 timers]].&lt;br /&gt;
&lt;br /&gt;
=SSG part=&lt;br /&gt;
&lt;br /&gt;
See [[SSG]] for details on this part&#039;s operation.&lt;br /&gt;
&lt;br /&gt;
=FM part=&lt;br /&gt;
&lt;br /&gt;
See [[FM]] for details on this part&#039;s operation.&lt;br /&gt;
&lt;br /&gt;
=ADPCM part=&lt;br /&gt;
&lt;br /&gt;
See [[ADPCM]] for details on this part&#039;s operation.&lt;br /&gt;
&lt;br /&gt;
=Reading=&lt;br /&gt;
&lt;br /&gt;
The only writable registers that can also be read are the SSG ones.&lt;br /&gt;
To read register X, write X to Z80 port 4, then read Z80 port 5.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;regdef&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Z80 port&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Data&#039;&#039;&#039;&lt;br /&gt;
|Notes&lt;br /&gt;
|-&lt;br /&gt;
|$04&lt;br /&gt;
|{{8BitRegister|Busy|1|-|5|Timer B flag|1|Timer A flag|1}}&lt;br /&gt;
|When a timer expires and IRQ is enabled for the timer, the respective flag is set.&lt;br /&gt;
|-&lt;br /&gt;
|$05&lt;br /&gt;
|{{8BitRegister|SSG register data|8}}&lt;br /&gt;
|Attempting to read non-SSG registers will return 0.&lt;br /&gt;
|-&lt;br /&gt;
|$06&lt;br /&gt;
|{{8BitRegister|ADPCM-B end|1|-|1|CH6 end|1|CH5 end|1|CH4 end|1|CH3 end|1|CH2 end|1|CH1 end|1}}&lt;br /&gt;
|When a channel has reached the end address and stops, the respective bit is set (unless masked).&lt;br /&gt;
|-&lt;br /&gt;
|$07&lt;br /&gt;
|Not implemented&lt;br /&gt;
|Always returns $00&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Code]]&lt;br /&gt;
[[Category:Audio system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=YM2610&amp;diff=5708</id>
		<title>YM2610</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=YM2610&amp;diff=5708"/>
		<updated>2017-06-24T02:30:25Z</updated>

		<summary type="html">&lt;p&gt;Hpman: Noise can be mixed with SSG A/B/C but isn&amp;#039;t a channel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ChipInfo&lt;br /&gt;
|picture=Cd2_ym2610.jpg&lt;br /&gt;
|pkg=SDIP64&lt;br /&gt;
|manu=yamaha&lt;br /&gt;
|date=1990 ?&lt;br /&gt;
|gates=&lt;br /&gt;
|used_on=All systems&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The YM2610 is a sound synthesis and playback chip made by Yamaha, found in all versions of the NeoGeo hardware.&lt;br /&gt;
It was later merged with other chips in {{Chipname|NEO-YSA}} and {{Chipname|NEO-YSA2}}, which are used on some versions of the NeoGeo CD, the [[CDZ]], the {{PCB|MV1C}} and on [[ROM-Only boards]].&lt;br /&gt;
&lt;br /&gt;
The YM2610 requires a {{Chipname|YM3016}} external DAC (Digital to Analog Converter) chip for the [[FM]] and [[ADPCM]] sounds. The only direct analog output is for the [[SSG]] sounds. Both analog outputs are then mixed together before amplification.&lt;br /&gt;
&lt;br /&gt;
The original YM2610 chip gets quite warm during normal operation.&lt;br /&gt;
&lt;br /&gt;
=Parts=&lt;br /&gt;
Sound can come from 3 different generators, each having their own channels:&lt;br /&gt;
&lt;br /&gt;
* [[SSG]] (Software Sound Generator): 3 channels&lt;br /&gt;
* [[FM]] (Frequency Modulation): 4 channels&lt;br /&gt;
* [[ADPCM]] (Sample playback): 7 channels&lt;br /&gt;
&lt;br /&gt;
Providing 14 channels in total.&lt;br /&gt;
&lt;br /&gt;
=Programming=&lt;br /&gt;
&lt;br /&gt;
See [[Z80/YM2610 interface]] and [[YM2610 registers]].&lt;br /&gt;
&lt;br /&gt;
=Pinout=&lt;br /&gt;
&lt;br /&gt;
[[File:Ym2610_pinout.png|right|width=400px]]&lt;br /&gt;
&lt;br /&gt;
* {{Sig|SDD|SDD*}}: {{Chipname|Z80}} data bus&lt;br /&gt;
* {{Sig|RAD|RAD*}}: ADPCM-A multiplexed address/data&lt;br /&gt;
* {{Sig|RMPX|RMPX}}: ADPCM-A address/data select&lt;br /&gt;
* {{Sig|ROE|ROE}}: APDCM-A data output enable&lt;br /&gt;
* {{Sig|RA|RA*}}: ADPCM-A address&lt;br /&gt;
* {{Sig|ANA|ANA}}: SSG analog output&lt;br /&gt;
* {{Sig|SH1|SH1}}: {{Chipname|YM3016}} latch 1&lt;br /&gt;
* {{Sig|SH2|SH2}}: YM3016 latch 2&lt;br /&gt;
* {{Sig|OP0|OP0}}: YM3016 serial data&lt;br /&gt;
* {{Sig|IC|IC}}: Reset&lt;br /&gt;
* {{Sig|PA|PA*}}: ADPCM-B address&lt;br /&gt;
* {{Sig|POE|POE}}: ADPCM-B data output enable&lt;br /&gt;
* {{Sig|PMPX|PMPX}}: ADPCM-B address/data select&lt;br /&gt;
* {{Sig|PAD|PAD*}}: ADPCM-B multiplexed address/data&lt;br /&gt;
* {{Sig|IRQ|IRQ}}: Interrupt request output&lt;br /&gt;
* {{Sig|CS|CS}}: Chip select&lt;br /&gt;
* {{Sig|WR|WR}}: Write&lt;br /&gt;
* {{Sig|RD|RD}}: Read&lt;br /&gt;
* {{Sig|SDA|A*}}: Z80 address bus&lt;br /&gt;
* {{Sig|PHI M|PHI M}}: [[Clock]] input&lt;br /&gt;
* {{Sig|PHI S|PHI S}}: YM3016 clock output&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=&amp;quot;right&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Multiplexed PCM bus=&lt;br /&gt;
&lt;br /&gt;
Access to the [[V ROM]]s are made via partly multiplexed buses. See [[YM2610 bus timing]] for more details about the access sequences.&lt;br /&gt;
&lt;br /&gt;
The {{Sig|SDRMPX|SDRMPX}} and {{Sig|SDPMPX|SDPMPX}} signals are used to drive latches or the {{Chipname|PCM}} chip in [[cartridges]] to demultiplex address and data. When {{Sig|SDROE|SDROE}} or {{Sig|SDPOE|SDPOE}} goes low, SDRAD* and SDPAD* are tristated so that the V ROMs can output data.&lt;br /&gt;
&lt;br /&gt;
* SDRA* for ADPCM-A&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!SDRMPX&lt;br /&gt;
!colspan=&amp;quot;8&amp;quot;|SDRAD*&lt;br /&gt;
!colspan=&amp;quot;6&amp;quot;|SDRA*&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
!0&lt;br /&gt;
!1&lt;br /&gt;
!2&lt;br /&gt;
!3&lt;br /&gt;
!4&lt;br /&gt;
!5&lt;br /&gt;
!6&lt;br /&gt;
!7&lt;br /&gt;
!8&lt;br /&gt;
!9&lt;br /&gt;
!20&lt;br /&gt;
!21&lt;br /&gt;
!22&lt;br /&gt;
!23&lt;br /&gt;
|-&lt;br /&gt;
|Low to high&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|3&lt;br /&gt;
|4&lt;br /&gt;
|5&lt;br /&gt;
|6&lt;br /&gt;
|7&lt;br /&gt;
|8&lt;br /&gt;
|9&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|High to low&lt;br /&gt;
|10&lt;br /&gt;
|11&lt;br /&gt;
|12&lt;br /&gt;
|13&lt;br /&gt;
|14&lt;br /&gt;
|15&lt;br /&gt;
|16&lt;br /&gt;
|17&lt;br /&gt;
|18&lt;br /&gt;
|19&lt;br /&gt;
|20&lt;br /&gt;
|21&lt;br /&gt;
|22&lt;br /&gt;
|23&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* SDPA* for ADPCM-B&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!SDPMPX&lt;br /&gt;
!colspan=&amp;quot;8&amp;quot;|SDPAD*&lt;br /&gt;
!colspan=&amp;quot;6&amp;quot;|SDPA*&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
!0&lt;br /&gt;
!1&lt;br /&gt;
!2&lt;br /&gt;
!3&lt;br /&gt;
!4&lt;br /&gt;
!5&lt;br /&gt;
!6&lt;br /&gt;
!7&lt;br /&gt;
!8&lt;br /&gt;
!9&lt;br /&gt;
!10&lt;br /&gt;
!11&lt;br /&gt;
|-&lt;br /&gt;
|Low to high&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|3&lt;br /&gt;
|4&lt;br /&gt;
|5&lt;br /&gt;
|6&lt;br /&gt;
|7&lt;br /&gt;
|8&lt;br /&gt;
|9&lt;br /&gt;
|10&lt;br /&gt;
|11&lt;br /&gt;
|-&lt;br /&gt;
|High to low&lt;br /&gt;
|12&lt;br /&gt;
|13&lt;br /&gt;
|14&lt;br /&gt;
|15&lt;br /&gt;
|16&lt;br /&gt;
|17&lt;br /&gt;
|18&lt;br /&gt;
|19&lt;br /&gt;
|20&lt;br /&gt;
|21&lt;br /&gt;
|22&lt;br /&gt;
|23&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
24 address bits allow for 16MiB max V ROMs (without bankswitching).&lt;br /&gt;
&lt;br /&gt;
=Trivia=&lt;br /&gt;
&lt;br /&gt;
* A lot of games have several recordings of the same instrument playing different notes, rather than having only one sample and change the ADPCM-B playback frequency to vary its pitch. (Trumpet in [[Viewpoint]], electric guitar in [[Super Sidekicks]]). Why ?&lt;br /&gt;
* Nazca&#039;s [[sound driver]]s are able to use the SSG channels for music playback. (Maybe all can ?)&lt;br /&gt;
&lt;br /&gt;
=Datasheet=&lt;br /&gt;
&lt;br /&gt;
Japanese datasheet: [[http://www.ajworld.net/neogeodev/ym2610am_en.html ajworld.net]]&lt;br /&gt;
&lt;br /&gt;
Incomplete/translated datasheet: [[http://furrtek.free.fr/noclass/neogeo/YM2610.pdf YM2610.pdf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Chips]]&lt;br /&gt;
[[Category:Audio system]]&lt;/div&gt;</summary>
		<author><name>Hpman</name></author>
	</entry>
</feed>