MAME: IDE/SCSI and other large storage devices

discuss bbc micro and electron emulators (including mame) here!
User avatar
BeebMaster
Posts: 3526
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: MAME: IDE and other large storage devices

Post by BeebMaster » Wed Jan 22, 2020 4:12 pm

I've no idea. It isn't really mine, just on a sort of extended (possibly permanent) loan from its real owner, so I've no information on its provenance. I'm doing lots of hard disc archivy things lately so I ought to have another go with it some time, but, typically, it's in a very inaccessible location in storage!
Image

User avatar
Pernod
Posts: 2190
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by Pernod » Thu Jan 23, 2020 12:35 pm

And now have the AIV SCSI Host Adaptor working:
0001.png
Last edited by Pernod on Fri Jan 24, 2020 2:39 am, edited 1 time in total.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
Pernod
Posts: 2190
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by Pernod » Thu Jan 23, 2020 12:40 pm

Does anyone know what the Winchesters in the ABC machines would've been pre-installed with?

The ABC110 and ABC310 likely had CP/M and DOSPlus/GEM respectively, but would these have booted from the Winchester or still required a floppy to start them?

Has anyone tried installing CP/M onto a harddisk, and make it bootable? Have any of the Winchesters from the known ABC machines ever been dumped?

Edit: CP/M info at Z80 Winchester Utilities
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
Pernod
Posts: 2190
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by Pernod » Sun Jan 26, 2020 10:41 pm

I'm implementing the Adaptec vendor specific SCSI commands that are required to Format.

What does Error 7F during ModelSel mean?
0056.png
Are the error codes documented anywhere?
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
jgharston
Posts: 4081
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by jgharston » Mon Jan 27, 2020 12:51 am

Pernod wrote:
Sun Jan 26, 2020 10:41 pm
I'm implementing the Adaptec vendor specific SCSI commands that are required to Format.

What does Error 7F during ModelSel mean?

Are the error codes documented anywhere?
It's a lot harder to track these down than IDE, 1770 or 8271 details:
http://mdfs.net/Docs/Comp/Disk/SCSICmds

Code: Select all

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

User avatar
jgharston
Posts: 4081
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: MAME: IDE and other large storage devices

Post by jgharston » Mon Jan 27, 2020 12:59 am

Pernod wrote:
Tue Jan 21, 2020 5:58 pm
You'll need Torch software to use it as it's mapped into JIM rather than FRED, probably &FDFx.
Yep:

Code: Select all

Non-Extended Memory Use
=======================
In the absence of external RAM some hardware has used addresses in JIM for
other purposes.

FDF0-F7 Torch SASI/SCSI Hard Drive Access
-----------------------------------------
Addr  Write Action                      Read Action
--------------------------------------------------------------------
FDF0  Data Out                          Data In    
FDF1  Reset                             Status     
FDF2  Select 1                          Set ACK (SASI only)          
FDF3  Select 0                          -

Code: Select all

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

User avatar
Pernod
Posts: 2190
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by Pernod » Wed Jan 29, 2020 7:50 pm

Could someone with a real Acorn Winchester tell me what happens when you *MOUNT anything other than 0? Does it sit there waiting or give an error such as 'Drive not ready'?

I'm having to implement all the possible error conditions generated by the ACB-4000A and as I've never used a real Winchester am unsure of expected behaviour.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
KenLowe
Posts: 1314
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by KenLowe » Wed Jan 29, 2020 8:42 pm

I get a 'Disc Error 70 at :1/000500' error for *MOUNT 1
Similarly, I get a 'Disc Error 70 at :2/000500' error for *MOUNT 2

This is with a Viglen host adaptor connected to a Fujitsu SCSI drive (ie not an ACB-4000A). I'm fairly sure it's not possible to have mutiple LUNs with this drive. At one stage, I began the process of patching ADFS so that switching drives in ADFS switched SCSI drive instead of LUN, but that's another half finished project.

User avatar
Pernod
Posts: 2190
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by Pernod » Wed Jan 29, 2020 9:41 pm

KenLowe wrote:
Wed Jan 29, 2020 8:42 pm
I get a 'Disc Error 70 at :1/000500' error for *MOUNT 1
Similarly, I get a 'Disc Error 70 at :2/000500' error for *MOUNT 2

This is with a Viglen host adaptor connected to a Fujitsu SCSI drive (ie not an ACB-4000A). I'm fairly sure it's not possible to have mutiple LUNs with this drive. At one stage, I began the process of patching ADFS so that switching drives in ADFS switched SCSI drive instead of LUN, but that's another half finished project.
This sounds like an additional device to implement. I don't have any technical details on the Viglen drives, which controller does it use, and what's the drive model number?

From what I know about the Adaptec controller I don't think it's capable of returning an error 70, probably specific to the controller used in the Viglen.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
KenLowe
Posts: 1314
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by KenLowe » Wed Jan 29, 2020 11:42 pm

Pernod wrote:
Wed Jan 29, 2020 9:41 pm
KenLowe wrote:
Wed Jan 29, 2020 8:42 pm
I get a 'Disc Error 70 at :1/000500' error for *MOUNT 1
Similarly, I get a 'Disc Error 70 at :2/000500' error for *MOUNT 2

