aboutsummaryrefslogtreecommitdiff
path: root/ppu/palette.go
diff options
context:
space:
mode:
authorcrecher <crecher@crecher.net>2026-10-12 22:08:09 +0200
committercrecher <crecher@crecher.net>2026-10-12 22:08:09 +0200
commit96ff6d8eda2ba434682909f4ff4ce350d78b2273 (patch)
treefc1982c54420254ef82c588b742d7ecacfbe7d48 /ppu/palette.go
parent84801d18b9885c6d70914c67a76d8ac8e3b2b20d (diff)
downloadgones-96ff6d8eda2ba434682909f4ff4ce350d78b2273.tar.gz
gones-96ff6d8eda2ba434682909f4ff4ce350d78b2273.zip
ppu: add background rendering
cmd/gones: add sdl2 frontend
Diffstat (limited to 'ppu/palette.go')
-rw-r--r--ppu/palette.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/ppu/palette.go b/ppu/palette.go
new file mode 100644
index 0000000..8218c40
--- /dev/null
+++ b/ppu/palette.go
@@ -0,0 +1,9 @@
+package ppu
+
+// one of the palettes people have captured (https://www.nesdev.org/wiki/PPU_palettes)
+var systemPalette = [64]uint32{
+ 0x545454, 0x001E74, 0x081090, 0x300088, 0x440064, 0x5C0030, 0x540400, 0x3C1800, 0x202A00, 0x083A00, 0x004000, 0x003C00, 0x00323C, 0x000000, 0x000000, 0x000000,
+ 0x989698, 0x084CC4, 0x3032EC, 0x5C1EE4, 0x8814B0, 0xA01464, 0x982220, 0x783C00, 0x545A00, 0x287200, 0x087C00, 0x007628, 0x006678, 0x000000, 0x000000, 0x000000,
+ 0xECEEEC, 0x4C9AEC, 0x787CEC, 0xB062EC, 0xE454EC, 0xEC58B4, 0xEC6A64, 0xD48820, 0xA0AA00, 0x74C400, 0x4CD020, 0x38CC6C, 0x38B4CC, 0x3C3C3C, 0x000000, 0x000000,
+ 0xECEEEC, 0xA8CCEC, 0xBCBCEC, 0xD4B2EC, 0xECAEEC, 0xECAED4, 0xECB4B0, 0xE4C490, 0xCCD278, 0xB4DE78, 0xA8E290, 0x98E2B4, 0xA0D6E4, 0xA0A2A0, 0x000000, 0x000000,
+}