Programowanie: Rysowanie punktu: Różnice pomiędzy wersjami
Przejdź do nawigacji
Przejdź do wyszukiwania
mNie podano opisu zmian |
ciut szybciej dla gr8 |
||
| Linia 49: | Linia 49: | ||
sta adr+1 | sta adr+1 | ||
bcs ?1xx | |||
?0xx: | |||
ldy byteoff,x | ldy byteoff,x | ||
lda (adr),y | |||
and bytemask,x | |||
ora bytepxl,x | |||
sta (adr),y | |||
rts | |||
?1xx: | |||
ldy byteoff+$100,x | ldy byteoff+$100,x | ||
lda (adr),y | lda (adr),y | ||
and bytemask,x | and bytemask,x | ||
Aktualna wersja z 31 lip 2020, 18:36
Plot dla trybu lowres (Graphics 15) 160x192:
COLOR = 1 ;kolor z zakresu 0,1,2,3 org $80 adr .ds 2 ;Y = y, X = x plot: lda lnadl,y sta adr lda lnadh,y sta adr+1 ldy byteoff,x lda (adr),y and bytemask,x ora bytepxl,x sta (adr),y rts lnadl: :192 .byte <(screen+40*#) lnadh: :192 .byte >(screen+40*#) byteoff: :160 .byte #/4 bytemask: :160 .byte ~(%11 << (6 - ((# & %11) * 2))) bytepxl: :160 .byte COLOR << (6 - ((# & %11) * 2))
Plot dla trybu hires (Graphics 8) 320x192:
COLOR = 1 ;kolor z zakresu 0,1 org $80 adr .ds 2 ;Y = y, X = <x, C = >x plot: lda lnadl,y sta adr lda lnadh,y sta adr+1 bcs ?1xx ?0xx: ldy byteoff,x lda (adr),y and bytemask,x ora bytepxl,x sta (adr),y rts ?1xx: ldy byteoff+$100,x lda (adr),y and bytemask,x ora bytepxl,x sta (adr),y rts lnadl: :192 .byte <(screen+40*#) lnadh: :192 .byte >(screen+40*#) byteoff: :320 .byte #/8 bytemask: :256 .byte ~(1 << (7 - (# & %111))) bytepxl: :256 .byte COLOR << (7 - (# & %111))