수세에서 USB 컨버터 조이스틱으로 오락하기!

아주가끔은의 이미지

XP 쓰면 MP-866 Dual USB Joypad 라고 나오는건데.

이거 수세에 자동인식 시키면 HID... 8866 (dev.....) 라고 나오더군요.

그래서 찾아 봤는데 MP-8866 이 제일 비슷해 보입니다. 이거 제대로 인식하긴 하는거죠? 그런데 왜 동작을 안할까요? ㅡㅡ; 갑갑하네요. 회사에다가 리눅스 드라이버 만들어 달라니 거절하고..

bushi의 이미지

동작이 되는지 안되는지는 어떻게 확인하셨습니까 ?

아주가끔은의 이미지

네 우선은 리눅스 커널에 의해 인식이 된다안된다 하는말이 있어 리눅스커널을 확인했습니다.

# uname -r
2.6.18.2-34-default

비교했던 커널이 제가 설치한 커널보다 낮으니까 될것 같습니다. 그래서 오픈수세 사이트에서 조이스틱에 관한 문서를 찾았습니다. HID 라는것으로 인식이 된다고 하더군요 디렉토리를 확인해봤습니다.

/dev/input/by-id> ls
usb-0925_8866-event-joystick
usb-Logitech_USB_Receiver-event-mouse
usb-Logitech_USB_Receiver-event-kbd
usb-Logitech_USB_Receiver-mouse

여기서 아래 KDE 화면처럼 확인하면 조이스틱은 그냥 되는줄로만 알았습니다.

/dev/input> ls
by-id
by-path
event0
event1
event2
event3
event4
event5
event6
event7
js0
js1
mice
mouse0
mouse1

# dmesg

Linux version 2.6.18.2-34-default (geeko@buildhost) (gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)) #1 SMP Mon Nov 27 11:46:27 UTC 2006
.......
USB Universal Host Controller Interface driver v3.0
uhci_hcd 0000:00:1d.0: UHCI Host Controller
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:1d.0: irq 217, io base 0x0000e300
usb usb1: new device found, idVendor=0000, idProduct=0000
usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: UHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.18.2-34-default uhci_hcd
usb usb1: SerialNumber: 0000:00:1d.0
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 19 (level, low) -> IRQ 209
PCI: Setting latency timer of device 0000:00:1d.1 to 64
uhci_hcd 0000:00:1d.1: UHCI Host Controller
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:1d.1: irq 209, io base 0x0000e000
usb usb2: new device found, idVendor=0000, idProduct=0000
usb usb2: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: UHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.18.2-34-default uhci_hcd
usb usb2: SerialNumber: 0000:00:1d.1
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 201
PCI: Setting latency timer of device 0000:00:1d.2 to 64
uhci_hcd 0000:00:1d.2: UHCI Host Controller
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:1d.2: irq 201, io base 0x0000e100
usb usb3: new device found, idVendor=0000, idProduct=0000
usb usb3: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: UHCI Host Controller
usb usb3: Manufacturer: Linux 2.6.18.2-34-default uhci_hcd
usb usb3: SerialNumber: 0000:00:1d.2
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
usb 1-1: new full speed USB device using uhci_hcd and address 2
ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 16 (level, low) -> IRQ 169
PCI: Setting latency timer of device 0000:00:1d.3 to 64
uhci_hcd 0000:00:1d.3: UHCI Host Controller
uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:1d.3: irq 169, io base 0x0000e200
usb usb4: new device found, idVendor=0000, idProduct=0000
usb usb4: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb4: Product: UHCI Host Controller
usb usb4: Manufacturer: Linux 2.6.18.2-34-default uhci_hcd
usb usb4: SerialNumber: 0000:00:1d.3
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
usb 1-1: new device found, idVendor=07cc, idProduct=0501
usb 1-1: new device strings: Mfr=2, Product=3, SerialNumber=4
usb 1-1: Product: CardReader
usb 1-1: Manufacturer: USB2.0
usb 1-1: SerialNumber: 1234609
usb 1-1: configuration #1 chosen from 1 choice
usb 4-1: new low speed USB device using uhci_hcd and address 2
usb 4-1: new device found, idVendor=046d, idProduct=c505
usb 4-1: new device strings: Mfr=1, Product=2, SerialNumber=0
usb 4-1: Product: USB Receiver
usb 4-1: Manufacturer: Logitech
usb 4-1: configuration #1 chosen from 1 choice
Initializing USB Mass Storage driver...
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
tg3.c:v3.65 (August 07, 2006)
ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 16 (level, low) -> IRQ 169
PCI: Setting latency timer of device 0000:02:00.0 to 64
usbcore: registered new driver hiddev
ACPI: PCI Interrupt 0000:03:09.0[A] -> GSI 17 (level, low) -> IRQ 225
ACPI: PCI Interrupt 0000:00:1d.7[A] -> GSI 23 (level, low) -> IRQ 217
ehci_hcd 0000:00:1d.7: EHCI Host Controller
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 5
PCI: cache line size of 128 is not supported by device 0000:00:1d.7
ehci_hcd 0000:00:1d.7: irq 217, io mem 0xd2104000
input: Logitech USB Receiver as /class/input/input3
input: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:1d.3-1
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb5: new device found, idVendor=0000, idProduct=0000
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
usb usb5: new device strings: Mfr=3, Product=2, SerialNumber=1
usb 1-1: USB disconnect, address 2
usb usb5: Product: EHCI Host Controller
usb usb5: Manufacturer: Linux 2.6.18.2-34-default ehci_hcd
usb usb5: SerialNumber: 0000:00:1d.7
usb usb5: configuration #1 chosen from 1 choice
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 8 ports detected
usb 4-1: USB disconnect, address 2
ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 169
PCI: Setting latency timer of device 0000:01:00.0 to 64
ACPI: PCI Interrupt 0000:03:0a.0[A] -> GSI 18 (level, low) -> IRQ 201
ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[201] MMIO=[d1000000-d10007ff] Max Packet=[2048] IR/IT contexts=[4/8]
usb 5-1: new high speed USB device using ehci_hcd and address 2
usb 5-1: device descriptor read/64, error -71
Adding 1734980k swap on /dev/sda5. Priority:-1 extents:1 across:1734980k
Adding 4200956k swap on /dev/mapper/isw_djfccdadhf_operator_part6. Priority:-2 extents:1 across:4200956k
usb 5-1: device descriptor read/64, error -71
usb 5-1: new high speed USB device using ehci_hcd and address 3
usb 5-1: device descriptor read/64, error -71
usb 5-1: device descriptor read/64, error -71
usb 5-1: new high speed USB device using ehci_hcd and address 4
usb 5-1: device not accepting address 4, error -71
usb 5-1: new high speed USB device using ehci_hcd and address 5
loop: loaded (max 8 devices)
usb 4-1: new low speed USB device using uhci_hcd and address 3
usb 4-1: new device found, idVendor=046d, idProduct=c505
usb 4-1: new device strings: Mfr=1, Product=2, SerialNumber=0
usb 4-1: Product: USB Receiver
usb 4-1: Manufacturer: Logitech
usb 4-1: configuration #1 chosen from 1 choice
input: Logitech USB Receiver as /class/input/input4
input: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:1d.3-1
AppArmor: AppArmor initialized
input: Logitech USB Receiver as /class/input/input5
input: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:1d.3-1
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
ACPI: Power Button (FF) [PWRF]
ACPI: Power Button (CM) [PWRB]
usb 3-1: new low speed USB device using uhci_hcd and address 2
usb 3-1: string descriptor 0 read error: -32
usb 3-1: string descriptor 0 read error: -32
usb 3-1: string descriptor 0 read error: -32
usb 3-1: new device found, idVendor=0925, idProduct=8866
usb 3-1: new device strings: Mfr=1, Product=9, SerialNumber=4
usb 3-1: configuration #1 chosen from 2 choices
usb 3-1: string descriptor 0 read error: -32
input: HID 0925:8866 as /class/input/input6
input: HID 0925:8866 as /class/input/input7
input: HID 0925:8866 as /class/input/input8
input: USB HID v1.00 Joystick [HID 0925:8866] on usb-0000:00:1d.2-1

