problem adding custom programmer definition

You can either use the bug tracker or describe the anomaly here.

Re: problem adding custom programmer definition

Postby ashwinm » 04, 2009 Oct Sun 3:35 am

When I say that it does not work, I mean that I get the messages "failed to read back data (low)", and "windows fooled around with the lpt bits". I get the same error whether I use smport or porttalk or allowio, and now that makes sense since you say that it's always using smport irrespective of the choice.

If you want to replace porttalk with something else, have you consideredinpout32 ? Looking at the readme, it appears that there is no restriction on using it for non-commercial applications.

Thanks for debugging this problem. I look forward to updates from you after you make it work :-)

- Ashwin
ashwinm
 
Posts: 9
Joined: 30, 2009 Sep Wed 5:57 pm

Re: problem adding custom programmer definition

Postby admin » 04, 2009 Oct Sun 9:45 am

ashwinm wrote:If you want to replace porttalk with something else, have you consideredinpout32 ? Looking at the readme, it appears that there is no restriction on using it for non-commercial applications.

I did not know that one. I will verify that too.

About your error, the worst one: "Failed read back of DATA line (LOW) !"
This means that the 0 has not been read on the input data when the output data is set to 0. This error may come from the adapter. Did you try my very simple "adapter" (see previous post) that is sufficient to fool WxPic by directly connecting the data output to the data input so we can be sure the problem does not come from the adapter?
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: problem adding custom programmer definition

Postby ashwinm » 04, 2009 Oct Sun 11:27 am

Yes, I did try the simple adapter (wire Dout(D3) to Din(Busy)), and manually toggled the signals in the "Interface" tab, but it didn't work. To double check that my wiring was OK, I tried the same thing with WinPic, and it worked. So there's something different about the way WxPic accesses the port, compared to WinPic.
ashwinm
 
Posts: 9
Joined: 30, 2009 Sep Wed 5:57 pm

Re: problem adding custom programmer definition

Postby admin » 04, 2009 Oct Sun 12:30 pm

You are right this is different because WxPic is not able to use PortTalk that is needed for the PortTalk driver or the AllowIo options.
But I don't understand why the SmallPort driver does not work (while it returns no error). If I add the Inpout32.dll support I am not sure this will work better than SmPort on your configuration.
I would like to test the SmPort on Vista but my only PC running under Vista is my LapTop that has no serial or parallel port. So I am limited to verify WxPic startup on this platform. And I am not eager to switch to Vista on the other PC (I had so many incompatibilities with Vista...)
By the way, you say that you have "Windows Vista Home Basic", did you try to install the SP1, MS say that it solves a lot of incompatibilities.
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: problem adding custom programmer definition

Postby ashwinm » 04, 2009 Oct Sun 3:41 pm

Yes, I did install SP1 (the machine is as up to date as possible :-) ).

You're right about inpout32.dll; no point trying it unless you're sure it will work. I'm trying it out right now to see if I can get basic parallel port pin toggling to work on my setup; the first try didn't work, but I suspect this is because its code to detect the OS version is outdated (perhaps it doesnt account for Vista). I will download the WinDDK and try to debug and make inpout32.dll work; I'll keep you posted :-)

- Ashwin
ashwinm
 
Posts: 9
Joined: 30, 2009 Sep Wed 5:57 pm

Re: problem adding custom programmer definition

Postby admin » 04, 2009 Oct Sun 3:49 pm

I am starting reading the Driver development documentation from MSDN and it seems several things have changed in Vista. But I don't yet understand enough the driver creation to really understand what those changes mean :x
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: problem adding custom programmer definition

Postby admin » 04, 2009 Oct Sun 5:45 pm

I succeeded to install VISTA on a old 566MHz Celeron with less than 512MB and 20GB HD! This is very slow but I have been able to reproduce your problem.
It seems that the driver has no longer the DisableWarmPoll parameter and that the polling is very frequent.
I would like to know what is the interface of this driver. I don't understand why it is not possible to open it and drive the port through this driver (unless it restricts the possibilities to a very limited set of operations).
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: problem adding custom programmer definition

Postby admin » 04, 2009 Oct Sun 6:06 pm

I found a new Open Source software that seems promising...
It is compatible with VISTA (even x64)
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: problem adding custom programmer definition

Postby admin » 06, 2009 Oct Tue 7:59 pm

...really promizing.
I made an executable that can use the driver. I have tested it with success on XP and Vista.
Under Vista it is necessary to run it with privileges. This a constraint but that allows to maintain VISTA security level.

The code source is:
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <windows.h>
#include <tchar.h>
#include "../../../WinRing0/source/dll/OlsApiInit.h"


void TestPort (int pValue)
{
    int OutValue = pValue << 3;
    WriteIoPortByte(0x378, OutValue);
    int InValue = ReadIoPortByte(0x378);
    int Busy    = ReadIoPortByte(0x379);
    printf("Write: %d, Actual Write: %d, Busy: %d(%d)\n", OutValue, InValue, Busy>>7, Busy);
}


int main (int argc, const char **argv)
{
    char Verif [4]="   ";
    printf("WARNING: this program will attempt to access to LPT1 at address 378h - 37Fh\nConfirm by entering exactly 'yes' (without the quotes): ");
    scanf("%3s", Verif);
    getchar();
    if (strcmp(Verif, "yes") != 0)
        exit(0);

   HMODULE m_hOpenLibSys = NULL;
   if(! InitOpenLibSys(&m_hOpenLibSys))
   {
      printf ("Error Initialize!!\n");
      exit(1);
   }

    TestPort(0);
    TestPort(1);
    TestPort(0);
    TestPort(1);
    TestPort(0);
    TestPort(1);

   DeinitOpenLibSys(&m_hOpenLibSys);

    getchar();
}


When no cable is plugged the result should be:
Code: Select all
WARNING: this program will attempt to access to LPT1 at address 378h - 37Fh
Confirm by entering exactly 'yes' (without the quotes): yes
Write: 0, Actual Write: 0, Busy: 0(127)
Write: 8, Actual Write: 8, Busy: 0(127)
Write: 0, Actual Write: 0, Busy: 0(127)
Write: 8, Actual Write: 8, Busy: 0(127)
Write: 0, Actual Write: 0, Busy: 0(127)
Write: 8, Actual Write: 8, Busy: 0(127)


When the cable with D3 on Busy is plugged, the result is:
Code: Select all
WARNING: this program will attempt to access to LPT1 at address 378h - 37Fh
Confirm by entering exactly 'yes' (without the quotes): yes
Write: 0, Actual Write: 0, Busy: 1(255)
Write: 8, Actual Write: 8, Busy: 0(127)
Write: 0, Actual Write: 0, Busy: 1(255)
Write: 8, Actual Write: 8, Busy: 0(127)
Write: 0, Actual Write: 0, Busy: 1(255)
Write: 8, Actual Write: 8, Busy: 0(127)


If you want to test it you can download the binaries to unzip in the same directory.

Edited to remove the link to the test program that is no longer usefull and that was not compliant to the license (no copyright, etc...)
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: problem adding custom programmer definition

Postby ashwinm » 07, 2009 Oct Wed 12:37 pm

Hey, good going! I tested the binary in my system, and it works here too. The only downside is that it needs admin privileges to run. Perhaps it's possible to decouple the kernel driver part from the user space part to avoid this problem. That way, only during installation (which requires admin privileges anyway) will the UAC box pop up.

- Ashwin
ashwinm
 
Posts: 9
Joined: 30, 2009 Sep Wed 5:57 pm

PreviousNext

Return to WxPic bug reporting

cron