473,378 Members | 1,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Trying to send keystrokes to NES emulator

Hi,

I am trying to send keystrokes to the NES emulator nester[1]. The idea
was to be able to use a standard NES controller whose "state" I can
read in using Python and then conveying that to the emulator.
Unfortunately, all the attempts I have made so far have failed. It
looks like the emulator is using some extremely low-level function to
read keystrokes and I cannot get in before it.

So far, I have tried the following functions from Python's win32api and
using ctypes:

1. SendInput
http://mail.python.org/pipermail/pyt...il/003131.html

2. keybd_event
win32api.keybd_event(90, 0, 0, 0)
This should have sent the 'z' key to the emulator which in Contra
makes the little guy shoot. However, the emulator just sits there.

3. SendKeys
import win32api
import win32com.client

shell = win32com.client.Dispatch("WScript.Shell")

shell.AppActivate("nester")
shell.SendKeys('s')

My suspicion is that nester is using something lower-level than where
these functions change stuff. I read about GetAsyncKeyState. However, I
couldn't figure out for the life of me how to force the return value of
the GetAsyncKeyState function.

I would really appreciate any help in this regard :)

Thanks!
Srinath (speaking only on behalf of myself)

PS: Does anyone know of a good way to play old NES games on the PC
using the classic NES controllers?

[1] http://nester.dranalli.com/

Dec 1 '06 #1
0 1733

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: GoogleGroups | last post by:
How do I use Python to send keystrokes to a console window in Windows XP? Or perhaps there is an application that I can call to do this? Thank you for your help.
0
by: Chris | last post by:
Hello Everyone, How can I/Is it possible with VB.NET create a service that can send keystrokes to another running process that is not a .NET exe? TIA
5
by: Go Perl | last post by:
Hello Here is an interesting question which I could not solve it. I have an old dos app for which source code is lost. I just have the exe file. So I have created a front-end for that. I...
5
by: Lucas Tam | last post by:
Hi all, Has anyone done this before? Send client side keystrokes to an application from a webpapge? This maybe more of a Javascript question. In short, I have an application on the client's...
0
by: summer00 | last post by:
Hi, Im developing an asp.net mobile web ,when user click a button on a mobile web form , i would like the localhost to send a sms to the pocket pc 2003 emulator which is running in the same PC ,...
4
by: mac | last post by:
I have a petty basic machine: Win XP 1GB RAM AMD 3500+ Chip (2.2 Mhz) I just did a single form "Hello World" application and tried to debug. It took 20 seconds to deploy to the emulator. The...
3
by: =?Utf-8?B?QmVybmFyZG8gU2FsYXphciBuZXdi?= | last post by:
Hi everybody... i need help with this issue: i have a textbox control with the focus. at side, i have a datagridview control populated with some data. i need to control behavior of dgv control...
0
by: alan75 | last post by:
I wanted to send keystrokes to a game using a vb.net form. The game is in windowed mode, not fullscreen. All I have at the moment are these: AppActivate("Name of My Game") SendKeys.Send("i") ...
0
by: ionphoenix | last post by:
i to send data or keystroke to a non active emulator or application using vb. its like the input will be done in vb.net but in the background it will input it into the emulator.i need help badly i...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.