<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.neogeodev.org//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ZoeB</id>
	<title>NeoGeo Development Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.neogeodev.org//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ZoeB"/>
	<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php/Special:Contributions/ZoeB"/>
	<updated>2026-10-29T22:51:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Sprites&amp;diff=4148</id>
		<title>Sprites</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Sprites&amp;diff=4148"/>
		<updated>2015-01-31T18:24:12Z</updated>

		<summary type="html">&lt;p&gt;ZoeB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &amp;quot;Sprites&amp;quot; as defined by SNK ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mutnatsprite.png|right|frame|Structure of a grouped sprite. The red sprite drives the other 3.]]&lt;br /&gt;
&lt;br /&gt;
Sprites on the NeoGeo aren&#039;t like those on other systems.&lt;br /&gt;
&lt;br /&gt;
They&#039;re made of tiles (sometimes called characters) coming from the C ROMs, or from the .SPR files on the NeoGeo CD. Those tiles are always 16x16 pixels in size and can contain 15 colors (the color index 0 is used for transparency).&lt;br /&gt;
&lt;br /&gt;
Sprites are vertical strips of tiles, with a fixed width of 1 tile (16 pixels), and an adjustable height (up to 32 tiles, 512 pixels).&lt;br /&gt;
Each sprite has its own tilemap, defining which tile number goes in which place.&lt;br /&gt;
Sprites can be stuck together horizontally to make huge moveable objects.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
*No more than 96 sprites can be rendered by scanline. Any others will be ignored (priority: 1 is in the back ?).&lt;br /&gt;
*Even if the VRAM has space for 448 sprites, only 381 can be displayed per frame (without [[sprite multiplexing]] tricks).&lt;br /&gt;
*Contrary to common belief, sprites can&#039;t be zoomed. They can only be shrunk. Graphics for sprites then have to made to the biggest size needed.&lt;br /&gt;
A lot of games contain pre-stretched graphics for sprites which are seen scaled down most of the time (&amp;quot;crashing&amp;quot; logos in title screens for example).&lt;br /&gt;
*$100000 tiles can be addressed (20 bits, 128MiB of graphics), if more tiles are needed then the sprites graphics need to be bankswitched.&lt;br /&gt;
&lt;br /&gt;
== Graphics format ==&lt;br /&gt;
&lt;br /&gt;
Sprite tiles are 16x16 pixels in a 4BPP planar format, handled as 8x8 tiles by the [[GPU]]. See [[sprite graphics format]].&lt;br /&gt;
&lt;br /&gt;
A sprite tile is 128 bytes.&lt;br /&gt;
&lt;br /&gt;
== Horizontal zoom ==&lt;br /&gt;
&lt;br /&gt;
See [[Horizontal reduction]].&lt;br /&gt;
&lt;br /&gt;
= Sprite control blocks =&lt;br /&gt;
&lt;br /&gt;
There are 4 Sprite Control Banks located in VRAM: SCB1 to SCB4.&lt;br /&gt;
They respectively start at adresses $0000, $8000, $8200 and $8400. They aren&#039;t mirrored in any way.&lt;br /&gt;
&lt;br /&gt;
Please see [[VRAM]] to learn more about read/writing to these locations.&lt;br /&gt;
&lt;br /&gt;
Sprites wrap around the screen on a 512 pixels boundary.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:spriteex.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
(All sprites are mapped with tiles $01~$21)&lt;br /&gt;
&lt;br /&gt;
== SCB1 (VRAM $0000~$6FFF): Tilemaps ==&lt;br /&gt;
SCB1 is used to store the tilemaps and tile attributes of each sprite.&lt;br /&gt;
&lt;br /&gt;
(Note that the $7000~$7FFF locations in VRAM are used for the [[Fix layer]]).&lt;br /&gt;
&lt;br /&gt;
Each sprite has a 64 words table, organized as a linear up to down tile/attributes pairs. This means even locations are the tile numbers, and odd ones are attributes.&lt;br /&gt;
&lt;br /&gt;
{{16BitRegister|Tile number LSBs|16}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{16BitRegister|[[Palettes|Palette]]|8|Tile number MSBs|4|3bit Auto-anim|1|2bit Auto-anim|1|Vertical flip|1|Horizontal flip|1}}&lt;br /&gt;
&lt;br /&gt;
The 8-frame [[auto animation]] bit has priority over the 4-frame one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SCB2 (VRAM $8000~$81FF): Shrinking coefficients ==&lt;br /&gt;
&lt;br /&gt;
SCB2 is used to specify the shrinking values of each sprite.&lt;br /&gt;
&lt;br /&gt;
The lower byte is the vertical shrinking. $FF is full size.&lt;br /&gt;
&lt;br /&gt;
The lower nibble of the upper byte is the horizontal shrinking. $F is full size.&lt;br /&gt;
&lt;br /&gt;
{{16BitRegister| |4|Horizontal|4|Vertical|8}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SCB3 (VRAM $8200~$83FF): vertical positions ==&lt;br /&gt;
&lt;br /&gt;
SCB3 is used to specify the sprite&#039;s Y position, its [[sticky bit]] and its size (height in tiles).&lt;br /&gt;
The actual position is 496-Y, from the top border of the screen.&lt;br /&gt;
&lt;br /&gt;
A sprite size of 33 makes it 32 tiles high, and loops borders when shrinking (see example sprite 6).&lt;br /&gt;
&lt;br /&gt;
The sprite&#039;s height is actually the &amp;quot;window&amp;quot; size in which the sprite will be drawn. Shrinking isn&#039;t calculated from this.&lt;br /&gt;
&lt;br /&gt;
{{16BitRegister|Y position|9|[[Sticky bit]]|1|Sprite size|6}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SCB4 (VRAM $8400~$85FF): horizontal positions ==&lt;br /&gt;
&lt;br /&gt;
SCB4 is used to specify the sprite&#039;s X position.&lt;br /&gt;
The actual position is from the left border of the screen.&lt;br /&gt;
&lt;br /&gt;
{{16BitRegister|X position|9|-|7}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Video system]]&lt;/div&gt;</summary>
		<author><name>ZoeB</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Auto_animation&amp;diff=4147</id>
		<title>Auto animation</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Auto_animation&amp;diff=4147"/>
		<updated>2015-01-31T18:22:06Z</updated>

		<summary type="html">&lt;p&gt;ZoeB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Autoanim.gif|frame|2bit (4 tiles) example from [[Mutation Nation]]]]&lt;br /&gt;
