jotego / jtcores

FPGA cores compatible with multiple arcade game machines and KiCAD schematics of arcade games. Working on MiSTer FPGA/Analogue Pocket
https://patreon.com/jotego
GNU General Public License v3.0
217 stars 38 forks source link

Integer-scaling breaks when Rotate screen is On #726

Open dfilskov opened 1 month ago

dfilskov commented 1 month ago

Integer-scaling works nicely when Rotate screen is Off ...

but when Rotate is On the integer-scaling is applied before the rotation instead of after.

That makes the pixels un-even / not integer-scaled resulting in shimmering and incorrect graphics.

I believe this is the case for most - if not all - cores with rotation.

jotego commented 1 month ago

Is this specific to JT cores or a general MiSTer problem?

dfilskov commented 1 month ago

I'm not sure.

The issue doesn't seem to be there in e.g. the Atari Lynx core but it might be a coincidence (I use a 1920x1920 monitor btw.)

I'm talking only about cores with both screen rotation in their settings - and integer-scaling. Not easy to find.

I'll keep testing to see if I can find a non -JT core with the same issue (but if I find one I won't know if it's a general issue or another coincidence.)

dfilskov commented 1 month ago

An easy way to check if integer-scaling works is to turn on Horz filter (in Video processing) with

LCD_NN_Type0_020 or LCD_NN_Type1_020

The pixel outlines will make a grid/mesh which is clearly even/symmetrical or uneven.

dfilskov commented 1 month ago

E.g. Arkanoid doesn't have integer-scaling. That really shows with the LCD filter.

Screenshot_20240710-215430~2

dfilskov commented 1 month ago

sorgelig writes:

"If i remember right scaling is depend in rotation ... framework receives rotated image, so it scales the image which is already rotated"

But then I don't see how it can not work on JT cores. If the framework integer-scales the rotated signal it should work.

Unless there's a bug in the framework that only happens when a core rotates its video signal before sending it on for integer-scaling. But that doesn't make sense.

dfilskov commented 1 month ago

Not sure if this issue is related but e.g. Bomb Jack and Up'n'Down surprisingly changes sizes when I rotate them on my square resolution (1920x1920) both when scaling is set to Original and Fullscreen.

I'd expect a rotated core video signal to stay the exact same size no matter what the scaling is set to on a square monitor.

There must be something wrong with the scaling somehow. Perhaps it happens when the pixel-size isn't square and the uneven ratio is somehow being applied to the scaling in the wrong direction when the signal is rotated.

dfilskov commented 2 weeks ago

Scandoubler CRT scanlines don't work either.

Please check this video of Dimahoo to see for yourself that scanlines does not appear when you turn on scandoubler:

https://github.com/user-attachments/assets/5a89e83c-8648-4d9c-b32b-be545919a2d8