Clownacy / ClownMapEd

Sonic the Hedgehog sprite editor, portable clone of Xenowhirl's SonMapEd.
GNU Affero General Public License v3.0
19 stars 1 forks source link

Incompatible with Sonic's mappings from the old Hivebrain Disassembly #1

Open SameytheHedgehog opened 1 year ago

SameytheHedgehog commented 1 year ago

ClownMapEd can't load this while SonMapEd can:

; ---------------------------------------------------------------------------
; Sprite mappings - Sonic
; ---------------------------------------------------------------------------
        dc.w byte_21293-Map_Sonic
byte_21293: dc.b 4          ; standing
        dc.b $EC, 8, 0, 0, $F0
        dc.b $F4, $D, 0, 3, $F0
        dc.b 4, 8, 0, $B, $F0
        dc.b $C, 8, 0, $E, $F8
        even

SonMapEd seems to completely ignore if Map_Sonic: is missing while ClownMapEd requires it, stating "file could not be assembled" if attempting to load the above.

Clownacy commented 1 year ago

This is also a problem with the Sonic & Knuckles Git disassembly.

According to this, SonMapEd uses a partial 68k assembly parser which only implements the bare minimum needed to load mappings. I imagine that it ignores the label to the right of the '-' character, which explains why the lack of a definition for that label does not result in an error.

ClownMapEd uses a proper assembler, so it does not ignore the missing label.

I do have one idea for solving this issue: manually parse the very start of the file to determine the missing label, and then create a copy of the file with that label inserted at the beginning. ClownMapEd can then load that without error.

Until this is fixed, users will have to manually add the missing labels to their mappings themselves.

Brainulator9 commented 5 months ago

This is also a problem with the Sonic & Knuckles Git disassembly.

I want to note that https://github.com/sonicretro/skdisasm/commit/39723e7089488c38603e4ab208ccfa075f99cc03 corrects this.