z80pack: switch to net_native
authorAlan Cox <alan@linux.intel.com>
Thu, 9 Nov 2017 01:19:26 +0000 (01:19 +0000)
committerAlan Cox <alan@linux.intel.com>
Thu, 9 Nov 2017 01:19:26 +0000 (01:19 +0000)
Fix some related tty bugs

Kernel/dev/z80pack/devtty.c
Kernel/platform-z80pack/Makefile
Kernel/platform-z80pack/README
Kernel/platform-z80pack/bootblock.s
Kernel/platform-z80pack/config.h
Kernel/platform-z80pack/fuzix.lnk
Kernel/platform-z80pack/main.c

index ec66a44..60d8d1c 100644 (file)
@@ -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]);
     }
 }    
index 28a0432..8406aef 100644 (file)
@@ -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
index 4ee0657..00a1d97 100644 (file)
@@ -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
index 887293f..79e7cfd 100644 (file)
@@ -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
index 3a37108..c953c12 100644 (file)
@@ -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()
index 4597e59..a3478a3 100644 (file)
@@ -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
index 6bc74af..e3d9c0a 100644 (file)
@@ -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 */