Hacking DEAD [Shutdown]DragonInjector - Game Cart Payload Injector (Trinket M0 Clone)

Status
Not open for further replies.

MatinatorX

Hardware Developer
OP
Developer
Joined
Jul 17, 2018
Messages
366
Trophies
1
Website
www.dragoninjector.com
XP
2,538
Country
Canada
Hey all, just thought I'd give a quick update on the project. :)

First, there's been a change to the boards that I managed to incorporate last week before PCBWay started manufacturing. The boards are being made right now and the change hasn't caused any delays. Release is still schedule for late August. :P

Anyways, since the awesome chainloader Stuck made is pretty much done, I started writing the code for the payload switching button and other firmware stuff. In doing so, I discovered that I'd hooked up the payload button incorrectly - turns out the manufacturers sneakily rotated the schematic view but not the footprint in the datasheet, and I completely missed it. While this would have been an easy fix, I'd actually already been working on a change to replace the physical button with a capacitive one. The main reason for this is that, in testing, we found that the kapton tape on the button comes off pretty easily after a while. There's a good chance that was just due to the hot air rework I did on the beta units, but it was still making me a bit worried. So, as long as I was making a change to the board anyways, I decided to just go with the capacitive button. I rigged up a touch sensor to match the one on the PCB, did a bunch of testing, and found that it felt far better than the physical button did. It was bigger and easier to press, and easier to program for. It could be covered with conformal coating, wouldn't ever wear out and was one less thing to solder.

So, there's that. Picture of how it will look is attached.

Another few small changes that have been made are to the case. The M1 self-tapping screws made it a bit too easy to strip the holes in the resin after a few removals, so that's been swapped with M1 machine screws and press fit nuts that won't strip. Secondly, the beta testers really liked how the RCM jig snapped into the cap, and wanted the cap itself to snap onto the main body instead of just being a friction fit. So, I did that too. It took a few days to get right but now it closes with a nice little snik, just like the RCM jig.

So, there's that, too. They're small changes but they should make a huge difference in the build quality feel and longetivity.

Oh, also, for no good reason we're making a program that makes it ridiculously easy to update the DI. It was already easy, but a script we were using just kept getting more complicated and... well, screenshot attached. The long and short of it is, it will check what firmware version you have on your DragonInjector, check what the latest version is on the GitHub, and update it in one click. It started out as a quick way for me to batch program DIs and now it's... something else. Hopefully something useful.

Lastly, and this is a big one, I'm switching from Tindie to Shopify + Fulfilrite. I've been thinking about this for a long time, weighing the pros and cons, then realizing the cons just amount to me having to learn a bunch of stuff I didn't know and seemed beyond me. Turns out, it's actually not that hard. The change is already under way. I will of course still let everyone on the Tindie wishlist know when it's available, so don't worry. It's just that as a platform, this project has kind of outgrown Tindie, which is crazy for something that hasn't actually shipped yet. :blink:

