Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/emulators/gxemul/files/patch-src_devices_dev__wdc.c
19260 views
1
--- src/devices/dev_wdc.c.orig 2021-04-22 18:04:20 UTC
2
+++ src/devices/dev_wdc.c
3
@@ -274,12 +274,12 @@ void wdc__read(struct cpu *cpu, struct wdc_data *d)
4
+ (int64_t)d->head * d->sectors_per_track[d->drive] +
5
(int64_t)d->heads[d->drive] * d->sectors_per_track[d->drive] * cyl);
6
7
-#if 0
8
+#if 1
9
/* LBA: */
10
if (d->lba)
11
offset = 512 * (((d->head & 0xf) << 24) + (cyl << 8)
12
+ d->sector);
13
- printf("WDC read from offset %lli\n", (long long)offset);
14
+ debug("WDC read from offset %lli\n", (long long)offset);
15
#endif
16
17
while (count > 0) {
18
@@ -320,12 +320,12 @@ void wdc__write(struct cpu *cpu, struct wdc_data *d)
19
uint64_t offset = 512 * (d->sector - 1
20
+ (int64_t)d->head * d->sectors_per_track[d->drive] +
21
(int64_t)d->heads[d->drive] * d->sectors_per_track[d->drive] * cyl);
22
-#if 0
23
+#if 1
24
/* LBA: */
25
if (d->lba)
26
offset = 512 * (((d->head & 0xf) << 24) +
27
(cyl << 8) + d->sector);
28
- printf("WDC write to offset %lli\n", (long long)offset);
29
+ debug("WDC write to offset %lli\n", (long long)offset);
30
#endif
31
32
d->write_in_progress = d->cur_command;
33
34