+Stephen Posted February 14, 2017 Share Posted February 14, 2017 Guys, I cannot for the life of me figure this out. I have 24 mode lines of ANTIC 2 each with DLI enabled. I have set NMIEN to $C0 to enable them. I know the DLI code is firing. However, I cannot get anything to split the scanline. Whether I try to set colour register or re-position a player, only the last STA command seems to do anything. Any help would be greatly appreciated. ; 02-13-2017 ; PMG Repositioning ; MEMORY MAP ;$2000-$27FF is PMG RAM ;$2800-$28FF is space for display list ;$2900-$2FFF space for various interrupt code ;$3000-$3FFF is screen RAM ; Equates sm_ptr = $58 ; 88, SAVMSC VDSLST = $200 ; Vector for NMI Display List Interrupt SDMCTL = $22F ; ANTIC DMA shadow register COLOR0 = $2C4 ; COLOR1 = $2C5 ; COLOR2 = $2C6 ; COLOR3 = $2C7 ; GPRIOR = $26F DMCTL = $D400 ; ANTIC DMA Control GRACTL = $D01D ; 1 = enable missiles, 2 = enable players COLPF0 = $D016 ; (R) = COLPF1 = $D017 ; (R) = COLPF2 = $D018 ; (R) = COLPF3 = $D019 ; (R) = COLBAK = $D01A ; (R) = PRIOR = $D01B ; (R) = NMIEN = $D40E ; NMI Enable ($C0 = enable DLI) WSYNC = $D40A org $2800 .byte $70,$70,$60 ;8 blank, 8 blank, 6 blank .byte $90 ;1 blank + DLI .byte $C2,$00,$30 ;MODE 2, LMS $3000, DLI :23 .byte $82 ;MODE 2, DLI .byte $41,$00,$28 ;JVB $2800 org $2900 ; Display List Interrupt 1 Code ; Start by pushing registers ; Write to hardware registers ; Write value into $200 for start of next DLI code chunk pha sta WSYNC lda #$02 sta COLPF2 nop nop lda #$06 sta COLPF2 pla rti ; End with an RTI org $3000 :12 .byte " Even Line "," Odd Line " org $4000 ; Start of code block start lda #0 sta SDMCTL ; Turn off DMA mwa #$2800 $230 ; Set Display List Pointer ($230, $231) mwa #$2900 VDSLST ; Set Display List Interrupt Pointer ($200, $201) lda #$C0 sta NMIEN ; Enable Display List Interrupts lda #$22 ; Normal Playfield, no player+missile DMA sta SDMCTL lda #1 sta GPRIOR ; Set Playfield Colours lda #$62 sta COLOR2 ; Dark purple background loop jmp loop run start ; Define run address Reposition.xex Quote Link to comment Share on other sites More sharing options...
Bryan Posted February 14, 2017 Share Posted February 14, 2017 WSYNC releases before the Hblank, so I don't think you've nop'ed enough to get you back into the visible line. Try sticking 10 nops before the first write. Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 14, 2017 Share Posted February 14, 2017 You'd need to be changing COLBAK with that code to see anything. The changes are occurring offscreen. Using Altirra with the horizontal size set to full can help debugging. Of course with Graphics 0 you have the badline problem too, so even if you put enough NOPs to get you into the text window, the DMA steals would delay the changes until offscreen again. Disregarding DMA and Refresh cycles lost, there's a 34 cycle gap between the end of a standard screen and start of the next one. A colour change preloaded and stored immediately after WSYNC will usually take effect about 2 character cells to the right of the screen window. All that aside, it's way easier to do this sort of thing in bitmap modes but even then you need to consider that DList DMA patterns can be different, ie the first LMS and in 8K hires modes the second LMS partway down the screen. 1 Quote Link to comment Share on other sites More sharing options...
+Stephen Posted February 14, 2017 Author Share Posted February 14, 2017 Thanks guys - I messed around a bit last night with an all ANTIC C screen. I was able to change positions of 3 players before running out of time. I don't have anything particular in mind, just wanting to play around with some of the more advanced stuff. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.