Daytona USA Progress

Online games, how to get online, and anything involving Dreamcast online can be discussed here.

Moderator: pcwzrd13

Yuviapp
noob
Posts: 2
Contact:

Re: Daytona USA Progress

Post#241 » Sat Sep 09, 2023 4:27 pm

ioncannon wrote:
mstar wrote:Hey @ioncannon - hows the reversing coming along?


Not much further as trying to figure out the flow of the program w.o a debugger is frustrating. But you just made me think of something.... instead of trying to fix Flycast, why not patch Daytona to use a "free" port that Flycast understands? Will give it a try and see if I can debug in that case.

In the mean time I was actually reverse engineering the Onsen games. I got the whole protocol figured out (including the encryption and checksum), and got far enough into the login process that it connects into a "game" server. However a lot of the data is unknown and it never actually leaves the loading screen.

Image
Image

Code: Select all

If type & 0x1F != 0, encrypt it. Packet looks like:

[headerSize (always 0xC)][type][payloadSize][ip][crc32][data]

In the data it usually has a header like this but the counts can be used in other ways:

[opcode][responseCode][count1][count2][maxCount]



My parse code:

Code: Select all


Hey sir,

I wanted to follow up on this, as I also just recently started looking at One dice games to see if we can get them back online.
This was brought to my attention by PCWizard and wanted to follow up to see if you were still working on this, as I didn't want to step on you're shoes. If not maybe we could team up to complete it :D
        private int ParsePacket(byte[] data, int offset, int maxLength, out byte outType, out byte[] outPayload)
        {
            outType = 0;
            outPayload = null;

            int bytesRemaining = maxLength - offset;

            // Is there a header?
            if (bytesRemaining < 0xC)
                return 0;

            // Get details
            byte type = data[offset + 1];
            ushort payloadSize = (ushort)((data[offset + 3] << 8) | data[offset + 2]);

            // Is the full packet here?
            if (bytesRemaining < payloadSize)
                return 0;

            // The rest of the packet
            uint ipAddr = BitConverter.ToUInt32(data, offset + 4);
            uint checksum = BitConverter.ToUInt32(data, offset + 8);

            byte[] payload = new byte[payloadSize];
            Array.Copy(data, offset + 0xc, payload, 0, payloadSize);

            // Check CRC32
            uint crc32 = Utils.CalcCRC32(payload);
            if (crc32 != checksum)
                return 0;

            // Decrypt if needed
            if ((type & 0x20) != 0)
                server.GetBlowfish().Decrypt(payload);

            // Done!
            outType = type;
            outPayload = payload;
            return payloadSize + 0xc;
        }

User avatar
Xiden
Developer
Posts: 2225

Re: Daytona USA Progress

Post#242 » Sat Sep 09, 2023 4:59 pm

Yuviapp wrote:
ioncannon wrote:
mstar wrote:Hey @ioncannon - hows the reversing coming along?


Not much further as trying to figure out the flow of the program w.o a debugger is frustrating. But you just made me think of something.... instead of trying to fix Flycast, why not patch Daytona to use a "free" port that Flycast understands? Will give it a try and see if I can debug in that case.

In the mean time I was actually reverse engineering the Onsen games. I got the whole protocol figured out (including the encryption and checksum), and got far enough into the login process that it connects into a "game" server. However a lot of the data is unknown and it never actually leaves the loading screen.

Image
Image

Code: Select all

If type & 0x1F != 0, encrypt it. Packet looks like:

[headerSize (always 0xC)][type][payloadSize][ip][crc32][data]

In the data it usually has a header like this but the counts can be used in other ways:

[opcode][responseCode][count1][count2][maxCount]



My parse code:

Code: Select all


Hey sir,

I wanted to follow up on this, as I also just recently started looking at One dice games to see if we can get them back online.
This was brought to my attention by PCWizard and wanted to follow up to see if you were still working on this, as I didn't want to step on you're shoes. If not maybe we could team up to complete it :D
        private int ParsePacket(byte[] data, int offset, int maxLength, out byte outType, out byte[] outPayload)
        {
            outType = 0;
            outPayload = null;

            int bytesRemaining = maxLength - offset;

            // Is there a header?
            if (bytesRemaining < 0xC)
                return 0;

            // Get details
            byte type = data[offset + 1];
            ushort payloadSize = (ushort)((data[offset + 3] << 8) | data[offset + 2]);

            // Is the full packet here?
            if (bytesRemaining < payloadSize)
                return 0;

            // The rest of the packet
            uint ipAddr = BitConverter.ToUInt32(data, offset + 4);
            uint checksum = BitConverter.ToUInt32(data, offset + 8);

            byte[] payload = new byte[payloadSize];
            Array.Copy(data, offset + 0xc, payload, 0, payloadSize);

            // Check CRC32
            uint crc32 = Utils.CalcCRC32(payload);
            if (crc32 != checksum)
                return 0;

            // Decrypt if needed
            if ((type & 0x20) != 0)
                server.GetBlowfish().Decrypt(payload);

            // Done!
            outType = type;
            outPayload = payload;
            return payloadSize + 0xc;
        }


