Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3DS CONSOLE_LOG is broken #13973

Closed
bmaupin opened this issue May 27, 2022 · 6 comments
Closed

3DS CONSOLE_LOG is broken #13973

bmaupin opened this issue May 27, 2022 · 6 comments

Comments

@bmaupin
Copy link
Contributor

bmaupin commented May 27, 2022

Description

I'm doing some tinkering with RetroArch on 3DS and I wanted to see the logs in the bottom screen. This functionality was removed as part of #12470.

But the functionality can be restored:

If you want to debug, you could build the project with the console enabled. For this, build with CONSOLE_LOG enabled in the makefile.

#12951 (comment)

Unfortunately, this doesn't work as expected.

Expected behavior

The bottom screen should show the RetroArch logs.

Actual behavior

The log does briefly show in the bottom screen, and then the screen goes black again before I'm able to read it. Tapping on the bottom screen does nothing.

Going to Settings > User Interface and then toggling 3DS Bottom Screen off and then back on again makes the log show again, but once again it only shows briefly and then the screen goes blank.

Steps to reproduce the bug

  1. Set CONSOLE_LOG = 1 in Makefile.ctr (I did it in Makefile.ctr.salamander too just to be sure)
  2. Compile RetroArch
  3. Install the CIA file on a 3DS and observe the above behaviour

Bisect Results

It looks like 0760039 is the first bad commit:

07600392df4d52e975c71ca28c12fc8ee793e03d is the first bad commit
commit 07600392df4d52e975c71ca28c12fc8ee793e03d
Author: MrHuu <MrHuu@users.noreply.github.com>
Date:   Mon Sep 6 01:16:16 2021 +0200

    (3DS) Add bottom screen idle state (#12942)

 gfx/common/ctr_common.h |   4 ++
 gfx/drivers/ctr_gfx.c   | 150 +++++++++++++++++++++++++++++++++++++++++-------
 2 files changed, 133 insertions(+), 21 deletions(-)

Version/Commit

You can find this information under Information/System Information

Environment information

  • OS: 3DS
  • Compiler: I'm compiling using the Docker devkitpro/devkitarm image + libretro-super

Thanks!

@bmaupin
Copy link
Contributor Author

bmaupin commented May 27, 2022

@MrHuu This seems to be related to #13964

Maybe I'm using it wrong? The bottom screen log blacks out after a second or two in the RetroArch menu and I can't find any way to turn it on again. Tapping the screen does nothing.

I'm using a New 2DS XL in case it makes a difference.

Thanks!

@bmaupin
Copy link
Contributor Author

bmaupin commented May 27, 2022

... okay, I just noticed a few things:

  • If I load a game, the bottom screen is still blank
  • If I tap the bottom screen while a game is loaded, the screen stays blank but the RetroArch menu appears
  • If I then go into Settings > User Interface and toggle 3DS Bottom Screen off and then back on, the log will show

Surely it's not meant to be that difficult to enable? Especially given CONSOLE_LOG will only be enabled by developers?

Additionally, the bottom screen log never shows if no core is loaded. But I'm trying to do some debugging before the core is ever loaded. I guess as a fallback I can do all of the above steps, but it seems like a lot of work given I already had to enable CONSOLE_LOG and compile RetroArch...

I wonder if this behaviour was intended for the new bottom screen behaviour and not for when CONSOLE_LOG was enabled.

@MrHuu
Copy link
Contributor

MrHuu commented May 28, 2022

Sorry, this is not intended behavior.
As already indicated, 0760039 does not take the CONSOLE_LOG flag in account.

Even with CONSOLE_LOG defined, the bottom screen will be set idle. It fades out and the LCD backlight is disabled.
While no core is running, the bottom display is always idle and disabled.

Some changes in said commit have to be guarded out to display the console on the bottom screen.

Just out of curiosity, any indication on what you're trying to debug?
Could gdb help you out in any case?

@bmaupin
Copy link
Contributor Author

bmaupin commented May 31, 2022

Just out of curiosity, any indication on what you're trying to debug?

I was trying to debug a different issue where the behaviour for standalone cores on the 3DS had changed and were unable to load content. I was able to get it figured out and I've created a separate issue for it (#13992).

Thanks!

@MrHuu
Copy link
Contributor

MrHuu commented Jun 7, 2022

At the very least i could help you out on this one, hope this helps.

@bmaupin
Copy link
Contributor Author

bmaupin commented Jun 10, 2022

Thanks so much! I took your advice and switched to gdb. But hopefully this will still end up being useful when needing to debug something quickly.

@bmaupin bmaupin closed this as completed Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants