Page 1 of 1

ZX Library Update - v2.4.6

Posted: 10 February 2008, 13:52 PM
by dkinzer
A minor change was required to the ZX Library code to facilitate downloading without DTR. Use the link below to get the updated libraries.

You'll have to use DTR to get your program downloaded initially since the code that is there currently is not functioning. After that, you should be able to download without DTR.

http://www.zbasic.net/download/zxlib/zxlib_2-4-6.zip

Posted: 10 February 2008, 14:35 PM
by Don_Kirby
After re-compiling and downloading with DTR, I still get 'Device failed to respond to the ATN signal' when attempting a DTR-less download.

I've verified that I can send and receive ASCII characters to/from the device. I've tried both an actual serial port and an FTDI USB to serial converter.

The No-DTR code, as well as the actual hardware setup is the same as I've used in the past with a ZX40 and ZX24a.

Is there anything else I should be looking for?

-Don

Posted: 10 February 2008, 15:10 PM
by dkinzer
Don_Kirby wrote:After re-compiling and downloading with DTR, I still get 'Device failed to respond to the ATN signal' when attempting a DTR-less download.
Compile this program, download it and post the output. I'll see if that provides any clues.

Code: Select all

#c
extern void __vector_20(void);
uint16_t
getAddr(void)
{
  return((uint16_t)__vector_20 + 0x30);
}
#endc

Declare Function getAddr() as UnsignedInteger

Public ATNChar as Persistent Byte Based &H0013 
Sub Main()
  Dim data as Byte
  Dim addr as UnsignedInteger
  Dim i as UnsignedInteger

  Debug.Print "ATN char is 0x"; CStrHex(ATNChar)
  addr = getAddr()
  For i = 0 to 7
    Call GetProgMem(CLng(addr + i), data, 1)
    Debug.Print CStrHex(data); " ";
  Next
  Debug.Print
End Sub

Posted: 10 February 2008, 15:20 PM
by dkinzer
Don_Kirby wrote:Is there anything else I should be looking for?
What is the version number that is reported when the program signs on? For example,

Code: Select all

ZBasic v2.4.5

Posted: 10 February 2008, 16:24 PM
by Don_Kirby
ZBasic v2.4.6
ATN char is 0x04
19 f4 80 e0 0c 94 5c 05

0x04 is the character set by my (the previous) application.


-Don

Posted: 10 February 2008, 17:04 PM
by dkinzer
Don_Kirby wrote:0x04 is the character set by my (the previous) application.
The data looks right. I also used ctrl-D for testing here. I also used zload.exe directly:

Code: Select all

zload -a4 -m test.zxc
Are you using zload directly or through the IDE?

Posted: 10 February 2008, 18:28 PM
by Don_Kirby
OK, well it works, but ZLoad (either from the command line or the IDE) doesn't release the port after the download. After the download completes, the Compile, Go, and No DTR Download options in the IDE's menu are disabled until the IDE is restarted. Subsequent calls to ZLoad via the command line also fail.

Using the menu command Stop Executing restores the menu options disabled during the download, but does not fix the failing download issue. It does provide some debug info:
>C:\Program Files\ZBasic\IDE\..\zload -c2 -a4 -m -v D:\uG\ZBasic\zxonly.zxc
... 100%
Download completed successfully.
... 100%
Verification completed successfully.
[2J[H

>Process failed to respond; forcing abrupt termination...
>Exit code: 1
The characters after the verification completed notice are VT100 control codes used by the application, and can safely be ignored.

Looking in the Task manager, the ZLoad process is still running, even after the IDE is closed. It's doing something, as it is using 100% CPU. Forcibly terminating ZLoad fixes the issue, and will allow for another No-DTR download to proceed properly.

This may be a hardware issue on my end, and simply coincidental that the issue arose with the new compiler. Stranger things have happened. If you can get it to work properly from the IDE, I will assume it's hardware and/or software unrelated to the compiler/IDE, and look elsewhere for solutions.

I'm about to reload the non-native compiler to test further. That should determine where the problem is.

-Don

Posted: 28 February 2008, 13:57 PM
by Don_Kirby
Don_Kirby wrote:Looking in the Task manager, the ZLoad process is still running, even after the IDE is closed.
This seems a little like the issue being discussed in a more current thread, although I haven't seen the issue since a couple of compiler versions ago. Just thought I'd document the possible connection for posterity.

-Don