Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

Blaze Union/ROM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
No edit summary
No edit summary
Line 59: Line 59:
Text is in SHIFT-JIS.
Text is in SHIFT-JIS.


ASCII, though not used by the developer, gets converted into fullwidth and rendered that way.
ASCII, though not used by the developer, gets converted into fullwidth and rendered that way, except for punctuation which is weird.


Not sure of the pointers just yet.
The 10 values at the top are pointers.


The values at the top seem to be pointers.
Below this header are values like 02 00 HALFWORD which are voice IDs. After this is the string terminated by a null. Some of the strings don't have 02 00 HALFWORD on the front of them which signifies they are unvoiced.


Below this header are values like 02 00 HALFWORD which seem to be voice IDs. After this is the string terminated by a null.
The code section below the pointers is a list of single-byte microcodes and operands. The byte after each opcode specifies the size of the microcode including microcode, size byte and operands. With the following exceptions: 0x52: length 22, 0x53: length 14, 0x74: length 3 plus null-terminated string


Some of the strings don't have 02 00 HALFWORD on the front of them which signifies they are unvoiced.
So far I found the following opcodes have pointers in them: 0x05, 0x07 (sometimes), 0x10, 0x11, 0x13, 0x14, 0x46 (sometimes), 0x52, 0x53, 0xF0


In the code section below the strings, there are pointers (WORD) that point to the 02 00 if present or the start of the text if not present. Pointers go like 07 00 PTR. I didn't see another pattern. There might be other points present.
Opcode 0x0B is for displaying text boxes. HALFWORD at position 8 within this opcode specifies the character ID. Character ID is resolved using a lookup table in the EBOOT.


In the code section EB 0B seems to be the opcode for displaying dialog boxes. 00 01 or possibly just 01 introduces the name part of the opcode. 07 00 introduces the "pointer to text" part of this opcode.
Opcode 0x46 is for displaying text within the boxes.


==File / Data IDs==
==File / Data IDs==
Line 80: Line 80:
0004 offset 0x480D0 is the title screen image.
0004 offset 0x480D0 is the title screen image.


2149 is the first script file.
2149 through 2205 are the script files.
{{Internal Data|game=Blaze Union}}
{{Internal Data|game=Blaze Union}}

Revision as of 10:26, 30 May 2017

Chip tiny.png The following article is a ROM map for Blaze Union.

General

This game uses CRIWARE.

The archive file is Data.cpk. The full path is PSP_GAME\USRDIR\Data\Data.cpk. Data.cpk is packed in MODE=ID and there are 3339 files within the archive. Hereafter, sub-files will be referred to by 4-digit numbers (ex: 0003). Data.cpk is the only archive file within the ROM.

PTX Image File Format

IDSTRING = "PTX@" (hex: 50 54 58 40)

0x4: BYTE. 2 ** BYTE = WIDTH of the texture needed to contain the image

0x5: BYTE. 2 ** BYTE = HEIGHT of the texture needed to contain the image

0x6: HALFWORD. Image width aligned to 0x10. I think this is how long the pixel rows are.

0x8: HALFWORD. Image width.

0xA: HALFWORD. Image height.

0xC: BYTE. 0x4 if 4 bits per pixel. 0x5 if 8 bits per pixel. Other values unknown. Not sure.

0xD...0xE: Unknown. Always hex: 01 03. Not sure.

0xF: BYTE. Number of colors divided by 8. Not sure.

0x10: WORD. Number of colors.

0x14...0x18: Unknown

0x18: WORD. Offset (absolute) to start of color table

0x1C: WORD. Offset (absolute) to start of bitmap

0x20: Color table.

Colors are in ABGR format, I think.

Pixel Format

4 bits per pixel images use a 32x8 tile size. The pixels are stored in little-endian format meaning the first pixel (i.e., further to the left in the image) is stored in the least significant part of each byte.

8 bits per pixel images use a 16x8 tile size

FCT Format

Simple archive file. Example = 0003

IDSTRING = "FCT " (hex: 46 43 54 00)

0x4: WORD. Number of files.

0x8: WORD. Start of TOC.

0x10: Start of TOC. TOC entries have WORD, WORD for offset and file size in that order.

File offsets are aligned to 0x10.

There is archive inside archive at least some of the time.

Script Format

Text is in SHIFT-JIS.

ASCII, though not used by the developer, gets converted into fullwidth and rendered that way, except for punctuation which is weird.

The 10 values at the top are pointers.

Below this header are values like 02 00 HALFWORD which are voice IDs. After this is the string terminated by a null. Some of the strings don't have 02 00 HALFWORD on the front of them which signifies they are unvoiced.

The code section below the pointers is a list of single-byte microcodes and operands. The byte after each opcode specifies the size of the microcode including microcode, size byte and operands. With the following exceptions: 0x52: length 22, 0x53: length 14, 0x74: length 3 plus null-terminated string

So far I found the following opcodes have pointers in them: 0x05, 0x07 (sometimes), 0x10, 0x11, 0x13, 0x14, 0x46 (sometimes), 0x52, 0x53, 0xF0

Opcode 0x0B is for displaying text boxes. HALFWORD at position 8 within this opcode specifies the character ID. Character ID is resolved using a lookup table in the EBOOT.

Opcode 0x46 is for displaying text within the boxes.

File / Data IDs

0003 offset 0x45C50 is the font image.

0003 sub file 16 contains game over and tutorial text.

0004 offset 0x480D0 is the title screen image.

2149 through 2205 are the script files.