• NES games on Apple IIgs

    From D Finnigan@21:1/5 to All on Fri Apr 19 16:42:33 2024
    Last week, Lucas Scharenbroich (Super Mario GTE fame) released silky-gs
    which he calls "an NES runtime for the Apple IIgs that provides a NES PPU
    and APU compatibility layer."

    https://github.com/lscharen/silky-gs


    Here are some of his remarks on development:

    ---

    Fixed a long-standing rendering issue.  Left half of the video is the "jitter", right side is fixed.

    Since practically I can only render graphics on byte boundaries on the IIgs, the NES graphics are effectively snapped to even pixel boundaries.  I
    noticed that there are quite a few cases where the sprites look "jittery" or don't exactly line up with their expected positions.  Turns out there were two bugs.

    First, I had been naively clamping both the scroll position and the sprite horizontal coordinates.  This is not correct when both of the values are odd in their original NES coordinates, e.g. scroll_x = 1 and sprite_x = 49.  In this case the sprite should be placed up at x = 50 (byte 25) to align with
    the background, but was being clamped to x = 48 instead.  This fix corrected the calculation, but the jittering was still present.

    The second bug was more subtle.  In the Super Mario Bros ROM, the sprite
    data is uploaded to the PPU at the start of each frame and then the scr