diff --git a/mandel.s b/mandel.s index 25eaffd..4a4c7f4 100644 --- a/mandel.s +++ b/mandel.s @@ -46,6 +46,16 @@ SDLSTH = $231 .data +strings: +str_self: + .asciiz "MANDEL-6502" +str_speed: + .asciiz "ms/px" +str_running: + .asciiz "RUN " +str_done: + .asciiz "DONE" + aspect: ; aspect ratio! ; pixels at 320w are 5:6 (narrow) @@ -467,6 +477,20 @@ enough: rts .endproc +.macro draw_text col, cstr + ; clobbers A, X + .local loop + .local done + ldx #0 +loop: + lda cstr,x + beq done + sta textbuffer + col,x + inx + jmp loop +done: +.endmacro + .proc start ; ox = 0; oy = 0; zoom = 0 @@ -507,6 +531,9 @@ zero_byte_loop: cmp #.hibyte(framebuffer_end) bne zero_page_loop + draw_text 0, str_self + draw_text 36, str_running + ; Re-enable display DMA lda #$22 sta DMACTL @@ -562,6 +589,8 @@ loop_sx_done: loop_sy_done: + draw_text 36, str_done + loop: ; finished jmp loop