From 11558e7a8d274e484f63304fd79664ce61a89720 Mon Sep 17 00:00:00 2001 From: Duncan Smith Date: Sun, 20 Jun 2010 19:38:40 -0700 Subject: Added asm file to do video stuff, renamed storage to fit --- ports.asm | 57 ++++++++++++++++++++++----------------------------------- 1 file changed, 22 insertions(+), 35 deletions(-) (limited to 'ports.asm') diff --git a/ports.asm b/ports.asm index 2368d54..056cd82 100644 --- a/ports.asm +++ b/ports.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: -- cgit v1.2.3