Subject: [NetBSD 2.0.2][Bochs 2.1.1nb1] Problem with parallel port
To: None <netbsd-help@netbsd.org>
From: Sylvain Briole <sbriole.mls@free.fr>
List: netbsd-help
Date: 10/10/2005 08:20:32
Hi all!

I am trying to use the bochs emulator on NetBSD 2.0.2 in order to be able to
drive my printer (Nec Superscript 660 : "Windows printer") from Windows (3.1x or
95). The problem is : I can not start bochs with the emulated parallel port
"mapped" on the real port available on my computer.

My configuration :
   NetBSD 2.0.2 i386
   Bochs 2.1.1nb1 from ftp://ftp.netbsd.org/pub/NetBSD/packages/2.0/i386/All/

My .bochsrc file :

romimage: file=/usr/pkg/share/bochs/BIOS-bochs-latest, address=0xf0000
megs: 32
vgaromimage: /usr/pkg/share/bochs/VGABIOS-elpin-2.40
floppya: 1_44=a.img, status=inserted
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=0, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata2: enabled=0, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
ata3: enabled=0, ioaddr1=0x168, ioaddr2=0x360, irq=9
ata0-master: type=disk, path="c.img", mode=flat, cylinders=1015, heads=16, spt=63
boot: c
ips: 1000000
floppy_bootsig_check: disabled=0
log: bochsout.txt
panic: action=ask
error: action=report
info: action=report
debug: action=ignore
debugger_log: -
parport1: enabled=1, file="/dev/lpt0"
vga_update_interval: 300000
keyboard_serial_delay: 250
keyboard_paste_delay: 100000
floppy_command_delay: 500
mouse: enabled=0
private_colormap: enabled=0
keyboard_mapping: enabled=0, map=
usb1: enabled=1, ioaddr=0xFF80, irq=10

To avoid (for test purposes) any problem with rights :
   (as root)
   chmod a+rwx /dev/lpt0

And then, when I start bochs :

00000000000i[     ] installing x module as the Bochs GUI
00000000000i[     ] using log file bochsout.txt
========================================================================
Event type: PANIC
Device: [PAR  ]
Message: Could not open '/dev/lpt0' to write parport1 output

I do not have any problem with starting bochs when I use the following line in
my .bochsrc file :
   parport1: enabled=1, file="parport.out"

Any advice/tip?

I thank you for your help!

Sylvain.