Author Topic: FID files  (Read 1627 times)

0 Members and 1 Guest are viewing this topic.

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
FID files
« on: 13:40, 26 December 16 »
I'm looking to understand FID files on the PCW (and presumably, the 6128).


So far, I have read john Elliot's introduction here: http://www.seasip.info/Cpm/amsfid.html , but there is much I would like to understand. What I want to do is add a cheap IDE device to the Amstrad machines and provide the device driver as a FID file.


This is a summary of what I learned so far:
  • The FID file itself is a CP/M PRL file with a special header and renamed with a .FID extension.
  • The first part of the header contains a JP instruction to the FID_EMS (startup routine).
  • To add a disk device, I would call SVC_D_HOOK (once per disk drive) and provide the address of the disk device jump table.
  • Thereafter, the disk device jump table itself plus implementations for each of the functions (FID_D_LOGON, FID_D_READ, FID_D_WRITE, FID_D_FLUSH and FID_D_MESS).
  • FID_EMS should return with the carry flag set so that the code stays memory resident.
Hopefully I have that right. So the questions, other than "Have I got the above points right?", are:
  • What is the addressing scheme for the .REL file? This means, things like the jump table have absolute addresses - how do I calculate them? What should the ORG be for the assembler code of the driver?
  • Is there any source code or example I could look at, preferably for a disk driver?
  • What is the limit on the size of the FID file (and/or memory)?
  • Where can I find out more?
  • Does a FID file work for both LocoScript and CP/M Plus? According to John's information, it should.
Thanks
JonB

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 644
  • Country: gb
  • PCW since '85
  • Liked: 143
  • Likes Given: 7
Re: FID files
« Reply #1 on: 19:53, 26 December 16 »
If you can work something more out on this, I'd be interested - for my PCW.


You might note my message regarding the HD facility for John Elliotts Joyce emulator.   About three pages back in this forum (for PCW etc) I posted a file for the CP/M version, which included the .FID file to add the extension for HD access.   That might be a useful example to examine?


Obviously, THAT version of CP/M had facilities to cope with THAT extension, so the extension is not JUST the FID.   But maybe there's a way around that?


Geoff

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: FID files
« Reply #2 on: 20:02, 26 December 16 »
Thanks Geoff


I presume you mean this thread? http://www.cpcwiki.eu/forum/nc100-nc200-pcw-pda600/joyce-emulator-using-hd/


There's a DSK file attached - how do I use it? What I really want is the source to the FID file as an example. Still got it? Willing to share?


Cheers
JonB


Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 644
  • Country: gb
  • PCW since '85
  • Liked: 143
  • Likes Given: 7
Re: FID files
« Reply #3 on: 00:36, 27 December 16 »
Aah - some folks here seem to do everything via the .DSK files, which is often far from convenient.


In this case, maybe you want JUST the .FID?


I'll try to attach it.


You can use it directly ONLY if the version of CP/M you've got will load .FID files.   The version in the .DSK file will do so.  But there are others.


This .FID is - I think - totally specific to the Joyce emulator, however the code there may help you.


The file is renamed as .ZIP, but it's NOT a .zip, it's .FID, so just rename it.


Geoff

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: FID files
« Reply #4 on: 16:08, 09 January 17 »
I have it working, sort of - using PASMO to create the FID file, and John Elliot's FIDCSUM.COM to set the checksum in the file. It loads at startup, prints a sign on message, then exits. But unfortunately, I am now at a full stop, thanks to a bit of clumsiness: http://www.cpcwiki.eu/forum/nc100-nc200-pcw-pda600/3-5'-floppy-head-alignment/msg139446

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: FID files
« Reply #5 on: 19:30, 09 January 17 »
OK, panic over  :doh:  and back to FIDs..!


I have completed the first cut of the driver code, but on loading the FID, the machine locks up. EXTRA-SHIFT-EXIT (the PCW Vulcan nerve pinch) will reset it, so perhaps it isn't entirely locked, but it never comes back to the prompt. This is where being able to debug a FID would be very handy. You can't call the BIOS from inside a FID, so you can't print stuff out to trace where it is going. That is a serious impediment to progress. That said, things like this are usually caused by me doing something stupid, so I will look again at the code, carefully..

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 644
  • Country: gb
  • PCW since '85
  • Liked: 143
  • Likes Given: 7
Re: FID files
« Reply #6 on: 21:10, 09 January 17 »
Hello Jon,


One thing you might consider.


Have you got JE's Joyce emulator?


This certainly handles .FID files.   Plus I think it does have some 'debug' facilities built in, and if something serious happens you may well get a Joyce error.


You could try - at least initial - development/testing on this platform.


There may be limits if the specific feature is totally inapprop to Joyce, but, it you don't get an error, then maybe it's OK?   Better than the real machine just locking up, which prob tells you nothing.


Just asking!


geoff

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: FID files
« Reply #7 on: 22:15, 09 January 17 »
(Deleted post, incorrect info)
« Last Edit: 09:09, 11 January 17 by JonB »

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 644
  • Country: gb
  • PCW since '85
  • Liked: 143
  • Likes Given: 7
Re: FID files
« Reply #8 on: 00:49, 10 January 17 »
Hello,


Just doing a little digging for bits that might be useful for you.


