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
241 stars 41 forks source link

paroda: Missing horizontal lines in text #787

Open rp-jt opened 3 months ago

rp-jt commented 3 months ago

Issue created from #741

CREDIT characters are missing lines image

At first, we thought it was related to the objects module, but these characters are not drawn in the same layer as sprites

real-amano commented 1 month ago

While we are looking at Parodius today (thanks for that!): Looking at the screenshot above a bit closer: is it just me or isn't the whole word affected? It is "cred I T" with CRED affected and "I T" is not.

What makes the cred part different from the "I T" part in the code? Normally it should be one string (but those are actually sprites here?), but here it seems like both parts (4 sprites rendered off and two sprites rendered correctly?) were treated differently.

I even notice different spacing with I T having clearly more horizontal spacing compared to "cred".

rp-jt commented 1 week ago

The problem seems to occur due to the cpu not having enough time to finish the instructions during blanking. frame_03810

The missing line happens when, during the first lines of the frame, the contents of this portion of the line are erased and then rewritten while the reading is happening, leading to these positions being empty when read by the scroll

The clock enable given to the cpu is 24 MHz, but effectively is being much less (20MHz). Applying a correction to give 24 MHz doesn't seem to be enough, but it helps on some scenes.

We tried changing cen_ref/cen24 entering main for 1'b1. This seems to make the problem less noticeable. This works when using JTFRAME_SDRAM96. But with the clock at 48MHz, the game does not start up.