diff options
| author | Astrid Smith | 2010-06-20 19:38:40 -0700 |
|---|---|---|
| committer | Astrid Smith | 2010-06-20 19:38:40 -0700 |
| commit | cbbe6724aa1cdc0ebf260ecda36b77bf72a9e580 (patch) | |
| tree | 7833b891a597588dee74f14d74ee1161adf471e3 | |
| parent | 3c1b1badba4b42708c9953de0af061bc610e9b99 (diff) | |
Added asm file to do video stuff, renamed storage to fit
| -rw-r--r-- | main.asm | 1 | ||||
| -rw-r--r-- | ports.asm | 57 | ||||
| -rw-r--r-- | video.asm | 21 |
3 files changed, 44 insertions, 35 deletions
@@ -236,6 +236,7 @@ _main: rts include "ports.asm" + include "video.asm" include "interrupts.asm" include "flags.asm" @@ -564,25 +564,13 @@ port_out_0f: port_in_10: ;; LCD status clr.b d1 - or.b p10_increment(pc),d1 - or.b p10_row(pc),d1 - or.b p10_enabled(pc),d1 - or.b p10_6bit(pc),d1 - or.b p10_busy(pc),d1 + or.b video_increment(pc),d1 + or.b video_row(pc),d1 + or.b video_enabled(pc),d1 + or.b video_6bit(pc),d1 + or.b video_busy(pc),d1 rts -p10_row: dc.b 0 ; $01 if in row mode - x - ; $00 if in column mode - y -p10_increment: dc.b 0 ; $02 if in increment mode - ; $00 if in decrement mode -p10_enabled: dc.b 0 ; $20 if screen is blanked -p10_6bit: dc.b 0 ; $40 if in 8 bit mode, $00 if in 6 - ; bit mode -p10_busy: dc.b 0 ; always 0 - -p10_cur_row: dc.b 0 -p10_cur_col: dc.b 0 - port_out_10: ;; LCD command tst.b d1 @@ -624,53 +612,52 @@ port_out_10: rts ;; ... port_out_10_00: ; 6-bit mode - move.b #$00,p10_6bit + move.b #$00,video_6bit rts port_out_10_01: ; 8-bit mode - move.b #$40,p10_6bit + move.b #$40,video_6bit rts port_out_10_02: ; screen off - move.b #$20,p10_enabled + move.b #$20,video_enabled rts port_out_10_03: ; screen on - move.b #$00,p10_enabled + move.b #$00,video_enabled rts port_out_10_04: ; x-- - move.b #$01,p10_row - move.b #$00,p10_increment + move.b #$01,video_row + move.b #$00,video_increment rts port_out_10_05: ; x++ - move.b #$01,p10_row - move.b #$02,p10_increment + move.b #$01,video_row + move.b #$02,video_increment rts port_out_10_06: ; y-- - move.b #$00,p10_row - move.b #$00,p10_increment + move.b #$00,video_row + move.b #$00,video_increment rts port_out_10_07: ; y++ - move.b #$00,p10_row - move.b #$02,p10_increment + move.b #$00,video_row + move.b #$02,video_increment rts port_out_10_undef: rts port_out_10_set_col: sub.b #$20,d1 - move.b d1,p10_cur_col + move.b d1,video_cur_col rts port_out_10_set_row: sub.b #$80,d1 - move.b d1,p10_cur_row + move.b d1,video_cur_row rts + port_in_11: ;; LCD data - move.b LCD_MEM,d1 - rts + bra video_read port_out_11: ;; LCD data - move.b d1,LCD_MEM - rts + bra video_write port_in_12: port_out_12: diff --git a/video.asm b/video.asm new file mode 100644 index 0000000..b47d06c --- /dev/null +++ b/video.asm @@ -0,0 +1,21 @@ + + +video_row: dc.b 0 ; $01 if in row mode - x + ; $00 if in column mode - y +video_increment: dc.b 0 ; $02 if in increment mode + ; $00 if in decrement mode +video_enabled: dc.b 0 ; $20 if screen is blanked +video_6bit: dc.b 0 ; $40 if in 8 bit mode, $00 if in 6 + ; bit mode +video_busy: dc.b 0 ; always 0 + +video_cur_row: dc.b 0 +video_cur_col: dc.b 0 + + EVEN + +video_read: + rts + +video_write: + rts |
