logs archiveBotHelp.net / Freenode / #3dsdev / 2015 / July / 23 / 1
CTurt
possible to turn off backlight?
for my homebrew 3DS Controller
it doesn't use the top screen at all
and only the bottom screen occasionally for on screen keyboard
I want to turn off the backlight to save power
Agent004
New user: 11C11Turt - 12http://4dsdev.org/?u=102
New thread by 11C11Turt in 11Homebrew discussion: 11Disable backlight - 12http://4dsdev.org/?t=48
Post edited by 11C11Turt (12Homebrew discussion: 11Disable backlight (1248)) - 12http://4dsdev.org/?p=280
New reply by 11S11tapleButter (12Homebrew discussion: 11Disable backlight (1248) (+154)) - 12http://4dsdev.org/?p=281
StapleButter
burp
Lectem
cool, xentax forums are open for registration again
CTurt
still trying to disable backlight
http://pastebin.com/v5iBLA40
what's wrong?
http://3dbrew.org/wiki/LCD
Agent004
New reply by 11C11Turt (12Homebrew discussion: 11Disable backlight (1248) (+380)) - 12http://4dsdev.org/?p=282
Dazzozo
CTurt: you're setting LCDBACKLIGHT like LCDCOLORFILL
that table only applies to LCDCOLORFILL
CTurt
so how do I use backlight register?
just 0 or 1?
I tried that, but it "crashed" the 3DS
not really sure how to describe it
WiFi stopped working
and couldn't return to home menu
xerpi
try with toggling all the bits lol
Dazzozo
well, the one time i played with that reg from arm9, i ended up setting the brightness higher than it normally allows, and then my 3ds got *super* hot
so, dont do that ;)
Vappy
hot enough to fry an egg?
that'd be some innovative homebrew
CTurt
all the bits has the same effect
drawString(10, 10, "%d\n", REG_LCDBACKLIGHTMAIN);
even just reading the register gives the crash
I am uing the virtual process address
right?
Dazzozo
if youre crashing that prob means its not mapped in your process
idk what the situation is with that reg in userland, i guess it would make sense for something like GSP to have that responsibility
CTurt
don't ban me
but I'm using a card that starts with G
Dazzozo
doesnt mean they give you permission to sh*t all over the OS :P
CTurt
so is it impossible to turn off backlight?
Dazzozo
ofc not, ive done it :P
you might have some obstacles to tackle in userland tho
if its possible there at all
i guuuesss if it is "owned" by GSP, if it was exposed to applications it would be through gsp::lcd, which isnt very well documented afaik, but im speculating
neobrain
CTurt: are you trying from arm11 kernel (are you sure you are in kernelmode?) or from arm9?
CTurt
I'm not in kernel mode
I'm running with GW
neobrain
that doesn't tell me anything
CTurt
is it possible without a kernel exploit
neobrain
you should consider using the WriteHWRegs calls of the GSP service.. if you're on the ARM11 and not in kernel mode, you won't be able to poke registers directly
CTurt
how can I do this in ctrulib?
neobrain
there's probably a gsp_WriteHWRegs function :p
Subv
Doesn't that only write to gpu registers?
Dazzozo
^ thats what i thought
figured it would be under gsp::lcd if anything
neobrain
I don't think so
the addresses are based at 0x1EB0000, which includes the 0x1ED00000 range
GSP internally needs to poke LCD registers, so I'm pretty sure it does have access to that
(if it doesn't, please tell me because it's probably relevant for citrace-player :p)
Dazzozo
then what is gsp::lcd even for
neobrain
"Unlike gsp::Gpu, GSP module does not start a separate thread for handling these [gsp::lcd] service commands. " ... other than that, idk
Dazzozo
:S
CTurt
sorry, I'm lost
I couldn't find any such function in ctrulib
Dazzozo
WriteHWRegs is definitely in ctrulib
CTurt
https://github.com/smealum/ctrulib/search?utf8=%E2%9C%93&q=WriteHWRegs
Dazzozo
because github search failed you
here https://github.com/smealum/ctrulib/blob/master/libctru/source/services/gsp.c#L114
CTurt
do I give virtual or physical address?
u32 on = 1;
GSPGPU_WriteHWRegs(NULL, REG_LCDBACKLIGHTMAIN, &on, 4);
crash!
Dazzozo
"based at 0x1EB00000"
CTurt
#define REG_LCDBACKLIGHTMAIN *((unsigned int *)0x1ED02240)
used that
crash
Dazzozo
thats not based at 0x1EB00000
unless your reg is at 0x3D802240
CTurt
http://3dbrew.org/wiki/LCD
that;s what it is listed at
0x1ED02240-0x1EB00000?
Dazzozo
that would do it
CTurt
it worke
the screen is really dim
Dazzozo
im surprised applications can just *do* that :S does returning to home "restore" the brightness?
CTurt
no
home screen is really dim
like, less than it should allow
which is excellent
I love low brightness
thanks
using read register
I can restore to appropriate value
Agent004
Post edited by 11C11Turt (12Homebrew discussion: 11Disable backlight (1248)) - 12http://4dsdev.org/?p=282
Subv
Also note that it was crashing because your define is hiding a dereference
CTurt
no, I changed it when I was using the gpu calls
I originally thought it could be dereferenced though
norips
Hi
Lectem
hi
next »