<?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=WLivi</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=WLivi"/>
	<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php/Special:Contributions/WLivi"/>
	<updated>2026-05-03T21:09:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=HOW_TO_PLAY&amp;diff=6771</id>
		<title>HOW TO PLAY</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=HOW_TO_PLAY&amp;diff=6771"/>
		<updated>2021-03-03T04:39:31Z</updated>

		<summary type="html">&lt;p&gt;WLivi: /* Tilemap */ minor clarification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:howtoplay_nam.png|thumb|A &amp;quot;scripted&amp;quot; how-to-play screen.]]&lt;br /&gt;
&lt;br /&gt;
The HOW_TO_PLAY ($C00474) [[system ROM]] call builds and animates an &amp;quot;how to play&amp;quot; screen from a command list. Only a few games use this call.&lt;br /&gt;
&lt;br /&gt;
The graphics are set up using the [[fix layer]] with hardcoded tile numbers.&lt;br /&gt;
&lt;br /&gt;
=Command list=&lt;br /&gt;
&lt;br /&gt;
The command list must be loaded at $10F300 (how many bytes reserved ?).&lt;br /&gt;
&lt;br /&gt;
Each command is a longword (4 bytes):&lt;br /&gt;
&lt;br /&gt;
* The rightmost byte is the command parameter&lt;br /&gt;
* The next byte is the command type (0~3)&lt;br /&gt;
* If the command type isn&#039;t recognized, the longword is processed as being a pointer to a [[MESS OUT]] data buffer&lt;br /&gt;
* The end command is $00000000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00000000 00000000 000000TT PPPPPPPP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Type 0: Loop control==&lt;br /&gt;
&lt;br /&gt;
* If the parameter byte is less than $FF: Set a loop counter to that value&lt;br /&gt;
* If the parameter byte is equal to $FF: Decrement the loop counter and loop back to the previous setup command until it reaches 0&lt;br /&gt;
&lt;br /&gt;
==Type 1: Joystick state==&lt;br /&gt;
&lt;br /&gt;
Sets the color of each joystick direction arrow.&lt;br /&gt;
&lt;br /&gt;
* 1 is light blue (pressed)&lt;br /&gt;
* 0 is dark blue (released)&lt;br /&gt;
&lt;br /&gt;
{{8BitRegister&lt;br /&gt;
|Up-Right&lt;br /&gt;
|1&lt;br /&gt;
|Right&lt;br /&gt;
|1&lt;br /&gt;
|Down-Right&lt;br /&gt;
|1&lt;br /&gt;
|Down&lt;br /&gt;
|1&lt;br /&gt;
|Down-Left&lt;br /&gt;
|1&lt;br /&gt;
|Left&lt;br /&gt;
|1&lt;br /&gt;
|Up-Left&lt;br /&gt;
|1&lt;br /&gt;
|Up&lt;br /&gt;
|1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If followed by a null command ($0.l) the next 16-bit word specifies a number of frames to wait before executing the next command.&lt;br /&gt;
&lt;br /&gt;
==Type 2: Buttons state==&lt;br /&gt;
&lt;br /&gt;
Sets the state of each button.&lt;br /&gt;
&lt;br /&gt;
* 1 is pressed&lt;br /&gt;
* 0 is released&lt;br /&gt;
&lt;br /&gt;
{{8BitRegister&lt;br /&gt;
| -&lt;br /&gt;
|4&lt;br /&gt;
|D&lt;br /&gt;
|1&lt;br /&gt;
|C&lt;br /&gt;
|1&lt;br /&gt;
|B&lt;br /&gt;
|1&lt;br /&gt;
|A&lt;br /&gt;
|1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If followed by a null command ($0.l) the next 16-bit word specifies a number of frames to wait before executing the next command.&lt;br /&gt;
&lt;br /&gt;
==Any other type: Text update==&lt;br /&gt;
&lt;br /&gt;
The longword value is a pointer to a [[MESS_OUT]] data buffer.&lt;br /&gt;
&lt;br /&gt;
This command is &#039;&#039;&#039;always&#039;&#039;&#039; followed by a 16-bit word value which specifies a number of frames to wait before executing the next command.&lt;br /&gt;
&lt;br /&gt;
=Example=&lt;br /&gt;
&lt;br /&gt;
[[NAM-1975]] sets up the following command list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0000 0200    All buttons released&lt;br /&gt;
0000 01FF    All arrows highlighted&lt;br /&gt;
0010 F3E2    MESS_OUT write &amp;quot;NAM 1975&amp;quot; &amp;quot;CONTROL HERO AND CURSOR&amp;quot;&lt;br /&gt;
0004         Wait 4 frames&lt;br /&gt;
0000 000C    Init loop counter to 12&lt;br /&gt;
0000 0100    All arrows cleared       &amp;lt;--------------,&lt;br /&gt;
0000 0000    Wait...                                 |&lt;br /&gt;
0008         ...8 frames                             |&lt;br /&gt;
0000 01FF    All arrows highlighted                  |&lt;br /&gt;
0000 0000    Wait...                                 |&lt;br /&gt;
0008         ...8 frames                             |&lt;br /&gt;
0000 00FF    Loop back (blink all arrows 12 times) --&#039;&lt;br /&gt;
0000 0201    A button is pressed&lt;br /&gt;
0000 0100    All arrows cleared&lt;br /&gt;
0010 F418    MESS_OUT write &amp;quot;MACHINE GUN&amp;quot;&lt;br /&gt;
0004         Wait 4 frames&lt;br /&gt;
0000 000C    Init loop counter to 12&lt;br /&gt;
0000 0200    All buttons released     &amp;lt;--------------,&lt;br /&gt;
0000 0000    Wait...                                 |&lt;br /&gt;
0008         ...8 frames                             |&lt;br /&gt;
0000 0201    A button is pressed                     |&lt;br /&gt;
0000 0000    Wait...                                 |&lt;br /&gt;
0008         ...8 frames                             |&lt;br /&gt;
0000 00FF    Loop back (blink A button 12 times) ----&#039;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=List of games known to use HOW_TO_PLAY=&lt;br /&gt;
&lt;br /&gt;
* [[NAM-1975]]&lt;br /&gt;
* [[Baseball Stars Professional]]&lt;br /&gt;
* [[Mahjong Kyo Retsuden]]&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
=Tilemap=&lt;br /&gt;
[[File:howtoplay_tilemap.png|thumb|how-to-play tilemap, with each 8x16 block turned into the low-byte of it&#039;s hex address]]&lt;br /&gt;
The tiles that make up the HOW_TO_PLAY screen are found in pages 7 and 8 of the Fix rom. Much like how MESS OUT handles 8x16 text, each tile in page 7 has a counterpart at the same position on page 8, which gets displayed immediately below. (The exception to this is the black tiles around the edges, which are all 0x07FF.)&amp;lt;br \&amp;gt;&lt;br /&gt;
Given this unifom layout of adjacent rows, the below table combines each pair and lists only the low byte.&lt;br /&gt;
&lt;br /&gt;
The interior of the lower text area is initialized with rows of 0x9920 and 0x9A20; the 8x16 spaces from fontset 9, in palette 9.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Overall Layout&lt;br /&gt;
|-&lt;br /&gt;
|FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF&lt;br /&gt;
|-&lt;br /&gt;
|FF||00||01||04||05||05||05||05||05||05||05||05||05||05||05||05||05||05||05||06||07||07||07||07||07||07||07||07||07||07||07||07||07||07||07||07||07||07&lt;br /&gt;
|-&lt;br /&gt;
|FF||02||03||08||09||09||09||09||09||09||09||09||09||09||09||09||09||09||09||0A||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B&lt;br /&gt;
|-&lt;br /&gt;
|FF||03||03||0C||0D||0E||0F||10||11||12||13||14||15||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||63||64||65&lt;br /&gt;
|-&lt;br /&gt;
|FF||03||03||0C||5C||5D||5D||16||17||18||19||1A||1B||5D||5D||5D||5D||5D||5D||5D||5D||2C||2D||2E||2F||30||31||32||33||34||35||36||37||5D||5D||5D||5D||5D&lt;br /&gt;
|-&lt;br /&gt;
|FF||03||03||0C||5D||5D||5D||1C||1D||1E||1F||20||21||5D||5D||5D||5D||5D||38||39||3A||3B||3C||3D||3E||3F||40||41||42||43||44||45||46||5D||5D||5D||5D||5D&lt;br /&gt;
|-&lt;br /&gt;
|FF||03||03||0C||5E||5D||5D||22||23||24||25||26||27||5D||5D||5D||5D||5D||47||48||49||4A||4B||4C||4D||4E||4F||50||51||52||53||54||55||5D||5D||5D||5D||5D&lt;br /&gt;
|-&lt;br /&gt;
|FF||03||03||0C||5F||5D||5D||5D||28||29||2A||2B||5D||5D||5D||5D||5D||5D||56||57||58||59||59||59||59||59||59||59||59||59||59||5A||5B||5D||5D||5D||5D||5D&lt;br /&gt;
|-&lt;br /&gt;
|FF||68||69||0C||60||61||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||66||67&lt;br /&gt;
|-&lt;br /&gt;
|FF||6A||6B||6C||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||76||77||77||77&lt;br /&gt;
|-&lt;br /&gt;
|FF||03||03||6F||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||78||79||79||79&lt;br /&gt;
|-&lt;br /&gt;
|FF||6E||03||70||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||7A||7B||7B||7B&lt;br /&gt;
|-&lt;br /&gt;
|FF||72||73||71||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||7C||7D||7D||7D&lt;br /&gt;
|-&lt;br /&gt;
|FF||FF||FF||74||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||7E||FF||FF||FF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The joystick (10-2B) uses palette 0x0, which changes to highlight the directions.&lt;br /&gt;
** Within palette 0x0, colors 5-C map to the joystick directions, starting at Up and rotating anticlockwise.&lt;br /&gt;
** Note: the top-halves of tiles 10-15 are in palette 0xD instead.&lt;br /&gt;
* The buttons (2C-5B) use palette 0xA when dim, and 0xB when illuminated.&lt;br /&gt;
** A tiles: 38-3B, 47-4B, 56-58&lt;br /&gt;
** B tiles: 2C-2F, 3C-3E, 4C-4D&lt;br /&gt;
** C tiles: 30-33, 3F-42, 4E-51&lt;br /&gt;
** D tiles: 34-37, 43-46, 52-55&lt;br /&gt;
** tiles 59-5B are drawn in the dim palette and never turn bright&lt;br /&gt;
* The text-boxes frames (04-06, 08-0A, 6C-6D, 6F-71, 74-76, 78, 7A, 7C, 7E) have palette 0xC.&lt;br /&gt;
* The rest of the control panel uses palette 0xD.&lt;br /&gt;
&lt;br /&gt;
[[Category:Code]]&lt;br /&gt;
[[Category:BIOS calls]]&lt;/div&gt;</summary>
		<author><name>WLivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=HOW_TO_PLAY&amp;diff=6770</id>
		<title>HOW TO PLAY</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=HOW_TO_PLAY&amp;diff=6770"/>
		<updated>2021-03-03T04:20:07Z</updated>

		<summary type="html">&lt;p&gt;WLivi: Tilemap data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:howtoplay_nam.png|thumb|A &amp;quot;scripted&amp;quot; how-to-play screen.]]&lt;br /&gt;
&lt;br /&gt;
The HOW_TO_PLAY ($C00474) [[system ROM]] call builds and animates an &amp;quot;how to play&amp;quot; screen from a command list. Only a few games use this call.&lt;br /&gt;
&lt;br /&gt;
The graphics are set up using the [[fix layer]] with hardcoded tile numbers.&lt;br /&gt;
&lt;br /&gt;
=Command list=&lt;br /&gt;
&lt;br /&gt;
The command list must be loaded at $10F300 (how many bytes reserved ?).&lt;br /&gt;
&lt;br /&gt;
Each command is a longword (4 bytes):&lt;br /&gt;
&lt;br /&gt;
* The rightmost byte is the command parameter&lt;br /&gt;
* The next byte is the command type (0~3)&lt;br /&gt;
* If the command type isn&#039;t recognized, the longword is processed as being a pointer to a [[MESS OUT]] data buffer&lt;br /&gt;
* The end command is $00000000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00000000 00000000 000000TT PPPPPPPP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Type 0: Loop control==&lt;br /&gt;
&lt;br /&gt;
* If the parameter byte is less than $FF: Set a loop counter to that value&lt;br /&gt;
* If the parameter byte is equal to $FF: Decrement the loop counter and loop back to the previous setup command until it reaches 0&lt;br /&gt;
&lt;br /&gt;
==Type 1: Joystick state==&lt;br /&gt;
&lt;br /&gt;
Sets the color of each joystick direction arrow.&lt;br /&gt;
&lt;br /&gt;
* 1 is light blue (pressed)&lt;br /&gt;
* 0 is dark blue (released)&lt;br /&gt;
&lt;br /&gt;
{{8BitRegister&lt;br /&gt;
|Up-Right&lt;br /&gt;
|1&lt;br /&gt;
|Right&lt;br /&gt;
|1&lt;br /&gt;
|Down-Right&lt;br /&gt;
|1&lt;br /&gt;
|Down&lt;br /&gt;
|1&lt;br /&gt;
|Down-Left&lt;br /&gt;
|1&lt;br /&gt;
|Left&lt;br /&gt;
|1&lt;br /&gt;
|Up-Left&lt;br /&gt;
|1&lt;br /&gt;
|Up&lt;br /&gt;
|1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If followed by a null command ($0.l) the next 16-bit word specifies a number of frames to wait before executing the next command.&lt;br /&gt;
&lt;br /&gt;
==Type 2: Buttons state==&lt;br /&gt;
&lt;br /&gt;
Sets the state of each button.&lt;br /&gt;
&lt;br /&gt;
* 1 is pressed&lt;br /&gt;
* 0 is released&lt;br /&gt;
&lt;br /&gt;
{{8BitRegister&lt;br /&gt;
| -&lt;br /&gt;
|4&lt;br /&gt;
|D&lt;br /&gt;
|1&lt;br /&gt;
|C&lt;br /&gt;
|1&lt;br /&gt;
|B&lt;br /&gt;
|1&lt;br /&gt;
|A&lt;br /&gt;
|1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If followed by a null command ($0.l) the next 16-bit word specifies a number of frames to wait before executing the next command.&lt;br /&gt;
&lt;br /&gt;
==Any other type: Text update==&lt;br /&gt;
&lt;br /&gt;
The longword value is a pointer to a [[MESS_OUT]] data buffer.&lt;br /&gt;
&lt;br /&gt;
This command is &#039;&#039;&#039;always&#039;&#039;&#039; followed by a 16-bit word value which specifies a number of frames to wait before executing the next command.&lt;br /&gt;
&lt;br /&gt;
=Example=&lt;br /&gt;
&lt;br /&gt;
[[NAM-1975]] sets up the following command list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0000 0200    All buttons released&lt;br /&gt;
0000 01FF    All arrows highlighted&lt;br /&gt;
0010 F3E2    MESS_OUT write &amp;quot;NAM 1975&amp;quot; &amp;quot;CONTROL HERO AND CURSOR&amp;quot;&lt;br /&gt;
0004         Wait 4 frames&lt;br /&gt;
0000 000C    Init loop counter to 12&lt;br /&gt;
0000 0100    All arrows cleared       &amp;lt;--------------,&lt;br /&gt;
0000 0000    Wait...                                 |&lt;br /&gt;
0008         ...8 frames                             |&lt;br /&gt;
0000 01FF    All arrows highlighted                  |&lt;br /&gt;
0000 0000    Wait...                                 |&lt;br /&gt;
0008         ...8 frames                             |&lt;br /&gt;
0000 00FF    Loop back (blink all arrows 12 times) --&#039;&lt;br /&gt;
0000 0201    A button is pressed&lt;br /&gt;
0000 0100    All arrows cleared&lt;br /&gt;
0010 F418    MESS_OUT write &amp;quot;MACHINE GUN&amp;quot;&lt;br /&gt;
0004         Wait 4 frames&lt;br /&gt;
0000 000C    Init loop counter to 12&lt;br /&gt;
0000 0200    All buttons released     &amp;lt;--------------,&lt;br /&gt;
0000 0000    Wait...                                 |&lt;br /&gt;
0008         ...8 frames                             |&lt;br /&gt;
0000 0201    A button is pressed                     |&lt;br /&gt;
0000 0000    Wait...                                 |&lt;br /&gt;
0008         ...8 frames                             |&lt;br /&gt;
0000 00FF    Loop back (blink A button 12 times) ----&#039;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=List of games known to use HOW_TO_PLAY=&lt;br /&gt;
&lt;br /&gt;
* [[NAM-1975]]&lt;br /&gt;
* [[Baseball Stars Professional]]&lt;br /&gt;
* [[Mahjong Kyo Retsuden]]&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
=Tilemap=&lt;br /&gt;
[[File:howtoplay_tilemap.png|thumb|how-to-play tilemap, with each 8x16 block turned into the low-byte of it&#039;s hex address]]&lt;br /&gt;
The tiles that make up the HOW_TO_PLAY screen are found in pages 7 and 8 of the Fix rom. Much like how MESS OUT handles 8x16 text, each tile in page 7 has a counterpart at the same position on page 8, which gets displayed immediately below. (The exception to this is the black tiles around the edges, which are all 0x07FF.)&amp;lt;br \&amp;gt;&lt;br /&gt;
Given this unifom layout of adjacent rows, the below table combines each pair and lists only the low byte.&lt;br /&gt;
&lt;br /&gt;
The interior of the lower text area is initialized with rows of 0x9920 and 0x9A20; the 8x16 spaces from fontset 9, in palette 9.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Overall Layout&lt;br /&gt;
|-&lt;br /&gt;
|FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF||FF&lt;br /&gt;
|-&lt;br /&gt;
|FF||00||01||04||05||05||05||05||05||05||05||05||05||05||05||05||05||05||05||06||07||07||07||07||07||07||07||07||07||07||07||07||07||07||07||07||07||07&lt;br /&gt;
|-&lt;br /&gt;
|FF||02||03||08||09||09||09||09||09||09||09||09||09||09||09||09||09||09||09||0A||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B||0B&lt;br /&gt;
|-&lt;br /&gt;
|FF||03||03||0C||0D||0E||0F||10||11||12||13||14||15||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||0F||63||64||65&lt;br /&gt;
|-&lt;br /&gt;
|FF||03||03||0C||5C||5D||5D||16||17||18||19||1A||1B||5D||5D||5D||5D||5D||5D||5D||5D||2C||2D||2E||2F||30||31||32||33||34||35||36||37||5D||5D||5D||5D||5D&lt;br /&gt;
|-&lt;br /&gt;
|FF||03||03||0C||5D||5D||5D||1C||1D||1E||1F||20||21||5D||5D||5D||5D||5D||38||39||3A||3B||3C||3D||3E||3F||40||41||42||43||44||45||46||5D||5D||5D||5D||5D&lt;br /&gt;
|-&lt;br /&gt;
|FF||03||03||0C||5E||5D||5D||22||23||24||25||26||27||5D||5D||5D||5D||5D||47||48||49||4A||4B||4C||4D||4E||4F||50||51||52||53||54||55||5D||5D||5D||5D||5D&lt;br /&gt;
|-&lt;br /&gt;
|FF||03||03||0C||5F||5D||5D||5D||28||29||2A||2B||5D||5D||5D||5D||5D||5D||56||57||58||59||59||59||59||59||59||59||59||59||59||5A||5B||5D||5D||5D||5D||5D&lt;br /&gt;
|-&lt;br /&gt;
|FF||68||69||0C||60||61||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||62||66||67&lt;br /&gt;
|-&lt;br /&gt;
|FF||6A||6B||6C||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||6D||76||77||77||77&lt;br /&gt;
|-&lt;br /&gt;
|FF||03||03||6F||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||78||79||79||79&lt;br /&gt;
|-&lt;br /&gt;
|FF||6E||03||70||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||7A||7B||7B||7B&lt;br /&gt;
|-&lt;br /&gt;
|FF||72||73||71||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||20||7C||7D||7D||7D&lt;br /&gt;
|-&lt;br /&gt;
|FF||FF||FF||74||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||75||7E||FF||FF||FF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The joystick (10-2B) uses palette 0x0, which changes to highlight the directions.&lt;br /&gt;
** Colors 0x5-0xC map to the joystick directions, starting at Up and rotating anticlockwise.&lt;br /&gt;
** Note: the top-halves of tiles 10-15 are in palette 0xD instead.&lt;br /&gt;
* The buttons (2C-5B) use palette 0xA when dim, and 0xB when illuminated.&lt;br /&gt;
** A tiles: 38-3B, 47-4B, 56-58&lt;br /&gt;
** B tiles: 2C-2F, 3C-3E, 4C-4D&lt;br /&gt;
** C tiles: 30-33, 3F-42, 4E-51&lt;br /&gt;
** D tiles: 34-37, 43-46, 52-55&lt;br /&gt;
* The text-boxes frames (04-06, 08-0A, 6C-6D, 6F-71, 74-76, 78, 7A, 7C, 7E) have palette 0xC.&lt;br /&gt;
* The rest of the control panel uses palette 0xD.&lt;br /&gt;
&lt;br /&gt;
[[Category:Code]]&lt;br /&gt;
[[Category:BIOS calls]]&lt;/div&gt;</summary>
		<author><name>WLivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=File:Howtoplay_tilemap.png&amp;diff=6769</id>
		<title>File:Howtoplay tilemap.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=File:Howtoplay_tilemap.png&amp;diff=6769"/>
		<updated>2021-03-03T04:00:12Z</updated>

		<summary type="html">&lt;p&gt;WLivi: the Howtoplay screen rendered with a hacked fix rom, to showcase the tilemap.  A simple palette reference has been added to the lower text-box.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
the Howtoplay screen rendered with a hacked fix rom, to showcase the tilemap.  A simple palette reference has been added to the lower text-box.&lt;/div&gt;</summary>
		<author><name>WLivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.neogeodev.org//index.php?title=MESS_OUT&amp;diff=6768</id>
		<title>MESS OUT</title>
		<link rel="alternate" type="text/html" href="https://wiki.neogeodev.org//index.php?title=MESS_OUT&amp;diff=6768"/>
		<updated>2021-03-03T02:03:24Z</updated>

		<summary type="html">&lt;p&gt;WLivi: /* Command 9: Write Japanese text */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=MESS_OUT ($C004CE): Generic VRAM output=&lt;br /&gt;
[[File:Mess_out.png|frame|right]]&lt;br /&gt;
&lt;br /&gt;
MESS_OUT executes the command buffer in the [[System ROM]]&#039;s work RAM that starts at &#039;&#039;&#039;BIOS_MESS_BUFFER&#039;&#039;&#039; (constant $10FF00) and goes up to &#039;&#039;&#039;BIOS_MESS_POINT&#039;&#039;&#039; (longword variable $10FDBE). This can be used to display text messages, boxes... on the [[fix layer]] (is it used for sprites too ?).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;MESS_OUT is automatically called in the [[SYSTEM_INT1]] call&amp;lt;/s&amp;gt;. &#039;&#039;&#039;BIOS_MESS_BUSY&#039;&#039;&#039; ($10FDC2.b) can be used to prevent this (when setting up the command list, for example).&lt;br /&gt;
&lt;br /&gt;
The command buffer can be made of commands directly, or pointers to lists in ROM or user RAM. To put commands directly into the buffer, a null pointer ($00.l) needs to be placed before the command list.&lt;br /&gt;
&lt;br /&gt;
Commands are always words.&lt;br /&gt;
&lt;br /&gt;
=Commands=&lt;br /&gt;
==Command 0: End of command list==&lt;br /&gt;
1 word: $0000&lt;br /&gt;
&lt;br /&gt;
==Command 1: Set data format==&lt;br /&gt;
2 words:&lt;br /&gt;
{{16BitRegister|0|6|Byte/Word|1|End code/Data size|1|$01|8}}&lt;br /&gt;
&lt;br /&gt;
This command specifies if the data will be in bytes or words, and if the size is defined or if an end code has to be reached.&lt;br /&gt;
&lt;br /&gt;
;If data is in bytes (bit 9 = 0):&lt;br /&gt;
:The next word&#039;s upper byte will be the data&#039;s constant upper byte (since VRAM can only be written in words).&lt;br /&gt;
:If the data is limited by an end code (bit 8 = 0), the next word&#039;s lower byte will be the end code&#039;s value.&lt;br /&gt;
:If the data size is defined (bit 8 = 1), the next word&#039;s lower byte will be the size (so max length is $FF).&lt;br /&gt;
&lt;br /&gt;
;If data is in words (bit 9 = 1):&lt;br /&gt;
:If the data is limited by an end code (bit 8 = 0), the next word will be the end code&#039;s value.&lt;br /&gt;
:If the data size is defined (bit 8 = 1), the next word will be the size (so max length is $FFFF).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dc.w  $0001,$15FF  ;Data will be read in bytes, upper byte will always be $15, end code is $FF.&lt;br /&gt;
dc.w  $0101,$1520  ;Data will be read in bytes, upper byte will always be $15, data length is $20.&lt;br /&gt;
dc.w  $0201,$8000  ;Data will be read in words, end code is $8000.&lt;br /&gt;
dc.w  $0301,$2044  ;Data will be read in words, data length is $2044.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format stays the same until command 1 is used again.&lt;br /&gt;
&lt;br /&gt;
==Command 2: Set auto-increment==&lt;br /&gt;
*1 word&lt;br /&gt;
{{16BitRegister|Auto-inc value|8|$02|8}}&lt;br /&gt;
&lt;br /&gt;
Sets the auto-increment value (written to &#039;&#039;&#039;VRAM_MOD&#039;&#039;&#039; ($3C0004)). Is the value sign-extended or not ?&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dc.w  $2002  ;Set auto-inc to $20&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Command 3: Set VRAM address==&lt;br /&gt;
*2 words&lt;br /&gt;
Sets the VRAM address written to &#039;&#039;&#039;VRAM_ADDR&#039;&#039;&#039; ($3C0000)) to the next word&#039;s value.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dc.w  $0003,$7201  ;Set VRAM address to $7201&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Command 4: Set data address==&lt;br /&gt;
*3 words&lt;br /&gt;
Sets the output data address to the next longword. Actual writes to VRAM are done with this command.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dc.w  $0004&lt;br /&gt;
dc.l  MESSAGE&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Command 5: Add to current VRAM address==&lt;br /&gt;
*2 words&lt;br /&gt;
Add the next word to the current VRAM address. (This is different from command 2). Useful to skip lines or spaces.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dc.w  $0005,$001F  ;Add $1F to the current VRAM address&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Command 6: Resume data output==&lt;br /&gt;
*1 word&lt;br /&gt;
Resume data output (instead of using command 4 again, keep going from the last address).&lt;br /&gt;
&lt;br /&gt;
==Command 7: Directly define output data==&lt;br /&gt;
*at least 2 words&lt;br /&gt;
Directly define the data (instead of using command 4 to point to it). Don&#039;t forget the padding byte if the data ends on an odd address.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dc.w  $0007&lt;br /&gt;
dc.b  $30,$31,$34,$45,$FF&lt;br /&gt;
dc.b  $00    ;Pad byte&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Command 8: Write text with 8x16 font==&lt;br /&gt;
*at least 2 words&lt;br /&gt;
{{16BitRegister|Upper data byte (fontset number)|8|$08|8}}&lt;br /&gt;
&lt;br /&gt;
Writes with the 8*16 pixels fix font. The commands upper byte will be the data&#039;s constant upper byte. The next bytes are data, and the end code is $FF.&lt;br /&gt;
&lt;br /&gt;
The auto-inc is automaticaly set to $20.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dc.w  $0108    ;Tileset 1&lt;br /&gt;
dc.b  $44,$51  ;Data&lt;br /&gt;
dc.b  $FF      ;End code&lt;br /&gt;
dc.b  $00      ;Pad byte&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Command 9: Write Japanese text==&lt;br /&gt;
Same as command 8 but for Japanese characters.&lt;br /&gt;
&lt;br /&gt;
Upper-case ASCII (0x20-0x5F) and characters 0x80-0xFE are handled identically to command 8.&amp;lt;br /&amp;gt;&lt;br /&gt;
Characters 0x00-0x19 are hiragana with diacritic marks.&amp;lt;br /&amp;gt;&lt;br /&gt;
Characters 0x60-0x7A are katakana with diacritic marks.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tiles used for this are all taken from page 0, irrespective of the selected fontset.&amp;lt;br /&amp;gt;&lt;br /&gt;
0x00-0x1F map to 0x080-0x09F (upper) and 0x0C0-0x0DF (lower).&amp;lt;br /&amp;gt;&lt;br /&gt;
0x60-0x7F map to 0x0A0-0x0BF (upper) and 0x0E0-0x0FF (lower).&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Command A: Call sub list==&lt;br /&gt;
*3 words&lt;br /&gt;
Call sub command list. The next longword is a pointer to another command list. Return has to be made using command B.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dc.w  $000A&lt;br /&gt;
dc.l  SUBLIST&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The call stack seems to be 5 addresses deep.&#039;&#039;&#039; Be sure to avoid nesting too many list calls.&lt;br /&gt;
&lt;br /&gt;
==Command B: Return from sub list==&lt;br /&gt;
*1 word&lt;br /&gt;
Return to calling command list.&lt;br /&gt;
&lt;br /&gt;
==Command C: Repeated data output==&lt;br /&gt;
*2 words&lt;br /&gt;
Repeat output. The upper byte of the command is the number of times to output the next word.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dc.w  $090C,$0147  ;Outputs $0147 9 times&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Command D: Repeat and increment output==&lt;br /&gt;
*2 words&lt;br /&gt;
&lt;br /&gt;
Repeat and increment output. The upper byte of the command is the number of times to output the next word. The lower byte of the data is incremented each time.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dc.w  $040D,$42FE  ;Outputs $42FE,$42FF,$4200,$4201&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Example code and command lists=&lt;br /&gt;
(Slightly modified code from SNK&#039;s doc, output gives the above screencap.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
 bset.b  #0,BIOS_MESS_BUSY&lt;br /&gt;
 movea.l BIOS_MESS_POINT,a0  ;Get current pointer in buffer&lt;br /&gt;
 move.l  #0,(a0)+       ;Direct commands&lt;br /&gt;
 move.w  #3,(a0)+       ;Set VRAM address to $7318&lt;br /&gt;
 move.w  #$7318,(a0)+&lt;br /&gt;
 move.w  #$0301,(a0)+   ;Words, size = 1&lt;br /&gt;
 move.w  #$0001,(a0)+&lt;br /&gt;
 move.w  #$0007,(a0)+   ;Output data&lt;br /&gt;
 move.w  $100000,(a0)+&lt;br /&gt;
 move.w  #0,(a0)+       ;End of this list&lt;br /&gt;
 move.l  #MESSAGE1,(a0)+ ;Pointer to list in ROM&lt;br /&gt;
 move.l  a0,BIOS_MESS_POINT  ;Update pointer&lt;br /&gt;
 bclr.b  #0,BIOS_MESS_BUSY   ;Ready to go&lt;br /&gt;
 rts&lt;br /&gt;
&lt;br /&gt;
MESSAGE1:&lt;br /&gt;
  dc.w  $0001    ;Bytes, upper = $00, end code = $FF&lt;br /&gt;
  dc.w  $00FF&lt;br /&gt;
  dc.w  $2002    ;Auto-inc = $20&lt;br /&gt;
  dc.w  $0003    ;VRAM address = $7024&lt;br /&gt;
  dc.w  $7024&lt;br /&gt;
  dc.w  $0004    ;Write &amp;quot;MESSAGE1&amp;quot;&lt;br /&gt;
  dc.l  MS1&lt;br /&gt;
&lt;br /&gt;
  dc.w  $0005    ;Next line&lt;br /&gt;
  dc.w  $0001&lt;br /&gt;
  dc.w  $0006    ;Resume, write &amp;quot;MESSAGE2&amp;quot;&lt;br /&gt;
  dc.w  $0005    ;Next line&lt;br /&gt;
  dc.w  $0001&lt;br /&gt;
&lt;br /&gt;
  dc.w  $0007    ;Direct data output&lt;br /&gt;
  dc.b  &amp;quot;MESSAGE3&amp;quot;&lt;br /&gt;
  dc.w  $FF00    ;End code and pad byte&lt;br /&gt;
&lt;br /&gt;
  dc.w  $0005    ;Next line&lt;br /&gt;
  dc.w  $0001&lt;br /&gt;
&lt;br /&gt;
  dc.w  $0108    ;8x16 write, fontset 1&lt;br /&gt;
  dc.b  &amp;quot;ABCDE&amp;quot;,$FF&lt;br /&gt;
  dc.w  $0005    ;Next line&lt;br /&gt;
  dc.w  $0001&lt;br /&gt;
  dc.w  $0109    ;8x16 write, fontset 1&lt;br /&gt;
  dc.b  0,1,2,3,4,$FF&lt;br /&gt;
  dc.w  $0005    ;Next 2 lines&lt;br /&gt;
  dc.w  $0002&lt;br /&gt;
  dc.w  $000A    ;Sub list calls&lt;br /&gt;
  dc.l  SUB_MESS&lt;br /&gt;
  dc.w  $000A&lt;br /&gt;
  dc.l  SUB_MESS&lt;br /&gt;
  dc.w  $000A&lt;br /&gt;
  dc.l  SUB_MESS&lt;br /&gt;
  dc.w  $0000&lt;br /&gt;
&lt;br /&gt;
MS1:&lt;br /&gt;
  dc.b &amp;quot;MESSAGE 1&amp;quot;,$FF&lt;br /&gt;
  dc.b &amp;quot;MESSAGE 2&amp;quot;,$FF&lt;br /&gt;
&lt;br /&gt;
SUB_MESS:&lt;br /&gt;
  dc.w  $090C    ;Outputs $0022 9 times&lt;br /&gt;
  dc.w  $0022&lt;br /&gt;
  dc.w  $070D    ;Outputs $0042 7 times with inc&lt;br /&gt;
  dc.w  $0042&lt;br /&gt;
  dc.w  $0005    ;Next line&lt;br /&gt;
  dc.w  $0001&lt;br /&gt;
  dc.w  $000B    ;Return&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Code]]&lt;br /&gt;
[[Category:BIOS calls]]&lt;/div&gt;</summary>
		<author><name>WLivi</name></author>
	</entry>
</feed>