Coder Social home page Coder Social logo

hellokitty / booma.proxy Goto Github PK

View Code? Open in Web Editor NEW
34.0 14.0 7.0 10.6 MB

Collection of C#/.NET libraries for communication, understanding and emulating Phantasy Star Online Blue Burst. Both client and server.

License: GNU Affero General Public License v3.0

C# 99.84% Batchfile 0.16%
pso psobb phantasy phantasystaronline emulator emulation server sega dreamcast gamecube

booma.proxy's Introduction

Booma.Proxy

Booma.Proxy is actually not a Proxy. It is a collection of C#/.NET libraries for communication, understanding and emulating Phantasy Star Online Blue Burst. These can be used to construct an emulated PSOBB server or an emulated PSOBB client.

This project is built on top of 17 years of the reverse engineering work done by many in the community, Sodaboy's proxy, Sylverant's opensource C++ DC/BB/GC server implementation and one of the most recent public Tethella releases.

Special thanks to Soly for implementing and explaining the cryptography involved!

How and Why

Booma.Proxy's relies on the extendable and flexible metadata-based serializer that I built for the World of Warcraft protocol, FreecraftCore.Serializer. FreecraftCore.Serializer was chosen because of the productivity, readable, performance and usability it provides. It allows for modeling binary structures like packets as DTOs directly as C# Types at a high level.

Builds

Booma.API.Common

Booma.Crypto.Common

Booma.Packet.Common

Booma.Packet.Patch

Booma.Packet.Game

License

Contributions including pull requests, commits, notes, dumps, gists or anything else in the repository are licensed under the below licensing terms.

AGPL 3.0 with a seperate unrestricted, non-exclusive, perpetual, and irrevocable license also granted to Andrew Blakely

booma.proxy's People

Contributors

hellokitty avatar solybum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

booma.proxy's Issues

Cleanup Leftover Components

There are many left over MonoBehaviours, many from the game/lobby related work, that need to be cleaned up after the new design is finished. Tons of them. It'll be confusing for future contributors if these are left around.

Research 0x6D 6D Item game join packets

0x6D appears to contain game state data for when we join. This data indicates the dynamic state such as inventory, items dropped and probably creature information/map changes since start.

Research 0x62 0x71

Find out what this 2 byte command does. Testing with multiple clients seems to indicate that it's always two 0 bytes. But maybe this changes depending on things?

Beat Time Repeating Accuracy

The Beat time event scheduler for repeating events appears to have some inaccuracy. It doesn't sync up with the PSOBB client repeating Beat-based events.

Fix Rotations

Thanks to Schthack I finally know, but don't understand lol, what was wrong with rotation serialization! All off-by-one rotation errors are solvable now.

Should go through and fix existing packets with rotation. See: https://github.com/HelloKitty/Booma.Proxy/blob/faa5eff246bdc5e7eea2041234baa4e9e44cf88f/src/Booma.Proxy.Packets.BlockServer/Commands/Command60/Sub60PlayerAttackStepOneCommand.cs for information.

Or this code
public void OnBeforeSerialization()
{
RawNetworkRotation = (short)(YAxisRotation * 182.04444f);
}

///
public void OnAfterDeserialization()
{
YAxisRotation = (RawNetworkRotation & 0xffff) / 182.04444f;
}

Packet 0x67 Size Incompatibility

Tethealla will send an additional 2 bytes for 0x67 that isn't needed according to @Solybum . Additionally Sylverant does not seem to send, I think, these 2 0 bytes at end of the 0x67 like Teth does.

For compatibility with this client this must be fixed for any server that wishes to connect with it.

Mirgate UI Adapters to New Design

