Homebrew DS(i) Mode hacking progress thread

Normmatt

Former AKAIO Programmer
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,211
Country
New Zealand
just saw this thread. i looked into twl mode with some custom debugging hardware a while back for reasons and i should have a bunch of notes somewhere but the gist of what might be relevant off the top of my head is :

- you can totally make it load your own roms relatively easily if you want to, for example by editing twl_bg, the background process that runs on the arm11...
- ...but that's more or less limited to homebrew. basically the problem remains that the game will try to access data from a non-existant gamecard. you could potentially force it to run in twl instead of ntr and redirect rom and save to sd or nand, it the game might not even run due to some funky memory mapping differences. (something to do with mirrors iirc)
- even with legit games, you're pretty limited in terms of what improvements you could make to the twl_form experience. basically switching into twl mode completely disconnects the arm11 (the only thing running 3ds mode code at that point) from fcram, which is where most (?) twl memory lives. I tried but failed to bring that bus back up. so basically arm11 can't affect twl stuff : can't edit memory, can't control execution in any way (in fact, hitting home doesn't even pause execution iirc)
- the arm11 is responsible for fetching the DS frame buffers from lgyfb and displaying it. so you can totally change the way it does that, apply some post processing to that if you're into that, but that's basically it. I have some documentation on lgyfb, but the gist of it is there's some configuration for the upscale filter, and then it uses smea to fetch the actual data.



not sure if this information will be useful to anyone, but I figured posting it wouldn't hurt.

Wait the arm11 uses SMEA to fetch the actual data? How does one make the arm11 do such magic?
 
  • Like
Reactions: smealum

Fatalanus

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
595
Trophies
0
Age
24
XP
410
Country
Romania
This thread is interesting.
Please, can someone try to explain what the legendary Smea said, but with simple words? :D
 

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,565
Country
Chile
This thread is interesting.
Please, can someone try to explain what the legendary Smea said, but with simple words? :D
the guy called smea has said:

twl uses somewhat the mirrored ram addressing found on nds memory layout (see problemkaputt) , except its for dsi mode. And most ARM11 is left doing render from framebuffer to gpu job
 
  • Like
Reactions: Fatalanus

Jiro2

Well-Known Member
Member
Joined
Mar 28, 2011
Messages
781
Trophies
1
XP
759
Country
United States
basically the problem remains that the game will try to access data from a non-existant gamecard.

So what if you do use a gamecard?

How does a DS flashcart gain permission to run DS games? Could you hack the TWL_FIRM so that anything you put in automatically gets DSi permissions even if it just asks for DS permissions, then be able to use a DS flashcart for DSi games? (Would DSi encryption mess this up?)
 
Last edited by Jiro2,

dubbz82

Well-Known Member
Member
Joined
Feb 2, 2014
Messages
1,572
Trophies
0
Age
41
XP
1,215
Country
United States
So what if you do use a gamecard?

How does a DS flashcart gain permission to run DS games? Could you hack the TWL_FIRM so that anything you put in automatically gets DSi permissions even if it just asks for DS permissions, then be able to use a DS flashcart for DSi games?

A ds flash cart sends and receives data the same way as a standard ds cart does....it's not about gaining permission (comparatively, that's probably actually rather simple), it's about the actual data transmission. Even if we were to use a "dummy" cartridge, it'd be retrieving all sorts of invalid data. This isn't as easy of an issue to tackle as it might appear to be.
 
Last edited by dubbz82,

jaksy

Well-Known Member
Member
Joined
Jun 10, 2014
Messages
554
Trophies
0
Age
34
XP
318
Country
United States
so you can totally change the way it does that, apply some post processing to that if you're into that, but that's basically it. I have some documentation on lgyfb, but the gist of it is there's some configuration for the upscale filter
Perhaps I'm understanding this wrong, but are you saying in theory we might be able to sharpen the way the system outputs the DS image?
The default scaling the system uses looks like a very blurry bilinear style filter, which is rather ugly in my opinion, so that sounds like a somewhat useful concept.

Though if we're talking about scaling output being tweaked, I'd be much more interested in seeing the video issues fixed in agb_firm first.
Who the hell thought all that ghosting and blur was acceptable?
 
