Skip to content

Commit 435e433

Browse files
author
Mathieu Laurendeau
committed
Add firmware loader for the GIMX adapter #457
1 parent 5c8c751 commit 435e433

25 files changed

+3921
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DIRS = shared utils core config launcher fpsconfig
1+
DIRS = shared utils core config launcher fpsconfig loader
22

33
ifneq ($(OS),Windows_NT)
44
DIRS+= po
@@ -37,6 +37,7 @@ install: all
3737
cp -u -f config/gimx-config setup/gimx-config.exe
3838
cp -u -f launcher/gimx-launcher setup/gimx-launcher.exe
3939
cp -u -f fpsconfig/gimx-fpsconfig setup/gimx-fpsconfig.exe
40+
cp -u -f loader/gimx-loader setup/gimx-loader.exe
4041
cp -u -f shared/gasync/src/input/windows/gamecontrollerdb.txt setup
4142
mkdir -p setup/share/locale
4243
for translation in po/*.po; \

directories.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@
2525
#define BT_DIR "bluetooth/"
2626
#define LOG_DIR "log/"
2727

28+
#ifndef WIN32
29+
#define FIRMWARE_DIR "/usr/share/gimx/firmware"
30+
#else
31+
#define FIRMWARE_DIR "firmware"
32+
#endif
33+
2834
#endif /* DIRECTORIES_H_ */

loader/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/loader.layout

