It is currently Fri Aug 23, 2019 4:13 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Thu Aug 15, 2019 4:40 pm 
Offline

Joined: Fri Nov 18, 2016 7:29 am
Posts: 21
Is it possible to place $4016 out0-2 lines and $4017 D0-D4 on the parallel port of a pc? If so, how would I go about doing this? I'm in the middle of some hardware design and it would make testing much easier if I didn't have to reflash an EEPROM for every test.


Top
 Profile  
 
PostPosted: Thu Aug 15, 2019 4:53 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8534
Location: Seattle
I believe there's no pre-existing standard for doing this, and Windows and Linux will make it harder to do this on any newer OS.

NO$NES includes some parallel-port mediated thing, but it doesn't appear to be related to the expansion port.

All that said, yes, it's technically doable, but I don't know how negatively IO port access will affect performance.


Top
 Profile  
 
PostPosted: Fri Aug 16, 2019 12:01 am 
Offline
User avatar

Joined: Mon Jan 23, 2006 7:47 am
Posts: 201
Location: Germany
There are serial-to-USB adapters, I'd be surprised if there aren't parallel ones as well.

_________________
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10


Top
 Profile  
 
PostPosted: Fri Aug 16, 2019 12:10 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7566
Location: Canada
creaothceann wrote:
There are serial-to-USB adapters, I'd be surprised if there aren't parallel ones as well.

Every one I've seen is specifically for printers and not something that you can use in an immediate way like the actual parallel port.

I think there's some potential in using an arduino or similar microcontroller as a USB to Parallel port bridge, but for most purposes you probably need something programmable in the middle of the two protocol like this so that you can write something that operates according to your specific need.

I would hope that OP already has the "find a PC with a parallel port" problem solved though.


Top
 Profile  
 
PostPosted: Fri Aug 16, 2019 12:23 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3706
Location: Indianapolis
Notes from my similar but different UART emulator project say it's input.cpp, JPRead and B4016. Based on "SetWriteHandler(0x4016" in there.

Maybe try this? I think this may be what I used on Win98 and XP, seems it has been ported to later Windows versions as well!
http://www.highrez.co.uk/downloads/inpout32/

I remember doing stuff like outp(0x378, ..). In Win98 it always worked fine, in XP there would be latency if I did anything, even moving the mouse. Not sure how well Win7 will do with it. At any rate, should be much easier than looking up the whole OS-provided way of doing it.

edit:
port reference:
https://wiki.osdev.org/Parallel_port


Top
 Profile  
 
PostPosted: Fri Aug 16, 2019 12:36 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8534
Location: Seattle
On x86 port I/O requires elevated permissions ("ring 0"), so under linux you either have to run the thing as root, or have a kernel module to provide an interface for unprivileged applications. (and wine is really much too complicated of a thing to be comfortable run as root)

Under windows, there doesn't seem to be a sufficient equivalent to the former, so you have to use something that provides this abstraction - something like inpout, or GiveIO - or use Windows95/98/ME.


Top
 Profile  
 
PostPosted: Fri Aug 16, 2019 4:11 pm 
Offline

Joined: Fri Nov 18, 2016 7:29 am
Posts: 21
Thanks for the responses everyone. If I can find some time this weekend I'll break out the Win98 laptop and see if I can get inpout32 working.

I've never done work like this before. Can I modify an external file or do I need to download the fceux source and rebuild it with my changes?


Top
 Profile  
 
PostPosted: Fri Aug 16, 2019 4:28 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8534
Location: Seattle
You'll have to rebuild FCEUX.

Win95/98/ME shouldn't need inpout32 ; there you should be able to just use whatever abstraction the C compiler presents to generate the x86 outb and inb instructions.

Newer OSes (XP+) need inpout32, if that's even sufficient. At least the linked article says it worked on Vista.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Majestic-12 [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group