kinnay / smb35 Goto Github PK
View Code? Open in Web Editor NEWAn open source server for Super Mario Bros. 35
License: GNU Affero General Public License v3.0
An open source server for Super Mario Bros. 35
License: GNU Affero General Public License v3.0
Does not happen with 2 players
When 3 players,
At the beginning of the game,
Player A runs to commit suicide
show error
WARNING:nintendo.nex.matchmaking_eagle:MatchmakeRefereeServer.end_round_with_partial_report not implemented
WARNING:nintendo.nex.rmc:RMC failed: Core::NotImplemented (0x80010002)
ERROR:nintendo.nex.prudp:Packet timed out: <PRUDPPacket type=TYPE_DATA flags=NEED_ACK,RELIABLE,HAS_SIZE seq=36 frag=0>
INFO:nintendo.nex.rmc:Connection was closed
INFO:nintendo.nex.notification:NotificationClient.process_notification_event()
INFO:nintendo.nex.messaging:MessageDeliveryServer.deliver_message()
INFO:nintendo.nex.messaging:MessageDeliveryClient.deliver_message()
INFO:nintendo.nex.messaging:MessageDeliveryClient.deliver_message()
when B and C wait in place until the time is up:
show error:
ERROR:anynet.util:An exception occurred
Traceback (most recent call last):
File "C:\Python38\lib\site-packages\anyio\streams\memory.py", line 79, in receive
return self.receive_nowait()
File "C:\Python38\lib\site-packages\anyio\streams\memory.py", line 74, in receive_nowait
raise WouldBlock
anyio.WouldBlock
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python38\lib\site-packages\anynet\util.py", line 86, in catch
yield
File "F:\SMB35\source\eagle.py", line 293, in handle
await client.process()
File "F:\SMB35\source\eagle.py", line 84, in process
data = await self.client.recv()
File "C:\Python38\lib\site-packages\anynet\websocket.py", line 275, in recv
return await self.binary_packets.get()
File "C:\Python38\lib\site-packages\anynet\queue.py", line 18, in get
return await self.stream.receive()
File "C:\Python38\lib\site-packages\anyio\streams\stapled.py", line 61, in receive
return await self.receive_stream.receive()
File "C:\Python38\lib\site-packages\anyio\streams\memory.py", line 99, in receive
raise EndOfStream
anyio.EndOfStream
INFO:nintendo.nex.matchmaking_eagle:MatchmakeRefereeServer.end_round()
INFO:nintendo.nex.matchmaking_eagle:MatchmakeRefereeServer.end_round()
INFO:nintendo.nex.matchmaking_eagle:MatchMakingServerExt.end_participation()
INFO:nintendo.nex.notification:NotificationClient.process_notification_event()
INFO:nintendo.nex.matchmaking_eagle:MatchMakingServerExt.end_participation()
INFO:anynet.websocket:WS server is closed
INFO:nintendo.nex.messaging:MessageDeliveryServer.deliver_message()
WARNING:nintendo.nex.rmc:RMC failed: RendezVous::SessionVoid (0x80030073)
Hey there,
Been trying to test it with both Ryujinx and Yuzu and i haven't been able to get it working but i am not sure i have set it up properly.
Could you confirm that it works with either ?
Hey! This isn't exactly an issue with Super Mario Bros. 35
I was trying to adapt this custom server to the Splatoon 2 Global Testfire, and I managed to get the console to connect to my PC which is hosting the server, but then I realized that it was just giving me error 2306-0102
, (only when I had the server up of course). And yes, I have indeed changed the access key to match that of the testfire. Also, I've placed an image of the error screen at the bottom of this post.
From what I can tell, there are a few needed funcs that aren't yet implemented... Is there any chance you could perhaps implement a few of them? I tried making some adjustments but I had no luck. I'm thinking its just a few authentication funcs. Maybe matchmaking eventually, but I'm not worried about that yet haha.
I'm assuming that I should probably also mention that handle_validate_and_request_ticket_with_custom_data
is where it's failing.
If you need more info, lemme know!
Here are the patches that I've made ~~ Feel free to test them if you'd like.
@nsobid-0F129135D8A7621C9E4940B0C3808BF0
@flag offset_shift 0x0
#Splatoon 2 Global Testfire
//Set Custom Server URL
@enabled
024FC706 "192.168.4.156:20000"
//nn::nex::JobAcquireNsaIdToken::StepWaitingForGetGameAuthentication(void)+9C -> Replace GetResult call with MOV X0, XZR
@enabled
01132844 E0031FAA
//force branch at "CBZ W8, loc_7101132844"
@enabled
01132924 08000014
typedef u32 CURLcode;
typedef void CURL;
enum CURLoption { };
CURLcode (*original_curl_easy_perform)(CURL *curl);
CURLcode curl_easy_perform_hook(CURL *curl)
{
u64 curl_easy_setopt_addr;
nn::ro::LookupSymbol(&curl_easy_setopt_addr, "curl_easy_setopt");
skyline::TcpLogger::SendRaw("curl_easy_perform() was called!\n");
// yes I'm aware this is disgusting.
((CURLcode (*)(CURL *curl, CURLoption curlopt, long val))curl_easy_setopt_addr)(curl, (CURLoption)64, 0L);
return original_curl_easy_perform(curl);
}
Result (*original_nnNexQLOG_func)(int logLevel, const char* message, ...);
Result nnNexQLOG_hook(int logLevel, const char* message, ...)
{
va_list argptr;
va_start(argptr, message);
char s[0x100];
int maxlen = 255;
Result result = vsnprintf(s, maxlen, message, argptr);
va_end(argptr);
skyline::TcpLogger::SendRawFormat("[Log Level %d]: %s\n", logLevel, s);
return original_nnNexQLOG_func(logLevel, s);
}
int main() {
u64 curl_easy_perform_addr;
nn::ro::LookupSymbol(&curl_easy_perform_addr, "curl_easy_perform");
A64HookFunction(
reinterpret_cast<void*>(curl_easy_perform_addr),
reinterpret_cast<void*>(curl_easy_perform_hook),
(void**) &original_curl_easy_perform
);
u64 nnNexQLOG_addr;
nn::ro::LookupSymbol(&nnNexQLOG_addr, "_ZN2nn3nex5_QLOGENS0_8EventLog8LogLevelEPKcz");
A64HookFunction(
reinterpret_cast<void*>(nnNexQLOG_addr),
reinterpret_cast<void*>(nnNexQLOG_hook),
(void**) &original_nnNexQLOG_func
);
}
So we've managed to get a few friends set up their Switch to connect to our own hosted private server, and we finally had around 3-5 players a lot of the time.
We were wondering why almost everyone except the final two players would always immediately get an Error 2306-0103 upon death.
So it seems spectating is broken, anyone who would end up in spectate mode instead gets that error.
One of them suggested it might be because of the game trying to submit coin rankings to the (non-existent) coin leaderboard. But I decided to check the logs and it was:
WARNING:nintendo.nex.matchmaking_eagle:MatchmakeRefereeServer.end_round_with_partial_report not implemented
Is there a quick way we can fix it so spectating works (if the issue is the coin leaderboard thing as they guessed)?
We plan to implement coin leaderboards eventually (even via something simple like SQLite), but for now, we hope to get spectating working at least since that's most of the fun of the game.
Also, when someone gets the error, the server just keeps spamming stacktraces (ClosedResourceError) in the log until the game ends (not sure if this is helpful):
Thanks for any help, and also thanks so much for writing the server code!
It's amazing!
We noticed in several games, some people would be frozen in place, never time out, and beat us all after we reach fastest red timer and time out.
At first we thought it was a hacker, until one of us got a connection error and also had the same result.
Now we can reproduce it reliably:
Steps to reproduce:
This is the error that appears once they close the game:
And of course, this initiates the ClosedResourceError stacktrace spam until the end of the game
In a scenario such as this where its server software under GPLv3 hosting a server does not qualify as "distributing" and therefore does not actually require source code to be made public.
It should instead be licensed under AGPLv3, which contains an affero clause, which also makes distribution of services over a network such as the internet qualify as "distributing".
In its current state it may as well be public domain with no protections on it due to its nature.
I was wondering if this method you used to use an alternative server instead of the nintendo server is possible to be used in other games like: splatoon, smash, mario kart ...
Is it possible that this open source server is made workable by only DNS modding? E.g. a DNS server that serves your server IP instead of the actual Arika/Nintendo one? I believe it will be possible and you should focus on this. I prefer to not mod my switch and it will be much more accessible for everyone if possible.
When connecting to my server, matchmaking works (players that join and leave show up properly, late joining players get the correct gamestart countdown time).
However, once countdown finishes, and game is about to start with "Here we go..." message, game doesn't start and instead clients get an "Error 2623-1011".
No visible errors are seen in the server logs (with either logging.INFO or logging.DEBUG levels).
My setup
Below are the consoles I used to connect:
Console 1:
Console 2:
Also, Hekate's "Fix Arch Bit" is used afterwards every time files are copied over.
The IPS patch file I am using was created like so:
After they connected, during matchmaking, they show up properly on the dashboard:
Below is the logging.INFO log, from startup all the way up to Error 2623-1011
Here is the logging.DEBUG log (note at the end I close the software on both Switches):
More Testing:
It must be something with my setup, but my setup is pretty barebones as it is
I've tried it on other VPS boxes I had access to (even tried it on an OSX box with Python 3.7), as well as some other certs available to me, and I get the same error. But it instantly works once I point it to those two known working servers.
EDIT: Just tried to update my VPS to Python 3.9 and run it there, still got the same error code.
I hope you can help me figure this out.
Hello, can you help me please to create an ips patch for my domain?
Hello kinnay,
i have a question to participants, is it possible to limit the max participants from ( 35 ) to ( 5 )for example ?
It is a good feature for nearly server test
Is there a way to play this without modding the switch? Or does it have to be modded?
Can he support other games? such as monster hunter rise
Please renew the Let's Encrypt certificate for https://smb35.ymar.dev:20002 as it expired on July 18th.
I have never modded any switch game.
Hi Kinnay
Is it possible to make it work on SXOS?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.