# \[CM3/Raspbian\] driver and document for Joystick/button?

**URL:** <https://forum.clockworkpi.com/t/cm3-raspbian-driver-and-document-for-joystick-button/7041>\
**Category:** DevTerm\
**Created:** [September 4, 2021, 5:11pm UTC](https://forum.clockworkpi.com/t/cm3-raspbian-driver-and-document-for-joystick-button/7041 "2021-09-04T17:11:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glbr\_Hanson](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/glbr_hanson/32/4883_2.png) [@Glbr\_Hanson](https://forum.clockworkpi.com/u/Glbr_Hanson)\
**Post date:** [September 4, 2021, 5:11pm UTC](https://forum.clockworkpi.com/t/cm3-raspbian-driver-and-document-for-joystick-button/7041/1 "2021-09-04T17:11:23Z")

</div>

@AlexDuan It’s driver question.

I’ve installed RetroPie and PICO8, VVVVVV etc…  
They works but buttons and mouse are not working since it seems there is no driver under /dev/  
Because I saw they are working in Demo video of DT, I thought DT Team has already its information.

Could I get the file ‘sdl\_controllers.txt’ ?  
And could you show me where the document of using joystick/buttons?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Glbr\_Hanson](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/glbr_hanson/32/4883_2.png) [@Glbr\_Hanson](https://forum.clockworkpi.com/u/Glbr_Hanson)\
**Post date:** [September 4, 2021, 5:33pm UTC](https://forum.clockworkpi.com/t/cm3-raspbian-driver-and-document-for-joystick-button/7041/2 "2021-09-04T17:33:00Z")

</div>

@AlexDuan My bad. I found drivers are up and running in /dev/input/

---

<div class="post-metadata">

**Author:** ![AlexDuan](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/alexduan/32/2675_2.png) [@AlexDuan](https://forum.clockworkpi.com/u/AlexDuan)\
**Post date:** [September 4, 2021, 5:37pm UTC](https://forum.clockworkpi.com/t/cm3-raspbian-driver-and-document-for-joystick-button/7041/3 "2021-09-04T17:37:23Z")

</div>

So it’s running well now, right? Anything need us to help?

---

<div class="post-metadata">

**Author:** ![Glbr\_Hanson](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/glbr_hanson/32/4883_2.png) [@Glbr\_Hanson](https://forum.clockworkpi.com/u/Glbr_Hanson)\
**Post date:** [September 4, 2021, 5:41pm UTC](https://forum.clockworkpi.com/t/cm3-raspbian-driver-and-document-for-joystick-button/7041/4 "2021-09-04T17:41:55Z")

</div>

@AlexDuan drivers are found in /dev/input/\* but It seems that joy2key.py (in retropie package) does not working. I mean up/down/right/left and Y/X/B/A buttons are not working in RetroPie. I may find its reason. But it would be grateful if you show me some hints.

‘emulationstation’ (RetroPie) start rorated like following:

![IMG_20210905_0257446](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/e/e091520d5298a389dfb77aa2f892f97c2b5bd03f.jpeg)

---

<div class="post-metadata">

**Author:** ![Glbr\_Hanson](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/glbr_hanson/32/4883_2.png) [@Glbr\_Hanson](https://forum.clockworkpi.com/u/Glbr_Hanson)\
**Post date:** [September 5, 2021, 3:48pm UTC](https://forum.clockworkpi.com/t/cm3-raspbian-driver-and-document-for-joystick-button/7041/5 "2021-09-05T15:48:13Z")

</div>

# screeen rotating

When I start emulationstation (RetroPie), screen shows rorated. I don’t know how to fix.  
But In X-WIndow, it shows correctly. (because of ‘xrandr’)  
I like to run RetroPie in multi-user.target mode. So please someone tell me the way to fix screen displaying.

# using buttons in PICO-8, VVVVVV

Here is generated sdl\_controllers.txt (only D-Pad buttons and A,B,X,Y buttons)  
**/opt/retropie/emulators/pico8/sdl\_controllers.txt**

> 03000000af1e00002400000010010000,ClockworkPI DevTerm,platform:Linux,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftx:a0,lefty:a1,

In my case, I put the environment variable in **~/.bashrc**

> export SDL\_GAMECONTROLLERCONFIG=“03000000af1e00002400000010010000,ClockworkPI DevTerm,platform:Linux,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftx:a0,lefty:a1,”

---

<div class="post-metadata">

**Author:** ![Godzil](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/godzil/32/60_2.png) [@Godzil](https://forum.clockworkpi.com/u/Godzil)\
**Post date:** [September 5, 2021, 4:06pm UTC](https://forum.clockworkpi.com/t/cm3-raspbian-driver-and-document-for-joystick-button/7041/6 "2021-09-05T16:06:47Z")

</div>

The screen rotation should be in a different topic, but well.

The native orientation of the LCD panel is you see it in emulation station. You need to force a 90° rotation to display in how the DevTerm expect.

Aka the real resolution is 480x1280 not the opposite

---

<div class="post-metadata">

**Author:** ![AlexDuan](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/alexduan/32/2675_2.png) [@AlexDuan](https://forum.clockworkpi.com/u/AlexDuan)\
**Post date:** [September 6, 2021, 8:27am UTC](https://forum.clockworkpi.com/t/cm3-raspbian-driver-and-document-for-joystick-button/7041/7 "2021-09-06T08:27:02Z")

</div>

@guu have any idea on this?

---

<div class="post-metadata">

**Author:** ![adcockm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/adcockm/32/1664_2.png) [@adcockm](https://forum.clockworkpi.com/u/adcockm)\
**Post date:** [September 6, 2021, 9:06am UTC](https://forum.clockworkpi.com/t/cm3-raspbian-driver-and-document-for-joystick-button/7041/8 "2021-09-06T09:06:26Z")

</div>

I don’t have a devterm to test this on (yet, I’m in for an A06), but the information at the bottom of this thread might help. Sounds like Emulationstation doesn’t make it easy to rotate the main menu display, but it might be possible to force it like this.

> **[Rotating screen in emulationstation ONLY](https://retropie.org.uk/forum/topic/10055/rotating-screen-in-emulationstation-only/10)**
>
> Hi there, I'm building a vertical arcade machine and using an Rpi3 to power it. For use with vertical shooters (CAVE, Toaplan etc.) plus old arcade games that were vertical (Donkey Kong, Nibbler etc.). Hear me out before you start groaning! I've done...

---

<div class="post-metadata">

**Author:** ![Glbr\_Hanson](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/glbr_hanson/32/4883_2.png) [@Glbr\_Hanson](https://forum.clockworkpi.com/u/Glbr_Hanson)\
**Post date:** [September 6, 2021, 3:54pm UTC](https://forum.clockworkpi.com/t/cm3-raspbian-driver-and-document-for-joystick-button/7041/9 "2021-09-06T15:54:47Z")

</div>

Thanks for the link. But, unfortunately, it seems it does not work.  
I put environment variable but still no luck: `export SDL_VIDEO_FBCON_ROTATION="CW"`  
I’m digging in…

---

<div class="post-metadata">

**Author:** ![Godzil](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/godzil/32/60_2.png) [@Godzil](https://forum.clockworkpi.com/u/Godzil)\
**Post date:** [September 6, 2021, 7:53pm UTC](https://forum.clockworkpi.com/t/cm3-raspbian-driver-and-document-for-joystick-button/7041/10 "2021-09-06T19:53:06Z")

</div>

can we move that to another topic please?
