From e253526b5a67d7551ad4bc0df1dcf4d337600046 Mon Sep 17 00:00:00 2001 From: DannyAAM Date: Sat, 25 Mar 2023 04:47:37 +0800 Subject: [PATCH 1/3] special build for frankenfirmware --- exp.py | 19 +++++- generate_all.sh | 56 +++++++++++------- soundhax-eur-o3ds-pre2.1-post5franken.m4a | Bin 0 -> 2647 bytes soundhax-eur-o3ds-v2.1and2.2-post5franken.m4a | Bin 0 -> 2831 bytes soundhax-jpn-o3ds-pre2.1-post5franken.m4a | Bin 0 -> 2647 bytes soundhax-jpn-o3ds-v2.1and2.2-post5franken.m4a | Bin 0 -> 2831 bytes soundhax-usa-o3ds-pre2.1-post5franken.m4a | Bin 0 -> 2647 bytes soundhax-usa-o3ds-v2.1and2.2-post5franken.m4a | Bin 0 -> 2831 bytes 8 files changed, 50 insertions(+), 25 deletions(-) create mode 100644 soundhax-eur-o3ds-pre2.1-post5franken.m4a create mode 100644 soundhax-eur-o3ds-v2.1and2.2-post5franken.m4a create mode 100644 soundhax-jpn-o3ds-pre2.1-post5franken.m4a create mode 100644 soundhax-jpn-o3ds-v2.1and2.2-post5franken.m4a create mode 100644 soundhax-usa-o3ds-pre2.1-post5franken.m4a create mode 100644 soundhax-usa-o3ds-v2.1and2.2-post5franken.m4a diff --git a/exp.py b/exp.py index b8e8527..cd6a6f2 100644 --- a/exp.py +++ b/exp.py @@ -9,6 +9,7 @@ REGION = "usa" TYPE = "old" FIRM = "post5" +POST5FRANKEN = False if len(sys.argv) > 1: REGION = sys.argv[1].lower() @@ -18,6 +19,9 @@ if len(sys.argv) > 3: FIRM = sys.argv[3].lower() +if len(sys.argv) > 4: + POST5FRANKEN = sys.argv[4].lower() == "true" + # Check for impossible combinations if TYPE not in ("old", "new"): print("Error: invalid console type: {}".format(TYPE)) @@ -31,6 +35,9 @@ if FIRM in ("pre21", "v21and22") and REGION not in ("usa", "eur", "jpn"): print("Error: {} can only be used for USA/EUR/JPN regions".format(FIRM)) sys.exit(1) +if FIRM in ("v3xand4x", "post5") and POST5FRANKEN: + print("Error: use normal \"post5\", no need for franken build") + sys.exit(1) constants = { "pre21": constants_pre_21, @@ -112,7 +119,7 @@ def code_va_to_pa(va): off = va - 0x00100000 appmem_end = 0x24000000 if TYPE == "old" else 0x27C00000 - if FIRM == "post5" or TYPE == "new": + if FIRM == "post5" or TYPE == "new" or POST5FRANKEN: return appmem_end - 0x00200000 + off else: return appmem_end - code_image_size + off @@ -272,9 +279,15 @@ def internal(tree): else: assert TYPE == "old" if FIRM == "pre21": - fn = './soundhax-{}-{}-{}.m4a'.format(REGION, "o3ds", "pre2.1") + if POST5FRANKEN: + fn = './soundhax-{}-{}-{}-post5franken.m4a'.format(REGION, "o3ds", "pre2.1") + else: + fn = './soundhax-{}-{}-{}.m4a'.format(REGION, "o3ds", "pre2.1") elif FIRM == "v21and22": - fn = './soundhax-{}-{}-{}.m4a'.format(REGION, "o3ds", "v2.1and2.2") + if POST5FRANKEN: + fn = './soundhax-{}-{}-{}-post5franken.m4a'.format(REGION, "o3ds", "v2.1and2.2") + else: + fn = './soundhax-{}-{}-{}.m4a'.format(REGION, "o3ds", "v2.1and2.2") elif FIRM == "v3xand4x": fn = './soundhax-{}-{}-{}.m4a'.format(REGION, "o3ds", "v3.xand4.x") else : diff --git a/generate_all.sh b/generate_all.sh index 57f8337..bc50511 100755 --- a/generate_all.sh +++ b/generate_all.sh @@ -3,33 +3,45 @@ # There is no New3DS model for CHN/TWN # N3DS (post5) -python exp.py usa new -python exp.py eur new -python exp.py jpn new -python exp.py kor new +python2 exp.py usa new +python2 exp.py eur new +python2 exp.py jpn new +python2 exp.py kor new # O3DS (post5) -python exp.py usa old post5 -python exp.py eur old post5 -python exp.py jpn old post5 -python exp.py kor old post5 -python exp.py chn old post5 -python exp.py twn old post5 +python2 exp.py usa old post5 +python2 exp.py eur old post5 +python2 exp.py jpn old post5 +python2 exp.py kor old post5 +python2 exp.py chn old post5 +python2 exp.py twn old post5 # O3DS (v3xand4x) -python exp.py usa old v3xand4x -python exp.py eur old v3xand4x -python exp.py jpn old v3xand4x -python exp.py kor old v3xand4x -python exp.py chn old v3xand4x -python exp.py twn old v3xand4x +python2 exp.py usa old v3xand4x +python2 exp.py eur old v3xand4x +python2 exp.py jpn old v3xand4x +python2 exp.py kor old v3xand4x +python2 exp.py chn old v3xand4x +python2 exp.py twn old v3xand4x # O3DS (v21and22) -python exp.py usa old v21and22 -python exp.py eur old v21and22 -python exp.py jpn old v21and22 +python2 exp.py usa old v21and22 +python2 exp.py eur old v21and22 +python2 exp.py jpn old v21and22 # O3DS (pre21) -python exp.py usa old pre21 -python exp.py eur old pre21 -python exp.py jpn old pre21 +python2 exp.py usa old pre21 +python2 exp.py eur old pre21 +python2 exp.py jpn old pre21 + +# ==== FRANKENFIRMWARE ==== + +# O3DS (v21and22) +python2 exp.py usa old v21and22 true +python2 exp.py eur old v21and22 true +python2 exp.py jpn old v21and22 true + +# O3DS (pre21) +python2 exp.py usa old pre21 true +python2 exp.py eur old pre21 true +python2 exp.py jpn old pre21 true diff --git a/soundhax-eur-o3ds-pre2.1-post5franken.m4a b/soundhax-eur-o3ds-pre2.1-post5franken.m4a new file mode 100644 index 0000000000000000000000000000000000000000..3444852b87cd141f314dfcfc28f9ee6f05aad9b6 GIT binary patch literal 2647 zcmeHHPiP!f82@c{quZLwpc@l$TPC53mUVZ!No!j~H_sG^62XHPAqTw)7AfsD*(&McMz3*Dx;vsZ-v? zMRo3Pkhz+tpPsq-(J0nFy*+sSZ4F2Q^F*0YghkZ98-+>S%`XrahbHN)h~tsq7D7U$#i>ql#+qOFI?r&>XQxsGut=9axNZl^!l z3g&3fYJNCNsZ+kB`|T#zhIToeqYmS8n7h$zi|_LfZ3l+F9u^sYr_=dycsYyBTW9dw z1J7WWBfwv%YfXREaj8HKjGB7U6*23^k(}W;oKc4bzsTeuyqEFXyumzxwpypZ(HmTj!afuZAhChG}gz%%J=2 zirg1)E=b|phZ5^!AgaaG{}lXg`~w8nx}x`H{ekEeqwkuRVkSCIIm$Lk>5hsT3O@d3 zdP)ZHoFB_SvZyMJy->Hd)cbk%7~l`bt}bw@xlT7x&vaCE`K)SKVi(Ak29_EXy{B)v z-h74n1=n+>s|m#CHMT+7oIvJX^hx{aZjWNja+NFdr0@HqtV@bAQyK&t0e+80KbgKv z`aX(;)a?M5d4m$euIELu)FuDpY^1_xT(4Xcg%JKpjx2-9LJ-3B{6(g&FDcKYTyrdu z5%v{~MQ)h&x}0$jsj^*h+0&ExjjG8$pL~KXUV@nr=-hc0W6*g=E#Bc3-qs2q9Yq*8 zj+4~xJ@+c`U$4OA`R;AmJbxPgC$|SVdu(Ik)mh4iox58CC|z&*bO&6 Mcdc@*s{V4op98KG)c^nh literal 0 HcmV?d00001 diff --git a/soundhax-eur-o3ds-v2.1and2.2-post5franken.m4a b/soundhax-eur-o3ds-v2.1and2.2-post5franken.m4a new file mode 100644 index 0000000000000000000000000000000000000000..03a8f2b261b37cedee10835b7bf21460f9242e5a GIT binary patch literal 2831 zcmeHIJ!~9B6#mY44wvX6E#!=ixI}9!M8P_Io3j%LGH?#I2t{y2f^dN));H^TmHX4} zUQB>u6DEB?**3HX6 zV#mF_q|V<**s6_jeR}%Vmm|1k+!@e5(119wKoki@SVZQB5tzii{33CQh~@!Pd^I|@ zC&$q0SQww+Xfht=JA*RLE|NWE>OasO2b#=Ru<>v%%nNO6Q09yI9Ae+M{Os*>?JcYY zMklu&(^~$rwi#q`Js1Lh|BgJ!9VGX)=sg~2`Gd57ZixN8V1qV^od2vgI54T99Y_-A?D1H@pnq zIyQ;phbD3M%+q+N54iD>)F+!(FJ|%Px5L!{g9;Si3eO^kDqJkVLLDY* ze7JM4=@DW__hWrBkCuOcwK>8uwZc#VP=IZ>dEYfWfPsYQ^|n}KFDgEU)`wjtUw z)DN--F|J$Z8Z__bPm+T5q3Z5Wm{&;orQ%N?Yfep|1o9tOQAI zB}k*YcX`eWIPWL0`l-ZvNMVk3nE9WA`^GOou-X;9H|r0CuLyllzYsCed8VvvlayXo z;YEngzL}ko20ZUY@((YmQhhhnsWy5a&n^S}RkkaO>}pQAo2X|xs=9ne)h)3LWJ;+< zy`=Z_O~+j*QNQH4j@-rq@p+xsw@gkT{Vw|C`sq%OV%&0+BmKDNc_XY#f-+qg051ak z8Mb~hed**rikQ@GKZkjn5<`ybhOyKo{}cQH2%mP`VpSAE_~UFD1{H-MgzNc>Onlr> zu1R^lY>5o9r(i5{-K^DQjk`z`?UKWPQG9H@V)FkKKgM5^1T!JfxjTt*=scqq&+sx& zYl)AJJPe$`DQXX%2Nk&AD=__9_q1$$aT;3g&H#IluTQ;tk@8UVw7g=;tueZ8mKG>S z_L%I7YgJTLAD_OUU*NqZo|$!JUZqS&J@bZPkUMOts+{wIsExrV$l=JcyC@gNqfw(_ zrS-qSjB2Z{o{bY0cC|whyVZp literal 0 HcmV?d00001 diff --git a/soundhax-jpn-o3ds-pre2.1-post5franken.m4a b/soundhax-jpn-o3ds-pre2.1-post5franken.m4a new file mode 100644 index 0000000000000000000000000000000000000000..6b93534c12989065aa056bed5b674ad6cb7ce42e GIT binary patch literal 2647 zcmeHHPiP!f82@c{quVxxK{qDiwoF15E$i-dlh!tfZY05asEM}4Ts%zn%{D`Kc9)&m zhDgD&M)2Tb4n6dsWG@PlR6KYU0&+g_4n;=a8g9?+TZZz``+*S z^WOVr-UmQ0c`LOulhZl~kxp$gZ@X1T=EOcnnI7f-tW&LC>Jpch6y@MMUfsM1Bu;u4 zm(={<;PQJ}`st~ekH@ig{r2#+H#Hy*ED}XR5f-ui%{WZrUcN+JAfkD|6!WiS_vHBQ zdbS&%;A*lSoX&`>vx{V3nf@2_)`2Gb6>J{Jb@M{o9+CaR$szV_E6ChB)858j6c;1a?Evw=%f7Ifl(ovpCIf0!_maxTrw!tuTcgs_?J`3w4;N@!^+) zO^+^q)q~i8?4uRzXKfC1O|9_s4?62BXHFDo<5?40Q)&?o>CI3xnqi6~N!uuGY3c`A zgBZ`P^9-8*#U07PoXpj$(E|K-vagF>&Qvzj5Wm{op`ZQ2YFp=-p|6GstcFQ#HB6!R z?eg3g|F|H5s~<_Mk0JcVI?Vo0!SBXDKybAu`ft`B=)NNKJ@Z1uMCVyY*(NF7QQd}u zPrjU+l>t2GNAiy?sd9Zc)U7u9KhG`${NdP@5~rH$^b++=M^ukbtGXq2foy50Q7`L# zearP0%hWHpo-18VAU?0L4a(*OGVftP+D~tL6cd)KT$#sx-ydgP5|pXJFxUw2dv^?y z8Av4`pomG`_HmgvC^71KUN@Gy8TGLb$%a$i%gV@=VG# z#}e7ao`SK+b+cBJGwvc$w977gdOW*PG1=$iPq4*HFcSiuyU$_*I`62(JG{)>TIQo8 z4+F<=g4+G(eg*#P6_`2SyDjtQPr={3J`KE0n3IXWlRja)&Hcm3uxMwK4b@IUHX0O42YMi5d+fZyXov zn6it~BOi@gCr=%pe&NK)Za5v3^-m6So>Q;U;l*f%My*^mRmM`bH)FeA-Ck^XR;Fav P-RRu4iq(qx%K?7^3UL)i literal 0 HcmV?d00001 diff --git a/soundhax-jpn-o3ds-v2.1and2.2-post5franken.m4a b/soundhax-jpn-o3ds-v2.1and2.2-post5franken.m4a new file mode 100644 index 0000000000000000000000000000000000000000..0f7c17376f0982c95e38d17d90e735c0f3deb07e GIT binary patch literal 2831 zcmeHIO>7%Q6#g7L#jR4YDh@Hitu|4qN@eV=lNO2sI8_4SP!iE1av%~L&!$<`Yg^t; zqXLIj$$^VSRTYUtQGDSLP8@(6QVy*Yq#mjsdg&$cY7svY^uP(Bn(x_;*z^GR(r-2U z-hA(8X5Q?~0?-$|OSLm&6FLZyPHn7UyH!W}#9l|49_79tooe-Bhq$<;DEGYL)y)e) z;=XrbNzFb&n6BiwK0USh-3T^~yMx)+hk-b-K$HkYSVZRD2u$K(evvp&MDsvn#-q7i zIc|KG>%=EGnv93}_K=LTgJe&c_z!f)fhO}6q@T=p@&UY z46f5Y%De;G7h#e-$iZj^pA;EaY=rSQn?Zu|BlgGW*N^6QSz8O^&o_fSa~)$-%q??c z+;)Gw8O+h1(fsfnrA|4m`>h7YhIToeqYmS8n7!R-iSKI%wgN+63k!^Y&~E?oo}WSb z$T&6+jAQ!ri+G|BxPDdYlTFP#W z8m7?Qy8`D0%mxWu`%+?k3}B9RnEIcB`^GOoaIGtPZ`L2^ydv~N{bIyK=P5_oCMn%f zor@4(-JF?{2E6J=@((Yma(yS%tuFUIo*f4G%dsnq>}sylP1G|TR$V@$>Xz6AGNpm# zdRg!38?LudrheY_T)B+};`1)AZ<(Ax`d#$N_0ydm#i->fSNd_^_eWTl1ZAo?2wnvE zv(x&?^rez}C}L8#y&UEPN~B%S>%>x*{Lk?RAbiU8N>xz^;g7Oq7*rC15U%GhGV%Gc z@=VGrjwP~#T?J#2>t?McYurJiWS3q3i{iQUipl>|{0M(d63m1^`@uLyq4SJdJi{wI ztz|ws3NUaSC#gMt9#`N|ufXIx-P1Dr?I~#ayMydKyFT&uIm)M^r{yh6ZjEE>W_f{f zWS7aVcveMK_0h?*`dQvv;+a`j<|WEh)U#k12DyWls>(SZjM^A{oE#3Vc#CpjJRLO} zM!`5C)?sCr?{Mu#_|8J271s;RP;vb{;$_3HM* UvS(!%?YbN7yH=@MQU5sLZ%sT)EdT%j literal 0 HcmV?d00001 diff --git a/soundhax-usa-o3ds-pre2.1-post5franken.m4a b/soundhax-usa-o3ds-pre2.1-post5franken.m4a new file mode 100644 index 0000000000000000000000000000000000000000..57fadb7805b23809a7320262f4456a043228e6e2 GIT binary patch literal 2647 zcmeHHPiP!f82@c{quaWLK{qDiwoF15E$e2wNoyNKHWPW}BfqyUWg` zF(Np`2woQV&_fSO_Mk$f{yBIR0#@)~p_F2;$qoZmK|P9;uD@@0gOeh9*Zzh#-}ips zpZDH3^F9E2$y=?Rnw-`_h;(X`dE2czGAH&q%JeAr=bUQwVwbqMq$mg9_3GvYAaTOG zu%u4^4L)k*=%=S=J{d#vvs*)#-`0RQut*dMMOei4wK15)y?lu{Pek*8Dc(4f+mqwY z=ecftf~(1Ta5}@X&MuODW%^&xTL+r#S8y{m-pvbbdsy}hXB@E`tsr~-RC^m6q0t%N ziD|81McWFqXoe%euiujgxdY^`ir(jeRxnKaSBBW%3BROGVqXV-PNC7>(%x^!^j7cz z?GwzK(mo86v z;hQPke&|^|H~{#oQlD&kel3fuS4MI3iyUhFCeSn-hKmXm-wIP0M-?8HV4)5ZH9q`u zu<6moZ+Z|LkbSg*{jAL)uBjEC`B7(m<;;l!Z9Hp2Ye+4^l->w6qYFthaTZ8Txvdzt?McXWT`iXqR2~^muNwVzST2pJa=dU?v1Qcb~%qbly>mcX)-jwaiCH z9tMu$IJNuF{R;foD=>4ecUzk0PQt%(YlySQH>c0cQ$7;CEw5VAHI8hW7%Q6#g7L#jR3lMI91Ux7tLdqLoRuPFg4m;8Y2OLrFzjVWCE1<5@SW+Fr}M zZdBl~Dmiemh@e6oisB20aN+>mka8$ekvLQwdf}3IwH1GY9(qEk=6kjyHa)<-^jpoo zH{bi2nKwJL0Q91FrFwdDS_dJrT%F9?u2YsivAe8Hk8;nQvg2It5SNz}<*paJnt2IG z-1ROksWT4|s?HeKr>AayJ&K#g?ZM2;BS0KjBnpHgEF%5mC`{r(zDQgoqIsYJb4SK@ zHk1?9B49M!G$;Xck)8p9FqBBVH~j^nnC8)>DDIJ zLZdyt71Nr*vbGUsuo?~ne|%3KCNCe?Gwy9pnV!9$%7n>X7GNFak)kqf3+DTDBop&l79VYZk4pPFn**Nj5F6!HpSdB zH^y!C$D2W(_O#}Q=O}f`Io)qHI5xDaVV*jSt6}C=qb0sCJ-!(j`dXM}{QY+OmkWLx z`NLC4?wi8gsb}$6A8`FcsZS<#Z#sjwz8iu6(HL^v6KEO^!9@j%Z-wVE4hJ5VV4(&R zRX*G~*!1Y&t{%ktWFF064{LLfV`{l)e%4uES#u&s8`ql98d8gJKyQSa(Fjv)N!o^K zOH<#=8pOD6oomqiZ+?;-%*kBc8s*`)l09AQvZj0Qq#=IQ`2)ZExs{gAHA7zs6Icn8 z+De#0cki;C7jPy>;M!*r>tg_U)?xO43ho=f0Kv7c=)GBgp!15*5A<^p6P;(v$~H;q zW!1R|@%gv&v(kVU{Yd_iB~_|zhq_L^_wj5qz+Yv%Qe;KgAF8*CfGA2(<4{VFEhOsKqn9 z%+p%pqazCg$8dt$qvuft9`*{%obR5N)vr!M8^1ls-v0IJ*UwSzi=LL(EV(s~uA8Mr z%F!JryW&|D<>(VLXZ5qZx5P8OuFNZxsi Date: Sun, 20 Aug 2023 05:11:31 +0800 Subject: [PATCH 2/3] add frankenfirmware selection page --- docs/css/frankenfirm.css | 261 ++++++++++++++++++++++++++++++++++++++ docs/frankenfirm.html | 168 ++++++++++++++++++++++++ docs/js/frankenfirm.js | 268 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 697 insertions(+) create mode 100755 docs/css/frankenfirm.css create mode 100755 docs/frankenfirm.html create mode 100755 docs/js/frankenfirm.js diff --git a/docs/css/frankenfirm.css b/docs/css/frankenfirm.css new file mode 100755 index 0000000..860b0ae --- /dev/null +++ b/docs/css/frankenfirm.css @@ -0,0 +1,261 @@ +body { + background-color: black; +} + +.logo img{ + margin-left: auto; + margin-right: auto; + width: 30%; + display: block; + padding-top: 4%; +} + +.text p { + margin-left: auto; + margin-right: auto; + margin-bottom: 0; + width: 30%; + text-align: center; + display: block; + padding-top: 4%; + padding-bottom: 0; +} +.text img { + margin-left: auto; + margin-right: auto; + width: 30%; + display: block; + padding-top: 0; +} + +.graphics img{ + position:fixed; + bottom:0px; + margin-left: auto; + margin-right: auto; + width: 100%; + z-index: -99; +} + +/*.downloads { + padding-top: 5%; +}*/ + +.hidden { + display: none; +} + +button.donate { + margin-top: 10px; + font-weight: 700; + font-size: 1.2rem; + word-spacing: 30px; + background-color: #FFFFFF; + text-align: center; + border:none; + letter-spacing: 1px; + margin-left: auto; + margin-right: auto; + display: flex; + justify-content: center; + width:240px; + color: black; + min-width: 200px; +} + +p { + font-family: 'PT Sans Caption', sans-serif; + color: white; +} +select { + font-family: 'PT Sans Caption', sans-serif; + text-transform: uppercase; + padding-top: 10px; + padding-right: 10px; + padding-bottom: 10px; + padding-left: 10px; + cursor: pointer; + border: solid 2px; + border-color: white; + background-color: rgba(0,0,0,0); + color: white; + margin: 0; +} +option { + font-family: 'PT Sans Caption', sans-serif; + text-transform: uppercase; + padding-top: 10px; + padding-right: 10px; + padding-bottom: 10px; + padding-left: 10px; + background-color: rgba(0,0,0,255); + color: white; +} +button { + font-family: 'PT Sans Caption', sans-serif; + text-transform: uppercase; + padding-top: 10px; + padding-right: 30px; + padding-bottom: 10px; + padding-left: 30px; + cursor: pointer; +} + +.btn-group.error { + margin-left: auto; + margin-right: auto; + text-align: center; + margin-top: 2%; +} + +.btn-group.firmware { + margin-left: auto; + margin-right: auto; + text-align: center; +} + +.btn-group.console { + margin-left: auto; + margin-right: auto; + text-align: center; +} + +.btn-group.forced { + pointer-events: none; +} + +button.group{ + border: solid 2px; + border-color: white; + background-color: rgba(0,0,0,0); + color: white; + margin: 0; +} +button.group:hover { + background-color: #333333; +} + +button.group.selected{ + background-color: #FFFFFF; + color: black; +} + +button#download{ + margin-top: 2% +} + +button#download.active{ + background-color: #FFFFFF; + color: black; +} + +button#download{ + font-weight: 700; + color: white; + font-size: 1.2rem; + background-color: rgba(0,0,0,0); + border:solid 2px; + border-color: white; + letter-spacing: 1px; + margin-left: auto; + margin-right: auto; + display: flex; + justify-content: center; + width:280px; + text-align: center; + min-width: 200px; + height: 45px; +} + +.round { + border-radius: 2px; +} + +@media only screen and (max-width: 1024px) and (-webkit-min-device-pixel-ratio: 3) { + .logo img{ + margin-left: auto; + margin-right: auto; + width: 80%; + display: block; + padding-top: 4%; + } + + .text img { + margin-left: auto; + margin-right: auto; + width: 80%; + display: block; + padding-top: 5%; + } + + .graphics img{ + position:fixed; + bottom:0px; + margin-left: auto; + margin-right: auto; + width: 100%; + z-index: -99; + } + p { + font-size: 50px; + } + + button { + font-family: 'PT Sans Caption', sans-serif; + text-transform: uppercase; + font-size: 50px; + padding-top: 20px; + padding-right: 40px; + padding-bottom: 20px; + padding-left: 40px; + } + button.group{ + border: solid 5px; + border-color: white; + background-color: rgba(0,0,0,0); + color: white; + margin: 0; + } + div.downloads { + margin-top: 15% + } + + button#download{ + padding-top: 20px; + padding-right: 40px; + padding-bottom: 70px; + padding-left: 40px; + font-weight: 700; + color: white; + font-size: 50px; + background-color: rgba(0,0,0,0); + border:solid 5px; + border-color: white; + margin-left: 20%; + margin-right: 20%; + display: flex; + justify-content: center; + width:60%; + text-align: center; + } + button#download.active{ + background-color: #FFFFFF; + color: black; + } + button.donate { + margin-top: 30px; + font-weight: 700; + font-size: 50px; + word-spacing: 30px; + background-color: #FFFFFF; + text-align: center; + border:none; + letter-spacing: 1px; + margin-left: auto; + margin-right: auto; + display: flex; + justify-content: center; + width: 60%; + color: black; + } +} diff --git a/docs/frankenfirm.html b/docs/frankenfirm.html new file mode 100755 index 0000000..d5c4f56 --- /dev/null +++ b/docs/frankenfirm.html @@ -0,0 +1,168 @@ + + + + + + + SoundHax | Nintendo Hacking 2016-2020 + + + + + + + + + + + + + +