감도조절 버튼인지 잘 모르겠지만 버튼 누르고 조이스틱 버튼을 눌러봐라 라고 하길래 눌러봤는데. 안되는겁니다.

ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
RME 9636/52, JV-80, Yamaha O3D, DA-30MKII, US-122MKII, Roland SC-55

http://blog.obbli.net

dalgarak의 이미지

input: HID 0925:8866 as /class/input/input6
input: HID 0925:8866 as /class/input/input7
input: HID 0925:8866 as /class/input/input8
input: USB HID v1.00 Joystick [HID 0925:8866] on usb-0000:00:1d.2-1

..위와 같이 여러개 할당되는걸 보니 USB 타입 Playstation 1/2 조이스틱 컨버터군요. 최소 2개의 커넥터가 있는..

그래서 단일 선택으로는 안잡히는것일껍니다.

컨버터를 물리시고, 조이스틱까지 물리셨으면
Konsole 열고 루트권한에서 cat /dev/input/event* (*안에는 input6, input7 할때의 숫자 6, 7 이런식으로 넣으면 됩니다.)
어차피 udev 를 쓸테니.. /dev/input 디렉토리에 보시면 설령 디바이스 파일명이 다르더라도, 이벤트 디바이스 파일로 볼 수 있습니다.

명령날리시고, 버튼을 눌렀을때 이상한 문자들이 나오면 값이 넘어오는것이고, 그렇게 찾은 디바이스 파일을 기준으로 설정하면 됩니다.
화면이 깨지면 reset으로 복구시키시면 될꺼고..

위의 제품은 아니었지만.. SDL XMAME에서 PS2 조이스틱 물리고, USB 조이스틱 하나 물려서 잼나게 2인용도 했었습니다. :)
----
:LOL:

http://lunapapa.egloos.com

아주가끔은의 이미지

LunA_Jh 님 말씀대로 해봤습니다. 그런데 신호가 안오는군요.

cat /dev/input/event3
cat /dev/input/event4

event3, 4가 PS2 컨버터 USB 짹을 뽑았을때 사라졌다 나타났다 하는걸로 봐서 이게 분명한데.. 버튼을 눌렀을때 신호가 나타나지 않습니다.

ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
RME 9636/52, JV-80, Yamaha O3D, DA-30MKII, US-122MKII, Roland SC-55

http://blog.obbli.net

dalgarak의 이미지

역시 마찬가지로 cat /dev/input/js* (0 또는 1)을 하셔서,
버튼을 눌렀을때 여전히 다른문자가 안나오면.. 컨버터의 다른 커넥터로 연결해서 똑같이 시도해보세요.

이래도 안되면 아마 인식이 안되는게 아닐까.. 라고 추측해봅니다. MS 윈도우에서 잘 되셨었으면 커넥터가 이상있을리는 없을테고...

원래 디바이스만 잡히면 sdljoytest (http://sdljoytest.sourceforge.net/) 같은걸로 바로 테스트 해보시면 SDL환경에서 조이스틱이 잘 되는지 안되는지 확인할 수 있습니다.
----
:LOL:

http://lunapapa.egloos.com

아주가끔은의 이미지

일단.. 말씀하신 방법대로 성공했습니다. -- 우분투에서...

부팅한뒤에 USB 컨버터를 끼우자 성공된것일지도 모르겠네요. 감사합니다.

ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
RME 9636/52, JV-80, Yamaha O3D, DA-30MKII, US-122MKII, Roland SC-55

http://blog.obbli.net

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.