From owner-freebsd-emulation Sun Jan 20 14:15:16 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from smarthost1.mail.easynet.fr (smarthost1.mail.easynet.fr [212.180.1.68]) by hub.freebsd.org (Postfix) with ESMTP id 3913237B41D for ; Sun, 20 Jan 2002 14:15:12 -0800 (PST) Received: from mx1.mail.easynet.fr (slb-1-sippriv.mail.easynet.fr [10.0.1.57]) by smarthost1.mail.easynet.fr (Postfix) with ESMTP id 9BDBDB9F8; Sun, 20 Jan 2002 23:15:10 +0100 (CET) Received: from gothic.blackend.org (blackend.org [212.11.50.35]) by mx1.mail.easynet.fr (Postfix) with ESMTP id 32FB87A07; Sun, 20 Jan 2002 23:15:04 +0100 (CET) Received: (from marc@localhost) by gothic.blackend.org (8.11.6/8.11.6/ - 31/07/01) id g0KM9TW20403; Sun, 20 Jan 2002 23:09:29 +0100 (CET) (envelope-from marc) Date: Sun, 20 Jan 2002 23:09:29 +0100 From: Marc Fonvieille To: Wim Livens Cc: freebsd-emulation@freebsd.org Subject: Re: porting disk2d64 to freebsd ? Message-ID: <20020120230929.A3867@gothic.blackend.org> References: <20020120215906.GC72391@krijt.livens.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020120215906.GC72391@krijt.livens.net>; from wim@livens.net on Sun, Jan 20, 2002 at 10:59:07PM +0100 X-Useless-Header: blackend.org X-Operating-System: FreeBSD 4.5-RC Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sun, Jan 20, 2002 at 10:59:07PM +0100, Wim Livens wrote: > > I've found a nice tool to transfer Commodore 64 disks to .D64 images > (http://www.weihenstephan.org/~michaste/disk2d64/) > > However, this is for Linux. I think it shouldn't be too hard to get > it to run under freebsd, even for a amateur like me. I rather not > install a linux box just for that... > > It's a very small C program that controls the parallel port using > primitives from linux's , like outb() etc. > > I'm not familiar with this but don't mind fooling around a bit so I've > found that provides the same definitions, so I > included that and it compiled up to: > > gcc -o disk2d64 -O3 disk2d64.c > /tmp/cci9d5Ir.o: In function `main': > /tmp/cci9d5Ir.o(.text+0x6a9): undefined reference to `ioperm' > *** Error code 1 add to the source: #include inline unsigned char inb (unsigned short port) { unsigned char _v; __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (port)); return _v; } inline void outb (unsigned char value, unsigned short port) { __asm__ __volatile__ ("outb %b0,%w1"::"a" (value), "Nd" (port)); } you could use outb and inb like: outb(0x08,port); etc.. and use i386_set_ioperm function instead of ioperm Marc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message