USB Communication
Moderators: BigEvilCorporation, prophet36
USB Communication
Just curious if anyone has been able to send data outa via the high speed USB port yet. Any examples or even a hardware register list perhaps or read/write rules when accessing the USB port?
Re: USB Communication
All the MD-accessible hardware registers are described here. Architecturally, there is no way to directly send data over USB from the MD side, because USB itself is a master-initiated protocol: in order to simulate device-initiated requests, the host has to poll each device. All the existing MD<->host communication is orchestrated using a simple semaphore (this is possible because the SDRAM controller effectively makes the cart RAM dual-ported; it's accessible from the host side and from the MD side). You could do the same thing in reverse, i.e the MD writes an address and length at some agreed-upon memory location whereupon writing the length triggers a host read from the specified block of memory. The host side would need to periodically poll this agreed-upon location, waiting for these "memory transfer" commands from the MD. Does that make sense?jtn0514 wrote:Just curious if anyone has been able to send data outa via the high speed USB port yet. Any examples or even a hardware register list perhaps or read/write rules when accessing the USB port?
Re: USB Communication
Ooops, sorry about the magic numbers! I should fix that. Basically,
CMD_RUNNING=0 --> MD is busy executing a command
CMD_READY=1 --> MD is ready to accept a new command
CMD_REQUEST=2 --> Host has written a new command for the MD to execute
CMD_RUNNING=0 --> MD is busy executing a command
CMD_READY=1 --> MD is ready to accept a new command
CMD_REQUEST=2 --> Host has written a new command for the MD to execute
Code: Select all
commandLoop:
cmp.w #2, cmdFlag /* see if host has left us... */
bne.s commandLoop /* ...a command to execute */