Picallw wine config file

Questions about Wine on Linux
Locked
drumanart
Newbie
Newbie
Posts: 1
Joined: Tue Sep 20, 2016 6:10 am

Picallw wine config file

Post by drumanart »

Hello
Following this link:http://www.picallw.com/linux.htm to make my PIC programmer work in LINUX I have to add some code to the wine config file (.wine folder) but with the newer wine versions the config file doesn't exist.

How can I configure wine with the code:

[ppdev]
;; key: io-base of the emulated port
;; value : parport-device{,timeout}
;; timeout for auto closing an open device ( not yet implemented)
"378" = "/dev/parport0"
"278" = "/dev/parport1"
;"3bc" = "/dev/parport2"


[spooler]
"FILE:" = "tmp.ps"
"LPT1:" = "|lpr"
"LPT2:" = "|gs -sDEVICE=bj200 -sOutputFile=/tmp/fred -q -"
"LPT3:" = "/dev/lp3"


[ports]
"read" = "0x779,0x379,0x278-0x27a,0x280-0x2a0,0x378-0x37f"
"write" = "0x779,0x379,0x278-0x27a,0x280-0x2a0,0x378-0x37f"

Kind regards Martin
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Picallw wine config file

Post by Bob Wya »

drumanart wrote:Hello
Following this P I C A L L W under L I N U X to make my PIC programmer work in LINUX I have to add some code to the wine config file (.wine folder) but with the newer wine versions the config file doesn't exist.

Kind regards Martin
I've linked to this forum thread on the mailing list: [email protected] on your behalf...

Bob
User avatar
André H.
Moderator
Moderator
Posts: 202
Joined: Sun Dec 07, 2008 8:33 am

Re: Picallw wine config file

Post by André H. »

Try chapter 4.3.1 here:
https://www.winehq.org/docs/wineusr-gui ... -configure
(please don't miss the part about access rights)
sle85276
Newbie
Newbie
Posts: 3
Joined: Fri Jan 18, 2013 2:11 pm

Re: Picallw wine config file

Post by sle85276 »

When i install the program, run it and press "Read" (F6) on the main screen i get lots of:

fixme:ntoskrnl:READ_PORT_UCHAR (0x379) stub!
fixme:ntoskrnl:WRITE_PORT_UCHAR (0x378 28) stub!
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Picallw wine config file

Post by Bob Wya »

sle85276 wrote:When i install the program, run it and press "Read" (F6) on the main screen i get lots of:

fixme:ntoskrnl:READ_PORT_UCHAR (0x379) stub!
fixme:ntoskrnl:WRITE_PORT_UCHAR (0x378 28) stub!
That's what I feared - hah!! It's writing directly to the parallel port.

This was covered in a post on the devel mailing list...

It looks like I might need this bookmark after all: X86 Opcode and Instruction Reference Home ... 8)
Alex Henrie wrote:If the program is trying to read from or write to the address of the parallel port in memory, you can write a small wrapper to call ioperm and execvp.

For example, the following ioperm.c program grants access to the system speaker and calls the beep.c program which plays a tone for 1 second:

ioperm.c

Code: Select all

#include <stdio.h>
#include <sys/io.h>
#include <unistd.h>

int main(int argc, char* argv[])
{
    if (ioperm(0x42, 0x61 - 0x42 + 1, 1) == -1)
    {
        perror("ioperm");
        return 1;
    }

    if (execvp(argv[1], argv + 1) == -1)
    {
        perror("execvp");
        return 1;
    }

    return 0;
}
beep.c

Code: Select all

#include <stdio.h>
#include <unistd.h>

int main()
{
    __asm__("movb $0xB6, %al\n"
            "outb %al, $0x43\n"
            "inb $0x61, %al\n"
            "orb $0x03, %al\n"
            "outb %al, $0x61\n"
            "movb $0x64, %al\n"
            "outb %al, $0x42\n"
            "movb $0x01, %al\n"
            "outb %al, $0x42\n");
    sleep(1);
    __asm__("inb $0x61, %al\n"
            "andb $0xFC, %al\n"
            "outb %al, $0x61\n");
    return 0;
}
compile & run

Code: Select all

cc ioperm.c -o ioperm
i686-w64-mingw32-cc beep.c -o beep.exe
sudo setcap cap_sys_rawio=ep ioperm
./ioperm wine beep.exe
That might get a bit complicated - for a non-experienced programmer - really quickly!
But I'm happy to help if you want to give it a shot!

Bob
Locked