• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Site › Dolphin Patches (Archive) v
« Previous 1 ... 3 4 5 6 7

Implement IOCtlV 0x3 of /dev/net/ncd/manage
View New Posts | View Today's Posts

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Implement IOCtlV 0x3 of /dev/net/ncd/manage
03-21-2010, 12:33 AM (This post was last modified: 03-23-2010, 04:30 AM by neobrain.)
#1
neobrain Offline
"Wow, I made my code 1000x faster! That means I can make it 2048x slower now!"
**********
Developers (Some Administrators and Super Moderators)
Posts: 3,208
Threads: 50
Joined: Jun 2009
Hi,
As the topic says, this patch implements IOCtlV 0x3 of /dev/net/ncd/manage. Concerning the first output buffer, this IOCtlV basically just reads the contents of /shared2/sys/net/02/config.dat (network configuration) and stores the data in the buffer (no idea what it does with the second one). Since the name SETIFCONFIG3 is somewhat opposed to what the IOCtlV actually does, I renamed it to GETIFCONFIG.
With this code, trying to play Mario Kart Wii over NWC won't immediately spit out an error, but instead now even tries to connect with WTC (horribly failing of course, since we neither have any real network support nor have WC24 implemented).
The file layout of config.dat is taken from wiibrew and is included for readability (I could've hardcoded all the values of course, but who would understand such code?).

NOTE: This code will fall back to old "functionality" (i.e. just return 0 without doing anything at all) if /shared/sys/net/02/config.dat doesn't exist, so you should have a copy of that file. By the way, it would be helpful if some told me how to modify/delete some file on the NAND (since I don't know what the Wii does in case config.dat doesn't exist). (nevermind, found /dev/fs)
Furthermore, this code isn't tested on Windows, but it _should_ work fine, unless MSVC or MingW don't support #pragma pack(1). Just tried on Windows, compiles and runs MKWii fine.

So... I hope this patch is okay with the coding style and everything (any comments are welcome ofc), it would be cool if I gained SVN access since I'm planning to prepare some other network related patches in the future as well.

EDIT: Patch has been committed as of r5222, thanks to Sonic1 Wink


Attached Files
.diff   ncd_getifconfig.diff (Size: 8.06 KB / Downloads: 203)
Find
03-23-2010, 08:28 AM
#2
ector Offline
PPSSPP author, Dolphin co-founder
*
Project Owner  Developers (Administrators)
Posts: 189
Threads: 2
Joined: Mar 2009
Very cool. PM me your gmail/google account name for SVN access.
Website Find
03-24-2010, 09:42 AM
#3
ector Offline
PPSSPP author, Dolphin co-founder
*
Project Owner  Developers (Administrators)
Posts: 189
Threads: 2
Joined: Mar 2009
NeoBrain's been added!
Website Find
03-24-2010, 10:38 AM
#4
Starscream Away
Above and Beyond
*******
Posts: 4,052
Threads: 213
Joined: Jun 2009
Welcome, Neobrain.
Asus Laptop: K53TA
OS: Windows 7 Home Premium, 64-Bit - SP1
CPU: AMD Llano A6-3400M, Quad-Core, 1.4GHz-2.6GHz (Overclocked)
GPU: AMD Radeon HD6650M, 1GB GDDR3 (Catalyst 13.1)
RAM: Samsung 4GB DDR3-1333










Find
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode