SIO Library for Tails's SDK

All other SDK help, questions and information
Post Reply
User avatar
Shendo
C Programming Expert
C Programming Expert
Posts: 238
Joined: March 21st, 2012, 4:34 am
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-9002
Location: Croatia, EU

SIO Library for Tails's SDK

Post by Shendo » July 21st, 2013, 4:56 pm

I've made a simple library for using the PS1's serial port with the Tails92's open source SDK.
It allows you to set up the transfer rate (bitrate/baud) and receive and send data via simple to use functions.

I also included a sio echo example which will show you how to properly use this library.
I have also contacted Tails92 so hopefully he will integrate this into his SDK. For now you can use it standalone.

Image
You do not have the required permissions to view the files attached to this post.
My PS1 consoles: 2 x SCPH-1002, SCPH-5552, SCPH-7002, 4x SCPH-9002, 2 x SCPH-102.
Dev console: SCPH-9002, MM3 - 7 wire modchip, PAL color mod, CH340 serial cable addon.

rsoft
Rookie Programmer
Rookie Programmer
Posts: 19
Joined: June 22nd, 2013, 1:33 am
Location: /home/rsoft

Re: SIO Library for Tails's SDK

Post by rsoft » July 23rd, 2013, 11:54 pm

Well done!
I have yet to test this but i'm sure it's going to work. ^^

legacy
Curious PSXDEV User
Curious PSXDEV User
Posts: 25
Joined: September 4th, 2013, 9:11 pm

Re: SIO Library for Tails's SDK

Post by legacy » September 5th, 2013, 8:37 am

Code: Select all


unsigned char ReadByteSIO()
{
        return *(unsigned char*)SIO_TX_RX;
}
this piece of code has no wait-uart-rx-till-ready ready, is it right ?
is it blocking by hardware ? it looks uncommon to me

User avatar
Shendo
C Programming Expert
C Programming Expert
Posts: 238
Joined: March 21st, 2012, 4:34 am
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-9002
Location: Croatia, EU

Re: SIO Library for Tails's SDK

Post by Shendo » September 5th, 2013, 8:39 am

Yes. You need to check if there is any data to read in the buffer with CheckSIOInBuffer().
My PS1 consoles: 2 x SCPH-1002, SCPH-5552, SCPH-7002, 4x SCPH-9002, 2 x SCPH-102.
Dev console: SCPH-9002, MM3 - 7 wire modchip, PAL color mod, CH340 serial cable addon.

legacy
Curious PSXDEV User
Curious PSXDEV User
Posts: 25
Joined: September 4th, 2013, 9:11 pm

Re: SIO Library for Tails's SDK

Post by legacy » September 5th, 2013, 8:44 am

A data byte can be read when SIO_STAT.1=1

Code: Select all

uint8_t ReadByteSIO()
{
        while ( ((*SIO_STAT & 0x2)>>1) !=1 )
                {
                /* wait */
                }
        return *SIO_RX;
}

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest