Jump to content
  • entries
    657
  • comments
    2,689
  • views
    897,747

Warlords fix for XRGB-mini


SpiceWare

2,137 views

In this topic about the exciting new RGB mod for the 2600, collinp reported that the XRGB-mini had problems syncing with Warlords.

I took a quick look and noticed that VSYNC was set before the WSYNC, instead of after, which resulted in the sync signal starting late in the scanline.
blogentry-3056-0-91279700-1440257063_thumb.png

I did a quick hack via Stella to swap the order. The hack resulted in the kings getting shifted to the right, but was enough for collinp to confirm that moving the VSYNC after the WSYNC did indeed fix the problem.
blogentry-3056-0-08296800-1440257072_thumb.png

Today I fixed the sync and king positions by modifying the source I documented back in 2006. The source can be used to compile the original ROM or an XRGB-mini compatible build by use of the constant XRGBMINI:

; set to 1 for VSYNC fix for XRGBMINI, set to 0 for original
XRGBMINI    = 1

...

StartOfFrame: 
       LDA    #$82        ; P-----V- P-paddles are dumped to ground, V-vertical Blank is started
       
   if XRGBMINI = 1
       ldx #$50           ; move left 5
       STA    VBLANK  
       STA    WSYNC       ; Wait until end of 1st V-Sync scan Line
       STA    VSYNC       ; Start Vertical Sync
       STX    HMM0
       STX    HMM1
   else
       STA    VBLANK  
       STA    VSYNC       ; Start Vertical Sync
       STA    WSYNC       ; Wait until end of 1st V-Sync scan Line
       LDA    #$20        ; Move Left 2
       STA    HMM0        ; 3 5
       STA    HMM1        ; 3 8
   endif
 


ROM

warlords_xrgbmini.bin

 


Source

warlords.asm

 

 

Defender

defender_vsync.bin

 

defender_vblank.bin

 

 

Source

Defender (1982) (Atari).asm.zip

  • Like 2

5 Comments


Recommended Comments

This is actually cool. Been a fan of Warlords for years and one I love to break out to play against three other friends. Thanks for doing this.

Link to comment


You're welcome @mario64!

 

I don't recall on Defender.  I searched my hard drive and found those files in ~Projects/Atari/Helping Others/ScottWhite/

 

The other directories I have under Helping Others are mostly AtariAge user names, so I checked AtariAge for a Defender related post by user ScottWhite, but that username does not exist. Usernames can be changed on AtariAge, so it's possible Scott's now using a different username.

 

Anyway I've added the source to the blog entry.  It was created by Stella and my changes are:

 

 

; set to 1 for VSYNC fix, set to 0 for original
VSYNCFIX    = 1

VBLANKFIX  = 1

...

;---------------------------------------
 if VSYNCFIX = 1
    lda #$36
    ldy #$00
    ldx #$7f
    sta WSYNC
    sty VSYNC
    sta TIM64T
    sty PF0
;    stx VBLANK
 else
    sta     WSYNC                   ;3   =   3
;---------------------------------------
    lda     #$36                    ;2        
    sta     TIM64T                  ;4        
    ldy     #$00                    ;2        
    sty     PF0                     ;3        
    sty     VSYNC                   ;3        
    ldx     #$7f                    ;2        
    stx     VBLANK                  ;3
 endif

...

 if VBLANKFIX = 1
    lda     #$26                    ;2        
    sta     TIM64T                  ;4
;    sta WSYNC
    sta VBLANK
 else
    lda     #$26                    ;2        
    sta     TIM64T                  ;4
 endif    

 

Link to comment
Guest
Add a comment...

×   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...