Wires? Pah.....

discuss PC<>Acorn file transfer issues & the use of FDC, XFER, Omniflop/disk etc.
User avatar
paulv
Posts: 3629
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: Wires? Pah.....

Post by paulv » Sat Oct 08, 2011 10:01 am

MartinB wrote:Lol - just noticed that whilst the double-density reading is working fine and I've provisioned for and am transmitting 18 sectors per track to the PC, I missed updating a constant and I'm only reading 10 sectors from the disc. Plonker

Update later....
And there I was going to write an addendum to the manual for the WE disc utils today :D I guess I'll just have to wait a while :lol:

Paul

User avatar
MartinB
Posts: 4854
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Wires? Pah.....

Post by MartinB » Sat Oct 08, 2011 12:03 pm

Heh heh - Come on Paul, these utils are at version 1.0, I would have thought that experience of working with my stuff would have taught you not to even think about documentation until at least version 3 :D

User avatar
MartinB
Posts: 4854
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Wires? Pah.....

Post by MartinB » Sat Oct 08, 2011 10:41 pm

Ok - I've corrected the 18 sectors bug and it's definitely ( :wink: ) working correctly now. One afterthought, because of the multiple ways in which capacities and usage can be stored on DD discs, I have decided that it would be prudent for the usage advice to be more even more explicit in that we'll always specify the forcing of full spec. capacity images for DD discs. Thus, the only two command lines that should be used when imaging WE DD discs are...

*UPX#SDD <drv> I4
and
*UPX#SDD <drv> I8

...where I4 is used for 40 Track discs and I8 is used for 80 Track discs. '#' will be 'S' for a single-sided image when <drv> can be 0..3 and 'D' for a double-sided image when <drv> can be 0..1. The images produced will be 368640 bytes for an ssd and 737280 bytes for a dsd. The 'I' (report & ignore errors) will have no effect on a 'healthy' disc.

Something that's messing with my head at the moment and clearly needs some thought is how the transferred image subsequently behaves in BeebEm and B-em. I start with a WE DD disc that cannot be read on a real Beeb with Acorn 1770 DFS 2.26 because the latter is nominally single-density only. I use the same Beeb but employ UPXSSDD to make a 184320 byte ssd image on the PC. If I then load this disc into either emulator with DFS 2.26, it appears to work perfectly and I'm confused as to whether I should I should be confused by that :?

PC ssd & dsd images are of course just contiguous hex bytes and there's no sector or track markers so presumably the emulators will 'convert' the image as it's loaded into a single-density layout with 10 sectors per track. That sounds fine at face value but I think I might have expected doing that to upset the directory entry pointers but then again, since they're only sector lengths and a start sector, maybe not. I just don't know at the moment until I spend some time pondering the puzzle. I'm just confused.... #-o

