-CSRCS = devtty.c ttydw.c mbr.c
+CSRCS = ttydw.c mbr.c
CSRCS += devices.c main.c libc.c devsdc.c
DSRCS = ../dev/devdw.c ../dev/blkdev.c ../dev/devide.c
rm -f $(OBJS) $(JUNK) core *~
image:
- $(CROSS_CC) $(CROSS_CCOPTS) -O0 -c -o ../bank16k.o ../bank16k.c
+ $(CROSS_CC) $(CROSS_CCOPTS) -O0 -c -o ../bank16k.o ../bank16k.c
+ $(CROSS_CC) $(CROSS_CCOPTS) -O0 -c -o devtty.o devtty.c
$(CROSS_LD) -o ../fuzix.bin --map=../fuzix.map --script=fuzix.link \
crt0.o commonmem.o \
coco3.o ../start.o ../version.o ../lowlevel-6809.o \
// #define CONFIG_VT_SIMPLE
/* Vt definitions */
#define VT_BASE (uint8_t *)0xb400
-#define VT_WIDTH 80
-#define VT_HEIGHT 21
-#define VT_RIGHT 79
-#define VT_BOTTOM 20
+#define VT_WIDTH curpty->width
+#define VT_HEIGHT curpty->height
+#define VT_RIGHT curpty->right
+#define VT_BOTTOM curpty->bottom
#define VT_INITIAL_LINE 0
extern unsigned char vt_map( unsigned char c );
-static struct pty {
- unsigned char *base; /* base of buffer in cpu space */
- unsigned char *cpos; /* current location of cursor */
- unsigned char csave; /* charactor that is under the cursor */
- struct vt_switch vt; /* the vt.o module's state */
- unsigned int scrloc; /* location to put into gimme */
-};
+//static struct pty {
+// unsigned char *base; /* base of buffer in cpu space */
+// unsigned char *cpos; /* current location of cursor */
+// unsigned char csave; /* charactor that is under the cursor */
+// struct vt_switch vt; /* the vt.o module's state */
+// unsigned int scrloc; /* location to put into gimme */
+// unsigned char gime; /* video register settings of this tty */
+// unsigned char width; /* text width of screen */
+// unsigned char height; /* text height */
+// unsigned char right; /* right most coord */
+// unsigned char bottom; /* bottom most coord */
+//};
static struct pty ptytab[] = {
- {(unsigned char *) 0xb400, NULL, 0, {0, 0, 0, 0}, 0xb400 / 8},
- {(unsigned char *) 0xac80, NULL, 0, {0, 0, 0, 0}, 0xac80 / 8}
+ {
+ (unsigned char *) 0xb400,
+ NULL,
+ 0,
+ {0, 0, 0, 0},
+ 0xb400 / 8,
+ 0x14, /* 80 column */
+ 80,
+ 21,
+ 79,
+ 20
+ },
+ {
+ (unsigned char *) 0xac80,
+ NULL,
+ 0,
+ {0, 0, 0, 0},
+ 0xac80 / 8,
+ 0x0c, /* 40 column */
+ 40,
+ 21,
+ 39,
+ 20
+ }
};
vt_save(&curpty->vt);
curpty = &ptytab[0];
*(unsigned int *) 0xff9d = curpty->scrloc;
+ *(unsigned char *) 0xff99 = curpty->gime;
vt_load(&curpty->vt);
curminor = 1;
return;
vt_save(&curpty->vt);
curpty = &ptytab[1];
*(unsigned int *) 0xff9d = curpty->scrloc;
+ *(unsigned char *) 0xff99 = curpty->gime;
vt_load(&curpty->vt);
curminor = 2;
return;
#ifndef __DEVTTY_DOT_H__
#define __DEVTTY_DOT_H__
+#include <../include/vt.h>
+
+static struct pty {
+ unsigned char *base; /* base of buffer in cpu space */
+ unsigned char *cpos; /* current location of cursor */
+ unsigned char csave; /* charactor that is under the cursor */
+ struct vt_switch vt; /* the vt.o module's state */
+ unsigned int scrloc; /* location to put into gimme */
+ unsigned char gime; /* video register settings of this tty */
+ unsigned char width; /* text width of screen */
+ unsigned char height; /* text height */
+ unsigned char right; /* right most coord */
+ unsigned char bottom; /* bottom most coord */
+};
+
+extern struct pty *curpty;
int my_tty_close( uint8_t minor ); /* wrapper call to close DW ports */