logs archiveBotHelp.net / Freenode / #3dsdev / 2015 / September / 9 / 3
Lectem
we'd need to get rid of all the Handle* handle at some point
mgzg
ugh, one bad thing about your IPC_MakeHeader is I can't check the cmd really quickly now
yeah, I'm hoping to do all of APT_* and then wrap them all in apt* that'll be used by people
Lectem
just use the 4 first bytes
other are just number of args
mgzg
uhm, APT_JumpToHomeMenu checks that it's 0x2C0044
so...
Lectem
there shouldnt be any other command that has the ID 2C
mgzg
ok, buf[3] is used, so now to see what this does
Lectem
I agree its a bit less straightforward when REing but well
mgzg
buf[3] is a handle too
Lectem
mmmhh
maybe I misread, wait
MRC p15, 0, R3,c13,c0, 3
ADD R4, R3, #0x80
MOV R3, #0
STMIB R4, {R1,R3}
mgzg
0 means HANDLE_NONE so could have been compiled to that
Lectem
guess nintendo doesnt use it
I'll just leave it to 0 for now, if you figure out what it does I'll let you update it ?
also I think APT_JumpToApplication follows the same pattern but I cant confirm, its not in BPB
mgzg
interestingly, buf[2] is checked if != 0 then not used, but buf[3] is used as the handle
yeah, you have 0 in buf[2]
buf[3] isn't in that thing
R1 is buf[1], R3 is buf[2]
Lectem
oh woops
erh
mgzg
so you can hardcode the 0 still, just move it to the right location
Lectem
yeah
which makes more sense
since it should have only one normal param
mgzg
that's what the 1 in the 2C,1,4 is?
Lectem
and the 0 is for IPC_Desc_SharedHandles(1)
2C is the id
1 is the number of normal params
4 number of translate params
mgzg
ah, makes sense now
Lectem
https://gist.github.com/Lectem/879bd7c703d3231f095e
better
=)
it's probably the same for APT_JumpToApplication then
IPC_MakeHeader makes it really easier to check if you got the params right
mgzg
looks like it from service side
yeah, same usage
Lectem
APT_CloseApplication same
mgzg
yes
different end function it's passed to, but eventually used for same purpose
Lectem
wew
finished the refacto for apt
profi200
You could make a comment behind every IPC stuff with the command ID which was used before.
inb4something will break through the refactor :p
Lectem
probably, though I use a script to convert command ids
so its likely not because of this
if something breaks
oh damn ! I refactored but someone changed APT to not have the ugly handle param
rebase hell incoming !
profi200
Maybe it would be a good idea to speak about who does what before everyone works on something.
Situations like that just waste the time of every contributor.
mgzg
profi200: my NS_APPID PR was merged already
note: i have no idea what 0x301 is used for eShop for yet, but it's new
Lectem
profi200> Maybe it would be a good idea to speak about who does what before everyone works on something << its just me who forgot to rebase on the great-refactor branch
my base was still master ahah
mgzg
my method is: make lots of branches for organization and features, commit to master because lazy
Lectem: will that handy IPC_MakeHeader conversion script be available sometime?
Lectem
oh, its actually just a small program, wait a sec
https://gist.github.com/Lectem/c771e18e9f4aa86b6ae1
just give the command as a parameter and it'll output what you need ^^
mgzg
thank you, sir. will come in handy when I convert these other functions into the new format
Lectem
yeah, it actually also helped me to RE a bit
since you can make sure you got the right number of args
mgzg
that's what I figured the script would be based on just looking at the hex numbers and what you said
just wanted to be 100% sure
Lectem
the doc I put in ctrulib needs to be updated just a bit
the translate_params argument is *not* the number of translate parameters
its actually the size in words of the translate parameters
same thing for the normal ones (but in this case there is no header so it's the same)
just in case you didnt see, https://github.com/Lectem/ctrulib/commit/7eca2f7877bb95cc787674925d2012369d01d09d
it's not merged yet but there shouldnt be any reason for it to change
profi200
Huh, why did you choose the size?
voguerunt
Can 3DS mode access the Pokemon Typing BlueTooth radio?
profi200
fs:USER seems to allow you to send cmds to the gamecard. I guess this can be used to communicate with extra IR or bluetooth hw in DS games.
Lectem
profi200> Huh, why did you choose the size? for?
profi200
Instead of number of params.
Lectem
well, I should have, but its not *that* bad
(and i'm not feeling like going through the whole PR I just finished to divide by 2 those args)
profi200
But like that it doesn't make sense really. These bits you set describe the number of params.
Lectem
yeah I was going to change the description
profi200
That's not the point. The point is it's number of params not word size of params.
Lectem
ah I remember why i didnt use the number of params
cause its not hat easy
its not always 1 header 1 param
you can give multiple handles with only 1 header
ds84182
Connect a Wiimote to your 3DS via Pokemon Typing's Bluetooth radio for the maximum lulz.
« prev 1 2 3 next »