sehugg / dithertron

Retro 8-bit bitmap converter supporting many formats
GNU General Public License v3.0
74 stars 11 forks source link

SNES (and related) support #32

Open robin-raymond opened 12 months ago

robin-raymond commented 12 months ago

Some notes for the future: https://mrclick.zophar.net/TilEd/download/consolegfx.txt https://wiki.superfamicom.org/transparency https://megacatstudios.com/blogs/retro-development/super-nintendo-graphic-guide https://en.wikibooks.org/wiki/Super_NES_Programming/Graphics_tutorial https://megacatstudios.com/blogs/retro-development/snes-development-starting-from-scratch https://en.wikibooks.org/wiki/Super_NES_Programming/pixel_editing_tutorial https://www.youtube.com/watch?v=kwAjG2dj5ZM

Related to https://github.com/sehugg/dithertron/issues/8

robin-raymond commented 11 months ago

https://megacatstudios.com/blogs/retro-development/super-nintendo-graphics-read-in-the-voice-of-brendan https://snes.nesdev.org/wiki/Backgrounds https://wiki.superfamicom.org/backgrounds https://forums.nesdev.org/viewtopic.php?t=13610 [direct color] https://wiki.superfamicom.org/palettes https://megacatstudios.com/blogs/retro-development/metatiles https://georgjz.github.io/snesaa01/ https://megacatstudios.com/ru/blogs/retro-development/creating-nes-graphics https://megacatstudios.com/blogs/retro-development/game-development-lessons-from-retro-platforms https://en.wikibooks.org/wiki/Super_NES_Programming/Super_FX_tutorial https://therealmjp.github.io/posts/adventures-in-retro-development-snes-edition/ https://en.wikibooks.org/wiki/Super_NES_Programming/SNES_memory_map https://en.wikibooks.org/wiki/Super_NES_Programming https://georgjz.github.io/snesaa03/ https://megacatstudios.com/blogs/retro-development/creating-nes-art https://megacatstudios.com/blogs/retro-development/sega-genesis-mega-drive-vdp-graphics-guide-v1-2a-03-14-17 https://www.gamedeveloper.com/design/as-snes-turns-25-devs-discuss-its-7-greatest-graphics-innovations

robin-raymond commented 11 months ago

Note: SNES is LSB (least significant bit) stored. Each bit of the bit plane is stored with the least significant bit in the first bit-plane. The next more significant bit is in the next bit plane (and so on).

https://docs.rs/snes-bitplanes/latest/snes_bitplanes/

Each tile is (normally) 8x8 pixels. The data is stored in bitplanes. Each row of the tile fills 1 byte, with the leftmost pixel being in bit 7.

Thus the highest bit is the left most pixel.

https://sneslab.net/wiki/Graphics_Format

robin-raymond commented 11 months ago

Export of SNES now added in https://github.com/sehugg/dithertron/pull/34

robin-raymond commented 11 months ago

This is now merged so feel free to provide feedback since the binary output is untested. Hopefully it's correct but probably it has some issues (especially given the nature of the bit plane encodings).