From ce19e7021a9c7b849eca02aae411ec20af8a74cf Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 29 Mar 2015 10:20:06 +0100 Subject: [PATCH] px4plus: get it all building again Still much left to do before it'll be bootable. --- Kernel/platform-px4plus/Makefile | 2 +- Kernel/platform-px4plus/fuzix.lnk | 1 + Kernel/platform-px4plus/px4plus.s | 4 +--- Kernel/platform-px4plus/sio-asm.s | 3 ++- Kernel/platform-px4plus/sio.c | 4 ++-- Kernel/platform-px4plus/sio.h | 3 ++- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Kernel/platform-px4plus/Makefile b/Kernel/platform-px4plus/Makefile index 7bb6c689..4e5d695d 100644 --- a/Kernel/platform-px4plus/Makefile +++ b/Kernel/platform-px4plus/Makefile @@ -6,7 +6,7 @@ CCSRCS = main.c CDSRCS = init.c -ASRCS = crt0.s px4plus.s video.s +ASRCS = crt0.s px4plus.s video.s sio-asm.s ASRCS += tricks.s commonmem.s swapdev.s romdisc.s COBJS = $(CSRCS:.c=.rel) diff --git a/Kernel/platform-px4plus/fuzix.lnk b/Kernel/platform-px4plus/fuzix.lnk index 3083b6b8..9bee7b38 100644 --- a/Kernel/platform-px4plus/fuzix.lnk +++ b/Kernel/platform-px4plus/fuzix.lnk @@ -23,6 +23,7 @@ usermem.rel platform-px4plus/devfd.rel platform-px4plus/romdisc.rel platform-px4plus/sio.rel +platform-px4plus/sio-asm.rel platform-px4plus/devices.rel devio.rel filesys.rel diff --git a/Kernel/platform-px4plus/px4plus.s b/Kernel/platform-px4plus/px4plus.s index ebae1e5b..62baf8c0 100644 --- a/Kernel/platform-px4plus/px4plus.s +++ b/Kernel/platform-px4plus/px4plus.s @@ -21,8 +21,6 @@ .globl _carttype .globl platform_interrupt_all - .globl interrupt_fast - .globl _sio_count ; exported debugging tools .globl _trap_monitor @@ -109,7 +107,7 @@ init_early: init_hardware: ; FIXME: set video base and display properties first - ld a, #VIDBAEE + ld a, #VIDBASE out (0x08), a ; Video at 0xF800 ; Reset hardware scrolling ld a, #0x80 ; On, Y offset 0 diff --git a/Kernel/platform-px4plus/sio-asm.s b/Kernel/platform-px4plus/sio-asm.s index df2a2f1a..a1d781a2 100644 --- a/Kernel/platform-px4plus/sio-asm.s +++ b/Kernel/platform-px4plus/sio-asm.s @@ -6,6 +6,7 @@ .globl _sio_set_irq .globl _sio_release_irq + .globl _sio_count .globl interrupt_handler @@ -48,7 +49,7 @@ interrupt_fast: push hl ld a, #4 out (2), a ; ack the FRC interrupt - ld hl, _sio_count + ld hl, #_sio_count inc (hl) pop hl pop af diff --git a/Kernel/platform-px4plus/sio.c b/Kernel/platform-px4plus/sio.c index eb33c498..46b46610 100644 --- a/Kernel/platform-px4plus/sio.c +++ b/Kernel/platform-px4plus/sio.c @@ -43,8 +43,8 @@ int sio_read(uint8_t *buf, int len) { while(len--) { while(!(artsr & 2)) - if (sio_count >= 1000) /* 10 seconds */ - return -ETIMEDOUT; + if (sio_count >= 100) /* 10 seconds */ + return -EIO; *buf++ = artwr; sio_count = 0; } diff --git a/Kernel/platform-px4plus/sio.h b/Kernel/platform-px4plus/sio.h index 477739f4..0a9fcf8d 100644 --- a/Kernel/platform-px4plus/sio.h +++ b/Kernel/platform-px4plus/sio.h @@ -13,5 +13,6 @@ extern int sio_read(uint8_t *buf, int len); /* These don't truely belong here but it will do for now */ extern void read_from_bank(void); +extern uint8_t sio_count; /* 10ths of a second */ -#endif \ No newline at end of file +#endif -- 2.34.1