Do you have discord?

Yuviapp
noob
Posts: 2
Contact:

Re: Daytona USA Progress

Post#243 » Sat Sep 09, 2023 7:16 pm

Xiden wrote:
Yuviapp wrote:
ioncannon wrote:
Not much further as trying to figure out the flow of the program w.o a debugger is frustrating. But you just made me think of something.... instead of trying to fix Flycast, why not patch Daytona to use a "free" port that Flycast understands? Will give it a try and see if I can debug in that case.

In the mean time I was actually reverse engineering the Onsen games. I got the whole protocol figured out (including the encryption and checksum), and got far enough into the login process that it connects into a "game" server. However a lot of the data is unknown and it never actually leaves the loading screen.

Image
Image

Code: Select all

If type & 0x1F != 0, encrypt it. Packet looks like:

[headerSize (always 0xC)][type][payloadSize][ip][crc32][data]

In the data it usually has a header like this but the counts can be used in other ways:

[opcode][responseCode][count1][count2][maxCount]



My parse code:

Code: Select all


Hey sir,

I wanted to follow up on this, as I also just recently started looking at One dice games to see if we can get them back online.
This was brought to my attention by PCWizard and wanted to follow up to see if you were still working on this, as I didn't want to step on you're shoes. If not maybe we could team up to complete it :D
        private int ParsePacket(byte[] data, int offset, int maxLength, out byte outType, out byte[] outPayload)
        {
            outType = 0;
            outPayload = null;

            int bytesRemaining = maxLength - offset;

            // Is there a header?
            if (bytesRemaining < 0xC)
                return 0;

            // Get details
            byte type = data[offset + 1];
            ushort payloadSize = (ushort)((data[offset + 3] << 8) | data[offset + 2]);

            // Is the full packet here?
            if (bytesRemaining < payloadSize)
                return 0;

            // The rest of the packet
            uint ipAddr = BitConverter.ToUInt32(data, offset + 4);
            uint checksum = BitConverter.ToUInt32(data, offset + 8);

            byte[] payload = new byte[payloadSize];
            Array.Copy(data, offset + 0xc, payload, 0, payloadSize);

            // Check CRC32
            uint crc32 = Utils.CalcCRC32(payload);
            if (crc32 != checksum)
                return 0;

            // Decrypt if needed
            if ((type & 0x20) != 0)
                server.GetBlowfish().Decrypt(payload);

            // Done!
            outType = type;
            outPayload = payload;
            return payloadSize + 0xc;
        }


Do you have discord?


I do yah, Please reach out to me on discord @yuvi, or twitter @yuviapp

Thanks :D

Sennar83
rebel
Posts: 19

Re: Daytona USA Progress

Post#244 » Sun Sep 24, 2023 3:02 pm

Is It possible tò play Daytona online using flycast?

User avatar
redjeff76
Anarki
Posts: 86

Re: Daytona USA Progress

Post#245 » Sun Sep 24, 2023 10:11 pm

nope, at this time no emulators

User avatar
Holsten
fragger
Posts: 258

Re: Daytona USA Progress

Post#246 » Mon Sep 25, 2023 6:13 am

Even on real hardware it barely works at the moment.
Holsten knallt am dollsten.

User avatar
redjeff76
Anarki
Posts: 86

Re: Daytona USA Progress

Post#247 » Mon Sep 25, 2023 11:01 am

I really have very little trouble with Daytona USA. As long as there are people to race online. After every race, every person in your group MUST log back out to the Server window that says "DreamPipe_Daytona" and then go back into the race's. If every racer doesn't do this Daytona will crash after each race. Also no player can use emulators to play Daytona. If each racer follows these rules I have played for hours with multiple people online before. Back out of each race to this window (to back out you push start after a race <exit team/race>, then push start and <exit to the entrance>. THEN push "B" to back up to the server list that shows the picture I posted below:
Attachments
20230918_005623.jpg

User avatar
Holsten
fragger
Posts: 258

Re: Daytona USA Progress

Post#248 » Mon Sep 25, 2023 2:51 pm

lucky for you then. I can barely play with anyone (not that i want to). I also feel kind of bad for some of my friends who really want to play but it never works for them.
Holsten knallt am dollsten.

User avatar
Xiden
Developer
Posts: 2225

Re: Daytona USA Progress

Post#249 » Mon Sep 25, 2023 2:56 pm

Holsten wrote:lucky for you then. I can barely play with anyone (not that i want to). I also feel kind of bad for some of my friends who really want to play but it never works for them.



Everyone needs to be on dreampi 1.8 and dmz or port forwarding. If its not working then someone likely just isnt setup correctly. Make sure you can all see each other yellow or blue orb in the lobby. If you see a red orb or no orb their ping is likely too high to connect.

User avatar
Holsten
fragger
Posts: 258

Re: Daytona USA Progress

Post#250 » Mon Sep 25, 2023 3:01 pm

i know we tried many times and many things
Holsten knallt am dollsten.

  • Similar Topics
    Replies
    Views
    Last post

Return to “Online”

Who is online

Users browsing this forum: No registered users