&lt;br /&gt;
(Information from [[Charles MacDonald]])&lt;br /&gt;
&lt;br /&gt;
Auto-animation is a tile attribute for [[sprites]] and a special feature of the GPU used to animate loops without CPU usage.&lt;br /&gt;
&lt;br /&gt;
An internal write-only 8bit counter is automatically decremented each frame. When it underflows, it is reloaded with the last value written to it, which comes from the 8 highest bits of {{Reg|REG_LSPCMODE}}. This sets the speed of the animation.&lt;br /&gt;
&lt;br /&gt;
Each time that counter underflows, another internal 3bit counter is incremented. Those 3 bits can only be read in bits 2~0 of REG_LSPCMODE.&lt;br /&gt;
&lt;br /&gt;
When auto-animation is disabled (bit 3 of REG_LSPCMODE set), the frame counter and animation counter continue to function. However, tiles are shown as if their animation mode select bits were reset (so the tile number specified is the tile shown).&lt;br /&gt;
&lt;br /&gt;
These bits can be set in each tile&#039;s attribute word (odd bytes of [[Sprites|SCB1]]):&lt;br /&gt;
{{16BitRegister|[[Palettes|Palette]]|8|Tile number MSBs|4|&#039;&#039;&#039;3bit auto-anim&#039;&#039;&#039;|1|&#039;&#039;&#039;2bit auto-anim&#039;&#039;&#039;|1|Vertical flip|1|Horizontal flip|1}}&lt;br /&gt;
&lt;br /&gt;
Bit 3 has priority.&lt;br /&gt;
&lt;br /&gt;
Depending on the animation period (4 or 8 frames), the tile number specified in [[Sprites|SCB1]] has the lower 2 or 3 bits replaced with those of the animation counter.&lt;br /&gt;
&lt;br /&gt;
Note that the bits are replaced, not added. Therefore, the consecutive tiles used for animation must be aligned on 4 or 8.&lt;br /&gt;
&lt;br /&gt;
[[Category:Video system]]&lt;/div&gt;</summary>
		<author><name>ZoeB</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=Sprites&amp;diff=4146</id>
		<title>Sprites</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=Sprites&amp;diff=4146"/>
		<updated>2015-01-31T18:21:20Z</updated>

		<summary type="html">&lt;p&gt;ZoeB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &amp;quot;Sprites&amp;quot; as defined by SNK ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mutnatsprite.png|right|frame|Structure of a grouped sprite. The red sprite drives the other 3.]]&lt;br /&gt;
