Logo

The DDR Research Master Thread - UPDATED 2023-04-15 - Minor Addition - SOME DDR GB1 Memory Addresses

Register Log In Back To Forums

Post #1 · Posted at 2015-05-18 03:34:22am 8.8 years ago

Offline travelsonic
travelsonic Avatar Member
190 Posts
Not Set
Reg. 2006-10-18


Last updated: 2023-02-16 04:34am
This thread is being created as a springboard for discussing how the engine(s) used in DDR game works., as well as game specific information that can be used for hacking the game, and customizing all sorts of things.

IMPORTANT NOTE: I WILL SLOWLY be moving all this information over to a GitHub repository that I have set up, since I can keep these morsels of information better catalogued in separate files/folders, versus one large internet forum post. I will keep this thread up for discussion about DDR research, and hope that it stays up in lieu of the information location change in progress.

ALSO: I occasionally stream DDR research/hacking on my gaming channel, Dank 'n Derpy Gamer (Twitch | YouTube ) - Though I do stream a variety of other things (a variety of games, namely), when I do stream DDR reverse engineering/research/hacking, do check it out, say hi, and watch me do stupid things to these games all in the name of figuring out how they work. Tongue

Please take note:
At no point will I post links to game ISO images, nor will I post links to sites where you can obtain them. All I am posting here is information based on my own research, and research from contributors.



Contribute information you may have if you want - I made this with the intent that anyone else with information can share freely.

UNSORTED INFORMATION
Stepdata Format:
Please take note:
This section is a sort of mashup of information from an old, unsourced stepdata guide on DDR Ultramix stepchart editing that had been linked to on DDRFreak I believe, that I had downloaded in case the site hosting it went down (which it appears to have), edited to be a bit clearer in some areas. This information isn't my own. If you know who wrote that aforementioned guide, please tell me so I can credit appropriately.

Also note I have not yet finished editing this information for clarity, so yes some things may not be 110% accurate, or missing, I'll get to that as soon as I can.



Structure:
SSQ files are a sequence of chunks, each utilizing a variety of data structures to store information about a song's step data, as well as the actual step information for specific step charts. There are at least 3 types of chunks that can be found in a SSQ file, with chunk type 3 (0x03 in hex) being a chunk that contains the step values Each single and doubles chart has their own chunk.

Based on data structure names found in leftover debugging data, and observing other sequences in game file data, I'm tempted to say that the "SSQ" format is really specialized form of a more general sequence format meant to handle many kinds of sequences in the DDR game series. At this point, however, this is speculation; I won't say anything definitive without doing more research first, as a lot is needed before such things are "proven" IMO.

Data Structures:
The following data structures are used for organizing the data within a SSQ file.
struct sq_header
Definition:
struct sq_header{
    unsigned int size;
    unsigned short kind;
    unsigned short division;
};
What Is It:
The sq_header data structure, as the name implies, serve as a basic chunk header. Every
chunk in a SSQ file has one of these headers.
Data Members:
NAME:    SIZE:    WHAT:
size:      4 bytes   The size of the chunk in bytes.
kind:      2 bytes  The type of chunk? More research is needed as to the specifics of how it is used.
division:   2 bytes  Not entirely sure what this data member is for. MORE RESEARCH IS NEEDED.

struct sq_standard
Definition:
struct sq_standard{
    sq_header header;
    unsigned int num;
    signed int body[1];
};
What Is It:
The sq_standard data structure represents an entire SSQ file chunk.
Data Members:
NAME:      SIZE:      WHAT:
header      8 bytes    The SSQ chunk's header.
num        4 bytes    NOT ENTIRE SURE, most likely the number of elements in
                      an array that follows this data member.
body        4 bytes    The main body of data that the chunk is meant to hold - whether it be timing data, step information,
                      or whatnot.
                      A single element array is used to provide support for variable-length data members. Prior to the C99
                      version of the C standard, this "struct hack" was a necessity if you wanted a variable-length data member
                      due to the lack (at the time) of flexible data member support. In later versions of the format, this was
                      probably replaced with a proper flexible data members, but more research is needed to know for sure.

Use of the aforementioned struct hack what allows (allowed?) each SSQ chunk to have the same general layout, but also hold completely different pieces of data in their respective body data members.

The following data structures I've not yet documented - I will do this documentation when able.
struct sq_indicator
Definition:
struct sq_indicator{
    unsigned char class;
    unsigned char icode;
};
sq_footstep_header
Definition:
struct sq_footstep_header{
    struct{
        unsigned int panel:4;
        unsigned int player:4;
    };
    unsigned char seq_kind;
};

Step Values:
Individual values are a single byte in size. The entirety of this section is (BEAT ENTRY COUNT) bytes in size.

Even though these values take up a whole byte, the leading 4 bits are unused.

Any restrictions on creating note values (with regards to having 3 or 4 arrows on a beat) are enforced only when it comes to user made stepdata, and when creating and/or saving stepdata, as hex editing existing stepdata to create 3 and 4 arrow beats has been successful (albeit with some odd results in some cases). This I can understand (a trust for in house created stepcharts), but still baffles me in other ways (like, for instance, why even have these restrictions on stepdata in the first place if edits require a memory card, are played by willing participants, don't bug out the game, and don't remove the ability to play non-edit data?)

Single arrow values are as follows:
1 = Left
2 = Down
4 = Up
8 = Right

To get other combinations, you merely have to add values together. For instance, if you want Left + Right, you add 1 and 8 for a value of 9 (0x09). For Up + Down, you add 2 + 4 for a value of 6 (0x06). For Down + Up + Right, you add 2 + 4 + 8 for a value of 14 (0x0E). Interestingly, while it seems like a value of 15 (0x0F) represents quantization when you hex edit it into edit mode, and in edit mode, if you edit a pre-compiled SSQ file to have a step with this value, it will appear as a quad step.

Freeze arrows appear in these sequences by way of one (or more?) empty bytes (0, or 0x00) following the step that is supposed to be made into a freeze arrow.


PRE-MAX ERA ENGINE - DDR 1st Mix to DDR 5th Mix
(and variations thereof)

Game Engine Notes
struct music_info:
These pieces of data, like in MAX-era games, are found in the game's executable, and are used to display information about a song in the music selection screen, as well as dictate what data is loaded when a song is selected. Unlike in the MAX-era games, however, these will be smaller, with an exception being for mixes that have solo stepcharts. Unlike the MAX-era games, there seem to be more pieces of data that directly control what information is loaded by the game. In 4th Mix PSX, Extra Mix (which uses the 4th Mix engine), and 5th Mix PSX, at least, these entries are 28 bytes.

Edit Mode:
Storing and Displaying Step Data In Memory

In Edit Mode, each beat is represented in a single byte. Within each byte, each nibble (or half byte) represents the arrow data for a player; the first nibble represents the arrow data for the Player 2 side, the second nibble represents the arrow data for the Player 1 side.

Because each beat is a nibble, this restricts what values can be placed to a range of 0 to 15 (0x0 - 0xF).

Nibble Values and Arrow Representations: 4-Panel Data Values
0x00: Blank
0x01: Left
0x02: Right
0x03: Left + Right
0x04: Up
0x05: Left + Up
0x06: Up + Right
0x07: Left + Up + Right
0x08: Down
0x09: Left + Down
0x0A: Down + Right
0x0B: Left + Down + Right
0x0C: Up + Down
0x0D: Left + Up + Down
0x0E: Up + Down + Right
0x0F: Used to mark a region for quantization?

Note that this only applies if doing 4-Panel Single, Couples and Doubles edits. If you are making a Solo / 6-Panel chart, the first nibble is used for combinations involving the diagonal (Up-Left, Up-Right) panels, instead of being used for step data on the Player 2 side.

