Skip to content

Commit

Permalink
coco3: Fix video size switching
Browse files Browse the repository at this point in the history
Main problem was that the data was in the wrong segment so existed once per
task.
  • Loading branch information
EtchedPixels committed Dec 31, 2024
1 parent 9b17be6 commit 949bbbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Kernel/platform/platform-coco3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ apply, so "BOOT=FUZIX.BIN:1" works as expected.
## Emulation

### Xroar
xroar -machine coco3 -cart ide -cart-rom hdblba13.rom -load-hd0 Images/coco3/disk.ing
xroar -machine coco3 -cart ide -cart-rom hdblba13.rom -load-hd0 Images/coco3/disk.img

Options specify -ccr none.

Expand Down
8 changes: 5 additions & 3 deletions Kernel/platform/platform-coco3/devtty.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ void apply_gime(int minor)
*(volatile uint8_t *) 0xff98 = (hz & 0x78) | p->vmod;
*(volatile uint8_t *) 0xff99 = p->vres;
*(volatile uint8_t *) 0xff9a = p->border;
twidth = curtty->width << 1; /* One word per symbol */
theight = curtty->height;
twidth = p->width << 1; /* One word per symbol */
theight = p->height;
}

/* A wrapper for tty_close that closes the DW port properly */
Expand Down Expand Up @@ -467,8 +467,10 @@ int gfx_ioctl(uint_fast8_t minor, uarg_t arg, char *ptr)
if (m > 4)
goto inval;
memcpy(&(ttytab[minor - 1].vmod), &(mode[m]), sizeof(struct mode_s));
if (minor == curminor)
if (minor == curminor) {
vt_load(&curtty->vt);
apply_gime(minor);
}
return 0;
}
case GFXIOC_DRAW:
Expand Down
1 change: 1 addition & 0 deletions Kernel/platform/platform-coco3/videoll.s
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ scrdnt:
puls u,y,cc
rts

.area .videodata
_twidth:
.byte 160
_theight:
Expand Down

0 comments on commit 949bbbe

Please sign in to comment.