Hacking Official Corbenik - Another CFW for advanced users (with bytecode patches!)

  • Thread starter Thread starter chaoskagami
  • Start date Start date
  • Views Views 287,450
  • Replies Replies 2,153
  • Likes Likes 60
That's odd, I've never had any issues with static buffer allocations (and I allocate a lot of them, but you already know that).
I mean, I think I have like 6 static buffers (3 0x46500 bytes, other 3 0x38400 bytes) and my binary is under 15kb, so your issue might be somewhere else.

I actually thought it was a bad pun on the kun suffix lol

It's a linker script thing. After I got rid of the static allocations, the binary shrunk about 50k. I had never planned to continue that, anyways.
 
Funny. Anyways, I read through the source to get that, so w/e.



If you're going to start using adf.ly - I am not okay with this. I'm going to set up automated builds sooner than later in that case. Technically there's nothing wrong with it, but I'm just not a fan of use of adf.ly.
Corbenik itself is not available through an adfly link. The updater is, and technically, you only need it once, since it can autoupdate itself anyway.
If you're not ok with it, I can provide a no-adfly link, though :/
--------------------- MERGED ---------------------------

Or you could just keep hosting it there :P I won't mind waiting between nightly builds myself, mostly because I work full-time, so it's not like I am there to catch the latest builds.
no, you didn't get it. I got distracted and wrote latest-nightly instead of latest-un, and I didn't want to bother deleting the old one and renaming the other, so I changed the link.lol
 
Corbenik itself is not available through an adfly link. The updater is, and technically, you only need it once, since it can autoupdate itself anyway.

Regardless, I'm just not a fan of adf.ly. I'm aware that this has nothing to do with corbenik. I personally use internet-wide script and adblock, along with AAK so even if I clicked it probably wouldn't get you a cent. :(

This is just an impetus to get nightlies set up.
 
  • Like
Reactions: The Catboy
Anti-Adblock killer. Essentially, if a site detects adblock and refuses to work - it bypasses the code for that.
hum, interesting. I'll check that out. Anyway, let's get back on topic, I suppose.
 
Last edited by gnmmarechal,
Anti-Adblock Killer. I believe.

I use it too. As well as Ublock Origin. As well as Ad.fly Skipper.

That's my setup, as well. UBlockO is good stuff. Far better than adblock+ and noscript.
 
  • Like
Reactions: Temptress Cerise
That's odd, I've never had any issues with static buffer allocations (and I allocate a lot of them, but you already know that).

Two screen sized buffers, over 500kB for both of them, seems to have been the bulk of it.

That's my setup, as well. UBlockO is good stuff. Far better than adblock+ and noscript.
I went as far as setting up a pi-hole after enduring an incredibly aggravating audio ad. In chorus. On repeat.
 
Two screen sized buffers, over 500kB for both of them, seems to have been the bulk of it.

screen sized buffer
over 500kB for both of them

0x38400 (bottom screen size while in RGBA8 format) + 0x46500 (top screen size) = 0x7E900 = 518400 bytes = 506 kilobytes. So yeah, it kind of makes sense.

Yeah, but this appears to be a specific issue with corbeniks linker script, since nobody else has ever hit this issue (well, in all fairness I've generated a 300MB payload, but that's besides the point).
 
  • Like
Reactions: gnmmarechal
Two screen sized buffers, over 500kB for both of them, seems to have been the bulk of it.

It was, it seems.

0x38400 (bottom screen size while in RGBA8 format) + 0x46500 (top screen size) = 0x7E900 = 518400 bytes = 506 kilobytes. So yeah, it kind of makes sense.

Yeah, but this appears to be a specific issue with corbeniks linker script, since nobody else has ever hit this issue (well, in all fairness I've generated a 300MB payload, but that's besides the point).

It's actually BGR8, not RGBA8.

By the way, as far as I can tell, BootAnim9 has no static buffers, @Wolfvak, and your linker script is for all intents is functionally identical to mine. Be very careful with implementing double buffering.

