.riobin - RhythmLunatic/stepmania GitHub Wiki

.riobin

A design for a binary based format.

No, this will not be the amazing new format to leave SSC in the dust, this is just SSC in binary form.

Specifications

Header

1st 4 bytes: RIO (or 52 49 4F 00 in hex)

Next byte: Version

Next byte: Reserved.

Tags/Metadata section

Tags will probably be read and written as normal. There isn't really a good way to put this in binary as far as I know. Force UTF-8.

When #NOTEDATA:; tag is found switch back to binary reading.

Notes section

Metadata/timing block

KEY is 1 byte, VALUE is variable bytes. If value is a string then read until 0x3B otherwise it depends on the tag.

Tags should be aligned to 4 byte blocks so it's easier to parse.

  • STEPSTYPE: 0x01. Value is a string.
  • DIFFICULTY: 0x02. Value is 1 byte, anywhere from 0x0 to 0x5.
  • METER: 0x03. Value is 2 bytes. Signed short, because some people want large numbers like -300 or 300 as meter values.
  • RADARVALUES: 0x04. Value is an 8 byte signed float. (Maybe even more bytes are needed?). This one is tricky because in the future there could be less or more radar values. Therefore values will be separated by a 4 byte block, if the 1st byte of the 4 byte separator block is 00 continue, otherwise stop reading radar values. Default stopping value would be 0x3B of course.
  • DISPLAYBPM: 0x05. I don't know how many bytes this takes but it's ridiculously large. In SM it's treated as a signed float. Since storing that as binary would be a huge waste of space it's better to treat it as a string... Probably.
  • CHARTNAME: 0x06
  • CREDIT: 0x07

Notes block

  • Each note will be a sequence of four bytes since SM-RIO wants a note with three attributes anyways.
  • An empty row is marked with FF, this block is 1 byte instead of numColumns*4.
  • This allows for attributes from 1 to 255 unsigned. Or if more space is needed a bit shift is fine too.
  • There will be no comma since all notes have the same length. (This definitely won't come back and haunt me later)
  • End tag can still be ";" (0x3B) because a end tag would be in place of a note and the likelihood of there being 58 note types is none.