From ea304dc288600c1d97b10a93006c85be3a6b1134 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 6 Jul 2018 01:12:51 +0100 Subject: [PATCH] trs80m1: report presence of hr1g globally We need this unfortunate visibility because if you have an HR1G you can't have an Alpha joystick (polling the joystick turns off the graphics card!) --- Kernel/platform-trs80m1/devgfx.c | 2 ++ Kernel/platform-trs80m1/devgfx.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Kernel/platform-trs80m1/devgfx.c b/Kernel/platform-trs80m1/devgfx.c index d7feb4df..047ebcb4 100644 --- a/Kernel/platform-trs80m1/devgfx.c +++ b/Kernel/platform-trs80m1/devgfx.c @@ -17,6 +17,7 @@ __sfr __at 0x82 gfx_data; __sfr __at 0x83 gfx_ctrl; __sfr __at 0xFF ioctrl; +uint8_t has_hr1g; static uint8_t max_mode = 0; static struct display trsdisplay[4] = { @@ -162,6 +163,7 @@ void gfx_init(void) if (hrg_data != 0xFF) { /* We ought to test more carefully */ max_mode = 1; displaymap[1] = 3; + has_hr1g = 1; } } else if (trs80_model == TRS80_MODEL3) { /* The model 3 might have an 80-Grafix UDG card, or a Graphyx diff --git a/Kernel/platform-trs80m1/devgfx.h b/Kernel/platform-trs80m1/devgfx.h index db1ac10f..ba30f993 100644 --- a/Kernel/platform-trs80m1/devgfx.h +++ b/Kernel/platform-trs80m1/devgfx.h @@ -6,4 +6,6 @@ extern int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr); extern void gfx_init(void); +extern uint8_t has_hr1g; + #endif -- 2.34.1