transfer from pc to ql is it possible

Helpful tips and guides, also new users can ask for help here.
Traindriver69
Chuggy Microdrive
Posts: 51
Joined: Mon Feb 16, 2015 8:42 pm

Re: transfer from pc to ql is it possible

Post by Traindriver69 »

any help please


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: transfer from pc to ql is it possible

Post by RWAP »

I have just tried the config_bas program in q-emulator and it runs fine.

What changes have you made to config_bas or the settings - are you changing the name of the port (to less than 5 characters) - I guess that is the problem - it defaults to SER2IR

You can overcome the error by changing line 1360 to read:

Code: Select all

1360   IF LEN(port$)>5 AND port$(5) INSTR 'eoms'


Traindriver69
Chuggy Microdrive
Posts: 51
Joined: Mon Feb 16, 2015 8:42 pm

Re: transfer from pc to ql is it possible

Post by Traindriver69 »

hi
Thanks for the reply changed line 1360 as you said and the configurator runs but it does not matter what i do to the settings even if i dont touch them when i press ESC to save it comes up with
at line 410 error in expression.
cheers
mark


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: transfer from pc to ql is it possible

Post by RWAP »

It is some horrible coding at fault - change

Code: Select all

410 SBYTES (dest$),adr,length
to read:

Code: Select all

410 SBYTES dest$,adr,length


robsoft
ROM Dongle
Posts: 42
Joined: Wed Jun 15, 2016 5:14 pm

Re: transfer from pc to ql is it possible

Post by robsoft »

Sorry to resurrect an old thread:
ppe wrote: Step by step instructions, apologies if I'm being too verbose with the explanations:
Nope, this is all perfect sir!

Well - kinda. I can get as far as step 15. Try as I might, I cannot persuade the XModem transfer to work. Copying over the xmrecv_bas file was no problem, and I've even copied over other _bas files now using the same technique and they all work fine. But I can't get the Modem transfer of qterm_cde to work. All that happens is the recv program goes through it's 20 retries and gives up, and after a minute or so the PC closes the send file window too.
ppe wrote: 15) When you see the "Press enter to start receiving" prompt, go to TeraTerm and choose "File/Transfer/XMODEM/Send...". Make sure "Checksum" is selected as "Option" at the bottom of the file chooser dialogue box. Choose the qterm_cde binary file from where you unzipped it. Once you have selected the file you should see an "XMODEM Send" window pop up. Now press Enter at the QL prompt. If all goes well, you should see progress messages on the QL and the progress bar should advance in TeraTerm, speed should be around 220 bytes per second or so. The transfer will take around three minutes, I believe. Once the transfer is over, the receiver will save the received binary.
I've even tried it at a slower baud (both 1200 and 600) to no avail.

Then a thought struck me, because you do mention '640K' in your text...

I'm trying to run this on an absolute basic unexpanded 128k JM version box. Am I wasting my time? :-)

I do have a floppy interface hopefully arriving in the next week or so, so this isn't entirely the end of the world but it was fun to try and once I'd seen the _bas file go across I was hopeful I could transfer other files too, but it seems not. :-(

I'm 90% sure my cable is okay (bought a new QL-serial cable from Retro Computer Shack, and it's plugging into a Proliant rs232-usb cable to go into a PC that doesn't have a built-in 9 pin serial). The only other thing I can try is to see if I can get one of my MAX232 modules onto my Raspberry Pi and see if I can get serial comms running on there, just in case it is some odd problem with the cable - but given that it transferred the basic program, I would have at least expected to see a block or so of the XModem transfer work...

Anyone any thoughts? :-)


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: transfer from pc to ql is it possible

Post by dilwyn »

This is just a stab in the dark robsoft - since _bas files are essentially ASCII codes 32 to 127 most of the time, and _cde files could easily contain the entire ASCII range 0-255 is it possible that, say, a character with a code value of 0-31 somewhere in the file could be acting as a control code to prevent successful transfer (not knowing how the modem transfer software works, I can't be sure).


Derek_Stewart
Font of All Knowledge
Posts: 3932
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: transfer from pc to ql is it possible

Post by Derek_Stewart »

Hi,

This is very old knowledge, I used to run a BBS system on a QL, but not an unexpanded QL.

The problem you have is the QL SER ports are not wired the same, from memory, SER2 is a DCE and SER1 is DTR, see QL Service manual page 10, Figure 1 for QL RS232 schematic
QL Service Manual wrote:
SER2 (J5) and J6 (SER1) are two RS232 connectors.

J6 is connected so that the device connected to it may act as the Data Terminal Equipment (DTE) which originates the Data Terminal Ready (DTR) signal. J5 connects to the Data Communications Equipment (DCE) i.e. the local QL assumes DTE status.

4.8
The RS232 interface uses an 11-bit ASCII data frame, viz. one start bit, eight data bits and two stop bits comprise one character. Two stop bits are always sent but the interface receives compatibly with one except at 9600 baud, where one and a half stop bits are required. Data is transmitted asynchronously in the full duplex mode.

4.9
Consider the QL as the DTE. Both DTE and DCE are switched on and have their DTR signals asserted. CTS and DTR (Clear to Send, Data Terminal Ready) do not form a handshake pair but are similar signals going in opposite directions. Serial data is transmitted by IC23 via driver IC25/6 and received by line receiver IC26/11. From IC26/11 data is fed to NAND gate IC27/9, pin 10 of which is set to the high state by the program, and input to IC24 pins 6 and 21 via IC27/11.

The maximum reliable Baud rate I used to get is 9600 Baud, connected with a standard Null Modem lead. Or swapping around the control lines at one, which more easy done at the PC end.


Regards,

Derek
robsoft
ROM Dongle
Posts: 42
Joined: Wed Jun 15, 2016 5:14 pm

Re: transfer from pc to ql is it possible

Post by robsoft »

dilwyn wrote:This is just a stab in the dark robsoft - since _bas files are essentially ASCII codes 32 to 127 most of the time, and _cde files could easily contain the entire ASCII range 0-255 is it possible that, say, a character with a code value of 0-31 somewhere in the file could be acting as a control code to prevent successful transfer (not knowing how the modem transfer software works, I can't be sure).
Thanks Dilwyn, appreciate the reply. I don't think it's a control code because I've got to the part where I'm running Petri's XModem code - so in theory that is handling any control codes now. Given that it seemed to work for other people, and obviously Petri too, I can only assume that there is something in the protocol that requires more from my cable than the simple ascii file transfer does (different kind of handshaking, any my cable not having all the right pins connected etc?) or that Petri's program is asking too much of an unexpanded JM machine. I will take a look at the XModem protocol tonight though and see if there is anything implicit in there that would indicate my problem :-) Thanks again!


robsoft
ROM Dongle
Posts: 42
Joined: Wed Jun 15, 2016 5:14 pm

Re: transfer from pc to ql is it possible

Post by robsoft »

Derek_Stewart wrote:The problem you have is the QL SER ports are not wired the same, from memory, SER2 is a DCE and SER1 is DTR, see QL Service manual page 10, Figure 1 for QL RS232 schematic
Hi Derek, and thanks. I did appreciate the ports were wired differently; I've had success transferring -bas files on SER1, but not on SER2. So I've been conducting the rest of my experiments strictly on SER1 (thus far).

Derek_Stewart wrote:The RS232 interface uses an 11-bit ASCII data frame, viz. one start bit, eight data bits and two stop bits comprise one character. Two stop bits are always sent but the interface receives compatibly with one except at 9600 baud, where one and a half stop bits are required. Data is transmitted asynchronously in the full duplex mode.
I don't think that's how the comms protocol was set up in my experiment, I'm sure it was just the 1 stop bit, so I can have a look at that. Thanks for that!
Derek_Stewart wrote:The maximum reliable Baud rate I used to get is 9600 Baud, connected with a standard Null Modem lead. Or swapping around the control lines at one, which more easy done at the PC end.
Ah. A lightbulb goes on. At the moment, I've got my QL-RS232 cable plugging directly into the Proliant USB thing. I wonder if this is sufficient to work for something small/simple like the _bas file transfer, but that I do need a proper null modem cable in between the 2 connectors for anything more sophisticated to work. I'll jury-rig up some kind of pin breakout and try messing around with the connections a bit more tonight - thanks again, I appreciate your time and input :-)


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: transfer from pc to ql is it possible

Post by dilwyn »

Ah, another stab in the dark - the JM ROM. Again without knowledge of the way the transfer software works, the JM ROM does have a limited input buffer (128 bytes) whereas with other later ROMs it is dynamic.

Again, I doubt that software like this would send using PRINT #chanstring$ and receive with INPUT #chan,string$ equivalent.

Presumably this ability to transfer _bas files but not _cde is a red herring - but it made me think it might have been that the lines of BASIC program were less than 128 bytes long, whereas the _cde files made the software look for that end of line linefeed or something like that.

As I say, unlikely, just speaking out loud the first thing that came to mind.


Post Reply