Code: Select all
DialogItemReceive:
BCS .noMessage ; if doubling the item value overflowed it must be a rando item
CPY #$98 : !BLT + ;if the item is $4C or greater it must be a rando item
.noMessage
LDA.w #$FFFF
BRA .done
+
LDA Ancilla_ReceiveItem_item_messages, Y ; <--- this line specifically
.done
CMP.w #$FFFF
RTL
On Xkas, I'm told that the top 8 bits are just thrown out, and the label is just converted into its 16-bit value - and Asar's emulation of xkas does incorporate this behaviour. However, it seems Asar is at a point where xkas emulation is becoming very unreliable, for example, I was getting more compiler errors - kind of similar to this - by enabling xkas emulation, than by living without it.
So, this problem was mildly vexing to me: is there some obscure behaviour in Asar where I can declare "Only get the lower 16-bits of this label, I know what I'm doing!" or something? I was able to get around this with a small change to Asar's logic, at least, by checking if you're doing some very specific math (see here) but if this isn't actually an issue with Asar, and there is a workaround I'm unaware of, then of course such a change shouldn't go into the trunk, y'know?