From: Alan Cox Date: Sat, 16 May 2015 00:30:51 +0000 (+0100) Subject: trs80: fix swapping - bug in devhd handling of cylinder boundaries X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1d3c02d9a3ee341265f1ae2550f893302acf00b8;p=FUZIX.git trs80: fix swapping - bug in devhd handling of cylinder boundaries --- diff --git a/Kernel/platform-trs80/devhd.c b/Kernel/platform-trs80/devhd.c index 71064159..069c4059 100644 --- a/Kernel/platform-trs80/devhd.c +++ b/Kernel/platform-trs80/devhd.c @@ -144,8 +144,8 @@ int hd_transfer(uint8_t minor, bool is_read, uint8_t rawflag) dptr += 256; sector++; /* Cheaper than divison! */ - if (sector == 33) { - sector = 1; + if (sector == 32) { + sector = 0; head++; if (head == p->g.head) { head = 0;