WSR: Difference between revisions

From WSdev Wiki
Jump to navigationJump to search
(Created page with "The WSR file format is used for storing music routines from WonderSwan software, not unlike the NSF format. It was initally defined and implemented by the <tt>in_wsr</tt> Winamp plugin. Its format is based on the ROM header format, with files expected to be a multiple of 64 KiB in size. However, the footer at the end of the file is 32 bytes long, not 16: {| class="wikitable" |+ Header contents |- ! Offset !! Length !! Contents |- | $00 || 4 || Magic string: <tt>WSR...")
 
No edit summary
 
Line 7: Line 7:
|-
|-
! Offset !! Length !! Contents
! Offset !! Length !! Contents
|-
|-Q
| $00 || 4 || Magic string: <tt>WSRF</tt>
| $00 || 4 || Magic string: <tt>WSRF</tt>
|-
|-
Line 20: Line 20:


The <tt>JMP</tt> instruction in the ROM header points to the song playback routine; <tt>AX</tt> is set to the song number.
The <tt>JMP</tt> instruction in the ROM header points to the song playback routine; <tt>AX</tt> is set to the song number.
== References ==
* [https://github.com/WonderfulToolchain/awesome-wsdev/blob/main/archive/in_wsr.txt in_wsr.txt] - the original specification
<references/>

Latest revision as of 18:57, 23 April 2025

The WSR file format is used for storing music routines from WonderSwan software, not unlike the NSF format. It was initally defined and implemented by the in_wsr Winamp plugin.

Its format is based on the ROM header format, with files expected to be a multiple of 64 KiB in size. However, the footer at the end of the file is 32 bytes long, not 16:

Header contents
Offset Length Contents
$00 4 Magic string: WSRF
$04 1 Version number; currently $00
$05 1 Starting song number
$06 10 Reserved
$10 16 ROM header

The JMP instruction in the ROM header points to the song playback routine; AX is set to the song number.

References