Luigi's notes about WiFi

From DeSmuME
(Difference between revisions)
Jump to: navigation, search
(NSMB wifi code)
Line 33: Line 33:
 
ldrheq r1, [r0]<br>
 
ldrheq r1, [r0]<br>
 
</font>
 
</font>
 +
 +
Note: I'm going to put those as images. I absolutely hate how wikis deal with linebreaks unless you manually put &lt;br&gt; tags.

Revision as of 23:40, 16 January 2010

Current Wifi state

Wifi is WIP and highly experimental, keep it in mind

  • Ad-hoc: Nintendo multiplayer games fail to connect together. At one point the host sends data frames, the client receives them right but seems to not care about them or throw them out for some reason. Quite possibly a timing problem.
  • SoftAP, WFC: doesn't work. Seems to be due to timing issues. Anyway we don't want to have DeSmuME contact Nintendo's servers for now.
  • SoftAP, homebrew: wifi lib test successfully connects to SoftAP, DHCP succeeds and all is right. But anything past that fails. It isn't DeSmuME's fault: the DSWifi lib used by the test doesn't implement TCP; and the function that translates an IP string to a number is buggy, hence UDP and DNS failing.
  • SoftAP, ndsmail: ndsmail requires DLDI to store its settings on.

NSMB wifi code

NOTE: THIS CODE IS COPYRIGHT NINTENDO!!! DO NOT PUT IT IN YOUR PROJECTS!!!

ARM assembly code, and, if I amn't too lazy, translation to C++ pseudocode

Packet handling or whatever procedure, 0x037F9F88 -> 0x037FA3C0 (ARM7)
stmdb sp!, {r4-r11,lr}
sub sp, sp, 0x1C
ldr r0, [0x037FA3C4]
ldr r1, [r0]
add r10, r1, 0x344
ldr r0, [0x037FA3C8]
add r9, r1, r0
add r0, r1, 0x600
ldrh r2, [r0, 0x90]
mov r1, 1
ldr r0, [0x037FA3CC] (=0x04808010)
strh r1, [r0]
ldrh r0, [r10, 0xC]
cmp r0, 0
ldreq r0, [0x037FA3D0] (=0x04808054)
ldrheq r1, [r0]

Note: I'm going to put those as images. I absolutely hate how wikis deal with linebreaks unless you manually put <br> tags.

Personal tools