summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-09-19 14:40:40 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-09-19 14:40:40 -0400
commit6cee6953bc21cf14cea86b10a6fd0f7c3b6a8346 (patch)
treec3fa8b03af519d4482c5b5fb5f338b45ec8f2f53
parent742f67f6f5715cbf426498ddc58370ca1fb31977 (diff)
Decompress SGB Save graphics, including Joy/Jenny sprites
-rw-r--r--gfx/gfx.mk3
-rw-r--r--gfx/save/save_sgb.pngbin0 -> 1158 bytes
-rw-r--r--gfx/sprites/joy_jenny.pngbin0 -> 332 bytes
-rw-r--r--source/bank_6d.asm5
-rw-r--r--tools/dump_decompress.py6
5 files changed, 11 insertions, 3 deletions
diff --git a/gfx/gfx.mk b/gfx/gfx.mk
index d2f1d78..7bc6404 100644
--- a/gfx/gfx.mk
+++ b/gfx/gfx.mk
@@ -18,3 +18,6 @@ $(dir_build)/%.xor: % | $$(dir $$@) $(XOR_COMPRESS)
$(dir_build)/%.tilemap_attrmap.xor: %.tilemap %.attrmap | $$(dir $$@) $(XOR_COMPRESS)
$(XOR_COMPRESS) $^ $@
+
+$(dir_build)/gfx/save/save_sgb.xor: $(dir_build)/gfx/sprites/joy_jenny.2bpp $(dir_build)/gfx/save/save_sgb.2bpp | $$(dir $$@) $(XOR_COMPRESS)
+ $(XOR_COMPRESS) $^ $@
diff --git a/gfx/save/save_sgb.png b/gfx/save/save_sgb.png
new file mode 100644
index 0000000..7abbd7a
--- /dev/null
+++ b/gfx/save/save_sgb.png
Binary files differ
diff --git a/gfx/sprites/joy_jenny.png b/gfx/sprites/joy_jenny.png
new file mode 100644
index 0000000..0f2fe3b
--- /dev/null
+++ b/gfx/sprites/joy_jenny.png
Binary files differ
diff --git a/source/bank_6d.asm b/source/bank_6d.asm
index 8ca5fd3..4b90ad5 100644
--- a/source/bank_6d.asm
+++ b/source/bank_6d.asm
@@ -2,3 +2,8 @@ SECTION "gfx_album_picture_frames_light", ROMX[$4000], BANK[$6d]
gfx_album_picture_frames_light::
INCBIN "gfx/safari_zone_album/picture_frames_light.2bpp"
.end::
+
+SECTION "compressed_gfx_save_sgb", ROMX[$7000], BANK[$6d]
+compressed_gfx_save_sgb::
+INCBIN "gfx/save/save_sgb.xor"
+.end::
diff --git a/tools/dump_decompress.py b/tools/dump_decompress.py
index 0fcc897..daa79df 100644
--- a/tools/dump_decompress.py
+++ b/tools/dump_decompress.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
-# Usage: ./dump_decompress.py 75:7d35 00b6 >compressed.bin 2>decompressed.bin
+# Usage: ./dump_decompress.py 75:7d35 00b6 >decompressed.bin
from sys import argv, stdout, stderr
@@ -29,5 +29,5 @@ for _1 in range(length):
output.append(v)
i += 1
-stdout.buffer.write(bytes(file[offset:i])) # compressed
-stderr.buffer.write(bytes(output)) # decompressed
+stdout.buffer.write(bytes(output)) # decompressed
+#stderr.buffer.write(bytes(file[offset:i])) # compressed