HxC Floppy Drive Emulator

HxC Floppy Drive Emulator general information and news
It is currently Wed May 22, 2013 6:04 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: TRD Images - Problem with command FORMAT.
PostPosted: Tue Apr 26, 2011 9:35 pm 
Offline

Joined: Wed May 12, 2010 10:46 am
Posts: 20
Location: RUSSIA, Kamyshin
Hi, Jeff!

There are problems at work of the emulator with images of format TRD (ZX-Spectrum Beta Disk Interface (TR-DOS)).
The problem is manifested only with command FORMAT - the disk is formatted as single-sided, instead of two-sided.
I.e. after formatting of any TRD-image we gain 1264/1264 though should be 2544/2544.
Thus, visual representation to the monitor and on LCD the emulator is characteristic also
All other commands TR-DOS complete correctly, including commands MOVE and ERASE.

The last accessible versions were used:
software for image conversion: v1.5.2.1
PIC firmware: v1.6.0.0

HELP!


Top
 Profile  
 
 Post subject: Re: TRD Images - Problem with command FORMAT.
PostPosted: Wed Apr 27, 2011 9:24 am 
Offline
Site Admin

Joined: Fri Oct 20, 2006 12:12 am
Posts: 2842
Location: Paris
Alex_NEMO wrote:
Hi, Jeff!

There are problems at work of the emulator with images of format TRD (ZX-Spectrum Beta Disk Interface (TR-DOS)).
The problem is manifested only with command FORMAT - the disk is formatted as single-sided, instead of two-sided.
I.e. after formatting of any TRD-image we gain 1264/1264 though should be 2544/2544.
Thus, visual representation to the monitor and on LCD the emulator is characteristic also
All other commands TR-DOS complete correctly, including commands MOVE and ERASE.

The last accessible versions were used:
software for image conversion: v1.5.2.1
PIC firmware: v1.6.0.0

HELP!


I don't think that this is related to a problem with the emulator. The computer doesn't try to format the side 1.


Top
 Profile  
 
 Post subject: Re: TRD Images - Problem with command FORMAT.
PostPosted: Wed Apr 27, 2011 10:00 am 
Offline

Joined: Wed May 12, 2010 10:46 am
Posts: 20
Location: RUSSIA, Kamyshin
Jeff wrote:
I don't think that this is related to a problem with the emulator. The computer doesn't try to format the side 1.


The real floppy disk is normally formatted on this computer. Also we receive after the termination of a command the FORMAT - 2544/2544 sectors. I.e. a problem not in the computer or the FDD-controler of this computer! The same problem is watched and on a "prototype", with last accessible to it firmware v0.2.2.0. And it seems that this problem exists since those times...

TRD-file format.
The given format is used by emulators of the Spectrum as an image of a diskette. Т е. When by operation in the emulator there is a reversal to TR-DOS, the emulator works with this file, including its diskette. A format of an image *.trd - one of the most simple. It, as a matter of fact, ordinary double-side 80-track TR-DOS a disk with 16 sectors on the track, on 256 byte everyone. Т е. Content TR-DOS of a diskette entirely is stored in a file of the given format (together with the directory). For decoding in a format of a real Spectrum it is necessary to write down simply the data containing in it on pure TR-DOS a diskette since the zero track. The size of files *.trd is equal 655360 byte (2544+16 tr-dos sectors) more often, but sometimes meet cut off *.trd images (less than 655360 byte), and also "rubber" (it is more 655360 byte).
Original Link(RUS): http://zxpress.ru/article.php?id=5075 , in more details: http://zxdocs.fatal.ru/formats/formats. ... &type=html

P.S. Jeff, please, answer my letter on e-mail.


Top
 Profile  
 
 Post subject: Re: TRD Images - Problem with command FORMAT.
PostPosted: Wed Apr 27, 2011 11:12 am 
Offline
Site Admin

Joined: Fri Oct 20, 2006 12:12 am
Posts: 2842
Location: Paris
Alex_NEMO wrote:
Jeff wrote:
I don't think that this is related to a problem with the emulator. The computer doesn't try to format the side 1.


The real floppy disk is normally formatted on this computer. Also we receive after the termination of a command the FORMAT - 2544/2544 sectors. I.e. a problem not in the computer or the FDD-controler of this computer! The same problem is watched and on a "prototype", with last accessible to it firmware v0.2.2.0. And it seems that this problem exists since those times...


In this case how the Zx Spectrum detect an two sided or a one sided disk ?


Top
 Profile  
 
 Post subject: Re: TRD Images - Problem with command FORMAT.
PostPosted: Wed Apr 27, 2011 12:33 pm 
Offline

