The subroutine $E0/0F50 is called to point the RPGe Abilities and Commands. It transforms an index into another one using the table stored at E0/0F70. Indeed, that table takes a number divisible by 5 and multiplies it by 7/5. ------------------------------------------ Piece of code ------------------------------------------ $E0/0F50 98 TYA A:0000 X:662C Y:5800 $E0/0F51 18 CLC A:5800 X:662C Y:5800 <- What? $E0/0F52 E9 00 58 SBC #$5800 A:5800 X:662C Y:5800 $E0/0F55 AA TAX A:FFFF X:662C Y:5800 $E0/0F56 BF 71 0F E0 LDA $E00F71,x A:FFFF X:FFFF Y:5800 <- Error!! A = [E1:0F70] $E0/0F5A 18 CLC A:FF7D X:FFFF Y:5800 <- 'A' points out of the table $E0/0F5B 69 50 11 ADC #$1150 A:FF7D X:FFFF Y:5800 $E0/0F5E AA TAX A:10CD X:FFFF Y:5800 $E0/0F5F A0 40 2B LDY #$2B40 A:10CD X:10CD Y:5800 $E0/0F62 6B RTL A:10CD X:10CD Y:2B40 The subroutine is issued when is called with a Y <= 5800 ------------------------------------------ Explanation ------------------------------------------ The code at $E0/0F50 must get the pointer to the Abilities text table performing the operation: A = (Y - #$5800) * 7/5 X = A + #$1150 The operation " * 7/5" is done using a table stored at E0/0F70. E0/0F70 00 00 00 00 00 07 00 00 00 00 0E 00 00 00 00 15 00 00 00 00 1C 00 00 00 00 23 00 00 00 00 2A 00 00 00 00 31 00 00 00 00 38 00 00 00 00 3F 00 00 [...] The code is wrong here as the SBC operator is just after a CLC (instead of a SEC) and that means there is always a carry in the subtraction. The code fix that carry pointing the 7/5 table as E0/0F71 instead of E0/0F70, but when the Y value is #$5800 the pointed address is not E0/0F70 as expected but E1/F710... The addresses at E1/0F70 are speech text so, when the Ability or Command is the pointer is not taken from the pointers table but from the speech text. Fortunately, in the RPGe version, the bytes of the text table in E1/0F70 points to an empty area of code in the bank E0 so the error is masked. Anyway, a edition done in the Speech table which affects the bytes E1/0F70 and E1/0F71 could bring back this issue. ------------------------------------------ Fix ------------------------------------------ To fix it, two bytes must be overwritten: E0/0F51 18 -> 38 ; CLC -> SEC E0/0F57 71 -> 70 ; LDA $E00F71,x -> LDA $E00F70,x /* 18 -> 38 71 -> 70 */