Model Master 128+Acorn Z80 Second Processor

discuss bbc micro and electron emulators (including mame) here!
Paolo_R
Posts: 50
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Model Master 128+Acorn Z80 Second Processor

Post by Paolo_R »

Running with this configuration I would like to know

(a) how can I attach a hard disk drive e.g. as a C: drive and, if it is possible,
(b) do I need to format the disk as a CP/M disk or do any of the provided hard disk images already come in this format?

Thanks
Coeus
Posts: 3557
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Coeus »

Paolo_R wrote: Tue Jul 07, 2020 9:30 am Running with this configuration I would like to know
First of all, can you confirm which emulator you are using. This sounds like B-Em but there are others.
Paolo_R wrote: Tue Jul 07, 2020 9:30 am (a) how can I attach a hard disk drive e.g. as a C: drive and, if it is possible,
There are some resources for this here: http://mdfs.net/Software/CPM/Acorn/HardDrive/ Definitely read the README. Jonathan Harston, who runs that site is a bit of a CP/M expert.

Jonathan's instructions say that the image file for the CP/M hard disc can be hosted by any Acorn compatible filing system. If you want to put it on an ADFS hard disc then you obviously need a hard disc working on B-Em. If you haven't already done this then you need to enable a hard disc interface from the disc menu, i.e. either SCSI or IDE. I would recommend SCSI as it doesn't need a patched version of ADFS and also take up half the space of the IDE images.

The SCSI emulation supports four hard discs each of which is a pair of files with names scsi0.dat and scsi0.dsc for the numbers 0-3. On linux these go in ~/.config/b-em/scsi and on Windows in s similar scsi directory within your roaming profile for B-Em. If you don't start with a pre-build hard disc image there is program, hdfmt, included with b-em to create one.

Alternatively, you could use VDFS as the current filing system - that would mean that the CP/M hard disc image would be a normal file within your host OS so you could manipulate it with any tools there that can deal with the MyZ80 format.

I hope this helps. If you run into problem, if you describe what you've tried and what happened, we can help.
User avatar
egel
Posts: 158
Joined: Mon Nov 25, 2019 1:10 pm
Location: Almere, Flevoland, The Netherlands
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by egel »

viewtopic.php?f=32&t=17150

Jonathan Harston solution for a cp/m harddisk is slow and somewhat unstable.
Paolo_R
Posts: 50
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Paolo_R »

@Coeus - sorry forgot to mention. I'm using BeebEm.
Coeus
Posts: 3557
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Coeus »

egel wrote: Tue Jul 07, 2020 3:54 pm viewtopic.php?f=32&t=17150

Jonathan Harston solution for a cp/m harddisk is slow and somewhat unstable.
Ok, I have done some testing in B-Em (because I am on Linux) and I think I can guess why the JGH HDBIOS is slow. For each sector the CP/M BDOS requests from the hard disc the BIOS opens the CPMDISC file with OSFIND, reads the sector with OSGBPB and then closes the file again with OSFIND.

That doesn't address the issue of the file copying failure, though. What is odd here is that the changes made to the BIOS are on the Z80 side of the tube and the screen corruption that accompanies the failure is happening on the BBC Micro side of the tube.
Paolo_R
Posts: 50
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Paolo_R »

@Coeus @egel

This is all getting too technical for me I'm afraid. It's a pity the BeebEm designers didn't make attaching a hard disk to CP/M /Acorn Z80 second processor as easy as they did for the Torch Z80 second processor - just add a SCSI disk via Hardware -> SCSI Hard DriveOn/Off. Very straightforward.
User avatar
DutchAcorn
Posts: 2674
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by DutchAcorn »

As an alternative you can use the Z80 Winchester utilities posted in this thread.

If you like you can use this scsi image from my dropbox that has the Z80 utilities installed. To get things going:
- Enable the SCSI hard drive in Beebem
- Configure the hard drive in the M128 (*CONFIGURE HARD)
- Configure ADFS as the file system in the M128 (*CONFIGURE FILE 13)
- Enable the Z80 Second Processor
- Press A-F12 (the A key together with the F12 (=BREAK) key. This should get you to a command (*) prompt
- Show the directory: *CAT
- Change directory to CPM: *DIR CPM
- Start the Winchester Z80 driver: *RUN Z


CPM Winchester.jpg
The A drive is a hard disc drive with this setup, not the floppy drive. This is actually not bad for compatibility, most software is designed to run from floppy drives. For more details on how to copy stuff from floppies, please check the tread I mentioned above.
Paul
Paolo_R
Posts: 50
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Paolo_R »

DutchAcorn

Many thanks. I got as far as your message/image showed i.e.

Acorn CPM 2.2 - HD Bios 2.2

A>DIR
A:PIP .... etc

STAT shows 1912k free. So A: is the hard drive. If I want to copy software to A; I presume I just Load Disk 1 with a program disk and just do
PIP A:=B:*.* and use the various USER areas as 'folders' for various pieces of software.

Just tried it with CIS COBOL on Disk 1 but when a do a DIR on B: it shows NO FILE. ???
User avatar
DutchAcorn
Posts: 2674
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by DutchAcorn »

Paolo_R wrote: Wed Jul 08, 2020 12:25 pm DutchAcorn

Many thanks. I got as far as your message/image showed i.e.

Acorn CPM 2.2 - HD Bios 2.2

A>DIR
A:PIP .... etc

STAT shows 1912k free. So A: is the hard drive. If I want to copy software to A; I presume I just Load Disk 1 with a program disk and just do
PIP A:=B:*.* and use the various USER areas as 'folders' for various pieces of software.

Just tried it with CIS COBOL on Disk 1 but when a do a DIR on B: it shows NO FILE. ???
The floppy drive is drive G:

Drive B is another (empty) hard disc partition.
Paul
Coeus
Posts: 3557
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Coeus »

DutchAcorn wrote: Wed Jul 08, 2020 11:09 am As an alternative you can use the Z80 Winchester utilities posted in this thread.
So is this a third method of using a hard disc from CP/M? There is the JGH patched BIOS I already mentioned, then in the top of the page about that BIOS JGH says:
The version 2.00 Z80 MOS supplied with the Acorn Business Computer can access a hard drive. Unfortunately, the system files required appear to be lost, and the code fiddles directly with the SCSI hard drive hardware, making it difficult to use other filing systems or hard drives.
If this was using the SCSI hardware directly, it presumably would not be dependent on ADFS being the filing system. Or is what you describe actually the code from the ABC?
User avatar
DutchAcorn
Posts: 2674
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by DutchAcorn »

Coeus wrote: Wed Jul 08, 2020 3:42 pm
DutchAcorn wrote: Wed Jul 08, 2020 11:09 am As an alternative you can use the Z80 Winchester utilities posted in this thread.
So is this a third method of using a hard disc from CP/M? There is the JGH patched BIOS I already mentioned, then in the top of the page about that BIOS JGH says:
The version 2.00 Z80 MOS supplied with the Acorn Business Computer can access a hard drive. Unfortunately, the system files required appear to be lost, and the code fiddles directly with the SCSI hard drive hardware, making it difficult to use other filing systems or hard drives.
If this was using the SCSI hardware directly, it presumably would not be dependent on ADFS being the filing system. Or is what you describe actually the code from the ABC?
Perhaps Boydie as the original author of the post where the utilities were shared has more background on their origins. He does not mention the ABC. It does seem to work only on an unpatched ADFS Winchester drive so it may have the same code base as the ABC. Hard to tell if the ABC files are MIA. :roll:
Paul
User avatar
jgharston
Posts: 5321
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by jgharston »

Paolo_R wrote: Wed Jul 08, 2020 4:31 am This is all getting too technical for me I'm afraid. It's a pity the BeebEm designers didn't make attaching a hard disk to CP/M /Acorn Z80 second processor as easy as they did for the Torch Z80 second processor - just add a SCSI disk via Hardware -> SCSI Hard DriveOn/Off. Very straightforward.
Well, 'cos it's nothing to do with the Beeb, it's to do with the CPM BIOS on the Z80.

Yes, the HDBIOS is slow, because yes it has to OSGBPB bytes to and from the image file, and ADFS in particular is a dog with random file access. It zips along on HADFS. The alternative is to hold the image file open all the time, but that needs a decision as to exactly *when* it opens it, and what action do you trap to close it so that it is safely updated.

Back when I wrote it in 2010 it worked fine. I'll have to go through it and see what's happening, and see if what's on the website has somehow been broken.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.45
(C) Copyright J.G.Harston 1989,2005-2024
>_
User avatar
jgharston
Posts: 5321
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by jgharston »

I've never had the files that DutchAcorn has just posted, so while I have the 2.00 replacement Z80 Client ROM, it's useless for hard drive access without file files it looks for on the hard drive.
Plus, from looking through the code of the ROM, it does horrible messing about with the hardware instead of using APIs, so is tied to one specific implementation.

Another line I started on years ago was to use the SJ BDOS method and pass file calls to the actual underlying file system rather than to a disk image, so an access to FRED.TXT would access the actuaL file FRED/TXT on the actual file system rather than look for it within a disk image.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.45
(C) Copyright J.G.Harston 1989,2005-2024
>_
Coeus
Posts: 3557
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Coeus »

jgharston wrote: Wed Jul 08, 2020 5:56 pm I've never had the files that DutchAcorn has just posted, so while I have the 2.00 replacement Z80 Client ROM, it's useless for hard drive access without file files it looks for on the hard drive.
Nice to hear something previously missing has resurfaced.
jgharston wrote: Wed Jul 08, 2020 5:56 pmPlus, from looking through the code of the ROM, it does horrible messing about with the hardware instead of using APIs, so is tied to one specific implementation.
How does one mess with hardware from the client side of the tube? Is there a disassembly of the V2 client ROM? I have found the one for 1.2 on your mdfs.net.
jgharston wrote: Wed Jul 08, 2020 5:56 pmAnother line I started on years ago was to use the SJ BDOS method and pass file calls to the actual underlying file system rather than to a disk image, so an access to FRED.TXT would access the actuaL file FRED/TXT on the actual file system rather than look for it within a disk image.
Now that's an interesting approach. Looking at the CP/M API that isn't something it makes easy. Is there any documentation of what SJ have done in their BDOS?
Paolo_R
Posts: 50
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Paolo_R »

@Dutch Acorn

So I will need to format drive b: and then initialize for CP/M (using HDMAN) ?

If G: is a floppy drive should I load Disk 0 or Disk 1 with the software I want to copy to the hard drive (A:) or B:) ?

