PDA

View Full Version : Research on the LinkCable connectivity through the Internet



dreamerx
13th November 2012, 10:12 PM
Hi guys,

First of all I would like to tell you that this post is not an another wish for Link Cable plugin for any of the PSX emulators (later on that subject). The second thing is that I would not share any informations which would possibly break the copyright law as it is prohibited on this forum (obviously :)). I would like to share with you some of results of my diggins (which are positive!) - even if this post is not about WipEout itself I wanted to tell you about this because there is a chance that we would might have the opportunity to play WO2097 or 3 online :), but before I will do it I would like to introduce myself a little bit.

I've started programming since I was 13, it was 13 years ago. I've had some breaks from programming but now I'm working as a professional programmer for 6 years now. From over one year I'm working as the game porting programmer, which means that we are doing game ports from/to consoles to/from other consoles/PCs. Also I've solid background in electronics (mainly digital), I've made two simple devices, like game controller (from scratch) and device which measures skin resistance for my BSc thesis. Also I have solid knowledge about networks. So I think that I'm capable of doing something on making LC connectivity through the Internet real. Even if not, I'm able to help with research on that subject.

OK, there is the story :) After talking with Asa on the last EWC on AmigoJacks balcony about possibility of making LinkCable data transfer through the Internet. I've started digging on that subject one week ago because I would love to play Wipeout 2097 and 3 through the Internet (I was dreaming about it when WO3 came out). I think that the best solution is what Asa mentioned, the hardware one. I've done some research on it but before I will write what I'm planning to do in case of hardware solution, I would like to tell you about 2nd one, the software one (of course :)).

Software solution means making the LC plugin for existing PS emulator, which communicates with other plugin through the network. Since this solution is a little bit easier for me and would gave me very important informations about how LC driver and hardware works I've decided to start with that solution and I've chosen the PCSX-Reloaded emulator since it's open sourced. There was something done in case of handling LC plugins, but it's not finished and emulator is lacking few important things to make it.

The first thing that I've done was modifying PCSXRs GUI so I was able to choose my plugin from UI. Then I've made the LC null plugin (means just a plugin base) and I was checking what Wipeout3:SE is trying to write/read to/from the hardware registers - addresses of that registers were pointed out already in PCSX code. After that I've dissasembled the game code and found the LC driver subroutines by finding the code which reads/writes to LC port hardware registers. Then I've digged more in the dissasembled code to find out how driver code is handling hardware changes. Later on I've simulated two scenarios in which driver assumed that second console is connected and wanted game to read (first scenario) and write (2nd one) the data from/to the LC port using BIOS calls (I have to modify BIOS read/write procedures). Since I didn't simulated reading/writing yet and connection handshake was unsuccessful driver told the game that connection was lost and game displayed this information on the screen (screenshot from the PCSXR below). So far so good, I think that connection itself it's possible. Even with the internet connection lag there will be possibility to fake the correct values on the hardware registers, but I'm not sure if game will handle the lag properly. In theory it would be possible to read that from the dissasembled game code how it handles lags (if it is), eventually modify it later but it will be f*cking hard task (requires a lot of time which I unfortunately don't have) so I will just continue my work on the emulator and the plugin itself preying that unmodified game will handle the lag correctly. Now I will continue my work on the modyfying the emulator code to handle read/writes via LC plugin, then writing the plugin itself. I don't know how long it will take, I don't have much free time right now.

7030

About the hardware solution:
It would mean transferring all the data from/to PS by connecting it to PC via self-made device. Then transfer it to another computer in the network via standard TCP/IP protocol. Theory sounds pretty easy but first of all we need to find out which pin means what be doing some reverse engineering. By reverse engineering i mean recording the line states using digital signal analyzer connected into the cable after connecting it to both PSXs - it's possible and I will do it in one/two weeks (I need to buy everything needed first :)) - this would give us really important information about the proper line states and proper state change timings also would might to be useful. With the result It will be possible to make some assumptions of how the hardware communicates. After that I'm planning to use some ready to use micro controller board with some peripherials which would allow me to connect the LC wirings to the board and make software for it. There would be some voltage converters and hardware data buffers needed since LC port works at not conventional speeds of standard serial ports. Next thing to do will be the application which reads/writes to the device and communicates with its second instance through the network. It requires a lot of work, but it's not impossible I think. But firstly I will stick to the pure software solution.

Sorry for some technical details but I really wanted to write as much as it's possible since nobody did posted such informations on the Internet yet. I didn't have written everything I know, but it would mean go even deeper into the technicals and probably I would break the law.... If someone is interested in helping I can share everything I now and have, I will do it anyway later but now I want to focus on doing the research.

If I will have more results I will share it if someone here would be interested :)

rdmx
14th November 2012, 03:22 PM
This is an interesting project and I'm interested to see how it goes.

Are you basically reverse engineering assembly code though? There's also no knowing how the game will deal with latency like you said...

If you're actually able to access the game's assembly code, I think another interesting project would be trying to recreate the physics engine...

dreamerx
14th November 2012, 10:38 PM
Yes, currently I'm reverse engineering assembly code of the game and then modifying the emulator. I was thinking about taking the physics code under the "investigation" and rewrite it to higher level language, but this will require even more work than reverse engineering the code that handles LinkCable port which is priority for me right now :) Glad to hear that someone is interested - stay tuned for rare updates (it's slow process, sorry :))

Asayyeah
29th November 2012, 09:20 PM
It's a truly amazing project software and hardware to emulate ilink and I hope it's not that much time consuming for you and your current job. Don't do that if you fail into your job duties, but if this can be true you ll make at least 2 people furiously happy : Al and me !
Looking forward to your latest news about this :)

Medusa
29th November 2012, 11:31 PM
I think there's more who'd be really excited, it's just we don't really have a clue what all that means, other than, "link cable to play W3O over internet" :O

Droolingly exciting, really!

MENGKESHI
4th December 2012, 09:12 PM
Wow, as a fellow career software developer, I have to say I've always really respected you console emulation guys - keep living the dream! :D