You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(35) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(37) |
Feb
(10) |
Mar
|
Apr
(2) |
May
(17) |
Jun
(1) |
Jul
(14) |
Aug
(14) |
Sep
(4) |
Oct
|
Nov
(14) |
Dec
(4) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(92) |
Dec
(12) |
2006 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(5) |
May
(3) |
Jun
(15) |
Jul
(3) |
Aug
(1) |
Sep
(29) |
Oct
(1) |
Nov
(6) |
Dec
(5) |
2007 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
(3) |
May
(14) |
Jun
(2) |
Jul
(16) |
Aug
(73) |
Sep
(12) |
Oct
(9) |
Nov
(27) |
Dec
(3) |
2008 |
Jan
(4) |
Feb
(4) |
Mar
(3) |
Apr
(8) |
May
(23) |
Jun
(4) |
Jul
(1) |
Aug
(3) |
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
2009 |
Jan
|
Feb
(10) |
Mar
|
Apr
(4) |
May
(4) |
Jun
(10) |
Jul
|
Aug
(1) |
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
(6) |
May
|
Jun
(3) |
Jul
(11) |
Aug
(1) |
Sep
|
Oct
(15) |
Nov
(1) |
Dec
(5) |
2011 |
Jan
(4) |
Feb
(1) |
Mar
(6) |
Apr
|
May
(22) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2012 |
Jan
|
Feb
(10) |
Mar
(1) |
Apr
(6) |
May
(27) |
Jun
(48) |
Jul
(30) |
Aug
(4) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(11) |
2013 |
Jan
(4) |
Feb
(7) |
Mar
(6) |
Apr
(18) |
May
(28) |
Jun
(20) |
Jul
|
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(7) |
2014 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(9) |
May
(11) |
Jun
(10) |
Jul
|
Aug
(18) |
Sep
(12) |
Oct
(17) |
Nov
(10) |
Dec
(16) |
2015 |
Jan
(5) |
Feb
(1) |
Mar
(5) |
Apr
(4) |
May
(28) |
Jun
(2) |
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
(2) |
Dec
(1) |
2016 |
Jan
(14) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(1) |
2017 |
Jan
(11) |
Feb
|
Mar
(21) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(4) |
Nov
|
Dec
(1) |
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
(10) |
Feb
(9) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(18) |
Jul
(4) |
Aug
(2) |
Sep
(20) |
Oct
(2) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2022 |
Jan
(1) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2023 |
Jan
(10) |
Feb
(7) |
Mar
(29) |
Apr
(31) |
May
(29) |
Jun
(34) |
Jul
(3) |
Aug
(24) |
Sep
(22) |
Oct
(10) |
Nov
(38) |
Dec
(27) |
2024 |
Jan
(15) |
Feb
(8) |
Mar
(4) |
Apr
(20) |
May
(33) |
Jun
(18) |
Jul
(15) |
Aug
(23) |
Sep
(26) |
Oct
(32) |
Nov
(6) |
Dec
(4) |
2025 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
(4) |
May
(46) |
Jun
(19) |
Jul
(26) |
Aug
(25) |
Sep
|
Oct
|
Nov
|
Dec
|
From: ljsebald <ljs...@us...> - 2023-03-06 00:23:16
|
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 c9fa4c5069ee526714c941b9470fbc2b15c23888 (commit) from c5eeaa3df206903fa155f43797343b02bdca35d6 (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 c9fa4c5069ee526714c941b9470fbc2b15c23888 Author: Tchan0 <617...@us...> Date: Sun Mar 5 02:19:09 2023 +0100 Add gmp-dev to Dockerfile to fix GDB compile See GitHub PR #125 . ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/docker/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/dc-chain/docker/Dockerfile b/utils/dc-chain/docker/Dockerfile index 362f0e3..aefdad6 100644 --- a/utils/dc-chain/docker/Dockerfile +++ b/utils/dc-chain/docker/Dockerfile @@ -28,6 +28,7 @@ RUN apk --update add --no-cache \ git \ python3 \ subversion \ + gmp-dev \ && apk --update add --no-cache libelf-dev --repository=http://dl-cdn.alpinelinux.org/alpine/v3.9/main \ && rm -rf /var/cache/apk/* hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-03-04 02:19:48
|
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 c5eeaa3df206903fa155f43797343b02bdca35d6 (commit) via 497bbd2f2a77c6cd9e78532fc6f8ac8a2f90d3cc (commit) via b0b3f09c4a426e69c8184d4a8e1eec8630854cf3 (commit) via 4932ff938283c9e1d82d568abbb4e18cd6998260 (commit) via 9bc458822b22837ba2508db4bf58263b2b9c420e (commit) via 4fb2667b72b2193e73886bcb836e2e0bb0f391f9 (commit) via 76829941e738f1b5cf155da47bf963f48df3ac3f (commit) from 1da0eadf7025b79724e9dc54fdd7759ca13c93f6 (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 c5eeaa3df206903fa155f43797343b02bdca35d6 Merge: 1da0ead 497bbd2 Author: Lawrence Sebald <ljs...@us...> Date: Fri Mar 3 21:14:00 2023 -0500 Merge pull request #112 from sizious/dc-chain-mingw-w64-patches `dc-chain`: adding support for GCC 12.2.0 for MinGW-w64 commit 497bbd2f2a77c6cd9e78532fc6f8ac8a2f90d3cc Author: SiZiOUS <si...@gm...> Date: Tue Feb 28 00:44:15 2023 +0100 `dc-chain`: Adding remark on `sh_force_libbfd_installation`. Indeed, `libbfd` isn't so easily portable, e.g., if you made it on GCC 12 and try to use it on GCC 9, it won't work. See: https://stackoverflow.com/a/13811513/3726096 commit b0b3f09c4a426e69c8184d4a8e1eec8630854cf3 Author: SiZiOUS <si...@gm...> Date: Mon Feb 27 23:26:56 2023 +0100 `dc-chain`: Removing `libdep.a` BFD plugin for MinGW-w64. When this plugin exists, it breaks the `ar` utility on Windows. See: https://github.com/msys2/MINGW-packages/issues/7890 commit 4932ff938283c9e1d82d568abbb4e18cd6998260 Author: SiZiOUS <si...@gm...> Date: Mon Feb 27 21:56:24 2023 +0100 `dc-chain`: adding `sh_force_libbfd_installation` flag. This flag could be used if you want to force the installation of `libbfd` for the SH toolchain. This is required for MinGW/MSYS and can't be disabled in this scenario. This option is here mainly if you want to force the installation of `libbfd` under other environments; but this won't be necessary in most cases, as `libelf` is used almost everywhere. This flag has been tested for building static binaries of GCC 12.2.0 using MinGW-w64 environment. commit 9bc458822b22837ba2508db4bf58263b2b9c420e Author: SiZiOUS <si...@gm...> Date: Sun Feb 26 23:50:36 2023 +0100 `dc-chain`: Adding MinGW-w64 GCC 8.4.0 specific patch Always define `WIN32_LEAN_AND_MEAN` before <windows.h> (thanks to LIU Hao). This patch is identical to the GCC 12.2.0 patch already submitted. See: https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609514.html commit 4fb2667b72b2193e73886bcb836e2e0bb0f391f9 Author: SiZiOUS <si...@gm...> Date: Fri Feb 24 22:46:13 2023 +0100 `dc-chain`: allow to apply several patches at once This change allow patch to apply different patches at once, mainly the standard KallistiOS patches (located in `patches` directory) and platform specific patches (located in `patches/<host_triplet>`). In that way, platform specific patches can be focused only on the platform itself and not to be an aggregation of standard KallistiOS patches with platform specific changes. commit 76829941e738f1b5cf155da47bf963f48df3ac3f Author: SiZiOUS <si...@gm...> Date: Fri Feb 24 22:41:32 2023 +0100 `dc-chain`: Adding MinGW-w64/MSYS2 GCC 12.2.0 specific patch Always define `WIN32_LEAN_AND_MEAN` before <windows.h> (thanks to LIU Hao). See: https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609514.html ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/config.mk.legacy.sample | 10 + utils/dc-chain/config.mk.stable.sample | 10 + utils/dc-chain/config.mk.testing.sample | 10 + .../patches/i686-w64-mingw32/binutils-2.40.diff | 22 ++ .../patches/i686-w64-mingw32/gcc-12.2.0.diff | 401 ++++++++++++++++++++ .../patches/i686-w64-mingw32/gcc-8.4.0.diff | 420 +++++++++++++++++++++ utils/dc-chain/scripts/binutils.mk | 2 +- utils/dc-chain/scripts/build.mk | 8 +- utils/dc-chain/scripts/patch.mk | 2 +- 9 files changed, 882 insertions(+), 3 deletions(-) create mode 100644 utils/dc-chain/patches/i686-w64-mingw32/binutils-2.40.diff create mode 100644 utils/dc-chain/patches/i686-w64-mingw32/gcc-12.2.0.diff create mode 100644 utils/dc-chain/patches/i686-w64-mingw32/gcc-8.4.0.diff diff --git a/utils/dc-chain/config.mk.legacy.sample b/utils/dc-chain/config.mk.legacy.sample index 0b34d65..f3f3e43 100644 --- a/utils/dc-chain/config.mk.legacy.sample +++ b/utils/dc-chain/config.mk.legacy.sample @@ -145,3 +145,13 @@ install_mode=install-strip # also disable the 'kos' thread model. Don't mess with that flag unless you know # exactly what you are doing. #auto_fixup_sh4_newlib=0 + +# Force installation of BFD for SH (1|0) +# Uncomment this if you want to force the installation of 'libbfd' for the SH +# toolchain. This is required for MinGW/MSYS and can't be disabled in this +# scenario. This option is here mainly if you want to force the installation of +# 'libbfd' under other environments; but this won't be necessary in most cases, +# as 'libelf' is used almost everywhere. Please note, 'libbfd' couldn't be +# portable if you built it on another environment. Don't mess with that flag +# unless you know exactly what you are doing. +#sh_force_libbfd_installation=1 diff --git a/utils/dc-chain/config.mk.stable.sample b/utils/dc-chain/config.mk.stable.sample index d79bbf5..c06b9b9 100644 --- a/utils/dc-chain/config.mk.stable.sample +++ b/utils/dc-chain/config.mk.stable.sample @@ -145,3 +145,13 @@ install_mode=install-strip # also disable the 'kos' thread model. Don't mess with that flag unless you know # exactly what you are doing. #auto_fixup_sh4_newlib=0 + +# Force installation of BFD for SH (1|0) +# Uncomment this if you want to force the installation of 'libbfd' for the SH +# toolchain. This is required for MinGW/MSYS and can't be disabled in this +# scenario. This option is here mainly if you want to force the installation of +# 'libbfd' under other environments; but this won't be necessary in most cases, +# as 'libelf' is used almost everywhere. Please note, 'libbfd' couldn't be +# portable if you built it on another environment. Don't mess with that flag +# unless you know exactly what you are doing. +#sh_force_libbfd_installation=1 diff --git a/utils/dc-chain/config.mk.testing.sample b/utils/dc-chain/config.mk.testing.sample index 5467456..1823548 100644 --- a/utils/dc-chain/config.mk.testing.sample +++ b/utils/dc-chain/config.mk.testing.sample @@ -145,3 +145,13 @@ install_mode=install-strip # also disable the 'kos' thread model. Don't mess with that flag unless you know # exactly what you are doing. #auto_fixup_sh4_newlib=0 + +# Force installation of BFD for SH (1|0) +# Uncomment this if you want to force the installation of 'libbfd' for the SH +# toolchain. This is required for MinGW/MSYS and can't be disabled in this +# scenario. This option is here mainly if you want to force the installation of +# 'libbfd' under other environments; but this won't be necessary in most cases, +# as 'libelf' is used almost everywhere. Please note, 'libbfd' couldn't be +# portable if you built it on another environment. Don't mess with that flag +# unless you know exactly what you are doing. +#sh_force_libbfd_installation=1 diff --git a/utils/dc-chain/patches/i686-w64-mingw32/binutils-2.40.diff b/utils/dc-chain/patches/i686-w64-mingw32/binutils-2.40.diff new file mode 100644 index 0000000..6578034 --- /dev/null +++ b/utils/dc-chain/patches/i686-w64-mingw32/binutils-2.40.diff @@ -0,0 +1,22 @@ +diff -ruN binutils-2.40/ld/Makefile.am binutils-2.40-mingw/ld/Makefile.am +--- binutils-2.40/ld/Makefile.am 2023-01-14 00:00:00 +0000 ++++ binutils-2.40-mingw/ld/Makefile.am 2023-02-27 22:00:48 +0000 +@@ -1096,6 +1096,7 @@ + done + rm -f $(DESTDIR)$(bfdplugindir)/libdep.la + rm -f $(DESTDIR)$(bfdplugindir)/libdep.dll.a ++ rm -f $(DESTDIR)$(bfdplugindir)/libdep.a + + # Stuff that should be included in a distribution. The diststuff + # target is run by the taz target in ../Makefile.in. +diff -ruN binutils-2.40/ld/Makefile.in binutils-2.40-mingw/ld/Makefile.in +--- binutils-2.40/ld/Makefile.in 2023-01-14 00:00:00 +0000 ++++ binutils-2.40-mingw/ld/Makefile.in 2023-02-27 22:00:21 +0000 +@@ -2709,6 +2709,7 @@ + done + rm -f $(DESTDIR)$(bfdplugindir)/libdep.la + rm -f $(DESTDIR)$(bfdplugindir)/libdep.dll.a ++ rm -f $(DESTDIR)$(bfdplugindir)/libdep.a + diststuff: info $(EXTRA_DIST) + + # Both info (ld.info) and ld.1 depend on configdoc.texi. diff --git a/utils/dc-chain/patches/i686-w64-mingw32/gcc-12.2.0.diff b/utils/dc-chain/patches/i686-w64-mingw32/gcc-12.2.0.diff new file mode 100644 index 0000000..3c16322 --- /dev/null +++ b/utils/dc-chain/patches/i686-w64-mingw32/gcc-12.2.0.diff @@ -0,0 +1,401 @@ +diff -ruN gcc-12.2.0/gcc/ada/adaint.c gcc-12.2.0-mingw/gcc/ada/adaint.c +--- gcc-12.2.0/gcc/ada/adaint.c 2022-08-19 10:09:52.300658800 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/adaint.c 2023-02-23 23:06:29.194818000 +0100 +@@ -231,6 +231,7 @@ + + #elif defined (_WIN32) + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <accctrl.h> + #include <aclapi.h> +diff -ruN gcc-12.2.0/gcc/ada/cio.c gcc-12.2.0-mingw/gcc/ada/cio.c +--- gcc-12.2.0/gcc/ada/cio.c 2022-08-19 10:09:52.312659000 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/cio.c 2023-02-23 23:06:29.194818000 +0100 +@@ -67,6 +67,7 @@ + #endif + + #ifdef RTX ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <Rtapi.h> + #endif +diff -ruN gcc-12.2.0/gcc/ada/ctrl_c.c gcc-12.2.0-mingw/gcc/ada/ctrl_c.c +--- gcc-12.2.0/gcc/ada/ctrl_c.c 2022-08-19 10:09:52.312659000 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/ctrl_c.c 2023-02-23 23:06:29.210445600 +0100 +@@ -126,6 +126,7 @@ + + #elif defined (__MINGW32__) + ++#define WIN32_LEAN_AND_MEAN + #include "mingw32.h" + #include <windows.h> + +diff -ruN gcc-12.2.0/gcc/ada/expect.c gcc-12.2.0-mingw/gcc/ada/expect.c +--- gcc-12.2.0/gcc/ada/expect.c 2022-08-19 10:09:52.348659500 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/expect.c 2023-02-23 23:06:29.210445600 +0100 +@@ -75,6 +75,7 @@ + + #ifdef _WIN32 + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <process.h> + #include <signal.h> +diff -ruN gcc-12.2.0/gcc/ada/gsocket.h gcc-12.2.0-mingw/gcc/ada/gsocket.h +--- gcc-12.2.0/gcc/ada/gsocket.h 2022-08-19 10:09:52.372659800 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/gsocket.h 2023-02-23 23:06:29.210445600 +0100 +@@ -173,6 +173,7 @@ + + #endif + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + #elif defined(VMS) +diff -ruN gcc-12.2.0/gcc/ada/mingw32.h gcc-12.2.0-mingw/gcc/ada/mingw32.h +--- gcc-12.2.0/gcc/ada/mingw32.h 2022-08-19 10:09:52.456660800 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/mingw32.h 2023-02-23 23:06:29.225961000 +0100 +@@ -58,6 +58,7 @@ + #define _X86INTRIN_H_INCLUDED + #define _EMMINTRIN_H_INCLUDED + #endif ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + /* After including this file it is possible to use the character t as prefix +diff -ruN gcc-12.2.0/gcc/ada/mkdir.c gcc-12.2.0-mingw/gcc/ada/mkdir.c +--- gcc-12.2.0/gcc/ada/mkdir.c 2022-08-19 10:09:52.456660800 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/mkdir.c 2023-02-23 23:06:29.225961000 +0100 +@@ -43,6 +43,7 @@ + #endif + + #ifdef __MINGW32__ ++#define WIN32_LEAN_AND_MEAN + #include "mingw32.h" + #include <windows.h> + #ifdef MAXPATHLEN +diff -ruN gcc-12.2.0/gcc/ada/rtfinal.c gcc-12.2.0-mingw/gcc/ada/rtfinal.c +--- gcc-12.2.0/gcc/ada/rtfinal.c 2022-08-19 10:09:52.464660900 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/rtfinal.c 2023-02-23 23:06:29.241603800 +0100 +@@ -46,6 +46,7 @@ + /* see initialize.c */ + + #if defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include "mingw32.h" + #include <windows.h> + +diff -ruN gcc-12.2.0/gcc/ada/rtinit.c gcc-12.2.0-mingw/gcc/ada/rtinit.c +--- gcc-12.2.0/gcc/ada/rtinit.c 2022-08-19 10:09:52.464660900 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/rtinit.c 2023-02-23 23:06:29.241603800 +0100 +@@ -70,6 +70,7 @@ + and finalize properly the run-time. */ + + #if defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include "mingw32.h" + #include <windows.h> + +diff -ruN gcc-12.2.0/gcc/ada/seh_init.c gcc-12.2.0-mingw/gcc/ada/seh_init.c +--- gcc-12.2.0/gcc/ada/seh_init.c 2022-08-19 10:09:52.468661000 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/seh_init.c 2023-02-23 23:06:29.241603800 +0100 +@@ -34,6 +34,7 @@ + + #if defined (_WIN32) || (defined (__CYGWIN__) && defined (__SEH__)) + /* Include system headers, before system.h poisons malloc. */ ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <excpt.h> + #endif +diff -ruN gcc-12.2.0/gcc/ada/sysdep.c gcc-12.2.0-mingw/gcc/ada/sysdep.c +--- gcc-12.2.0/gcc/ada/sysdep.c 2022-08-19 10:09:52.512661600 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/sysdep.c 2023-02-23 23:06:29.257223200 +0100 +@@ -217,6 +217,7 @@ + #endif /* __CYGWIN__ */ + + #if defined (__CYGWIN__) || defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + int __gnat_is_windows_xp (void); +@@ -593,6 +594,7 @@ + Ada programs. */ + + #ifdef WINNT ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + /* Provide functions to echo the values passed to WinMain (windows bindings +diff -ruN gcc-12.2.0/gcc/ada/terminals.c gcc-12.2.0-mingw/gcc/ada/terminals.c +--- gcc-12.2.0/gcc/ada/terminals.c 2022-08-19 10:09:52.512661600 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/terminals.c 2023-02-23 23:06:29.257223200 +0100 +@@ -151,6 +151,7 @@ + #include <stdio.h> + #include <stdlib.h> + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <winternl.h> + #include <io.h> +diff -ruN gcc-12.2.0/gcc/ada/tracebak.c gcc-12.2.0-mingw/gcc/ada/tracebak.c +--- gcc-12.2.0/gcc/ada/tracebak.c 2022-08-19 10:09:52.512661600 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/tracebak.c 2023-02-23 23:06:29.272847800 +0100 +@@ -93,6 +93,7 @@ + + #if defined (_WIN64) && defined (__SEH__) + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + #define IS_BAD_PTR(ptr) (IsBadCodePtr((FARPROC)ptr)) +@@ -455,6 +456,7 @@ + #elif defined (__i386__) || defined (__x86_64__) + + #if defined (__WIN32) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #define IS_BAD_PTR(ptr) (IsBadCodePtr((FARPROC)ptr)) + #elif defined (__sun__) +diff -ruN gcc-12.2.0/gcc/diagnostic-color.cc gcc-12.2.0-mingw/gcc/diagnostic-color.cc +--- gcc-12.2.0/gcc/diagnostic-color.cc 2022-08-19 10:09:52.812665400 +0200 ++++ gcc-12.2.0-mingw/gcc/diagnostic-color.cc 2023-02-23 23:07:35.335490100 +0100 +@@ -22,6 +22,7 @@ + #include "diagnostic-url.h" + + #ifdef __MINGW32__ ++# define WIN32_LEAN_AND_MEAN + # include <windows.h> + #endif + +diff -ruN gcc-12.2.0/gcc/jit/jit-w32.h gcc-12.2.0-mingw/gcc/jit/jit-w32.h +--- gcc-12.2.0/gcc/jit/jit-w32.h 2022-08-19 10:09:52.932666900 +0200 ++++ gcc-12.2.0-mingw/gcc/jit/jit-w32.h 2023-02-23 23:07:35.335490100 +0100 +@@ -20,6 +20,7 @@ + + #include "config.h" + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + namespace gcc { +diff -ruN gcc-12.2.0/gcc/plugin.cc gcc-12.2.0-mingw/gcc/plugin.cc +--- gcc-12.2.0/gcc/plugin.cc 2022-08-19 10:09:52.952667200 +0200 ++++ gcc-12.2.0-mingw/gcc/plugin.cc 2023-02-23 23:07:35.351355900 +0100 +@@ -41,6 +41,7 @@ + #ifndef NOMINMAX + #define NOMINMAX + #endif ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #endif + +diff -ruN gcc-12.2.0/gcc/prefix.cc gcc-12.2.0-mingw/gcc/prefix.cc +--- gcc-12.2.0/gcc/prefix.cc 2022-08-19 10:09:53.104669100 +0200 ++++ gcc-12.2.0-mingw/gcc/prefix.cc 2023-02-23 23:07:35.351355900 +0100 +@@ -67,6 +67,7 @@ + #include "system.h" + #include "coretypes.h" + #if defined(_WIN32) && defined(ENABLE_WIN32_REGISTRY) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #endif + #include "prefix.h" +diff -ruN gcc-12.2.0/libatomic/config/mingw/lock.c gcc-12.2.0-mingw/libatomic/config/mingw/lock.c +--- gcc-12.2.0/libatomic/config/mingw/lock.c 2022-08-19 10:09:54.604688300 +0200 ++++ gcc-12.2.0-mingw/libatomic/config/mingw/lock.c 2023-02-23 23:07:35.366983500 +0100 +@@ -23,6 +23,7 @@ + <http://www.gnu.org/licenses/>. */ + + #define UWORD __shadow_UWORD ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #undef UWORD + #include "libatomic_i.h" +diff -ruN gcc-12.2.0/libffi/src/aarch64/ffi.c gcc-12.2.0-mingw/libffi/src/aarch64/ffi.c +--- gcc-12.2.0/libffi/src/aarch64/ffi.c 2022-08-19 10:09:54.652688900 +0200 ++++ gcc-12.2.0-mingw/libffi/src/aarch64/ffi.c 2023-02-23 23:07:35.366983500 +0100 +@@ -28,6 +28,7 @@ + #include <ffi_common.h> + #include "internal.h" + #ifdef _WIN32 ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> /* FlushInstructionCache */ + #endif + #include <tramp.h> +diff -ruN gcc-12.2.0/libgcc/config/i386/enable-execute-stack-mingw32.c gcc-12.2.0-mingw/libgcc/config/i386/enable-execute-stack-mingw32.c +--- gcc-12.2.0/libgcc/config/i386/enable-execute-stack-mingw32.c 2022-08-19 10:09:54.676689300 +0200 ++++ gcc-12.2.0-mingw/libgcc/config/i386/enable-execute-stack-mingw32.c 2023-02-23 23:07:35.366983500 +0100 +@@ -22,6 +22,7 @@ + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + <http://www.gnu.org/licenses/>. */ + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + extern void __enable_execute_stack (void *); +diff -ruN gcc-12.2.0/libgcc/libgcc2.c gcc-12.2.0-mingw/libgcc/libgcc2.c +--- gcc-12.2.0/libgcc/libgcc2.c 2022-08-19 10:09:54.728689900 +0200 ++++ gcc-12.2.0-mingw/libgcc/libgcc2.c 2023-02-23 23:07:35.382499000 +0100 +@@ -2273,6 +2273,7 @@ + /* Jump to a trampoline, loading the static chain address. */ + + #if defined(WINNT) && ! defined(__CYGWIN__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + int getpagesize (void); + int mprotect (char *,int, int); +diff -ruN gcc-12.2.0/libgcc/unwind-generic.h gcc-12.2.0-mingw/libgcc/unwind-generic.h +--- gcc-12.2.0/libgcc/unwind-generic.h 2022-08-19 10:09:54.732690000 +0200 ++++ gcc-12.2.0-mingw/libgcc/unwind-generic.h 2023-02-23 23:07:35.382499000 +0100 +@@ -30,6 +30,7 @@ + + #if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) + /* Only for _GCC_specific_handler. */ ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #endif + +diff -ruN gcc-12.2.0/libgfortran/intrinsics/sleep.c gcc-12.2.0-mingw/libgfortran/intrinsics/sleep.c +--- gcc-12.2.0/libgfortran/intrinsics/sleep.c 2022-08-19 10:09:54.764690400 +0200 ++++ gcc-12.2.0-mingw/libgfortran/intrinsics/sleep.c 2023-02-23 23:07:35.398137200 +0100 +@@ -30,6 +30,7 @@ + #endif + + #ifdef __MINGW32__ ++# define WIN32_LEAN_AND_MEAN + # include <windows.h> + # undef sleep + # define sleep(x) Sleep(1000*(x)) +diff -ruN gcc-12.2.0/libgo/misc/cgo/test/callback_c.c gcc-12.2.0-mingw/libgo/misc/cgo/test/callback_c.c +--- gcc-12.2.0/libgo/misc/cgo/test/callback_c.c 2022-08-19 10:09:55.088694500 +0200 ++++ gcc-12.2.0-mingw/libgo/misc/cgo/test/callback_c.c 2023-02-23 23:07:35.398137200 +0100 +@@ -32,6 +32,7 @@ + } + + #ifdef WIN32 ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + long long + mysleep(int seconds) { +diff -ruN gcc-12.2.0/libgomp/config/mingw32/proc.c gcc-12.2.0-mingw/libgomp/config/mingw32/proc.c +--- gcc-12.2.0/libgomp/config/mingw32/proc.c 2022-08-19 10:09:55.124695000 +0200 ++++ gcc-12.2.0-mingw/libgomp/config/mingw32/proc.c 2023-02-23 23:07:35.398137200 +0100 +@@ -30,6 +30,7 @@ + The following implementation uses win32 API routines. */ + + #include "libgomp.h" ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + /* Count the CPU's currently available to this process. */ +diff -ruN gcc-12.2.0/libiberty/make-temp-file.c gcc-12.2.0-mingw/libiberty/make-temp-file.c +--- gcc-12.2.0/libiberty/make-temp-file.c 2022-08-19 10:09:55.184695800 +0200 ++++ gcc-12.2.0-mingw/libiberty/make-temp-file.c 2023-02-23 23:07:35.398137200 +0100 +@@ -37,6 +37,7 @@ + #include <sys/file.h> /* May get R_OK, etc. on some systems. */ + #endif + #if defined(_WIN32) && !defined(__CYGWIN__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #endif + #if HAVE_SYS_STAT_H +diff -ruN gcc-12.2.0/libiberty/pex-win32.c gcc-12.2.0-mingw/libiberty/pex-win32.c +--- gcc-12.2.0/libiberty/pex-win32.c 2022-08-19 10:09:55.184695800 +0200 ++++ gcc-12.2.0-mingw/libiberty/pex-win32.c 2023-02-23 23:07:35.413641800 +0100 +@@ -20,6 +20,7 @@ + + #include "pex-common.h" + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + #ifdef HAVE_STDLIB_H +diff -ruN gcc-12.2.0/libssp/ssp.c gcc-12.2.0-mingw/libssp/ssp.c +--- gcc-12.2.0/libssp/ssp.c 2022-08-19 10:09:55.364698100 +0200 ++++ gcc-12.2.0-mingw/libssp/ssp.c 2023-02-23 23:07:35.413641800 +0100 +@@ -55,6 +55,7 @@ + /* Native win32 apps don't know about /dev/tty but can print directly + to the console using "CONOUT$" */ + #if defined (_WIN32) && !defined (__CYGWIN__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <wincrypt.h> + # define _PATH_TTY "CONOUT$" +diff -ruN gcc-12.2.0/libstdc++-v3/src/c++11/system_error.cc gcc-12.2.0-mingw/libstdc++-v3/src/c++11/system_error.cc +--- gcc-12.2.0/libstdc++-v3/src/c++11/system_error.cc 2022-08-19 10:09:55.528700200 +0200 ++++ gcc-12.2.0-mingw/libstdc++-v3/src/c++11/system_error.cc 2023-02-23 23:07:35.429269900 +0100 +@@ -33,6 +33,7 @@ + #undef __sso_string + + #if defined(_WIN32) && !defined(__CYGWIN__) ++#define WIN32_LEAN_AND_MEAN + #include <memory> + #include <windows.h> + #endif +diff -ruN gcc-12.2.0/libstdc++-v3/src/c++11/thread.cc gcc-12.2.0-mingw/libstdc++-v3/src/c++11/thread.cc +--- gcc-12.2.0/libstdc++-v3/src/c++11/thread.cc 2022-08-19 10:09:55.528700200 +0200 ++++ gcc-12.2.0-mingw/libstdc++-v3/src/c++11/thread.cc 2023-02-23 23:10:51.367102500 +0100 +@@ -34,6 +34,7 @@ + # ifdef _GLIBCXX_HAVE_SLEEP + # include <unistd.h> + # elif defined(_GLIBCXX_HAVE_WIN32_SLEEP) ++# define WIN32_LEAN_AND_MEAN + # include <windows.h> + # elif defined _GLIBCXX_NO_SLEEP && defined _GLIBCXX_HAS_GTHREADS + // We expect to be able to sleep for targets that support multiple threads: +diff -ruN gcc-12.2.0/libstdc++-v3/src/c++17/fs_ops.cc gcc-12.2.0-mingw/libstdc++-v3/src/c++17/fs_ops.cc +--- gcc-12.2.0/libstdc++-v3/src/c++17/fs_ops.cc 2022-08-19 10:09:55.532700200 +0200 ++++ gcc-12.2.0-mingw/libstdc++-v3/src/c++17/fs_ops.cc 2023-02-23 23:07:35.429269900 +0100 +@@ -54,6 +54,7 @@ + # include <utime.h> // utime + #endif + #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++# define WIN32_LEAN_AND_MEAN + # include <windows.h> + #endif + +diff -ruN gcc-12.2.0/libstdc++-v3/src/filesystem/ops.cc gcc-12.2.0-mingw/libstdc++-v3/src/filesystem/ops.cc +--- gcc-12.2.0/libstdc++-v3/src/filesystem/ops.cc 2022-08-19 10:09:55.540700300 +0200 ++++ gcc-12.2.0-mingw/libstdc++-v3/src/filesystem/ops.cc 2023-02-23 23:07:35.444904400 +0100 +@@ -55,6 +55,7 @@ + # include <utime.h> // utime + #endif + #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++# define WIN32_LEAN_AND_MEAN + # include <windows.h> + #endif + +diff -ruN gcc-12.2.0/libvtv/vtv_malloc.cc gcc-12.2.0-mingw/libvtv/vtv_malloc.cc +--- gcc-12.2.0/libvtv/vtv_malloc.cc 2022-08-19 10:09:55.760703100 +0200 ++++ gcc-12.2.0-mingw/libvtv/vtv_malloc.cc 2023-02-23 23:07:35.444904400 +0100 +@@ -33,6 +33,7 @@ + #include <stdlib.h> + #include <unistd.h> + #if defined (__CYGWIN__) || defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #else + #include <sys/mman.h> +diff -ruN gcc-12.2.0/libvtv/vtv_rts.cc gcc-12.2.0-mingw/libvtv/vtv_rts.cc +--- gcc-12.2.0/libvtv/vtv_rts.cc 2022-08-19 10:09:55.760703100 +0200 ++++ gcc-12.2.0-mingw/libvtv/vtv_rts.cc 2023-02-23 23:07:35.460517900 +0100 +@@ -121,6 +121,7 @@ + #include <stdio.h> + #include <string.h> + #if defined (__CYGWIN__) || defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <winternl.h> + #include <psapi.h> +diff -ruN gcc-12.2.0/libvtv/vtv_utils.cc gcc-12.2.0-mingw/libvtv/vtv_utils.cc +--- gcc-12.2.0/libvtv/vtv_utils.cc 2022-08-19 10:09:55.760703100 +0200 ++++ gcc-12.2.0-mingw/libvtv/vtv_utils.cc 2023-02-23 23:07:35.460517900 +0100 +@@ -33,6 +33,7 @@ + #include <stdlib.h> + #include <string.h> + #if defined (__CYGWIN__) || defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #else + #include <execinfo.h> diff --git a/utils/dc-chain/patches/i686-w64-mingw32/gcc-8.4.0.diff b/utils/dc-chain/patches/i686-w64-mingw32/gcc-8.4.0.diff new file mode 100644 index 0000000..4ad838e --- /dev/null +++ b/utils/dc-chain/patches/i686-w64-mingw32/gcc-8.4.0.diff @@ -0,0 +1,420 @@ +diff -ruN gcc-8.4.0/gcc/ada/adaint.c gcc-8.4.0-mingw/gcc/ada/adaint.c +--- gcc-8.4.0/gcc/ada/adaint.c 2020-03-04 09:30:00.000000000 +0100 ++++ gcc-8.4.0-mingw/gcc/ada/adaint.c 2023-02-26 23:17:52.514264800 +0100 ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-03-03 01:47:55
|
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 1da0eadf7025b79724e9dc54fdd7759ca13c93f6 (commit) from b7a56620c43e56c6d39a7764a69fe7ea0a4c0abd (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 1da0eadf7025b79724e9dc54fdd7759ca13c93f6 Author: Andress Barajas <and...@gm...> Date: Thu Mar 2 17:47:41 2023 -0800 Fixed bubbles example (#123) See GitHub PR #123. ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/parallax/bubbles/bubbles.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/dreamcast/parallax/bubbles/bubbles.c b/examples/dreamcast/parallax/bubbles/bubbles.c index 324032d..cdaac9e 100644 --- a/examples/dreamcast/parallax/bubbles/bubbles.c +++ b/examples/dreamcast/parallax/bubbles/bubbles.c @@ -27,15 +27,15 @@ the same, but it uses the Parallax functions instead of KGL. static float phase = 0.0f; static pvr_poly_cxt_t cxt; static pvr_poly_hdr_t hdr; +static pvr_dr_state_t dr_state; static void sphere(float radius, int slices, int stacks) { int i, j; float pitch, pitch2; float x, y, z, g, b; - float yaw, yaw2; - pvr_dr_state_t dr_state; + float yaw; - /* Setup our Direct Render state: pick a store queue and setup QACR0/1 */ - pvr_dr_init(dr_state); + /* Put our own polygon header */ + pvr_prim(&hdr, sizeof(hdr)); /* Initialize xmtrx with the values from KGL */ plx_mat_identity(); @@ -43,9 +43,6 @@ static void sphere(float radius, int slices, int stacks) { plx_mat3d_apply(PLX_MAT_PROJECTION); plx_mat3d_apply(PLX_MAT_MODELVIEW); - /* Put our own polygon header */ - pvr_prim(&hdr, sizeof(hdr)); - /* Iterate over stacks */ for(i = 0; i < stacks; i++) { pitch = 2 * M_PI * ((float)i / (float)stacks); @@ -55,7 +52,6 @@ static void sphere(float radius, int slices, int stacks) { long triangle strip. */ for(j = 0; j <= slices / 2; j++) { yaw = 2 * M_PI * ((float)j / (float)slices); - yaw2 = 2 * M_PI * ((float)(j + 1) / (float)slices); /* x, y+1 */ x = radius * fcos(yaw) * fcos(pitch2); @@ -102,6 +98,9 @@ static void sphere_frame_opaque() { pvr_scene_begin(); pvr_list_begin(PVR_LIST_OP_POLY); + /* Setup our Direct Render state: pick a store queue and setup QACR0/1 */ + pvr_dr_init(dr_state); + plx_mat3d_identity(); plx_mat3d_translate(0.0f, 0.0f, -12.0f); plx_mat3d_rotate(r * 2, 0.75f, 1.0f, 0.5f); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-03-03 01:44:47
|
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 b7a56620c43e56c6d39a7764a69fe7ea0a4c0abd (commit) via be8bde0fc5792da5a335c75bb1b41aac8a7c24da (commit) from 721f56eae47a423a75c39aebcf28f1bef6bed780 (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 b7a56620c43e56c6d39a7764a69fe7ea0a4c0abd Author: Tchan0 <617...@us...> Date: Fri Mar 3 02:43:55 2023 +0100 Merge Dockerfiles See GitHub PR #117 . commit be8bde0fc5792da5a335c75bb1b41aac8a7c24da Author: darcagn <da...@pr...> Date: Tue Feb 28 02:07:47 2023 -0600 Update GDB to version 13.1 for testing config GDB 13.1 released Feb 19, tested successful build and connect to KOS/dcloadip. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/config.mk.testing.sample | 2 +- utils/dc-chain/docker/{stable => }/Dockerfile | 13 +++++++-- utils/dc-chain/docker/README.md | 8 +++--- utils/dc-chain/docker/testing/Dockerfile | 39 --------------------------- 4 files changed, 16 insertions(+), 46 deletions(-) rename utils/dc-chain/docker/{stable => }/Dockerfile (65%) delete mode 100644 utils/dc-chain/docker/testing/Dockerfile diff --git a/utils/dc-chain/config.mk.testing.sample b/utils/dc-chain/config.mk.testing.sample index 489ad1d..5467456 100644 --- a/utils/dc-chain/config.mk.testing.sample +++ b/utils/dc-chain/config.mk.testing.sample @@ -21,7 +21,7 @@ sh_binutils_ver=2.40 sh_gcc_ver=12.2.0 newlib_ver=4.3.0.20230120 -gdb_ver=12.1 +gdb_ver=13.1 insight_ver=6.8-1 # Tarball extensions to download for SH diff --git a/utils/dc-chain/docker/stable/Dockerfile b/utils/dc-chain/docker/Dockerfile similarity index 65% rename from utils/dc-chain/docker/stable/Dockerfile rename to utils/dc-chain/docker/Dockerfile index ab5be1e..362f0e3 100644 --- a/utils/dc-chain/docker/stable/Dockerfile +++ b/utils/dc-chain/docker/Dockerfile @@ -1,6 +1,14 @@ # -# Dockerfile for Sega Dreamcast Toolchains Maker (dc-chain): Stable +# Dockerfile for Sega Dreamcast Toolchains Maker (dc-chain) # +# usage: +# - build one of the images: +# docker build -t dcchain:latest . +# docker build -t dcchain:testing --build-arg dc_chain=testing . +# docker build -t dcchain:bleeding --build-arg dc_chain=bleeding . +# docker build -t dcchain:legacy --build-arg dc_chain=legacy . +# - create and run a container, eg for latest: +# docker run -it --name containername dcchain:latest /bin/bash # Stage 1 FROM alpine:latest as build @@ -25,10 +33,11 @@ RUN apk --update add --no-cache \ # Making Sega Dreamcast toolchains # You may adapt the KallistiOS repository URL if needed +ARG dc_chain=stable RUN mkdir -p /opt/toolchains/dc \ && git clone https://git.code.sf.net/p/cadcdev/kallistios /opt/toolchains/dc/kos \ && cd /opt/toolchains/dc/kos/utils/dc-chain \ - && cp config.mk.stable.sample config.mk \ + && cp config.mk.$dc_chain.sample config.mk \ && sed -i -e 's/#use_custom_dependencies=1/use_custom_dependencies=1/g' config.mk \ && ./download.sh && ./unpack.sh && make && make gdb \ && rm -rf /opt/toolchains/dc/kos diff --git a/utils/dc-chain/docker/README.md b/utils/dc-chain/docker/README.md index ed14587..65d5bd9 100644 --- a/utils/dc-chain/docker/README.md +++ b/utils/dc-chain/docker/README.md @@ -1,6 +1,6 @@ # Dockerfile -This directory contain a `Dockerfile` which demonstrate you how to build a +This directory contains a `Dockerfile` which demonstrates you how to build a Docker image containing the minimal toolchains used for **Sega Dreamcast** development. @@ -23,6 +23,6 @@ building them can take hours and don't change often. Of course, the Docker image produced here can be used for CI/CD pipelines! -Don't hesitate to have multiple `config.mk` files; this may be useful for -building customized toolchains (e.g. a `testing` Docker image with `gcc-9.3.0` -and a `stable` one with `gcc-4.7.4`...). +This Dockerfile builds the `stable` toolchain by default, but can be used to build the other +toolchains like `legacy`, `testing`, ..., as long as you pass the `dc_chain` argument +in the docker command line (cfr Dockerfile for an example of the syntax). diff --git a/utils/dc-chain/docker/testing/Dockerfile b/utils/dc-chain/docker/testing/Dockerfile deleted file mode 100644 index 50b86c0..0000000 --- a/utils/dc-chain/docker/testing/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# -# Dockerfile for Sega Dreamcast Toolchains Maker (dc-chain): Testing -# - -# Stage 1 -FROM alpine:latest as build -MAINTAINER KallistiOS <cad...@li...> - -# Installing prerequisites -# Note: libelf-dev is not available in main repository, so we use the v3.9 package -RUN apk --update add --no-cache \ - build-base \ - patch \ - bash \ - texinfo \ - libjpeg-turbo-dev \ - libpng-dev \ - curl \ - wget \ - git \ - python3 \ - subversion \ - && apk --update add --no-cache libelf-dev --repository=http://dl-cdn.alpinelinux.org/alpine/v3.9/main \ - && rm -rf /var/cache/apk/* - -# Making Sega Dreamcast toolchains -# You may adapt the KallistiOS repository URL if needed -RUN mkdir -p /opt/toolchains/dc \ - && git clone https://git.code.sf.net/p/cadcdev/kallistios /opt/toolchains/dc/kos \ - && cd /opt/toolchains/dc/kos/utils/dc-chain \ - && cp config.mk.testing.sample config.mk \ - && sed -i -e 's/#use_custom_dependencies=1/use_custom_dependencies=1/g' config.mk \ - && ./download.sh && ./unpack.sh && make && make gdb \ - && rm -rf /opt/toolchains/dc/kos - -# Stage 2 -# Optimize image size -FROM scratch -COPY --from=build / / hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2023-03-03 01:35:59
|
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, vmu has been created at 3880532748bdaebd8f720d2861d6d4d742975f98 (commit) - Log ----------------------------------------------------------------- commit 3880532748bdaebd8f720d2861d6d4d742975f98 Merge: 5b6400b 3b82b01 Author: falco <gyr...@gm...> Date: Thu Jan 26 17:27:14 2023 -0500 Merge branch 'vmu' of github.com:gyrovorbis/KallistiOS into vmu commit 5b6400bd6e0cd642d52911b8ba48caf3c5f80ce4 Author: falco <gyr...@gm...> Date: Thu Jan 26 17:26:18 2023 -0500 Reverted accidental modification to stream.drv commit 3b82b010d341ef0c6944fbe959ce82f8a712c2b0 Merge: a68b02b 3e0386f Author: Falco Girgis <gyr...@gm...> Date: Thu Jan 26 17:25:13 2023 -0500 Merge branch 'KallistiOS:master' into vmu commit a68b02b357c96dff6dd5db80a4c311233bfc5cdd Author: falco <gyr...@gm...> Date: Wed Jan 25 08:18:10 2023 -0500 Stylistic fixes for VMU driver additions - BlueCrab pointed out a variety of ways in which the code was not adhering to the coding standards already established by KOS. Fixed. commit 7cc77dd1f09035b1e7fb27059b2cc5d89cbfed79 Author: falco <gyr...@gm...> Date: Mon Jan 9 12:26:28 2023 -0500 Cleanup + periodic driver polling for button state - Cleaned up VMU button macros to match controller buttons - Implemented periodic polling mechanism for querying button state * conditional: disabled by default, enabled via vmu_set_buttons_enabled(..) * only queries for button input on first unit, which should be the front-facing one to save maple frames commit bfff76fb092fe5eadf8e156043b4cc39e689fbc6 Author: falco <gyr...@gm...> Date: Tue Jan 3 22:05:35 2023 -0500 Added support for VMU time, buttons, and buzzer. 1) vmu_beep(): convenience high-level buzzer API - This function is provided for convenience around vmu_beep_raw(), and actually understands the alarm values represented by the arguments, ignoring unsupported values, naming them appropriately and then delegating back to vmu_beep_raw(). - We should keep vmu_beep_raw(), though, in case some 3rd party controller comes around which does have support for two sets of alarms. 2) vmu_get_time(), vmu_set_time(): time management - These two functions along with a corresponding structure were added for querying and setting the times and dates on the VMU. The structure's format and expected value ranges were commented. 3) vmu_get_btns(): query for button states - The VMU's button states are actually still accessible via the Maple BUS while attached to the controller. The "Retro Fighters" Dreamcast controller is currently the only known controller that allows you to leverage this, but being able to support a few extra buttons could be a nice thing to have in a game or app. ----------------------------------------------------------------------- hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-02-28 00:21:48
|
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 721f56eae47a423a75c39aebcf28f1bef6bed780 (commit) via 8566edef091e03349d44c58309b71f5526615a82 (commit) via f8d83af09189417d7c4163cd362254c7b9988ef2 (commit) via 4084632ddf32b1fc0b9003417aec746ba31ab2f8 (commit) from 0aa7b383a840ac85b2bb2840675a8902a24ecd30 (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 721f56eae47a423a75c39aebcf28f1bef6bed780 Merge: 8566ede f8d83af Author: Lawrence Sebald <ljs...@us...> Date: Mon Feb 27 19:20:29 2023 -0500 Merge pull request #114 from Dreamcast-Projects/master Fix out of memory example compiling for gcc 4.7.4 commit 8566edef091e03349d44c58309b71f5526615a82 Author: Tchan0 <617...@us...> Date: Tue Feb 28 01:19:33 2023 +0100 Fix Dockerfile for lack of --check option in sha512sum See GitHub PR #115. commit f8d83af09189417d7c4163cd362254c7b9988ef2 Author: Andress Barajas <and...@gm...> Date: Mon Feb 27 08:51:52 2023 -0800 Fix out of memory example compiling for gcc 4.7.4 commit 4084632ddf32b1fc0b9003417aec746ba31ab2f8 Author: Tchan0 <617...@us...> Date: Sun Feb 26 22:20:20 2023 +0100 Fix dc-chain Dockerfiles * Update Dockerfile - Alpine:latest requires a version nr for python - added missing endline continues * Update Dockerfile - Alpine:latest requires a version nr for python - added missing endline continues ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/cpp/out_of_memory/Makefile | 2 +- utils/dc-chain/docker/stable/Dockerfile | 7 ++++--- utils/dc-chain/docker/testing/Dockerfile | 7 ++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/examples/dreamcast/cpp/out_of_memory/Makefile b/examples/dreamcast/cpp/out_of_memory/Makefile index 0d05a2b..f3e5987 100644 --- a/examples/dreamcast/cpp/out_of_memory/Makefile +++ b/examples/dreamcast/cpp/out_of_memory/Makefile @@ -5,7 +5,7 @@ TARGET = out_of_memory.elf OBJS = out_of_memory.o -KOS_CPPFLAGS += -fexceptions +KOS_CPPFLAGS += -fexceptions -std=c++11 all: rm-elf $(TARGET) diff --git a/utils/dc-chain/docker/stable/Dockerfile b/utils/dc-chain/docker/stable/Dockerfile index 87ccdb1..ab5be1e 100644 --- a/utils/dc-chain/docker/stable/Dockerfile +++ b/utils/dc-chain/docker/stable/Dockerfile @@ -18,7 +18,7 @@ RUN apk --update add --no-cache \ curl \ wget \ git \ - python \ + python3 \ subversion \ && apk --update add --no-cache libelf-dev --repository=http://dl-cdn.alpinelinux.org/alpine/v3.9/main \ && rm -rf /var/cache/apk/* @@ -27,8 +27,9 @@ RUN apk --update add --no-cache \ # You may adapt the KallistiOS repository URL if needed RUN mkdir -p /opt/toolchains/dc \ && git clone https://git.code.sf.net/p/cadcdev/kallistios /opt/toolchains/dc/kos \ - && cd /opt/toolchains/dc/kos/utils/dc-chain - && cp config.mk.stable.sample config.mk + && cd /opt/toolchains/dc/kos/utils/dc-chain \ + && cp config.mk.stable.sample config.mk \ + && sed -i -e 's/#use_custom_dependencies=1/use_custom_dependencies=1/g' config.mk \ && ./download.sh && ./unpack.sh && make && make gdb \ && rm -rf /opt/toolchains/dc/kos diff --git a/utils/dc-chain/docker/testing/Dockerfile b/utils/dc-chain/docker/testing/Dockerfile index a6469b7..50b86c0 100644 --- a/utils/dc-chain/docker/testing/Dockerfile +++ b/utils/dc-chain/docker/testing/Dockerfile @@ -18,7 +18,7 @@ RUN apk --update add --no-cache \ curl \ wget \ git \ - python \ + python3 \ subversion \ && apk --update add --no-cache libelf-dev --repository=http://dl-cdn.alpinelinux.org/alpine/v3.9/main \ && rm -rf /var/cache/apk/* @@ -27,8 +27,9 @@ RUN apk --update add --no-cache \ # You may adapt the KallistiOS repository URL if needed RUN mkdir -p /opt/toolchains/dc \ && git clone https://git.code.sf.net/p/cadcdev/kallistios /opt/toolchains/dc/kos \ - && cd /opt/toolchains/dc/kos/utils/dc-chain - && cp config.mk.testing.sample config.mk + && cd /opt/toolchains/dc/kos/utils/dc-chain \ + && cp config.mk.testing.sample config.mk \ + && sed -i -e 's/#use_custom_dependencies=1/use_custom_dependencies=1/g' config.mk \ && ./download.sh && ./unpack.sh && make && make gdb \ && rm -rf /opt/toolchains/dc/kos hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
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. |
From: ljsebald <ljs...@us...> - 2023-02-12 01:57:52
|
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 9db78833f9f1228318f42b6ef1bd97593273f48c (commit) from da62e62955d2edad42c218257a50da10aff59f56 (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 9db78833f9f1228318f42b6ef1bd97593273f48c Author: Andress Barajas <and...@gm...> Date: Sat Feb 11 17:57:06 2023 -0800 Updated speed test to calculate the average (#105) ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/sd/speedtest/sd-speedtest.c | 27 ++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/examples/dreamcast/sd/speedtest/sd-speedtest.c b/examples/dreamcast/sd/speedtest/sd-speedtest.c index edca977..593acac 100644 --- a/examples/dreamcast/sd/speedtest/sd-speedtest.c +++ b/examples/dreamcast/sd/speedtest/sd-speedtest.c @@ -50,8 +50,10 @@ static void __attribute__((__noreturn__)) wait_exit() { int main(int argc, char *argv[]) { kos_blockdev_t sd_dev; - uint64 begin, end, timer; + uint64 begin, end, timer, average; + uint64 sum = 0; uint8_t pt; + int i; dbgio_dev_select("fb"); dbglog(DBG_DEBUG, "Initializing SD card.\n"); @@ -69,20 +71,25 @@ int main(int argc, char *argv[]) { wait_exit(); } - dbglog(DBG_DEBUG, "Reading 1024 blocks.\n"); + dbglog(DBG_DEBUG, "Calculating average speed for reading 1024 blocks.\n"); - begin = timer_ms_gettime64(); + for(i = 0; i < 10; i++) { + begin = timer_ms_gettime64(); - if(sd_dev.read_blocks(&sd_dev, 0, 1024, tbuf)) { - dbglog(DBG_DEBUG, "couldn't read block: %s\n", strerror(errno)); - return -1; + if(sd_dev.read_blocks(&sd_dev, 0, 1024, tbuf)) { + dbglog(DBG_DEBUG, "couldn't read block: %s\n", strerror(errno)); + return -1; + } + + end = timer_ms_gettime64(); + timer = end - begin; + sum += timer; } - end = timer_ms_gettime64(); - timer = end - begin; + average = sum / 10; - dbglog(DBG_DEBUG, "SD card read took %llu ms (%.3f KB/sec)\n", - timer, (512 * 1024) / ((double)timer)); + dbglog(DBG_DEBUG, "SD card read average took %llu ms (%.3f KB/sec)\n", + average, (512 * 1024) / ((double)average)); sd_shutdown(); wait_exit(); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-02-11 00:04:30
|
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 da62e62955d2edad42c218257a50da10aff59f56 (commit) via 6dc10df220c38444bd1159ec1edb61cad09d924c (commit) via 352cb529d8f192a327e74bbf8e3fea8e8693f9ea (commit) via 73e6bd83c8e5f892ca553f002ad0ec29a2323c8f (commit) via 5d977013f492a4a6110b91dccf4dd501e4304b6a (commit) via c28c5f53f6670fdfde9c7e45be8c8f7ddcc31e0a (commit) via 678c374a9db9f0e92c4e8eb604b75c7d54b72063 (commit) via 497683aa49e61cbf6aa960d83be02682e36a9ee8 (commit) via d5419656b5df5a8d8e033fbb93b339b789a299eb (commit) via 378c2d53ea5abf65090240bf1728667efa53a4c4 (commit) via 0302794d75a97d8305d27c90a7934c7aed5274f2 (commit) via 39250ae10b99871e85930a78fa052c3368ab29e3 (commit) via 9eeec75aa3e4a7970c6a4e5aec0a53f516e979db (commit) via 986b1a4edb1756bb5c58e1f9acfb5e462d55d33f (commit) via 5c464c05b2737629a81545eb212a90f6076b0e60 (commit) via a4468b6947f43a6820e48afca45dfc7e046dcb99 (commit) via 148845fed59a3ab9d1417800629bf08c437cc5a4 (commit) via f9e5fd7ce1b4b6aa968ad2be831655b650e2ec84 (commit) via 5b8d5c1e96adcb8c942ff925f0e4d2a53fd17570 (commit) via f3b11349a0ddfbfb041b7cf7dd00bbb5c92e9c9d (commit) via 9c111dd9a505c9dee1b24b7394123416adf89c7a (commit) via 36d993c6d9d694c48f883a8b13633287564d903b (commit) via 3dc33b7666ca478b3fe5d03a874ae9b028bcac84 (commit) via 06c92c69e1b3fca51ae09b36a02342d6fdec7193 (commit) from 99c716c8915ff0199fc657b6fb41ff549361cbf0 (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 da62e62955d2edad42c218257a50da10aff59f56 Author: Lawrence Sebald <ljs...@us...> Date: Fri Feb 10 19:04:13 2023 -0500 Style fixes and such. commit 6dc10df220c38444bd1159ec1edb61cad09d924c Merge: 352cb52 5d97701 Author: Lawrence Sebald <ljs...@us...> Date: Fri Feb 10 18:47:33 2023 -0500 Merge pull request #104 from DC-SWAT/spi-sd Fixed and improved reading for SCIF SPI and use it for SD. commit 352cb529d8f192a327e74bbf8e3fea8e8693f9ea Merge: 73e6bd8 39250ae Author: Lawrence Sebald <ljs...@us...> Date: Fri Feb 10 18:12:50 2023 -0500 Merge pull request #88 from KallistiOS/dont-panic-on-oom Return -1 and set ENOMEM if sbrk fails commit 73e6bd83c8e5f892ca553f002ad0ec29a2323c8f Merge: 497683a 678c374 Author: Lawrence Sebald <ljs...@us...> Date: Fri Feb 10 18:10:40 2023 -0500 Merge pull request #101 from DC-SWAT/master Improved cache management commit 5d977013f492a4a6110b91dccf4dd501e4304b6a Author: Ruslan Rostovtsev <rus...@em...des> Date: Fri Feb 10 18:11:54 2023 +0700 Fixed and improved reading for SCIF SPI. - Fixed and improved scif_spi_read_byte. - Added optimized SPI data reading. - Used optimized reading for SD cards. - Added SPI functions to exports. commit c28c5f53f6670fdfde9c7e45be8c8f7ddcc31e0a Author: Ruslan Rostovtsev <rus...@em...des> Date: Fri Feb 10 18:04:32 2023 +0700 Added example for SD card speed testing commit 678c374a9db9f0e92c4e8eb604b75c7d54b72063 Author: Ruslan Rostovtsev <rus...@em...des> Date: Fri Feb 10 14:58:02 2023 +0700 Improved cache management commit 497683aa49e61cbf6aa960d83be02682e36a9ee8 Merge: d541965 378c2d5 Author: Lawrence Sebald <ljs...@us...> Date: Tue Feb 7 18:01:49 2023 -0500 Merge pull request #100 from Dreamcast-Projects/master Fix Conio adventure example Closes GitHub issue #98. commit d5419656b5df5a8d8e033fbb93b339b789a299eb Merge: 5c464c0 0302794 Author: Lawrence Sebald <ljs...@us...> Date: Tue Feb 7 17:58:28 2023 -0500 Merge pull request #99 from cepawiel/stackprotector_example Skip building stackprotector example when using GCC4 commit 378c2d53ea5abf65090240bf1728667efa53a4c4 Author: Andress Barajas <and...@gm...> Date: Mon Feb 6 22:35:30 2023 -0800 Fix Conio adventure example commit 0302794d75a97d8305d27c90a7934c7aed5274f2 Author: cepawiel <cep...@mt...> Date: Sun Feb 5 12:40:48 2023 -0600 Skip building stackprotector example when using GCC4 commit 39250ae10b99871e85930a78fa052c3368ab29e3 Author: falco <gyr...@gm...> Date: Sat Feb 4 22:51:15 2023 -0500 Added test to upper level Makefile for directory. commit 9eeec75aa3e4a7970c6a4e5aec0a53f516e979db Author: falco <gyr...@gm...> Date: Sat Feb 4 22:34:30 2023 -0500 Added example to demonstrate std::bad_alloc. commit 986b1a4edb1756bb5c58e1f9acfb5e462d55d33f Merge: 06c92c6 a4468b6 Author: falco <gyr...@gm...> Date: Sat Feb 4 22:00:48 2023 -0500 Merge branch 'master' into dont-panic-on-oom commit 5c464c05b2737629a81545eb212a90f6076b0e60 Merge: 148845f a4468b6 Author: Falco Girgis <gyr...@gm...> Date: Sat Feb 4 04:59:45 2023 -0500 Merge pull request #97 from gyrovorbis/master Bumped C++ version from 17 to 20 on new README.md. commit a4468b6947f43a6820e48afca45dfc7e046dcb99 Author: falco <gyr...@gm...> Date: Sat Feb 4 04:57:48 2023 -0500 Bumped C++ version from 17 to 20 on new README.md. commit 148845fed59a3ab9d1417800629bf08c437cc5a4 Merge: f3b1134 f9e5fd7 Author: darcagn <da...@pr...> Date: Sat Feb 4 01:44:33 2023 -0600 Merge pull request #96 from gyrovorbis/master Renamed "latest" toolchain config script to "testing" and updated README.md commit f9e5fd7ce1b4b6aa968ad2be831655b650e2ec84 Author: falco <gyr...@gm...> Date: Sat Feb 4 02:39:00 2023 -0500 Fixed permissions on "testing" toolchain config - Fixed permissiosn on testing toolchain config - Deleted previous, "latest," config (became testing) commit 5b8d5c1e96adcb8c942ff925f0e4d2a53fd17570 Author: falco <gyr...@gm...> Date: Sat Feb 4 02:35:24 2023 -0500 Latest GCC12.2.0->Testing, updated dc-chain README - It was decided that GCC12 would be called "testing" while anything beyond it (upcoming 13) would be called "latest." - The README.md for dc-chain was updated to reflect filename and naming scheme changes. commit f3b11349a0ddfbfb041b7cf7dd00bbb5c92e9c9d Merge: 36d993c 9c111dd Author: Falco Girgis <gyr...@gm...> Date: Sat Feb 4 02:19:08 2023 -0500 Merge pull request #95 from gyrovorbis/master Updated toolchain configs: legacy, stable, latest commit 9c111dd9a505c9dee1b24b7394123416adf89c7a Author: falco <gyr...@gm...> Date: Sat Feb 4 02:13:29 2023 -0500 Updated toolchain configs: legacy, stable, latest - GCC4.7.4 has been decided to be called the "legacy" toolchain, as we still support it, but there's not really any argument for using it over 9.3.0. - GCC9.3.0 has been voted in as the new "stable," as nobody has issues with it, it's been tested for years, and it has fewer bugs than 4.7. - GCC12.2.0 and onward will now be called the "latest" as we attempt to stay up-to-date. This toolchain has had far less testing than stable, but may have new features and updates commit 36d993c6d9d694c48f883a8b13633287564d903b Merge: 99c716c 3dc33b7 Author: darcagn <da...@pr...> Date: Sat Feb 4 00:05:38 2023 -0600 Merge pull request #94 from darcagn/master Update patch for building GCC 12.2.0 toolchain on macOS commit 3dc33b7666ca478b3fe5d03a874ae9b028bcac84 Author: darcagn <da...@pr...> Date: Sat Feb 4 00:01:04 2023 -0600 Update patch for building GCC 12.2.0 toolchain on macOS commit 06c92c69e1b3fca51ae09b36a02342d6fdec7193 Author: Luke Benstead <ka...@gm...> Date: Wed Jan 25 08:56:05 2023 +0000 Return -1 and set ENOMEM if sbrk fails ----------------------------------------------------------------------- Summary of changes: AUTHORS | 3 +- README.md | 2 +- examples/dreamcast/basic/stackprotector/Makefile | 11 + examples/dreamcast/conio/adventure/Makefile | 2 +- examples/dreamcast/conio/adventure/globalvars.c | 64 ++++ examples/dreamcast/conio/adventure/hdr.h | 195 ++++++------ examples/dreamcast/conio/adventure/init.c | 1 + examples/dreamcast/cpp/Makefile | 5 +- examples/dreamcast/cpp/out_of_memory/Makefile | 29 ++ .../dreamcast/cpp/out_of_memory/out_of_memory.cc | 64 ++++ examples/dreamcast/sd/Makefile | 3 + .../{g1ata/atatest => sd/speedtest}/Makefile | 6 +- examples/dreamcast/sd/speedtest/sd-speedtest.c | 90 ++++++ include/kos/cdefs.h | 7 +- kernel/arch/dreamcast/exports-naomi.txt | 10 + kernel/arch/dreamcast/exports-pristine.txt | 10 + kernel/arch/dreamcast/hardware/scif-spi.c | 179 +++++++++-- kernel/arch/dreamcast/include/arch/cache.h | 56 +++- kernel/arch/dreamcast/include/dc/scif.h | 19 +- kernel/arch/dreamcast/kernel/cache.s | 84 ++--- kernel/arch/dreamcast/kernel/mm.c | 8 +- kernel/exports.txt | 2 + utils/dc-chain/README.md | 12 +- utils/dc-chain/config.mk.latest.sample | 147 --------- ...ig.mk.stable.sample => config.mk.legacy.sample} | 0 utils/dc-chain/config.mk.stable.sample | 26 +- utils/dc-chain/config.mk.testing.sample | 10 +- .../patches/{ => arm-Darwin}/gcc-12.2.0-kos.diff | 337 +++++++++++---------- 28 files changed, 871 insertions(+), 511 deletions(-) create mode 100644 examples/dreamcast/conio/adventure/globalvars.c create mode 100644 examples/dreamcast/cpp/out_of_memory/Makefile create mode 100644 examples/dreamcast/cpp/out_of_memory/out_of_memory.cc copy examples/dreamcast/{g1ata/atatest => sd/speedtest}/Makefile (78%) create mode 100644 examples/dreamcast/sd/speedtest/sd-speedtest.c delete mode 100755 utils/dc-chain/config.mk.latest.sample copy utils/dc-chain/{config.mk.stable.sample => config.mk.legacy.sample} (100%) copy utils/dc-chain/patches/{ => arm-Darwin}/gcc-12.2.0-kos.diff (93%) diff --git a/AUTHORS b/AUTHORS index 28c2422..326a61d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,7 +22,7 @@ please see the README.KOS file in the doc directory. Contributors list (under the normal KOS license): ------------------------------------------------- Dan Potter: 1997, 2000, 2001, 2002, 2003, 2004 -Lawrence Sebald: 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 +Lawrence Sebald: 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Sam Steele: 2004 Gil Megidish: 2002 Florian Schulze: 2002 @@ -44,6 +44,7 @@ Stefan Galowicz: 2016, 2017 Luke Benstead: 2020, 2021 Eric Fradella: 2023 Falco Girgis: 2023 +Ruslan Rostovtsev: 2014, 2016, 2023 Files with Specific licenses: ----------------------------- diff --git a/README.md b/README.md index cdcf93c..90f69cf 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ KOS is an unofficial development environment for the SEGA Dreamcast game console KOS was developed from scratch over the internet by a group of free software developers and has no relation to the official Sega Katana or Microsoft Windows CE Dreamcast development kits. This has allowed it to fuel a thriving Dreamcast homebrew scene, powering many commercial releases for the platform over the years. It supports a signficiant portion of the Dreamcast's hardware capabilities and a wide variety of peripherals, accessories, and add-ons for the console, including custom hardware modifications that have been created by the scene. -Despite the console's age, KOS offers an extremely modern, programmer-friendly development environment, supporting C17 and C++17, with the majority of their standard libraries fully supported and additional support for many POSIX APIs. Additionally, KOS-ports offers a rich set of add-on libraries such as SDL, OpenGL, and Lua for the platform. +Despite the console's age, KOS offers an extremely modern, programmer-friendly development environment, supporting C17 and C++20, with the majority of their standard libraries fully supported and additional support for many POSIX APIs. Additionally, KOS-ports offers a rich set of add-on libraries such as SDL, OpenGL, and Lua for the platform. ## Features ##### Core Functionality diff --git a/examples/dreamcast/basic/stackprotector/Makefile b/examples/dreamcast/basic/stackprotector/Makefile index c931465..722d5fb 100644 --- a/examples/dreamcast/basic/stackprotector/Makefile +++ b/examples/dreamcast/basic/stackprotector/Makefile @@ -2,6 +2,15 @@ TARGET = stackprotector.elf OBJS = stackprotector.o KOS_CFLAGS += -fstack-protector-all +GCC_MAJOR = $(basename $(basename $(KOS_GCCVER))) + +ifeq ($(GCC_MAJOR), 4) + +all dist: + $(warning GCC4 missing stackprotector patch, skip building example) + +else + all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules @@ -24,3 +33,5 @@ dist: $(TARGET) .PHONY: run dist clean rm-elf + +endif \ No newline at end of file diff --git a/examples/dreamcast/conio/adventure/Makefile b/examples/dreamcast/conio/adventure/Makefile index 30cbbda..921032d 100644 --- a/examples/dreamcast/conio/adventure/Makefile +++ b/examples/dreamcast/conio/adventure/Makefile @@ -29,7 +29,7 @@ all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules -OBJS = porthelper.o crc.o done.o init.o io.o adventure.o save.o subr.o vocab.o wizard.o data.o +OBJS = porthelper.o crc.o done.o init.o io.o adventure.o save.o subr.o vocab.o wizard.o data.o globalvars.o $(DATA_TARGET): $(HOST_CC) -o $(SETUP_TARGET) $(SETUP_SOURCE) $(SETUP_CFLAGS) diff --git a/examples/dreamcast/conio/adventure/globalvars.c b/examples/dreamcast/conio/adventure/globalvars.c new file mode 100644 index 0000000..9dd9df1 --- /dev/null +++ b/examples/dreamcast/conio/adventure/globalvars.c @@ -0,0 +1,64 @@ +#include "hdr.h" + +int datfd; +int yea; + +int loc, newloc, oldloc, oldlc2, wzdark, gaveup, kq, k, k2; +char *wd1, *wd2; /* the complete words */ +int verb, obj, spk; +int saved, savet, mxscor, latncy; + +struct hashtab voc[HTSIZE]; + +struct text rtext[RTXSIZ]; /* random text messages */ +struct text mtext[MAGSIZ]; /* magic messages */ + +int clsses; +struct text ctext[CLSMAX]; /* classes of adventurer */ +int cval[CLSMAX]; + +struct text ptext[101]; /* object descriptions */ + +#define LOCSIZ 141 /* number of locations */ +struct text ltext[LOCSIZ]; /* long loc description */ +struct text stext[LOCSIZ]; /* short loc descriptions */ + +struct travlist *travel[LOCSIZ], *tkk; /* travel is closer to keys(...)*/ + +int atloc[LOCSIZ]; + +int plac[101]; /* initial object placement */ +int fixd[101], fixed[101]; /* location fixed? */ + +int actspk[35]; /* rtext msg for verb <n> */ + +int cond[LOCSIZ]; /* various condition bits */ + +int hntmax; +int hints[20][5]; /* info on hints */ +int hinted[20], hintlc[20]; + +int place[101], prop[101], linkx[201]; +int abb[LOCSIZ]; + +int maxtrs, tally, tally2; /* treasure values */ + +int keys, lamp, grate, cage, rod, rod2, steps, /* mnemonics */ + bird, door, pillow, snake, fissur, tablet, clam, oyster, magzin, + dwarf, knife, food, bottle, water, oil, plant, plant2, axe, mirror, dragon, + chasm, troll, troll2, bear, messag, vend, batter, + nugget, coins, chest, eggs, tridnt, vase, emrald, pyram, pearl, rug, chain, + spices, + back, look, cave, null, entrnc, dprssn, + enter, stream, pour, + say, lock, throw, find, invent; + +int chloc, chloc2, dseen[7], dloc[7], /* dwarf stuff */ + odloc[7], dflag, daltlc; + +int tk[21], stick, dtotal, attack; +int turns, lmwarn, iwest, knfloc, detail, /* various flags & counters */ + abbnum, maxdie, numdie, holdng, dkill, foobar, bonus, clock1, clock2, + closng, apanic, closed, scorng; + +int demo, limit; \ No newline at end of file diff --git a/examples/dreamcast/conio/adventure/hdr.h b/examples/dreamcast/conio/adventure/hdr.h index dc9839d..87cee26 100644 --- a/examples/dreamcast/conio/adventure/hdr.h +++ b/examples/dreamcast/conio/adventure/hdr.h @@ -85,9 +85,9 @@ typedef unsigned long u_long; #include "porthelper.h" #endif -int datfd; /* message file descriptor */ +extern int datfd; /* message file descriptor */ /* volatile sig_atomic_t delhit; */ -int yea; +extern int yea; extern char data_file[]; /* Virtual data file */ #define TAB '\t' @@ -96,11 +96,11 @@ extern char data_file[]; /* Virtual data file */ #define FLUSHLF while (next()!=LF) -int loc, newloc, oldloc, oldlc2, wzdark, gaveup, kq, k, k2; -char *wd1, *wd2; /* the complete words */ -int verb, obj, spk; +extern int loc, newloc, oldloc, oldlc2, wzdark, gaveup, kq, k, k2; +extern char *wd1, *wd2; /* the complete words */ +extern int verb, obj, spk; extern int blklin; -int saved, savet, mxscor, latncy; +extern int saved, savet, mxscor, latncy; #define SHORT 50 /* How short is a demo game? */ @@ -110,68 +110,65 @@ int saved, savet, mxscor, latncy; struct hashtab { /* hash table for vocabulary */ int val; /* word type &index (ktab) */ char *atab; /* pointer to actual string */ -} voc[HTSIZE]; +}; +extern struct hashtab voc[HTSIZE]; #define SEED 1815622 /* "Encryption" seed */ struct text -#ifdef OLDSTUFF { - int seekadr; /* DATFILE must be < 2**16 */ -#endif /* !OLDSTUFF */ - { - char *seekadr; /* Msg start in virtual disk */ - int txtlen; /* length of msg starting here */ - }; + char *seekadr; /* Msg start in virtual disk */ + int txtlen; /* length of msg starting here */ +}; #define RTXSIZ 205 - struct text rtext[RTXSIZ]; /* random text messages */ +extern struct text rtext[RTXSIZ]; /* random text messages */ #define MAGSIZ 35 - struct text mtext[MAGSIZ]; /* magic messages */ +extern struct text mtext[MAGSIZ]; /* magic messages */ - int clsses; +extern int clsses; #define CLSMAX 12 - struct text ctext[CLSMAX]; /* classes of adventurer */ - int cval[CLSMAX]; +extern struct text ctext[CLSMAX]; /* classes of adventurer */ +extern int cval[CLSMAX]; - struct text ptext[101]; /* object descriptions */ +extern struct text ptext[101]; /* object descriptions */ #define LOCSIZ 141 /* number of locations */ - struct text ltext[LOCSIZ]; /* long loc description */ - struct text stext[LOCSIZ]; /* short loc descriptions */ +extern struct text ltext[LOCSIZ]; /* long loc description */ +extern struct text stext[LOCSIZ]; /* short loc descriptions */ - struct travlist { /* direcs & conditions of travel*/ - struct travlist *next; /* ptr to next list entry */ - int conditions; /* m in writeup (newloc / 1000) */ - int tloc; /* n in writeup (newloc % 1000) */ - int tverb; /* the verb that takes you there*/ - } *travel[LOCSIZ], *tkk; /* travel is closer to keys(...)*/ +extern struct travlist { /* direcs & conditions of travel*/ + struct travlist *next; /* ptr to next list entry */ + int conditions; /* m in writeup (newloc / 1000) */ + int tloc; /* n in writeup (newloc % 1000) */ + int tverb; /* the verb that takes you there*/ +} *travel[LOCSIZ], *tkk; /* travel is closer to keys(...)*/ - int atloc[LOCSIZ]; +extern int atloc[LOCSIZ]; - int plac[101]; /* initial object placement */ - int fixd[101], fixed[101]; /* location fixed? */ +extern int plac[101]; /* initial object placement */ +extern int fixd[101], fixed[101]; /* location fixed? */ - int actspk[35]; /* rtext msg for verb <n> */ +extern int actspk[35]; /* rtext msg for verb <n> */ - int cond[LOCSIZ]; /* various condition bits */ +extern int cond[LOCSIZ]; /* various condition bits */ - extern int setbit[16]; /* bit defn masks 1,2,4,... */ +extern int setbit[16]; /* bit defn masks 1,2,4,... */ - int hntmax; - int hints[20][5]; /* info on hints */ - int hinted[20], hintlc[20]; +extern int hntmax; +extern int hints[20][5]; /* info on hints */ +extern int hinted[20], hintlc[20]; - int place[101], prop[101], linkx[201]; - int abb[LOCSIZ]; +extern int place[101], prop[101], linkx[201]; +extern int abb[LOCSIZ]; - int maxtrs, tally, tally2; /* treasure values */ +extern int maxtrs, tally, tally2; /* treasure values */ #define FALSE 0 #define TRUE 1 - int keys, lamp, grate, cage, rod, rod2, steps, /* mnemonics */ +extern int keys, lamp, grate, cage, rod, rod2, steps, /* mnemonics */ bird, door, pillow, snake, fissur, tablet, clam, oyster, magzin, dwarf, knife, food, bottle, water, oil, plant, plant2, axe, mirror, dragon, chasm, troll, troll2, bear, messag, vend, batter, @@ -181,69 +178,69 @@ struct text enter, stream, pour, say, lock, throw, find, invent; - int chloc, chloc2, dseen[7], dloc[7], /* dwarf stuff */ +extern int chloc, chloc2, dseen[7], dloc[7], /* dwarf stuff */ odloc[7], dflag, daltlc; - int tk[21], stick, dtotal, attack; - int turns, lmwarn, iwest, knfloc, detail, /* various flags & counters */ +extern int tk[21], stick, dtotal, attack; +extern int turns, lmwarn, iwest, knfloc, detail, /* various flags & counters */ abbnum, maxdie, numdie, holdng, dkill, foobar, bonus, clock1, clock2, closng, apanic, closed, scorng; - int demo, limit; - - int at(int objj); - int bug(int n); - void carry(int, int); - void caveclose(void); - void checkhints(void); - void ciao(void); - void closing(void); - u_long crc(const char *ptr, int nr); - void crc_start(void); - int dark(void); - void datime(int *d, int *t); - char *decr(int, int, int, int, int); - void die(int entry); - void done(int entry); - void drop(int object, int where); - void dstroy(int); - int fdwarf(void); - int forced(int locc); - void getin(char **wrd1, char **wrd2); - int here(int objj); - void my_init(void); - void juggle(int); - int liq(void); - int liqloc(int locc); - int march(void); - void move(int, int); - void mspeak(int); - int pct(int n); - void poof(void); - void pspeak(int m, int skip); - int put(int, int, int); - int ran(int range); - void rdata(void); - int restore(const char *infile); - void rspeak(int); - int save(const char *); - int score(void); - void speak(const struct text *); - int Start(void); - void startup(void); - int toting(int objj); - void trapdel(int sig); - int trdrop(void); - int trfeed(void); - int trfill(void); - int trkill(void); - int tropen(void); - int trsay(void); - int trtake(void); - int trtoss(void); - int vocab(const char *, int, int); - int yes(int x, int y, int z); - int yesm(int x, int y, int z); +extern int demo, limit; + +int at(int objj); +int bug(int n); +void carry(int, int); +void caveclose(void); +void checkhints(void); +void ciao(void); +void closing(void); +u_long crc(const char *ptr, int nr); +void crc_start(void); +int dark(void); +void datime(int *d, int *t); +char *decr(int, int, int, int, int); +void die(int entry); +void done(int entry); +void drop(int object, int where); +void dstroy(int); +int fdwarf(void); +int forced(int locc); +void getin(char **wrd1, char **wrd2); +int here(int objj); +void my_init(void); +void juggle(int); +int liq(void); +int liqloc(int locc); +int march(void); +void move(int, int); +void mspeak(int); +int pct(int n); +void poof(void); +void pspeak(int m, int skip); +int put(int, int, int); +int ran(int range); +void rdata(void); +int restore(const char *infile); +void rspeak(int); +int save(const char *); +int score(void); +void speak(const struct text *); +int Start(void); +void startup(void); +int toting(int objj); +void trapdel(int sig); +int trdrop(void); +int trfeed(void); +int trfill(void); +int trkill(void); +int tropen(void); +int trsay(void); +int trtake(void); +int trtoss(void); +int vocab(const char *, int, int); +int yes(int x, int y, int z); +int yesm(int x, int y, int z); /* We need to get a little tricky to avoid strings */ /* #define DECR(a,b,c,d,e) decr('a'+'+','b'+'-','c'+'#','d'+'&','e'+'%') */ diff --git a/examples/dreamcast/conio/adventure/init.c b/examples/dreamcast/conio/adventure/init.c index 261a100..dc5a466 100644 --- a/examples/dreamcast/conio/adventure/init.c +++ b/examples/dreamcast/conio/adventure/init.c @@ -54,6 +54,7 @@ static const char rcsid[] = int blklin = TRUE; +/* bit defn masks 1,2,4,... */ int setbit[16] = {1, 2, 4, 010, 020, 040, 0100, 0200, 0400, 01000, 02000, 04000, 010000, 020000, 040000, 0100000 }; diff --git a/examples/dreamcast/cpp/Makefile b/examples/dreamcast/cpp/Makefile index 4d0a65a..0b7faab 100644 --- a/examples/dreamcast/cpp/Makefile +++ b/examples/dreamcast/cpp/Makefile @@ -9,17 +9,20 @@ all: $(KOS_MAKE) -C dcplib $(KOS_MAKE) -C clock $(KOS_MAKE) -C modplug_test + $(KOS_MAKE) -C out_of_memory clean: $(KOS_MAKE) -C gltest clean $(KOS_MAKE) -C dcplib clean $(KOS_MAKE) -C clock clean $(KOS_MAKE) -C modplug_test clean - + $(KOS_MAKE) -C out_of_memory clean + dist: $(KOS_MAKE) -C gltest dist $(KOS_MAKE) -C dcplib dist $(KOS_MAKE) -C clock dist $(KOS_MAKE) -C modplug_test dist + $(KOS_MAKE) -C out_of_memory dist diff --git a/examples/dreamcast/cpp/out_of_memory/Makefile b/examples/dreamcast/cpp/out_of_memory/Makefile new file mode 100644 index 0000000..0d05a2b --- /dev/null +++ b/examples/dreamcast/cpp/out_of_memory/Makefile @@ -0,0 +1,29 @@ +# +# C++ out-of-memory demonstration +# (c)2023 Falco Girgis +# + +TARGET = out_of_memory.elf +OBJS = out_of_memory.o +KOS_CPPFLAGS += -fexceptions + +all: rm-elf $(TARGET) + +include $(KOS_BASE)/Makefile.rules + +clean: + -rm -f $(TARGET) $(OBJS) + +rm-elf: + -rm -f $(TARGET) + +$(TARGET): $(OBJS) + kos-c++ -o $(TARGET) $(OBJS) -lm + +run: $(TARGET) + $(KOS_LOADER) $(TARGET) ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Allura u. <al...@so...> - 2023-02-07 22:56:31
|
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 KallistiOS implementation of conio. ". The branch, master has been updated via 63be6e2616ddb99807003645639b85e96de2e4ab (commit) from 5b9180ee3f0be2f58ce3ac3b5f29ae91d39df4e1 (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 63be6e2616ddb99807003645639b85e96de2e4ab Author: Andress Barajas <and...@gm...> Date: Tue Feb 7 09:29:01 2023 -0800 Remove use of old sem_create() ----------------------------------------------------------------------- Summary of changes: conio.c | 14 +++++++------- input.c | 24 ++++++++++++------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/conio.c b/conio.c index e19fca8..e8d5dca 100644 --- a/conio.c +++ b/conio.c @@ -27,7 +27,7 @@ int conio_ttymode = CONIO_TTY_NONE, conio_inputmode = CONIO_INPUT_NONE; int conio_theme = CONIO_THEME_PLAIN; /* freeze/thaw mutex */ -static semaphore_t *ft_mutex; +static semaphore_t ft_mutex; /* File handle for serial tty */ file_t conio_serial_fd; @@ -330,12 +330,12 @@ void conio_clear() { /* conio freeze (for sub-process taking over TA) */ void conio_freeze() { - sem_wait(ft_mutex); + sem_wait(&ft_mutex); } /* conio thaw */ void conio_thaw() { - sem_signal(ft_mutex); + sem_signal(&ft_mutex); } /* set theme */ @@ -353,7 +353,7 @@ static volatile int conio_exit = 0; static void *conio_thread(void *param) { conio_entered = 1; while (!conio_exit) { - sem_wait(ft_mutex); + sem_wait(&ft_mutex); conio_input_frame(); if (conio_ttymode == CONIO_TTY_PVR) { #ifdef GFX @@ -364,7 +364,7 @@ static void *conio_thread(void *param) { scif_flush(); thd_sleep(1000/60); /* Simulate frame delay */ } - sem_signal(ft_mutex); + sem_signal(&ft_mutex); } conio_exit = -1; return NULL; @@ -401,7 +401,7 @@ int conio_init(int ttymode, int inputmode) { conio_gotoxy(0, 0); } - ft_mutex = sem_create(1); + sem_init(&ft_mutex, 1); /* create the conio thread */ conio_exit = 0; @@ -423,7 +423,7 @@ int conio_shutdown() { ; /* Delete the sempahore */ - sem_destroy(ft_mutex); + sem_destroy(&ft_mutex); #ifdef GFX if (conio_ttymode == CONIO_TTY_PVR) diff --git a/input.c b/input.c index 497c723..22295d0 100644 --- a/input.c +++ b/input.c @@ -41,12 +41,12 @@ typedef struct cb_sem_data_str { struct cb_sem_data_str *next; } cb_sem_data_t; static volatile cb_sem_data_t *cb_queue; -static semaphore_t *cb_sem, *cb_mutex; +static semaphore_t cb_sem, cb_mutex; static volatile int cb_dead; static void input_cb_init() { - cb_sem = sem_create(0); - cb_mutex = sem_create(1); + sem_init(&cb_sem, 0); + sem_init(&cb_mutex, 1); cb_queue = NULL; cb_dead = 0; } @@ -55,13 +55,13 @@ static void cb_default(const char *str) { cb_sem_data_t *t; t = malloc(sizeof(cb_sem_data_t)); - sem_wait(cb_mutex); + sem_wait(&cb_mutex); strncpy(t->line, str, 255); t->line[255] = '\0'; t->next = (cb_sem_data_t *)cb_queue; cb_queue = t; - sem_signal(cb_mutex); + sem_signal(&cb_mutex); - sem_signal(cb_sem); + sem_signal(&cb_sem); } static void input_cb_shutdown() { @@ -76,8 +76,8 @@ static void input_cb_shutdown() { for (i=0; i<5; i++) thd_pass(); - sem_destroy(cb_mutex); - sem_destroy(cb_sem); + sem_destroy(&cb_mutex); + sem_destroy(&cb_sem); for (t=(cb_sem_data_t *)cb_queue; t; t = n) { n = t->next; @@ -99,15 +99,15 @@ int conio_input_getline(int block, char *dst, int dstcnt) { /* Wait for some input to be ready */ if (block > 0) { - if (sem_wait_timed(cb_sem, block) < 0) + if (sem_wait_timed(&cb_sem, block) < 0) return -1; } else { - if (sem_wait(cb_sem) < 0) + if (sem_wait(&cb_sem) < 0) return -1; } /* Grab the mutex and retrieve the line */ - sem_wait(cb_mutex); + sem_wait(&cb_mutex); assert( cb_queue != NULL ); for (l=NULL, t=(cb_sem_data_t *)cb_queue; t->next; t=t->next) l=t; @@ -118,7 +118,7 @@ int conio_input_getline(int block, char *dst, int dstcnt) { } else { cb_queue = NULL; } - sem_signal(cb_mutex); + sem_signal(&cb_mutex); strncpy(dst, t->line, dstcnt-1); dst[dstcnt-1] = '\0'; hooks/post-receive -- A KallistiOS implementation of conio. |
From: ljsebald <ljs...@us...> - 2023-02-04 02:20:42
|
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 99c716c8915ff0199fc657b6fb41ff549361cbf0 (commit) via 599f629625bd64b013025ab219d743f61848a5ce (commit) from 657da9353548121fc52c3092246f30e38aceae03 (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 99c716c8915ff0199fc657b6fb41ff549361cbf0 Author: Falco Girgis <gyr...@gm...> Date: Fri Feb 3 21:19:59 2023 -0500 GCC12 Toolchain Support (#90) * Initial GCC12 toolchain config scripts + patches - Added GCC12 toolchain config script as "config.mk.latest.sample" - Added corresponding patches for GCC12 and required Newlib4.1.0 - Updated README * toolchain may not build yet due to Obj-C issues. WIP. * GCC12 Toolchain Support (with C++20) GCC12 is the latest version of the GCC toolchain, which importantly adds support for the C++20 langauge standard, which includes concepts and a myriad of other useful features. Additonally, it seems to consistently produce smaller ELF files and .text segments plus increased performance on the pvrmark benchmark. It also has a fix for a known GCC9 compiler crash. - added config.mk.latest.sample as the config file template, using GCC version 12.2.0 and Newlib version 4.1.0 - added a patch for the GCC12 compiler * required a fix for libobjc configuration - added a tiny change to _types.h for time_t, as required by Newlib - tested new toolchain with all KOS examples and verified that nothing new is broken - tested C++20 "concepts" and "constraints" on DC * Updating GCC12 toolchain patch with critical fix - Turns out GCC12 had a major regression for the SH architecture that was fixed fairly quickly JUST AFTER ITS RELEASE. - While messing around with the GCC-RS toolchain, which was working fine, we realized there had to be a missing bugfix between the two - Thanks to darc and Coleton for helping to track down and test the fix. ` * Using darc's GCC12+Newlib patches. - Darc's patches apply more cleanly than the previous ones and have been independently verified at this point by multiple people, based on the same work. * Bumped Binutils + Newlib to max with Darc's change * Removed Rust from config file, fixed pvrmark error - accidentally commited with rust as a specified language in the config.mk.latest.sample config file for GCC12 - the pvrmark demo doesn't build for GCC12, because "start" is a global identifier as used in crto, and it shouldn't have worked in the other toolchains either. * Added patch file for Newlib4.3.0 * Fixes for quadmark, trimark, pvrmark_strips, etc - The following examples had duplicate symbol errors (rightfully) due to their use of the symbol "start," which has now been changed to "begin": * quadmark * trimark * tristripmark * pvrmark_strips * pvrmark_strips_direct * Resolved conflict with main's pvrmark.c. - Had to manually apply the fix from earlier -- lowering the start test count by shaving off a 0 to match main. * Fixed previous change, readded 0 to pvrmark start - Accidentally shaved off one too many zeroes. * Fixed Newlib version check for >= 3. - apparently it was broken for newlib 3 as well. commit 599f629625bd64b013025ab219d743f61848a5ce Author: darcagn <da...@pr...> Date: Fri Feb 3 20:04:41 2023 -0600 Add Falco Girgis to AUTHORS (#93) ----------------------------------------------------------------------- Summary of changes: AUTHORS | 1 + .../dreamcast/kgl/benchmarks/quadmark/quadmark.c | 8 +- .../dreamcast/kgl/benchmarks/trimark/trimark.c | 8 +- .../kgl/benchmarks/tristripmark/tristripmark.c | 8 +- examples/dreamcast/pvr/pvrmark/pvrmark.c | 8 +- .../dreamcast/pvr/pvrmark_strips/pvrmark_strips.c | 8 +- .../pvrmark_strips_direct/pvrmark_strips_direct.c | 8 +- include/sys/_types.h | 8 +- utils/dc-chain/README.md | 9 +- ...g.mk.testing.sample => config.mk.latest.sample} | 10 +-- .../{gcc-9.3.0-kos.diff => gcc-12.2.0-kos.diff} | 99 +++++++++++++++------- ...newlib-3.3.0-kos.diff => newlib-4.1.0-kos.diff} | 76 ++++++++--------- ...3.0-kos.diff => newlib-4.3.0.20230120-kos.diff} | 78 ++++++++--------- 13 files changed, 187 insertions(+), 142 deletions(-) copy utils/dc-chain/{config.mk.testing.sample => config.mk.latest.sample} (98%) mode change 100644 => 100755 copy utils/dc-chain/patches/{gcc-9.3.0-kos.diff => gcc-12.2.0-kos.diff} (91%) copy utils/dc-chain/patches/{newlib-3.3.0-kos.diff => newlib-4.1.0-kos.diff} (79%) mode change 100644 => 100755 copy utils/dc-chain/patches/{newlib-3.3.0-kos.diff => newlib-4.3.0.20230120-kos.diff} (77%) mode change 100644 => 100755 diff --git a/AUTHORS b/AUTHORS index 22418b6..28c2422 100644 --- a/AUTHORS +++ b/AUTHORS @@ -43,6 +43,7 @@ Joe Fenton: 2016 Stefan Galowicz: 2016, 2017 Luke Benstead: 2020, 2021 Eric Fradella: 2023 +Falco Girgis: 2023 Files with Specific licenses: ----------------------------- diff --git a/examples/dreamcast/kgl/benchmarks/quadmark/quadmark.c b/examples/dreamcast/kgl/benchmarks/quadmark/quadmark.c index 61b2b5d..b711242 100644 --- a/examples/dreamcast/kgl/benchmarks/quadmark/quadmark.c +++ b/examples/dreamcast/kgl/benchmarks/quadmark/quadmark.c @@ -98,7 +98,7 @@ void do_frame() { glutSwapBuffers(); } -time_t start; +time_t begin; void switch_tests(int ppf) { printf("Beginning new test: %d polys per frame (%d per second at 60fps)\n", ppf * 2, ppf * 2 * 60); @@ -111,8 +111,8 @@ void check_switch() { now = time(NULL); - if(now >= (start + 5)) { - start = time(NULL); + if(now >= (begin + 5)) { + begin = time(NULL); printf(" Average Frame Rate: ~%f fps (%d pps)\n", avgfps, (int)(polycnt * avgfps * 2)); switch(phase) { @@ -163,7 +163,7 @@ int main(int argc, char **argv) { /* Start off with something obscene */ switch_tests(200000 / 60); - start = time(NULL); + begin = time(NULL); for(;;) { if(check_start()) diff --git a/examples/dreamcast/kgl/benchmarks/trimark/trimark.c b/examples/dreamcast/kgl/benchmarks/trimark/trimark.c index 79ddcab..6687241 100644 --- a/examples/dreamcast/kgl/benchmarks/trimark/trimark.c +++ b/examples/dreamcast/kgl/benchmarks/trimark/trimark.c @@ -97,7 +97,7 @@ void do_frame() { glutSwapBuffers(); } -time_t start; +time_t begin; void switch_tests(int ppf) { printf("Beginning new test: %d polys per frame (%d per second at 60fps)\n", ppf * 2, ppf * 2 * 60); @@ -110,8 +110,8 @@ void check_switch() { now = time(NULL); - if(now >= (start + 5)) { - start = time(NULL); + if(now >= (begin + 5)) { + begin = time(NULL); printf(" Average Frame Rate: ~%f fps (%d pps)\n", avgfps, (int)(polycnt * avgfps * 2)); switch(phase) { @@ -159,7 +159,7 @@ int main(int argc, char **argv) { /* Start off with something obscene */ switch_tests(220000 / 60); - start = time(NULL); + begin = time(NULL); for(;;) { if(check_start()) diff --git a/examples/dreamcast/kgl/benchmarks/tristripmark/tristripmark.c b/examples/dreamcast/kgl/benchmarks/tristripmark/tristripmark.c index 82b4c7f..fb18a86 100644 --- a/examples/dreamcast/kgl/benchmarks/tristripmark/tristripmark.c +++ b/examples/dreamcast/kgl/benchmarks/tristripmark/tristripmark.c @@ -100,7 +100,7 @@ void do_frame() { glutSwapBuffers(); } -time_t start; +time_t begin; void switch_tests(int ppf) { printf("Beginning new test: %d polys per frame (%d per second at 60fps)\n", ppf * 2, ppf * 2 * 60); @@ -113,8 +113,8 @@ void check_switch() { now = time(NULL); - if(now >= (start + 5)) { - start = time(NULL); + if(now >= (begin + 5)) { + begin = time(NULL); printf(" Average Frame Rate: ~%f fps (%d pps)\n", avgfps, (int)(polycnt * avgfps * 2)); switch(phase) { @@ -165,7 +165,7 @@ int main(int argc, char **argv) { /* Start off with something obscene */ switch_tests(200000 / 60); - start = time(NULL); + begin = time(NULL); for(;;) { if(check_start()) diff --git a/examples/dreamcast/pvr/pvrmark/pvrmark.c b/examples/dreamcast/pvr/pvrmark/pvrmark.c index df69200..276db30 100644 --- a/examples/dreamcast/pvr/pvrmark/pvrmark.c +++ b/examples/dreamcast/pvr/pvrmark/pvrmark.c @@ -112,7 +112,7 @@ void do_frame() { vid_border_color(0, 255, 0); } -time_t start; +time_t begin; void switch_tests(int ppf) { printf("Beginning new test: %d polys per frame (%d per second at 60fps)\n", ppf, ppf * 60); @@ -125,8 +125,8 @@ void check_switch() { now = time(NULL); - if(now >= (start + 5)) { - start = time(NULL); + if(now >= (begin + 5)) { + begin = time(NULL); printf(" Average Frame Rate: ~%f fps (%d pps)\n", avgfps, (int)(polycnt * avgfps)); switch(phase) { @@ -174,7 +174,7 @@ int main(int argc, char **argv) { /* Start off with something obscene */ switch_tests(200000 / 60); - start = time(NULL); + begin = time(NULL); for(;;) { if(check_start()) diff --git a/examples/dreamcast/pvr/pvrmark_strips/pvrmark_strips.c b/examples/dreamcast/pvr/pvrmark_strips/pvrmark_strips.c index 1085a6c..a775a05 100644 --- a/examples/dreamcast/pvr/pvrmark_strips/pvrmark_strips.c +++ b/examples/dreamcast/pvr/pvrmark_strips/pvrmark_strips.c @@ -115,7 +115,7 @@ void do_frame() { vid_border_color(0, 255, 0); } -time_t start; +time_t begin; void switch_tests(int ppf) { printf("Beginning new test: %d polys per frame (%d per second at 60fps)\n", ppf, ppf * 60); @@ -128,8 +128,8 @@ void check_switch() { now = time(NULL); - if(now >= (start + 5)) { - start = time(NULL); + if(now >= (begin + 5)) { + begin = time(NULL); printf(" Average Frame Rate: ~%f fps (%d pps)\n", avgfps, (int)(polycnt * avgfps)); switch(phase) { @@ -177,7 +177,7 @@ int main(int argc, char **argv) { /* Start off with something obscene */ switch_tests(2000000 / 60); - start = time(NULL); + begin = time(NULL); for(;;) { if(check_start()) diff --git a/examples/dreamcast/pvr/pvrmark_strips_direct/pvrmark_strips_direct.c b/examples/dreamcast/pvr/pvrmark_strips_direct/pvrmark_strips_direct.c index d79dd42..572a57c 100644 --- a/examples/dreamcast/pvr/pvrmark_strips_direct/pvrmark_strips_direct.c +++ b/examples/dreamcast/pvr/pvrmark_strips_direct/pvrmark_strips_direct.c @@ -136,7 +136,7 @@ void do_frame() { oldseed = seed; } -time_t start; +time_t begin; void switch_tests(int ppf) { printf("Beginning new test: %d polys per frame (%d per second at 60fps)\n", ppf, ppf * 60); @@ -149,8 +149,8 @@ void check_switch() { now = time(NULL); - if(now >= (start + 5)) { - start = time(NULL); + if(now >= (begin + 5)) { + begin = time(NULL); printf(" Average Frame Rate: ~%f fps (%d pps)\n", avgfps, (int)(polycnt * avgfps)); switch(phase) { @@ -198,7 +198,7 @@ int main(int argc, char **argv) { /* Start off with something obscene */ switch_tests(2000000 / 60); - start = time(NULL); + begin = time(NULL); for(;;) { if(check_start()) diff --git a/include/sys/_types.h b/include/sys/_types.h index 59593de..6a95a24 100644 --- a/include/sys/_types.h +++ b/include/sys/_types.h @@ -96,6 +96,10 @@ typedef long __blkcnt_t; typedef long __blksize_t; #endif +#ifndef __daddr_t_defined +typedef long __daddr_t; +#endif + #ifndef __fsblkcnt_t_defined typedef unsigned long long __fsblkcnt_t; #endif @@ -128,8 +132,8 @@ typedef unsigned short __nlink_t; typedef long __suseconds_t; /* microseconds (signed) */ typedef unsigned long __useconds_t; /* microseconds (unsigned) */ -#if __NEWLIB__ > 3 -#define _TIME_T long long +#if __NEWLIB__ >= 3 +#define _TIME_T_ long long #else #define _TIME_T_ long #endif diff --git a/utils/dc-chain/README.md b/utils/dc-chain/README.md index 9ee1f33..7b448da 100644 --- a/utils/dc-chain/README.md +++ b/utils/dc-chain/README.md @@ -108,17 +108,20 @@ without problems. Working **GCC** and **Newlib** version combinations are: +- GCC `12.2.0` with Newlib `4.3.0` for `sh-elf` and GCC `8.4.0` for `arm-eabi` + (**latest**; the most modern combination); - GCC `9.3.0` with Newlib `3.3.0` for `sh-elf` and GCC `8.4.0` for `arm-eabi` - (**testing**; the most modern combination); + (**testing**; a middle-ground semi-recent, widely tested combination); - GCC `4.7.4` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (**stable**; the most well tested combination, [some issues may happen in C++](https://dcemulation.org/phpBB/viewtopic.php?f=29&t=104724)); - GCC `4.7.3` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (**old-stable**; previous version, [some issues may happen in C++](https://dcemulation.org/phpBB/viewtopic.php?f=29&t=104724)). -To help you on this, 2 `config.mk` templates are provided with `dc-chain`: +To help you on this, 3 `config.mk` templates are provided with `dc-chain`: - `config.mk.testing.sample` (testing); -- `config.mk.stable.sample` (stable). +- `config.mk.stable.sample` (stable); +- `config.mk.latest.sample` (latest). Just copy the relevant `config.mk` sample file to `config.mk` and you are good to go. diff --git a/utils/dc-chain/config.mk.testing.sample b/utils/dc-chain/config.mk.latest.sample old mode 100644 new mode 100755 similarity index 98% copy from utils/dc-chain/config.mk.testing.sample copy to utils/dc-chain/config.mk.latest.sample index d79bbf5..a351264 --- a/utils/dc-chain/config.mk.testing.sample +++ b/utils/dc-chain/config.mk.latest.sample @@ -18,10 +18,10 @@ # insight # Toolchain versions for SH -sh_binutils_ver=2.34 -sh_gcc_ver=9.3.0 -newlib_ver=3.3.0 -gdb_ver=9.2 +sh_binutils_ver=2.40 +sh_gcc_ver=12.2.0 +newlib_ver=4.3.0.20230120 +gdb_ver=12.1 insight_ver=6.8-1 # Tarball extensions to download for SH @@ -34,7 +34,7 @@ insight_tarball_type=bz2 # Toolchain for ARM # The ARM version of binutils/gcc is separated out as the particular CPU # versions we need may not be available in newer versions of GCC. -arm_binutils_ver=2.34 +arm_binutils_ver=2.40 arm_gcc_ver=8.4.0 # Tarball extensions to download for ARM diff --git a/utils/dc-chain/patches/gcc-9.3.0-kos.diff b/utils/dc-chain/patches/gcc-12.2.0-kos.diff similarity index 91% copy from utils/dc-chain/patches/gcc-9.3.0-kos.diff copy to utils/dc-chain/patches/gcc-12.2.0-kos.diff index 2e5ed15..e695ffd 100644 --- a/utils/dc-chain/patches/gcc-9.3.0-kos.diff +++ b/utils/dc-chain/patches/gcc-12.2.0-kos.diff @@ -1,6 +1,6 @@ -diff --color -ruN gcc-9.3.0/gcc/config/sh/sh-c.c gcc-9.3.0-kos/gcc/config/sh/sh-c.c ---- gcc-9.3.0/gcc/config/sh/sh-c.c 2023-01-02 13:49:34.172435526 -0600 -+++ gcc-9.3.0-kos/gcc/config/sh/sh-c.c 2023-01-02 13:53:48.671801287 -0600 +diff --color -ruN gcc-12.2.0/gcc/config/sh/sh-c.cc gcc-12.2.0-kos/gcc/config/sh/sh-c.cc +--- gcc-12.2.0/gcc/config/sh/sh-c.cc 2023-02-01 22:27:13.433712723 -0600 ++++ gcc-12.2.0-kos/gcc/config/sh/sh-c.cc 2023-02-01 22:27:35.012760470 -0600 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -13,10 +13,32 @@ diff --color -ruN gcc-9.3.0/gcc/config/sh/sh-c.c gcc-9.3.0-kos/gcc/config/sh/sh- + /* Toolchain supports setting up stack for 32MB */ + builtin_define ("__KOS_GCC_32MB__"); } -diff --color -ruN gcc-9.3.0/gcc/configure gcc-9.3.0-kos/gcc/configure ---- gcc-9.3.0/gcc/configure 2023-01-02 13:49:36.017438178 -0600 -+++ gcc-9.3.0-kos/gcc/configure 2023-01-02 13:51:59.907644974 -0600 -@@ -11862,7 +11862,7 @@ +diff --color -ruN gcc-12.2.0/gcc/config/sh/sh_treg_combine.cc gcc-12.2.0-kos/gcc/config/sh/sh_treg_combine.cc +--- gcc-12.2.0/gcc/config/sh/sh_treg_combine.cc 2023-02-01 22:27:13.432712721 -0600 ++++ gcc-12.2.0-kos/gcc/config/sh/sh_treg_combine.cc 2023-02-01 22:27:35.012760470 -0600 +@@ -37,6 +37,7 @@ + #include "cfgrtl.h" + #include "tree-pass.h" + #include "expr.h" ++#include "tm-preds.h" + + /* + This pass tries to optimize for example this: +@@ -426,10 +427,6 @@ + return GET_CODE (p) == SET && GET_CODE (XEXP (p, 1)) == IF_THEN_ELSE; + } + +-// FIXME: Remove dependency on SH predicate function somehow. +-extern int t_reg_operand (rtx, machine_mode); +-extern int negt_reg_operand (rtx, machine_mode); +- + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // RTL pass class + +diff --color -ruN gcc-12.2.0/gcc/configure gcc-12.2.0-kos/gcc/configure +--- gcc-12.2.0/gcc/configure 2023-02-01 22:27:21.148729794 -0600 ++++ gcc-12.2.0-kos/gcc/configure 2023-02-01 22:27:35.014760474 -0600 +@@ -12885,7 +12885,7 @@ target_thread_file='single' ;; aix | dce | lynx | mipssde | posix | rtems | \ @@ -25,11 +47,11 @@ diff --color -ruN gcc-9.3.0/gcc/configure gcc-9.3.0-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/sh/crt1.S ---- gcc-9.3.0/libgcc/config/sh/crt1.S 2023-01-02 13:49:33.499434559 -0600 -+++ gcc-9.3.0-kos/libgcc/config/sh/crt1.S 2023-01-02 13:52:08.879657868 -0600 +diff --color -ruN gcc-12.2.0/libgcc/config/sh/crt1.S gcc-12.2.0-kos/libgcc/config/sh/crt1.S +--- gcc-12.2.0/libgcc/config/sh/crt1.S 2023-02-01 22:27:22.510732808 -0600 ++++ gcc-12.2.0-kos/libgcc/config/sh/crt1.S 2023-02-01 22:27:35.014760474 -0600 @@ -1,724 +1,225 @@ --/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +-/* Copyright (C) 2000-2022 Free Software Foundation, Inc. - This file was pretty much copied from newlib. +! KallistiOS ##version## +! @@ -961,9 +983,9 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/ + .word 0x090d +ccr_data_ocram: + .word 0x092d -diff --color -ruN gcc-9.3.0/libgcc/config/sh/fake-kos.S gcc-9.3.0-kos/libgcc/config/sh/fake-kos.S ---- gcc-9.3.0/libgcc/config/sh/fake-kos.S 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-9.3.0-kos/libgcc/config/sh/fake-kos.S 2023-01-02 13:51:59.907644974 -0600 +diff --color -ruN gcc-12.2.0/libgcc/config/sh/fake-kos.S gcc-12.2.0-kos/libgcc/config/sh/fake-kos.S +--- gcc-12.2.0/libgcc/config/sh/fake-kos.S 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-12.2.0-kos/libgcc/config/sh/fake-kos.S 2023-02-01 22:27:35.014760474 -0600 @@ -0,0 +1,78 @@ +! Weakly linked symbols used to get GCC to hopefully compile itself properly. +! These will be replaced by the real symbols in actual compiled programs. @@ -1043,9 +1065,9 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/fake-kos.S gcc-9.3.0-kos/libgcc/con +_cond_signal: + rts + mov #-1, r0 -diff --color -ruN gcc-9.3.0/libgcc/config/sh/gthr-kos.h gcc-9.3.0-kos/libgcc/config/sh/gthr-kos.h ---- gcc-9.3.0/libgcc/config/sh/gthr-kos.h 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-9.3.0-kos/libgcc/config/sh/gthr-kos.h 2023-01-02 13:51:59.907644974 -0600 +diff --color -ruN gcc-12.2.0/libgcc/config/sh/gthr-kos.h gcc-12.2.0-kos/libgcc/config/sh/gthr-kos.h +--- gcc-12.2.0/libgcc/config/sh/gthr-kos.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-12.2.0-kos/libgcc/config/sh/gthr-kos.h 2023-02-01 22:27:35.015760477 -0600 @@ -0,0 +1,401 @@ +/* Copyright (C) 2009, 2010, 2011, 2012, 2020 Lawrence Sebald */ + @@ -1448,9 +1470,9 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/gthr-kos.h gcc-9.3.0-kos/libgcc/con + + +#endif /* ! GCC_GTHR_KOS_H */ -diff --color -ruN gcc-9.3.0/libgcc/config/sh/t-sh gcc-9.3.0-kos/libgcc/config/sh/t-sh ---- gcc-9.3.0/libgcc/config/sh/t-sh 2023-01-02 13:49:33.500434561 -0600 -+++ gcc-9.3.0-kos/libgcc/config/sh/t-sh 2023-01-02 13:51:59.907644974 -0600 +diff --color -ruN gcc-12.2.0/libgcc/config/sh/t-sh gcc-12.2.0-kos/libgcc/config/sh/t-sh +--- gcc-12.2.0/libgcc/config/sh/t-sh 2023-02-01 22:27:22.509732805 -0600 ++++ gcc-12.2.0-kos/libgcc/config/sh/t-sh 2023-02-01 22:27:35.015760477 -0600 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -1460,10 +1482,10 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/t-sh gcc-9.3.0-kos/libgcc/config/sh crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff --color -ruN gcc-9.3.0/libgcc/configure gcc-9.3.0-kos/libgcc/configure ---- gcc-9.3.0/libgcc/configure 2023-01-02 13:49:33.533434608 -0600 -+++ gcc-9.3.0-kos/libgcc/configure 2023-01-02 13:51:59.908644975 -0600 -@@ -5550,6 +5550,7 @@ +diff --color -ruN gcc-12.2.0/libgcc/configure gcc-12.2.0-kos/libgcc/configure +--- gcc-12.2.0/libgcc/configure 2023-02-01 22:27:22.535732863 -0600 ++++ gcc-12.2.0-kos/libgcc/configure 2023-02-01 22:27:35.015760477 -0600 +@@ -5698,6 +5698,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; win32) thread_header=config/i386/gthr-win32.h ;; @@ -1471,9 +1493,24 @@ diff --color -ruN gcc-9.3.0/libgcc/configure gcc-9.3.0-kos/libgcc/configure esac -diff --color -ruN gcc-9.3.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-9.3.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-9.3.0/libstdc++-v3/config/cpu/sh/atomicity.h 2023-01-02 13:49:33.731434893 -0600 -+++ gcc-9.3.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-01-02 13:51:59.915644985 -0600 +diff --color -ruN gcc-12.2.0/libobjc/configure gcc-12.2.0-kos/libobjc/configure +--- gcc-12.2.0/libobjc/configure 2023-02-01 22:27:12.570710814 -0600 ++++ gcc-12.2.0-kos/libobjc/configure 2023-02-01 22:27:59.410814455 -0600 +@@ -2917,11 +2917,9 @@ + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include <stdio.h> + int + main () + { +-printf ("hello world\n"); + ; + return 0; + } +diff --color -ruN gcc-12.2.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-12.2.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h +--- gcc-12.2.0/libstdc++-v3/config/cpu/sh/atomicity.h 2023-02-01 22:27:22.798733445 -0600 ++++ gcc-12.2.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-02-01 22:27:35.015760477 -0600 @@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -1524,10 +1561,10 @@ diff --color -ruN gcc-9.3.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-9.3.0-kos + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -diff --color -ruN gcc-9.3.0/libstdc++-v3/configure gcc-9.3.0-kos/libstdc++-v3/configure ---- gcc-9.3.0/libstdc++-v3/configure 2023-01-02 13:49:34.054435357 -0600 -+++ gcc-9.3.0-kos/libstdc++-v3/configure 2023-01-02 13:51:59.918644989 -0600 -@@ -15629,6 +15629,7 @@ +diff --color -ruN gcc-12.2.0/libstdc++-v3/configure gcc-12.2.0-kos/libstdc++-v3/configure +--- gcc-12.2.0/libstdc++-v3/configure 2023-02-01 22:27:24.420737034 -0600 ++++ gcc-12.2.0-kos/libstdc++-v3/configure 2023-02-01 22:27:35.019760486 -0600 +@@ -15774,6 +15774,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; win32) thread_header=config/i386/gthr-win32.h ;; diff --git a/utils/dc-chain/patches/newlib-3.3.0-kos.diff b/utils/dc-chain/patches/newlib-4.1.0-kos.diff old mode 100644 new mode 100755 similarity index 79% copy from utils/dc-chain/patches/newlib-3.3.0-kos.diff copy to utils/dc-chain/patches/newlib-4.1.0-kos.diff index 5880eb5..8065e83 --- a/utils/dc-chain/patches/newlib-3.3.0-kos.diff +++ b/utils/dc-chain/patches/newlib-4.1.0-kos.diff @@ -1,17 +1,17 @@ -diff -ruN newlib-3.3.0/newlib/configure.host newlib-3.3.0-kos/newlib/configure.host ---- newlib-3.3.0/newlib/configure.host 2020-01-22 05:05:51.000000000 -0500 -+++ newlib-3.3.0-kos/newlib/configure.host 2021-02-24 21:52:37.885298200 -0500 -@@ -319,6 +319,7 @@ +diff --color -ruN newlib-4.1.0/newlib/configure.host newlib-4.1.0-kos/newlib/configure.host +--- newlib-4.1.0/newlib/configure.host 2023-02-01 22:17:03.526363209 -0600 ++++ newlib-4.1.0-kos/newlib/configure.host 2023-02-01 22:18:00.450489163 -0600 +@@ -325,6 +325,7 @@ ;; sh | sh64) machine_dir=sh + newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED -DMALLOC_PROVIDED -DABORT_PROVIDED -DHAVE_FCNTL -ffunction-sections -fdata-sections" ;; sparc*) - machine_dir=sparc -diff -ruN newlib-3.3.0/newlib/libc/include/assert.h newlib-3.3.0-kos/newlib/libc/include/assert.h ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-02-04 02:00:19
|
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 657da9353548121fc52c3092246f30e38aceae03 (commit) via 85b38820c0a13a10a0f6d1e4d664283294838639 (commit) via 7567d90b158da3f6d9b009dc52be79fdc36f3e2a (commit) via ea74fdb75aa43d2357dc0e5a15a88f2079fb953d (commit) from 3e0386f19af6af6850f0ddabd588ce97ee776dd3 (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 657da9353548121fc52c3092246f30e38aceae03 Author: Falco Girgis <gyr...@gm...> Date: Fri Feb 3 20:57:43 2023 -0500 Readme (#83) Rework root level README file. commit 85b38820c0a13a10a0f6d1e4d664283294838639 Merge: 3e0386f 7567d90 Author: Lawrence Sebald <ljs...@us...> Date: Thu Feb 2 14:43:09 2023 -0500 Merge pull request #92 from gyrovorbis/gcc-version Add GCC Version Information to KOS Banner commit 7567d90b158da3f6d9b009dc52be79fdc36f3e2a Author: falco <gyr...@gm...> Date: Thu Feb 2 14:22:29 2023 -0500 Fixed trivial syntax error in make_banner.sh commit ea74fdb75aa43d2357dc0e5a15a88f2079fb953d Author: falco <gyr...@gm...> Date: Wed Feb 1 16:36:43 2023 -0500 Added GCC version to KOS startup banner - modified make_banner.sh to call GCC with the --version option, adding the first line of its output to the banner to be displayed upon startup ----------------------------------------------------------------------- Summary of changes: README.md | 87 ++++++++++++++++++++++++----- kernel/arch/dreamcast/kernel/make_banner.sh | 4 ++ 2 files changed, 78 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 50b2495..cdcf93c 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,83 @@ -KOS -=== +# KallistiOS -KOS is an unofficial development environment for the SEGA Dreamcast game console. +KOS is an unofficial development environment for the SEGA Dreamcast game console with some support for the NAOMI and NAOMI 2 arcade boards. -It was developed from scratch over the internet by a group of free software developers, and has no relation to the old Katana or WinCE development kits for the DC. +KOS was developed from scratch over the internet by a group of free software developers and has no relation to the official Sega Katana or Microsoft Windows CE Dreamcast development kits. This has allowed it to fuel a thriving Dreamcast homebrew scene, powering many commercial releases for the platform over the years. It supports a signficiant portion of the Dreamcast's hardware capabilities and a wide variety of peripherals, accessories, and add-ons for the console, including custom hardware modifications that have been created by the scene. +Despite the console's age, KOS offers an extremely modern, programmer-friendly development environment, supporting C17 and C++17, with the majority of their standard libraries fully supported and additional support for many POSIX APIs. Additionally, KOS-ports offers a rich set of add-on libraries such as SDL, OpenGL, and Lua for the platform. -Documentation -------------- +## Features +##### Core Functionality +* Concurrency with Kernel Threads, C11 Threads, pthreads +* Virtual filesystem abstraction +* IPv4/IPv6 Network stack +* Dynamically loading libraries/modules +* GDB Debug stubs -For all documentation, please look in the *doc* directory. -Please read *at least* the main README file before trying to begin! +##### Dreamcast Hardware Support +* GD-Rom driver +* Low-level 3D PowerVR Graphics +* SH4 ASM-Optimized Math Routines +* SH4 SCIF Serial I/O +* DMA Controller +* Flashrom Access +* AICA SPU Sound Processor Driver +* Cache and Store Queue Management +* Timer Peripherals and Real-Time Clock +* MMU Management API +* BIOS Font Rendering -You will need to set up an environment variable file, build an SH4 and ARM cross-compiler, build *KOS* and optionally *kos-ports*. +##### Peripherals and Accessory Support +* Visual Memory Unit +* Puru Puru Vibration Pack +* Seaman Microphone +* Dreameye Webcam +* Lightgun +* Keyboard +* Mouse +* Dial-up Modem +* Broadband Adapter +* LAN Adapter +* VGA Adapter +* SD Card Reader -An installation script, guide as well as programming tutorials may be found -in the wiki at http://dcemulation.org/?title=Development +##### Hardware Modification Support +* IDE Hard Drive +* 32MB RAM Upgrade +* Custom BIOS Flashroms -Ask for help on the forums: http://dcemulation.org/phpBB/viewforum.php?f=29 +## Getting Started +A beginner's guide to development for the Sega Dreamcast along with detailed instructions for installing KOS and the required toolchains can be found on the [Dreamcast Wiki](https://dreamcast.wiki/Getting_Started_with_Dreamcast_development). Additional documentation can be found in the docs folder. + +## Examples +Once you've set up the environment and are ready to begin developing, a good place to start learning is the examples directory, which provides demos for the various KOS APIs and for interacting with the Dreamcast's hardware. Examples include: +- Hello World +- Console Input/Output +- Assertions, stacktraces, threading +- Drawing directly to the framebuffer +- Rendering with OpenGL +- Rendering with KGL +- Rendering with KOS PVR API +- Texturing with libPNG +- Bump maps, modifier volumes, render-to-texture PVR effects +- Audio playback on the ARM SPU +- Audio playback using SDL Audio +- Audio playback using OGG, MP3, and CDDA +- Querying controller input +- Querying keyboard input +- Querying mouse input +- Querying lightgun input +- Accessing the VMU filesystem +- Accessing the SD card filesystem +- Networking with the modem, broadband adapter, and LAN adapter +- Taking pictures with the DreamEye webcam +- Reading and Writing to/from ATA devices +- Testing 32MB RAM hardware mod +- Interactive Lua interpreter terminal + +## Resources +[DCEmulation Forums](http://dcemulation.org/phpBB/viewforum.php?f=29): Goldmine of Dreamcast development information and history +[Dreamcast Wiki](http://dreamcast.wiki): Large collection of tutorials and articles for beginners +[Simulant Discord Chat](https://discord.gg/bpDZHT78PA): Home to the official Discord channel of KOS +IRC Channel: irc.libera.chat #dreamcastdev -IRC chat: irc.libera.chat #dreamcastdev diff --git a/kernel/arch/dreamcast/kernel/make_banner.sh b/kernel/arch/dreamcast/kernel/make_banner.sh index 218d805..e4179e9 100755 --- a/kernel/arch/dreamcast/kernel/make_banner.sh +++ b/kernel/arch/dreamcast/kernel/make_banner.sh @@ -40,6 +40,10 @@ printf ':' >> banner.h printf "$KOS_BASE" >> banner.h printf '\\n"\n' >> banner.h +printf '" ' >> banner.h +tmp=`$KOS_CC --version | head -n 1` +printf "$tmp" >> banner.h +printf '\\n"\n' >> banner.h printf ';\n' >> banner.h printf 'static const char kern_version[] = \n"' >> banner.h hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-01-16 21:24:10
|
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 3e0386f19af6af6850f0ddabd588ce97ee776dd3 (commit) via cd3e84a19667a17495295ddfdf76fd29866babe2 (commit) from 48bbf14b2331e1ffe7ffad0b08ca6b5248cdbac4 (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 3e0386f19af6af6850f0ddabd588ce97ee776dd3 Merge: 48bbf14 cd3e84a Author: Lawrence Sebald <ljs...@us...> Date: Mon Jan 16 16:23:34 2023 -0500 Merge pull request #87 from darcagn/master Add change allowing mm_sbrk to allocate memory beyond 0x8d000000 on 32MB systems. commit cd3e84a19667a17495295ddfdf76fd29866babe2 Author: darc <da...@pr...> Date: Sun Jan 15 23:21:54 2023 -0600 Add change allowing mm_sbrk to allocate memory beyond 0x8d000000 on 32MB systems ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/kernel/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/arch/dreamcast/kernel/mm.c b/kernel/arch/dreamcast/kernel/mm.c index c07ad90..296c181 100644 --- a/kernel/arch/dreamcast/kernel/mm.c +++ b/kernel/arch/dreamcast/kernel/mm.c @@ -46,7 +46,7 @@ void* mm_sbrk(unsigned long increment) { sbrk_base = (void *)(increment + (unsigned long)sbrk_base); - if(((uint32)sbrk_base) >= (0x8d000000 - 65536)) { + if(((uint32)sbrk_base) >= (_arch_mem_top - 65536)) { dbglog(DBG_DEAD, "Requested sbrk_base %p, was %p, diff %lu\n", sbrk_base, base, increment); arch_panic("out of memory; about to run over kernel stack"); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-01-16 21:23:06
|
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 48bbf14b2331e1ffe7ffad0b08ca6b5248cdbac4 (commit) via 0ba2043d058733da67c0b285f895b30ee99dada4 (commit) via ee09ed2c51b2d3f0900043cb7f06e0678e3e1e6d (commit) via 52ba48b329ee1da1b35db5acf80679c57dfc78d0 (commit) via d63f597b9b0871d433bc457bd455c7184520c617 (commit) from 0c9a7bcc27905fc20c6a4889603e80fc8b3c4185 (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 48bbf14b2331e1ffe7ffad0b08ca6b5248cdbac4 Merge: 0c9a7bc 0ba2043 Author: Lawrence Sebald <ljs...@us...> Date: Mon Jan 16 16:22:44 2023 -0500 Merge branch 'master' of github.com:KallistiOS/KallistiOS commit 0ba2043d058733da67c0b285f895b30ee99dada4 Merge: 205e8af ee09ed2 Author: Lawrence Sebald <ljs...@us...> Date: Tue Jan 10 17:44:05 2023 -0500 Merge pull request #86 from darcagn/master Correct typo in cdrom_change_dataype function to cdrom_change_datatype commit ee09ed2c51b2d3f0900043cb7f06e0678e3e1e6d Author: darc <da...@pr...> Date: Tue Jan 10 16:26:00 2023 -0600 Fix typo.... again. commit 52ba48b329ee1da1b35db5acf80679c57dfc78d0 Author: darc <da...@pr...> Date: Tue Jan 10 16:20:01 2023 -0600 Add helper function with typo for backward compatibility, using deprecated attribute. commit d63f597b9b0871d433bc457bd455c7184520c617 Author: darc <da...@pr...> Date: Mon Jan 9 21:14:56 2023 -0600 Fix cdrom_change_dataype typo to cdrom_change_datatype ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/cdrom.c | 9 +++++++-- kernel/arch/dreamcast/include/dc/cdrom.h | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/cdrom.c b/kernel/arch/dreamcast/hardware/cdrom.c index 2af5808..e2a4fea 100644 --- a/kernel/arch/dreamcast/hardware/cdrom.c +++ b/kernel/arch/dreamcast/hardware/cdrom.c @@ -185,8 +185,13 @@ int cdrom_get_status(int *status, int *disc_type) { return rv; } -/* Wrapper for the change datatype syscall */ +/* Helper function to account for long-standing typo */ int cdrom_change_dataype(int sector_part, int cdxa, int sector_size) { + return cdrom_change_datatype(sector_part, cdxa, sector_size); +} + +/* Wrapper for the change datatype syscall */ +int cdrom_change_datatype(int sector_part, int cdxa, int sector_size) { int rv = ERR_OK; uint32 params[4]; @@ -271,7 +276,7 @@ int cdrom_reinit_ex(int sector_part, int cdxa, int sector_size) { return r; } - r = cdrom_change_dataype(sector_part, cdxa, sector_size); + r = cdrom_change_datatype(sector_part, cdxa, sector_size); mutex_unlock(&_g1_ata_mutex); return r; diff --git a/kernel/arch/dreamcast/include/dc/cdrom.h b/kernel/arch/dreamcast/include/dc/cdrom.h index a350580..4169516 100644 --- a/kernel/arch/dreamcast/include/dc/cdrom.h +++ b/kernel/arch/dreamcast/include/dc/cdrom.h @@ -232,6 +232,16 @@ int cdrom_exec_cmd(int cmd, void *param); */ int cdrom_get_status(int *status, int *disc_type); +/** \brief Change the datatype of disc. + + \note This function is formally deprecated. It should not + be used in any future code, and may be removed in + the future. You should instead use + cdrom_change_datatype. +*/ +int cdrom_change_dataype(int sector_part, int cdxa, int sector_size) + __depr("Use cdrom_change_datatype instead."); + /** \brief Change the datatype of disc. This function will take in all parameters to pass to the change_datatype @@ -246,7 +256,7 @@ int cdrom_get_status(int *status, int *disc_type); \return \ref cd_cmd_response \see cd_read_sector_part */ -int cdrom_change_dataype(int sector_part, int cdxa, int sector_size); +int cdrom_change_datatype(int sector_part, int cdxa, int sector_size); /** \brief Re-initialize the GD-ROM drive. @@ -288,7 +298,7 @@ int cdrom_read_toc(CDROM_TOC *toc_buffer, int session); This function reads the specified number of sectors from the disc, starting where requested. This will respect the size of the sectors set with - cdrom_change_dataype(). The buffer must have enough space to store the + cdrom_change_datatype(). The buffer must have enough space to store the specified number of sectors. \param buffer Space to store the read sectors. hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-01-16 21:22:06
|
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 0c9a7bcc27905fc20c6a4889603e80fc8b3c4185 (commit) from 205e8af813d90e8cfa4464152f8276f59c8a12bf (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 0c9a7bcc27905fc20c6a4889603e80fc8b3c4185 Author: Lawrence Sebald <ljs...@us...> Date: Mon Jan 16 16:21:31 2023 -0500 Add missing directory to libnavi ----------------------------------------------------------------------- Summary of changes: addons/{libkosext2fs => libnavi}/kos/dreamcast.cnf | 0 1 file changed, 0 insertions(+), 0 deletions(-) copy addons/{libkosext2fs => libnavi}/kos/dreamcast.cnf (100%) diff --git a/addons/libkosext2fs/kos/dreamcast.cnf b/addons/libnavi/kos/dreamcast.cnf similarity index 100% copy from addons/libkosext2fs/kos/dreamcast.cnf copy to addons/libnavi/kos/dreamcast.cnf hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-01-05 04:15:36
|
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 205e8af813d90e8cfa4464152f8276f59c8a12bf (commit) from 289fd0c65b6ca086f9e309ff81e7001a9f80e03e (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 205e8af813d90e8cfa4464152f8276f59c8a12bf Author: Lawrence Sebald <ljs...@us...> Date: Wed Jan 4 23:15:10 2023 -0500 Update CHANGELOG, FAQ, and RELNOTES. ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 1 + doc/FAQ | 9 +++++---- doc/RELNOTES | 22 +++++++++++++++++++++- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index fc0f70a..2dbec9a 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -155,6 +155,7 @@ KallistiOS version 2.1.0 ----------------------------------------------- - DC Added support for consoles modded with 32MiB of RAM [TS && EF] - DC Fixed wildly out of range start for pvrmark benchmark [Falco Girgis == FG] - DC Removed "navi" subarch, moved code to addons/libnavi [LS] +- *** Removed (completely unsupported) support for GCC 3.x and older [LS] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] diff --git a/doc/FAQ b/doc/FAQ index abbf689..1bbb41c 100644 --- a/doc/FAQ +++ b/doc/FAQ @@ -241,12 +241,13 @@ the ethernet for you. - VMU -- mounts on /vmu, what it sounds like. This dynamic file system shows all detected VMU or memory cards on the maple bus and lets you -browse and read/write them. Note that it's fairly primitive right now -and has been known to corrupt cards on writing. This is DC-only. +browse and read/write them. This is DC-only. Note that in order for files +to show up in the BIOS menu, they must have a specific format, which is +handled by the vmu_pkg code. - Romdisk -- mounts on /rd. This is an implementation of the Linux ROMFS -file system. Right now it supports nested directories but no listings. As -time goes on I will be working on this to make it more fully functional. +file system. One may be built-in to your program to mount on /rd on boot. +In addition, you may load other images and mount them freely at runtime. - Ramdisk -- mounts on /ram. Works exactly as you expect -- putting files here eats up core RAM, deleting them recovers it. Otherwise it works diff --git a/doc/RELNOTES b/doc/RELNOTES index 5168d6c..f19a7aa 100644 --- a/doc/RELNOTES +++ b/doc/RELNOTES @@ -12,7 +12,8 @@ The first change is that all targets deprecated in 2.0.0 were removed entirely from the tree. That is to say, there are no remnants of the GBA, PS2, or ia32 ports of KOS in the tree anymore. If someone REALLY wants them back, please let me know at some point and we can work that out. I doubt this will come up at -all, however. +all, however. In addition, the navi subarch was moved out of the main tree and +into the libnavi addon library. Further standards compliance issues were worked out for this release. KOS' core should now compile cleanly with a relatively new GCC with the -std=c99 flag @@ -89,6 +90,25 @@ long filename support. FAT isn't quite as robust of a filesystem as ext2 is, but it is probably a lot easier to work with on SD cards, considering how widely supported FAT is on pretty much every OS ever. +Basic support has been added for getting things up and running on a NAOMI or +NAOMI 2 arcade board (since both are variants of the Dreamcast hardware). In +order to do this, build KOS with the KOS_SUBARCH set to "naomi". Support is +fairly basic at the moment, but will hopefully improve over time (if I can get +a hold of working hardware again). Two utilities have been added to the utils/ +tree for network bootable NAOMI binaries and for actually network booting them, +assuming you have the requisite hardware. + +Support was added for various mods that have been made for the Dreamcast +hardware in recent years. Support for ATA devices on G1 was already mentioned +up above, but also added was support for modified BIOSes (necessitating a +change to the GD-ROM initialization code), and more interestingly for consoles +with 32MiB of RAM. + +Support has been removed for using toolchains with GCC 3.x and older. Going +forward, at least GCC 4.7.4 is required for building KOS. The GCC patches for +4.x improved/cleaned up building with KOS a lot, and I doubt there's many good +reasons to keep around support for the old patches with GCC 3.x. + RELEASE NOTES for 2.0.0 ----------------------- hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-01-05 03:58:50
|
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 289fd0c65b6ca086f9e309ff81e7001a9f80e03e (commit) from e4e80f4806c88ab20a8a5e13182e56402f22c8b9 (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 289fd0c65b6ca086f9e309ff81e7001a9f80e03e Author: Lawrence Sebald <ljs...@us...> Date: Wed Jan 4 22:58:26 2023 -0500 Remove vestiges of ancient GCC versions. ----------------------------------------------------------------------- Summary of changes: environ_base.sh | 1 + include/kos/cdefs.h | 6 +---- kernel/arch/dreamcast/kernel/init.c | 19 +++----------- kernel/libc/koslib/Makefile | 7 ------ kernel/libc/koslib/crtbegin.c | 49 ------------------------------------- kernel/libc/koslib/crtend.c | 28 --------------------- 6 files changed, 5 insertions(+), 105 deletions(-) delete mode 100644 kernel/libc/koslib/crtbegin.c delete mode 100644 kernel/libc/koslib/crtend.c diff --git a/environ_base.sh b/environ_base.sh index 46f781f..d8580be 100644 --- a/environ_base.sh +++ b/environ_base.sh @@ -46,6 +46,7 @@ export KOS_GCCVER="`kos-cc -dumpversion`" case $KOS_GCCVER in 2* | 3*) + echo "Your GCC version is too old. You probably will run into major problems!" export KOS_LDFLAGS="${KOS_LDFLAGS} -nostartfiles -nostdlib ${KOS_LIB_PATHS}" ;; *) export KOS_LDFLAGS="${KOS_LDFLAGS} ${KOS_LD_SCRIPT} -nodefaultlibs ${KOS_LIB_PATHS}" ;; diff --git a/include/kos/cdefs.h b/include/kos/cdefs.h index 4052cb3..19eeb7c 100644 --- a/include/kos/cdefs.h +++ b/include/kos/cdefs.h @@ -23,11 +23,7 @@ #include <sys/cdefs.h> /* Check GCC version */ -#if __GNUC__ < 2 -# warning Your GCC is too old. This will probably not work right. -#endif - -#if __GNUC__ == 2 && __GNUC_MINOR__ < 97 +#if __GNUC__ <= 3 # warning Your GCC is too old. This will probably not work right. #endif diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index 8fef9b9..04e8cfe 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -24,16 +24,15 @@ extern int _bss_start, end; void _atexit_call_all(); +/* ctor/dtor stuff from libgcc. */ #if __GNUC__ == 4 #define _init init #define _fini fini #endif -#if __GNUC__ >= 4 void _init(void); void _fini(void); void __verify_newlib_patch(); -#endif int main(int argc, char **argv); uint32 _fs_dclsocket_get_ip(void); @@ -63,10 +62,12 @@ int dbgio_handler_cnt = sizeof(dbgio_handlers) / sizeof(dbgio_handler_t *); this to be linked into your code (and do the same with the arch_auto_shutdown function too). */ int __attribute__((weak)) arch_auto_init() { +#ifndef _arch_sub_naomi union { uint32 ipl; uint8 ipb[4]; } ip; +#endif /* Initialize memory management */ mm_init(); @@ -215,11 +216,6 @@ int arch_main() { *DMAOR = 0x8201; #endif /* _arch_sub_naomi */ - /* Ensure that we pull in crtend.c in the linking process */ -#if __GNUC__ < 4 - __crtend_pullin(); -#endif - /* Ensure that UBC is not enabled from a previous session */ ubc_disable_all(); @@ -230,12 +226,8 @@ int arch_main() { arch_auto_init(); /* Run ctors */ -#if __GNUC__ < 4 - arch_ctors(); -#else __verify_newlib_patch(); _init(); -#endif /* Call the user's main function */ rv = main(0, NULL); @@ -257,12 +249,7 @@ void arch_set_exit_path(int path) { void arch_shutdown() { /* Run dtors */ _atexit_call_all(); - -#if __GNUC__ < 4 - arch_dtors(); -#else _fini(); -#endif dbglog(DBG_CRITICAL, "arch: shutting down kernel\n"); diff --git a/kernel/libc/koslib/Makefile b/kernel/libc/koslib/Makefile index dc996d7..5f46faa 100644 --- a/kernel/libc/koslib/Makefile +++ b/kernel/libc/koslib/Makefile @@ -16,11 +16,4 @@ OBJS = abort.o byteorder.o memset2.o memset4.o memcpy2.o memcpy4.o \ gethostbyname.o getaddrinfo.o dirfd.o nanosleep.o basename.o dirname.o \ sched_yield.o -GCC_MAJORMINOR = $(basename $(KOS_GCCVER)) -GCC_MAJOR = $(basename $(GCC_MAJORMINOR)) - -ifeq ($(strip $(GCC_MAJOR)), 3) -OBJS += crtbegin.o crtend.o -endif - include $(KOS_BASE)/Makefile.prefab diff --git a/kernel/libc/koslib/crtbegin.c b/kernel/libc/koslib/crtbegin.c deleted file mode 100644 index f3be45c..0000000 --- a/kernel/libc/koslib/crtbegin.c +++ /dev/null @@ -1,49 +0,0 @@ -/* KallistiOS ##version## - - crtbegin.c - Copyright (C)2002 Dan Potter -*/ - -/* Handles ctors and dtors (for C++ programs). This is modeled on the - FreeBSD crtbegin.c code. Note that the default linker scripts for - GCC will automatically put our ctors at the front of the list. */ - -#if __GNUC__ < 4 - -#include <arch/types.h> - -/* Here we gain access to the ctor and dtor sections of the program by - defining new data in them. */ -typedef void (*fptr)(void); - -static fptr ctor_list[1] __attribute__((section(".ctors"))) = { (fptr) - 1 }; -static fptr dtor_list[1] __attribute__((section(".dtors"))) = { (fptr) - 1 }; - -void __verify_newlib_patch(); - -/* Call this to execute all ctors */ -void arch_ctors() { - fptr *fpp; - - __verify_newlib_patch(); - - /* Run up to the end of the list (defined by crtend) */ - for(fpp = ctor_list + 1; *fpp != 0; ++fpp) - ; - - /* Now run the ctors backwards */ - while(--fpp > ctor_list) - (**fpp)(); -} - -/* Call this to execute all dtors */ -void arch_dtors() { - fptr *fpp; - - /* Do the dtors forwards */ - for(fpp = dtor_list + 1; *fpp != 0; ++fpp) - (**fpp)(); -} - -#endif /* __GNUC__ < 4 */ - diff --git a/kernel/libc/koslib/crtend.c b/kernel/libc/koslib/crtend.c deleted file mode 100644 index 6d02486..0000000 --- a/kernel/libc/koslib/crtend.c +++ /dev/null @@ -1,28 +0,0 @@ -/* KallistiOS ##version## - - crtend.c - Copyright (C)2002 Dan Potter -*/ - -/* Handles ctors and dtors (for C++ programs). This is modeled on the - FreeBSD crtend.c code. Note that the default linker scripts for - GCC will automatically put our ctors at the end of the list. */ - -#if __GNUC__ < 4 - -#include <sys/cdefs.h> - -/* Here we gain access to the ctor and dtor sections of the program by - defining new data in them. */ -typedef void (*fptr)(void); - -static fptr ctor_list[1] __attribute__((section(".ctors"))) = { (fptr) 0 }; -static fptr dtor_list[1] __attribute__((section(".dtors"))) = { (fptr) 0 }; - -/* Ensures that this gets linked in */ -void __crtend_pullin() { - (void)ctor_list; - (void)dtor_list; -} - -#endif /* __GNUC__ < 4 */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-01-05 02:24:16
|
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 e4e80f4806c88ab20a8a5e13182e56402f22c8b9 (commit) from 2795b2897f0759c41d76fb77d8767acc472ae07b (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 e4e80f4806c88ab20a8a5e13182e56402f22c8b9 Author: Lawrence Sebald <ljs...@us...> Date: Wed Jan 4 21:23:54 2023 -0500 Update CHANGELOG for the past two years or so... ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 87282da..fc0f70a 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -134,7 +134,27 @@ KallistiOS version 2.1.0 ----------------------------------------------- - NAO Added naominetboot - a tool to upload NAOMI formatted binaries to a NetDIMM board for executing on the NAOMI [LS] - DC Prevent double-initialization of Maple devices from breaking things [LS] -- DC Add a user data pointer to snd_stream [LS] +- DC Added a user data pointer to snd_stream [LS] +- DC Added support for -fstack-protector to Newlib 3.3 patch [LS] +- DC Fixed wasted PVR ram in buffer allocation code [LB] +- *** Added getsockopt to TCP and UDP [LB] +- DC Corrected sizeof in fs_dclsocket that referenced wrong struct [LB] +- *** Fixed spinlock that was left locked on key error in the + kthread_getspecific function [LS] +- DC Added a modem PPP example [LB] +- DC Fixed register usage and counter in modem driver [LB] +- *** Fixed invalid read when closing UDP socket [LB] +- *** Fixed sending packets with an IP address of 0.0.0.0 [LB] +- *** Added code to attempt to lease the specified address via DHCP, if set [LB] +- DC Fixed controller capability masks [Artemio Urbina == AU] +- *** Added simple _times_r syscall for Newlib [LS] +- *** Fixed length of DHCP options area to always be at least 64 [LB] +- *** Fixed DHCP retransmit timeout to 4 seconds, per spec [LB] +- DC Added code to (partially) read DreamKey ISP information [LB] +- DC Fixed G1 reactivation code for modified BIOSes [Eric Fradella == EF] +- DC Added support for consoles modded with 32MiB of RAM [TS && EF] +- DC Fixed wildly out of range start for pvrmark benchmark [Falco Girgis == FG] +- DC Removed "navi" subarch, moved code to addons/libnavi [LS] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-01-05 01:59:11
|
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 2795b2897f0759c41d76fb77d8767acc472ae07b (commit) from 0154147fa4cf1ee827cad46a98de06e661f51c87 (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 2795b2897f0759c41d76fb77d8767acc472ae07b Author: Lawrence Sebald <ljs...@us...> Date: Wed Jan 4 20:58:48 2023 -0500 Move historical versions of dc-chain patches out of the way. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/patches/{ => historical}/gcc-3.4.6.diff | 0 utils/dc-chain/patches/{ => historical}/gcc-4.4.0-kos.diff | 0 utils/dc-chain/patches/{ => historical}/gcc-4.4.4-kos.diff | 0 utils/dc-chain/patches/{ => historical}/gcc-4.5.2-kos.diff | 0 utils/dc-chain/patches/{ => historical}/gcc-4.7.0-kos.diff | 0 utils/dc-chain/patches/{ => historical}/gcc-4.7.3-kos.diff | 0 utils/dc-chain/patches/{ => historical}/gcc-4.8.1-kos.diff | 0 utils/dc-chain/patches/{ => historical}/gcc-4.8.2-kos.diff | 0 utils/dc-chain/patches/{ => historical}/gcc-9.2.0-kos.diff | 0 utils/dc-chain/patches/{ => historical}/newlib-1.12.0-kos.diff | 0 utils/dc-chain/patches/{ => historical}/newlib-1.15.0-kos.diff | 0 utils/dc-chain/patches/{ => historical}/newlib-1.18.0-kos.diff | 0 utils/dc-chain/patches/{ => historical}/newlib-1.19.0-kos.diff | 0 utils/dc-chain/patches/{ => historical}/newlib-1.20.0-kos.diff | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename utils/dc-chain/patches/{ => historical}/gcc-3.4.6.diff (100%) rename utils/dc-chain/patches/{ => historical}/gcc-4.4.0-kos.diff (100%) rename utils/dc-chain/patches/{ => historical}/gcc-4.4.4-kos.diff (100%) rename utils/dc-chain/patches/{ => historical}/gcc-4.5.2-kos.diff (100%) rename utils/dc-chain/patches/{ => historical}/gcc-4.7.0-kos.diff (100%) rename utils/dc-chain/patches/{ => historical}/gcc-4.7.3-kos.diff (100%) rename utils/dc-chain/patches/{ => historical}/gcc-4.8.1-kos.diff (100%) rename utils/dc-chain/patches/{ => historical}/gcc-4.8.2-kos.diff (100%) rename utils/dc-chain/patches/{ => historical}/gcc-9.2.0-kos.diff (100%) rename utils/dc-chain/patches/{ => historical}/newlib-1.12.0-kos.diff (100%) rename utils/dc-chain/patches/{ => historical}/newlib-1.15.0-kos.diff (100%) rename utils/dc-chain/patches/{ => historical}/newlib-1.18.0-kos.diff (100%) rename utils/dc-chain/patches/{ => historical}/newlib-1.19.0-kos.diff (100%) rename utils/dc-chain/patches/{ => historical}/newlib-1.20.0-kos.diff (100%) diff --git a/utils/dc-chain/patches/gcc-3.4.6.diff b/utils/dc-chain/patches/historical/gcc-3.4.6.diff similarity index 100% rename from utils/dc-chain/patches/gcc-3.4.6.diff rename to utils/dc-chain/patches/historical/gcc-3.4.6.diff diff --git a/utils/dc-chain/patches/gcc-4.4.0-kos.diff b/utils/dc-chain/patches/historical/gcc-4.4.0-kos.diff similarity index 100% rename from utils/dc-chain/patches/gcc-4.4.0-kos.diff rename to utils/dc-chain/patches/historical/gcc-4.4.0-kos.diff diff --git a/utils/dc-chain/patches/gcc-4.4.4-kos.diff b/utils/dc-chain/patches/historical/gcc-4.4.4-kos.diff similarity index 100% rename from utils/dc-chain/patches/gcc-4.4.4-kos.diff rename to utils/dc-chain/patches/historical/gcc-4.4.4-kos.diff diff --git a/utils/dc-chain/patches/gcc-4.5.2-kos.diff b/utils/dc-chain/patches/historical/gcc-4.5.2-kos.diff similarity index 100% rename from utils/dc-chain/patches/gcc-4.5.2-kos.diff rename to utils/dc-chain/patches/historical/gcc-4.5.2-kos.diff diff --git a/utils/dc-chain/patches/gcc-4.7.0-kos.diff b/utils/dc-chain/patches/historical/gcc-4.7.0-kos.diff similarity index 100% rename from utils/dc-chain/patches/gcc-4.7.0-kos.diff rename to utils/dc-chain/patches/historical/gcc-4.7.0-kos.diff diff --git a/utils/dc-chain/patches/gcc-4.7.3-kos.diff b/utils/dc-chain/patches/historical/gcc-4.7.3-kos.diff similarity index 100% rename from utils/dc-chain/patches/gcc-4.7.3-kos.diff rename to utils/dc-chain/patches/historical/gcc-4.7.3-kos.diff diff --git a/utils/dc-chain/patches/gcc-4.8.1-kos.diff b/utils/dc-chain/patches/historical/gcc-4.8.1-kos.diff similarity index 100% rename from utils/dc-chain/patches/gcc-4.8.1-kos.diff rename to utils/dc-chain/patches/historical/gcc-4.8.1-kos.diff diff --git a/utils/dc-chain/patches/gcc-4.8.2-kos.diff b/utils/dc-chain/patches/historical/gcc-4.8.2-kos.diff similarity index 100% rename from utils/dc-chain/patches/gcc-4.8.2-kos.diff rename to utils/dc-chain/patches/historical/gcc-4.8.2-kos.diff diff --git a/utils/dc-chain/patches/gcc-9.2.0-kos.diff b/utils/dc-chain/patches/historical/gcc-9.2.0-kos.diff similarity index 100% rename from utils/dc-chain/patches/gcc-9.2.0-kos.diff rename to utils/dc-chain/patches/historical/gcc-9.2.0-kos.diff diff --git a/utils/dc-chain/patches/newlib-1.12.0-kos.diff b/utils/dc-chain/patches/historical/newlib-1.12.0-kos.diff similarity index 100% rename from utils/dc-chain/patches/newlib-1.12.0-kos.diff rename to utils/dc-chain/patches/historical/newlib-1.12.0-kos.diff diff --git a/utils/dc-chain/patches/newlib-1.15.0-kos.diff b/utils/dc-chain/patches/historical/newlib-1.15.0-kos.diff similarity index 100% rename from utils/dc-chain/patches/newlib-1.15.0-kos.diff rename to utils/dc-chain/patches/historical/newlib-1.15.0-kos.diff diff --git a/utils/dc-chain/patches/newlib-1.18.0-kos.diff b/utils/dc-chain/patches/historical/newlib-1.18.0-kos.diff similarity index 100% rename from utils/dc-chain/patches/newlib-1.18.0-kos.diff rename to utils/dc-chain/patches/historical/newlib-1.18.0-kos.diff diff --git a/utils/dc-chain/patches/newlib-1.19.0-kos.diff b/utils/dc-chain/patches/historical/newlib-1.19.0-kos.diff similarity index 100% rename from utils/dc-chain/patches/newlib-1.19.0-kos.diff rename to utils/dc-chain/patches/historical/newlib-1.19.0-kos.diff diff --git a/utils/dc-chain/patches/newlib-1.20.0-kos.diff b/utils/dc-chain/patches/historical/newlib-1.20.0-kos.diff similarity index 100% rename from utils/dc-chain/patches/newlib-1.20.0-kos.diff rename to utils/dc-chain/patches/historical/newlib-1.20.0-kos.diff hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-01-05 01:36:11
|
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 0154147fa4cf1ee827cad46a98de06e661f51c87 (commit) from 32fafbc497adaff4726a771bee76222de0a39987 (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 0154147fa4cf1ee827cad46a98de06e661f51c87 Author: Lawrence Sebald <ljs...@us...> Date: Wed Jan 4 20:35:29 2023 -0500 Remove 'navi' subarch and move all code for it to addons/libnavi. ----------------------------------------------------------------------- Summary of changes: .../arch/dreamcast => addons}/include/navi/flash.h | 0 {kernel/arch/dreamcast => addons}/include/navi/ide.h | 0 addons/libnavi/Makefile | 18 ++++++++++++++++++ .../dreamcast/navi => addons/libnavi}/navi_flash.c | 0 .../arch/dreamcast/navi => addons/libnavi}/navi_ide.c | 0 doc/environ.sh.sample | 1 - kernel/arch/dreamcast/Makefile | 8 ++------ kernel/arch/dreamcast/navi/Makefile | 19 ------------------- 8 files changed, 20 insertions(+), 26 deletions(-) rename {kernel/arch/dreamcast => addons}/include/navi/flash.h (100%) rename {kernel/arch/dreamcast => addons}/include/navi/ide.h (100%) create mode 100644 addons/libnavi/Makefile rename {kernel/arch/dreamcast/navi => addons/libnavi}/navi_flash.c (100%) rename {kernel/arch/dreamcast/navi => addons/libnavi}/navi_ide.c (100%) delete mode 100644 kernel/arch/dreamcast/navi/Makefile diff --git a/kernel/arch/dreamcast/include/navi/flash.h b/addons/include/navi/flash.h similarity index 100% rename from kernel/arch/dreamcast/include/navi/flash.h rename to addons/include/navi/flash.h diff --git a/kernel/arch/dreamcast/include/navi/ide.h b/addons/include/navi/ide.h similarity index 100% rename from kernel/arch/dreamcast/include/navi/ide.h rename to addons/include/navi/ide.h diff --git a/addons/libnavi/Makefile b/addons/libnavi/Makefile new file mode 100644 index 0000000..bc6e2e9 --- /dev/null +++ b/addons/libnavi/Makefile @@ -0,0 +1,18 @@ +# KallistiOS ##version## +# +# addons/libnavi/Makefile +# Copyright (C) 2002 Dan Potter +# + +TARGET = libnavi.a + +# IDE +OBJS += navi_ide.o + +# Flash BIOS +OBJS += navi_flash.o + +# SUBDIRS = fs +SUBDIRS = + +include $(KOS_BASE)/addons/Makefile.prefab diff --git a/kernel/arch/dreamcast/navi/navi_flash.c b/addons/libnavi/navi_flash.c similarity index 100% rename from kernel/arch/dreamcast/navi/navi_flash.c rename to addons/libnavi/navi_flash.c diff --git a/kernel/arch/dreamcast/navi/navi_ide.c b/addons/libnavi/navi_ide.c similarity index 100% rename from kernel/arch/dreamcast/navi/navi_ide.c rename to addons/libnavi/navi_ide.c diff --git a/doc/environ.sh.sample b/doc/environ.sh.sample index 8539dc6..f5516fb 100644 --- a/doc/environ.sh.sample +++ b/doc/environ.sh.sample @@ -15,7 +15,6 @@ export KOS_ARCH="dreamcast" # that here; otherwise use "pristine". # Possible subarch options include: # "pristine" - a normal Dreamcast console or HKT-0120 devkit -# "navi" - a Dreamcast with the navi mod applied to it # "naomi" - a NAOMI or NAOMI 2 arcade board # You can also pre-define it in eg the build config of your IDE if [ -z "${KOS_SUBARCH}" ] ; then diff --git a/kernel/arch/dreamcast/Makefile b/kernel/arch/dreamcast/Makefile index e5f6c5a..31278bd 100644 --- a/kernel/arch/dreamcast/Makefile +++ b/kernel/arch/dreamcast/Makefile @@ -1,14 +1,10 @@ # KallistiOS ##version## # # arch/dreamcast Makefile -# (c)2001 Dan Potter +# Copyright (C) 2001 Dan Potter # - -SUBDIRS=fs hardware kernel math sound util -ifeq ($(KOS_SUBARCH), navi) - SUBDIRS += navi -endif +SUBDIRS=fs hardware kernel math sound util include $(KOS_BASE)/Makefile.rules diff --git a/kernel/arch/dreamcast/navi/Makefile b/kernel/arch/dreamcast/navi/Makefile deleted file mode 100644 index 0e598b9..0000000 --- a/kernel/arch/dreamcast/navi/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# KallistiOS ##version## -# -# arch/dreamcast/navi/Makefile -# (c)2002 Dan Potter -# - -# IDE -OBJS += navi_ide.o - -# Flash BIOS -OBJS += navi_flash.o - -# SUBDIRS = fs -SUBDIRS = - -include $(KOS_BASE)/Makefile.prefab - - - hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-01-04 01:22:28
|
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 32fafbc497adaff4726a771bee76222de0a39987 (commit) via fb024c9695eda3be4acbd2606ea6accb5749d2c2 (commit) from 233498b60d5707f66e087b82a0e8301a0ee7f5e2 (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 32fafbc497adaff4726a771bee76222de0a39987 Merge: 233498b fb024c9 Author: Lawrence Sebald <ljs...@us...> Date: Tue Jan 3 20:21:20 2023 -0500 Merge pull request #84 from gyrovorbis/pvrmark Lowered pvrmark example starting polygon count. commit fb024c9695eda3be4acbd2606ea6accb5749d2c2 Author: falco <gyr...@gm...> Date: Tue Jan 3 10:36:57 2023 -0500 Fixed broken pvrmark example. Apparently the intialy polygon per second count was a little "too" obscene (as the comments say), and was causing nothing to be rendered to the screen and for all of the PPS calculations to become incorrect and even negative. ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/pvr/pvrmark/pvrmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dreamcast/pvr/pvrmark/pvrmark.c b/examples/dreamcast/pvr/pvrmark/pvrmark.c index fadc587..df69200 100644 --- a/examples/dreamcast/pvr/pvrmark/pvrmark.c +++ b/examples/dreamcast/pvr/pvrmark/pvrmark.c @@ -173,7 +173,7 @@ int main(int argc, char **argv) { setup(); /* Start off with something obscene */ - switch_tests(2000000 / 60); + switch_tests(200000 / 60); start = time(NULL); for(;;) { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-01-03 05:43:20
|
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 233498b60d5707f66e087b82a0e8301a0ee7f5e2 (commit) via 1bebd16a88d2394cb7c24d472f960377b15d9b83 (commit) via f0a8ccb9de3b38c1750d805929d0c45b077fa7a7 (commit) via 0dc764715578f55221b50a8d21fc21f500a4f8fc (commit) via 2f3d13a862cf6be6cb4fbf16d3dd2d000f74b986 (commit) via d8afbad400b25fec0b96ceefc972ee6265ace169 (commit) via 46784aa021e7248ec8ae51b6412e0ae873c50f95 (commit) from dcfc201aee5865b0168944e83ecdc25e67f456d3 (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 233498b60d5707f66e087b82a0e8301a0ee7f5e2 Merge: dcfc201 1bebd16 Author: Lawrence Sebald <ljs...@us...> Date: Mon Jan 2 19:27:52 2023 -0500 Merge pull request #82 from darcagn/32mb-mk4 Support 32MB system RAM configurations commit 1bebd16a88d2394cb7c24d472f960377b15d9b83 Author: darc <da...@pr...> Date: Mon Jan 2 15:12:59 2023 -0600 Cast _arch_mem_top macro to uint32 in 16MB toolchain fallback to eliminate warnings; change #warning to #pragma message to prevent build failures in files using -Werror commit f0a8ccb9de3b38c1750d805929d0c45b077fa7a7 Author: darc <da...@pr...> Date: Mon Jan 2 14:17:24 2023 -0600 Patches for GCC 4.7.4, 9.3.0, and 9.3.0-AppleSilicon: Add custom built-in defines for KOS; patch GCC to set up stack for 32MB memory if available commit 0dc764715578f55221b50a8d21fc21f500a4f8fc Author: darc <da...@pr...> Date: Mon Jan 2 13:36:05 2023 -0600 Add memory testing application as example for utilizing system memory size functions; Tweak 32MB macros in arch.h; Add name to AUTHORS file commit 2f3d13a862cf6be6cb4fbf16d3dd2d000f74b986 Author: darc <da...@pr...> Date: Mon Jan 2 02:42:47 2023 -0600 Updated incorrect function reference in code comment in arch.h commit d8afbad400b25fec0b96ceefc972ee6265ace169 Author: darc <da...@pr...> Date: Mon Jan 2 00:51:38 2023 -0600 Added support for falling back to 16MB behavior if toolchain isn't updated with latest 32MB stack patch commit 46784aa021e7248ec8ae51b6412e0ae873c50f95 Author: darc <da...@pr...> Date: Mon Jan 2 00:38:50 2023 -0600 Kernel patches to enable 32MB memory size on modified Dreamcasts and NAOMI systems ----------------------------------------------------------------------- Summary of changes: AUTHORS | 1 + examples/dreamcast/basic/Makefile | 5 +- .../{pvr/cheap_shadow => basic/memtest32}/Makefile | 8 +- examples/dreamcast/basic/memtest32/main.c | 117 +++++++ examples/dreamcast/basic/memtest32/memtest.c | 221 ++++++++++++ examples/dreamcast/basic/memtest32/memtest.h | 42 +++ kernel/arch/dreamcast/include/arch/arch.h | 41 ++- kernel/arch/dreamcast/kernel/stack.c | 2 +- kernel/arch/dreamcast/kernel/startup.s | 34 +- kernel/mm/malloc_debug.c | 4 +- .../dc-chain/patches/arm-Darwin/gcc-9.3.0-kos.diff | 134 +++++--- utils/dc-chain/patches/gcc-4.7.4-kos.diff | 381 ++++++++++++--------- utils/dc-chain/patches/gcc-9.3.0-kos.diff | 99 ++++-- 13 files changed, 824 insertions(+), 265 deletions(-) copy examples/dreamcast/{pvr/cheap_shadow => basic/memtest32}/Makefile (76%) create mode 100644 examples/dreamcast/basic/memtest32/main.c create mode 100644 examples/dreamcast/basic/memtest32/memtest.c create mode 100644 examples/dreamcast/basic/memtest32/memtest.h diff --git a/AUTHORS b/AUTHORS index 47262fc..22418b6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -42,6 +42,7 @@ Josh Pearson: 2013, 2014, 2015, 2016 Joe Fenton: 2016 Stefan Galowicz: 2016, 2017 Luke Benstead: 2020, 2021 +Eric Fradella: 2023 Files with Specific licenses: ----------------------------- diff --git a/examples/dreamcast/basic/Makefile b/examples/dreamcast/basic/Makefile index bc39b0b..ff28d33 100644 --- a/examples/dreamcast/basic/Makefile +++ b/examples/dreamcast/basic/Makefile @@ -12,6 +12,7 @@ all: $(KOS_MAKE) -C stacktrace $(KOS_MAKE) -C mmu $(KOS_MAKE) -C stackprotector + $(KOS_MAKE) -C memtest32 clean: $(KOS_MAKE) -C exec clean @@ -21,6 +22,7 @@ clean: $(KOS_MAKE) -C stacktrace clean $(KOS_MAKE) -C mmu clean $(KOS_MAKE) -C stackprotector clean + $(KOS_MAKE) -C memtest32 clean dist: $(KOS_MAKE) -C exec dist @@ -30,5 +32,4 @@ dist: $(KOS_MAKE) -C stacktrace dist $(KOS_MAKE) -C mmu dist $(KOS_MAKE) -C stackprotector dist - - + $(KOS_MAKE) -C memtest32 dist diff --git a/examples/dreamcast/pvr/cheap_shadow/Makefile b/examples/dreamcast/basic/memtest32/Makefile similarity index 76% copy from examples/dreamcast/pvr/cheap_shadow/Makefile copy to examples/dreamcast/basic/memtest32/Makefile index ddce956..d488acc 100644 --- a/examples/dreamcast/pvr/cheap_shadow/Makefile +++ b/examples/dreamcast/basic/memtest32/Makefile @@ -1,5 +1,6 @@ -TARGET = shadow.elf -OBJS = shadow.o +TARGET = memtest32.elf + +OBJS = memtest.o main.o all: rm-elf $(TARGET) @@ -15,9 +16,8 @@ $(TARGET): $(OBJS) kos-cc -o $(TARGET) $(OBJS) run: $(TARGET) - $(KOS_LOADER) $(TARGET) -n + $(KOS_LOADER) $(TARGET) dist: rm -f $(OBJS) $(KOS_STRIP) $(TARGET) - diff --git a/examples/dreamcast/basic/memtest32/main.c b/examples/dreamcast/basic/memtest32/main.c new file mode 100644 index 0000000..bf32d5f --- /dev/null +++ b/examples/dreamcast/basic/memtest32/main.c @@ -0,0 +1,117 @@ +/* KallistiOS ##version## + + main.c + Copyright (C) 2020 Thomas Sowell + Copyright (C) 2022 Eric Fradella + + This application illustrates the use of functions related to detecting the + size of system memory and altering a program's behavior to suit the running + system's configuration. + + Implemented is a memory test utility for Dreamcast consoles (both stock 16MB + systems and modified 32MB systems) or NAOMI systems, based on public domain + code by Michael Barr in memtest.c found here: + https://barrgroup.com/embedded-systems/how-to/memory-test-suite-c + + Example output on a functional 32MB-modified Dreamcast: + + Beginning memtest routine... + Base address: 0x8c100000 + Number of bytes to test: 32440320 + memTestDataBus: PASS + memTestAddressBus: PASS + memTestDevice: PASS + Test passed! +*/ + +#include <stdio.h> +#include <stdint.h> + +#include "memtest.h" + +/* Leave space at the beginning and end of memory for this program and for the + * stack. Dreamcast applications are loaded at 0x8c000000 so we leave 0x100000 + * bytes past that for the program itself and leave 65536 bytes at the top of + * memory for the stack. */ +#define SAFE_AREA 0x100000 +#define STACK_SIZE 65536 +#define BASE_ADDRESS (volatile datum *) (0x8c000000 + SAFE_AREA) + +/* Define the number of bytes to be tested. KallistiOS provides the + * macros HW_MEM_16 and HW_MEM_32 which describe the number of bytes + * available in standard supported console configurations (16777216 + * and 33554432, respectively). */ +#define NUM_BYTES_32 (HW_MEM_32 - SAFE_AREA - STACK_SIZE) +#define NUM_BYTES_16 (HW_MEM_16 - SAFE_AREA - STACK_SIZE) + +int main(int argc, char **argv) { + uint32_t error, data, *address; + unsigned long num_bytes; + error = 0; + + /* The HW_MEMSIZE can be called to retrieve the system's memory size. + * _arch_mem_top defines the top address of memory. + * 0x8d000000 if 16MB console, 0x8e000000 if 32MB */ + printf("\nThis console has %ld bytes of system memory,\n with top of " + "memory located at 0x%0lx.\n\n", HW_MEMSIZE, _arch_mem_top); + + /* The DBL_MEM boolean macro is provided as an easy, concise + * way to determine if extra system RAM is available */ + num_bytes = DBL_MEM ? NUM_BYTES_32 : NUM_BYTES_16; + + printf("Beginning memtest routine...\n"); + printf(" Base address: %p\n", BASE_ADDRESS); + printf(" Number of bytes to test: %lu\n", num_bytes); + + /* Now we run the test routines provided in memtest.c + * Each routine returns zero if the routine passes, + * else it returns the address of failure. + * First, let's test the data bus. */ + printf(" memTestDataBus: "); + fflush(stdout); + data = memTestDataBus(BASE_ADDRESS); + + if(data != 0) { + printf("FAIL: %08lx\n", data); + error = 1; + } + else { + printf("PASS\n"); + } + + fflush(stdout); + + /* Now we test the address bus. */ + printf(" memTestAddressBus: "); + fflush(stdout); + address = memTestAddressBus(BASE_ADDRESS, num_bytes); + + if(address != NULL) { + printf("FAIL (%p)\n", address); + error = 1; + } + else { + printf("PASS\n"); + } + + fflush(stdout); + + /* And now, we test the memory itself. */ + printf(" memTestDevice: "); + fflush(stdout); + address = memTestDevice(BASE_ADDRESS, num_bytes); + + if(address != NULL) { + printf("FAIL (%p)\n", address); + error = 1; + } + else { + printf("PASS\n"); + } + + fflush(stdout); + + /* Test completed, return final result */ + printf("Test %s\n", error ? "failed." : "passed!\n"); + return error; +} diff --git a/examples/dreamcast/basic/memtest32/memtest.c b/examples/dreamcast/basic/memtest32/memtest.c new file mode 100644 index 0000000..5321600 --- /dev/null +++ b/examples/dreamcast/basic/memtest32/memtest.c @@ -0,0 +1,221 @@ +/********************************************************************** + * + * Filename: memtest.c + * + * Description: General-purpose memory testing functions. + * + * Notes: This software can be easily ported to systems with + * different data bus widths by redefining 'datum'. + * + * + * Copyright (c) 1998 by Michael Barr. This software is placed into + * the public domain and may be used for any purpose. However, this + * notice must not be changed or removed and no warranty is either + * expressed or implied by its publication or distribution. + **********************************************************************/ + + +#include "memtest.h" + + +/********************************************************************** + * + * Function: memTestDataBus() + * + * Description: Test the data bus wiring in a memory region by + * performing a walking 1's test at a fixed address + * within that region. The address (and hence the + * memory region) is selected by the caller. + * + * Notes: + * + * Returns: 0 if the test succeeds. + * A non-zero result is the first pattern that failed. + * + **********************************************************************/ +datum +memTestDataBus(volatile datum * address) +{ + datum pattern; + + + /* + * Perform a walking 1's test at the given address. + */ + for (pattern = 1; pattern != 0; pattern <<= 1) + { + /* + * Write the test pattern. + */ + *address = pattern; + + /* + * Read it back (immediately is okay for this test). + */ + if (*address != pattern) + { + return (pattern); + } + } + + return (0); + +} /* memTestDataBus() */ + + +/********************************************************************** + * + * Function: memTestAddressBus() + * + * Description: Test the address bus wiring in a memory region by + * performing a walking 1's test on the relevant bits + * of the address and checking for aliasing. This test + * will find single-bit address failures such as stuck + * -high, stuck-low, and shorted pins. The base address + * and size of the region are selected by the caller. + * + * Notes: For best results, the selected base address should + * have enough LSB 0's to guarantee single address bit + * changes. For example, to test a 64-Kbyte region, + * select a base address on a 64-Kbyte boundary. Also, + * select the region size as a power-of-two--if at all + * possible. + * + * Returns: NULL if the test succeeds. + * A non-zero result is the first address at which an + * aliasing problem was uncovered. By examining the + * contents of memory, it may be possible to gather + * additional information about the problem. + * + **********************************************************************/ +datum * +memTestAddressBus(volatile datum * baseAddress, unsigned long nBytes) +{ + unsigned long addressMask = (nBytes/sizeof(datum) - 1); + unsigned long offset; + unsigned long testOffset; + + datum pattern = (datum) 0xAAAAAAAA; + datum antipattern = (datum) 0x55555555; + + + /* + * Write the default pattern at each of the power-of-two offsets. + */ + for (offset = 1; (offset & addressMask) != 0; offset <<= 1) + { + baseAddress[offset] = pattern; + } + + /* + * Check for address bits stuck high. + */ + testOffset = 0; + baseAddress[testOffset] = antipattern; + + for (offset = 1; (offset & addressMask) != 0; offset <<= 1) + { + if (baseAddress[offset] != pattern) + { + return ((datum *) &baseAddress[offset]); + } + } + + baseAddress[testOffset] = pattern; + + /* + * Check for address bits stuck low or shorted. + */ + for (testOffset = 1; (testOffset & addressMask) != 0; testOffset <<= 1) + { + baseAddress[testOffset] = antipattern; + + if (baseAddress[0] != pattern) + { + return ((datum *) &baseAddress[testOffset]); + } + + for (offset = 1; (offset & addressMask) != 0; offset <<= 1) + { + if ((baseAddress[offset] != pattern) && (offset != testOffset)) + { + return ((datum *) &baseAddress[testOffset]); + } + } + + baseAddress[testOffset] = pattern; + } + + return (NULL); + +} /* memTestAddressBus() */ + + +/********************************************************************** + * + * Function: memTestDevice() + * + * Description: Test the integrity of a physical memory device by + * performing an increment/decrement test over the + * entire region. In the process every storage bit + * in the device is tested as a zero and a one. The + * base address and the size of the region are + * selected by the caller. + * + * Notes: + * + * Returns: NULL if the test succeeds. + * + * A non-zero result is the first address at which an + * incorrect value was read back. By examining the + * contents of memory, it may be possible to gather + * additional information about the problem. + * + **********************************************************************/ +datum * +memTestDevice(volatile datum * baseAddress, unsigned long nBytes) +{ + unsigned long offset; + unsigned long nWords = nBytes / sizeof(datum); + + datum pattern; + datum antipattern; + + + /* + * Fill memory with a known pattern. + */ + for (pattern = 1, offset = 0; offset < nWords; pattern++, offset++) + { + baseAddress[offset] = pattern; + } + + /* + * Check each location and invert it for the second pass. + */ + for (pattern = 1, offset = 0; offset < nWords; pattern++, offset++) + { + if (baseAddress[offset] != pattern) + { + return ((datum *) &baseAddress[offset]); + } + + antipattern = ~pattern; + baseAddress[offset] = antipattern; + } + + /* + * Check each location for the inverted pattern and zero it. + */ + for (pattern = 1, offset = 0; offset < nWords; pattern++, offset++) + { + antipattern = ~pattern; + if (baseAddress[offset] != antipattern) + { + return ((datum *) &baseAddress[offset]); + } + } + + return (NULL); + +} /* memTestDevice() */ diff --git a/examples/dreamcast/basic/memtest32/memtest.h b/examples/dreamcast/basic/memtest32/memtest.h new file mode 100644 index 0000000..381b097 --- /dev/null +++ b/examples/dreamcast/basic/memtest32/memtest.h @@ -0,0 +1,42 @@ +/********************************************************************** + * + * Filename: memtest.h + * + * Description: Memory-testing module API. + * + * Notes: The memory tests can be easily ported to systems with + * different data bus widths by redefining 'datum' type. + * + * + * Copyright (c) 2000 by Michael Barr. This software is placed into + * the public domain and may be used for any purpose. However, this + * notice must not be changed or removed and no warranty is either + * expressed or implied by its publication or distribution. + **********************************************************************/ + +#ifndef _memtest_h +#define _memtest_h + +#include <stdint.h> + +/* + * Define NULL pointer value. + */ +#ifndef NULL +#define NULL (void *) 0 +#endif + +/* + * Set the data bus width. + */ +typedef uint32_t datum; + +/* + * Function prototypes. + */ +datum memTestDataBus(volatile datum * address); +datum * memTestAddressBus(volatile datum * baseAddress, unsigned long nBytes); +datum * memTestDevice(volatile datum * baseAddress, unsigned long nBytes); + + +#endif /* _memtest_h */ diff --git a/kernel/arch/dreamcast/include/arch/arch.h b/kernel/arch/dreamcast/include/arch/arch.h index 2e53d22..62e29df 100644 --- a/kernel/arch/dreamcast/include/arch/arch.h +++ b/kernel/arch/dreamcast/include/arch/arch.h @@ -23,18 +23,24 @@ __BEGIN_DECLS #include <dc/video.h> +/** \brief Top of memory available, depending on memory size. */ +#ifdef __KOS_GCC_32MB__ +extern uint32 _arch_mem_top; +#else +#pragma message "Outdated toolchain: not patched for 32MB support, limiting KOS"\ + " to 16MB-only behavior to retain maximum compatibility. Please"\ + " update toolchain." +#define _arch_mem_top ((uint32) 0x8d000000) +#endif + #define PAGESIZE 4096 /**< \brief Page size (for MMU) */ #define PAGESIZE_BITS 12 /**< \brief Bits for page size */ #define PAGEMASK (PAGESIZE - 1) /**< \brief Mask for page offset */ -#ifndef _arch_sub_naomi /** \brief Page count "variable". The number of pages is static, so we can optimize this quite a bit. */ -#define page_count ((16*1024*1024 - 0x10000) / PAGESIZE) -#else -#define page_count ((32*1024*1024 - 0x10000) / PAGESIZE) ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2022-12-19 14:13:20
|
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 dcfc201aee5865b0168944e83ecdc25e67f456d3 (commit) via dbc9f8b21df3825c284192ebcb27966b9ad827ea (commit) via a81796d1087009a0c7045fb2fa756e523f661d5f (commit) via 433cf38cdc054d481a697694f009bf23f2fca885 (commit) via 520ab57d325394797c3553b22e31e2a3a0e400d2 (commit) via 951f63297ef7eb62ea6673a2a9961d169d2e5e8d (commit) via a0335b8fc4966831190fab98bc0805bfcf5e1214 (commit) via 52fb6c86e4f4cdd59ffb5bc10dc2844aa2ece2bd (commit) via d29be17abed8e54268b4440dde9fbe2d59285bb4 (commit) via 0619c4f04c1f4620822e2fd2462ea1882c385b8b (commit) via ee7f1ca90f3984a6bc92090529cbc8ec39f4c68b (commit) via b66dec65c8b42cc57c51d9b001df8afa58f42803 (commit) via bc4136a26fca1c888231ced735b26ede90642975 (commit) via 63df9bd57b8b86f586ad0a0bde33f3bc8a49ffb0 (commit) via a11834e365c7a17ff4b2a5faf04b1bc88b223b8f (commit) via 855b3e03d984469e1adbc71f75ba74c2ddbcedcd (commit) from f07a8b98ec991373c614af0c7b45c3ca5a4eb8f3 (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 dcfc201aee5865b0168944e83ecdc25e67f456d3 Merge: a81796d dbc9f8b Author: Lawrence Sebald <ljs...@us...> Date: Mon Dec 19 00:30:56 2022 -0500 Merge pull request #80 from darcagn/biosfix Add fix for drive reactivation when using custom BIOS mods commit dbc9f8b21df3825c284192ebcb27966b9ad827ea Author: darc <da...@pr...> Date: Sun Dec 18 21:28:52 2022 -0600 Add fix for drive reactivation when using custom BIOS mods commit a81796d1087009a0c7045fb2fa756e523f661d5f Merge: 433cf38 520ab57 Author: Lawrence Sebald <ljs...@us...> Date: Sat Dec 17 19:58:59 2022 -0500 Merge pull request #79 from extremobemo/master Add Apple silicon build support commit 433cf38cdc054d481a697694f009bf23f2fca885 Merge: f07a8b9 951f632 Author: Luke Benstead <ka...@gm...> Date: Sat Dec 17 20:11:06 2022 +0000 Merge pull request #70 from KallistiOS/fix-dhcp-issues Fix DHCP issues commit 520ab57d325394797c3553b22e31e2a3a0e400d2 Author: Bemo <the_power@Bemos-MacBook-Pro.local> Date: Mon Oct 3 21:52:32 2022 -0600 Add Apple silicon build support commit 951f63297ef7eb62ea6673a2a9961d169d2e5e8d Author: Luke Benstead <ka...@gm...> Date: Tue Sep 27 09:09:38 2022 +0100 Partially read block 0xC6-C9 commit a0335b8fc4966831190fab98bc0805bfcf5e1214 Author: Luke Benstead <ka...@gm...> Date: Tue Sep 27 09:08:51 2022 +0100 Fix reading network method from block 0xE0 commit 52fb6c86e4f4cdd59ffb5bc10dc2844aa2ece2bd Author: Luke Benstead <ka...@gm...> Date: Sun Sep 25 14:17:54 2022 +0100 Change first retransmission to 4 seconds (as per spec) commit d29be17abed8e54268b4440dde9fbe2d59285bb4 Author: Luke Benstead <ka...@gm...> Date: Sun Sep 25 14:11:43 2022 +0100 Small cleanup commit 0619c4f04c1f4620822e2fd2462ea1882c385b8b Author: Luke Benstead <ka...@gm...> Date: Sun Sep 25 13:56:09 2022 +0100 Supply a default broadcast of 255.255.255.255 if it's not available commit ee7f1ca90f3984a6bc92090529cbc8ec39f4c68b Author: Luke Benstead <ka...@gm...> Date: Sun Sep 25 13:44:43 2022 +0100 If ISP settings are static, populate whatever we can commit b66dec65c8b42cc57c51d9b001df8afa58f42803 Author: Luke Benstead <ka...@gm...> Date: Thu Sep 22 09:18:50 2022 +0100 Ensure the DHCP options area is at least 64 bytes as per BOOTP RFC commit bc4136a26fca1c888231ced735b26ede90642975 Author: Luke Benstead <ka...@gm...> Date: Thu Sep 22 09:18:32 2022 +0100 Clean up the passing of required_address to use 0 as a non value commit 63df9bd57b8b86f586ad0a0bde33f3bc8a49ffb0 Author: Luke Benstead <ka...@gm...> Date: Sat Mar 5 07:53:14 2022 +0000 Attempt to lease any specified IP address via DHCP commit a11834e365c7a17ff4b2a5faf04b1bc88b223b8f Author: Luke Benstead <ka...@gm...> Date: Thu Mar 3 20:41:08 2022 +0000 Allow sending packets if the IP address is 0.0.0.0 This is necessary for DHCP to function. commit 855b3e03d984469e1adbc71f75ba74c2ddbcedcd Author: Luke Benstead <ka...@gm...> Date: Thu Mar 3 20:39:26 2022 +0000 Fix invalid read issue when clearing packets Calling `free(pkt)` while iterating the packets broke the for loop as it would subsequently access the pkt->pkt_queue attribute. ----------------------------------------------------------------------- Summary of changes: .../dreamcast/network/isp-settings/isp-settings.c | 13 +++- kernel/arch/dreamcast/hardware/cdrom.c | 20 +++-- kernel/arch/dreamcast/hardware/flashrom.c | 90 +++++++++++++++++++++- .../dreamcast/hardware/network/broadband_adapter.c | 33 +++++--- .../arch/dreamcast/hardware/network/lan_adapter.c | 31 +++++--- kernel/arch/dreamcast/include/dc/flashrom.h | 14 +++- kernel/net/net_core.c | 17 +++- kernel/net/net_dhcp.c | 38 +++++---- kernel/net/net_dhcp.h | 2 +- kernel/net/net_udp.c | 13 ++-- .../dc-chain/patches/arm-Darwin/gcc-8.4.0-kos.diff | 36 +++++++++ .../patches/{ => arm-Darwin}/gcc-9.3.0-kos.diff | 33 ++++++++ utils/dc-chain/scripts/patch.mk | 8 ++ 13 files changed, 288 insertions(+), 60 deletions(-) create mode 100644 utils/dc-chain/patches/arm-Darwin/gcc-8.4.0-kos.diff copy utils/dc-chain/patches/{ => arm-Darwin}/gcc-9.3.0-kos.diff (97%) diff --git a/examples/dreamcast/network/isp-settings/isp-settings.c b/examples/dreamcast/network/isp-settings/isp-settings.c index c4e6dee..43efe8c 100644 --- a/examples/dreamcast/network/isp-settings/isp-settings.c +++ b/examples/dreamcast/network/isp-settings/isp-settings.c @@ -21,19 +21,21 @@ int main(int argc, char **argv) { else { if((cfg.valid_fields & FLASHROM_ISP_IP)) { static const char * methods[] = { - "DHCP", - "Static", "Dialup(?)", - "Unused", + "DHCP", "PPPoE" + "Static", }; printf("Method: %s\n", methods[cfg.method]); printf("IP: %i.%i.%i.%i\n", cfg.ip[0], cfg.ip[1], cfg.ip[2], cfg.ip[3]); printf("Netmask: %i.%i.%i.%i\n", cfg.nm[0], cfg.nm[1], cfg.nm[2], cfg.nm[3]); printf("Gateway: %i.%i.%i.%i\n", cfg.gw[0], cfg.gw[1], cfg.gw[2], cfg.gw[3]); + printf("Hostname: '%s'\n", cfg.hostname); + } + + if((cfg.valid_fields & FLASHROM_ISP_DNS)) { printf("DNS 1: %i.%i.%i.%i\n", cfg.dns[0][0], cfg.dns[0][1], cfg.dns[0][2], cfg.dns[0][3]); printf("DNS 2: %i.%i.%i.%i\n", cfg.dns[1][0], cfg.dns[1][1], cfg.dns[1][2], cfg.dns[1][3]); - printf("Hostname: '%s'\n", cfg.hostname); } if((cfg.valid_fields & FLASHROM_ISP_EMAIL)) @@ -62,6 +64,9 @@ int main(int argc, char **argv) { if((cfg.valid_fields & FLASHROM_ISP_PPP_PASS)) printf("PPP Pass: '%s'\n", cfg.ppp_passwd); + + if((cfg.valid_fields & FLASHROM_ISP_PHONE1)) + printf("PPP Phone1: '%s'\n", cfg.phone1); } return 0; diff --git a/kernel/arch/dreamcast/hardware/cdrom.c b/kernel/arch/dreamcast/hardware/cdrom.c index a41cd69..2af5808 100644 --- a/kernel/arch/dreamcast/hardware/cdrom.c +++ b/kernel/arch/dreamcast/hardware/cdrom.c @@ -447,11 +447,21 @@ int cdrom_init() { *bios = (uint32 *)0xa0000000; /* Reactivate drive: send the BIOS size and then read each - word across the bus so the controller can verify it. */ - *react = 0x1fffff; - - for(p = 0; p < 0x200000 / sizeof(bios[0]); p++) { - (void)bios[p]; + word across the bus so the controller can verify it. + If first bytes are 0xe6ff instead of usual 0xe3ff, then + hardware is fitted with custom BIOS using magic bootstrap + which can and must pass controller verification with only + the first 1024 bytes */ + if((*(uint16 *)0xa0000000) == 0xe6ff) { + *react = 0x3ff; + for(p = 0; p < 0x400 / sizeof(bios[0]); p++) { + (void)bios[p]; + } + } else { + *react = 0x1fffff; + for(p = 0; p < 0x200000 / sizeof(bios[0]); p++) { + (void)bios[p]; + } } mutex_lock(&_g1_ata_mutex); diff --git a/kernel/arch/dreamcast/hardware/flashrom.c b/kernel/arch/dreamcast/hardware/flashrom.c index 005b662..e983b7a 100644 --- a/kernel/arch/dreamcast/hardware/flashrom.c +++ b/kernel/arch/dreamcast/hardware/flashrom.c @@ -267,8 +267,8 @@ typedef struct { /* Block 0xE0 */ uint16 blockid; /* Should be 0xE0 */ uint8 prodname[4]; /* SEGA */ - uint8 unk1; /* 0x13 */ uint8 method; + uint8 unk1; /* 0x00 */ uint8 unk2[2]; /* 0x00 0x00 */ uint8 ip[4]; /* These are all in big-endian notation */ uint8 nm[4]; @@ -339,11 +339,51 @@ typedef struct { char ppp_passwd[20]; uint16 crc; } e9; + + struct { + /* Block 0xC6 */ + uint16 blockid; + char prodname[4]; + char ppp_login[28]; + char ppp_passwd[16]; + char phone1_pt1[12]; + uint16 crc; + } c6; + + struct { + /* Block 0xC7 */ + uint16 blockid; + char phone1_pt2[15]; + char unk1[13]; + char phone2[27]; + char unk2[5]; + uint16 crc; + } c7; + + struct { + /* Block 0xC8 */ + uint16 blockid; + char unk1[8]; + char phone3[27]; + char unk4[13]; + uint8 dns1[4]; + uint8 dns2[4]; + char unk5[4]; + uint16 crc; + } c8; + + struct { + /* Block 0xEB */ + uint16 blockid; + char unk1[12]; + char atx[48]; + uint16 crc; + } eb; }; } isp_settings_t; int flashrom_get_ispcfg(flashrom_ispcfg_t * out) { - uint8 buffer[64]; + uint8 buffer[sizeof(isp_settings_t)]; isp_settings_t * isp = (isp_settings_t *)buffer; int found = 0; @@ -433,6 +473,50 @@ int flashrom_get_ispcfg(flashrom_ispcfg_t * out) { found++; } + /* Grab block 0xC6 */ + if(flashrom_get_block(FLASHROM_PT_BLOCK_1, FLASHROM_B1_DK_PPP1, buffer) >= 0) { + if(!(out->valid_fields & FLASHROM_ISP_PPP_USER)) { + /* Grab the PPP Username. */ + strncpy(out->ppp_login, isp->c6.ppp_login, 28); + out->ppp_login[28] = '\0'; + out->valid_fields |= FLASHROM_ISP_PPP_USER; + } + + if(!(out->valid_fields & FLASHROM_ISP_PPP_PASS)) { + /* Grab the PPP Password. */ + strncpy(out->ppp_passwd, isp->c6.ppp_passwd, 16); + out->ppp_passwd[16] = '\0'; + out->valid_fields |= FLASHROM_ISP_PPP_PASS; + } + + found++; + } + + /* Grab block 0xC7 */ + if(flashrom_get_block(FLASHROM_PT_BLOCK_1, FLASHROM_B1_DK_PPP2, buffer) >= 0) { + if(!(out->valid_fields & FLASHROM_ISP_PHONE1)) { + /* The full number is 27 digits in C6-C8, + so we truncate it to fit the phone1 field */ + strncpy(out->phone1, isp->c6.phone1_pt1, 12); + strncpy(out->phone1 + 12, isp->c7.phone1_pt2, 25 - 12); + out->phone1[25] = '\0'; + out->valid_fields |= FLASHROM_ISP_PHONE1; + } + found++; + } + + if(flashrom_get_block(FLASHROM_PT_BLOCK_1, FLASHROM_B1_DK_DNS, buffer) >= 0) { + /* Only read if we didn't find it already */ + if(!(out->valid_fields & FLASHROM_ISP_DNS)) { + /* Grab the two DNS addresses. */ + memcpy(out->dns[0], isp->c8.dns1, 4); + memcpy(out->dns[1], isp->c8.dns2, 4); + out->valid_fields |= FLASHROM_ISP_DNS; + } + + found++; + } + return found > 0 ? 0 : -1; } @@ -565,7 +649,7 @@ typedef struct { uint16 crc; } c5; - /* Blocks 0xC6 - 0xCB also appear to be used by PlanetWeb, but are + /* Blocks 0xC7 - 0xCB also appear to be used by PlanetWeb, but are always blank in my tests. My only guess is that they were storage for a potential second ISP setting set. */ }; diff --git a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c index c98fcd2..89b3404 100644 --- a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c +++ b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c @@ -37,7 +37,7 @@ #define RX_CONFIG (RX_EARLY_THRESHOLD<<24) | (RX_FIFO_THRESHOLD<<13) | \ (RX_BUFFER_LEN_SHIFT<<11) | (RX_MAX_DMA_BURST<<8) | \ (RX_NOWRAP<<7) - + #define TX_MAX_DMA_BURST 6 /* 2^(4+n) bytes from 0-7 (16b - 2Kb) */ #define TX_CONFIG (TX_MAX_DMA_BURST<<8) @@ -1117,22 +1117,35 @@ static void bba_if_netinput(uint8 *pkt, int pktsize) { /* Set ISP configuration from the flashrom, as long as we're configured staticly */ static void bba_set_ispcfg() { flashrom_ispcfg_t isp; - uint32 fields = FLASHROM_ISP_IP | FLASHROM_ISP_NETMASK | - FLASHROM_ISP_BROADCAST | FLASHROM_ISP_GATEWAY; if(flashrom_get_ispcfg(&isp) == -1) return; - if((isp.valid_fields & fields) != fields) - return; - if(isp.method != FLASHROM_ISP_STATIC) return; - memcpy(bba_if.ip_addr, isp.ip, 4); - memcpy(bba_if.netmask, isp.nm, 4); - memcpy(bba_if.gateway, isp.gw, 4); - memcpy(bba_if.broadcast, isp.bc, 4); + if((isp.valid_fields & FLASHROM_ISP_IP)) { + memcpy(bba_if.ip_addr, isp.ip, 4); + } + + if((isp.valid_fields & FLASHROM_ISP_NETMASK)) { + memcpy(bba_if.netmask, isp.nm, 4); + } + + if((isp.valid_fields & FLASHROM_ISP_GATEWAY)) { + memcpy(bba_if.gateway, isp.gw, 4); + } + + if((isp.valid_fields & FLASHROM_ISP_DNS)) { + memcpy(bba_if.dns, isp.dns[0], 4); + } + + if((isp.valid_fields & FLASHROM_ISP_BROADCAST)) { + memcpy(bba_if.broadcast, isp.bc, 4); + } else { + /* Default to 255.255.255.255 */ + memset(bba_if.broadcast, 255, 4); + } } /* Initialize */ diff --git a/kernel/arch/dreamcast/hardware/network/lan_adapter.c b/kernel/arch/dreamcast/hardware/network/lan_adapter.c index f2b361c..88f45a8 100644 --- a/kernel/arch/dreamcast/hardware/network/lan_adapter.c +++ b/kernel/arch/dreamcast/hardware/network/lan_adapter.c @@ -705,22 +705,35 @@ static int la_if_set_mc(netif_t *self, const uint8 *list, int count) { /* Set ISP configuration from the flashrom, as long as we're configured staticly */ static void la_set_ispcfg() { flashrom_ispcfg_t isp; - uint32 fields = FLASHROM_ISP_IP | FLASHROM_ISP_NETMASK | - FLASHROM_ISP_BROADCAST | FLASHROM_ISP_GATEWAY; if(flashrom_get_ispcfg(&isp) == -1) return; - if((isp.valid_fields & fields) != fields) - return; - if(isp.method != FLASHROM_ISP_STATIC) return; - memcpy(la_if.ip_addr, isp.ip, 4); - memcpy(la_if.netmask, isp.nm, 4); - memcpy(la_if.gateway, isp.gw, 4); - memcpy(la_if.broadcast, isp.bc, 4); + if((isp.valid_fields & FLASHROM_ISP_IP)) { + memcpy(la_if.ip_addr, isp.ip, 4); + } + + if((isp.valid_fields & FLASHROM_ISP_NETMASK)) { + memcpy(la_if.netmask, isp.nm, 4); + } + + if((isp.valid_fields & FLASHROM_ISP_GATEWAY)) { + memcpy(la_if.gateway, isp.gw, 4); + } + + if((isp.valid_fields & FLASHROM_ISP_DNS)) { + memcpy(la_if.dns, isp.dns[0], 4); + } + + if((isp.valid_fields & FLASHROM_ISP_BROADCAST)) { + memcpy(la_if.broadcast, isp.bc, 4); + } else { + /* Default to 255.255.255.255 */ + memset(la_if.broadcast, 255, 4); + } } /* Initialize */ diff --git a/kernel/arch/dreamcast/include/dc/flashrom.h b/kernel/arch/dreamcast/include/dc/flashrom.h index 26569d2..9b8951f 100644 --- a/kernel/arch/dreamcast/include/dc/flashrom.h +++ b/kernel/arch/dreamcast/include/dc/flashrom.h @@ -54,6 +54,9 @@ __BEGIN_DECLS #define FLASHROM_B1_PW_EMAIL1 0xC3 /**< \brief PlanetWeb Email settings (BLOCK_1) */ #define FLASHROM_B1_PW_EMAIL2 0xC4 /**< \brief PlanetWeb Email settings (BLOCK_1) */ #define FLASHROM_B1_PW_EMAIL_PROXY 0xC5 /**< \brief PlanetWeb Email/Proxy settings (BLOCK_1) */ +#define FLASHROM_B1_DK_PPP1 0xC6 /**< \brief DreamKey PPP settings (also seen in PW) */ +#define FLASHROM_B1_DK_PPP2 0xC7 /**< \brief DreamKey PPP settings (also seen in PW) */ +#define FLASHROM_B1_DK_DNS 0xC8 /**< \brief DreamKey PPP settings (also seen in PW) */ #define FLASHROM_B1_IP_SETTINGS 0xE0 /**< \brief IP settings for BBA (BLOCK_1) */ #define FLASHROM_B1_EMAIL 0xE2 /**< \brief Email address (BLOCK_1) */ #define FLASHROM_B1_SMTP 0xE4 /**< \brief SMTP server setting (BLOCK_1) */ @@ -62,6 +65,7 @@ __BEGIN_DECLS #define FLASHROM_B1_POP3PASSWD 0xE7 /**< \brief POP3 password setting + proxy (BLOCK_1) */ #define FLASHROM_B1_PPPLOGIN 0xE8 /**< \brief PPP username + proxy (BLOCK_1) */ #define FLASHROM_B1_PPPPASSWD 0xE9 /**< \brief PPP passwd (BLOCK_1) */ +#define FLASHROM_B1_PPPMODEM 0xEB /**< \brief PPP modem settings */ /** @} */ #define FLASHROM_OFFSET_CRC 62 /**< \brief Location of CRC in each block */ @@ -225,10 +229,12 @@ int flashrom_get_region(); @{ */ -#define FLASHROM_ISP_DHCP 0 /**< \brief DHCP-based ethernet */ -#define FLASHROM_ISP_STATIC 1 /**< \brief Static IP-based ethernet */ -#define FLASHROM_ISP_DIALUP 2 /**< \brief Dialup ISP */ -#define FLASHROM_ISP_PPPOE 4 /**< \brief PPPoE-based ethernet */ +#define FLASHROM_ISP_DIALUP 0 /**< \brief Dialup ISP */ +#define FLASHROM_ISP_DHCP 1 /**< \brief DHCP-based ethernet */ +#define FLASHROM_ISP_PPPOE 2 /**< \brief PPPoE-based ethernet */ +#define FLASHROM_ISP_STATIC 3 /**< \brief Static IP-based ethernet */ + + /** @} */ /** \defgroup fr_fields Valid field constants for the flashrom_ispcfg_t struct diff --git a/kernel/net/net_core.c b/kernel/net/net_core.c index c453b92..8857f4d 100644 --- a/kernel/net/net_core.c +++ b/kernel/net/net_core.c @@ -180,14 +180,23 @@ int net_init(uint32 ip) { net_dhcp_init(); if(net_default_dev) { - /* Did we get a requested IP address? If so, set it. */ - if(ip) - net_ipv4_parse_address(ip, net_default_dev->ip_addr); + /* Did we get a requested IP address? this normally happens over dcload-ip. */ + if(ip) { + rv = net_dhcp_request(ip); + if(rv < 0) { + dbglog(DBG_DEBUG, "Failed to acquire the specified IP with DHCP\n"); + + /* If that fails, set the address manually. Although gateway + and dns etc. will also manually need setting */ + net_ipv4_parse_address(ip, net_default_dev->ip_addr); + rv = 0; + } + } /* We didn't get a requested IP address, if we don't already have one set, then do so via DHCP. */ else if(!net_default_dev->ip_addr[0]) - rv = net_dhcp_request(); + rv = net_dhcp_request(0); } net_initted = 1; diff --git a/kernel/net/net_dhcp.c b/kernel/net/net_dhcp.c index 5f75d4a..eef55a3 100644 --- a/kernel/net/net_dhcp.c +++ b/kernel/net/net_dhcp.c @@ -29,6 +29,9 @@ #define DHCP_SERVER_PORT 67 #define DHCP_CLIENT_PORT 68 +#define DHCP_MIN_OPTIONS_SIZE 64 + + static int dhcp_sock = -1; struct sockaddr_in srv_addr; @@ -73,10 +76,12 @@ static int net_dhcp_fill_options(netif_t *net, dhcp_pkt_t *req, uint8 msgtype, req->options[pos++] = (net->mtu >> 0) & 0xFF; /* Host Name: Dreamcast */ + const char* host_name = "KallistiOS"; + const uint8 size = strlen(host_name); req->options[pos++] = DHCP_OPTION_HOST_NAME; - req->options[pos++] = 10; /* Length = 10 */ - strcpy((char *)req->options + pos, "KallistiOS"); - pos += 10; + req->options[pos++] = size; + memcpy(req->options + pos, host_name, size); + pos += size; /* Client Identifier: The network adapter's MAC address */ req->options[pos++] = DHCP_OPTION_CLIENT_ID; @@ -117,7 +122,10 @@ static int net_dhcp_fill_options(netif_t *net, dhcp_pkt_t *req, uint8 msgtype, /* The End */ req->options[pos++] = DHCP_OPTION_END; - return pos; + /* DHCP is an extension of the BOOTP RFC which specifies that the + * vendor specific area (which became 'options' in DHCP) is 64 bytes, + * some routers reject DHCP packets if the options area is less than this */ + return (pos < DHCP_MIN_OPTIONS_SIZE) ? DHCP_MIN_OPTIONS_SIZE : pos; } static int net_dhcp_get_message_type(dhcp_pkt_t *pkt, int len) { @@ -194,8 +202,10 @@ static uint16 net_dhcp_get_16bit(dhcp_pkt_t *pkt, uint8 opt, int len) { return 0; } -int net_dhcp_request(void) { + +int net_dhcp_request(uint32 required_address) { uint8 pkt[1500]; + uint16_t pkt_len; dhcp_pkt_t *req = (dhcp_pkt_t *)pkt; int optlen; struct dhcp_pkt_out *qpkt; @@ -234,7 +244,7 @@ int net_dhcp_request(void) { /* Fill in options */ optlen = net_dhcp_fill_options(net_default_dev, req, DHCP_MSG_DHCPDISCOVER, - 0, 0); + 0, required_address); /* Add to our packet queue */ qpkt = (struct dhcp_pkt_out *)malloc(sizeof(struct dhcp_pkt_out)); @@ -244,7 +254,9 @@ int net_dhcp_request(void) { return -1; } - qpkt->buf = (uint8 *)malloc(sizeof(dhcp_pkt_t) + optlen); + pkt_len = sizeof(dhcp_pkt_t) + optlen; + + qpkt->buf = (uint8 *)malloc(pkt_len); if(!qpkt->buf) { free(qpkt); @@ -252,11 +264,11 @@ int net_dhcp_request(void) { return -1; } - qpkt->size = sizeof(dhcp_pkt_t) + optlen; - memcpy(qpkt->buf, pkt, sizeof(dhcp_pkt_t) + optlen); + qpkt->size = pkt_len; + memcpy(qpkt->buf, pkt, pkt_len); qpkt->pkt_type = DHCP_MSG_DHCPDISCOVER; qpkt->next_send = 0; - qpkt->next_delay = 2000; + qpkt->next_delay = 4000; STAILQ_INSERT_TAIL(&dhcp_pkts, qpkt, pkt_queue); @@ -326,7 +338,7 @@ static void net_dhcp_send_request(dhcp_pkt_t *pkt, int pktlen, dhcp_pkt_t *pkt2, memcpy(qpkt->buf, buf, sizeof(dhcp_pkt_t) + optlen); qpkt->pkt_type = DHCP_MSG_DHCPREQUEST; qpkt->next_send = 0; - qpkt->next_delay = 2000; + qpkt->next_delay = 4000; STAILQ_INSERT_TAIL(&dhcp_pkts, qpkt, pkt_queue); @@ -501,7 +513,7 @@ static void net_dhcp_thd(void *obj __attribute__((unused))) { state = DHCP_STATE_INIT; srv_addr.sin_addr.s_addr = INADDR_BROADCAST; memset(net_default_dev->ip_addr, 0, 4); - net_dhcp_request(); + net_dhcp_request(0); } else if(rebind_time <= now && (state == DHCP_STATE_BOUND || state == DHCP_STATE_RENEWING)) { @@ -583,7 +595,7 @@ static void net_dhcp_thd(void *obj __attribute__((unused))) { else if(found == DHCP_MSG_DHCPNAK) { /* We got a NAK, try to discover again. */ state = DHCP_STATE_INIT; - net_dhcp_request(); + net_dhcp_request(0); } /* Remove the old packet from our queue */ diff --git a/kernel/net/net_dhcp.h b/kernel/net/net_dhcp.h index 2421d1c..4b820cd 100644 --- a/kernel/net/net_dhcp.h ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2022-10-02 00:59:30
|
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 f07a8b98ec991373c614af0c7b45c3ca5a4eb8f3 (commit) from 83c59e6c4b51e8aac9a593a3f2782b1f5c9c16e6 (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 f07a8b98ec991373c614af0c7b45c3ca5a4eb8f3 Author: Lawrence Sebald <ljs...@us...> Date: Sat Oct 1 20:59:04 2022 -0400 Add note about unsignedness of returns from fs_total and fs_total64. ----------------------------------------------------------------------- Summary of changes: include/kos/fs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/kos/fs.h b/include/kos/fs.h index a2695f5..657caf7 100644 --- a/include/kos/fs.h +++ b/include/kos/fs.h @@ -343,6 +343,8 @@ _off64_t fs_tell64(file_t hnd); \param hnd The file descriptor to retrieve the size from. \return The length of the file on success, -1 on failure. + \note size_t is unsigned, so the error return value is not + less than 0. */ size_t fs_total(file_t hnd); @@ -353,6 +355,8 @@ size_t fs_total(file_t hnd); \param hnd The file descriptor to retrieve the size from. \return The length of the file on success, -1 on failure. + \note uint64 is unsigned, so the error return value is not + less than 0. */ uint64 fs_total64(file_t hnd); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2022-08-25 22:49:24
|
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 83c59e6c4b51e8aac9a593a3f2782b1f5c9c16e6 (commit) from ecf95142ff084eeb7728432e867240ecc398b217 (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 83c59e6c4b51e8aac9a593a3f2782b1f5c9c16e6 Author: Lawrence Sebald <ljs...@us...> Date: Thu Aug 25 18:48:37 2022 -0400 dc-chain: Document that bash is required for the download/unpack scripts. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/dc-chain/README.md b/utils/dc-chain/README.md index 4a5f600..9ee1f33 100644 --- a/utils/dc-chain/README.md +++ b/utils/dc-chain/README.md @@ -59,6 +59,11 @@ You'll need your host toolchain (i.e. the regular `gcc` plus additional tools) for your computer installed. Indeed, to build the cross-compilers you'll need a working compilation environment on your computer. +In addition, you must have `bash` installed on your host system. Other shells +*may* work, but are not tested and not guaranteed to work. The `download.sh` and +`unpack.sh` scripts should be able to find your system's installed `bash` so +long as it is installed in a standard location. + If you need help on this step, everything is described in the `./doc` directory. Please note that you may be required to use older versions of some of the @@ -248,7 +253,8 @@ After installing all the prerequisites and tweaking the configuration with the Below you will find some generic instructions; you may find some specific instructions in the `./doc` directory for your environment. -1. Execute the following for preparing the sources: +1. Execute the following for preparing the sources (if you have any syntax + errors running the scripts, try running with `bash` explicitly): ./download.sh ./unpack.sh @@ -276,7 +282,8 @@ documentation to learn more on this point. ### Removing all useless files -After the toolchain compilation, you can cleanup everything by entering: +After the toolchain compilation, you can cleanup everything by entering (if +you had to use `bash` explicitly above, you will need to do so again here): ./cleanup.sh hooks/post-receive -- A pseudo Operating System for the Dreamcast. |