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.
SIO Library for Tails's SDK
-
Shendo Verified
- C Programming Expert
- Posts: 250
- Joined: Mar 21, 2012
- I am a: Programmer
- Motto: Never settle
- PlayStation Model: SCPH-7502
- Discord: ShendoXT
- Location: Croatia, EU
SIO Library for Tails's SDK
You do not have the required permissions to view the files attached to this post.
Dev console: SCPH-7502, FreePSXBoot, CH340 serial cable.
Well done!
I have yet to test this but i'm sure it's going to work. ^^
I have yet to test this but i'm sure it's going to work. ^^
Code: Select all
unsigned char ReadByteSIO()
{
return *(unsigned char*)SIO_TX_RX;
}
is it blocking by hardware ? it looks uncommon to me
-
Shendo Verified
- C Programming Expert
- Posts: 250
- Joined: Mar 21, 2012
- I am a: Programmer
- Motto: Never settle
- PlayStation Model: SCPH-7502
- Discord: ShendoXT
- Location: Croatia, EU
Yes. You need to check if there is any data to read in the buffer with CheckSIOInBuffer().
Dev console: SCPH-7502, FreePSXBoot, CH340 serial cable.
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;
}
Who is online
Users browsing this forum: No registered users and 3 guests