Add NFC Payload Layout
@@ -0,0 +1,36 @@
|
|||||||
|
# Creature Cards NFC Payload Layout
|
||||||
|
|
||||||
|
This document summarizes the parts of the `mysteryhack.com:cc1` NFC payload that are currently understood from the sample cards.
|
||||||
|
|
||||||
|
## Visual Map
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart LR
|
||||||
|
A[Bytes 0-1<br/>E9 24<br/>Event encoding<br/>GPN24] --> B[Byte 2<br/>Palette / type selector]
|
||||||
|
B --> C[Bytes 3-4<br/>Card UUID suffix<br/>47 F2 / DA 45]
|
||||||
|
C --> D[Bytes 5-8<br/>Reserved / padding]
|
||||||
|
D --> E[Bytes 9-730<br/>Sprite blob<br/>722 bytes<br/>Packed 38x38 4bpp<br/>Hex range: 0x09-0x2DA]
|
||||||
|
E --> F[Bytes 731-784<br/>Packed card text<br/>72 chars in 6-bit alphabet<br/>Name + 3 traits<br/>Hex range: 0x2DB-0x310]
|
||||||
|
F --> G[Bytes 785-808<br/>Secret field<br/>UTF-8, up to 24 bytes<br/>Hex range: 0x311-0x328]
|
||||||
|
G --> H[Bytes 809-857<br/>Opaque trailer<br/>Remaining metadata still not fully identified<br/>Hex range: 0x329-0x359]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Byte Ranges
|
||||||
|
|
||||||
|
| Offset | Length | Meaning | Notes |
|
||||||
|
| --- | ---: | --- | --- |
|
||||||
|
| `0x00-0x01` | 2 | Event encoding | `E9 24` maps to the event identifier `GPN24`. |
|
||||||
|
| `0x02` | 1 | Palette / card type byte | In the current samples, `0x01` maps to `Default` and `0x03` maps to `CYBER`. The full palette order appears to be one-based: Default, Blueprint, CYBER, Nature, Fossil, Ghost, Daemon, Fairy. |
|
||||||
|
| `0x03-0x04` | 2 | Card UUID suffix | Sample values are `47 F2` for Blue Portal and `DA 45` for GLaDOS. |
|
||||||
|
| `0x05-0x08` | 4 | Reserved / padding | Not yet decoded. |
|
||||||
|
| `0x09-0x2DA` | 722 | Sprite blob | Packed 38x38 image data. This is embedded directly in the payload and matches the sprite PNG metadata. |
|
||||||
|
| `0x2DB-0x310` | 54 | Packed card text | LSB-first 6-bit packing using the alphabet ` ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-`. This decodes to 72 characters total: 24 for `name`, 16 for `trait1`, 16 for `trait2`, 16 for `trait3`. |
|
||||||
|
| `0x311-0x328` | 24 | Secret | UTF-8 text, right-padded with `0x00` when shorter than 24 bytes. |
|
||||||
|
| `0x329-0x359` | 49 | Opaque trailer | Remaining metadata that is still not fully identified. |
|
||||||
|
|
||||||
|
## Known Samples
|
||||||
|
|
||||||
|
| Card | Event bytes | Palette byte | UUID suffix | Quote text |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| Blue Portal | `E9 24` | `01` | `47 F2` | `Speedy thing goes in` |
|
||||||
|
| GLaDOS | `E9 24` | `03` | `DA 45` | `The cake is a lie` |
|
||||||
Reference in New Issue
Block a user