Nintendo Badge Arcade/PrizeCollection

From 3dbrew
< Nintendo Badge Arcade
Revision as of 01:16, 18 December 2022 by DaniElectra (talk | contribs) (Add PrizeCollection to Nintendo Badge Arcade)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

A PrizeCollection SARC file has the following folder structure:

root
└── pc
    ├── PrizeCollection.xml
    ├── ci
    └── rt
        ├── At
        ├── CI
        ├── Ca
        ├── Cr
        ├── FO
        └── Pr

Each of the subfolders contains a custom file format storing different properties between those. Each of those files are compressed using Yaz0 compression.

Subfolder File type
ci Crane Instance (cib)
At Attachment (atb)
CI Crane Icon (icb)
Ca Category (cab)
Cr Crane (crb)
FO Fixed Object (fob)
Pr Prize (prb)

PrizeCollection.xml

This file has an index of all of the game data stored here. It has the following data:

<?xml version="1.0" encoding="UTF-8"?>
<CenterPrizeCollectionFile>
  <Categories count="x">
    <Category name="CategoryName" />
  </Categories>
  <Cranes count="x">
    <Crane name="CraneName" />
  </Cranes>
  <CraneIcons count="x">
    <CraneIcon name="CraneIconName" />
  </CraneIcons>
  <Prizes count="x">
    <Prize name="PrizeName" />
  <Attachments count="x">
    <Attachment name="AttachmentName" />
  </Attachments>
  <FixedObjects count="x">
    <FixedObject name="FixedObjectName" />
  </FixedObjects>
  <CraneInstances>
    <CraneInstance name="CraneInstanceName" />
  </CraneInstances>
</CenterPrizeCollectionFile>

Prize (prb)

A prize file stores the badge data and its image.

Offset Size Description
0x0 0x4 Header magic (PRBS)
0x3C 0x4 Badge ID
0x44 ? Badge name
0x74 ? Name of category it belongs
0xA4 0x8 Title ID it opens
0xB8 0x4 Tile width
0xBC 0x4 Tile height

If the tile size is 1x1:

Offset Size Description
0x1100 0x2000 64x64 RGB565 image (used in Home Menu)
0x3100 0x800 64x64 A4 data of previous image
0x3900 0x800 32x32 RGB565 image (used in badge selector in Home Menu)
0x4100 0x200 32x32 A4 data of previous image
0x4300 0x4000 128x128 ETC1A4 image (used ingame)
0x8300 0x4000 128x128 A8 data of previous image

If the tile size is anything other than 1x1:

Offset Size Description
0x1100 0x2000 64x64 RGB565 image of full tile
0x3100 0x800 64x64 A4 data of previous image
0x3900 0x800 32x32 RGB565 image of full tile
0x4100 0x200 32x32 A4 data of previous image
... 0x2000 64x64 RGB565 image of each tile
... 0x800 64x64 A4 data of previous image
... 0x800 32x32 RGB565 image of each tile
... 0x200 32x32 A4 data of previous image
... 0x4000 128x128 ETC1A4 image (used ingame)
... 0x4000 128x128 A8 data of previous image