trs80: update to match changed behaviour
authorAlan Cox <alan@linux.intel.com>
Fri, 28 Sep 2018 22:38:44 +0000 (23:38 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 28 Sep 2018 22:38:44 +0000 (23:38 +0100)
Kernel/platform-trs80/devtty.c
Kernel/platform-trs80/discard.c
Kernel/platform-trs80/trs80-bank.s
Kernel/platform-trs80/trs80.s

index 249ea2b..edaabd9 100644 (file)
@@ -137,7 +137,7 @@ static const uint8_t trssize[4] = {
     0x00, 0x40, 0x20, 0x60
 };
 
-void tty_setup(uint8_t minor)
+void tty_setup(uint8_t minor, uint8_t flags)
 {
     uint8_t baud;
     uint8_t ctrl;
index 57cd8be..9689202 100644 (file)
@@ -11,7 +11,7 @@ void device_init(void)
   inittod();
 #endif
   hd_probe();
-  tty_setup(3);
+  tty_setup(3, 0);
 }
 
 void map_init(void)
index 7fb10a3..5259b58 100644 (file)
@@ -8,10 +8,13 @@
             ; exported symbols
             .globl init_hardware
            .globl map_kernel
+           .globl map_kernel_di
            .globl map_process
+           .globl map_process_di
            .globl map_process_a
            .globl map_process_always
-           .globl map_save
+           .globl map_process_always_di
+           .globl map_save_kernel
            .globl map_restore
            .globl _opreg
            .globl _modout
@@ -126,6 +129,7 @@ bank94_absent:
 ;      base kernel bank
 ;
 map_kernel:
+map_kernel_di:
            push af
            ld a, (_opreg)
            and #0x8C           ; keep video bits
@@ -140,6 +144,7 @@ map_kernel:
 ;      selects how the upper bank decodes
 ;
 map_process:
+map_process_di:
            ld a, h
            or l
            jr z, map_kernel
@@ -182,6 +187,7 @@ nobank94:
            ret
 
 map_process_always:
+map_process_always_di:
            push af
            push hl
            ld hl, #U_DATA__U_PAGE
@@ -190,12 +196,18 @@ map_process_always:
            pop af
            ret
 
-map_save:   push af
+map_save_kernel:
+           push af
            ld a, (_opreg)
            and #0x73
            ld (opsave), a
            in a,(0x94)
            ld (save94), a
+           ld a, (_opreg)
+           and #0x8C           ; keep video bits
+           or #0x02            ; map 2, base memory
+           ld (_opreg), a
+           out (0x84), a       ; base memory so 0x94 doesn't matter
            pop af
            ret
 
index e66b08d..3c1448c 100644 (file)
            .globl map_kernel
            .globl map_process
            .globl map_process_a
-           .globl map_process_always
-           .globl map_save
-           .globl map_restore
            .globl _opreg
            .globl _modout
+           .globl _int_disabled
 
            .globl s__COMMONMEM
            .globl l__COMMONMEM
@@ -57,6 +55,9 @@ _bufpool:
 ; -----------------------------------------------------------------------------
             .area _COMMONMEM
 
+_int_disabled:
+           .db 0
+
 _platform_monitor:
            di
            halt