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

Changing the physical format of a disk truncates data that should be saved #29

Open
yosinda opened this issue Dec 30, 2024 · 4 comments

Comments

@yosinda
Copy link
Contributor

yosinda commented Dec 30, 2024

Cause:
The core does not have the ability to extend the size allocated to a track in an existing D88 image file.
If you change the physical format to expand the size of a track, the core truncates the data that does not fit.

Workaround:
Use a disk image with sufficient track size as the blank disk.

Blank_disk_2D.zip

@yosinda
Copy link
Contributor Author

yosinda commented Dec 30, 2024

Details:

For PC88, the N88-BASIC format is commonly used.
However, third parties have changed the sector size to allow for larger capacities.

N88-BASIC: 256 bytes/sector x 16 = 4,096 bytes/track
Example A: 512 bytes/sector x 9 = 4,608 bytes/track
Example B: 1,024 bytes/sector x 5 = 5,120 bytes/track

The blank disk image file is created to fit the N88-BASIC format.
Also, each sector has a 16-byte header in D88 image.
The size of one track is 4,352 bytes.

(256+16)*16= 4352

Formatted with example A, it is 4,752 bytes.

(512+16)*9= 4752

The last sector has 400 bytes that are over the image file allocation, so it is truncated by the core.

When the image is loaded, the missing 400 bytes are read from the beginning of the next track.
The data in the last sector is not what the program is expecting, resulting in strange behavior.

@wwark
Copy link
Collaborator

wwark commented Dec 31, 2024

Thank you for thé sharing

@yosinda
Copy link
Contributor Author

yosinda commented Jan 1, 2025

If you are having issues with a game that requires you to create a "user disk" from a blank disk,
please try creating one using the blank disk attached to my 1st post.

@wwark
Copy link
Collaborator

wwark commented Jan 2, 2025

Ok I'm not my home for some days will try it and new PR !
Have a nice day !

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

No branches or pull requests

2 participants