MiSTer-devel / GBA_MiSTer

GBA for MiSTer
GNU General Public License v2.0
146 stars 44 forks source link

Fire Emblem - Font issues #24

Closed MP2E closed 4 years ago

MP2E commented 4 years ago

Some of the fonts are drawn incorrectly on MiSTer currently. I am using Integer Scale and the filter named "No Interpolation" to make sure no filters are causing this

Screenshot from 2019-12-10 23-11-12 Screenshot from 2019-12-10 23-11-37 Screenshot from 2019-12-10 23-12-01 Screenshot from 2019-12-10 23-12-08

Here's my Game Boy Player via GBIHF and an OSSC for comparison

Screenshot from 2019-12-10 23-15-14 Screenshot from 2019-12-10 23-15-27 Screenshot from 2019-12-10 23-15-33 Screenshot from 2019-12-10 23-15-47

sorgelig commented 4 years ago

Note: integer scaling is only integer for vertical scale. Horizontal scale is always non-integer as it's impossible to accomplish.

RobertPeip commented 4 years ago

i have seen this bug on my hardware, i tried to reproduce and now it's gone...So it's no static drawing effect, more likely some cpu miscalculation under certain conditions...

MP2E commented 4 years ago

I noticed this also happens in Fire Emblem: The Sacred Stones, and there happens to be a decompile of the ROM on Github. I'm not sure if this is helpful, but I found the function that is used to draw glyphs.

https://github.com/FireEmblemUniverse/fireemblem8u/blob/master/src/fontgrp.c#L1015

RobertPeip commented 4 years ago

That's a very good find, but i doubt it will change anything. I debugged into that a while ago on my emulator, which doesn't have this bug, and made changes to see what could be the reason.

I found out, that not writing the last byte(bit 31..24) of the dword access to VRAM leads to equal effect, but for ALL glyphs, not just the buggy ones. So there must be some kind of wrong memory access or cpu miscalculation earlier leading to this effect.

As there are still some CPU bugs pending(see the list of games not running), i guess this will be gone sometime when another CPU bug is fixed.

RobertPeip commented 4 years ago

memory access bug, fixed