2021-02-26 22:46:56 -05:00
|
|
|
( dev/screen )
|
2021-02-26 19:38:20 -05:00
|
|
|
|
|
|
|
&Screen { width 2 height 2 pad 4 x 2 y 2 color 1 }
|
2021-02-27 11:18:57 -05:00
|
|
|
&Sprite { pad 8 x 2 y 2 addr 2 color 1 }
|
2021-02-26 19:38:20 -05:00
|
|
|
|
2021-02-27 11:18:57 -05:00
|
|
|
;centerx 2 ;centery 2 ;i 2 ;j 1
|
2021-02-26 19:38:20 -05:00
|
|
|
|
|
|
|
|0100 @RESET
|
|
|
|
|
|
|
|
( find screen center )
|
|
|
|
~dev/screen.width #0002 DIV2 =centerx
|
|
|
|
~dev/screen.height #0002 DIV2 =centery
|
|
|
|
|
|
|
|
( draw hor line )
|
|
|
|
#0000 =i
|
|
|
|
~centery =dev/screen.y
|
|
|
|
@draw-hor
|
|
|
|
#03 ~i =dev/screen.x =dev/screen.color
|
|
|
|
~i #0002 ADD2 =i ( increment )
|
|
|
|
~i ~dev/screen.width LTH2 ,draw-hor ROT JMP? POP2
|
|
|
|
|
|
|
|
( draw ver line )
|
|
|
|
#0000 =i
|
|
|
|
~centerx =dev/screen.x
|
|
|
|
@draw-ver
|
|
|
|
#03 ~i =dev/screen.y =dev/screen.color
|
|
|
|
~i #0002 ADD2 =i ( increment )
|
|
|
|
~i ~dev/screen.width LTH2 ,draw-ver ROT JMP? POP2
|
|
|
|
|
2021-02-27 11:18:57 -05:00
|
|
|
( draw blending modes )
|
|
|
|
@draw-blends
|
|
|
|
~j ,icon #00 ~j #0008 MUL2 ~dev/screen.height #0010 SUB2 ,draw-sprite JSR
|
|
|
|
~j #01 ADD =j
|
|
|
|
~j #10 LTH ,draw-blends ROT JMP? POP2
|
|
|
|
|
2021-02-26 19:38:20 -05:00
|
|
|
( draw pixel in the middle )
|
|
|
|
#01 ~centerx ~centery =dev/screen.y =dev/screen.x =dev/screen.color
|
|
|
|
|
|
|
|
BRK
|
|
|
|
|
2021-02-27 11:18:57 -05:00
|
|
|
@draw-sprite
|
|
|
|
=dev/sprite.y
|
|
|
|
=dev/sprite.x
|
|
|
|
=dev/sprite.addr
|
|
|
|
=dev/sprite.color
|
|
|
|
RTS
|
|
|
|
|
|
|
|
@icon [ 3c7e e7c3 c3e7 7e3c ]
|
|
|
|
|
2021-02-26 19:38:20 -05:00
|
|
|
|c000 @FRAME BRK
|
|
|
|
|d000 @ERROR BRK
|
|
|
|
|
|
|
|
|FF10 ;dev/screen Screen
|
2021-02-27 11:18:57 -05:00
|
|
|
|FF20 ;dev/sprite Sprite
|
2021-02-26 19:38:20 -05:00
|
|
|
|
2021-02-28 14:17:32 -05:00
|
|
|
|FFF0 .RESET .FRAME .ERROR ( vectors )
|
|
|
|
|FFF8 [ f0ac f0bb f053 ] ( palette )
|