Homebrew TWPatcher - DS(i) mode screen filters and patches

  • Thread starter Thread starter Sono
  • Start date Start date
  • Views Views 977,932
  • Replies Replies 2,626
  • Likes Likes 107

Are you interested in a complete replacement of TwlBg which includes all patches?

  • Yes, I don't care how broken it will be!

    Votes: 188 79.3%
  • No, I don't want to use even more broken stuff

    Votes: 20 8.4%
  • Yes, but only in GBA mode, because I play DSi exclusives

    Votes: 12 5.1%
  • No, because I only use DS and DSi mode

    Votes: 17 7.2%

  • Total voters
    237
  • Poll closed .
Hey Sono, you did a great job finding a way to make the DS mode Widescreen! But i would like to know how you did that, because you didn't show up a tutorial on how to do this manually in the first post, but take your time! I'm not forcing you, again awesome work :)
 
Hey Sono, you did a great job finding a way to make the DS mode Widescreen! But i would like to know how you did that, because you didn't show up a tutorial on how to do this manually in the first post, but take your time! I'm not forcing you, again awesome work :)

I can't make a manual patching tutorial, because it involves a lot of steps, and you have to scan the code manually byte-by-byte (CTRL-F is not possible), checking each byte by hand. I doubt you want to check ~1.7 MILLION bytes manually...
 
I can't make a manual patching tutorial, because it involves a lot of steps, and you have to scan the code manually byte-by-byte (CTRL-F is not possible), checking each byte by hand. I doubt you want to check ~1.7 MILLION bytes manually...
Damn 1.7 Million Bytes?! I'll probably give up really fast like that
 
Damn 1.7 Million Bytes?! I'll probably give up really fast like that

The patcher already includes the widescreen patch, and all patches have been tested across various system versions and old3DS/new3DS, and they all seem to work. The problem is that there is no GUI to change which mods you want to apply, and I'm bad at making GUIs. The awful weather changes don't help me either, hence the extreme delay on a trivial task.
 
  • Like
Reactions: Midou360
The patcher already includes the widescreen patch, and all patches have been tested across various system versions and old3DS/new3DS, and they all seem to work. The problem is that there is no GUI to change which mods you want to apply, and I'm bad at making GUIs. The awful weather changes don't help me either, hence the extreme delay on a trivial task.
Rip, i hope the situation gets better soon then, and good luck!
 
  • Like
Reactions: Vague Rant and Sono
@Sono Re: That discussion on YouTube, here's those analog centering hacks I mentioned.

Super Mario 64 DS (USA)
Code:
Centered Joystick
0202B444 E3A02080
0202B458 E3A01060

Super Mario 64 DS (USA) (Rev 1)
Code:
Centered Joystick
0202B708 E3A02080
0202B71C E3A01060

Super Mario 64 DS (Europe)
Code:
Centered Joystick
0202C528 E3A02080
0202C53C E3A01060

By FroggestSpirit over in this Kuribo64 thread.

I know almost nothing about how the touch screen works, but this sets the origin of the virtual joystick to the center of the screen, which I assume would have coordinates something like 127,95 assuming it goes from 0-255,0-191. The on-screen graphic for the virtual stick is 80*80 pixels, which I presume corresponds to the actual size in terms of where the virtual stick's bounding is, so when applying virtual touches you'd want them within a range from -40 to +40 from the center on both axes, so on the X axis that would be 87-167 and on the Y axis, 55-135.

As FroggestSpirit explained in that thread, the stick still moves around on the screen, but you can ignore it, the origin is always the center of the screen, not wherever the stick is displaying.

For anyone reading along at home and not following, we were discussing the possibility of mapping the 3DS Circle Pad to the DS touch screen; with this setup, it would be theoretically possible to have full analog control in Super Mario 64 DS when played on 3DS.
 
-snip-

I know almost nothing about how the touch screen works, but this sets the origin of the virtual joystick to the center of the screen, which I assume would have coordinates something like 127,95 assuming it goes from 0-255,0-191. The on-screen graphic for the virtual stick is 80*80 pixels, which I presume corresponds to the actual size in terms of where the virtual stick's bounding is, so when applying virtual touches you'd want them within a range from -40 to +40 from the center on both axes, so on the X axis that would be 87-167 and on the Y axis, 55-135.

As FroggestSpirit explained in that thread, the stick still moves around on the screen, but you can ignore it, the origin is always the center of the screen, not wherever the stick is displaying.

For anyone reading along at home and not following, we were discussing the possibility of mapping the 3DS Circle Pad to the DS touch screen; with this setup, it would be theoretically possible to have full analog control in Super Mario 64 DS when played on 3DS.

I know it's possible, because I have found touch emulation code, but I haven't tested it, because I didn't have time and strength to do more research.
I'll do it in the 3rd release, most likely. I'm already waaaay too late with the 2nd release :/
 
Yeah, absolutely, @Sono, wasn't intending to put any pressure on you to do it, I just wanted to make sure it was documented somewhere for future reference. I'm not sure what your plans are with the source for your patcher--if it ends up open source you could just let this be somebody else's problem.
 
Yeah, absolutely, @Sono, wasn't intending to put any pressure on you to do it, I just wanted to make sure it was documented somewhere for future reference. I'm not sure what your plans are with the source for your patcher--if it ends up open source you could just let this be somebody else's problem.

There is nothing to opensource in the patcher, as it's 100% replacable by someone else.
As for the patches, as much as I tried documenting them, they are completely unreadable without having reverse engineered TwlBg beforehand. All the patches are just random bit pattern matching, and replacing random code or constants.

I will never consider opensourcing the patcher itself, but I might re-consider opensourcing the patches soon.
 
oh @Sono about the GBA full screen support, will GBARunner2 support it too?
I don't think so since GBARunner2 is running in DS Mode, not AGB_FIRM Mode, which is the one that is being patched.

Basically this:

GBARunner2 is basically a DS application, so you could use DS scaling on a GBA box that is itself unscaled. Not sure what the point would be though.

The DS scaling would be applied to GBA games, but the GBA screen would be stretched to the middle of the screen, which is rather pointless.

But yeah, GBARunner2 does support widescreen, but you'll be scaling it using the DS scaler, and it would be in the middle of the screen, so it's not really useful.
 
Basically this:



The DS scaling would be applied to GBA games, but the GBA screen would be stretched to the middle of the screen, which is rather pointless.

But yeah, GBARunner2 does support widescreen, but you'll be scaling it using the DS scaler, and it would be in the middle of the screen, so it's not really useful.
In older GBARunner2 versions, the screen was placed on the top-left, so we could take the 1.5x scale mode, and only use it for the top screen.
Probably not possible though. :P
 
In older GBARunner2 versions, the screen was placed on the top-left, so we could take the 1.5x scale mode, and only use it for the top screen.
Probably not possible though. :P

Actually... if in new GBARunner2 versions you could put the GBA screen in the top-left, then I could stretch it to ???x240, which would be full-screen :rofl2:
 
Hey @Sono do you have a discord account? i would like to know more about how did you managed to find the Widescreen mode on the ds, like going into the details
 
Hey @Sono do you have a discord account? i would like to know more about how did you managed to find the Widescreen mode on the ds, like going into the details

There is not really a story. I just accidently managed to find that the code responsible for managing how wide the screen is found inside DMPGL.
 

Site & Scene News

Popular threads in this forum