How do I hot swap disk images on the MMC?

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
Commie_User
Posts: 868
Joined: Wed Jan 27, 2016 12:50 am

How do I hot swap disk images on the MMC?

Postby Commie_User » Fri May 05, 2017 11:41 pm

I understand from the manual that the SD card itself is hot-swappable. And on the BASIC screen I can type whatever to access disk after disk. But say, in the Music System, I want to insert a work disk into the emulated disk drive after I have loaded the main program? There's no switch or anything.

dp11
Posts: 671
Joined: Sun Aug 12, 2012 8:47 pm

Re: How do I hot swap disk images on the MMC?

Postby dp11 » Fri May 05, 2017 11:53 pm

*DIN 201 ?

Coeus
Posts: 407
Joined: Mon Jul 25, 2016 11:05 am

Re: How do I hot swap disk images on the MMC?

Postby Coeus » Sat May 06, 2017 12:34 am

Or is the issue that you want some blank discs in the set beyond the pre-build images you have loaded onto the SSD card? To do that you need to create a blank SSD just like any other and load that into some spare slots at the end so you can select it with *DIN like any other image.

User avatar
richardtoohey
Posts: 3354
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: How do I hot swap disk images on the MMC?

Postby richardtoohey » Sat May 06, 2017 1:20 am

Commie_User wrote:the SD card itself is hot-swappable
I'd take that to mean you can take out the SD card and plug another one in while the BBC is still on (like server drives - you can swap them out even when the server is running; don't try on a desktop PC!)

A cold swap is similar to changing a drive on a desktop PC: you'd have to power the machine down (so it's "cold"), unplug the old disk drive, plug the new one in, turn on ("hot") again.

I don't know if that's what the manual means so don't rely on me(!), I'm just saying that's what hot swap means to me.

Commie_User
Posts: 868
Joined: Wed Jan 27, 2016 12:50 am

Re: How do I hot swap disk images on the MMC?

Postby Commie_User » Sat May 06, 2017 1:22 am

dp11 wrote:*DIN 201 ?


Well how do I type that into a loaded program? It's not like there's an Action Replay for the Beeb, where I can pause the program to toggle drive priority.

Commie_User
Posts: 868
Joined: Wed Jan 27, 2016 12:50 am

Re: How do I hot swap disk images on the MMC?

Postby Commie_User » Sat May 06, 2017 1:26 am

Here's the manual for the MMC.

Hot swap even extends to swapping the interface itself between BBCs, though it does warn of some kind of electrical consequences.
Attachments
Using MMC.pdf
(291.95 KiB) Downloaded 23 times

User avatar
richardtoohey
Posts: 3354
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: How do I hot swap disk images on the MMC?

Postby richardtoohey » Sat May 06, 2017 1:29 am

I think it is explicitly saying you can't do what you want to do, my emphasis:

There is no need to turn off either computer when the card is swapped around in this manner. Obviously you would not do this when the card is being accessed at all, any more than you would unplug some kind of USB device from a PC when it is being used.

Commie_User
Posts: 868
Joined: Wed Jan 27, 2016 12:50 am

Re: How do I hot swap disk images on the MMC?

Postby Commie_User » Sat May 06, 2017 1:35 am

I've tried running a program where it says Insert Disk 2. And I'm stuffed, as I see no way to move from - say - *DIN 180 to *DIN 181 without resetting the machine.

So perhaps all I can do is have two MMC cards, one with the program disk in the first slot, then the second card with part two also in the first slot. Then I can swap cards as I would swap disks in a real system. They cost about the same in real terms anyway, so at least that's authentic.

User avatar
richardtoohey
Posts: 3354
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: How do I hot swap disk images on the MMC?

Postby richardtoohey » Sat May 06, 2017 1:41 am

Not sure that would work (would it get confused between the old and new disc catalogues?) but I'm definitely not a MMC expert, so wait for one of those to come along :-

Alternatively, patch the program if possible; someone might already have made a MMC-friendly version of it.

Commie_User
Posts: 868
Joined: Wed Jan 27, 2016 12:50 am

Re: How do I hot swap disk images on the MMC?

