News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

HDOS drivers for SymbiFace-II/X-MASS

Started by rpalmer, 13:22, 20 March 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rpalmer

People,

I have managed to now get a set of HDOS drivers to read from an IDE file in WinAPE via the SF2 emulation. I am in the process of checking these with HDOS itself.

I have also created a very simple disk editor (there is no GUI, just keyboard entries).

Attached is the ROM (+ source) with the drivers to READ/WRITE/INIT the SymbiFace-II/X-MASS device. INIT is part of the HDOS startup to get the partition geometry for the FAT32 structure definition.

Can people please try this on a REAL CPC with X-MASS/SymbiFace-II and let me know if the editor is fully function (Note: be aware that write may corrupt the media, so use it at your own peril). The read of the first sector matches the expected contents for a FAT32 partition.

The disk editor has the following commands:

'R' - Read current sector
'W' - write current sector
'S' - read sector x
'F' - forward to next sector
'B' - Back to previous sector
'P' - display next page of current sector
'E' - change contents (offset from current display data).
'I' - display Boot sector info (if it is current sector)

To start the editor

RUN "SF2DE

if people want to test this in WinAPE, remember to set it up with an IDE file associated with the SF2 interface.

if an error is displayed as a number (check code DR-SF.asm for what codes mean).

rpalmer

Joseman

Quote from: rpalmer on 13:22, 20 March 16

Can people please try this on a REAL CPC with X-MASS/SymbiFace-II and let me know if the editor is fully function (Note: be aware that write may corrupt the media, so use it at your own peril). The read of the first sector matches the expected contents for a FAT32 partition.

Hi,

Here are the results with SymbiFaceII and a 4GB FAT32 partition:



It seems valid judging the message that can be read in spanish...

for me its working correctly

if you want any particular test just tell me!


Munchausen

Hi Ray,
presumably there are commands such as |cd, |dir etc?

rpalmer

Munchausen,

The ROM posted only has the drivers to READ/WRITE/INIT the device. HDOS which has the file system contains the required commands to access the media as if it were AMSDOS formatted. The HDOS ROM is currently under going testing to make sure it works as expected.

Joseman,

The pictures seem to not correlate with an expected sector format for FAT32 (See attached images from WinAPE with a test IDE file).

Rpalmer

rpalmer

Joseman,

I just re-looked at your pictures and find that your device has an MBR (Master Boot Record). The sector is found in normal IDE devices formatted in Windows to assign this MBR to the first sector for multiple partitions on the same device. The pictures I have attached shows that the sector I am dealing with may be formatted with just one partition and has no need for the MBR. This would make it very difficult to know which is which under HDOS.

I will need to look further into how I can manage this situation.

rpalmer

Munchausen


Executioner

There's some detailed information here on the MBR. WinAPE IDE files could in theory support multiple partitions since they are just raw sector data. The latest version of WinAPE also works with SD Cards and USB drives being selectable as well as CD/DVD/BR drives (not sure if these are actually fully functional since the current version probably only handles 512 bytes sectors, not sure).

HAL6128

Quote from: Executioner on 00:05, 22 March 16
....
WinAPE IDE files could in theory support multiple partitions since they are just raw sector data.
....
Yes, I created an image which is in principle a mirror of a whole harddrive ~768MB with 6 partitions (3 primary  and 3 extended each 128MB), and it works fine reading it out sector wise under WinApe. :)
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

rpalmer

HAL6128,

Could you please post a few screen shots so that I can get a better picture of the image you mentioned to improve the drivers.

Rpalmer

HAL6128

A picture from the image? It's a simple image of a harddrive created under linux with the 'dd' command.
The first sector is a common MBR. Nothing spectacular.
[attach=2]
[attach=3]
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

rpalmer

Can someone please tell me how the SF2 emulation in WinAPE works.

I am getting nowhere trying to find where the start of the directories are in the test ide files supplied with the emulation.

I have looked at the first sector and find that is says there are &0150CF9F sectors (22073247 sectors, i.e 10 GigaBytes), yet the file is 94K. This tells me that something is seriously missing...

I calculated from the test.ide file where the directory is expected to be and find it is not there.

The specification for Boot sector data matches the original pictures I posted earlier about sector 0 of the test ide file.
The start of directory is expected to be calculated as follows:

First Sector of Directory Data = Reserved Sector Count + (Number of FATS * Number of FAT sector)

The Information I have for the formula is

Reserved Sector Count = 32
Number of FATS = 2
Number of FAT sector = &2a10 (10768)

The number i get is &5440 (21568), I read this sector and get all &FF for all bytes.

Attached is the test ide file I had played with using symbos to copy a few files and create a directory.

I also checked the first 64 sectors at the start of the test ide file and seem to locate/verify the reserved sector contents and start of the FAT.

rpalmer

rpalmer

Attached is the updated dsk file and ROM which i tested the test ide file with.

just run sf2de

Joseman

Quote from: rpalmer on 14:59, 25 March 16
Attached is the updated dsk file and ROM which i tested the test ide file with.

just run sf2de

Do you need any test on the real deal?

rpalmer

joseman,

Could you please check via real hardware and manual calculations using your configuration.

rpalmer

rpalmer

I found my problem in reading sector data.

I had the values in REG HL back to front and was reading the wrong sector, but write still causes issues (i completes, but a read back hangs...funny)

rpalmer

rpalmer

People,

I have now got the drivers to read successfully sectors from the test.ide file in WinAPE via the developmental HDOS/Drivers ROMS. These are attached (see Zip file contents).

A test program "tc-sf2.bas" is included in the attached dsk file and a sanp shot of its output is attached as well.

The test of the SF2 for its catalog works with out obvious issues, but further testing to read a file will add confidence to HDOS support of the SF2 interface.

Once testing of the file read/write side is successful, i feel that HDOS will then be able to offer to the CPC users a means to access Hard discs in BASIC via the SF2.

I would also like to see if X-MASS works with these items as I understand that the X-MASS has the same I/O ports.

rpalmer

dirtybb

Hi
Hi,

Here is the result running tc-sf2.bas on real CPC 6128 with XMASS FAT 16.
HDos driver and HDos are in pos 5/4 in XMEM.
[attach=2]


Last line loops indefinitely.

rpalmer

dirtybb,

Could you also please run the "sf2de.bas" and get snapshots after it starts along with the partition information.

Your setup maybe starting with an MBR rather than the Boot sector and this may cause the initialisation to end up with the wrong values for the test file output you show.

rpalmer

dirtybb


dirtybb


rpalmer

dirtybb,

I can see from the picture that the total sectors = &367E0 (i.e 223200). The sectors per block (AKA cluster) is 4, so the number of clusters is 55800.
I have checks my code and find that the driver did not properly determine FAT16/FAT32 type. I will correct this and get back to you.

rpalmer

rpalmer

dirtybb,

I have what i think is a corrected driver and HDOS to support FAT16 on SF2.

Give this one a go and see if it works.

rpalmer

dirtybb

#22
Hi
It does the same.
Something i did not mention yesterday, i ve to run 2 times the test program.
First, it gives this :

[attach=2]

Then i type run and :
[attach=3]

rpalmer

dirtybb,

The number in the geometry details appear somewhat unusual, however it might be that my understanding of differences between FAT16 and FAT32 may be the cause.

You can try the attached rom.

I should note that it is difficult to debug without actual hardware or an IDE file with your config (hopefully for not too long).

Rpalmer

dirtybb

#24
Quote from: rpalmer on 13:28, 28 March 16
dirtybb,

The number in the geometry details appear somewhat unusual, however it might be that my understanding of differences between FAT16 and FAT32 may be the cause.

You can try the attached rom.

I should note that it is difficult to debug without actual hardware or an IDE file with your config (hopefully for not too long).

Rpalmer

Same results.
Before the tests, i freshly formated the XMASS with Prodatron's Tool under Symbos, and then created a few directories/copied a few files.

On its side, impDOS can access the catalogue/browse the directories.

If you need something else, just tell me

Powered by SMFPacks Menu Editor Mod