Wiem ze to brzmi bardzo podobnie jak pytanie, ktore mialem rok temu http://www.atari.org.pl/forum/viewtopic.php?id=9560 ale mam nastepujacy problem, ktorego nie potrafie wytlumaczyc.
Mam trywialny kod:
setup antica
deklaracje zmiennych
400-500 lini kodu np. lda #0 - bez znaczenia
rysowaniu punktu
program antica
Niezaleznie gdzie poloze pamiec ekranu zawsza mam kilka paskow smieci na ekranie. Zmiana adresow pamieci ekranu nie wplywa na polozenie smieci, zmiana ilosci linii kodu przesuwa je w gore czy w dol.
szczegolowy kod:
org $4000
; antic setup
lda #0
sta 559
ldx <antic
ldy >antic
stx 560
sty 561
lda #%00100010
sta 559
lda #$0F
sta COLOR_SH
; vars
GFX_MEM equ $8010
GFX_MEM_2 equ $9000
COLOR_SH equ $2c6
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
lda #0
; rysuj
lda #255
sta GFX_MEM+20
foo
jmp foo
antic dta b($70,$70,$70)
dta b($00)
dta b($4e),a(GFX_MEM)
:101 dta b($e)
dta b($4e),a(GFX_MEM_2)
:89 dta b($e)
dta b($41),a(antic)
Przez analogie to watku, ktory podlinkowalem szukam miejsca gdzie moglbym zgubic np starszy bajt adresu tak jak wtedy. Ale ja praktycznie w tym kodzie nic nie robie... setup antica ma oba bajty adresu pamieci ekranu. Program antica odwoluje sie do pelnych adresow. Pamiec ekranu i kod znajduja sie od siebie na tyle daleko, ze tez ze soba nie koliduja raczej. Jakies hint?
PS. oczywiscie orginalny kod wygladal inaczej, po prostu chcialem zrekonstruowac problem na czyms do bolu prostym...