This is with a Viglen host adaptor connected to a Fujitsu SCSI drive (ie not an ACB-4000A). I'm fairly sure it's not possible to have mutiple LUNs with this drive. At one stage, I began the process of patching ADFS so that switching drives in ADFS switched SCSI drive instead of LUN, but that's another half finished project.
This sounds like an additional device to implement. I don't have any technical details on the Viglen drives, which controller does it use, and what's the drive model number?

From what I know about the Adaptec controller I don't think it's capable of returning an error 70, probably specific to the controller used in the Viglen.
This Viglen drive was originally made up of (from memory) a Viglen host adaptor (I think it's the same as the Acorn one), an Adaptec SCSI controller and a 28MB MFM/RLL drive. The drive failed many years ago, and I replaced both the drive and Adaptec SCSI controller with a standard Fujitsu M2681SAM SCSI drive that was capable of being formatted to 256 bytes/block (sector) with Mode Select & Format Unit commands. So, although this drive works well, it can no longer be considered an original Viglen drive.
20200129_234953.jpg
'Upgraded' Viglen SCSI Drive + Newer Style Host Adaptor
However, I do also have another old Viglen SCSI drive. Again, this one has a Viglen host adaptor (slightly older design than the one above), an Adaptec ACB-4000A SCSI controller and a faulty NEC D5126 HDD. I can *MOUNT0 this drive, but it hangs if I subsequently try to read the catalogue. The drive won't format either. If I try to *MOUNT1 with this hardware, I get a delayed 'Drive Not Ready' error. If I try to *MOUNT2 or *MOUNT3, I get an immediate 'Not Found' error.
20200129_234738.jpg
Original (Faulty) Viglen SCSI Drive
20200130_000915.jpg
Adaptec ACB-4000A Controller
20200129_234720.jpg
Older Style Viglen Host Adaptor
Last edited by KenLowe on Thu Jan 30, 2020 1:39 am, edited 1 time in total.

User avatar
BeebMaster
Posts: 3526
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by BeebMaster » Thu Jan 30, 2020 12:45 am

Well, I've learnt something today: patience is a virtue after all! I was about to say that *MOUNT 1 on an Adaptec controller just waits forever, but it doesn't - it waits about two-and-a-half minutes before reporting "Drive not ready". I don't think I've ever waited that long before!

The Adaptec ACB4000 and ACB4000A used by Acorn can support two drives. Trying *MOUNT 2 and *MOUNT 3 gives a Not found error without any delay.

Here's a picture using RGBtoHDMI, I'm still getting mode 7 right (more elsewhere):
capture36.png
I was going to say that disc error &70 sounds more like a SCSI error than a ST506 type error number. I get that error with a "modern" (50-pin) SCSI disc. Most of the errors returned by the Adaptec controllers are "physical" disc errors like sector not found, CRC error etc., with only a few controller type errors like Bad argument (&24). I think have seen error &7F on occasion, I don't think it's an error generated by the controller, more like when something has gone wrong between ADFS and the host adapter.
Image

User avatar
Pernod
Posts: 2190
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by Pernod » Thu Jan 30, 2020 11:46 am

Thanks both for the very useful info.

KenLowe: It sounds like the Viglen Host Adaptor is an exact clone of the Acorn board, would you agree?

BeebMaster: On your site you've experimented with two drives attached to the Adaptec board, did this work with an unmodified ADFS? ADFS definitely passes the drive number as LUN in the SCSI commands, so 2 and 3 are always invalid but 1 will wait for a response if no second drive is connected.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
BeebMaster
Posts: 3526
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by BeebMaster » Thu Jan 30, 2020 1:53 pm

Yes, that's right, the standard ADFS (1.30/1.50) will support up to four hard drives if the hardware supports it. With SCSI2SD/CF IDE/BeebSCSI you can have hard drives 0-3 all present and correct. I don't think there was ever any physical hardware back in the 1980s that could cope with that many drives. The Adaptec controllers allow two drives, they are jumpered 0 and 1 and there is a separate 20 way data cable for each of the drives. That's what I did with what I termed my "Winchester disc remains."

As I understand it ADFS will only talk to a device with SCSI ID 0, which is what the Adaptec controllers must be set to, and within that it can address up to 4 LUNs on SCSI ID 0, with Adaptec supplying LUNs 0 and 1. Basically because of this you can't plug one complete Winchester unit into the back of another and have them both available, ADFS just gets confused because both units are SCSI 0 with LUN 0; even setting one of them to LUN 1 doesn't work as ADFS is still seeing two conflicting SCSI 0 IDs on the bus.

I believe it's possible to change the mapping in the 1MHz bus memory map to make it appear in a different location to, in theory, have 2 host adapters with drives connected, but I've never got anywhere with that. I think even if ADFS could be made to "see" the alternatively-mapped host, there would still be the problem of ADFS not seeing anything other than SCSI ID 0. The Digistore tape streamer does manage it somehow, as it uses an alternatively-mapped host adapter so that you can backup a Winchester to tape, but it has its own OSWORD calls to access the tape, and it doesn't get seen by ADFS.
Image

User avatar
Pernod
Posts: 2190
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by Pernod » Thu Jan 30, 2020 2:33 pm

BeebMaster wrote:
Thu Jan 30, 2020 1:53 pm
I believe it's possible to change the mapping in the 1MHz bus memory map to make it appear in a different location to, in theory, have 2 host adapters with drives connected, but I've never got anywhere with that. I think even if ADFS could be made to "see" the alternatively-mapped host, there would still be the problem of ADFS not seeing anything other than SCSI ID 0. The Digistore tape streamer does manage it somehow, as it uses an alternatively-mapped host adapter so that you can backup a Winchester to tape, but it has its own OSWORD calls to access the tape, and it doesn't get seen by ADFS.
Yeah, I'd like to support the Digistore too eventually, I understand it responds to SCSI ID 1. Unfortunately MAME doesn't yet implement a SCSI tape device so this will require additional work.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
KenLowe
Posts: 1314
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by KenLowe » Thu Jan 30, 2020 2:56 pm

Pernod wrote:
Thu Jan 30, 2020 11:46 am
KenLowe: It sounds like the Viglen Host Adaptor is an exact clone of the Acorn board, would you agree?
Yes, I believe so. It's using all the same components. I did start to trace out my newer Viglen board to verify it against the circuit diagram that's floating around the web, but that's another stalled project.
BeebMaster wrote:
Thu Jan 30, 2020 1:53 pm
As I understand it ADFS will only talk to a device with SCSI ID 0, which is what the Adaptec controllers must be set to, and within that it can address up to 4 LUNs on SCSI ID 0, with Adaptec supplying LUNs 0 and 1. Basically because of this you can't plug one complete Winchester unit into the back of another and have them both available, ADFS just gets confused because both units are SCSI 0 with LUN 0; even setting one of them to LUN 1 doesn't work as ADFS is still seeing two conflicting SCSI 0 IDs on the bus.
As mentioned earlier in this thread, I did start to patch ADFS so that it would switch SCSI ID instead of LUN when trying to select a different drive, but that's yet another stalled project!

User avatar
Pernod
Posts: 2190
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by Pernod » Sat Feb 01, 2020 10:14 pm

I now have the 'Drive not ready' and 'Not found' errors handled correctly:
0058.png
It will also format using Superform, but am still getting an unspecified error &7F whenever I perform a write operation. The saving of files succeeds and I can load it back in, but always gives an error on save. As this error is being generated by ADFS and not the Adaptec board I'm not sure where the issue is, maybe interrupts from the host adaptor?

If a second harddisk image is mounted to the Adaptec board then I also support LUN 1, but 2 and 3 will always return 'Not found'.

There's a post at viewtopic.php?f=3&t=14174#p189033 that suggests a LUN is auto started with any read operation. Could someone do a *BYE then *. :0 to confirm this?
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
BeebMaster
Posts: 3526
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by BeebMaster » Mon Feb 03, 2020 4:59 pm

Yes, *BYE followed by *.:0 or *DUMP something or LOAD"something" causes the disc to be started again. That is, BYE parks the heads but doesn't actually spin down or power off the drive with ST506 discs in the way that it does with SCSI discs.

Incidentally *. after *BYE causes the current directory to be catalogued again as it remains in RAM. *DISMOUNT is needed to force a disc read at this point. (That's the same behaviour as ADFS floppy discs).
Image

User avatar
Pernod
Posts: 2190
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by Pernod » Mon Feb 03, 2020 9:50 pm

BeebMaster wrote:
Mon Feb 03, 2020 4:59 pm
Yes, *BYE followed by *.:0 or *DUMP something or LOAD"something" causes the disc to be started again. That is, BYE parks the heads but doesn't actually spin down or power off the drive with ST506 discs in the way that it does with SCSI discs.
Thanks, my lack of real ADFS experience is clearly showing.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
Pernod
Posts: 2190
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by Pernod » Sat Mar 14, 2020 3:47 pm

The DataCentre is now mostly emulated, including RAM and NVRAM drives. The USB ports will not be added anytime soon as MAME doesn't yet implement any USB controllers.
Instead of using *IMPORT from USB to RAMFS I added a quickload option to import any ssd,dsd,img from your local filesystem into any RAM drive.
0170.png
0167.png
0168.png
0169.png
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
Pernod
Posts: 2190
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: IDE/SCSI and other large storage devices

Post by Pernod » Tue Jul 21, 2020 8:35 pm

The Torch SASI Hard Disc Pack is now emulated:
0023.png
This is implemented as per the circuit diagram at http://mdfs.net/Info/Comp/Torch/scsi1.gif, which bears little resemblance to the BeebEm implementation.

The motivation for getting this in is that I can now look at the Torch 68000 boards. The Torch Model 725 requires Unix to be installed from floppy to the hard drive before it even tries to run anything on the 68000 CPU. So I should now be able to at least setup a suitable hard drive image using the installation floppies, and see what I can do from there.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

Post Reply

Return to “8-bit acorn emulators”