Joined: Wed May 12, 2010 10:46 am
Posts: 20
Location: RUSSIA, Kamyshin
Jeff wrote:
In this case how the Zx Spectrum detect an two sided or a one sided disk ?

By default, in TR-DOS ROM, 80 tracks, 2 sides are installed. The matter is that any TRD an image loaded in HxCFloppyEmulator software v1.5.2.1, (scrolling line) accurately shows: GAMES003.TRD - 80 track(s) 2 side(s).
Besides, reads an image the emulator correctly! Also displays the information on a disk truly!

I once again will attentively check up mounting of the emulator and FDD controler.


Top
 Profile  
 
 Post subject: Re: TRD Images - Problem with command FORMAT.
PostPosted: Tue May 10, 2011 12:49 pm 
Offline

Joined: Wed May 12, 2010 10:46 am
Posts: 20
Location: RUSSIA, Kamyshin
I have found and have solved a problem with errors at reading SCL and TRD-images.
All problem has appeared in parametre options "Double Step" in point "HFE file interface mode". It appears, this checkbox cannot be marked.
But unfortunately, the problem with formatting 1264/1264 with "pure" TR-DOS, and remains. Thus, if to format from some "external" programs, for example, "QuickCommander", there is a "normal" formatting - 2544/2544.
The possible reason is described more low:

Most likely it because of that that TR-DOS ignores setting of number of the side in markers of sectors at formatting of the track and it turns out that two tracks are superimposed in one.

Before each sector at formatting title 6 byte is written
1. № the cylinder (the physical track) - 1 byte
2. № the diskette sides (0 or 1) - 1 byte (here TR-DOS always puts 0 it is not dependent on the side)
3. № sectors (1-16 for TRDOS) - 1 byte
4. The size of sector (0-3, for TRDOS=1) - 1 byte
5,6. Title checksum - 2 bytes.

It is impossible to rely on the second byte of titles of the disk formatted in TRDOS.


Whether probably somehow to solve this problem?

The complete (extended) information on a TRD-format (RUS - sorry...):
http://www.zxdocs.fatal.ru/formats/form ... &type=html


Top
 Profile  
 
 Post subject: Re: TRD Images - Problem with command FORMAT.
PostPosted: Tue May 10, 2011 1:32 pm 
Offline
Site Admin

Joined: Fri Oct 20, 2006 12:12 am
Posts: 2842
Location: Paris
Alex_NEMO wrote:
I have found and have solved a problem with errors at reading SCL and TRD-images.
All problem has appeared in parametre options "Double Step" in point "HFE file interface mode". It appears, this checkbox cannot be marked.
But unfortunately, the problem with formatting 1264/1264 with "pure" TR-DOS, and remains. Thus, if to format from some "external" programs, for example, "QuickCommander", there is a "normal" formatting - 2544/2544.
The possible reason is described more low:

Most likely it because of that that TR-DOS ignores setting of number of the side in markers of sectors at formatting of the track and it turns out that two tracks are superimposed in one.

Before each sector at formatting title 6 byte is written
1. № the cylinder (the physical track) - 1 byte
2. № the diskette sides (0 or 1) - 1 byte (here TR-DOS always puts 0 it is not dependent on the side)
3. № sectors (1-16 for TRDOS) - 1 byte
4. The size of sector (0-3, for TRDOS=1) - 1 byte
5,6. Title checksum - 2 bytes.

It is impossible to rely on the second byte of titles of the disk formatted in TRDOS.


Whether probably somehow to solve this problem?

The complete (extended) information on a TRD-format (RUS - sorry...):
http://www.zxdocs.fatal.ru/formats/form ... &type=html


Well in this case this can be changed easily :

http://hxcfloppyemu.svn.sourceforge.net ... iew=markup

Just change
Quote:
currentcylinder->sides[i]=tg_generatetrack(trackdata,sectorsize,floppydisk->floppySectorPerTrack,(unsigned char)j,(unsigned char)i,1,interleave,(unsigned char)(((j<<1)|(i&1))*skew),floppydisk->floppyBitRate,currentcylinder->floppyRPM,trackformat,gap3len,2000,-2000);


by

Quote:
currentcylinder->sides[i]=tg_generatetrack(trackdata,sectorsize,floppydisk->floppySectorPerTrack,(unsigned char)j,0,1,interleave,(unsigned char)(((j<<1)|(i&1))*skew),floppydisk->floppyBitRate,currentcylinder->floppyRPM,trackformat,gap3len,2000,-2000);


i will do this evening.


Top
 Profile  
 
 Post subject: Re: TRD Images - Problem with command FORMAT.
PostPosted: Tue May 10, 2011 1:58 pm 
Offline

