diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..600d2d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode \ No newline at end of file diff --git a/KernelRoutineList.txt b/KernelRoutineList.txt index ec6a7f6..1d86822 100644 --- a/KernelRoutineList.txt +++ b/KernelRoutineList.txt @@ -1,5 +1,12 @@ Kernel Routines Grouped by File +Maybes: { + - Virtual Sprites + + May change Bit-Mapped to full Pixel mode + => 256x256 16 color mode +} + Byte.S | @@ -27,6 +34,11 @@ Hardware.s +- vram_read +- vram_dump + beep + set_activity + set_user + scan_keyboard + Int.s | +- int16_add_byte @@ -89,4 +101,26 @@ console.s +- console_reset_color +- console_reset +- console_load_font - \ No newline at end of file + +graphics.s + | + graphics_draw_rectangle + graphics_draw_line + graphics_draw_triangle + graphics_draw_polygon + graphics_draw_text + + graphics_fill_rectangle + graphics_fill_triangle + graphics_fill_polygon + + graphics_set_pixel + +video.s + | ! Don't support 16 row mode! => Changes in future + video_clear + video_copy_memory + video_set_mode + video_get_mode + video_set_accent + video_get_accent \ No newline at end of file diff --git a/a.out b/a.out index a811587..7db7e88 100644 Binary files a/a.out and b/a.out differ diff --git a/main.s b/main.s index 3b65156..c3ce23d 100644 --- a/main.s +++ b/main.s @@ -1,3 +1,11 @@ +; Important To-Do! +; +; Get launch & tasks json working +; fix Keyboard scanning +; work on KernelRoutinesList.txt + + + .include "src/variables.s" @@ -47,11 +55,11 @@ reset: sei ;jsr video_writeline_static ;.string "Hello World" - jsr video_clear + jsr console_clear ldx #charset - jsr video_load_font + jsr console_load_font lda #$f0 jsr irq_init diff --git a/src/kernel.s b/src/kernel.s index 6421f8f..79624a0 100644 --- a/src/kernel.s +++ b/src/kernel.s @@ -1,6 +1,8 @@ .include "src/kernel/irq.s" .include "src/kernel/keyboard.s" .include "src/kernel/video.s" + .include "src/kernel/console.s" + .include "src/kernel/graphics.s" .include "src/kernel/string.s" .include "src/kernel/int.s" .include "src/kernel/event_handler.s" diff --git a/src/kernel/console.s b/src/kernel/console.s index 07f3a14..8ae4b44 100644 --- a/src/kernel/console.s +++ b/src/kernel/console.s @@ -1,6 +1,6 @@ console_write: - ; console Write (string) + ; Console Write (string) ; String will be written from a Pointer, ; without a new line at the end @@ -10,6 +10,13 @@ console_write: ; Output: (none) + + ; ToDo: + ; Support for ASCII (0-32) Chars, Line feed etc. + ; Support for Color codes => Maybe #$ff Indicator + ; Return propper work addresses in X & Y + ; + stx z0 sty z1 @@ -64,7 +71,7 @@ console_write_return: rts console_write_static: - ; console Write Static (string) + ; Console Write Static (string) ; String will be written wich follows after ; the JSR call without a new line at the end @@ -82,7 +89,7 @@ console_write_static: rts console_writeline: - ; console Writeline (string) + ; Console Writeline (string) ; Same as "console_write", except at ; the end, a new line begins @@ -98,7 +105,7 @@ console_writeline: rts console_writeline_static: - ; console Writeline Static (string) + ; Console Writeline Static (string) ; Same as "console_write_static", except at ; the end, a new line begins @@ -109,7 +116,7 @@ console_writeline_static: rts console_set_color: - ; console Set Color + ; Console Set Color ; Sets the color, of the content ; that will be written, following @@ -122,7 +129,7 @@ console_set_color: rts console_set_foreground: - ; console Set Foreground + ; Console Set Foreground ; Sets the Foreground color ; Input: @@ -134,7 +141,7 @@ console_set_foreground: rts console_set_background: - ; console Set Background + ; Console Set Background ; Sets the Background color ; Input: @@ -146,7 +153,7 @@ console_set_background: rts console_read_line: - ; console Read Line + ; Console Read Line ; Loops, till the Return key is pressed ; Output is stored in $300 => "Typebuffer" @@ -157,7 +164,7 @@ console_read_line: rts console_read_char: - ; console Read Char + ; Console Read Char ; Loops, till a Key is pressed ; Input: (none) @@ -169,7 +176,7 @@ console_read_char: rts console_set_cursor: - ; console Set Cursor + ; Console Set Cursor ; Sets the Cursor Location ; Input: @@ -182,7 +189,7 @@ console_set_cursor: rts console_get_cursor: - ; console Get Cursor + ; Console Get Cursor ; Gets the Cursor Location ; Input: (none) @@ -195,7 +202,7 @@ console_get_cursor: rts console_return: - ; console Return + ; Console Return ; Sets the Cursor to it's line starting Position ; and if nessesary, scrolls it up and prints the Start Text @@ -206,7 +213,7 @@ console_return: rts console_scroll: - ; console Scroll + ; Console Scroll ; Scrolls the screen in the given direction ; Input: @@ -234,7 +241,7 @@ console_scroll: rts console_clear: - ; console Clear + ; Console Clear ; Clears the Screen blank, with the normal Color and #$20 Chars ; Input: (none) @@ -260,7 +267,7 @@ console_clear_loop: rts console_reset_color: - ; console Reset Color + ; Console Reset Color ; Resets the Color to it's initial state ; Input: (none) @@ -270,7 +277,7 @@ console_reset_color: rts console_reset: - ; console Reset + ; Console Reset ; Resets the console Display ; to it's initial state, i.e ; clears the screen, resets the Cursor etc... @@ -282,7 +289,7 @@ console_reset: rts console_load_font: - ; console Load Font + ; Console Load Font ; Loads a 2k BitMap font from a Pointer to VRAM ; Input: diff --git a/src/kernel/graphics.s b/src/kernel/graphics.s new file mode 100644 index 0000000..e69de29 diff --git a/src/kernel/video.s b/src/kernel/video.s new file mode 100644 index 0000000..e69de29 diff --git a/src/variables.s b/src/variables.s index 76952fd..8d0abef 100644 --- a/src/variables.s +++ b/src/variables.s @@ -1,3 +1,6 @@ +; + + ; Static System Variables ; Name Address Size Status Comment