radiomanV / TL866

Open source software for TL866
GNU General Public License v2.0
345 stars 80 forks source link

Wine + XGPRO v1266A does not work :( #51

Open feniks1991 opened 5 months ago

feniks1991 commented 5 months ago

uname -a  ✔ Linux 6.6.26-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Apr 10 20:11:08 UTC 2024 x86_64 GNU/Linux

I tried different versions of Wine and even portproton. I tried on different PC. The application is loading, the window is empty, the fonts(only top border) are in Chinese or empty squares . If remove setupapi.dll from the program directory, it starts and, as expected, cannot detect the programmer. Everything works great on the virtual machine on windows. Please tell me what could be the matter?

wine ./Xgpro.exe  ✔  16s  007c:fixme:wineusb:query_id Unhandled ID query type 0x5. Dll Loaded. Found Xgpro v12.66 Base Address = 0x00400000 Code section = 0x00401000,0x00257400 Open Devices found at 0x004C3320 Close Devices found at 0x004C30C0 Usb Handle found at 0x00721840 WinUsb Handle found at 0x00838F08 Devices count found at 0x00735538 0024:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 006E8078, 43) stub Open devices. Close devices. 0024:err:seh:dispatch_user_callback ignoring exception c0000005

feniks1991 commented 5 months ago

Screenshot_20240428_015949

feniks1991 commented 5 months ago

in portproton it started and read M25L256XXX, but don't erase and don't flash :(

Screenshot_20240428_031426 Screenshot_20240428_031323

Log Wine is empty:

- Log WINE: fsync: up and running.

minipro -p MX25L25635F@SOIC16 -E work normal.

radiomanV commented 5 months ago

What version of wine do you have there?

feniks1991 commented 5 months ago

HI! I've used different versions. starting from 5 to 9.7. There can be two results. Or a white screen, or good it work and impossible to erase chip. since this does not depend on the version of wine, let's talk about the 9.4

Jorenar commented 4 months ago

Hi! I have essentially the same issue.

$ uname -a
Linux alpha 6.8.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 28 Apr 2024 15:59:47 +0000 x86_64 GNU/Linux

$ pacman -Qi wine                                                                                                                                                                                                     
Name            : wine                                                                                                                                                                                              
Version         : 9.7-1                                                                                                                                                                                             
Description     : A compatibility layer for running Windows programs                                                                                                                                                
Architecture    : x86_64 

I've tried running Xgpro.exe both a regular and sudo user. I've also tried installing an older version of the software (V851), but the effect is the same.

After clicking anything in menu, Xgpro crashes: screenshot-20240515_114921

What's interesting, if I first run the software and then connect the programmator to PC via USB, it shows GUI (almost) properly. But it still doesn't work (claims voltage too low and bad pin direction). While on Windows virtual machine everything appears to work correctly.

It might be important to note, I'm using T48

tkurbad commented 2 months ago

I am experiencing the same on Gentoo Linux with Xgpro version 12.67:

Linux turing 6.9.4-gentoo-x86_64 #3 SMP PREEMPT_DYNAMIC Fri Jun 28 11:12:10 CEST 2024 x86_64 Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz GenuineIntel GNU/Linux

emerge -v1p wine-vanilla

[...]
[ebuild   R    ] app-emulation/wine-vanilla-9.11:9.11::gentoo  USE="X alsa cups fontconfig gecko gphoto2 gstreamer mingw mono nls opengl osmesa pcap perl pulseaudio samba sdl ssl strip truetype udev udisks unwind usb v4l vulkan wayland xcomposite -capi -crossdev-mingw -custom-cflags -dos -kerberos -llvm-libunwind -netapi -odbc -opencl -scanner (-selinux) -smartcard -wow64 -xinerama" ABI_X86="32 64" 0 KiB

I use a T56. If it's powered up on start of Xgpro.exe, I see an empty window, like @feniks1991 If it's not powered up, the application starts in demo mode. If I switch the programmer on, it's only detected after I change the IC. And, like @Jorengarenar mentioned, USB voltage is detected as low and pin detection shows all pins disconnected.

If I try the same with the setupapi.dll from commit bbf08d63403867225e667d49f37e635271926daa, it behaves differently:

If the programmer is powered on while I start Xgpro, it will take a while to start and then show an error message "Read device information error!". Once I click "OK" on that, the application will start up and show the following log:

APP Version : 12.67   Model : T56
     Device : GAL22V10D

*************************************************
 1 Programmer Connected.
*************************************************
  Device 1: Unkown Ver: 00.00.00

*************************************************

If I now power toggle the T56, everything is detected properly and will work.

When I start the software with the programmer switched off, it will start right away in demo mode. If I now turn on the programmer, it is also detected fine and everything works.

So, something must be broken after commit bbf08d63403867225e667d49f37e635271926daa

theguy147 commented 1 month ago

I can confirm every detail of what @tkurbad said as well for Arch Linux with the T48

EDIT: Using git-bisect I found the first commit in which this problem occurred for me at 8443e31d. Therefore this is likely the commit which introduced the problem.

EDIT2: Sorry, as the commit I referenced before only updated the compiled setupapi.dll, I agree with tkurbad that the bad commit is one of these two: