Author Topic: How can I know how many tracks a disc has?  (Read 1876 times)

0 Members and 1 Guest are viewing this topic.

Offline khaz

  • 464 Plus
  • *****
  • Posts: 490
  • Country: fr
  • Liked: 252
  • Likes Given: 69
How can I know how many tracks a disc has?
« on: 21:32, 07 March 16 »
I'm copying a bunch of discs from/to the HxC with Discology. Discology will only copy the track it's being told to, and I have trouble figuring that part out. While the HxC tells me how many tracks there are in the disc image, how can I know the same with physical discs? it seems track number can vary wildly, I saw from 39 to at least 45. Or can I just input an arbitrary high number and let the software do its thing?

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 15.474
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3089
  • Likes Given: 5684
Re: How can I know how many tracks a disc has?
« Reply #1 on: 13:09, 09 March 16 »
IIRC Discology tried to read/copy up to the track you specified, but stopped if it found the actual number to be smaller than it... But I'm not 100% sure!

Offline khaz

  • 464 Plus
  • *****
  • Posts: 490
  • Country: fr
  • Liked: 252
  • Likes Given: 69
Re: How can I know how many tracks a disc has?
« Reply #2 on: 15:50, 09 March 16 »
IIRC Discology tried to read/copy up to the track you specified, but stopped if it found the actual number to be smaller than it... But I'm not 100% sure!

It doesn't actually, it just says "track not formatted". I'm using the mapping function to check which track is the real last one.
I also have a lot of problem to copy discs in general. Discology, or how I'm using it, is very unreliable to backup real discs, I've had much more success with disckit3.

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 554
  • Country: fr
  • Team Impact
  • Liked: 219
  • Likes Given: 826
Re: How can I know how many tracks a disc has?
« Reply #3 on: 15:54, 09 March 16 »
It doesn't actually, it just says "track not formatted". I'm using the mapping function to check which track is the real last one.
I also have a lot of problem to copy discs in general. Discology, or how I'm using it, is very unreliable to backup real discs, I've had much more success with disckit3.


I'm really surpise to read that disckit 3 is more reliable than discology  :-\
Discology 5.1 is certainly one of the most powerful copier that exist on CPC.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.335
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2262
  • Likes Given: 3478
Re: How can I know how many tracks a disc has?
« Reply #4 on: 16:04, 09 March 16 »
I'm copying a bunch of discs from/to the HxC with Discology. Discology will only copy the track it's being told to, and I have trouble figuring that part out. While the HxC tells me how many tracks there are in the disc image, how can I know the same with physical discs? it seems track number can vary wildly, I saw from 39 to at least 45. Or can I just input an arbitrary high number and let the software do its thing?
It is not possible to know which is the last track without reading valid data from each track.
The FDD doesn't report the track.
The FDC has a track counter inside it for each drive, this is reset when it gets the /track0 signal from the FDD.
It then moves it back and forwards as requested.
If you try to request a large track it will try it. The FDD will physically stop it, but the head will keep hitting the physical stop if it tries to move more. It may bounce a bit when it does this.

To try and detect the maximum, each track must be readable. Then you can try to move to a track, read the ids.
If the ids change, try again until the ids are always the same. Then read the data from the sectors etc and compare.

This is the only way.

So, from experience 42 is the maximum number of tracks for 3" drives (0-41). Some 3" drives may do one more but it's not reliable.
A lot of game software uses 0-40.

For 3.5" drives, you can go as far as 84. I think around 0-82 is most common, but I only ever saw this many tracks used on atari st (I didn't check amiga). So for CPC you can try 81 tracks and be happy you got them all.

In terms of the last formatted track, you could start at 41 and go backwards. If you detect it is unformatted (no ids and no data) then keep going until you find ids and data then stop and you have your maximum.



My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline khaz

  • 464 Plus
  • *****
  • Posts: 490
  • Country: fr
  • Liked: 252
  • Likes Given: 69
Re: How can I know how many tracks a disc has?
« Reply #5 on: 16:26, 09 March 16 »
the image I have for (Super?) Skweek has 45 tracks on it. I was able to put it on a physical disc without much trouble and the game seems to be working fine, though I can't say if the copy was really completely successful.




I'm really surpise to read that disckit 3 is more reliable than discology  :-\
Discology 5.1 is certainly one of the most powerful copier that exist on CPC.

I don't know why, it must be something I'm doing.
I'm using this copy, from cpcrulez.fr. I start it from HxC then flick the drive switch to get access to the physical A drive.
One thing I dislike is that it doesn't give errors during or after copying, or doesn't check for any. At least disckit stops and flashes a big warning message when it finds a problem on the receiving disc. But it does prevent from copying discs with intended errors though.

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.412
  • Country: es
  • Liked: 581
  • Likes Given: 484
Re: How can I know how many tracks a disc has?
« Reply #6 on: 17:28, 09 March 16 »
the image I have for (Super?) Skweek has 45 tracks on it. I was able to put it on a physical disc without much trouble and the game seems to be working fine, though I can't say if the copy was really completely successful.



I don't know why, it must be something I'm doing.
I'm using this copy, from cpcrulez.fr. I start it from HxC then flick the drive switch to get access to the physical A drive.
One thing I dislike is that it doesn't give errors during or after copying, or doesn't check for any. At least disckit stops and flashes a big warning message when it finds a problem on the receiving disc. But it does prevent from copying discs with intended errors though.

Super skweek have copy protection in the disc.The cpc search a data in the disk that cannot be copied to 3" disc. So is very rare it works for you, except if your copy is patched to remove the copy protection with the patch Syx and me made time ago.

Offline khaz

  • 464 Plus
  • *****
  • Posts: 490
  • Country: fr
  • Liked: 252
  • Likes Given: 69
Re: How can I know how many tracks a disc has?
« Reply #7 on: 18:20, 09 March 16 »
Super skweek have copy protection in the disc.The cpc search a data in the disk that cannot be copied to 3" disc. So is very rare it works for you, except if your copy is patched to remove the copy protection with the patch Syx and me made time ago.

This is the dsk I used:
 [ Invalid Attachment ]
Is it the one you modified? There is no intro or modification I could see.