Round 2 of staring at the computer screen for hours and wanting to put my face through it. but this time, not due to my own retardation.
so i code the discussed space optimizations in mid-February, not touching the file since 2/16. then yesterday, i pick it up again, and add/tweak a few labels so it'll assemble. but it runs like a mess. when a torch extinguishes, it's still illustrated as burning, and random un-lit torches show up in the wall or elsewhere on screen. occasionally, they'd disappear from their original places.
this is another case of "no way my changes are causing this". i stared at it so long that it took me from alert to fatigued, with frustration and rage varying but persisting through many levels of consciousness. a little after waking up today, i finally pin down the issue to MathOnNapkins' disassembly (from which i've copied much of my code on this iteration; why rebuild the wheel?):
LDA $0540, Y : ASL #2 : STA $0540, Y : STA $7EFB40, Xthat should be "ASL / LSR". while the two ASLs did seem a little odd yesterday, it took scanning an original disassembly today to learn the problem. dunno whether it was a manual typo, or if there's some wider malfunction in any program he's using to automate things.
drove me effing nuts! i can't really judge, as i've had incorrectly disassembled or typed instructions in my own documentation sometimes. but these pseudo-instructions (see also: "CLC / ADC $nn" becomes "ADD $nn") annoyed me even before this issue popped up. this is assembly language; don't obscure stuff from the reader.
anyway, this substitutes for torch-light-and-go-out-new-complex1a2.asm (which itself replaced light-torch-new1.asm and torch-go-out-new1.asm):
http://assassin17.brinkster.net/forum-posts/zelda-torches/torch-light-and-go-out-new-complex2a1.asmit seems to run alright. but if you're up for further testing, that'd be appreciated. i hesitated to ask when i knew this is not a final product candidate (as it still needs $0414 and/or room-specific checks). but clearly, this cursed project needs to be checked at every remotely major update.. because when it's not me forgetting how to count bytes, there's trouble like this.
---
EDIT: to refresh (in case you didn't spend the last 6.5 months thinking about this patch): you want to apply a palette handler along with the above .asm file. you preferred palette-putz2d5b.asm , available in the first post's .ZIP file.