#quickbms sript
#真・恋姫†夢想 ~乙女対戦★三国志演義~
open FDSE data.adr
set key "0xFF 0xFE 0xFD 0xFC 0x0F 0x1F 0x2F"
get size asize
filexor key
log MEMORY_FILE 0 size
filexor ""
get files long MEMORY_FILE
get bins long MEMORY_FILE
for i = 0 < bins
get name string MEMORY_FILE
putarray 0 i name
next i
for i = 0 < files
get NAME string MEMORY_FILE
get OFFSET long MEMORY_FILE
math OFFSET * 0x800
get SIZE long MEMORY_FILE
get TMP long MEMORY_FILE
getarray FILE 0 TMP
open FDSE FILE 1
filexor key OFFSET 1
log NAME OFFSET SIZE 1
filexor ""
next i
The character sprites are swizzled but the rest of the files are fine. looks like a fairly simple swizzle.
Ok so each tile sheet is actually four 8bit indexed sheets in one, just access a different color channel to get to them.
The palette file contains one complete 256 color palette per row, just take the colors as they are.
The SPR file contains axis data and data on how to put together the sprite tiles.
Header (8 Bytes)
4 bytes - Number of sheets
4 bytes - Number of sprites
Sprite Header (20 Bytes)
2 bytes - Group# (will explain later)
2 bytes - Spr# (will explain later)
2 bytes - Width in tiles
2 bytes - Height in tiles
2 bytes - X Axis
2 bytes - Y Axis
2 bytes - Sprite width (tile width * 32)
2 bytes - Sprite height (tile height * 32)
2 bytes - Number of tiles in this sprite
2 bytes - Palette# (Which row to use in the palette file)
Sprite Data (8 bytes per tile)
2 bytes - Sheet#
1 byte - Tile#
1 byte - Channel# (0-3, the order being ARGB)
2 bytes - Tile position X
2 bytes - Tile position Y