Author Topic: My little project - can my PCW talk to my Epson TF-20?  (Read 3221 times)

0 Members and 1 Guest are viewing this topic.

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 800
  • Country: gb
  • PCW since '85, more CP/M than Loco
  • Liked: 169
  • Likes Given: 9
A few years before I got my PCW, I got an Epson HX-20 computer, maybe the first 'laptop'.   This was the computer about A4 book sized, with a little till-roll printer built in, a 4 line 20 char LCD screen and an optional extra micro-cassette recorder.   Good keyboard, and a quite sophisticated BASIC, and some similar I/O possibilities.   I did quite a bit with the device as supplied, but a year later I was quick to extend it with the TF-20 floppy disk unit, which just plugged in and provided 2 @ 270k 5.25 floppies supported via various extended BASIC commands including the ability to use direct sector access which included the ability to access directory and system areas of the floppy.   The TF-20 was in effect a separate computer, running CP/M 2.2, but acting as a dumb terminal.
 
Well, I still have the HX-20, and it still works, although the micro-cassette seems to have gone the way of the Amstrad 3" disks - I'm sure the rubber band has perished.   As far as I can tell, the TF-20 still works - well, it makes the right noises if I boot it up.   However, it does NOT seem to connect to the HX-20.   It just sits there, acting totally dumb!   I suspect the connector socket at the HX end, as it certainly moves a little when connecting the cable, but I'm not sure I can get at the soldering to try to re-do it.
 
BUT - maybe I can sort something so I can connect the TF-20 to my PCW.   I'd need a serial connection.   I have the CPS8256, but that does not run at 38,400, which I'd need (maybe the internals of the TF-20 could be changed to use a slower speed, but that would not be ideal).   Better would be another interface that would run at the correct speed, I understand there was something called 'Fax Link' (Margolis)??   Anyone know anything about that, I've looked at Fax Toolkit | Fax Modem Sourcebook | margolis.org which seems close, but no mention of hardware (any more ?)
 
I'm sure something can be done.  My HX-20 has a FORTH rom added, so I can swap to FORTH.   The FORTH operates independantly of the BASIC.   FORTH does NOT know anything about the TF-20.   However, if I activate the FORTH I can create FORTH 'words' that will access the ROM code in the HX-20 that will bypass BASIC and access the floppy drives.   I have done this and it worked.   Therefore, if I could connect the TF to the PCW, a prog in the PCW could also send instructions to the TF to open file xxx, find data yyy and return that data to the PCW.   OK, a little slower than accessing the directly attached disks, but still functional.   
 
So, my PCW would go from having 2 floppies to having 4.
 
This would open the door to extending the TF terminal prog to support some sort of 'batch' processing, so that rather than send a simple disk instruction (as can be done now) one could send through a 'job', for example to open file xxx, step through the whole file and create a separate index file on field yyy, and return a message to say 'done' when finished.
 
Does however hinge on the initial link.   Anyone got any suggestions??
 
Thanks.
 
Geoff

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 248
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
  • Liked: 251
  • Likes Given: 181
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #1 on: 09:12, 16 September 15 »
Hi Geoff.

I understand you could use the appropiate software protocol to work with a slower PCW conection than the Epson one.

Maybe XON/XOFF or even one of your own.

In this way, you wouldn't have the need of new hardware for the PCW.

I wonder how difficult would be to write a RSX for the PCW, and implement BIOS support for the EPSON drives.

I know the RSX function is to deal with BDOS mainly, but we have no way to modify the PCW BIOS ( thanks Locomotive! ), and it would be a way to patch the BIOS and have running the needed code.

In this way, you could use the Epson drives from any PCW program.

« Last Edit: 16:41, 16 September 15 by FloppySoftware »
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 800
  • Country: gb
  • PCW since '85, more CP/M than Loco
  • Liked: 169
  • Likes Given: 9
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #2 on: 16:34, 16 September 15 »
Thanks for comment.
 
I've just looked into TF-20 tech manual (on-line) and I see that there should be a jumper block on a pcb inside allowing setting of serial baud rate, with options 2400,4800,9600,19200,38400 and 76800.  Factory setting should be to the 38400 one.  Should be easy enough to spot/change.   Certainly would be ok to use 9600 for testing etc.
 
I've never looked into what could be done with RSXs, so I know nothing there.   If that is possible, very interesting.   I assume certain BDOS functions could be intercepted, if the drive is 0 or 1, allow to proceed as usual, if its for drive 2 or 3 then pass to new code, and thence to TF.   Usefull.   I was not that worried about having the extra drives fully 'on-line', just accessible.   I'd be quite happy to have a specific link prog that could be run, which would allow files to be transferred each way, for particular data to be retrieved, or for a 'batch' process to be initiated (or checked up on to see if completed).   Just something to allow a little more flexibility with the machine without extra disk swapping.
 
Must look into my DR manuals about RSXs!!
 