The main reason for this change is demand. The second reason is shipping costs for buyers. I had no idea so many people would be interested in the DragonInjector. For a hundred units or two, mailing these out myself is didn't seem like a huge deal. For the 1500 units currently on the waitlist? Nope. Not happening. I can't afford to spend two weeks packing and mailing DragonInjectors. My fingers can't handle two weeks of packing and writing out addresses. I like to think I'm decent at being organized and handling stress, but it was becoming apparent that this would be a task that was just beyond me. Tindie does not offer shipping label generation, discounts, fulfillment of any kind, or really any shipping services of any use. (And if that didn't put you off, they also take a nice fat 5% of your profits on top of the 3% payment charge, while offering little to no after sales support solutions, limited payment options for customers, and no real store customization.) This also means that shipping costs were, in my opinion, completely insane. For most places, I was looking at over $20 USD for basic shipping within North America, with overseas topping over $30. Ouch. When I started using Tindie I really didn't know about any of this stuff. I was just looking for a quick, easy way to share my project with others. Now I know there are far better options.

Shopify and Fulfilrite give me all of the things Tindie lacks, and make my life easier. (By the way, there are actually a bunch of great options for eCommerce and fulfillment, these are just the ones that made the most sense to me as a Canuck.) I ship them a big box of DragonInjectors and then they pack, label and ship them out individually for me as orders come in, without me having to really do anything. The deals they've made with couriers put their rates at a third of the shipping cost of any local courier here. I couldn't find anywhere they charge more than $9 USD for 4-9 day shipping, and that even includes tracking. I spoke with them over the phone and they were absolutely great to deal with. The guy from Shopify was super chill and even knew what a payload injector was. He bookmarked my site. Tindie doesn't even have a phone number.

Anyways, that's enough ranting about that. The bottom line is, once shipping starts everyone will get their stuff cheaper and faster than they would have before.

If you want to check out the new site there's a link in my sig, though be aware it's still a work in progress. It's a store (with nothing for sale right now), but also a blog where I'm going to write about future projects but also about all the things I've learned in the last year. If there's some aspect of 3D printing, rendering, beginner eCommerce, PCB design or fabricating, UX design, etc. that you really want to know about then let me know and I'll try to write something useful about it. If it's helpful and game related in any way of course it will end up here too. :P

Thanks for sticking around for this crazy project!
 

Attachments

  • Capacitive_Button.png
    Capacitive_Button.png
    52.1 KB · Views: 190
  • Firmware_Tool.png
    Firmware_Tool.png
    356 KB · Views: 190
Last edited by MatinatorX,

MatinatorX

Hardware Developer
OP
Developer
Joined
Jul 17, 2018
Messages
366
Trophies
1
Website
www.dragoninjector.com
XP
2,538
Country
Canada
Is there a target release year?

From my previous post:

"First, there's been a change to the boards that I managed to incorporate last week before PCBWay started manufacturing. The boards are being made right now and the change hasn't caused any delays. Release is still schedule for late August."
 
  • Like
Reactions: CameronCataclysm

MatinatorX

Hardware Developer
OP
Developer
Joined
Jul 17, 2018
Messages
366
Trophies
1
Website
www.dragoninjector.com
XP
2,538
Country
Canada
V19 (production board) images from PCBWay attached. They assure me the order for 600 will ship within a week.

We're on the home stretch! :lol:

In other news, I am currently developing a dual eMMC module with physical selector switch. If everything works out, there might be a hardware alternative to emuNAND soon. ;)
 

Attachments

  • 2.JPG
    2.JPG
    411.3 KB · Views: 162
  • 1.JPG
    1.JPG
    441 KB · Views: 134

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,076
Trophies
1
Age
56
XP
8,192
V19 (production board) images from PCBWay attached. They assure me the order for 600 will ship within a week.

We're on the home stretch! :lol:

In other news, I am currently developing a dual eMMC module with physical selector switch. If everything works out, there might be a hardware alternative to emuNAND soon. ;)

If you have your switch chipped with a trinket etc, you can mod the code in that to switch between nands - no need to add a selector switch as it can be done with code.
 

MatinatorX

Hardware Developer
OP
Developer
Joined
Jul 17, 2018
Messages
366
Trophies
1
Website
www.dragoninjector.com
XP
2,538
Country
Canada
If you have your switch chipped with a trinket etc, you can mod the code in that to switch between nands - no need to add a selector switch as it can be done with code.

It's a cool idea, but we can't switch the NAND unless the console is completely off, so the modchip would have to always be on, which would drain the battery. To do while the console was on, we would also have to interrupt boot before the NAND is read every single time without fail, which means AutoRCM, which is possible to detect. Otherwise, the Switch will immediately try to access NAND, and then it's too late to switch it.

What we want to do is, develop a tool that will clone a safe OEM emmc to an identical emmc on the dual board, then clone it again to the second emmc on the dual board (likely 256gb) and then immediately blank prodinfo etc on that second emmc to anonymize it.

Then, we would use a special payload which checks the NAND size. If it's 32gb, booting CFW is blocked to keep your clean emmc safe. If it's the 256gb anonymized emmc, it'll boot your CFW no problem.

As long as you keep anything questionable off of your MicroSD, this should in theory be a foolproof solution to using both CFW and having a clean NAND.
 
Last edited by MatinatorX,
  • Like
Reactions: CameronCataclysm

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,076
Trophies
1
Age
56
XP
8,192
You can set the chip to deepsleep once it runs code, so it's only on for about 2 seconds, so no need to worry about the battery drain. Chip only needs to send rcm code when booting the extra nand - which can be detected by setting pin states, code for putting the chip to sleep is like this:

