Compare commits
No commits in common. "9cbcf1cb5a3a0322cf1880939037f73b98fdb30c" and "7cb879d1108267ce7bccf752a8236bad86e0289f" have entirely different histories.
9cbcf1cb5a
...
7cb879d110
1 changed files with 0 additions and 53 deletions
53
mandel.s
53
mandel.s
|
@ -46,38 +46,6 @@ SDLSTH = $231
|
||||||
|
|
||||||
.data
|
.data
|
||||||
|
|
||||||
strings:
|
|
||||||
str_self:
|
|
||||||
.byte "MANDEL-6502"
|
|
||||||
str_self_end:
|
|
||||||
str_speed:
|
|
||||||
.byte "ms/px"
|
|
||||||
str_speed_end:
|
|
||||||
str_run:
|
|
||||||
.byte "RUN "
|
|
||||||
str_run_end:
|
|
||||||
str_done:
|
|
||||||
.byte "DONE"
|
|
||||||
str_done_end:
|
|
||||||
|
|
||||||
str_self_len = str_self_end - str_self
|
|
||||||
str_speed_len = str_speed_end - str_speed
|
|
||||||
str_run_len = str_run_end - str_run
|
|
||||||
str_done_len = str_done_end - str_done
|
|
||||||
|
|
||||||
char_map:
|
|
||||||
; Map ATASCII string values to framebuffer font entries
|
|
||||||
; Sighhhhh
|
|
||||||
.repeat 32, i
|
|
||||||
.byte i + 64
|
|
||||||
.endrepeat
|
|
||||||
.repeat 64, i
|
|
||||||
.byte i
|
|
||||||
.endrepeat
|
|
||||||
.repeat 32, i
|
|
||||||
.byte 96 + i
|
|
||||||
.endrepeat
|
|
||||||
|
|
||||||
aspect:
|
aspect:
|
||||||
; aspect ratio!
|
; aspect ratio!
|
||||||
; pixels at 320w are 5:6 (narrow)
|
; pixels at 320w are 5:6 (narrow)
|
||||||
|
@ -499,22 +467,6 @@ enough:
|
||||||
rts
|
rts
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
.macro draw_text col, len, cstr
|
|
||||||
; clobbers A, X
|
|
||||||
.local loop
|
|
||||||
.local done
|
|
||||||
ldx #0
|
|
||||||
loop:
|
|
||||||
cpx #len
|
|
||||||
beq done
|
|
||||||
ldy cstr,x
|
|
||||||
lda char_map,y
|
|
||||||
sta textbuffer + col,x
|
|
||||||
inx
|
|
||||||
jmp loop
|
|
||||||
done:
|
|
||||||
.endmacro
|
|
||||||
|
|
||||||
.proc start
|
.proc start
|
||||||
|
|
||||||
; ox = 0; oy = 0; zoom = 0
|
; ox = 0; oy = 0; zoom = 0
|
||||||
|
@ -555,9 +507,6 @@ zero_byte_loop:
|
||||||
cmp #.hibyte(framebuffer_end)
|
cmp #.hibyte(framebuffer_end)
|
||||||
bne zero_page_loop
|
bne zero_page_loop
|
||||||
|
|
||||||
draw_text 0, str_self_len, str_self
|
|
||||||
draw_text 40 - str_run_len, str_run_len, str_run
|
|
||||||
|
|
||||||
; Re-enable display DMA
|
; Re-enable display DMA
|
||||||
lda #$22
|
lda #$22
|
||||||
sta DMACTL
|
sta DMACTL
|
||||||
|
@ -613,8 +562,6 @@ loop_sx_done:
|
||||||
|
|
||||||
loop_sy_done:
|
loop_sy_done:
|
||||||
|
|
||||||
draw_text 40 - str_done_len, str_done_len, str_done
|
|
||||||
|
|
||||||
loop:
|
loop:
|
||||||
; finished
|
; finished
|
||||||
jmp loop
|
jmp loop
|
||||||
|
|
Loading…
Reference in a new issue