loader/Makefile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
include ../Makedefs
2+
3+
ifneq ($(OS),Windows_NT)
4+
prefix=$(DESTDIR)/usr
5+
bindir=$(prefix)/bin
6+
fwdir=$(prefix)/share/gimx/firmware
7+
endif
8+
9+
NAME=$(shell basename $(shell pwd))
10+
11+
CPPFLAGS += `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wno-unused-local-typedefs
12+
LDLIBS += `wx-config --libs` -lstdc++
13+
14+
OBJECTS := $(patsubst %.cpp,%.o,$(wildcard *.cpp))
15+
16+
OUT = gimx-$(NAME)
17+
18+
BINS = $(OUT)
19+
20+
all: $(OUT)
21+
22+
$(OUT): $(OBJECTS)
23+
24+
clean:
25+
$(RM) $(OBJECTS) $(OUT)
26+
27+
.PHONY: clean
28+
29+
ifneq ($(OS),Windows_NT)
30+
install: all
31+
mkdir -p $(prefix)
32+
mkdir -p $(bindir)
33+
for i in $(BINS); do cp $$i $(bindir)/; done
34+
mkdir -p $(fwdir)
35+
for i in firmware/*; do cp $$i $(fwdir); done
36+
37+
uninstall:
38+
-$(RM) $(fwdir)/*
39+
-rmdir $(fwdir)
40+
-for i in $(BINS); do $(RM) $(bindir)/$$i; done
41+
-rmdir $(bindir)
42+
-rmdir $(prefix)
43+
44+
really-clean: clean uninstall
45+
endif

loader/firmware/EMU360.hex

Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
:1000000040C1000059C1000057C1000055C10000A7
2+
:1000100053C1000051C100004FC100004DC100009C
3+
:100020004BC1000049C1000030C6000045C10000BE
4+
:1000300043C1000041C100003FC100003DC10000BC
5+
:100040003BC1000039C1000037C1000035C10000CC
6+
:1000500033C1000031C100002FC100002DC10000DC
7+
:100060002BC1000037C1000027C1000025C10000DE
8+
:1000700023C1000021C100001FC100001DC10000FC
9+
:100080001BC1000019C1000017C1000015C100000C
10+
:1000900013C1000011C100000FC100000DC100001C
11+
:1000A0000BC1000009C1000007C10000320754075E
12+
:1000B0003808540738089607B80738080A081C0893
13+
:1000C00010033100300030003800330036003600B5
14+
:1000D0000000160343006F006E00740072006F0092
15+
:1000E0006C006C006500720000001E034D0069008A
16+
:1000F000630072006F0073006F00660074002000E0
17+
:1001000049006E0063002E0000000403090412037E
18+
:100110004D00530046005400310030003000900084
19+
:100120000000B203580062006F0078002000530006
20+
:10013000650063007500720069007400790020009A
21+
:100140004D006500740068006F00640020003300FB
22+
:100150002C002000560065007200730069006F00DB
23+
:100160006E00200031002E00300030002C002000F6
24+
:10017000A9002000320030003000350020004D0082
25+
:100180006900630072006F0073006F006600740006
26+
:10019000200043006F00720070006F007200610069
27+
:1001A000740069006F006E002E00200041006C009A
28+
:1001B0006C00200072006900670068007400730022
29+
:1001C0002000720065007300650072007600650013
30+
:1001D00064002E00000009029900040100A0FA0941
31+
:1001E00004000002FF5D01001121100101258114AE
32+
:1001F000030303041302080303070581032000011E
33+
:10020000070502032000080904010004FF5D030044
34+
:100210001B2100010101834001042016850000001C
35+
:100220000000001605000000000000070583032001
36+
:100230000002070504032000040705850320004091
37+
:10024000070505032000100904020001FF5D0200FC
38+
:1002500009210001012286070007058603200010FE
39+
:100260000904030000FFFD1304064100010103120D
40+
:10027000010002FFFFFF085E048E0210010102036D
41+
:10028000010011241FBECFEFDAE0DEBFCDBF11E0C9
42+
:10029000A0E0B1E0EAE0F1E102C005900D92AA34DD
43+
:1002A000B107D9F711E0AAE4B1E001C01D92A33E65
44+
:1002B000B107E1F72ED227C7A3CEF89428E088E152
45+
:1002C00090E00FB6F894A895809360000FBE20933D
46+
:1002D0006000FFCF1F920F920FB60F9211242F9341
47+
:1002E0003F934F935F936F937F938F939F93AF93BE
48+
:1002F000BF93EF93FF938091CE008093CF018091C5
49+
:10030000C80087FFFCCF8091CE008093CE01809102
50+
:10031000CF018F3F19F482E291E002C08BE891E0B7
51+
:100320009093D4018093D3018091D3019091D40113
52+
:100330002091D2013091CE01231778F431E0320FB1
53+
:100340003093D201FC01E20FF11D2091C80027FF7C
54+
:10035000FCCF2091CE002083EBCF1092D201809170
55+
:10036000CF01833309F442C028F48131A1F08232F5
56+
:1003700031F15AC0853509F453C08F3F09F451C09B
57+
:10038000843409F051C081E08093CD018091CE0189
58+
:100390008093CC0149C08091C80085FFFCCF81E1EA
59+
:1003A0008093CE008091C80085FFFCCF81E08093D0
60+
:1003B000CE008091C80085FFFCCF81E014C0809101
61+
:1003C000C80085FFFCCF82E28093CE008091C800F8
62+
:1003D00085FFFCCF81E08093CE008091CB0190918E
63+
:1003E000C80095FFFCCF8093CE001EC08091C8004E
64+
:1003F00085FFFCCF83E38093CE008091C80085FF0A
65+
:10040000FCCF81E08093CE008091CB019091C80019
66+
:1004100095FFFCCF8093CE0081E08093D00104C093
67+
:100420004CDF81E08093D101FF91EF91BF91AF91BB
68+
:100430009F918F917F916F915F914F913F912F91FC
69+
:100440000F900FBE0F901F90189581E090E0909351
70+
:10045000CD008093CC0086E08093CA001092C80043
71+
:10046000E9ECF0E088E18083539A5A9A80818068B1
72+
:100470008083089514BE88E10FB6F89480936000DD
73+
:10048000109260000FBE90E080E80FB6F894809361
74+
:100490006100909361000FBED8DF78948091D00105
75+
:1004A0008823E1F3D5C30895089542E261EC81E029
76+
:1004B00009D342E260EC82E005C3CF93DF93CDB76E
77+
:1004C000DEB764970FB6F894DEBF0FBECDBF809144
78+
:1004D000DB0186FFB9C09091CB01911169C087FD06
79+
:1004E00011C08091E800877F8093E8006091E1016E
80+
:1004F0007091E2018AE491E043D28091E8008E7726
81+
:100500008093E8001092CD018091C80085FFFCCF58
82+
:1005100084E48093CE008091DB0187FF06C0809148
83+
:10052000C80085FFFCCF88E007C08091E101885FAB
84+
:100530009091C80095FFFCCF8093CE0068E070E0FA
85+
:100540008BED91E0CAD58091DB0187FF29C08091B6
86+
:10055000CD018823E1F38091E800877F8093E80054
87+
:100560006091CC0170E08BE891E0A9D18091E80026
88+
:100570008B778093E8008091DD019091DE018031DE
89+
:100580009C4509F061C080918A01882329F081E0AF
90+
:100590008093CB018093D50181E080938A0154C080
91+
:1005A0006091E1017091E2018AE491E096D54CC03E
92+
:1005B00087FF39C08091DD019091DE0187319B4535
93+
:1005C00009F47BDE8091E800877F8093E8008091CA
94+
:1005D000DC018130C9F49091DB0190FF0CC084E113
95+
:1005E000E6E3F1E0DE01119601900D928A95E1F7C4
96+
:1005F00064E170E011C089831A8283E88B8386E608
97+
:100600008C8364E070E008C0813A49F481E089831A
98+
:1006100082E08A8362E070E0CE01019650D1809141
99+
:10062000E8008B770FC08091E800877F8093E80017
100+
:100630006091E1017091E2018AE491E0A1D18091A1
101+
:10064000E8008E778093E80064960FB6F894DEBFDA
102+
:100650000FBECDBFDF91CF91089581E08093E90077
103+
:100660008091D5018823B1F08091D101882391F048
104+
:100670008091E80080FFFCCF40E050E064E170E052
105+
:1006800082E291E08CD01092D1018091E8008E77C7
106+
:100690008093E8000895CF93DF9300D0CDB7DEB705
107+
:1006A0001A82198282E08093E9008091E80082FF3B
108+
:1006B00024C08091E80085FF0EC0AE014F5F5F4F00
109+
:1006C00060E270E082E091E0B2D0811104C080E28B
110+
:1006D00090E09A8389838091E8008B778093E8008B
111+
:1006E00069817A816115710541F060930101772775
112+
:1006F0006E5F7F4F80E091E0F0D40F900F90DF911C
113+
:10070000CF9108958091DA01843011F4A6DFC3CF30
114+
:100710000895B0DEF7DFC5D4FDCF292F332722306F
115+
:10072000310559F02330310569F02130310579F573
116+
:1007300082E190E02FE632E02EC089E990E026EDDC
117+
:1007400031E029C0992782309105A9F03CF4009747
118+
:1007500079F00197E1F4EAEEF0E015C084309105FC
119+
:1007600081F064F08E3E910591F4EEE0F1E00BC073
120+
:10077000EAE0F1E008C0E2EDF0E005C0E0ECF0E016
121+
:1007800002C0E2E2F1E0849190E09F0104C080E0C9
122+
:1007900090E020E030E0FA01318320830895CF9289
123+
:1007A000DF92EF92FF920F931F93CF93DF937C0121
124+
:1007B0008B01EA01DDD1811131C0209731F08881B0
125+
:1007C0009981081B190BE80EF91EC12CD12C0115BB
126+
:1007D000110519F18091E80085FD14C08091E800B1
127+
:1007E0008E778093E8005DD4209741F088819981CD
128+
:1007F0008C0D9D1D9983888385E010C0B9D1882315
129+
:1008000031F30CC0F70181917F018093F100015019
130+
:100810001109FFEFCF1ADF0ADACF80E0DF91CF9125
131+
:100820001F910F91FF90EF90DF90CF900895CF929E
132+
:10083000DF92EF92FF920F931F93CF93DF937C0190
133+
:100840008B01EA0195D1811131C0209731F0888167
134+
:100850009981081B190BE80EF91EC12CD12C01152A
135+
:10086000110519F18091E80085FD14C08091E80020
136+
:100870008B778093E80015D4209741F08881998187
137+
:100880008C0D9D1D9983888385E010C071D18823CC
138+
:1008900031F30CC08091F100F70181937F01015089
139+
:1008A0001109FFEFCF1ADF0ADACF80E0DF91CF9195
140+
:1008B0001F910F91FF90EF90DF90CF9008952091BE
141+
:1008C000E1013091E2012617370748F06115710503
142+
:1008D00039F42091E8002E772093E80001C0B90197
143+
:1008E000FC0120E061157105B9F18091DA018823DE
144+
:1008F00009F440C0853009F43FC08091E80083FDD1
145+
:100900003DC08091E80082FF06C08091E80082FF30
146+
:1009100026C080E008958091E80080FFE3CF209119
147+
:10092000F3008091F20090E0922B6115710551F077
148+
:100930008830910538F421912093F10061507109BC
149+
:100940000196F3CF21E0089709F020E08091E800BC
150+
:100950008E778093E800C6CF2111C7CFD6CF809184
151+
:10096000DA01882339F0853039F08091E80083FF7F
152+
:10097000CCCF04C082E0089583E0089581E008951B
153+
:100980006115710529F42091E8002B772093E80088
154+
:100990006115710541F12091DA01222369F12530B9
155+
:1009A00069F12091E80023FD23C02091E80022FF97
156+
:1009B000F2CFFC01CF014091F3002091F20030E032
157+
:1009C000342B232B01F38091F1008193CF016150EF
158+
:1009D00071096115710571F7D6CF8091DA0188230D
159+
:1009E00059F0853059F08091E80080FFF6CF02C0C1
160+
:1009F00081E0089580E0089582E0089583E00895FD
161+
:100A00002091E1013091E2012617370748F0611586
162+
:100A1000710539F42091E8002E772093E80001C099
163+
:100A2000B901FC0120E061157105C1F18091DA0185
164+
:100A3000882309F441C0853009F440C08091E80062
165+
:100A400083FD3EC08091E80082FF06C08091E800EF
166+
:100A500082FF27C080E008958091E80080FFE3CF07
167+
:100A60002091F3008091F20090E0922B61157105C6
168+
:100A700059F08830910540F424912093F10031968B
169+
:100A8000615071090196F2CF21E0089709F020E04A
170+
:100A90008091E8008E778093E800C5CF2111C6CF02
171+
:100AA000D5CF8091DA01882339F0853039F08091F3
172+
:100AB000E80083FFCBCF04C082E0089583E008956F
173+
:100AC00081E00895982F973058F59093E900981792
174+
:100AD00039F07091EC002091ED005091F00003C0CE
175+
:100AE000242F762F50E021FF19C03091EB003E7F7C
176+
:100AF0003093EB003091ED003D7F3093ED0030916D
177+
:100B0000EB0031603093EB007093EC002093ED002C
178+
:100B10005093F0002091EE0027FF07C09F5FD3CFD6
179+
:100B20008F708093E90081E0089580E008958091BE
180+
:100B3000DB0187FD05C08091E80080FF0EC012C078
181+
:100B40008091E80082FD05C08091DA018111F8CF23
182+
:100B500008958091E8008B7708C08091DA018111B7
183+
:100B6000EACF08958091E8008E778093E800089599
184+
:100B70008091E4009091E50045E62091EC0020FF93
185+
:100B800021C02091E80020FD21C02091DA0122231C
186+
:100B900089F0253089F02091EB0025FD0FC02091D0
187+
:100BA000E4003091E5002817390739F3415041F04E
188+
:100BB000C901E3CF82E0089583E0089581E00895BC
189+
:100BC00084E008952091E80022FFDFCF80E00895BF
190+
:100BD0000F931F93CF93DF934BD052D0C8EDD0E04B
191+
:100BE00088818F77888388818068888388818F7DDA
192+
:100BF000888319BC1092DA011092D6011092D801A4
193+
:100C00001092D70100EE10E0F80180818B7F808385
194+
:100C100088818160888342E060E080E053DFE1EE1C
195+
:100C2000F0E080818E7F8083E2EEF0E08081816061
196+
:100C30008083808188608083F80180818E7F8083BB
197+
:100C4000888180618883DF91CF911F910F910895F2
198+
:100C5000E8EDF0E080818F7E8083E7EDF0E0808139
199+
:100C60008160808384E082BF81E08093D901B0CF2E
200+
:100C7000E8EDF0E080818E7F80831092E20008959D
201+
:100C80001092DA001092E10008951F920F920FB6B1
202+
:100C90000F9211242F933F934F935F936F937F9302
203+
:100CA0008F939F93AF93BF93EF93FF938091E10056
204+
:100CB00082FF0AC08091E20082FF06C08091E100BD
205+
:100CC0008B7F8093E100ECD18091DA0080FF1DC022
206+
:100CD0008091D80080FF19C08091DA008E7F8093C8
207+
:100CE000DA008091D90080FF0CC080E189BD82E1EB
208+
:100CF00089BD09B400FEFDCF81E08093DA01D3DB2A
209+
:100D000004C019BC1092DA01CFDB8091E10080FFB2
210+
:100D100018C08091E20080FF14C08091E2008E7FB5
211+
:100D20008093E2008091E20080618093E2008091F4
212+
:100D3000D80080628093D80019BC85E08093DA01E6
213+
:100D4000AFD18091E10084FF2FC08091E20084FF49
214+
:100D50002BC080E189BD82E189BD09B400FEFDCFD1
215+
:100D60008091D8008F7D8093D8008091E1008F7EA4
216+
:100D70008093E1008091E2008F7E8093E200809179
217+
:100D8000E20081608093E2008091D601882311F017
218+
:100D900084E007C08091E30087FF02C083E001C0C8
219+
:100DA00081E08093DA017CD18091E10083FF22C051
220+
:100DB0008091E20083FF1EC08091E100877F8093D5
221+
:100DC000E10082E08093DA011092D6018091E10087
222+
:100DD0008E7F8093E1008091E2008E7F8093E2001D
223+
:100DE0008091E20080618093E20042E060E080E078
224+
:100DF00069DE56D1FF91EF91BF91AF919F918F9195
225+
:100E00007F916F915F914F913F912F910F900FBE06
226+
:100E10000F901F9018951F93CF93DF93CDB7DEB738
227+
:100E2000AA970FB6F894DEBF0FBECDBFEBEDF1E091
228+
:100E30008091F100819321E0E33EF207C9F73DDBA9
229+
:100E40008091E80083FF14C12091DB013091DC0127
230+
:100E5000832F90E08A30910508F00AC1FC01EA5A1C
231+
:100E6000FF4F4BC1203881F0223809F001C1809139
232+
:100E7000DF018F708093E9008091EB0085FB88276C
233+
:100E800080F91092E90006C08091D7019091D801B5
234+
:100E9000911182609091E800977F9093E800809391
235+
:100EA000F1001092F100C1C0822F8D7F09F0E0C0E7
236+
:100EB000222319F0223061F0DBC08091DD01813006
237+
:100EC00009F0D6C0333009F080E08093D80128C003
238+
:100ED0008091DD01811124C02091DF012F7009F480
239+
:100EE000C7C02093E9008091EB0080FF19C080917A
240+
:100EF000EB00333011F4806211C080618093EB000D
241+
:100F000081E090E0022E01C0880F0A94EAF78093F6
242+
:100F1000EA001092EA008091EB0088608093EB0079
243+
:100F20001092E9008091E800877F82C02111A0C063
244+
:100F30001091DD011F778091E3008078812B8093F1
245+
:100F4000E3008091E800877F8093E800F0DD8091E6
246+
:100F5000E80080FFFCCF8091E30080688093E3008D
247+
:100F6000112311F083E001C082E08093DA0180C098
248+
:100F70002058223008F07CC08091DD019091DE0184
249+
:100F80008C3D23E0920771F583E08A838AE28983AE
250+
:100F90004FB7F894DE01139620E03EE051E2E32FD4
251+
:100FA000F0E050935700E49120FF03C0E295EF700A
252+
:100FB0003F5FEF708E2F90E0EA3010F0C79601C0CF
253+
:100FC000C0968D939D932F5F243149F74FBF809139
254+
:100FD000E800877F8093E8006AE270E0CE01019626
255+
:100FE0006EDC12C0AE014F5F5F4F6091DF0195DB99
256+
:100FF000009709F43DC02091E800277F2093E80086
257+
:10100000BC0189819A81FCDC8091E8008B77809318
258+
:10101000E8002EC0203861F58091E800877F80933A
259+
:10102000E8008091D6018093F1008091E8008E77EE
260+
:101030008093E8007CDD1CC021111AC09091DD0175
261+
:101040009230B0F48091E800877F8093E80090931D
262+
:10105000D6016DDD8091D601811104C08091E3003D
263+
:1010600087FF02C084E001C081E08093DA011DDACD
264+
:101070008091E80083FF0AC08091E800877F809319
265+
:10108000E8008091EB0080628093EB00AA960FB697
266+
:10109000F894DEBF0FBECDBFDF91CF911F910895B1
267+
:1010A0000895CF938091DA018823A9F08091E90017
268+
:1010B0008F709091EC0090FF02C090E801C090E02A
269+
:1010C000C92FC82B1092E9008091E80083FDA3DEB0
270+
:1010D000CF70C093E900CF910895680F791F8617EC
271+
:1010E000970751F0FC012191CF013091C80035FFE5
272+
:1010F000FCCF2093CE00F3CF0895EE0FFF1F059095
273+
:0A110000F491E02D0994F894FFCF5C
274+
:10110A00EE000000000000000000000000000000E7
275+
:10111A0000000000000000000000000000000000C5
276+
:10112A0000000014000000000000000000000000A1
277+
:10113A000000000000000014FFF7FFFFC0FFC0FF1F
278+
:0A114A00C0FFC0FF0000000000001D
279+
:00000001FF

0 commit comments

Comments
 (0)