Skip to content

Conversation

@cold-brewed
Copy link
Contributor

Summary

When creating a new hdd image in qt, there were a few issues:

  • If the image to be created was greater than a certain size, bit 32 and above would get lopped off resulting in the wrong size created.
  • Once an image with > 16 heads was written to config, the image config would be changed and head count clamped to 16.
  • If you type in an image file (as opposed to using the file picker) in the new HD image dialog, the resulting file would get placed in $CWD instead of usr_path. The image file would be created, but in the wrong location. As soon as the settings were confirmed the image file would then be created in usr_path resulting in two image files.

To fix:

  • The image size logic was happening as a 32-bit unsigned int due to toUInt() grabbing the calculated number. Changed the qt type to unsigned long long via toULongLong(). Changed the size var to quint64.
  • Updated config.c max settings to match win_settings.c.
  • Added a section in qt_harddiskdialog.cpp to add usr_path to the filename if the path is relative

Note: config.c should be updated to use constants for max_spt, max_hpc, etc. for each bus. I figured it would be better to add those in a separate PR.

Checklist

  • I have discussed this with core contributors already

References

N/A

@jriwanek jriwanek self-requested a review November 13, 2022 18:51
@jriwanek jriwanek merged commit 702371a into 86Box:master Nov 13, 2022
@cold-brewed cold-brewed deleted the hd-img-create-large branch November 27, 2022 18:32
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

Successfully merging this pull request may close these issues.

2 participants