My little project - can my PCW talk to my Epson TF-20?

Started by GeoffB17, 00:12, 16 September 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GeoffB17

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

FloppySoftware

#1
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.

floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

GeoffB17

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

TFM

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

robcfg

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.

GeoffB17

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

TFM

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

arnoldemu

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

arnoldemu

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

GeoffB17

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

FloppySoftware

Quote from: TFM on 17:06, 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

FloppySoftware

Quote from: robcfg on 17: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.

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

FloppySoftware

Quote from: GeoffB17 on 18: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

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

GeoffB17

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

Powered by SMFPacks Menu Editor Mod