And do a quick swizzle on the lines to avoid having two keymaps.
The platform detect is a bit dubious - possibly some magic ROM location would
be safer.
50/60Hz also needs doing but that's a timing loop problem I think
.globl init_early
.globl init_hardware
.globl kstack_top
+ .globl _system_id
; startup code
.area .start
start:
+ ldb $80FD ; save from ROM space
; text may be in memory bank 0
jsr map_kernel
jmp main
bss_wipe: sta ,x+
leay -1,y
bne bss_wipe
-
+ ; This might be in BSS so don't save until we've wiped!
+ lda #0
+ cmpb #0x49 ; Dragon32
+ beq identified
+ inca
+ cmpb #0x50 ; COCO3
+ beq identified
+ inca ; Guess it's a COCO ?
+identified:
+ sta _system_id ; what sort of a box are we ?
jsr init_early
jsr init_hardware
jsr _fuzix_main
static uint8_t keybyte, keybit;
static uint8_t newkey;
static int keysdown = 0;
+/* FIXME: shouldn't COCO shiftmask also differ ??? 0x02 not 0x40 ?? */
static uint8_t shiftmask[8] = {
0, 0x40, 0, 0, 0, 0, 0, 0x40
};
}
keymap[i] = keyin[i];
}
+ if (system_id) { /* COCO series */
+ keybit += 2;
+ if (keybit > 5)
+ keybit -= 6;
+ }
}
#ifdef CONFIG_COCO_KBD
#include <devtty.h>
uint8_t membanks;
+uint8_t system_id;
void platform_idle(void)
{