COP114 for MMFST

discussion of beeb/electron applications, languages, utils and educational s/w
Post Reply
User avatar
binaryprose
Posts: 4
Joined: Tue Dec 01, 2015 3:07 pm
Contact:

COP114 for MMFST

Post by binaryprose » Thu Mar 02, 2017 10:39 pm

Does anyone know if there is an alternative to COP114 (MTOD,DTOM) for MMFS. I have moved over to MMFST but am finding the lack of utilities a little frustrating..

Oh and a big thank you to David Banks for writing MMFS..

User avatar
hoglet
Posts: 8930
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet » Fri Mar 03, 2017 10:26 am

Welcome to the forum!
binaryprose wrote: Does anyone know if there is an alternative to COP114 (MTOD,DTOM) for MMFS. I have moved over to MMFST but am finding the lack of utilities a little frustrating..
Am I right in thinking that COP114 is part of Steve Picton's TurboMMC?

I haven't got access to one of those, or it's documentation, so I'm guessing a bit here, so apologies if I'm stating the obvious.

*DTOM and *MTOD sound like utilities that transfer data between the DFS and the TurboMMC filing systems. Do they work on individual files, or on complete disk images?

Could you briefly describe how they are used? (i.e. what options they have)

You are right, there isn't anything like this freely available as part of MMFS, and it would be a nice feature to have. There is a bit of space I think in the none sideways RAM versions of MMFS, so it's possible they could be added.

There was a bit of discussion about this in the monster MMFS thread. In this post:
viewtopic.php?p=131504#p131504
SteveF posted a Basic program to copy an image from DFS to MMFS using OSWORD 7F:

Code: Select all

   10DIM block% 256
   20DIM data% 2560
   30tracks%=80
   40from_drive%=0
   50to_din%=402
   60max_retry%=10
   70FOR track%=0 TO tracks%-1
   80PRINT track%
   90?(&2A1+9)=&82:?(&2A1+7)=0:*DISC
  100retry%=0
  110REPEAT
  120block%?0=from_drive%
  130block%!1=data%
  140block%?5=3
  150block%?6=&53:REM read
  160block%?7=track%
  170block%?8=0:REM sector
  180block%!9=10 OR &1E20:REM sector count
  190A%=&7F:X%=block% MOD 256:Y%=block% DIV 256:CALL &FFF1
  200result%=block%?(7+block%?5)
  210IF result%<>0 THEN PRINT "READ FAILED! &";~result%
  220REM TODO: We should really try reading individual
  230REM sectors if a read fails to get as much data as
  240REM possible off.
  250retry%=retry%+1
  260UNTIL result%=0 OR retry%>=max_retry%
  270?(&2A1+9)=0:?(&2A1+7)=&82:*MMFS
  280OSCLI "DIN 0 "+STR$(to_din%)
  290block%?0=0
  300block%!1=data%
  310block%?5=3
  320block%?6=&4B:REM write
  330block%?7=track%
  340block%?8=0
  350block%!9=10 OR &1E20
  360A%=&7F:X%=block% MOD 256:Y%=block% DIV 256:CALL &FFF1
  370result%=block%?(7+block%?5)
  380IF result%<>0 THEN PRINT "WRITE FAILED! &";~result%:END
  390NEXT
I haven't tried this, and it needs to be made a bit more generic, as it assumes DFS is in slot 9, and MMFS is in slot 7, i.e. on a Master.

Anyway, this is something I could push up the TODO list, but I'll pause for now and let you give a bit more background on MTOD and DTOM.
binaryprose wrote: Oh and a big thank you to David Banks for writing MMFS..
I've just been the "caretaker" for the last couple of years. Martin Mather was the original author and did most of the development.

Dave

User avatar
hoglet
Posts: 8930
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet » Fri Mar 03, 2017 10:55 am

Mostly for my own reference, here is a description of the utilities available from Steve Picton:
http://www.ebay.co.uk/itm/Acorn-BBC-Mic ... 2431103786

DFS and ADFS disk transfer software included

One of the first things that you'll probably want to do is transfer your old 5.25" or 3.5" disks to the new flash memory system. Software (which needs to be run from sideways RAM) is provided to do this, and in many cases you can just place the source disk in your normal drive (both 5.25" and 3.5" are suitable), load the required program and type the required 'star' command. *MTOD copies DFS files from the MMC system to a floppy drive and *DTOM copies in the other direction. *ATOM copies from an ADFS drive (floppies and conventional hard drive) to the MMC and *MTOA copies in the other direction. Please note that the software uses only standard filing system calls and is not intended to defeat copy protection on disks. Additionally, it may not be possible to copy files from disks which have deteriorated over time and become corrupted or otherwise unreadable. As a general rule, if the disk cannot be verified without causing errors then you may well have problems copying some (or all) of the files on it.

Handling SSD images

