forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Serial Port on PSP checksum calculations

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
d4rkn1c0n



Joined: 21 Sep 2006
Posts: 2

PostPosted: Thu Sep 21, 2006 12:03 pm    Post subject: Serial Port on PSP checksum calculations Reply with quote

Well I am looking into writing software to communicate with the psp through the serial port. I need to know how the checksum for the rs232 transmision is calculated. I have found some stuff on it but it is for a device called a cybiko and they use 2 different checksums depending on the type of data being sent. Here is the link.http://www.devrs.com/cybiko/files/xferinfo.txt The checksum calculations are at the bottom. Thanks for any help.
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Thu Sep 21, 2006 1:48 pm    Post subject: Reply with quote

What checksum?
If you're talking about emulating the PSP remote, see http://forums.ps2dev.org/viewtopic.php?t=986,
If you're just sending your own data, use whatever checksum you'd like, or just don't use one at all. There is no standard checksum or data format for RS232.
Back to top
View user's profile Send private message
d4rkn1c0n



Joined: 21 Sep 2006
Posts: 2

PostPosted: Fri Sep 22, 2006 12:31 am    Post subject: Reply with quote

But it said on this sitehttp://mc.pp.se/psp/phones.xhtml that the psp command packet looks like this.

Quote:

The PSP communicates with the microcontroller inside the remote control using RS232 serial communication (although the voltages are different of course, 0V and +2.5V) using 8N1 framing at 4800bps. The protocol consists of command packages which can be send by either the PSP or the remote control. A package is exchanged as follows:

Sender Receiver Explanation
0xF0 Request to transmit
0xF8 Clearance to transmit
0xFD Packet starts
cmd Command code + phase
params ... Zero or more bytes of parameter data
checksum XOR of the cmd and params bytes
0xFE Packet ends
0xFA/0xFB Packet received correctly

it said xor of the cmd and params bytes. is it a checksum of one byte and it start initially with 0x00 or initially with the first byte of cmd or what?
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Fri Sep 22, 2006 3:33 am    Post subject: Reply with quote

d4rkn1c0n wrote:
But it said on this sitehttp://mc.pp.se/psp/phones.xhtml that the psp command packet looks like this.

Quote:

The PSP communicates with the microcontroller inside the remote control using RS232 serial communication (although the voltages are different of course, 0V and +2.5V) using 8N1 framing at 4800bps. The protocol consists of command packages which can be send by either the PSP or the remote control. A package is exchanged as follows:

Sender Receiver Explanation
0xF0 Request to transmit
0xF8 Clearance to transmit
0xFD Packet starts
cmd Command code + phase
params ... Zero or more bytes of parameter data
checksum XOR of the cmd and params bytes
0xFE Packet ends
0xFA/0xFB Packet received correctly

it said xor of the cmd and params bytes. is it a checksum of one byte and it start initially with 0x00 or initially with the first byte of cmd or what?

Go back and read what I said:
jimparis wrote:
If you're talking about emulating the PSP remote, see http://forums.ps2dev.org/viewtopic.php?t=986

That thread answers your question:
mc wrote:
After the command comes zero or more data bytes, depending on the command, and finaly a checksum, which is XOR of the command byte and all data bytes.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group