Been playing around more with those outer rows in AGB and it seems like there's just plain numeric limits, which is odd if its the hex editor or repackers fault but I can believe your patching method can circumvent these limits. Its hard to nail down an exact range because it seems to vary by pixel, but if 3x and 4x are the center which actually have values in the default matrix, 2x / 5x seem to be limited to around +/- just under x1000, while 1x / 6x is somewhere under x400. So that would rather limit what you can use these rows for.
Been playing around more with those outer rows in AGB and it seems like there's just plain numeric limits, which is odd if its the hex editor or repackers fault but I can believe your patching method can circumvent these limits. Its hard to nail down an exact range because it seems to vary by pixel, but if 3x and 4x are the center which actually have values in the default matrix, 2x / 5x seem to be limited to around +/- just under x1000, while 1x / 6x is somewhere under x400. So that would rather limit what you can use these rows for.
I have never encountered any limits using the patcher, but I had the same issues when doing hex editing. I still have no idea why manually patching bytes crashes, but the patcher patching the exact same bytes works somehow...
Just checked the first post and i am amazed to see how much this has grown, is there an updated version of the first patcher Sono? Or is this all included within TWL menu++?
Just checked the first post and i am amazed to see how much this has grown, is there an updated version of the first patcher Sono? Or is this all included within TWL menu++?
There will be a new patcher whose only purpose will be to patch an rtcom "bootloader" into TwlBg. This approach should fix the issue where sleep mode isn't working, and also this will allow the patch maker to bundle a custom rtcom version with more flexibility because at that point you wouldn't be limited by the amonut of code space left in TwlBg.cxi to put anything sensible in it.
This is actually a huge deal, because the current rtcom is very limited due to the abysmally small code space available, and also is very slow due to it being tied to the ARM11 framerate (which is VSynced, so it's locked to ~60Hz).
This new approach of being able to override rtcom is a dealbreaker, because the patch maker (or even TWiLightMenu++) can upload a custom rtcom blob at the start which can run on a separate thread, and the communication latency is reduced from 17ms to 1-7ms, and also the graphics shouldn't softlock while ARM11 code is running.
Oh also, because we have more space at runtime than we have in the binary, TWiLightMenu++ could upload an rtcom blob at the start which has a Rosalina-like trainer in it, from where you could apply scale filters (on both axes! screw DMPGL ), patches (screen centering?), and even apply a blue light filter!
And let's not even talk about the other possibilities like button remapping, screen swapping, color-correction LUTs[1], limited SD access[2], or generally just access to the ARM11 hardware[3].
[1] = sadly it's only a LUT, indexed as
color.component = LUT.component[color.component]
[2] = the DS-side code must have support for communicating File IO via rtcom
[3] = some hardware MUST be accessed via functions already existing in TwlBg, or else an undefined behavior caused by race conditions could cause hardware damage (like how I had to hard reset my new3DSXL via MCU after I accidently disabled the gyro because I was writing to it too fast)
At Sono's prompting and working within the hex editing limitations I updated my spreadsheet to use the full matrix. This allows for an "unsharp masking" style effect (negative gaussian blur) which might reduce sharpening artifacts. I'm not sure which I like more so I made it optional, you should change it from zero to a value equal to edge sharpening for something close to "normal" guassian blur at theta = 1 but you can fine tune the effect if you want. (So with .5 edge sharpening, use .5 for unsharp masking as a default) In my code.bin I need to paste over 4A19C- 4A1E3, it might be different for you so you can again search for the full default matrix by copying the hex values with everything set to 0.
Here's a Christmas "gift": an excel / google sheet that calculates AGB matrices, to be copied into a hex editor editing code.bin extracted from agbbg.cxi. It allows you to fine tune increases to smoothing and sharpening, yielding results closer to how DS scaling is done by default on 3DS, although with much better results as 2->3 is an easier scale than 4->5. It has two values to be edited in the upper left, taking a decimal between 0 and 1 inclusive, with 0s entered in to match the default state of unmodified agbbg.cxi.
First ensure you know where the matrix code is in your code.bin. Because the sheet starts off with the default values (from 0 in both linear smoothing and edge sharpening), you can copy the lower line that has all the hex codes and search for that with an editor like HxD. On mine it starts at address 4A1A8 and goes to 4A1D7. Go ahead and select this space because that is what we will be replacing.
The first factor is "linear smoothing." The default of 0 makes it semi-"crisp" and pixelly, but can also distort shapes, like the outlines of the comic cutscenes in Zero Mission. This is because pixels from the original image are not factored into the scaled one equally. A value of 1 eliminates pixelness and perfectly weights all pixels in the final image, but makes things extremely smooth/blurred.
To combat added blur by turning up linear smoothing, you can use the edge sharpening factor. This is a simple sharpening algorithm as you might see on TVs or monitors, it tends to enhance strong contrasts of neighboring colors, but can produce unwanted ringing/halo artifacts. 0 is no sharpening, while a value of 1 is the max sharpening allowed. (which isn't *that* sharp, so don't be afraid to try it.)
Once you've set your values, copy the code line at the bottom to the appropriate place in code.bin we highlighted earlier. Then save and rebuild agbbg.xci as normal and drop in luma/sysmodules on your SD card. I kind of like smoothing .5 and sharpening .7 but feel free to try other values.
If you've played with these hex edits before, give my excel file a try. You can also read some boring technical details below.
As to why I've been working on this: the default AGB scaling does not treat every pixel evenly. The basic job that has to be done is to turn 4 GBA pixels into 9 on the 3DS. As far as I can tell, the original matrix accomplishes this by creating little cubes of 4 original pixels and fills out the edge with 5 interpolated ones that evenly blend the nearest pixels. While somewhat sharp this distorts the original shapes because in the scaled image there is zero space between some original pixels while others have an interpolated pixel placed between them. Spacing every pixel evenly actually means not directly copying any source pixels though, instead its always a blend of like 75% one and 25% another at best, which means to represent shapes and space accurately you are left with blur at a 2->3 upscale. However we can use traditional sharpening to help combat this, and with some compromise we something we can get something that is more accurate and still sharp or sharp enough.
Because I can't figure out how to go over -F00 in any one pixel, a factor of "1" gives you the maximum possible sharpening while keeping everything proportional. I find 1 is already borderline on making annoying artifacts so it isn't too much a loss that you can't push further. Note that the overall strength of sharpening increases slightly as linear smoothing increases, because while the maximum pixel value is fixed at F00 the minimum values will be higher to remain in proportion with the smoother minimum (x10 instead of x0)
At Sono's prompting and working within the hex editing limitations I updated my spreadsheet to use the full matrix. This allows for an "unsharp masking" style effect (negative gaussian blur) which might reduce sharpening artifacts. I'm not sure which I like more so I made it optional, you should change it from zero to a value equal to edge sharpening for something close to "normal" guassian blur at theta = 1 but you can fine tune the effect if you want. (So with .5 edge sharpening, use .5 for unsharp masking as a default) In my code.bin I need to paste over 4A19C- 4A1E3, it might be different for you so you can again search for the full default matrix by copying the hex values with everything set to 0.
With Sono's widescreen I think filtering does apply but only in one direction. (Vertical?) If you extract code.bin from his agbbg.cxi, or else feed his widescreen patcher a modified agbbg.xci, you might be able to search for the default matrix and overwrite it with stuff from my sheet. Not sure if he coded to disregard the default matrix locations or not.
With Sono's widescreen I think filtering does apply but only in one direction. (Vertical?) If you extract code.bin from his agbbg.cxi, or else feed his widescreen patcher a modified agbbg.xci, you might be able to search for the default matrix and overwrite it with stuff from my sheet. Not sure if he coded to disregard the default matrix locations or not.
Yeah, my widescreen patch can only apply on the Y axis, because I didn't do the patches to load the X axis separately (changing the scaling requires entirely new scale kernels).
The widescreen patch initializes the X axis to default values, and duplicates pixels instead of doing "Sono's crisp" due to space limitations.
@Gericom has already done WarioWare: Twisted support for GBARunner2 a loooong time ago, but we were missing the proper gyroscope drivers to be able to play it normally.
Well, if you've been following the Rtc3DS repo, you should've noticed that I pushed a few gyro-related commits. I managed to get gyro working on the 2DS and new3DS! It's also possible to use old3DS, but the drivers for that are still work in progress.
I recorded myself playing on my 2DS. I also tried on my new3DSXL, but the 2DS' small weight, and lack of foldability makes this game not only less frustrating to play, but also a lot more fun!
Sorry for the audio issues, but I don't have a microphone input (stupid combo jack ), so you have to put up with the quiet and noisy audio. At least the footage is 1080p60 this time, not 480p24...
If you notice something off about how the gyro works in-game, please quote this post, because while it feels good with the current settings, it might be off from the original game.
@Gericom has already done WarioWare: Twisted support for GBARunner2 a loooong time ago, but we were missing the proper gyroscope drivers to be able to play it normally.
Well, if you've been following the Rtc3DS repo, you should've noticed that I pushed a few gyro-related commits. I managed to get gyro working on the 2DS and new3DS! It's also possible to use old3DS, but the drivers for that are still work in progress.
I recorded myself playing on my 2DS. I also tried on my new3DSXL, but the 2DS' small weight, and lack of foldability makes this game not only less frustrating to play, but also a lot more fun!
Sorry for the audio issues, but I don't have a microphone input (stupid combo jack ), so you have to put up with the quiet and noisy audio. At least the footage is 1080p60 this time, not 480p24...
If you notice something off about how the gyro works in-game, please quote this post, because while it feels good with the current settings, it might be off from the original game.
OK my bad, I didn't notice that it only works on 2DS and N3DSXL, I can confirm that it doesn't work on N2DSXL, but perfectly on O2DS, thanks for your hard work @Sono@Gericom
OK my bad, I didn't notice that it only works on 2DS and N3DSXL, I can confirm that it doesn't work on N2DSXL, but perfectly on O2DS, thanks for your hard work @Sono@Gericom
Yeah, we had problems with new2DSXL, but I tested on 2DS, new3DSXL, and old3DS, and it works on all 3, except I need to do the drivers for old3DS. No idea why new2DSXL is so broken :/
OK my bad, I didn't notice that it only works on 2DS and N3DSXL, I can confirm that it doesn't work on N2DSXL, but perfectly on O2DS, thanks for your hard work @Sono@Gericom
I'm on the same boat. Tremendous respect for the work @Sono and the others put into this, but my stupid just can't access it. I'm even getting hyped for AGB_firm purposes which is not even the focus of this thread lol.
The cia patcher is as simple as it'll get. The reason the patches are not in the patcher yet is because all this stuff is just prerelease, and highly experimental.
[QUOTE = "Flame, post: 8904268, membro: 130770"] você pode postar em inglês please.we é um fórum de língua inglesa. Existe alguma maneira de automatizar esse processo?Any .cia or a program?
After a couple days of Nintendo releasing their 18.0.0 firmware update, @SciresM releases a brand new update to his Atmosphere NX custom firmware for the Nintendo...
Today, April 8th, 2024, at 4PM PT, marks the day in which Nintendo permanently ends support for both the 3DS and the Wii U online services, which include co-op play...
Hello, GBAtemp members! After a prolonged absence, I am delighted to announce my return and upgraded form to you today...
Introducing tempBOT AI 🤖
As the embodiment...
With Apple having recently updated their guidelines for the App Store, iOS users have been left to speculate on specific wording and whether retro emulators as we...
Yet another casualty goes down in the never-ending battle of copyright enforcement, and this time, it hit a big website which was the host for many fangames based and...
The highly popular and accurate FPGA hardware, MisterFGPA, has received today a brand new update with a long-awaited feature, or rather, a new core for hardcore...
The time has finally come, and after many, many years (if not decades) of Apple users having to side load emulator apps into their iOS devices through unofficial...
The romhacking community is always a source for new ways to play retro games, from completely new levels or stages, characters, quality of life improvements, to flat...
A new Nintendo Switch firmware update is here. System software version 18.0.1 has been released. This update offers the typical stability features as all other...
Retro handheld manufacturer Anbernic is releasing a refreshed model of its RG35XX handheld line. This new model, named RG35XX 2024 Edition, features the same...
Today, April 8th, 2024, at 4PM PT, marks the day in which Nintendo permanently ends support for both the 3DS and the Wii U online services, which include co-op play...
Hello, GBAtemp members! After a prolonged absence, I am delighted to announce my return and upgraded form to you today...
Introducing tempBOT AI 🤖
As the embodiment...
After a couple days of Nintendo releasing their 18.0.0 firmware update, @SciresM releases a brand new update to his Atmosphere NX custom firmware for the Nintendo...
With Apple having recently updated their guidelines for the App Store, iOS users have been left to speculate on specific wording and whether retro emulators as we...
The time has finally come, and after many, many years (if not decades) of Apple users having to side load emulator apps into their iOS devices through unofficial...
Nintendo might just as well be a law firm more than a videogame company at this point in time, since they have yet again issued their now almost trademarked usual...
A new Nintendo Switch firmware update is here. System software version 18.0.1 has been released. This update offers the typical stability features as all other...
Yet another casualty goes down in the never-ending battle of copyright enforcement, and this time, it hit a big website which was the host for many fangames based and...
The highly popular and accurate FPGA hardware, MisterFGPA, has received today a brand new update with a long-awaited feature, or rather, a new core for hardcore...
Nintendo has recently announced through their social media accounts that a new Indie World stream will be airing tomorrow, scheduled for April 17th, 2024 at 7 a.m. PT...