Небольшие исправления

This commit is contained in:
Aren Elchinyan 2023-12-28 23:57:07 +03:00
parent 2d0a37f6a5
commit b9d186cc2f
4 changed files with 20 additions and 6 deletions

View File

@ -1,3 +1,3 @@
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 1 #define VERSION_MINOR 1
#define VERSION_BUILD 897 #define VERSION_BUILD 899

View File

@ -15,6 +15,8 @@
#include <tool.h> #include <tool.h>
#include <version.h> #include <version.h>
char (*getc)( );
// Точка входа // Точка входа
void _start( ) { void _start( ) {
asm volatile("cli"); asm volatile("cli");
@ -42,13 +44,19 @@ void _start( ) {
if (mod == NULL) { if (mod == NULL) {
fb_set_text_color(0xFF0000); fb_set_text_color(0xFF0000);
fb_printf("\tТребуется модуль ps2.ko!\n"); fb_printf("\tТребуется модуль ps2.ko!\n");
getc = NULL;
} else { } else {
fb_printf("\nОбнаружен модуль клавиатуры: %s\n", mod->name); fb_printf("\nОбнаружен модуль клавиатуры: %s\n", mod->name);
getc = mod->get_func(1);
} }
fb_set_text_color(0x00D000); fb_set_text_color(0x00D000);
asm volatile("sti"); asm volatile("sti");
for (;;) { asm volatile("hlt"); } for (;;) {
asm volatile("hlt");
if (getc) { fb_printf("%c", getc( )); }
}
} }

7
modules/modules.json Normal file
View File

@ -0,0 +1,7 @@
[
{
"info": "Официальный репозиторий модулей",
"git": "https://git.synapseos.ru/Aren/BMOSP_repo.git",
"list": []
}
]

View File

@ -86,7 +86,7 @@ static void handler( ) {
while (!(inb(0x64) & 1)) { asm volatile("pause"); } while (!(inb(0x64) & 1)) { asm volatile("pause"); }
uint8_t scancode = inb(0x60); uint8_t scancode = inb(0x60);
char c = ' \0'; char c = '\0';
if (scancode == 0xE0) { if (scancode == 0xE0) {
current_state = PREFIX_STATE; current_state = PREFIX_STATE;
@ -100,20 +100,19 @@ static void handler( ) {
} }
if (is_shift(scancode) != 0) { if (is_shift(scancode) != 0) {
keyboard_buffer->shift_pressed = is_shift(scancode); keyboard_buffer.shift_pressed = is_shift(scancode);
after_interrupt( ); after_interrupt( );
return; return;
} }
if (is_ctrl(scancode) != 0) { if (is_ctrl(scancode) != 0) {
keyboard_buffer->ctrl_pressed = is_ctrl(scancode); keyboard_buffer.ctrl_pressed = is_ctrl(scancode);
after_interrupt( ); after_interrupt( );
return; return;
} }
if (current_state == PREFIX_STATE) { current_state = NORMAL_STATE; } if (current_state == PREFIX_STATE) { current_state = NORMAL_STATE; }
if (ru) { if (ru) {
if (keyboard_buffer.shift_pressed) { if (keyboard_buffer.shift_pressed) {
c = ru_chars_shifted[scancode]; c = ru_chars_shifted[scancode];