From: ljsebald <ljs...@us...> - 2023-02-22 15:11:27
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 0aa7b383a840ac85b2bb2840675a8902a24ecd30 (commit) via 96c07a71553bfb17bd8913ffe61d7ad0ed439b26 (commit) from 9db78833f9f1228318f42b6ef1bd97593273f48c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0aa7b383a840ac85b2bb2840675a8902a24ecd30 Author: Ruslan Rostovtsev <sw...@21...> Date: Wed Feb 22 22:10:47 2023 +0700 Change default serial baudrate to 115200. (#106) Also add support for external clock. commit 96c07a71553bfb17bd8913ffe61d7ad0ed439b26 Author: Falco Girgis <gyr...@gm...> Date: Tue Feb 21 21:21:32 2023 -0500 Updated GCC dependencies for testing config.mk (#108) * Updated GCC dependencies for testing config.mk - As requested by Sizious for DreamSDK * Reverted updated ARM GCC dependency versions ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/scif.c | 15 +++++++-------- kernel/arch/dreamcast/include/arch/arch.h | 2 +- utils/dc-chain/config.mk.testing.sample | 8 ++++---- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/scif.c b/kernel/arch/dreamcast/hardware/scif.c index 9df880e..ceb7eed 100644 --- a/kernel/arch/dreamcast/hardware/scif.c +++ b/kernel/arch/dreamcast/hardware/scif.c @@ -193,23 +193,21 @@ int scif_init_fake() { return 0; } -/* Initialize the SCIF port; baud_rate must be at least 9600 and - no more than 57600. 115200 does NOT work for most PCs. */ +/* Initialize the SCIF port; */ /* recv trigger to 1 byte */ int scif_init() { int i; unsigned char scbrr2; unsigned short scsmr2; - /* int fifo = 1; */ - /* If dcload-serial is active, then do nothing here, or we'll screw that up. */ if(dcload_type == DCLOAD_TYPE_SER) return 0; - /* Disable interrupts, transmit/receive, and use internal clock */ - SCSCR2 = 0; + /* Disable interrupts, transmit/receive, + and use internal or external clock */ + SCSCR2 = serial_baud ? 0x0 : 0x02; /* Enter reset mode */ SCFCR2 = 0x06; @@ -226,7 +224,7 @@ int scif_init() { scsmr2 = 2; scbrr2 = (50000000 / (512 * serial_baud)) - 1; } - else { + else if (serial_baud) { scsmr2 = 3; scbrr2 = (50000000 / (2048 * serial_baud)) - 1; } @@ -255,7 +253,8 @@ int scif_init() { SCLSR2 = 0; /* Enable transmit/receive */ - SCSCR2 = 0x30; + /* If external clock is used set CKE1 bit */ + SCSCR2 = serial_baud ? 0x30 : 0x32; /* Wait a bit for it to stabilize */ for(i = 0; i < 800000; i++) diff --git a/kernel/arch/dreamcast/include/arch/arch.h b/kernel/arch/dreamcast/include/arch/arch.h index 62e29df..50e3eff 100644 --- a/kernel/arch/dreamcast/include/arch/arch.h +++ b/kernel/arch/dreamcast/include/arch/arch.h @@ -58,7 +58,7 @@ extern uint32 _arch_mem_top; #define DEFAULT_PIXEL_MODE PM_RGB565 /** \brief Default serial bitrate. */ -#define DEFAULT_SERIAL_BAUD 57600 +#define DEFAULT_SERIAL_BAUD 115200 /** \brief Default serial FIFO behavior. */ #define DEFAULT_SERIAL_FIFO 1 diff --git a/utils/dc-chain/config.mk.testing.sample b/utils/dc-chain/config.mk.testing.sample index a351264..489ad1d 100644 --- a/utils/dc-chain/config.mk.testing.sample +++ b/utils/dc-chain/config.mk.testing.sample @@ -55,10 +55,10 @@ arm_gcc_tarball_type=xz # only if the 'use_custom_dependencies' flag is set to '1'. # GCC dependencies for SH -sh_gmp_ver=6.1.0 -sh_mpfr_ver=3.1.4 -sh_mpc_ver=1.0.3 -sh_isl_ver=0.18 +sh_gmp_ver=6.2.1 +sh_mpfr_ver=4.1.0 +sh_mpc_ver=1.2.1 +sh_isl_ver=0.24 # Tarball extensions to download for GCC dependencies for SH sh_gmp_tarball_type=bz2 hooks/post-receive -- A pseudo Operating System for the Dreamcast. |