Code:
  USBDevice.detach();
  USB->DEVICE.CTRLA.bit.ENABLE = 0;
  USB->DEVICE.CTRLA.bit.RUNSTDBY = 0;
  SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; /* Enable deepsleep */
  __DSB(); /* Ensure effect of last store takes effect */
  __WFI(); /* Enter sleep mode */

To reset the chip (so it runs code again), switch is turned off - V+ point loses power (so does chip), or you can connect a wire from the power button to the reset pin on the chip.

Modchip can have a wire connected to V- or some other button so when you hold while booting the switch - the state is sent to the chip - and the chip can read that state to set a pin high or low (and act as a switch for nand switching). You should speak to MattyTrog for advice on this - it's feasible.

Prodinfo can already be modded by tools already available. Also autorcm is not needed if you are using a modchip. (wire is connected to the modchip and is detected by holding v+ during bootup).
 
Last edited by mrdude,

MatinatorX

Hardware Developer
OP
Developer
Joined
Jul 17, 2018
Messages
366
Trophies
1
Website
www.dragoninjector.com
XP
2,538
Country
Canada
You can set the chip to deepsleep once it runs code, so it's only on for about 2 seconds, so no need to worry about the battery drain. Chip only needs to send rcm code when booting the extra nand - which can be detected by setting pin states, code for putting the chip to sleep is like this:

Code:
  USBDevice.detach();
  USB->DEVICE.CTRLA.bit.ENABLE = 0;
  USB->DEVICE.CTRLA.bit.RUNSTDBY = 0;
  SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; /* Enable deepsleep */
  __DSB(); /* Ensure effect of last store takes effect */
  __WFI(); /* Enter sleep mode */

To reset the chip (so it runs code again), switch is turned off - V+ point loses power (so does chip), or you can connect a wire from the power button to the reset pin on the chip.

Modchip can have a wire connected to V- or some other button so when you hold while booting the switch - the state is sent to the chip - and the chip can read that state to set a pin high or low (and act as a switch for nand switching). You should speak to MattyTrog for advice on this - it's feasible.

Prodinfo can already be modded by tools already available. Also autorcm is not needed if you are using a modchip. (wire is connected to the modchip and is detected by holding v+ during bootup).

I do get where you're coming from, but a complicated solution like that is not really a road I want to persue. Just because it's a solution you or I would have no trouble setting up doesn't mean it's easy for everyone. Internal modchip installation is unfortunately beyond the skills of most users. The goal of my projects is to keep things simple, reliable and accessible - the things that draw people to use products like SX OS. I want to prove that the open source alternative don't have to be complicated, and can in fact be easy to set up and use for everyone.

Now, with that said, I absolutely understand there are users who would want to take the risk anyways, have the skills to set it up, and prefer something more automated. So, what I will do is break out the needed pins to easily solderable pads on the NAND board, so that anyone who does want to attempt the above can have an easier time of it.

I'm sure if the ever-skilled MattyTrog got their hands on a dual NAND module, support for it would pop up in their firmware. (And if you're reading this @mattytrog , I'll finally have a DragonInjector to send you soon. Only took me a year to finish it! ;))

Anyways, supposing I did go that route, no matter how you swing it extra components would be needed for automated NAND switching. I see two feasible scenarios:

1) A latch IC. In this case, the modchip would have no idea which chip was actually selected unless extra wires were run to the modchip inputs to sense if the right NAND was powered. This would be a requirement to prevent the modchip and latch from getting out of sync.

2) Transistors. This would mean the modchip would have to be active the entire time the console was on depending on which NAND was selected, to keep the transistor base saturated.

To me, swapping emmc chips is not like entering RCM mode. There are very real consequences of data corruption if anything at all goes wrong. I really, really don't like the idea of using digital switching to choose the emmc, as the chances something can go wrong shoot up dramatically. Using a physical switch makes things super simple and ensures that anything that goes wrong is 100% user error. In my day job as an HVAC automation technician I've learned over the years that software is no substitute for hardware when it comes to reliability. With something as sensitive as NAND swapping, I want to focus on reliability as much as possible.

Also, as long as we're sharing code snippets, here's one I wrote recently that reboots a modchip into the UF2 bootloader from user code when called:

