Skip to content

Commit

Permalink
Merge pull request #1134 from six809/coco3-rgb-monitor-detect
Browse files Browse the repository at this point in the history
coco3: fix RGB monitor detect
  • Loading branch information
EtchedPixels authored Jan 8, 2025
2 parents 6895a88 + 0aea695 commit 3f76948
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Kernel/platform/platform-coco3/coco3.s
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ init_hardware:
;; High speed poke
sta 0xffd9 ; high speed poke
sta 0xffdf ; RAM mode
;; configure PIA1B to read monitor detect line
clr $ff23
ldd #$f037
std $ff22
;; set system RAM size
jsr _scanmem ; X = number of pages
tfr x,d
Expand Down
2 changes: 1 addition & 1 deletion Kernel/platform/platform-coco3/devtty.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ void devtty_init()
/* set default keyboard delay/repeat rates */
keyrepeat.first = REPEAT_FIRST * (TICKSPERSEC / 10);
keyrepeat.continual = REPEAT_CONTINUAL * (TICKSPERSEC / 10);
is_rgb = *((volatile uint8_t *)0xFF22) & 8;
is_rgb = (*((volatile uint8_t *)0xFF22) & 8) == 0;
if (is_rgb)
apply_defmode(0);
else {
Expand Down

0 comments on commit 3f76948

Please sign in to comment.