From: Alan Cox Date: Thu, 9 Nov 2017 01:19:26 +0000 (+0000) Subject: z80pack: switch to net_native X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=5a72772e533d5bca8b42052b3680b5289babccf9;p=FUZIX.git z80pack: switch to net_native Fix some related tty bugs --- diff --git a/Kernel/dev/z80pack/devtty.c b/Kernel/dev/z80pack/devtty.c index ec66a44c..60d8d1cf 100644 --- a/Kernel/dev/z80pack/devtty.c +++ b/Kernel/dev/z80pack/devtty.c @@ -46,8 +46,10 @@ char tty_writeready(uint8_t minor) return TTY_READY_NOW; if (minor == 2) s = tty2stat; - else + else if (minor == 3) s = tty3stat; + else + s = tty4stat; return s & 2 ? TTY_READY_NOW: TTY_READY_LATER; } @@ -86,7 +88,7 @@ void tty_pollirq(void) } while(tty4stat & 1) { c = tty4data; - tty_inproc(3, c); + tty_inproc(4, c); } if ((ttypoll & 4) && (tty2stat & 2)) { ttypoll &= ~4; @@ -96,8 +98,8 @@ void tty_pollirq(void) ttypoll &= ~8; wakeup(&ttydata[3]); } - if ((ttypoll & 8) && (tty4stat & 2)) { - ttypoll &= ~8; + if ((ttypoll & 16) && (tty4stat & 2)) { + ttypoll &= ~16; wakeup(&ttydata[4]); } } diff --git a/Kernel/platform-z80pack/Makefile b/Kernel/platform-z80pack/Makefile index 28a04320..8406aefb 100644 --- a/Kernel/platform-z80pack/Makefile +++ b/Kernel/platform-z80pack/Makefile @@ -1,8 +1,8 @@ DSRCS = ../dev/z80pack/devlpr.c ../dev/z80pack/devtty.c ../dev/z80pack/devfd.c ../dev/z80pack/devrtc.c #NSRCS = ../dev/net/net_at.c -#NSRCS = ../dev/net/net_native.c -NSRCS = ../dev/net/net_z80pack.c +NSRCS = ../dev/net/net_native.c +#NSRCS = ../dev/net/net_z80pack.c CSRCS += devices.c main.c ASRCS = crt0.s z80pack.s diff --git a/Kernel/platform-z80pack/README b/Kernel/platform-z80pack/README index 4ee0657c..00a1d972 100644 --- a/Kernel/platform-z80pack/README +++ b/Kernel/platform-z80pack/README @@ -9,7 +9,8 @@ Bank 0: 0081-0084 Saved CP/M command info 0088 UZI kernel start ???? UZI kernel end ~= A000 -E000 Discard (blown away by user processes) +(big kernels go up to E400 or so!) +E800 Discard (blown away by user processes) End of kernel: Common >= 0xF000 uarea uarea stack @@ -32,12 +33,12 @@ ED00-EFFF uarea stash Disk swap device recommended Put the kernel at the end of a floppy image from cyl 60 -Add the fs in the first 60 cyls (390 blocks) +Add the fs in the first 58 cyls (366 blocks) Put the bootblock in sector 0 -dd the kernel image to offset 199680 +dd the kernel image to offset 193024 ie -dd if=fuzix.bin of=drivea.cpm bs=1 seek=199680 conv=notrunc +dd if=fuzix.bin of=drivea.cpm bs=1 seek=193024 conv=notrunc diff --git a/Kernel/platform-z80pack/bootblock.s b/Kernel/platform-z80pack/bootblock.s index 887293fe..79e7cfd9 100644 --- a/Kernel/platform-z80pack/bootblock.s +++ b/Kernel/platform-z80pack/bootblock.s @@ -5,7 +5,7 @@ ; ; Floppy loader: ; Our boot disc is 77 tracks of 26 x 128 byte sectors, and we put -; the OS on tracks 60+, which means we can put a file system in the +; the OS on tracks 58+, which means we can put a file system in the ; usual place providing its a bit smaller than a whole disc. ; ; @@ -31,10 +31,10 @@ diskload: di ld b, a out (17), a ; sector high always 0 out (10), a ; drive always 0 - ld a, #59 ; start on track 60 + ld a, #57 ; start on track 58 out (11), a exx - ld c, #17 ; number of tracks to load (56Kish) + ld c, #19 ; number of tracks to load (56Kish) load_tracks: in a, (11) inc a ; track out (11), a diff --git a/Kernel/platform-z80pack/config.h b/Kernel/platform-z80pack/config.h index 3a371083..c953c12e 100644 --- a/Kernel/platform-z80pack/config.h +++ b/Kernel/platform-z80pack/config.h @@ -1,17 +1,15 @@ /* We have an RTC */ #define CONFIG_RTC /* Enable to make ^Z dump the inode table for debug */ -#define CONFIG_IDUMP +#undef CONFIG_IDUMP /* Enable to make ^A drop back into the monitor */ #undef CONFIG_MONITOR /* Profil syscall support (not yet complete) */ -#define CONFIG_PROFIL +#undef CONFIG_PROFIL /* Multiple processes in memory at once */ #define CONFIG_MULTI /* Single tasking */ #undef CONFIG_SINGLETASK -/* CP/M emulation */ -#undef CONFIG_CPM_EMU /* Fixed banking */ #define CONFIG_BANK_FIXED /* 8 60K banks, 1 is kernel */ @@ -21,6 +19,7 @@ #define CONFIG_LEVEL_2 /* Networking (not usable yet but for debug/development) */ #define CONFIG_NET +#define CONFIG_NET_NATIVE /* Banks as reported to user space */ #define CONFIG_BANKS 1 @@ -49,7 +48,7 @@ #define TTYDEV BOOT_TTY /* Device used by kernel for messages, panics */ #define SWAPDEV (256 + 1) /* Device for swapping. (z80pack drive J) */ -#define NBUFS 10 /* Number of block buffers */ +#define NBUFS 8 /* Number of block buffers */ #define NMOUNTS 4 /* Number of mounts at a time */ #define platform_discard() diff --git a/Kernel/platform-z80pack/fuzix.lnk b/Kernel/platform-z80pack/fuzix.lnk index 4597e59b..a3478a33 100644 --- a/Kernel/platform-z80pack/fuzix.lnk +++ b/Kernel/platform-z80pack/fuzix.lnk @@ -2,7 +2,7 @@ -i fuzix.ihx -b _CODE=0x0088 -b _COMMONMEM=0xF000 --b _DISCARD=0xE400 +-b _DISCARD=0xE880 -l z80 platform-z80pack/crt0.rel platform-z80pack/commonmem.rel @@ -40,5 +40,5 @@ level2.rel syscall_level2.rel syscall_net.rel select.rel -platform-z80pack/net_z80pack.rel +platform-z80pack/net_native.rel -e diff --git a/Kernel/platform-z80pack/main.c b/Kernel/platform-z80pack/main.c index 6bc74af7..e3d9c0a8 100644 --- a/Kernel/platform-z80pack/main.c +++ b/Kernel/platform-z80pack/main.c @@ -30,7 +30,7 @@ void platform_interrupt(void) tty_pollirq(); timer_interrupt(); // netat_poll(); - netz_poll(); +// netz_poll(); } /* Nothing to do for the map of init */