From 3e1b5e70afbb0e627b573a86a94998c3e70bffa2 Mon Sep 17 00:00:00 2001 From: 0xMAC8205 Date: Mon, 20 Nov 2023 13:22:50 +0100 Subject: [PATCH] Expanded hardware.s --- assets/UTF-8.2.bmf | Bin 0 -> 4097 bytes build.sh | 2 + docs/KernelRoutineList.txt | 13 +++--- src/kernel/console.s | 2 +- src/kernel/hardware.s | 86 +++++++++++++++++++++++++++++++++++++ src/variables.s | 8 ++++ upload.sh | 2 + 7 files changed, 106 insertions(+), 7 deletions(-) create mode 100755 assets/UTF-8.2.bmf diff --git a/assets/UTF-8.2.bmf b/assets/UTF-8.2.bmf new file mode 100755 index 0000000000000000000000000000000000000000..4e4efb35c3de03d5f3879cac43697265be0b7b2b GIT binary patch literal 4097 zcmeHJA+HoM5N<9ND-eZ1Sb-?XCRAR?iHc2VNX3d1D^{F9AWk5jc;bl_4S9LtS3HSC z5)?rZ9Df5xg2ur&yYFUZFC;*MEF8BKte4LQ3W)i{J}mtes-DVc>uI#CpFApD zS;p;@FyY~yIVEs`yqcWFXxl9IDed;UzQ&*f)c&m9Aittdd`W_9KT^PIm6kf38*271 zF`_pY`Lu@WFAJvB_0M~`6UaGIp!~lW&;bfh9jY)@Sn6*K_JB)F7FdtZ&g>rTM z`ua-zuj^17eO!$ReXp&?N}s+XccxsufBQ!H6VJ1z@BPALeqD&xx>6q_Xs&DhamJ^4 zVNC$%cYBcz(`~uf;08Ou>DMpN1b7R0e=K(E=;N`NF?|RLqB%Ctv HA7tPsjgGg6 literal 0 HcmV?d00001 diff --git a/build.sh b/build.sh index 0d1bb05..bdb05ac 100644 --- a/build.sh +++ b/build.sh @@ -1,3 +1,5 @@ +#!/bin/bash + echo "Compiling for 65c02" # Removing previous build diff --git a/docs/KernelRoutineList.txt b/docs/KernelRoutineList.txt index 0c0cc4c..52d077e 100755 --- a/docs/KernelRoutineList.txt +++ b/docs/KernelRoutineList.txt @@ -33,15 +33,16 @@ Hardware.s +- vram_write_color +- vram_read +- vram_dump + +- beep + +- set_activity_led + +- set_activity_led_duration + +- set_user_led + +- set_user_led_duration + +- expansion_set + +- expansion_get - beep - set_activity_led - set_user_led scan_keyboard - expansion_set - expansion_get - Int.s | +- int16_add_byte diff --git a/src/kernel/console.s b/src/kernel/console.s index c0f0baf..3843a7e 100755 --- a/src/kernel/console.s +++ b/src/kernel/console.s @@ -14,7 +14,7 @@ console_write: ; ToDo: ; Support for ASCII (0-32) Chars, Line feed etc. ; Support for Color codes => Maybe #$ff Indicator - ; Return propper work addresses in X & Y + ; Return propper work addresses in X & Y (for static support) ; stx z0 diff --git a/src/kernel/hardware.s b/src/kernel/hardware.s index 27c93d1..c067d23 100755 --- a/src/kernel/hardware.s +++ b/src/kernel/hardware.s @@ -98,3 +98,89 @@ vram_dump: rts +beep: + ; Beep + ; Beeps the main speaker + + ; Input: + ; A => Beep Duration + + ; Output: (none) + + sta beep_counter + + rts + +set_activity_led: + ; Set Activity LED + ; Sets the Activity LED Constant + + ; Input: + ; A => State + + ; Output: (none) + + rts + +set_user_led: + ; Set User LED + ; Sets the User LED Constant + + ; Input: + ; A => State + + ; Output: (none) + + rts + +set_activity_led_duration: + ; Set Activity LED Duration + ; Sets the Time (in Ticks), + ; where the Activity LED is HIGH + + ; Input: + ; A => Duration + + ; Output: (none) + + rts + +set_user_led_duration: + ; Set User LED Duration + ; Sets the Time (in Ticks), + ; where the User LED is HIGH + + ; Input: + ; A => Duration + + ; Output: (none) + + rts + +expansion_get: + ; Expansion Get + ; Gets Data from the Selected Expansion port, + ; at the given Port-Address + + ; Input: + ; X => Port Number + ; Y => Port Address + + ; Output: + ; A <= Read Data + + rts + +expansion_set: + ; Expansion Set + ; Sets Data from the Selected Expansion port, + ; at the given Port-Address + + ; Input: + ; A => Data + ; X => Port Number + ; Y => Port Address + + ; Output: (none) + + rts \ No newline at end of file diff --git a/src/variables.s b/src/variables.s index d16f00a..3ef4ca4 100755 --- a/src/variables.s +++ b/src/variables.s @@ -53,6 +53,14 @@ kernel_stack_counter = $420 ; 8 bit (internal) Length of Kernel Sta kernel_stack_offload_1 = $421 ; 8 bit (internal) General Kernel Stack Offload Variable kernel_stack_offload_2 = $422 ; 8 bit (internal) .. +beep_counter = $423 ; 8 bit (public) Beeper counter in IRQ Ticks +activity_led_counter = $424 ; 8 bit (public) Activity LED Counter in IRQ Ticks +user_led_counter = $425 ; 8 bit (public) User LED Counter in IRQ Ticks + + + + + ; END => $500 diff --git a/upload.sh b/upload.sh index b0685bb..5fa4b63 100644 --- a/upload.sh +++ b/upload.sh @@ -1,3 +1,5 @@ +#!/bin/bash + echo -e "\nUploading..." bold=$(tput bold)