Skip to content

3.2 Configuration

Fernando Chorney edited this page Apr 13, 2024 · 14 revisions

StepManiaX Stage Configuration

This is probably one of the main things you would be interested in if you are interacting with the stages with the SDK. This command will let you request the stage config, as well as set it with any changes you have made. This section will explain how to read/write the config as well as go in depth as to what every configuration value means.

Old vs New Config?

Any SMX Stage with a firmware older than version 5 seems to use an old format for configuring the stages. We will look at the differences between these two config versions and how to convert from one to the other later on this page. For now, we will assume we're talking about the new config.

Requesting and sending config data is the same for both old and new configs, with the only difference being the specific command character/value that is sent.

Read Config

Request Packet

To request the config data you will send the "G" command (or "g" command for the old config).

Command: "G" (71, 0x47), or "g" (103, 0x67)
Arguments: None
Packet Count: 1
Packet: [5, 5, 1, 71, 0, ..., 0]

Response Packet

As with many other commands, the response packet's first data byte will be the same command you sent. As you can see below, for some reason it will return the command by itself in a single packet, and then the size of the data in another packet, and then the actual data in the remaining packets. This example uses my own personal stages, so the data you receive will of course reflect your stages settings.

Command: "G" (71, 0x47), or "g" (103, 0x67)
Data: Config
Packet Count: 8
Packet   1: [6, 4,  1,  71, 0, ..., 0] // Returns the Command ("G" or "g")
Packet   2: [6, 0,  1, 250, 0, ..., 0] // The size of the incoming data (This is always 250 from what I can tell)
Packet 3-7: [6, 0, 61, data]           // All the data we care about
Packet   8: [6, 1,  1,  10, 0, ..., 0] // Looks like this sends "\n" for the last byte. This can safely be ignored

Decoding The Data

Once you remove the preamble (command, length), and ignore the new line at the end, you end up with the following 250 bytes.

[
      5,   5,   3,  15,   0,   0,   0, 160,  15, 100,  15,  44,   1, 100,   0, 255, 255,  15,  15,  15,  15,   0,   7, 170, 170,
    170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
      0,  72, 143, 170,   0,   0,  33,  42, 235, 235, 235, 235, 238, 238, 238, 238, 255, 255, 255, 255,   0,   0,  33,  42, 235,
    235, 235, 235, 238, 238, 238, 238, 255, 255, 255, 255,   0,   0,  33,  42, 235, 235, 235, 235, 238, 238, 238, 238, 255, 255,
    255, 255,   0,   0,  33,  42, 235, 235, 235, 235, 238, 238, 238, 238, 255, 255, 255, 255,   0,   0,  33,  42, 235, 235, 235,
    235, 238, 238, 238, 238, 255, 255, 255, 255,   0,   0,  33,  42, 235, 235, 235, 235, 238, 238, 238, 238, 255, 255, 255, 255,
      0,   0,  33,  42, 235, 235, 235, 235, 238, 238, 238, 238, 255, 255, 255, 255,   0,   0,  33,  42, 235, 235, 235, 235, 238,
    238, 238, 238, 255, 255, 255, 255,   0,   0,  33,  42, 235, 235, 235, 235, 238, 238, 238, 238, 255, 255, 255, 255,   0,   0,
      5, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
]
Clone this wiki locally