MathewWi / desmumewii

Automatically exported from code.google.com/p/desmumewii
GNU General Public License v3.0
0 stars 0 forks source link

Utilizing Starlet #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There's a reason that I've been so quiet lately. 

These may just be the rantings of a madman, but I was thinking...

Since the esteemed Arikado worked on DOP-Mii, I figured that you would know
whether this was possible or not. At least, moreso than I. Is it possible
to get access to the starlet? Is it even doing anything when we're running
homebrew? The DS runs on an arm processor, so if we could utilize even a
fraction of Starlet's power, well... I think we all know what would happen.

I have read the crap out of the technical manuals, and I found some
striking similarities to Vanilla's Disassembler.cpp code and native
instructions for the ARM processor. I have some heavily commented files to
this effect. 

Since Vanilla was not built with an ARM processor in mind, it had to
emulate everything. Consider this piece from arm_instructions.cpp:

 armcp15_moveARM2CP((armcp15_t*)cpu->coproc[cpnum], ...);

//Which is defined as:

 armcp15_moveARM2CP(armcp15_t *armcp15, u32 val, u8 CRn, u8 CRm, u8
opcode1, u8 opcode2)

//Now, this code is to "move from the ARM to the Co-Processor", which is
defined on the ARM architecture as: 

 mcr p<cpnum>, <opcode1>, Rd, CRn, CRm, <opcode2>

Notice any similarities? 

So, if this is possible, we need to communicate with the Starlet. This, I'm
told is by the Hollywood's IPC engine
(http://wiibrew.org/wiki/Hardware/IPC). I don't know how to set up
communications in the first place, though.

This just scratches the surface of what I've found. I wanted to get some
feedback before I committed my commented versions of the files, seeing as
how they are even less organized than this. I have also created a header
file with ARM-specific assembly code, ready and raring to go, if I get a
green light.

Original issue reported on code.google.com by dancinninjac on 1 Apr 2010 at 3:01

GoogleCodeExporter commented 9 years ago
An interesting note I found here (http://nocash.emubase.de/gbatek.htm#dsiomaps)
Scroll up one paragraph to "The two Processors". 

Quote: "Most game code is usually executed on the ARM9 processor." Huh, what 
kind of
processor is the Starlet, again? Yep! ARM9.

I still don't know how to issue instructions straight to the Starlet, though.

Original comment by dancinninjac on 3 Apr 2010 at 2:47

GoogleCodeExporter commented 9 years ago
I'm pretty sure only IOSes can run code on Starlet, so the only way I can think 
of to
do this is a custom IOS with extra features for running raw ARM machine code. 
But I'm
not sure the overhead of calling the Starlet/waiting for it to return something 
will
be worth the hassle. Also remember Starlet already has other jobs to do, like
handling hardware access.

Original comment by baby.lueshi@gmail.com on 3 Apr 2010 at 3:11

GoogleCodeExporter commented 9 years ago
What baby.lueshi said is really right on the money. It's really not worth (and I
don;t even think possible) to worry about utilizing starlet.

Original comment by castleva...@yahoo.com on 22 Apr 2010 at 12:13