Byte Values and Arrow Representations: 6-Panel Values - INCOMPLETE (working on it, folks! 256 values to record!
0x00: Blank
0x01: Left
0x02: Right
0x03: Left + Right
0x04: Up
0x05: Left + Up
0x06: Up + Right
0x07: Left + Up + Right
0x08: Down
0x09: Left + Down
0x0A: Down + Right
0x0B: Left + Down + Right
0x0C: Down + Up
0x0D: Left + Down + Up
0x0E: Down + Up + Right
0x0F: Used to mark a region for quantization
0x10: Up-Left
0x11: Left + Up-Left
0x12: Up-Left + Right
0x13: Left + Up-Left + Right
0x14: Up-Left + Up
0x15: Left + Up-Left + Up
0x16: Up-Left + Up + Right
0x17: Left + Up-Left + Up + Right
0x18: Up-Left + Down
0x19: Left + Up-Left + Down
0x1A: Up-Left + Down + Right
0x1B: Left + Up-Left + Down + Right
0x1C: Up-Left + Down + Up
0x1D: Left + Up-Left + Down + Up
0x1E: Up-Left + Down + Up + Right
0x1F: Up-Left - Quantized
0x20: Right (Repeat of value 0x02)
0x21: Left + Right (Repeat of value 0x03)
0x22: Right (Repeat of values 0x02)
0x23: Left + Right (Repeat of value 0x03)
0x24: Up + Right (Repeat of value 0x06)
0x25: Left + Up + Right (Repeat of value 0x07)
0x26: Up + Right (Repeat of value 0x06)
0x27: Left + Up + Right (Repeat of value 0x07)
0x28: Down + Right (Repeat of value 0x0A)
0x29: Left + Down + Right (Repeat of value 0x0B)
0x2A: Down + Right (Repeat of value 0x0A)
0x2B: Left + Down + Right (Repeat of value 0x0B)
0x2C: Down + Up + Right (Repeat of value 0x0E)
0x2D: Left + Down + Up + Right
0x2E: Down + Up + Right (Repeat of value 0x0E)
0x2F: Right - Quantized
0x30: Up-Left + Right (Repeat of value 0x12)
0x31: Left + Up-Left + Right (Repeat of value 0x13)
0x32: Up-Left + Right (Repeat of value 0x12)
0x33: Left + Up-Left + Right (Repeat of value 0x13)
0x34: Up-Left + Up + Right (Repeat of value 0x16)
0x35: Left + Up-Left + Up + Right (Repeat of value 0x17)
0x36: Up-Left + Up + Right (Repeat of value 0x16)
0x37: Left + Up-Left + Up + Right (Repeat of value 0x17)
0x38: Up-Left + Down + Right (Repeat of value 0x1A)
0x39: Left + Up-Left + Down + Right (Repeat of value 0x1B)
0x3A: Up-Left + Down + Right (Repeat of value 0x1A)
0x3B: Left + Up-Left + Down + Right (Repeat of value 0x1B)
0x3C: Up-Left + Down + Up + Right (Repeat of value 0x1E)
0x3D: Left + Up-Left + Down + Up + Right
0x3E: Up-Left + Down + Up + Right (Repeat of value 0x1E)
0x3F: Up-Left + Right - Quantized
0x40: Up-Right
0x41: Left + Up-Right
0x42: Up-Right + Right
0x43: Left + Up-Right + Right
0x44: Up + Up-Left
0x45: Left + Up + Up-Right
0x46: Up + Up-Right + Right
0x47: Left + Up + Up-Right + Right
0x48: Down + Up-Right
0x49: Left + Down + Up-Right
0x4A: Down + Up-Right + Right
0x4B: Left + Down + Up-Right + Right
0x4C: Down + Up + Up-Right
0x4D: Left + Down + Up + Up-Right
0x4E: Down + Up + Up-Right + Right
0x4F: Up-Right - Quantized
0x50: Up-Left + Up-Right
0x51: Left + Up-Left + Up-Right
0x52: Up-Left + Up-Right + Right
0x53: Left + Up-Left + Up-Right + Right
0x54: Up-Left + Up + Up-Right
0x55: Left + Up-Left + Up + Up-Right
0x56: Up-Left + Up + Up-Right + Right
0x57: Left + Up-Left + Up + Up-Right + Right
0x58: Up-Left + Down + Up-Right
0x59: Left + Up-Left + Down + Up-Right
0x5A: Up-Left + Down + Up-Right + Right
0x5B: Left + Up-Left + Down + Up-Right + Right
0x5C: Up-Left + Down + Up + Up-Right
0x5D: Left + Up-Left + Down + Up + Up-Right
0x5E: Up-Left + Down + Up + Up-Right + Right
0x5F: Up-Left + Up-Right - Quantized
0x60: Up-Right + Right (Repeat of value 0x42)
0x61: Left + Up-Right + Right (Repeat of value 0x43)
0x62: Up-Right + Right (Repeat of value 0x42)
0x63: Left + Up-Right + Right (Repeat of value 0x43)
0x64: Up + Up-Right + Right (Repeat of value 0x46)
0x65: Left + Up + Up-Right + Right (Repeat of value 0x47)
0x66: Up + Up-Right + Right (Repeat of value 0x46)
0x67: Left + Up + Up-Right + Right (Repeat of value 0x47)
0x68: Down + Up-Right + Right (Repeat of value 0x4A)
0x69: Left + Down + Up-Right + Right (Repeat of value 0x4B)
0x6A: Down + Up-Right + Right (Repeat of value 0x4A)
0x6B: Left + Down + Up-Right + Right (Repeat of value 0x4B)
0x6C: Down + Up + Up-Right + Right (Repeat of value 0x4E)
0x6D: Left + Down + Up + Up-Right + Right (Repeat of value 0x5E)
0x6E: Down + Up + Up-Right + Right (Repeat of value 0x47)
0x6F: Up-Right + Right - Quantized
0x70: Up-Left + Up-Right + Right (Repeat of value 0x52)
0x71: Left + Up-Left + Up-Right + Right (Repeat of value 0x53)
0x72: Up-Left + Up-Right + Right (Repeat of value 0x52)
0x73: Left + Up-Left + Up-Right + Right (Repeat of value 0x53)
0x74: Up-Left + Up + Up-Right + Right (Repeat of value 0x56)
0x75: Left + Up-Right + Up + Up-Right + Right
0x76: Up-Left + Up + Up-Right + Right (Repeat of value 0x56)
0x77: Left + Up-Left + Up + Up-Right + Right (Repeat of value 0x57)
0x78: Up-Left + Down + Up-Right + Right (Repeat of value 0x5A)
0x79: Left + Up-Left + Down + Up-Right + Right (Repeat of value 0x5B)
0x7A: Up-Left + Down + Up-Right + Right (Repeat of value 0x5A)
0x7B: Left + Up-Left + Down + Up-Right + Right (Repeat of value 0x5B)
0x7C: Up-Left + Down + Up + Up-Right + Right (Repeat of value 0x5E)
0x7D: Left + Up-Left + Down + Up + Up-Right + Right
0x7E: Up-Left + Down + Up + Up-Right + Right (Repeat of value 0x5E)
0x7F: Up-Left + Up-Right + Right - Quantized
0x80: Down (Repeat of value 0x08)
0x81: Left + Down (Repeat of value 0x09)
0x82: Down + Right (Repeat of value 0x0A)
0x83: Left + Down + Right (Repeat of value 0x0B)
0x84: Down + Up (Repeat of value 0x0C)
0x85: Left + Down + Up (Repeat of value 0x0D)
0x86: Down + Up + Right (Repeat of value 0x0E)
0x87: Left + Down + Up + Right (Repeat of value 0x2D)
0x88: Down (Repeat of value 0x08)
0x89: Left + Down (Repeat of value 0x09)
0x8A: Down + Right (Repeat of value 0x0A)
0x8B: Left + Down + Right (Repeat of value 0x0B)
0x8C: Down + Up (Repeat of value 0x0C)
0x8D: Left + Down + Up + Right (Repeat of value 0x2D)
0x8E: Down + Up + Right (Repeat of value 0x0E)
0x8F: Down - Quantized
0x90: Up-Left + Down (Repeat of value 0x18)
0x91: Left + Up-Left + Down (Repeat of value 0x19)
0x92: Up-Left + Down + Right (Repeat of value 0x1A)
0x93: Left + Up-Left + Down + Right (Repeat of value 0x1B)

Also of interest is the fact that while you are still restricted in the number of arrows per beat you can place, the game engine does not seem to carry the same arrow-per-beat restrictions that the MAX era games, and onward, would have, at least when playing the data back in Edit mode.


Game Specific Notes - Playstation Mixes
Dance Dance Revolution Extra Mix:
MEMORY ADDRESSES:
To modify this data, you need to use a cheat device if using a Playstation, or -
if using an emulator - use a tool that allows you to edit memory while the game is running. (NO$PSX is an emulator with good debugging tools, you can also fiddle around with Cheat Engine if you wish)

- Misc. / Unsorted Addresses -
0x800D4520: Screen user is on?

- Genre Selection Screen -
0x800D4528: Current index in array of genre lists
0x800D4544: Specific music genre highlighted?

- Song Selection Screen -
0x800D4540: Something to do with song slot on select
0x800D4541 - 0x800D4549: Indexes for song banners? (4 bytes each)
0x2C238C: Difficulty
Values:
01: Basic
02: Trick
03: Maniac

- In a Game Stage -
0x2C2394: Modifiers
Values:
0x00: Flat
0x04: Little
0x10: All 0ff
0x11: Hidden
0x12: Sudden
0x13: Stealth
0x2C2342: Player Health Gauge, 4 bytes
0x2C2398: Player Perfects , 4 bytes
0x2C239C: Player Greats, 4 bytes
0x2C23A0: Player Goods, 4 bytes
0x2C23A4: Player Boos, 4 bytes
0x2C23A8: Player Misses, 4 bytes
0x2C23B0: Elapsed Step Count
0x2C23B4: Player Current Max Combo
0x2C23B8: Player Letter Grade Value
Values:
00 = D
01 = AA
02, 03 = A
04, 05 = B
06, 07 = C
08-0F = D

Dance Dance Revolution 5th Mix:
struct music_info (INCOMPLETE):
Size: 28 Bytes
Data Members:
Unknown Word | 2 Bytes | The significance of this byte pair is not yet known.
Unknown Word | 2 Bytes | The significance of this byte pair is not yet known.
Unknown Word | 2 Bytes | The significance of this byte pair is not yet known.
Unknown Word | 2 Bytes | The significance of this byte pair is not yet known.
Song BGM Index | 2 Bytes | Index to a music array, determines what background music plays during the song.
Song Preview Index | 2 Bytes | Index to a music array, determines what song preview track plays.
Singles Foot Ratings | 2 Bytes | 1 foot rating per nibble (4 bits) - in order Trick/Mania + Empty/Basic
Doubles Foot Ratings | 2 Bytes | 1 foot rating per nibble (4 bits) - in order Trick/Mania + Empty/Basic
Is a Long Version | 2 Bytes | If this value is set to 1, the song is a long version (and takes up 2 song plays)
Unknown Word | 2 Bytes | The significance of this byte pair is not yet known.
Unknown Word | 2 Bytes | The significance of this byte pair is not yet known.
Unknown Word | 2 Bytes | The significance of this byte pair is not yet known.
Max BPM | 2 Bytes | Maximum displayed BPM.
Min BPM | 2 Bytes | Minimum displayed BPM - if the song has a constant BPM, this entry is 0'd out.

MEMORY ADDRESSES:
To modify this data, you need to use a cheat device if using a Playstation, or -
if using an emulator - use a tool that allows you to edit memory while the game is running. (NO$PSX is an emulator with good debugging tools, you can also fiddle around with Cheat Engine if you wish)

- In a Game Stage -
0xF29A4: Player Perfects, 4 bytes
0xF29A8: Player Greats, 4 Bytes
0xF29AC: Player Goods, 4 Bytes
0xF29B0: Player Boos, 4 Bytes
0xF29B4: Player Misses, 4 Bytes
0xF29BC Player Current Max Combo, 4 Bytes
0xF29C0: Player Current Max Combo repeated, 4 Bytes


Game Specific Notes - Game Boy Color Mixes:
Dance Dance Revolution GB:
MEMORY ADDRESSES:
- In a Game Stage -
Player's Scoring and Stepping Quality:
Stored in Internal RAM Bank 0 (0xC000 - 0xCFFF):
0xC5B9: Player's Perfect Count
0xC5BD: Player's Great Count
0xC5C1: Player's Good Count
0xC5C5: Player's Boo Count
0xC5C9: Player's Miss Count
0xC5CD: Player's Current Combo
0xC5DF: Player's Perfect Step Percentage
0xC5E3: Player's Great Step Percentage
0xC5E7: Player's Good Step Percentage
0xC5EB: Player's Boo Step Percentage
0xC5EF: Player's Miss Step Percentage
0xC5FF: Player's Max Combo

Dance Dance Revolution GB3:
MEMORY ADDRESSES:
To modify this data, you need to use a cheat device if using a Game Boy Color, or -
if using an emulator - use a tool that allows you to edit memory while the game is running. (BCB is an emulator with good debugging tools, you can also fiddle around with Cheat Engine if you wish)

- Music Select Screen -
-FILLER-

- In a Game Stage -
Player's Scoring and Stepping Quality:
Stored in Internal RAM Bank 0 (0xC000 - 0xCFFF):
0xC5CC: Player's Health Gauge Value
0xC5E0: Player's Perfect Count
0xC5E4: Player's Great Count
0xC5E8: Player's Good Count
0xC5EC: Player's Boo Count
0xC5F0: Player's Miss Count
0xC5F4: Player's Current Max Combo
0xC626: Player's Previous Max Combo


MAX-ERA ENGINE - DDRMAX AC to DDR EXTREME 2 PS2
Game Engine Notes - Arcade Mixes:
Misc. Notes:
Stepchart Loads:
After selecting a song, the game handles the loading of a song's SSQ file as follows:

If the song choice changed, or it is the first stage in the player's set (REGARDLESS of if the song choice is unchanged), then the game will fetch, and decompress the appropriate data. If neither conditions are met, the game will not fetch and decompress any SSQ file data.

This means that if you pick a song for your first stage, then play it more than once in a row, the stepdata will reside in memory until your song choice changes. If you are running these mixes in MAME, and/or using Cheat Engine, you can use this fact to manipulate step chart data temporarily.

This also means that from the moment that you complete, or fail, a set, to when the next player begins their first song in their set, the stepdata will remain in memory.

Game Engine Notes - PS2 Mixes:
Misc. Notes:
It seems very likely that the MAX-era PS2 games used code from the arcade mix(es) as a base. On top of the idea that it would bring a reduction in work load in bringing the non-platform-dependant aspects to the PS2 on the part of Konami, there is at least a little actual evidence in DDDRMAX -DanceDanceRevolutin 6thMIX- ELF, namely strings like "INCORRECT SECURITY CASSETTE," which make no sense in a C/S mix, and make perfect sense for an arcade mix that runs on a system (bemani573, in this case) that uses security cassette(s).

Menu Timers:
Like with calculating step time judgment during a song, menu timers are also dealt with in frames.
Time: Seconds, Frames:
15 seconds: 900 frames
30 seconds: 1800 frames
60 seconds: 3600 frames

There are 2 separate values used in handling a timer value - one holding the number of frames remaining, which is decremented every frame, and one containing the number of seconds that the player sees - which is decremented every 60 frames..

Song Wheel Traversal:
When you move up or down the song wheel, you are limited in how many slots you can move per second. This is done by restricting how many frames are used per movement.

There are 2 values used. One for when you tap either the left or right buttons, and one for when you are holding down your left or right buttons.

When tapping the left, or right arrows, the wheel immediately advances to the next slot.
When holding down the left or right arrows, the wheel advances about one slot every 6 frames, or 10 slots per second.

When altering these values, keep in mind that a higher value will cause you to traverse the wheel at a slower pace, whereas making the value(s) lower will make song wheel traversal faster.

struct music_info:
These pieces of data, found in the game's executable, are used to display information about a song in the music selection screen, as well as dictate what data is loaded when a song is selected. Depending on the game, these definitions can be anywhere from 108 bytes long, to 152 bytes long. There are entries for every song in the game, and each song's struct is the same size.

struct music_info definition:

struct music_info{
    char base_name[6];
    char kind;
    char album;
    short dance_num;
    short order;
    unsigned short main_track;
    unsigned short select_track;
    unsigned short bpm_max;
    unsigned short bpm_min;
    unsigned short verm_num;
    unsigned short pcseq_num;
    unsigned long hide;
    int adjust_mc;
    unsigned int difficulty[2];
    unsigned int special;
    unsigned short max_spm[];   // NOTE: These variables are being declared here without a length. In actuality, these arrays are
    unsigned short avg_spm[];   //     of a fixed length. How long these arrays are depends on the game they appear in, and
    unsigned short avg_jpm[];   //      how many possible selectable difficulties are present in said game.
    unsigned short chaos_v[];    //      For example MAX2 JP C/S gives these arrays a length of 8 [4 difficulties * 2 chart styles],
    unsigned short freez_v[];    //        while MAX2 US C/S gives these arrays a length of 10 [5 difficulties * 2 chart styles].
    char* title;
    char* l_name;
};

Breakdown of a music_info Structure
[b]Currently VERY Incomplete

FIELD NAME:  DATA TYPE:        DESCRIPTION:
base_name      char[6]            A 6-element array of chars that holds an abbreviated version of the song's name.
                                In AC mixes, it seems to correlate directly with the name of each folder that holds
                                game data.
kind           char               TODO: Find what this data value is for.

base_name A label, or name that appears to be an abbreviated version of the song's name. - an abbreviation of the full song's name.
Byte 8: album: The CD icon that appears on the upper-right corner of the song banner. Specific values, and which icons they represent, may differ based on each game. I will investigate this further.
Byte 9-10, 11-12: Indexes for loading BG music, static background images, BGM scripts, and stepdata - singles and then doubles?
Bytes 13-14: Index of the BGM to use for the preview.
Bytes 15-16: Possible repeat of the preview BGM index above
Byte 17-18: Minimum song BPM
Byte 19-20: Maximum song BPM
Byte 24: Number of points needed to unlock the song
Bytes 37-40: Single-mode foot difficulty ratings
Byte 37: STANDARD + LIGHT mode foot ratings
Byte 38: ONI + HEAVY mode foot rating
Byte 39 & 40: Empty, possibly unused
Bytes 41-44: Doubles-mode foot difficulty ratings - order following the same convention as the foot rating for single mode.

music_info struct sizes:
Arcade:
Dancing Stage EuroMIX 2: 108 bytes
EXTREME: 128 bytes

Playstation2:
MAX2 JP: 136 bytes
EXTREME JP: 152 bytes

Song Grouping Colors:
The colors for each specific song wheel grouping/category are hardcoded in the game's executable.

Each grouping's color consists of 2 words for the red color value, 2 words for the blue color value, and 2 words for the green color value.

File Data Tables:
Information on how this data is stored was discovered by member root670
In each game that utilizes the MAX-EXTREME engine, there is a table that indexes the data in the game's filedata.bin. Each table element is 8 bytes long, and is comprised of 3 parts:
1. file_position - A 2 byte index
2. address - A 3-byte compressed offset address. To get the actual actual offset address, multiply this 3-byte value by 0x800.
3. size - A 3-byte compressed file size To get the actual actual file size, multiply this 3-byte value by 0x800.

Because the system the game runs on, the R5900, is little endian, when you look at this table data in a hex editor, an index of, say 0x03FF will appear as "FF 03," not "03 FF," same with the offset and size data in the table. Also note that the index, for some reason, skips numbers. I have no idea why this happens.

Choosing Game Data To Load:
There is an array of 2-byte values in memory that is loaded into memory upon entering the song selection screen.
- The number of entries when everything is unlocked is equal to the number of songs in the game + 1 for the Random slot in games that have it, + 1 for the Roulette slot, which is always the last slot in the array. (For example, if a song had 77 songs, and there was no Random slot, there'd be 78 slots; if the song had 77 songs, a Random slot, AND a Roulette slot, there'd be 79 total slots.)
- The numerical values for each index follows the order that song data is stored within filedata.bin.
- There is an additional value containing the number of songwheel slots, as well as a value containing the current index of the array, which changes as you traverse the songwheel.
- When a song is selected, the current array index is used to grab the numerical value from that location in the array. That value is used to select the static background image, the song BGM, the stepdata, and the background movie script for the selected song.

- The array size can be manipulated - made bigger, OR smaller. By making the value bigger, the game will utilize empty slots following the end of the array. You can fill these slots with indexes for songs, even make them all Roulette slots if you so wish. Do note, however, that attempting to Roulette after Rouletting onto a Roulette slot, as well as trying to select a blank slot with no data value for that position in the array, will cause the game to crash.

Loading Step Data:
Currently VERY Incomplete
Located within the filedata.bin file is the game's step data. Prefacing the actual step data, however, there is an array. This array contains the location of the step data - each location being relative to the beginning of the stepdata table. It is worth noting that the step data itself is compressed using Konami's LZ compression algorithm. (Thank you root760 for pointing this out to me some time ago).

This table will have a byte size equal to the number of songs in the game times 4. For example, DDRMAX2: -DanceDanceRevolution 7thMIX- (C/S) has 74 songs, therefore, this table is (74 * 4), or 296 bytes in size. DDR EXTREME (JP, C/S)'s table is approximately 440 bytes, holding offsets for 110 song's worth of indexes. (basically, each value in the array is 32 bits, or 4 bytes, in length).

If you swap the offset stored in a particular index with another, all the stepcharts for that song - Light, Standard, heavy, and/or Oni (and/or Beginner if working with EX onward) - will be replaced with the data at the newly specified offset.

From this, we can glean that each chunk of data contains a number of step charts for a song equal to (song's data chunk size / number of selectable difficulties in the game). For games with just Light/Standard/Heavy choices, that number is 3; For games with Light/Standard/Heavy/Oni choices, that number is 4, and for games with Beginner/Light/Standard/Heavy/Oni choices, that number is 5. Obviously, if a song does not have stepdata for a particular difficulty, that entire chunk will be all 0s, containing literally nothing.

Stepdata Locations:
Arcade (data located in CARD.DAT):
In CARD.DAT, the stepdata can be found. Unlike in the Playstation2 mixes, however, the song's stepdata is stored along with the songwheel text, banner, and static background (in the order: stepdata, songwheel gfx, banner gfx, static BG image).

Playstation2: (data located in FILEDATA.BIN):
SLPM-62154: DDRMAX -DanceDanceRevolution 6thMIX-: 0x006ED800
SLPM-65277: DDRMAX2 -DanceDanceRevlution 7thMIX-: 0x3051E800
SLPM-65358: Dance Dance Revolution EXTREME: 0x30E17000


Song Background Video Scripts:
Like the game's step data, this data is stored in the game's filedata.bin, with a table of offsets preceding the actual data.

This array of offsets gives us the location within this data chunk of each individual script, with the first entry being at the end of the array. Each offset entry is 4 bytes, and there are a number of entries equal to the number of songs in the game.

For example, DDRMAX2 JP has 74 songs. Multiplied by 4 bytes, the array of offset entries is 296 bytes long. (0x128 in hex).

Each script file is compressed using Konami's implementation of LZ77 compression.

Script Structure
Currently VERY Incomplete
Chunk Size:
4 bytes in size.
Chunk Type?:
2 bytes in size. Value of 0x05. Could Saxxonpike be at least sort of right with this being a part of game step data, or could the game use a system with chunks that has multipurpose applications?
Entry Count
4 bytes in size.
Entries:
Individual entries are 4 bytes in size. The entirety of this section is (ENTRY COUNT * 4) bytes in size. SPECULATION: BG Change Timings (Not sure if in frames, or if in measure/beats like with stepdata steps).
Change Data?:
Speculation: Could be the actual values with regards to what vid to play, etc.

Dance Point Calculations:
The letter grade you receive after completing a song is based off of how many Dance Points you have earned. The total number of Dance Points you earn is calculated as:
Earned DP = (P*PM)+(G*GM)+(Go*GoM)+(B*BM)+(M*MM)+(O*OM)+(NG*NGM), WHERE:
P = Perfect Count, PM = Perfect Multiplier,
G = Great Count, GM = Great Multiplier,
Go = Good Count, GoM = Good Multiplier,
B = Boo Count, BM = Boo Multiplier,
M = Miss Count, MM = Miss Multiplier,
O = O.K Count, and OM = O.K Multiplier.
NG = N.G Count, and NGM = N.G Multiplier

in games without a "Marvelous" judgment, and

Earned DP = (M*MM)+(P*PM)+(G*GM)+(Go*GoM)+(B*BM)+(M*MM)+(O*OM)+(NG*NGM), WHERE:
M = Marvelous Count, MM = Marvelous Multiplier,
P = Perfect Count, PM = Perfect Multiplier,
G = Great Count, GM = Great Multiplier,
Go = Good Count, GoM = Good Multiplier,
B = Boo Count, BM = Boo Multiplier,
M = Miss Count, MM = Miss Multiplier,
O = O.K Count, and OM = O.K Multiplier.
NG = N.G Count, and NGM = N.G Multiplier

in games WITH a "Marvelous" judgment.

Boos and Misses deduct from your DP total, but do so in an interesting way. Instead of having positive Boo and Miss Multipliers, calculating the total of DP earned from Boo and Miss steps, and subtracting that from the number of DP earned thus far, the Boo and Miss multipliers themselves are negative, and the game subtracts those points by adding a negative value to your total DP.

This keeps the algorithm simple, and clean, by keeping it down to a continuously repeatable process of loading a judgement step count + multiplier, multiplying them together, adding them to your current total number of DP, then going on to the next judgment/multiplier pair (instead of branching to a separate set of instructions used just for handling Boo and Miss judged steps).

Total EARNABLE DP is calculated as:
Total Earnable DP = (TN * TNM) + (TF * TFM), WHERE:
TN = Total Notes, TNM = Total Note Multiplier,
TF = Total Freez*, TFM = Total Freez* Multiplier

Total notes, total freeze steps being pulled from the g_each_w data structure, specifically
from g_each_w->total_notes, and g_each_w->total_freez

* Yes, "freez," instead of "freeze" - I'm just going off of the total_notes and total_freez data members in the
g_each_w data structure that data is pulled from, so far as naming goes, and they truncated that final "e" at
the end of "freeze."

Letter Grade Calculation:
After the game has calculated the number of DP you've earned, and the maximum earnable, DP, the game divides the earned
DP count by the max earnable DP count.

The result of this DIV instruction puts the quotient (earned DP / max DP) in $LO, the remainder (earned DP % max DP) in $HI, $LO and $HI being special registers used to access the results of a division operation.

The game then puts the quotient, stored in $LO, into the register that previously held the maximum earnable DP.

From there, it does a series of comparisons with the quotient against hard coded values, using the results to determine your letter grade.

Is the quotient equal to 100 (0x64)? If it is, the game gives you a AAA. If it is not, then the game branches to the next comparison.

Is the quotient less than 93 (0x5D)? If it is not, the game gives you a AA. If it is, then the game branches to the next comparison.

Is the quotient less than 80 (0x50)? If it is not, the game gives you an A. If it is, then the game branches to the next comparison.

Is the quotient less than 65 (0x41)? If it is not, the game gives you a B. If it is, then the game branches to the next comparison.

Is the quotient less than 45 (0x2D)? If it is not, the game gives you a C. If it is, then the game branches to the next comparison.

If you get a lower percentage than that, and passed the song (as in, you didn't deplete your health gauge), you get a "D." If you depleted your health gauge, irrespective of your DP percentage, you get an "E." In fact, it appears that the game will skip the DP calculation, and grade calculation, if the gauge is depleted

Edit Mode:
Storing and Displaying Step Data In Memory
In Edit mode, the game breaks up step data, storing the freeze data in its own memory region, followed immediately by the non-freeze data.

Each beat is represented in a single byte. Within each byte, each nibble (or half byte) represents the arrow data for a player; the first nibble represents the arrow data for the Player 2 side, the second nibble represents the arrow data for the Player 1 side.

Because each beat is a nibble, this restricts what values can be placed to a range of 0 to 15 (0x0 - 0xF).

Nibble Values and Arrow Representations - Non-Freeze Data
0x00: = Blank
0x01: = Left
0x02: = Right
0x03: = Left + Right
0x04: = Up
0x05: = Left + Up
0x06: = Up + Right
0x07: = Left + Up + Right
0x08: = Down
0x09: = Left + Down
0x0A: = Down + Right
0x0B: = Left + Down + Right
0x0C: = Up + Down
0x0D: = Left + Up + Down
0x0E: = Up + Down + Right
0x0F: = Used to mark a region for quantization (think Burning Heat! (3 Option Mix), and the timing issues it had pre-DDR X, for instance)

For freeze arrow data, the game appears to utilize the same arrow values - only using the presence of matching step data in both the freeze arrow stepdata, and non-freeze arrow stepdata region to denote when to draw freeze arrows (at least in edit mode).

Writing To Stepdata In Editor
You've probably noticed that if you tried to place 3 non-freeze arrows, 3 freeze arrows, or any combination thereof, the game wouldn't allow this, erasing the existing data, and placing the newly desired data there instead.

There are two places where the game checks how many arrows are on a given beat - one for freeze data, and one for non-freeze data. If the number of arrows on a beat is < 2, the game goes ahead and writes the data. If the number of arrows on a beat is equal to 2, the data is erased at that beat, and new data is placed. This obviously does not prohibit placing any combination of 2 freeze and/or non-freeze arrows on the Player 1 side, and then doing the same for the beat data on the Player 2 side, otherwise Couples edits wouldn't be feasible.

It is interesting that this restriction is in place, given that the game has 4 arrow type that involve having 3 arrows on a beat. If you change the instructions that check how many arrows are on a given beat, you can place these arrows, then you can place these in edit mode, though they will not show up correctly.

It does appear that certain combinations of freeze and non-freeze data on the same beat will allow you to have the equivalent of hand notes (Think like Dawn in In the Groove). I am in the process of trying to find out how to change this - as it seems that the restrictions on writing and reading stepdata are largely software driven.

It is also worth noting that the first beat you are allowed to write to is 16 beats (0x10) ahead of the stepdata start.

Game Specific Notes - PS2 Mixes:
DDRMAX2 -Dance Dance Revolution 7th Mix- [NTSC-J, SLPM-65277]:
NOTE: This is a living document, as I learn more, and as I sort all my notes/make them coherent, more info will be added.

GAME EXECUTABLE HACKING NOTES:
The addresses listed here are the logical addresses for if you edit the game's SLPM file as its own file, versus editing the executable by opening the entire ISO image into your hex editor.. IF you choose to edit this by loading the entire ISO into your hex editor, add 0x5FFFFF to each offset to account for how far into the ISO image the executable is.

-Sound Effects, Sounds, and Music-
The game seems to reference a table of values that correlates directly to sound effects, menu BGMs, and announcer sound bytes, as well as the preview music for each song in the game.

In the game, the index is loaded into a register, usually a0, used to store arguments for functions, before being used to load/play the corresponding sound. The MIPS instruction that loads the specific index into the register is "addiu a0, zero, $####," where a0 is the argument register the data is loaded into, and the #### being the index itself. In hexadecimal, this code appears as 2404#### (again, the "####" is the index.)

Locations of Sound Loads:
Game BGM Loads:
0x001782F0 - Style/Difficulty Select
0x00175190 - High Scores
0x00177E80 - Oni Course Select
0x002381C4 - Credits Music

Announcer Sound Loads [INCOMPLETE LISTING]
0x00142FF8 - "Ughhhhh... you couldn't make it!"
0x00143194 - "Can I call you a dancin' master?"
0x001431B4 - "*clapping* I'm so impressed!"
0x001431EC - "Well... all's well that ends well."
0x00143214 - "You're a fantastic dancer! You should dance one more time!'
0x00143244 - "Wow! It's a new record!"
0x0014F0F0 - "Are you ready?"
0x0016BCA4 - "Challenging Mode"
0x0016BFCC - "This mode is difficult!"
0x00175928 - "DDRMAX...2!"
0x00177BC8 - "Are you ready?"
0x001782E8 - "Select a style"
0x00179280 - "Game Over"
0x0017BB50 - "Let's Max!"

Sound Effect Loads:
0x0015556C - Songwheel Turn Sound
0x00175D44 - Konami Sound

-Songwheel Stuff-
This information has yet to be sorted properly, and is very incomplete.

-Dance Point Multipliers-
These addresses hold the multipliers used to calculate how many Dance Points a player has earned in a song.

0026D670 - Multiplier for the Perfect judgment , a value of 2.
0026D674 - Multiplier for the Great judgment , a value of 1.
0026D678 - Multiplier for the Good judgment , a value of 0.
0026D67C - Multiplier for the Boo judgment, a value of -4.
0026D680 - Multiplier for the Miss judgment, a value of -8.
0026D690 - Multiplier for the O.K judgment (Freeze Arrows), a value of 6.

MEMORY ADDRESSES:
To modify this data, you need to use a cheat device if on a Playstation 2 console, or -
if using an emulator - use a tool that allows you to edit memory while the game is running. (the latest version of PCSX2, with debugging tools, or the PCSX2DIS build, are good choices IMO)

- Music Select Screen -
0x005674A8 - The number of song wheel slots. When selecting a course in Oni mode; this is also the number of slots that are available for courses. The increment of this value past the number of songs/courses there are in the game will create blank slots. If you use Roulette, and land on a blank slot, the game will crash from attempting to access data at an invalid address.

0x005674A4 - The current songwheel slot index the player has highlighted.

0x005674B4 - Array of song wheel slot values, each value dictating which song appears in each slot. Each value is 4 bytes long. You can repeat values without any sort of conflict. If you extended the number of song wheel slots at 0x005674A8, and then append the list, the song wheel slots you added will show up without issue. The values that represent each song are, essentially, the indexd/order of the song data definitions, so a value of 0001 would be Long Train Runnin', 0002 would be Maximum Overdrive, 0003 Waka Laka, etc. It is worth noting that a value of 00C7 is the Roulette option, and a value of 00FF marks a "COMING SOON" dummy slot. (TODO: put up a full list of values?)

0x0056F4C4 - The address of the song wheel data definition belonging to the song at the current position
on the wheel.

0x0056F4D8 - The song wheel sort Label
0x01 = Normal sort / no graphic
0x02 = ABC sort
0x03 = BPM sort
0x04 = Best sort

A value of 0x00, or a value greater than 0x04 (0x05, 0x07, etc) results in nothing being shown.


- In a Game Stage -
Stepdata:
0x00D06000 - Begining of memory region containing the game's stepdata.

Where each individual SSQ file chunk (whether BPM info, actual step data for each chart, etc) falls within this region does depend on the song, as different songs will have different lengths for their respective chunk data.

Player's Scoring and Stepping Quality:
- General Note -: For some reason, these values are signed - as in, they can be either a positive, or a negative
value. Note that setting these values to negative will cause your score display to wildly
spin out of control, or become a garbled mess. Fortunately, this will not crash your game,
it just looks hilarious.

0x0056F508 - Player 1's displayed score. Editing this fails, as it is automatically replaced with the score
value stored at 0x0056F510 (see below).

0x0056F510 - Player 1's actual score. Completely editable, value range -2,147,483,648 <= X <= 2,147,483,647.
Note that the display you see in game is only 9 digits wide, so if you exceed 999,999,999, the score
counter will not show that 10th digit. Also note that if you enter a negative value, or enter a
value so great that the score becomes negative due to arithmetic overflow, the score counter will
become a garbled mess.

0x0056F5AC - Player 1's Perfect count.
0x0056F5B0 - Player 1's Great count.
0x0056F5B4 - Player 1's Good count.
0x0056F5B8 - Player 1's Boo count.
0x0056F5BC - Player 1's Miss count.
0x0056F5C4 - Player 1's Miss count repeated.
0x0056F5C8 - Player 1's O.K count.
0x0056F608 - Player 1's score on the score screen
0x0056F60C - Player 1's Max Combo

0x005C3844 - Player 2's Perfect count.
0x005C3848 - Player 2's Great count.
0x005C384C - Player 2's Good count.
0x005C3850 - Player 2's Boo count.
0x005C3854 - Player 2's Miss count.
0x005C3860 - Player 2's O.K count.
0x005C38A0 - Player 2's score on the score screen
0x005C38A4 - Player 2's Max Combo

Note editing the data here on the score screen itself will not make permanent changes to your score, whereas
editing it while playing a song will result in a permanently recorded score.


Player Health:
0x0056F500 - Player 1's health gauge value. Still figuring out more specifics about how the values entered
affect it, and how the game engine works with the changes.

Unsorted Stuff:
0x0061A9C0 - Not entirely sure, it appears to always have a value of (song_bpm - 1) though.
0x0056F568 - Mode and Difficulty Settings. There are 2 halfwords, both of which store 2 different pieces of data.
Halfword 1: Play Style:
TODO: Research this halfword, values + what they do
Halfword 2: Difficulty:
0x00 = Nothing
0x01 = Light
0x02 = Standard
0x03 = Heavy
0x04 = No difficulty label above the player score. Odd
pattern of quad arrows replacing normal step info.
0x05 = No difficulty label above the player score. Target
arrow


Dance Dance Revolution EXTREME [NTSC-J, SLPM-65358]:
---content coming soon---


Inserting Custom Audio:
Contrary to what I previously thought, this is not all that tricky - it just takes a few steps.

What You Need:
- The song you wish to put in the game
- Audacity
- ps2adpcm
- Your image of your PS2 DDR game of choice
- A hex editor

First Step: Preparing your BGM for conversion to ADPCM.

Load the track into Audacity. Ensure that the format is 16-bit PCM, and that the frequency is set to 44,100Hz (44.1kHz).

Export the audio to wav.

Next, go into your command prompt, and navigate to wherever you may have ps2adpcm.

Program usage, straight from the program itself:
ps2adpcm<PCM Input> <ADPCM Output> -s(tereo) -c[chunksize] -l[loopstart]
example: ps2adpcm - output.adpcm -s -c1024 -s1000

I find that a chunk size of 512 is exactly what you need - anything else, and you will have a mess skipping around. Also, make sure that your frequency matches that f the audio you exported from Audacity.

For example, say you have Remember December in a file called RememberDecember.wav.

You could try "ps2adpcm RememberDecember.wav RememberDecember.adpcm -s -c512 -c44100"

Assuming you get no errors from following this, you will have ADPCM data that is now ready for insertion into the PS2 DDR mix of your choice.

--It's 2 AM, gotta be up early, so I'll finish this at some point tomorrow.-

Post #2 · Posted at 2015-05-18 09:19:28pm 8.8 years ago

Offline AxelWasHere
AxelWasHere Avatar Member
1,580 Posts
United States
Reg. 2012-07-13

"No."
If you can keep this up.. we can have DDRMax2 finally, just like ITG PS2.
Custom music.
https://i.imgur.com/vnrpBDk.gif

Post #3 · Posted at 2015-05-18 09:29:29pm 8.8 years ago

Offline travelsonic
travelsonic Avatar Member
190 Posts
Not Set
Reg. 2006-10-18


Last updated: 2015-05-18 09:37pm
I hope this research will eventually let us customize any of the PS2 mixes that ran on what I dub the "MAX-EXTREME Engine," not *just* MAX2JP. Big Grin


I tried putting in custom music / overwriting existing music at the proper offset, music I converted to PS2 compatible ADPCM using the tool PS2ADPCM, and have gotten the music to sorta play, just extremely choppy... ugh...

Post #4 · Posted at 2015-05-19 05:02:13am 8.8 years ago

Offline bmhedgehog
bmhedgehog Avatar Banned+
3,136 Posts
Not Set
Reg. 2008-07-13

"BANNED"
I have an interesting question. Do you think I should pick up an extra copy/ies of the games in order to rip them? I'm more so thinking of adding songs to the existing list as opposed to going with customizing.

Post #5 · Posted at 2015-05-19 11:32:00am 8.8 years ago

Offline KittyBox
KittyBox Avatar Member
207 Posts
United States
Reg. 2014-05-01

Are you able to describe how you looked through the games data at all? I might be interested in trying to see what I could find in US MAX2 if its not too complicated.

Post #6 · Posted at 2015-05-19 11:53:37am 8.8 years ago

Offline AxelWasHere
AxelWasHere Avatar Member
1,580 Posts
United States
Reg. 2012-07-13

"No."
Quote: KittyBox
Are you able to describe how you looked through the games data at all? I might be interested in trying to see what I could find in US MAX2 if its not too complicated.

It might only work for JP Max2
https://i.imgur.com/vnrpBDk.gif

Post #7 · Posted at 2015-05-19 01:47:09pm 8.8 years ago

Offline travelsonic
travelsonic Avatar Member
190 Posts
Not Set
Reg. 2006-10-18


Last updated: 2015-05-19 01:47pm
Quote: AxelWasHere
Quote: KittyBox
Are you able to describe how you looked through the games data at all? I might be interested in trying to see what I could find in US MAX2 if its not too complicated.

It might only work for JP Max2

For my exploits, adventures, I merely used a build of PCSX2 called PCSX2dis, which has debugging capabilities, the ability to look at the memory as the game is running and manipulate it, etc. I also did some digging through the old AIJ forums (as well as the current AIJ forums) for information that can give me a starting point. A word of caution though, the stability of PCSX2dis is a bit wonky, I run the DDR games at full speed without issue, but for some reason, causing the game to crash causes the emulator to blow up. ~_~

Something else that I find helpful: When running PCSX2, or PCSX2DIS, when the logs show a pagesplit at a particular address, try copying that address, going to it, and fiddling around with things. Big Grin Not very scientific, but it is fun, and can be helpful IMO.

When it comes to the functionality shared by each game, from what I've seen so far, the code is exactly the same so far as what is done to the data loaded into the registers, which registers data is loaded into, etc - the only real differences being the memory addresses utilized, the addresses in the game ELF where the functions reside, and of course any changes needed to accommodate additions to the game (like, for example, going from supporting the 3 difficulties of Lgt/Std/Hvy, to supporting 5 difficulties (Beg/Lgt/Std/Oni) for step charts).

Hmm, did you know that information from game compilation (including strings that contained former variable names) take up a sizable percentage of the game's executable? In Extreme JP, that data takes up 883 1/2 kilobytes, or about 33.85% , of the ELF! XD

I hope to dig through that to see if the information on where those symbols were used is still in tact, as it is possible that the data is there, and there is a LOT of data to sift through. IF that data is preserved, then it will make a disassembly of the game easier to make... and even if it isn't there, there are strings with the name of each source code file/directory, allowing me to at least recreate the folder structure that the source code used to use.




Also, as hex editors go, I am really liking HxD Hex Editor (over what I used before, FRHed).

Post #8 · Posted at 2015-05-19 03:16:47pm 8.8 years ago

Offline bmhedgehog
bmhedgehog Avatar Banned+
3,136 Posts
Not Set
Reg. 2008-07-13

"BANNED"
Quote: AxelWasHere
Quote: KittyBox
Are you able to describe how you looked through the games data at all? I might be interested in trying to see what I could find in US MAX2 if its not too complicated.

It might only work for JP Max2

This should answer KittyBox's question

@ travelsonic
Quote: me from earlier in this thread
I have an interesting question. Do you think I should pick up an extra copy/ies of the games in order to rip them? I'm more so thinking of adding songs to the existing list as opposed to going with customizing.

Post #9 · Posted at 2015-05-19 04:47:53pm 8.8 years ago

Offline travelsonic
travelsonic Avatar Member
190 Posts
Not Set
Reg. 2006-10-18

I'm running on 3 hours of sleep + (only 3 hours of sleep from yesterday), for a grand total of 6 hours sleep over the last 2 days, so pardon me if I am a bit ... derpy ... in understanding things being relayed to me at this time.

What exactly do you mean by picking up extra copies - buying more? I'd say, assuming my sleep deprivation didn't lead to a horrific derp moment, that'd be overkill.

Post #10 · Posted at 2015-05-19 05:04:51pm 8.8 years ago

Offline bmhedgehog
bmhedgehog Avatar Banned+
3,136 Posts
Not Set
Reg. 2008-07-13

"BANNED"
well at the very least buy one extra copy of each DDR title, yeah I should have been more specific. For example I have two copies of Mario Mix (one used to belong to my sister), one to play on the GC/Wii and the other to rip the graphics and stuff off of.

Post #11 · Posted at 2015-05-19 05:07:42pm 8.8 years ago

Offline AxelWasHere
AxelWasHere Avatar Member
1,580 Posts
United States
Reg. 2012-07-13

"No."
Quote: travelsonic


When it comes to the functionality shared by each game, from what I've seen so far, the code is exactly the same so far as what is done to the data loaded into the registers, which registers data is loaded into, etc - the only real differences being the memory addresses utilized, the addresses in the game ELF where the functions reside, and of course any changes needed to accommodate additions to the game (like, for example, going from supporting the 3 difficulties of Lgt/Std/Hvy, to supporting 5 difficulties (Beg/Lgt/Std/Oni) for step charts).

Is that why if you pop in DDR SuperNova2 while playing DDRMAX2 the sound files play from Supernova2?
.. or something like that.
https://i.imgur.com/vnrpBDk.gif

Post #12 · Posted at 2015-05-20 02:43:05am 8.8 years ago

Offline travelsonic
travelsonic Avatar Member
190 Posts
Not Set
Reg. 2006-10-18

Hmmm, I admit, not entirely sure about that phenomenon...

Post #13 · Posted at 2015-05-20 09:22:58pm 8.8 years ago

Offline KittyBox
KittyBox Avatar Member
207 Posts
United States
Reg. 2014-05-01

Quote: travelsonic
Quote: AxelWasHere
Quote: KittyBox
Are you able to describe how you looked through the games data at all? I might be interested in trying to see what I could find in US MAX2 if its not too complicated.

It might only work for JP Max2

For my exploits, adventures, I merely used a build of PCSX2 called PCSX2dis, which has debugging capabilities, the ability to look at the memory as the game is running and manipulate it, etc. I also did some digging through the old AIJ forums (as well as the current AIJ forums) for information that can give me a starting point. A word of caution though, the stability of PCSX2dis is a bit wonky, I run the DDR games at full speed without issue, but for some reason, causing the game to crash causes the emulator to blow up. ~_~
So I've got MAX2 US running in PCSX2dis now, but I'm not 100% sure exactly how to use these tools. How exactly do I manipulate the memory and find where certain things in the code are exactly?

Post #14 · Posted at 2015-05-22 01:12:16pm 8.8 years ago

Offline travelsonic
travelsonic Avatar Member
190 Posts
Not Set
Reg. 2006-10-18


Last updated: 2015-05-22 02:38pm
This is gonna be kinda hard to explain... but one thing I did with PCSX2 was to go into functions (however far) by looking at the addresses dumped into console... then I would have the pcsx2dis emulator analyze the code, if it hadn't already, as sometimes comments are automatically generated that show the value of the register being manipulated at specific instructions are. I often found that a hexadecimal value that has a 6-9 digit value was either something being loaded for use in game, or an actual memory address, or close to a memory address. (as opposed to being game code.

OF course, sometimes I scrolled through the memory far enough and just looked out for values that were changing a lot, as it would clearly be something being used by the game, and not code, a useful memory address.

Given the similarities in the game, I bet the data like present combo, high score during the song, etc will be similarly stored across the games, just at different locations in memory from game-to-game.

Damn it, that reminds me that I forgot to get down the memory address for MAX2 JP that stores the visible current combo that appears on screen. It can hold an enormous number too. XD



Thanks to gamehacking.org member root670, we now know that the PS2 DDR titles have a table i nthe game's ELF, each entry being 8 bits, containing a packed address that corresponds directly to the game's filedata.bin file.

I've made a reader that opens an ELF, and extracts/displays the table data. I hope to release it once I've added support for the Dancing Stage PS2 titles (a bit trickier since the table for DS Fusion, at least, is split up, separated by 130 byte chunks at intervals), and added support for exporting the data in .txt format, .doc format, and as an excel spreadsheet. Right now it supports MAX JP, MAX U.S, MAX2 JP, the MAX2 U.S Demo, MAX2 U.S, Party Collection, EXTREME JP, and EXTREME U.S.

Outdated screenshot: (since I fixed the table so it fits the screen, looks nicer, and doesn't have that idiotic row selection tab on the let that I resized before getting a screenshot.)
http://3.bp.blogspot.com/-mauqVRrYqwU/VVylVtvZSKI/AAAAAAAAAS4/RGTcnZUGYsQ/s1600/DDRFileDataTableViewer%2BScrnshot.png

I also hope, on top of adding those export options, and adding support for the Dancing Stage titles, to also have a choice of viewing the data in decimal or hexadecimal.

Post #15 · Posted at 2015-05-22 05:49:06pm 8.8 years ago

Offline AxelWasHere
AxelWasHere Avatar Member
1,580 Posts
United States
Reg. 2012-07-13

"No."

Last updated: 2015-05-22 06:02pm
I did this with Supernova2 JP and i found something.. Could it be a scrapped song..?

https://i.imgur.com/u3RoNsz.png

Dancing All Alone from 5th mix? Could it be you?!

Even more songs from The list.... Thats alot of songs that aren't even in the game..
Are these place holders..?

https://i.imgur.com/HrqjjnC.png


https://i.imgur.com/mWJm61z.png

Blonde Girl? Is there a way to make these songs show up in the list?
I want to know how to edit song names/edit stuff in it. Any possible way?
https://i.imgur.com/vnrpBDk.gif

Post #16 · Posted at 2015-05-22 06:02:59pm 8.8 years ago

Offline travelsonic
travelsonic Avatar Member
190 Posts
Not Set
Reg. 2006-10-18


Last updated: 2015-05-22 06:03pm
Konami has a master list of songs in the ELF for each game, dunno why the hell they did that - look at the addresses following/proceeding it, if there are more ascii strigns with song names, then that's probably the find, otherwise it could be something else. My money is on it being that master list though. heh.

Post #17 · Posted at 2015-05-22 06:07:22pm 8.8 years ago

Offline AxelWasHere
AxelWasHere Avatar Member
1,580 Posts
United States
Reg. 2012-07-13

"No."

Last updated: 2015-05-22 06:08pm
Quote: travelsonic
Konami has a master list of songs in the ELF for each game, dunno why the hell they did that - look at the addresses following/proceeding it, if there are more ascii strigns with song names, then that's probably the find, otherwise it could be something else. My money is on it being that master list though. heh.

Is there a way to change stuff, like im still new. I went to code for EternuS But i just want to know how to change the titles of songs
And do what you are doing on Max2 But on Supernova2.

(Game crashes if i head to Blonde Girl. Like emulator blows up.)
https://i.imgur.com/vnrpBDk.gif

Post #18 · Posted at 2015-05-22 11:43:44pm 8.8 years ago

Offline n00b_saib0t
n00b_saib0t Avatar Member
2,282 Posts
United States
Reg. 2007-02-05

Nintendo Network ID: n00bsaib0tNintendo Switch Friend Code: SW-7875-2425-72033DS Friend Code: 4871-6557-4900
"F***ing exhausted."
Quote: bmhedgehog
well at the very least buy one extra copy of each DDR title, yeah I should have been more specific. For example I have two copies of Mario Mix (one used to belong to my sister), one to play on the GC/Wii and the other to rip the graphics and stuff off of.

You do know that after you rip the files they are still on the disc, right?
Quote: sharibetsu in The Unwritten Rules of ZIv thread
Any popular thread must have at least one debate between n00b_saib0t and someone else.

Post #19 · Posted at 2015-05-23 12:35:41am 8.8 years ago

Offline AxelWasHere
AxelWasHere Avatar Member
1,580 Posts
United States
Reg. 2012-07-13

"No."
No point of having 2 games. We have the files on the computer as well.
/end that convo for me. Suspicious enough.

With the graphics on the emulator glitching out, i can see like beta stuff as graphic stuff
Like things that say "UNDER CONSTRUCTION" Which is fun to see.
https://i.imgur.com/vnrpBDk.gif

Post #20 · Posted at 2015-05-23 02:15:11pm 8.8 years ago

Offline bmhedgehog
bmhedgehog Avatar Banned+
3,136 Posts
Not Set
Reg. 2008-07-13

"BANNED"
Quote: n00b_saib0t
Quote: bmhedgehog
well at the very least buy one extra copy of each DDR title, yeah I should have been more specific. For example I have two copies of Mario Mix (one used to belong to my sister), one to play on the GC/Wii and the other to rip the graphics and stuff off of.

You do know that after you rip the files they are still on the disc, right?

yeah, but I'm just covering my butt if something goes south with this.
Register Log In Back To Forums

0 User(s) Viewing This Thread (Past 15 Minutes)

©2006-2024 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 3% · Database: 4% · Server Time: 2024-03-28 08:23:08
This page took 0.017 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language