&lt;br /&gt;
Sprites on the NeoGeo aren&#039;t like those on other systems.&lt;br /&gt;
&lt;br /&gt;
They&#039;re made of tiles (sometimes called characters) coming from the C ROMs, or from the .SPR files on the NeoGeo CD. Those tiles are always 16x16 pixels in size and can contain 15 colors (the color index 0 is used for transparency).&lt;br /&gt;
&lt;br /&gt;
Sprites are vertical strips of tiles, with a fixed width of 1 tile (16 pixels), and an adjustable height (up to 32 tiles, 512 pixels).&lt;br /&gt;
Each sprite has its own tilemap, defining which tile number goes in which place.&lt;br /&gt;
Sprites can be stuck together horizontally to make huge moveable objects.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
*No more than 96 sprites can be rendered by scanline. Any others will be ignored (priority: 1 is in the back ?).&lt;br /&gt;
*Even if the VRAM has space for 448 sprites, only 381 can be displayed per frame (without [[sprite multiplexing]] tricks).&lt;br /&gt;
*Contrary to common belief, sprites can&#039;t be zoomed. They can only be shrunk. Graphics for sprites then have to made to the biggest size needed.&lt;br /&gt;
A lot of games contain pre-stretched graphics for sprites which are seen scaled down most of the time (&amp;quot;crashing&amp;quot; logos in title screens for example).&lt;br /&gt;
*$100000 tiles can be addressed (20 bits, 128MiB of graphics), if more tiles are needed then the sprites graphics need to be bankswitched.&lt;br /&gt;
&lt;br /&gt;
== Graphics format ==&lt;br /&gt;
&lt;br /&gt;
Sprite tiles are 16x16 pixels in a 4BPP planar format, handled as 8x8 tiles by the [[GPU]]. See [[sprite graphics format]].&lt;br /&gt;
&lt;br /&gt;
A sprite tile is 128 bytes.&lt;br /&gt;
&lt;br /&gt;
== Horizontal zoom ==&lt;br /&gt;
&lt;br /&gt;
See [[Horizontal reduction]].&lt;br /&gt;
&lt;br /&gt;
= Sprite control blocks =&lt;br /&gt;
&lt;br /&gt;
There are 4 Sprite Control Banks located in VRAM: SCB1 to SCB4.&lt;br /&gt;
They respectively start at adresses $0000, $8000, $8200 and $8400. They aren&#039;t mirrored in any way.&lt;br /&gt;
&lt;br /&gt;
Please see [[VRAM]] to learn more about read/writing to these locations.&lt;br /&gt;
&lt;br /&gt;
Sprites wrap around the screen on a 512 pixels boundary.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:spriteex.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
(All sprites are mapped with tiles $01~$21)&lt;br /&gt;
&lt;br /&gt;
== SCB1 (VRAM $0000~$6FFF): Tilemaps ==&lt;br /&gt;
SCB1 is used to store the tilemaps and tile attributes of each sprite.&lt;br /&gt;
&lt;br /&gt;
(Note that the $7000~$7FFF locations in VRAM are used for the [[Fix layer]]).&lt;br /&gt;
&lt;br /&gt;
Each sprite has a 64 words table, organized as a linear up to down tile/attributes pairs. This means even locations are the tile numbers, and odd ones are attributes.&lt;br /&gt;
&lt;br /&gt;
{{16BitRegister|Tile number LSBs|16}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{16BitRegister|[[Palettes|Palette]]|8|Tile number MSBs|4|3bit Auto-anim|1|2bit Auto-anim|1|Vertical flip|1|Horizontal flip|1}}&lt;br /&gt;
&lt;br /&gt;
The 8-frame [[auto animation]] bit has priority over the 4-frame one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SCB2 (VRAM $8000~$81FF): Shrinking coefficients ==&lt;br /&gt;
&lt;br /&gt;
SCB2 is used to specify the shrinking values of each sprite.&lt;br /&gt;
&lt;br /&gt;
The lower byte is the vertical shrinking. $FF is full size.&lt;br /&gt;
&lt;br /&gt;
The lower nibble of the upper byte is the horizontal shrinking. $F is full size.&lt;br /&gt;
&lt;br /&gt;
{{16BitRegister| |4|Horizontal|4|Vertical|8}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SCB3 (VRAM $8200~$83FF): vertical positions ==&lt;br /&gt;
&lt;br /&gt;
SCB3 is used to specify the sprites&#039;s Y position, its([[Sticky bit]] and its size (height in tiles).&lt;br /&gt;
The actual position is 496-Y, from the top border of the screen.&lt;br /&gt;
&lt;br /&gt;
A sprite size of 33 makes it 32 tiles high, and loops borders when shrinking (see example sprite 6).&lt;br /&gt;
&lt;br /&gt;
The sprite&#039;s height is actually the &amp;quot;window&amp;quot; size in which the sprite will be drawn. Shrinking isn&#039;t calculated from this.&lt;br /&gt;
&lt;br /&gt;
{{16BitRegister|Y position|9|[[Sticky bit]]|1|Sprite size|6}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SCB4 (VRAM $8400~$85FF): horizontal positions ==&lt;br /&gt;
&lt;br /&gt;
SCB4 is used to specify the sprite&#039;s X position.&lt;br /&gt;
The actual position is from the left border of the screen.&lt;br /&gt;
&lt;br /&gt;
{{16BitRegister|X position|9|-|7}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Video system]]&lt;/div&gt;</summary>
		<author><name>ZoeB</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=PCM_file&amp;diff=4145</id>
		<title>PCM file</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=PCM_file&amp;diff=4145"/>
		<updated>2015-01-31T18:20:26Z</updated>

		<summary type="html">&lt;p&gt;ZoeB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PCM files contain the [[YM2610|ADPCM]] sound data (equivalent to the [[V ROM]]s on [[:Category:cartridge systems|cartridge systems]]).&lt;br /&gt;
&lt;br /&gt;
Offset adresses used for loading PCM files are divided by 2 (they&#039;re on an 8bit bus).&lt;br /&gt;
&lt;br /&gt;
*Maximum file size: 512KiB ?&lt;br /&gt;
*Type code: 4&lt;br /&gt;
*Loadable in: PCM [[DRAM]]&lt;br /&gt;
*Banks: 2 of 512KiB (1MiB total)&lt;br /&gt;
&lt;br /&gt;
[[Category:CD systems]]&lt;/div&gt;</summary>
		<author><name>ZoeB</name></author>
	</entry>
</feed>