Splash animation: Difference between revisions

From WSdev Wiki
Jump to navigationJump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
|-
|-
! Offset !! Length !! Contents
! Offset !! Length !! Contents
|-
| $83 || 1 || WSC-specific configuration. Bit 7 enables custom splash animation.
|-
| $84 || 1 || Name color
|-
|-
| $85 || 1 || Must be $00
| $85 || 1 || Must be $00
Line 81: Line 77:
             1 = 2 bits per pixel
             1 = 2 bits per pixel
</pre>
</pre>
=== Name colors ===
{| class="wikitable"
|-
! Value !! RGB code
|-
| 0 || #000
|-
| 1 || #f00
|-
| 2 || #f70
|-
| 3 || #ff0
|-
| 4 || #7f0
|-
| 5 || #0f0
|-
| 6 || #0f7
|-
| 7 || #0ff
|-
| 8 || #07f
|-
| 9 || #00f
|-
| 10 || #70f
|-
| 11 || #f0f
|-
| 12 || #f07
|}


=== VBlank IRQ handler ===
=== VBlank IRQ handler ===
Line 124: Line 87:
=== Horizontal/Vertical orientation handling ===
=== Horizontal/Vertical orientation handling ===


The splash animation loader will automatically rotate the tile data and tilemap when booting a cartridge whose [[ROM header||header]] declares vertical orientation as its startup orientation.
The splash animation loader will automatically rotate the tile data and tilemap when booting a cartridge whose [[ROM header|header]] declares vertical orientation as its startup orientation.


=== Sound channel data format ===
=== Sound channel data format ===


TODO
TODO

Latest revision as of 12:52, 23 March 2025

The WonderSwan Color upgraded the internal EEPROM from 128 bytes to 2 kilobytes; most of the additional space is utilized to allow for branding consoles in the form of unique, custom splash animations on console startup.

Format

Offset Length Contents
$85 1 Must be $00
$86 1 Size; 0 = ends at <= $3FF, 1 = ends at <= $7FF
$87 1 First frame
$88 1 Last frame
$89 1 Sprite count
$8A 1 Palette flags
$8B 1 Tile count
$8C 2 Palette location - $80
$8E 2 Tile data location - $80
$90 2 Tilemap location - $80
$92 2 Screen offset (Horizontal)
$94 2 Screen offset (Vertical)
$96 1 Tilemap width
$97 1 Tilemap height
$98 2 VBlank IRQ handler offset
$9A 2 VBlank IRQ handler segment, must be $0600
$9C 1 Owner name X (horizontal)
$9D 1 Owner name Y (horizontal)
$9E 1 Owner name X (vertical)
$9F 1 Owner name Y (vertical)
$A0 2 Padding, unused
$A2 2 Sound wavetable location - $80
$A4 2 Sound channel 1 data offset - $80
$A6 2 Sound channel 2 data offset - $80
$A8 2 Sound channel 3 data offset - $80
$AA 2 Sound channel 4 data offset - $80
$AC 10 SwanCrystal TFT LCD configuration
$B6 10 Padding, unused
$C0 ... Arbitrary data - palettes, tilemaps, etc.

Palette flags

7  bit  0
---- ----
b..p pppp
|  +-++++- Palette count (0-16)
+--------- Tile/palette bits per pixel:
             0 = 1 bit per pixel
             1 = 2 bits per pixel

VBlank IRQ handler

A custom splash animation must provide a valid VBlank IRQ handler, with the following rules:

  • The segment must be 0x0600; the offset is provided relative to $80, as with other data offsets.
  • The code must end with a retf opcode, or equivalent.

Horizontal/Vertical orientation handling

The splash animation loader will automatically rotate the tile data and tilemap when booting a cartridge whose header declares vertical orientation as its startup orientation.

Sound channel data format

TODO