UI adapters as they are now do a lot. They expose config to the editor, they handle the complexity of exposing the metadata needed for their registration AND their child type handles implementing the logic of the actual adapter. For that reason, and for the reason of needing a adapters composable (can't be monobehaviours) it's important to migrate to the new adapter logic being in non-monobehaviour AdapterImplementation types.

See: https://github.com/HelloKitty/Booma.Proxy/blob/681df58c4ccfb5dd631628c2a0524b5f01e6938a/src/Booma.Proxy.Client.Unity.Common/UI/Abstraction/Implementation/UnityButtonUIButtonAdapterImplementation.cs

0xE5 Serialization Mismatchs

Serialization model based on Sylverant. See: https://github.com/Sylverant/libsylverant/blob/e1a01d5586ed12d41b99c5cf1ba955e32b173950/include/sylverant/characters.h#L126

Currently failing packet capture tests from Tethealla.

Original
E5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 20 34 32 30 30 30 30 30 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 01 00 03 2A 00 00 00 05 00 03 00 00 00 00 00 00 00 FF 00 5A 00 B2 00 AB AA AA 3E 00 00 00 3F 09 00 45 00 6D 00 65 00 65 00 70 00 00 00 00 00 00 00 00 00 00 00 00 00 70 C9 05 00 00 00 00 00 70 C9 05 00

Result:
E5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 20 34 32 30 30 30 30 30 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 01 00 03 2A 00 00 00 05 00 03 00 00 00 00 00 00 00 FF 00 5A 00 B2 00 AB AA AA 3E 00 00 00 3F 09 00 45 00 6D 00 65 00 65 00 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 C9 05 00

70 C9 05 00 appears in the buffer twice for some reason in the original.

Capture: 0xE5_d3c4fae6-51c7-4cf4-80af-365badaf0134.packet

E5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 20 34 32 30 30 30 30 30 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 01 00 03 2A 00 00 00 05 00 03 00 00 00 00 00 00 00 FF 00 5A 00 B2 00 AB AA AA 3E 00 00 00 3F 09 00 45 00 6D 00 65 00 65 00 70 00 00 00 00 00 00 00 00 00 00 00 00 00 70 C9 05 00 00 00 00 00 70 C9 05 00

å����������������� 42000002��������������ÿÿÿÿ�������������������� ���*�������������ÿ�Z�²�«ªª>���? �E�m�e�e�p�������������pÉ������pÉ��

Reconsider New Names for 0x6F Packet

Switches and Doors

When pressing a switch these packets are sent 0x60 (not in this order maybe):
60 00 00 00 00 00 3F 06 00 00 00 00 FC CE 01 00 0A 00 F7 46 E4 C2 52 85 B9 41 04 73 8C 42

60 00 00 00 00 00 05 03 6C 40 00 00 00 00 07 00 01 01

60 00 00 00 00 00 50 02 00 00 FC CE FF FF

Notes:

0x60 0x05 seems to contain the the MapObjectIdentifier in the first two bytes of the subcommand. Last bytes are unknown. The identifier for the switch, not the door.

FC CE in the 0x60 0x50 seems to be animation state which is also sent in the 0x60 0x3F for some reason. I assume the first two bytes are also the client id that pressed it, but don't know for sure.

Teth vs DTO 0xE3 Mismatch CharacterOptionsResponsePayload

The DTO is implemented based Sylverant struct but that causes an additional 4 bytes more add the end of the packet compared to what Tethealla sends. Don't know what to do for this packet at the moment, the client works without it being perfect.

Below is a packet capture. Only the last 4 bytes are different.

Message: Failed: Mismatched length on OpCode: BB_OPTION_CONFIG_TYPE - 0xE2 Type: CharacterOptionsResponsePayload
Expected: 2808
But was: 2816
Original bytes:
E2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 FF FF FF FF 0 0 0 0

Serialization Error in 0x60 0x3E

Newly added packet testcases show that when serializing the Sub60FinishedMovingCommand and then reserializing it the binary representation changes sightly at offset 12. The rotation. Some bits are being lost due to our incomplete conversion.

Will need to address this at some point.

Boxes and Attacks

Compiling some data here:

References:
https://sylverant.net/wiki/index.php/Packet_0x60#Subcommand_0x46

Data:

step of an attack is finished packet but nothing hit:
60 00 00 00 00 00 46 02 00 00 00 00 00 00

step of an attack is finished packet but something hit:
60 00 00 00 00 00 46 03 00 00 01 00 00 00 80 40 00 00

box break packet linked to previous packet:
60 00 00 00 00 00 0B 03 80 40 01 00 00 00 80 00 00 00

step of an attack is finished packet when 2 things are hit:
60 00 00 00 00 00 46 04 00 00 02 00 00 00 6E 10 00 00 6D 10 00 00

step of an attack if finished packet when 4 things are hit:
60 00 00 00 00 00 46 06 00 00 04 00 00 00 38 40 00 00 39 40 00 00 37 40 00 00 36 40 00 00

step of an attack if finished packet when 3 creatures are hit:
60 00 00 00 00 00 46 05 00 00 03 00 00 00 5E 13 00 00 5F 13 00 00 60 13 00 00
60 00 00 00 00 00 46 05 00 00 03 00 00 00 5E 13 00 00 5F 13 00 00 60 13 00 00 (2nd time)

Some claws hit:
60 00 00 00 00 00 46 06 00 00 04 00 00 00 9C 14 00 00 A0 14 00 00 A1 14 00 00 9D 14 00 00

Hit bunch of boxes in Ruins:
60 00 00 00 00 00 46 06 00 00 04 00 00 00 FB 44 00 00 FC 44 00 00 F8 44 00 00 FA 44 00 00

Second byte of the 2 byte non-0 chunk in the short-length prefixed array is NOT type. Seems to change, not consistent. Must be some sort of ID or something.

Doc Gen Links Broke

Since refactoring the Doc Gen links to packet structures in the repository are broken. Need to fix them eventually!

Creature Damage

Some packet logs from attacking Boomas and Rappies in Forest01 variant 2:
60 00 00 00 00 00 0A 03 6B 10 6B 00 1D 01 00 02 80 20
60 00 00 00 00 00 0A 03 70 10 70 00 A3 02 00 02 B0 20
60 00 00 00 00 00 0A 03 6B 10 6B 00 8B 02 00 02 80 20
60 00 00 00 00 00 0A 03 70 10 70 00 83 03 00 0A B0 20
60 00 00 00 00 00 0A 03 6F 10 6F 00 83 03 00 0A 90 20
60 00 00 00 00 00 0A 03 6E 10 6E 00 9B 00 00 02 90 20
60 00 00 00 00 00 0A 03 6E 10 6E 00 FC 02 00 03 90 20
60 00 00 00 00 00 0A 03 6C 10 6C 00 3D 03 00 0A 80 20
60 00 00 00 00 00 0A 03 6F 10 6F 00 E3 00 00 02 90 20
60 00 00 00 00 00 0A 03 6B 10 6B 00 21 03 00 02 80 20
60 00 00 00 00 00 0A 03 6B 10 6B 00 43 02 00 02 80 20
60 00 00 00 00 00 0A 03 6F 10 6F 00 75 01 00 02 90 20
60 00 00 00 00 00 0A 03 6F 10 6F 00 EE 02 00 02 B0 20
60 00 00 00 00 00 0A 03 6C 10 6C 00 4A 00 00 02 80 20
60 00 00 00 00 00 0A 03 70 10 70 00 F1 02 00 02 90 20
60 00 00 00 00 00 0A 03 6B 10 6B 00 8A 00 00 02 80 20
60 00 00 00 00 00 0A 03 70 10 70 00 9A 00 00 02 B0 20

Make Message to Handler Constant Time

Right now it takes O(n) time to find a packet handler for a particular packet. This allows for binding new handlers at runtime, allows for configuration easier and such and hotloading/reloading. Most useful for severs.

However, this isn't very useful for clients and with subcommands caching for routing isn't very reasonable or possible without hacks. We need an O(1) solution for faster packet handling.

0x67 Deserialization Errors

0x67 in pre-library branch is failing deserialization:

This mostly is here for reference as the project migrated to GladNet4 and 4.x of the FreecraftCore.Serializer

    
     Exception: Failed to set member LobbyCharacterData on Type: Booma.Proxy.BlockLobbyJoinEventPayload for Type: BlockLobbyJoinEventPayload Exception: Failed to set member PlayerHeader on Type: Booma.Proxy.CharacterJoinData for Type: CharacterJoinData Exception: Failed to set member unk4 on Type: Booma.Proxy.PlayerInformationHeader for Type: PlayerInformationHeader Exception: Failed to read a desired bytes from the stream. Count: 1314 Position: 1312 Requested: 4... Stack:    at FreecraftCore.Serializer.DefaultMemberSerializationMediator`2.SetMember(TContainingType obj, IWireStreamReaderStrategy source)
       at FreecraftCore.Serializer.ComplexTypeSerializer`1.SetMembersFromReaderData(TType obj, IWireStreamReaderStrategy source)
       at FreecraftCore.Serializer.ComplexTypeSerializerDecorator`1.Read(TComplexType obj, IWireStreamReaderStrategy source)
       at FreecraftCore.Serializer.ComplexTypeSerializerDecorator`1.Read(IWireStreamReaderStrategy source)
       at FreecraftCore.Serializer.SimpleTypeSerializerStrategy`1.FreecraftCore.Serializer.ITypeSerializerStrategy.Read(IWireStreamReaderStrategy source)
       at FreecraftCore.Serializer.KnownTypes.SubComplexTypeSerializerDecorator`1.Read(IWireStreamReaderStrategy source)
       at FreecraftCore.Serializer.SimpleTypeSerializerStrategy`1.FreecraftCore.Serializer.ITypeSerializerStrategy.Read(IWireStreamReaderStrategy source)
       at FreecraftCore.Serializer.SerializerService.Deserialize[TTypeToDeserializeTo](IWireStreamReaderStrategy source)
       at FreecraftCore.Serializer.SerializerService.Deserialize[TTypeToDeserializeTo](Byte[] data)
       at Booma.Proxy.CapturedPacketsTests.Generic_CanDeserialize_CaptureTest[TBasePayloadType](PacketCaptureTestEntry entry) in C:\Users\Glader\Documents\Github\Booma.Proxy\tests\Booma.Proxy.Packets.Tests\UnitTests\CapturedPacketsTests.cs:line 115```

Potential Tethealla Bug in 0x7 and 0xA0 Padding

Ship list and block list seem to have 8 bytes at the end of them that they do not need. Seems like overpadding by Tethealla. Though it could be something more, investigate.

Example:

Message: Failed: Mismatched length on OpCode: BLOCK_LIST_TYPE - 0x7 Type: ShipBlockListEventPayload
Expected: 192
But was: 184
Original bytes:
7 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 30 0 31 0 3A 0 55 0 6E 0 63 0 6F 0 6E 0 66 0 69 0 67 0 75 0 72 0 65 0 64 0 0 0 8 0 0 0 12 0 FF FF FF EF 0 0 42 0 4C 0 4F 0 43 0 4B 0 30 0 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 0 FE FF FF EF 0 0 42 0 4C 0 4F 0 43 0 4B 0 30 0 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 0 0 FF FF FF 0 0 53 0 68 0 69 0 70 0 20 0 53 0 65 0 6C 0 65 0 63 0 74 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Result:
7 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 30 0 31 0 3A 0 55 0 6E 0 63 0 6F 0 6E 0 66 0 69 0 67 0 75 0 72 0 65 0 64 0 0 0 8 0 0 0 12 0 FF FF FF EF 0 0 42 0 4C 0 4F 0 43 0 4B 0 30 0 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 0 FE FF FF EF 0 0 42 0 4C 0 4F 0 43 0 4B 0 30 0 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 0 0 FF FF FF 0 0 53 0 68 0 69 0 70 0 20 0 53 0 65 0 6C 0 65 0 63 0 74 0 0 0 0 0 0 0 0 0 0 0 0 0

HxD of original packet:

................0.1.:.U.n.c.o.n.f.i.g.u.r.e.d.........ÿÿÿï..B.L.O.C.K.0.1.........................þÿÿï..B.L.O.C.K.0.2..........................ÿÿÿ..S.h.i.p. .S.e.l.e.c.t.....................

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.