lgblgblgb / xemu

Emulations (running on Linux/Unix/Windows/macOS, utilizing SDL2) of some - mainly - 8 bit machines, including the Commodore LCD, Commodore 65, and the MEGA65 as well.
https://github.com/lgblgblgb/xemu/wiki
GNU General Public License v2.0
208 stars 32 forks source link

MEGA65: RRB GOTOX positions incorrect in 40 column mode: #265

Closed smnjameson closed 3 years ago

smnjameson commented 3 years ago

vic4tests.zip

The 16 Color 40 column RRB test above should show two green dots moving the full width of the screen. These green dots are using the RRB to draw, as such there is a third GOTOX to terminate the line on the far right of the screen (x=320). Note on XEMU this third dot is visible halfway across the screen and the two moving dots only move half the width also.

XEMU: image

HARDWARE: image

Note changing the line 1147 in https://github.com/lgblgblgb/xemu/blob/merger/targets/mega65/vic4.c

current_pixel = pixel_raster_start + xcounter_start + (char_value & 0x3FF) * (REG_H640 ? 1 : 2);

Partially fixes the GOTOX in 40 column mode but does still draw the terminating RRB layer on top of the border:

image

As such I have not created a pull request, as I'm not sure where to stop this happening.

lgblgblgb commented 3 years ago

I think, you forgot about xcounter to adjust as well. See the commit above (however honestly it's a mess since now it's combined with some other changes. Please note that this branch will not be merged ever, but manually, so many insane commits we don't want to keep in the commit log of the stable release).

lgblgblgb commented 3 years ago

253 seems to be the very same issue, as it turned out. I close that. If we can still have problem covers this or that bug, we should focus on this newer one.