Last edited by jaksy,

Jiro2

Well-Known Member
Member
Joined
Mar 28, 2011
Messages
781
Trophies
1
XP
759
Country
United States
A ds flash cart sends and receives data the same way as a standard ds cart does....it's not about gaining permission (comparatively, that's probably actually rather simple), it's about the actual data transmission. Even if we were to use a "dummy" cartridge, it'd be retrieving all sorts of invalid data. This isn't as easy of an issue to tackle as it might appear to be.

Could you at least hack it so that all DSi games always get all permissions, then use an iEvolution to run a DSi game? The iEvolution uses the Cooking Coach exploit and only has the permissions that Cooking Coach has; having all permissions would be an improvement.
 

smealum

growing up sucks.
Member
Joined
May 1, 2006
Messages
635
Trophies
2
Age
31
Location
SF
Website
www.smealum.net
XP
2,516
Country
United States
Perhaps I'm understanding this wrong, but are you saying in theory we might be able to sharpen the way the system outputs the DS image?
The default scaling the system uses looks like a very blurry bilinear style filter, which is rather ugly in my opinion, so that sounds like a somewhat useful concept.

Though if we're talking about scaling output being tweaked, I'd be much more interested in seeing the video issues fixed in agb_firm first.
Who the hell thought all that ghosting and blur was acceptable?
100% possible, not even very hard. not sure (dont remember) if LGYFB's builtin filtering method would allow that directly (i suspect it would), but even if not you could just grab the original framebuffer and upscale it with the GPU. (twl_bg already uses the 3DS's GPU to render to DS mode framebuffer, so at that point it's just a matter of changing texture settings to nearest pixel and scale factor)
 

jaksy

Well-Known Member
Member
Joined
Jun 10, 2014
Messages
554
Trophies
0
Age
34
XP
318
Country
United States
100% possible, not even very hard. not sure (dont remember) if LGYFB's builtin filtering method would allow that directly (i suspect it would), but even if not you could just grab the original framebuffer and upscale it with the GPU. (twl_bg already uses the 3DS's GPU to render to DS mode framebuffer, so at that point it's just a matter of changing texture settings to nearest pixel and scale factor)
Absolutely fascinating.
And here I thought this topic was just going to be everyone talking in circles for 17 pages, but it turns out there may be something of merit to this discussion after all.

If this kind of tweaking to output is as simple as you're indicating then it definitely warrants some looking into from the community.
Unfortunately I'm a bit out of my depth here as I'm not even sure what this LGYFB (Framebuffer perhaps?) is you're referencing, since I can't find any other usages of that acronym on google or gbatemp.
You mention having notes or documents on it, anything helpful you can release that might point us in the right direction for researching this?

Also if twl_bg is the process that handles the arm11 instructions in twl_firm, is there a similar process governing it for agb_firm?
 

AtlasFontaine

Well-Known Member
Member
Joined
Jul 18, 2015
Messages
1,095
Trophies
0
Age
26
Location
Venezuela-Zulia.
XP
865
Country
Venezuela
100% possible, not even very hard. not sure (dont remember) if LGYFB's builtin filtering method would allow that directly (i suspect it would), but even if not you could just grab the original framebuffer and upscale it with the GPU. (twl_bg already uses the 3DS's GPU to render to DS mode framebuffer, so at that point it's just a matter of changing texture settings to nearest pixel and scale factor)
Out of curiosity, is possible to modify the AGB_FIRM to delete the motion blur and add more contrast?
 

Billy Acuña

Well-Known Member
OP
Member
Joined
Oct 10, 2015
Messages
3,126
Trophies
1
Age
31
XP
3,701
Country
Mexico
just saw this thread. i looked into twl mode with some custom debugging hardware a while back for reasons and i should have a bunch of notes somewhere but the gist of what might be relevant off the top of my head is :

