Compare commits
No commits in common. "335c4d2c9682ae9a4fbc25951c273ab1703d074a" and "9cbcf1cb5a3a0322cf1880939037f73b98fdb30c" have entirely different histories.
335c4d2c96
...
9cbcf1cb5a
1 changed files with 13 additions and 27 deletions
36
mandel.s
36
mandel.s
|
@ -25,9 +25,8 @@ FR2 = $e6
|
|||
|
||||
; High data
|
||||
framebuffer_top = $8000
|
||||
textbuffer = $8f00
|
||||
framebuffer_bottom = $9000
|
||||
display_list = $9f00
|
||||
textbuffer = $9f00
|
||||
framebuffer_end = $a000
|
||||
|
||||
height = 184
|
||||
|
@ -55,7 +54,7 @@ str_speed:
|
|||
.byte "ms/px"
|
||||
str_speed_end:
|
||||
str_run:
|
||||
.byte " RUN"
|
||||
.byte "RUN "
|
||||
str_run_end:
|
||||
str_done:
|
||||
.byte "DONE"
|
||||
|
@ -105,7 +104,7 @@ bit_masks:
|
|||
.byte 3 << 4
|
||||
.byte 3 << 6
|
||||
|
||||
display_list_start:
|
||||
display_list:
|
||||
; 48 lines overscan
|
||||
.repeat 5
|
||||
.byte $70 ; 8 blank lines
|
||||
|
@ -130,8 +129,6 @@ display_list_start:
|
|||
|
||||
.byte $41 ; jump and blank
|
||||
.addr display_list
|
||||
display_list_end:
|
||||
display_list_len = display_list_end - display_list_start
|
||||
|
||||
.code
|
||||
|
||||
|
@ -531,6 +528,14 @@ done:
|
|||
; Disable display DMA
|
||||
sta DMACTL
|
||||
|
||||
; Set up the display list
|
||||
lda #.lobyte(display_list)
|
||||
sta DLISTL ; actual register
|
||||
sta SDLSTL ; shadow register the OS will copy in
|
||||
lda #.hibyte(display_list)
|
||||
sta DLISTH ; actual register
|
||||
sta SDLSTH ; shadow register the OS will copy in
|
||||
|
||||
; zero the range from framebuffer_top to framebuffer_end
|
||||
lda #.lobyte(framebuffer_top)
|
||||
sta temp
|
||||
|
@ -550,25 +555,6 @@ zero_byte_loop:
|
|||
cmp #.hibyte(framebuffer_end)
|
||||
bne zero_page_loop
|
||||
|
||||
; Copy the display list into properly aligned memory
|
||||
; Can't cross 1024-byte boundaries :D
|
||||
ldx #0
|
||||
copy_byte_loop:
|
||||
lda display_list_start,x
|
||||
sta display_list,x
|
||||
inx
|
||||
cpx #display_list_len
|
||||
bne copy_byte_loop
|
||||
|
||||
; Set up the display list
|
||||
lda #.lobyte(display_list)
|
||||
sta DLISTL ; actual register
|
||||
sta SDLSTL ; shadow register the OS will copy in
|
||||
lda #.hibyte(display_list)
|
||||
sta DLISTH ; actual register
|
||||
sta SDLSTH ; shadow register the OS will copy in
|
||||
|
||||
; Status bar
|
||||
draw_text 0, str_self_len, str_self
|
||||
draw_text 40 - str_run_len, str_run_len, str_run
|
||||
|
||||
|
|
Loading…
Reference in a new issue