Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to use HxCFloppyEmulator to remove padding from an image but results in missing sector #4

Open
n6il opened this issue Apr 20, 2023 · 3 comments

Comments

@n6il
Copy link

n6il commented Apr 20, 2023

Goal: Convert a FLEX DSK image with padding on Track 0 into a DMK file without padding
Method: Made a custom XML which skips the padding sectors on Track 0
Result: Using the raw importer and the XML results in one missing sector at the end
Versions Used: 2.5.6.6(Win) 2.14.4.1(Mac), 2.14.6.2(Mac)

The FLEX disk in question is a relatively standard one.
Track 0: IBM_FM 10 sectors 256 bytes
Tracks 1-34 IBM_MFM 18 sectors 256 bytes
Sides: 1

The CCSPELL.DSK disk image is a sector image with padding. All tracks in this image, including track 0, have 18 sectors. So as stated in the goal, I want to remove the padding sectors. I created the custom XML which reads the first 10 sectors of track 0, then the offset where track 1 starts skips over the 8 padding sectors. If I import the disk image using this XML the result is that the last sector of Track 34 Sector 18 is always missing -- the data is filled with the fill value instead of the actual data. Everything else in the image other than this correct.

As an experiment I made a test image (test.dsk) For this image I appended 2560 additional bytes on the end of CCSPELL.DSK. When I use the XML to import this file then the missing sector is present. The results of this experiment suggest that something is getting confused somewhere when the image is being imported.

Attachments in the Zip File
CCSPELL.DSK
DiskLayout_FLEX_SSDD_35T_padding_removed.xml
test.dsk
ccspell.zip

@jfdelnero
Copy link
Owner

Hello, Thanks for reporting this issue.

The bug is now fixed :
https://hxc2001.com/download/floppy_drive_emulator/HxCFloppyEmulator_soft_beta.zip

@n6il
Copy link
Author

n6il commented Apr 21, 2023

Thanks so much for the quick fix! I verified that it works correctly now, it did indeed seem like an off-by-one somewhere.

If you don't mind if I ask a related question... If I wanted to put the padding back in, how would I do that with HxCFloppyEmulator Software? Is there something I can put in the XML so it will add empty sectors which only contain the fill value?

@jfdelnero
Copy link
Owner

I need to add an xml guided export function to support this.
This shouldn't be too hard to add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants