COP114 for MMFST

bbc/electron apps, languages, utils, educational progs, demos + more
Post Reply
User avatar
binaryprose
Posts: 4
Joined: Tue Dec 01, 2015 3:07 pm
Contact:

COP114 for MMFST

Post by binaryprose »

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: 10123
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet »

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: 10123
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet »

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: 10123
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet »

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: 7048
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland
Contact:

Re: COP114 for MMFST

Post by CMcDougall »

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: 2412
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: COP114 for MMFST

Post by DutchAcorn »

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
User avatar
hoglet
Posts: 10123
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet »

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: 10123
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet »

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 96 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 »

Thanks hoglet, that will make my life a lot easier.
User avatar
fordp
Posts: 1126
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: COP114 for MMFST

Post by fordp »

I have found this thread. I would like to add a page to MMFS to make it easier for others can you open up the MMFS Wiki?

If you do not want to I will fork it and add a page but this is a lot of messing about and if it does not get merged back I will have wasted my time.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!
User avatar
hoglet
Posts: 10123
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet »

fordp wrote:
Sun Jun 21, 2020 6:07 pm
I have found this thread. I would like to add a page to MMFS to make it easier for others can you open up the MMFS Wiki?
I've sent you an invite to be a collaborator.

Dave
User avatar
fordp
Posts: 1126
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: COP114 for MMFST

Post by fordp »

hoglet wrote:
Sun Jun 21, 2020 7:07 pm
fordp wrote:
Sun Jun 21, 2020 6:07 pm
I have found this thread. I would like to add a page to MMFS to make it easier for others can you open up the MMFS Wiki?
I've sent you an invite to be a collaborator.

Dave
Thanks, Dave I will only add stuff!
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!
User avatar
fordp
Posts: 1126
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: COP114 for MMFST

Post by fordp »

IMG_20200626_153951.jpg
I am struggling to get IDTOM working.

It reads one track in then fails when it tries to write it to MMFS.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!
User avatar
hoglet
Posts: 10123
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet »

fordp wrote:
Fri Jun 26, 2020 3:43 pm
I am struggling to get IDTOM working.

It reads one track in then fails when it tries to write it to MMFS.
This is because the disk image you are truing to write to is marked as unformatted.

You need to format the MMFS disk first, just as you would if you were using *BACKUP to copy a floppy.

So either:

Code: Select all

*DIN 200
*FORM 80 0
or

Code: Select all

*DIN 200
*DOP R
The second one is quicker, because it just marks the disk as formatted. But as you are going to overwrite it anyway, that doesn't matter,

Dave
User avatar
fordp
Posts: 1126
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: COP114 for MMFST

Post by fordp »

hoglet wrote:
Fri Jun 26, 2020 4:12 pm
This is because the disk image you are trying to write to is marked as unformatted.
Thanks for your help I have updated the Wiki:
https://github.com/hoglet67/MMFS/wiki/D ... S-Transfer

P.S. It works and I have copied my first disk.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!
User avatar
fordp
Posts: 1126
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: COP114 for MMFST

Post by fordp »

IMG_20200626_191010.jpg
It is not my lucky day I am trying to copy the other side of the same floppy and it fails. It freezes while trying to read track zero and times out after maybe a minute.

I have tested that I can cat, read and verify. Drive 2 and it all checks out fine.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!
User avatar
hoglet
Posts: 10123
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet »

fordp wrote:
Fri Jun 26, 2020 7:14 pm
It is not my lucky day I am trying to copy the other side of the same floppy and it fails. It freezes while trying to read track zero and times out after maybe a minute.

I have tested that I can cat, read and verify. Drive 2 and it all checks out fine.
I just had a quick look at the code, and couldn't see anything obviously wrong. The drive is specified here:
https://github.com/hoglet67/MMFS/blob/m ... OM.bas#L21

Have you tried a different floppy?

When you run IDTOM, can you tell if it's selecting the right drive? i.e. when it runs, is the drive select LED on the drive illuminated?

I can try to replicate this over the weekend.

Dave
User avatar
fordp
Posts: 1126
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: COP114 for MMFST

Post by fordp »

The correct disk light comes on I do I have a twin drive. I have just been reading the code and comparing it to J.11-14 and J.11-15 of the reference manual part one.

It says that error (&18) is "Sector not Found".

One thing which may mean nothing is if I hit "ESC" it stops and if I do "*." it cats the MMFS disk that the IDTOM came from. Maybe that is normal, I just thought maybe it should quit with DFS selected?
Last edited by fordp on Fri Jun 26, 2020 8:44 pm, edited 1 time in total.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!
User avatar
hoglet
Posts: 10123
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet »

fordp wrote:
Fri Jun 26, 2020 8:25 pm
The correct disk light comes on I do I have a twin drive. I have just been reading the code and comparing it to J.11-14 and J.11-15 of the reference manual part one.

It says that error (&18) is "Sector not Found".
I just tried to replicate this, and couldn't:
capture17.png
I don't really have any theory as to why it's not working for you, other than a dodgy floppy.

Dave
User avatar
fordp
Posts: 1126
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: COP114 for MMFST

Post by fordp »

The floppy works before the program runs and after. My MMFS ROM maybe a bit old am I running the latest version?
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!
User avatar
hoglet
Posts: 10123
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet »

fordp wrote:
Fri Jun 26, 2020 8:51 pm
My MMFS ROM maybe a bit old am I running the latest version?
As my "telekinetic vision" super-power is a bit weak today, you might actually have to tell me what version you are running :D

The latest is 1.44:
https://github.com/hoglet67/MMFS/releases/latest

The failure is coming from DFS though, not MMFS.

Dave
User avatar
fordp
Posts: 1126
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: COP114 for MMFST

Post by fordp »

I thought my *ROMS above had shown it as &7B is that not the version? I will quit for the night now and hopefully try tomorrow. Thanks for your help so far. Getting there!
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!
User avatar
hoglet
Posts: 10123
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet »

fordp wrote:
Fri Jun 26, 2020 9:09 pm
I thought my *ROMS above had shown it as &7B is that not the version?
What version does *HELP say?
User avatar
fordp
Posts: 1126
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: COP114 for MMFST

Post by fordp »

I just updated to version 1.44 and no change :(

Well at least I have my MiniPRO out of storage now!
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!
User avatar
hoglet
Posts: 10123
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: COP114 for MMFST

Post by hoglet »

Do you have a spare floppy disk that you could reformat, then try to image?

Dave
User avatar
fordp
Posts: 1126
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: COP114 for MMFST

Post by fordp »

I did try more than one disk. I will do some more digging tomorrow if her indoors lets me!
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!
Post Reply

Return to “8-bit acorn software: other”