Thanks again.
Paolo_R
Posts: 50
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Paolo_R »

Actually Disk 0 appears as drive G:
Paolo_R
Posts: 50
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Paolo_R »

Also I deduced that disc B: is already formatted.
Paolo_R
Posts: 50
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Paolo_R »

@DutchAcorn

At the moment when I leave CP/M on the Acorn Z80 I lose my set up i.e. when I restart BeebEm and want to institute your A: and B: hard disks as you have described, I have to go through the the procedure:

- Enable the SCSI hard drive in Beebem
- Configure the hard drive in the M128 (*CONFIGURE HARD)
- Configure ADFS as the file system in the M128 (*CONFIGURE FILE 13)
- Enable the Z80 Second Processor
- Press A-F12 (the A key together with the F12 (=BREAK) key. This should get you to a command (*) prompt
- Show the directory: *CAT
- Change directory to CPM: *DIR CPM
- Start the Winchester Z80 driver: *RUN Z

Is there any way I can save these settings so that next time I can load straight into the Winchester Z80 driver? I tried Save Preferences but that did not do the job.

Thanks
User avatar
DutchAcorn
Posts: 2674
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by DutchAcorn »

Paolo_R wrote: Thu Jul 09, 2020 4:39 am Also I deduced that disc B: is already formatted.
Yes, the image I shared is set up with 2 CP/M partitions of 2MB, as drives A and B. Using HDMAN you can setup a maximum of 4 partitions ("logical hard disc drives") on 2 "physical" hard disc (SCSI) drives. You can choose to have them 1,2,4 or 8 MB.

Note that HDMAN needs to be started from the floppy disc image using the standard bios it does not seem to work if you start it from the HD bios.

Paolo_R wrote: Thu Jul 09, 2020 9:00 am @DutchAcorn
...

Is there any way I can save these settings so that next time I can load straight into the Winchester Z80 driver? I tried Save Preferences but that did not do the job.

Thanks
I'm not a BeebEm expert but more settings are saved if you choose Options->Preference Options->Autosave All Prefs.

If you want a quick start into CP/M you can setup a !boot file on the hard drive to do so.

Use *BUILD !BOOT

Code: Select all

1 CPM.Z
2 
3
On line 3 press Escape to save the file. Somehow it needs the extra carriage return on line 2 to get the CP/M prompt.
You'll also need to make the the hard disc bootable:
*OPT 4,3

If you set it up like this you should be able to start CP/M on the hard disc by starting BeebEm and then press SHIFT-F12.
Paul
Paolo_R
Posts: 50
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Paolo_R »

@DutchAcorn

Many thanks. You have been very helpful. I shall try that *BUILD !BOOT procedure.
Coeus
Posts: 3557
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Coeus »

Coeus wrote: Wed Jul 08, 2020 9:17 pm How does one mess with hardware from the client side of the tube? Is there a disassembly of the V2 client ROM? I have found the one for 1.2 on your mdfs.net.
Better than that, it seems there is original source - I found it on the other thread.
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Pernod »

DutchAcorn wrote: Wed Jul 08, 2020 11:09 am If you like you can use this scsi image from my dropbox that has the Z80 utilities installed. To get things going:
- Enable the SCSI hard drive in Beebem
- Configure the hard drive in the M128 (*CONFIGURE HARD)
- Configure ADFS as the file system in the M128 (*CONFIGURE FILE 13)
- Enable the Z80 Second Processor
- Press A-F12 (the A key together with the F12 (=BREAK) key. This should get you to a command (*) prompt
- Show the directory: *CAT
- Change directory to CPM: *DIR CPM
- Start the Winchester Z80 driver: *RUN Z
Been following this topic with interest. The elusive Z80 BIOS 2.00 can be found in the collection at viewtopic.php?f=32&t=17829
With this BIOS your SCSI image autoboots at startup and CTRL-BREAK.

So is this SCSI for Master use only? I can't access the floppy G: drive on BBC B/B+, only on Master.

Is it the BIOS on the Z80 board that determines which floppy controller is supported, ie. B 8271, B/B+ 1770, M 1770?
0416.png
0417.png
At some point I'd like to see a clean SCSI image containing a typical Acorn CP/M configuration, with the Acorn CP/M floppies pre-installed.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
User avatar
DutchAcorn
Posts: 2674
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by DutchAcorn »

So this seems to be converging.

I have not tried this on real hardware yet and I don't have a real Z80 second processor to try the 2.0 BIOS on but I could replicate the behaviour using BeebEm. In BeebEm the G: drive works fine on a model B with 8271 or a B+ with a 1770. Will set up my model B this weekend to see what it does with real hardware.


@Paolo_R: this would save you from building the !boot file; you can replace the existing Z80.ROM file in the BeebFile folder in BeebEm with the 2.0 version (attached) and it will autoboot with hard disc.
Attachments
Z80.ROM.zip
(3.04 KiB) Downloaded 53 times
Paul
Paolo_R
Posts: 50
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Paolo_R »

@DutchAcorn

Thanks again :-)

With the new Z80.COM just choosing the Acorn Z80 second processor boots straight into CP/M. Magic!!!
Paolo_R
Posts: 50
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Paolo_R »

I should have said that it boots straight into CP/M 2.2 - HDBios 2.10, plus the hard disk.
User avatar
DutchAcorn
Posts: 2674
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by DutchAcorn »

Pernod wrote: Thu Jul 09, 2020 6:00 pm ...
So is this SCSI for Master use only? I can't access the floppy G: drive on BBC B/B+, only on Master.

...
I also tried it on my real BBC model B, works fine. So I can't replicate your floppy access issues. :?
Paul
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Pernod »

DutchAcorn wrote: Sat Jul 11, 2020 8:28 pm
Pernod wrote: Thu Jul 09, 2020 6:00 pm ...
So is this SCSI for Master use only? I can't access the floppy G: drive on BBC B/B+, only on Master.

...
I also tried it on my real BBC model B, works fine. So I can't replicate your floppy access issues. :?
Thanks for clarifying, it's a screwy emulation issue I have.

So is the general consensus that the Z80 2.00 ROM was originally intended for the ABC110 machines, and was not generally released with the Z80 copro?

At a future visit I think a closer inspection of http://www.computinghistory.org.uk/det/ ... ter-(ABC)/ is required.

Would also be interesting to hear from someone involved with the ABC range to provide some info on the Z80 Winchester Utilities and determine what was intended to be installed on the shipped ABC110.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
User avatar
jgharston
Posts: 5321
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by jgharston »

Coeus wrote: Wed Jul 08, 2020 9:17 pm Now that's an interesting approach. Looking at the CP/M API that isn't something it makes easy. Is there any documentation of what SJ have done in their BDOS?
See http://mdfs.net/Software/CPM/ZNOS/
Essentially, access to a CP/M file "name.ext" looks for a file "ext.name" in the BBC current directory.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.45
(C) Copyright J.G.Harston 1989,2005-2024
>_
Coeus
Posts: 3557
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Coeus »

jgharston wrote: Mon Jul 13, 2020 10:13 am See http://mdfs.net/Software/CPM/ZNOS/
Essentially, access to a CP/M file "name.ext" looks for a file "ext.name" in the BBC current directory.
I will check that out. Meanwhile I have found a bug in the 2.00 client ROM:
bug.png
Don't worry about the lack of prompt - this is running with the debugger open its the bar towards the bottom right of the screen that's interesting. The Z80 client ROM copies some code over to the I/O processor so it can do faster transfers to/from I/O processor memory which the Acorn CP/M BIOS uses as a directory cache. The code in the 2.00 ROM checks the version of the OS and if it's 2 or higher, i.e. B+ or Master, copies this code into what it thinks is shadow memory whereas if it was < 2 it copies it into an area below the bottom of the screen just as 1.20 does. However, the 2.00 ROM does not specifically select a shadow mode and in this case the mode selected is non-shadow mode 0 so there is the code on the screen!

It is also interesting that the source which turned up, which is partial and not necessarily contiguous, is for 2.10 whereas the ROM image referred to in the thread is 2.00.
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: Model Master 128+Acorn Z80 Second Processor

Post by Pernod »

Coeus wrote: Mon Jul 13, 2020 2:35 pm It is also interesting that the source which turned up, which is partial and not necessarily contiguous, is for 2.10 whereas the ROM image referred to in the thread is 2.00.
I wasn't even aware that there was anything but 1.20 in the wild until the 2.00 ROM was found. We need to take a closer look at any ABC machines in the future to see which ROM versions they use.

Would also be nice to find some ex-Acorn employee involved with the ABC machines, and maybe find some installation media for the ABC110 and ABC310.
- 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”