Code:
#define DBL_TAP_MAGIC 0xf01669ef
#define DBL_TAP_PTR ((volatile uint32_t *)(HMCRAMC0_ADDR + HMCRAMC0_SIZE - 4))

void resetToBootloader() {
  *DBL_TAP_PTR = DBL_TAP_MAGIC;
  NVIC_SystemReset();
}
 

mattytrog

You don`t want to listen to anything I say.
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
I do get where you're coming from, but a complicated solution like that is not really a road I want to persue. Just because it's a solution you or I would have no trouble setting up doesn't mean it's easy for everyone. Internal modchip installation is unfortunately beyond the skills of most users. The goal of my projects is to keep things simple, reliable and accessible - the things that draw people to use products like SX OS. I want to prove that the open source alternative don't have to be complicated, and can in fact be easy to set up and use for everyone.

Now, with that said, I absolutely understand there are users who would want to take the risk anyways, have the skills to set it up, and prefer something more automated. So, what I will do is break out the needed pins to easily solderable pads on the NAND board, so that anyone who does want to attempt the above can have an easier time of it.

I'm sure if the ever-skilled MattyTrog got their hands on a dual NAND module, support for it would pop up in their firmware. (And if you're reading this @mattytrog , I'll finally have a DragonInjector to send you soon. Only took me a year to finish it! ;))

Anyways, supposing I did go that route, no matter how you swing it extra components would be needed for automated NAND switching. I see two feasible scenarios:

1) A latch IC. In this case, the modchip would have no idea which chip was actually selected unless extra wires were run to the modchip inputs to sense if the right NAND was powered. This would be a requirement to prevent the modchip and latch from getting out of sync.

2) Transistors. This would mean the modchip would have to be active the entire time the console was on depending on which NAND was selected, to keep the transistor base saturated.

To me, swapping emmc chips is not like entering RCM mode. There are very real consequences of data corruption if anything at all goes wrong. I really, really don't like the idea of using digital switching to choose the emmc, as the chances something can go wrong shoot up dramatically. Using a physical switch makes things super simple and ensures that anything that goes wrong is 100% user error. In my day job as an HVAC automation technician I've learned over the years that software is no substitute for hardware when it comes to reliability. With something as sensitive as NAND swapping, I want to focus on reliability as much as possible.

Also, as long as we're sharing code snippets, here's one I wrote recently that reboots a modchip into the UF2 bootloader from user code when called:

Code:
#define DBL_TAP_MAGIC 0xf01669ef
#define DBL_TAP_PTR ((volatile uint32_t *)(HMCRAMC0_ADDR + HMCRAMC0_SIZE - 4))

void resetToBootloader() {
  *DBL_TAP_PTR = DBL_TAP_MAGIC;
  NVIC_SystemReset();
}
No worries sir! I just hope I can further assist by correcting bugs in software or whatever.

Please keep me posted!

The progress you have made on this project is fantastic.

Cheers
M

:)
 
  • Like
Reactions: DayVeeBoi

MatinatorX

Hardware Developer
OP
Developer
Joined
Jul 17, 2018
Messages
366
Trophies
1
Website
www.dragoninjector.com
XP
2,538
Country
Canada
No worries sir! I just hope I can further assist by correcting bugs in software or whatever.

Please keep me posted!

The progress you have made on this project is fantastic.

Cheers
M

:)

Thanks, really appreciate that! Most things are under control, I got the user code part of firmware almost done and the bootloader works great for the most part. About the only thing I'm struggling with right now is getting BOSSA part of bootloader working with Arduino IDE and the ATSAMD21E16C for easy firmware devving. I managed to get a BOSSA fork to flash it finally but the user code never actually runs and the IDE throws some weird errors. Identical bootloader works great on Trinket M0 so it's definitely a stack issue or BOSSA is still trying to write to 0x20005000 which doesn't exist. I don't suppose you're an expert on BOSSA?

Also, I'm sure there will be people who are interested in running your firmware on the DragonInjector, are you interested in supporting it? I could share the I/O details if you'd like!
 

mattytrog

You don`t want to listen to anything I say.
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
Thanks, really appreciate that! Most things are under control, I got the user code part of firmware almost done and the bootloader works great for the most part. About the only thing I'm struggling with right now is getting BOSSA part of bootloader working with Arduino IDE and the ATSAMD21E16C for easy firmware devving. I managed to get a BOSSA fork to flash it finally but the user code never actually runs and the IDE throws some weird errors. Identical bootloader works great on Trinket M0 so it's definitely a stack issue or BOSSA is still trying to write to 0x20005000 which doesn't exist. I don't suppose you're an expert on BOSSA?

