Misc User Apps - Fixed SSME (Subspace Map Editor) (Still needs work). fatrolls - Fri May 16, 2014 9:47 pm Post subject: Fixed SSME (Subspace Map Editor) (Still needs work).
The new DCME map editor is not bad but I still prefer the original SSME.
Seems this forums Attachment feature is broken, So I attached a link instead .
I patched the EXE a little with a Hex-Editor and OllyDebgger.
Now it's able to load illegal tiles (don't think it can save them correctly though).
It also bypasses the 256 (8 bit color) palette restriction, although I haven't figured out how to fix this better now the tileset loads up as a blank black tileset.
If TileId < 216 OR TileId > 220 Then
Load normal tiles
Else
Load Big Tiles
End If
So now the map editor will successfulloy load up maps with invalid/illegal tiles.
Although those tiles will be overflowed back into valid tiles so they will look screwed up.
Have to patch the mask of 190 tiles (0xBE) into (0xFF) and put in tile some default images somehow (no clue here lol).
Anyways now since people started making tileset's not following the subspace standard format of bitmaps being 256 colors only palette.
That error is also easy to patch out which I will do below
First thing is to understand the bitmap file format I used wikipedia
I already made my own Map Editor before and I know bitmaps start with ascii code `BM` first 2 bytes.
So I look for 0x42 `B` and 0x4D `M` In the same area where tiles are loaded.
following that code stepping it as I load a invalid palette bitmap .lvl file I find it calls 0x00404F80
Which contains a bunch of error checking.
Based on wikipedia I need to find this
1Ch 2 18 00 24 bits Number of bits per pixel
Seems I need to look for WORD, And here is it
0040527E |. 66:8379 0E 08 CMP WORD PTR DS:[ECX+E],8
I need to understand what that 8 means. AFAIK 8 means 8 bits so 256 possible combinations (colors).
So how do I make it support all colors without doing too much ugly patching..
I think the lowest possible palette is 1 bit (black/white), judging from photoshop
So all I need to do it replace it with If PaletteBits < 1 Then Error pops out.
Could also of did If PaletteBits < 32 Then Error pops out
But they might make new computer hardware in the future that will support 64 bit/128 bit colors who knows haha.
So Patch is
File Offset: 467E
66 83 79 0E 08 74 17
with
66 83 79 0E 01 7D 17
Okay now the tileset loads up black for illegal tilesets lol what to do now. (Atleast it's a start)
I gave up at this