It is possible to download SSD images from the internet. These can be thought of as a single file that represents a complete single sided 80 track disk (SSD). The MMC card provided could contain around 500 such SSDs and the programs that each one contains would normally be run directly from the MMC interface. You can, however, very easily make a copy of an SSD to a real floppy disk if required or indeed create an SSD from any of your floppies.

For example, below you can see the method of creating a floppy disk from an SSD. The process starts by typing *DIN followed by the name of the SSD required. You then enter *IMTOD and this is the command to make an image from the MMC to a floppy disk. You also have to include the floppy drive number, 0 in this case. Drives 0, 1, 2 and 3 can all be used if you wish.

After the 'Y' confirmation you can see the machine printing out the track numbers (0 to hex 4F or 79 decimal) as the imaging progresses. The total time taken for this will vary with drive settings and the type of DFS you are using but with the Master 128 used here it is about 32 seconds.

Finally, the Disk Filing System is selected with *DISC and a catalogue requested for the newly created floppy.
imtod.jpg

User avatar
hoglet
Posts: 8930
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet » Fri Mar 03, 2017 11:08 am

Another relevant old thread for reference:
viewtopic.php?f=2&t=10595

One of the difficulties here is the MMFS (and most other MMC filing systems) aims for maximum compatibility with software designed for DFS. To do that, it uses the same file system number as DFS. This means that it's much harder than it should be to copy files between MMFS and DFS, because they both use the same file system number, so conflict.

This means that standard tools, like ADT's *XFER, just don't work.

I wonder if it would be possible to give MMFS two different "personalities". The default one works as is, and mimics DFS. The second one (invoked by *XMMFS) would use a different file system number, and so would work with standard tools like XFER.

This doesn't deal with disk image transfer, but then I think Stephen's program above can easily be made a bit more flexible.
- allow the MMFS disk image number to be passed on the command line
- allow the DFS drive numvber to be passed on the command line
- allow the direction to be controlled
- autodetect the ROM slots by probing the extended filesystem vectors
- retry failed sectors
- copy a few tracks at a time

Just thinking aloud here...

Dave

User avatar
CMcDougall
Posts: 6976
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland
Contact:

Re: COP114 for MMFST

Post by CMcDougall » Fri Mar 03, 2017 6:11 pm

The Turbo LOLPRICE needs a swram bank to load in and use the copy floppies to SD (sorry old crap MMC card :lol: ) so that does not float everyone's boat.

The basic prog (SteveF =D> ) above does indeed work, ive used it twice to check, & it can also do MMFS back to floppies 8) so no need for a 16k bank of swram :)
ImageImageImage

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

Re: COP114 for MMFST

Post by DutchAcorn » Fri Mar 03, 2017 8:47 pm

I use the COP114 utility ROM; it is a convenient way to image discs from a BBC and to build real floppy discs from an image. But I much prefer the solution Ultra DFS provides here; you can simply use *COPY or *BACKUP to copy files to and from images / physical discs. Petty it is still in beta... :?
Paul

Image

User avatar
hoglet
Posts: 8930
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet » Sat Mar 04, 2017 3:25 pm

Here's a slightly improved version of IDTOM for MMFS:
- discovers the ROM numbers of DFS and MMFS
- prompts for disk numbers
- copies 8 tracks at a time
- improved error handling

Edit: Old code deleted, see the github link below instead.

I'll try to include this (and IMTOD) on the MMFS .ssd.

Dave
Last edited by hoglet on Sat Mar 04, 2017 5:20 pm, edited 1 time in total.

User avatar
hoglet
Posts: 8930
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet » Sat Mar 04, 2017 5:19 pm

Hi all,

I've checked a first version of IDTOM and IMTOD into the MMFS github project:
https://github.com/hoglet67/MMFS/tree/m ... lities/src

Attached is .ssd file that includes these:
mmfs_1_29_20170304_1752.zip
(1.28 MiB) Downloaded 60 times
To use these you need to:
- make sure you have both MMFS and DFS installed and enabled
- make sure you have any second processor disabled
- *MMFS
- *DIN <disk containing these utilities>
- CHAIN "IDTOM" or CHAIN "IMTOD"

I also found a nifty little BBC Basic tokenizer, written in Lex by Ben Harris in 2000:
https://github.com/hoglet67/MMFS/blob/m ... k/bastok.l
That's quite useful in the build process for building a tokenized BBC Basic program from ASCII source.

Dave

Edit: Updated this post having fixed a Bad Sum error by adding some *FX143,10 calls when switching file systems.

User avatar
binaryprose
Posts: 4
Joined: Tue Dec 01, 2015 3:07 pm
Contact:

Re: COP114 for MMFST

Post by binaryprose » Tue Mar 07, 2017 5:55 pm

Thanks hoglet, that will make my life a lot easier.

Post Reply