Jump to content
IGNORED

Solaris Hack to fix VSYNC


SeaGtGruff

Recommended Posts

I've just hacked Solaris to see if it corrects the screenroll that occurs on some LCD TVs. Using Stella's debug mode, I could see that VSYNC is being turned on at cycle 05, but being turned off (3 lines later) at cycle 17, which is rather late, and presumably this is what's causing the screenroll. I've rearranged a few instructions so VSYNC gets turned off at cycle 04.

 

Note that VSYNC doesn't need to be turned on or off at cycle 03-- such as immediately after strobing WSYNC-- because WSYNC ends when HBLANK begins, and HSYNC doesn't actually begin until shortly after that, so updating VSYNC at cycle 03 is a little bit earlier than necessary (but certainly okay). Updating VSYNC at cycle 05 (such as by doing an immediate load between WSYNC and VSYNC) is perfectly fine. Without doing major surgery on the ROM, the best I could do was rearrange some instructions so VSYNC gets turned off at cycle 04:

 

; This is the "before" code.

LFE01       TAY                    ; A8       ; +2 ; 68

           LDA LFDA8,Y            ; B9 A8 FD ; +4 ; 72
           STA L0094              ; 85 94    ; +3 ; 75

           LDA #$56               ; A9 56    ; +2 ; 01
           STA L00BB              ; 85 BB    ; +3 ; 04
           STA HMCLR              ; 85 2B    ; +3 ; 07

           LDX #$04               ; A2 04    ; +2 ; 09

           LDA L008D              ; A5 8D    ; +3 ; 12
           AND #$B3               ; 29 B3    ; +2 ; 14

           STX $00                ; 86 00    ; +3 ; 17

 

; This is the "after" code.

LFE01       TAY                    ; A8       ; +2 ; 68

           LDA LFDA8,Y            ; B9 A8 FD ; +4 ; 72
           STA L0094              ; 85 94    ; +3 ; 75

           LDX #$04               ; A2 04    ; +2 ; 01
           STX $00                ; 86 00    ; +3 ; 04

           STA HMCLR              ; 85 2B    ; +3 ; 07

           LDA #$56               ; A9 56    ; +2 ; 09
           STA L00BB              ; 85 BB    ; +3 ; 12

           LDA L008D              ; A5 8D    ; +3 ; 15
           AND #$B3               ; 29 B3    ; +2 ; 17

As you can see, I moved LDX #$04 and STX $00 up a few lines. I kept STA HMCLR at cycle 07 just in case there's some reason it needs to be there, although I don't think there is. (By the way, the disassembler I used-- DIS6502-- doesn't let you assign a label to address $00, which is why the code says $00 instead of VSYNC.)

 

I don't know if the people who are having trouble with Solaris on their LCD TVs happen to have a Krokodile Cartridge or the like, but someone should load this hacked ROM into a programmable cart and test it on any LCD TVs that exhibit the screenroll when playing Solaris, to see if this hack has corrected the issue.

 

Michael

Solaris (Hacked for VSYNC).zip

Edited by SeaGtGruff
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...