FRANKENFIRM/CARTUPDATED

+ soundhax text +
+ + +
+

+ Choose error from running normal soundhax:
+ Don't choose if you haven't tried yet +

+ + +
+
+

Input your full system version:

+ ..- +
+
+

Choose a console:

+ + +
+ + + +
+ + + bottom graphics + + + + + + diff --git a/docs/js/frankenfirm.js b/docs/js/frankenfirm.js new file mode 100755 index 0000000..9733315 --- /dev/null +++ b/docs/js/frankenfirm.js @@ -0,0 +1,268 @@ +/* http://stackoverflow.com/a/5077091 */ +String.prototype.format = function () { + var args = arguments; + return this.replace(/\{(\d+)\}/g, function (m, n) { return args[n]; }); +}; + +var ERR_INVALID_INPUT = 0; +var ERR_NOT_SUPPORTED = 1; +var ERR_USE_NORMAL_FIRST = 2; +var ERR_LIKELY_WRONG_NORMAL = 3; + +var ERRS_USE_NORMAL = [ERR_USE_NORMAL_FIRST, ERR_LIKELY_WRONG_NORMAL]; + +function checkDownloadable() { + var href = checkSelection(); + console.log("check result", href) + if (ERRS_USE_NORMAL.includes(href)) { + $('#download').text("Normal Soundhax"); + } else if (href === ERR_INVALID_INPUT) { + $('#download').text("Invalid Input"); + } else if (href === ERR_NOT_SUPPORTED) { + $('#download').text("Not Supported"); + } else { + $('#download').text("Download M4A"); + } + if (typeof href === "string" || ERRS_USE_NORMAL.includes(href)) { + $('#download').addClass('active'); + } else { + $('#download').removeClass('active'); + } +} + +$('button.group').on('click', function() { + if ($(this).parent().hasClass('forced')) { + return; + } + if ($(this).hasClass('selected')) { + $(this).removeClass('selected'); + } else { + $(this).siblings().removeClass('selected'); + $(this).addClass('selected'); + } + + checkDownloadable(); +}); + +$('select').on('change', function() { + checkDownloadable(); +}); + +function regionFN(region) { + switch (region) { + case "E": + return "eur"; + case "U": + return "usa"; + case "J": + return "jpn"; + case "K": + return "kor"; + case "C": + return "chn"; + case "T": + return "twn"; + } +} + +function updateConsoleSelector(region, show) { + if (["C", "T"].includes(region)) { + show = false; + } + if (show) { + $('.console').show(); + } else { + $('.console').hide(); + if (!$('.console').hasClass("forced")) { + $('.console').children().removeClass('selected'); + } + } +} + +function checkSelection() { + // Possible max minor for each major, major as key + var major_minor_map = { + 0: -1, // invalidate all 0.x + 1: 1, + 2: 2, + 3: 1, + 4: 5, + 5: 1, + 6: 4, + 7: 2, + 8: 1, + 9: 9, + 10: 7, + 11: 17 + }; + + var error = $('.error').children('.selected').attr('id'); + var console_ = $('.console').children('.selected').attr('id'); + var major = parseInt($('#major').val()); + var minor = parseInt($('#minor').val()); + var nver = parseInt($('#nver').val()); + var region = $('#region').val(); + + updateConsoleSelector(region, major >= 8); + + if (major == 11 && minor == 17 && ["K", "C", "T"].includes(region)) { + return ERR_INVALID_INPUT; + } + + var minor_max = major_minor_map[major]; + if (!isNaN(minor_max) && minor > minor_max) { + return ERR_INVALID_INPUT; + } + + if (console_ === "n3ds") { + return ERR_USE_NORMAL_FIRST; + } + + if (["K", "C", "T"].includes(region)) { + return ERR_USE_NORMAL_FIRST; + } + + switch (nver) { + case 0: + case 1: + case 2: + case 3: + console.log("nver 0-3") + if (major < 2 || (major == 2 && minor <= 1)) { + switch (error) { + case "unplayable": + // very unlikely to have v1027 sound app in this case? + return "soundhax-{0}-{1}.m4a".format(regionFN(region), "o3ds-pre2.1"); + case "crash": + return ERR_INVALID_INPUT; // WTF + default: + return ERR_USE_NORMAL_FIRST; + } + } else if (major < 5) { + switch (error) { + case "unplayable": + return "soundhax-{0}-{1}.m4a".format(regionFN(region), "o3ds-pre2.1"); + case "crash": + return "soundhax-{0}-{1}.m4a".format(regionFN(region), "o3ds-v2.1and2.2"); + default: + return ERR_USE_NORMAL_FIRST; + } + } else if (major < 11 || (major == 11 && minor <= 3)) { + switch (error) { + case "unplayable": + return "soundhax-{0}-{1}.m4a".format(regionFN(region), "o3ds-pre2.1-post5franken"); + case "crash": + return "soundhax-{0}-{1}.m4a".format(regionFN(region), "o3ds-v2.1and2.2-post5franken"); + default: + return ERR_USE_NORMAL_FIRST; + } + } else if ((major == 11 && minor > 3) || major > 11) { + return ERR_NOT_SUPPORTED; + } + case 4: + console.log("nver 4") + if (major < 2 || (major == 2 && minor < 1)) { + return ERR_INVALID_INPUT; // WTF + } else if (major == 2 && minor == 1) { + switch (error) { + case "unplayable": + return "soundhax-{0}-{1}.m4a".format(regionFN(region), "o3ds-v2.1and2.2"); + case "crash": + return ERR_INVALID_INPUT; // WTF + default: + return ERR_USE_NORMAL_FIRST; + } + } else if (major < 5) { + switch (error) { + case "unplayable": + return ERR_LIKELY_WRONG_NORMAL; + case "crash": + return "soundhax-{0}-{1}.m4a".format(regionFN(region), "o3ds-v2.1and2.2"); + default: + return ERR_USE_NORMAL_FIRST; + } + } else if (major < 11 || (major == 11 && minor <= 3)) { + switch (error) { + case "unplayable": + return ERR_LIKELY_WRONG_NORMAL; + case "crash": + return "soundhax-{0}-{1}.m4a".format(regionFN(region), "o3ds-v2.1and2.2-post5franken"); + default: + return ERR_USE_NORMAL_FIRST; + } + } else if ((major == 11 && minor > 3) || major > 11) { + return ERR_NOT_SUPPORTED; + } + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + console.log("nver 5-10"); + if (major < 5) { + switch (error) { + case "unplayable": + case "crash": + return ERR_LIKELY_WRONG_NORMAL; + default: + return ERR_USE_NORMAL_FIRST; + } + } else if (major < 11 || (major == 11 && minor <= 3)) { + switch (error) { + case "unplayable": + case "crash": + return ERR_LIKELY_WRONG_NORMAL; + default: + return ERR_USE_NORMAL_FIRST; + } + } else if ((major == 11 && minor > 3) || major > 11) { + return ERR_NOT_SUPPORTED; + } + default: + if (nver < 37) { + console.log("nver 11-36"); + switch (error) { + case "unplayable": + case "crash": + return ERR_NOT_SUPPORTED; + default: + return "soundhax-{0}-{1}.m4a".format(regionFN(region), "o3ds-post5.0"); + } + } else { + console.log("nver 37+"); + return ERR_NOT_SUPPORTED; + } + } +} +checkDownloadable(); + +$('#download').on('click', function() { + if (!$(this).hasClass('active')) { + return; + } + + var href = checkSelection(); + if (ERRS_USE_NORMAL.includes(href)) { + if (href === ERR_LIKELY_WRONG_NORMAL) { + alert("You likely chosed wrong file previously in normal soundhax, make sure you select it correctly and try again."); + } + //window.location.href = "index.html"; + window.location.href = "http://soundhax.com"; + } else if (typeof href === "string") { + var base = "https://github.com/danny8376/soundhax/raw/frankenfirmware/"; + window.location.href = base + href; + } +}); + +function forceOptionSelected(id) { + $('#' + id).trigger("click"); + $('#' + id).parent().addClass("forced"); + //$('#' + id).parent().hide(); +} + +$.each(["unplayable", "crash"], function(idx, opt) { + if (location.search.includes(opt)) { + forceOptionSelected(opt); + } +}); From ef1edfae937aa9e1216b76afcd298ed47c5d7deb Mon Sep 17 00:00:00 2001 From: DannyAAM Date: Sun, 20 Aug 2023 05:46:46 +0800 Subject: [PATCH 3/3] proper title --- docs/frankenfirm.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/frankenfirm.html b/docs/frankenfirm.html index d5c4f56..7530623 100755 --- a/docs/frankenfirm.html +++ b/docs/frankenfirm.html @@ -4,7 +4,7 @@ - SoundHax | Nintendo Hacking 2016-2020 + SoundHax - Frankenfirm | Nintendo Hacking 2016-2020