diff options
| author | Harley Travis <harleytravis123@outlook.com> | 2026-07-04 16:32:19 -0500 |
|---|---|---|
| committer | Harley Travis <harleytravis123@outlook.com> | 2026-07-04 16:32:19 -0500 |
| commit | 21de21e606f3768edcce9bfecf327d3a3a60f53f (patch) | |
| tree | 00090f54e57982e6d39a9f310d55158968125572 /Examples/DskImg.HC | |
| parent | 6b221d797ec59bb2e869b9a80ea7088e68085178 (diff) | |
| download | templeos-floppy-driver-21de21e606f3768edcce9bfecf327d3a3a60f53f.tar.gz | |
Fix DskImg.HC
I decided to allocate the drive's BlkDev object separately, which also fixed an error in the code when I tested it.
Diffstat (limited to 'Examples/DskImg.HC')
| -rw-r--r-- | Examples/DskImg.HC | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Examples/DskImg.HC b/Examples/DskImg.HC index f5fc1f5..72afe72 100644 --- a/Examples/DskImg.HC +++ b/Examples/DskImg.HC @@ -12,9 +12,10 @@ U8 DskImg() U64 i; // Replace W with the letter you mounted your floppy as. CDrv *dv=Let2Drv('W'); + CBlkDev *bd=dv->blkdev; // Open image file for writing - CFile *img = FOpen("Floppy.IMG","w",dv->size*dv->bd->blk_size); + CFile *img = FOpen("Floppy.IMG","w",dv->size*bd->blk_size); //Read every sector on the disk to the file BlkRead(dv,img,0,bd->max_blk); |
