![]() | ||
Views: 24,212,913 | Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search | 02-09-25 06:23 AM |
Guest: |
Main - Posts by temp12312 |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 1/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
Tried direct and indirect modes, running admin, pcs on same lan, choosed right adapter in direct mode and using npcap, still doesnt work. |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 2/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
My lan multiplayer does not work and I am changing source code to make it work. This is what I did.
Run as admin, disabled audiosync, bind socket to any address, indirect mode(also tried direct with pcap), pcs are connected through connection ethernet 2, did not work. In source code I tried to set sockets to certain ips with certain ports https://github.com/Arisotura/melonDS/blob/master/src/frontend/qt_sdl/Platform.cpp#L289 https://github.com/Arisotura/melonDS/blob/master/src/frontend/qt_sdl/Platform.cpp#L309 but it is using sockaddr and there is not much information on that type and I am thinkng to change it to sockaddr_in. Also I discovered https://github.com/Arisotura/melonDS/blob/master/src/frontend/qt_sdl/Platform.cpp#L428 https://github.com/Arisotura/melonDS/blob/master/src/frontend/qt_sdl/LAN_Socket.cpp but I dont see here sockets. If I change sockets, will lan multiplayer work? Are those sockets enough(maybe I missed some sockets that need to be changed)? Are there other ways to make lan multiplayer work and what else can I do? |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 3/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
Also boot game not directly(tick off boot game directly). Communication error but at least pcs are seeing each other. New thread or ask about it here?
P.S. I need to change domain hostname or something like this because they are the same seems like. |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 4/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
Ethernet connection, run as admin, no firewall, bind socket to any address, randomize mac address, boot game directly enabled, audio sync and fps limit disabled. |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 5/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
Melonds is using broadcast address to send data in local multiplayer. For some reason one of pcs was not recieving broadcast data, other did somehow. So I changed source code, in platform.cpp I changed
res = setsockopt(MPSocket, SOL_SOCKET, SO_BROADCAST, (const char*)&opt_true, sizeof(int)); if (res < 0) { closesocket(MPSocket); MPSocket = INVALID_SOCKET; return false; } MPSendAddr.sa_family = AF_INET; *(u32*)&MPSendAddr.sa_data[2] = htonl(INADDR_BROADCAST); *(u16*)&MPSendAddr.sa_data[0] = htons(7064); /*res = setsockopt(MPSocket, SOL_SOCKET, SO_BROADCAST, (const char*)&opt_true, sizeof(int)); if (res < 0) { closesocket(MPSocket); MPSocket = INVALID_SOCKET; return false; }*/ MPSendAddr.sa_family = AF_INET; *(u32*)&MPSendAddr.sa_data[2] = htonl(IP_HERE); *(u16*)&MPSendAddr.sa_data[0] = htons(7064); Change IP_HERE to ip of other pc, but firstly convert it to decimal or use other socket function If you have similiar issue you can try to change source code and compile it. To developers I hope you will consider it and change code, I wont change code because my solution will not work with 2+ players multiplayer. That is a bit of issue. |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 6/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
I tried, but failed:
Get mouse/cursor coords through event. Then if cursor out of "touch panel" setpos it to center of the panel. Then nds touch screen with coords. Then if some amount of time passed setpos cursor to center(I tried to setpos right after handling coords but if event called immediately after previous event then look in game will not be handled properly). The best I did: void ScreenHandler::screenOnMouseRelease(QMouseEvent* event) { event->accept(); if (event->button() != Qt::LeftButton) return; if (touching) { touching = false; NDS::ReleaseScreen(); QCursor::setPos( QPoint(Config::WindowWidth * 3 / 4, Config::WindowHeight / 2) ); //that + works only in horizontal layout } } TL;DR It would be cool if someone will code this feature request. |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 7/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
0x020E0000 memory region. I want to edit NDS game variable.
0x020E078C 2 bytes halfword, seems what I need is accesible in ARM9 ARM7 and full memory(used DeSmuME). Tried NDS::ARM9Write16(0x020E078C, 0) and NDS::ARM7Write16(0x020E078C, 0), but did not work(because it is the wrong variable). |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 8/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
I want to also change value dynamically. How to convert that memory address to ar code format? Or do you mean something other by cheats? |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 9/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
I picked the wrong variable that is why it did not work. Everything is good with functions. |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 10/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
Hello, how to make that a dynamically allocated variable set within code of NDS ROM will not change address? |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 11/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
Thanks, also if it would not change address while the game runs the solution would be savestate. |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 12/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
Hello, I am calling nds schedule event and I can not figure out how to calculate delay which lasts for 1 or 2 frames. So how to calculate it reliably? To do so for 2 frames is it reliable or calculate it for 1 frame and then do one skip in function event callback, so in total 2 frames?... |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 13/13 EXP: 1732 Next: 455 Since: 05-15-21 Last post: 1162 days ago Last view: 579 days ago |
Thanks. It is about emulating touches. If you call functions without delay game sees only the last call I think, because it does not register other function calls. |
Main - Posts by temp12312 |
Page rendered in 0.041 seconds. (2048KB of memory used) MySQL - queries: 23, rows: 90/90, time: 0.032 seconds. ![]() © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |