Renamed Video to Console
This commit is contained in:
parent
46d86823eb
commit
a6568b17d8
@ -70,22 +70,23 @@ String.s
|
|||||||
+- string_equals
|
+- string_equals
|
||||||
+- is_string
|
+- is_string
|
||||||
|
|
||||||
Video.s
|
console.s
|
||||||
|
|
|
|
||||||
+- video_write
|
+- console_write
|
||||||
+- video_write_static
|
+- console_write_static
|
||||||
+- video_writeline
|
+- console_writeline
|
||||||
+- video_writeline_static
|
+- console_writeline_static
|
||||||
+- video_set_color
|
+- console_set_color
|
||||||
+- video_set_foreground
|
+- console_set_foreground
|
||||||
+- video_set_background
|
+- console_set_background
|
||||||
+- video_read_line
|
+- console_read_line
|
||||||
+- video_read_char
|
+- console_read_char
|
||||||
+- video_set_cursor
|
+- console_set_cursor
|
||||||
+- video_get_cursor
|
+- console_get_cursor
|
||||||
+- video_return
|
+- console_return
|
||||||
+- video_scroll
|
+- console_scroll
|
||||||
+- video_clear
|
+- console_clear
|
||||||
+- video_reset_color
|
+- console_reset_color
|
||||||
+- video_reset
|
+- console_reset
|
||||||
+- video_load_font
|
+- console_load_font
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
video_write:
|
console_write:
|
||||||
; Video Write (string)
|
; console Write (string)
|
||||||
; String will be written from a Pointer,
|
; String will be written from a Pointer,
|
||||||
; without a new line at the end
|
; without a new line at the end
|
||||||
|
|
||||||
@ -17,32 +17,32 @@ video_write:
|
|||||||
; x => X Coords
|
; x => X Coords
|
||||||
; K0 => Y Coords
|
; K0 => Y Coords
|
||||||
|
|
||||||
video_write_loop:
|
console_write_loop:
|
||||||
lda (z0), y
|
lda (z0), y
|
||||||
iny
|
iny
|
||||||
cmp #$00
|
cmp #$00
|
||||||
beq video_write_return
|
beq console_write_return
|
||||||
cpy #$00
|
cpy #$00
|
||||||
beq video_write_return
|
beq console_write_return
|
||||||
|
|
||||||
phy
|
phy
|
||||||
|
|
||||||
lda #$30
|
lda #$30
|
||||||
cmp cursor_x
|
cmp cursor_x
|
||||||
bcc video_write_skip_overflow
|
bcc console_write_skip_overflow
|
||||||
stz cursor_x
|
stz cursor_x
|
||||||
inc cursor_y
|
inc cursor_y
|
||||||
|
|
||||||
lda #$20
|
lda #$20
|
||||||
cmp cursor_y
|
cmp cursor_y
|
||||||
bcc video_write_skip_overflow
|
bcc console_write_skip_overflow
|
||||||
|
|
||||||
lda #$00
|
lda #$00
|
||||||
jsr video_scroll
|
jsr console_scroll
|
||||||
lda #$1f
|
lda #$1f
|
||||||
sta cursor_y
|
sta cursor_y
|
||||||
|
|
||||||
video_write_skip_overflow:
|
console_write_skip_overflow:
|
||||||
ldx cursor_x
|
ldx cursor_x
|
||||||
ldy cursor_y
|
ldy cursor_y
|
||||||
jsr vram_write
|
jsr vram_write
|
||||||
@ -51,9 +51,9 @@ video_write_skip_overflow:
|
|||||||
|
|
||||||
inc cursor_x
|
inc cursor_x
|
||||||
ply
|
ply
|
||||||
jmp video_write_loop
|
jmp console_write_loop
|
||||||
|
|
||||||
video_write_return:
|
console_write_return:
|
||||||
; calc new address and put into xy
|
; calc new address and put into xy
|
||||||
lda z0
|
lda z0
|
||||||
ldx z1
|
ldx z1
|
||||||
@ -63,8 +63,8 @@ video_write_return:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_write_static:
|
console_write_static:
|
||||||
; Video Write Static (string)
|
; console Write Static (string)
|
||||||
; String will be written wich follows after
|
; String will be written wich follows after
|
||||||
; the JSR call without a new line at the end
|
; the JSR call without a new line at the end
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ video_write_static:
|
|||||||
|
|
||||||
plx
|
plx
|
||||||
ply
|
ply
|
||||||
jsr video_write
|
jsr console_write
|
||||||
|
|
||||||
; if return right
|
; if return right
|
||||||
phy
|
phy
|
||||||
@ -81,9 +81,9 @@ video_write_static:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_writeline:
|
console_writeline:
|
||||||
; Video Writeline (string)
|
; console Writeline (string)
|
||||||
; Same as "video_write", except at
|
; Same as "console_write", except at
|
||||||
; the end, a new line begins
|
; the end, a new line begins
|
||||||
|
|
||||||
; Input:
|
; Input:
|
||||||
@ -92,14 +92,14 @@ video_writeline:
|
|||||||
|
|
||||||
; Output: (none)
|
; Output: (none)
|
||||||
|
|
||||||
jsr video_write
|
jsr console_write
|
||||||
jsr video_return ; or new video_newline
|
jsr console_return ; or new console_newline
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_writeline_static:
|
console_writeline_static:
|
||||||
; Video Writeline Static (string)
|
; console Writeline Static (string)
|
||||||
; Same as "video_write_static", except at
|
; Same as "console_write_static", except at
|
||||||
; the end, a new line begins
|
; the end, a new line begins
|
||||||
|
|
||||||
; Input: (none)
|
; Input: (none)
|
||||||
@ -108,8 +108,8 @@ video_writeline_static:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_set_color:
|
console_set_color:
|
||||||
; Video Set Color
|
; console Set Color
|
||||||
; Sets the color, of the content
|
; Sets the color, of the content
|
||||||
; that will be written, following
|
; that will be written, following
|
||||||
|
|
||||||
@ -121,8 +121,8 @@ video_set_color:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_set_foreground:
|
console_set_foreground:
|
||||||
; Video Set Foreground
|
; console Set Foreground
|
||||||
; Sets the Foreground color
|
; Sets the Foreground color
|
||||||
|
|
||||||
; Input:
|
; Input:
|
||||||
@ -133,8 +133,8 @@ video_set_foreground:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_set_background:
|
console_set_background:
|
||||||
; Video Set Background
|
; console Set Background
|
||||||
; Sets the Background color
|
; Sets the Background color
|
||||||
|
|
||||||
; Input:
|
; Input:
|
||||||
@ -145,8 +145,8 @@ video_set_background:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_read_line:
|
console_read_line:
|
||||||
; Video Read Line
|
; console Read Line
|
||||||
; Loops, till the Return key is pressed
|
; Loops, till the Return key is pressed
|
||||||
; Output is stored in $300 => "Typebuffer"
|
; Output is stored in $300 => "Typebuffer"
|
||||||
|
|
||||||
@ -156,8 +156,8 @@ video_read_line:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_read_char:
|
console_read_char:
|
||||||
; Video Read Char
|
; console Read Char
|
||||||
; Loops, till a Key is pressed
|
; Loops, till a Key is pressed
|
||||||
|
|
||||||
; Input: (none)
|
; Input: (none)
|
||||||
@ -168,8 +168,8 @@ video_read_char:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_set_cursor:
|
console_set_cursor:
|
||||||
; Video Set Cursor
|
; console Set Cursor
|
||||||
; Sets the Cursor Location
|
; Sets the Cursor Location
|
||||||
|
|
||||||
; Input:
|
; Input:
|
||||||
@ -181,8 +181,8 @@ video_set_cursor:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_get_cursor:
|
console_get_cursor:
|
||||||
; Video Get Cursor
|
; console Get Cursor
|
||||||
; Gets the Cursor Location
|
; Gets the Cursor Location
|
||||||
|
|
||||||
; Input: (none)
|
; Input: (none)
|
||||||
@ -194,8 +194,8 @@ video_get_cursor:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_return:
|
console_return:
|
||||||
; Video Return
|
; console Return
|
||||||
; Sets the Cursor to it's line starting Position
|
; Sets the Cursor to it's line starting Position
|
||||||
; and if nessesary, scrolls it up and prints the Start Text
|
; and if nessesary, scrolls it up and prints the Start Text
|
||||||
|
|
||||||
@ -205,8 +205,8 @@ video_return:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_scroll:
|
console_scroll:
|
||||||
; Video Scroll
|
; console Scroll
|
||||||
; Scrolls the screen in the given direction
|
; Scrolls the screen in the given direction
|
||||||
|
|
||||||
; Input:
|
; Input:
|
||||||
@ -224,17 +224,17 @@ video_scroll:
|
|||||||
; |+--- 0 = Dispose content & replace gap with Empty cells
|
; |+--- 0 = Dispose content & replace gap with Empty cells
|
||||||
; | 1 = Wrap around
|
; | 1 = Wrap around
|
||||||
; |
|
; |
|
||||||
; +---- 0 = Scroll Text Video Buffer (Y 0 - 31) (4k)
|
; +---- 0 = Scroll Text console Buffer (Y 0 - 31) (4k)
|
||||||
; 1 = Scroll Entire Video Buffer (Y 0 - 255) (32k)
|
; 1 = Scroll Entire console Buffer (Y 0 - 255) (32k)
|
||||||
|
|
||||||
; I.E => 0x03 (0b00001011) => Scrolls Entire Videobuffer Right & Up and
|
; I.E => 0x03 (0b00001011) => Scrolls Entire consolebuffer Right & Up and
|
||||||
; Disposes "scrolled away" content. Fills gaps with empty cells
|
; Disposes "scrolled away" content. Fills gaps with empty cells
|
||||||
|
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_clear:
|
console_clear:
|
||||||
; Video Clear
|
; console Clear
|
||||||
; Clears the Screen blank, with the normal Color and #$20 Chars
|
; Clears the Screen blank, with the normal Color and #$20 Chars
|
||||||
|
|
||||||
; Input: (none)
|
; Input: (none)
|
||||||
@ -243,7 +243,7 @@ video_clear:
|
|||||||
ldx #$00
|
ldx #$00
|
||||||
ldy #$00
|
ldy #$00
|
||||||
|
|
||||||
video_clear_loop:
|
console_clear_loop:
|
||||||
lda #$20
|
lda #$20
|
||||||
jsr vram_write
|
jsr vram_write
|
||||||
lda color
|
lda color
|
||||||
@ -251,16 +251,16 @@ video_clear_loop:
|
|||||||
|
|
||||||
inx
|
inx
|
||||||
cpx #$30
|
cpx #$30
|
||||||
bne video_clear_loop
|
bne console_clear_loop
|
||||||
ldx #$00
|
ldx #$00
|
||||||
iny
|
iny
|
||||||
cpy #$00
|
cpy #$00
|
||||||
bne video_clear_loop
|
bne console_clear_loop
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_reset_color:
|
console_reset_color:
|
||||||
; Video Reset Color
|
; console Reset Color
|
||||||
; Resets the Color to it's initial state
|
; Resets the Color to it's initial state
|
||||||
|
|
||||||
; Input: (none)
|
; Input: (none)
|
||||||
@ -269,9 +269,9 @@ video_reset_color:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_reset:
|
console_reset:
|
||||||
; Video Reset
|
; console Reset
|
||||||
; Resets the Video Display
|
; Resets the console Display
|
||||||
; to it's initial state, i.e
|
; to it's initial state, i.e
|
||||||
; clears the screen, resets the Cursor etc...
|
; clears the screen, resets the Cursor etc...
|
||||||
|
|
||||||
@ -281,8 +281,8 @@ video_reset:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
video_load_font:
|
console_load_font:
|
||||||
; Video Load Font
|
; console Load Font
|
||||||
; Loads a 2k BitMap font from a Pointer to VRAM
|
; Loads a 2k BitMap font from a Pointer to VRAM
|
||||||
|
|
||||||
; Input:
|
; Input:
|
||||||
@ -297,20 +297,20 @@ video_load_font:
|
|||||||
ldx #$78
|
ldx #$78
|
||||||
ldy #$00
|
ldy #$00
|
||||||
|
|
||||||
video_load_font_loop:
|
console_load_font_loop:
|
||||||
lda (z0)
|
lda (z0)
|
||||||
jsr vram_write
|
jsr vram_write
|
||||||
inx
|
inx
|
||||||
inc z0
|
inc z0
|
||||||
bne video_load_font_check
|
bne console_load_font_check
|
||||||
inc z1
|
inc z1
|
||||||
|
|
||||||
video_load_font_check:
|
console_load_font_check:
|
||||||
cpx #$80
|
cpx #$80
|
||||||
bne video_load_font_loop
|
bne console_load_font_loop
|
||||||
ldx #$78
|
ldx #$78
|
||||||
iny
|
iny
|
||||||
cpy #$00
|
cpy #$00
|
||||||
bne video_load_font_loop
|
bne console_load_font_loop
|
||||||
|
|
||||||
rts
|
rts
|
Loading…
Reference in New Issue
Block a user