Project

General

Profile

Actions

Emulator Issues #6006

closed

USBGecko Emulation Sends 1 Byte at a Time

Added by dantarion about 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Feature request
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
Yes
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

The USBGecko Emulation seems to send one byte from its send buffer at a time, as opposed to clearing the send buffer as soon as it can.

I am writing a python lib that communicates with a USBGecko over a COM port, and I am using the same code to communicate with Dolphin over its TCP port based USBGecko Emulation.

The same code works with both the USBGecko, and Dolphin, but dolphin returns about 512 bytes a second, meaning it is pretty much useless for what I want to do, which is port GeckoDotNet to be able to connect to Dolphin
(no offense to Dolphin's debugging tools, but I like using what I like using :D)

I am working on a patch to send in to fix this, but I am having issues compiling dolphin on Windows 8 with VS2012 Express

Actions #1

Updated by Sonicadvance1 about 11 years ago

  • Status changed from New to Accepted
  • Issue type set to Feature request
  • Priority set to Normal
  • Relates to performance set to Yes
  • Operating system N/A added

You are quite correct. The implementation of USBGecko isn't quite the best, and in it's current implementation, it is locked at ~500byte/s depending on system sleep accuracy.

Actions #2

Updated by dantarion about 11 years ago

2I have begun work on this.
I also think I am going to write a guide on compiling Dolphin on Win8+VisualStudio2012, you have to do some weird things like recompile PortAudio right now and its pretty awkward.

Right now I am changing the code to build a char array by emptying the fifo queue, and sending that packet. I am now seeing speeds that flat out DESTROY using an actual USBGecko. I will submit a patch once I make a USBGecko Emulation unit test so I can that everything works.

Actions #3

Updated by Anonymous about 11 years ago

please make sure you don't break other things, like gdb and existing apps / libs which use usbgecko.

Actions #4

Updated by dantarion about 11 years ago

That is the goal, however, I am pretty sure any app that using USBGecko will have a massive speed improvement from receiving more than 1 byte per packet, and if those apps work fine with the current borked implementation, they should have no problem recieving the same data in larger chunks.

Actions #5

Updated by dantarion about 11 years ago

This is so small im going to just paste it in here....
With this code, I can use the USBGecko interface to dump all of mem1 in 14 seconds. While that is slower than just dumping memory from dolphin, I am going to be using my code to navigate data structures in memory, which I can't do with ANY tools that exist at this point.

I don't have any other apps to use with this to test if it breaks anything, all I know is that this fixes my problem.

	if (send_fifo.size())
	{
		char* packet = new char[send_fifo.size()];
		int i = 0;
		while(send_fifo.size())
		{
			packet[i++] = send_fifo.front();
			send_fifo.pop();
		}
		if (client.Send(packet, sizeof(u8)*i)
			== sf::Socket::Disconnected)
			client_running = false;
		//send_fifo.pop();
	}
Actions #6

Updated by skidau about 11 years ago

  • Status changed from Accepted to Fixed

This issue was closed by revision 123035a192d8.

Actions #7

Updated by skidau about 11 years ago

This issue was closed by revision 123035a192d8.

Actions

Also available in: Atom PDF