<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.lumasworkshop.com/w/index.php?action=history&amp;feed=atom&amp;title=BME_%28File_Format%29</id>
	<title>BME (File Format) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.lumasworkshop.com/w/index.php?action=history&amp;feed=atom&amp;title=BME_%28File_Format%29"/>
	<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BME_(File_Format)&amp;action=history"/>
	<updated>2026-06-04T06:18:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BME_(File_Format)&amp;diff=828&amp;oldid=prev</id>
		<title>SY24: Created page</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BME_(File_Format)&amp;diff=828&amp;oldid=prev"/>
		<updated>2025-02-13T11:22:14Z</updated>

		<summary type="html">&lt;p&gt;Created page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
== File Format ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039;inary &amp;#039;&amp;#039;&amp;#039;Me&amp;#039;&amp;#039;&amp;#039;lody files store commands for the audio engine to play chords/melodies. The format is constructed of instructions (OpCodes) similar to [[BMS (File Format)|BMS]] files. &amp;#039;&amp;#039;Super Mario Galaxy&amp;#039;&amp;#039; &amp;amp; &amp;#039;&amp;#039;Super Mario Galaxy 2&amp;#039;&amp;#039; each only have one &amp;#039;&amp;#039;&amp;#039;BME&amp;#039;&amp;#039;&amp;#039; file, stored in &amp;lt;code&amp;gt;AudioRes/Info/JaiMe.arc/bme/defaultme.bme&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
The header is constructed like this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries (0x28 in SMG, 0x29 in SMG2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 + N * 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to BME data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Data ==&lt;br /&gt;
{{WIP}}&lt;br /&gt;
Each instruction (OpCode) stands for its own function in the engine:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! OpCode&lt;br /&gt;
! Function (SMG/SMG2)&lt;br /&gt;
! Usage&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00&lt;br /&gt;
| &lt;br /&gt;
| {OpCode[1]} {Bank[1]}&amp;lt;br /&amp;gt; OpCode: one byte, 00.&amp;lt;br /&amp;gt; Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&lt;br /&gt;
| 00 0A&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; 00: OpCode&amp;lt;br /&amp;gt; 0A: WSYS ID 10&lt;br /&gt;
| Defines the WSYS/IBNK whose sounds are to be used in a Track.&lt;br /&gt;
|-&lt;br /&gt;
| 01&lt;br /&gt;
| &lt;br /&gt;
| {OpCode[1]} {Program[1]}&amp;lt;br /&amp;gt; OpCode: one byte, 01.&amp;lt;br /&amp;gt; Program: one byte with range 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| 01 04&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; 01: OpCode&amp;lt;br /&amp;gt; 04: IBNK LIST entry 4&lt;br /&gt;
| Defines the Keyboard which holds more specific sounds from an IBNK.&lt;br /&gt;
|-&lt;br /&gt;
| 02&lt;br /&gt;
| &lt;br /&gt;
| {OpCode[1]} {Bank[1]} {Program[1]}&amp;lt;br /&amp;gt; OpCode: one byte, 02.&amp;lt;br /&amp;gt; Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&amp;lt;br /&amp;gt; Program: one byte ranging from 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| 02 00 0D&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; 02: OpCode&amp;lt;br /&amp;gt; 00: WSYS ID 0&amp;lt;br /&amp;gt; 0D: IBNK LIST entry 13&lt;br /&gt;
| Defines the Instrument to be used in a Track.&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| &lt;br /&gt;
| {OpCode[1]} {TrackNumber[1]} {Pointer[3]}&amp;lt;br /&amp;gt; OpCode: one byte, 0x10.&amp;lt;br /&amp;gt; TrackNumber: one byte with unknown range.&amp;lt;br /&amp;gt; Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| 10 00 00 01 F5&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; 10: OpCode&amp;lt;br /&amp;gt; 00: Track 0&amp;lt;br /&amp;gt; 00 01 F5: Offset&lt;br /&gt;
| Creates a Track which plays a Melody individually.&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| &lt;br /&gt;
| {OpCode[1]} {Unknown}&amp;lt;br /&amp;gt;OpCode: one byte, 0x20.&amp;lt;br /&amp;gt;Unknown&lt;br /&gt;
| &lt;br /&gt;
| Starts a Track.&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| &lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt; OpCode: one byte, 0x24.&lt;br /&gt;
| &lt;br /&gt;
| Stops execution of a Track.&lt;br /&gt;
|-&lt;br /&gt;
| 40&lt;br /&gt;
| &lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt; OpCode: one byte, 0x40.&amp;lt;br /&amp;gt; Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| 40 00 0B CF&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; 40: OpCode&amp;lt;br /&amp;gt; 00 0B CF: Offset&lt;br /&gt;
| Redirects execution to the defined offset. Execution can return with 71.&lt;br /&gt;
|-&lt;br /&gt;
| 70&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 71&lt;br /&gt;
| &lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt; OpCode: one byte, 0x71.&lt;br /&gt;
| &lt;br /&gt;
| Returns redirected execution (like from 40) to the initial call.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>SY24</name></author>
	</entry>
</feed>