Underrout / callisto

A build-system for Super Mario World projects with a focus on git-compatibility and flexibility.
14 stars 3 forks source link

Undetected conflict with SA-1 patch #85

Closed spooonsss closed 1 year ago

spooonsss commented 1 year ago

Using: https://github.com/spooonsss/smw-project-template/tree/conflict-undetected

nsmbwssb+SC.asm has:

org $00A2E6
       autoclean JML StatusBarMain

smw-project-template/resources/initial_patch.bps has

; org $00A2E6
;JSL $10B804
; 
org $00A2E7
  db $04                                       ;  .         $00a2e7
  db $b8, $10                                  ;  ..        $00a2e8

from SA1-Pack-140/boost/level_mode.asm:org $00A2E6

After doing a rebuild in Callisto, conflicts.txt contains:

Conflict - 0x2 bytes at SNES: $008E1A (unheadered), PC: 0x00101A (headered):
    Original bytes:
        AD 93 
    Patch (resources\patches\nsmbwssb+SC.asm):
        00 00 
    UberASM:
        5C 03 

Conflict - 0x1 byte at SNES: $008E1C (unheadered), PC: 0x00101C (headered):
    Original bytes:
        14 
    Initial Patch:
        74 
    Patch (resources\patches\nsmbwssb+SC.asm):
        00 
    UberASM:
        CB 

Conflict - 0x2 bytes at SNES: $008E1D (unheadered), PC: 0x00101D (headered):
    Original bytes:
        05 9D 
    Patch (resources\patches\nsmbwssb+SC.asm):
        00 00 
    UberASM:
        11 EA 

Conflict - 0x3 bytes at SNES: $05D8B9 (unheadered), PC: 0x02DAB9 (headered):
    Original bytes:
        A5 0E 0A 
    PIXI:
        20 46 DC 
    UberASM:
        EA EA EA 

The conflict at $00A2E7 should be included in this output.

spooonsss commented 1 year ago

Hmm, it occurs to me that this may be an intentional design decision to not detect things that conflict with only the initial_patch.bps. It's unfortunate that this harmful conflict isn't detected.

Underrout commented 1 year ago

I'm guessing you have "InitialPatch" in your ignored_conflict_symbols, which is why that conflict isn't included.

EDIT: Got ninja'd. Yes, it's intentional. Not ignoring the initial patch conflicts gives me 201 conflicts on your setup, most of which are probably useless, which is why it's ignored by default in my config.

spooonsss commented 1 year ago

Adding SA-1 to the list of patches is an ok workaround.

Conflict - 0x2 bytes at SNES: $00A2E7 (unheadered), PC: 0x0024E7 (headered):
    Original bytes:
        B1 8A 
    Initial Patch:
        04 B8 
    Patch (resources\patches\nsmbwssb+SC.asm):
        DD CF 
    Patch (resources\patches\SA1-Pack-140\sa1.asm):
        04 B8