12-27-2019, 07:06 PM
I got it working!! Fullscreen and buttons.
I used debugfs on the stock rom to figure out where the GPIOs are mapped. There was a little more to it than just finding them, but anyway here's my uImage:
https://mega.nz/#!GAgQVSCY!Gg6JeCnS7W6v2...YBbN4726TY
You can flash it the same way as mac2612's original version; all I changed was the uImage so only retroarch is installed in rootfs.
I'm not sure about the code you quoted; after mounting debugfs, this is what I found running the stock kernel :
>mount -t debugfs none /sys/kernel/debug
>cat /sys/kernel/debug/gpio
GPIOs 0-87, lf2000_virtual_gpio:
GPIOs 2048-2175, lf2000_physical_gpio:
gpio-2057 (hi253-front clock en) out hi
gpio-2058 (hi253-front enable ) out hi
gpio-2059 (hi253-front reset ) out hi
gpio-2060 (hi253-rear reset ) out hi
gpio-2061 (Volume Down ) in hi irq-93 edge-both
gpio-2062 (Volume Up ) in hi irq-94 edge-both
gpio-2079 (hi253-rear clock ena) out hi
gpio-2114 (hi253-rear enable ) out hi
gpio-2127 (TS_Y2 ) out lo
gpio-2128 (TS_X2 ) in hi
gpio-2129 (TS_Y1 ) out lo
gpio-2130 (TS_X1 ) in hi
gpio-2133 (Headphone Jack ) in lo irq-165 edge-both
gpio-2136 (Cartridge Detect ) in hi
gpio-2153 (DPAD Left ) in hi irq-185 edge-both
gpio-2154 (DPAD Right ) in hi irq-186 edge-both
gpio-2155 (Escape Button ) in hi irq-187 edge-both
gpio-2157 (DPAD Down ) in hi irq-189 edge-both
gpio-2158 (LFP100 INT ) in hi irq-190 edge-falling
gpio-2159 (DPAD Up ) in hi irq-191 edge-both
For example,
DPAD Left 2153 translates to
LF2000_GPIO_PORT_D | 9
Work:
2153 -2048 = 105
105 -96 = 9
(A starts at 2048 +0, B at 2048+32, C at 2048+64, D at 2048 +96 )
Yay! Now I can play retroarch at the crazy resolution of 480x272 without enough buttons. Hmm GBA might not look too bad....
I used debugfs on the stock rom to figure out where the GPIOs are mapped. There was a little more to it than just finding them, but anyway here's my uImage:
https://mega.nz/#!GAgQVSCY!Gg6JeCnS7W6v2...YBbN4726TY
You can flash it the same way as mac2612's original version; all I changed was the uImage so only retroarch is installed in rootfs.
I'm not sure about the code you quoted; after mounting debugfs, this is what I found running the stock kernel :
>mount -t debugfs none /sys/kernel/debug
>cat /sys/kernel/debug/gpio
GPIOs 0-87, lf2000_virtual_gpio:
GPIOs 2048-2175, lf2000_physical_gpio:
gpio-2057 (hi253-front clock en) out hi
gpio-2058 (hi253-front enable ) out hi
gpio-2059 (hi253-front reset ) out hi
gpio-2060 (hi253-rear reset ) out hi
gpio-2061 (Volume Down ) in hi irq-93 edge-both
gpio-2062 (Volume Up ) in hi irq-94 edge-both
gpio-2079 (hi253-rear clock ena) out hi
gpio-2114 (hi253-rear enable ) out hi
gpio-2127 (TS_Y2 ) out lo
gpio-2128 (TS_X2 ) in hi
gpio-2129 (TS_Y1 ) out lo
gpio-2130 (TS_X1 ) in hi
gpio-2133 (Headphone Jack ) in lo irq-165 edge-both
gpio-2136 (Cartridge Detect ) in hi
gpio-2153 (DPAD Left ) in hi irq-185 edge-both
gpio-2154 (DPAD Right ) in hi irq-186 edge-both
gpio-2155 (Escape Button ) in hi irq-187 edge-both
gpio-2157 (DPAD Down ) in hi irq-189 edge-both
gpio-2158 (LFP100 INT ) in hi irq-190 edge-falling
gpio-2159 (DPAD Up ) in hi irq-191 edge-both
For example,
DPAD Left 2153 translates to
LF2000_GPIO_PORT_D | 9
Work:
2153 -2048 = 105
105 -96 = 9
(A starts at 2048 +0, B at 2048+32, C at 2048+64, D at 2048 +96 )
Yay! Now I can play retroarch at the crazy resolution of 480x272 without enough buttons. Hmm GBA might not look too bad....