The specific reason for this is that BSS can't be excluded in the output with the sections placed after it. A little bit of re-ordering to exclude BSS may be in order.

I went as far as setting up a pi-hole after enduring an incredibly aggravating audio ad. In chorus. On repeat.

I don't even know what you mean by that. However, this is why I have uBlock on global deny everything and have a reaaaaally long whitelist.
 
It's actually BGR8, not RGBA8.

Hey, you got it backwards in that commit too. Guess we're even now ¯\_(ツ)_/¯.

By the way, as far as I can tell, BootAnim9 has no static buffers, @Wolfvak, and your linker script is for all intents is functionally identical to mine. Be very careful with implementing double buffering.

Yeah, the linker is fine now that I finally see it, but (unless my concept of static buffers is completely wrong) I do have a bunch of buffers.
 
  • Like
Reactions: chaoskagami
The Pi-Hole is a DNS level ad-blocker. The nuclear option as it were.

Oh, okay. I use a hosts file and a dumb node on my local nginx here in addition to uBlockO. I guess that's similar.

Hey, you got it backwards in that commit too. Guess we're even now ¯\_(ツ)_/¯.

Yeah, the linker is fine now that I finally see it, but (unless my concept of static buffers is completely wrong) I do have a bunch of buffers.

None of those are declared static or are globals. They'll end up on the stack, which is why your binary doesn't grow.

EDIT: Ninja'd.
 
Last edited by chaoskagami,
Aren't those allocated on the stack? The ones in corbenik were global so would be placed in the output binary.
Ha, I didn't notice where it was declared, I just looked at the commit changes.
But yeah, this workaround is great. Only thing we're missing now is free() :^)

jk
 
Ha, I didn't notice where it was declared, I just looked at the commit changes.
But yeah, this workaround is great. Only thing we're missing now is free() :^)

jk

I'd actually kind of like malloc and free tbh, but that requires actually keeping track of allocations (which is slow, and uneeded here.) :P
 
@chaoskagami

I just compiled the latest commit and in /corbenik/bits I only have corbenik.bin and termfont.bin, in the other commits that i build that folder had a lot of other files
Is that normal? Did you merged the other files in corbenik.bin?
 
@chaoskagami

I just compiled the latest commit and in /corbenik/bits I only have corbenik.bin and termfont.bin, in the other commits that i build that folder had a lot of other files
Is that normal? Did you merged the other files in corbenik.bin?

No, that is not normal, and I also can't reproduce that. I have made zero changes to the makefile in recent commits, and I will never bundle bits into corbenik.

Can you run 'make clean' and paste the build output as a log? Like,
Code:
make -j4 2>&1 >log.txt
 
Last edited by chaoskagami,
No, that is not normal, and I also can't reproduce that. I have made zero changes to the makefile in recent commits, and I will never bundle bits into corbenik.
Ok, I had these trying to build it again

Code:
linking loader.elf
/tmp/ccfqI7Lz.ltrans0.ltrans.o: In function `main':
<artificial>:(.text.startup+0x19e0): undefined reference to `svcCreateCodeSet'
<artificial>:(.text.startup+0x19fc): undefined reference to `svcCreateProcess'
collect2: error: ld returned 1 exit status
/opt/devkitpro/devkitARM/3ds_rules:39: recipe for target '/home/erikus/SOURCES/corbenik/external/loader/loader.elf' failed
make[3]: *** [/home/erikus/SOURCES/corbenik/external/loader/loader.elf] Error 1
Makefile:107: recipe for target 'build' failed
make[2]: *** [build] Error 2
make[2]: Leaving directory '/home/erikus/SOURCES/corbenik/external/loader'
Makefile:24: recipe for target 'loader' failed
make[1]: *** [loader] Error 2
make[1]: Leaving directory '/home/erikus/SOURCES/corbenik/external'
Makefile:78: recipe for target 'external' failed
make: *** [external] Error 2

It looks like that the problem is devkitARM, but i just updated it 2 days ago
 

Site & Scene News

Popular threads in this forum