Postby Commie_User » Sat May 06, 2017 1:56 am

Hmm. Well for myself, I'm not a patch expert.

Next time I get the gear running, I'll experiment with swapping the whole cards. I've experience of hot swapping, come to think of it, as I've added images at the last moment because I forgot about them. So I've no doubt I can use a spare MMC card as a surrogate floppy disk for project saves and whatnot.

On my Commodore, I use a serial network system called C64TPC. Using the PC as a server, I can swap disk images around in the virtual drive as easy as anything while the 64 is working.

User avatar
tricky
Posts: 1816
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: How do I hot swap disk images on the MMC?

Postby tricky » Sat May 06, 2017 5:56 am

You can mount four sides at a time (emulating two double sided discs), and then save to 1:, 2: or 3: assuming the programme is in 0:.
Some programmes also let you enter * commands.
I know at least one person who uses a WiFi enabled SD card so that they can manipulate the disc imagess without removing the card.

Coeus
Posts: 407
Joined: Mon Jul 25, 2016 11:05 am

Re: How do I hot swap disk images on the MMC?

Postby Coeus » Sat May 06, 2017 8:46 am

Commie_User wrote:On my Commodore, I use a serial network system called C64TPC. Using the PC as a server, I can swap disk images around in the virtual drive as easy as anything while the 64 is working.


There is something similar for the BBC called HostFS. It runs the tube protocol over a serial connection, either the RS423 or UPURS and communicates with a server program on the PC. SWEH has one version of the server program and there may be others. The difference is that it works at the file level, rather than disc image level but that still gives you the ability to dynamically change which files the BBC sees even while in a program that does not let you execute OS commands.

duikkie
Posts: 2655
Joined: Fri Feb 07, 2014 3:28 pm

Re: How do I hot swap disk images on the MMC?

Postby duikkie » Sat May 06, 2017 11:53 am

i don't understand the problem #-o , i think your are using a program from a real disk with discdrive and the program want to use a real disc in drive 2 as your working disk ??

if that is the case : we must convert the main program :P , because it has the commands *disc or *disk or *drive2 in it program.

so upload the program disc you are using , maybe we can modify it to run on mmc or sd card mode/cards

Commie_User
Posts: 868
Joined: Wed Jan 27, 2016 12:50 am

Re: How do I hot swap disk images on the MMC?

Postby Commie_User » Sat May 06, 2017 12:10 pm

tricky wrote:You can mount four sides at a time (emulating two double sided discs), and then save to 1:, 2: or 3: assuming the programme is in 0:.
Some programmes also let you enter * commands.
I know at least one person who uses a WiFi enabled SD card so that they can manipulate the disc imagess without removing the card.


I'm unfamiliar with the command set for real disk drives but as far as this manual is concerned, there was no *DRIVE command back in the day: http://chrisacorns.computinghistory.org ... ADFSUG.pdf

This means I'm unclear on how old programs may offer a drive toggle option. But after lunch, I'll get grooving and come back with the news.

User avatar
sydney
Posts: 1967
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne

Re: How do I hot swap disk images on the MMC?

Postby sydney » Sat May 06, 2017 12:16 pm

That's because it's the ADFS manual and you want the DFS manual as that is what the mmc systems are based on.

User avatar
sydney
Posts: 1967
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne

Re: How do I hot swap disk images on the MMC?

Postby sydney » Sat May 06, 2017 12:18 pm

Have a look at this https://swhs.home.xs4all.nl/bbc/mmbeeb/ ... DUTILS.pdf . It's the manual Martin Mather produced for his original mmbeeb.

Coeus
Posts: 407
Joined: Mon Jul 25, 2016 11:05 am

Re: How do I hot swap disk images on the MMC?

Postby Coeus » Sat May 06, 2017 12:20 pm

Commie_User wrote:I'm unfamiliar with the command set for real disk drives but as far as this manual is concerned, there was no *DRIVE command back in the day: http://chrisacorns.computinghistory.org ... ADFSUG.pdf


