Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Using com port for keyboard emulation  (Read 3758 times)

0 Members and 1 Guest are viewing this topic.

slinger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 22
  • Last login:December 11, 2006, 11:33:27 pm
  • I'm a llama!
Using com port for keyboard emulation
« on: December 17, 2002, 01:43:46 am »
I've built a keyboard emulator that can accept  24 button inputs (upgradeable to 128) and it sends it's data through the com port, I used two seperate tsr's that take the serial input and stuff it in the keyboard buffer, both of them work great until mame runs, then the tsr is disabled, I can't figure this out, has anyone had a problem like this or know a work around?

Ron

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:Using com port for keyboard emulation
« Reply #1 on: December 17, 2002, 02:48:16 am »
I've built a keyboard emulator that can accept  24 button inputs (upgradeable to 128) and it sends it's data through the com port, I used two seperate tsr's that take the serial input and stuff it in the keyboard buffer, both of them work great until mame runs, then the tsr is disabled, I can't figure this out, has anyone had a problem like this or know a work around?

Ron

Windows mame, huh?

Mame uses directX for "close to the bone" keyboard inputs.  Your tsr might not be close enough for directX to see it?

If this is the reason, you can edit the source so mame uses the slower win32 api keyboard interface. :(  I'm not sure, but you might want to look into directX directInput at microsoft web page for comfirmation.  I haven't found a book with good info on directInput.  :(
Robin
Knowledge is Power

slinger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 22
  • Last login:December 11, 2006, 11:33:27 pm
  • I'm a llama!
Re:Using com port for keyboard emulation
« Reply #2 on: December 17, 2002, 02:53:54 am »
Quote
Quote

Windows mame, huh?

Mame uses directX for "close to the bone" keyboard inputs.  Your tsr might not be close enough for directX to see it?

If this is the reason, you can edit the source so mame uses the slower win32 api keyboard interface. :(  I'm not sure, but you might want to look into directX directInput at microsoft web page for comfirmation.  I haven't found a book with good info on directInput.  :(

Actually no I'm using the DOS version. Both of these tsr's are very "close to the bone" written in assembler.

Ron

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:Using com port for keyboard emulation
« Reply #3 on: December 17, 2002, 03:00:45 am »
Actually no I'm using the DOS version. Both of these tsr's are very "close to the bone" written in assembler.

Ron

Sorry, don't know enough about dos and allegro (mame's input library for dos) to help you. :(
Robin
Knowledge is Power

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Today at 01:14:11 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Using com port for keyboard emulation
« Reply #4 on: December 19, 2002, 02:47:18 pm »
I don't know a lot about this either.  But I can tell you this... if it's not detected as a keyboard at the hardware level (like system bios)  then it's probably not going to work in mame, dos or otherwise.  Mame looks for raw data, not filtered, more friendly, "keyboard" signals that dos and windows give you.

At least to the best of my knowledge, I could be extremely wrong on this.  

TaskyZZ

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14
  • Last login:October 09, 2003, 02:25:02 pm
  • I'm a llama!
Re:Using com port for keyboard emulation
« Reply #5 on: December 19, 2002, 03:38:22 pm »
I agree, I do not think MAME reads the keyboard buffer.  I believe it checks the actual state of the keypresses.  If it just read the keyboard buffer, it would have no way of knowing whether you were holding down a key or not.  It would just say, "ooh, look, a whole bunch of 1's in the buffer".  It doesn't work like that.  It reads the actual state of the keys.  Whether they are up or down RIGHT NOW!



Mike

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 307
  • Last login:September 22, 2005, 01:22:14 pm
  • Umm, yea about the TPS report
Re:Using com port for keyboard emulation
« Reply #6 on: December 19, 2002, 04:17:07 pm »
I think everyone is correct about mame looking at the keyboard scan and not the buffer. I tried forever to get a remote control to work with mame and I never could. I wanted to have a way to get into advanced mame setup without having to put extra buttons on my control panel.

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re:Using com port for keyboard emulation
« Reply #7 on: December 19, 2002, 04:43:36 pm »
MAME (via Allegro) is actually looking at the keyboard matrix, which is the only way it can detect multiple keypresses.
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com