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,183
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
741
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
741
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,515
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
25
Location
Venezuela-Zulia.
XP
855
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
  • K3Nv2 @ K3Nv2:
    Or isp dips
  • sp3off @ sp3off:
    Taking more time to load the page than to fire up the paper towel is an issue
  • K3Nv2 @ K3Nv2:
    What's worse is the dinosaur game popping up when the lotion comes out
    +1
  • RedColoredStars @ RedColoredStars:
    You use paper towels too? :rofl2:
  • sp3off @ sp3off:
    Better keep the safe place 'safe'
  • RedColoredStars @ RedColoredStars:
    Bounty. The quicker picker upper? lol
  • K3Nv2 @ K3Nv2:
    Aloe vera now with rgb
  • sp3off @ sp3off:
    On a serious note, have you tested your ISP DNS answer time ?
  • sp3off @ sp3off:
    Last time i've checked, my ISP was like 5/6 ms slower than Cloudflare x)
  • RedColoredStars @ RedColoredStars:
    yeah. I've tried changing dns too.
  • K3Nv2 @ K3Nv2:
    Check cpuid make sure ram sockets are detected
  • sp3off @ sp3off:
    (and i'm fibered, 5gb shared downloads, 1gb upload)
  • K3Nv2 @ K3Nv2:
    Or even in bios
  • RedColoredStars @ RedColoredStars:
    its mostly when starting firefox that it's noticible slower. Opening and loading the homepage. Tried fresh installs and all.
  • K3Nv2 @ K3Nv2:
    Knowing your system specs would help
  • sp3off @ sp3off:
    if you're in win 11, have you checked which graphical processor Firefox was using ?
  • RedColoredStars @ RedColoredStars:
    after it's open, its a bit slower too at loading pages, but not as noticeable as the initial startup and homepage loading
  • sp3off @ sp3off:
    can make a little difference
  • RedColoredStars @ RedColoredStars:
    You mean as in hardware acceleration on or off?
  • K3Nv2 @ K3Nv2:
    Went to make cup noodles, spilled boiling water on me then the kettle decided to pop
  • K3Nv2 @ K3Nv2:
    Don't know why I saw a kettle with wifi
  • RedColoredStars @ RedColoredStars:
    Will try that now
  • sp3off @ sp3off:
    ouch @K3Nv2 hope nothing's too bad !
  • RedColoredStars @ RedColoredStars:
    xda a good site. My go to site for phone shit. :)
    RedColoredStars @ RedColoredStars: xda a good site. My go to site for phone shit. :)