no dziwna sprawa, jak dla mnie, ale pewnie zaraz mnie oswiecicie i powiecie czy tak musi byc, czy nie
na pewno odpowiedz znaja Ci co mieszaja w emulu, bo na emulu i na prawdziwym Atari efekt jest ten sam
a chodzi o zmiane kolorow w rastrze, w trybie znakowym (ANTIC=$04), czyli 5 kolorowym trybie, pixel 2x1
jak dotad testowalem zmiane rastra dla kilku linii, 4-5, ale teraz chcialem to zrobic na calej wysokosci ekranu, i co ? I co 8-ą linie Antic zwalnia, nie starcza czasu na zmiany w rastzre, co najwyzej 4 zmiany poza ramka
a w liniach pozostalych starcza juz czasu i mozna dokonac 6 zmian + 4 zmiany niewidoczne poza ramka
czyli w n/w przykladzie w linii 7, 15, 23, 31 itd nie starcza czasu, a w pozostalych liniach starcza
efekt jest taki, ze w 7 liniach dokonujemy zmian w rastrze (kolorowe pionowe pasy), a w 8 linii juz nie (ciagla szara linia)
opt h+
org $2000
scr48 equ %00111111 ;obraz szeroki *-screen 48b
scr40 equ %00111110 ;obraz normalny *-screen 40b
scr32 equ %00111101 ;obraz waski *-screen 32b
pmBase equ $b000
Player0_PositionX equ $d000
Player1_PositionX equ $d001
Player2_PositionX equ $d002
Player3_PositionX equ $d003
Missile0_PositionX equ $d004
Missile1_PositionX equ $d005
Missile2_PositionX equ $d006
Missile3_PositionX equ $d007
Player0_Size equ $d008
Player1_Size equ $d009
Player2_Size equ $d00a
Player3_Size equ $d00b
Missiles_Size equ $d00c
Player0_Missile0_Color0_PM0 equ $d012
Player1_Missile1_Color1_PM1 equ $d013
Player2_Missile2_Color2_PM2 equ $d014
Player3_Missile3_Color3_PM3 equ $d015
Playfield_Color0_PF0 equ $d016
Playfield_Color1_PF1 equ $d017
Playfield_Color2_PF2 equ $d018
Playfield_Color3_PF3 equ $d019
Background_BAK equ $d01a
PRIOR_GTIACTL equ $d01b
CHARBASE equ $d409
main
;--
;- init PMG
lda >pmBase
sta $d407
lda #3
sta $d01d ;PMCTL - wyswietlac duchy i pociski
lda 20 ;czekamy 1 ramke zanim zrobimy jakies nieszczescie :)
cmp 20
beq *-2
sei ;wylaczenie przerwan
lda #0
sta $d40e
lda #$fe ;wylaczenie ROM-u
sta $d301
LOOP lda $d40b ;synchro do pierwszej zmiany linii
cmp #2
bne LOOP
:4+8 sta $d40a
:4 inc 0
nop
; line=0
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=1
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=2
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=3
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=4
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=5
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=6
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=7
lda #$22
ldx #$77
ldy #$ff
sta $d016
stx $d016
sty $d016
lda #$d
sta $d016
lda $00
; line=8
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=9
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=10
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=11
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=12
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=13
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=14
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
; line=15
lda #$22
ldx #$77
ldy #$ff
sta $d016
stx $d016
sty $d016
lda #$d
sta $d016
lda $00
; line=16
lda #$00
ldx #$00
ldy #$00
sta $d01a
stx $d01e
sty $d01e
lda #$00
sta $d01e
lda #$0f
sta $d016
lda #$16
sta $d016
lda #$1a
sta $d016
lda #$c2
sta $d016
lda #$c6
sta $d016
lda #$ca
sta $d016
kkk
:64 lda $d01e
lda >fnt
sta CHARBASE
lda #$00
sta Background_BAK
lda #$4A
sta Playfield_Color0_PF0
lda #$2A
sta Playfield_Color1_PF1
lda #$0E
sta Playfield_Color2_PF2
lda #$96
sta Playfield_Color3_PF3
lda #$04
sta PRIOR_GTIACTL
mwa #ant $d402
lda #scr40 ;ustawienie szerokosci obrazu
sta $d400
jmp LOOP
;-- tutaj nasze tablice (pliki) z programu Graph2Font
org $6000
text :960 brk
;--
org $6600
;- musi byc o 1 linie za duzo...
ant dta b($44),a(text)
:29 dta b(4)
dta b($41),a(ant)
;--
org $6800
fnt :256 dta b($55)
;--
;--
org pmBase+$300
:768 brk
run main
p.s.
Skrzynka piwa dla tego, kto sprawi aby mozna bylo zmieniac kolory w rastrze na calej wysokosci ekranu (bez tych szarych ciaglych linii), tryb znakowy oczywiscie, trudno zrezygnowac z 5-tego koloru :)
3x Atari 130XE, SDX, CPU 65816, 2x VBXE, 2x IDE Plus rev. C