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
Picallw wine config file
Re: Picallw wine config file
I've linked to this forum thread on the mailing list: [email protected] on your behalf...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
Bob
Re: Picallw wine config file
Try chapter 4.3.1 here:
https://www.winehq.org/docs/wineusr-gui ... -configure
(please don't miss the part about access rights)
https://www.winehq.org/docs/wineusr-gui ... -configure
(please don't miss the part about access rights)
Re: Picallw wine config file
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!
fixme:ntoskrnl:READ_PORT_UCHAR (0x379) stub!
fixme:ntoskrnl:WRITE_PORT_UCHAR (0x378 28) stub!
Re: Picallw wine config file
That's what I feared - hah!! It's writing directly to the parallel port.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!
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 ...
That might get a bit complicated - for a non-experienced programmer - really quickly!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.cbeep.cCode: 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; }
compile & runCode: 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; }
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
But I'm happy to help if you want to give it a shot!
Bob