(Of course, Tom W might better understand what's going on..... :wink:)

Anyway, all of the above is good news in practical terms and actually means it's a doddle to recover files from a physical WE DD disc using these UPURS DD utilities. Just make the image and then use an emulator to transfer the files to a standard DFS image :D
Attachments
UPURS WE Double Density Export Utils (2).zip
(1.42 KiB) Downloaded 99 times

User avatar
MartinB
Posts: 4854
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Wires? Pah.....

Post by MartinB » Sun Oct 09, 2011 6:58 pm

After some thought, it is entirely sensible that Acorn DFS can read an image of a WE DDFS disc once it's been serialised and then re-loaded into an emulator :D. All files are pointed to by an absolute start-sector and this will not change irrespective of the number of tracks per sector that a given DFS uses. The only difference is that to find the start track/sector of a given file, DFS will divide by 10 and DDFS (Watford in this case) will divide by 18. In both cases, the remainder is the sector offset within the track. In other words, the directory information for a disc does not have any concept of (nor cares about) tracks.

Therefore, recovering files from a WE DDFS disc is indeed as easy as it seems using UPX#SDD and you don't need a Watford DFS to do it as long as you have a 177x DFS in yer Beeb. Under emulation, Acorn DFS won't even care that we seem to have fitted more on the disc than is normally possible because it doesn't impose a finite limit of 80 tracks on a disc. Acorn DFS allocates 18 bits for a file start-sector and this is larger than is necessary even for the last sector of a WE DD disc.

In case anyone is now wondering why there was ever such a thing a single density, it's because the number of bytes & sectors that can be fitted on a single track is governed to a large extent by the recording & playback method. The original Acorn DFS used an 8271 FDC and this could only support FM recording whereas the later 177x can employ an enhanced MFM method which allows a higher density of data to be stored. By default, the Acorn 117x DFS sticks with FM for backwards compatibility with the 8271 but MFM (Double-Density) is employed by WE DDFS and Acorn ADFS and hence you get the higher capacities.

So Paul, feel free to document as you see fit, WE DD discs are another tick in the box and my work here is done :D

User avatar
andyt31
Posts: 300
Joined: Wed Nov 21, 2007 1:16 pm
Location: Peterborough, UK
Contact:

Re: Wires? Pah.....

Post by andyt31 » Sun Oct 09, 2011 7:39 pm

I shall be making one of these cables in the next couple of days and giving this great bit of software a go.

Has anyone used this method to write the Acorn Z80 second processor disks? They are SSD images, but are 400kb.
Website : https://www.retrocomputers.online
Twitter : http://twitter.com/andytuk
Volunteer for The Centre for Computing History

User avatar
MartinB
Posts: 4854
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Wires? Pah.....

Post by MartinB » Sun Oct 09, 2011 8:30 pm

Hi Andy and thanks for the kind words :D

However.... :(

Regarding such things as Z80 2P discs, the system is largely centred around DFS discs since I was trying to fill a gap in the age-old quandry of how to get Beeb discs to and from a PC. Of course there are now many 'modern' systems available but I was looking for something simple, non-invasive, cheap (Yay :D), compatible with 8271 & 177x FDC's and which looks to retain the use of those wonderfully retro and tactile floppy discs =D>

As a result, the system as is stands can only write DFS single density floppies at the Beeb end. I've just added the capability to recover images of WE DD discs but that's was really to avoid Acorn DFS users having to fit a WE DDFS to a Beeb which would then need two drives etc. etc.

If I was starting again from scratch with the knowledge I've gained along the way, I could have produced a more generic system which would support any density and layout that the 177x is capable of writing. That would for example include PC FAT discs and indeed, CP/M discs.

As of today though, the UPURS suite is bespoked to single density DFS discs so if you were thinking of making a cable specifically for Z80 discs, I'm afraid it won't be of any help :(

Maybe one day...... :-k :wink:

User avatar
paulv
Posts: 3629
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: Wires? Pah.....

Post by paulv » Sun Oct 09, 2011 10:23 pm

So Paul, feel free to document as you see fit, WE DD discs are another tick in the box and my work here is done.
Will do :D It may be a day or two yet... As Mark H already knows, I broke my 1770 board last week and the other is all boxed away so I'm waiting for parts to arrive to fix the one I broke ATM... My own ham-fisted fault :roll: Don't ask :(

Paul

User avatar
LeeB
Posts: 207
Joined: Sun Aug 20, 2006 1:51 pm
Contact:

Re: Wires? Pah.....

Post by LeeB » Mon Oct 10, 2011 7:50 am

MartinB wrote:
Anyway, all of the above is good news in practical terms and actually means it's a doddle to recover files from a physical WE DD disc using these UPURS DD utilities. Just make the image and then use an emulator to transfer the files to a standard DFS image :D
You sir, are a legend! I shall hopefully be able to make full use of this sometime this week!
I'll try not to break it ;)

User avatar
andyt31
Posts: 300
Joined: Wed Nov 21, 2007 1:16 pm
Location: Peterborough, UK
Contact:

Re: Wires? Pah.....

Post by andyt31 » Mon Oct 10, 2011 8:44 am

Im still going to build the cable for writing normal disks.

Just need to work out how to write the Z80 disks another way. May need to build a PC with a proper floppy drive. I think I have the bits to build a P3 system - but no case! Also need to write some ADFS disks...
Website : https://www.retrocomputers.online
Twitter : http://twitter.com/andytuk
Volunteer for The Centre for Computing History

User avatar
MartinB
Posts: 4854
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Wires? Pah.....

Post by MartinB » Mon Oct 10, 2011 11:24 am

Andy - I've just done some research and if what I've read is true, Acorn CP/M discs are 80 Track, 10 Sectors per Track and 256 Bytes per Sector. If that is correct, then you can indeed create physical floppies from Acorn CP/M ssd/dsd disc images using UPURS and a standard DFS Beeb exactly as documented.

All the Z80 disc images I've seen are dsd (double-sided) but if there are any ssd (single-sided) ones around then simply substitute UPSSD for UPDSD in the procedure below.

You would first pre-format both sides of the target floppy to 80T under DFS as if it were to be a normal DFS disc. Then, run UPDSD specifying the physical drive containing your pre-formatted disc and when prompted, send one of the Z80 2P CP/M disc images. UPDSD will overwrite all the Acorn DFS Track 0 pre-amble and replace it with the Acorn CP/M layout as per the image. Once complete, you won't of course be able to read the disc under DFS anymore but the disc should work quite happily under Acorn CP/M.

That's my theory anyway... :wink:

User avatar
andyt31
Posts: 300
Joined: Wed Nov 21, 2007 1:16 pm
Location: Peterborough, UK
Contact:

Re: Wires? Pah.....

Post by andyt31 » Mon Oct 10, 2011 2:24 pm

I will give it a go and let you know. Thank for looking into it for me.
Website : https://www.retrocomputers.online
Twitter : http://twitter.com/andytuk
Volunteer for The Centre for Computing History

User avatar
MartinB
Posts: 4854
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Wires? Pah.....

Post by MartinB » Tue Oct 11, 2011 11:30 am

@ Lee - No worries, there's always new things to be learned from these exercises. Don't feel obliged to rush in and try it btw, anytime whenever is fine 8)

@ Andy - There's another wrinkle to the Z80 disc image story. I notice you referred specifically to ssd images and if you meant that literally, then I should point out that any of the Acorn CP/M ssd images that I can see are not suitable for transfer by any standard means. This is because these so-called ssd are in fact double-sided images but arranged in an ssd fashion. One of these 400k images contains 160 track images but they are not interleaved to form a true dsd image as we know it, they are sequential tracks from 0 to 159 which is in fact how Acorn CP/M views a disc.

However, the images on Jon Welch's site here are true dsd side & track interleaved images and it is these that I believe will transfer happily using UPURS.

As background for those interested, the Acorn CP/M format is unusual in that virtual sectors of 512 bytes are used and these are formed by reading two physical 256 byte sectors per access. Also, the disc is treated a single 160 track disc (similar to ADFS) but track 80 is on side 2 at the hub with successive tracks out to 159 progressing towards the outer edge of the disc.

Anyway, best thing is just to try it as you say - if it works then all well and good but if by any chance it doesn't, there's nothing lost and from my readings, I have a few theories on how we could sort it out.

User avatar
andyt31
Posts: 300
Joined: Wed Nov 21, 2007 1:16 pm
Location: Peterborough, UK
Contact:

Re: Wires? Pah.....

Post by andyt31 » Thu Oct 13, 2011 12:58 pm

Got my 10x2 pin header sockets today - so should be making the cable over the next couple of days.
Website : https://www.retrocomputers.online
Twitter : http://twitter.com/andytuk
Volunteer for The Centre for Computing History

User avatar
andyt31
Posts: 300
Joined: Wed Nov 21, 2007 1:16 pm
Location: Peterborough, UK
Contact:

Re: Wires? Pah.....

Post by andyt31 » Tue Oct 18, 2011 9:41 pm

Good news - I have made my cable - and it works. =D>

I have successfully read/write a few .SSD and .DSD disk images. I have even successfully transfered over CPM! :D

Im running the utilities from SRAM on a Master 128
Website : https://www.retrocomputers.online
Twitter : http://twitter.com/andytuk
Volunteer for The Centre for Computing History

User avatar
MartinB
Posts: 4854
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Wires? Pah.....

Post by MartinB » Wed Oct 19, 2011 11:36 am

Nice one Andy, glad it's all working for you :D

Good news on the CP/M discs too - it's something I've never tried but theory said it should work!

You mentioned needing to write some ADFS discs - I had actually thought about producing another 'bonus' utility like the WE DDFS ones to support writing ADFS floppies. I presume most people use the 'L' format (Double-sided 640k) but importantly again, the PC images would need to be track-interleaved to avoid a significant re-write of my code. It sounds from another thread that there may be a mixture out there as with the CP/M images but it has been noted for example that all the images on 8bs are track-interleaved as required by UPURS.

Would such an ADFS disc writing (re-creating) capability be of use to anyone?

User avatar
andyt31
Posts: 300
Joined: Wed Nov 21, 2007 1:16 pm
Location: Peterborough, UK
Contact:

Re: Wires? Pah.....

Post by andyt31 » Wed Oct 19, 2011 12:09 pm

ADFS would be useful. I currently write them on my PC, but that's not always piratical. You could use ADFS Explorer, but its very slow.

Happy to be a beta tester.
Website : https://www.retrocomputers.online
Twitter : http://twitter.com/andytuk
Volunteer for The Centre for Computing History

User avatar
mga1103
Posts: 184
Joined: Mon Jan 24, 2011 4:00 pm
Location: Galway, Ireland
Contact:

Re: Wires? Pah.....

Post by mga1103 » Wed Oct 19, 2011 12:30 pm

andyt31 wrote:Good news - I have made my cable - and it works. =D>
Welcome to the UPURS Club :D =D>
MartinB wrote:...
Would such an ADFS disc writing (re-creating) capability be of use to anyone?
Yes, and I think it would round off(1) your suite nicely :D


(1)together with UEF transfers of course! :wink:

User avatar
andyt31
Posts: 300
Joined: Wed Nov 21, 2007 1:16 pm
Location: Peterborough, UK
Contact:

Re: Wires? Pah.....

Post by andyt31 » Wed Oct 19, 2011 6:55 pm

I have now put my cable into a box :D
Attachments
IMG_2496.JPG
Cable enclosure.
IMG_2496.JPG (381.43 KiB) Viewed 2432 times
Website : https://www.retrocomputers.online
Twitter : http://twitter.com/andytuk
Volunteer for The Centre for Computing History

User avatar
MartinB
Posts: 4854
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Wires? Pah.....

Post by MartinB » Wed Oct 19, 2011 7:30 pm

Very good =D>

You just need to put a proper label on it now but be careful how you do it, UPURS Sinclair could be taken the wrong way.....

(Does this mean we've earned a place in the museum ? :wink:)

User avatar
andyt31
Posts: 300
Joined: Wed Nov 21, 2007 1:16 pm
Location: Peterborough, UK
Contact:

Re: Wires? Pah.....

Post by andyt31 » Wed Oct 19, 2011 10:16 pm

This one is my personal cable. Will make another for the museum at some point.

I had all of the parts to make the cable here - its all made from scraps apart from the 2x10 connectors.
Website : https://www.retrocomputers.online
Twitter : http://twitter.com/andytuk
Volunteer for The Centre for Computing History

User avatar
jgharston
Posts: 3129
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: Wires? Pah.....

Post by jgharston » Sun Oct 23, 2011 2:06 pm

MartinB wrote:the Acorn CP/M ssd images that I can see are not suitable for transfer by any standard means.
Define "standard means".
This is because these so-called ssd are in fact double-sided images but arranged in an ssd fashion.
Yerrs, because they are sequential images, not interleaved images, and SSD images are sequential images.
One of these 400k images contains 160 track images but they are not interleaved to form a true dsd image as we know it, they are sequential tracks from 0 to 159 which is in fact how Acorn CP/M views a disc.
That's because Acorn CPM disks are not interleaved, they are sequential. Side 0/track 0 is followed by side0track1 is followed by side still 0/track 2 etc etc etc all the way to the end the disk.

A DSD image goes side 0/track 0, side 1 track 0, side 0 again, track 1, side 1 track 1, swapping between the logical structure every 2560 bytes

A SDS image follows the logical structure of the image, goes side 0/track 0, side still 0/track 1, side STILL 0/track 2 etc, all the way to side 0/track 79, AND THEN CONTINUES WITH THE LOGICAL FILESYSTEM STRUCTURE to side 1/track 0, side 1/track 1 etc.

No 8-bit filing system goes side0/1/0/1/0/1/0/1. All 8-bit filing systems do all of one side before starting on the next side.
As background for those interested, the Acorn CP/M format is unusual in that virtual sectors of 512 bytes are used and these are formed by reading two physical 256 byte sectors per access. Also, the disc is treated a single 160 track disc (similar to ADFS) but track 80 is on side 2 at the hub with successive tracks out to 159 progressing towards the outer edge of the disc.
You're mixing up the logical and physical structure of the filesystem and the disk it is written to and the blocking and deblocking of data within the filesystem. See http://mdfs.net/Docs/Comp/Disk/Format/AcornCPM for details and
CPMFiler for code to access the filesystem.
Anyway, best thing is just to try it as you say
And also do the background research to find pre-existing documentation and code that does the job you're trying to do.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
MartinB
Posts: 4854
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Wires? Pah.....

Post by MartinB » Sun Oct 23, 2011 6:58 pm

Hey Jonathan, your default assumption that you’re always dealing with imbeciles on here really isn’t helpful, nor is repeatedly telling me lots of things I already know - even if you do use lots of capitals in the process :wink:

You also appear to randomly quote me and then talk about something tangential giving the impression that I was somehow wrong in what I said. So, to avoid any confusion for the casual reader, all the information of mine that Jonathan has quoted above is 100% correct. As often as not, I only provide pertinent or 'for interest' information but this doesn't mean I'm confused or mistaken as Jonathan suggests.

I know you keep telling me that CP/M discs aren’t interleaved and so the images are ssd but at the end of the day, the CP/M discs are physically double-sided and it was only the inconsistency of your giving them an ssd extension that I was observing. Fortunately, other people out there understand the distinction and a third-party set of .dsd CP/M images transferred fine with my system, it’s just your abnormal images that won’t work with transfer systems that assume ssd means single-sided disc. (And that seems like a sensible assumption to me :wink:)
Jonathan wrote:No 8-bit filing system goes side 0/1/0/1/0/1/0/1. All 8-bit filing systems do all of one side before starting on the next side.
Nice one, you helped me out there and argued my case admirably. I totally concur with the quote above and the point is that despite the above, we still create interleaved dsd images of physical discs if they’re double-sided. You perhaps don’t understand why this is, so let me explain…

When creating an image of a double-sided physical disc in a drive or creating a double-sided physical disc from an image, using interleaved images means that the head only has to be stepped 80 (or 40) times instead of the 160 (or 80) that would be necessary if it were read or written as two sequential ssd’s. How the applicable filing system subsequently interprets the disc is absolutely irrelevant to the process of reading or creating physical discs.
Jonathan wrote:…find … code that does the job you're trying to do.
UPURS. It does the job admirably :D

User avatar
paulv
Posts: 3629
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: Wires? Pah.....

Post by paulv » Tue Oct 25, 2011 11:34 pm

May I present the WE DDFS addendum user guide for UPURS. It's intended as an additional manual to the main UPURS manual and covers just the WE related tools.

I'll be adding this manual and the WE DDFS UPURS tools to my site for download too so they'll be available within the next 24 hours there as well as earlier on in this thread.

I'm sorry it took more time than I expected to get this uploaded but understandably I've been a bit pre-occupied, nursing Taz for the last month while his health deteriorated :(

Paul
Attachments
User Port Utilities Rom Software v4.1 (WE addendum).zip
Manual for the UPURS utilities to recover and archive WE DDFS formatted discs.
(675.56 KiB) Downloaded 124 times

User avatar
MartinB
Posts: 4854
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Wires? Pah.....

Post by MartinB » Wed Oct 26, 2011 11:34 am

Cheers Paul, you are a hero, especially given your sad circumstances =D>

You are setting dangerous precedents of course, there'll be an ADFS 'disc maker' bonus utility soon and then, as you well know, the forthcoming excitement of our UEF loader \:D/

TopBanana
Posts: 1058
Joined: Wed Jun 09, 2010 2:16 pm
Contact:

Re: Wires? Pah.....

Post by TopBanana » Wed Oct 26, 2011 5:08 pm

MartinB wrote:........excitement of our UEF loader \:D/
Is that a sequential tape loader?

If so, should it have an extension of SSDUEF even if the original tape was double sided ?? :lol: :oops:

User avatar
MartinB
Posts: 4854
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Wires? Pah.....

Post by MartinB » Wed Oct 26, 2011 6:14 pm

No extension, we couldn't get planning permission.

User avatar
andyt31
Posts: 300
Joined: Wed Nov 21, 2007 1:16 pm
Location: Peterborough, UK
Contact:

Re: Wires? Pah.....

Post by andyt31 » Thu Oct 27, 2011 5:12 pm

UPURS will be at the Risc OS London show this weekend. 8)
Website : https://www.retrocomputers.online
Twitter : http://twitter.com/andytuk
Volunteer for The Centre for Computing History

User avatar
MartinB
Posts: 4854
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Wires? Pah.....

Post by MartinB » Thu Oct 27, 2011 8:45 pm

Nice one Andy, our first formal recognition :D

(After Paul's wicked UPURS home page of course :wink:)

User avatar
paulv
Posts: 3629
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: Wires? Pah.....

Post by paulv » Mon Nov 28, 2011 6:45 pm

I'm just posting an update about UPURS as MartinB has been busy beavering away on the UPCFS offshoot project that allows UEF files to be loaded from a PC over the User Port.

MartinB has been supplying MartinA and myself with very early alpha versions for the last couple of weeks and we've now got to a point where he's happy to let me release a video. :D

It's worth noting that this is still an early test version and there's quite a bit of work and testing to do yet but it's a good start to the process of making all those lovely UEF files available to real Beebs :D =D>

So without further I'll let the video speak for itself. Blink and you'll miss it :lol: :lol: :lol:



Very nice work Martin =D> =D> =D>

Paul

User avatar
Advance
Posts: 362
Joined: Fri Jan 29, 2010 5:22 pm
Contact:

Re: Wires? Pah.....

Post by Advance » Mon Nov 28, 2011 7:21 pm

Another brilliant piece of work guys. This is going to make the UPURS system so versatile.
Will it mean a whole new driver's handbook Paul?
Congratulations,
Hugh

Post Reply