Joined: Wed May 12, 2010 10:46 am
Posts: 20
Location: RUSSIA, Kamyshin
Jeff wrote:
Just change
Quote:
currentcylinder->sides[i]=tg_generatetrack(trackdata,sectorsize,floppydisk->floppySectorPerTrack,(unsigned char)j,(unsigned char)i,1,interleave,(unsigned char)(((j<<1)|(i&1))*skew),floppydisk->floppyBitRate,currentcylinder->floppyRPM,trackformat,gap3len,2000,-2000);


by

Quote:
currentcylinder->sides[i]=tg_generatetrack(trackdata,sectorsize,floppydisk->floppySectorPerTrack,(unsigned char)j,0,1,interleave,(unsigned char)(((j<<1)|(i&1))*skew),floppydisk->floppyBitRate,currentcylinder->floppyRPM,trackformat,gap3len,2000,-2000);


i will do this evening.

Hi, Jeff!
I will be very grateful and at once I will test and I will write about results.


Top
 Profile  
 
 Post subject: Re: TRD Images - Problem with command FORMAT.
PostPosted: Tue May 10, 2011 10:11 pm 
Offline
Site Admin

Joined: Fri Oct 20, 2006 12:12 am
Posts: 2842
Location: Paris
Alex_NEMO wrote:
Jeff wrote:
Just change
Quote:
currentcylinder->sides[i]=tg_generatetrack(trackdata,sectorsize,floppydisk->floppySectorPerTrack,(unsigned char)j,(unsigned char)i,1,interleave,(unsigned char)(((j<<1)|(i&1))*skew),floppydisk->floppyBitRate,currentcylinder->floppyRPM,trackformat,gap3len,2000,-2000);


by

Quote:
currentcylinder->sides[i]=tg_generatetrack(trackdata,sectorsize,floppydisk->floppySectorPerTrack,(unsigned char)j,0,1,interleave,(unsigned char)(((j<<1)|(i&1))*skew),floppydisk->floppyBitRate,currentcylinder->floppyRPM,trackformat,gap3len,2000,-2000);


i will do this evening.

Hi, Jeff!
I will be very grateful and at once I will test and I will write about results.



To be tested:
http://hxc2001.free.fr/floppy_drive_emu ... t_beta.zip


Top
 Profile  
 
 Post subject: Re: TRD Images - Problem with command FORMAT.
PostPosted: Wed May 11, 2011 7:06 am 
Offline

Joined: Wed May 12, 2010 10:46 am
Posts: 20
Location: RUSSIA, Kamyshin
Jeff wrote:


Jeff, many thanks!
Tonight, after work, I will necessarily check up and I will write about results of testing.


Top
 Profile  
 
 Post subject: Re: TRD Images - Problem with command FORMAT.
PostPosted: Thu May 12, 2011 8:05 pm 
Offline

Joined: Wed May 12, 2010 10:46 am
Posts: 20
Location: RUSSIA, Kamyshin
I and one more person from our forum checked up the new beta version software. Unfortunately, the same result.
I.e. in "pure" TR-DOS, by system level command FORMAT "DISK1", after formatting it is received 1264/1264 sectors though should receive 2544/2544 sectors. In the course of formatting both on monitor ZX-Spectrum, and on LCD the emulator (IS not not present) passage to 1st side.
At usage of the external program - a file manager "Quick Commander" - formatting process happens normally, but this program uses own subroutine of formatting and formats a disk from its "end" - i.e. with 80 on 0 track. After its formatting - it is received the demanded
2544/2544 sectors. I just in case, collected 3 files:
    image01_clean.hfe - An image converted a software in format HFE (contains a row of games for ZX-Spectrum);
    image01_qc_frmt.hfe - The same, as the first image, but is formatted by a file manager "Quick Commander" - received demanded 2544/2544 of sectors;
    image01_trd_frmt.hfe - The same, as the first image, but is formatted in TR-DOS, system level command FORMAT "DISK1", received 1264/1264 sectors, thus, the directory is cleared NOT completely - command LIST produces not the complete list of files and an error since there is "overlay" or not the full cleaning in view of not the correct formatting.
Probably, the analysis of these files helps to understand and solve a problem.
the Link to archive

I want to ask still - at track record at image through the emulator how it defines its number? Whether it is used signal SIDE of the floppy interface, or all information takes from title of sector of a file-image?
If signal SIDE is not analyzed, whether probably to implement this function?

Still the question - whether considers the emulator at formatting of the track the information in markers of sectors and what will be if markers are not standard?

P.S.
Jean François if there is time, desire, possibilities, at our forum (page 8 and further) we lead research of the possible reasons of this problem. It is possible to try to translate into English or French languages OnLine Translate services:
* Google Tranlate
* Promt Tranlate (russian service)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group