Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Fixed SSME (Subspace Map Editor) (Still needs work).

 
Post new topic   Reply to topic Printable version
 View previous topic  Fixed Subbill No more high CPU stress,... Post :: Post SubGame Server Decompiled, Continuum S...  View next topic  
Author Message
fatrolls
Novice


Age:36
Gender:Gender:Male
Joined: Jul 25 2013
Posts: 35
Offline

PostPosted: Fri May 16, 2014 9:47 pm    Post subject: Fixed SSME (Subspace Map Editor) (Still needs work). Reply to topic Reply with quote

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 .

https://www.mediafire.com/?9iz9519knpjrapz

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 anyone wants to fix it be my guest I gave up.

Here is the log of what I did

SSME PATCHES
-------------------------
~NOPS~ Removes the Corrupt Tile limit Messagebox Exception
If TileId < 1 OR TileId > 190
File Offset: 7D6F
81 F9 00 00 00 D8 72 18 81 F9 00 00 00 DC 77 10
with
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90

~LONG PATCH~ Makes the Big Tiles load properly (Station/Asteroids/Wormholes etc...)
Replaces
~ If TileId < 216 OR TileId > 220
with
~ If TileId >= 216 AND TileId <= 220
File Offset: 7D38
81 F9 00 00 00 01 72 2F 81 F9 00 00 00 BE 77 27
with
[81 F9 00 00 00 D8 7D 2F] ~81 F9 00 00 00 DC 7E 27~

Since this don't work good because of OR need a AND here, a little detour needed here.
We got room at the nopped area above at File Offset: 7D6F

Instead If TileId >= 216 is enough for now.
81 F9 00 00 00 01 72 2F 81 F9 00 00 00 BE 77 27
with
[81 F9 00 00 00 01 72 2F] ~90 90 90 90 90 90 90 90~

To finish the job and re-create a kind of AND operator with OR operator.
I'll just if TileId > 220 then load those illegal tiles as normal tiles.
at

File Offset: 7D6F
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
with
~81 F9 00 00 00 DC 7F D1~ [90 90 90 90 90 90 90 90]

So final code is something like this

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.

And I find it using ollydebugger

0040879E . 807D D4 42 CMP BYTE PTR SS:[EBP-2C],42 `B`
004087A4 . 807D D5 4D CMP BYTE PTR SS:[EBP-2B],4D `M`

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 tongue.gif

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
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Misc User Apps All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 175 page(s) served in previous 5 minutes.

phpBB Created this page in 0.395765 seconds : 26 queries executed (94.4%): GZIP compression disabled