I've been coding a SNES emulator for a few weeks, and ended with some problems related to the Offset-per-Tile mode. The only doc I found that explains how it works was Anomie registers doc. I made a implementation pretty much like it was show on the pseudocode. The first weird thing I noticed is that anomie says on the doc that the Horizontal Offset from BG3 is supposed to replace the Horizontal Offset of the current BG1/2 background, but this way the name "Trigger" on the Chrono Trigger intro gets stuck at the left side of the screen, because the HOfs value from BG3 table is always zero, but it works perfectly if I use the HOfs of the current background.
My biggest doubt through, is related to the in-game menu on Chrono Trigger. This image shows the issue:
On the left image, I have offset per tile enabled, the icons are on the correct positions, but the texts aren't. With offset per tile disabled, what happens is the exact opposite. The icons get messed up, but the texts are on their correct positions. After some investigation, I figured that the game uses HDMA to change the VScroll registers from BG1 and BG3 mid-frame, and this is what places the texts on their correct positions. But at the same time, this also messes up the icons. When the offset-per-tile mode is enabled, the VScroll register on BG1 is ignored, this way the icons remain on their correct position, but the texts are no longer affected by the reg changes on HDMA, and the text is forced to have this one-tile gap.
So what I would like to ask, is that if anyone knows how CT does this effect. It doesn't seem to do any mode changes mid-scanline, so it is probably something related to the offset-per-tile mode, maybe it someway can use the VScroll register even with it enabled.
My biggest doubt through, is related to the in-game menu on Chrono Trigger. This image shows the issue:
On the left image, I have offset per tile enabled, the icons are on the correct positions, but the texts aren't. With offset per tile disabled, what happens is the exact opposite. The icons get messed up, but the texts are on their correct positions. After some investigation, I figured that the game uses HDMA to change the VScroll registers from BG1 and BG3 mid-frame, and this is what places the texts on their correct positions. But at the same time, this also messes up the icons. When the offset-per-tile mode is enabled, the VScroll register on BG1 is ignored, this way the icons remain on their correct position, but the texts are no longer affected by the reg changes on HDMA, and the text is forced to have this one-tile gap.
So what I would like to ask, is that if anyone knows how CT does this effect. It doesn't seem to do any mode changes mid-scanline, so it is probably something related to the offset-per-tile mode, maybe it someway can use the VScroll register even with it enabled.