Though I have not downloaded it to check, the filename of that manual suggests it is for ADFS. ADFS is a hierarchical filing system which I think Acorn originally introduced for hard discs because the 31 filename limit per disc present on DFS would make it hard to use most of the space on a hard disc. Later it was available on double-density floppy drives with the 1770 disc controller.

The original disc filing system called DFS does have a *DRIVE command and numbers drives 0 to 4 such that 0 is the first side of the first drive, 1 is the first side of the second drive, 2 is the second side of the first drive and 3 is the second side of the second drive. That way using single-sided discs would still work (as 0 and 1). It is this earlier DFS filing system that most SD/MMC solutions use (usually by adaptingthe DFS code).

Commie_User
Posts: 868
Joined: Wed Jan 27, 2016 12:50 am

Re: How do I hot swap disk images on the MMC?

Postby Commie_User » Sat May 06, 2017 3:12 pm

Thank you all. The MMC version of the Music System seems to have just such a drive toggler for its data storage, so all's well that presumably ends well.


Well, save for one nigglette.

DSC02545.JPG


I booted up and looked at the default disk images the card gave me. I toggle the drives and the *CAT lists are different.

So it seems that disk image two is also drive two - finding out where MONTY was if I didn't select *DRIVE 2 first.


DSC02546.JPG


Hmm. Whatever, I suppose. When I find out where my spare card is, I'll put a blank disk image slate on there and pack in whatever I need per project.

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

Re: How do I hot swap disk images on the MMC?

Postby DutchAcorn » Sat May 06, 2017 8:15 pm

Still, there is more software requiring inserting a separate data disk.

Wasn't there a rom based utility that could let you temporarily halt running software and enter commands (primarily used for making snapshots)? That would offer the option to enter a *DIN command and change the selected disk image...
Paul

duikkie
Posts: 2655
Joined: Fri Feb 07, 2014 3:28 pm

Re: How do I hot swap disk images on the MMC?

Postby duikkie » Sun May 07, 2017 6:39 am

How is this software running if you have only a single sided disc drive ?

DutchAcorn wrote:Still, there is more software requiring inserting a separate data disk.

Wasn't there a rom based utility that could let you temporarily halt running software and enter commands (primarily used for making snapshots)? That would offer the option to enter a *DIN command and change the selected disk image...

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

Re: How do I hot swap disk images on the MMC?

Postby DutchAcorn » Sun May 07, 2017 4:58 pm

duikkie wrote:How is this software running if you have only a single sided disc drive ?


Insert program disc floppy
Boot main program
[Main program prompts to insert the data disc]
Remove the program floppy disc
Insert the data floppy disc
Press required key to continue
Paul

Commie_User
Posts: 868
Joined: Wed Jan 27, 2016 12:50 am

Re: How do I hot swap disk images on the MMC?

Postby Commie_User » Sun May 07, 2017 8:35 pm

DutchAcorn wrote:Still, there is more software requiring inserting a separate data disk.


There is, which I think is a little pathetic, given the Commodore 64 version requires no data conversion between modules. I have the SSD for that. Probably why they call that 64 package the Advanced Music System, when otherwise they are just the same.

I still want to give this a chance because I want to craft BBC envelopes which I can sample or build up complete parts with.




Mind you, my spare MMC cards came a cropper. Two were corrupt, yet the one which worked on the PC still couldn't be read by the MMC.

User avatar
sweh
Posts: 1833
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: How do I hot swap disk images on the MMC?

Postby sweh » Sun May 07, 2017 9:51 pm

Coeus wrote:There is something similar for the BBC called HostFS. It runs the tube protocol over a serial connection, either the RS423 or UPURS and communicates with a server program on the PC. SWEH has one version of the server program and there may be others. The difference is that it works at the file level, rather than disc image level but that still gives you the ability to dynamically change which files the BBC sees even while in a program that does not let you execute OS commands.

JGH created the core protocol and initial ROM, and a windows server. His code creates a hierarchical tree. My version tried to stick closer to the disk image idea from MMC and let in "insert" disks into various slots.

So I just tried with using symlinks to pretend to switch disks. On my Linux machine I created two directories TST1 and TST2 and pretended that disk "999.TST" was really TST1:

