Hacking Hardware Picofly - a HWFLY switch modchip

impeeza

¡Kabito!
Member
Joined
Apr 5, 2011
Messages
6,350
Trophies
3
Age
46
Location
At my chair.
XP
18,671
Country
Colombia
That might actually be a way the FPGA might look for a trigger. Count how many bytes have been read from the emmc after booting up -> is it the size of the BCT? -> perform glitch using the given parameters

Related to this: https://gbatemp.net/threads/pikofly-a-probably-fake-hwfly-modchips-or-not.622701/post-10062170

As @doom95 has already said, there are 4 BCT slots. HWFLY-NX overrides the first two, the last two get the original BCTs

The Tegra tries to read the first, if it fails then the second, etc. until it can boot. If all 4 fail it goes into RCM AFAIK.

On a side note, I read a bit of the MMC standard documentation and it looks relatively easy to understand. As I can't find MMC cards on Amazon (only SD cards) and SD cards are basically successors to MMC cards, does anybody know if I can read SD cards in some sort of "MMC mode"?

View attachment 350682
E.g. can I just connect only DAT0 (MMC cards only have one DAT line), Vss2, CLK, Vcc, Vss1, CMD and CAT3 and talk to the SDC with MMC commands?
yeah, is called 1 bit mode.
 
  • Like
Reactions: FruithatMods
Joined
Sep 9, 2019
Messages
904
Trophies
1
Location
Switch scene
Website
github.com
XP
2,663
Country
Korea, North
I actually wanted to test MMC communication with regular SD/MMC cards so that I don't accidentally bust my Switch eMMC lmao

Also, do you know why HWFLY only uses DAT0 while the eMMC has more data lines available? I thought that the SoC communicates with all lines?
No idea. I guess it just isn't needed and if it isn't needed why add it? Just adds more potential for failure if a wire comes loose. DAT0 lines are finicky enough already on OLED models because the wire is so long. It's susceptible to noise.
 
  • Like
Reactions: FruithatMods

Piorjade

Well-Known Member
Member
Joined
Nov 8, 2015
Messages
142
Trophies
0
XP
407
Country
Gambia, The
No idea. I guess it just isn't needed and if it isn't needed why add it? Just adds more potential for failure if a wire comes loose. DAT0 lines are finicky enough already on OLED models because the wire is so long. It's susceptible to noise.
Just wondering, eMMC can communicate with just DAT0 too, it's just that the Tegra probably does with all four lines, which is why I'm wondering how the hwfly can still read/write to eMMC with just the first line simultaneously.

Also now I'm wondering if the HWFLY stops the Tegra from booting up until it says so because otherwise the payload and BCT flashing process would interfere with the Tegra trying to load everything :huh:

If yes then using only DAT0 makes sense: the eMMC is in 1-bit mode on bootup (I guess), the HWFLY flashes its things, then the HWFLY gives power to the Tegra and then the Tegra switches to 4-bit mode.
 

evil_santa

Well-Known Member
Member
Joined
Jan 15, 2020
Messages
379
Trophies
1
Age
39
XP
1,839
Country
Germany
If yes then using only DAT0 makes sense: the eMMC is in 1-bit mode on bootup (I guess), the HWFLY flashes its things, then the HWFLY gives power to the Tegra and then the Tegra switches to 4-bit mode.
Emmc init is Always in 1-bit mode, after the security checks the tegra switched to full speed HS400 mode (8 dat line's)
 

Attachments

  • Screenshot_20230202-193448-025.png
    Screenshot_20230202-193448-025.png
    289.3 KB · Views: 34

FruithatMods

Well-Known Member
Member
Joined
Dec 16, 2018
Messages
128
Trophies
0
Age
34
XP
450
Country
Germany
Just wondering, eMMC can communicate with just DAT0 too, it's just that the Tegra probably does with all four lines, which is why I'm wondering how the hwfly can still read/write to eMMC with just the first line simultaneously.

Also now I'm wondering if the HWFLY stops the Tegra from booting up until it says so because otherwise the payload and BCT flashing process would interfere with the Tegra trying to load everything :huh:

If yes then using only DAT0 makes sense: the eMMC is in 1-bit mode on bootup (I guess), the HWFLY flashes its things, then the HWFLY gives power to the Tegra and then the Tegra switches to 4-bit mode.
This is why we need to hook up a logic analyser. HWfly is connected in 1 bit mode.

You can't have two controllers talking to a single emmc chip at the same time. I would assume the HWFly powers the reset line while it is writing and reading form the emmc to disable the CPU.
It doesn't matter what bit mode our controller uses. This doesn't affect the code or hardware in any shape or form.
 
  • Like
Reactions: overcode

FruithatMods

Well-Known Member
Member
Joined
Dec 16, 2018
Messages
128
Trophies
0
Age
34
XP
450
Country
Germany
Fpga crashes the bootrom to get exclusive access on the emmc bus by blocking the CMD line for a while.
Are you talking about the internal bootrom of the cpu?

Why wouldn't it just hold the reset line? Wouldn't that be much simpler?
Post automatically merged:

Also, how do you know this? :)
Post automatically merged:

P.P.S. I think I purchased about 10-20 dat0 adapters from you over eBay last year! :)
I don't remember who it was from but it came from the Netherlands The adapters were taped to the inside of the white envelope. Thank you for those adapters if you were the seller! :)
 
Last edited by FruithatMods,
  • Like
Reactions: impeeza

evil_santa

Well-Known Member
Member
Joined
Jan 15, 2020
Messages
379
Trophies
1
Age
39
XP
1,839
Country
Germany
Why wouldn't it just hold the reset line? Wouldn't that be much simpler?
We have no acces to the reset line.
And it's not needed.
Ground CMD, CLK or Dat0 and SOC has no access to the emmc and goes do RCM.
Chip can write payload.
=> Done
Reset soc whit =>
Start fancy glitch power.
Right @doom95 ?
 

FruithatMods

Well-Known Member
Member
Joined
Dec 16, 2018
Messages
128
Trophies
0
Age
34
XP
450
Country
Germany
What is a
you need the reset line of the CPU, you achieve that with the condensers of the SOC.
What is a condenser?
Post automatically merged:

Was reading through the encrypted binary in hxd (dont know how to decrypt) and saw this

"System clock of %u kHz cannot be exactly achieved"
That doesn't sound very encrypted!
 

impeeza

¡Kabito!
Member
Joined
Apr 5, 2011
Messages
6,350
Trophies
3
Age
46
Location
At my chair.
XP
18,671
Country
Colombia
What is a

What is a condenser?
Post automatically merged:


That doesn't sound very encrypted!
Yes, you are right condenser and capacitor are synonyms, but in USA is more often used the word "capacitor".

in Latin American Spanish we use a lot of "Condensador" which have "Capacitancia" as his measurement! yeah a riddle. :rofl2:
 
  • Like
Reactions: FruithatMods

Piorjade

Well-Known Member
Member
Joined
Nov 8, 2015
Messages
142
Trophies
0
XP
407
Country
Gambia, The
Does anybody have info about what SP1 and SP2 actually are for? I know they're capacitors but idk what they do/control.

EDIT: Or rather, what lines they control.
Post automatically merged:

One of them has to be the supply voltage for the BPMP, but the other one?
 
Last edited by Piorjade,

vittorio

Well-Known Member
Member
Joined
May 12, 2014
Messages
243
Trophies
0
Age
26
XP
960
Country
Italy
Sp1 it should protect the system from incoming voltage spikes,Sp2I believe it ensures the regulation of the current when turning on the console
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: I'm in my birthday suit! Lol