Also, I'm sure there will be people who are interested in running your firmware on the DragonInjector, are you interested in supporting it? I could share the I/O details if you'd like!
Check my git.

I have supported it for ages. However obviously I'm unable to test, but it works well on my breadboard model
 

MatinatorX

Hardware Developer
OP
Developer
Joined
Jul 17, 2018
Messages
366
Trophies
1
Website
www.dragoninjector.com
XP
2,538
Country
Canada
Check my git.

I have supported it for ages. However obviously I'm unable to test, but it works well on my breadboard model

The memories are flooding back, I remember now. Time, it does things. :blink:

Anyways, PCBWay is sending me 600 of them next week, and you'll be one of the first to get one. Couple of changes made for the production boards, including a capacitive button instead of a physical one, which means using the FreeTouch library, which turned out to be surprisingly easy. The big one is the shift to the ATSAMD21E16C, which is WLCSP-35 package, 64K flash and 8k ram. It's been a challenge getting everything to fit, thankfully Stuck is a code god and had helped tremendously. I think you might like some of the things we've come up with! ^_^
 
Last edited by MatinatorX,

mattytrog

You don`t want to listen to anything I say.
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
The memories are flooding back, I remember now. Time, it does things. :blink:

Anyways, PCBWay is sending me 600 of them next week, and you'll be one of the first to get one. Couple of changes made for the production boards, including a capacitive button instead of a physical one, which means using the FreeTouch library, which turned out to be surprisingly easy. The big one is the shift to the ATSAMD21E16C, which is WLCSP-35 package, 64K flash and 8k ram. It's been a challenge getting everything to fit, thankfully Stuck is a code god and had helped tremendously. I think you might like some of the things we've come up with! ^_^

I'll certainly take a look!

Brilliant stuff.

:)
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,076
Trophies
1
Age
56
XP
8,192
The memories are flooding back, I remember now. Time, it does things. :blink:

Anyways, PCBWay is sending me 600 of them next week, and you'll be one of the first to get one. Couple of changes made for the production boards, including a capacitive button instead of a physical one, which means using the FreeTouch library, which turned out to be surprisingly easy. The big one is the shift to the ATSAMD21E16C, which is WLCSP-35 package, 64K flash and 8k ram. It's been a challenge getting everything to fit, thankfully Stuck is a code god and had helped tremendously. I think you might like some of the things we've come up with! ^_^

Hmmm sounds interesting, I too would like to see that code once it's done - I hope you put it up on github. I also agree about your previous post on making it easy for the end user, I do hope you do put those extra pins on though - just so modchip users can have that switching option, however if you don't - no worries. I don't really need your usbc device (as I have a modchip fitted) - however I have followed this thread since you started it, and would buy one as it does seem like a great product, and you certainly have spent a lot of time and effort (plus expense) on making this a great thing to have. So when you eventually get this shipping can you add me to your PM list and let me know so I can order one from you. I wish you well on the dual nand solution as well - that sounds like a good idea & i'm sure their will be lots of people interested in getting one.
 

isoboy

Well-Known Member
Member
Joined
Dec 23, 2016
Messages
1,215
Trophies
0
XP
2,632
Country
United States
I bought the freckle shack gbc v1 screen mod a few months ago. It shipped with glitches and I had to buy a replacement ribbon cable. I recently bought two gba ips screens from funnyplaying that both shipped with screen tearing. I had to buy a replacement ribbon. After all this time and revisions I really hope you're able to deliver us a V1 working injector because I'm tired of this early adopter shit. I set my eyes on this day one and I don't want to buy two of these as I always planned only for you to announce a "fix" a week later. I've gotten more sceptical in general and while I was one of the first to show interest for this I'm leaning towards waiting a little bit more. Care to comment? This is just my "early adopter in general thoughts".
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    straferz @ straferz: Anybody know why this is happening to my ACWW town...