From fcbbfe88a267898393da914e05fd517c0cba9f05 Mon Sep 17 00:00:00 2001 From: aramya <22577625+thamugadi@users.noreply.github.com> Date: Mon, 11 Oct 2021 03:14:39 +0100 Subject: [PATCH] mouse --- Makefile | 2 +- entry/boot.c | 8 +++++--- loader/load.fth | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3607bd5..d76fbdb 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ start.elf: entry/start.s clean: rm *.APM *elf *txt run: - $(QEMU) -hda *.APM -g $(RES) -machine $(MACHINE) + $(QEMU) -hda *.APM -g $(RES) -machine $(MACHINE) debug: $(QEMU) -hda *.APM -d in_asm -g $(RES) -machine $(MACHINE) all: diff --git a/entry/boot.c b/entry/boot.c index 992067f..3c37baa 100644 --- a/entry/boot.c +++ b/entry/boot.c @@ -6,12 +6,13 @@ #define __VRAM__MAC99 0x81000000 #define __BIOS__MAC99 0XFFF00000 +#define __MOUSE__MAC99 0x8008003C unsigned char IO_TYPE; unsigned char* p_vram; unsigned char* p_bios; -unsigned char* p_usb_keyboard; -unsigned char* p_usb_mouse; +unsigned char* p_keyboard; +unsigned char* p_mouse; void get_io_type(void) { if (*(unsigned char*)__VRAM__BEIGE == beige) IO_TYPE = beige; @@ -28,6 +29,7 @@ void init(void) { p_vram = __VRAM__MAC99; p_bios = __BIOS__MAC99; + p_mouse=__MOUSE__MAC99; } } @@ -38,7 +40,7 @@ void main(void) //fillscreen(85,100,85, 0x100000); for(;;) { - memcpy(0x81000000, 0x81000001, 0x10000); + memcpy_24bit(0x81000000, p_mouse, 0x1, 0x100000); } } diff --git a/loader/load.fth b/loader/load.fth index dd4ff18..56d5ad5 100644 --- a/loader/load.fth +++ b/loader/load.fth @@ -18,5 +18,7 @@ fba mac99-vram = if ." mac99" cr 100 0 do 05A i mac99-vram + c! loop then fba beige-vram diff fba mac99-vram diff and if hardware-error cr 0 run ! then run @ 0 = if 1 0 do 0 +loop then - +80080000 100 dump +80080000 100 dump +80080000 100 dump boot hd:,\boot\kernel.elf