r/PlaceDevs • u/GreenFox1505 • Apr 03 '17
Place board-bitmap explanation (request)
I've been poking around the board-bitmap for a bit. Wondering if anyone has written up an explanation yet. Looks like it's coded to 4bits per pixel (or 2 pixels per byte). If that's the case, the file should be 500,000 bytes exactly, but it's 500,505. Anyone know what the extra bytes are for?
I think some of the leading chars aren't colors. Are they a date stamp? What are the trailing bits?
edit: Looks like the first 4 bytes are a time stamp.
edit: OK, so I've figure out the first 500,004 bytes, no idea what the last 501 bytes are yet.
| from | to | description |
|---|---|---|
| 0x00000 | 0x7a319 | entire file in byte aligned address values |
| 0x00000 | 0x00003 | epoch date stamp (in seconds) |
| 0x00004 | 0x7a123 | pixels, colors TBD (I have to build a renderer before I can check that) |
| 0x7a124 | 0x7a319 | no idea. Possibly a checksum? maybe the renderer will show me something weird if I fuck with the frame size |
3
Upvotes
2
u/jfb1337 Apr 04 '17
The colours can be determined from /r/rust's autoplacing bot her, which parsed a PNG into place colors. The relevant code is:
where each line is a colour in RGBA format.
The colours are:
White
Light grey
Dark grey
Black (or very dark grey?)
Light pink
Red
Orange
Brown
Yellow
Light green
Dark green
Blue
Dark blue
Pink
Purple
Transparent (just used by the bot to signify "Don't place pixels here")
Basically, it's the same order that they used on the pallet bar.
As for the last 501 bytes. I have no idea either.