Last active
January 13, 2018 13:08
-
-
Save doyousketch2/259435f22ccb3b9f25f8518bb504054e to your computer and use it in GitHub Desktop.
TiledGGD lua script for Sega Saturn files -- put in your /TiledGGD/Plugins/ dir -- https://git.io/vNnvj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Binding type="GRAPHICS"> | |
<Name>Sega Saturn</Name> | |
<FilterSet method="AND"> | |
<Filter type="MAGIC">SEGA</Filter> | |
</FilterSet> | |
<Target type="LUA">Graphics_Saturn.lua</Target> | |
</Binding> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- File format info from ST-124-R1-091394.pdf | |
-- Saturn/32X Graphics References ver. 2.0 | |
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
-- offset, size | |
-- 0x000 0x100 Header | |
-- 0x100 eof Bit map data | |
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
-- 0x00 0x10 Identifier = "SEGA 32BITGRAPH" | |
-- (followed by 0x1A but TiledGGD refuses char) | |
-- 0x10 Long DummyData = 0xFFFF FFFF | |
-- 0x14 Word x Display pos | |
-- 0x16 Word y Display pos | |
-- 0x18 Word width (says word, but TiledGGD refuses) | |
-- 0x1A Word height (reading next byte instead) | |
-- 0x1C Long Empty 0x0000 0000 | |
-- 0x20 0xE0 Empty 0x00 x size | |
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
MagicWord = 'SEGA 32BITGRAPH' | |
Identifier = readString2(0x00, 0x0F) | |
if Identifier == MagicWord then | |
width = read(0x19); | |
height = read(0x1B); | |
bigendian = false; | |
tilesize = {8, 8}; | |
format = 6; | |
order = BGR; | |
setData(0x100); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment