DWLOAD - DriveWire for everybody

A place to discuss everything Dragon related that doesn't fall into the other categories.
sorchard
Posts: 419
Joined: Sat Jun 07, 2014 9:43 pm
Location: Norwich UK

Re: DWLOAD - DriveWire for everybody

Post by sorchard » Sun Nov 02, 2014 11:50 pm

tormod wrote:In the DriveWire4 GUI there is a command line interface at the bottom of the window saying "Hint: You can enter DW commands here". In this field, type
dw server status
and it will print what version you have. It should be 4.3.3o, 4.3.3p or 4.3.4d.
I get 4.3.3o

I also managed to provoke this response on a couple of occasions by going to the xroar cartridge menu and selecting 'none' then 'rsdos with becker port' then typing 'DLOAD':

Code: Select all

Sun Nov 02 2014 22:45:59.921  ERROR  DriveWireServer     dwserver-8          Handler #0 has died. RIP.
Sun Nov 02 2014 22:45:59.921  INFO   DriveWireServer     dwserver-8          Arise chicken! Reanimating handler #0: TCP connection via TCP
Sun Nov 02 2014 22:45:59.937  INFO   DWTCPDevice         dwproto-0-23        listening on port 65504
Sun Nov 02 2014 22:46:14.609  WARN   DWProtocolHandler   dwproto-0-23        DriveWire 4.3.3o (06/21/2013) by Aaron Wolfe
Sun Nov 02 2014 22:46:14.609  WARN   DWProtocolHandler   dwproto-0-23        UNKNOWN OPCODE: 85 U
Sun Nov 02 2014 22:46:14.609  WARN   DWProtocolHandler   dwproto-0-23        UNKNOWN OPCODE: 79 O
Sun Nov 02 2014 22:46:14.609  WARN   DWProtocolHandler   dwproto-0-23        UNKNOWN OPCODE: 76 L
Sun Nov 02 2014 22:46:14.609  WARN   DWProtocolHandler   dwproto-0-23        UNKNOWN OPCODE: 79 O
Sun Nov 02 2014 22:46:14.609  WARN   DWProtocolHandler   dwproto-0-23        DriveWire 4.3.3o (06/21/2013) by Aaron Wolfe
Stew

User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: DWLOAD - DriveWire for everybody

Post by tormod » Sun Nov 02, 2014 11:57 pm

sorchard wrote:At the risk of making more assumptions it looks like it's waiting for something to read from the Becker port.
Yes, this is correct. The Becker input port is at $FF41 when in "RSDOS" mode. If you load a Dragon Dos cartridge, XRoar will instead put the Becker port at $FF49/A to avoid clashes with the Dragon disk controller. That's why I made a special d??-dragondos-dwload-becker.rom, as you found out. But in your case it seems like the RSDOS mode is chosen to this should not be the problem. Just note that if this was the problem it wouldn't be so easy to see, because XRoar doesn't mention this in the log messages. And the TCP/IP connection could be working perfectly, just that the wrong address was "live".

I assume you have a clean install of DriveWire4 and simply chose "Emulator" in the configuration wizard? It seems the TCP/IP connection is established so there is not much I can think of that can go wrong. I see that you have an IC18 image around that gets loaded, I did the tests without it, but I don't think it can possible matter either.

One problem with the DriveWire4 server and the lack of timeout in the DW Becker routines, is that in some error conditions the server just don't reply back, and the DWRead routine will just hang, similar to your case. But this should not happen here. I think the only case I have seen this is if the server believes the file is there and tells the DWLOAD client which slot it is in, but then fails to read the image for some reason it just goes quiet. But if the file doesn't exist at all it will correctly return an error and DWLOAD will tell you "MO ERROR".

User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: DWLOAD - DriveWire for everybody

Post by tormod » Mon Nov 03, 2014 12:05 am

Interesting, the opcodes you see could be fragments of the AUTOLOAD.DWL request. But missing bytes on a TCP connection? You don't have several instances running fighting for the bytes? Look in the DriveWire4 Instance Manager.

BTW, I am using XRoar 0.32.

sorchard
Posts: 419
Joined: Sat Jun 07, 2014 9:43 pm
Location: Norwich UK

Re: DWLOAD - DriveWire for everybody

Post by sorchard » Mon Nov 03, 2014 4:16 pm

I've now had a chance to try it on a different system with the same result, even the DriveWire log gives very similar output. There's only one instance running according to DriveWire but I tried rebooting anyway just in case.

I'm using xroar 0.32 on both systems (WinXP Pro 32 bit & Win7 Pro 64 bit)

I quickly hacked together a server app to try and see what's happening. This is what xroar is sending via the TCP/IP Becker port when the Dragon starts and when DLOAD is typed:

Code: Select all

01   
0C   
41   A
55   U
54   T
4F   O
4C   L
4F   O
41   A
44   D
2E   .
44   D
57   W
4C   L
Is this the expected command format? If so then it looks more like a problem with DriveWire.
Stew

KenH
Posts: 177
Joined: Fri Oct 12, 2012 9:50 am

Re: DWLOAD - DriveWire for everybody

Post by KenH » Mon Nov 03, 2014 6:24 pm

Have you copied the AUTOLOAD.DWL file to your Drivewire folder?
DW with becker will hang without this file

User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: DWLOAD - DriveWire for everybody

Post by tormod » Mon Nov 03, 2014 8:05 pm

Stew, those bytes are correct. The 01 is the mount opcode, 0xC is the length of the following name.

Ken, no, if this file is missing the DriveWire server will report failed mount and it should not hang. The Becker routines will hang if there is no Becker interface, no TCP connection or no server reply though.

sorchard
Posts: 419
Joined: Sat Jun 07, 2014 9:43 pm
Location: Norwich UK

Re: DWLOAD - DriveWire for everybody

Post by sorchard » Mon Nov 03, 2014 9:06 pm

tormod wrote:Stew, those bytes are correct. The 01 is the mount opcode, 0xC is the length of the following name.
So the xroar end of the connection looks clean then. It's leading me to believe that the 01 opcode is causing the server to crash. ("Handler #0 has died. RIP." in the log). Hopefully this is peculiar to the TCP/IP mode of connection under Windows and I won't have a problem connecting with a real Dragon. When I get some time I'll have a look at producing a test client.

Thanks to everyone for help and suggestions. Much appreciated!
Stew

User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: DWLOAD - DriveWire for everybody

Post by tormod » Mon Nov 03, 2014 9:45 pm

Yes, this will be much easier on a real system. You will still need the DW server, but probably it will run fine on the serial interface. I am surprised you have this problem on two different machines. Plenty of people use DriveWire4 on Windows, also with Becker/TCP. Maybe you have some special Java installation, or anti-virus stuff that even intercepts virtual network traffic. On the real system you will also have the option to use the older DriveWire3 server which is Java-free.

sorchard
Posts: 419
Joined: Sat Jun 07, 2014 9:43 pm
Location: Norwich UK

Re: DWLOAD - DriveWire for everybody

Post by sorchard » Tue Nov 04, 2014 4:44 pm

sorchard wrote:When I get some time I'll have a look at producing a test client.
Hmmm...

The very hacky program below successfully reads a text file from the PC into the emulated Dragon via a DriveWire virtual port. For this to work I don't think there can be much wrong with the way things are set up and yet the 'mount named object' op code causes the server to drop the connection...

Code: Select all

1 'DW4 TEST PROGRAM
2 'READS TEXT FILE FROM SERVER
5 'OPEN VPORT 1
10 POKE&HFF42,196
20 POKE&HFF42,1
25 POKE&HFF42,41
29 'SEND SOMETHING
30 C$="DW SERVER LIST C:\TOOLS\TEST.TXT"
40 FOR I=1 TO LEN(C$)
50 A=ASC(MID$(C$,I,1)):GOSUB100
60 NEXT
70 A=13:GOSUB100
80 GOSUB300
85 GOSUB400:?CHR$(A);
90 GOTO85
99 'SEND A TO VPORT 1
100 POKE&HFF42,195
110 POKE&HFF42,1
120 POKE&HFF42,A
130 RETURN
199 'GET BYTE FROM BECKER PORT
200 IF (PEEK(&HFF41) AND 2)=0 THEN 200
210 A=PEEK(&HFF42)
220 RETURN
299 'CHECK VPORT FOR DATA
300 POKE&HFF42,67
310 GOSUB200:?A
320 GOSUB200:?A
400 'READ 1 BYTE VPORT 1
410 POKE&HFF42,99
420 POKE&HFF42,1
430 POKE&HFF42,1
440 GOTO200
Stew

User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: DWLOAD - DriveWire for everybody

Post by tormod » Tue Nov 04, 2014 9:17 pm

Could it be a file permission issue on your PC? Maybe the DW handler catches an exception because it cannot read the directory? I see that you can read arbitrary files on the PC (great example of virtual channels and DW4 dw commands!) but can you open FLAP and AUTOLOAD.DWL this way also?

Post Reply