henrikstengaard / hst-imager

Hst Imager is an imaging tool to read and write disk images to and from physical drives
MIT License
21 stars 1 forks source link

Proposed feature #3 - non-RDB images #4

Closed roc-eab closed 1 year ago

roc-eab commented 1 year ago

This is difficult and likely not feasible/appropriate.

The UAE4All (at least the PS-Vita version) unfortunately works only with non-RDB images. You have created a HstWB version for it, so you know this well.

Now, Hst-image is meant for mastering RDB images, while a non-RDB seems really out of scope.

Nevertheless, if this could create non-RDB images (I guess the only option is FFS here) it would close another corner-case.

Once again, thank you for your consideration.

henrikstengaard commented 1 year ago

Non-RDB images or single partition hdf files would require geometry defined for each command. However only following commands would be of interest for Non-RDB images:

Non-RDB images can currently be created by exporting a partition to a file. This will function same way as a Non-RDB image and WinUAE requires sectors set to 63 instead of 32 when added (63 if default sectors used when running rdb init).

henrikstengaard commented 1 year ago

I worked on support for formatting non-RDB partitions and seems to got it working with latest released version v0.9.257. This has only been tested with WinUAE and not with an emulator like UAE4ALL on a PS Vita.

Here's an example of creating and formatting a DOS\3 non-RDB partition image file.

hst.imager.exe blank dos3_non-rdb.hdf 10mb
hst.imager.exe rdb part format dos3_non-rdb.hdf 1 WorkbenchDOS3 --non-rdb --dos-type DOS3

And an example of creating and formatting a PFS\3 non-RDB partition image file.

hst.imager.exe blank pfs3_non-rdb.hdf 10mb
hst.imager.exe rdb part format pfs3_non-rdb.hdf 1 WorkbenchPFS3 --non-rdb --dos-type PFS3

Adding non-RDB in WinUAE requires setting geometry surfaces to 16 and sectors 63 (others if different CHS is used) and select file sys. winuae_dos3_non-rdb winuae_pfs3_non-rdb

Booting WinUAE with Amiga OS 3.1 Workbench adf and non-RDB image file shows following: amiga-os-310-workbench_004 amiga-os-310-workbench_003

roc-eab commented 1 year ago

Hi Henrik,

First of all, thanks for taking this challenge.

The non-rdb works well on the WinUAE !

There would be another change, to adjust it to the UAE4All requirements on the PS-Vita: https://github.com/rsn8887/uae4all2 (please scroll that page below to reach its FAQs)

UAE4All/PSVita requires the Surfaces to be respectively:

It is great that you added already the possibility either PFS3 or FFS (would be useful anyhow) but with the PS-Vita unfortunately only FFS would work, because to my knowledge in UAE4All/PSVita there is no such a way to push an extenal FS.

You know way better than me and don't need that, but this is the small summary I have done for me. Yes, I use the Surface 2 for the 0.95 GB image, because from my test it works anyhow.

image

Many, many thanks !

henrikstengaard commented 1 year ago

I have a PS Vita and need to do some testing to see what's possible. It sounds more like it's the size of the image thats the limiting factor and not what surfaces or sectors are used. But I do recall I prepared the UAE4ALL image files with surfaces set to 2 and sectors to 32. Maybe UAE4ALL supports PFS3 by manually editing the config files, I need to test it.

I knew it would be useful to tweak cylinders, heads and sectors so the option is already available to format with surfaces set to 2 and sectors set to 32 with following commands:

hst.imager.exe blank dos3_non-rdb.hdf 1900mb
hst.imager.exe rdb part format dos3_non-rdb.hdf 1 WorkbenchDOS3 --non-rdb -chs 0,2,32 --dos-type DOS3

The trick is the option -chs 0,2,32 when formatting, which sets cylinders to 0 (0 = max cylinders calculated), heads to 2 (same as surfaces) and sectors to 32.

The 2 commands outputs the following:

hst.imager.exe blank dos3_non-rdb.hdf 1900mb
[16:35:11 INF] Hst Imager v0.1.0 (12/09/2022 12:48:18)
[16:35:11 INF] Henrik Noerfjand Stengaard
[16:35:11 INF] [CMD] blank dos3_non-rdb.hdf 1900mb
[16:35:11 INF] Creating blank image at 'dos3_non-rdb.hdf'
[16:35:11 INF] Size '1.9 GB' (1992294400 bytes)
[16:35:11 INF] Done

hst.imager.exe rdb part format dos3_non-rdb.hdf 1 WorkbenchDOS3 --non-rdb -chs 0,2,32 --dos-type DOS3
[16:35:16 INF] Hst Imager v0.1.0 (12/09/2022 12:48:18)
[16:35:16 INF] Henrik Noerfjand Stengaard
[16:35:16 INF] [CMD] rdb part format dos3_non-rdb.hdf 1 WorkbenchDOS3 --non-rdb -chs 0,2,32 --dos-type DOS3
[16:35:16 INF] Formatting partition in Rigid Disk Block at 'dos3_non-rdb.hdf'
[16:35:16 INF] - Size '1.9 GB' (1992294400 bytes)
[16:35:16 INF] - Cylinders '60800'
[16:35:16 INF] - Heads '2'
[16:35:16 INF] - Sectors '32'
[16:35:16 INF] - Low Cyl '0'
[16:35:16 INF] - High Cyl '60799'
[16:35:16 INF] - Reserved '2'
[16:35:16 INF] - DOS type '0x444F5303' (DOS\3)
[16:35:16 INF] - Volume name 'WorkbenchDOS3'
[16:35:17 INF] Done
roc-eab commented 1 year ago

I have tried the -CHS 0,2,32 with a WB 3.2.1/DOS7, which works like a champ on the PS-Vita 🥇

Regarding the PFS3, I would take a better look on the UAE4All code if there is a way to push the filesystem in the config. Thinking about ideas, I could also try to create a 47.102 customkick with the PFS into it (but I fear the max rom size is 512KB not 1MB) or may try to open a request on its git. If I find anything useful, I will let you know (out of curiosity, after all it is unrelated to the Hst-Imager)

For now, I close this and many thanks again!!