CTCaer / hekate

hekate - A GUI based Nintendo Switch Bootloader
GNU General Public License v2.0
6.71k stars 573 forks source link

Totally disable Hekate bootlogo & bootlogo.bmp does not load if update.bin exists #187

Closed Diablos90 closed 5 years ago

Diablos90 commented 5 years ago

Hi, I'm chainloading fusee-primary.bin with autoboot, and Atmosphere actually haves its own bootlogo, so I'm trying to disable the Hekate bootlogo (with no luck).

I read that you can disable the Hekate bootlogo by setting up "bootwait=0" on hekate_ipl.ini. I tried to do it, but the bootlogo appears anyway (for a fraction of a second).

Dont know if this is a issue or or I'm doing something wrong, I hope there's a way to totslly disable it.

Thanks in advance for all your work :)

CTCaer commented 5 years ago

https://github.com/CTCaer/hekate/blob/master/bootloader/main.c#L1055

Now checks if bootwait is 0

Diablos90 commented 5 years ago

Yeah, now bootwait=0 disable the bootlogo, thank you :)

I also noticed that with this 4.8 the custom bootlogo wont load: I tried to set customlogo=1 and bootwait=2 on hekate_ipl.ini, and I placed bootlogo.bmp (one that works with 4.6svc) inside the bootloader folder, but it doesn't work.

CTCaer commented 5 years ago

That's strange, it works for me. https://github.com/CTCaer/hekate/blob/master/bootloader/main.c#L989

Also customlogo=# is obsolete now.

hekate will try to load your logopath= bmp, if it doesn't find it, it will load bootlogo/bmp, if not built in one.

Diablos90 commented 5 years ago

I tried 2 bootlogos that works with 4.6svc and removed customlogo=1, sadly with no luck.

These are the bootlogos I tried: bootlogo 1 and bootlogo 2 (tried one at a time and named bootlogo.bmp).

This is my hekate_ipl.ini: [config] autoboot=1 autoboot_list=0 bootwait=2 verification=2 backlight=100 autohosoff=0 autonogc=0

{-- Custom Firmwares --} [Atmosphere] payload=bootloader/payloads/fusee-primary.bin { }

[ReiNX] payload=bootloader/payloads/ReiNX.bin { }

{---- Miscellaneous ---} [Stock] { }

EDIT: I deleted the update.bin file inside the bootloader folder and now the coustom logo works. When I dowIoaded the .zip of the 4.8 I found this update.bin file and I placed it in the bootloader folder on the sd card; Is this file necessary?

CTCaer commented 5 years ago

It's important if you boot atmo via hekate or using a modchip.

I'll check tomorrow for that. for now you can use logopath=pathto.bmp

Diablos90 commented 5 years ago

Thanks again :)

mattytrog commented 5 years ago

All is working here. Removed the dimensions (720, 1280) from the bmp sanity check. Left B, M & 32 in.

This happens when x & y axis are switched. For example, if you are using a logo meant for ArgonNX.

Removing this part of the sanity check will make a switched axis bmp not display properly, but at least it won`t leave you scratching your head.

gfx_render_bmp_argb requires modification to automagically flip incorrect axis IMHO

EDIT: Seems part of the reason anyway.

CTCaer commented 5 years ago

@mattytrog what you proposed is irrelevant and also prone to heap corruption.

This stopped working for another reason. Which from what I see it doesn't make sense. The only cases where the default logo is shown, are when

  1. there's no bootlogo.bmp
  2. or no logopath
  3. or bmp is not correct. (Bigger x or y size, not 32bit, etc).

I suppose that something is messing with https://github.com/CTCaer/hekate/blob/master/bootloader/main.c#L980 because the bmp headers are correct.

@mattytrog Now I understood your context, you are from temp. Yeah still avoid to use landscape with hekate. If you want it, use a square bmp. Hekate will automatically choose the color of background from the first pixel.

mattytrog commented 5 years ago

Fair enough! I`m very C rusty. As default, with menu_logos etc in. It compiles to 127000 ish. Bigger than 126296.

I`ve tried lots of bootlogos and as I wrote above, the x & y switch "seems" to be the reason. That is the only way I could replicate in my mod of Hekate.

Or maybe there is a little mem corruption somewhere on account of the compiled size being "too big"?

In my Simple-UF2 abomination, menu_logo blz is removed and the bootlogo blz is smaller I think (IIRC).

With the extra bits I`ve butchered and bolted on, compiled size still only comes out to 116000 ish.

Thanks for the great software! And BTW. Yep. From temp ;)

EDIT: Just tried both bootlogos linked above that dont work. Working perfectly in my mod using bootlogo.bmp in bootloader folder. Im really wondering if it is compiled size too big?

CTCaer commented 5 years ago

The size is because you have older GCC. New version fixed a bug it introduced, that was saving debug info. What you see in releases, it's from that compiler.

have in mind that if the payload size is more than 126296, it fails to relocate, and you stay with a black screen.

mattytrog commented 5 years ago

That makes sense. I`ll update GCC. Your default Hekate should compile under 126296 once I have done that.

My modified version should be even smaller than 116000.

I also have "native" USB working in a test build I made. However I had to chop a load of stuff out to get the code to fit.

On with the project. I hope you don`t mind me making my own mods for it!

Thank-you once again for your work!

m4xw commented 5 years ago

@mattytrog You should check out our module system for USB, I assume with "native" u mean using bootrom? We don't mind forks, but we encourage ppl to contribute to upstream (aka this repo)

mattytrog commented 5 years ago

Certainly I will.

I feel quite shy about my code. Always have done! But of course Ill push back! I dont want to be considered "rude" or anything!

Thank-you.

CTCaer commented 5 years ago

@Diablos90 So, it's a stack corruption, introduced in 4.8. Hopefully it only affects /bootloader/bootlogo.bmp. Next version will have the fix.

Diablos90 commented 5 years ago

Thank you :) I found another anomaly, it's better to open a new issue?

CTCaer commented 5 years ago

@Diablos90 what is it about?

Diablos90 commented 5 years ago

You've probably already noticed it: navigating through the Hekate menu (for example going on Launch and coming back) cause a distortion to the red/white CTCaer logo on the bottom right (if you repeat Launch -> Back many times the distortion worsens).

CTCaer commented 5 years ago

With or without update.bin? sept run? auto boot and VOL-?

Diablos90 commented 5 years ago

With update.bin inside bootloader folder. Sept inside the sept folder is the Atmosphere standard one. Yes, autoboot enabled and VOL- to enter Hekate menu.

CTCaer commented 5 years ago

Can't replicate it at all locally. It seems it was fixed as a side effect of fixing the stack corruption.

Diablos90 commented 5 years ago

Perfect, I'll check again when the new version will be released, thanks again :)

CTCaer commented 5 years ago

All these are fixed via https://github.com/CTCaer/hekate/commit/0ddc1c71a8689fa364f5838546b1b63a1d1be53e#diff-b6be68663e95ac400d2c531258deea2bR127