Code: Select all

$ ls -l 999.TST TST*
lrwxrwxrwx 1 sweh sweh    4 May  7 17:46 999.TST -> TST1/

TST1:
total 4
-rw-r--r-- 1 sweh sweh 6 May  7 17:44 file1

TST2:
total 4
-rw-r--r-- 1 sweh sweh 6 May  7 17:45 file2


Now on the Beeb:

Code: Select all

>*DIN 0 999
>*.
Drive 0 (999.TST)
Dir. :0.$   Lib. :0.$  Opt: 0 (off)

    file1

>*TYPE FILE1
file1

So far so good.

Next, on Linux I change the link

Code: Select all

$ rm 999.TST ; ln -s TST2 999.TST


And on the Beeb:

Code: Select all

>*.
Drive 0 (999.TST)
Dir. :0.$   Lib. :0.$  Opt: 0 (off)

    file2

>*TYPE FILE2
file2


So we can see it detected the "disk change"... but with one caveat which may break the game; the disk title is always "999.TST" which probably won't match what the program is looking for!
Rgds
Stephen

Coeus
Posts: 407
Joined: Mon Jul 25, 2016 11:05 am

Re: How do I hot swap disk images on the MMC?

Postby Coeus » Sun May 07, 2017 10:21 pm

sweh wrote:JGH created the core protocol and initial ROM, and a windows server. His code creates a hierarchical tree. My version tried to stick closer to the disk image idea from MMC and let in "insert" disks into various slots.


So is your server opening an SSD or similar on the host fileystem and serving the files cotained therein over the tube protocol (over the serial connection) or does the tube protocol include the ability to run OSWORD 7f for reading and writing disc sectors and your server uses that instead?

User avatar
sweh
Posts: 1833
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: How do I hot swap disk images on the MMC?

Postby sweh » Sun May 07, 2017 10:42 pm

Coeus wrote:
sweh wrote:JGH created the core protocol and initial ROM, and a windows server. His code creates a hierarchical tree. My version tried to stick closer to the disk image idea from MMC and let in "insert" disks into various slots.


So is your server opening an SSD or similar on the host fileystem and serving the files cotained therein over the tube protocol (over the serial connection) or does the tube protocol include the ability to run OSWORD 7f for reading and writing disc sectors and your server uses that instead?

It just serves files from the filesystem; no OSW7F functionality because there's not a set of disk blocks behind it. The README ( https://sweh.spuddy.org/Beeb/TubeHost/README.txt ) describes more about how it works.

One day, when I get the round TUITs, I'm gonna see about ripping MMFS apart and replacing the SD communication layer with a serial-tube like protocol. At first glance it didn't look too easy, with assumptions all over the place :-) But if I can do it then MMFS could be used to access SSDs from a server with the OS calls running locally; that'd make it look and act even more like a floppy, inclduing OSW7F.
Rgds
Stephen

duikkie
Posts: 2655
Joined: Fri Feb 07, 2014 3:28 pm

Re: How do I hot swap disk images on the MMC?

Postby duikkie » Mon May 08, 2017 8:08 am

Why not upload the programmes and the ssd

Maybe i have sometime left to look at it

I dont have a music system and adfs

What do you need to run ?

Commie_User
Posts: 868
Joined: Wed Jan 27, 2016 12:50 am

Re: How do I hot swap disk images on the MMC?

Postby Commie_User » Mon May 08, 2017 9:00 am

duikkie wrote:i don't understand the problem #-o , i think your are using a program from a real disk with discdrive and the program want to use a real disc in drive 2 as your working disk ??

if that is the case : we must convert the main program :P , because it has the commands *disc or *disk or *drive2 in it program.

so upload the program disc you are using , maybe we can modify it to run on mmc or sd card mode/cards


Ah, sorry for only noticing now.

I already have an MMC-compatible version and no disk drive. My head is already around that particular program because it does let me select which drive to load or save from, so my only thought left is to ponder those 'insert disk two' programs - and I've forgotten which those are now.


Return to “hardware”

Who is online

Users browsing this forum: No registered users and 10 guests