aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Vymetálek <pavel@vym.cz>2025-11-01 07:50:26 +0100
committerPavel Vymetálek <pavel@vym.cz>2025-11-01 07:50:26 +0100
commitad54bc3e014ed6e92fd6f74ad3944e6feb9fc2b7 (patch)
treeed7c7f0031bbad96565812b147713a6b546cdc98
parent0a4fc433732a9bfcb443ae35944272d7d0f5b70e (diff)
downloadsercp-pc-ad54bc3e014ed6e92fd6f74ad3944e6feb9fc2b7.tar.gz
Add higher baudrates supportHEADv0.8.2master
-rw-r--r--CHANGELOG3
-rw-r--r--sercp.c22
-rw-r--r--sercp.rc8
3 files changed, 21 insertions, 12 deletions
diff --git a/CHANGELOG b/CHANGELOG
index fbc21fd..50c080e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,5 @@
-2025-06-06 v0.8.1 sercp-zx use configuration file .sercprc in your home directory. Thanks to Dusky/UB880D
+2025-11-01 v0.8.2 higher baudrates from 230400Bd to 921600d is allowed
+2025-06-06 v0.8.1 sercp-pc use configuration file .sercprc in your home directory. Thanks to Dusky/UB880D
2024-03-10 v0.8.0 unified version number to sercp at speccy side
2024-01-11 v0.4.0 use new ACK messages instead hw-flow control
2020-05-01 v0.3.5 use gnu99 instead of gnu11, add O_NDELAY to serial port initialization
diff --git a/sercp.c b/sercp.c
index 8d9d0a0..d119af4 100644
--- a/sercp.c
+++ b/sercp.c
@@ -68,7 +68,7 @@
#define FALSE 0
#define true 1
#define TRUE 1
-const char* _version = "v0.8.1";
+const char* _version = "v0.8.2";
// SERIAL
FILE *tapout_fd = NULL;
int is_outfile = 0;
@@ -960,9 +960,19 @@ int OpenUart() {
#endif
tcgetattr(serial_fd, &oldtio); /* save current port settings */
- bzero(&newtio, sizeof (newtio));
+ // bzero(&newtio, sizeof (newtio));
+ memset(&newtio, 0x00, sizeof(newtio));
cfmakeraw(&newtio);
switch (baud_rate){
+ case 921600:
+ newtio.c_cflag = B921600;
+ break;
+ case 460800:
+ newtio.c_cflag = B460800;
+ break;
+ case 230400:
+ newtio.c_cflag = B230400;
+ break;
case 115200:
newtio.c_cflag = B115200;
break;
@@ -989,8 +999,8 @@ int OpenUart() {
break;
default:
baud_rate = 38400;
- newtio.c_cflag = B38400;
- break;
+ newtio.c_cflag = B38400;
+ break;
}
cfsetospeed(&newtio, baud_rate);
cfsetispeed(&newtio, baud_rate); // set ispeed same as ospeed (see POSIX)
@@ -1003,10 +1013,9 @@ int OpenUart() {
}
#else
if (is_flow_control_hw) {
- // standard CTS/RTS flow control
+ // standard CTS/RTS flow control for old .sercp protocol
newtio.c_cflag |= CS8 | CLOCAL | CREAD | CRTSCTS;
} else {
- // usefull for eLeMeNt ZX and machines or serial port without CTS/RTS wires
newtio.c_cflag |= CS8 | CLOCAL | CREAD;
}
#endif
@@ -1031,7 +1040,6 @@ int main(int argc, char** argv, char** env)
width = GetTerminalWidth();
ParseCfg();
if (argc < 2) {
- // printf("You must specify the Serial device and file\n");
usage();
exit(1);
}
diff --git a/sercp.rc b/sercp.rc
index 0e723fe..5784771 100644
--- a/sercp.rc
+++ b/sercp.rc
@@ -1,8 +1,8 @@
// RC file, codepage utf-8!
#include <windows.h> // include for version info constants
1 VERSIONINFO
-FILEVERSION 0,8,0,0
-PRODUCTVERSION 0,8,0,0
+FILEVERSION 0,8,2,0
+PRODUCTVERSION 0,8,2,0
FILETYPE VFT_APP
{
BLOCK "StringFileInfo"
@@ -10,14 +10,14 @@ FILETYPE VFT_APP
BLOCK "040904E4"
{
VALUE "CompanyName", "vym.cz"
- VALUE "FileVersion", "0.8.0"
+ VALUE "FileVersion", "0.8.2"
VALUE "FileDescription", "sercp - serial copy for ZX Spectrum"
VALUE "InternalName", "sercp"
VALUE "LegalCopyright", "GNU GPL v3 or above"
VALUE "LegalTrademarks", "Pavel Vymetálek"
VALUE "OriginalFilename", "sercp"
VALUE "ProductName", "sercp"
- VALUE "ProductVersion", "0.8.0"
+ VALUE "ProductVersion", "0.8.2"
VALUE "Build environment", "Linux: Mingw64, x86_64"
}
}