Hacking WIP [Trinket] [Rebug] [Others] SWITCHBOOT_UF2 / FUSEE_UF2 modchip software

mattytrog

You don`t want to listen to anything I say.
OP
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
Mount usb sd card - will that allow me to copy games (xci) directly from my pc to sd card, without sd card removal? I hope so :-)
Yes. It will. You will need the uboot folder (with elf and scr files though). However, can generate most files. But that will come later.
 
  • Like
Reactions: mrdude

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
Yes. It will. You will need the uboot folder (with elf and scr files though). However, can generate most files. But that will come later.

Nice, I'll 'borrow' that code for the Argonnx-mod I'm doing, I'm starting to replace the text with icons - so I'll make a usb icon as well. I've only started - but here's a screenshot with some quickly made icons.
yEHh1Ln.jpg


I've made it so if the icons folder is not present - it will revert to text :-)
 
Last edited by mrdude,

mattytrog

You don`t want to listen to anything I say.
OP
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
So how does a 7.0.x/Sept user update their chip, what is the switchboot.bin all about?
It's modified hekate. With some additional features. Think of it as hekate for modchips.

Update the chip with uf2. The bin version is just a generic version so people can test/use it.
 

Hayato213

Newcomer
Member
Joined
Dec 26, 2015
Messages
19,920
Trophies
1
XP
20,890
Country
United States
It's modified hekate. With some additional features. Think of it as hekate for modchips.

Update the chip with uf2. The bin version is just a generic version so people can test/use it.

For me currently I have one of my mod chip switches on 7.0.1 and I do have a 6.2.0 nand backup, I was looking for way to update the uf2 in the chip, like what you mentioned before sept/7.0.1 currently breaks trinketboot access on 7.0.x, and I been using the most updated simple uf2. What I really wanted to know is how does someone update their mod chip uf2 if they are on this higher firmware?
 

mattytrog

You don`t want to listen to anything I say.
OP
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
For me currently I have one of my mod chip switches on 7.0.1 and I do have a 6.2.0 nand backup, I was looking for way to update the uf2 in the chip, like what you mentioned before sept/7.0.1 currently breaks trinketboot access on 7.0.x, and I been using the most updated simple uf2. What I really wanted to know is how does someone update their mod chip uf2 if they are on this higher firmware?
In Switchboot. In the new version there is an option to place the chip in UF2 update mode and access it.

In the OP, in FAQ, it tells you how to access Switchboot / Trinketboot another way.
 
  • Like
Reactions: Hayato213

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
@mattytrog hey man do you know if the switchme rebug chip has any driver, I can't get it to pick up by two of my computers?

No the rebug uses a samd21 chip, it doesn't need any drivers as long as it's been programmed with the correct bootloader (which it will have been done before you got it). You just need to press the reset switch twice within 2 seconds - or ground the reset pad twice within 2 seconds and it should show up on your computer.
 

Hayato213

Newcomer
Member
Joined
Dec 26, 2015
Messages
19,920
Trophies
1
XP
20,890
Country
United States
No the rebug uses a samd21 chip, it doesn't need any drivers as long as it's been programmed with the correct bootloader (which it will have been done before you got it). You just need to press the reset switch twice within 2 seconds - or ground the reset pad twice within 2 seconds and it should show up on your computer.

The weird thing is I can't get the two of my computer to recognize it, I bought it off someone else when I get to it connect to my computer it tells me it is an unrecognized device with the triangle error.
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
The weird thing is I can't get the two of my computer to recognize it, I bought it off someone else when I get to it connect to my computer it tells me it is an unrecognized device with the triangle error.

On your computer, go to control panel/device manager - It should be showing up as a com port, if not it will show up as unknown device - just uninstall the drivers from it, uninstall device - then reboot your computer. It's most likely a pc issue on your end - or a dodgy usb cable.
 

Hayato213

Newcomer
Member
Joined
Dec 26, 2015
Messages
19,920
Trophies
1
XP
20,890
Country
United States
On your computer, go to control panel/device manager - It should be showing up as a com port, if not it will show up as unknown device - just uninstall the drivers from it, uninstall device - then reboot your computer. It's most likely a pc issue on your end - or a dodgy usb cable.

Try that already, already tried that with multiple cables, I'm not sure what up with it, I get the Unknown USB Device (Device Descriptor Request Failed) error. Even though the chip work fine, there is a uf2 file on it already, I don't mind too much I can always chain load it to another version of Hekate for higher firmware than 7.0.x.
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
Try that already, already tried that with multiple cables, I'm not sure what up with it, I get the Unknown USB Device (Device Descriptor Request Failed) error. Even though the chip work fine, there is a uf2 file on it already, I don't mind too much I can always chain load it to another version of Hekate for higher firmware than 7.0.x.

Maybe you have badly soldered D+ D- or ground points then.
 

metaljay

Well-Known Member
Member
Joined
Jan 10, 2012
Messages
466
Trophies
1
XP
1,900
Country
its my switch, so its not a bad GND connection. i tested it before i shipped it and it works.
Hayato, any chance you can test this on a mac? also what USB C cable are you using? I used the one that came with the pro controller as has the right resistor. Make sure you have booted into horizon, double press the button and then plug the cable in. if it doesn't detect it then leave cable plugged in and keep trying pressing the button twice but at different speeds

--------------------- MERGED ---------------------------

Try that already, already tried that with multiple cables, I'm not sure what up with it, I get the Unknown USB Device (Device Descriptor Request Failed) error. Even though the chip work fine, there is a uf2 file on it already, I don't mind too much I can always chain load it to another version of Hekate for higher firmware than 7.0.x.
keep in mind, the uf2 on the switchme is just searching for 'payload.bin' on the root of your SD. so you can always have the latest hekate just but over writing this file. the UF2 is a backup for example if you boot without an SD card
 
  • Like
Reactions: Hayato213

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
@mattytrog,

Hi I have a programming question. In Arduino we have a main void (loop) where code is continuously executed. In the switch I see most payloads have a main.c file with this: void ipl_main()
Is that the main loop - the same which is comparable to the Arduino main void?

The reason I ask is that I have a function that prints battery percentage in argonnx-mod:
Code:
    u32 battPercent = 0; 
        max17050_get_property(MAX17050_RepSOC, (int *)&battPercent);
        gfx_con_init(&g_gfx_con, &g_gfx_ctxt);
        g_gfx_con.scale = 2;
        gfx_con_setpos(&g_gfx_con, 10, 10);
        gfx_printf(&g_gfx_con, "%kBattery:%d.%d%% %k", colour_red, (battPercent >> 8) & 0xFF, (battPercent & 0xFF) / 26, 0xFFCCCCCC); //use %% to show percentage

I know how to execute this code and where to place it to show on the menu during run time (so when you touch the screen it updates), but I am trying to find where to put that code so it's constantly being called and updating with new values. I tried using a timer function - but this code also needs to be running continuously - but buggered if I know where to put it, I tried in main.c ipl_main but couldn't get it to work. If I give you my mod files can you have a look for me?
 

mattytrog

You don`t want to listen to anything I say.
OP
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
Yes sure. However, it uses cycles just to update the battery. What poll time are you thinking? 1 second? 5 seconds?

Do something similar to hekate. Call it at the start of every function with a force update bool or something.
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
Yes sure. However, it uses cycles just to update the battery. What poll time are you thinking? 1 second? 5 seconds?

Do something similar to hekate. Call it at the start of every function with a force update bool or something.

Just every 5 seconds will do, I'll pm you the files in about 5 minutes or so. Thanks

EDIT: PM Sent.
 
Last edited by mrdude,

popy

Well-Known Member
Member
Joined
Jul 31, 2018
Messages
255
Trophies
0
Age
39
XP
1,283
Country
Austria
v1.2.2 online

Thanks for this wonderfull update.
Especially the SAMD Update feature is great for us 7.X.X users.
Working really good here.

Sadly, i can find the SXOSSXOS... string in the UF2, so cant insert my SXOS License.
Maybe i am blind but i cant find the correct offset to put my license.

Can you please look into it?

thx
pOpY
 

Gismor

Well-Known Member
Member
Joined
Nov 12, 2018
Messages
119
Trophies
0
Age
39
XP
631
Country
Germany
Thanks for this wonderfull update.
Especially the SAMD Update feature is great for us 7.X.X users.
Working really good here.

Sadly, i can find the SXOSSXOS... string in the UF2, so cant insert my SXOS License.
Maybe i am blind but i cant find the correct offset to put my license.

Can you please look into it?

thx
pOpY
found it :D

line 0005C8D0 ist starting ;)
 
  • Like
Reactions: popy

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: The cybertruck is a death trap.