- you can totally make it load your own roms relatively easily if you want to, for example by editing twl_bg, the background process that runs on the arm11...
- ...but that's more or less limited to homebrew. basically the problem remains that the game will try to access data from a non-existant gamecard. you could potentially force it to run in twl instead of ntr and redirect rom and save to sd or nand, it the game might not even run due to some funky memory mapping differences. (something to do with mirrors iirc)
- even with legit games, you're pretty limited in terms of what improvements you could make to the twl_form experience. basically switching into twl mode completely disconnects the arm11 (the only thing running 3ds mode code at that point) from fcram, which is where most (?) twl memory lives. I tried but failed to bring that bus back up. so basically arm11 can't affect twl stuff : can't edit memory, can't control execution in any way (in fact, hitting home doesn't even pause execution iirc)
- the arm11 is responsible for fetching the DS frame buffers from lgyfb and displaying it. so you can totally change the way it does that, apply some post processing to that if you're into that, but that's basically it. I have some documentation on lgyfb, but the gist of it is there's some configuration for the upscale filter, and then it uses its own DMA engine to fetch the actual data.



not sure if this information will be useful to anyone, but I figured posting it wouldn't hurt.

Ohh my...!!!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • BigOnYa @ BigOnYa:
    Biomutant looks cool tho, may have to try that
  • Quincy @ Quincy:
    Usually when such a big title leaks the Temp will be the first to report about it (going off of historical reports here, Pokemon SV being the latest one I can recall seeing pop up here)
  • K3Nv2 @ K3Nv2:
    I still like how a freaking mp3 file hacks webos all that security defeated by text yet again
  • BigOnYa @ BigOnYa:
    They have simulators for everything nowdays, cray cray. How about a sim that shows you playing the Switch.
  • K3Nv2 @ K3Nv2:
    That's called yuzu
    +1
  • BigOnYa @ BigOnYa:
    I want a 120hz 4k tv but crazy how more expensive the 120hz over the 60hz are. Or even more crazy is the price of 8k's.
  • K3Nv2 @ K3Nv2:
    No real point since movies are 30fps
  • BigOnYa @ BigOnYa:
    Not a big movie buff, more of a gamer tbh. And Series X is 120hz 8k ready, but yea only 120hz 4k games out right now, but thinking of in the future.
  • K3Nv2 @ K3Nv2:
    Mostly why you never see TV manufacturers going post 60hz
  • BigOnYa @ BigOnYa:
    I only watch tv when i goto bed, it puts me to sleep, and I have a nas drive filled w my fav shows so i can watch them in order, commercial free. I usually watch Married w Children, or South Park
  • K3Nv2 @ K3Nv2:
    Stremio ruined my need for nas
  • BigOnYa @ BigOnYa:
    I stream from Nas to firestick, one on every tv, and use Kodi. I'm happy w it, plays everything. (I pirate/torrent shows/movies on pc, and put on nas)
  • K3Nv2 @ K3Nv2:
    Kodi repost are still pretty popular
  • BigOnYa @ BigOnYa:
    What the hell is Kodi reposts? what do you mean, or "Wut?" -xdqwerty
  • K3Nv2 @ K3Nv2:
    Google them basically web crawlers to movie sites
  • BigOnYa @ BigOnYa:
    oh you mean the 3rd party apps on Kodi, yea i know what you mean, yea there are still a few cool ones, in fact watched the new planet of the apes movie other night w wifey thru one, was good pic surprisingly, not a cam
  • BigOnYa @ BigOnYa:
    Damn, only $2.06 and free shipping. Gotta cost more for them to ship than $2.06
  • BigOnYa @ BigOnYa:
    I got my Dad a firestick for Xmas and showed him those 3rd party sites on Kodi, he loves it, all he watches anymore. He said he has got 3 letters from AT&T already about pirating, but he says f them, let them shut my internet off (He wants out of his AT&T contract anyways)
  • K3Nv2 @ K3Nv2:
    That's where stremio comes to play never got a letter about it
  • BigOnYa @ BigOnYa:
    I just use a VPN, even give him my login and password so can use it also, and he refuses, he's funny.
  • BigOnYa @ BigOnYa:
    I had to find and get him an old style flip phone even without text, cause thats what he wanted. No text, no internet, only phone calls. Old, old school.
    K3Nv2 @ K3Nv2: @BigOnYa...