Firstly, I noted somewhere (where??) in one of JE's pages about FIDs, USER Bios and system versions a passing comment that in BIOS version 2.9 FIDs were loaded at memory address xxx - but is other versions this address may be different.   2.9 is the system version I have, by the way.   Can't remember if you were ever wondering just where FIDs loaded (initially ?).


Secondly, I tried to see if there was any mention of the HD options for the PCW.   I understood that in the system's HeyDay, there were commercial options.   Don't know how many, but I found two:


ASD had a HD20 system, this used ASD.FID


Cirtech also had a system, this used HDRIVER.FID


If either of those driver versions could be found, it might be useful.


I think there was also a GEM system, but no reference to the driver for that.


Also, I note that one of the HD systems had a boot ROM, which somehow replaced the normal boot process and allowed the PCW to boot from the HD without using a floppy.


Interesting, some of the things that people managed.


By the way, if you've NOT got Joyce active, you could sent me the test FID and I'll see what happens!  That'll be on CP/M 2.9


Geoff

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: FID files
« Reply #9 on: 10:25, 10 January 17 »
Interesting..

It seems that the "GEM" was made by Cirtech.

One of those FID setups (the ASD one) uses A0-A7 I/O addresses, and may work unaltered if I change the I/O base address of my IDE adapter to match. But it appears as if it doesn't use the IDE 8 bit mode according to what I read about it, which means you would lose 50% of your drive space, unless the AST adapter is feeding the upper and lower parts of the IDE 16 bit data bus in pairs to the PCW. If this were true, the FID could probably not be used unaltered (I seem to recall we had this conversation on the "PCW8256 Expansion port pinout" thread). However, I would like to use my own driver code and write the FID myself, because that is the point of the exercise - to overcome the challenge.

Just need to get past these blockers...




Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 644
  • Country: gb
  • PCW since '85
  • Liked: 143
  • Likes Given: 7
Re: FID files
« Reply #10 on: 15:29, 10 January 17 »
Oh?


I have a GEM product for the PCW, it's made by Gemini.   No mention of Cirtech.


There could have been some connection, but Gemini and Cirtech seem to be quite separate.


The Gem product I have is a floppy disk interface for the PCW, so they were certainly into disk/add-on things.   I never used the interface (it was designed to fit where the drive B: should go) but the docs provided some useful into.  I got the package 'free' for some reason, not sure why now.


Geoff

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.306
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 1028
  • Likes Given: 2437
Re: FID files
« Reply #11 on: 15:33, 10 January 17 »
Hi Geoff!


Would it be possible to have some pictures of your interface and of the documentation?


I'd like to add it to the PCW Wiki.


Thanks!

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: FID files
« Reply #12 on: 15:43, 10 January 17 »
Oh?

I have a GEM product for the PCW, it's made by Gemini.   No mention of Cirtech.


OK.. I got that information from one of the pages that mentions the I/O port assignment. "Cirtech GEM" was mentioned as one of the drive types. Good to know there is a third option out there!

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 644
  • Country: gb
  • PCW since '85
  • Liked: 143
  • Likes Given: 7
Re: FID files
« Reply #13 on: 16:00, 10 January 17 »
Yes, I've checked and seen that.   Reference to the 'Cirtech Gem'.   Odd.


I'll dig further.


There's definite info about Gemini, who used the 'Gem' mark for products both for Amstrad and BBC add-ons.   No reference there to Cirtech, who as far as I can tell were a separate company.   If Cirtech had used the brand 'Gem' for one of their products, I would have expected they'd face legal action, unless they were simply selling a Gemini product, which is a possibility?


Nothing important now, other than academic interest.   And the question, were there two, or were there three?


Geoff

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 644
  • Country: gb
  • PCW since '85
  • Liked: 143
  • Likes Given: 7
Re: FID files
« Reply #14 on: 16:16, 10 January 17 »
Further to rob's enquiry, yes, I can do a couple of pics of the device.   The doc is a 40 page booklet which I'll have to see if I can scan it, but it's not something I can do readily.


The device is the Gemini InterGem for the PCW 8256/8512


Gemini Marketing Ltd of Exmouth


Device may be actually mfg by Dynamic Data Technology Ltd of Aberystwyth 1986.


Designed to be plug compatible with any BBC disk drive, so it presents the 34 ? pin connector rather than Amstrad's 28 pin.   You plugged the Amstrad's B: drive connectors (data and power) to the board inside the case, then plugged the external drive into the data/power connectors outside.


I was more interested in the info about disk formats etc.   I already had the BOX 5.25" floppy add-on by then.


Geoff

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.306
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 1028
  • Likes Given: 2437
Re: FID files
« Reply #15 on: 17:16, 10 January 17 »
Geoff,


Would it be the same as this one?


If indeed it is, there's no need for the pictures. I'd appreciate if you could scan the manual somewhere in the future.

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 644
  • Country: gb
  • PCW since '85
  • Liked: 143
  • Likes Given: 7
Re: FID files
« Reply #16 on: 18:24, 10 January 17 »
Yes, that's the device I have.


I've got the doc booklet, and the disk with the associated sortware.


So, it generates the ready signal OK does it.  I don't think I spotted that in the docs.   I'll have to try my 3.5" drive via it and see if it works?


Geoff

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.306
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 1028
  • Likes Given: 2437
Re: FID files
« Reply #17 on: 18:31, 10 January 17 »
I don't think we have the software either.


Are you able to image the disk?