maxim-zhao / psrp

Phantasy Star Retranslation Project
http://www.smspower.org/Translations/PhantasyStar-SMS-EN
65 stars 10 forks source link

(Bug) Strange behavior of ¨ character in credits sequence #81

Closed gensakudan closed 2 years ago

gensakudan commented 2 years ago

The ¨ character, which is used to denote the two dots above umlauted vowels, behaves strangely in the following ways:

Is this an issue with the fact that a unicode character is used or is it something else?

maxim-zhao commented 2 years ago

It's most likely a bug in the implementation. The Unicode should be mapped as a sequence of UTF-8 bytes to a single byte in ROM, leaving no scope for confusion.

maxim-zhao commented 2 years ago

This is a glitch caused by the use of ¨ which is two bytes when encoded as UTF-8; the code is using the byte length instead of the character length, so the decoder gets misaligned and bad things happen. I've fixed it by adding more load on the assembler to compute the final length of each text span at link time.