diff --git a/a.out b/a.out index e8d9b3b..84cf076 100644 Binary files a/a.out and b/a.out differ diff --git a/assets/UTF.8.bin b/assets/UTF-8.bin similarity index 100% rename from assets/UTF.8.bin rename to assets/UTF-8.bin diff --git a/assets/UTF.8.bmf b/assets/UTF-8.bmf similarity index 100% rename from assets/UTF.8.bmf rename to assets/UTF-8.bmf diff --git a/lib/src/hardware.s b/lib/src/hardware.s new file mode 100644 index 0000000..612307c --- /dev/null +++ b/lib/src/hardware.s @@ -0,0 +1,51 @@ + +vram_write + ; VRAM Write + ; Writes A to the given Coordinate + + ; Input: + ; A => Data + ; X => X Coordinate + ; Y => Y Coordinate + + ; Output: (none) + + +;vram_write_color + ; VRAM Write Color + ; Writes A to the given Coordinate, but adds 0x40 to X + + ; Input: + ; A => Data + ; X => X Coordinate + ; Y => Y Coordinate + + ; Output: (none) + + +vram_read + ; VRAM Read + ; Reads Data from the given Coordinate + + ; Input: + ; X => X Coordinate + ; Y => Y Coordinate + + ; Output: + ; A => Data + + +vram_dump + ; VRAM Dump + ; Dumps all bytes from VRAM in the given Range + ; to a specified Memory Adress + + ; Input: + ; X => Start X Coordinate + ; Y => Start Y Coordnate + ; K1 => End X Coordinate + ; K2 => End Y Coordinate + ; K3 => LOW Memory Pointer + ; K4 => HIGH Memory Pointer + + ; Output: (none) \ No newline at end of file diff --git a/lib/src/video.s b/lib/src/video.s index e5fefde..e384c92 100644 --- a/lib/src/video.s +++ b/lib/src/video.s @@ -1,3 +1,4 @@ + video_write ; Video Write (string) ; String will be written from a Pointer, @@ -201,3 +202,6 @@ video_reset rts + +video_load_font + diff --git a/lib/variables.s b/lib/variables.s index 703f941..3f541d5 100644 --- a/lib/variables.s +++ b/lib/variables.s @@ -2,16 +2,16 @@ ; Name Address Size Status Comment -z0 = $0 ; 8 bit +z0 = $0 ; 8 bit All Purpose 16 bit Zero Page Variable z1 = $1 ; 8 bit -irq_a = $200 ; 8 bit (internal) +irq_a = $200 ; 8 bit (internal) IRQ Variable Save irq_x = $201 ; 8 bit (internal) irq_y = $202 ; 8 bit (internal) -irq_vector = $203 ; 16 bit +irq_vector = $203 ; 16 bit IRQ 16 bit Jump Vector -k0 = $205 ; 8 bit -k1 = $206 ; 8 bit +k0 = $205 ; 8 bit General Purpose Registers +k1 = $206 ; 8 bit ... k2 = $207 ; 8 bit k3 = $208 ; 8 bit k4 = $209 ; 8 bit @@ -19,27 +19,28 @@ k5 = $20a ; 8 bit k6 = $20b ; 8 bit k7 = $20c ; 8 bit -keyboard_current = $20d ; 8 bit -keyboard_previous = $20e ; 8 bit -keyboard_format = $20f ; 8 bit -keyboard_arrow = $210 ; 8 bit -keyboard_modifier = $211 ; 8 bit +keyboard_current = $20d ; 8 bit Held Keyboard Key, without Formatting (shift, etc.) "Scan Key" +keyboard_previous = $20e ; 8 bit Previous held "Scan Key" +keyboard_format = $20f ; 8 bit Formatted Char, from keyboard_current +keyboard_arrow = $210 ; 8 bit Held Arrow Keys +keyboard_modifier = $211 ; 8 bit Held Modifier Keys, such as "shift, alt, control" -cursor_x = $212 ; 8 bit -cursor_y = $213 ; 8 bit -cursor_x_previous = $214 ; 8 bit (internal) -cursor_y_previous = $215 ; 8 bit (internal) -cursor_value = $216 ; 8 bit -cursor_speed = $217 ; 8 bit -cursor_speed_count = $218 ; 8 bit (internal) -cursor_delay_interval = $219 ; 8 bit +cursor_x = $212 ; 8 bit Current Cursor X Position +cursor_y = $213 ; 8 bit Current Cursor Y Position +cursor_x_previous = $214 ; 8 bit (internal) Previous Cursor X Position +cursor_y_previous = $215 ; 8 bit (internal) Previous Cursor Y Position +cursor_value = $216 ; 8 bit +cursor_speed = $217 ; 8 bit Cursor Blink Speed (in IRQ Ticks) +cursor_speed_count = $218 ; 8 bit (internal) Cursor Blink Speed Counter +cursor_delay_interval = $219 ; 8 bit cursor_delay = $21a ; 8 bit cursor_delay_count = $21b ; 8 bit (internal) cursor_delay_switch = $21c ; 8 bit (internal) soft_system_register = $21d ; 8 bit (internal) -color = $2fe ; 8 bit +color = $2fe ; 8 bit Fore & Background Color + +typelength = $2ff ; 8 bit Length of typebuffer +typebuffer = $300 ; 256 bit 256 bit, All Purpose Char Buffer -typelength = $2ff ; 8 bit -typebuffer = $300 ; 256 bit \ No newline at end of file diff --git a/main.s b/main.s index 9c92b11..4d275d9 100644 --- a/main.s +++ b/main.s @@ -1,10 +1,14 @@ - .include "lib/variables.s" + .include "lib/variables.s" - .org $c000 ; $c000 for 16k ROM - - ; libraries + + .org $c000 ; $c000 for 16k ROM .include "lib/kernel.s" + + .org $f700 +charset .incbin "assets/UTF-8.bin" + + .org $ff00 reset sei cld @@ -55,22 +59,23 @@ irq_jump jmp (irq_vector) .addr irq_jump ; hardware registers -vidx = $be00 -vidy = $be01 -vidm = $be02 -vidd = $be03 -porta = $bf80 -portb = $bf81 -ddrb = $bf82 -ddra = $bf83 -t1cl = $bf84 -t1ch = $bf85 -acr = $bf8b -ifr = $bf8d -ier = $bf8e +vidx = $be00 +vidy = $be01 +vidm = $be02 +vidd = $be03 -keyboard_port = $bd00 -system_register = $bc00 +porta = $bf80 +portb = $bf81 +ddrb = $bf82 +ddra = $bf83 +t1cl = $bf84 +t1ch = $bf85 +acr = $bf8b +ifr = $bf8d +ier = $bf8e + +keyboard_port = $bd00 +system_register = $bc00 .end \ No newline at end of file