<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://sneslab.net/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alcaro</id>
	<title>SnesLab - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://sneslab.net/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alcaro"/>
	<link rel="alternate" type="text/html" href="https://sneslab.net/wiki/Special:Contributions/Alcaro"/>
	<updated>2026-05-05T16:22:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=JCC816&amp;diff=20842</id>
		<title>JCC816</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=JCC816&amp;diff=20842"/>
		<updated>2025-03-10T18:34:37Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;JCC816&#039;&#039;&#039; is a C complier targeting the [[65c816]] written in Java.  It emits assembly code for the ca65 assembler.&lt;br /&gt;
&lt;br /&gt;
=== External Links ===&lt;br /&gt;
* https://github.com/Iacon1/JCC816&lt;br /&gt;
&lt;br /&gt;
[[Category:Compilers]]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=15219</id>
		<title>Bithacks</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=15219"/>
		<updated>2024-04-28T19:47:53Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bithacks are optimization tricks that utilize information in bits and [https://en.wikipedia.org/wiki/Bit_manipulation bit manipulation]&lt;br /&gt;
to accomplish their tasks. Usually they work in a slightly non-obvious way, (the most famous being the [https://en.wikipedia.org/wiki/Fast_inverse_square_root fast inverse sqrt]), and bit manipulation in general is harder on the [[65c816]]. To that end, here is a collection of some useful tricks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note: cycle counts are intended to be a worst case measure.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also: [[Useful_Code_Snippets|Useful Code Snippets]]&lt;br /&gt;
&lt;br /&gt;
= Math Bithacks =&lt;br /&gt;
== Signed Division By 2 ==&lt;br /&gt;
&#039;&#039;7 bytes / 8 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
	BPL +&lt;br /&gt;
	ADC #$00&lt;br /&gt;
	+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: Rounds toward zero.&lt;br /&gt;
&lt;br /&gt;
== Arithmetic Shift Right ==&lt;br /&gt;
&#039;&#039;3 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: This is similar to division by 2, but rounds toward negative infinity.&lt;br /&gt;
&lt;br /&gt;
== Arithmetic Shift Right, multiple steps ==&lt;br /&gt;
&#039;&#039;6+n bytes / 6+2n cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; signed division by two, n times&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BIT.b #$80&amp;gt;&amp;gt;&amp;lt;n&amp;gt;&lt;br /&gt;
	BEQ ?positive&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?positive:&lt;br /&gt;
endmacro&lt;br /&gt;
&lt;br /&gt;
; -1 cycle and +n bytes, but must have N flag set before use&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	BMI ?negative&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BRA ?end&lt;br /&gt;
?negative:&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?end:&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value ==&lt;br /&gt;
&#039;&#039;5 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (N Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
macro abs()&lt;br /&gt;
	BPL ?plus&lt;br /&gt;
	EOR #$FF&lt;br /&gt;
	INC&lt;br /&gt;
?plus:		; only 3 cycles if branch taken&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value (SEC) ==&lt;br /&gt;
&#039;&#039;4 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (Carry Set)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; compared to the branching version this is 1 byte smaller&lt;br /&gt;
; it&#039;s either 2 cycles slower/faster depending on branch taken&lt;br /&gt;
	EOR #$7F&lt;br /&gt;
;	SEC		; the instant you add this in it becomes worse than the branching version&lt;br /&gt;
	SBC #$7F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Magnitude/Extents Check ==&lt;br /&gt;
&#039;&#039;~7 bytes / 12 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; asks &amp;quot;Is [A] on the zero-side of value [X] or the far side?&amp;quot;&lt;br /&gt;
; good for magnitude checks, smaller *AND* faster than alternatives&lt;br /&gt;
; NOTE: in the event that it is exactly [X] it will have that value at branch&lt;br /&gt;
; doesn&#039;t need to be an indexed CMP but is most useful this way&lt;br /&gt;
; this can be used to combine the BPL and BMI checks for both signs into one&lt;br /&gt;
	SEC : SBC Extents,x&lt;br /&gt;
	EOR Extents,x&lt;br /&gt;
	BMI .zero_side&lt;br /&gt;
.far_side:&lt;br /&gt;
	; do things&lt;br /&gt;
.zero_side:&lt;br /&gt;
	; do things&lt;br /&gt;
&lt;br /&gt;
Extents:&lt;br /&gt;
	db -$23, $23&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sign Extend ==&lt;br /&gt;
&#039;&#039;13 bytes / 18 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; 8bit value in $10&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	REP #$20&lt;br /&gt;
	LDA $10-1 ; load $10 into A high, and garbage in low&lt;br /&gt;
	AND #$FF00 ; discard garbage&lt;br /&gt;
	BPL +&lt;br /&gt;
	ORA #$00FF&lt;br /&gt;
	+&lt;br /&gt;
	XBA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clamp Signed (To Constants) ==&lt;br /&gt;
&#039;&#039;16 bytes/15 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; clamp signed value in A to [min,max] if min/max are signed constants&lt;br /&gt;
macro clamp_const(min,max)&lt;br /&gt;
	EOR #$80&lt;br /&gt;
	CMP #$80^&amp;lt;min&amp;gt; : BCS ?+&lt;br /&gt;
	LDA #$80^&amp;lt;min&amp;gt;&lt;br /&gt;
?+	CMP #$80^&amp;lt;max&amp;gt; : BCC ?+&lt;br /&gt;
	LDA #$80^&amp;lt;max&amp;gt;&lt;br /&gt;
?+	EOR #$80&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Misc. Tricks =&lt;br /&gt;
&amp;lt;small&amp;gt;As this list grows tricks here will be consolidated into their own sections. Clever optimization tricks that aren&#039;t necessarily what someone might personally call a &amp;quot;bithack&amp;quot; are okay here as well!&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== XCN ==&lt;br /&gt;
&#039;&#039;12 bytes / 16 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; eXchaNge Nibble without a LUT&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clear Low Byte of Accumulator ==&lt;br /&gt;
&#039;&#039;1 byte / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; &amp;quot;Trashes&amp;quot; A but clears low byte&lt;br /&gt;
	TDC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direction/Facing As Index ==&lt;br /&gt;
&#039;&#039;4 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Ever wonder why facing flags are 0=right and 1=left? This is why. It&#039;s incredibly cheap.&lt;br /&gt;
; The input here is specifically a signed speed, or similar value.&lt;br /&gt;
	ASL&lt;br /&gt;
	ROL&lt;br /&gt;
	AND #$01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check N Conditions True ==&lt;br /&gt;
&#039;&#039;n+7 bytes / 2n+7 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; You can test for multiple conditions being true (7 conditions true, at least 5 conditions, etc.) by simply using a counter and rounding to the next power of 2 and test if that bit is set.&lt;br /&gt;
; You can also test for &amp;quot;Less than N True&amp;quot;, &amp;quot;More than N&amp;quot;, etc. with variations.&lt;br /&gt;
; This is almost more a coding technique, but it&#039;s super helpful, so worth pointing out.&lt;br /&gt;
; It can allow you to re-arrange branches of code as independent blocks among other useful things.&lt;br /&gt;
; You can also use any RAM instead of A at a small cost.&lt;br /&gt;
&lt;br /&gt;
; Example Test For 5 True Conditions:&lt;br /&gt;
!Next_Highest_Power_of_2 = $08&lt;br /&gt;
!N_True_Target = $05&lt;br /&gt;
	LDA #!Next_Highest_Power_of_2!-!N_True_Target-1		; here we set up our rounding, the -1 isn&#039;t strictly necessary *most* of the time&lt;br /&gt;
	%TestSomeCondition()&lt;br /&gt;
	BCC +	; here we&#039;re going to say our test just returns carry set on true (but it could directly INC inside the code as well)&lt;br /&gt;
	INC&lt;br /&gt;
+&lt;br /&gt;
;	... repeat the above 5 times for different tests&lt;br /&gt;
&lt;br /&gt;
N_True_Test:&lt;br /&gt;
	INC	; replace our -1 to bring us up to a full power of 2 if we had enough True&lt;br /&gt;
	AND #!Next_Highest_Power_of_2&lt;br /&gt;
	BEQ .false&lt;br /&gt;
.true:&lt;br /&gt;
	; N Tests were True&lt;br /&gt;
.false:&lt;br /&gt;
	; Not exactly N tests were true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skip Dead Code ==&lt;br /&gt;
&#039;&#039;1-2 bytes / 2-3 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; If you need to skip just one byte of dead code (due to a hijack or whatever reason) you can use:&lt;br /&gt;
	NOP		; 1 byte, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; But if you need to skip two bytes the most efficient is:&lt;br /&gt;
; NOTE: many times WDM is used as a breakpoint for debugging so only do this as a final pass to speed up your code!&lt;br /&gt;
	WDM		; 2 bytes, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; Finally, if you need to skip a large amount of dead code you can use BRA/JMP instead&lt;br /&gt;
; JMP is as fast as BRA on the SNES CPU, but will be slightly slower on SA-1, and 1 cycle slower on SPC. So BRA is recommended&lt;br /&gt;
; (The extra byte used for JMP in this case doesn&#039;t matter)&lt;br /&gt;
	BRA +		; 2 bytes, 3 cycles&lt;br /&gt;
	; dead code&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check 3 Conditions ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; just the opcode as normal here (not counting the conditions), using any operand that&#039;s not immediate (#)&lt;br /&gt;
; it&#039;s worth noting that you can do up to 3 tests with a single opcode though!&lt;br /&gt;
; Just As A Reminder: the V &amp;amp; N flag are set by the *operand* to BIT not the result of the AND!&lt;br /&gt;
	BIT $00&lt;br /&gt;
	BMI .bit7_set&lt;br /&gt;
	BVS .bit6_set&lt;br /&gt;
	BNE .bit5_set	; assuming #$20 is in $00&lt;br /&gt;
.bit7_set:&lt;br /&gt;
.bit6_set:&lt;br /&gt;
.bit5_set:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Combine Carry Flag ==&lt;br /&gt;
&#039;&#039;4 bytes / 8 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (Flag, On Stack)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (Carry Flag)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; flag on stack via PHP (8-Bit A if this), etc.&lt;br /&gt;
	; code that alters Carry Flag&lt;br /&gt;
	PLA : BCS +&lt;br /&gt;
	LSR&lt;br /&gt;
+&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Transfer Carry Flag To Overflow Flag ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (Carry Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (Overflow Flag)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	ADC #$7F	; #$7FFF for 16-bit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Convert hex to decimal (16 bits) - with tables ==&lt;br /&gt;
&#039;&#039;1069 bytes / 79 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; Y (lower four digits, one per nybble), !top_digit (ten-thousands digit)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pha&lt;br /&gt;
and #$FF00&lt;br /&gt;
xba&lt;br /&gt;
asl&lt;br /&gt;
tax&lt;br /&gt;
lda.l LowToDecimal+1,x&lt;br /&gt;
lsr #2&lt;br /&gt;
and #$0007&lt;br /&gt;
sta !top_digit&lt;br /&gt;
lda.l HighToDecimal,x&lt;br /&gt;
sta !tmp&lt;br /&gt;
pla&lt;br /&gt;
and #$00FF&lt;br /&gt;
asl&lt;br /&gt;
tax&lt;br /&gt;
lda.l LowToDecimal,x&lt;br /&gt;
and #$03FF&lt;br /&gt;
sed&lt;br /&gt;
adc !tmp&lt;br /&gt;
bcc +&lt;br /&gt;
inc !top_digit&lt;br /&gt;
+&lt;br /&gt;
cld&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
LowToDecimal:&lt;br /&gt;
!i = 0&lt;br /&gt;
while !i &amp;lt; 256&lt;br /&gt;
dw floor(!i*256/10000)*$400+$!i ; not a typo&lt;br /&gt;
!i #= !i+1&lt;br /&gt;
endwhile&lt;br /&gt;
HighToDecimal:&lt;br /&gt;
!i = 0&lt;br /&gt;
while !i &amp;lt; 256&lt;br /&gt;
dw $!{i}00&lt;br /&gt;
!i #= !i+1&lt;br /&gt;
endwhile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Convert hex to decimal (16 bits) - without tables ==&lt;br /&gt;
&#039;&#039;161 bytes / 217 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; Y (lower four digits, one per nybble), !top_digit (ten-thousands digit)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rep #$30&lt;br /&gt;
sed&lt;br /&gt;
tax&lt;br /&gt;
stz !top_digit&lt;br /&gt;
&lt;br /&gt;
and #$0007 ; bottom three bits are easy&lt;br /&gt;
tay&lt;br /&gt;
&lt;br /&gt;
!bit = 16&lt;br /&gt;
while !bit &amp;lt;= 32768&lt;br /&gt;
txa&lt;br /&gt;
bit.w #!bit&lt;br /&gt;
beq +&lt;br /&gt;
tya&lt;br /&gt;
adc.w #$!bit ; not a typo&lt;br /&gt;
tay&lt;br /&gt;
if !bit == 8192&lt;br /&gt;
bcc +&lt;br /&gt;
inc !top_digit&lt;br /&gt;
endif&lt;br /&gt;
if !bit &amp;gt;= 16384&lt;br /&gt;
lda !top_digit&lt;br /&gt;
adc.w #!bit/10000&lt;br /&gt;
sta !top_digit&lt;br /&gt;
if !bit &amp;lt; 32768 ; carry isn&#039;t used after 32768&lt;br /&gt;
clc&lt;br /&gt;
endif&lt;br /&gt;
endif&lt;br /&gt;
+&lt;br /&gt;
!bit #= !bit*2&lt;br /&gt;
endwhile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASM]]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=15218</id>
		<title>Bithacks</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=15218"/>
		<updated>2024-04-28T19:35:53Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bithacks are optimization tricks that utilize information in bits and [https://en.wikipedia.org/wiki/Bit_manipulation bit manipulation]&lt;br /&gt;
to accomplish their tasks. Usually they work in a slightly non-obvious way, (the most famous being the [https://en.wikipedia.org/wiki/Fast_inverse_square_root fast inverse sqrt]), and bit manipulation in general is harder on the [[65c816]]. To that end, here is a collection of some useful tricks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note: cycle counts are intended to be a worst case measure.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also: [[Useful_Code_Snippets|Useful Code Snippets]]&lt;br /&gt;
&lt;br /&gt;
= Math Bithacks =&lt;br /&gt;
== Signed Division By 2 ==&lt;br /&gt;
&#039;&#039;7 bytes / 8 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
	BPL +&lt;br /&gt;
	ADC #$00&lt;br /&gt;
	+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: Rounds toward zero.&lt;br /&gt;
&lt;br /&gt;
== Arithmetic Shift Right ==&lt;br /&gt;
&#039;&#039;3 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: This is similar to division by 2, but rounds toward negative infinity.&lt;br /&gt;
&lt;br /&gt;
== Arithmetic Shift Right, multiple steps ==&lt;br /&gt;
&#039;&#039;6+n bytes / 6+2n cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; signed division by two, n times&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BIT.b #$80&amp;gt;&amp;gt;&amp;lt;n&amp;gt;&lt;br /&gt;
	BEQ ?positive&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?positive:&lt;br /&gt;
endmacro&lt;br /&gt;
&lt;br /&gt;
; -1 cycle and +n bytes, but must have N flag set before use&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	BMI ?negative&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BRA ?end&lt;br /&gt;
?negative:&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?end:&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value ==&lt;br /&gt;
&#039;&#039;5 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (N Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
macro abs()&lt;br /&gt;
	BPL ?plus&lt;br /&gt;
	EOR #$FF&lt;br /&gt;
	INC&lt;br /&gt;
?plus:		; only 3 cycles if branch taken&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value (SEC) ==&lt;br /&gt;
&#039;&#039;4 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (Carry Set)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; compared to the branching version this is 1 byte smaller&lt;br /&gt;
; it&#039;s either 2 cycles slower/faster depending on branch taken&lt;br /&gt;
	EOR #$7F&lt;br /&gt;
;	SEC		; the instant you add this in it becomes worse than the branching version&lt;br /&gt;
	SBC #$7F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Magnitude/Extents Check ==&lt;br /&gt;
&#039;&#039;~7 bytes / 12 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; asks &amp;quot;Is [A] on the zero-side of value [X] or the far side?&amp;quot;&lt;br /&gt;
; good for magnitude checks, smaller *AND* faster than alternatives&lt;br /&gt;
; NOTE: in the event that it is exactly [X] it will have that value at branch&lt;br /&gt;
; doesn&#039;t need to be an indexed CMP but is most useful this way&lt;br /&gt;
; this can be used to combine the BPL and BMI checks for both signs into one&lt;br /&gt;
	SEC : SBC Extents,x&lt;br /&gt;
	EOR Extents,x&lt;br /&gt;
	BMI .zero_side&lt;br /&gt;
.far_side:&lt;br /&gt;
	; do things&lt;br /&gt;
.zero_side:&lt;br /&gt;
	; do things&lt;br /&gt;
&lt;br /&gt;
Extents:&lt;br /&gt;
	db -$23, $23&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sign Extend ==&lt;br /&gt;
&#039;&#039;13 bytes / 18 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; 8bit value in $10&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	REP #$20&lt;br /&gt;
	LDA $10-1 ; load $10 into A high, and garbage in low&lt;br /&gt;
	AND #$FF00 ; discard garbage&lt;br /&gt;
	BPL +&lt;br /&gt;
	ORA #$00FF&lt;br /&gt;
	+&lt;br /&gt;
	XBA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clamp Signed (To Constants) ==&lt;br /&gt;
&#039;&#039;16 bytes/15 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; clamp signed value in A to [min,max] if min/max are signed constants&lt;br /&gt;
macro clamp_const(min,max)&lt;br /&gt;
	EOR #$80&lt;br /&gt;
	CMP #$80^&amp;lt;min&amp;gt; : BCS ?+&lt;br /&gt;
	LDA #$80^&amp;lt;min&amp;gt;&lt;br /&gt;
?+	CMP #$80^&amp;lt;max&amp;gt; : BCC ?+&lt;br /&gt;
	LDA #$80^&amp;lt;max&amp;gt;&lt;br /&gt;
?+	EOR #$80&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Misc. Tricks =&lt;br /&gt;
&amp;lt;small&amp;gt;As this list grows tricks here will be consolidated into their own sections. Clever optimization tricks that aren&#039;t necessarily what someone might personally call a &amp;quot;bithack&amp;quot; are okay here as well!&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== XCN ==&lt;br /&gt;
&#039;&#039;12 bytes / 16 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; eXchaNge Nibble without a LUT&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clear Low Byte of Accumulator ==&lt;br /&gt;
&#039;&#039;1 byte / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; &amp;quot;Trashes&amp;quot; A but clears low byte&lt;br /&gt;
	TDC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direction/Facing As Index ==&lt;br /&gt;
&#039;&#039;4 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Ever wonder why facing flags are 0=right and 1=left? This is why. It&#039;s incredibly cheap.&lt;br /&gt;
; The input here is specifically a signed speed, or similar value.&lt;br /&gt;
	ASL&lt;br /&gt;
	ROL&lt;br /&gt;
	AND #$01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check N Conditions True ==&lt;br /&gt;
&#039;&#039;n+7 bytes / 2n+7 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; You can test for multiple conditions being true (7 conditions true, at least 5 conditions, etc.) by simply using a counter and rounding to the next power of 2 and test if that bit is set.&lt;br /&gt;
; You can also test for &amp;quot;Less than N True&amp;quot;, &amp;quot;More than N&amp;quot;, etc. with variations.&lt;br /&gt;
; This is almost more a coding technique, but it&#039;s super helpful, so worth pointing out.&lt;br /&gt;
; It can allow you to re-arrange branches of code as independent blocks among other useful things.&lt;br /&gt;
; You can also use any RAM instead of A at a small cost.&lt;br /&gt;
&lt;br /&gt;
; Example Test For 5 True Conditions:&lt;br /&gt;
!Next_Highest_Power_of_2 = $08&lt;br /&gt;
!N_True_Target = $05&lt;br /&gt;
	LDA #!Next_Highest_Power_of_2!-!N_True_Target-1		; here we set up our rounding, the -1 isn&#039;t strictly necessary *most* of the time&lt;br /&gt;
	%TestSomeCondition()&lt;br /&gt;
	BCC +	; here we&#039;re going to say our test just returns carry set on true (but it could directly INC inside the code as well)&lt;br /&gt;
	INC&lt;br /&gt;
+&lt;br /&gt;
;	... repeat the above 5 times for different tests&lt;br /&gt;
&lt;br /&gt;
N_True_Test:&lt;br /&gt;
	INC	; replace our -1 to bring us up to a full power of 2 if we had enough True&lt;br /&gt;
	AND #!Next_Highest_Power_of_2&lt;br /&gt;
	BEQ .false&lt;br /&gt;
.true:&lt;br /&gt;
	; N Tests were True&lt;br /&gt;
.false:&lt;br /&gt;
	; Not exactly N tests were true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skip Dead Code ==&lt;br /&gt;
&#039;&#039;1-2 bytes / 2-3 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; If you need to skip just one byte of dead code (due to a hijack or whatever reason) you can use:&lt;br /&gt;
	NOP		; 1 byte, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; But if you need to skip two bytes the most efficient is:&lt;br /&gt;
; NOTE: many times WDM is used as a breakpoint for debugging so only do this as a final pass to speed up your code!&lt;br /&gt;
	WDM		; 2 bytes, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; Finally, if you need to skip a large amount of dead code you can use BRA/JMP instead&lt;br /&gt;
; JMP is as fast as BRA on the SNES CPU, but will be slightly slower on SA-1, and 1 cycle slower on SPC. So BRA is recommended&lt;br /&gt;
; (The extra byte used for JMP in this case doesn&#039;t matter)&lt;br /&gt;
	BRA +		; 2 bytes, 3 cycles&lt;br /&gt;
	; dead code&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check 3 Conditions ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; just the opcode as normal here (not counting the conditions), using any operand that&#039;s not immediate (#)&lt;br /&gt;
; it&#039;s worth noting that you can do up to 3 tests with a single opcode though!&lt;br /&gt;
; Just As A Reminder: the V &amp;amp; N flag are set by the *operand* to BIT not the result of the AND!&lt;br /&gt;
	BIT $00&lt;br /&gt;
	BMI .bit7_set&lt;br /&gt;
	BVS .bit6_set&lt;br /&gt;
	BNE .bit5_set	; assuming #$20 is in $00&lt;br /&gt;
.bit7_set:&lt;br /&gt;
.bit6_set:&lt;br /&gt;
.bit5_set:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Combine Carry Flag ==&lt;br /&gt;
&#039;&#039;4 bytes / 8 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (Flag, On Stack)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (Carry Flag)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; flag on stack via PHP (8-Bit A if this), etc.&lt;br /&gt;
	; code that alters Carry Flag&lt;br /&gt;
	PLA : BCS +&lt;br /&gt;
	LSR&lt;br /&gt;
+&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Transfer Carry Flag To Overflow Flag ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (Carry Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (Overflow Flag)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	ADC #$7F	; $7FFF for 16-bit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Convert hex to decimal (16 bits) - with tables ==&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; Y (lower four digits, one per nybble), !top_digit (ten-thousands digit)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pha&lt;br /&gt;
and #$FF00&lt;br /&gt;
xba&lt;br /&gt;
asl&lt;br /&gt;
tax&lt;br /&gt;
lda.l LowToDecimal+1,x&lt;br /&gt;
lsr #2&lt;br /&gt;
and #$0007&lt;br /&gt;
sta !top_digit&lt;br /&gt;
lda.l HighToDecimal,x&lt;br /&gt;
sta !tmp&lt;br /&gt;
pla&lt;br /&gt;
and #$00FF&lt;br /&gt;
asl&lt;br /&gt;
tax&lt;br /&gt;
lda.l LowToDecimal,x&lt;br /&gt;
and #$03FF&lt;br /&gt;
sed&lt;br /&gt;
adc !tmp&lt;br /&gt;
bcc +&lt;br /&gt;
inc !top_digit&lt;br /&gt;
+&lt;br /&gt;
cld&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
LowToDecimal:&lt;br /&gt;
!i = 0&lt;br /&gt;
while !i &amp;lt; 256&lt;br /&gt;
dw floor(!i*256/10000)*$400+$!i ; not a typo&lt;br /&gt;
!i #= !i+1&lt;br /&gt;
endwhile&lt;br /&gt;
HighToDecimal:&lt;br /&gt;
!i = 0&lt;br /&gt;
while !i &amp;lt; 256&lt;br /&gt;
dw $!{i}00&lt;br /&gt;
!i #= !i+1&lt;br /&gt;
endwhile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Convert hex to decimal (16 bits) - without tables ==&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; Y (lower four digits, one per nybble), !top_digit (ten-thousands digit)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rep #$30&lt;br /&gt;
sed&lt;br /&gt;
tax&lt;br /&gt;
stz !top_digit&lt;br /&gt;
&lt;br /&gt;
and #$0007 ; bottom three bits are easy&lt;br /&gt;
tay&lt;br /&gt;
&lt;br /&gt;
!bit = 16&lt;br /&gt;
while !bit &amp;lt;= 32768&lt;br /&gt;
txa&lt;br /&gt;
bit.w #!bit&lt;br /&gt;
beq +&lt;br /&gt;
tya&lt;br /&gt;
adc.w #$!bit ; not a typo&lt;br /&gt;
tay&lt;br /&gt;
if !bit == 8192&lt;br /&gt;
bcc +&lt;br /&gt;
inc !top_digit&lt;br /&gt;
endif&lt;br /&gt;
if !bit &amp;gt;= 16384&lt;br /&gt;
lda !top_digit&lt;br /&gt;
adc.w #!bit/10000&lt;br /&gt;
sta !top_digit&lt;br /&gt;
if !bit &amp;lt; 32768 ; carry isn&#039;t used after 32768&lt;br /&gt;
clc&lt;br /&gt;
endif&lt;br /&gt;
endif&lt;br /&gt;
+&lt;br /&gt;
!bit #= !bit*2&lt;br /&gt;
endwhile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASM]]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=15217</id>
		<title>Bithacks</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=15217"/>
		<updated>2024-04-28T19:33:47Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bithacks are optimization tricks that utilize information in bits and [https://en.wikipedia.org/wiki/Bit_manipulation bit manipulation]&lt;br /&gt;
to accomplish their tasks. Usually they work in a slightly non-obvious way, (the most famous being the [https://en.wikipedia.org/wiki/Fast_inverse_square_root fast inverse sqrt]), and bit manipulation in general is harder on the [[65c816]]. To that end, here is a collection of some useful tricks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note: cycle counts are intended to be a worst case measure.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also: [[Useful_Code_Snippets|Useful Code Snippets]]&lt;br /&gt;
&lt;br /&gt;
= Math Bithacks =&lt;br /&gt;
== Signed Division By 2 ==&lt;br /&gt;
&#039;&#039;7 bytes / 8 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
	BPL +&lt;br /&gt;
	ADC #$00&lt;br /&gt;
	+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: Rounds toward zero.&lt;br /&gt;
&lt;br /&gt;
== Arithmetic Shift Right ==&lt;br /&gt;
&#039;&#039;3 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: This is similar to division by 2, but rounds toward negative infinity.&lt;br /&gt;
&lt;br /&gt;
== Arithmetic Shift Right, multiple steps ==&lt;br /&gt;
&#039;&#039;6+n bytes / 6+2n cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; signed division by two, n times&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BIT.b #$80&amp;gt;&amp;gt;&amp;lt;n&amp;gt;&lt;br /&gt;
	BEQ ?positive&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?positive:&lt;br /&gt;
endmacro&lt;br /&gt;
&lt;br /&gt;
; -1 cycle and +n bytes, but must have N flag set before use&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	BMI ?negative&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BRA ?end&lt;br /&gt;
?negative:&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?end:&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value ==&lt;br /&gt;
&#039;&#039;5 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (N Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
macro abs()&lt;br /&gt;
	BPL ?plus&lt;br /&gt;
	EOR #$FF&lt;br /&gt;
	INC&lt;br /&gt;
?plus:		; only 3 cycles if branch taken&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value (SEC) ==&lt;br /&gt;
&#039;&#039;4 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (Carry Set)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; compared to the branching version this is 1 byte smaller&lt;br /&gt;
; it&#039;s either 2 cycles slower/faster depending on branch taken&lt;br /&gt;
	EOR #$7F&lt;br /&gt;
;	SEC		; the instant you add this in it becomes worse than the branching version&lt;br /&gt;
	SBC #$7F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Magnitude/Extents Check ==&lt;br /&gt;
&#039;&#039;~7 bytes / 12 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; asks &amp;quot;Is [A] on the zero-side of value [X] or the far side?&amp;quot;&lt;br /&gt;
; good for magnitude checks, smaller *AND* faster than alternatives&lt;br /&gt;
; NOTE: in the event that it is exactly [X] it will have that value at branch&lt;br /&gt;
; doesn&#039;t need to be an indexed CMP but is most useful this way&lt;br /&gt;
; this can be used to combine the BPL and BMI checks for both signs into one&lt;br /&gt;
	SEC : SBC Extents,x&lt;br /&gt;
	EOR Extents,x&lt;br /&gt;
	BMI .zero_side&lt;br /&gt;
.far_side:&lt;br /&gt;
	; do things&lt;br /&gt;
.zero_side:&lt;br /&gt;
	; do things&lt;br /&gt;
&lt;br /&gt;
Extents:&lt;br /&gt;
	db -$23, $23&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sign Extend ==&lt;br /&gt;
&#039;&#039;13 bytes / 18 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; 8bit value in $10&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	REP #$20&lt;br /&gt;
	LDA $10-1 ; load $10 into A high, and garbage in low&lt;br /&gt;
	AND #$FF00 ; discard garbage&lt;br /&gt;
	BPL +&lt;br /&gt;
	ORA #$00FF&lt;br /&gt;
	+&lt;br /&gt;
	XBA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clamp Signed (To Constants) ==&lt;br /&gt;
&#039;&#039;16 bytes/15 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; clamp signed value in A to [min,max] if min/max are signed constants&lt;br /&gt;
macro clamp_const(min,max)&lt;br /&gt;
	EOR #$80&lt;br /&gt;
	CMP #$80^&amp;lt;min&amp;gt; : BCS ?+&lt;br /&gt;
	LDA #$80^&amp;lt;min&amp;gt;&lt;br /&gt;
?+	CMP #$80^&amp;lt;max&amp;gt; : BCC ?+&lt;br /&gt;
	LDA #$80^&amp;lt;max&amp;gt;&lt;br /&gt;
?+	EOR #$80&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Misc. Tricks =&lt;br /&gt;
&amp;lt;small&amp;gt;As this list grows tricks here will be consolidated into their own sections. Clever optimization tricks that aren&#039;t necessarily what someone might personally call a &amp;quot;bithack&amp;quot; are okay here as well!&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== XCN ==&lt;br /&gt;
&#039;&#039;12 bytes / 16 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; eXchaNge Nibble without a LUT&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clear Low Byte of Accumulator ==&lt;br /&gt;
&#039;&#039;1 byte / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; &amp;quot;Trashes&amp;quot; A but clears low byte&lt;br /&gt;
	TDC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direction/Facing As Index ==&lt;br /&gt;
&#039;&#039;4 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Ever wonder why facing flags are 0=right and 1=left? This is why. It&#039;s incredibly cheap.&lt;br /&gt;
; The input here is specifically a signed speed, or similar value.&lt;br /&gt;
	ASL&lt;br /&gt;
	ROL&lt;br /&gt;
	AND #$01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check N Conditions True ==&lt;br /&gt;
&#039;&#039;n+7 bytes / 2n+7 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; You can test for multiple conditions being true (7 conditions true, at least 5 conditions, etc.) by simply using a counter and rounding to the next power of 2 and test if that bit is set.&lt;br /&gt;
; You can also test for &amp;quot;Less than N True&amp;quot;, &amp;quot;More than N&amp;quot;, etc. with variations.&lt;br /&gt;
; This is almost more a coding technique, but it&#039;s super helpful, so worth pointing out.&lt;br /&gt;
; It can allow you to re-arrange branches of code as independent blocks among other useful things.&lt;br /&gt;
; You can also use any RAM instead of A at a small cost.&lt;br /&gt;
&lt;br /&gt;
; Example Test For 5 True Conditions:&lt;br /&gt;
!Next_Highest_Power_of_2 = $08&lt;br /&gt;
!N_True_Target = $05&lt;br /&gt;
	LDA #!Next_Highest_Power_of_2!-!N_True_Target-1		; here we set up our rounding, the -1 isn&#039;t strictly necessary *most* of the time&lt;br /&gt;
	%TestSomeCondition()&lt;br /&gt;
	BCC +	; here we&#039;re going to say our test just returns carry set on true (but it could directly INC inside the code as well)&lt;br /&gt;
	INC&lt;br /&gt;
+&lt;br /&gt;
;	... repeat the above 5 times for different tests&lt;br /&gt;
&lt;br /&gt;
N_True_Test:&lt;br /&gt;
	INC	; replace our -1 to bring us up to a full power of 2 if we had enough True&lt;br /&gt;
	AND #!Next_Highest_Power_of_2&lt;br /&gt;
	BEQ .false&lt;br /&gt;
.true:&lt;br /&gt;
	; N Tests were True&lt;br /&gt;
.false:&lt;br /&gt;
	; Not exactly N tests were true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skip Dead Code ==&lt;br /&gt;
&#039;&#039;1-2 bytes / 2-3 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; If you need to skip just one byte of dead code (due to a hijack or whatever reason) you can use:&lt;br /&gt;
	NOP		; 1 byte, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; But if you need to skip two bytes the most efficient is:&lt;br /&gt;
; NOTE: many times WDM is used as a breakpoint for debugging so only do this as a final pass to speed up your code!&lt;br /&gt;
	WDM		; 2 bytes, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; Finally, if you need to skip a large amount of dead code you can use BRA/JMP instead&lt;br /&gt;
; JMP is as fast as BRA on the SNES CPU, but will be slightly slower on SA-1, and 1 cycle slower on SPC. So BRA is recommended&lt;br /&gt;
; (The extra byte used for JMP in this case doesn&#039;t matter)&lt;br /&gt;
	BRA +		; 2 bytes, 3 cycles&lt;br /&gt;
	; dead code&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check 3 Conditions ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; just the opcode as normal here (not counting the conditions), using any operand that&#039;s not immediate (#)&lt;br /&gt;
; it&#039;s worth noting that you can do up to 3 tests with a single opcode though!&lt;br /&gt;
; Just As A Reminder: the V &amp;amp; N flag are set by the *operand* to BIT not the result of the AND!&lt;br /&gt;
	BIT $00&lt;br /&gt;
	BMI .bit7_set&lt;br /&gt;
	BVS .bit6_set&lt;br /&gt;
	BNE .bit5_set	; assuming #$20 is in $00&lt;br /&gt;
.bit7_set:&lt;br /&gt;
.bit6_set:&lt;br /&gt;
.bit5_set:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Combine Carry Flag ==&lt;br /&gt;
&#039;&#039;4 bytes / 8 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (Flag, On Stack)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (Carry Flag)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; flag on stack via PHP (8-Bit A if this), etc.&lt;br /&gt;
	; code that alters Carry Flag&lt;br /&gt;
	PLA : BCS +&lt;br /&gt;
	LSR&lt;br /&gt;
+&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Transfer Carry Flag To Overflow Flag ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (Carry Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (Overflow Flag)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	ADC #$7F	; $7FFF for 16-bit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Convert hex to decimal (16 bits) - with tables ==&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; Y (lower four digits, one per nybble), !top_digit (ten-thousands digit)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pha&lt;br /&gt;
and #$FF00&lt;br /&gt;
xba&lt;br /&gt;
asl&lt;br /&gt;
tax&lt;br /&gt;
lda.l LowToDecimal+1,x&lt;br /&gt;
lsr #2&lt;br /&gt;
and #$0007&lt;br /&gt;
sta !top_digit&lt;br /&gt;
lda.l HighToDecimal,x&lt;br /&gt;
sta !tmp&lt;br /&gt;
pla&lt;br /&gt;
and #$00FF&lt;br /&gt;
asl&lt;br /&gt;
tax&lt;br /&gt;
lda.l LowToDecimal,x&lt;br /&gt;
and #$03FF&lt;br /&gt;
sed&lt;br /&gt;
adc !tmp&lt;br /&gt;
bcc +&lt;br /&gt;
inc !top_digit&lt;br /&gt;
+&lt;br /&gt;
cld&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
LowToDecimal:&lt;br /&gt;
!i = 0&lt;br /&gt;
while !i &amp;lt; 256&lt;br /&gt;
dw (!i*256/10000*$400)+$!i ; not a typo&lt;br /&gt;
!i #= !i+1&lt;br /&gt;
endwhile&lt;br /&gt;
HighToDecimal:&lt;br /&gt;
!i = 0&lt;br /&gt;
while !i &amp;lt; 256&lt;br /&gt;
dw $!{i}00&lt;br /&gt;
!i #= !i+1&lt;br /&gt;
endwhile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Convert hex to decimal (16 bits) - without tables ==&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; Y (lower four digits, one per nybble), !top_digit (ten-thousands digit)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rep #$30&lt;br /&gt;
sed&lt;br /&gt;
tax&lt;br /&gt;
stz !top_digit&lt;br /&gt;
&lt;br /&gt;
and #$0007 ; bottom three bits are easy&lt;br /&gt;
tay&lt;br /&gt;
&lt;br /&gt;
!bit = 16&lt;br /&gt;
while !bit &amp;lt;= 32768&lt;br /&gt;
txa&lt;br /&gt;
bit.w #!bit&lt;br /&gt;
beq +&lt;br /&gt;
tya&lt;br /&gt;
adc.w #$!bit ; not a typo&lt;br /&gt;
tay&lt;br /&gt;
if !bit == 8192&lt;br /&gt;
bcc +&lt;br /&gt;
inc !top_digit&lt;br /&gt;
endif&lt;br /&gt;
if !bit &amp;gt;= 16384 ; carry isn&#039;t used after 32768&lt;br /&gt;
lda !top_digit&lt;br /&gt;
adc.w #!bit/10000&lt;br /&gt;
sta !top_digit&lt;br /&gt;
if !bit &amp;lt; 32768&lt;br /&gt;
clc&lt;br /&gt;
endif&lt;br /&gt;
endif&lt;br /&gt;
+&lt;br /&gt;
!bit #= !bit*2&lt;br /&gt;
endwhile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASM]]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=15215</id>
		<title>Bithacks</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=15215"/>
		<updated>2024-04-24T21:02:02Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bithacks are optimization tricks that utilize information in bits and [https://en.wikipedia.org/wiki/Bit_manipulation bit manipulation]&lt;br /&gt;
to accomplish their tasks. Usually they work in a slightly non-obvious way, (the most famous being the [https://en.wikipedia.org/wiki/Fast_inverse_square_root fast inverse sqrt]), and bit manipulation in general is harder on the [[65c816]]. To that end, here is a collection of some useful tricks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note: cycle counts are intended to be a worst case measure.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also: [[Useful_Code_Snippets|Useful Code Snippets]]&lt;br /&gt;
&lt;br /&gt;
= Math Bithacks =&lt;br /&gt;
== Signed Division By 2 ==&lt;br /&gt;
&#039;&#039;7 bytes / 8 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
	BPL +&lt;br /&gt;
	ADC #$00&lt;br /&gt;
	+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: Rounds toward zero.&lt;br /&gt;
&lt;br /&gt;
== Arithmetic Shift Right ==&lt;br /&gt;
&#039;&#039;3 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: This is similar to division by 2, but rounds toward negative infinity.&lt;br /&gt;
&lt;br /&gt;
== Arithmetic Shift Right, multiple steps ==&lt;br /&gt;
&#039;&#039;6+n bytes / 6+2n cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; signed division by two, n times&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BIT.b #$80&amp;gt;&amp;gt;&amp;lt;n&amp;gt;&lt;br /&gt;
	BEQ ?positive&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?positive:&lt;br /&gt;
endmacro&lt;br /&gt;
&lt;br /&gt;
; -1 cycle and +n bytes, but must have N flag set before use&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	BMI ?negative&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BRA ?end&lt;br /&gt;
?negative:&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?end:&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value ==&lt;br /&gt;
&#039;&#039;5 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (N Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
macro abs()&lt;br /&gt;
	BPL ?plus&lt;br /&gt;
	EOR #$FF&lt;br /&gt;
	INC&lt;br /&gt;
?plus:		; only 3 cycles if branch taken&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value (SEC) ==&lt;br /&gt;
&#039;&#039;4 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (Carry Set)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; compared to the branching version this is 1 byte smaller&lt;br /&gt;
; it&#039;s either 2 cycles slower/faster depending on branch taken&lt;br /&gt;
	EOR #$7F&lt;br /&gt;
;	SEC		; the instant you add this in it becomes worse than the branching version&lt;br /&gt;
	SBC #$7F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Magnitude/Extents Check ==&lt;br /&gt;
&#039;&#039;~7 bytes / 12 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; asks &amp;quot;Is [A] on the zero-side of value [X] or the far side?&amp;quot;&lt;br /&gt;
; good for magnitude checks, smaller *AND* faster than alternatives&lt;br /&gt;
; NOTE: in the event that it is exactly [X] it will have that value at branch&lt;br /&gt;
; doesn&#039;t need to be an indexed CMP but is most useful this way&lt;br /&gt;
; this can be used to combine the BPL and BMI checks for both signs into one&lt;br /&gt;
	SEC : SBC Extents,x&lt;br /&gt;
	EOR Extents,x&lt;br /&gt;
	BMI .zero_side&lt;br /&gt;
.far_side:&lt;br /&gt;
	; do things&lt;br /&gt;
.zero_side:&lt;br /&gt;
	; do things&lt;br /&gt;
&lt;br /&gt;
Extents:&lt;br /&gt;
	db -$23, $23&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sign Extend ==&lt;br /&gt;
&#039;&#039;13 bytes / 18 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; 8bit value in $10&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	REP #$20&lt;br /&gt;
	LDA $10-1 ; load $10 into A high, and garbage in low&lt;br /&gt;
	AND #$FF00 ; discard garbage&lt;br /&gt;
	BPL +&lt;br /&gt;
	ORA #$00FF&lt;br /&gt;
	+&lt;br /&gt;
	XBA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clamp Signed (To Constants) ==&lt;br /&gt;
&#039;&#039;16 bytes/15 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; clamp signed value in A to [min,max] if min/max are signed constants&lt;br /&gt;
macro clamp_const(min,max)&lt;br /&gt;
	EOR #$80&lt;br /&gt;
	CMP #$80^&amp;lt;min&amp;gt; : BCS ?+&lt;br /&gt;
	LDA #$80^&amp;lt;min&amp;gt;&lt;br /&gt;
?+	CMP #$80^&amp;lt;max&amp;gt; : BCC ?+&lt;br /&gt;
	LDA #$80^&amp;lt;max&amp;gt;&lt;br /&gt;
?+	EOR #$80&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Misc. Tricks =&lt;br /&gt;
&amp;lt;small&amp;gt;As this list grows tricks here will be consolidated into their own sections. Clever optimization tricks that aren&#039;t necessarily what someone might personally call a &amp;quot;bithack&amp;quot; are okay here as well!&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== XCN ==&lt;br /&gt;
&#039;&#039;12 bytes / 16 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; eXchaNge Nibble without a LUT&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
	ASL : ADC #$00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clear Low Byte of Accumulator ==&lt;br /&gt;
&#039;&#039;1 byte / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; &amp;quot;Trashes&amp;quot; A but clears low byte&lt;br /&gt;
	TDC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direction/Facing As Index ==&lt;br /&gt;
&#039;&#039;4 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Ever wonder why facing flags are 0=right and 1=left? This is why. It&#039;s incredibly cheap.&lt;br /&gt;
; The input here is specifically a signed speed, or similar value.&lt;br /&gt;
	ASL&lt;br /&gt;
	ROL&lt;br /&gt;
	AND #$01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check N Conditions True ==&lt;br /&gt;
&#039;&#039;n+7 bytes / 2n+7 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; You can test for multiple conditions being true (7 conditions true, at least 5 conditions, etc.) by simply using a counter and rounding to the next power of 2 and test if that bit is set.&lt;br /&gt;
; You can also test for &amp;quot;Less than N True&amp;quot;, &amp;quot;More than N&amp;quot;, etc. with variations.&lt;br /&gt;
; This is almost more a coding technique, but it&#039;s super helpful, so worth pointing out.&lt;br /&gt;
; It can allow you to re-arrange branches of code as independent blocks among other useful things.&lt;br /&gt;
; You can also use any RAM instead of A at a small cost.&lt;br /&gt;
&lt;br /&gt;
; Example Test For 5 True Conditions:&lt;br /&gt;
!Next_Highest_Power_of_2 = $08&lt;br /&gt;
!N_True_Target = $05&lt;br /&gt;
	LDA #!Next_Highest_Power_of_2!-!N_True_Target-1		; here we set up our rounding, the -1 isn&#039;t strictly necessary *most* of the time&lt;br /&gt;
	%TestSomeCondition()&lt;br /&gt;
	BCC +	; here we&#039;re going to say our test just returns carry set on true (but it could directly INC inside the code as well)&lt;br /&gt;
	INC&lt;br /&gt;
+&lt;br /&gt;
;	... repeat the above 5 times for different tests&lt;br /&gt;
&lt;br /&gt;
N_True_Test:&lt;br /&gt;
	INC	; replace our -1 to bring us up to a full power of 2 if we had enough True&lt;br /&gt;
	AND #!Next_Highest_Power_of_2&lt;br /&gt;
	BEQ .false&lt;br /&gt;
.true:&lt;br /&gt;
	; N Tests were True&lt;br /&gt;
.false:&lt;br /&gt;
	; Not exactly N tests were true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skip Dead Code ==&lt;br /&gt;
&#039;&#039;1-2 bytes / 2-3 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; If you need to skip just one byte of dead code (due to a hijack or whatever reason) you can use:&lt;br /&gt;
	NOP		; 1 byte, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; But if you need to skip two bytes the most efficient is:&lt;br /&gt;
; NOTE: many times WDM is used as a breakpoint for debugging so only do this as a final pass to speed up your code!&lt;br /&gt;
	WDM		; 2 bytes, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; Finally, if you need to skip a large amount of dead code you can use BRA/JMP instead&lt;br /&gt;
; JMP is as fast as BRA on the SNES CPU, but will be slightly slower on SA-1, and 1 cycle slower on SPC. So BRA is recommended&lt;br /&gt;
; (The extra byte used for JMP in this case doesn&#039;t matter)&lt;br /&gt;
	BRA +		; 2 bytes, 3 cycles&lt;br /&gt;
	; dead code&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check 3 Conditions ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; just the opcode as normal here (not counting the conditions), using any operand that&#039;s not immediate (#)&lt;br /&gt;
; it&#039;s worth noting that you can do up to 3 tests with a single opcode though!&lt;br /&gt;
; Just As A Reminder: the V &amp;amp; N flag are set by the *operand* to BIT not the result of the AND!&lt;br /&gt;
	BIT $00&lt;br /&gt;
	BMI .bit7_set&lt;br /&gt;
	BVS .bit6_set&lt;br /&gt;
	BNE .bit5_set	; assuming #$20 is in $00&lt;br /&gt;
.bit7_set:&lt;br /&gt;
.bit6_set:&lt;br /&gt;
.bit5_set:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Combine Carry Flag ==&lt;br /&gt;
&#039;&#039;4 bytes / 8 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (Flag, On Stack)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (Carry Flag)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; flag on stack via PHP (8-Bit A if this), etc.&lt;br /&gt;
	; code that alters Carry Flag&lt;br /&gt;
	PLA : BCS +&lt;br /&gt;
	LSR&lt;br /&gt;
+&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Transfer Carry Flag To Overflow Flag ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (Carry Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (Overflow Flag)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	ADC #$7F	; $7FFF for 16-bit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Convert hex to decimal (16 bits) ==&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; Y (lower four digits, one per nybble), $00 (ten-thousands digit)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rep #$30&lt;br /&gt;
sed&lt;br /&gt;
tax&lt;br /&gt;
stz $00&lt;br /&gt;
&lt;br /&gt;
and #$0007 ; bottom three bits are easy&lt;br /&gt;
tay&lt;br /&gt;
&lt;br /&gt;
!bit = 16&lt;br /&gt;
while !bit &amp;lt;= 32768&lt;br /&gt;
txa&lt;br /&gt;
bit.w #!bit&lt;br /&gt;
beq +&lt;br /&gt;
tya&lt;br /&gt;
adc.w #$!bit ; not a typo&lt;br /&gt;
tay&lt;br /&gt;
if !bit == 8192&lt;br /&gt;
bcc +&lt;br /&gt;
inc $00&lt;br /&gt;
endif&lt;br /&gt;
if !bit &amp;gt;= 16384 ; carry isn&#039;t used after 32768&lt;br /&gt;
lda $00&lt;br /&gt;
adc.w #!bit/10000&lt;br /&gt;
sta $00&lt;br /&gt;
if !bit &amp;lt; 32768&lt;br /&gt;
clc&lt;br /&gt;
endif&lt;br /&gt;
endif&lt;br /&gt;
+&lt;br /&gt;
!bit #= !bit*2&lt;br /&gt;
endwhile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASM]]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Reduction&amp;diff=13505</id>
		<title>Reduction</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Reduction&amp;diff=13505"/>
		<updated>2023-12-29T14:21:20Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Reduction&#039;&#039;&#039; is Nintendo&#039;s (arguably poor) terminology for &amp;quot;shrink&amp;quot; (referring to shrinking things on the screen, i.e. modes 5, 6 and 7) and appears in the official Super Nintendo development manual.&lt;br /&gt;
&lt;br /&gt;
This note also appears in [[fullsnes]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
REPEATED EVERY 2-LINES. IF &amp;quot;1&amp;quot; IS WRITTEN, THE OBJ SEEMS REDUCED&lt;br /&gt;
          HALF VERTICALLY IN APPEARANCE.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== See Also ===&lt;br /&gt;
* [[Bit Rate Reduction]]&lt;br /&gt;
&lt;br /&gt;
=== Reference ===&lt;br /&gt;
* Chapter 5. [https://archive.org/details/SNESDevManual/book1/page/n65 page 2-5-1 of Book I]&lt;br /&gt;
&lt;br /&gt;
[[Category:Video]]&lt;br /&gt;
[[Category:Official Jargon]]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=2584</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=2584"/>
		<updated>2023-04-27T09:07:14Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__ __NOTOC__ {{Select Language|Main_Page}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-left&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-tfa-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;Welcome to SnesLab!&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 4px 8px;&amp;quot;&amp;gt;&#039;&#039;&#039;SnesLab&#039;&#039;&#039; is your essential laboratory for all SNES activities, including but not restricted to &#039;&#039;&#039;retrogaming&#039;&#039;&#039;, &#039;&#039;&#039;ROM hacking&#039;&#039;&#039;, &#039;&#039;&#039;hardware modding&#039;&#039;&#039;, &#039;&#039;&#039;technical documentation&#039;&#039;&#039;, &#039;&#039;&#039;handy tutorials&#039;&#039;&#039; and much more!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-right&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-itn-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;News&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 0 8px;&amp;quot;&amp;gt;{{News}}&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;256px&amp;quot; heights=&amp;quot;224px&amp;quot; mode=&amp;quot;traditional&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
File:PMCEntry NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:SecretofMana NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:Zelda3editor NoWatermark.png|&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Learn&amp;quot;&amp;gt;Learn&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SnesLab has several tutorials made for all kinds of users. This is the perfect place for learning something about the Super Nintendo. While we have emphasis in modding &#039;&#039;[[Super Mario World]]&#039;&#039; and making levels for &#039;&#039;Super Mario Maker&#039;&#039; we welcome &#039;&#039;&#039;every type of hacker that enjoys modding classic games&#039;&#039;&#039;, and are interested to learn about said hacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Interact&amp;quot;&amp;gt;Interact&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our laboratory is full of &#039;&#039;&#039;fun challenges&#039;&#039;&#039;, &#039;&#039;&#039;events&#039;&#039;&#039;, and all around share our &#039;&#039;&#039;big projects&#039;&#039;&#039; to the community. SnesLab is completely self-sustaining, that is, we promote at first place a good ambience and opportunity to everyone start learning and have a nice stay on the site, regardless if you are still getting started or if you are an experienced ROM hacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Have_Fun21&amp;quot;&amp;gt;Have Fun!&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More important than anything, &#039;&#039;&#039;SnesLab&#039;&#039;&#039; targets the entire SNES community public and we&#039;re always open to anyone join us at any moment! Consider &#039;&#039;&#039;joining our Discord&#039;&#039;&#039; as well to really interact with the userbase! https://discord.gg/KwSZM6a&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;And remember, have fun! We hope you enjoy your stay!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;columns-4&amp;quot; style=&amp;quot;padding: 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Articles&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[SA-1]]&lt;br /&gt;
* [[HDMA]]&lt;br /&gt;
* [[SNES&#039;s PPU Registers]]&lt;br /&gt;
* [[WidescreenRomHacking|Widescreen SNES]]&lt;br /&gt;
* [[Dynamic Z]]&lt;br /&gt;
* [[SnesLab:Useful_Links|Useful Links]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Tools&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[List of SNES ROM hacking tools]]&lt;br /&gt;
* [[Lunar Magic]]&lt;br /&gt;
* [[Dyzen Sprite Maker]]&lt;br /&gt;
* [[UberASM Tool]]&lt;br /&gt;
* [[SPC Studio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Site Statistics&amp;lt;/b&amp;gt;&lt;br /&gt;
* Total articles: &#039;&#039;&#039;{{NUMBEROFARTICLES}}&#039;&#039;&#039; ([[Special:AllPages|view]])&lt;br /&gt;
* Total edits: &#039;&#039;&#039;{{NUMBEROFEDITS}}&#039;&#039;&#039;&lt;br /&gt;
* Total uploaded files: &#039;&#039;&#039;{{NUMBEROFFILES}}&#039;&#039;&#039;&lt;br /&gt;
* Active editors: &#039;&#039;&#039;{{NUMBEROFACTIVEUSERS}}&#039;&#039;&#039; ([[Special:ActiveUsers|view]])&lt;br /&gt;
* Users: &#039;&#039;&#039;{{NUMBEROFUSERS}}&#039;&#039;&#039; ([[Special:ListUsers|view]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Online Users&amp;lt;/b&amp;gt;&lt;br /&gt;
{{:Special:WhosOnline}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Super_Mario_World_2_-_Yoshi%27s_Island&amp;diff=2577</id>
		<title>Super Mario World 2 - Yoshi&#039;s Island</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Super_Mario_World_2_-_Yoshi%27s_Island&amp;diff=2577"/>
		<updated>2023-04-27T07:12:46Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: Alcaro moved page Super Mario World 2 - Yoshi&amp;#039;s Island to Super Mario World 2: Yoshi&amp;#039;s Island: delete duplicate article; use official title (source: https://archive.org/details/NintendoPower1988-2004/Nintendo%20Power%20Issue%20077%20%28October%201995%29/page/n85/mode/2up )&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Super Mario World 2: Yoshi&#039;s Island]]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Super_Mario_World_2:_Yoshi%27s_Island&amp;diff=2576</id>
		<title>Super Mario World 2: Yoshi&#039;s Island</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Super_Mario_World_2:_Yoshi%27s_Island&amp;diff=2576"/>
		<updated>2023-04-27T07:12:46Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: Alcaro moved page Super Mario World 2 - Yoshi&amp;#039;s Island to Super Mario World 2: Yoshi&amp;#039;s Island: delete duplicate article; use official title (source: https://archive.org/details/NintendoPower1988-2004/Nintendo%20Power%20Issue%20077%20%28October%201995%29/page/n85/mode/2up )&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:{{#setmainimage:SMW2YI.jpg}}|300px|thumb|right|Official Artwork]]&#039;&#039;&#039;Super Mario World 2: Yoshi&#039;s Island&#039;&#039;&#039; (sometimes referred to simply as &#039;&#039;Yoshi&#039;s Island&#039;&#039;) is a 2D platform game for the [[Super Nintendo]], developed by Nintendo EAD. The game is the prequel to [[Super Mario World]] and chronologically the first in the Mario franchise. The game is notable for introducing a time-based health system rather than hit points, an anomaly to what many platform games typically did in this game&#039;s time period. Rather than relying on powerful pre-rendered graphics as its contemporary, [[Donkey Kong Country]] did, &#039;&#039;&#039;Super Mario World 2: Yoshi&#039;s Island&#039;&#039;&#039; employs a very distinct, stylized arts and crafts style to stand on its own. The game makes use of the Super FX2 graphics chip (one of only four commercially-released SNES games to do so), which allows for larger, more detailed sprites and more advanced effects that emulate 3D space.&lt;br /&gt;
&lt;br /&gt;
== Hacking Tools ==&lt;br /&gt;
=== Standard ===&lt;br /&gt;
==== Golden Egg ====&lt;br /&gt;
&#039;&#039;Main Article: [[Golden Egg]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Golden Egg&#039;&#039;&#039; made by Romi is the main level editor of the game, therefore the basic and essential tool. Still in beta, it allows editing objects, sprites, header settings (tileset, music, etc.), palettes, screen exits and much more.&lt;br /&gt;
==== YI Entrance Editor ====&lt;br /&gt;
&#039;&#039;Main Article: [[YI Entrance Editor]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YI Entrance Editor&#039;&#039;&#039; is a pack of 2 tools made by Romi. The first one edits the start position of Yoshi in every level, while the second one edits the midway entrances (the position where you start after you collect a midway ring in-game), both features that Golden Egg lacks. The latter is currently deprecated by [https://www.smwcentral.net/?p=section&amp;amp;a=details&amp;amp;id=14709 Raidenthequick&#039;s Better Middle Ring ASM patch].&lt;br /&gt;
==== Ycompress ====&lt;br /&gt;
&#039;&#039;Main Article: [[Ycompress]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ycompress&#039;&#039;&#039; is a tool made by FuSoYa that decompress and dump most of the graphics in Yoshi&#039;s Island, so that they can be modified by a graphic editor. It can then be used to recompress and insert the graphics back into the ROM.&lt;br /&gt;
==== Yoshi&#039;s Island Level Tool ====&lt;br /&gt;
&#039;&#039;Main Article: [[Yoshi&#039;s Island Level Tool]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Yoshi&#039;s Island Level Tool&#039;&#039;&#039; is a tool made by FURiOUS that can be used to export and import level data and entrances from/to any rom (another lacking feature of Golden Egg). It can be also used to apply [[Asar]]&#039;s patches.&lt;br /&gt;
==== BTD6_maker&#039;s YI Text Editor ====&lt;br /&gt;
&#039;&#039;Main Article: [[BTD6_maker&#039;s YI Text Editor]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BTD6_maker&#039;s YI Text Editor&#039;&#039;&#039; (also known as &#039;&#039;BYTE&#039;&#039;) is is a text editor written in Python made by BTD6_maker, and it&#039;s used to edit various text in the game, such as level names and message boxes. The difference between this and Y.I.P.E.S. (a deprecated text editor) is that the latter may occasionally overwrite important data, which sometimes corrupt the level data.&lt;br /&gt;
==== Sprite Set Editor ====&lt;br /&gt;
&#039;&#039;&#039;Yoshi&#039;s Island Sprite Set Editor&#039;&#039;&#039; (also known as &#039;&#039;YI Sprite Set Editor&#039;&#039; or just &#039;&#039;Sprite Set Editor&#039;&#039;) is a tool made by Kipernal that lets you edit, as the name suggests, the set of sprites used by the game, allowing you to replace existing sets with new combinations of sprites. Even being a standard tool, it has some crashing bugs and it&#039;s tedious to use because their listing system is in decimal (instead of hexadecimal).&lt;br /&gt;
==== AddMusicY ====&lt;br /&gt;
&#039;&#039;&#039;AddMusicY&#039;&#039;&#039; is a tool made by Jimmy which is used to insert custom music into a Yoshi&#039;s Island ROM. Due to the lack of flexibility of the YI ROM, this tool only replaces the existing songs, rather than adding new ones.&lt;br /&gt;
&lt;br /&gt;
=== Deprecated ===&lt;br /&gt;
==== EggVine ====&lt;br /&gt;
EggVine was the first editor for Yoshi&#039;s Island, and was made by Squash Monster (and later improved by Yoshis Fan). It was known for crashing a lot, and for lacking graphical display, but other than that the tool was decent and several hacks were finished by using this tool. It was obsoleted by Golden Egg.&lt;br /&gt;
==== Y.I.P.E.S. ====&lt;br /&gt;
&#039;&#039;&#039;Yoshi&#039;s Island Phrase Editing System&#039;&#039;&#039;, usually known as &#039;&#039;Y.I.P.E.S.&#039;&#039; (or just &#039;&#039;YIPES&#039;&#039;) was the first text editor for Yoshi&#039;s Island, made by Kipernal. The tool is very intuitive and has a good user interface with graphical display, but at the same time it isn&#039;t safe to use, because it may ocasionally overwrite level data. It was obsoleted by BTD6_maker&#039;s YI Text Editor.&lt;br /&gt;
==== Title Screen Editor ====&lt;br /&gt;
&#039;&#039;&#039;Yoshi&#039;s Island Title Screen Editor&#039;&#039;&#039; (or just &#039;&#039;Title Screen Editor&#039;&#039;) is a tool made by Kipernal, which lets you edit the title screen island sprites. It&#039;s a very buggy tool (it crashes a lot and most of the time it doesn&#039;t work) and it has no practical use.&lt;br /&gt;
=== Beta/Unfinished ===&lt;br /&gt;
==== Pastel ====&lt;br /&gt;
&#039;&#039;&#039;Pastel&#039;&#039;&#039; is a beta tool written in Python 2.7 by Lui37, that can be used to edit the palette sets in the game. Despite being useful, it has at least [https://smwc.me/1446056 one crashing bug] that corrupts the rom, and one that crashes the tool.&lt;br /&gt;
==== Overworld Editor ====&lt;br /&gt;
&#039;&#039;&#039;Yoshi&#039;s Island Overworld Editor&#039;&#039;&#039; (or just &#039;&#039;Overworld Editor&#039;&#039;) is a beta tool made by tehaxor69 which lets you edit the tilemaps and sprites of the overworld (the level selection screen, specifically). Despite the tilemap editing works, the tool is unfinished and unpolished so it&#039;s hard to use (bad user interface and functions and lack of core features).&lt;br /&gt;
==== Golden EggVine ====&lt;br /&gt;
&#039;&#039;&#039;Golden EggVine&#039;&#039;&#039; is a unfinished level editor, started by Yoshis Fan and default0. It&#039;s presumable it was going to be a kind of blend of Golden Egg and EggVine.&lt;br /&gt;
==== YoshiOmelette ====&lt;br /&gt;
&#039;&#039;&#039;YoshiOmelette&#039;&#039;&#039; is a unfinished level editor, started by shibbo.&lt;br /&gt;
&lt;br /&gt;
== Notable ROM Hacks ==&lt;br /&gt;
=== SMW2+ ===&lt;br /&gt;
=== SMW2+2 ===&lt;br /&gt;
=== NEW! SMW2 Yoshi&#039;s Island ===&lt;br /&gt;
=== Kamek&#039;s Revenge ===&lt;br /&gt;
=== Yoshi&#039;s Highland ===&lt;br /&gt;
== ASM Patches ==&lt;br /&gt;
[https://www.smwcentral.net/?p=section&amp;amp;s=yipatches List of Yoshi&#039;s Island ASM patches]&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
== Technical Information ==&lt;br /&gt;
=== Special Chips ===&lt;br /&gt;
==== SuperFX 2 ====&lt;br /&gt;
&#039;&#039;See also: [[Super FX]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Memory Maps ===&lt;br /&gt;
==== WRAM ====&lt;br /&gt;
The Super Nintendo Entertainment System has 128kb of system RAM (aka WRAM) that every game can access, spanning from $7E0000~$7FFFFF. [https://github.com/Raidenthequick/yoshisisland-disassembly/wiki/WRAM-Map This map] explains what each address represents in Yoshi&#039;s Island mostly in standard gameplay gamemode $0F. In Yoshi&#039;s Island in particular, since it has the Super FX enhancement chip, much of the game&#039;s memory is stored in cartridge RAM instead. This is why there is so much free WRAM in this game. Nonetheless, there are still some pretty important pieces of data stored here.&lt;br /&gt;
==== CARTRAM/SRAM ====&lt;br /&gt;
Yoshi&#039;s Island has 32KB of Save RAM, spanning from $700000~$707FFF. [https://github.com/Raidenthequick/yoshisisland-disassembly/wiki/SRAM-Map This map] explains what each address represents in standard gameplay gamemode $0F. The reason so much important stuff is stored here is because the Super FX can only access cartridge RAM, not SNES system RAM. Note that other gamemodes may use these addresses for completely different purposes.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
[https://github.com/Raidenthequick/yoshisisland-disassembly Yoshi&#039;s Island Dissasembly, by Raidenthequick]&lt;br /&gt;
[[Category:Games]] [[Category:Yoshi&#039;s Island]]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=2205</id>
		<title>Bithacks</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=2205"/>
		<updated>2022-05-26T22:10:47Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: put the more likely one at top; put ASR beside ASR multi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bithacks are optimization tricks that utilize information in bits and [https://en.wikipedia.org/wiki/Bit_manipulation bit manipulation]&lt;br /&gt;
to accomplish their tasks. Usually they work in a slightly non-obvious way, (the most famous being the [https://en.wikipedia.org/wiki/Fast_inverse_square_root fast inverse sqrt]), and bit manipulation in general is harder on the 65c816. To that end here is a collection of some useful tricks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note: cycle counts are intended to be a worst case measure.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also: [[Useful_Code_Snippets|Useful Code Snippets]]&lt;br /&gt;
&lt;br /&gt;
= Math Bithacks =&lt;br /&gt;
== Signed Division By 2 ==&lt;br /&gt;
&#039;&#039;7 bytes / 8 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
	BPL +&lt;br /&gt;
	ADC #$00&lt;br /&gt;
	+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: Rounds toward zero.&lt;br /&gt;
&lt;br /&gt;
== Arithmetic Shift Right ==&lt;br /&gt;
&#039;&#039;3 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: This is similar to division by 2, but rounds toward negative infinity.&lt;br /&gt;
&lt;br /&gt;
== Arithmetic Shift Right, multiple steps ==&lt;br /&gt;
&#039;&#039;6+n bytes / 6+2n cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; signed division by two, n times&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BIT.b #$80&amp;gt;&amp;gt;&amp;lt;n&amp;gt;&lt;br /&gt;
	BEQ ?positive&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?positive:&lt;br /&gt;
endmacro&lt;br /&gt;
&lt;br /&gt;
; -1 cycle and +n bytes, but must have N flag set before use&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	BMI ?negative&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BRA ?end&lt;br /&gt;
?negative:&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?end:&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value ==&lt;br /&gt;
&#039;&#039;5 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (N Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
macro abs()&lt;br /&gt;
	BPL ?plus&lt;br /&gt;
	EOR #$FF&lt;br /&gt;
	INC&lt;br /&gt;
?plus:		; only 3 cycles if branch taken&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value (SEC) ==&lt;br /&gt;
&#039;&#039;4 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (Carry Set)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; compared to the branching version this is 1 byte smaller&lt;br /&gt;
; it&#039;s either 2 cycles slower/faster depending on branch taken&lt;br /&gt;
	EOR #$7F&lt;br /&gt;
;	SEC		; the instant you add this in it becomes worse than the branching version&lt;br /&gt;
	SBC #$7F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Magnitude/Extents Check ==&lt;br /&gt;
&#039;&#039;~7 bytes / 12 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; asks &amp;quot;Is [A] on the zero-side of value [X] or the far side?&amp;quot;&lt;br /&gt;
; good for magnitude checks, smaller *AND* faster than alternatives&lt;br /&gt;
; NOTE: in the event that it is exactly [X] it will have that value at branch&lt;br /&gt;
; doesn&#039;t need to be an indexed CMP but is most useful this way&lt;br /&gt;
; this can be used to combine the BPL and BMI checks for both signs into one&lt;br /&gt;
	SEC : SBC Extents,x&lt;br /&gt;
	EOR Extents,x&lt;br /&gt;
	BMI .zero_side&lt;br /&gt;
.far_side:&lt;br /&gt;
	; do things&lt;br /&gt;
.zero_side:&lt;br /&gt;
	; do things&lt;br /&gt;
&lt;br /&gt;
Extents:&lt;br /&gt;
	db -$23, $23&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sign Extend ==&lt;br /&gt;
&#039;&#039;13 bytes / 18 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; 8bit value in $10&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	REP #$20&lt;br /&gt;
	LDA $10-1 ; load $10 into A high, and garbage in low&lt;br /&gt;
	AND #$FF00 ; discard garbage&lt;br /&gt;
	BPL +&lt;br /&gt;
	ORA #$00FF&lt;br /&gt;
	+&lt;br /&gt;
	XBA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Misc. Tricks =&lt;br /&gt;
&amp;lt;small&amp;gt;As this list grows tricks here will be consolidated into their own sections. Clever optimization tricks that aren&#039;t necessarily what someone might personally call a &amp;quot;bithack&amp;quot; are okay here as well!&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clear Low Byte of Accumulator ==&lt;br /&gt;
&#039;&#039;1 byte / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; &amp;quot;Trashes&amp;quot; A but clears low byte&lt;br /&gt;
	TDC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direction/Facing As Index ==&lt;br /&gt;
&#039;&#039;4 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Ever wonder why facing flags are 0=right and 1=left? This is why. It&#039;s incredibly cheap.&lt;br /&gt;
; The input here is specifically a signed speed, or similar value.&lt;br /&gt;
	ASL&lt;br /&gt;
	ROL&lt;br /&gt;
	AND #$01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check N Conditions True ==&lt;br /&gt;
&#039;&#039;n+7 bytes / 2n+7 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; You can test for multiple conditions being true (7 conditions true, at least 5 conditions, etc.) by simply using a counter and rounding to the next power of 2 and test if that bit is set.&lt;br /&gt;
; You can also test for &amp;quot;Less than N True&amp;quot;, &amp;quot;More than N&amp;quot;, etc. with variations.&lt;br /&gt;
; This is almost more a coding technique, but it&#039;s super helpful, so worth pointing out.&lt;br /&gt;
; It can allow you to re-arrange branches of code as independent blocks among other useful things.&lt;br /&gt;
; You can also use any RAM instead of A at a small cost.&lt;br /&gt;
&lt;br /&gt;
; Example Test For 5 True Conditions:&lt;br /&gt;
!Next_Highest_Power_of_2 = $08&lt;br /&gt;
!N_True_Target = $05&lt;br /&gt;
	LDA #!Next_Highest_Power_of_2!-!N_True_Target-1		; here we set up our rounding, the -1 isn&#039;t strictly necessary *most* of the time&lt;br /&gt;
	%TestSomeCondition()&lt;br /&gt;
	BCC +	; here we&#039;re going to say our test just returns carry set on true (but it could directly INC inside the code as well)&lt;br /&gt;
	INC&lt;br /&gt;
+&lt;br /&gt;
;	... repeat the above 5 times for different tests&lt;br /&gt;
&lt;br /&gt;
N_True_Test:&lt;br /&gt;
	INC	; replace our -1 to bring us up to a full power of 2 if we had enough True&lt;br /&gt;
	AND #!Next_Highest_Power_of_2&lt;br /&gt;
	BEQ .false&lt;br /&gt;
.true:&lt;br /&gt;
	; N Tests were True&lt;br /&gt;
.false:&lt;br /&gt;
	; Not exactly N tests were true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skip Dead Code ==&lt;br /&gt;
&#039;&#039;1-2 bytes / 2-3 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; If you need to skip one byte of dead code (due to a hijack or whatever reason) you can use:&lt;br /&gt;
	NOP		; 1 byte, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; But if you need to skip just 2 bytes the most efficient is:&lt;br /&gt;
; NOTE: many times WDM is used as a breakpoint for debugging so only do this as a final pass to speed up your code!&lt;br /&gt;
	WDM		; 2 bytes, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; Finally, if you need to skip a large amount of dead code you can use BRA/JMP instead&lt;br /&gt;
; JMP is as fast as BRA on the SNES CPU, but will be slightly slower on SA-1, and 1 cycle slower on SPC. So BRA is recommended&lt;br /&gt;
; (The extra byte used for JMP in this case doesn&#039;t matter)&lt;br /&gt;
	BRA +		; 2 bytes, 3 cycles&lt;br /&gt;
	; dead code&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check 3 Conditions ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; just the opcode as normal here (not counting the conditions), using any operand that&#039;s not immediate (#)&lt;br /&gt;
; it&#039;s worth noting that you can do up to 3 tests with a single opcode though!&lt;br /&gt;
; Just As A Reminder: the V &amp;amp; N flag are set by the *operand* to BIT not the result of the AND!&lt;br /&gt;
	BIT $00&lt;br /&gt;
	BMI .bit7_set&lt;br /&gt;
	BVS .bit6_set&lt;br /&gt;
	BNE .bit5_set	; assuming #$20 is in $00&lt;br /&gt;
.bit7_set:&lt;br /&gt;
.bit6_set:&lt;br /&gt;
.bit5_set:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=2204</id>
		<title>Bithacks</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=2204"/>
		<updated>2022-05-26T22:02:47Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: /* True Signed Division By 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bithacks are optimization tricks that utilize information in bits and [https://en.wikipedia.org/wiki/Bit_manipulation bit manipulation]&lt;br /&gt;
to accomplish their tasks. Usually they work in a slightly non-obvious way, (the most famous being the [https://en.wikipedia.org/wiki/Fast_inverse_square_root fast inverse sqrt]), and bit manipulation in general is harder on the 65c816. To that end here is a collection of some useful tricks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note: cycle counts are intended to be a worst case measure.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also: [[Useful_Code_Snippets|Useful Code Snippets]]&lt;br /&gt;
&lt;br /&gt;
= Math Bithacks =&lt;br /&gt;
== Arithmetic Shift Right ==&lt;br /&gt;
&#039;&#039;3 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: This is the same as division by 2, rounding toward negative infinity.&lt;br /&gt;
&lt;br /&gt;
== Signed Division By 2 ==&lt;br /&gt;
&#039;&#039;7 bytes / 8 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
	BPL +&lt;br /&gt;
	ADC #$00&lt;br /&gt;
	+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: This one rounds toward zero.&lt;br /&gt;
&lt;br /&gt;
== Arithmetic Shift Right, multiple steps ==&lt;br /&gt;
&#039;&#039;6+n bytes / 6+2n cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; signed division by two, n times&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BIT.b #$80&amp;gt;&amp;gt;&amp;lt;n&amp;gt;&lt;br /&gt;
	BEQ ?positive&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?positive:&lt;br /&gt;
endmacro&lt;br /&gt;
&lt;br /&gt;
; -1 cycle and +n bytes, but must have N flag set before use&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	BMI ?negative&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BRA ?end&lt;br /&gt;
?negative:&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?end:&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value ==&lt;br /&gt;
&#039;&#039;5 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (N Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
macro abs()&lt;br /&gt;
	BPL ?plus&lt;br /&gt;
	EOR #$FF&lt;br /&gt;
	INC&lt;br /&gt;
?plus:		; only 3 cycles if branch taken&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value (SEC) ==&lt;br /&gt;
&#039;&#039;4 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (Carry Set)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; compared to the branching version this is 1 byte smaller&lt;br /&gt;
; it&#039;s either 2 cycles slower/faster depending on branch taken&lt;br /&gt;
	EOR #$7F&lt;br /&gt;
;	SEC		; the instant you add this in it becomes worse than the branching version&lt;br /&gt;
	SBC #$7F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Magnitude/Extents Check ==&lt;br /&gt;
&#039;&#039;~7 bytes / 12 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; asks &amp;quot;Is [A] on the zero-side of value [X] or the far side?&amp;quot;&lt;br /&gt;
; good for magnitude checks, smaller *AND* faster than alternatives&lt;br /&gt;
; NOTE: in the event that it is exactly [X] it will have that value at branch&lt;br /&gt;
; doesn&#039;t need to be an indexed CMP but is most useful this way&lt;br /&gt;
; this can be used to combine the BPL and BMI checks for both signs into one&lt;br /&gt;
	SEC : SBC Extents,x&lt;br /&gt;
	EOR Extents,x&lt;br /&gt;
	BMI .zero_side&lt;br /&gt;
.far_side:&lt;br /&gt;
	; do things&lt;br /&gt;
.zero_side:&lt;br /&gt;
	; do things&lt;br /&gt;
&lt;br /&gt;
Extents:&lt;br /&gt;
	db -$23, $23&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sign Extend ==&lt;br /&gt;
&#039;&#039;13 bytes / 18 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; 8bit value in $10&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	REP #$20&lt;br /&gt;
	LDA $10-1 ; load $10 into A high, and garbage in low&lt;br /&gt;
	AND #$FF00 ; discard garbage&lt;br /&gt;
	BPL +&lt;br /&gt;
	ORA #$00FF&lt;br /&gt;
	+&lt;br /&gt;
	XBA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Misc. Tricks =&lt;br /&gt;
&amp;lt;small&amp;gt;As this list grows tricks here will be consolidated into their own sections. Clever optimization tricks that aren&#039;t necessarily what someone might personally call a &amp;quot;bithack&amp;quot; are okay here as well!&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clear Low Byte of Accumulator ==&lt;br /&gt;
&#039;&#039;1 byte / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; &amp;quot;Trashes&amp;quot; A but clears low byte&lt;br /&gt;
	TDC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direction/Facing As Index ==&lt;br /&gt;
&#039;&#039;4 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Ever wonder why facing flags are 0=right and 1=left? This is why. It&#039;s incredibly cheap.&lt;br /&gt;
; The input here is specifically a signed speed, or similar value.&lt;br /&gt;
	ASL&lt;br /&gt;
	ROL&lt;br /&gt;
	AND #$01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check N Conditions True ==&lt;br /&gt;
&#039;&#039;n+7 bytes / 2n+7 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; You can test for multiple conditions being true (7 conditions true, at least 5 conditions, etc.) by simply using a counter and rounding to the next power of 2 and test if that bit is set.&lt;br /&gt;
; You can also test for &amp;quot;Less than N True&amp;quot;, &amp;quot;More than N&amp;quot;, etc. with variations.&lt;br /&gt;
; This is almost more a coding technique, but it&#039;s super helpful, so worth pointing out.&lt;br /&gt;
; It can allow you to re-arrange branches of code as independent blocks among other useful things.&lt;br /&gt;
; You can also use any RAM instead of A at a small cost.&lt;br /&gt;
&lt;br /&gt;
; Example Test For 5 True Conditions:&lt;br /&gt;
!Next_Highest_Power_of_2 = $08&lt;br /&gt;
!N_True_Target = $05&lt;br /&gt;
	LDA #!Next_Highest_Power_of_2!-!N_True_Target-1		; here we set up our rounding, the -1 isn&#039;t strictly necessary *most* of the time&lt;br /&gt;
	%TestSomeCondition()&lt;br /&gt;
	BCC +	; here we&#039;re going to say our test just returns carry set on true (but it could directly INC inside the code as well)&lt;br /&gt;
	INC&lt;br /&gt;
+&lt;br /&gt;
;	... repeat the above 5 times for different tests&lt;br /&gt;
&lt;br /&gt;
N_True_Test:&lt;br /&gt;
	INC	; replace our -1 to bring us up to a full power of 2 if we had enough True&lt;br /&gt;
	AND #!Next_Highest_Power_of_2&lt;br /&gt;
	BEQ .false&lt;br /&gt;
.true:&lt;br /&gt;
	; N Tests were True&lt;br /&gt;
.false:&lt;br /&gt;
	; Not exactly N tests were true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skip Dead Code ==&lt;br /&gt;
&#039;&#039;1-2 bytes / 2-3 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; If you need to skip one byte of dead code (due to a hijack or whatever reason) you can use:&lt;br /&gt;
	NOP		; 1 byte, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; But if you need to skip just 2 bytes the most efficient is:&lt;br /&gt;
; NOTE: many times WDM is used as a breakpoint for debugging so only do this as a final pass to speed up your code!&lt;br /&gt;
	WDM		; 2 bytes, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; Finally, if you need to skip a large amount of dead code you can use BRA/JMP instead&lt;br /&gt;
; JMP is as fast as BRA on the SNES CPU, but will be slightly slower on SA-1, and 1 cycle slower on SPC. So BRA is recommended&lt;br /&gt;
; (The extra byte used for JMP in this case doesn&#039;t matter)&lt;br /&gt;
	BRA +		; 2 bytes, 3 cycles&lt;br /&gt;
	; dead code&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check 3 Conditions ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; just the opcode as normal here (not counting the conditions), using any operand that&#039;s not immediate (#)&lt;br /&gt;
; it&#039;s worth noting that you can do up to 3 tests with a single opcode though!&lt;br /&gt;
; Just As A Reminder: the V &amp;amp; N flag are set by the *operand* to BIT not the result of the AND!&lt;br /&gt;
	BIT $00&lt;br /&gt;
	BMI .bit7_set&lt;br /&gt;
	BVS .bit6_set&lt;br /&gt;
	BNE .bit5_set	; assuming #$20 is in $00&lt;br /&gt;
.bit7_set:&lt;br /&gt;
.bit6_set:&lt;br /&gt;
.bit5_set:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=2203</id>
		<title>Bithacks</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=2203"/>
		<updated>2022-05-26T21:54:54Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bithacks are optimization tricks that utilize information in bits and [https://en.wikipedia.org/wiki/Bit_manipulation bit manipulation]&lt;br /&gt;
to accomplish their tasks. Usually they work in a slightly non-obvious way, (the most famous being the [https://en.wikipedia.org/wiki/Fast_inverse_square_root fast inverse sqrt]), and bit manipulation in general is harder on the 65c816. To that end here is a collection of some useful tricks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note: cycle counts are intended to be a worst case measure.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also: [[Useful_Code_Snippets|Useful Code Snippets]]&lt;br /&gt;
&lt;br /&gt;
= Math Bithacks =&lt;br /&gt;
== Arithmetic Shift Right ==&lt;br /&gt;
&#039;&#039;3 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: This is the same as division by 2, rounding toward negative infinity.&lt;br /&gt;
&lt;br /&gt;
== True Signed Division By 2 ==&lt;br /&gt;
&#039;&#039;7 bytes / 8 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
	BPL +&lt;br /&gt;
	ADC #$00&lt;br /&gt;
	+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: True division means it rounds toward zero.&lt;br /&gt;
&lt;br /&gt;
== Arithmetic Shift Right, multiple steps ==&lt;br /&gt;
&#039;&#039;6+n bytes / 6+2n cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; signed division by two, n times&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BIT.b #$80&amp;gt;&amp;gt;&amp;lt;n&amp;gt;&lt;br /&gt;
	BEQ ?positive&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?positive:&lt;br /&gt;
endmacro&lt;br /&gt;
&lt;br /&gt;
; -1 cycle and +n bytes, but must have N flag set before use&lt;br /&gt;
macro ASR_multi(n)&lt;br /&gt;
	BMI ?negative&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BRA ?end&lt;br /&gt;
?negative:&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?end:&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value ==&lt;br /&gt;
&#039;&#039;5 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (N Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
macro abs()&lt;br /&gt;
	BPL ?plus&lt;br /&gt;
	EOR #$FF&lt;br /&gt;
	INC&lt;br /&gt;
?plus:		; only 3 cycles if branch taken&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value (SEC) ==&lt;br /&gt;
&#039;&#039;4 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (Carry Set)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; compared to the branching version this is 1 byte smaller&lt;br /&gt;
; it&#039;s either 2 cycles slower/faster depending on branch taken&lt;br /&gt;
	EOR #$7F&lt;br /&gt;
;	SEC		; the instant you add this in it becomes worse than the branching version&lt;br /&gt;
	SBC #$7F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Magnitude/Extents Check ==&lt;br /&gt;
&#039;&#039;~7 bytes / 12 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; asks &amp;quot;Is [A] on the zero-side of value [X] or the far side?&amp;quot;&lt;br /&gt;
; good for magnitude checks, smaller *AND* faster than alternatives&lt;br /&gt;
; NOTE: in the event that it is exactly [X] it will have that value at branch&lt;br /&gt;
; doesn&#039;t need to be an indexed CMP but is most useful this way&lt;br /&gt;
; this can be used to combine the BPL and BMI checks for both signs into one&lt;br /&gt;
	SEC : SBC Extents,x&lt;br /&gt;
	EOR Extents,x&lt;br /&gt;
	BMI .zero_side&lt;br /&gt;
.far_side:&lt;br /&gt;
	; do things&lt;br /&gt;
.zero_side:&lt;br /&gt;
	; do things&lt;br /&gt;
&lt;br /&gt;
Extents:&lt;br /&gt;
	db -$23, $23&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sign Extend ==&lt;br /&gt;
&#039;&#039;13 bytes / 18 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; 8bit value in $10&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	REP #$20&lt;br /&gt;
	LDA $10-1 ; load $10 into A high, and garbage in low&lt;br /&gt;
	AND #$FF00 ; discard garbage&lt;br /&gt;
	BPL +&lt;br /&gt;
	ORA #$00FF&lt;br /&gt;
	+&lt;br /&gt;
	XBA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Misc. Tricks =&lt;br /&gt;
&amp;lt;small&amp;gt;As this list grows tricks here will be consolidated into their own sections. Clever optimization tricks that aren&#039;t necessarily what someone might personally call a &amp;quot;bithack&amp;quot; are okay here as well!&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clear Low Byte of Accumulator ==&lt;br /&gt;
&#039;&#039;1 byte / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; &amp;quot;Trashes&amp;quot; A but clears low byte&lt;br /&gt;
	TDC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direction/Facing As Index ==&lt;br /&gt;
&#039;&#039;4 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Ever wonder why facing flags are 0=right and 1=left? This is why. It&#039;s incredibly cheap.&lt;br /&gt;
; The input here is specifically a signed speed, or similar value.&lt;br /&gt;
	ASL&lt;br /&gt;
	ROL&lt;br /&gt;
	AND #$01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check N Conditions True ==&lt;br /&gt;
&#039;&#039;n+7 bytes / 2n+7 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; You can test for multiple conditions being true (7 conditions true, at least 5 conditions, etc.) by simply using a counter and rounding to the next power of 2 and test if that bit is set.&lt;br /&gt;
; You can also test for &amp;quot;Less than N True&amp;quot;, &amp;quot;More than N&amp;quot;, etc. with variations.&lt;br /&gt;
; This is almost more a coding technique, but it&#039;s super helpful, so worth pointing out.&lt;br /&gt;
; It can allow you to re-arrange branches of code as independent blocks among other useful things.&lt;br /&gt;
; You can also use any RAM instead of A at a small cost.&lt;br /&gt;
&lt;br /&gt;
; Example Test For 5 True Conditions:&lt;br /&gt;
!Next_Highest_Power_of_2 = $08&lt;br /&gt;
!N_True_Target = $05&lt;br /&gt;
	LDA #!Next_Highest_Power_of_2!-!N_True_Target-1		; here we set up our rounding, the -1 isn&#039;t strictly necessary *most* of the time&lt;br /&gt;
	%TestSomeCondition()&lt;br /&gt;
	BCC +	; here we&#039;re going to say our test just returns carry set on true (but it could directly INC inside the code as well)&lt;br /&gt;
	INC&lt;br /&gt;
+&lt;br /&gt;
;	... repeat the above 5 times for different tests&lt;br /&gt;
&lt;br /&gt;
N_True_Test:&lt;br /&gt;
	INC	; replace our -1 to bring us up to a full power of 2 if we had enough True&lt;br /&gt;
	AND #!Next_Highest_Power_of_2&lt;br /&gt;
	BEQ .false&lt;br /&gt;
.true:&lt;br /&gt;
	; N Tests were True&lt;br /&gt;
.false:&lt;br /&gt;
	; Not exactly N tests were true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skip Dead Code ==&lt;br /&gt;
&#039;&#039;1-2 bytes / 2-3 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; If you need to skip one byte of dead code (due to a hijack or whatever reason) you can use:&lt;br /&gt;
	NOP		; 1 byte, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; But if you need to skip just 2 bytes the most efficient is:&lt;br /&gt;
; NOTE: many times WDM is used as a breakpoint for debugging so only do this as a final pass to speed up your code!&lt;br /&gt;
	WDM		; 2 bytes, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; Finally, if you need to skip a large amount of dead code you can use BRA/JMP instead&lt;br /&gt;
; JMP is as fast as BRA on the SNES CPU, but will be slightly slower on SA-1, and 1 cycle slower on SPC. So BRA is recommended&lt;br /&gt;
; (The extra byte used for JMP in this case doesn&#039;t matter)&lt;br /&gt;
	BRA +		; 2 bytes, 3 cycles&lt;br /&gt;
	; dead code&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check 3 Conditions ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; just the opcode as normal here (not counting the conditions), using any operand that&#039;s not immediate (#)&lt;br /&gt;
; it&#039;s worth noting that you can do up to 3 tests with a single opcode though!&lt;br /&gt;
; Just As A Reminder: the V &amp;amp; N flag are set by the *operand* to BIT not the result of the AND!&lt;br /&gt;
	BIT $00&lt;br /&gt;
	BMI .bit7_set&lt;br /&gt;
	BVS .bit6_set&lt;br /&gt;
	BNE .bit5_set	; assuming #$20 is in $00&lt;br /&gt;
.bit7_set:&lt;br /&gt;
.bit6_set:&lt;br /&gt;
.bit5_set:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=2193</id>
		<title>Bithacks</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=2193"/>
		<updated>2022-05-08T20:16:18Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bithacks are optimization tricks that utilize information in bits and [https://en.wikipedia.org/wiki/Bit_manipulation bit manipulation]&lt;br /&gt;
to accomplish their tasks. Usually they work in a slightly non-obvious way, (the most famous being the [https://en.wikipedia.org/wiki/Fast_inverse_square_root fast inverse sqrt]), and bit manipulation in general is harder on the 65c816. To that end here is a collection of some useful tricks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note: cycle counts are intended to be a worst case measure.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also: [[Useful_Code_Snippets|Useful Code Snippets]]&lt;br /&gt;
&lt;br /&gt;
= Math Bithacks =&lt;br /&gt;
== Signed Division By 2 ==&lt;br /&gt;
&#039;&#039;3 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: This is a sign-preserving division so -1÷2 will stay -1 since 0 is positive&lt;br /&gt;
&lt;br /&gt;
== Signed Division By 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; ==&lt;br /&gt;
&#039;&#039;6+n bytes / 6+2n cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; signed division by two, n times&lt;br /&gt;
macro SignedDiv_2N(n)&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BIT.b #$80&amp;gt;&amp;gt;&amp;lt;n&amp;gt;&lt;br /&gt;
	BEQ ?positive&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?positive:&lt;br /&gt;
endmacro&lt;br /&gt;
&lt;br /&gt;
; -1 cycle and +n bytes, but must have N flag set before use&lt;br /&gt;
macro SignedDiv_2N(n)&lt;br /&gt;
	BMI ?negative&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BRA ?end&lt;br /&gt;
?negative:&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?end:&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: This is a sign-preserving division so -1÷2 will stay -1 since 0 is positive&lt;br /&gt;
&lt;br /&gt;
== Absolute Value ==&lt;br /&gt;
&#039;&#039;5 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (N Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
macro abs()&lt;br /&gt;
	BPL ?plus&lt;br /&gt;
	EOR #$FF&lt;br /&gt;
	INC&lt;br /&gt;
?plus:		; only 3 cycles if branch taken&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value (SEC) ==&lt;br /&gt;
&#039;&#039;4 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (Carry Set)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; compared to the branching version this is 1 byte smaller&lt;br /&gt;
; it&#039;s either 2 cycles slower/faster depending on branch taken&lt;br /&gt;
	EOR #$7F&lt;br /&gt;
;	SEC		; the instant you add this in it becomes worse than the branching version&lt;br /&gt;
	SBC #$7F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Magnitude/Extents Check ==&lt;br /&gt;
&#039;&#039;~7 bytes / 12 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; asks &amp;quot;Is [A] on the zero-side of value [X] or the far side?&amp;quot;&lt;br /&gt;
; good for magnitude checks, smaller *AND* faster than alternatives&lt;br /&gt;
; NOTE: in the event that it is exactly [X] it will have that value at branch&lt;br /&gt;
; doesn&#039;t need to be an indexed CMP but is most useful this way&lt;br /&gt;
; this can be used to combine the BPL and BMI checks for both signs into one&lt;br /&gt;
	SEC : SBC Extents,x&lt;br /&gt;
	EOR Extents,x&lt;br /&gt;
	BMI .zero_side&lt;br /&gt;
.far_side:&lt;br /&gt;
	; do things&lt;br /&gt;
.zero_side:&lt;br /&gt;
	; do things&lt;br /&gt;
&lt;br /&gt;
Extents:&lt;br /&gt;
	db -$23, $23&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sign Extend ==&lt;br /&gt;
&#039;&#039;13 bytes / 18 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; 8bit value in $10&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	REP #$20&lt;br /&gt;
	LDA $10-1 ; load $10 into A high, and garbage in low&lt;br /&gt;
	AND #$FF00 ; discard garbage&lt;br /&gt;
	BPL +&lt;br /&gt;
	ORA #$00FF&lt;br /&gt;
	+&lt;br /&gt;
	XBA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Misc. Tricks =&lt;br /&gt;
&amp;lt;small&amp;gt;As this list grows tricks here will be consolidated into their own sections. Clever optimization tricks that aren&#039;t necessarily what someone might personally call a &amp;quot;bithack&amp;quot; are okay here as well!&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clear Low Byte of Accumulator ==&lt;br /&gt;
&#039;&#039;1 byte / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; &amp;quot;Trashes&amp;quot; A but clears low byte&lt;br /&gt;
	TDC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direction/Facing As Index ==&lt;br /&gt;
&#039;&#039;4 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Ever wonder why facing flags are 0=right and 1=left? This is why. It&#039;s incredibly cheap.&lt;br /&gt;
; The input here is specifically a signed speed, or similar value.&lt;br /&gt;
	ASL&lt;br /&gt;
	ROL&lt;br /&gt;
	AND #$01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check N Conditions True ==&lt;br /&gt;
&#039;&#039;n+7 bytes / 2n+7 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; You can test for multiple conditions being true (7 conditions true, at least 5 conditions, etc.) by simply using a counter and rounding to the next power of 2 and test if that bit is set.&lt;br /&gt;
; You can also test for &amp;quot;Less than N True&amp;quot;, &amp;quot;More than N&amp;quot;, etc. with variations.&lt;br /&gt;
; This is almost more a coding technique, but it&#039;s super helpful, so worth pointing out.&lt;br /&gt;
; It can allow you to re-arrange branches of code as independent blocks among other useful things.&lt;br /&gt;
; You can also use any RAM instead of A at a small cost.&lt;br /&gt;
&lt;br /&gt;
; Example Test For 5 True Conditions:&lt;br /&gt;
!Next_Highest_Power_of_2 = $08&lt;br /&gt;
!N_True_Target = $05&lt;br /&gt;
	LDA #!Next_Highest_Power_of_2!-!N_True_Target-1		; here we set up our rounding, the -1 isn&#039;t strictly necessary *most* of the time&lt;br /&gt;
	%TestSomeCondition()&lt;br /&gt;
	BCC +	; here we&#039;re going to say our test just returns carry set on true (but it could directly INC inside the code as well)&lt;br /&gt;
	INC&lt;br /&gt;
+&lt;br /&gt;
;	... repeat the above 5 times for different tests&lt;br /&gt;
&lt;br /&gt;
N_True_Test:&lt;br /&gt;
	INC	; replace our -1 to bring us up to a full power of 2 if we had enough True&lt;br /&gt;
	AND #!Next_Highest_Power_of_2&lt;br /&gt;
	BEQ .false&lt;br /&gt;
.true:&lt;br /&gt;
	; N Tests were True&lt;br /&gt;
.false:&lt;br /&gt;
	; Not exactly N tests were true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skip Dead Code ==&lt;br /&gt;
&#039;&#039;1-2 bytes / 2-3 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; If you need to skip one byte of dead code (due to a hijack or whatever reason) you can use:&lt;br /&gt;
	NOP		; 1 byte, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; But if you need to skip just 2 bytes the most efficient is:&lt;br /&gt;
; NOTE: many times WDM is used as a breakpoint for debugging so only do this as a final pass to speed up your code!&lt;br /&gt;
	WDM		; 2 bytes, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; Finally, if you need to skip a large amount of dead code you can use BRA/JMP instead&lt;br /&gt;
; JMP is as fast as BRA on the SNES CPU, but will be slightly slower on SA-1, and 1 cycle slower on SPC. So BRA is recommended&lt;br /&gt;
; (The extra byte used for JMP in this case doesn&#039;t matter)&lt;br /&gt;
	BRA +		; 2 bytes, 3 cycles&lt;br /&gt;
	; dead code&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check 3 Conditions ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; just the opcode as normal here (not counting the conditions), using any operand that&#039;s not immediate (#)&lt;br /&gt;
; it&#039;s worth noting that you can do up to 3 tests with a single opcode though!&lt;br /&gt;
; Just As A Reminder: the V &amp;amp; N flag are set by the *operand* to BIT not the result of the AND!&lt;br /&gt;
	BIT $00&lt;br /&gt;
	BMI .bit7_set&lt;br /&gt;
	BVS .bit6_set&lt;br /&gt;
	BNE .bit5_set	; assuming #$20 is in $00&lt;br /&gt;
.bit7_set:&lt;br /&gt;
.bit6_set:&lt;br /&gt;
.bit5_set:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=2192</id>
		<title>Bithacks</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=2192"/>
		<updated>2022-05-08T20:15:56Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bithacks are optimization tricks that utilize information in bits and [https://en.wikipedia.org/wiki/Bit_manipulation bit manipulation]&lt;br /&gt;
to accomplish their tasks. Usually they work in a slightly non-obvious way, (the most famous being the [https://en.wikipedia.org/wiki/Fast_inverse_square_root fast inverse sqrt]), and bit manipulation in general is harder on the 65c816. To that end here is a collection of some useful tricks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note: cycle counts are intended to be a worst case measure.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also: [[Useful_Code_Snippets|Useful Code Snippets]]&lt;br /&gt;
&lt;br /&gt;
= Math Bithacks =&lt;br /&gt;
== Signed Division By 2 ==&lt;br /&gt;
&#039;&#039;3 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: This is a sign-preserving division so -1÷2 will stay -1 since 0 is positive&lt;br /&gt;
&lt;br /&gt;
== Signed Division By 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; ==&lt;br /&gt;
&#039;&#039;6+n bytes / 6+2n cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; signed division by two, n times&lt;br /&gt;
macro SignedDiv_2N(n)&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BIT.b #$80&amp;gt;&amp;gt;&amp;lt;n&amp;gt;&lt;br /&gt;
	BEQ ?positive&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?positive:&lt;br /&gt;
endmacro&lt;br /&gt;
&lt;br /&gt;
; -1 cycle and +n bytes, but must have N flag set before use&lt;br /&gt;
macro SignedDiv_2N(n)&lt;br /&gt;
	BMI ?negative&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BRA ?end&lt;br /&gt;
?negative:&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?end:&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
note: This is a sign-preserving division so -1÷2 will stay -1 since 0 is positive&lt;br /&gt;
&lt;br /&gt;
== Absolute Value ==&lt;br /&gt;
&#039;&#039;5 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (N Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
macro abs()&lt;br /&gt;
	BPL ?plus&lt;br /&gt;
	EOR #$FF&lt;br /&gt;
	INC&lt;br /&gt;
?plus:		; only 3 cycles if branch taken&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value (SEC) ==&lt;br /&gt;
&#039;&#039;4 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (Carry Set)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; compared to the branching version this is 1 byte smaller&lt;br /&gt;
; it&#039;s either 2 cycles slower/faster depending on branch taken&lt;br /&gt;
	EOR #$7F&lt;br /&gt;
;	SEC		; the instant you add this in it becomes worse than the branching version&lt;br /&gt;
	SBC #$7F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Magnitude/Extents Check ==&lt;br /&gt;
&#039;&#039;~7 bytes / 12 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; asks &amp;quot;Is [A] on the zero-side of value [X] or the far side?&amp;quot;&lt;br /&gt;
; good for magnitude checks, smaller *AND* faster than alternatives&lt;br /&gt;
; NOTE: in the event that it is exactly [X] it will have that value at branch&lt;br /&gt;
; doesn&#039;t need to be an indexed CMP but is most useful this way&lt;br /&gt;
; this can be used to combine the BPL and BMI checks for both signs into one&lt;br /&gt;
	SEC : SBC Extents,x&lt;br /&gt;
	EOR Extents,x&lt;br /&gt;
	BMI .zero_side&lt;br /&gt;
.far_side:&lt;br /&gt;
	; do things&lt;br /&gt;
.zero_side:&lt;br /&gt;
	; do things&lt;br /&gt;
&lt;br /&gt;
Extents:&lt;br /&gt;
	db -$23, $23&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Misc. Tricks =&lt;br /&gt;
&amp;lt;small&amp;gt;As this list grows tricks here will be consolidated into their own sections. Clever optimization tricks that aren&#039;t necessarily what someone might personally call a &amp;quot;bithack&amp;quot; are okay here as well!&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clear Low Byte of Accumulator ==&lt;br /&gt;
&#039;&#039;1 byte / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; &amp;quot;Trashes&amp;quot; A but clears low byte&lt;br /&gt;
	TDC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direction/Facing As Index ==&lt;br /&gt;
&#039;&#039;4 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Ever wonder why facing flags are 0=right and 1=left? This is why. It&#039;s incredibly cheap.&lt;br /&gt;
; The input here is specifically a signed speed, or similar value.&lt;br /&gt;
	ASL&lt;br /&gt;
	ROL&lt;br /&gt;
	AND #$01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sign Extend ==&lt;br /&gt;
&#039;&#039;13 bytes / 18 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; 8bit value in $10&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	REP #$20&lt;br /&gt;
	LDA $10-1 ; load $10 into A high, and garbage in low&lt;br /&gt;
	AND #$FF00 ; discard garbage&lt;br /&gt;
	BPL +&lt;br /&gt;
	ORA #$00FF&lt;br /&gt;
	+&lt;br /&gt;
	XBA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check N Conditions True ==&lt;br /&gt;
&#039;&#039;n+7 bytes / 2n+7 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; You can test for multiple conditions being true (7 conditions true, at least 5 conditions, etc.) by simply using a counter and rounding to the next power of 2 and test if that bit is set.&lt;br /&gt;
; You can also test for &amp;quot;Less than N True&amp;quot;, &amp;quot;More than N&amp;quot;, etc. with variations.&lt;br /&gt;
; This is almost more a coding technique, but it&#039;s super helpful, so worth pointing out.&lt;br /&gt;
; It can allow you to re-arrange branches of code as independent blocks among other useful things.&lt;br /&gt;
; You can also use any RAM instead of A at a small cost.&lt;br /&gt;
&lt;br /&gt;
; Example Test For 5 True Conditions:&lt;br /&gt;
!Next_Highest_Power_of_2 = $08&lt;br /&gt;
!N_True_Target = $05&lt;br /&gt;
	LDA #!Next_Highest_Power_of_2!-!N_True_Target-1		; here we set up our rounding, the -1 isn&#039;t strictly necessary *most* of the time&lt;br /&gt;
	%TestSomeCondition()&lt;br /&gt;
	BCC +	; here we&#039;re going to say our test just returns carry set on true (but it could directly INC inside the code as well)&lt;br /&gt;
	INC&lt;br /&gt;
+&lt;br /&gt;
;	... repeat the above 5 times for different tests&lt;br /&gt;
&lt;br /&gt;
N_True_Test:&lt;br /&gt;
	INC	; replace our -1 to bring us up to a full power of 2 if we had enough True&lt;br /&gt;
	AND #!Next_Highest_Power_of_2&lt;br /&gt;
	BEQ .false&lt;br /&gt;
.true:&lt;br /&gt;
	; N Tests were True&lt;br /&gt;
.false:&lt;br /&gt;
	; Not exactly N tests were true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skip Dead Code ==&lt;br /&gt;
&#039;&#039;1-2 bytes / 2-3 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; If you need to skip one byte of dead code (due to a hijack or whatever reason) you can use:&lt;br /&gt;
	NOP		; 1 byte, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; But if you need to skip just 2 bytes the most efficient is:&lt;br /&gt;
; NOTE: many times WDM is used as a breakpoint for debugging so only do this as a final pass to speed up your code!&lt;br /&gt;
	WDM		; 2 bytes, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; Finally, if you need to skip a large amount of dead code you can use BRA/JMP instead&lt;br /&gt;
; JMP is as fast as BRA on the SNES CPU, but will be slightly slower on SA-1, and 1 cycle slower on SPC. So BRA is recommended&lt;br /&gt;
; (The extra byte used for JMP in this case doesn&#039;t matter)&lt;br /&gt;
	BRA +		; 2 bytes, 3 cycles&lt;br /&gt;
	; dead code&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check 3 Conditions ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; just the opcode as normal here (not counting the conditions), using any operand that&#039;s not immediate (#)&lt;br /&gt;
; it&#039;s worth noting that you can do up to 3 tests with a single opcode though!&lt;br /&gt;
; Just As A Reminder: the V &amp;amp; N flag are set by the *operand* to BIT not the result of the AND!&lt;br /&gt;
	BIT $00&lt;br /&gt;
	BMI .bit7_set&lt;br /&gt;
	BVS .bit6_set&lt;br /&gt;
	BNE .bit5_set	; assuming #$20 is in $00&lt;br /&gt;
.bit7_set:&lt;br /&gt;
.bit6_set:&lt;br /&gt;
.bit5_set:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=SuperFX&amp;diff=2093</id>
		<title>SuperFX</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=SuperFX&amp;diff=2093"/>
		<updated>2021-10-08T17:52:53Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: Redirected page to Super FX&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Super FX]]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=LC_LZ2&amp;diff=2088</id>
		<title>LC LZ2</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=LC_LZ2&amp;diff=2088"/>
		<updated>2021-10-07T15:39:09Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: lunar compress says zelda uses lz1, not lz2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:LC_LZ2}}&lt;br /&gt;
LZ2 or LC_LZ2, as named by [[Lunar Compress]], is a lossless data compression format, used by [[Super Mario World]] to compress graphics. It is also used by [[Super Mario World 2: Yoshi&#039;s Island]].&lt;br /&gt;
&lt;br /&gt;
== Compression ==&lt;br /&gt;
&lt;br /&gt;
The compressed data consists of &amp;quot;chunks&amp;quot;, each with a header:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bits&lt;br /&gt;
76543210&lt;br /&gt;
CCCLLLLL&lt;br /&gt;
&lt;br /&gt;
CCC:   Command bits&lt;br /&gt;
LLLLL: Length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the header byte is $FF, the end of the compressed data has been reached, and decompression will be aborted.&lt;br /&gt;
&lt;br /&gt;
Here is a list of commands bits which the LC_LZ2 decompression function can use during the decompression:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
000    &amp;quot;Direct Copy&amp;quot;&lt;br /&gt;
       Followed by (L+1) bytes of data&lt;br /&gt;
001    &amp;quot;Byte Fill&amp;quot;&lt;br /&gt;
       Followed by one byte to be repeated (L+1) times&lt;br /&gt;
010    &amp;quot;Word Fill&amp;quot;&lt;br /&gt;
       Followed by two bytes. Output first byte, then second, then first,&lt;br /&gt;
       then second, etc. until (L+1) bytes has been outputted&lt;br /&gt;
011    &amp;quot;Increasing Fill&amp;quot;&lt;br /&gt;
       Followed by one byte to be repeated (L+1) times, but the byte is&lt;br /&gt;
       increased by 1 after each write&lt;br /&gt;
100    &amp;quot;Repeat&amp;quot;&lt;br /&gt;
       Followed by two bytes (big endian byte order) containing address (in the&lt;br /&gt;
       output buffer) to copy (L+1) bytes from&lt;br /&gt;
101    (Unused command)&lt;br /&gt;
110    (Unused command)&lt;br /&gt;
111    &amp;quot;Long length&amp;quot;&lt;br /&gt;
       This command has got a two-byte header:&lt;br /&gt;
       111CCCLL LLLLLLLL&lt;br /&gt;
       CCC:        Real command&lt;br /&gt;
       LLLLLLLLLL: Length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decompression ==&lt;br /&gt;
&lt;br /&gt;
During the decompression, the decompressed chunks are outputted into a buffer which is either RAM or SRAM. SMW uses the RAM address $7E:AD00 as its decompression buffer.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
You can use the LC_LZ2 compression to mainly compress graphics. Technically you can compress anything with this format, but graphics is preferred due to their big size. Seeing the SNES isn&#039;t fast, the decompression takes a while to finish, so whenever you overuse the compression the loading time will increase.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
You can see an LC_LZ2 decompression routine setup at SNES $00:B888. The decompression routine itself is located at SNES $00:B8DE.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
[https://fusoya.eludevisibility.org/lc/index.html Lunar Compress], a library by [[FuSoYa]] made to handle loading various game graphics format, including LZ2.&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=LC_LZ2&amp;diff=2087</id>
		<title>LC LZ2</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=LC_LZ2&amp;diff=2087"/>
		<updated>2021-10-07T15:20:51Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:LC_LZ2}}&lt;br /&gt;
LZ2 or LC_LZ2, as named by [[Lunar Compress]], is a lossless data compression format, used by [[Super Mario World]] to compress graphics. It is also used by [[A Link to the Past]] and [[Super Mario World 2: Yoshi&#039;s Island]].&lt;br /&gt;
&lt;br /&gt;
== Compression ==&lt;br /&gt;
&lt;br /&gt;
The compressed data consists of &amp;quot;chunks&amp;quot;, each with a header:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bits&lt;br /&gt;
76543210&lt;br /&gt;
CCCLLLLL&lt;br /&gt;
&lt;br /&gt;
CCC:   Command bits&lt;br /&gt;
LLLLL: Length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the header byte is $FF, the end of the compressed data has been reached, and decompression will be aborted.&lt;br /&gt;
&lt;br /&gt;
Here is a list of commands bits which the LC_LZ2 decompression function can use during the decompression:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
000    &amp;quot;Direct Copy&amp;quot;&lt;br /&gt;
       Followed by (L+1) bytes of data&lt;br /&gt;
001    &amp;quot;Byte Fill&amp;quot;&lt;br /&gt;
       Followed by one byte to be repeated (L+1) times&lt;br /&gt;
010    &amp;quot;Word Fill&amp;quot;&lt;br /&gt;
       Followed by two bytes. Output first byte, then second, then first,&lt;br /&gt;
       then second, etc. until (L+1) bytes has been outputted&lt;br /&gt;
011    &amp;quot;Increasing Fill&amp;quot;&lt;br /&gt;
       Followed by one byte to be repeated (L+1) times, but the byte is&lt;br /&gt;
       increased by 1 after each write&lt;br /&gt;
100    &amp;quot;Repeat&amp;quot;&lt;br /&gt;
       Followed by two bytes (big endian byte order) containing address (in the&lt;br /&gt;
       output buffer) to copy (L+1) bytes from&lt;br /&gt;
101    (Unused command)&lt;br /&gt;
110    (Unused command)&lt;br /&gt;
111    &amp;quot;Long length&amp;quot;&lt;br /&gt;
       This command has got a two-byte header:&lt;br /&gt;
       111CCCLL LLLLLLLL&lt;br /&gt;
       CCC:        Real command&lt;br /&gt;
       LLLLLLLLLL: Length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decompression ==&lt;br /&gt;
&lt;br /&gt;
During the decompression, the decompressed chunks are outputted into a buffer which is either RAM or SRAM. SMW uses the RAM address $7E:AD00 as its decompression buffer.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
You can use the LC_LZ2 compression to mainly compress graphics. Technically you can compress anything with this format, but graphics is preferred due to their big size. Seeing the SNES isn&#039;t fast, the decompression takes a while to finish, so whenever you overuse the compression the loading time will increase.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
You can see an LC_LZ2 decompression routine setup at SNES $00:B888. The decompression routine itself is located at SNES $00:B8DE.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
[https://fusoya.eludevisibility.org/lc/index.html Lunar Compress], a library by [[FuSoYa]] made to handle loading various game graphics format, including LZ2.&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Graphics_Format&amp;diff=2072</id>
		<title>Graphics Format</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Graphics_Format&amp;diff=2072"/>
		<updated>2021-09-19T12:31:56Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: /* 8bpp */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;SNES&#039;&#039;&#039; utilizes &#039;&#039;&#039;indirect color indexing&#039;&#039;&#039; to have multiple graphics storing formats available in its architecture: 2bpp, 3bpp, 4bpp, 8bpp and Mode 7. with 2 and 4bpp being the most commonly used.&lt;br /&gt;
&lt;br /&gt;
== Primer on Indirect Color Indexing ==&lt;br /&gt;
&#039;&#039;&#039;Indexed color&#039;&#039;&#039; is a technique to manage digital images&#039; colors in a limited fashion, in order to save computer memory and file storage, while speeding up display refresh and file transfers.&lt;br /&gt;
&lt;br /&gt;
When an image is encoded in this way, color information is not directly carried by the image pixel data, but is stored in a separate piece of data called a &#039;&#039;&#039;palette&#039;&#039;&#039;: an array of color elements. Every element in the array represents a color, indexed by its position within the array. The individual entries are sometimes known as &#039;&#039;&#039;color registers&#039;&#039;&#039;. The image pixels do not contain the full specification of its color, but only its index in the &#039;&#039;palette&#039;&#039;. This technique is sometimes referred as &#039;&#039;&#039;pseudocolor&#039;&#039;&#039; or &#039;&#039;&#039;indirect color&#039;&#039;&#039;, as colors are addressed indirectly.&lt;br /&gt;
&lt;br /&gt;
== How It Works ==&lt;br /&gt;
Let&#039;s take a 1bpp sprite, one of the invaders of Space Invaders by Taito, for example.&lt;br /&gt;
[[File:saa03 1bpp.png|frame|center|Credit of picture to georgjz of [https://georgjz.github.io/snesaa03/ Machine Code Construction Yard].]]&lt;br /&gt;
&lt;br /&gt;
Using binary, &#039;&#039;&#039;the pixels index themselves to a palette color&#039;&#039;&#039;. 0 to white, 1 to black. The picture itself is compressed by turning it to binary which is then converted to hex to store in data (11000 of the tip of the head translating to $18, for one).&lt;br /&gt;
&lt;br /&gt;
However, once 2bpp or higher are introduced, bitplanes come along with them.&lt;br /&gt;
&lt;br /&gt;
For instance, take the sprite of Link in Legend of Zelda for the Nintendo Entertainment System.&lt;br /&gt;
[[File:saa03 2bpp.png|frame|center|Credit of picture to georgjz of [https://georgjz.github.io/snesaa03/ Machine Code Construction Yard].]]&lt;br /&gt;
&lt;br /&gt;
As it is 2bpp (literally two bits per pixel), two bitplanes are used to account for the increase in color (as $03 = #04 = %00000011). Essentially, each byte represents a row, and to get the color index, we have to combine the two. 0 and 0 = transparent in the SNES&#039; case, 0 and 1 = green, so on and so forth.&lt;br /&gt;
&lt;br /&gt;
For 3, 4bpp, the conversion is rather obvious. But the most commonly used are 2 and 4bpp. As an aside, &#039;&#039;&#039;SNES tiles are stored in 8x8&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Data Storage ==&lt;br /&gt;
Due to the ability to swap bits-per-pixel formats, the SNES has the ability to use a mix of Planar and Intertwined data storage, using Planar in Mode 7.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Planar&#039;&#039;&#039;: Each row (i.e., byte) of a bitplane is stored consecutively, starting with the top row of the lowest bitplane; then the same is repeated with each row of the next bitplane.&lt;br /&gt;
* &#039;&#039;&#039;Intertwined&#039;&#039;&#039;: Each pair of bytes consecutively stored represents a row of the sprite with the byte from the lower bitplane being stored first.&lt;br /&gt;
&lt;br /&gt;
In the SNES, the first two planes of an 8x8 tile are always stored first, and once all those are done, the third and fourth get stored.&lt;br /&gt;
&lt;br /&gt;
[[File:saa03 superkai03.png|frame|center|Credit of picture to georgjz of [https://georgjz.github.io/snesaa03/ Machine Code Construction Yard].]]&lt;br /&gt;
&lt;br /&gt;
== Formats ==&lt;br /&gt;
=== 2bpp ===&lt;br /&gt;
&#039;&#039;&#039;Colors Per Tile&#039;&#039;&#039;: 0-3&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Space Used&#039;&#039;&#039;: 2 bits per pixel. 16 bytes per 8x8 tile.&lt;br /&gt;
&lt;br /&gt;
Note: This is a tiled, planar bitmap format. Each pair represents one byte.&amp;lt;br&amp;gt;&lt;br /&gt;
Format:&lt;br /&gt;
   [r0, bp1], [r0, bp2], [r1, bp1], [r1, bp2], [r2, bp1], [r2, bp2], [r3, bp1], [r3, bp2]&lt;br /&gt;
   [r4, bp1], [r4, bp2], [r5, bp1], [r5, bp2], [r6, bp1], [r6, bp2], [r7, bp1], [r7, bp2]&lt;br /&gt;
&lt;br /&gt;
Short Description:&lt;br /&gt;
Bitplanes 1 and 2 are intertwined row by row.&lt;br /&gt;
&lt;br /&gt;
=== 3bpp ===&lt;br /&gt;
&#039;&#039;&#039;Colors Per Tile&#039;&#039;&#039;: 0-7&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Space Used&#039;&#039;&#039;: 3 bits per pixel.  24 bytes for a 8x8 tile.&lt;br /&gt;
&lt;br /&gt;
Note: This is a tiled, planar bitmap format. Each pair represents one byte.&amp;lt;br&amp;gt;&lt;br /&gt;
Format:&lt;br /&gt;
   [r0, bp1], [r0, bp2], [r1, bp1], [r1, bp2], [r2, bp1], [r2, bp2], [r3, bp1], [r3, bp2]&lt;br /&gt;
   [r4, bp1], [r4, bp2], [r5, bp1], [r5, bp2], [r6, bp1], [r6, bp2], [r7, bp1], [r7, bp2]&lt;br /&gt;
   [r0, bp3], [r1, bp3], [r2, bp3], [r3, bp3], [r4, bp3], [r5, bp3], [r6, bp3], [r7, bp3]&lt;br /&gt;
&lt;br /&gt;
Short Description:&lt;br /&gt;
Bitplanes 1 and 2 are stored first, intertwined row by row.  Then the third bitplane is stored row by row. &amp;lt;br&amp;gt;&lt;br /&gt;
This format isn&#039;t used by many games since it&#039;s actually a type of compression, because the SNES doesn&#039;t natively support the 3BPP format.  There is a routine that inserts the fourth bitplane before or while it&#039;s being transferred to VRAM so that it can be used by the SNES.&lt;br /&gt;
&lt;br /&gt;
=== 4bpp ===&lt;br /&gt;
&#039;&#039;&#039;Colors Per Tile&#039;&#039;&#039;: 0-15&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Space Used&#039;&#039;&#039;: 4 bits per pixel.  32 bytes for a 8x8 tile.&lt;br /&gt;
&lt;br /&gt;
Note: This is a tiled, planar bitmap format. Each pair represents one byte&amp;lt;br&amp;gt;&lt;br /&gt;
Format:&lt;br /&gt;
   [r0, bp1], [r0, bp2], [r1, bp1], [r1, bp2], [r2, bp1], [r2, bp2], [r3, bp1], [r3, bp2]&lt;br /&gt;
   [r4, bp1], [r4, bp2], [r5, bp1], [r5, bp2], [r6, bp1], [r6, bp2], [r7, bp1], [r7, bp2]&lt;br /&gt;
   [r0, bp3], [r0, bp4], [r1, bp3], [r1, bp4], [r2, bp3], [r2, bp4], [r3, bp3], [r3, bp4]&lt;br /&gt;
   [r4, bp3], [r4, bp4], [r5, bp3], [r5, bp4], [r6, bp3], [r6, bp4], [r7, bp3], [r7, bp4]&lt;br /&gt;
&lt;br /&gt;
Short Description:&lt;br /&gt;
Bitplanes 1 and 2 are stored first, intertwined row by row.  Then bitplanes 3 and 4 are stored, intertwined row by row.&lt;br /&gt;
&lt;br /&gt;
=== 8bpp ===&lt;br /&gt;
&#039;&#039;&#039;Colors Per Tile&#039;&#039;&#039;: 0-255&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Space Used&#039;&#039;&#039;: 8 bits per pixel.  64 bytes for a 8x8 tile.&lt;br /&gt;
&lt;br /&gt;
Note: This is a tiled, planar bitmap format. Each pair represents one byte&amp;lt;br&amp;gt;&lt;br /&gt;
Format:&lt;br /&gt;
   [r0, bp1], [r0, bp2], [r1, bp1], [r1, bp2], [r2, bp1], [r2, bp2], [r3, bp1], [r3, bp2]&lt;br /&gt;
   [r4, bp1], [r4, bp2], [r5, bp1], [r5, bp2], [r6, bp1], [r6, bp2], [r7, bp1], [r7, bp2]&lt;br /&gt;
   [r0, bp3], [r0, bp4], [r1, bp3], [r1, bp4], [r2, bp3], [r2, bp4], [r3, bp3], [r3, bp4]&lt;br /&gt;
   [r4, bp3], [r4, bp4], [r5, bp3], [r5, bp4], [r6, bp3], [r6, bp4], [r7, bp3], [r7, bp4]&lt;br /&gt;
   [r0, bp5], [r0, bp6], [r1, bp5], [r1, bp6], [r2, bp5], [r2, bp6], [r3, bp5], [r3, bp6]&lt;br /&gt;
   [r4, bp5], [r4, bp6], [r5, bp5], [r5, bp6], [r6, bp5], [r6, bp6], [r7, bp5], [r7, bp6]&lt;br /&gt;
   [r0, bp7], [r0, bp8], [r1, bp7], [r1, bp8], [r2, bp7], [r2, bp8], [r3, bp7], [r3, bp8]&lt;br /&gt;
   [r4, bp7], [r4, bp8], [r5, bp7], [r5, bp8], [r6, bp7], [r6, bp8], [r7, bp7], [r7, bp8]&lt;br /&gt;
&lt;br /&gt;
Short Description:&lt;br /&gt;
Bitplanes 1 and 2 are stored first, intertwined row by row.  Bitplanes 3 and 4 are stored next intertwined row by row.  Then Bitplanes 5 and 6 intertwined row by row.  Finally, Bitplanes 7 and 8 are stored intertwined row by row.&lt;br /&gt;
&lt;br /&gt;
Alternatively and equivalently: In a normal paletted 8x8 image, the bits of pixel data are accessed with byte index yyyxxx and bit index ccc. In SNES 8bpp, the indices are instead ccyyyc xxx.&lt;br /&gt;
&lt;br /&gt;
=== Mode 7 ===&lt;br /&gt;
&#039;&#039;&#039;Colors Per Tile&#039;&#039;&#039;: 0-255&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Space used&#039;&#039;&#039;: 8 bits per pixel.  64 bytes for a 8x8 tile.&lt;br /&gt;
&lt;br /&gt;
Note: This is a tiled, linear bitmap format. Each pair represents 1 byte.&amp;lt;br&amp;gt;&lt;br /&gt;
Format:&lt;br /&gt;
   [p0 r0: bp!], [p1 r0: bp!], [p2 r0: bp!], [p3 r0: bp!]&lt;br /&gt;
   [p4 r0: bp!], [p5 r0: bp!], [p6 r0: bp!], [p7 r0: bp!]&lt;br /&gt;
   [p0 r1: bp!], [p1 r1: bp!], [p2 r1: bp!], [p3 r1: bp!]&lt;br /&gt;
   [p4 r1: bp!], [p5 r1: bp!], [p6 r1: bp!], [p7 r1: bp!]&lt;br /&gt;
   ...&lt;br /&gt;
   [p0 r7: bp!], [p1 r7: bp!], [p2 r7: bp!], [p3 r7: bp!]&lt;br /&gt;
   [p4 r7: bp!], [p5 r7: bp!], [p6 r7: bp!], [p7 r7: bp!]&lt;br /&gt;
&lt;br /&gt;
Short Description:&lt;br /&gt;
Each pixel has its bitplanes stored right after another, so each byte directly references a palette color without needing to &amp;quot;combine&amp;quot; the bitplanes.&lt;br /&gt;
&lt;br /&gt;
== Palette format ==&lt;br /&gt;
The SNES uses a format known as BGR555, rather similar to RGB888. The conversion method is simple, take the five most significant bytes of each color component, and place them backwards (Blue, Green, Red), setting the most significant bit to 0.&lt;br /&gt;
&lt;br /&gt;
[[File:saa03 palette01.png|frame|center|Credit of picture to georgjz of [https://georgjz.github.io/snesaa03/ Machine Code Construction Yard].]]&lt;br /&gt;
&lt;br /&gt;
This gives the SNES the ability to use any color that fits in that spectrum rather than stick to fixed palettes set by the machine.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
[https://www.youtube.com/watch?v=57ibhDU2SAI Super Nintendo Entertainment System Features, by Retro Game Mechanics Explained]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://mrclick.zophar.net/TilEd/download/consolegfx.txt Klarth&#039;s Console GFX Document]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://georgjz.github.io/snesaa03/ SNES Assembly Adventure, Lesson 03]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=SNES_ROM_Header&amp;diff=2071</id>
		<title>SNES ROM Header</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=SNES_ROM_Header&amp;diff=2071"/>
		<updated>2021-09-17T21:20:59Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: /* Mask ROM Version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All [[SNES]] gamepaks have an internal header that is used to identifying the game, producer, region and technical aspects of the ROM. It&#039;s often referred as &#039;&#039;&#039;Internal ROM Header&#039;&#039;&#039; or &#039;&#039;&#039;SNES Software Specification&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Although it&#039;s not required to run a game on real hardware, the SNES ROM Header was used during the Nintendo approval process for validation and it&#039;s also used by the SNES emulators to identify and determine the memory layout and ROM type.&lt;br /&gt;
&lt;br /&gt;
The data starts at SNES address $00:FFB0 and ends at $00:FFDF. $00:FFE0 though $00:FFFF contains the SNES vector information and &#039;&#039;&#039;it&#039;s actually used&#039;&#039;&#039; by the SNES CPU to determine where to execute when an interrupt occurs.&lt;br /&gt;
&lt;br /&gt;
== ROM Registration Data ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Length !! Data Name Type&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFB0 || 2 bytes || Maker Code&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFB2 || 4 bytes || Game Code&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFB6 || 7 bytes || Fixed Value&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFBD || 1 byte || Expansion RAM Size&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFBE || 1 byte || Special Version&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFBF || 1 byte || Cartridge Type (Sub-number)&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFC0 || 21 bytes || Game Title Registration&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD5 || 1 byte || Map Mode&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD6 || 1 byte || Cartridge Type&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD7 || 1 byte || ROM Size&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD8 || 1 byte || RAM Size&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD9 || 1 byte || Destination Code&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDA || 1 byte || Fixed Value&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDB || 1 byte || Mask ROM Version&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDC || 2 bytes || Complement Check&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDE || 2 bytes || Check Sum&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Data Name Types ==&lt;br /&gt;
&lt;br /&gt;
=== Maker Code ===&lt;br /&gt;
Two alphanumeric ASCII bytes identifying your company. Ignored by emulators; for ROM hackers and homebrewers, just insert whatever.&lt;br /&gt;
=== Game Code ===&lt;br /&gt;
Four alphanumeric ASCII bytes identifying your game. Ignored by emulators; for ROM hackers and homebrewers, just insert whatever.&lt;br /&gt;
&lt;br /&gt;
Exception: If the game code starts with Z and ends with J, it&#039;s a BS-X flash cartridge.&lt;br /&gt;
=== Fixed Value ===&lt;br /&gt;
The fixed value bytes at $00FFB6-$00FFBC should be #$00. The fixed value byte at $00FFDA should be #$33.&lt;br /&gt;
=== Expansion RAM Size ===&lt;br /&gt;
Should be #$00 for most roms. For the exception, see RAM Size.&lt;br /&gt;
=== Special Version ===&lt;br /&gt;
Should be #$00.&lt;br /&gt;
=== Game Title Specification ===&lt;br /&gt;
The game title is 21 bytes long, encoded with the [https://en.wikipedia.org/wiki/JIS_X_0201 JIS X 0201] character set (which consists of standard ASCII plus katakana). If the title is shorter than 21 bytes, then the remainder should be padded with spaces (0x20).&lt;br /&gt;
&lt;br /&gt;
=== Cartridge Configuration ===&lt;br /&gt;
==== Map Mode ====&lt;br /&gt;
Common values: #$20 - 2.68MHz LoROM, #$21 - 2.68MHz HiROM, #$23 - SA-1; #$25 - 2.68MHz ExHiROM; #$30 - 3.58MHz LoROM, #$31 - 3.58MHz HiROM; #$35 - 3.58MHz ExHiROM&lt;br /&gt;
==== Cartridge Type ====&lt;br /&gt;
Common values: #$00 - ROM only; #$01 - ROM and RAM; #$02 - ROM, RAM and battery; #$33 - ROM and SA-1; #$34 - ROM, SA-1 and RAM; #$35 - ROM, SA-1, RAM and battery&lt;br /&gt;
===== Sub-Number =====&lt;br /&gt;
==== ROM Size ====&lt;br /&gt;
2^(this value) would be the size of the ROM in kilobytes. For example, for 512KB, this should be #$09.&lt;br /&gt;
&lt;br /&gt;
==== RAM Size ====&lt;br /&gt;
2^(this value) would be the size of the SRAM (if present) in kilobytes. Maximum supported value is #$07.&lt;br /&gt;
&lt;br /&gt;
Exception: If you&#039;re using SuperFX aka GSU-1, move this value to the Expansion RAM Size field, and put #$00 in this byte.&lt;br /&gt;
&lt;br /&gt;
=== Destination Code ===&lt;br /&gt;
Where the game is intended to be sold. Common values: #$00 - Japan; #$01 - USA; #$02 - Europe (enables 50fps PAL mode)&lt;br /&gt;
=== Mask ROM Version ===&lt;br /&gt;
Should be #$00, or increased every time you release a new ROM version.&lt;br /&gt;
&lt;br /&gt;
=== ROM Verification ===&lt;br /&gt;
==== Complement Check ====&lt;br /&gt;
This is the 16-bit complement (bit-inverse) of the checksum. This is used so that the checksum value cancels itself out when calculating the real checksum.&lt;br /&gt;
==== Check Sum ====&lt;br /&gt;
This is simply the 16-bit sum of all bytes in the ROM. For power-of-2-sized ROMs, no mirroring is used, each byte of ROM is counted exactly once.&lt;br /&gt;
&lt;br /&gt;
For non-power-of-2-sized ROMs (e.g. 2.5MB or 6MB), first the checksum for the largest power-of-2 area smaller than the ROM size (so 4MB for 6MB ROMs, 2MB for 2.5MB ROMs) is computed normally. Then the remaining part is repeated until it&#039;s the same size as the first part (so the last 2MB of a 6MB ROM is repeated once so both halves are 4MB, and the last 512KB of a 2.5MB ROM is repeated 4 times so both halves are 2MB). Then its checksum is computed and the checksums of the 2 halves are added to get the final checksum.&lt;br /&gt;
&lt;br /&gt;
== CPU Exception Vectors ==&lt;br /&gt;
&lt;br /&gt;
The vectors from $00:FFE0-$00:FFEF are used when the SNES is running in native mode, while the vectors from $00:FFF0-$00:FFFF are used when the SNES is running in emulation mode. Note that ABORT is technically unused, but listed for completion.&lt;br /&gt;
&lt;br /&gt;
Also note that the vectors are only 16 bits wide, so they can only jump to addresses within bank $00. If you want to jump to a different bank, or you need FastROM addressing, point them to a JML instruction. With WRAM being mapped at $0000-$1FFF on bank $00, it&#039;s possible to point them on that range, being an interesting option for run-time code modification.&lt;br /&gt;
&lt;br /&gt;
Certain enhancement chips like [[SA-1]] and [[Super FX]] can override the CPU vectors on special occasions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Length !! Mode !! Vector&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE0 || 4 bytes || Native || &#039;&#039;unused&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE4 || 2 bytes || Native || COP&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE6 || 2 bytes || Native || BRK&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE8 || 2 bytes || Native || ABORT&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFEA || 2 bytes || Native || NMI&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFEC || 2 bytes || Native || &#039;&#039;unused&#039;&#039; (would be RESET, but the SNES always boots in Emulation mode)&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFEE || 2 bytes || Native || IRQ&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF0 || 4 bytes || Emulation || &#039;&#039;unused&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF4 || 2 bytes || Emulation || COP&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF6 || 2 bytes || Emulation || &#039;&#039;unused&#039;&#039; (would be BRK, but BRK and IRQ share the same vector in Emulation mode)&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF8 || 2 bytes || Emulation || ABORT&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFFA || 2 bytes || Emulation || NMI&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFFC || 2 bytes || Emulation || RESET&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFFE || 2 bytes || Emulation || IRQ/BRK&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=SNES_ROM_Header&amp;diff=2070</id>
		<title>SNES ROM Header</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=SNES_ROM_Header&amp;diff=2070"/>
		<updated>2021-09-17T21:18:45Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All [[SNES]] gamepaks have an internal header that is used to identifying the game, producer, region and technical aspects of the ROM. It&#039;s often referred as &#039;&#039;&#039;Internal ROM Header&#039;&#039;&#039; or &#039;&#039;&#039;SNES Software Specification&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Although it&#039;s not required to run a game on real hardware, the SNES ROM Header was used during the Nintendo approval process for validation and it&#039;s also used by the SNES emulators to identify and determine the memory layout and ROM type.&lt;br /&gt;
&lt;br /&gt;
The data starts at SNES address $00:FFB0 and ends at $00:FFDF. $00:FFE0 though $00:FFFF contains the SNES vector information and &#039;&#039;&#039;it&#039;s actually used&#039;&#039;&#039; by the SNES CPU to determine where to execute when an interrupt occurs.&lt;br /&gt;
&lt;br /&gt;
== ROM Registration Data ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Length !! Data Name Type&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFB0 || 2 bytes || Maker Code&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFB2 || 4 bytes || Game Code&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFB6 || 7 bytes || Fixed Value&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFBD || 1 byte || Expansion RAM Size&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFBE || 1 byte || Special Version&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFBF || 1 byte || Cartridge Type (Sub-number)&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFC0 || 21 bytes || Game Title Registration&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD5 || 1 byte || Map Mode&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD6 || 1 byte || Cartridge Type&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD7 || 1 byte || ROM Size&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD8 || 1 byte || RAM Size&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD9 || 1 byte || Destination Code&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDA || 1 byte || Fixed Value&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDB || 1 byte || Mask ROM Version&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDC || 2 bytes || Complement Check&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDE || 2 bytes || Check Sum&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Data Name Types ==&lt;br /&gt;
&lt;br /&gt;
=== Maker Code ===&lt;br /&gt;
Two alphanumeric ASCII bytes identifying your company. Ignored by emulators; for ROM hackers and homebrewers, just insert whatever.&lt;br /&gt;
=== Game Code ===&lt;br /&gt;
Four alphanumeric ASCII bytes identifying your game. Ignored by emulators; for ROM hackers and homebrewers, just insert whatever.&lt;br /&gt;
&lt;br /&gt;
Exception: If the game code starts with Z and ends with J, it&#039;s a BS-X flash cartridge.&lt;br /&gt;
=== Fixed Value ===&lt;br /&gt;
The fixed value bytes at $00FFB6-$00FFBC should be #$00. The fixed value byte at $00FFDA should be #$33.&lt;br /&gt;
=== Expansion RAM Size ===&lt;br /&gt;
Should be #$00 for most roms. For the exception, see RAM Size.&lt;br /&gt;
=== Special Version ===&lt;br /&gt;
Should be #$00.&lt;br /&gt;
=== Game Title Specification ===&lt;br /&gt;
The game title is 21 bytes long, encoded with the [https://en.wikipedia.org/wiki/JIS_X_0201 JIS X 0201] character set (which consists of standard ASCII plus katakana). If the title is shorter than 21 bytes, then the remainder should be padded with spaces (0x20).&lt;br /&gt;
&lt;br /&gt;
=== Cartridge Configuration ===&lt;br /&gt;
==== Map Mode ====&lt;br /&gt;
Common values: #$20 - 2.68MHz LoROM, #$21 - 2.68MHz HiROM, #$23 - SA-1; #$25 - 2.68MHz ExHiROM; #$30 - 3.58MHz LoROM, #$31 - 3.58MHz HiROM; #$35 - 3.58MHz ExHiROM&lt;br /&gt;
==== Cartridge Type ====&lt;br /&gt;
Common values: #$00 - ROM only; #$01 - ROM and RAM; #$02 - ROM, RAM and battery; #$33 - ROM and SA-1; #$34 - ROM, SA-1 and RAM; #$35 - ROM, SA-1, RAM and battery&lt;br /&gt;
===== Sub-Number =====&lt;br /&gt;
==== ROM Size ====&lt;br /&gt;
2^(this value) would be the size of the ROM in kilobytes. For example, for 512KB, this should be #$09.&lt;br /&gt;
&lt;br /&gt;
==== RAM Size ====&lt;br /&gt;
2^(this value) would be the size of the SRAM (if present) in kilobytes. Maximum supported value is #$07.&lt;br /&gt;
&lt;br /&gt;
Exception: If you&#039;re using SuperFX aka GSU-1, move this value to the Expansion RAM Size field, and put #$00 in this byte.&lt;br /&gt;
&lt;br /&gt;
=== Destination Code ===&lt;br /&gt;
Where the game is intended to be sold. Common values: #$00 - Japan; #$01 - USA; #$02 - Europe (enables 50fps PAL mode)&lt;br /&gt;
=== Mask ROM Version ===&lt;br /&gt;
=== ROM Verification ===&lt;br /&gt;
==== Complement Check ====&lt;br /&gt;
This is the 16-bit complement (bit-inverse) of the checksum. This is used so that the checksum value cancels itself out when calculating the real checksum.&lt;br /&gt;
==== Check Sum ====&lt;br /&gt;
This is simply the 16-bit sum of all bytes in the ROM. For power-of-2-sized ROMs, no mirroring is used, each byte of ROM is counted exactly once.&lt;br /&gt;
&lt;br /&gt;
For non-power-of-2-sized ROMs (e.g. 2.5MB or 6MB), first the checksum for the largest power-of-2 area smaller than the ROM size (so 4MB for 6MB ROMs, 2MB for 2.5MB ROMs) is computed normally. Then the remaining part is repeated until it&#039;s the same size as the first part (so the last 2MB of a 6MB ROM is repeated once so both halves are 4MB, and the last 512KB of a 2.5MB ROM is repeated 4 times so both halves are 2MB). Then its checksum is computed and the checksums of the 2 halves are added to get the final checksum.&lt;br /&gt;
&lt;br /&gt;
== CPU Exception Vectors ==&lt;br /&gt;
&lt;br /&gt;
The vectors from $00:FFE0-$00:FFEF are used when the SNES is running in native mode, while the vectors from $00:FFF0-$00:FFFF are used when the SNES is running in emulation mode. Note that ABORT is technically unused, but listed for completion.&lt;br /&gt;
&lt;br /&gt;
Also note that the vectors are only 16 bits wide, so they can only jump to addresses within bank $00. If you want to jump to a different bank, or you need FastROM addressing, point them to a JML instruction. With WRAM being mapped at $0000-$1FFF on bank $00, it&#039;s possible to point them on that range, being an interesting option for run-time code modification.&lt;br /&gt;
&lt;br /&gt;
Certain enhancement chips like [[SA-1]] and [[Super FX]] can override the CPU vectors on special occasions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Length !! Mode !! Vector&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE0 || 4 bytes || Native || &#039;&#039;unused&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE4 || 2 bytes || Native || COP&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE6 || 2 bytes || Native || BRK&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE8 || 2 bytes || Native || ABORT&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFEA || 2 bytes || Native || NMI&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFEC || 2 bytes || Native || &#039;&#039;unused&#039;&#039; (would be RESET, but the SNES always boots in Emulation mode)&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFEE || 2 bytes || Native || IRQ&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF0 || 4 bytes || Emulation || &#039;&#039;unused&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF4 || 2 bytes || Emulation || COP&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF6 || 2 bytes || Emulation || &#039;&#039;unused&#039;&#039; (would be BRK, but BRK and IRQ share the same vector in Emulation mode)&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF8 || 2 bytes || Emulation || ABORT&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFFA || 2 bytes || Emulation || NMI&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFFC || 2 bytes || Emulation || RESET&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFFE || 2 bytes || Emulation || IRQ/BRK&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=SNES_ROM_Header&amp;diff=2069</id>
		<title>SNES ROM Header</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=SNES_ROM_Header&amp;diff=2069"/>
		<updated>2021-09-17T21:11:50Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All [[SNES]] gamepaks have an internal header that is used to identifying the game, producer, region and technical aspects of the ROM. It&#039;s often referred as &#039;&#039;&#039;Internal ROM Header&#039;&#039;&#039; or &#039;&#039;&#039;SNES Software Specification&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Although it&#039;s not required to run a game on real hardware, the SNES ROM Header was used during the Nintendo approval process for validation and it&#039;s also used by the SNES emulators to identify and determine the memory layout and ROM type.&lt;br /&gt;
&lt;br /&gt;
The data starts at SNES address $00:FFB0 and ends at $00:FFDF. $00:FFE0 though $00:FFFF contains the SNES vector information and &#039;&#039;&#039;it&#039;s actually used&#039;&#039;&#039; by the SNES CPU to determine where to execute when an interrupt occurs.&lt;br /&gt;
&lt;br /&gt;
== ROM Registration Data ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Length !! Data Name Type&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFB0 || 2 bytes || Maker Code&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFB2 || 4 bytes || Game Code&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFB6 || 7 bytes || Fixed Value&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFBD || 1 byte || Expansion RAM Size&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFBE || 1 byte || Special Version&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFBF || 1 byte || Cartridge Type (Sub-number)&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFC0 || 21 bytes || Game Title Registration&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD5 || 1 byte || Map Mode&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD6 || 1 byte || Cartridge Type&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD7 || 1 byte || ROM Size&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD8 || 1 byte || RAM Size&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD9 || 1 byte || Destination Code&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDA || 1 byte || Fixed Value&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDB || 1 byte || Mask ROM Version&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDC || 2 bytes || Complement Check&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDE || 2 bytes || Check Sum&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Data Name Types ==&lt;br /&gt;
&lt;br /&gt;
=== Maker Code ===&lt;br /&gt;
=== Game Code ===&lt;br /&gt;
=== Fixed Value ===&lt;br /&gt;
The fixed value bytes should be #$00.&lt;br /&gt;
=== Expansion RAM Size ===&lt;br /&gt;
Should be #$00 for most roms. For the exception, see RAM Size.&lt;br /&gt;
=== Special Version ===&lt;br /&gt;
Should be #$00.&lt;br /&gt;
=== Game Title Specification ===&lt;br /&gt;
The game title is 21 bytes long, encoded with the [https://en.wikipedia.org/wiki/JIS_X_0201 JIS X 0201] character set (which consists of standard ASCII plus katakana). If the title is shorter than 21 bytes, then the remainder should be padded with spaces (0x20).&lt;br /&gt;
&lt;br /&gt;
=== Cartridge Configuration ===&lt;br /&gt;
==== Map Mode ====&lt;br /&gt;
Common values: #$20 - 2.68MHz LoROM, #$21 - 2.68MHz HiROM, #$23 - SA-1; #$25 - 2.68MHz ExHiROM; #$30 - 3.58MHz LoROM, #$31 - 3.58MHz HiROM; #$35 - 3.58MHz ExHiROM&lt;br /&gt;
==== Cartridge Type ====&lt;br /&gt;
Common values: #$00 - ROM only; #$01 - ROM and RAM; #$02 - ROM, RAM and battery; #$33 - ROM and SA-1; #$34 - ROM, SA-1 and RAM; #$35 - ROM, SA-1, RAM and battery&lt;br /&gt;
===== Sub-Number =====&lt;br /&gt;
==== ROM Size ====&lt;br /&gt;
2^(this value) would be the size of the ROM in kilobytes. For example, for 512KB, this should be #$09.&lt;br /&gt;
&lt;br /&gt;
==== RAM Size ====&lt;br /&gt;
2^(this value) would be the size of the SRAM (if present) in kilobytes. Maximum supported value is #$07.&lt;br /&gt;
&lt;br /&gt;
Exception: If you&#039;re using SuperFX aka GSU-1, move this value to the Expansion RAM Size field, and put #$00 in this byte.&lt;br /&gt;
&lt;br /&gt;
=== Destination Code ===&lt;br /&gt;
Where the game is intended to be sold. Common values: #$00 - Japan; #$01 - USA; #$02 - Europe (enables 50fps PAL mode)&lt;br /&gt;
=== Mask ROM Version ===&lt;br /&gt;
=== ROM Verification ===&lt;br /&gt;
==== Complement Check ====&lt;br /&gt;
This is the 16-bit complement (bit-inverse) of the checksum. This is used so that the checksum value cancels itself out when calculating the real checksum.&lt;br /&gt;
==== Check Sum ====&lt;br /&gt;
This is simply the 16-bit sum of all bytes in the ROM. For power-of-2-sized ROMs, no mirroring is used, each byte of ROM is counted exactly once.&lt;br /&gt;
&lt;br /&gt;
For non-power-of-2-sized ROMs (e.g. 2.5MB or 6MB), first the checksum for the largest power-of-2 area smaller than the ROM size (so 4MB for 6MB ROMs, 2MB for 2.5MB ROMs) is computed normally. Then the remaining part is repeated until it&#039;s the same size as the first part (so the last 2MB of a 6MB ROM is repeated once so both halves are 4MB, and the last 512KB of a 2.5MB ROM is repeated 4 times so both halves are 2MB). Then its checksum is computed and the checksums of the 2 halves are added to get the final checksum.&lt;br /&gt;
&lt;br /&gt;
== CPU Exception Vectors ==&lt;br /&gt;
&lt;br /&gt;
The vectors from $00:FFE0-$00:FFEF are used when the SNES is running in native mode, while the vectors from $00:FFF0-$00:FFFF are used when the SNES is running in emulation mode. Note that ABORT is technically unused, but listed for completion.&lt;br /&gt;
&lt;br /&gt;
Also note that the vectors are only 16 bits wide, so they can only jump to addresses within bank $00. If you want to jump to a different bank, or you need FastROM addressing, point them to a JML instruction. With WRAM being mapped at $0000-$1FFF on bank $00, it&#039;s possible to point them on that range, being an interesting option for run-time code modification.&lt;br /&gt;
&lt;br /&gt;
Certain enhancement chips like [[SA-1]] and [[Super FX]] can override the CPU vectors on special occasions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Length !! Mode !! Vector&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE0 || 4 bytes || Native || &#039;&#039;unused&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE4 || 2 bytes || Native || COP&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE6 || 2 bytes || Native || BRK&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE8 || 2 bytes || Native || ABORT&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFEA || 2 bytes || Native || NMI&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFEC || 2 bytes || Native || &#039;&#039;unused&#039;&#039; (would be RESET, but the SNES always boots in Emulation mode)&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFEE || 2 bytes || Native || IRQ&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF0 || 4 bytes || Emulation || &#039;&#039;unused&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF4 || 2 bytes || Emulation || COP&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF6 || 2 bytes || Emulation || &#039;&#039;unused&#039;&#039; (would be BRK, but BRK and IRQ share the same vector in Emulation mode)&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF8 || 2 bytes || Emulation || ABORT&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFFA || 2 bytes || Emulation || NMI&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFFC || 2 bytes || Emulation || RESET&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFFE || 2 bytes || Emulation || IRQ/BRK&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=SNES_ROM_Header&amp;diff=2068</id>
		<title>SNES ROM Header</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=SNES_ROM_Header&amp;diff=2068"/>
		<updated>2021-09-17T21:07:27Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All [[SNES]] gamepaks have an internal header that is used to identifying the game, producer, region and technical aspects of the ROM. It&#039;s often referred as &#039;&#039;&#039;Internal ROM Header&#039;&#039;&#039; or &#039;&#039;&#039;SNES Software Specification&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Although it&#039;s not required to run a game on real hardware, the SNES ROM Header was used during the Nintendo approval process for validation and it&#039;s also used by the SNES emulators to identify and determine the memory layout and ROM type.&lt;br /&gt;
&lt;br /&gt;
The data starts at SNES address $00:FFB0 and ends at $00:FFDF. $00:FFE0 though $00:FFFF contains the SNES vector information and &#039;&#039;&#039;it&#039;s actually used&#039;&#039;&#039; by the SNES CPU to determine where to execute when an interrupt occurs.&lt;br /&gt;
&lt;br /&gt;
== ROM Registration Data ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Length !! Data Name Type&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFB0 || 2 bytes || Maker Code&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFB2 || 4 bytes || Game Code&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFB6 || 7 bytes || Fixed Value&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFBD || 1 byte || Expansion RAM Size&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFBE || 1 byte || Special Version&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFBF || 1 byte || Cartridge Type (Sub-number)&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFC0 || 21 bytes || Game Title Registration&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD5 || 1 byte || Map Mode&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD6 || 1 byte || Cartridge Type&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD7 || 1 byte || ROM Size&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD8 || 1 byte || RAM Size&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFD9 || 1 byte || Destination Code&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDA || 1 byte || Fixed Value&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDB || 1 byte || Mask ROM Version&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDC || 2 bytes || Complement Check&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFDE || 2 bytes || Check Sum&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Data Name Types ==&lt;br /&gt;
&lt;br /&gt;
=== Maker Code ===&lt;br /&gt;
=== Game Code ===&lt;br /&gt;
=== Fixed Value ===&lt;br /&gt;
Each of these bytes should be #$00.&lt;br /&gt;
=== Expansion RAM Size ===&lt;br /&gt;
Common values: #$00 - none, #$01 - 2KB, #$03 - 8KB, #$05 - 32KB, #$06 - 64KB, #$07 - 128KB&lt;br /&gt;
=== Special Version ===&lt;br /&gt;
Should be #$00.&lt;br /&gt;
=== Game Title Specification ===&lt;br /&gt;
The game title is 21 bytes long, encoded with the [https://en.wikipedia.org/wiki/JIS_X_0201 JIS X 0201] character set (which consists of standard ASCII plus katakana). If the title is shorter than 21 bytes, then the remainder should be padded with spaces (0x20).&lt;br /&gt;
&lt;br /&gt;
=== Cartridge Configuration ===&lt;br /&gt;
==== Map Mode ====&lt;br /&gt;
Common values: #$20 - 2.68MHz LoROM, #$21 - 2.68MHz HiROM, #$23 - SA-1; #$25 - 2.68MHz ExHiROM; #$30 - 3.58MHz LoROM, #$31 - 3.58MHz HiROM; #$35 - 3.58MHz ExHiROM&lt;br /&gt;
==== Cartridge Type ====&lt;br /&gt;
Common values: #$00 - ROM only; #$01 - ROM and RAM; #$02 - ROM, RAM and battery; #$33 - ROM and SA-1; #$34 - ROM, SA-1 and RAM; #$35 - ROM, SA-1, RAM and battery&lt;br /&gt;
===== Sub-Number =====&lt;br /&gt;
==== ROM Size ====&lt;br /&gt;
2^(this value) would be the size of the ROM in kilobytes. For example, for 512KB, this should be #$09.&lt;br /&gt;
&lt;br /&gt;
==== RAM Size ====&lt;br /&gt;
2^(this value) would be the size of the SRAM (if present) in kilobytes. Maximum supported value is #$07.&lt;br /&gt;
&lt;br /&gt;
=== Destination Code ===&lt;br /&gt;
Where the game is intended to be sold. Common values: #$00 - Japan; #$01 - USA; #$02 - Europe (enables 50fps PAL mode)&lt;br /&gt;
=== Mask ROM Version ===&lt;br /&gt;
=== ROM Verification ===&lt;br /&gt;
==== Complement Check ====&lt;br /&gt;
This is the 16-bit complement (bit-inverse) of the checksum. This is used so that the checksum value cancels itself out when calculating the real checksum.&lt;br /&gt;
==== Check Sum ====&lt;br /&gt;
This is simply the 16-bit sum of all bytes in the ROM. For power-of-2-sized ROMs, no mirroring is used, each byte of ROM is counted exactly once.&lt;br /&gt;
&lt;br /&gt;
For non-power-of-2-sized ROMs (e.g. 2.5MB or 6MB), first the checksum for the largest power-of-2 area smaller than the ROM size (so 4MB for 6MB ROMs, 2MB for 2.5MB ROMs) is computed normally. Then the remaining part is repeated until it&#039;s the same size as the first part (so the last 2MB of a 6MB ROM is repeated once so both halves are 4MB, and the last 512KB of a 2.5MB ROM is repeated 4 times so both halves are 2MB). Then its checksum is computed and the checksums of the 2 halves are added to get the final checksum.&lt;br /&gt;
&lt;br /&gt;
== CPU Exception Vectors ==&lt;br /&gt;
&lt;br /&gt;
The vectors from $00:FFE0-$00:FFEF are used when the SNES is running in native mode, while the vectors from $00:FFF0-$00:FFFF are used when the SNES is running in emulation mode. Note that ABORT is technically unused, but listed for completion.&lt;br /&gt;
&lt;br /&gt;
Also note that the vectors are only 16 bits wide, so they can only jump to addresses within bank $00. If you want to jump to a different bank, or you need FastROM addressing, point them to a JML instruction. With WRAM being mapped at $0000-$1FFF on bank $00, it&#039;s possible to point them on that range, being an interesting option for run-time code modification.&lt;br /&gt;
&lt;br /&gt;
Certain enhancement chips like [[SA-1]] and [[Super FX]] can override the CPU vectors on special occasions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Length !! Mode !! Vector&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE0 || 4 bytes || Native || &#039;&#039;unused&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE4 || 2 bytes || Native || COP&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE6 || 2 bytes || Native || BRK&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFE8 || 2 bytes || Native || ABORT&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFEA || 2 bytes || Native || NMI&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFEC || 2 bytes || Native || &#039;&#039;unused&#039;&#039; (would be RESET, but the SNES always boots in Emulation mode)&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFEE || 2 bytes || Native || IRQ&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF0 || 4 bytes || Emulation || &#039;&#039;unused&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF4 || 2 bytes || Emulation || COP&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF6 || 2 bytes || Emulation || &#039;&#039;unused&#039;&#039; (would be BRK, but BRK and IRQ share the same vector in Emulation mode)&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFF8 || 2 bytes || Emulation || ABORT&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFFA || 2 bytes || Emulation || NMI&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFFC || 2 bytes || Emulation || RESET&lt;br /&gt;
|-&lt;br /&gt;
| $00:FFFE || 2 bytes || Emulation || IRQ/BRK&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=1891</id>
		<title>Bithacks</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=1891"/>
		<updated>2021-04-25T19:25:36Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: /* Clear High Byte of Accumulator */ clearing high byte would be tdc xba. Or just lda #$0000.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bithacks are optimization tricks that utilize information in bits and [https://en.wikipedia.org/wiki/Bit_manipulation bit manipulation]&lt;br /&gt;
to accomplish their tasks. Usually they work in a slightly non-obvious way, (the most famous being the [https://en.wikipedia.org/wiki/Fast_inverse_square_root fast inverse sqrt]), and bit manipulation in general is harder on the 65c816. To that end here is a collection of some useful tricks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note: cycle counts are intended to be a worst case measure.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Math Bithacks =&lt;br /&gt;
== Signed Division By 2 ==&lt;br /&gt;
&#039;&#039;3 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Signed Division By 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; ==&lt;br /&gt;
&#039;&#039;6+n bytes / 6+2n cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; signed division by two, n times&lt;br /&gt;
macro SignedDiv_2N(n)&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BIT.b #$80&amp;gt;&amp;gt;&amp;lt;n&amp;gt;&lt;br /&gt;
	BEQ ?positive&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?positive:&lt;br /&gt;
endmacro&lt;br /&gt;
&lt;br /&gt;
; -1 cycle and +n bytes, but must have N flag set before use&lt;br /&gt;
macro SignedDiv_2N(n)&lt;br /&gt;
	BMI ?negative&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BRA ?end&lt;br /&gt;
?negative:&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?end:&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value ==&lt;br /&gt;
&#039;&#039;5 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (N Flag)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
macro abs()&lt;br /&gt;
	BPL ?plus&lt;br /&gt;
	EOR #$FF&lt;br /&gt;
	INC&lt;br /&gt;
?plus:		; only 3 cycles if branch taken&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Absolute Value (SEC) ==&lt;br /&gt;
&#039;&#039;4 bytes / 4 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (Carry Set)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; compared to the branching version this is 1 byte smaller&lt;br /&gt;
; it&#039;s either 2 cycles slower/faster depending on branch taken&lt;br /&gt;
	EOR #$7F&lt;br /&gt;
;	SEC		; the instant you add this in it becomes worse than the branching version&lt;br /&gt;
	SBC #$7F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Magnitude/Extents Check ==&lt;br /&gt;
&#039;&#039;~7 bytes / 12 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; asks &amp;quot;Is [A] on the zero-side of value [X] or the far side?&amp;quot;&lt;br /&gt;
; good for magnitude checks, smaller *AND* faster than alternatives&lt;br /&gt;
; NOTE: in the event that it is exactly [X] it will have that value at branch&lt;br /&gt;
; doesn&#039;t need to be an indexed CMP but is most useful this way&lt;br /&gt;
; this can be used to combine the BPL and BMI checks for both signs into one&lt;br /&gt;
	SEC : SBC Extents,x&lt;br /&gt;
	EOR Extents,x&lt;br /&gt;
	BMI .zero_side&lt;br /&gt;
.far_side:&lt;br /&gt;
	; do things&lt;br /&gt;
.zero_side:&lt;br /&gt;
	; do things&lt;br /&gt;
&lt;br /&gt;
Extents:&lt;br /&gt;
	db -$23, $23&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Misc. Tricks =&lt;br /&gt;
&amp;lt;small&amp;gt;As this list grows tricks here will be consolidated into their own sections. Clever optimization tricks that aren&#039;t necessarily what someone might personally call a &amp;quot;bithack&amp;quot; are okay here as well!&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clear Low Byte of Accumulator ==&lt;br /&gt;
&#039;&#039;1 byte / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; &amp;quot;Trashes&amp;quot; A but clears low byte&lt;br /&gt;
	TDC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direction/Facing As Index ==&lt;br /&gt;
&#039;&#039;4 bytes / 6 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Ever wonder why facing flags are 0=right and 1=left? This is why. It&#039;s incredibly cheap.&lt;br /&gt;
	ASL&lt;br /&gt;
	ROL&lt;br /&gt;
	AND #$01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skip Dead Code ==&lt;br /&gt;
&#039;&#039;1-2 bytes / 2-3 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; If you need to skip one byte of dead code (due to a hijack or whatever reason) you can use:&lt;br /&gt;
	NOP		; 1 byte, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; But if you need to skip just 2 bytes the most efficient is:&lt;br /&gt;
; NOTE: many times WDM is used as a breakpoint for debugging so only do this as a final pass to speed up your code!&lt;br /&gt;
	WDM		; 2 bytes, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; Finally, if you need to skip a large amount of dead code you can use BRA/JMP instead&lt;br /&gt;
; JMP is as fast as BRA on the SNES CPU, but will be slightly slower on SA-1, and 1 cycle slower on SPC. So BRA is recommended&lt;br /&gt;
; (The extra byte used for JMP in this case doesn&#039;t matter)&lt;br /&gt;
	BRA +		; 2 bytes, 3 cycles&lt;br /&gt;
	; dead code&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check 3 Conditions ==&lt;br /&gt;
&#039;&#039;2 bytes / 2 cycles&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; just the opcode as normal here (not counting the conditions), using any operand that&#039;s not immediate (#)&lt;br /&gt;
; it&#039;s worth noting that you can do up to 3 tests with a single opcode though!&lt;br /&gt;
; Just As A Reminder: the V &amp;amp; N flag are set by the *operand* to BIT not the result of the AND!&lt;br /&gt;
	BIT $00&lt;br /&gt;
	BMI .bit7_set&lt;br /&gt;
	BVS .bit6_set&lt;br /&gt;
	BNE .bit5_set	; assuming #$20 is in $00&lt;br /&gt;
.bit7_set:&lt;br /&gt;
.bit6_set:&lt;br /&gt;
.bit5_set:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=1840</id>
		<title>Bithacks</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=1840"/>
		<updated>2021-04-12T12:59:36Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: /* Math Bithacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bithacks are optimization tricks that utilize information in bits and [https://en.wikipedia.org/wiki/Bit_manipulation bit manipulation]&lt;br /&gt;
to accomplish their tasks. Usually they work in a slightly non-obvious way, (the most famous being the [https://en.wikipedia.org/wiki/Fast_inverse_square_root fast inverse sqrt]), and bit manipulation in general is harder on the 65c816. To that end here is a collection of some useful tricks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note: cycle counts are intended to be a worst case measure.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Math Bithacks ==&lt;br /&gt;
&#039;&#039;&#039;Signed Division By 2&#039;&#039;&#039; &#039;&#039;(3 bytes / 4 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signed Division By 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt;&#039;&#039;&#039; &#039;&#039;(6+n bytes / 6+2n cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; signed division by two, n times&lt;br /&gt;
macro SignedDiv_2N(n)&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BIT.b #$80&amp;gt;&amp;gt;&amp;lt;n&amp;gt;&lt;br /&gt;
	BEQ ?positive&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?positive:&lt;br /&gt;
endmacro&lt;br /&gt;
&lt;br /&gt;
; -1 cycle and +n bytes, but must have N flag set before use&lt;br /&gt;
macro SignedDiv_2N(n)&lt;br /&gt;
	BMI ?negative&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BRA ?end&lt;br /&gt;
?negative:&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	ORA.b #$FF00&amp;gt;&amp;gt;&amp;lt;n&amp;gt;    ; sign extension&lt;br /&gt;
?end:&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Absolute Value&#039;&#039;&#039; &#039;&#039;(5 bytes / 6 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, n&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
macro abs()&lt;br /&gt;
	BPL ?plus&lt;br /&gt;
	EOR #$FF&lt;br /&gt;
	INC&lt;br /&gt;
?plus:		; only 3 cycles if branch taken&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Absolute Value (SEC)&#039;&#039;&#039; &#039;&#039;(4 bytes / 4 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (Carry Set)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; compared to the branching version this is 1 byte smaller&lt;br /&gt;
; it&#039;s either 2 cycles slower/faster depending on branch taken&lt;br /&gt;
	EOR #$7F&lt;br /&gt;
;	SEC		; the instant you add this in it becomes worse than the branching version&lt;br /&gt;
	SBC #$7F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Magnitude/Extents Check&#039;&#039;&#039; &#039;&#039;(~7 bytes / 12 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; asks &amp;quot;Is [A] on the zero-side of value [X] or the far side?&amp;quot;&lt;br /&gt;
; good for magnitude checks, smaller *AND* faster than alternatives&lt;br /&gt;
; NOTE: in the event that it is exactly [X] it will have that value at branch&lt;br /&gt;
; doesn&#039;t need to be an indexed CMP but is most useful this way&lt;br /&gt;
; this can be used to combine the BPL and BMI checks for both signs into one&lt;br /&gt;
	SEC : SBC Extents,x&lt;br /&gt;
	EOR Extents,x&lt;br /&gt;
	BMI .zero_side&lt;br /&gt;
.far_side:&lt;br /&gt;
	; do things&lt;br /&gt;
.zero_side:&lt;br /&gt;
	; do things&lt;br /&gt;
&lt;br /&gt;
Extents:&lt;br /&gt;
	db -$23, $23&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Misc. Tricks ==&lt;br /&gt;
&amp;lt;small&amp;gt;As this list grows tricks here will be consolidated into their own sections. Clever optimization tricks that aren&#039;t necessarily what someone might personally call a &amp;quot;bithack&amp;quot; are okay here as well!&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Direction/Facing As Index&#039;&#039;&#039; &#039;&#039;(4 bytes / 6 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Ever wonder why facing flags are 0=right and 1=left? This is why. It&#039;s incredibly cheap.&lt;br /&gt;
	ASL&lt;br /&gt;
	ROL&lt;br /&gt;
	AND #$01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Skip Dead Code&#039;&#039;&#039; &#039;&#039;(1-2 bytes / 2-3 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; If you need to skip one byte of dead code (due to a hijack or whatever reason) you can use:&lt;br /&gt;
	NOP		; 1 byte, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; But if you need to skip just 2 bytes the most efficient is:&lt;br /&gt;
; NOTE: many times WDM is used as a breakpoint for debugging so only do this as a final pass to speed up your code!&lt;br /&gt;
	WDM		; 2 bytes, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; Finally, if you need to skip a large amount of dead code you can use JMP instead&lt;br /&gt;
; (BRA is just as fast but has less range, it&#039;s advantage is mostly in reducing code size, but that&#039;s not an issue at this point)&lt;br /&gt;
	JMP +		; 3 bytes, 3 cycles&lt;br /&gt;
	; dead code&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Check 3 Conditions&#039;&#039;&#039; &#039;&#039;(2 bytes / 2 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; just the opcode as normal here (not counting the conditions), you can use other operands instead of #$20&lt;br /&gt;
; it&#039;s worth noting that you can do up to 3 tests with a single opcode though!&lt;br /&gt;
; just as a reminder: the V and N flag are set by the *operand* to BIT not the result of the AND!&lt;br /&gt;
; this means you can check the input [A] on bit 6 with #$40 for example&lt;br /&gt;
	BIT #$20&lt;br /&gt;
	BMI .bit7_set&lt;br /&gt;
	BVS .bit6_set&lt;br /&gt;
	BNE .bit5_set&lt;br /&gt;
.bit7_set:&lt;br /&gt;
.bit6_set:&lt;br /&gt;
.bit5_set:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=1837</id>
		<title>Bithacks</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Bithacks&amp;diff=1837"/>
		<updated>2021-04-12T12:42:29Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: /* Math Bithacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bithacks are optimization tricks that utilize information in bits and [https://en.wikipedia.org/wiki/Bit_manipulation bit manipulation]&lt;br /&gt;
to accomplish their tasks. Usually they work in a slightly non-obvious way, (the most famous being the [https://en.wikipedia.org/wiki/Fast_inverse_square_root fast inverse sqrt]), and bit manipulation in general is harder on the 65c816. To that end here is a collection of some useful tricks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note: cycle counts are intended to be a worst case measure.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Math Bithacks ==&lt;br /&gt;
&#039;&#039;&#039;Signed Division By 2&#039;&#039;&#039; &#039;&#039;(3 bytes / 4 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CMP #$80&lt;br /&gt;
	ROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signed Division By 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt;&#039;&#039;&#039; &#039;&#039;(6+2n bytes / 5+2n cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, n&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; signed division by two, n times&lt;br /&gt;
macro SignedDiv_2N(n)&lt;br /&gt;
	BMI ?negative&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	BRA ?end&lt;br /&gt;
?negative:&lt;br /&gt;
	LSR #&amp;lt;n&amp;gt;&lt;br /&gt;
	ORA #($FF&amp;lt;&amp;lt;(8-&amp;lt;n&amp;gt;))	; sign extension&lt;br /&gt;
?end:&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Absolute Value&#039;&#039;&#039; &#039;&#039;(5 bytes / 6 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, n&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
macro abs()&lt;br /&gt;
	BPL ?plus&lt;br /&gt;
	EOR #$FF&lt;br /&gt;
	INC&lt;br /&gt;
?plus:		; only 3 cycles if branch taken&lt;br /&gt;
endmacro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Absolute Value (SEC)&#039;&#039;&#039; &#039;&#039;(4 bytes / 4 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A, (Carry Set)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; compared to the branching version this is 1 byte smaller&lt;br /&gt;
; it&#039;s either 2 cycles slower/faster depending on branch taken&lt;br /&gt;
	EOR #$7F&lt;br /&gt;
;	SEC		; the instant you add this in it becomes worse than the branching version&lt;br /&gt;
	SBC #$7F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Magnitude/Extents Check&#039;&#039;&#039; &#039;&#039;(~7 bytes / 12 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; asks &amp;quot;Is [A] on the zero-side of value [X] or the far side?&amp;quot;&lt;br /&gt;
; good for magnitude checks, smaller *AND* faster than alternatives&lt;br /&gt;
; NOTE: in the event that it is exactly [X] it will have that value at branch&lt;br /&gt;
; doesn&#039;t need to be an indexed CMP but is most useful this way&lt;br /&gt;
; this can be used to combine the BPL and BMI checks for both signs into one&lt;br /&gt;
	SEC : SBC Extents,x&lt;br /&gt;
	EOR Extents,x&lt;br /&gt;
	BMI .zero_side&lt;br /&gt;
.far_side:&lt;br /&gt;
	; do things&lt;br /&gt;
.zero_side:&lt;br /&gt;
	; do things&lt;br /&gt;
&lt;br /&gt;
Extents:&lt;br /&gt;
	db -$23, $23&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Misc. Tricks ==&lt;br /&gt;
&amp;lt;small&amp;gt;As this list grows tricks here will be consolidated into their own sections. Clever optimization tricks that aren&#039;t necessarily what someone might personally call a &amp;quot;bithack&amp;quot; are okay here as well!&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Direction/Facing As Index&#039;&#039;&#039; &#039;&#039;(4 bytes / 6 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Ever wonder why facing flags are 0=right and 1=left? This is why. It&#039;s incredibly cheap.&lt;br /&gt;
	ASL&lt;br /&gt;
	ROL&lt;br /&gt;
	AND #$01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Skip Dead Code&#039;&#039;&#039; &#039;&#039;(1-2 bytes / 2-3 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; If you need to skip one byte of dead code (due to a hijack or whatever reason) you can use:&lt;br /&gt;
	NOP		; 1 byte, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; But if you need to skip just 2 bytes the most efficient is:&lt;br /&gt;
; NOTE: many times WDM is used as a breakpoint for debugging so only do this as a final pass to speed up your code!&lt;br /&gt;
	WDM		; 2 bytes, 2 cycles&lt;br /&gt;
&lt;br /&gt;
; Finally, if you need to skip a large amount of dead code you can use JMP instead&lt;br /&gt;
; (BRA is just as fast but has less range, it&#039;s advantage is mostly in reducing code size, but that&#039;s not an issue at this point)&lt;br /&gt;
	JMP +		; 3 bytes, 3 cycles&lt;br /&gt;
	; dead code&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Check 3 Conditions&#039;&#039;&#039; &#039;&#039;(2 bytes / 2 cycles)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;inputs:&amp;lt;/u&amp;gt; A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;outputs:&amp;lt;/u&amp;gt; (none)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; just the opcode as normal here (not counting the conditions), you can use other operands instead of #$20&lt;br /&gt;
; it&#039;s worth noting that you can do up to 3 tests with a single opcode though!&lt;br /&gt;
; just as a reminder: the V and N flag are set by the *operand* to BIT not the result of the AND!&lt;br /&gt;
; this means you can check the input [A] on bit 6 with #$40 for example&lt;br /&gt;
	BIT #$20&lt;br /&gt;
	BMI .bit7_set&lt;br /&gt;
	BVS .bit6_set&lt;br /&gt;
	BNE .bit5_set&lt;br /&gt;
.bit7_set:&lt;br /&gt;
.bit6_set:&lt;br /&gt;
.bit5_set:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Resource_List&amp;diff=1548</id>
		<title>Resource List</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Resource_List&amp;diff=1548"/>
		<updated>2020-11-22T20:00:02Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: /* Graphics */ compress the rest of the section too&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page links to various resources developed by members of SNESLab until an official resource page is opened along with an uploader. For now, if you have stuff you want exclusive to SNESLab, feel free to link them here. If the list becomes bigger, separate pages may be required alongside here.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: You may remove your own resources at any time.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== ROM Hacks ==&lt;br /&gt;
* P-switch: Nature&#039;s Unnatural Threat [To be released Winter C3 2021]&lt;br /&gt;
&lt;br /&gt;
=== Levels ===&lt;br /&gt;
&lt;br /&gt;
* [[Aerodynamics_City|Aerodynamics City]] by Anorakun;&lt;br /&gt;
&lt;br /&gt;
* [[Blackthorn_Remains|Blackthorn Remains]] by Anorakun;&lt;br /&gt;
&lt;br /&gt;
=== Kaizo Hacks ===&lt;br /&gt;
&lt;br /&gt;
* [[Super_LSG_World|Super LSG World]] by Insanit;&lt;br /&gt;
* [[The_Darkside_REMASTERED|The Darkside REMASTERED]] by Insanit;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
=== General ===&lt;br /&gt;
* [https://github.com/VitorVilela7/SA1-Root SA-1 Root] by [[User:Vitor_Vilela|Vitor Vilela]].&lt;br /&gt;
* [https://github.com/VitorVilela7/SnesSpeedTest SnesSpeedTest] by [[User:Vitor_Vilela|Vitor Vilela]].&lt;br /&gt;
&lt;br /&gt;
== Music ==&lt;br /&gt;
=== Super Mario World ===&lt;br /&gt;
* [https://www.dropbox.com/s/xdt6ao4lzctewse/%5BS%5D%20Mega%20Man%205%20-%20Wily%20Stage%20%2816-bit%29.zip?dl=0 Mega Man 5 - Wily Stage (Power Mario Version)] by [[User:Daizo_Dee_Von|Daizo Dee Von]].&lt;br /&gt;
* [https://www.dropbox.com/s/amkqv6xzfm5kpck/%5BS%5D%20Silent%20Hill%202%20-%20True.zip?dl=0 Silent Hill 2 - True] by Scooter102089 &amp;amp; [[User:Daizo_Dee_Von|Daizo Dee Von]]&lt;br /&gt;
&lt;br /&gt;
==== [https://www.dropbox.com/sh/icsm6ltj3kesqgi/AAApte1jqQNoLu_Q-e2R2thqa?dl=0 Masterlink&#039;s Song Pack] ====&lt;br /&gt;
Note: If any of these comes with &amp;lt;code&amp;gt;#amk 3&amp;lt;/code&amp;gt; at the beginning, you can change it to &amp;lt;code&amp;gt;#amk 2&amp;lt;/code&amp;gt; if you&#039;re using AddmusicK 1.0.8.&lt;br /&gt;
&lt;br /&gt;
* Castlevania: Aria of Sorrow - Castle Corridor [Sampled]&lt;br /&gt;
* Castlevania: Harmony of Dissonance - Chapel of Dissonance [Unsampled]&lt;br /&gt;
* Castlevania: Legends - Highest Castle Floor (Stage 4) 16-bit Remix [Unsampled]&lt;br /&gt;
* CUSTOM (Nox-Kixune) - Pirates [Sampled]&lt;br /&gt;
* Donkey Kong Country - Mine Cart Madness [Sampled]&lt;br /&gt;
* Donkey Kong Country 2: Diddy&#039;s Kong Quest - Boss Bossanova [Unsampled/Sampled]&lt;br /&gt;
* Donkey Kong Country 2: Diddy&#039;s Kong Quest - Token Tango [Sampled]&lt;br /&gt;
* Donkey Kong Land - Flooded Ruins [Sampled]&lt;br /&gt;
* Elevator Action (GBA) - Stage 7 [Sampled]&lt;br /&gt;
* Final Fantasy III - Priestess Aria [Sampled]&lt;br /&gt;
* Final Fantasy V - A New World [Sampled]&lt;br /&gt;
* Final Fantasy V - Clash on the Big Bridge [Sampled]&lt;br /&gt;
* Final Fantasy VI - Kefka&#039;s Tower [Sampled]&lt;br /&gt;
* Final Fantasy VI - Searching for Friends [Unsampled]&lt;br /&gt;
* Final Fantasy VI - The Fierce Battle [Unsampled/Sampled]&lt;br /&gt;
* Final Fantasy VII - Forested Temple [Unsampled]&lt;br /&gt;
* Final Fantasy VII - Still More Fighting [Sampled]&lt;br /&gt;
* Final Fantasy X - Silence Before the Storm [Sampled]&lt;br /&gt;
* Ganbare Goemon 2 - Fortress [Sampled]&lt;br /&gt;
* Golden Sun - Isaac&#039;s Battle Theme [Sampled]&lt;br /&gt;
* Golden Sun - The Elemental Stars [Sampled]&lt;br /&gt;
* Golden Sun, The Lost Age - Felix&#039;s Battle Theme [Sampled]&lt;br /&gt;
* Kirby &amp;amp; The Amazing Mirror - Boss Battle [Sampled]&lt;br /&gt;
* Kirby &amp;amp; The Amazing Mirror - Dark Mind&#039;s Second Form [Sampled] &lt;br /&gt;
* Kirby &amp;amp; The Amazing Mirror - Fighting Dark Mind in the Sky [Sampled] &lt;br /&gt;
* Kirby Dreamland 2 - Dark Castle [Unsampled]&lt;br /&gt;
* Kirby Nightmare in Dreamland - Nightmare Battle (Final Boss) [Sampled]&lt;br /&gt;
* Kirby Nightmare in Dreamland - Rainbow Resort [Sampled]&lt;br /&gt;
* Magical Pop&#039;n - Around the Castle [Unsampled]&lt;br /&gt;
* Mario &amp;amp; Luigi: Super Star Saga - Beanbean Fields [Sampled]&lt;br /&gt;
* Mario &amp;amp; Luigi: Super Star Saga - Bowser&#039;s Castle [Sampled]&lt;br /&gt;
* Mario &amp;amp; Luigi: Super Star Saga - Hoohoo Village [Sampled]&lt;br /&gt;
* Mega Man &amp;amp; Bass - Museum (Intro Stage) [Unsampled]&lt;br /&gt;
* Mega Man Legends - At a Place Nobody Knows [Sampled]&lt;br /&gt;
* Mega Man X - Armored Armadilo [Sampled]&lt;br /&gt;
* Mega Man X2 - Absolute Zero [Sampled]&lt;br /&gt;
* Mega Man X3 - Blizzard Buffalo [Sampled]&lt;br /&gt;
* Mother 3 - Mr. Batty Twist [Sampled]&lt;br /&gt;
* Romancing SaGa 2 - Last Battle [Sampled]&lt;br /&gt;
* Romancing SaGa 3 - Byunei&#039;s Nest [Unsampled]&lt;br /&gt;
* Romancing SaGa 3 - Leonid&#039;s Castle [Unsampled]&lt;br /&gt;
* Romancing SaGa 3 - Podorui/Podol [Unsampled]&lt;br /&gt;
* SaGa 2 - Dreadful Fight (RS3 Arrangement) [Sampled]&lt;br /&gt;
* SaGa Frontier - Battle 2 [Sampled]&lt;br /&gt;
* Secret of Mana - Crystal Forest ~ A Wish [Unsampled]&lt;br /&gt;
* Secret of Mana - Forest ~ Into the Thick of it [Sampled]&lt;br /&gt;
* Secret of Mana - Ice Palace ~ Eight Ringing Bells [Sampled]&lt;br /&gt;
* Secret of Mana - Kakkara Desert ~ Secret of the Arid Sands [Unsampled]&lt;br /&gt;
* Secret of Mana - Pandora ~ Rose and Ghost [Sampled]&lt;br /&gt;
* Secret of Mana - Sage Joch&#039;s Cave ~ The Legend [Unsampled]&lt;br /&gt;
* Secret of Mana - Sunken Continent ~ Star of Darkness [Sampled]&lt;br /&gt;
* Seiken Densetsu 3 (Trials of Mana) - Few Paths Forbidden [Unsampled]&lt;br /&gt;
* Seiken Densetsu 3 (Trials of Mana) - Strange Medicine [Sampled]&lt;br /&gt;
* Super Adventure Island II - Hiya-Hiya Island [Sampled] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Super Bomberman 2 - BGM 2 [Sampled]&lt;br /&gt;
* Super Mario RPG - Fight Against an Armed Boss [Sampled]&lt;br /&gt;
* Super Mario RPG - Fight Against Culex [Sampled]&lt;br /&gt;
* Super Mario World - Title Screen (Beta Festive Remix) [Unsampled]&lt;br /&gt;
* Tales of Phantasia - Biting Cold [Unsampled]&lt;br /&gt;
* Wrecking Crew &#039;98 - Title Screen [Sampled]&lt;br /&gt;
* Xenogears - Faraway Promise [Sampled]&lt;br /&gt;
* Zelda: Majora&#039;s Mask - Song of Healing [Sampled]&lt;br /&gt;
* Zelda: Ocarina of Time/Majora&#039;s Mask - Goron City/Village [Sampled]&lt;br /&gt;
&lt;br /&gt;
==== [https://content.tcdw.net/Ports/ tcdw&#039;s AMK Song Collection] ====&lt;br /&gt;
* Hourai Gakuen no Bouken (Entire OST)&lt;br /&gt;
* Kirby: Nightmare in Dream Land - Forest Stages&lt;br /&gt;
* Kurukuru Kururin - Ocean&lt;br /&gt;
* Shizuku - Search&lt;br /&gt;
* Spanky&#039;s Quest - Ruins&lt;br /&gt;
&lt;br /&gt;
==== Nambona890&#039;s Ports ====&lt;br /&gt;
* [https://www.smwcentral.net/?p=section&amp;amp;a=details&amp;amp;id=14104 Metal Masters - Metal Beat]&lt;br /&gt;
* [https://www.smwcentral.net/?p=section&amp;amp;a=details&amp;amp;id=12825 Cat Planet - Welcome to Cat Planet]&lt;br /&gt;
* [http://namboner.com/ports/Angry%20Video%20Game%20Nerd.zip Angry Video Game Nerd]&lt;br /&gt;
* [http://namboner.com/ports/Azumanga%20Daioh%20Jingle.zip Azumanga Daioh Jingle]&lt;br /&gt;
* [http://namboner.com/ports/Dig%20Dug.zip Dig Dug]&lt;br /&gt;
* [http://namboner.com/ports/Doki%20Doki%20Literature%20Club%20-%20Dreams%20of%20Love%20and%20Literature.zip Doki Doki Literature Club - Dreams of Love and Literature]&lt;br /&gt;
* [http://namboner.com/ports/Jazz%20Jackrabbit%20-%20Medivo.zip Jazz Jackrabbit - Medivo]&lt;br /&gt;
* [http://namboner.com/ports/Jazz%20Jackrabbit%20-%20Tubelectric.zip Jazz Jackrabbit - Tubelectric]&lt;br /&gt;
* [http://namboner.com/ports/Kaizo%203%20Bowser%20Recreation.zip Kaizo 3 Bowser Recreation]&lt;br /&gt;
* [http://namboner.com/ports/Moskau%20Chorus.zip Moskau Chorus]&lt;br /&gt;
* [http://namboner.com/ports/Super%20Mario%20Bros%203%20-%20Bowser%20(NES%20samples).zip Super Mario Bros 3 - Bowser (NES samples)]&lt;br /&gt;
* [http://namboner.com/ports/Takeshi&#039;s%20Challenge.zip Takeshi&#039;s Challenge]&lt;br /&gt;
* [http://namboner.com/ports/Tamagotchi%20-%20Smile%20Game.zip Tamagotchi (GB) - Smile Game]&lt;br /&gt;
* [http://namboner.com/ports/tPORt%20-%20Graphic%20Conveyer.zip tPORt - Graphic Conveyer]&lt;br /&gt;
* [http://namboner.com/ports/tPORt%20-%20Shuric%20Scan.zip tPORt - Shuric Scan]&lt;br /&gt;
&lt;br /&gt;
==== [https://drive.google.com/folderview?id=1yF21dsowr_RNx4jgqh3lwMOf8H7lY9EM KiloMinimo&#039;s Port Pack] ====&lt;br /&gt;
Contents:&lt;br /&gt;
* Aero Fighters - Boss Battle (Sampled) &lt;br /&gt;
* Aero Fighters - Final Boss, Space (Sampled) &lt;br /&gt;
* Desert Strike: Return to the Gulf - Bus Ride to Freedom (Unsampled) &lt;br /&gt;
* Earthbound - The Deep Darkness (Sampled)&lt;br /&gt;
&lt;br /&gt;
==== [https://www.dropbox.com/sh/ytu6fbv2s2bx41r/AAAWKocAkRpq9GeH26eDGeJqa?dl=0 Wakana&#039;s incredibly flawed music matters] ====&lt;br /&gt;
The pack contains the following ports:&lt;br /&gt;
* Gubble 2 - Bizarre 2 [U] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
* Sonic Mania - Studiopolis Act 1 [U] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
* Stardew Valley - Deep in the Woods [U] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
* Touhou 14 - Kobito of the Shining Needle [S] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;For any issues, feedback, or anything about these, feel free to DM me in Discord or @ me in SnesLab Discord, thanks!&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
[https://www.dropbox.com/sh/uuh9adoimna5kno/AAACNHZnjmey2g1pJ31Y5diva?dl=0 Anorakun&#039;s Graphic Rips: ]&lt;br /&gt;
&lt;br /&gt;
* Castlevania III - [https://i.imgur.com/87DBcUC.png Flying Skeleton] (Giant Eerie replacement, redrawn by TheMorganah)&lt;br /&gt;
* Castlevania: Dracula X - [https://i.imgur.com/Hy0Aahh.png Clock Tower]&lt;br /&gt;
* Castlevania: Rondo of Blood - [https://i.imgur.com/V42xkMZ.png Throne Room] &lt;br /&gt;
* Demon&#039;s Crest - [https://i.imgur.com/sbz0ozJ.png Ice Palace (Boss Room)] &lt;br /&gt;
* Earthworm Jim (SNES) - [https://i.imgur.com/uDFIyHG.png New Junk City] &lt;br /&gt;
* Earthworm Jim 2 (SNES) - [https://i.imgur.com/SPNKAqx.png Inflated Head]&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - [https://i.imgur.com/6ctdRrZ.png Former Site of Edo Castle]; [https://i.imgur.com/2Gzs9cR.png Goofy Woods]; [https://i.imgur.com/Mz4yYmf.png Impenetrable Road]; [https://i.imgur.com/mkOarWy.png Kabuki Castle]; Kabuki Castle Tileset ([https://i.imgur.com/teHrTzd.png image 1] / [https://i.imgur.com/rozGk6S.png image 2] / [https://i.imgur.com/Y0b0U5P.png image 3] / [https://i.imgur.com/9f5tOrs.png image 4]); [https://i.imgur.com/yaLRXI8.png Log Bridge Road]; [https://i.imgur.com/yYJ47ZV.png Oyuki Mountain]; [https://i.imgur.com/GvxdKSe.png Samurai Woods]; [https://i.imgur.com/deQHEWk.png Virtual Hell 1];  [https://i.imgur.com/YnAmS8s.png Virtual Hell 2]&lt;br /&gt;
* Ganbare Goemon 3 - Big Bathhouse ([https://i.imgur.com/9A8GbMD.png image 1] / [https://i.imgur.com/loe4mWx.png image 2] / [https://i.imgur.com/zbrCJkV.png image 3]); [https://i.imgur.com/LDvSFyh.png Iga Ninja Mansion]; [https://i.imgur.com/HahiuRV.png Walker Factory (Inside)]; Walker Factory (Outside) ([https://i.imgur.com/cr4GVyz.png image 1] / [https://i.imgur.com/Ej5loXv.png image 2])&lt;br /&gt;
* Ganbare Goemon 4 - [https://i.imgur.com/hcNxnx2.png Aquann Castle (Cavern)]; [https://i.imgur.com/HqfuANt.png Aquann Castle (Underwater)]; [https://i.imgur.com/dUwsRyl.gif Depths Lake] ; [https://i.imgur.com/BpFWMcb.png Desert Forest] ; [https://i.imgur.com/LDvPLc9.png Diver Ridge] ; [https://i.imgur.com/L3K6eGM.png Falling Car] ; [https://i.imgur.com/EApPcHB.png Foresce Castle (Cheerleader Section)]; [https://i.imgur.com/l5THscO.png Kickory Forest] ; [https://i.imgur.com/2EzM8cd.png Qusara Castle (Baseball Scoreboard)]; [https://i.imgur.com/qKOy82C.png Qusara Castle (Baseball Stadium)] ; [https://i.imgur.com/tTRsXK2.png Qusara Castle (Soccer Field)]; Saqqas Forest / Bungee Ridge ([https://i.imgur.com/b7qsfQ0.png image 1] / [https://i.imgur.com/exeLnlS.png image 2] / [https://i.imgur.com/t4LYT2H.png image 3]); [https://i.imgur.com/rKD0Egm.png Snow Ravines]; [https://i.imgur.com/frnEDMP.png Sweah Castle (Alien Crowd)] ; [https://i.imgur.com/vlkHysC.png Sweah Castle (Brick Breaking Room)]; [https://i.imgur.com/DsqY0Sb.png Sweah Castle (Swordplay Training Room)] ; [https://i.imgur.com/zfKhU5W.png Water Road]&lt;br /&gt;
* Ganbare Goemon Uchuu Kaizoku Akogingu - [https://i.imgur.com/wOxwApE.png Mt. Urala&#039;s Forest] ; [https://i.imgur.com/60QfiYt.png Turtle Platforms]&lt;br /&gt;
* Gekisou Sentai Carranger - City [https://i.imgur.com/OYiiiap.png (Image)]&lt;br /&gt;
* Gokujou Parodius (SNES) - Eliza and Neil [https://i.imgur.com/76U671o.png (Image)] ; [https://i.imgur.com/XeQHCjK.png Princess Kaguya] ; Shooting Memories; (Pentaro X Arena) [https://i.imgur.com/4NS6on2.png (image)]; [https://i.imgur.com/S9qQmse.png The Moon (Garden)] &lt;br /&gt;
* Gunstar Heroes - [https://i.imgur.com/d8dAK2X.png Ancient Ruins] ; [https://i.imgur.com/V5g05BG.png Black&#039;s Base] ; [https://i.imgur.com/Quxi7HA.png Rescue Yellow] &lt;br /&gt;
* Illusion of Gaia - [https://i.imgur.com/3f08pLQ.png Dark Gaia]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - [https://i.imgur.com/JX5ytIZ.png Dr. Warumon&#039;s Pig Ship] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;; [https://i.imgur.com/VhJTY6Q.png Fiesta Base (Outside the Temple)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;; Gigantic! Hikaru and Akane ([https://i.imgur.com/JJuZL9w.png image 1] / [https://i.imgur.com/iclfsda.png image 2]); [https://i.imgur.com/VU5Cs8Z.png Goemon Compact Room] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - [https://i.imgur.com/0A7Djh5.png Donburi Fields]; Dr. Mardock&#039;s Trash Ship ([https://i.imgur.com/SMXJzHA.png image 1] / [https://i.imgur.com/hNWsEcf.png image 2]); [https://i.imgur.com/AO74Xly.png Edo (Cookie Area)]; [https://i.imgur.com/4L2nZpV.png Edo (Kabuki Corridor)]; [https://i.imgur.com/d4qWryK.png Edo (Tileset)]; [https://i.imgur.com/swjkgao.png Ghost Lady]; Gigantic! Hikaru and Akane ([https://i.imgur.com/czqF8Fy.png image 1] / [https://i.imgur.com/KoX9nqJ.png image 2]); [https://i.imgur.com/V5RBNKY.png Let&#039;s Play with the Master]; [https://i.imgur.com/niaDKbE.png School (Yard)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;; [https://i.imgur.com/DrPv2MJ.png Temple Master]&lt;br /&gt;
* Mega Man 7 - [https://i.imgur.com/tPmj6k7.png Burst Man (First Section)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Mystical Ninja - [https://i.imgur.com/PN0zUDE.png Horohoro Temple (Lower Half)]; [https://i.imgur.com/Be9rt97.png Horohoro Temple (Upper Half)]; Horohoro Temple Tileset ([https://i.imgur.com/ycj6pib.png image 1] / [https://i.imgur.com/rUmUi1u.png image 2] / [https://i.imgur.com/WV6PgsF.png image 3] / [https://i.imgur.com/1c1nmFB.png image 4] / [https://i.imgur.com/Bsj7kk0.png image 5] / [https://i.imgur.com/XdEmC8U.png image 6]); [https://i.imgur.com/aXCPQ8r.png Iga Ninja Mansion (Dungeon)]; [https://i.imgur.com/5ArLpxb.png Iga Ninja Mansion (Entrance)]; [https://i.imgur.com/prmW0en.png Iga Ninja Mansion (Mountains)]; [https://i.imgur.com/6s5IU81.png Otafuku Army Headquarters]; [https://i.imgur.com/Lv5S71o.png Otafuku Army Headquarters (Slot Machine Room)]; [https://i.imgur.com/UhTDOvO.png Ryukyu Palace (Underwater Tunnel)]&lt;br /&gt;
* Ninja Warriors - [https://i.imgur.com/MGgLGb9.png Tank] &lt;br /&gt;
* Osman (Arcade) - [https://i.imgur.com/43Tn8t5.png Red Sky]&lt;br /&gt;
* Quattro Arcade: Go! Dizzy Go! (Bootleg) - [https://i.imgur.com/KqXpmax.png Castle Walls] ; [https://i.imgur.com/fUYXVUs.png Mountains]; [https://i.imgur.com/3bZFhSA.png Woods] &lt;br /&gt;
* Romancing SaGa 3 - [https://i.imgur.com/mHrrOHA.png Magical Tank Battle (Magical Tanks)]&lt;br /&gt;
* Sexy Parodius - [https://i.imgur.com/rAf7h9d.png Gigantic Medusa] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Sonic Mania - [https://i.imgur.com/DOtslKP.png Press Garden Zone Act 2 (Lanterns)]&lt;br /&gt;
* The Legendary Stafy 2 - [https://i.imgur.com/Zn5fadC.png Stage 2-3 (Night)]&lt;br /&gt;
* Treasure Hunter G - [https://i.imgur.com/2Or3sx3.png Aged Cave (Ferric Falcon)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://www.mediafire.com/folder/28rdo0vn6zrid/SMW+Graphics Insanit&#039;s Graphics]&lt;br /&gt;
&lt;br /&gt;
* Geometry Dash - [https://imgur.com/RxG3Ulf Stereo Madness]&lt;br /&gt;
* Super Mario World - [https://imgur.com/CxDJCb2 Giant Muncher]&lt;br /&gt;
&lt;br /&gt;
== ASM ==&lt;br /&gt;
=== Patches: ===&lt;br /&gt;
==== Super Mario World: ====&lt;br /&gt;
* [https://github.com/TheLX5/Cappy Cappy] by lx5.&lt;br /&gt;
* [https://github.com/TheLX5/Powerups Powerups Patch] by lx5.&lt;br /&gt;
* [https://github.com/VitorVilela7/SA1-Pack SA-1 Pack] by [[User:Vitor_Vilela|Vitor Vilela]].&lt;br /&gt;
* [https://github.com/TheLX5/Star-Coins Star Coins] by lx5. (Unfinished)&lt;br /&gt;
&lt;br /&gt;
=== Sprites: ===&lt;br /&gt;
==== Super Mario World: ====&lt;br /&gt;
* [https://github.com/TheLX5/SMW-Sprites/tree/master/Cosmic%20Clone Cosmic Clones] by lx5.&lt;br /&gt;
* [https://github.com/TheLX5/SMW-Sprites/tree/master/Fire%20Bones Fire Drybones] by lx5.&lt;br /&gt;
* [http://namboner.com/myfilehostingshit/YILiftBetter.zip Yoshi&#039;s Island Lifts] by Carol, fixed and improved by Nambona890.&lt;br /&gt;
* [http://www.mediafire.com/file/iaykyfak188iz2w/Giant_Thwomp.zip/file Giant Thwomp] by Imamelia, converted and updated by Insanit.&lt;br /&gt;
* [http://www.mediafire.com/file/jtj9sx97pv4eod4/Giant_Bowser_Statue.zip/file Giant Bowser Statue] by Imamelia, converted and updated by Insanit.&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Resource_List&amp;diff=1547</id>
		<title>Resource List</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Resource_List&amp;diff=1547"/>
		<updated>2020-11-22T19:41:29Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: /* Graphics */ compress this list a little&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page links to various resources developed by members of SNESLab until an official resource page is opened along with an uploader. For now, if you have stuff you want exclusive to SNESLab, feel free to link them here. If the list becomes bigger, separate pages may be required alongside here.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: You may remove your own resources at any time.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== ROM Hacks ==&lt;br /&gt;
* P-switch: Nature&#039;s Unnatural Threat [To be released Winter C3 2021]&lt;br /&gt;
&lt;br /&gt;
=== Levels ===&lt;br /&gt;
&lt;br /&gt;
* [[Aerodynamics_City|Aerodynamics City]] by Anorakun;&lt;br /&gt;
&lt;br /&gt;
* [[Blackthorn_Remains|Blackthorn Remains]] by Anorakun;&lt;br /&gt;
&lt;br /&gt;
=== Kaizo Hacks ===&lt;br /&gt;
&lt;br /&gt;
* [[Super_LSG_World|Super LSG World]] by Insanit;&lt;br /&gt;
* [[The_Darkside_REMASTERED|The Darkside REMASTERED]] by Insanit;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
=== General ===&lt;br /&gt;
* [https://github.com/VitorVilela7/SA1-Root SA-1 Root] by [[User:Vitor_Vilela|Vitor Vilela]].&lt;br /&gt;
* [https://github.com/VitorVilela7/SnesSpeedTest SnesSpeedTest] by [[User:Vitor_Vilela|Vitor Vilela]].&lt;br /&gt;
&lt;br /&gt;
== Music ==&lt;br /&gt;
=== Super Mario World ===&lt;br /&gt;
* [https://www.dropbox.com/s/xdt6ao4lzctewse/%5BS%5D%20Mega%20Man%205%20-%20Wily%20Stage%20%2816-bit%29.zip?dl=0 Mega Man 5 - Wily Stage (Power Mario Version)] by [[User:Daizo_Dee_Von|Daizo Dee Von]].&lt;br /&gt;
* [https://www.dropbox.com/s/amkqv6xzfm5kpck/%5BS%5D%20Silent%20Hill%202%20-%20True.zip?dl=0 Silent Hill 2 - True] by Scooter102089 &amp;amp; [[User:Daizo_Dee_Von|Daizo Dee Von]]&lt;br /&gt;
&lt;br /&gt;
==== [https://www.dropbox.com/sh/icsm6ltj3kesqgi/AAApte1jqQNoLu_Q-e2R2thqa?dl=0 Masterlink&#039;s Song Pack] ====&lt;br /&gt;
Note: If any of these comes with &amp;lt;code&amp;gt;#amk 3&amp;lt;/code&amp;gt; at the beginning, you can change it to &amp;lt;code&amp;gt;#amk 2&amp;lt;/code&amp;gt; if you&#039;re using AddmusicK 1.0.8.&lt;br /&gt;
&lt;br /&gt;
* Castlevania: Aria of Sorrow - Castle Corridor [Sampled]&lt;br /&gt;
* Castlevania: Harmony of Dissonance - Chapel of Dissonance [Unsampled]&lt;br /&gt;
* Castlevania: Legends - Highest Castle Floor (Stage 4) 16-bit Remix [Unsampled]&lt;br /&gt;
* CUSTOM (Nox-Kixune) - Pirates [Sampled]&lt;br /&gt;
* Donkey Kong Country - Mine Cart Madness [Sampled]&lt;br /&gt;
* Donkey Kong Country 2: Diddy&#039;s Kong Quest - Boss Bossanova [Unsampled/Sampled]&lt;br /&gt;
* Donkey Kong Country 2: Diddy&#039;s Kong Quest - Token Tango [Sampled]&lt;br /&gt;
* Donkey Kong Land - Flooded Ruins [Sampled]&lt;br /&gt;
* Elevator Action (GBA) - Stage 7 [Sampled]&lt;br /&gt;
* Final Fantasy III - Priestess Aria [Sampled]&lt;br /&gt;
* Final Fantasy V - A New World [Sampled]&lt;br /&gt;
* Final Fantasy V - Clash on the Big Bridge [Sampled]&lt;br /&gt;
* Final Fantasy VI - Kefka&#039;s Tower [Sampled]&lt;br /&gt;
* Final Fantasy VI - Searching for Friends [Unsampled]&lt;br /&gt;
* Final Fantasy VI - The Fierce Battle [Unsampled/Sampled]&lt;br /&gt;
* Final Fantasy VII - Forested Temple [Unsampled]&lt;br /&gt;
* Final Fantasy VII - Still More Fighting [Sampled]&lt;br /&gt;
* Final Fantasy X - Silence Before the Storm [Sampled]&lt;br /&gt;
* Ganbare Goemon 2 - Fortress [Sampled]&lt;br /&gt;
* Golden Sun - Isaac&#039;s Battle Theme [Sampled]&lt;br /&gt;
* Golden Sun - The Elemental Stars [Sampled]&lt;br /&gt;
* Golden Sun, The Lost Age - Felix&#039;s Battle Theme [Sampled]&lt;br /&gt;
* Kirby &amp;amp; The Amazing Mirror - Boss Battle [Sampled]&lt;br /&gt;
* Kirby &amp;amp; The Amazing Mirror - Dark Mind&#039;s Second Form [Sampled] &lt;br /&gt;
* Kirby &amp;amp; The Amazing Mirror - Fighting Dark Mind in the Sky [Sampled] &lt;br /&gt;
* Kirby Dreamland 2 - Dark Castle [Unsampled]&lt;br /&gt;
* Kirby Nightmare in Dreamland - Nightmare Battle (Final Boss) [Sampled]&lt;br /&gt;
* Kirby Nightmare in Dreamland - Rainbow Resort [Sampled]&lt;br /&gt;
* Magical Pop&#039;n - Around the Castle [Unsampled]&lt;br /&gt;
* Mario &amp;amp; Luigi: Super Star Saga - Beanbean Fields [Sampled]&lt;br /&gt;
* Mario &amp;amp; Luigi: Super Star Saga - Bowser&#039;s Castle [Sampled]&lt;br /&gt;
* Mario &amp;amp; Luigi: Super Star Saga - Hoohoo Village [Sampled]&lt;br /&gt;
* Mega Man &amp;amp; Bass - Museum (Intro Stage) [Unsampled]&lt;br /&gt;
* Mega Man Legends - At a Place Nobody Knows [Sampled]&lt;br /&gt;
* Mega Man X - Armored Armadilo [Sampled]&lt;br /&gt;
* Mega Man X2 - Absolute Zero [Sampled]&lt;br /&gt;
* Mega Man X3 - Blizzard Buffalo [Sampled]&lt;br /&gt;
* Mother 3 - Mr. Batty Twist [Sampled]&lt;br /&gt;
* Romancing SaGa 2 - Last Battle [Sampled]&lt;br /&gt;
* Romancing SaGa 3 - Byunei&#039;s Nest [Unsampled]&lt;br /&gt;
* Romancing SaGa 3 - Leonid&#039;s Castle [Unsampled]&lt;br /&gt;
* Romancing SaGa 3 - Podorui/Podol [Unsampled]&lt;br /&gt;
* SaGa 2 - Dreadful Fight (RS3 Arrangement) [Sampled]&lt;br /&gt;
* SaGa Frontier - Battle 2 [Sampled]&lt;br /&gt;
* Secret of Mana - Crystal Forest ~ A Wish [Unsampled]&lt;br /&gt;
* Secret of Mana - Forest ~ Into the Thick of it [Sampled]&lt;br /&gt;
* Secret of Mana - Ice Palace ~ Eight Ringing Bells [Sampled]&lt;br /&gt;
* Secret of Mana - Kakkara Desert ~ Secret of the Arid Sands [Unsampled]&lt;br /&gt;
* Secret of Mana - Pandora ~ Rose and Ghost [Sampled]&lt;br /&gt;
* Secret of Mana - Sage Joch&#039;s Cave ~ The Legend [Unsampled]&lt;br /&gt;
* Secret of Mana - Sunken Continent ~ Star of Darkness [Sampled]&lt;br /&gt;
* Seiken Densetsu 3 (Trials of Mana) - Few Paths Forbidden [Unsampled]&lt;br /&gt;
* Seiken Densetsu 3 (Trials of Mana) - Strange Medicine [Sampled]&lt;br /&gt;
* Super Adventure Island II - Hiya-Hiya Island [Sampled] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Super Bomberman 2 - BGM 2 [Sampled]&lt;br /&gt;
* Super Mario RPG - Fight Against an Armed Boss [Sampled]&lt;br /&gt;
* Super Mario RPG - Fight Against Culex [Sampled]&lt;br /&gt;
* Super Mario World - Title Screen (Beta Festive Remix) [Unsampled]&lt;br /&gt;
* Tales of Phantasia - Biting Cold [Unsampled]&lt;br /&gt;
* Wrecking Crew &#039;98 - Title Screen [Sampled]&lt;br /&gt;
* Xenogears - Faraway Promise [Sampled]&lt;br /&gt;
* Zelda: Majora&#039;s Mask - Song of Healing [Sampled]&lt;br /&gt;
* Zelda: Ocarina of Time/Majora&#039;s Mask - Goron City/Village [Sampled]&lt;br /&gt;
&lt;br /&gt;
==== [https://content.tcdw.net/Ports/ tcdw&#039;s AMK Song Collection] ====&lt;br /&gt;
* Hourai Gakuen no Bouken (Entire OST)&lt;br /&gt;
* Kirby: Nightmare in Dream Land - Forest Stages&lt;br /&gt;
* Kurukuru Kururin - Ocean&lt;br /&gt;
* Shizuku - Search&lt;br /&gt;
* Spanky&#039;s Quest - Ruins&lt;br /&gt;
&lt;br /&gt;
==== Nambona890&#039;s Ports ====&lt;br /&gt;
* [https://www.smwcentral.net/?p=section&amp;amp;a=details&amp;amp;id=14104 Metal Masters - Metal Beat]&lt;br /&gt;
* [https://www.smwcentral.net/?p=section&amp;amp;a=details&amp;amp;id=12825 Cat Planet - Welcome to Cat Planet]&lt;br /&gt;
* [http://namboner.com/ports/Angry%20Video%20Game%20Nerd.zip Angry Video Game Nerd]&lt;br /&gt;
* [http://namboner.com/ports/Azumanga%20Daioh%20Jingle.zip Azumanga Daioh Jingle]&lt;br /&gt;
* [http://namboner.com/ports/Dig%20Dug.zip Dig Dug]&lt;br /&gt;
* [http://namboner.com/ports/Doki%20Doki%20Literature%20Club%20-%20Dreams%20of%20Love%20and%20Literature.zip Doki Doki Literature Club - Dreams of Love and Literature]&lt;br /&gt;
* [http://namboner.com/ports/Jazz%20Jackrabbit%20-%20Medivo.zip Jazz Jackrabbit - Medivo]&lt;br /&gt;
* [http://namboner.com/ports/Jazz%20Jackrabbit%20-%20Tubelectric.zip Jazz Jackrabbit - Tubelectric]&lt;br /&gt;
* [http://namboner.com/ports/Kaizo%203%20Bowser%20Recreation.zip Kaizo 3 Bowser Recreation]&lt;br /&gt;
* [http://namboner.com/ports/Moskau%20Chorus.zip Moskau Chorus]&lt;br /&gt;
* [http://namboner.com/ports/Super%20Mario%20Bros%203%20-%20Bowser%20(NES%20samples).zip Super Mario Bros 3 - Bowser (NES samples)]&lt;br /&gt;
* [http://namboner.com/ports/Takeshi&#039;s%20Challenge.zip Takeshi&#039;s Challenge]&lt;br /&gt;
* [http://namboner.com/ports/Tamagotchi%20-%20Smile%20Game.zip Tamagotchi (GB) - Smile Game]&lt;br /&gt;
* [http://namboner.com/ports/tPORt%20-%20Graphic%20Conveyer.zip tPORt - Graphic Conveyer]&lt;br /&gt;
* [http://namboner.com/ports/tPORt%20-%20Shuric%20Scan.zip tPORt - Shuric Scan]&lt;br /&gt;
&lt;br /&gt;
==== [https://drive.google.com/folderview?id=1yF21dsowr_RNx4jgqh3lwMOf8H7lY9EM KiloMinimo&#039;s Port Pack] ====&lt;br /&gt;
Contents:&lt;br /&gt;
* Aero Fighters - Boss Battle (Sampled) &lt;br /&gt;
* Aero Fighters - Final Boss, Space (Sampled) &lt;br /&gt;
* Desert Strike: Return to the Gulf - Bus Ride to Freedom (Unsampled) &lt;br /&gt;
* Earthbound - The Deep Darkness (Sampled)&lt;br /&gt;
&lt;br /&gt;
==== [https://www.dropbox.com/sh/ytu6fbv2s2bx41r/AAAWKocAkRpq9GeH26eDGeJqa?dl=0 Wakana&#039;s incredibly flawed music matters] ====&lt;br /&gt;
The pack contains the following ports:&lt;br /&gt;
* Gubble 2 - Bizarre 2 [U] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
* Sonic Mania - Studiopolis Act 1 [U] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
* Stardew Valley - Deep in the Woods [U] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
* Touhou 14 - Kobito of the Shining Needle [S] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;For any issues, feedback, or anything about these, feel free to DM me in Discord or @ me in SnesLab Discord, thanks!&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
[https://www.dropbox.com/sh/uuh9adoimna5kno/AAACNHZnjmey2g1pJ31Y5diva?dl=0 Anorakun&#039;s Graphic Rips: ]&lt;br /&gt;
&lt;br /&gt;
* Castlevania III - Flying Skeleton (Giant Eerie replacement, redrawn by TheMorganah); [https://i.imgur.com/87DBcUC.png (Image)]&lt;br /&gt;
* Castlevania: Dracula X - Clock Tower; [https://i.imgur.com/Hy0Aahh.png (Image)]&lt;br /&gt;
* Castlevania: Rondo of Blood - Throne Room; [https://i.imgur.com/V42xkMZ.png (Image)] &lt;br /&gt;
* Demon&#039;s Crest - Ice Palace (Boss Room); [https://i.imgur.com/sbz0ozJ.png (Image)] &lt;br /&gt;
* Earthworm Jim (SNES) - New Junk City; [https://i.imgur.com/uDFIyHG.png (Image)] &lt;br /&gt;
* Earthworm Jim 2 (SNES) - Inflated Head; [https://i.imgur.com/SPNKAqx.png (Image)]&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - [https://i.imgur.com/6ctdRrZ.png Former Site of Edo Castle]; [https://i.imgur.com/2Gzs9cR.png Goofy Woods]; [https://i.imgur.com/Mz4yYmf.png Impenetrable Road]; [https://i.imgur.com/mkOarWy.png Kabuki Castle]; Kabuki Castle Tileset ([https://i.imgur.com/teHrTzd.png image 1] / [https://i.imgur.com/rozGk6S.png image 2] / [https://i.imgur.com/Y0b0U5P.png image 3] / [https://i.imgur.com/9f5tOrs.png image 4]); [https://i.imgur.com/yaLRXI8.png Log Bridge Road]; [https://i.imgur.com/yYJ47ZV.png Oyuki Mountain]; [https://i.imgur.com/GvxdKSe.png Samurai Woods]; [https://i.imgur.com/deQHEWk.png Virtual Hell 1];  [https://i.imgur.com/YnAmS8s.png Virtual Hell 2]&lt;br /&gt;
* Ganbare Goemon 3 - Big Bathhouse; [https://i.imgur.com/9A8GbMD.png (Image)] [https://i.imgur.com/loe4mWx.png (Image)] [https://i.imgur.com/zbrCJkV.png (Image)]&lt;br /&gt;
* Ganbare Goemon 3 - Iga Ninja Mansion; [https://i.imgur.com/LDvSFyh.png (Image)]&lt;br /&gt;
* Ganbare Goemon 3 - Walker Factory (Inside); [https://i.imgur.com/HahiuRV.png (Image)]&lt;br /&gt;
* Ganbare Goemon 3 - Walker Factory (Outside); [https://i.imgur.com/cr4GVyz.png (Image)] [https://i.imgur.com/Ej5loXv.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Aquann Castle (Cavern); [https://i.imgur.com/hcNxnx2.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Aquann Castle (Underwater); [https://i.imgur.com/HqfuANt.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Depths Lake; [https://i.imgur.com/dUwsRyl.gif (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Desert Forest; [https://i.imgur.com/BpFWMcb.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Diver Ridge; [https://i.imgur.com/LDvPLc9.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Falling Car; [https://i.imgur.com/L3K6eGM.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Foresce Castle (Cheerleader Section); [https://i.imgur.com/EApPcHB.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Kickory Forest; [https://i.imgur.com/l5THscO.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Qusara Castle (Baseball Scoreboard); [https://i.imgur.com/2EzM8cd.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Qusara Castle (Baseball Stadium); [https://i.imgur.com/qKOy82C.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Qusara Castle (Soccer Field); [https://i.imgur.com/tTRsXK2.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Saqqas Forest / Bungee Ridge; [https://i.imgur.com/b7qsfQ0.png (Image)] [https://i.imgur.com/exeLnlS.png (Image)] [https://i.imgur.com/t4LYT2H.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Snow Ravines; [https://i.imgur.com/rKD0Egm.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Sweah Castle (Alien Crowd); [https://i.imgur.com/frnEDMP.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Sweah Castle (Brick Breaking Room); [https://i.imgur.com/vlkHysC.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Sweah Castle (Swordplay Training Room); [https://i.imgur.com/DsqY0Sb.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Water Road; [https://i.imgur.com/zfKhU5W.png (Image)]&lt;br /&gt;
* Ganbare Goemon Uchuu Kaizoku Akogingu - Mt. Urala&#039;s Forest; [https://i.imgur.com/wOxwApE.png (Image)] &lt;br /&gt;
* Ganbare Goemon Uchuu Kaizoku Akogingu - Turtle Platforms; [https://i.imgur.com/60QfiYt.png (Image)]&lt;br /&gt;
* Gekisou Sentai Carranger - City [https://i.imgur.com/OYiiiap.png (Image)]&lt;br /&gt;
* Gokujou Parodius (SNES) - Eliza and Neil [https://i.imgur.com/76U671o.png (Image)] &lt;br /&gt;
* Gokujou Parodius (SNES) - Princess Kaguya; [https://i.imgur.com/XeQHCjK.png (image)] &lt;br /&gt;
* Gokujou Parodius (SNES) - Shooting Memories; (Pentaro X Arena) [https://i.imgur.com/4NS6on2.png (image)]&lt;br /&gt;
* Gokujou Parodius (SNES) - The Moon (Garden); [https://i.imgur.com/S9qQmse.png (image)] &lt;br /&gt;
* Gunstar Heroes - Ancient Ruins; [https://i.imgur.com/d8dAK2X.png (Image)] &lt;br /&gt;
* Gunstar Heroes - Black&#039;s Base; [https://i.imgur.com/V5g05BG.png (Image)] &lt;br /&gt;
* Gunstar Heroes - Rescue Yellow; [https://i.imgur.com/Quxi7HA.png (Image)] &lt;br /&gt;
* Illusion of Gaia - Dark Gaia; [https://i.imgur.com/3f08pLQ.png (Image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - Dr. Warumon&#039;s Pig Ship [https://i.imgur.com/JX5ytIZ.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - Fiesta Base (Outside the Temple); [https://i.imgur.com/VhJTY6Q.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - Gigantic! Hikaru and Akane; [https://i.imgur.com/JJuZL9w.png (image)] [https://i.imgur.com/iclfsda.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - Goemon Compact Room; [https://i.imgur.com/VU5Cs8Z.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Donburi Fields; [https://i.imgur.com/0A7Djh5.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Dr. Mardock&#039;s Trash Ship; [https://i.imgur.com/SMXJzHA.png (image)] [https://i.imgur.com/hNWsEcf.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Edo (Cookie Area); [https://i.imgur.com/AO74Xly.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Edo (Kabuki Corridor); [https://i.imgur.com/4L2nZpV.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Edo (Tileset); [https://i.imgur.com/d4qWryK.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Ghost Lady; [https://i.imgur.com/swjkgao.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Gigantic! Hikaru and Akane; [https://i.imgur.com/czqF8Fy.png (image)] [https://i.imgur.com/KoX9nqJ.png (image)] &lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Let&#039;s Play with the Master; [https://i.imgur.com/V5RBNKY.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - School (Yard); [https://i.imgur.com/niaDKbE.png (image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Temple Master; [https://i.imgur.com/DrPv2MJ.png (image)]&lt;br /&gt;
* Mega Man 7 - Burst Man (First Section); [https://i.imgur.com/tPmj6k7.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Mystical Ninja - Horohoro Temple (Lower Half); [https://i.imgur.com/PN0zUDE.png (Image)]&lt;br /&gt;
* Mystical Ninja - Horohoro Temple (Upper Half); [https://i.imgur.com/Be9rt97.png (Image)]&lt;br /&gt;
* Mystical Ninja - Horohoro Temple Tileset; [https://i.imgur.com/ycj6pib.png (Image)] [https://i.imgur.com/rUmUi1u.png (Image)] [https://i.imgur.com/WV6PgsF.png (Image)] [https://i.imgur.com/1c1nmFB.png (Image)] [https://i.imgur.com/Bsj7kk0.png (Image)] [https://i.imgur.com/XdEmC8U.png (Image)]&lt;br /&gt;
* Mystical Ninja - Iga Ninja Mansion (Dungeon); [https://i.imgur.com/aXCPQ8r.png (Image)]&lt;br /&gt;
* Mystical Ninja - Iga Ninja Mansion (Entrance); [https://i.imgur.com/5ArLpxb.png (Image)]&lt;br /&gt;
* Mystical Ninja - Iga Ninja Mansion (Mountains); [https://i.imgur.com/prmW0en.png (Image)]&lt;br /&gt;
* Mystical Ninja - Otafuku Army Headquarters; [https://i.imgur.com/6s5IU81.png (Image)]&lt;br /&gt;
* Mystical Ninja - Otafuku Army Headquarters (Slot Machine Room); [https://i.imgur.com/Lv5S71o.png (Image)]&lt;br /&gt;
* Mystical Ninja - Ryukyu Palace (Underwater Tunnel); [https://i.imgur.com/UhTDOvO.png (Image)]&lt;br /&gt;
* Ninja Warriors - Tank; [https://i.imgur.com/MGgLGb9.png (Image)] &lt;br /&gt;
* Osman (Arcade) - Red Sky; [https://i.imgur.com/43Tn8t5.png (Image)]&lt;br /&gt;
* Quattro Arcade: Go! Dizzy Go! (Bootleg) - Castle Walls; [https://i.imgur.com/KqXpmax.png (image)] &lt;br /&gt;
* Quattro Arcade: Go! Dizzy Go! (Bootleg) - Mountains; [https://i.imgur.com/fUYXVUs.png (image)]&lt;br /&gt;
* Quattro Arcade: Go! Dizzy Go! (Bootleg) - Woods; [https://i.imgur.com/3bZFhSA.png (image)] &lt;br /&gt;
* Romancing SaGa 3 - Magical Tank Battle (Magical Tanks); [https://i.imgur.com/mHrrOHA.png (Image)]&lt;br /&gt;
* Sexy Parodius - Gigantic Medusa; [https://i.imgur.com/rAf7h9d.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Sonic Mania - Press Garden Zone Act 2 (Lanterns); [https://i.imgur.com/DOtslKP.png (Image)]&lt;br /&gt;
* The Legendary Stafy 2 - Stage 2-3 (Night); [https://i.imgur.com/Zn5fadC.png (Image)]&lt;br /&gt;
* Treasure Hunter G - Aged Cave (Ferric Falcon); [https://i.imgur.com/2Or3sx3.png (Image)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://www.mediafire.com/folder/28rdo0vn6zrid/SMW+Graphics Insanit&#039;s Graphics]&lt;br /&gt;
&lt;br /&gt;
* Geometry Dash - Stereo Madness; [https://imgur.com/RxG3Ulf (Image)]&lt;br /&gt;
* Super Mario World - Giant Muncher; [https://imgur.com/CxDJCb2 (Image)]&lt;br /&gt;
&lt;br /&gt;
== ASM ==&lt;br /&gt;
=== Patches: ===&lt;br /&gt;
==== Super Mario World: ====&lt;br /&gt;
* [https://github.com/TheLX5/Cappy Cappy] by lx5.&lt;br /&gt;
* [https://github.com/TheLX5/Powerups Powerups Patch] by lx5.&lt;br /&gt;
* [https://github.com/VitorVilela7/SA1-Pack SA-1 Pack] by [[User:Vitor_Vilela|Vitor Vilela]].&lt;br /&gt;
* [https://github.com/TheLX5/Star-Coins Star Coins] by lx5. (Unfinished)&lt;br /&gt;
&lt;br /&gt;
=== Sprites: ===&lt;br /&gt;
==== Super Mario World: ====&lt;br /&gt;
* [https://github.com/TheLX5/SMW-Sprites/tree/master/Cosmic%20Clone Cosmic Clones] by lx5.&lt;br /&gt;
* [https://github.com/TheLX5/SMW-Sprites/tree/master/Fire%20Bones Fire Drybones] by lx5.&lt;br /&gt;
* [http://namboner.com/myfilehostingshit/YILiftBetter.zip Yoshi&#039;s Island Lifts] by Carol, fixed and improved by Nambona890.&lt;br /&gt;
* [http://www.mediafire.com/file/iaykyfak188iz2w/Giant_Thwomp.zip/file Giant Thwomp] by Imamelia, converted and updated by Insanit.&lt;br /&gt;
* [http://www.mediafire.com/file/jtj9sx97pv4eod4/Giant_Bowser_Statue.zip/file Giant Bowser Statue] by Imamelia, converted and updated by Insanit.&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Resource_List&amp;diff=1546</id>
		<title>Resource List</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Resource_List&amp;diff=1546"/>
		<updated>2020-11-22T19:38:49Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: /* Graphics */ let&amp;#039;s not have a hundred single-element lists, it confuses screen readers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page links to various resources developed by members of SNESLab until an official resource page is opened along with an uploader. For now, if you have stuff you want exclusive to SNESLab, feel free to link them here. If the list becomes bigger, separate pages may be required alongside here.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: You may remove your own resources at any time.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== ROM Hacks ==&lt;br /&gt;
* P-switch: Nature&#039;s Unnatural Threat [To be released Winter C3 2021]&lt;br /&gt;
&lt;br /&gt;
=== Levels ===&lt;br /&gt;
&lt;br /&gt;
* [[Aerodynamics_City|Aerodynamics City]] by Anorakun;&lt;br /&gt;
&lt;br /&gt;
* [[Blackthorn_Remains|Blackthorn Remains]] by Anorakun;&lt;br /&gt;
&lt;br /&gt;
=== Kaizo Hacks ===&lt;br /&gt;
&lt;br /&gt;
* [[Super_LSG_World|Super LSG World]] by Insanit;&lt;br /&gt;
* [[The_Darkside_REMASTERED|The Darkside REMASTERED]] by Insanit;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
=== General ===&lt;br /&gt;
* [https://github.com/VitorVilela7/SA1-Root SA-1 Root] by [[User:Vitor_Vilela|Vitor Vilela]].&lt;br /&gt;
* [https://github.com/VitorVilela7/SnesSpeedTest SnesSpeedTest] by [[User:Vitor_Vilela|Vitor Vilela]].&lt;br /&gt;
&lt;br /&gt;
== Music ==&lt;br /&gt;
=== Super Mario World ===&lt;br /&gt;
* [https://www.dropbox.com/s/xdt6ao4lzctewse/%5BS%5D%20Mega%20Man%205%20-%20Wily%20Stage%20%2816-bit%29.zip?dl=0 Mega Man 5 - Wily Stage (Power Mario Version)] by [[User:Daizo_Dee_Von|Daizo Dee Von]].&lt;br /&gt;
* [https://www.dropbox.com/s/amkqv6xzfm5kpck/%5BS%5D%20Silent%20Hill%202%20-%20True.zip?dl=0 Silent Hill 2 - True] by Scooter102089 &amp;amp; [[User:Daizo_Dee_Von|Daizo Dee Von]]&lt;br /&gt;
&lt;br /&gt;
==== [https://www.dropbox.com/sh/icsm6ltj3kesqgi/AAApte1jqQNoLu_Q-e2R2thqa?dl=0 Masterlink&#039;s Song Pack] ====&lt;br /&gt;
Note: If any of these comes with &amp;lt;code&amp;gt;#amk 3&amp;lt;/code&amp;gt; at the beginning, you can change it to &amp;lt;code&amp;gt;#amk 2&amp;lt;/code&amp;gt; if you&#039;re using AddmusicK 1.0.8.&lt;br /&gt;
&lt;br /&gt;
* Castlevania: Aria of Sorrow - Castle Corridor [Sampled]&lt;br /&gt;
* Castlevania: Harmony of Dissonance - Chapel of Dissonance [Unsampled]&lt;br /&gt;
* Castlevania: Legends - Highest Castle Floor (Stage 4) 16-bit Remix [Unsampled]&lt;br /&gt;
* CUSTOM (Nox-Kixune) - Pirates [Sampled]&lt;br /&gt;
* Donkey Kong Country - Mine Cart Madness [Sampled]&lt;br /&gt;
* Donkey Kong Country 2: Diddy&#039;s Kong Quest - Boss Bossanova [Unsampled/Sampled]&lt;br /&gt;
* Donkey Kong Country 2: Diddy&#039;s Kong Quest - Token Tango [Sampled]&lt;br /&gt;
* Donkey Kong Land - Flooded Ruins [Sampled]&lt;br /&gt;
* Elevator Action (GBA) - Stage 7 [Sampled]&lt;br /&gt;
* Final Fantasy III - Priestess Aria [Sampled]&lt;br /&gt;
* Final Fantasy V - A New World [Sampled]&lt;br /&gt;
* Final Fantasy V - Clash on the Big Bridge [Sampled]&lt;br /&gt;
* Final Fantasy VI - Kefka&#039;s Tower [Sampled]&lt;br /&gt;
* Final Fantasy VI - Searching for Friends [Unsampled]&lt;br /&gt;
* Final Fantasy VI - The Fierce Battle [Unsampled/Sampled]&lt;br /&gt;
* Final Fantasy VII - Forested Temple [Unsampled]&lt;br /&gt;
* Final Fantasy VII - Still More Fighting [Sampled]&lt;br /&gt;
* Final Fantasy X - Silence Before the Storm [Sampled]&lt;br /&gt;
* Ganbare Goemon 2 - Fortress [Sampled]&lt;br /&gt;
* Golden Sun - Isaac&#039;s Battle Theme [Sampled]&lt;br /&gt;
* Golden Sun - The Elemental Stars [Sampled]&lt;br /&gt;
* Golden Sun, The Lost Age - Felix&#039;s Battle Theme [Sampled]&lt;br /&gt;
* Kirby &amp;amp; The Amazing Mirror - Boss Battle [Sampled]&lt;br /&gt;
* Kirby &amp;amp; The Amazing Mirror - Dark Mind&#039;s Second Form [Sampled] &lt;br /&gt;
* Kirby &amp;amp; The Amazing Mirror - Fighting Dark Mind in the Sky [Sampled] &lt;br /&gt;
* Kirby Dreamland 2 - Dark Castle [Unsampled]&lt;br /&gt;
* Kirby Nightmare in Dreamland - Nightmare Battle (Final Boss) [Sampled]&lt;br /&gt;
* Kirby Nightmare in Dreamland - Rainbow Resort [Sampled]&lt;br /&gt;
* Magical Pop&#039;n - Around the Castle [Unsampled]&lt;br /&gt;
* Mario &amp;amp; Luigi: Super Star Saga - Beanbean Fields [Sampled]&lt;br /&gt;
* Mario &amp;amp; Luigi: Super Star Saga - Bowser&#039;s Castle [Sampled]&lt;br /&gt;
* Mario &amp;amp; Luigi: Super Star Saga - Hoohoo Village [Sampled]&lt;br /&gt;
* Mega Man &amp;amp; Bass - Museum (Intro Stage) [Unsampled]&lt;br /&gt;
* Mega Man Legends - At a Place Nobody Knows [Sampled]&lt;br /&gt;
* Mega Man X - Armored Armadilo [Sampled]&lt;br /&gt;
* Mega Man X2 - Absolute Zero [Sampled]&lt;br /&gt;
* Mega Man X3 - Blizzard Buffalo [Sampled]&lt;br /&gt;
* Mother 3 - Mr. Batty Twist [Sampled]&lt;br /&gt;
* Romancing SaGa 2 - Last Battle [Sampled]&lt;br /&gt;
* Romancing SaGa 3 - Byunei&#039;s Nest [Unsampled]&lt;br /&gt;
* Romancing SaGa 3 - Leonid&#039;s Castle [Unsampled]&lt;br /&gt;
* Romancing SaGa 3 - Podorui/Podol [Unsampled]&lt;br /&gt;
* SaGa 2 - Dreadful Fight (RS3 Arrangement) [Sampled]&lt;br /&gt;
* SaGa Frontier - Battle 2 [Sampled]&lt;br /&gt;
* Secret of Mana - Crystal Forest ~ A Wish [Unsampled]&lt;br /&gt;
* Secret of Mana - Forest ~ Into the Thick of it [Sampled]&lt;br /&gt;
* Secret of Mana - Ice Palace ~ Eight Ringing Bells [Sampled]&lt;br /&gt;
* Secret of Mana - Kakkara Desert ~ Secret of the Arid Sands [Unsampled]&lt;br /&gt;
* Secret of Mana - Pandora ~ Rose and Ghost [Sampled]&lt;br /&gt;
* Secret of Mana - Sage Joch&#039;s Cave ~ The Legend [Unsampled]&lt;br /&gt;
* Secret of Mana - Sunken Continent ~ Star of Darkness [Sampled]&lt;br /&gt;
* Seiken Densetsu 3 (Trials of Mana) - Few Paths Forbidden [Unsampled]&lt;br /&gt;
* Seiken Densetsu 3 (Trials of Mana) - Strange Medicine [Sampled]&lt;br /&gt;
* Super Adventure Island II - Hiya-Hiya Island [Sampled] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Super Bomberman 2 - BGM 2 [Sampled]&lt;br /&gt;
* Super Mario RPG - Fight Against an Armed Boss [Sampled]&lt;br /&gt;
* Super Mario RPG - Fight Against Culex [Sampled]&lt;br /&gt;
* Super Mario World - Title Screen (Beta Festive Remix) [Unsampled]&lt;br /&gt;
* Tales of Phantasia - Biting Cold [Unsampled]&lt;br /&gt;
* Wrecking Crew &#039;98 - Title Screen [Sampled]&lt;br /&gt;
* Xenogears - Faraway Promise [Sampled]&lt;br /&gt;
* Zelda: Majora&#039;s Mask - Song of Healing [Sampled]&lt;br /&gt;
* Zelda: Ocarina of Time/Majora&#039;s Mask - Goron City/Village [Sampled]&lt;br /&gt;
&lt;br /&gt;
==== [https://content.tcdw.net/Ports/ tcdw&#039;s AMK Song Collection] ====&lt;br /&gt;
* Hourai Gakuen no Bouken (Entire OST)&lt;br /&gt;
* Kirby: Nightmare in Dream Land - Forest Stages&lt;br /&gt;
* Kurukuru Kururin - Ocean&lt;br /&gt;
* Shizuku - Search&lt;br /&gt;
* Spanky&#039;s Quest - Ruins&lt;br /&gt;
&lt;br /&gt;
==== Nambona890&#039;s Ports ====&lt;br /&gt;
* [https://www.smwcentral.net/?p=section&amp;amp;a=details&amp;amp;id=14104 Metal Masters - Metal Beat]&lt;br /&gt;
* [https://www.smwcentral.net/?p=section&amp;amp;a=details&amp;amp;id=12825 Cat Planet - Welcome to Cat Planet]&lt;br /&gt;
* [http://namboner.com/ports/Angry%20Video%20Game%20Nerd.zip Angry Video Game Nerd]&lt;br /&gt;
* [http://namboner.com/ports/Azumanga%20Daioh%20Jingle.zip Azumanga Daioh Jingle]&lt;br /&gt;
* [http://namboner.com/ports/Dig%20Dug.zip Dig Dug]&lt;br /&gt;
* [http://namboner.com/ports/Doki%20Doki%20Literature%20Club%20-%20Dreams%20of%20Love%20and%20Literature.zip Doki Doki Literature Club - Dreams of Love and Literature]&lt;br /&gt;
* [http://namboner.com/ports/Jazz%20Jackrabbit%20-%20Medivo.zip Jazz Jackrabbit - Medivo]&lt;br /&gt;
* [http://namboner.com/ports/Jazz%20Jackrabbit%20-%20Tubelectric.zip Jazz Jackrabbit - Tubelectric]&lt;br /&gt;
* [http://namboner.com/ports/Kaizo%203%20Bowser%20Recreation.zip Kaizo 3 Bowser Recreation]&lt;br /&gt;
* [http://namboner.com/ports/Moskau%20Chorus.zip Moskau Chorus]&lt;br /&gt;
* [http://namboner.com/ports/Super%20Mario%20Bros%203%20-%20Bowser%20(NES%20samples).zip Super Mario Bros 3 - Bowser (NES samples)]&lt;br /&gt;
* [http://namboner.com/ports/Takeshi&#039;s%20Challenge.zip Takeshi&#039;s Challenge]&lt;br /&gt;
* [http://namboner.com/ports/Tamagotchi%20-%20Smile%20Game.zip Tamagotchi (GB) - Smile Game]&lt;br /&gt;
* [http://namboner.com/ports/tPORt%20-%20Graphic%20Conveyer.zip tPORt - Graphic Conveyer]&lt;br /&gt;
* [http://namboner.com/ports/tPORt%20-%20Shuric%20Scan.zip tPORt - Shuric Scan]&lt;br /&gt;
&lt;br /&gt;
==== [https://drive.google.com/folderview?id=1yF21dsowr_RNx4jgqh3lwMOf8H7lY9EM KiloMinimo&#039;s Port Pack] ====&lt;br /&gt;
Contents:&lt;br /&gt;
* Aero Fighters - Boss Battle (Sampled) &lt;br /&gt;
* Aero Fighters - Final Boss, Space (Sampled) &lt;br /&gt;
* Desert Strike: Return to the Gulf - Bus Ride to Freedom (Unsampled) &lt;br /&gt;
* Earthbound - The Deep Darkness (Sampled)&lt;br /&gt;
&lt;br /&gt;
==== [https://www.dropbox.com/sh/ytu6fbv2s2bx41r/AAAWKocAkRpq9GeH26eDGeJqa?dl=0 Wakana&#039;s incredibly flawed music matters] ====&lt;br /&gt;
The pack contains the following ports:&lt;br /&gt;
* Gubble 2 - Bizarre 2 [U] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
* Sonic Mania - Studiopolis Act 1 [U] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
* Stardew Valley - Deep in the Woods [U] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
* Touhou 14 - Kobito of the Shining Needle [S] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;For any issues, feedback, or anything about these, feel free to DM me in Discord or @ me in SnesLab Discord, thanks!&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
[https://www.dropbox.com/sh/uuh9adoimna5kno/AAACNHZnjmey2g1pJ31Y5diva?dl=0 Anorakun&#039;s Graphic Rips: ]&lt;br /&gt;
&lt;br /&gt;
* Castlevania III - Flying Skeleton (Giant Eerie replacement, redrawn by TheMorganah); [https://i.imgur.com/87DBcUC.png (Image)]&lt;br /&gt;
* Castlevania: Dracula X - Clock Tower; [https://i.imgur.com/Hy0Aahh.png (Image)]&lt;br /&gt;
* Castlevania: Rondo of Blood - Throne Room; [https://i.imgur.com/V42xkMZ.png (Image)] &lt;br /&gt;
* Demon&#039;s Crest - Ice Palace (Boss Room); [https://i.imgur.com/sbz0ozJ.png (Image)] &lt;br /&gt;
* Earthworm Jim (SNES) - New Junk City; [https://i.imgur.com/uDFIyHG.png (Image)] &lt;br /&gt;
* Earthworm Jim 2 (SNES) - Inflated Head; [https://i.imgur.com/SPNKAqx.png (Image)]&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Former Site of Edo Castle; [https://i.imgur.com/6ctdRrZ.png (Image)]&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Goofy Woods; [https://i.imgur.com/2Gzs9cR.png (Image)]&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Impenetrable Road; [https://i.imgur.com/Mz4yYmf.png (Image)]&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Kabuki Castle; [https://i.imgur.com/mkOarWy.png (Image)]&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Kabuki Castle Tileset; [https://i.imgur.com/teHrTzd.png (Image)] [https://i.imgur.com/rozGk6S.png (Image)] [https://i.imgur.com/Y0b0U5P.png (Image)] [https://i.imgur.com/9f5tOrs.png (Image)]&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Log Bridge Road; [https://i.imgur.com/yaLRXI8.png (Image)]&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Oyuki Mountain; [https://i.imgur.com/yYJ47ZV.png (Image)]&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Samurai Woods; [https://i.imgur.com/GvxdKSe.png (Image)]&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Virtual Hell 1; [https://i.imgur.com/deQHEWk.png (Image)] &lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Virtual Hell 2; [https://i.imgur.com/YnAmS8s.png (Image)]&lt;br /&gt;
* Ganbare Goemon 3 - Big Bathhouse; [https://i.imgur.com/9A8GbMD.png (Image)] [https://i.imgur.com/loe4mWx.png (Image)] [https://i.imgur.com/zbrCJkV.png (Image)]&lt;br /&gt;
* Ganbare Goemon 3 - Iga Ninja Mansion; [https://i.imgur.com/LDvSFyh.png (Image)]&lt;br /&gt;
* Ganbare Goemon 3 - Walker Factory (Inside); [https://i.imgur.com/HahiuRV.png (Image)]&lt;br /&gt;
* Ganbare Goemon 3 - Walker Factory (Outside); [https://i.imgur.com/cr4GVyz.png (Image)] [https://i.imgur.com/Ej5loXv.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Aquann Castle (Cavern); [https://i.imgur.com/hcNxnx2.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Aquann Castle (Underwater); [https://i.imgur.com/HqfuANt.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Depths Lake; [https://i.imgur.com/dUwsRyl.gif (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Desert Forest; [https://i.imgur.com/BpFWMcb.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Diver Ridge; [https://i.imgur.com/LDvPLc9.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Falling Car; [https://i.imgur.com/L3K6eGM.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Foresce Castle (Cheerleader Section); [https://i.imgur.com/EApPcHB.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Kickory Forest; [https://i.imgur.com/l5THscO.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Qusara Castle (Baseball Scoreboard); [https://i.imgur.com/2EzM8cd.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Qusara Castle (Baseball Stadium); [https://i.imgur.com/qKOy82C.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Qusara Castle (Soccer Field); [https://i.imgur.com/tTRsXK2.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Saqqas Forest / Bungee Ridge; [https://i.imgur.com/b7qsfQ0.png (Image)] [https://i.imgur.com/exeLnlS.png (Image)] [https://i.imgur.com/t4LYT2H.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Snow Ravines; [https://i.imgur.com/rKD0Egm.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Sweah Castle (Alien Crowd); [https://i.imgur.com/frnEDMP.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Sweah Castle (Brick Breaking Room); [https://i.imgur.com/vlkHysC.png (Image)]&lt;br /&gt;
* Ganbare Goemon 4 - Sweah Castle (Swordplay Training Room); [https://i.imgur.com/DsqY0Sb.png (Image)] &lt;br /&gt;
* Ganbare Goemon 4 - Water Road; [https://i.imgur.com/zfKhU5W.png (Image)]&lt;br /&gt;
* Ganbare Goemon Uchuu Kaizoku Akogingu - Mt. Urala&#039;s Forest; [https://i.imgur.com/wOxwApE.png (Image)] &lt;br /&gt;
* Ganbare Goemon Uchuu Kaizoku Akogingu - Turtle Platforms; [https://i.imgur.com/60QfiYt.png (Image)]&lt;br /&gt;
* Gekisou Sentai Carranger - City [https://i.imgur.com/OYiiiap.png (Image)]&lt;br /&gt;
* Gokujou Parodius (SNES) - Eliza and Neil [https://i.imgur.com/76U671o.png (Image)] &lt;br /&gt;
* Gokujou Parodius (SNES) - Princess Kaguya; [https://i.imgur.com/XeQHCjK.png (image)] &lt;br /&gt;
* Gokujou Parodius (SNES) - Shooting Memories; (Pentaro X Arena) [https://i.imgur.com/4NS6on2.png (image)]&lt;br /&gt;
* Gokujou Parodius (SNES) - The Moon (Garden); [https://i.imgur.com/S9qQmse.png (image)] &lt;br /&gt;
* Gunstar Heroes - Ancient Ruins; [https://i.imgur.com/d8dAK2X.png (Image)] &lt;br /&gt;
* Gunstar Heroes - Black&#039;s Base; [https://i.imgur.com/V5g05BG.png (Image)] &lt;br /&gt;
* Gunstar Heroes - Rescue Yellow; [https://i.imgur.com/Quxi7HA.png (Image)] &lt;br /&gt;
* Illusion of Gaia - Dark Gaia; [https://i.imgur.com/3f08pLQ.png (Image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - Dr. Warumon&#039;s Pig Ship [https://i.imgur.com/JX5ytIZ.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - Fiesta Base (Outside the Temple); [https://i.imgur.com/VhJTY6Q.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - Gigantic! Hikaru and Akane; [https://i.imgur.com/JJuZL9w.png (image)] [https://i.imgur.com/iclfsda.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - Goemon Compact Room; [https://i.imgur.com/VU5Cs8Z.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Donburi Fields; [https://i.imgur.com/0A7Djh5.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Dr. Mardock&#039;s Trash Ship; [https://i.imgur.com/SMXJzHA.png (image)] [https://i.imgur.com/hNWsEcf.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Edo (Cookie Area); [https://i.imgur.com/AO74Xly.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Edo (Kabuki Corridor); [https://i.imgur.com/4L2nZpV.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Edo (Tileset); [https://i.imgur.com/d4qWryK.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Ghost Lady; [https://i.imgur.com/swjkgao.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Gigantic! Hikaru and Akane; [https://i.imgur.com/czqF8Fy.png (image)] [https://i.imgur.com/KoX9nqJ.png (image)] &lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Let&#039;s Play with the Master; [https://i.imgur.com/V5RBNKY.png (image)]&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - School (Yard); [https://i.imgur.com/niaDKbE.png (image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Temple Master; [https://i.imgur.com/DrPv2MJ.png (image)]&lt;br /&gt;
* Mega Man 7 - Burst Man (First Section); [https://i.imgur.com/tPmj6k7.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Mystical Ninja - Horohoro Temple (Lower Half); [https://i.imgur.com/PN0zUDE.png (Image)]&lt;br /&gt;
* Mystical Ninja - Horohoro Temple (Upper Half); [https://i.imgur.com/Be9rt97.png (Image)]&lt;br /&gt;
* Mystical Ninja - Horohoro Temple Tileset; [https://i.imgur.com/ycj6pib.png (Image)] [https://i.imgur.com/rUmUi1u.png (Image)] [https://i.imgur.com/WV6PgsF.png (Image)] [https://i.imgur.com/1c1nmFB.png (Image)] [https://i.imgur.com/Bsj7kk0.png (Image)] [https://i.imgur.com/XdEmC8U.png (Image)]&lt;br /&gt;
* Mystical Ninja - Iga Ninja Mansion (Dungeon); [https://i.imgur.com/aXCPQ8r.png (Image)]&lt;br /&gt;
* Mystical Ninja - Iga Ninja Mansion (Entrance); [https://i.imgur.com/5ArLpxb.png (Image)]&lt;br /&gt;
* Mystical Ninja - Iga Ninja Mansion (Mountains); [https://i.imgur.com/prmW0en.png (Image)]&lt;br /&gt;
* Mystical Ninja - Otafuku Army Headquarters; [https://i.imgur.com/6s5IU81.png (Image)]&lt;br /&gt;
* Mystical Ninja - Otafuku Army Headquarters (Slot Machine Room); [https://i.imgur.com/Lv5S71o.png (Image)]&lt;br /&gt;
* Mystical Ninja - Ryukyu Palace (Underwater Tunnel); [https://i.imgur.com/UhTDOvO.png (Image)]&lt;br /&gt;
* Ninja Warriors - Tank; [https://i.imgur.com/MGgLGb9.png (Image)] &lt;br /&gt;
* Osman (Arcade) - Red Sky; [https://i.imgur.com/43Tn8t5.png (Image)]&lt;br /&gt;
* Quattro Arcade: Go! Dizzy Go! (Bootleg) - Castle Walls; [https://i.imgur.com/KqXpmax.png (image)] &lt;br /&gt;
* Quattro Arcade: Go! Dizzy Go! (Bootleg) - Mountains; [https://i.imgur.com/fUYXVUs.png (image)]&lt;br /&gt;
* Quattro Arcade: Go! Dizzy Go! (Bootleg) - Woods; [https://i.imgur.com/3bZFhSA.png (image)] &lt;br /&gt;
* Romancing SaGa 3 - Magical Tank Battle (Magical Tanks); [https://i.imgur.com/mHrrOHA.png (Image)]&lt;br /&gt;
* Sexy Parodius - Gigantic Medusa; [https://i.imgur.com/rAf7h9d.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Sonic Mania - Press Garden Zone Act 2 (Lanterns); [https://i.imgur.com/DOtslKP.png (Image)]&lt;br /&gt;
* The Legendary Stafy 2 - Stage 2-3 (Night); [https://i.imgur.com/Zn5fadC.png (Image)]&lt;br /&gt;
* Treasure Hunter G - Aged Cave (Ferric Falcon); [https://i.imgur.com/2Or3sx3.png (Image)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://www.mediafire.com/folder/28rdo0vn6zrid/SMW+Graphics Insanit&#039;s Graphics]&lt;br /&gt;
&lt;br /&gt;
* Geometry Dash - Stereo Madness; [https://imgur.com/RxG3Ulf (Image)]&lt;br /&gt;
* Super Mario World - Giant Muncher; [https://imgur.com/CxDJCb2 (Image)]&lt;br /&gt;
&lt;br /&gt;
== ASM ==&lt;br /&gt;
=== Patches: ===&lt;br /&gt;
==== Super Mario World: ====&lt;br /&gt;
* [https://github.com/TheLX5/Cappy Cappy] by lx5.&lt;br /&gt;
* [https://github.com/TheLX5/Powerups Powerups Patch] by lx5.&lt;br /&gt;
* [https://github.com/VitorVilela7/SA1-Pack SA-1 Pack] by [[User:Vitor_Vilela|Vitor Vilela]].&lt;br /&gt;
* [https://github.com/TheLX5/Star-Coins Star Coins] by lx5. (Unfinished)&lt;br /&gt;
&lt;br /&gt;
=== Sprites: ===&lt;br /&gt;
==== Super Mario World: ====&lt;br /&gt;
* [https://github.com/TheLX5/SMW-Sprites/tree/master/Cosmic%20Clone Cosmic Clones] by lx5.&lt;br /&gt;
* [https://github.com/TheLX5/SMW-Sprites/tree/master/Fire%20Bones Fire Drybones] by lx5.&lt;br /&gt;
* [http://namboner.com/myfilehostingshit/YILiftBetter.zip Yoshi&#039;s Island Lifts] by Carol, fixed and improved by Nambona890.&lt;br /&gt;
* [http://www.mediafire.com/file/iaykyfak188iz2w/Giant_Thwomp.zip/file Giant Thwomp] by Imamelia, converted and updated by Insanit.&lt;br /&gt;
* [http://www.mediafire.com/file/jtj9sx97pv4eod4/Giant_Bowser_Statue.zip/file Giant Bowser Statue] by Imamelia, converted and updated by Insanit.&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Resource_List&amp;diff=1544</id>
		<title>Resource List</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Resource_List&amp;diff=1544"/>
		<updated>2020-11-22T19:30:12Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: /* Levels */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page links to various resources developed by members of SNESLab until an official resource page is opened along with an uploader. For now, if you have stuff you want exclusive to SNESLab, feel free to link them here. If the list becomes bigger, separate pages may be required alongside here.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: You may remove your own resources at any time.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== ROM Hacks ==&lt;br /&gt;
* P-switch: Nature&#039;s Unnatural Threat [To be released Winter C3 2021]&lt;br /&gt;
&lt;br /&gt;
=== Levels ===&lt;br /&gt;
&lt;br /&gt;
* [[Aerodynamics_City|Aerodynamics City]] by Anorakun;&lt;br /&gt;
&lt;br /&gt;
* [[Blackthorn_Remains|Blackthorn Remains]] by Anorakun;&lt;br /&gt;
&lt;br /&gt;
=== Kaizo Hacks ===&lt;br /&gt;
&lt;br /&gt;
* [[Super_LSG_World|Super LSG World]] by Insanit;&lt;br /&gt;
* [[The_Darkside_REMASTERED|The Darkside REMASTERED]] by Insanit;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
=== General ===&lt;br /&gt;
* [https://github.com/VitorVilela7/SA1-Root SA-1 Root] by [[User:Vitor_Vilela|Vitor Vilela]].&lt;br /&gt;
* [https://github.com/VitorVilela7/SnesSpeedTest SnesSpeedTest] by [[User:Vitor_Vilela|Vitor Vilela]].&lt;br /&gt;
&lt;br /&gt;
== Music ==&lt;br /&gt;
=== Super Mario World ===&lt;br /&gt;
* [https://www.dropbox.com/s/xdt6ao4lzctewse/%5BS%5D%20Mega%20Man%205%20-%20Wily%20Stage%20%2816-bit%29.zip?dl=0 Mega Man 5 - Wily Stage (Power Mario Version)] by [[User:Daizo_Dee_Von|Daizo Dee Von]].&lt;br /&gt;
* [https://www.dropbox.com/s/amkqv6xzfm5kpck/%5BS%5D%20Silent%20Hill%202%20-%20True.zip?dl=0 Silent Hill 2 - True] by Scooter102089 &amp;amp; [[User:Daizo_Dee_Von|Daizo Dee Von]]&lt;br /&gt;
&lt;br /&gt;
==== [https://www.dropbox.com/sh/icsm6ltj3kesqgi/AAApte1jqQNoLu_Q-e2R2thqa?dl=0 Masterlink&#039;s Song Pack] ====&lt;br /&gt;
Note: If any of these comes with &amp;lt;code&amp;gt;#amk 3&amp;lt;/code&amp;gt; at the beginning, you can change it to &amp;lt;code&amp;gt;#amk 2&amp;lt;/code&amp;gt; if you&#039;re using AddmusicK 1.0.8.&lt;br /&gt;
&lt;br /&gt;
* Castlevania: Aria of Sorrow - Castle Corridor [Sampled]&lt;br /&gt;
* Castlevania: Harmony of Dissonance - Chapel of Dissonance [Unsampled]&lt;br /&gt;
* Castlevania: Legends - Highest Castle Floor (Stage 4) 16-bit Remix [Unsampled]&lt;br /&gt;
* CUSTOM (Nox-Kixune) - Pirates [Sampled]&lt;br /&gt;
* Donkey Kong Country - Mine Cart Madness [Sampled]&lt;br /&gt;
* Donkey Kong Country 2: Diddy&#039;s Kong Quest - Boss Bossanova [Unsampled/Sampled]&lt;br /&gt;
* Donkey Kong Country 2: Diddy&#039;s Kong Quest - Token Tango [Sampled]&lt;br /&gt;
* Donkey Kong Land - Flooded Ruins [Sampled]&lt;br /&gt;
* Elevator Action (GBA) - Stage 7 [Sampled]&lt;br /&gt;
* Final Fantasy III - Priestess Aria [Sampled]&lt;br /&gt;
* Final Fantasy V - A New World [Sampled]&lt;br /&gt;
* Final Fantasy V - Clash on the Big Bridge [Sampled]&lt;br /&gt;
* Final Fantasy VI - Kefka&#039;s Tower [Sampled]&lt;br /&gt;
* Final Fantasy VI - Searching for Friends [Unsampled]&lt;br /&gt;
* Final Fantasy VI - The Fierce Battle [Unsampled/Sampled]&lt;br /&gt;
* Final Fantasy VII - Forested Temple [Unsampled]&lt;br /&gt;
* Final Fantasy VII - Still More Fighting [Sampled]&lt;br /&gt;
* Final Fantasy X - Silence Before the Storm [Sampled]&lt;br /&gt;
* Ganbare Goemon 2 - Fortress [Sampled]&lt;br /&gt;
* Golden Sun - Isaac&#039;s Battle Theme [Sampled]&lt;br /&gt;
* Golden Sun - The Elemental Stars [Sampled]&lt;br /&gt;
* Golden Sun, The Lost Age - Felix&#039;s Battle Theme [Sampled]&lt;br /&gt;
* Kirby &amp;amp; The Amazing Mirror - Boss Battle [Sampled]&lt;br /&gt;
* Kirby &amp;amp; The Amazing Mirror - Dark Mind&#039;s Second Form [Sampled] &lt;br /&gt;
* Kirby &amp;amp; The Amazing Mirror - Fighting Dark Mind in the Sky [Sampled] &lt;br /&gt;
* Kirby Dreamland 2 - Dark Castle [Unsampled]&lt;br /&gt;
* Kirby Nightmare in Dreamland - Nightmare Battle (Final Boss) [Sampled]&lt;br /&gt;
* Kirby Nightmare in Dreamland - Rainbow Resort [Sampled]&lt;br /&gt;
* Magical Pop&#039;n - Around the Castle [Unsampled]&lt;br /&gt;
* Mario &amp;amp; Luigi: Super Star Saga - Beanbean Fields [Sampled]&lt;br /&gt;
* Mario &amp;amp; Luigi: Super Star Saga - Bowser&#039;s Castle [Sampled]&lt;br /&gt;
* Mario &amp;amp; Luigi: Super Star Saga - Hoohoo Village [Sampled]&lt;br /&gt;
* Mega Man &amp;amp; Bass - Museum (Intro Stage) [Unsampled]&lt;br /&gt;
* Mega Man Legends - At a Place Nobody Knows [Sampled]&lt;br /&gt;
* Mega Man X - Armored Armadilo [Sampled]&lt;br /&gt;
* Mega Man X2 - Absolute Zero [Sampled]&lt;br /&gt;
* Mega Man X3 - Blizzard Buffalo [Sampled]&lt;br /&gt;
* Mother 3 - Mr. Batty Twist [Sampled]&lt;br /&gt;
* Romancing SaGa 2 - Last Battle [Sampled]&lt;br /&gt;
* Romancing SaGa 3 - Byunei&#039;s Nest [Unsampled]&lt;br /&gt;
* Romancing SaGa 3 - Leonid&#039;s Castle [Unsampled]&lt;br /&gt;
* Romancing SaGa 3 - Podorui/Podol [Unsampled]&lt;br /&gt;
* SaGa 2 - Dreadful Fight (RS3 Arrangement) [Sampled]&lt;br /&gt;
* SaGa Frontier - Battle 2 [Sampled]&lt;br /&gt;
* Secret of Mana - Crystal Forest ~ A Wish [Unsampled]&lt;br /&gt;
* Secret of Mana - Forest ~ Into the Thick of it [Sampled]&lt;br /&gt;
* Secret of Mana - Ice Palace ~ Eight Ringing Bells [Sampled]&lt;br /&gt;
* Secret of Mana - Kakkara Desert ~ Secret of the Arid Sands [Unsampled]&lt;br /&gt;
* Secret of Mana - Pandora ~ Rose and Ghost [Sampled]&lt;br /&gt;
* Secret of Mana - Sage Joch&#039;s Cave ~ The Legend [Unsampled]&lt;br /&gt;
* Secret of Mana - Sunken Continent ~ Star of Darkness [Sampled]&lt;br /&gt;
* Seiken Densetsu 3 (Trials of Mana) - Few Paths Forbidden [Unsampled]&lt;br /&gt;
* Seiken Densetsu 3 (Trials of Mana) - Strange Medicine [Sampled]&lt;br /&gt;
* Super Adventure Island II - Hiya-Hiya Island [Sampled] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
* Super Bomberman 2 - BGM 2 [Sampled]&lt;br /&gt;
* Super Mario RPG - Fight Against an Armed Boss [Sampled]&lt;br /&gt;
* Super Mario RPG - Fight Against Culex [Sampled]&lt;br /&gt;
* Super Mario World - Title Screen (Beta Festive Remix) [Unsampled]&lt;br /&gt;
* Tales of Phantasia - Biting Cold [Unsampled]&lt;br /&gt;
* Wrecking Crew &#039;98 - Title Screen [Sampled]&lt;br /&gt;
* Xenogears - Faraway Promise [Sampled]&lt;br /&gt;
* Zelda: Majora&#039;s Mask - Song of Healing [Sampled]&lt;br /&gt;
* Zelda: Ocarina of Time/Majora&#039;s Mask - Goron City/Village [Sampled]&lt;br /&gt;
&lt;br /&gt;
==== [https://content.tcdw.net/Ports/ tcdw&#039;s AMK Song Collection] ====&lt;br /&gt;
* Hourai Gakuen no Bouken (Entire OST)&lt;br /&gt;
* Kirby: Nightmare in Dream Land - Forest Stages&lt;br /&gt;
* Kurukuru Kururin - Ocean&lt;br /&gt;
* Shizuku - Search&lt;br /&gt;
* Spanky&#039;s Quest - Ruins&lt;br /&gt;
&lt;br /&gt;
==== Nambona890&#039;s Ports ====&lt;br /&gt;
* [https://www.smwcentral.net/?p=section&amp;amp;a=details&amp;amp;id=14104 Metal Masters - Metal Beat]&lt;br /&gt;
* [https://www.smwcentral.net/?p=section&amp;amp;a=details&amp;amp;id=12825 Cat Planet - Welcome to Cat Planet]&lt;br /&gt;
* [http://namboner.com/ports/Angry%20Video%20Game%20Nerd.zip Angry Video Game Nerd]&lt;br /&gt;
* [http://namboner.com/ports/Azumanga%20Daioh%20Jingle.zip Azumanga Daioh Jingle]&lt;br /&gt;
* [http://namboner.com/ports/Dig%20Dug.zip Dig Dug]&lt;br /&gt;
* [http://namboner.com/ports/Doki%20Doki%20Literature%20Club%20-%20Dreams%20of%20Love%20and%20Literature.zip Doki Doki Literature Club - Dreams of Love and Literature]&lt;br /&gt;
* [http://namboner.com/ports/Jazz%20Jackrabbit%20-%20Medivo.zip Jazz Jackrabbit - Medivo]&lt;br /&gt;
* [http://namboner.com/ports/Jazz%20Jackrabbit%20-%20Tubelectric.zip Jazz Jackrabbit - Tubelectric]&lt;br /&gt;
* [http://namboner.com/ports/Kaizo%203%20Bowser%20Recreation.zip Kaizo 3 Bowser Recreation]&lt;br /&gt;
* [http://namboner.com/ports/Moskau%20Chorus.zip Moskau Chorus]&lt;br /&gt;
* [http://namboner.com/ports/Super%20Mario%20Bros%203%20-%20Bowser%20(NES%20samples).zip Super Mario Bros 3 - Bowser (NES samples)]&lt;br /&gt;
* [http://namboner.com/ports/Takeshi&#039;s%20Challenge.zip Takeshi&#039;s Challenge]&lt;br /&gt;
* [http://namboner.com/ports/Tamagotchi%20-%20Smile%20Game.zip Tamagotchi (GB) - Smile Game]&lt;br /&gt;
* [http://namboner.com/ports/tPORt%20-%20Graphic%20Conveyer.zip tPORt - Graphic Conveyer]&lt;br /&gt;
* [http://namboner.com/ports/tPORt%20-%20Shuric%20Scan.zip tPORt - Shuric Scan]&lt;br /&gt;
&lt;br /&gt;
==== [https://drive.google.com/folderview?id=1yF21dsowr_RNx4jgqh3lwMOf8H7lY9EM KiloMinimo&#039;s Port Pack] ====&lt;br /&gt;
Contents:&lt;br /&gt;
* Aero Fighters - Boss Battle (Sampled) &lt;br /&gt;
* Aero Fighters - Final Boss, Space (Sampled) &lt;br /&gt;
* Desert Strike: Return to the Gulf - Bus Ride to Freedom (Unsampled) &lt;br /&gt;
* Earthbound - The Deep Darkness (Sampled)&lt;br /&gt;
&lt;br /&gt;
==== [https://www.dropbox.com/sh/ytu6fbv2s2bx41r/AAAWKocAkRpq9GeH26eDGeJqa?dl=0 Wakana&#039;s incredibly flawed music matters] ====&lt;br /&gt;
The pack contains the following ports:&lt;br /&gt;
* Gubble 2 - Bizarre 2 [U] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
* Sonic Mania - Studiopolis Act 1 [U] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
* Stardew Valley - Deep in the Woods [U] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
* Touhou 14 - Kobito of the Shining Needle [S] &amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;- Added in 07/11/2020&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:gray&amp;quot;&amp;gt;For any issues, feedback, or anything about these, feel free to DM me in Discord or @ me in SnesLab Discord, thanks!&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
[https://www.dropbox.com/sh/uuh9adoimna5kno/AAACNHZnjmey2g1pJ31Y5diva?dl=0 Anorakun&#039;s Graphic Rips: ]&lt;br /&gt;
&lt;br /&gt;
* Castlevania III - Flying Skeleton (Giant Eerie replacement, redrawn by TheMorganah); [https://i.imgur.com/87DBcUC.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Castlevania: Dracula X - Clock Tower; [https://i.imgur.com/Hy0Aahh.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Castlevania: Rondo of Blood - Throne Room; [https://i.imgur.com/V42xkMZ.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Demon&#039;s Crest - Ice Palace (Boss Room); [https://i.imgur.com/sbz0ozJ.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Earthworm Jim (SNES) - New Junk City; [https://i.imgur.com/uDFIyHG.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Earthworm Jim 2 (SNES) - Inflated Head; [https://i.imgur.com/SPNKAqx.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Former Site of Edo Castle; [https://i.imgur.com/6ctdRrZ.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Goofy Woods; [https://i.imgur.com/2Gzs9cR.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Impenetrable Road; [https://i.imgur.com/Mz4yYmf.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Kabuki Castle; [https://i.imgur.com/mkOarWy.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Kabuki Castle Tileset; [https://i.imgur.com/teHrTzd.png (Image)] [https://i.imgur.com/rozGk6S.png (Image)] [https://i.imgur.com/Y0b0U5P.png (Image)] [https://i.imgur.com/9f5tOrs.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Log Bridge Road; [https://i.imgur.com/yaLRXI8.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Oyuki Mountain; [https://i.imgur.com/yYJ47ZV.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Samurai Woods; [https://i.imgur.com/GvxdKSe.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Virtual Hell 1; [https://i.imgur.com/deQHEWk.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 2 (Super Famicom) - Virtual Hell 2; [https://i.imgur.com/YnAmS8s.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 3 - Big Bathhouse; [https://i.imgur.com/9A8GbMD.png (Image)] [https://i.imgur.com/loe4mWx.png (Image)] [https://i.imgur.com/zbrCJkV.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 3 - Iga Ninja Mansion; [https://i.imgur.com/LDvSFyh.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 3 - Walker Factory (Inside); [https://i.imgur.com/HahiuRV.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 3 - Walker Factory (Outside); [https://i.imgur.com/cr4GVyz.png (Image)] [https://i.imgur.com/Ej5loXv.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Aquann Castle (Cavern); [https://i.imgur.com/hcNxnx2.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Aquann Castle (Underwater); [https://i.imgur.com/HqfuANt.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Depths Lake; [https://i.imgur.com/dUwsRyl.gif (Image)] &lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Desert Forest; [https://i.imgur.com/BpFWMcb.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Diver Ridge; [https://i.imgur.com/LDvPLc9.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Falling Car; [https://i.imgur.com/L3K6eGM.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Foresce Castle (Cheerleader Section); [https://i.imgur.com/EApPcHB.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Kickory Forest; [https://i.imgur.com/l5THscO.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Qusara Castle (Baseball Scoreboard); [https://i.imgur.com/2EzM8cd.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Qusara Castle (Baseball Stadium); [https://i.imgur.com/qKOy82C.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Qusara Castle (Soccer Field); [https://i.imgur.com/tTRsXK2.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Saqqas Forest / Bungee Ridge; [https://i.imgur.com/b7qsfQ0.png (Image)] [https://i.imgur.com/exeLnlS.png (Image)] [https://i.imgur.com/t4LYT2H.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Snow Ravines; [https://i.imgur.com/rKD0Egm.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Sweah Castle (Alien Crowd); [https://i.imgur.com/frnEDMP.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Sweah Castle (Brick Breaking Room); [https://i.imgur.com/vlkHysC.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Sweah Castle (Swordplay Training Room); [https://i.imgur.com/DsqY0Sb.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon 4 - Water Road; [https://i.imgur.com/zfKhU5W.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon Uchuu Kaizoku Akogingu - Mt. Urala&#039;s Forest; [https://i.imgur.com/wOxwApE.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Ganbare Goemon Uchuu Kaizoku Akogingu - Turtle Platforms; [https://i.imgur.com/60QfiYt.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Gekisou Sentai Carranger - City [https://i.imgur.com/OYiiiap.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Gokujou Parodius (SNES) - Eliza and Neil [https://i.imgur.com/76U671o.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Gokujou Parodius (SNES) - Princess Kaguya; [https://i.imgur.com/XeQHCjK.png (image)] &lt;br /&gt;
&lt;br /&gt;
* Gokujou Parodius (SNES) - Shooting Memories; (Pentaro X Arena) [https://i.imgur.com/4NS6on2.png (image)]&lt;br /&gt;
&lt;br /&gt;
* Gokujou Parodius (SNES) - The Moon (Garden); [https://i.imgur.com/S9qQmse.png (image)] &lt;br /&gt;
&lt;br /&gt;
* Gunstar Heroes - Ancient Ruins; [https://i.imgur.com/d8dAK2X.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Gunstar Heroes - Black&#039;s Base; [https://i.imgur.com/V5g05BG.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Gunstar Heroes - Rescue Yellow; [https://i.imgur.com/Quxi7HA.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Illusion of Gaia - Dark Gaia; [https://i.imgur.com/3f08pLQ.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - Dr. Warumon&#039;s Pig Ship [https://i.imgur.com/JX5ytIZ.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - Fiesta Base (Outside the Temple); [https://i.imgur.com/VhJTY6Q.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - Gigantic! Hikaru and Akane; [https://i.imgur.com/JJuZL9w.png (image)] [https://i.imgur.com/iclfsda.png (image)]&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (PSX) - Goemon Compact Room; [https://i.imgur.com/VU5Cs8Z.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Donburi Fields; [https://i.imgur.com/0A7Djh5.png (image)]&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Dr. Mardock&#039;s Trash Ship; [https://i.imgur.com/SMXJzHA.png (image)] [https://i.imgur.com/hNWsEcf.png (image)]&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Edo (Cookie Area); [https://i.imgur.com/AO74Xly.png (image)]&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Edo (Kabuki Corridor); [https://i.imgur.com/4L2nZpV.png (image)]&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Edo (Tileset); [https://i.imgur.com/d4qWryK.png (image)]&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Ghost Lady; [https://i.imgur.com/swjkgao.png (image)]&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Gigantic! Hikaru and Akane; [https://i.imgur.com/czqF8Fy.png (image)] [https://i.imgur.com/KoX9nqJ.png (image)] &lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Let&#039;s Play with the Master; [https://i.imgur.com/V5RBNKY.png (image)]&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - School (Yard); [https://i.imgur.com/niaDKbE.png (image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jikkyou Oshaberi Parodius (SNES) - Temple Master; [https://i.imgur.com/DrPv2MJ.png (image)]&lt;br /&gt;
&lt;br /&gt;
* Mega Man 7 - Burst Man (First Section); [https://i.imgur.com/tPmj6k7.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Mystical Ninja - Horohoro Temple (Lower Half); [https://i.imgur.com/PN0zUDE.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Mystical Ninja - Horohoro Temple (Upper Half); [https://i.imgur.com/Be9rt97.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Mystical Ninja - Horohoro Temple Tileset; [https://i.imgur.com/ycj6pib.png (Image)] [https://i.imgur.com/rUmUi1u.png (Image)] [https://i.imgur.com/WV6PgsF.png (Image)] [https://i.imgur.com/1c1nmFB.png (Image)] [https://i.imgur.com/Bsj7kk0.png (Image)] [https://i.imgur.com/XdEmC8U.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Mystical Ninja - Iga Ninja Mansion (Dungeon); [https://i.imgur.com/aXCPQ8r.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Mystical Ninja - Iga Ninja Mansion (Entrance); [https://i.imgur.com/5ArLpxb.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Mystical Ninja - Iga Ninja Mansion (Mountains); [https://i.imgur.com/prmW0en.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Mystical Ninja - Otafuku Army Headquarters; [https://i.imgur.com/6s5IU81.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Mystical Ninja - Otafuku Army Headquarters (Slot Machine Room); [https://i.imgur.com/Lv5S71o.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Mystical Ninja - Ryukyu Palace (Underwater Tunnel); [https://i.imgur.com/UhTDOvO.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Ninja Warriors - Tank; [https://i.imgur.com/MGgLGb9.png (Image)] &lt;br /&gt;
&lt;br /&gt;
* Osman (Arcade) - Red Sky; [https://i.imgur.com/43Tn8t5.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Quattro Arcade: Go! Dizzy Go! (Bootleg) - Castle Walls; [https://i.imgur.com/KqXpmax.png (image)] &lt;br /&gt;
&lt;br /&gt;
* Quattro Arcade: Go! Dizzy Go! (Bootleg) - Mountains; [https://i.imgur.com/fUYXVUs.png (image)]&lt;br /&gt;
 &lt;br /&gt;
* Quattro Arcade: Go! Dizzy Go! (Bootleg) - Woods; [https://i.imgur.com/3bZFhSA.png (image)] &lt;br /&gt;
&lt;br /&gt;
* Romancing SaGa 3 - Magical Tank Battle (Magical Tanks); [https://i.imgur.com/mHrrOHA.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Sexy Parodius - Gigantic Medusa; [https://i.imgur.com/rAf7h9d.png (Image)] &amp;lt;span style=&amp;quot;color:gold&amp;quot;&amp;gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;NEW&#039;&#039;&#039;&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sonic Mania - Press Garden Zone Act 2 (Lanterns); [https://i.imgur.com/DOtslKP.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* The Legendary Stafy 2 - Stage 2-3 (Night); [https://i.imgur.com/Zn5fadC.png (Image)]&lt;br /&gt;
&lt;br /&gt;
* Treasure Hunter G - Aged Cave (Ferric Falcon); [https://i.imgur.com/2Or3sx3.png (Image)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://www.mediafire.com/folder/28rdo0vn6zrid/SMW+Graphics Insanit&#039;s Graphics]&lt;br /&gt;
&lt;br /&gt;
* Geometry Dash - Stereo Madness; [https://imgur.com/RxG3Ulf (Image)]&lt;br /&gt;
&lt;br /&gt;
* Super Mario World - Giant Muncher; [https://imgur.com/CxDJCb2 (Image)]&lt;br /&gt;
&lt;br /&gt;
== ASM ==&lt;br /&gt;
=== Patches: ===&lt;br /&gt;
==== Super Mario World: ====&lt;br /&gt;
* [https://github.com/TheLX5/Cappy Cappy] by lx5.&lt;br /&gt;
* [https://github.com/TheLX5/Powerups Powerups Patch] by lx5.&lt;br /&gt;
* [https://github.com/VitorVilela7/SA1-Pack SA-1 Pack] by [[User:Vitor_Vilela|Vitor Vilela]].&lt;br /&gt;
* [https://github.com/TheLX5/Star-Coins Star Coins] by lx5. (Unfinished)&lt;br /&gt;
&lt;br /&gt;
=== Sprites: ===&lt;br /&gt;
==== Super Mario World: ====&lt;br /&gt;
* [https://github.com/TheLX5/SMW-Sprites/tree/master/Cosmic%20Clone Cosmic Clones] by lx5.&lt;br /&gt;
* [https://github.com/TheLX5/SMW-Sprites/tree/master/Fire%20Bones Fire Drybones] by lx5.&lt;br /&gt;
* [http://namboner.com/myfilehostingshit/YILiftBetter.zip Yoshi&#039;s Island Lifts] by Carol, fixed and improved by Nambona890.&lt;br /&gt;
* [http://www.mediafire.com/file/iaykyfak188iz2w/Giant_Thwomp.zip/file Giant Thwomp] by Imamelia, converted and updated by Insanit.&lt;br /&gt;
* [http://www.mediafire.com/file/jtj9sx97pv4eod4/Giant_Bowser_Statue.zip/file Giant Bowser Statue] by Imamelia, converted and updated by Insanit.&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=LC_LZ2&amp;diff=1242</id>
		<title>LC LZ2</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=LC_LZ2&amp;diff=1242"/>
		<updated>2020-08-19T17:39:45Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: fix mediawiki page title cleverness&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:LC_LZ2}}&lt;br /&gt;
LZ2 or LC_LZ2, as named by [[Lunar Compress]], is a lossless data compression format, used by [[Super Mario World]] to compress graphics. It is also used by [[A Link to the Past]] and [[Super Mario World 2: Yoshi&#039;s Island]].&lt;br /&gt;
&lt;br /&gt;
== Compression ==&lt;br /&gt;
&lt;br /&gt;
The compressed data consists of &amp;quot;chunks&amp;quot;, each with a header:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bits&lt;br /&gt;
76543210&lt;br /&gt;
CCCLLLLL&lt;br /&gt;
&lt;br /&gt;
CCC:   Command bits&lt;br /&gt;
LLLLL: Length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the header byte is $FF, the end of the compressed data has been reached, and decompression will be aborted.&lt;br /&gt;
&lt;br /&gt;
Here is a list of commands bits which the LC_LZ2 decompression function can use during the decompression:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
000    &amp;quot;Direct Copy&amp;quot;&lt;br /&gt;
       Followed by (L+1) bytes of data&lt;br /&gt;
001    &amp;quot;Byte Fill&amp;quot;&lt;br /&gt;
       Followed by one byte to be repeated (L+1) times&lt;br /&gt;
010    &amp;quot;Word Fill&amp;quot;&lt;br /&gt;
       Followed by two bytes. Output first byte, then second, then first,&lt;br /&gt;
       then second, etc. until (L+1) bytes has been outputted&lt;br /&gt;
011    &amp;quot;Increasing Fill&amp;quot;&lt;br /&gt;
       Followed by one byte to be repeated (L+1) times, but the byte is&lt;br /&gt;
       increased by 1 after each write&lt;br /&gt;
100    &amp;quot;Repeat&amp;quot;&lt;br /&gt;
       Followed by two bytes (ABCD byte order) containing address (in the&lt;br /&gt;
       output buffer) to copy (L+1) bytes from&lt;br /&gt;
101    (Unused command)&lt;br /&gt;
110    (Unused command)&lt;br /&gt;
111    &amp;quot;Long length&amp;quot;&lt;br /&gt;
       This command has got a two-byte header:&lt;br /&gt;
       111CCCLL LLLLLLLL&lt;br /&gt;
       CCC:        Real command&lt;br /&gt;
       LLLLLLLLLL: Length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decompression ==&lt;br /&gt;
&lt;br /&gt;
During the decompression, the decompressed chunks are outputted into a buffer which is either RAM or SRAM. SMW uses the RAM address $7E:AD00 as its decompression buffer.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
You can use the LC_LZ2 compression to mainly compress graphics. Technically you can compress anything with this format, but graphics is preferred due to their big size. Seeing the SNES isn&#039;t fast, the decompression takes a while to finish, so whenever you overuse the compression the loading time will increase.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
You can see an LC_LZ2 decompression routine setup at SNES $00:B888. The decompression routine itself is located at SNES $00:B8DE.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
[https://fusoya.eludevisibility.org/lc/index.html Lunar Compress], a library by [[FuSoYa]] made to handle loading various game graphics format, including LZ2.&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=LZ2&amp;diff=1241</id>
		<title>LZ2</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=LZ2&amp;diff=1241"/>
		<updated>2020-08-19T17:39:08Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: Alcaro moved page LZ2 to LC LZ2: avoid confusion with https://en.wikipedia.org/wiki/LZ4_(compression_algorithm)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[LC LZ2]]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=LC_LZ2&amp;diff=1240</id>
		<title>LC LZ2</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=LC_LZ2&amp;diff=1240"/>
		<updated>2020-08-19T17:39:08Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: Alcaro moved page LZ2 to LC LZ2: avoid confusion with https://en.wikipedia.org/wiki/LZ4_(compression_algorithm)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;LZ2 or LC_LZ2, as named by [[Lunar Compress]], is a lossless data compression format, used by [[Super Mario World]] to compress graphics. It is also used by [[A Link to the Past]] and [[Super Mario World 2: Yoshi&#039;s Island]].&lt;br /&gt;
&lt;br /&gt;
== Compression ==&lt;br /&gt;
&lt;br /&gt;
The compressed data consists of &amp;quot;chunks&amp;quot;, each with a header:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bits&lt;br /&gt;
76543210&lt;br /&gt;
CCCLLLLL&lt;br /&gt;
&lt;br /&gt;
CCC:   Command bits&lt;br /&gt;
LLLLL: Length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the header byte is $FF, the end of the compressed data has been reached, and decompression will be aborted.&lt;br /&gt;
&lt;br /&gt;
Here is a list of commands bits which the LC_LZ2 decompression function can use during the decompression:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
000    &amp;quot;Direct Copy&amp;quot;&lt;br /&gt;
       Followed by (L+1) bytes of data&lt;br /&gt;
001    &amp;quot;Byte Fill&amp;quot;&lt;br /&gt;
       Followed by one byte to be repeated (L+1) times&lt;br /&gt;
010    &amp;quot;Word Fill&amp;quot;&lt;br /&gt;
       Followed by two bytes. Output first byte, then second, then first,&lt;br /&gt;
       then second, etc. until (L+1) bytes has been outputted&lt;br /&gt;
011    &amp;quot;Increasing Fill&amp;quot;&lt;br /&gt;
       Followed by one byte to be repeated (L+1) times, but the byte is&lt;br /&gt;
       increased by 1 after each write&lt;br /&gt;
100    &amp;quot;Repeat&amp;quot;&lt;br /&gt;
       Followed by two bytes (ABCD byte order) containing address (in the&lt;br /&gt;
       output buffer) to copy (L+1) bytes from&lt;br /&gt;
101    (Unused command)&lt;br /&gt;
110    (Unused command)&lt;br /&gt;
111    &amp;quot;Long length&amp;quot;&lt;br /&gt;
       This command has got a two-byte header:&lt;br /&gt;
       111CCCLL LLLLLLLL&lt;br /&gt;
       CCC:        Real command&lt;br /&gt;
       LLLLLLLLLL: Length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decompression ==&lt;br /&gt;
&lt;br /&gt;
During the decompression, the decompressed chunks are outputted into a buffer which is either RAM or SRAM. SMW uses the RAM address $7E:AD00 as its decompression buffer.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
You can use the LC_LZ2 compression to mainly compress graphics. Technically you can compress anything with this format, but graphics is preferred due to their big size. Seeing the SNES isn&#039;t fast, the decompression takes a while to finish, so whenever you overuse the compression the loading time will increase.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
You can see an LC_LZ2 decompression routine setup at SNES $00:B888. The decompression routine itself is located at SNES $00:B8DE.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
[https://fusoya.eludevisibility.org/lc/index.html Lunar Compress], a library by [[FuSoYa]] made to handle loading various game graphics format, including LZ2.&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=959</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=959"/>
		<updated>2019-11-23T18:55:03Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__ __NOTOC__ {{Select Language|Main_Page}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-left&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-tfa-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;Welcome to SnesLab!&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 4px 8px;&amp;quot;&amp;gt;&#039;&#039;&#039;SnesLab&#039;&#039;&#039; is your essential laboratory for all SNES activities, including but not restricted to &#039;&#039;&#039;retrogaming&#039;&#039;&#039;, &#039;&#039;&#039;ROM hacking&#039;&#039;&#039;, &#039;&#039;&#039;hardware modding&#039;&#039;&#039;, &#039;&#039;&#039;technical documentation&#039;&#039;&#039;, &#039;&#039;&#039;handy tutorials&#039;&#039;&#039; and much more!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-right&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-itn-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;News&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 0 8px;&amp;quot;&amp;gt;{{News}}&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;256px&amp;quot; heights=&amp;quot;224px&amp;quot; mode=&amp;quot;traditional&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
File:PMCEntry NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:SecretofMana NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:Zelda3editor NoWatermark.png|&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Learn&amp;quot;&amp;gt;Learn&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SnesLab has several tutorials made for all kind of users. This is the perfect place for learning something about the Super Nintendo. While we have emphasis in modding &#039;&#039;[[Super Mario World]]&#039;&#039; and making levels for &#039;&#039;Super Mario Maker&#039;&#039; we welcome &#039;&#039;&#039;every type of hacker that enjoys modding classic games&#039;&#039;&#039;, and are interested to learn about said hacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Interact&amp;quot;&amp;gt;Interact&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our laboratory is full of &#039;&#039;&#039;fun challenges&#039;&#039;&#039;, &#039;&#039;&#039;events&#039;&#039;&#039;, and all around share our &#039;&#039;&#039;big projects&#039;&#039;&#039; to the community. SnesLab is completely self-sustaining, that is, we promote at first place a good ambience and opportunity to everyone start learning and have a nice stay on the site, regardless if you are still getting started or if you are an experienced ROM hacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Have_Fun21&amp;quot;&amp;gt;Have Fun!&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More important than anything, &#039;&#039;&#039;SnesLab&#039;&#039;&#039; targets the entire SNES community public and we&#039;re always open to anyone join us at any moment! Consider &#039;&#039;&#039;joining our Discord&#039;&#039;&#039; as well to really interact with the userbase! https://discord.gg/bGEV6PB&lt;br /&gt;
&lt;br /&gt;
And never forget... Have fun! On a life of so many problems and issues, the most important is &#039;&#039;&#039;to everyone have the nicest stay here!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;columns-4&amp;quot; style=&amp;quot;padding: 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Articles&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[SA-1]]&lt;br /&gt;
* [[HDMA]]&lt;br /&gt;
* [[SNES&#039;s PPU Registers]]&lt;br /&gt;
* [[WidescreenRomHacking|Widescreen SNES]]&lt;br /&gt;
* [[Dynamic Z]]&lt;br /&gt;
* [[SnesLab:Useful_Links|Useful Links]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Tools&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[List of SNES ROM hacking tools]]&lt;br /&gt;
* [[Lunar Magic]]&lt;br /&gt;
* [[Dyzen Sprite Maker]]&lt;br /&gt;
* [[UberASM Tool]]&lt;br /&gt;
* [[SPC Studio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Site Statistics&amp;lt;/b&amp;gt;&lt;br /&gt;
* Total articles: &#039;&#039;&#039;{{NUMBEROFARTICLES}}&#039;&#039;&#039; ([[Special:AllPages|view]])&lt;br /&gt;
* Total edits: &#039;&#039;&#039;{{NUMBEROFEDITS}}&#039;&#039;&#039;&lt;br /&gt;
* Total uploaded files: &#039;&#039;&#039;{{NUMBEROFFILES}}&#039;&#039;&#039;&lt;br /&gt;
* Active editors: &#039;&#039;&#039;{{NUMBEROFACTIVEUSERS}}&#039;&#039;&#039; ([[Special:ActiveUsers|view]])&lt;br /&gt;
* Users: &#039;&#039;&#039;{{NUMBEROFUSERS}}&#039;&#039;&#039; ([[Special:ListUsers|view]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Online Users&amp;lt;/b&amp;gt;&lt;br /&gt;
{{:Special:WhosOnline}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=958</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=958"/>
		<updated>2019-11-23T18:46:13Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__ __NOTOC__   {{Select Language|Main_Page}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-left&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-tfa-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;Welcome to SnesLab!&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 4px 8px;&amp;quot;&amp;gt;&#039;&#039;&#039;SnesLab&#039;&#039;&#039; is your essential laboratory for all SNES activities, including but not restricted to &#039;&#039;&#039;retrogaming&#039;&#039;&#039;, &#039;&#039;&#039;ROM hacking&#039;&#039;&#039;, &#039;&#039;&#039;hardware modding&#039;&#039;&#039;, &#039;&#039;&#039;technical documentation&#039;&#039;&#039;, &#039;&#039;&#039;handy tutorials&#039;&#039;&#039; and much more!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-right&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-itn-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;News&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 0 8px;&amp;quot;&amp;gt;{{News}}&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;256px&amp;quot; heights=&amp;quot;224px&amp;quot; mode=&amp;quot;traditional&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
File:PMCEntry NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:SecretofMana NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:Zelda3editor NoWatermark.png|&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Learn&amp;quot;&amp;gt;Learn&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SnesLab has several tutorials made for all kind of users. This is the perfect place for learning something about the Super Nintendo. While we have emphasis in modding &#039;&#039;[[Super Mario World]]&#039;&#039; and making levels for &#039;&#039;Super Mario Maker&#039;&#039; we welcome &#039;&#039;&#039;every type of hacker that enjoys modding classic games&#039;&#039;&#039;, and are interested to learn about said hacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Interact&amp;quot;&amp;gt;Interact&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our laboratory is full of &#039;&#039;&#039;fun challenges&#039;&#039;&#039;, &#039;&#039;&#039;events&#039;&#039;&#039;, and all around share our &#039;&#039;&#039;big projects&#039;&#039;&#039; to the community. SnesLab is completely self-sustaining, that is, we promote at first place a good ambience and opportunity to everyone start learning and have a nice stay on the site, regardless if you are still getting started or if you are an experienced ROM hacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Have_Fun21&amp;quot;&amp;gt;Have Fun!&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More important than anything, &#039;&#039;&#039;SnesLab&#039;&#039;&#039; targets the entire SNES community public and we&#039;re always open to anyone join us at any moment! Consider &#039;&#039;&#039;joining our Discord&#039;&#039;&#039; as well to really interact with the userbase! https://discord.gg/bGEV6PB&lt;br /&gt;
&lt;br /&gt;
And never forget... Have fun! On a life of so many problems and issues, the most important is &#039;&#039;&#039;to everyone have the nicest stay here!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;columns-4&amp;quot; style=&amp;quot;padding: 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Articles&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[SA-1]]&lt;br /&gt;
* [[HDMA]]&lt;br /&gt;
* [[SNES&#039;s PPU Registers]]&lt;br /&gt;
* [[WidescreenRomHacking|Widescreen SNES]]&lt;br /&gt;
* [[Dynamic Z]]&lt;br /&gt;
* [[SnesLab:Useful_Links|Useful Links]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Tools&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[List of SNES ROM hacking tools]]&lt;br /&gt;
* [[Lunar Magic]]&lt;br /&gt;
* [[Dyzen Sprite Maker]]&lt;br /&gt;
* [[UberASM Tool]]&lt;br /&gt;
* [[SPC Studio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Site Statistics&amp;lt;/b&amp;gt;&lt;br /&gt;
* Total articles: &#039;&#039;&#039;{{NUMBEROFARTICLES}}&#039;&#039;&#039; ([[Special:AllPages|view]])&lt;br /&gt;
* Total edits: &#039;&#039;&#039;{{NUMBEROFEDITS}}&#039;&#039;&#039;&lt;br /&gt;
* Total uploaded files: &#039;&#039;&#039;{{NUMBEROFFILES}}&#039;&#039;&#039;&lt;br /&gt;
* Active editors: &#039;&#039;&#039;{{NUMBEROFACTIVEUSERS}}&#039;&#039;&#039; ([[Special:ActiveUsers|view]])&lt;br /&gt;
* Users: &#039;&#039;&#039;{{NUMBEROFUSERS}}&#039;&#039;&#039; ([[Special:ListUsers|view]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Online Users&amp;lt;/b&amp;gt;&lt;br /&gt;
{{:Special:WhosOnline}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=957</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=957"/>
		<updated>2019-11-23T18:45:28Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__ __NOTOC__  {{Select Language|Main_Page}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-left&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-tfa-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;Welcome to SnesLab!&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 4px 8px;&amp;quot;&amp;gt;&#039;&#039;&#039;SnesLab&#039;&#039;&#039; is your essential laboratory for all SNES activities, including but not restricted to &#039;&#039;&#039;retrogaming&#039;&#039;&#039;, &#039;&#039;&#039;ROM hacking&#039;&#039;&#039;, &#039;&#039;&#039;hardware modding&#039;&#039;&#039;, &#039;&#039;&#039;technical documentation&#039;&#039;&#039;, &#039;&#039;&#039;handy tutorials&#039;&#039;&#039; and much more!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-right&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-itn-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;News&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 0 8px;&amp;quot;&amp;gt;{{News}}&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;256px&amp;quot; heights=&amp;quot;224px&amp;quot; mode=&amp;quot;traditional&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
File:PMCEntry NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:SecretofMana NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:Zelda3editor NoWatermark.png|&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Learn&amp;quot;&amp;gt;Learn&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SnesLab has several tutorials made for all kind of users. This is the perfect place for learning something about the Super Nintendo. While we have emphasis in modding &#039;&#039;[[Super Mario World]]&#039;&#039; and making levels for &#039;&#039;Super Mario Maker&#039;&#039; we welcome &#039;&#039;&#039;every type of hacker that enjoys modding classic games&#039;&#039;&#039;, and are interested to learn about said hacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Interact&amp;quot;&amp;gt;Interact&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our laboratory is full of &#039;&#039;&#039;fun challenges&#039;&#039;&#039;, &#039;&#039;&#039;events&#039;&#039;&#039;, and all around share our &#039;&#039;&#039;big projects&#039;&#039;&#039; to the community. SnesLab is completely self-sustaining, that is, we promote at first place a good ambience and opportunity to everyone start learning and have a nice stay on the site, regardless if you are still getting started or if you are an experienced ROM hacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Have_Fun21&amp;quot;&amp;gt;Have Fun!&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More important than anything, &#039;&#039;&#039;SnesLab&#039;&#039;&#039; targets the entire SNES community public and we&#039;re always open to anyone join us at any moment! Consider &#039;&#039;&#039;joining our Discord&#039;&#039;&#039; as well to really interact with the userbase! https://discord.gg/bGEV6PB&lt;br /&gt;
&lt;br /&gt;
And never forget... Have fun! On a life of so many problems and issues, the most important is &#039;&#039;&#039;to everyone have the nicest stay here!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;columns-4&amp;quot; style=&amp;quot;padding: 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Articles&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[SA-1]]&lt;br /&gt;
* [[HDMA]]&lt;br /&gt;
* [[SNES&#039;s PPU Registers]]&lt;br /&gt;
* [[WidescreenRomHacking|Widescreen SNES]]&lt;br /&gt;
* [[Dynamic Z]]&lt;br /&gt;
* [[SnesLab:Useful_Links|Useful Links]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Tools&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[List of SNES ROM hacking tools]]&lt;br /&gt;
* [[Lunar Magic]]&lt;br /&gt;
* [[Dyzen Sprite Maker]]&lt;br /&gt;
* [[UberASM Tool]]&lt;br /&gt;
* [[SPC Studio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Site Statistics&amp;lt;/b&amp;gt;&lt;br /&gt;
* Total articles: &#039;&#039;&#039;{{NUMBEROFARTICLES}}&#039;&#039;&#039; ([[Special:AllPages|view]])&lt;br /&gt;
* Total edits: &#039;&#039;&#039;{{NUMBEROFEDITS}}&#039;&#039;&#039;&lt;br /&gt;
* Total uploaded files: &#039;&#039;&#039;{{NUMBEROFFILES}}&#039;&#039;&#039;&lt;br /&gt;
* Active editors: &#039;&#039;&#039;{{NUMBEROFACTIVEUSERS}}&#039;&#039;&#039; ([[Special:ActiveUsers|view]])&lt;br /&gt;
* Users: &#039;&#039;&#039;{{NUMBEROFUSERS}}&#039;&#039;&#039; ([[Special:ListUsers|view]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Online Users&amp;lt;/b&amp;gt;&lt;br /&gt;
{{:Special:WhosOnline}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=956</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=956"/>
		<updated>2019-11-23T18:44:48Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__ __NOTOC__ {{Select Language|Main_Page}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-left&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-tfa-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;Welcome to SnesLab!&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 4px 8px;&amp;quot;&amp;gt;&#039;&#039;&#039;SnesLab&#039;&#039;&#039; is your essential laboratory for all SNES activities, including but not restricted to &#039;&#039;&#039;retrogaming&#039;&#039;&#039;, &#039;&#039;&#039;ROM hacking&#039;&#039;&#039;, &#039;&#039;&#039;hardware modding&#039;&#039;&#039;, &#039;&#039;&#039;technical documentation&#039;&#039;&#039;, &#039;&#039;&#039;handy tutorials&#039;&#039;&#039; and much more!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-right&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-itn-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;News&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 0 8px;&amp;quot;&amp;gt;{{News}}&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;256px&amp;quot; heights=&amp;quot;224px&amp;quot; mode=&amp;quot;traditional&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
File:PMCEntry NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:SecretofMana NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:Zelda3editor NoWatermark.png|&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Learn&amp;quot;&amp;gt;Learn&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SnesLab has several tutorials made for all kind of users. This is the perfect place for learning something about the Super Nintendo. While we have emphasis in modding &#039;&#039;[[Super Mario World]]&#039;&#039; and making levels for &#039;&#039;Super Mario Maker&#039;&#039; we welcome &#039;&#039;&#039;every type of hacker that enjoys modding classic games&#039;&#039;&#039;, and are interested to learn about said hacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Interact&amp;quot;&amp;gt;Interact&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our laboratory is full of &#039;&#039;&#039;fun challenges&#039;&#039;&#039;, &#039;&#039;&#039;events&#039;&#039;&#039;, and all around share our &#039;&#039;&#039;big projects&#039;&#039;&#039; to the community. SnesLab is completely self-sustaining, that is, we promote at first place a good ambience and opportunity to everyone start learning and have a nice stay on the site, regardless if you are still getting started or if you are an experienced ROM hacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Have_Fun21&amp;quot;&amp;gt;Have Fun!&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More important than anything, &#039;&#039;&#039;SnesLab&#039;&#039;&#039; targets the entire SNES community public and we&#039;re always open to anyone join us at any moment! Consider &#039;&#039;&#039;joining our Discord&#039;&#039;&#039; as well to really interact with the userbase! https://discord.gg/bGEV6PB&lt;br /&gt;
&lt;br /&gt;
And never forget... Have fun! On a life of so many problems and issues, the most important is &#039;&#039;&#039;to everyone have the nicest stay here!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;columns-4&amp;quot; style=&amp;quot;padding: 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Articles&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[SA-1]]&lt;br /&gt;
* [[HDMA]]&lt;br /&gt;
* [[SNES&#039;s PPU Registers]]&lt;br /&gt;
* [[WidescreenRomHacking|Widescreen SNES]]&lt;br /&gt;
* [[Dynamic Z]]&lt;br /&gt;
* [[SnesLab:Useful_Links|Useful Links]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Tools&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[List of SNES ROM hacking tools]]&lt;br /&gt;
* [[Lunar Magic]]&lt;br /&gt;
* [[Dyzen Sprite Maker]]&lt;br /&gt;
* [[UberASM Tool]]&lt;br /&gt;
* [[SPC Studio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Site Statistics&amp;lt;/b&amp;gt;&lt;br /&gt;
* Total articles: &#039;&#039;&#039;{{NUMBEROFARTICLES}}&#039;&#039;&#039; ([[Special:AllPages|view]])&lt;br /&gt;
* Total edits: &#039;&#039;&#039;{{NUMBEROFEDITS}}&#039;&#039;&#039;&lt;br /&gt;
* Total uploaded files: &#039;&#039;&#039;{{NUMBEROFFILES}}&#039;&#039;&#039;&lt;br /&gt;
* Active editors: &#039;&#039;&#039;{{NUMBEROFACTIVEUSERS}}&#039;&#039;&#039; ([[Special:ActiveUsers|view]])&lt;br /&gt;
* Users: &#039;&#039;&#039;{{NUMBEROFUSERS}}&#039;&#039;&#039; ([[Special:ListUsers|view]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Online Users&amp;lt;/b&amp;gt;&lt;br /&gt;
{{:Special:WhosOnline}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=955</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=955"/>
		<updated>2019-11-23T18:31:39Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__ __NOTOC__       {{Select Language|Main_Page}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-left&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-tfa-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;Welcome to SnesLab!&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 4px 8px;&amp;quot;&amp;gt;&#039;&#039;&#039;SnesLab&#039;&#039;&#039; is your essential laboratory for all SNES activities, including but not restricted to &#039;&#039;&#039;retrogaming&#039;&#039;&#039;, &#039;&#039;&#039;ROM hacking&#039;&#039;&#039;, &#039;&#039;&#039;hardware modding&#039;&#039;&#039;, &#039;&#039;&#039;technical documentation&#039;&#039;&#039;, &#039;&#039;&#039;handy tutorials&#039;&#039;&#039; and much more!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-right&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-itn-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;News&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 0 8px;&amp;quot;&amp;gt;{{News}}&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;256px&amp;quot; heights=&amp;quot;224px&amp;quot; mode=&amp;quot;traditional&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
File:PMCEntry NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:SecretofMana NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:Zelda3editor NoWatermark.png|&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Learn&amp;quot;&amp;gt;Learn&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SnesLab has several tutorials made for all kind of users. This is the perfect place for learning something about the Super Nintendo. While we have emphasis in modding &#039;&#039;[[Super Mario World]]&#039;&#039; and making levels for &#039;&#039;Super Mario Maker&#039;&#039; we welcome &#039;&#039;&#039;every type of hacker that enjoys modding classic games&#039;&#039;&#039;, and are interested to learn about said hacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Interact&amp;quot;&amp;gt;Interact&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our laboratory is full of &#039;&#039;&#039;fun challenges&#039;&#039;&#039;, &#039;&#039;&#039;events&#039;&#039;&#039;, and all around share our &#039;&#039;&#039;big projects&#039;&#039;&#039; to the community. SnesLab is completely self-sustaining, that is, we promote at first place a good ambience and opportunity to everyone start learning and have a nice stay on the site, regardless if you are still getting started or if you are an experienced ROM hacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Have_Fun21&amp;quot;&amp;gt;Have Fun!&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More important than anything, &#039;&#039;&#039;SnesLab&#039;&#039;&#039; targets the entire SNES community public and we&#039;re always open to anyone join us at any moment! Consider &#039;&#039;&#039;joining our Discord&#039;&#039;&#039; as well to really interact with the userbase! https://discord.gg/bGEV6PB&lt;br /&gt;
&lt;br /&gt;
And never forget... Have fun! On a life of so many problems and issues, the most important is &#039;&#039;&#039;to everyone have the nicest stay here!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;columns-4&amp;quot; style=&amp;quot;padding: 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Articles&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[SA-1]]&lt;br /&gt;
* [[HDMA]]&lt;br /&gt;
* [[SNES&#039;s PPU Registers]]&lt;br /&gt;
* [[WidescreenRomHacking|Widescreen SNES]]&lt;br /&gt;
* [[Dynamic Z]]&lt;br /&gt;
* [[SnesLab:Useful_Links|Useful Links]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Tools&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[List of SNES ROM hacking tools]]&lt;br /&gt;
* [[Lunar Magic]]&lt;br /&gt;
* [[Dyzen Sprite Maker]]&lt;br /&gt;
* [[UberASM Tool]]&lt;br /&gt;
* [[SPC Studio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Site Statistics&amp;lt;/b&amp;gt;&lt;br /&gt;
* Total articles: &#039;&#039;&#039;{{NUMBEROFARTICLES}}&#039;&#039;&#039; ([[Special:AllPages|view]])&lt;br /&gt;
* Total edits: &#039;&#039;&#039;{{NUMBEROFEDITS}}&#039;&#039;&#039;&lt;br /&gt;
* Total uploaded files: &#039;&#039;&#039;{{NUMBEROFFILES}}&#039;&#039;&#039;&lt;br /&gt;
* Active editors: &#039;&#039;&#039;{{NUMBEROFACTIVEUSERS}}&#039;&#039;&#039; ([[Special:ActiveUsers|view]])&lt;br /&gt;
* Users: &#039;&#039;&#039;{{NUMBEROFUSERS}}&#039;&#039;&#039; ([[Special:ListUsers|view]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Online Users&amp;lt;/b&amp;gt;&lt;br /&gt;
{{:Special:WhosOnline}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=954</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=954"/>
		<updated>2019-11-23T18:31:29Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__ __NOTOC__      {{Select Language|Main_Page}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-left&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-tfa-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;Welcome to SnesLab!&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 4px 8px;&amp;quot;&amp;gt;&#039;&#039;&#039;SnesLab&#039;&#039;&#039; is your essential laboratory for all SNES activities, including but not restricted to &#039;&#039;&#039;retrogaming&#039;&#039;&#039;, &#039;&#039;&#039;ROM hacking&#039;&#039;&#039;, &#039;&#039;&#039;hardware modding&#039;&#039;&#039;, &#039;&#039;&#039;technical documentation&#039;&#039;&#039;, &#039;&#039;&#039;handy tutorials&#039;&#039;&#039; and much more!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-right&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-itn-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;News&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 0 8px;&amp;quot;&amp;gt;{{News}}&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;256px&amp;quot; heights=&amp;quot;224px&amp;quot; mode=&amp;quot;traditional&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
File:PMCEntry NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:SecretofMana NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:Zelda3editor NoWatermark.png|&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Learn&amp;quot;&amp;gt;Learn&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SnesLab has several tutorials made for all kind of users. This is the perfect place for learning something about the Super Nintendo. While we have emphasis in modding &#039;&#039;[[Super Mario World]]&#039;&#039; and making levels for &#039;&#039;Super Mario Maker&#039;&#039; we welcome &#039;&#039;&#039;every type of hacker that enjoys modding classic games&#039;&#039;&#039;, and are interested to learn about said hacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Interact&amp;quot;&amp;gt;Interact&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our laboratory is full of &#039;&#039;&#039;fun challenges&#039;&#039;&#039;, &#039;&#039;&#039;events&#039;&#039;&#039;, and all around share our &#039;&#039;&#039;big projects&#039;&#039;&#039; to the community. SnesLab is completely self-sustaining, that is, we promote at first place a good ambience and opportunity to everyone start learning and have a nice stay on the site, regardless if you are still getting started or if you are an experienced ROM hacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Have_Fun21&amp;quot;&amp;gt;Have Fun!&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More important than anything, &#039;&#039;&#039;SnesLab&#039;&#039;&#039; targets the entire SNES community public and we&#039;re always open to anyone join us at any moment! Consider &#039;&#039;&#039;joining our Discord&#039;&#039;&#039; as well to really interact with the userbase! https://discord.gg/bGEV6PB&lt;br /&gt;
&lt;br /&gt;
And never forget... Have fun! On a life of so many problems and issues, the most important is &#039;&#039;&#039;to everyone have the nicest stay here!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;columns-4&amp;quot; style=&amp;quot;padding: 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Articles&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[SA-1]]&lt;br /&gt;
* [[HDMA]]&lt;br /&gt;
* [[SNES&#039;s PPU Registers]]&lt;br /&gt;
* [[WidescreenRomHacking|Widescreen SNES]]&lt;br /&gt;
* [[Dynamic Z]]&lt;br /&gt;
* [[SnesLab:Useful_Links|Useful Links]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Tools&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[List of SNES ROM hacking tools]]&lt;br /&gt;
* [[Lunar Magic]]&lt;br /&gt;
* [[Dyzen Sprite Maker]]&lt;br /&gt;
* [[UberASM Tool]]&lt;br /&gt;
* [[SPC Studio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Site Statistics&amp;lt;/b&amp;gt;&lt;br /&gt;
* Total articles: &#039;&#039;&#039;{{NUMBEROFARTICLES}}&#039;&#039;&#039; ([[Special:AllPages|view]])&lt;br /&gt;
* Total edits: &#039;&#039;&#039;{{NUMBEROFEDITS}}&#039;&#039;&#039;&lt;br /&gt;
* Total uploaded files: &#039;&#039;&#039;{{NUMBEROFFILES}}&#039;&#039;&#039;&lt;br /&gt;
* Active editors: &#039;&#039;&#039;{{NUMBEROFACTIVEUSERS}}&#039;&#039;&#039; ([[Special:ActiveUsers|view]])&lt;br /&gt;
* Users: &#039;&#039;&#039;{{NUMBEROFUSERS}}&#039;&#039;&#039; ([[Special:ListUsers|view]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Online Users&amp;lt;/b&amp;gt;&lt;br /&gt;
{{:Special:WhosOnline}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=953</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=953"/>
		<updated>2019-11-23T18:30:47Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__ __NOTOC__     {{Select Language|Main_Page}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-left&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-tfa-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;Welcome to SnesLab!&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 4px 8px;&amp;quot;&amp;gt;&#039;&#039;&#039;SnesLab&#039;&#039;&#039; is your essential laboratory for all SNES activities, including but not restricted to &#039;&#039;&#039;retrogaming&#039;&#039;&#039;, &#039;&#039;&#039;ROM hacking&#039;&#039;&#039;, &#039;&#039;&#039;hardware modding&#039;&#039;&#039;, &#039;&#039;&#039;technical documentation&#039;&#039;&#039;, &#039;&#039;&#039;handy tutorials&#039;&#039;&#039; and much more!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-right&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-itn-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;News&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 0 8px;&amp;quot;&amp;gt;{{News}}&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;256px&amp;quot; heights=&amp;quot;224px&amp;quot; mode=&amp;quot;traditional&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
File:PMCEntry NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:SecretofMana NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:Zelda3editor NoWatermark.png|&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Learn&amp;quot;&amp;gt;Learn&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SnesLab has several tutorials made for all kind of users. This is the perfect place for learning something about the Super Nintendo. While we have emphasis in modding &#039;&#039;[[Super Mario World]]&#039;&#039; and making levels for &#039;&#039;Super Mario Maker&#039;&#039; we welcome &#039;&#039;&#039;every type of hacker that enjoys modding classic games&#039;&#039;&#039;, and are interested to learn about said hacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Interact&amp;quot;&amp;gt;Interact&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our laboratory is full of &#039;&#039;&#039;fun challenges&#039;&#039;&#039;, &#039;&#039;&#039;events&#039;&#039;&#039;, and all around share our &#039;&#039;&#039;big projects&#039;&#039;&#039; to the community. SnesLab is completely self-sustaining, that is, we promote at first place a good ambience and opportunity to everyone start learning and have a nice stay on the site, regardless if you are still getting started or if you are an experienced ROM hacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Have_Fun21&amp;quot;&amp;gt;Have Fun!&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More important than anything, &#039;&#039;&#039;SnesLab&#039;&#039;&#039; targets the entire SNES community public and we&#039;re always open to anyone join us at any moment! Consider &#039;&#039;&#039;joining our Discord&#039;&#039;&#039; as well to really interact with the userbase! https://discord.gg/bGEV6PB&lt;br /&gt;
&lt;br /&gt;
And never forget... Have fun! On a life of so many problems and issues, the most important is &#039;&#039;&#039;to everyone have the nicest stay here!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;columns-4&amp;quot; style=&amp;quot;padding: 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Articles&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[SA-1]]&lt;br /&gt;
* [[HDMA]]&lt;br /&gt;
* [[SNES&#039;s PPU Registers]]&lt;br /&gt;
* [[WidescreenRomHacking|Widescreen SNES]]&lt;br /&gt;
* [[Dynamic Z]]&lt;br /&gt;
* [[SnesLab:Useful_Links|Useful Links]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Tools&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[List of SNES ROM hacking tools]]&lt;br /&gt;
* [[Lunar Magic]]&lt;br /&gt;
* [[Dyzen Sprite Maker]]&lt;br /&gt;
* [[UberASM Tool]]&lt;br /&gt;
* [[SPC Studio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Site Statistics&amp;lt;/b&amp;gt;&lt;br /&gt;
* Total articles: &#039;&#039;&#039;{{NUMBEROFARTICLES}}&#039;&#039;&#039; ([[Special:AllPages|view]])&lt;br /&gt;
* Total edits: &#039;&#039;&#039;{{NUMBEROFEDITS}}&#039;&#039;&#039;&lt;br /&gt;
* Total uploaded files: &#039;&#039;&#039;{{NUMBEROFFILES}}&#039;&#039;&#039;&lt;br /&gt;
* Active editors: &#039;&#039;&#039;{{NUMBEROFACTIVEUSERS}}&#039;&#039;&#039; ([[Special:ActiveUsers|view]])&lt;br /&gt;
* Users: &#039;&#039;&#039;{{NUMBEROFUSERS}}&#039;&#039;&#039; ([[Special:ListUsers|view]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Online Users&amp;lt;/b&amp;gt;&lt;br /&gt;
{{:Special:WhosOnline}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=952</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=952"/>
		<updated>2019-11-23T18:29:45Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__ __NOTOC__    {{Select Language|Main_Page}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-left&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-tfa-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;Welcome to SnesLab!&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 4px 8px;&amp;quot;&amp;gt;&#039;&#039;&#039;SnesLab&#039;&#039;&#039; is your essential laboratory for all SNES activities, including but not restricted to &#039;&#039;&#039;retrogaming&#039;&#039;&#039;, &#039;&#039;&#039;ROM hacking&#039;&#039;&#039;, &#039;&#039;&#039;hardware modding&#039;&#039;&#039;, &#039;&#039;&#039;technical documentation&#039;&#039;&#039;, &#039;&#039;&#039;handy tutorials&#039;&#039;&#039; and much more!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-right&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-itn-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;News&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 0 8px;&amp;quot;&amp;gt;{{News}}&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;256px&amp;quot; heights=&amp;quot;224px&amp;quot; mode=&amp;quot;traditional&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
File:PMCEntry NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:SecretofMana NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:Zelda3editor NoWatermark.png|&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Learn&amp;quot;&amp;gt;Learn&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SnesLab has several tutorials made for all kind of users. This is the perfect place for learning something about the Super Nintendo. While we have emphasis in modding &#039;&#039;[[Super Mario World]]&#039;&#039; and making levels for &#039;&#039;Super Mario Maker&#039;&#039; we welcome &#039;&#039;&#039;every type of hacker that enjoys modding classic games&#039;&#039;&#039;, and are interested to learn about said hacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Interact&amp;quot;&amp;gt;Interact&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our laboratory is full of &#039;&#039;&#039;fun challenges&#039;&#039;&#039;, &#039;&#039;&#039;events&#039;&#039;&#039;, and all around share our &#039;&#039;&#039;big projects&#039;&#039;&#039; to the community. SnesLab is completely self-sustaining, that is, we promote at first place a good ambience and opportunity to everyone start learning and have a nice stay on the site, regardless if you are still getting started or if you are an experienced ROM hacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Have_Fun21&amp;quot;&amp;gt;Have Fun!&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More important than anything, &#039;&#039;&#039;SnesLab&#039;&#039;&#039; targets the entire SNES community public and we&#039;re always open to anyone join us at any moment! Consider &#039;&#039;&#039;joining our Discord&#039;&#039;&#039; as well to really interact with the userbase! https://discord.gg/bGEV6PB&lt;br /&gt;
&lt;br /&gt;
And never forget... Have fun! On a life of so many problems and issues, the most important is &#039;&#039;&#039;to everyone have the nicest stay here!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;columns-4&amp;quot; style=&amp;quot;padding: 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Articles&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[SA-1]]&lt;br /&gt;
* [[HDMA]]&lt;br /&gt;
* [[SNES&#039;s PPU Registers]]&lt;br /&gt;
* [[WidescreenRomHacking|Widescreen SNES]]&lt;br /&gt;
* [[Dynamic Z]]&lt;br /&gt;
* [[SnesLab:Useful_Links|Useful Links]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Tools&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[List of SNES ROM hacking tools]]&lt;br /&gt;
* [[Lunar Magic]]&lt;br /&gt;
* [[Dyzen Sprite Maker]]&lt;br /&gt;
* [[UberASM Tool]]&lt;br /&gt;
* [[SPC Studio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Site Statistics&amp;lt;/b&amp;gt;&lt;br /&gt;
* Total articles: &#039;&#039;&#039;{{NUMBEROFARTICLES}}&#039;&#039;&#039; ([[Special:AllPages|view]])&lt;br /&gt;
* Total edits: &#039;&#039;&#039;{{NUMBEROFEDITS}}&#039;&#039;&#039;&lt;br /&gt;
* Total uploaded files: &#039;&#039;&#039;{{NUMBEROFFILES}}&#039;&#039;&#039;&lt;br /&gt;
* Active editors: &#039;&#039;&#039;{{NUMBEROFACTIVEUSERS}}&#039;&#039;&#039; ([[Special:ActiveUsers|view]])&lt;br /&gt;
* Users: &#039;&#039;&#039;{{NUMBEROFUSERS}}&#039;&#039;&#039; ([[Special:ListUsers|view]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Online Users&amp;lt;/b&amp;gt;&lt;br /&gt;
{{:Special:WhosOnline}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=951</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=951"/>
		<updated>2019-11-23T18:27:58Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: aaab&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__ __NOTOC__   {{Select Language|Main_Page}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-left&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-tfa-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;Welcome to SnesLab!&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 4px 8px;&amp;quot;&amp;gt;&#039;&#039;&#039;SnesLab&#039;&#039;&#039; is your essential laboratory for all SNES activities, including but not restricted to &#039;&#039;&#039;retrogaming&#039;&#039;&#039;, &#039;&#039;&#039;ROM hacking&#039;&#039;&#039;, &#039;&#039;&#039;hardware modding&#039;&#039;&#039;, &#039;&#039;&#039;technical documentation&#039;&#039;&#039;, &#039;&#039;&#039;handy tutorials&#039;&#039;&#039; and much more!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-right&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-itn-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;News&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 0 8px;&amp;quot;&amp;gt;{{News}}&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;256px&amp;quot; heights=&amp;quot;224px&amp;quot; mode=&amp;quot;traditional&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
File:PMCEntry NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:SecretofMana NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:Zelda3editor NoWatermark.png|&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Learn&amp;quot;&amp;gt;Learn&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SnesLab has several tutorials made for all kind of users. This is the perfect place for learning something about the Super Nintendo. While we have emphasis in modding &#039;&#039;[[Super Mario World]]&#039;&#039; and making levels for &#039;&#039;Super Mario Maker&#039;&#039; we welcome &#039;&#039;&#039;every type of hacker that enjoys modding classic games&#039;&#039;&#039;, and are interested to learn about said hacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Interact&amp;quot;&amp;gt;Interact&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our laboratory is full of &#039;&#039;&#039;fun challenges&#039;&#039;&#039;, &#039;&#039;&#039;events&#039;&#039;&#039;, and all around share our &#039;&#039;&#039;big projects&#039;&#039;&#039; to the community. SnesLab is completely self-sustaining, that is, we promote at first place a good ambience and opportunity to everyone start learning and have a nice stay on the site, regardless if you are still getting started or if you are an experienced ROM hacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Have_Fun21&amp;quot;&amp;gt;Have Fun!&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More important than anything, &#039;&#039;&#039;SnesLab&#039;&#039;&#039; targets the entire SNES community public and we&#039;re always open to anyone join us at any moment! Consider &#039;&#039;&#039;joining our Discord&#039;&#039;&#039; as well to really interact with the userbase! https://discord.gg/bGEV6PB&lt;br /&gt;
&lt;br /&gt;
And never forget... Have fun! On a life of so many problems and issues, the most important is &#039;&#039;&#039;to everyone have the nicest stay here!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;columns-4&amp;quot; style=&amp;quot;padding: 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Articles&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[SA-1]]&lt;br /&gt;
* [[HDMA]]&lt;br /&gt;
* [[SNES&#039;s PPU Registers]]&lt;br /&gt;
* [[WidescreenRomHacking|Widescreen SNES]]&lt;br /&gt;
* [[Dynamic Z]]&lt;br /&gt;
* [[SnesLab:Useful_Links|Useful Links]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Tools&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[List of SNES ROM hacking tools]]&lt;br /&gt;
* [[Lunar Magic]]&lt;br /&gt;
* [[Dyzen Sprite Maker]]&lt;br /&gt;
* [[UberASM Tool]]&lt;br /&gt;
* [[SPC Studio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Site Statistics&amp;lt;/b&amp;gt;&lt;br /&gt;
* Total articles: &#039;&#039;&#039;{{NUMBEROFARTICLES}}&#039;&#039;&#039; ([[Special:AllPages|view]])&lt;br /&gt;
* Total edits: &#039;&#039;&#039;{{NUMBEROFEDITS}}&#039;&#039;&#039;&lt;br /&gt;
* Total uploaded files: &#039;&#039;&#039;{{NUMBEROFFILES}}&#039;&#039;&#039;&lt;br /&gt;
* Active editors: &#039;&#039;&#039;{{NUMBEROFACTIVEUSERS}}&#039;&#039;&#039; ([[Special:ActiveUsers|view]])&lt;br /&gt;
* Users: &#039;&#039;&#039;{{NUMBEROFUSERS}}&#039;&#039;&#039; ([[Special:ListUsers|view]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Online Users&amp;lt;/b&amp;gt;&lt;br /&gt;
{{:Special:WhosOnline}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=950</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=950"/>
		<updated>2019-11-23T18:25:30Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: aaa&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__ __NOTOC__ {{Select Language|Main_Page}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-left&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-tfa-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;Welcome to SnesLab!&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 4px 8px;&amp;quot;&amp;gt;&#039;&#039;&#039;SnesLab&#039;&#039;&#039; is your essential laboratory for all SNES activities, including but not restricted to &#039;&#039;&#039;retrogaming&#039;&#039;&#039;, &#039;&#039;&#039;ROM hacking&#039;&#039;&#039;, &#039;&#039;&#039;hardware modding&#039;&#039;&#039;, &#039;&#039;&#039;technical documentation&#039;&#039;&#039;, &#039;&#039;&#039;handy tutorials&#039;&#039;&#039; and much more!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-right&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-itn-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;News&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 0 8px;&amp;quot;&amp;gt;{{News}}&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;256px&amp;quot; heights=&amp;quot;224px&amp;quot; mode=&amp;quot;traditional&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
File:PMCEntry NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:SecretofMana NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:Zelda3editor NoWatermark.png|&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Learn&amp;quot;&amp;gt;Learn&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SnesLab has several tutorials made for all kind of users. This is the perfect place for learning something about the Super Nintendo. While we have emphasis in modding &#039;&#039;[[Super Mario World]]&#039;&#039; and making levels for &#039;&#039;Super Mario Maker&#039;&#039; we welcome &#039;&#039;&#039;every type of hacker that enjoys modding classic games&#039;&#039;&#039;, and are interested to learn about said hacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Interact&amp;quot;&amp;gt;Interact&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our laboratory is full of &#039;&#039;&#039;fun challenges&#039;&#039;&#039;, &#039;&#039;&#039;events&#039;&#039;&#039;, and all around share our &#039;&#039;&#039;big projects&#039;&#039;&#039; to the community. SnesLab is completely self-sustaining, that is, we promote at first place a good ambience and opportunity to everyone start learning and have a nice stay on the site, regardless if you are still getting started or if you are an experienced ROM hacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Have_Fun21&amp;quot;&amp;gt;Have Fun!&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More important than anything, &#039;&#039;&#039;SnesLab&#039;&#039;&#039; targets the entire SNES community public and we&#039;re always open to anyone join us at any moment! Consider &#039;&#039;&#039;joining our Discord&#039;&#039;&#039; as well to really interact with the userbase! https://discord.gg/bGEV6PB&lt;br /&gt;
&lt;br /&gt;
And never forget... Have fun! On a life of so many problems and issues, the most important is &#039;&#039;&#039;to everyone have the nicest stay here!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;columns-4&amp;quot; style=&amp;quot;padding: 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Articles&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[SA-1]]&lt;br /&gt;
* [[HDMA]]&lt;br /&gt;
* [[SNES&#039;s PPU Registers]]&lt;br /&gt;
* [[WidescreenRomHacking|Widescreen SNES]]&lt;br /&gt;
* [[Dynamic Z]]&lt;br /&gt;
* [[SnesLab:Useful_Links|Useful Links]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Tools&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[List of SNES ROM hacking tools]]&lt;br /&gt;
* [[Lunar Magic]]&lt;br /&gt;
* [[Dyzen Sprite Maker]]&lt;br /&gt;
* [[UberASM Tool]]&lt;br /&gt;
* [[SPC Studio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Site Statistics&amp;lt;/b&amp;gt;&lt;br /&gt;
* Total articles: &#039;&#039;&#039;{{NUMBEROFARTICLES}}&#039;&#039;&#039; ([[Special:AllPages|view]])&lt;br /&gt;
* Total edits: &#039;&#039;&#039;{{NUMBEROFEDITS}}&#039;&#039;&#039;&lt;br /&gt;
* Total uploaded files: &#039;&#039;&#039;{{NUMBEROFFILES}}&#039;&#039;&#039;&lt;br /&gt;
* Active editors: &#039;&#039;&#039;{{NUMBEROFACTIVEUSERS}}&#039;&#039;&#039; ([[Special:ActiveUsers|view]])&lt;br /&gt;
* Users: &#039;&#039;&#039;{{NUMBEROFUSERS}}&#039;&#039;&#039; ([[Special:ListUsers|view]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Online Users&amp;lt;/b&amp;gt;&lt;br /&gt;
{{:Special:WhosOnline}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=949</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Main_Page&amp;diff=949"/>
		<updated>2019-11-23T17:58:24Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: testing #wiki-updates&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__ __NOTOC__  {{Select Language|Main_Page}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-left&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-tfa-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;Welcome to SnesLab!&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 4px 8px;&amp;quot;&amp;gt;&#039;&#039;&#039;SnesLab&#039;&#039;&#039; is your essential laboratory for all SNES activities, including but not restricted to &#039;&#039;&#039;retrogaming&#039;&#039;&#039;, &#039;&#039;&#039;ROM hacking&#039;&#039;&#039;, &#039;&#039;&#039;hardware modding&#039;&#039;&#039;, &#039;&#039;&#039;technical documentation&#039;&#039;&#039;, &#039;&#039;&#039;handy tutorials&#039;&#039;&#039; and much more!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;portal-column-right&amp;quot;&amp;gt;&amp;lt;h2 id=&amp;quot;mp-itn-h2&amp;quot; style=&amp;quot;margin: 0; padding: 0; font-family: inherit; font-size: 200%; font-weight: bold; border: 0; text-align: left;&amp;quot;&amp;gt;News&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding: 0 8px;&amp;quot;&amp;gt;{{News}}&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;256px&amp;quot; heights=&amp;quot;224px&amp;quot; mode=&amp;quot;traditional&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
File:PMCEntry NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:SecretofMana NoWatermark.png|&#039;&#039;&lt;br /&gt;
File:Zelda3editor NoWatermark.png|&#039;&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Learn&amp;quot;&amp;gt;Learn&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SnesLab has several tutorials made for all kind of users. This is the perfect place for learning something about the Super Nintendo. While we have emphasis in modding &#039;&#039;[[Super Mario World]]&#039;&#039; and making levels for &#039;&#039;Super Mario Maker&#039;&#039; we welcome &#039;&#039;&#039;every type of hacker that enjoys modding classic games&#039;&#039;&#039;, and are interested to learn about said hacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Interact&amp;quot;&amp;gt;Interact&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our laboratory is full of &#039;&#039;&#039;fun challenges&#039;&#039;&#039;, &#039;&#039;&#039;events&#039;&#039;&#039;, and all around share our &#039;&#039;&#039;big projects&#039;&#039;&#039; to the community. SnesLab is completely self-sustaining, that is, we promote at first place a good ambience and opportunity to everyone start learning and have a nice stay on the site, regardless if you are still getting started or if you are an experienced ROM hacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 style=&amp;quot;border: 0;&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-headline&amp;quot; id=&amp;quot;Have_Fun21&amp;quot;&amp;gt;Have Fun!&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More important than anything, &#039;&#039;&#039;SnesLab&#039;&#039;&#039; targets the entire SNES community public and we&#039;re always open to anyone join us at any moment! Consider &#039;&#039;&#039;joining our Discord&#039;&#039;&#039; as well to really interact with the userbase! https://discord.gg/bGEV6PB&lt;br /&gt;
&lt;br /&gt;
And never forget... Have fun! On a life of so many problems and issues, the most important is &#039;&#039;&#039;to everyone have the nicest stay here!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;columns-4&amp;quot; style=&amp;quot;padding: 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Articles&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[SA-1]]&lt;br /&gt;
* [[HDMA]]&lt;br /&gt;
* [[SNES&#039;s PPU Registers]]&lt;br /&gt;
* [[WidescreenRomHacking|Widescreen SNES]]&lt;br /&gt;
* [[Dynamic Z]]&lt;br /&gt;
* [[SnesLab:Useful_Links|Useful Links]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Tools&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[List of SNES ROM hacking tools]]&lt;br /&gt;
* [[Lunar Magic]]&lt;br /&gt;
* [[Dyzen Sprite Maker]]&lt;br /&gt;
* [[UberASM Tool]]&lt;br /&gt;
* [[SPC Studio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Site Statistics&amp;lt;/b&amp;gt;&lt;br /&gt;
* Total articles: &#039;&#039;&#039;{{NUMBEROFARTICLES}}&#039;&#039;&#039; ([[Special:AllPages|view]])&lt;br /&gt;
* Total edits: &#039;&#039;&#039;{{NUMBEROFEDITS}}&#039;&#039;&#039;&lt;br /&gt;
* Total uploaded files: &#039;&#039;&#039;{{NUMBEROFFILES}}&#039;&#039;&#039;&lt;br /&gt;
* Active editors: &#039;&#039;&#039;{{NUMBEROFACTIVEUSERS}}&#039;&#039;&#039; ([[Special:ActiveUsers|view]])&lt;br /&gt;
* Users: &#039;&#039;&#039;{{NUMBEROFUSERS}}&#039;&#039;&#039; ([[Special:ListUsers|view]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;column&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;b style=&amp;quot;font-size: 150%;&amp;quot;&amp;gt;Online Users&amp;lt;/b&amp;gt;&lt;br /&gt;
{{:Special:WhosOnline}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=F-Zero_RAM_Map&amp;diff=919</id>
		<title>F-Zero RAM Map</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=F-Zero_RAM_Map&amp;diff=919"/>
		<updated>2019-11-18T01:32:54Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: fix word wrapping&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a RAM Map for F-Zero that aims to be fairly comprehensible.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===== Data Types =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Accepted Values !! Size !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Angle16 || 0x0000 - 0xBFFF || 16-bit || An angle with extra fractional precision.&amp;lt;br&amp;gt;&lt;br /&gt;
0x0000 = 0 degrees&amp;lt;br&amp;gt;&lt;br /&gt;
0xBFFF ≃ 359.992675781 degrees&amp;lt;br&amp;gt;&lt;br /&gt;
Only the high byte affects the gameplay, the low byte is there just for fractional precision.&amp;lt;br&amp;gt;&lt;br /&gt;
(Each unit increments the real angle value by about  0.00732421875 degrees)&lt;br /&gt;
|-&lt;br /&gt;
| Angle8 || 0x00 - 0xBF || 8-bit || An angle without the fractional precision.&amp;lt;br&amp;gt;&lt;br /&gt;
0x00 = 0 degrees&amp;lt;br&amp;gt;&lt;br /&gt;
0xBF ≃ 358.125 degrees&amp;lt;br&amp;gt;&lt;br /&gt;
(Each unit increments the real angle value by about 1.875 degrees)&lt;br /&gt;
|-&lt;br /&gt;
| CoordX || 0x0000 - 0x1FFF || 16-bit || X coordinate value. These usually wrap around at 0x1FFF automatically.&lt;br /&gt;
|-&lt;br /&gt;
| CoordY || 0x0000 - 0x0FFF || 16-bit || Y coordinate value. These usually wrap around at 0x0FFF automatically.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===== Zero Page (Direct Page) =====&lt;br /&gt;
The Direct Page register (DP) is fixed to #$0000 all the time.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Length !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| $7E0000 || ?? bytes || Misc. || Scratchpad RAM. Used for various purposes, including: temporary storage, subroutine parameters, etc.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0034 || 1 byte || Sprites || Used in the AI car graphics routine.&amp;lt;br&amp;gt;&lt;br /&gt;
How many sprite tiles were needed to draw the AI car.&amp;lt;br&amp;gt;&lt;br /&gt;
Stored to $7E11D0 when the graphics routine ends.&lt;br /&gt;
|-&lt;br /&gt;
| $7E003E || 2 bytes || Misc. || Relevant value picked from the table at 7E:1076.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0040 || 1 byte || Flag || &amp;quot;Frame done&amp;quot; flag. Set to zero at the start of the main loop.&amp;lt;br&amp;gt;&lt;br /&gt;
When NMI happens, it&#039;s decremented to #$FF, unless the value was already non-zero (i.e. a lag frame occurred.)&amp;lt;br&amp;gt;&lt;br /&gt;
This is used to make sure the gamestate runs once per frame.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0041 || 2 bytes || Pointer || IRQ code pointer.&amp;lt;br&amp;gt;&lt;br /&gt;
$8612 - Do nothing;&amp;lt;br&amp;gt;&lt;br /&gt;
$8616 (V-Counter = 18) - Set transparent power bar color, then trigger next IRQ at V-Counter = 28, set IRQ code pointer $863C;&amp;lt;br&amp;gt;&lt;br /&gt;
$863C (V-Counter = 28) - Set &amp;quot;horizon fog&amp;quot; color math settings, then trigger next IRQ at V-Counter = 47, set IRQ code pointer $865A;&amp;lt;br&amp;gt;&lt;br /&gt;
$865A (V-Counter = 47) - Set BG mode to 7, then trigger next IRQ at V-Counter = 86, set IRQ code pointer $8673;&amp;lt;br&amp;gt;&lt;br /&gt;
$8673 (V-Counter = 86) - Set player&#039;s shadow/finished rank color, then set the IRQ code pointer to $8612;&amp;lt;br&amp;gt;&lt;br /&gt;
$8691 (V-Counter = $7E0043) - Set BG mode to 7, then set the IRQ code pointer to $8612.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0043 || 2 bytes || IRQ || Scanline where the Mode7 BG starts. Used only for IRQ pointer $8691, on the race intro sequence.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0045 || 1 byte || Flag || When the MSB is set, sound effects won&#039;t play. This is used to keep playing the &amp;quot;player wreckage&amp;quot; sounds when $7E0048 &amp;gt;= #$80.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0046 || 4 bytes || I/O || SPC700 I/O ports. Various values can be written to play music or sound effects.&lt;br /&gt;
|-&lt;br /&gt;
| $7E004A || 1 byte || Misc. || Number of cars currently on screen, multiplied by two. (A bit of a mystery still, but seems to be used in a loop that assigns sprite priorities based on their Y position)&lt;br /&gt;
|-&lt;br /&gt;
| $7E004B || 2 bytes || Sprites || Index to OAM Table #1 ($7E0200) for routines that print characters/strings on screen.&lt;br /&gt;
|-&lt;br /&gt;
| $7E004D || 1 byte || Sprites || Index to OAM Table #2 ($7E0420) for routines that print characters/strings on screen.&lt;br /&gt;
|-&lt;br /&gt;
| $7E004E || 1 byte || Sprites || Used for bit-fiddling on OAM Table #2. Used in conjunction with $7E004D.&lt;br /&gt;
|-&lt;br /&gt;
| $7E004F || 1 byte || Hardware mirror || Mirror of SNES register $2101.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0050 || 1 byte || Flag || &amp;quot;Is the game drawing cars&amp;quot; flag. Non-zero = Yes.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used to correctly handle OAM DMA.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0051 || 1 byte || Counter || &amp;quot;Global&amp;quot; frame counter. Always increments every frame (except lag frames), no matter what.&amp;lt;br&amp;gt;&lt;br /&gt;
See also: $7E009A (&amp;quot;in-race&amp;quot; frame counter)&lt;br /&gt;
|-&lt;br /&gt;
| $7E0052 || 1 byte || Misc. || Player car type.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$00 = Blue Falcon; #$01 = Wild Goose; #$02 = Golden Fox; #$03 = Fire Stingray.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0053 || 1 byte || Misc. || Current race number.&amp;lt;br&amp;gt;&lt;br /&gt;
From #$00 to #$04 in Grand Prix mode.&amp;lt;br&amp;gt;&lt;br /&gt;
From #$00 to #$06 in Practice mode.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0054 || 3 bytes || Misc. || Current gamestate (game mode).&amp;lt;br&amp;gt;&lt;br /&gt;
The first byte is the &amp;quot;main&amp;quot; gamestate, the second byte is the &amp;quot;sub&amp;quot; gamestate and the third byte is the &amp;quot;sub-sub&amp;quot; gamestate.&amp;lt;br&amp;gt;&lt;br /&gt;
This gamestate stuff is a complicated subject, which I plan to explain in more detail later.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0057 || 1 byte || Misc. || Current difficulty setting.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$00 = Beginner; #$01 = Standard; #$02 = Expert/Master (for Master, the flag at $7E0F3D is set)&lt;br /&gt;
|-&lt;br /&gt;
| $7E0058 || 1 byte || Misc. || Practice mode flag.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$00 = Grand Prix mode; #$01 = Practice Mode&lt;br /&gt;
|-&lt;br /&gt;
| $7E0059 || 1 byte || Misc. || Number of spare machines (extra lives).&lt;br /&gt;
|-&lt;br /&gt;
| $7E005A || 1 byte || Misc. || Used by most menus as current selected option.&lt;br /&gt;
|-&lt;br /&gt;
| $7E005B || 1 byte || Misc. || &amp;quot;Is running pre-recorded race&amp;quot; flag.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$00 = Player is in control; Other = Pre-recorded race is running.&lt;br /&gt;
|-&lt;br /&gt;
| $7E005C || 1 byte || Flag || A flag related to color math effects.&amp;lt;br&amp;gt;&lt;br /&gt;
When == #$00:&lt;br /&gt;
* HDMA channels 1 and 3 are disabled;&lt;br /&gt;
* $7E009B is stored to $2131;&lt;br /&gt;
* $7E0E27 is treated as the red color intensity for color math and it should range from #$00 to #$1F. ($7E0E27 | #$20) is stored to $2132;&lt;br /&gt;
* 7E:0E28 is treated as the green color intensity for color math and it should range from #$00 to #$1F. ($7E0E28 | #$40) is stored to $2132;&lt;br /&gt;
* 7E:0E29 is treated as the blue color intensity for color math and it should range from #$00 to #$1F. ($7E0E29 | #$80) is stored to $2132;&lt;br /&gt;
* IRQ is disabled.&lt;br /&gt;
When == #$01:&lt;br /&gt;
* HDMA channels 1 and 3 are enabled. Channel 1 is used for Mode7 and BG1 horizon, channel 3 is used for the &amp;quot;horizon fog&amp;quot;;&lt;br /&gt;
* $212C is set to (#$13 ^ $7E005F);&lt;br /&gt;
* $7E0E25 is stored to $2131;&lt;br /&gt;
* $2132 is set to #$E0;&lt;br /&gt;
* IRQ is enabled to trigger at V-Counter = 18, IRQ code pointer is set to $8616.&lt;br /&gt;
When &amp;gt; #$01:&lt;br /&gt;
* HDMA channel 1 is enabled. Channel 1 is used for Mode7 and BG1 horizon;&lt;br /&gt;
* HDMA channel 3 is disabled;&lt;br /&gt;
* $212C is set to #$13;&lt;br /&gt;
* IRQ is enabled to trigger at V-Counter = $7E0043, IRQ code pointer is set to $8691.&lt;br /&gt;
|-&lt;br /&gt;
| $7E005D || 1 byte || Hardware mirror || Screen brightness and F-Blank flag. Mirror of SNES register $2100&lt;br /&gt;
|-&lt;br /&gt;
| $7E005E || 1 byte || Hardware mirror || Enabled HDMA channels. Mirror of SNES register $420C&lt;br /&gt;
|-&lt;br /&gt;
| $7E005F || 1 byte || Flag || Flags related to shown layers and HUD updating. Format: u--s4321&amp;lt;br&amp;gt;&lt;br /&gt;
1 = Hide BG1; 2 = Hide BG2; 3 = Show BG3; 4 = Hide BG4 (unused, F-Zero never uses BG4); s = Hide sprites; - = Unused bit u = Stop updating HUD (rank, timer, score and speedometer)&lt;br /&gt;
|-&lt;br /&gt;
| $7E0060 || 1 byte || Misc. || Screen fade type.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$00 = Not fading; #$01 = Fade-in; Other = Fade-out.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0061 || 1 byte || Misc. || Screen fade delay. How many frames it takes to increment/decrement the screen brightness.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0062 || 1 byte || Timer || Screen fade timer. How many frames until the screen brightness is incremented/decremented.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0063 || 1 byte || I/O || Controller 1 data (held buttons). Format: axlr----&amp;lt;br&amp;gt;&lt;br /&gt;
a = A; x = X; l = L; r = R; - = Unused bits&lt;br /&gt;
|-&lt;br /&gt;
| $7E0064 || 1 byte || I/O || Controller 1 data (held buttons). Format: byetUDLR&amp;lt;br&amp;gt;&lt;br /&gt;
b = B; y = Y; e = Select; t = Start; U = Up; D = Down; L = Left; R = Right.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0065 || 1 byte || I/O || (Seems to be the exact same as $7E0063?) Used more often than $7E0063&lt;br /&gt;
|-&lt;br /&gt;
| $7E0066 || 1 byte || I/O || (Seems to be the exact same as $7E0064?) Used more often than $7E0064&lt;br /&gt;
|-&lt;br /&gt;
| $7E0067 || 1 byte || I/O || Controller 1 data (pressed buttons on current frame). Format: axlr----&amp;lt;br&amp;gt;&lt;br /&gt;
a = A; x = X; l = L; r = R; - = Unused bits&lt;br /&gt;
|-&lt;br /&gt;
| $7E0068 || 1 byte || I/O || Controller 1 data (pressed buttons on current frame). Format: byetUDLR&amp;lt;br&amp;gt;&lt;br /&gt;
b = B; y = Y; e = Select; t = Start; U = Up; D = Down; L = Left; R = Right.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0069 || 1 byte || I/O || Controller 1 data (released buttons on current frame). Format: axlr----&amp;lt;br&amp;gt;&lt;br /&gt;
a = A; x = X; l = L; r = R; - = Unused bits&lt;br /&gt;
|-&lt;br /&gt;
| $7E006A || 1 byte || I/O || Controller 1 data (released buttons on current frame). Format: byetUDLR&amp;lt;br&amp;gt;&lt;br /&gt;
b = B; y = Y; e = Select; t = Start; U = Up; D = Down; L = Left; R = Right.&lt;br /&gt;
|-&lt;br /&gt;
| $7E006B || 1 byte || Flag || A flag related to windowing effects.&amp;lt;br&amp;gt;&lt;br /&gt;
When == #$00:&lt;br /&gt;
* $212E and $212F are set to #$00;&lt;br /&gt;
* $7E0070 is stored to $2130;&lt;br /&gt;
* HDMA channel 2 is disabled.&lt;br /&gt;
When == #$01:&lt;br /&gt;
* HDMA channel 2 is enabled. Channel 2 is used for windowing effects, such as player&#039;s shadow and the big rank number when finishing a race;&lt;br /&gt;
* $7E006C is stored to $4322 (16-bit, HDMA channel 2 table address);&lt;br /&gt;
* $7E0E20 is stored to $7E0DE3;&lt;br /&gt;
* $7E006E is stored to $212E;&lt;br /&gt;
* $7E006F is stored to $212F;&lt;br /&gt;
* $7E0070 is stored to $2130;&lt;br /&gt;
* $7E0071 is stored to $2123;&lt;br /&gt;
* $7E0072 is stored to $2124;&lt;br /&gt;
* $7E0073 is stored to $2125.&lt;br /&gt;
When &amp;gt; #$01:&lt;br /&gt;
* $7E006E is stored to $212E;&lt;br /&gt;
* $7E006F is stored to $212F;&lt;br /&gt;
* $7E0070 is stored to $2130;&lt;br /&gt;
* $7E0071 is stored to $2123;&lt;br /&gt;
* $7E0072 is stored to $2124;&lt;br /&gt;
* $7E0073 is stored to $2125.&lt;br /&gt;
|-&lt;br /&gt;
| $7E006C || 2 bytes || Pointer || Pointer to data for windowing effects (HDMA channel 2). Points to $7E0DD0 while racing, and to $7E0DF0 while showing the big rank number after finishing a race.&lt;br /&gt;
|-&lt;br /&gt;
| $7E006E || 1 byte || Hardware mirror || Mirror of SNES register $212E.&lt;br /&gt;
|-&lt;br /&gt;
| $7E006F || 1 byte || Hardware mirror || Mirror of SNES register $212F.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0070 || 1 byte || Hardware mirror || Mirror of SNES register $2130.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0071 || 1 byte || Hardware mirror || Mirror of SNES register $2123.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0072 || 1 byte || Hardware mirror || Mirror of SNES register $2124.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0073 || 1 byte || Hardware mirror || Mirror of SNES register $2125.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0074 || 1 byte || Misc. || Index to $7E0EA0. Alternates between #$00 and #$10 every frame, to compensate for slowdowns (if it didn&#039;t alternate, the Mode7 layer would look jiterry when updating while the game was lagging).&lt;br /&gt;
|-&lt;br /&gt;
| $7E0075 || 2 bytes || Hardware mirror || BG1 horizontal scroll. Mirror of SNES register $210D.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0077 || 2 bytes || Hardware mirror || BG1 vertical scroll. Mirror of SNES register $210E.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0079 || 2 bytes || Hardware mirror || BG2 horizontal scroll. Mirror of SNES register $210F.&lt;br /&gt;
|-&lt;br /&gt;
| $7E007B || 2 bytes || Hardware mirror || BG2 vertical scroll. Mirror of SNES register $2110.&lt;br /&gt;
|-&lt;br /&gt;
| $7E007D || 2 bytes || Hardware mirror || Mode7 X center. Mirror of SNES register $211F.&lt;br /&gt;
|-&lt;br /&gt;
| $7E007F || 2 bytes || Hardware mirror || Mode7 Y center. Mirror of SNES register $2120.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0081 || 1 byte || Misc. || Mode7 rendering type.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$00 = No Mode7; #$01 = Perspective effect; Other = Top-down view.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0082 || 1 byte || Misc. || This value + #$80 is written to $4342 and $4372. Similarly, this value + #$A0 is written to $4352 and $4362. This updates the Mode 7 rotation through HDMA.&amp;lt;br&amp;gt;&lt;br /&gt;
Similar to $7E0074, this address also alternates between #$00 and #$10 every frame to compensate for slowdowns.&amp;lt;br&amp;gt;&lt;br /&gt;
Only used if $7E0081 == #$01.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0083 || 1 byte || Misc. || Used after the &amp;quot;course zoom-in&amp;quot; on the race intro. This value is incremented every frame to raise the viewpoint pitch angle. When it reaches #$10, it stops increasing and the cars appear.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0084 || 1 byte || Hardware mirror || Written to $4347. Only used if 7E:0081 == #$01.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0085 || 1 byte || Hardware mirror || Written to $4357. Only used if 7E:0081 == #$01.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0086 || 1 byte || Hardware mirror || Written to $4367. Only used if 7E:0081 == #$01.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0087 || 1 byte || Hardware mirror || Written to $4377. Only used if 7E:0081 == #$01.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0088 || 2 bytes || Hardware mirror || Mode7 matrix A and D. Mirror of SNES registers $211B and $211E&lt;br /&gt;
|-&lt;br /&gt;
| $7E008A || 2 bytes || Hardware mirror || Mode7 matrix B. Mirror of SNES register $211C&lt;br /&gt;
|-&lt;br /&gt;
| $7E008C || 2 bytes || Hardware mirror || Mode7 matrix C. Mirror of SNES register $211D&lt;br /&gt;
|-&lt;br /&gt;
| $7E008E || 2 bytes || Misc. || Mode7 scaling. The Mode7 layer shrinks as this value increases. Only used if $7E0081 &amp;gt; #$01 (top-down view)&lt;br /&gt;
|-&lt;br /&gt;
| $7E0090 || 1 byte || Misc. || Current league.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$00 = Knight League; #$01 = Queen League; #$02 = King League.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0091 || 1 byte || Empty || Empty. Cleared on reset&lt;br /&gt;
|-&lt;br /&gt;
| $7E0092 || 1 byte || Misc. || Amount of VRAM DMA transfers to perform for the next frame. Used for the $7E0AE0 DMA queue.&amp;lt;br&amp;gt; &lt;br /&gt;
Should only range from #$00 to #$04, since the DMA queue has only four entries.&amp;lt;br&amp;gt;&lt;br /&gt;
See also: $7E009F (similar to this one, but for the $7E0420 DMA queue)&lt;br /&gt;
|-&lt;br /&gt;
| $7E0093 || 1 byte || Flag || Mode7 tilemap update flag. #$00 = don&#039;t update; #$01 = update only horizontally; Other = update both horizontally and vertically&lt;br /&gt;
|-&lt;br /&gt;
| $7E0094 || 2 bytes || Misc. || VRAM address for horizontal updates on the Mode7 tilemap.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0096 || 2 bytes || Misc. || VRAM address for vertical updates on the Mode7 tilemap.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0098 || 1 byte || Misc. || CGRAM update mode. #$00 = don&#039;t update CGRAM; #$01 = update CGRAM normally; Other = set the whole background (colors 0-127) to the color at $7E0E26.&amp;lt;br&amp;gt;&lt;br /&gt;
When the value is greater than #$01, it decrements until reaching #$01 again. This is used for flashing effects upon car explosions&lt;br /&gt;
|-&lt;br /&gt;
| $7E0099 || 1 byte || Empty || Empty. Cleared on reset&lt;br /&gt;
|-&lt;br /&gt;
| $7E009A || 1 byte || Counter || &amp;quot;In-race&amp;quot; frame counter. Increments every frame (except lag frames) while racing and the game is unpaused. Cleared on course load&amp;lt;br&amp;gt;&lt;br /&gt;
See also: $7E0051 (&amp;quot;global&amp;quot; frame counter)&lt;br /&gt;
|-&lt;br /&gt;
| $7E009B || 1 byte || Hardware mirror || CGADSUB settings. Mirror of SNES register $2131. Only used if $7E005C is zero&lt;br /&gt;
|-&lt;br /&gt;
| $7E009C || 1 byte || Hardware mirror || CGADSUB settings. Mirror of SNES register $2131. Used for the &amp;quot;horizon fog&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| $7E009D || 1 byte || Hardware mirror || CGADSUB settings. Mirror of SNES register $2131. Used for the player&#039;s shadow and big finish rank&lt;br /&gt;
|-&lt;br /&gt;
| $7E009E || 1 byte || Flag || Flag used to force a visual update on a landmine tile that exploded. Non-zero = update tile at X position $7E0CFA and Y position $7E0CFC&lt;br /&gt;
|-&lt;br /&gt;
| $7E009F || 1 byte || Misc. || Amount of VRAM DMA transfers to perform for the next frame. Used for the $7E0420 DMA queue.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a bit different from $7E0092, due to the fact that the $7E0420 DMA queue can be interpreted in two different ways.&amp;lt;br&amp;gt;&lt;br /&gt;
When the MSB clear, the DMA queue is interpreted normally (same functionality as the $7E0AE0 DMA queue, but structured differently.)&amp;lt;br&amp;gt;&lt;br /&gt;
When the MSB is set, the DMA queue is interpreted as a &amp;quot;fill with byte,&amp;quot; and each entry in the DMA queue occupies four bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
For more information, see the description of $7E0420.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00A0 || 2 bytes || Misc. || A copy of the fractional part of the player&#039;s X position ($7E0B80), actually unused&lt;br /&gt;
|-&lt;br /&gt;
| $7E00A2 || 2 bytes || CoordX || Related to camera&#039;s X position&amp;lt;br&amp;gt;&lt;br /&gt;
(Player&#039;s X position, minus #$0200)&lt;br /&gt;
|-&lt;br /&gt;
| $7E00A4 || 2 bytes || Misc. || A copy of the fractional part of the player&#039;s Y position ($7E0BA0), actually unused&lt;br /&gt;
|-&lt;br /&gt;
| $7E00A6 || 2 bytes || CoordY || Related to camera&#039;s Y position&amp;lt;br&amp;gt;&lt;br /&gt;
(Player&#039;s Y position, minus #$0200)&lt;br /&gt;
|-&lt;br /&gt;
| $7E00A8 || 2 bytes || CoordX || Related to camera&#039;s X position&amp;lt;br&amp;gt;&lt;br /&gt;
(Value at $7E00A2, plus value at $0AED00 table)&lt;br /&gt;
|-&lt;br /&gt;
| $7E00AA || 2 bytes || CoordY || Related to camera&#039;s Y position&amp;lt;br&amp;gt;&lt;br /&gt;
(Value at $7E00A6, plus value at $0AED00 table)&lt;br /&gt;
|-&lt;br /&gt;
| $7E00AC || 1 byte || Angle8 || Camera&#039;s facing&lt;br /&gt;
|-&lt;br /&gt;
| $7E00AD || 1 byte || Misc. || Amount of checkpoints present in the current course&lt;br /&gt;
|-&lt;br /&gt;
| $7E00AE || 1 byte || Misc. || High byte of the starting point&#039;s X position&lt;br /&gt;
|-&lt;br /&gt;
| $7E00AF || 1 byte || Misc. || High byte of the starting point&#039;s Y position&lt;br /&gt;
|-&lt;br /&gt;
| $7E00B0 || 2 bytes || Pointer || 16-bit pointer to bank $7F. Points to the course chunks table (either #$4C00 or #$4E00)&lt;br /&gt;
|-&lt;br /&gt;
| $7E00B2 || 2 bytes || Empty || Empty. Cleared on reset&lt;br /&gt;
|-&lt;br /&gt;
| $7E00B4 || 2 bytes || Misc. || Something to do with X position after finishing a race first place, when the camera stops following the AI car. Still not understood&lt;br /&gt;
|-&lt;br /&gt;
| $7E00B6 || 2 bytes || Misc. || Something to do with X position after finishing a race first place, when the camera fully turns while following the AI car. Still not understood&lt;br /&gt;
|-&lt;br /&gt;
| $7E00B8 || 1 byte || Misc. || Current screen text. Format: rplLfyws.&amp;lt;br&amp;gt;&lt;br /&gt;
r = Reverse; p = Power Down; l = Limit X; L = X laps left; f = Final lap; y = You lost; w = You won/Goal in; s = Special (spaceship, &amp;quot;READY.&amp;quot; and &amp;quot;GO!!&amp;quot; sprites)&amp;lt;br&amp;gt;&lt;br /&gt;
Lower bits have more priority.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00B9 || 1 byte || Flag || &amp;quot;Push start&amp;quot; text flag. Non-zero = show text&lt;br /&gt;
|-&lt;br /&gt;
| $7E00BA || 1 byte || Misc. || Last screen text shown. Used to clear this bit from $7E00B8 when the $7E00BB timer runs out&lt;br /&gt;
|-&lt;br /&gt;
| $7E00BB || 1 byte || Counter || Screen text timer. Decrements every frame until reaching zero.&amp;lt;br&amp;gt;&lt;br /&gt;
However, when showing &amp;quot;You lost,&amp;quot; &amp;quot;You won,&amp;quot; or &amp;quot;Goal in,&amp;quot; this value is incremented and is not taken into consideration.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00BC || 1 byte || Misc. || Offset to $00AFF8 table (screen text code pointer) for the last shown screen text. This is used so the game knows if the screen text was already being shown or if it needs to be initialized&lt;br /&gt;
|-&lt;br /&gt;
| $7E00BD || 1 byte || Misc. || Number of tiles used on the current screen text, multiplied by 8. Used to address OAM.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that when the text flashes and goes away temporarily, this value becomes zero&lt;br /&gt;
|-&lt;br /&gt;
| $7E00BE || 2 bytes || Timer || GP ending timer. After finishing the final race of a Grand Prix, this value is set to #$1000. This value is decremented every frame until it reaches #$017C, at which time it is set to #$003B.&amp;lt;br&amp;gt;&lt;br /&gt;
When this value is #$003B, the screen starts to fade out. When this value is #$0020, the music starts to fade out.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00C0 || 1 byte || Timer || Race timer (minutes)&lt;br /&gt;
|-&lt;br /&gt;
| $7E00C1 || 1 byte || Timer || Race timer (seconds)&lt;br /&gt;
|-&lt;br /&gt;
| $7E00C2 || 1 byte || Timer || Race timer (centiseconds)&lt;br /&gt;
|-&lt;br /&gt;
| $7E00C3 || 1 byte || Misc. || Race finish state. Format: lefcr??h&amp;lt;br&amp;gt;&lt;br /&gt;
l = Race lost; e = Exploded; f = Race finished, follows AI car based on finish rank; c = Camera follows AI car indefinitely; ? = Unknown (possibly unused); h = Horizon moves according to camera&#039;s X position, not facing&lt;br /&gt;
|-&lt;br /&gt;
| $7E00C4 || 1 byte || Empty || Empty. Cleared on reset&lt;br /&gt;
|-&lt;br /&gt;
| $7E00C5 || 1 byte || Angle8 || Facing of the player&#039;s current checkpoint&lt;br /&gt;
|-&lt;br /&gt;
| $7E00C6 || 1 byte || Empty || Empty. Cleared on reset&lt;br /&gt;
|-&lt;br /&gt;
| $7E00C7 || 1 byte || Misc. || Player surface flags. Format: irlp----&amp;lt;br&amp;gt;&lt;br /&gt;
i = Ice; R = Right-push tile; L = Left-push tile; p = Pit area; - = Unused&lt;br /&gt;
|-&lt;br /&gt;
| $7E00C8 || 1 byte || Misc. || Player&#039;s invincibility frames&lt;br /&gt;
|-&lt;br /&gt;
| $7E00C9 || 2 byte || Misc. || Player&#039;s machine power. The game actually allows this value to be a negative number, which is very odd&lt;br /&gt;
|-&lt;br /&gt;
| $7E00CB || 1 byte || Empty || Empty. Cleared on course load&lt;br /&gt;
|-&lt;br /&gt;
| $7E00CC || 1 byte || Timer || How many frames until the spaceship starts to go away. Set to #$10 while on pit areas. Decrements every frame when outside pit areas. When this value is zero, $7E00F3 starts to decrement&lt;br /&gt;
|-&lt;br /&gt;
| $7E00CD || 1 byte || Timer || A general purpose timer. Used in a multitude of situations&lt;br /&gt;
|-&lt;br /&gt;
| $7E00CE || 1 byte || Misc. || Has four purposes:&lt;br /&gt;
* Screen Y position offset for the cars before the race countdown;&lt;br /&gt;
* Index to the $0AEF80 (OAM data for the &amp;quot;GO!!&amp;quot; sprites);&lt;br /&gt;
* How many lap results are being shown on screen. Also accounts for the &amp;quot;Totals&amp;quot; row;&lt;br /&gt;
* Facing sprite of the car being selected in the car select screen.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00CF || 1 byte || Timer || Timer for the player explosion animation. Starts at #$00 and increments every frame until #$30. Used to play effects like flashing colors and etc.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00D0 || 1 byte || Misc. || Directly related to the &amp;quot;malfunction effect&amp;quot; animation timer ($7E0F3C.) Increments every frame until reaching a certain value when executing the animation (still not fully understood)&lt;br /&gt;
|-&lt;br /&gt;
| $7E00D1 || 1 byte || Misc. || 16-bit indexer for player data. This is actually the value from $7E0052, multiplied by two&lt;br /&gt;
|-&lt;br /&gt;
| $7E00D2 || 1 byte || Misc. || Stored to $7E040C. Determines whether to show one or two digits for the current rank. #$00 = Two digits; #$0F = One digit&lt;br /&gt;
|-&lt;br /&gt;
| $7E00D3 || 2 bytes || Empty || Empty. Cleared on reset&lt;br /&gt;
|-&lt;br /&gt;
| $7E00D5 || 2 bytes || Misc. || Player turning stage. Increases when turning left, decreases when turning right. Zero means not turning.&amp;lt;br&amp;gt;&lt;br /&gt;
When turning left:&amp;lt;br&amp;gt;&lt;br /&gt;
- Increases until reaching #$0E if not sharp-cornering, if sharp-cornering it&#039;s set to #$10. Decreases when not turning left.&amp;lt;br&amp;gt;&lt;br /&gt;
When turning right:&amp;lt;br&amp;gt;&lt;br /&gt;
- Decreases until reaching #$F2 if not sharp-cornering, if sharp-cornering it&#039;s set to #$F0. Increases when not turning right.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Invalid values lead to weird sprite animations and turning speed&lt;br /&gt;
|-&lt;br /&gt;
| $7E00D7 || 2 bytes || Misc. || Related to turning stage ($7E00D5) incrementing (if turning left) and decrementing (if turning right) somehow.&amp;lt;br&amp;gt;&lt;br /&gt;
Still need to investigate it.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00D9 || 1 byte || Misc. || Related to grip/sliding?&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$01 = Gaining almost-instantaneous grip (from blast turning or soft landing.)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$02 = Sliding by holding L or R.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00DA || 1 byte || Counter || Counts up from #$00 to #$14 while the player is midair, after the hitting a jump plate.&amp;lt;br&amp;gt;&lt;br /&gt;
The first byte of the acceleration table is used if the player is midair and this address is between #$04 and #$13 (inclusive).&amp;lt;br&amp;gt;&lt;br /&gt;
While this value is below #$10 and the player is midair, the player&#039;s car is forced to display the jumping animation.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00DB || 1 byte || Misc. || Index to the table with minimum ground distances ($009B7E). Counts up from #$00 to #$06 while the player is accelerating, after starting to accelerate.&amp;lt;br&amp;gt;&lt;br /&gt;
Used to make the player&#039;s car move upwards a bit when starting to accelerate.&amp;lt;br&amp;gt;&lt;br /&gt;
This value is completelyignored while the player is not accelerating.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $7E00DC || 1 byte || Misc. || Player&#039;s car minimum distance from ground. This value is set to #$00 while not accelerating.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00DD || 1 byte || Misc. || Current player steer animation:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$00 to #$04 = Left steering (#$00 is full left steer, #$04 is left steer step 1);&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$05 = Not steering at all;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$06 to #$0A = Right steering (#$06 is right steer step 1, #$0A is full right steer);&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$80 = Sliding left (holding L);&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$81 = Sliding right (holding R).&lt;br /&gt;
|-&lt;br /&gt;
| $7E00DE || 1 byte || Misc. || Related to $7E00DD in an unknown way, but also specifies the jumping animation:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$80 = Jumping animation.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00DF || 1 byte || Misc. || Current sharp cornering ground sparks animation:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$01 through #$0A = full animation cycle for the sparking (from the left side);&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$81 through #$8A = full animation cycle for the sparking (from the right side).&lt;br /&gt;
|-&lt;br /&gt;
| $7E00E0 || 1 byte || Misc. || Player&#039;s sprite animation (overrides $7E00DD)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$80 through #$89 = Being damaged (collision/guardrails);&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$40 through #$43 = Damaged by explosive (launched left);&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$44 through #$47 = Damaged by explosive (launched right);&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$20 = Sliding left (holding L);&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$21 = Sliding right (holding R);&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $7E00E1 || 1 byte || Misc. || Player&#039;s thruster fire animation delay. If MSB is set, its brightness ($7E00E2) is reset to #$00. This value is #$00 while not accelerating&lt;br /&gt;
|-&lt;br /&gt;
| $7E00E2 || 1 byte || Misc. || Player&#039;s thruster fire brightness. #$00 = Darkest; #$5D = Brightest.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00E3 || 1 byte || Misc. || Player&#039;s thruster fire animation frame.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23;$00 = None; #$01 = Big; #$02 = Medium; #$03 = Small.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00E4 || 1 byte || Timer || Player&#039;s thruster fire animation timer.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00E5 || 1 byte || Misc. || Player&#039;s thruster fire Y position (relative to player&#039;s car)&lt;br /&gt;
|-&lt;br /&gt;
| $7E00E6 || 2 byte || Pointer || Pointer to the routine that draws the player&#039;s thruster fire.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00E8 || 1 byte || Timer || Guardrail flash timer. Set to #$08 when the player drives over a guardrail (if the value was previously #$00).&lt;br /&gt;
|-&lt;br /&gt;
| $7E00E9 || 1 byte || Misc. || Used to play guardrail damage and rough landing effects. Also flashes the player&#039;s car black.&amp;lt;br&amp;gt;&lt;br /&gt;
Decrements every frame. When the low nibble is zero, this value is set to #$00.&amp;lt;br&amp;gt;&lt;br /&gt;
Set to #$8B when playing guardrail damage effects. Set to #$45 when playing rough landing effects.&amp;lt;br&amp;gt;&lt;br /&gt;
When #$8A, the guardrail damage sound effect is played.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00EA || 1 byte || Empty || Empty. Cleared on course load&lt;br /&gt;
|-&lt;br /&gt;
| $7E00EB || 1 byte || Misc. || Y position of the first spaceship &amp;quot;light beam&amp;quot;. Initialized to #$00 when it&#039;s first displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
Increases by #$10 every frame until it reaches #$B0, where it resets to #$00 again.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00EC || 1 byte || Misc. || Y position of the second spaceship &amp;quot;light beam&amp;quot;. Initialized to #$50 when it&#039;s first displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
Increases by #$10 every frame until it reaches #$B0, where it resets to #$00 again.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00ED || 1 byte || Misc. || Related to the color of the player&#039;s thrusters. Needs research.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00EE || 1 byte || Empty || Empty. Cleared on course load&lt;br /&gt;
|-&lt;br /&gt;
| $7E00EF || 1 byte || Misc. || Base offset to the turn speed table ($02C9AB) for the player&#039;s machine. Loaded directly from the $00FA79 table&lt;br /&gt;
|-&lt;br /&gt;
| $7E00F0 || 1 or 2 bytes || Misc. || Has three purposes:&amp;lt;br&amp;gt;&lt;br /&gt;
* (2 bytes) In the title screen, it acts as a counter for the demo race. It increases every frame, and when it reaches #$0500, the demo race starts playing;&lt;br /&gt;
* (1 byte) While in a race, this value controls the power bar graphics somehow.&lt;br /&gt;
* (1 byte) Car select confirm option. #$00 = Yes; #$02 = No&lt;br /&gt;
|-&lt;br /&gt;
| $7E00F1 || 1 byte || Misc. || Car selection screen transition. #$00 = None; #$01 = Windowing fade in; Other = Windowing fade out.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00F2 || 1 byte || Misc. || Has two purposes:&amp;lt;br&amp;gt;&lt;br /&gt;
In the records menu, it acts as the current selected option:&amp;lt;br&amp;gt;&lt;br /&gt;
* #$00 = Mute City I, #$01 = Big Blue, ..., #$0D = Red Canyon II, #$0E = Fire Field, #$0F = Exit.&lt;br /&gt;
In a race, this value is set to the track index of the first track in the cup:&amp;lt;br&amp;gt;&lt;br /&gt;
* #$00 = Knight, #$05 = Queen, #$0A = King.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00F3 || 1 byte || Misc. || How much of the spaceship is currently on screen. Counts up from #$00 to #$23 while in a pit area tile.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00F4 || 1 byte || Empty || Empty. Cleared on course load&lt;br /&gt;
|-&lt;br /&gt;
| $7E00F5 || 1 byte || Timer || Road flash timer. Set to #$09 when the player hits a wall (if the value was previously #$00).&lt;br /&gt;
|-&lt;br /&gt;
| $7E00F6 || 1 byte || Misc. || Unused, but for some reason it&#039;s reset to #$00 when unpausing the game.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00F7 || 1 byte || Empty || Empty. Cleared on course load&lt;br /&gt;
|-&lt;br /&gt;
| $7E00F8 || 2 or 3 bytes || Misc. || Has multiple purposes:&amp;lt;br&amp;gt;&lt;br /&gt;
* (2 bytes) Holds the score gained, in BCD, when finishing a lap;&lt;br /&gt;
* (2 bytes) Used to calculate a damage multiplier based on the machine speeds upon a heavy collision;&lt;br /&gt;
* (2 bytes) Used a lot in SRAM-related code, as a multipurpose value;&lt;br /&gt;
* (3 bytes) During a pre-recorded race, this is a 24-bit pointer to the next action to be executed.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00FA || 2 bytes || Misc. || Used in SRAM-related code as an index to the SRAM buffer.&amp;lt;br&amp;gt;&lt;br /&gt;
(Note that during a pre-recorded race, this value is the bank from the pointer at $7E00F8.)&lt;br /&gt;
|-&lt;br /&gt;
| $7E00FC || 1 byte || Misc. || Current lap number being checked for new fastest lap record.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00FD || 1 byte || Empty. || Empty. Cleared on course load and when unpausing the game.&lt;br /&gt;
|-&lt;br /&gt;
| $7E00FE || 2 bytes || Pointer || Used as a temporary 16-bit pointer in $0086DF and $00AE19.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is still a work-in-progress! Descriptions will be made clearer as time goes on.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===== $7E0100 and onwards =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Length !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| $7E0100 || 256&amp;amp;nbsp;bytes || Stack || Reserved for stack. Hacks can probably use $7E0100-$7E0180 safely as free RAM.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0200 || 512 bytes || OAM || OAM buffer. 4 bytes per sprite, in the same format as expected by the PPU:&amp;lt;br&amp;gt;&lt;br /&gt;
X position, Y position, tile, attributes&lt;br /&gt;
|-&lt;br /&gt;
| $7E0400 || 32 bytes || OAM || OAM &amp;quot;hi-table&amp;quot; buffer. 2 bits per sprite, in the same format as expected by the PPU.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0420 || 64 bytes || Misc. || DMA queue #1, controlled by $7E009F.&amp;lt;br&amp;gt;&lt;br /&gt;
This one is a bit complicated, I&#039;ll fill up this description later.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0460 || 32 bytes || Empty || Potentially empty. Cleared on reset&lt;br /&gt;
|-&lt;br /&gt;
| $7E0480 || 128 bytes || Misc. || General purpose buffer.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0500 || 512 bytes || CGRAM || CGRAM buffer.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0700 || 256 bytes || CGRAM || Original OBJ colors. Used to revert to original colors after $7E0800 is used.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0800 || 256 bytes || CGRAM || Alternate OBJ colors. Used for color effects on sprites, such as player flashing black.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0900 || 96 bytes || CGRAM || Contains both original and alternate colors for BG.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0960 || 3*6 bytes || Misc. || Race lap times/splits. 6 Entries in total (3 bytes each, same format as $7E00C0-$7E00C2). The last entry is the total race time.&amp;lt;br&amp;gt;&lt;br /&gt;
Only calculated after the race ends.&lt;br /&gt;
|-&lt;br /&gt;
| $7E0972 || 1 byte || Misc. || Race number character to be printed on screen for the GP end results text&lt;br /&gt;
|-&lt;br /&gt;
| $7E0973 || 1 byte || Timer || Text wait timer (GP end results, Credits and Master difficulty ending)&lt;br /&gt;
|-&lt;br /&gt;
| $7E0974 || 1 byte || Misc. || During the GP end results:&lt;br /&gt;
* Race number from where to grab lap times and ranks to be printed.&lt;br /&gt;
During the Credits screen:&lt;br /&gt;
* Index to $02C74F (Credits text data)&lt;br /&gt;
During the Master difficulty ending:&lt;br /&gt;
* Controls screen brightness somehow&lt;br /&gt;
|-&lt;br /&gt;
| $7E0975 || 1 byte || Misc. || During the GP end results:&lt;br /&gt;
* Index to $02C6BE (GP end results text data)&lt;br /&gt;
During the Master difficuilty ending:&lt;br /&gt;
* Index to $039DF1 (Master ending text data)&lt;br /&gt;
|-&lt;br /&gt;
| $7E0976 || 1 byte || Misc. || OAM attributes for text printing (GP end results and Master difficulty ending)&lt;br /&gt;
|-&lt;br /&gt;
| $7E0977 || 1 byte || Misc. || Text X position (GP end results, Credits and Master difficulty ending)&lt;br /&gt;
|-&lt;br /&gt;
| $7E0978 || 1 byte || Misc. || Text Y position (GP end results and Master difficulty ending)&lt;br /&gt;
|-&lt;br /&gt;
| $7E0979 || 1 byte || Empty || Empty. Cleared on reset&lt;br /&gt;
|-&lt;br /&gt;
| $7E097A || 3 bytes || Misc. || Currently displayed score, in BCD. Counts up until reaching the value at $7E097D. High byte seems to be ignored (is this even a 3-byte value?)&lt;br /&gt;
|-&lt;br /&gt;
| $7E097D || 3 bytes || Misc. || Current score, in BCD. High byte seems to be ignored (is this even a 3-byte value?)&lt;br /&gt;
|-&lt;br /&gt;
| $7E0980 || 128 bytes || Empty || Most likely empty. Cleared on reset&lt;br /&gt;
|-&lt;br /&gt;
| $7E0A00 || 128 bytes || Tilemap || Race BG3 HUD tilemap.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is still a work-in-progress! More will be added later, and descriptions will be made clearer as time goes on.&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=SMW_Resource_Memory_Map&amp;diff=918</id>
		<title>SMW Resource Memory Map</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=SMW_Resource_Memory_Map&amp;diff=918"/>
		<updated>2019-11-18T01:31:37Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: fix word wrapping&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Organization comes later. Feel free to add major patches here as well.&amp;lt;br&amp;gt;&lt;br /&gt;
Also feel free to suggest a good way to represent SA-1 addresses (if applicable).&lt;br /&gt;
&lt;br /&gt;
== Lunar Magic ==&lt;br /&gt;
Note about SA-1:&lt;br /&gt;
&lt;br /&gt;
For addresses between $7E:0000-$7E:00FF, the SA-1 equivalent is $3000-$30FF (code bank). For addresses between $7E:0200-$7E:1FFF, the SA-1 equivalent is $6200-$7FFF (code bank) or $40:0200-$40:1FFF (absolute).&lt;br /&gt;
&lt;br /&gt;
Any other address used by Lunar Magic does not have any SA-1 equivalent and must be manipulated by the SNES CPU. &lt;br /&gt;
&lt;br /&gt;
=== RAM ===&lt;br /&gt;
Most of these addresses were acquired from Lunar Magic&#039;s help file and files floating around the internet.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Size !! LM Version !! Description&lt;br /&gt;
|-&lt;br /&gt;
| $7E:0BF5 || 1 byte || 3.00 || ExLevel (Dynamic Levels) flags.&lt;br /&gt;
Format: %toPsssss&lt;br /&gt;
* o: Overscan level mode. If set, the camera will try scrolling to the maximum vertical level edge (15 extra pixels).&lt;br /&gt;
* t: Two layers flag. If set, it means the level has two interactive layers (layer 1+2 or layer 1+3).&lt;br /&gt;
* P: New sprite spawn flag. It&#039;s a copy of the 5th bit from the sprite header and it&#039;s used for checking if the sprites uses the new data structure or not.&lt;br /&gt;
* sssss: Vertical level mode. It gets indexed by a table to get the screen height. See [[Lunar_Magic/Custom_Level_Sizes]] for more information.&lt;br /&gt;
|-&lt;br /&gt;
| $7E:0BF6 || 256 bytes || 3.00 || ExLevel RAM (to be filled later).&lt;br /&gt;
|-&lt;br /&gt;
| $7E:13D7 || 2 bytes || 3.00 || Screen vertical size.&lt;br /&gt;
|-&lt;br /&gt;
| $7E:1936 || 2 bytes || 3.00 || Screen vertical size - #$0010. Used only for adjusting smkdan&#039;s VRAM patch.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:C004 || 1 byte || Unknown || Legacy ExAnimations frame counter. Used to be the frame counter for every ExAnimation slot, now it&#039;s only accurate for slots 0, 8, 10 and 18.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:C060 || 16 bytes || 1.80 || Conditional Direct Map16 flags.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $7F:C070 || 16 bytes || 1.70 || Manual ExAnimation triggers.&amp;lt;br&amp;gt;&lt;br /&gt;
Each byte corresponds to one manual ExAnimation slot. This block of RAM addresses isn&#039;t initialized unless you use the Trigger Init button in the ExAnimation dialog.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:C080 || 32 bytes || Unknown || Level ExAnimations frame counter. Each byte corresponds to one slot.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:C0A0 || 32 bytes || Unknown || Global ExAnimations frame counter. Each byte corresponds to one slot.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:C0F8 || 4 bytes || 1.70 || One Shot Exanimation triggers.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $7F:C0FC || 2 bytes || 1.70 || Custom ExAnimation triggers.&amp;lt;br&amp;gt;&lt;br /&gt;
Each bit corresponds to each custom ExAnimation slot. If a bit is on it means the trigger is enabled. This block of RAM addresses isn&#039;t initialized unless you use the Trigger Init button in the ExAnimation dialog.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:8183 || 422 bytes || 1.70 || Used for VRAM modification. See below for details.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:8183 || 2 bytes || 1.70 || Holds the Layer 1 VRAM tilemap address, similar to $7E:1BE4. Used for VRAM modification.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:8185 || 2 bytes || 1.70 || Holds the Layer 2 VRAM tilemap address, similar to $7E:1BE4. Used for VRAM modification.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:8187 || 2 bytes || 1.70 || Holds the Layer 1 VRAM address for column upload. Used for VRAM modification.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:8189 || 2 bytes || 1.70 || Holds the Layer 2 VRAM address for column upload. Used for VRAM modification.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:818B || 128 bytes || 1.70 || Holds the Layer 1 column buffer. Used for VRAM modification.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:820B || 128 bytes || 1.70 || Holds the Layer 2 column buffer. Used for VRAM modification.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:BC00 || 1024&amp;amp;nbsp;bytes || 1.70 || Map16 low-byte buffer. Used for VRAM modification.&lt;br /&gt;
|-&lt;br /&gt;
| $7F:C00B || 2 bytes? || Unknown || Unknown purpose. Used in $0E:FD00 to perform a bit 2 check.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $7F:C300 || 1024 bytes || 1.70 || Map16 high-byte buffer. Used for VRAM modification.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ROM/Routines ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! SNES Address !! Description&lt;br /&gt;
|-&lt;br /&gt;
| $0FF900 || GFX decompression routine.&amp;lt;br&amp;gt;&lt;br /&gt;
It can&#039;t decompress GFX files 32 or 33.&amp;lt;br&amp;gt;&lt;br /&gt;
On entry:&amp;lt;br&amp;gt;&lt;br /&gt;
* A should contain the 16-bit GFX/ExGFX file number you want to decompress.&amp;lt;br&amp;gt;&lt;br /&gt;
* $00-$02 should contain the 24-bit address of where to decompress the data to.&amp;lt;br&amp;gt;&lt;br /&gt;
On exit:&amp;lt;br&amp;gt;&lt;br /&gt;
* Processor bits are preserved.&amp;lt;br&amp;gt;&lt;br /&gt;
* Contents of X are preserved.&amp;lt;br&amp;gt;&lt;br /&gt;
* Contents of Y are preserved.&amp;lt;br&amp;gt;&lt;br /&gt;
* A is not preserved.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $0EFD00 || LM Routine? Does something related to Layer 2 tilemaps. Returns the value of $7E1928 in A.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $000000 || To be edited later.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== AddMusicK ==&lt;br /&gt;
=== RAM ===&lt;br /&gt;
Note: AddMusicK&#039;s RAM addresses ($7FB000-$7FB00A) are reset during the SPC Program upload.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Size !! Description&lt;br /&gt;
|-&lt;br /&gt;
| $7E1DFA || 0x1 || Command list.&amp;lt;br&amp;gt;&lt;br /&gt;
*$01 - Jump SFX. Sounds glitched due to it overwritting part of arpeggio&#039;s RAM with unexpected data. See L_0A14 for more details.&amp;lt;br&amp;gt;&lt;br /&gt;
*$02 - Turns on Yoshi Drums.&amp;lt;br&amp;gt;&lt;br /&gt;
*$03 - Turns off Yoshi Drums.&amp;lt;br&amp;gt;&lt;br /&gt;
*$04 - Grinder SFX. Potentially glitched.&amp;lt;br&amp;gt;&lt;br /&gt;
*$05 - Disables echo effect on SFXs.&amp;lt;br&amp;gt;&lt;br /&gt;
*$06 - Enables echo effect on SFXs.&amp;lt;br&amp;gt;&lt;br /&gt;
*$07 - Pauses music.&amp;lt;br&amp;gt;&lt;br /&gt;
*$08 - Unpauses music.&amp;lt;br&amp;gt;&lt;br /&gt;
*$09-$FE - Unused&amp;lt;br&amp;gt;&lt;br /&gt;
*$FF - Jumps to L_099C. It &#039;&#039;seems&#039;&#039; to prepare the SPC700 to receive data. Disables echo, sets delay to 0, turns off channels, resets the song number (SPC Output 2 = 0). Needs testing.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $7FB000 || 0x1 || Current song playing.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $7FB001 || 0x1 || Flag used to disable sample upload when switching to a new song.&amp;lt;br&amp;gt;&lt;br /&gt;
Reset when a song finishes being uploaded to ARAM.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $7FB002 || 0x2 || Unused. Meant to be:&amp;lt;br&amp;gt;&lt;br /&gt;
ARAM/DSP Address.&lt;br /&gt;
* To write to ARAM: Set $7FB002 to the address, and $7FB004 to the value to write.  Note that the address cannot be $FFxx.&lt;br /&gt;
* To write to the S-DSP: Set $7FB002 to the address, $7FB003 to #$FF, and $7FB004 to the value to write.&lt;br /&gt;
|-&lt;br /&gt;
| $7FB004 || 0x4 || SPC Output.&amp;lt;br&amp;gt;&lt;br /&gt;
* $F4 $05 will reset $7FB004 and $7FB005.&amp;lt;br&amp;gt;&lt;br /&gt;
* $F9 $XX $YY will send $XX and $YY to $7FB004 and $7FB005 respectively. (Needs verification)&amp;lt;br&amp;gt;&lt;br /&gt;
* $7FB006 and $7FB007 are unused and most likely have garbage sent by the program.&lt;br /&gt;
|-&lt;br /&gt;
| $7FB008 || 0x1 || Unused. Meant to have the same purpose as $7E0DDA.&lt;br /&gt;
|-&lt;br /&gt;
| $7FB009 || 0x1 || Sample count in the current song.&lt;br /&gt;
|-&lt;br /&gt;
| $7FB00A || 0x400 || ARAM SRCN table.&lt;br /&gt;
Used as a buffer for the sample pointer/loop table.  Could be up to 1024 bytes long, but this is unlikely (4 bytes per sample; do the math).&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ROM/Routines ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! SNES Address !! Description&lt;br /&gt;
|-&lt;br /&gt;
| $008079 || UploadSPCData.&amp;lt;br&amp;gt;&lt;br /&gt;
This is an ever-so-slightly modified version of SMW&#039;s SPC upload routine. You can jump here at any time to upload data to the SPC.&amp;lt;br&amp;gt;&lt;br /&gt;
Input:&amp;lt;br&amp;gt;&lt;br /&gt;
* $00-$02 - Address of the block to upload to ARAM&amp;lt;br&amp;gt;&lt;br /&gt;
* $03-$04 - Position in ARAM to jump to upon completion&amp;lt;br&amp;gt;&lt;br /&gt;
* $05-$06 - Clobbered.  Unused on entry; will be the size of the transferred data when finished.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $008135 || UploadSPCDataDynamic. This address needs to be checked.&lt;br /&gt;
This is an alternate version of the upload routine. Call this if it is impossible to determine ahead of time where data will go. This routine is used to upload samples by default, but it can upload anything.&amp;lt;br&amp;gt;&lt;br /&gt;
Input:&amp;lt;br&amp;gt;&lt;br /&gt;
* $00-$02 - Address of the block to upload to ARAM&amp;lt;br&amp;gt;&lt;br /&gt;
* $03-$04 - Position in ARAM to jump to upon completion&amp;lt;br&amp;gt;&lt;br /&gt;
* $05-$06 - Size of the data to upload (this address is NOT clobbered).&amp;lt;br&amp;gt;&lt;br /&gt;
* $07-$08 - Address in ARAM to upload to (recommended to increment it by ($05) when you finish to upload consecutive data)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== PIXI ==&lt;br /&gt;
=== RAM ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Size !! Description&lt;br /&gt;
|-&lt;br /&gt;
| $000000 || 0x0 || To be edited later.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ROM/Routines ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! SNES Address !! Description&lt;br /&gt;
|-&lt;br /&gt;
| $000000 || To be edited later.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GPS ==&lt;br /&gt;
=== RAM ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Size !! Description&lt;br /&gt;
|-&lt;br /&gt;
| $000000 || 0x0 || To be edited later.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ROM/Routines ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! SNES Address !! Description&lt;br /&gt;
|-&lt;br /&gt;
| $000000 || To be edited later.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Custom Powerups ==&lt;br /&gt;
=== RAM ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Address !! Size !! Description&lt;br /&gt;
|-&lt;br /&gt;
| $7E2000 || 0x800 || RAM with different purposes. Only uses 0x1D4 bytes at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $7E2800 || 0x2000 || Reserved as a decompression buffer for the 5th tile GFX.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $7E4800 || 0x2000 || Reserved as a decompression buffer for dynamic items GFX.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $7E6800 || 0x800 || Reserved as a copy of the first 2KiB of the latest decompresed GFX file.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $7E7000 || 0xCFF || Free to use.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| $000000 || 0x0 || To be edited later.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ROM/Routines ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! SNES Address !! Description&lt;br /&gt;
|-&lt;br /&gt;
| $000000 || To be edited later.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=SMW_Resource_RAM/ROM_Map&amp;diff=917</id>
		<title>SMW Resource RAM/ROM Map</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=SMW_Resource_RAM/ROM_Map&amp;diff=917"/>
		<updated>2019-11-18T01:30:49Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: double redirects don&amp;#039;t work&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[SMW Resource Memory Map]]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=SnesLab:Staff&amp;diff=699</id>
		<title>SnesLab:Staff</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=SnesLab:Staff&amp;diff=699"/>
		<updated>2019-09-18T22:56:17Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: @anonimzwx (anonimzwx#9316) has left.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The SnesLab Staff Team&#039;&#039;&#039; is the administrative team responsible for developing, keeping, guarding, helping and maintaining SnesLab. They are split in several areas and have different degrees of power. &#039;&#039;&#039;All of them&#039;&#039;&#039; are voluntary roles and they are always open for new members, since they don&#039;t have a fixed member limit.&lt;br /&gt;
&lt;br /&gt;
The most important for the staff team in the first place is promoting a &#039;&#039;&#039;healthy&#039;&#039;&#039; and a &#039;&#039;&#039;developing&#039;&#039;&#039; ambience where people can keep learning and improving their skills that applies for both ROM hacking, gaming and real life competences. If &#039;&#039;&#039;you are interested&#039;&#039;&#039; in joining the team, message one of the Real Scientists for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Active Areas ==&lt;br /&gt;
=== Real Scientists ===&lt;br /&gt;
Real Scientists are the SnesLab &#039;&#039;&#039;administrators&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Members:&#039;&#039;&#039;&lt;br /&gt;
* Tattletale&lt;br /&gt;
* Vitor Vilela (articulator/owner)&lt;br /&gt;
* Major Flare (inactive)&lt;br /&gt;
* Zexi (inactive)&lt;br /&gt;
* DiscoTheBat (inactive)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Former:&#039;&#039;&#039;&lt;br /&gt;
* Mirann (resigned, now Lab Manager)&lt;br /&gt;
&lt;br /&gt;
=== DevOps ===&lt;br /&gt;
DevOps is the group responsible for the technical aspects of the SnesLab website. It was created from the members that had an important participation from the Website Committee and had technical knowledge in creating and maintaining the server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Members:&#039;&#039;&#039;&lt;br /&gt;
* Alcaro&lt;br /&gt;
* RanAS&lt;br /&gt;
* Vitor Vilela&lt;br /&gt;
* Tattletale (inactive)&lt;br /&gt;
&lt;br /&gt;
=== Lab Managers ===&lt;br /&gt;
Lab Managers are the Discord guardians (moderators). Responsible for keeping the good ambience of the community.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Members:&#039;&#039;&#039;&lt;br /&gt;
* Alcaro&lt;br /&gt;
* LX5&lt;br /&gt;
* Mirann&lt;br /&gt;
* Ragey&lt;br /&gt;
* Shiny Ninetales&lt;br /&gt;
* Super Maks 64&lt;br /&gt;
* Tattletale&lt;br /&gt;
* Vitor Vilela&lt;br /&gt;
* JackTheSpades (inactive)&lt;br /&gt;
&lt;br /&gt;
=== Forum Committee ===&lt;br /&gt;
The Forum Committee is a temporary group where people are currently discussing the creation of SnesLab Forums.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Members:&#039;&#039;&#039;&lt;br /&gt;
* Aja&lt;br /&gt;
* Daizo Dee Von&lt;br /&gt;
* MarioE&lt;br /&gt;
* Shiny Ninetales&lt;br /&gt;
* RanAS&lt;br /&gt;
* Vitor Vilela&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incoming Areas ==&lt;br /&gt;
Areas that will be incoming when the SnesLab Board and SnesLab Hub are out:&lt;br /&gt;
&lt;br /&gt;
* Forum Moderators&lt;br /&gt;
* ASM Team&lt;br /&gt;
* Networking Team&lt;br /&gt;
* Music Team&lt;br /&gt;
* Graphics Team&lt;br /&gt;
* ROM Hacks Team&lt;br /&gt;
* Programming Team&lt;br /&gt;
* Projects Team&lt;br /&gt;
* Game-specific Team&lt;br /&gt;
&lt;br /&gt;
== Inactive/Archived Areas ==&lt;br /&gt;
Areas or groups that no longer exist or are inactive.&lt;br /&gt;
&lt;br /&gt;
=== Networking Area ===&lt;br /&gt;
The Networking Area is a group responsible for the website design, UX/UI experience and Public Relations. It&#039;s currently inactive but there are plans for reopening it with new members.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Members:&#039;&#039;&#039;&lt;br /&gt;
* Tob&lt;br /&gt;
* Luks&lt;br /&gt;
* Vitor Vilela&lt;br /&gt;
&lt;br /&gt;
=== Website Committee ===&lt;br /&gt;
Website Committee was a group for people discussing the creation of the SnesLab website, as well designing the website logo, identity, name, wiki and the technical challenges behind it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Members:&#039;&#039;&#039;&lt;br /&gt;
* Aja&lt;br /&gt;
* Alcaro&lt;br /&gt;
* Daizo Dee Von&lt;br /&gt;
* Konata&lt;br /&gt;
* LadiesMan217&lt;br /&gt;
* Luks&lt;br /&gt;
* Masterlink&lt;br /&gt;
* mellonpizza&lt;br /&gt;
* Ragey&lt;br /&gt;
* RanAS&lt;br /&gt;
* randomdude999&lt;br /&gt;
* Shiny Ninetales&lt;br /&gt;
* Tattletale&lt;br /&gt;
* Ukyo&lt;br /&gt;
* Vitor Vilela&lt;br /&gt;
* WYE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Council ==&lt;br /&gt;
The Council is a fixed and permanent group where people are invited to bring ideas, issues or concerns about SnesLab and SNES ROM hacking in general. They work as Real Scientists advisors. It was the first private channel created on the Discord server and people are occasionally invited to join them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Members:&#039;&#039;&#039;&lt;br /&gt;
* aCrowned&lt;br /&gt;
* Aja&lt;br /&gt;
* Akaginite&lt;br /&gt;
* Alcaro&lt;br /&gt;
* amHunter&lt;br /&gt;
* Amaraticando&lt;br /&gt;
* Anonimato&lt;br /&gt;
* Bruno Lucius&lt;br /&gt;
* Bruno Visnadi&lt;br /&gt;
* BrunoValads&lt;br /&gt;
* Daizo Dee Von&lt;br /&gt;
* DiscoTheBat&lt;br /&gt;
* FURiOUS&lt;br /&gt;
* FuSoYa&lt;br /&gt;
* JackTheSpades&lt;br /&gt;
* Jimmy&lt;br /&gt;
* K3fka&lt;br /&gt;
* Kieran&lt;br /&gt;
* LX5&lt;br /&gt;
* LadiesMan217&lt;br /&gt;
* Lui37&lt;br /&gt;
* Kaizoman&lt;br /&gt;
* MarioE&lt;br /&gt;
* Masterlink&lt;br /&gt;
* MaxodeX&lt;br /&gt;
* Major Flare&lt;br /&gt;
* Mirann&lt;br /&gt;
* Nep-Enut&lt;br /&gt;
* Ragey&lt;br /&gt;
* RanAS&lt;br /&gt;
* Sariel&lt;br /&gt;
* Sinc-X&lt;br /&gt;
* Shiny Ninetales&lt;br /&gt;
* Skewer&lt;br /&gt;
* Super Maks 64&lt;br /&gt;
* Tattletale&lt;br /&gt;
* TheMorganah&lt;br /&gt;
* TheRedhotbr&lt;br /&gt;
* Tob&lt;br /&gt;
* Torchkas&lt;br /&gt;
* Ukyo&lt;br /&gt;
* Vitor Vilela&lt;br /&gt;
* WYE&lt;br /&gt;
* Wakana&lt;br /&gt;
* Zexi&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=SnesLab:Sandbox&amp;diff=421</id>
		<title>SnesLab:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=SnesLab:Sandbox&amp;diff=421"/>
		<updated>2019-07-08T23:38:00Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: [01:35:28]  &amp;lt;Catador&amp;gt; how do I make # not start a numbered list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Welcome to the SNESLAB wiki!&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The rest of this page is reserved for testing lots of stuff. &#039;&#039;italic&#039;&#039; &#039;&#039;&#039;bold&#039;&#039;&#039; &#039;&#039;&#039;&#039;&#039;bold italic&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
function &amp;lt;code&amp;gt;int m2()&amp;lt;/code&amp;gt; is nice.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
int m2 (int ax, char *p_ax) {&lt;br /&gt;
  std::cout &amp;lt;&amp;lt;&amp;quot;Hello World!&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Header text !! Header text !! Header text&lt;br /&gt;
|-&lt;br /&gt;
| Example || Example || Example&lt;br /&gt;
|-&lt;br /&gt;
| Example || Example || Example&lt;br /&gt;
|-&lt;br /&gt;
| Example || Example || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Header text !! Header text !! Header text&lt;br /&gt;
|-&lt;br /&gt;
| Example || Example || Example&lt;br /&gt;
|-&lt;br /&gt;
| Example || Example || Example&lt;br /&gt;
|-&lt;br /&gt;
| Example || Example || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[File:SneslabLogo.png|thumb|SNESLAB logo]]&lt;br /&gt;
&lt;br /&gt;
[[File:SneslabLogo.png|SNESLAB logo]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]&lt;br /&gt;
&lt;br /&gt;
== Heading 2 ==&lt;br /&gt;
=== Heading 3 ===&lt;br /&gt;
==== Heading 4 ====&lt;br /&gt;
===== Heading 5 =====&lt;br /&gt;
====== Heading 6 ======&lt;br /&gt;
&lt;br /&gt;
# List&lt;br /&gt;
# List&lt;br /&gt;
# List&lt;br /&gt;
&lt;br /&gt;
&amp;amp;#x23; Not list&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23; Not list&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;#x23; Not list&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Power_Mario_Contest&amp;diff=336</id>
		<title>Power Mario Contest</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Power_Mario_Contest&amp;diff=336"/>
		<updated>2019-05-20T14:59:17Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:PMCEntry NoWatermark.png|thumb|Anas&#039; Entry, shown in the Main Page!]]&lt;br /&gt;
Power Mario Contest was the 2019 Super Mario World Hacking contest where anyone can use any resources to make a level, similar to SMW Central&#039;s &amp;quot;Chocolate Level Design Contest&amp;quot;. While only 7 people competed, the effort each entry provides serves as a reminder of why people hack [[Super_Mario_World|Super Mario World]] in the first place. &lt;br /&gt;
&lt;br /&gt;
== Entries ==&lt;br /&gt;
* [[User:AnasMario130|AnasMario130]] with &amp;quot;Pyro-Blue&#039;s Fort&amp;quot;&lt;br /&gt;
* [[User:Blue_Mario|Blue Mario]] with &amp;quot;The End of Spring&amp;quot;.&lt;br /&gt;
* [[User:Daizo_Dee_Von|Daizo Dee Von]] with &amp;quot;Faktori Volcano&amp;quot;.&lt;br /&gt;
* [[User:Manofer|Manofer]] with &amp;quot;I hate Thwomps&amp;quot;.&lt;br /&gt;
* [[User:Mclegend101|Mclegend101]] with &amp;quot;YOSHI&#039;S ISLAND 1&amp;quot;.&lt;br /&gt;
* [[User:Strikeforcer|Strikeforcer]] with &amp;quot;Koopakick Factory!&amp;quot;&lt;br /&gt;
* [[User:Super_Maks_64|Super Maks 64]] with &amp;quot;even further over there&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== The Winner ==&lt;br /&gt;
There is no announced winner in the time this article was written, but [[Vitor_Vilela|Vitor Vilela]] has stated that the results will be released very soon.&lt;br /&gt;
[[Category:Hacks]] [[Category:SnesLab]]&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Category:Music_Inserters&amp;diff=193</id>
		<title>Category:Music Inserters</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Category:Music_Inserters&amp;diff=193"/>
		<updated>2019-05-18T21:23:14Z</updated>

		<summary type="html">&lt;p&gt;Alcaro: Alcaro moved page Category:Music Insertors to Category:Music Inserters without leaving a redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tools for inserting custom music for any SNES game.&lt;/div&gt;</summary>
		<author><name>Alcaro</name></author>
	</entry>
</feed>