Language…
13 users online: DanMario24YT, Darolac, DasFueller, Dennsen86, Doopu, Everest, Gamet2004, Mike777, MorrieTheMagpie, RicardoDeMelo, romw314, Rykon-V73, twicepipes - Guests: 257 - Bots: 251
Users: 64,795 (2,375 active)
Latest user: mathew

Patches section: New column on the list: “Modifies LM code? [Yes/No]”

New FeatureWon't Fix

I was thinking it would be cool for the patches section (or other sections based on ASM) to have a new column on the list saying “Modifies LM code?” and each item have an option of “Yes” and “No”. This is because these codes from LM may change when they get updated, causing patches that modifies such LM code to potentially break (often causing the game to crash).

Here is an example on my center scroll patch:
Code
	org read3($009708+1)+$12	;\Above hijack commented out due to LM adding jumps to skip
	autoclean JSL InitScrollPos	;|codes this patch relies on, thus have to edit LM code instead.
	nop #2				;/(not sure why sometimes the above hijacks only executes or this one).

And here is how it modifies the code:
Code
	;009708 jsl $1082a8   [1082a8]
	;
	;1082a8 lda #$20               
	;1082aa sta $5e       [00005e] 
	;1082ac bit $13cd     [0013cd] 
	;1082af stz $13cd     [0013cd] 
	;1082b2 bvc $82b6     [1082b6] 
	;1082b4 stz $76       [000076] 
	;1082b6 bpl $82c7     [1082c7] 
	;1082b8 rep #$21               
	;1082ba lda #$0080             ;\Modify this. [offset +$12 ($1082ba - $1082a8)]
	;1082bd sta $142a     [00142a] ;/
	;1082c0 pla                    ;\Modify stack to jump to $00970f
	;1082c1 adc #$0003             ;|instead of $00970C after RTL, this skips
	;1082c4 pha                    ;/[JSR.w $00A796]
	;1082c5 sep #$20               
	;1082c7 rtl                    


Now this works before LM v3.00, after this, the LM code is now different:
Code
	;009708 jsl $1082a8   [1082a8] 
	;
	;1082a8 lda [$65]     [0685b5] 
	;1082aa and #$1f               
	;1082ac inc                    
	;1082ad sta $5e       [00005e] 
	;1082af bit $13cd     [0013cd] 
	;1082b2 stz $13cd     [0013cd] 
	;1082b5 bvc $82b9     [1082b9] 
	;1082b9 bpl $82ca     [1082ca] 
	;1082bb rep #$21               
	;1082bd lda #$0080             ;\Should modify this [offset +$15 ($1082bd - $1082a8)]
	;1082c0 sta $142a     [00142a] ;/
	;1082c3 pla                    
	;1082c4 adc #$0003             
	;1082c7 pha                    
	;1082ca rtl                    


Using my patch version 3.0, will crash the game. This is because it was intended to edit LDA #$0080 : STA $142A, but that got moved from LMCodeStart+$12 to LMCodeStart+$15.

By having a flag or something to indicate that the patch may break with the newer version of LM, it helps people willing to update the patch find and fix them.
Give thanks to RPG hacker for working on Asar.
Such a field would have limited usefulness, but I can see it save time in certain cases. Considering that some patches require Lunar Magic's hijacks to be present but don't modify them, it might also be a good idea to add another option for this to the same field.

I personally support the suggestion, but I'll ask the ASM moderators before adding it because it will likely require changing the rules to take it into account.

New FeatureWon't Fix