Geoff

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1985
  • Likes Given: 4650
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #3 on: 19:06, 16 September 15 »
Out of curiosity... Where is the PcW BIOS? On ROM or on disc?

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.423
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 1102
  • Likes Given: 2684
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #4 on: 19:20, 16 September 15 »
It's on the microcontroller that handles the printer, and it's the one to inject the boot code on startup. No proper boot room.

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 800
  • Country: gb
  • PCW since '85, more CP/M than Loco
  • Liked: 169
  • Likes Given: 9
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #5 on: 20:00, 16 September 15 »
Oh?
 
I always understood that the BIOS was one component part of the ????????.EMS file.
 
The printer chip contains an initial part of the boot loader, the rest is in the first sector of the boot floppy, so I understood.
 
Once the .EMS file loads, it spreads its various components around in memory, and then passes control to the now pretty much installed CP/M.   A slightly different order of doing things than normal CP/M, bu then the structure of the PCW is different anyway!
 
Geoff

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1985
  • Likes Given: 4650
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #6 on: 20:46, 16 September 15 »
Hmmm.... would be nice to know exactly what happens a boot, and what can actually be changed.

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2282
  • Likes Given: 3478
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #7 on: 20:48, 16 September 15 »
Printer boot sequence:

PCW boot sequence
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2282
  • Likes Given: 3478
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #8 on: 20:50, 16 September 15 »
JOYCE for UNIX

There is a pcw hardware document on the website.

Direct link:
http://www.seasip.info/Unix/Joyce/hardware.pdf
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 800
  • Country: gb
  • PCW since '85, more CP/M than Loco
  • Liked: 169
  • Likes Given: 9
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #9 on: 21:22, 16 September 15 »
You could change almost everything.
 
Not the initial boot, that is hard-wired into the chip.
 
But that runs the code in the boot sector, and that could be changed to do something else - I've read that John Elliott did amend that to produce reading/storing the initial boot code.
 
Then, that boot code could in turn load something else - see the disk image for 'Habi' recent game, where his boot disk loads a 'different' .EMS file.   I've not checked, but the boot code on the floppy seems similar to normal (incl looking for something .EMS) but it need not be.
 
I would expect that various other games totally take over the boot process and do their own thing.   In effect, LocoScript does as well.
 
I understand that it is possible to install an alternative CP/M (ZCPR etc), which must do something along these lines.   Maybe with a more 'normal' boot process, i.e. the boot loads the BIOS which then loads the BDOS which then loads the CCP.   Don't know how many of the 'features' of the PCW this system retains, mind you.   Does have various PC type extras to make up???
 
Geoff

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 248
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
  • Liked: 251
  • Likes Given: 181
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #10 on: 21:39, 16 September 15 »
Out of curiosity... Where is the PcW BIOS? On ROM or on disc?

The BIOS in on disc, with the rest of CP/M, in a file named "JXXXXX.EMS" or "JXXXXX.EMT".
 
Ie.: J14SCPM3.EMS for the Spanish CP/M version, with the BIOS v1.4.
 
But the BIOS code is under copyright of Locomotive, AFAIK, and we don't have the sources.
 
 
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 248
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
  • Liked: 251
  • Likes Given: 181
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #11 on: 21:40, 16 September 15 »
It's on the microcontroller that handles the printer, and it's the one to inject the boot code on startup. No proper boot room.

No, only the initial boot is there.
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 248
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
  • Liked: 251
  • Likes Given: 181
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #12 on: 21:41, 16 September 15 »
Oh?
 
I always understood that the BIOS was one component part of the ??? ??? ??.EMS file.
 
The printer chip contains an initial part of the boot loader, the rest is in the first sector of the boot floppy, so I understood.
 
Once the .EMS file loads, it spreads its various components around in memory, and then passes control to the now pretty much installed CP/M.   A slightly different order of doing things than normal CP/M, bu then the structure of the PCW is different anyway!
 
Geoff

You're totally right. :)
 
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 800
  • Country: gb
  • PCW since '85, more CP/M than Loco
  • Liked: 169
  • Likes Given: 9
Re: My little project - can my PCW talk to my Epson TF-20?
« Reply #13 on: 02:32, 23 September 15 »
Well, further to this...
 
I've started work on my prog to communicate with the TF, initially I'll just try the Reset function, as that will cause the drive to click, so I know something is happening.   Then maybe try some direct Read/Writes.   Keep it simple while I ensure my connector cable is OK.
 
I've found the Jumper block inside the TF, and yes, I can change the Baud rate fine, so I'll see where I get with 9600.   That I understand is the highest rate the CPS interface will do reliably!   As it's easy to change the TF, I'll take the easy route for now.
 
Just tried to boot the TF box, first time for a while.   Booted OK from drive A:, makes the correct noises.   BUT, now neither drive takes a disk.   Hmm?  Checked on web, I was sure I'd seen some about these drives.  Same model as used in Epson QX-10 CP/M computer.   Yes, found it.   Someone having the same problem with insert/eject disks.   There's a fiddly spring/lock arrangement, and some moving parts, with grease.   If grease goes solid, as it does after xxx years, you get problems.   I assume I need to clean away old grease, and lubricate.   Then should be fine.
 
Anyone have any recommendations regarding how to clean away old grease, and what sort of new lubricant to put in?
 
Geoff