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
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: kosmirror <kos...@us...> - 2025-06-10 05:24: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 65b232b0fc206eb9dfd4705d460a9f29fc942839 (commit) from f376087d912cab7891ae9f9941d871913664c2a6 (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 65b232b0fc206eb9dfd4705d460a9f29fc942839 Author: Falco Girgis <gyr...@gm...> Date: Sun Jun 8 07:44:25 2025 -0500 Fixed race when getting/setting IRQ/TRAPA handlers When accessing an IRQ or TRAPA handler, it's possible that the handler could be swapped out from under you either fully or partially by another thread or IRQ. It's also possible an IRQ or TRAPA handler could be called from an IRQ WHILE its still being set by a user, so both the callback function and userdata pointers may not have both been set atomically before the IRQ, causing them to get out-of-sync. - Disabled IRQs around IRQ and TRAPA handler setter and getter accessors to ensure they accessed atomically. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/kernel/irq.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/kernel/arch/dreamcast/kernel/irq.c b/kernel/arch/dreamcast/kernel/irq.c index cb8b3d06..6201e93b 100644 --- a/kernel/arch/dreamcast/kernel/irq.c +++ b/kernel/arch/dreamcast/kernel/irq.c @@ -3,7 +3,7 @@ arch/dreamcast/kernel/irq.c Copyright (C) 2000-2001 Megan Potter Copyright (C) 2024 Paul Cercueil - Copyright (C) 2024 Falco Girgis + Copyright (C) 2024, 2025 Falco Girgis Copyright (C) 2024 Andy Barajas */ @@ -62,6 +62,8 @@ int irq_set_handler(irq_t code, irq_handler hnd, void *data) { return -1; code >>= 5; + + irq_disable_scoped(); irq_handlers[code] = (struct irq_cb){ hnd, data }; return 0; @@ -75,11 +77,14 @@ irq_cb_t irq_get_handler(irq_t code) { code >>= 5; + irq_disable_scoped(); return irq_handlers[code]; } /* Set a global handler */ int irq_set_global_handler(irq_handler hnd, void *data) { + irq_disable_scoped(); + global_irq_handler.hdl = hnd; global_irq_handler.data = data; return 0; @@ -87,17 +92,23 @@ int irq_set_global_handler(irq_handler hnd, void *data) { /* Get the global exception handler */ irq_cb_t irq_get_global_handler(void) { + irq_disable_scoped(); + return global_irq_handler; } /* Set or remove a trapa handler */ int trapa_set_handler(trapa_t code, trapa_handler hnd, void *data) { + irq_disable_scoped(); + trapa_handlers[code] = (struct trapa_cb){ hnd, data }; return 0; } /* Get a particular trapa handler */ trapa_handler trapa_get_handler(trapa_t code, void **data) { + irq_disable_scoped(); + if(data) *data = trapa_handlers[code].data; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-06-10 05:23:35
|
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 f376087d912cab7891ae9f9941d871913664c2a6 (commit) via a62912ec7f41aa56f8d5cf809955a6f6d382ccc2 (commit) via a805aa69ec215eee64619c134a68a2d3181630b6 (commit) via 744bf35a2f1a099343dbab9b7c17690cdd0dc400 (commit) via 7b12f1e65eaf22201baeedf95df8bca21c0fe0e9 (commit) via e8a8adeb132df44c5e16b33b4540e0e418c774a4 (commit) from de20d2e938d89f63edd7ac8a570986c10478c9db (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 f376087d912cab7891ae9f9941d871913664c2a6 Author: Falco Girgis <gyr...@gm...> Date: Sun Jun 8 08:10:54 2025 -0500 Update examples/dreamcast/modem/ppp/ppp.c Co-authored-by: darcagn <da...@pr...> commit a62912ec7f41aa56f8d5cf809955a6f6d382ccc2 Author: Falco Girgis <gyr...@gm...> Date: Sun Jun 8 08:10:41 2025 -0500 Update examples/dreamcast/sound/hello-adx/libADXplay.c Co-authored-by: darcagn <da...@pr...> commit a805aa69ec215eee64619c134a68a2d3181630b6 Author: Falco Girgis <gyr...@gm...> Date: Sun Jun 8 08:10:28 2025 -0500 Update examples/dreamcast/modem/basic/basic.c Co-authored-by: darcagn <da...@pr...> commit 744bf35a2f1a099343dbab9b7c17690cdd0dc400 Author: Falco Girgis <gyr...@gm...> Date: Sun Jun 8 08:10:24 2025 -0500 Update examples/dreamcast/kgl/demos/specular/specular.c Co-authored-by: darcagn <da...@pr...> commit 7b12f1e65eaf22201baeedf95df8bca21c0fe0e9 Author: Falco Girgis <gyr...@gm...> Date: Sun Jun 8 08:10:17 2025 -0500 Update examples/dreamcast/2ndmix/2ndmix.c Co-authored-by: darcagn <da...@pr...> commit e8a8adeb132df44c5e16b33b4540e0e418c774a4 Author: Falco Girgis <gyr...@gm...> Date: Sun Jun 8 07:58:30 2025 -0500 Fixed main(..) function signature for examples. Several examples were giving warnings when compiled with LTO enabled, with GCC complaining about function signature mismatches between the "main()" prototype used within certain examples and the "mian(int argc, const char* argv[]) prototype that was predeclared within init.c. - Updated noncompliant examples to use proper main() signature. ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/2ndmix/2ndmix.c | 2 +- examples/dreamcast/kgl/demos/specular/specular.c | 2 +- examples/dreamcast/modem/basic/basic.c | 2 +- examples/dreamcast/modem/ppp/ppp.c | 2 +- examples/dreamcast/sound/hello-adx/libADXplay.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/dreamcast/2ndmix/2ndmix.c b/examples/dreamcast/2ndmix/2ndmix.c index fb368646..25308251 100644 --- a/examples/dreamcast/2ndmix/2ndmix.c +++ b/examples/dreamcast/2ndmix/2ndmix.c @@ -832,7 +832,7 @@ pvr_init_params_t params = { KOS_INIT_FLAGS(INIT_DEFAULT); /* Main program: init and loop drawing polygons */ -int main() { +int main(int argc, const char *argv[]) { maple_device_t *cont; cont_state_t *state; diff --git a/examples/dreamcast/kgl/demos/specular/specular.c b/examples/dreamcast/kgl/demos/specular/specular.c index 6b794ce2..b3a8b6c0 100644 --- a/examples/dreamcast/kgl/demos/specular/specular.c +++ b/examples/dreamcast/kgl/demos/specular/specular.c @@ -998,7 +998,7 @@ int InputCb(void) { return 1; } -int main() { +int main(int argc, const char *argv[]) { /* Get basic stuff initialized */ glKosInit(); diff --git a/examples/dreamcast/modem/basic/basic.c b/examples/dreamcast/modem/basic/basic.c index c4c74d67..a086e451 100644 --- a/examples/dreamcast/modem/basic/basic.c +++ b/examples/dreamcast/modem/basic/basic.c @@ -29,7 +29,7 @@ int buttonPressed(int button) { return 0; } -int main() { +int main(int argc, const char *argv[]) { int answerMode = 0; unsigned char data[DATA_BUFFER_LENGTH]; int i; diff --git a/examples/dreamcast/modem/ppp/ppp.c b/examples/dreamcast/modem/ppp/ppp.c index 9ef4ca49..b437cca8 100644 --- a/examples/dreamcast/modem/ppp/ppp.c +++ b/examples/dreamcast/modem/ppp/ppp.c @@ -18,7 +18,7 @@ KOS_INIT_FLAGS(INIT_DEFAULT | INIT_NET); -int main() { +int main(int argc, const char *argv[]) { char buffer[1024]; int err; diff --git a/examples/dreamcast/sound/hello-adx/libADXplay.c b/examples/dreamcast/sound/hello-adx/libADXplay.c index 8e220511..e5387bca 100644 --- a/examples/dreamcast/sound/hello-adx/libADXplay.c +++ b/examples/dreamcast/sound/hello-adx/libADXplay.c @@ -56,7 +56,7 @@ int check_cont() return ret; } -int main() +int main(int argc, const char *argv[]) { /* Print some text to the screen */ int o = 20*640+20; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-06-07 21:37:13
|
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 de20d2e938d89f63edd7ac8a570986c10478c9db (commit) via 37b235213e3de444ea2c014bb04eff1009f42dd7 (commit) from 680d18622376666ad9251929f7a6f450e7724607 (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 de20d2e938d89f63edd7ac8a570986c10478c9db Author: darc <da...@pr...> Date: Sat Jun 7 10:55:38 2025 -0500 dc-chain: Upgrade 13.x series profiles to 13.4.0 and 13.4.1 commit 37b235213e3de444ea2c014bb04eff1009f42dd7 Author: darc <da...@pr...> Date: Fri May 23 14:19:35 2025 -0500 dc-chain: Upgrade 14.x series profiles to 14.3.0 and 14.3.1 ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/Makefile.default.cfg | 8 ++-- utils/dc-chain/README.md | 8 ++-- utils/dc-chain/doc/CHANGELOG.md | 2 + .../{gcc-13.3.0-kos.diff => gcc-13.4.0-kos.diff} | 50 ++++++++++----------- .../{gcc-13.3.1-kos.diff => gcc-13.4.1-kos.diff} | 50 ++++++++++----------- .../{gcc-14.2.0-kos.diff => gcc-14.3.0-kos.diff} | 52 +++++++++++----------- .../{gcc-14.2.1-kos.diff => gcc-14.3.1-kos.diff} | 50 ++++++++++----------- .../patches/{ => historical}/gcc-14.2.0-kos.diff | 0 .../{profile.13.3.0.mk => profile.13.4.0.mk} | 8 ++-- ...profile.13.3.1-dev.mk => profile.13.4.1-dev.mk} | 4 +- .../{profile.14.2.0.mk => profile.14.3.0.mk} | 8 ++-- ...profile.14.2.1-dev.mk => profile.14.3.1-dev.mk} | 4 +- 12 files changed, 123 insertions(+), 121 deletions(-) rename utils/dc-chain/patches/{gcc-13.3.0-kos.diff => gcc-13.4.0-kos.diff} (74%) rename utils/dc-chain/patches/{gcc-13.3.1-kos.diff => gcc-13.4.1-kos.diff} (74%) copy utils/dc-chain/patches/{gcc-14.2.0-kos.diff => gcc-14.3.0-kos.diff} (73%) rename utils/dc-chain/patches/{gcc-14.2.1-kos.diff => gcc-14.3.1-kos.diff} (74%) rename utils/dc-chain/patches/{ => historical}/gcc-14.2.0-kos.diff (100%) rename utils/dc-chain/profiles/{profile.13.3.0.mk => profile.13.4.0.mk} (93%) rename utils/dc-chain/profiles/{profile.13.3.1-dev.mk => profile.13.4.1-dev.mk} (94%) rename utils/dc-chain/profiles/{profile.14.2.0.mk => profile.14.3.0.mk} (93%) rename utils/dc-chain/profiles/{profile.14.2.1-dev.mk => profile.14.3.1-dev.mk} (94%) diff --git a/utils/dc-chain/Makefile.default.cfg b/utils/dc-chain/Makefile.default.cfg index 1e0e5375..6658076a 100644 --- a/utils/dc-chain/Makefile.default.cfg +++ b/utils/dc-chain/Makefile.default.cfg @@ -9,12 +9,12 @@ # Release toolchains: # - 9.5.0-winxp: Legacy: Most recent versions of tools which run on Windows XP. # - stable: Stable: Well-tested; based on GCC 13.2.0, released 2023-07-27. -# - 13.3.0: Testing: Latest release in the GCC 13 series, released 2024-05-21. -# - 14.2.0: Testing: Latest release in the GCC 14 series, released 2024-08-01. +# - 13.4.0: Testing: Latest release in the GCC 13 series, released 2025-06-05. +# - 14.3.0: Testing: Latest release in the GCC 14 series, released 2025-05-23. # - 15.1.0: Testing: Latest release in the GCC 15 series, released 2025-04-25. # Development toolchains: -# - 13.3.1-dev Bleeding edge GCC 13 series from git. -# - 14.2.1-dev Bleeding edge GCC 14 series from git. +# - 13.4.1-dev Bleeding edge GCC 13 series from git. +# - 14.3.1-dev Bleeding edge GCC 14 series from git. # - 15.1.1-dev Bleeding edge GCC 15 series from git. # - 16.0.0-dev Bleeding edge GCC 16 series from git. # If unsure, select stable. See README.md for more detailed descriptions. diff --git a/utils/dc-chain/README.md b/utils/dc-chain/README.md index 8156425b..6eb01de0 100644 --- a/utils/dc-chain/README.md +++ b/utils/dc-chain/README.md @@ -100,11 +100,11 @@ The following toolchain profiles are available for users to select in |---------:|:-------:|:----------:|:------------:|:-------:|:----------------:|:------| | 9.5.0-winxp | 9.5.0 | 4.3.0 | 2.34 | 8.5.0 | 2.34 | Most recent versions of tools which run on Windows XP<br />GCC 9 series support ended upstream | | **stable** | **13.2.0** | **4.3.0** | **2.43** | **8.5.0** | **2.43** | **Tested stable; based on GCC 13.2.0, released 2023-07-27** | -| 13.3.0 | 13.3.0 | 4.5.0 | 2.43.1 | 8.5.0 | 2.43.1 | Latest release in the GCC 13 series, released 2024-05-21 | -| 14.2.0 | 14.2.0 | 4.5.0 | 2.43.1 | 8.5.0 | 2.43.1 | Latest release in the GCC 14 series, released 2024-08-01 | +| 13.4.0 | 13.4.0 | 4.5.0 | 2.44 | 8.5.0 | 2.44 | Latest release in the GCC 13 series, released 2025-06-05 | +| 14.3.0 | 14.3.0 | 4.5.0 | 2.44 | 8.5.0 | 2.44 | Latest release in the GCC 14 series, released 2025-05-23 | | 15.1.0 | 15.1.0 | 4.5.0 | 2.44 | 8.5.0 | 2.44 | Latest release in the GCC 15 series, released 2025-04-25 | -| 13.3.1-dev | 13.3.1 (git) | 4.5.0 | 2.44 | 8.5.0 | 2.44 | Bleeding edge GCC 13 series from git | -| 14.2.1-dev | 14.2.1 (git) | 4.5.0 | 2.44 | 8.5.0 | 2.44 | Bleeding edge GCC 14 series from git | +| 13.4.1-dev | 13.3.1 (git) | 4.5.0 | 2.44 | 8.5.0 | 2.44 | Bleeding edge GCC 13 series from git | +| 14.3.1-dev | 14.3.1 (git) | 4.5.0 | 2.44 | 8.5.0 | 2.44 | Bleeding edge GCC 14 series from git | | 15.1.1-dev | 15.1.1 (git) | 4.5.0 | 2.44 | 8.5.0 | 2.44 | Bleeding edge GCC 15 series from git | | 16.0.0-dev | 16.0.0 (git) | 4.5.0 | 2.44 | 8.5.0 | 2.44 | Bleeding edge GCC 16 series from git | diff --git a/utils/dc-chain/doc/CHANGELOG.md b/utils/dc-chain/doc/CHANGELOG.md index 86534f89..9596b84f 100644 --- a/utils/dc-chain/doc/CHANGELOG.md +++ b/utils/dc-chain/doc/CHANGELOG.md @@ -2,6 +2,8 @@ | Date<br/>_____________ | Author(s)<br/>_____________ | Changes<br/>_____________ | |:-----------------------|:----------------------------|---------------------------| +| 2025-06-07 | Eric Fradella | Upgrade 13.x series profiles to 13.4.0 and 13.4.1. | +| 2025-05-23 | Eric Fradella | Upgrade 14.x series profiles to 14.3.0 and 14.3.1. | | 2025-04-18 | Eric Fradella | Add 15.1.0 release profile and 15.1.1/16.0.0 dev profiles. All dev profiles upgraded to Binutils 2.44 and GDB 16.2 | | 2025-02-19 | Eric Fradella | Remove profiles and patches for older toolchains (9.3.0, 10.5.0, 11.5.0, 12.4.0) and Rust dev toolchains. Support for Newlib versions prior to 4.x now deprecated. | | 2025-01-26 | Mickaël Cardoso | Update documentations. | diff --git a/utils/dc-chain/patches/gcc-13.3.0-kos.diff b/utils/dc-chain/patches/gcc-13.4.0-kos.diff similarity index 74% rename from utils/dc-chain/patches/gcc-13.3.0-kos.diff rename to utils/dc-chain/patches/gcc-13.4.0-kos.diff index b5efbe57..57be9dbc 100644 --- a/utils/dc-chain/patches/gcc-13.3.0-kos.diff +++ b/utils/dc-chain/patches/gcc-13.4.0-kos.diff @@ -1,6 +1,6 @@ -diff --color -ruN gcc-13.3.0/gcc/config/sh/sh-c.cc gcc-13.3.0-kos/gcc/config/sh/sh-c.cc ---- gcc-13.3.0/gcc/config/sh/sh-c.cc 2023-06-04 20:48:46.612552162 -0500 -+++ gcc-13.3.0-kos/gcc/config/sh/sh-c.cc 2023-06-04 20:49:03.486606055 -0500 +diff --color -ruN gcc-13.4.0/gcc/config/sh/sh-c.cc gcc-13.4.0-kos/gcc/config/sh/sh-c.cc +--- gcc-13.4.0/gcc/config/sh/sh-c.cc 2023-06-04 20:48:46.612552162 -0500 ++++ gcc-13.4.0-kos/gcc/config/sh/sh-c.cc 2023-06-04 20:49:03.486606055 -0500 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -13,10 +13,10 @@ diff --color -ruN gcc-13.3.0/gcc/config/sh/sh-c.cc gcc-13.3.0-kos/gcc/config/sh/ + /* Toolchain supports setting up stack for 32MB */ + builtin_define ("__KOS_GCC_32MB__"); } -diff --color -ruN gcc-13.3.0/gcc/configure gcc-13.3.0-kos/gcc/configure ---- gcc-13.3.0/gcc/configure 2023-06-04 20:48:49.679561957 -0500 -+++ gcc-13.3.0-kos/gcc/configure 2023-06-04 20:49:03.488606061 -0500 -@@ -13058,7 +13058,7 @@ +diff --color -ruN gcc-13.4.0/gcc/configure gcc-13.4.0-kos/gcc/configure +--- gcc-13.4.0/gcc/configure 2023-06-04 20:48:49.679561957 -0500 ++++ gcc-13.4.0-kos/gcc/configure 2023-06-04 20:49:03.488606061 -0500 +@@ -13094,7 +13094,7 @@ target_thread_file='single' ;; aix | dce | lynx | mipssde | posix | rtems | \ @@ -25,9 +25,9 @@ diff --color -ruN gcc-13.3.0/gcc/configure gcc-13.3.0-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff --color -ruN gcc-13.3.0/libgcc/config/sh/t-sh gcc-13.3.0-kos/libgcc/config/sh/t-sh ---- gcc-13.3.0/libgcc/config/sh/t-sh 2023-06-04 20:48:45.741549380 -0500 -+++ gcc-13.3.0-kos/libgcc/config/sh/t-sh 2023-06-04 20:49:03.488606061 -0500 +diff --color -ruN gcc-13.4.0/libgcc/config/sh/t-sh gcc-13.4.0-kos/libgcc/config/sh/t-sh +--- gcc-13.4.0/libgcc/config/sh/t-sh 2023-06-04 20:48:45.741549380 -0500 ++++ gcc-13.4.0-kos/libgcc/config/sh/t-sh 2023-06-04 20:49:03.488606061 -0500 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -37,9 +37,9 @@ diff --color -ruN gcc-13.3.0/libgcc/config/sh/t-sh gcc-13.3.0-kos/libgcc/config/ crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff --color -ruN gcc-13.3.0/libgcc/configure gcc-13.3.0-kos/libgcc/configure ---- gcc-13.3.0/libgcc/configure 2023-06-04 20:48:45.787549527 -0500 -+++ gcc-13.3.0-kos/libgcc/configure 2023-06-04 20:49:03.489606065 -0500 +diff --color -ruN gcc-13.4.0/libgcc/configure gcc-13.4.0-kos/libgcc/configure +--- gcc-13.4.0/libgcc/configure 2023-06-04 20:48:45.787549527 -0500 ++++ gcc-13.4.0-kos/libgcc/configure 2023-06-04 20:49:03.489606065 -0500 @@ -5699,6 +5699,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -48,9 +48,9 @@ diff --color -ruN gcc-13.3.0/libgcc/configure gcc-13.3.0-kos/libgcc/configure mcf) thread_header=config/i386/gthr-mcf.h ;; esac -diff --color -ruN gcc-13.3.0/libobjc/configure gcc-13.3.0-kos/libobjc/configure ---- gcc-13.3.0/libobjc/configure 2023-06-04 20:48:49.902562670 -0500 -+++ gcc-13.3.0-kos/libobjc/configure 2023-06-04 20:49:03.489606065 -0500 +diff --color -ruN gcc-13.4.0/libobjc/configure gcc-13.4.0-kos/libobjc/configure +--- gcc-13.4.0/libobjc/configure 2023-06-04 20:48:49.902562670 -0500 ++++ gcc-13.4.0-kos/libobjc/configure 2023-06-04 20:49:03.489606065 -0500 @@ -2918,11 +2918,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -63,9 +63,9 @@ diff --color -ruN gcc-13.3.0/libobjc/configure gcc-13.3.0-kos/libobjc/configure ; return 0; } -diff --color -ruN gcc-13.3.0/libobjc/Makefile.in gcc-13.3.0-kos/libobjc/Makefile.in ---- gcc-13.3.0/libobjc/Makefile.in 2023-06-04 20:48:49.901562666 -0500 -+++ gcc-13.3.0-kos/libobjc/Makefile.in 2023-06-04 20:49:03.490606068 -0500 +diff --color -ruN gcc-13.4.0/libobjc/Makefile.in gcc-13.4.0-kos/libobjc/Makefile.in +--- gcc-13.4.0/libobjc/Makefile.in 2023-06-04 20:48:49.901562666 -0500 ++++ gcc-13.4.0-kos/libobjc/Makefile.in 2023-06-04 20:49:03.490606068 -0500 @@ -308,14 +308,16 @@ $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) @@ -96,9 +96,9 @@ diff --color -ruN gcc-13.3.0/libobjc/Makefile.in gcc-13.3.0-kos/libobjc/Makefile mostlyclean: -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo -diff --color -ruN gcc-13.3.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.3.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-13.3.0/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-04 20:48:46.047550357 -0500 -+++ gcc-13.3.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-04 20:49:03.490606068 -0500 +diff --color -ruN gcc-13.4.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.4.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h +--- gcc-13.4.0/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-04 20:48:46.047550357 -0500 ++++ gcc-13.4.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-04 20:49:03.490606068 -0500 @@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -149,9 +149,9 @@ diff --color -ruN gcc-13.3.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.3.0-k + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -diff --color -ruN gcc-13.3.0/libstdc++-v3/configure gcc-13.3.0-kos/libstdc++-v3/configure ---- gcc-13.3.0/libstdc++-v3/configure 2023-06-04 20:48:46.398551478 -0500 -+++ gcc-13.3.0-kos/libstdc++-v3/configure 2023-06-04 20:49:03.493606077 -0500 +diff --color -ruN gcc-13.4.0/libstdc++-v3/configure gcc-13.4.0-kos/libstdc++-v3/configure +--- gcc-13.4.0/libstdc++-v3/configure 2023-06-04 20:48:46.398551478 -0500 ++++ gcc-13.4.0-kos/libstdc++-v3/configure 2023-06-04 20:49:03.493606077 -0500 @@ -15825,6 +15825,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; diff --git a/utils/dc-chain/patches/gcc-13.3.1-kos.diff b/utils/dc-chain/patches/gcc-13.4.1-kos.diff similarity index 74% rename from utils/dc-chain/patches/gcc-13.3.1-kos.diff rename to utils/dc-chain/patches/gcc-13.4.1-kos.diff index aa831e2b..d41b7775 100644 --- a/utils/dc-chain/patches/gcc-13.3.1-kos.diff +++ b/utils/dc-chain/patches/gcc-13.4.1-kos.diff @@ -1,6 +1,6 @@ -diff --color -ruN gcc-13.3.1/gcc/config/sh/sh-c.cc gcc-13.3.1-kos/gcc/config/sh/sh-c.cc ---- gcc-13.3.1/gcc/config/sh/sh-c.cc 2023-06-04 20:48:46.612552162 -0500 -+++ gcc-13.3.1-kos/gcc/config/sh/sh-c.cc 2023-06-04 20:49:03.486606055 -0500 +diff --color -ruN gcc-13.4.1/gcc/config/sh/sh-c.cc gcc-13.4.1-kos/gcc/config/sh/sh-c.cc +--- gcc-13.4.1/gcc/config/sh/sh-c.cc 2023-06-04 20:48:46.612552162 -0500 ++++ gcc-13.4.1-kos/gcc/config/sh/sh-c.cc 2023-06-04 20:49:03.486606055 -0500 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -13,10 +13,10 @@ diff --color -ruN gcc-13.3.1/gcc/config/sh/sh-c.cc gcc-13.3.1-kos/gcc/config/sh/ + /* Toolchain supports setting up stack for 32MB */ + builtin_define ("__KOS_GCC_32MB__"); } -diff --color -ruN gcc-13.3.1/gcc/configure gcc-13.3.1-kos/gcc/configure ---- gcc-13.3.1/gcc/configure 2023-06-04 20:48:49.679561957 -0500 -+++ gcc-13.3.1-kos/gcc/configure 2023-06-04 20:49:03.488606061 -0500 -@@ -13058,7 +13058,7 @@ +diff --color -ruN gcc-13.4.1/gcc/configure gcc-13.4.1-kos/gcc/configure +--- gcc-13.4.1/gcc/configure 2023-06-04 20:48:49.679561957 -0500 ++++ gcc-13.4.1-kos/gcc/configure 2023-06-04 20:49:03.488606061 -0500 +@@ -13094,7 +13094,7 @@ target_thread_file='single' ;; aix | dce | lynx | mipssde | posix | rtems | \ @@ -25,9 +25,9 @@ diff --color -ruN gcc-13.3.1/gcc/configure gcc-13.3.1-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff --color -ruN gcc-13.3.1/libgcc/config/sh/t-sh gcc-13.3.1-kos/libgcc/config/sh/t-sh ---- gcc-13.3.1/libgcc/config/sh/t-sh 2023-06-04 20:48:45.741549380 -0500 -+++ gcc-13.3.1-kos/libgcc/config/sh/t-sh 2023-06-04 20:49:03.488606061 -0500 +diff --color -ruN gcc-13.4.1/libgcc/config/sh/t-sh gcc-13.4.1-kos/libgcc/config/sh/t-sh +--- gcc-13.4.1/libgcc/config/sh/t-sh 2023-06-04 20:48:45.741549380 -0500 ++++ gcc-13.4.1-kos/libgcc/config/sh/t-sh 2023-06-04 20:49:03.488606061 -0500 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -37,9 +37,9 @@ diff --color -ruN gcc-13.3.1/libgcc/config/sh/t-sh gcc-13.3.1-kos/libgcc/config/ crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff --color -ruN gcc-13.3.1/libgcc/configure gcc-13.3.1-kos/libgcc/configure ---- gcc-13.3.1/libgcc/configure 2023-06-04 20:48:45.787549527 -0500 -+++ gcc-13.3.1-kos/libgcc/configure 2023-06-04 20:49:03.489606065 -0500 +diff --color -ruN gcc-13.4.1/libgcc/configure gcc-13.4.1-kos/libgcc/configure +--- gcc-13.4.1/libgcc/configure 2023-06-04 20:48:45.787549527 -0500 ++++ gcc-13.4.1-kos/libgcc/configure 2023-06-04 20:49:03.489606065 -0500 @@ -5699,6 +5699,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -48,9 +48,9 @@ diff --color -ruN gcc-13.3.1/libgcc/configure gcc-13.3.1-kos/libgcc/configure mcf) thread_header=config/i386/gthr-mcf.h ;; esac -diff --color -ruN gcc-13.3.1/libobjc/configure gcc-13.3.1-kos/libobjc/configure ---- gcc-13.3.1/libobjc/configure 2023-06-04 20:48:49.902562670 -0500 -+++ gcc-13.3.1-kos/libobjc/configure 2023-06-04 20:49:03.489606065 -0500 +diff --color -ruN gcc-13.4.1/libobjc/configure gcc-13.4.1-kos/libobjc/configure +--- gcc-13.4.1/libobjc/configure 2023-06-04 20:48:49.902562670 -0500 ++++ gcc-13.4.1-kos/libobjc/configure 2023-06-04 20:49:03.489606065 -0500 @@ -2918,11 +2918,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -63,9 +63,9 @@ diff --color -ruN gcc-13.3.1/libobjc/configure gcc-13.3.1-kos/libobjc/configure ; return 0; } -diff --color -ruN gcc-13.3.1/libobjc/Makefile.in gcc-13.3.1-kos/libobjc/Makefile.in ---- gcc-13.3.1/libobjc/Makefile.in 2023-06-04 20:48:49.901562666 -0500 -+++ gcc-13.3.1-kos/libobjc/Makefile.in 2023-06-04 20:49:03.490606068 -0500 +diff --color -ruN gcc-13.4.1/libobjc/Makefile.in gcc-13.4.1-kos/libobjc/Makefile.in +--- gcc-13.4.1/libobjc/Makefile.in 2023-06-04 20:48:49.901562666 -0500 ++++ gcc-13.4.1-kos/libobjc/Makefile.in 2023-06-04 20:49:03.490606068 -0500 @@ -308,14 +308,16 @@ $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) @@ -96,9 +96,9 @@ diff --color -ruN gcc-13.3.1/libobjc/Makefile.in gcc-13.3.1-kos/libobjc/Makefile mostlyclean: -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo -diff --color -ruN gcc-13.3.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.3.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-13.3.1/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-04 20:48:46.047550357 -0500 -+++ gcc-13.3.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-04 20:49:03.490606068 -0500 +diff --color -ruN gcc-13.4.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.4.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h +--- gcc-13.4.1/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-04 20:48:46.047550357 -0500 ++++ gcc-13.4.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-04 20:49:03.490606068 -0500 @@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -149,9 +149,9 @@ diff --color -ruN gcc-13.3.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.3.1-k + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -diff --color -ruN gcc-13.3.1/libstdc++-v3/configure gcc-13.3.1-kos/libstdc++-v3/configure ---- gcc-13.3.1/libstdc++-v3/configure 2023-06-04 20:48:46.398551478 -0500 -+++ gcc-13.3.1-kos/libstdc++-v3/configure 2023-06-04 20:49:03.493606077 -0500 +diff --color -ruN gcc-13.4.1/libstdc++-v3/configure gcc-13.4.1-kos/libstdc++-v3/configure +--- gcc-13.4.1/libstdc++-v3/configure 2023-06-04 20:48:46.398551478 -0500 ++++ gcc-13.4.1-kos/libstdc++-v3/configure 2023-06-04 20:49:03.493606077 -0500 @@ -15825,6 +15825,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; diff --git a/utils/dc-chain/patches/gcc-14.2.0-kos.diff b/utils/dc-chain/patches/gcc-14.3.0-kos.diff similarity index 73% copy from utils/dc-chain/patches/gcc-14.2.0-kos.diff copy to utils/dc-chain/patches/gcc-14.3.0-kos.diff index d76c0b44..76e9f6bb 100644 --- a/utils/dc-chain/patches/gcc-14.2.0-kos.diff +++ b/utils/dc-chain/patches/gcc-14.3.0-kos.diff @@ -1,6 +1,6 @@ -diff -ruN gcc-14.2.0/gcc/config/sh/sh-c.cc gcc-14.2.0-kos/gcc/config/sh/sh-c.cc ---- gcc-14.2.0/gcc/config/sh/sh-c.cc 2024-01-04 16:01:33.790051712 -0600 -+++ gcc-14.2.0-kos/gcc/config/sh/sh-c.cc 2024-01-04 16:01:42.910094466 -0600 +diff -ruN gcc-14.3.0/gcc/config/sh/sh-c.cc gcc-14.3.0-kos/gcc/config/sh/sh-c.cc +--- gcc-14.3.0/gcc/config/sh/sh-c.cc 2024-01-04 16:01:33.790051712 -0600 ++++ gcc-14.3.0-kos/gcc/config/sh/sh-c.cc 2024-01-04 16:01:42.910094466 -0600 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -13,10 +13,10 @@ diff -ruN gcc-14.2.0/gcc/config/sh/sh-c.cc gcc-14.2.0-kos/gcc/config/sh/sh-c.cc + /* Toolchain supports setting up stack for 32MB */ + builtin_define ("__KOS_GCC_32MB__"); } -diff -ruN gcc-14.2.0/gcc/configure gcc-14.2.0-kos/gcc/configure ---- gcc-14.2.0/gcc/configure 2024-01-04 16:01:33.801051764 -0600 -+++ gcc-14.2.0-kos/gcc/configure 2024-01-04 16:01:42.913094480 -0600 -@@ -13220,7 +13220,7 @@ +diff -ruN gcc-14.3.0/gcc/configure gcc-14.3.0-kos/gcc/configure +--- gcc-14.3.0/gcc/configure 2024-01-04 16:01:33.801051764 -0600 ++++ gcc-14.3.0-kos/gcc/configure 2024-01-04 16:01:42.913094480 -0600 +@@ -13256,7 +13256,7 @@ target_thread_file='single' ;; aix | dce | lynx | mipssde | posix | rtems | \ @@ -25,9 +25,9 @@ diff -ruN gcc-14.2.0/gcc/configure gcc-14.2.0-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff -ruN gcc-14.2.0/libgcc/config/sh/t-sh gcc-14.2.0-kos/libgcc/config/sh/t-sh ---- gcc-14.2.0/libgcc/config/sh/t-sh 2024-01-04 16:01:37.134067388 -0600 -+++ gcc-14.2.0-kos/libgcc/config/sh/t-sh 2024-01-04 16:01:42.914094485 -0600 +diff -ruN gcc-14.3.0/libgcc/config/sh/t-sh gcc-14.3.0-kos/libgcc/config/sh/t-sh +--- gcc-14.3.0/libgcc/config/sh/t-sh 2024-01-04 16:01:37.134067388 -0600 ++++ gcc-14.3.0-kos/libgcc/config/sh/t-sh 2024-01-04 16:01:42.914094485 -0600 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -37,10 +37,10 @@ diff -ruN gcc-14.2.0/libgcc/config/sh/t-sh gcc-14.2.0-kos/libgcc/config/sh/t-sh crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff -ruN gcc-14.2.0/libgcc/configure gcc-14.2.0-kos/libgcc/configure ---- gcc-14.2.0/libgcc/configure 2024-01-04 16:01:37.139067412 -0600 -+++ gcc-14.2.0-kos/libgcc/configure 2024-01-04 16:01:42.914094485 -0600 -@@ -5763,6 +5763,7 @@ +diff -ruN gcc-14.3.0/libgcc/configure gcc-14.3.0-kos/libgcc/configure +--- gcc-14.3.0/libgcc/configure 2024-01-04 16:01:37.139067412 -0600 ++++ gcc-14.3.0-kos/libgcc/configure 2024-01-04 16:01:42.914094485 -0600 +@@ -5764,6 +5764,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; win32) thread_header=config/i386/gthr-win32.h ;; @@ -48,9 +48,9 @@ diff -ruN gcc-14.2.0/libgcc/configure gcc-14.2.0-kos/libgcc/configure mcf) thread_header=config/i386/gthr-mcf.h ;; esac -diff -ruN gcc-14.2.0/libobjc/configure gcc-14.2.0-kos/libobjc/configure ---- gcc-14.2.0/libobjc/configure 2024-01-04 16:01:37.499069099 -0600 -+++ gcc-14.2.0-kos/libobjc/configure 2024-01-04 16:01:42.915094489 -0600 +diff -ruN gcc-14.3.0/libobjc/configure gcc-14.3.0-kos/libobjc/configure +--- gcc-14.3.0/libobjc/configure 2024-01-04 16:01:37.499069099 -0600 ++++ gcc-14.3.0-kos/libobjc/configure 2024-01-04 16:01:42.915094489 -0600 @@ -2924,11 +2924,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -63,9 +63,9 @@ diff -ruN gcc-14.2.0/libobjc/configure gcc-14.2.0-kos/libobjc/configure ; return 0; } -diff -ruN gcc-14.2.0/libobjc/Makefile.in gcc-14.2.0-kos/libobjc/Makefile.in ---- gcc-14.2.0/libobjc/Makefile.in 2024-01-04 16:01:37.499069099 -0600 -+++ gcc-14.2.0-kos/libobjc/Makefile.in 2024-01-04 16:01:42.915094489 -0600 +diff -ruN gcc-14.3.0/libobjc/Makefile.in gcc-14.3.0-kos/libobjc/Makefile.in +--- gcc-14.3.0/libobjc/Makefile.in 2024-01-04 16:01:37.499069099 -0600 ++++ gcc-14.3.0-kos/libobjc/Makefile.in 2024-01-04 16:01:42.915094489 -0600 @@ -308,14 +308,16 @@ $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) @@ -96,9 +96,9 @@ diff -ruN gcc-14.2.0/libobjc/Makefile.in gcc-14.2.0-kos/libobjc/Makefile.in mostlyclean: -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo -diff -ruN gcc-14.2.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-14.2.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-14.2.0/libstdc++-v3/config/cpu/sh/atomicity.h 2024-01-04 16:01:37.608069611 -0600 -+++ gcc-14.2.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2024-01-04 16:01:42.916094494 -0600 +diff -ruN gcc-14.3.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-14.3.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h +--- gcc-14.3.0/libstdc++-v3/config/cpu/sh/atomicity.h 2024-01-04 16:01:37.608069611 -0600 ++++ gcc-14.3.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2024-01-04 16:01:42.916094494 -0600 @@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -149,9 +149,9 @@ diff -ruN gcc-14.2.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-14.2.0-kos/libst + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -diff -ruN gcc-14.2.0/libstdc++-v3/configure gcc-14.2.0-kos/libstdc++-v3/configure ---- gcc-14.2.0/libstdc++-v3/configure 2024-01-04 16:01:37.616069648 -0600 -+++ gcc-14.2.0-kos/libstdc++-v3/configure 2024-01-04 16:01:42.919094508 -0600 +diff -ruN gcc-14.3.0/libstdc++-v3/configure gcc-14.3.0-kos/libstdc++-v3/configure +--- gcc-14.3.0/libstdc++-v3/configure 2024-01-04 16:01:37.616069648 -0600 ++++ gcc-14.3.0-kos/libstdc++-v3/configure 2024-01-04 16:01:42.919094508 -0600 @@ -15974,6 +15974,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; diff --git a/utils/dc-chain/patches/gcc-14.2.1-kos.diff b/utils/dc-chain/patches/gcc-14.3.1-kos.diff similarity index 74% rename from utils/dc-chain/patches/gcc-14.2.1-kos.diff rename to utils/dc-chain/patches/gcc-14.3.1-kos.diff index a3f559bb..8e15e615 100644 --- a/utils/dc-chain/patches/gcc-14.2.1-kos.diff +++ b/utils/dc-chain/patches/gcc-14.3.1-kos.diff @@ -1,6 +1,6 @@ -diff -ruN gcc-14.2.1/gcc/config/sh/sh-c.cc gcc-14.2.1-kos/gcc/config/sh/sh-c.cc ---- gcc-14.2.1/gcc/config/sh/sh-c.cc 2025-04-18 16:01:33.790051712 -0600 -+++ gcc-14.2.1-kos/gcc/config/sh/sh-c.cc 2025-04-18 16:01:42.910094466 -0600 +diff -ruN gcc-14.3.1/gcc/config/sh/sh-c.cc gcc-14.3.1-kos/gcc/config/sh/sh-c.cc +--- gcc-14.3.1/gcc/config/sh/sh-c.cc 2025-04-18 16:01:33.790051712 -0600 ++++ gcc-14.3.1-kos/gcc/config/sh/sh-c.cc 2025-04-18 16:01:42.910094466 -0600 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -13,10 +13,10 @@ diff -ruN gcc-14.2.1/gcc/config/sh/sh-c.cc gcc-14.2.1-kos/gcc/config/sh/sh-c.cc + /* Toolchain supports setting up stack for 32MB */ + builtin_define ("__KOS_GCC_32MB__"); } -diff -ruN gcc-14.2.1/gcc/configure gcc-14.2.1-kos/gcc/configure ---- gcc-14.2.1/gcc/configure 2025-04-18 16:01:33.801051764 -0600 -+++ gcc-14.2.1-kos/gcc/configure 2025-04-18 16:01:42.913094480 -0600 -@@ -13220,7 +13220,7 @@ +diff -ruN gcc-14.3.1/gcc/configure gcc-14.3.1-kos/gcc/configure +--- gcc-14.3.1/gcc/configure 2025-04-18 16:01:33.801051764 -0600 ++++ gcc-14.3.1-kos/gcc/configure 2025-04-18 16:01:42.913094480 -0600 +@@ -13256,7 +13256,7 @@ target_thread_file='single' ;; aix | dce | lynx | mipssde | posix | rtems | \ @@ -25,9 +25,9 @@ diff -ruN gcc-14.2.1/gcc/configure gcc-14.2.1-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff -ruN gcc-14.2.1/libgcc/config/sh/t-sh gcc-14.2.1-kos/libgcc/config/sh/t-sh ---- gcc-14.2.1/libgcc/config/sh/t-sh 2025-04-18 16:01:37.134067388 -0600 -+++ gcc-14.2.1-kos/libgcc/config/sh/t-sh 2025-04-18 16:01:42.914094485 -0600 +diff -ruN gcc-14.3.1/libgcc/config/sh/t-sh gcc-14.3.1-kos/libgcc/config/sh/t-sh +--- gcc-14.3.1/libgcc/config/sh/t-sh 2025-04-18 16:01:37.134067388 -0600 ++++ gcc-14.3.1-kos/libgcc/config/sh/t-sh 2025-04-18 16:01:42.914094485 -0600 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -37,9 +37,9 @@ diff -ruN gcc-14.2.1/libgcc/config/sh/t-sh gcc-14.2.1-kos/libgcc/config/sh/t-sh crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff -ruN gcc-14.2.1/libgcc/configure gcc-14.2.1-kos/libgcc/configure ---- gcc-14.2.1/libgcc/configure 2025-04-18 16:01:37.139067412 -0600 -+++ gcc-14.2.1-kos/libgcc/configure 2025-04-18 16:01:42.914094485 -0600 +diff -ruN gcc-14.3.1/libgcc/configure gcc-14.3.1-kos/libgcc/configure +--- gcc-14.3.1/libgcc/configure 2025-04-18 16:01:37.139067412 -0600 ++++ gcc-14.3.1-kos/libgcc/configure 2025-04-18 16:01:42.914094485 -0600 @@ -5764,6 +5764,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -48,9 +48,9 @@ diff -ruN gcc-14.2.1/libgcc/configure gcc-14.2.1-kos/libgcc/configure mcf) thread_header=config/i386/gthr-mcf.h ;; esac -diff -ruN gcc-14.2.1/libobjc/configure gcc-14.2.1-kos/libobjc/configure ---- gcc-14.2.1/libobjc/configure 2025-04-18 16:01:37.499069099 -0600 -+++ gcc-14.2.1-kos/libobjc/configure 2025-04-18 16:01:42.915094489 -0600 +diff -ruN gcc-14.3.1/libobjc/configure gcc-14.3.1-kos/libobjc/configure +--- gcc-14.3.1/libobjc/configure 2025-04-18 16:01:37.499069099 -0600 ++++ gcc-14.3.1-kos/libobjc/configure 2025-04-18 16:01:42.915094489 -0600 @@ -2924,11 +2924,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -63,9 +63,9 @@ diff -ruN gcc-14.2.1/libobjc/configure gcc-14.2.1-kos/libobjc/configure ; return 0; } -diff -ruN gcc-14.2.1/libobjc/Makefile.in gcc-14.2.1-kos/libobjc/Makefile.in ---- gcc-14.2.1/libobjc/Makefile.in 2025-04-18 16:01:37.499069099 -0600 -+++ gcc-14.2.1-kos/libobjc/Makefile.in 2025-04-18 16:01:42.915094489 -0600 +diff -ruN gcc-14.3.1/libobjc/Makefile.in gcc-14.3.1-kos/libobjc/Makefile.in +--- gcc-14.3.1/libobjc/Makefile.in 2025-04-18 16:01:37.499069099 -0600 ++++ gcc-14.3.1-kos/libobjc/Makefile.in 2025-04-18 16:01:42.915094489 -0600 @@ -308,14 +308,16 @@ $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) @@ -96,9 +96,9 @@ diff -ruN gcc-14.2.1/libobjc/Makefile.in gcc-14.2.1-kos/libobjc/Makefile.in mostlyclean: -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo -diff -ruN gcc-14.2.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-14.2.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-14.2.1/libstdc++-v3/config/cpu/sh/atomicity.h 2025-04-18 16:01:37.608069611 -0600 -+++ gcc-14.2.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2025-04-18 16:01:42.916094494 -0600 +diff -ruN gcc-14.3.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-14.3.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h +--- gcc-14.3.1/libstdc++-v3/config/cpu/sh/atomicity.h 2025-04-18 16:01:37.608069611 -0600 ++++ gcc-14.3.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2025-04-18 16:01:42.916094494 -0600 @@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -149,9 +149,9 @@ diff -ruN gcc-14.2.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-14.2.1-kos/libst + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -diff -ruN gcc-14.2.1/libstdc++-v3/configure gcc-14.2.1-kos/libstdc++-v3/configure ---- gcc-14.2.1/libstdc++-v3/configure 2025-04-18 16:01:37.616069648 -0600 ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-31 00:38:12
|
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 680d18622376666ad9251929f7a6f450e7724607 (commit) from 5494e88a4d4bab0a288892f55363e48a146417ff (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 680d18622376666ad9251929f7a6f450e7724607 Author: QuzarDC <qu...@co...> Date: Fri May 30 19:19:22 2025 -0400 Add pthread include to fix 9.5.0-winxp profile. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/patches/gcc/gthr-kos.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/dc-chain/patches/gcc/gthr-kos.h b/utils/dc-chain/patches/gcc/gthr-kos.h index 5e58191c..e71cb923 100644 --- a/utils/dc-chain/patches/gcc/gthr-kos.h +++ b/utils/dc-chain/patches/gcc/gthr-kos.h @@ -45,6 +45,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include <arch/irq.h> #include <time.h> +/* 9.5.0 somehow requires this. Remove when no longer supported */ +#include <pthread.h> + /* These should work just fine. */ typedef kthread_key_t __gthread_key_t; typedef kthread_once_t __gthread_once_t; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-30 23:53:39
|
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 5494e88a4d4bab0a288892f55363e48a146417ff (commit) from 5f6cc322256b3c503b462f0a99b221ee304e5482 (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 5494e88a4d4bab0a288892f55363e48a146417ff Author: QuzarDC <qu...@co...> Date: Fri May 30 03:37:50 2025 -0400 Correct `mutex_trylock` errno. According to POSIX spec EBUSY should be returned for trylock when the mutex couldn't be locked. EAGAIN is instead used if the max number of recursive locks for the mutex has been exceeded. ----------------------------------------------------------------------- Summary of changes: include/kos/mutex.h | 2 +- kernel/libc/c11/mtx_trylock.c | 2 +- kernel/thread/mutex.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/kos/mutex.h b/include/kos/mutex.h index 67729b65..243b5cc6 100644 --- a/include/kos/mutex.h +++ b/include/kos/mutex.h @@ -239,7 +239,7 @@ int mutex_is_locked(mutex_t *m); \retval -1 If the mutex cannot be acquired without blocking \par Error Conditions: - \em EAGAIN - the mutex is already locked (mutex_lock() would block) \n + \em EBUSY - the mutex is already locked (mutex_lock() would block) \n \em EINVAL - the mutex has not been initialized properly \n \em EAGAIN - lock has been acquired too many times (recursive) \n \em EDEADLK - would deadlock (error-checking) diff --git a/kernel/libc/c11/mtx_trylock.c b/kernel/libc/c11/mtx_trylock.c index cb0e833b..eead66a0 100644 --- a/kernel/libc/c11/mtx_trylock.c +++ b/kernel/libc/c11/mtx_trylock.c @@ -9,7 +9,7 @@ int mtx_trylock(mtx_t *mtx) { if(mutex_trylock(mtx)) { - if(errno == EAGAIN) + if(errno == EBUSY) return thrd_busy; return thrd_error; diff --git a/kernel/thread/mutex.c b/kernel/thread/mutex.c index 4490ad63..09cdd3a5 100644 --- a/kernel/thread/mutex.c +++ b/kernel/thread/mutex.c @@ -198,7 +198,7 @@ int mutex_trylock(mutex_t *m) { /* Check if the lock is held by some other thread already */ if(m->count && m->holder != thd) { - errno = EAGAIN; + errno = EBUSY; return -1; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-30 02:40: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 5f6cc322256b3c503b462f0a99b221ee304e5482 (commit) via f1511f8ac9c9a9106aa414afa01d87b75d8d419f (commit) from ca4a4104eaf7c9df5d2551f8ef7748e63a7a87d5 (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 5f6cc322256b3c503b462f0a99b221ee304e5482 Author: DC-SWAT <sw...@21...> Date: Fri May 30 09:24:28 2025 +0700 aica: Fix snd_stream_shutdown(). Also a bit improved init. commit f1511f8ac9c9a9106aa414afa01d87b75d8d419f Author: DC-SWAT <sw...@21...> Date: Fri May 30 08:37:24 2025 +0700 aica: Fixed and improved checks for stream init ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/sound/snd_stream.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 76d9c7c1..4c8799e4 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -4,7 +4,7 @@ Copyright (C) 2000, 2001, 2002, 2003, 2004 Megan Potter Copyright (C) 2002 Florian Schulze Copyright (C) 2020 Lawrence Sebald - Copyright (C) 2023, 2024 Ruslan Rostovtsev + Copyright (C) 2023, 2024, 2025 Ruslan Rostovtsev Copyright (C) 2024 Stefanos Kornilios Mitsis Poiitidis SH-4 support routines for SPU streaming sound driver @@ -110,7 +110,8 @@ static uint32_t *sep_buffer[2] = {NULL, NULL}; static mutex_t stream_mutex = MUTEX_INITIALIZER; -static int max_channels = 2; +static int max_channels = 0; +static size_t max_buffer_size = 0; /* Check an incoming handle */ #define CHECK_HND(x) do { \ @@ -323,12 +324,24 @@ int snd_stream_init(void) { int snd_stream_init_ex(int channels, size_t buffer_size) { - if(sep_buffer[0]) { - dbglog(DBG_ERROR, "snd_stream_init_ex(): already initialized\n"); - return -1; + if(max_channels) { + if(channels > max_channels) { + dbglog(DBG_ERROR, "snd_stream_init_ex(): already initialized" + " with %d channels, but %d requested\n", + max_channels, channels); + return -1; + } + else if(max_buffer_size && buffer_size > max_buffer_size) { + dbglog(DBG_ERROR, "snd_stream_init_ex(): already initialized" + " with %d buffer size, but %d requested\n", + max_buffer_size, buffer_size); + return -1; + } + return 0; } max_channels = channels; + max_buffer_size = buffer_size; if(buffer_size > 0) { /* Create stereo separation buffers. This buffer size for each channel. @@ -468,6 +481,9 @@ void snd_stream_shutdown(void) { sep_buffer[0] = NULL; sep_buffer[1] = NULL; } + + max_channels = 0; + max_buffer_size = 0; } /* Enable / disable stream queueing */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-25 17:14:18
|
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 ca4a4104eaf7c9df5d2551f8ef7748e63a7a87d5 (commit) from a22cbb2314db9344debb8f86be9b4cdc226aa897 (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 ca4a4104eaf7c9df5d2551f8ef7748e63a7a87d5 Author: Falco Girgis <gyr...@gm...> Date: Sun May 25 12:13:28 2025 -0500 Cleaned up pvr_header.h. (#1051) * Cleaned up pvr_header.h. pvr_header.h was not matching the coding standards with the rest of the codebase. UnknownShadow also reported that our pvr_poly_hdr_t unionized structure lacked members for setting user clip area... 1) Added typedefs to all structs and enumerations, because they're public and user-facing. 2) Removed explicit names for padding in bitfields. a. They are not required. b. Even if they were, __ prefixing is reserved for internal toolchain and stdlib things and shouldn't be used. 3) Made an alias for "to_pvr_txr_ptr()" which manages to be the only function, variable, or macro in the entire PVR API to not start with PVR. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/include/dc/pvr/pvr_header.h | 216 +++++++++++----------- 1 file changed, 113 insertions(+), 103 deletions(-) diff --git a/kernel/arch/dreamcast/include/dc/pvr/pvr_header.h b/kernel/arch/dreamcast/include/dc/pvr/pvr_header.h index 255bec46..f0cc12b6 100644 --- a/kernel/arch/dreamcast/include/dc/pvr/pvr_header.h +++ b/kernel/arch/dreamcast/include/dc/pvr/pvr_header.h @@ -33,35 +33,35 @@ __BEGIN_DECLS These control how colors are represented in polygon data. */ -enum pvr_color_fmts { +typedef enum pvr_color_fmts { PVR_CLRFMT_ARGBPACKED, /**< 32-bit integer ARGB */ PVR_CLRFMT_4FLOATS, /**< 4 floating point values */ PVR_CLRFMT_INTENSITY, /**< Intensity color */ PVR_CLRFMT_INTENSITY_PREV, /**< Use last intensity */ -}; +} pvr_color_fmts_t; /** \brief Primitive clipping modes These control how primitives are clipped against the user clipping area. */ -enum pvr_clip_mode { +typedef enum pvr_clip_mode { PVR_USERCLIP_DISABLE = 0, /**< Disable clipping */ PVR_USERCLIP_INSIDE = 2, /**< Enable clipping inside area */ PVR_USERCLIP_OUTSIDE = 3, /**< Enable clipping outside area */ -}; +} pvr_clip_mode_t; /** \brief PVR rendering lists Each primitive submitted to the PVR must be placed in one of these lists, depending on its characteristics. */ -enum pvr_list_type { +typedef enum pvr_list_type { PVR_LIST_OP_POLY, /**< Opaque polygon list */ PVR_LIST_OP_MOD, /**< Opaque modifier list */ PVR_LIST_TR_POLY, /**< Translucent polygon list */ PVR_LIST_TR_MOD, /**< Translucent modifier list*/ PVR_LIST_PT_POLY, /**< Punch-thru polygon list */ -}; +} pvr_list_type_t; /** \brief Primitive culling modes @@ -69,18 +69,18 @@ enum pvr_list_type { culled. They work pretty much as you'd expect them to if you've ever used any 3D hardware before. */ -enum pvr_cull_mode { +typedef enum pvr_cull_mode { PVR_CULLING_NONE, /**< Disable culling */ PVR_CULLING_SMALL, /**< Cull if small */ PVR_CULLING_CCW, /**< Cull if counterclockwise */ PVR_CULLING_CW, /**< Cull if clockwise */ -}; +} pvr_cull_mode_t; /** \brief Depth comparison modes These set the depth function used for comparisons. */ -enum pvr_depthcmp_mode { +typedef enum pvr_depthcmp_mode { PVR_DEPTHCMP_NEVER, /**< Never pass */ PVR_DEPTHCMP_LESS, /**< Less than */ PVR_DEPTHCMP_EQUAL, /**< Equal to */ @@ -89,10 +89,10 @@ enum pvr_depthcmp_mode { PVR_DEPTHCMP_NOTEQUAL, /**< Not equal to */ PVR_DEPTHCMP_GEQUAL, /**< Greater than or equal to */ PVR_DEPTHCMP_ALWAYS, /**< Always pass */ -}; +} pvr_depthcmp_mode_t; /** \brief Texture U/V size */ -enum pvr_uv_size { +typedef enum pvr_uv_size { PVR_UV_SIZE_8, PVR_UV_SIZE_16, PVR_UV_SIZE_32, @@ -101,7 +101,7 @@ enum pvr_uv_size { PVR_UV_SIZE_256, PVR_UV_SIZE_512, PVR_UV_SIZE_1024, -}; +} pvr_uv_size_t; /** \brief Texture color calculation modes. @@ -116,40 +116,40 @@ enum pvr_uv_size { Note that the offset color (aka. oargb), if specular lighting is enabled, is added to the result. Its alpha channel is ignored. */ -enum pvr_txr_shading_mode { +typedef enum pvr_txr_shading_mode { PVR_TXRENV_REPLACE, /**< px = ARGB(tex) */ PVR_TXRENV_MODULATE, /**< px = A(tex) + RGB(col) * RGB(tex) */ PVR_TXRENV_DECAL, /**< px = A(col) + RGB(tex) * A(tex) + RGB(col) * (1 - A(tex)) */ PVR_TXRENV_MODULATEALPHA, /**< px = ARGB(col) * ARGB(tex) */ -}; +} pvr_txr_shading_mode_t; /** \brief Texture sampling modes */ -enum pvr_filter_mode { +typedef enum pvr_filter_mode { PVR_FILTER_NEAREST, /**< No filtering (point sample) */ PVR_FILTER_BILINEAR, /**< Bilinear interpolation */ PVR_FILTER_TRILINEAR1, /**< Trilinear interpolation pass 1 */ PVR_FILTER_TRILINEAR2, /**< Trilinear interpolation pass 2 */ PVR_FILTER_NONE = PVR_FILTER_NEAREST, -}; +} pvr_filter_mode_t; /** \brief Fog modes Each polygon can decide what fog type is used by specifying the fog mode in its header. */ -enum pvr_fog_type { +typedef enum pvr_fog_type { PVR_FOG_TABLE, /**< Table fog */ PVR_FOG_VERTEX, /**< Vertex fog */ PVR_FOG_DISABLE, /**< Disable fog */ PVR_FOG_TABLE2, /**< Table fog mode 2 */ -}; +} pvr_fog_type_t; /** \brief Blending modes These are all the blending modes that can be done with regard to alpha blending on the PVR. */ -enum pvr_blend_mode { +typedef enum pvr_blend_mode { PVR_BLEND_ZERO, /**< None of this color */ PVR_BLEND_ONE, /**< All of this color */ PVR_BLEND_DESTCOLOR, /**< Destination color */ @@ -158,13 +158,13 @@ enum pvr_blend_mode { PVR_BLEND_INVSRCALPHA, /**< Blend with inverse source alpha */ PVR_BLEND_DESTALPHA, /**< Blend with destination alpha */ PVR_BLEND_INVDESTALPHA, /**< Blend with inverse destination alpha */ -}; +} pvr_blend_mode_t; /** \brief Texture formats These are the texture formats that the PVR supports. */ -enum pvr_pixel_mode { +typedef enum pvr_pixel_mode { PVR_PIXEL_MODE_ARGB1555, /**< 16-bit ARGB1555 */ PVR_PIXEL_MODE_RGB565, /**< 16-bit RGB565 */ PVR_PIXEL_MODE_ARGB4444, /**< 16-bit ARGB4444 */ @@ -172,31 +172,31 @@ enum pvr_pixel_mode { PVR_PIXEL_MODE_BUMP, /**< Bumpmap format */ PVR_PIXEL_MODE_PAL_4BPP, /**< 4BPP paletted format */ PVR_PIXEL_MODE_PAL_8BPP, /**< 8BPP paletted format */ -}; +} pvr_pixel_mode_t; /** \brief Triangle strip length This sets the maximum length of a triangle strip, if not configured in auto mode. */ -enum pvr_strip_len { +typedef enum pvr_strip_len { PVR_STRIP_LEN_1, PVR_STRIP_LEN_2, PVR_STRIP_LEN_4, PVR_STRIP_LEN_6, -}; +} pvr_strip_len_t; /** \brief Polygon header type This enum contains the possible PVR header types. */ -enum pvr_hdr_type { +typedef enum pvr_hdr_type { PVR_HDR_EOL = 0, PVR_HDR_USERCLIP = 1, PVR_HDR_OBJECT_LIST_SET = 2, PVR_HDR_POLY = 4, PVR_HDR_SPRITE = 5, -}; +} pvr_hdr_type_t; /** \brief Texture address @@ -217,82 +217,87 @@ static inline pvr_txr_ptr_t to_pvr_txr_ptr(pvr_ptr_t addr) { return ((uint32_t)addr & 0x00fffff8) >> 3; } +/** \brief Get texture address form VRAM address + + Alias macro for to_pvr_txr_ptr(). +*/ +#define pvr_to_pvr_txr_ptr(addr) to_pvr_txr_ptr(addr) + /** \brief PVR header command This structure contains all the fields for the command of PVR headers. */ -struct pvr_poly_hdr_cmd { - bool uvfmt_f16 :1; /* 0 */ /**< Use 16-bit floating-point U/Vs */ - bool gouraud :1; /* 1 */ /**< Enable gouraud shading */ - bool oargb_en :1; /* 2 */ /**< Enable specular lighting */ - bool txr_en :1; /* 3 */ /**< Enable texturing */ - enum pvr_color_fmts color_fmt :2; /* 5-4 */ /**< Select color encoding */ - bool mod_normal :1; /* 6 */ /**< true: normal, false: cheap shadow */ - bool modifier_en :1; /* 7 */ /**< Enable modifier effects */ - uint32_t __pad0 :8; /* 15-8 */ - enum pvr_clip_mode clip_mode :2; /* 17-16 */ /**< Clipping mode */ - enum pvr_strip_len strip_len :2; /* 19-18 */ /**< Triangle strips length (if non-auto) */ - uint32_t __pad1 :3; /* 22-20 */ - bool auto_strip_len :1; /* 23 */ /**< Auto select triangle strips length */ - - enum pvr_list_type list_type :3; /* 26-24 */ /**< Render list to use */ - uint32_t __pad2 :1; /* 27 */ - bool strip_end :1; /* 28 */ /**< Mark an end-of-strip */ - enum pvr_hdr_type hdr_type :3; /* 31-29 */ /**< Header type */ -}; +typedef struct pvr_poly_hdr_cmd { + bool uvfmt_f16 :1; /* 0 */ /**< Use 16-bit floating-point U/Vs */ + bool gouraud :1; /* 1 */ /**< Enable gouraud shading */ + bool oargb_en :1; /* 2 */ /**< Enable specular lighting */ + bool txr_en :1; /* 3 */ /**< Enable texturing */ + pvr_color_fmts_t color_fmt :2; /* 5-4 */ /**< Select color encoding */ + bool mod_normal :1; /* 6 */ /**< true: normal, false: cheap shadow */ + bool modifier_en :1; /* 7 */ /**< Enable modifier effects */ + uint32_t :8; /* 15-8 */ + pvr_clip_mode_t clip_mode :2; /* 17-16 */ /**< Clipping mode */ + pvr_strip_len_t strip_len :2; /* 19-18 */ /**< Triangle strips length (if non-auto) */ + uint32_t :3; /* 22-20 */ + bool auto_strip_len :1; /* 23 */ /**< Auto select triangle strips length */ + pvr_list_type_t list_type :3; /* 26-24 */ /**< Render list to use */ + uint32_t :1; /* 27 */ + bool strip_end :1; /* 28 */ /**< Mark an end-of-strip */ + pvr_hdr_type_t hdr_type :3; /* 31-29 */ /**< Header type */ +} pvr_poly_hdr_cmd_t; /** \brief PVR header mode1 This structure contains all the fields for the mode1 parameter of PVR headers. */ -struct pvr_poly_hdr_mode1 { - uint32_t __pad3 :25; /* 24-0 */ - bool txr_en :1; /* 25 */ /**< Enable texturing (2nd bit) */ - bool depth_write_dis :1; /* 26 */ /**< Disable depth writes */ - enum pvr_cull_mode culling :2; /* 28-27 */ /**< Culling mode */ - enum pvr_depthcmp_mode depth_cmp :3; /* 31-29 */ /**< Depth comparison mode */ -}; +typedef struct pvr_poly_hdr_mode1 { + uint32_t :25; /* 24-0 */ + bool txr_en :1; /* 25 */ /**< Enable texturing (2nd bit) */ + bool depth_write_dis :1; /* 26 */ /**< Disable depth writes */ + pvr_cull_mode_t culling :2; /* 28-27 */ /**< Culling mode */ + pvr_depthcmp_mode_t depth_cmp :3; /* 31-29 */ /**< Depth comparison mode */ +} pvr_poly_hdr_mode1_t; /** \brief PVR header mode2 This structure contains all the fields for the mode2 parameter of PVR headers. */ -struct pvr_poly_hdr_mode2 { - enum pvr_uv_size v_size :3; /* 2-0 */ /**< Texture height */ - enum pvr_uv_size u_size :3; /* 5-3 */ /**< Texture width */ - enum pvr_txr_shading_mode shading :2; /* 7-6 */ /**< Shading mode */ - uint32_t mip_bias :4; /* 11-8 */ /**< Bias for mipmaps */ - bool supersampling :1; /* 12 */ /**< Enable texture supersampling */ - enum pvr_filter_mode filter_mode :2; /* 14-13 */ /**< Texture filtering mode */ - bool v_clamp :1; /* 15 */ /**< Clamp V to 1.0 */ - bool u_clamp :1; /* 16 */ /**< Clamp U to 1.0 */ - bool v_flip :1; /* 17 */ /**< Flip V after 1.0 */ - bool u_flip :1; /* 18 */ /**< Flip U after 1.0 */ - bool txralpha_dis :1; /* 19 */ /**< Disable alpha channel in textures */ - bool alpha :1; /* 20 */ /**< Enable alpha channel in vertex colors */ - bool fog_clamp :1; /* 21 */ /**< Enable fog clamping */ - enum pvr_fog_type fog_type :2; /* 23-22 */ /**< Select fog type */ - bool blend_dst_acc2 :1; /* 24 */ /**< Blend to the 2nd accumulation buffer */ - bool blend_src_acc2 :1; /* 25 */ /**< Blend from the 2nd accumulation buffer */ - enum pvr_blend_mode blend_dst :3; /* 28-26 */ /**< Blend mode for the background */ - enum pvr_blend_mode blend_src :3; /* 31-29 */ /**< Blend mode for the foreground */ -}; +typedef struct pvr_poly_hdr_mode2 { + pvr_uv_size_t v_size :3; /* 2-0 */ /**< Texture height */ + pvr_uv_size_t u_size :3; /* 5-3 */ /**< Texture width */ + pvr_txr_shading_mode_t shading :2; /* 7-6 */ /**< Shading mode */ + uint32_t mip_bias :4; /* 11-8 */ /**< Bias for mipmaps */ + bool supersampling :1; /* 12 */ /**< Enable texture supersampling */ + pvr_filter_mode_t filter_mode :2; /* 14-13 */ /**< Texture filtering mode */ + bool v_clamp :1; /* 15 */ /**< Clamp V to 1.0 */ + bool u_clamp :1; /* 16 */ /**< Clamp U to 1.0 */ + bool v_flip :1; /* 17 */ /**< Flip V after 1.0 */ + bool u_flip :1; /* 18 */ /**< Flip U after 1.0 */ + bool txralpha_dis :1; /* 19 */ /**< Disable alpha channel in textures */ + bool alpha :1; /* 20 */ /**< Enable alpha channel in vertex colors */ + bool fog_clamp :1; /* 21 */ /**< Enable fog clamping */ + pvr_fog_type_t fog_type :2; /* 23-22 */ /**< Select fog type */ + bool blend_dst_acc2 :1; /* 24 */ /**< Blend to the 2nd accumulation buffer */ + bool blend_src_acc2 :1; /* 25 */ /**< Blend from the 2nd accumulation buffer */ + pvr_blend_mode_t blend_dst :3; /* 28-26 */ /**< Blend mode for the background */ + pvr_blend_mode_t blend_src :3; /* 31-29 */ /**< Blend mode for the foreground */ +} pvr_poly_hdr_mode2_t; /** \brief PVR header mode3 This structure contains all the fields for the mode3 parameter of PVR headers. */ -struct pvr_poly_hdr_mode3 { - pvr_txr_ptr_t txr_base :25; /* 24-0 */ /**< Pre-processed texture address */ - bool x32stride :1; /* 25 */ /**< Set if texture stride is multiple of 32 */ - bool nontwiddled :1; /* 26 */ /**< Set if texture is not twiddled */ - enum pvr_pixel_mode pixel_mode :3; /* 29-27 */ /**< Select the texture's pixel format */ - bool vq_en :1; /* 30 */ /**< Set if the texture is VQ encoded */ - bool mipmap_en :1; /* 31 */ /**< Enable mipmaps */ -}; +typedef struct pvr_poly_hdr_mode3 { + pvr_txr_ptr_t txr_base :25; /* 24-0 */ /**< Pre-processed texture address */ + bool x32stride :1; /* 25 */ /**< Set if texture stride is multiple of 32 */ + bool nontwiddled :1; /* 26 */ /**< Set if texture is not twiddled */ + pvr_pixel_mode_t pixel_mode :3; /* 29-27 */ /**< Select the texture's pixel format */ + bool vq_en :1; /* 30 */ /**< Set if the texture is VQ encoded */ + bool mipmap_en :1; /* 31 */ /**< Enable mipmaps */ +} pvr_poly_hdr_mode3_t; /** \brief PVR polygon header. @@ -301,50 +306,55 @@ struct pvr_poly_hdr_mode3 { */ typedef __attribute__((aligned(32))) struct pvr_poly_hdr { union { - uint32_t cmd; /**< Raw access to cmd param */ - struct pvr_poly_hdr_cmd m0; /**< command parameters */ + uint32_t cmd; /**< Raw access to cmd param */ + pvr_poly_hdr_cmd_t m0; /**< command parameters */ }; union { - uint32_t mode1; /**< Raw access to mode1 param */ - struct pvr_poly_hdr_mode1 m1; /**< mode1 parameters */ + uint32_t mode1; /**< Raw access to mode1 param */ + pvr_poly_hdr_mode1_t m1; /**< mode1 parameters */ }; union { - uint32_t mode2; /**< Raw access to mode2 param */ - uint32_t mode2_0; /**< Legacy name */ - struct pvr_poly_hdr_mode2 m2; /**< mode2 parameters (modifiers: outside volume) */ + uint32_t mode2; /**< Raw access to mode2 param */ + uint32_t mode2_0; /**< Legacy name */ + pvr_poly_hdr_mode2_t m2; /**< mode2 parameters (modifiers: outside volume) */ }; union { - uint32_t mode3; /**< Raw access to mode3 param */ - uint32_t mode3_0; /**< Legacy name */ - struct pvr_poly_hdr_mode3 m3; /**< mode3 parameters (modifiers: outside volume) */ + uint32_t mode3; /**< Raw access to mode3 param */ + uint32_t mode3_0; /**< Legacy name */ + pvr_poly_hdr_mode3_t m3; /**< mode3 parameters (modifiers: outside volume) */ }; union { struct { /* Intensity color */ - float a; /**< Intensity color alpha */ - float r; /**< Intensity color red */ - float g; /**< Intensity color green */ - float b; /**< Intensity color blue */ + float a; /**< Intensity color alpha */ + float r; /**< Intensity color red */ + float g; /**< Intensity color green */ + float b; /**< Intensity color blue */ }; struct { /* Modifier volume */ union { struct { - uint32_t mode2_1; /**< Legacy name */ - uint32_t mode3_1; /**< Legacy name */ + uint32_t mode2_1; /**< Legacy name */ + uint32_t mode3_1; /**< Legacy name */ }; struct { - struct pvr_poly_hdr_mode2 m2; /**< mode2 parameters (modifiers: inside volume) */ - struct pvr_poly_hdr_mode3 m3; /**< mode3 parameters (modifiers: inside volume) */ - } modifier; + pvr_poly_hdr_mode2_t m2; /**< mode2 parameters (modifiers: inside volume) */ + pvr_poly_hdr_mode3_t m3; /**< mode3 parameters (modifiers: inside volume) */ + } modifier; /**< Modifier volume parameters */ }; - uint64_t __pad4; }; struct { /* Sprite */ - uint32_t argb; /**< 32-bit ARGB vertex color for sprites */ - uint32_t oargb; /**< 32-bit ARGB specular color for sprites */ - uint64_t __pad5; + uint32_t argb; /**< 32-bit ARGB vertex color for sprites */ + uint32_t oargb; /**< 32-bit ARGB specular color for sprites */ + }; + struct { + /* User clip area */ + uint32_t start_x; /**< Left (inclusive) border of user clip area */ + uint32_t start_y; /**< Top (inclusive) border of user clip area */ + uint32_t end_x; /**< Right (inclusive) border of user clip area */ + uint32_t end_y; /**< Bottom (inclusive) border of user clip area */ }; }; } pvr_poly_hdr_t; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-25 16:22:15
|
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 a22cbb2314db9344debb8f86be9b4cdc226aa897 (commit) from dbdbc9bf1472212954ee49dedd88f9f9129573f2 (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 a22cbb2314db9344debb8f86be9b4cdc226aa897 Author: QuzarDC <qu...@co...> Date: Thu May 22 15:01:40 2025 -0400 Correct various doxygen warnings/issues. In a few files group end markers were missing, in a few special characters needed escaping, and others had incorrect names in the doc vs the actual code. ----------------------------------------------------------------------- Summary of changes: include/kos/cdefs.h | 10 +++++----- kernel/arch/dreamcast/include/arch/irq.h | 10 +++++----- kernel/arch/dreamcast/include/arch/trap.h | 12 ++++++------ kernel/arch/dreamcast/include/dc/maple/keyboard.h | 2 +- kernel/arch/dreamcast/include/dc/perf_monitor.h | 3 +++ kernel/arch/dreamcast/include/dc/pvr/pvr_header.h | 3 +++ kernel/arch/dreamcast/include/dc/sound/sound.h | 4 ++-- kernel/arch/dreamcast/include/dc/sound/stream.h | 1 - 8 files changed, 25 insertions(+), 20 deletions(-) diff --git a/include/kos/cdefs.h b/include/kos/cdefs.h index e016a51b..dcb1f192 100644 --- a/include/kos/cdefs.h +++ b/include/kos/cdefs.h @@ -31,7 +31,7 @@ # warning Your GCC is too old. This will probably not work right. #endif -/** \defgroup system_attributes +/** \defgroup system_attributes Function Attribute Defines \brief Definitions for builtin attributes and compiler directives \ingroup system @@ -173,7 +173,7 @@ /** @} */ -/** \defgroup system_compat +/** \defgroup system_compat Language Compatibility Defines \brief Definitions for language features \ingroup system @@ -206,7 +206,7 @@ /** @} */ -/** \defgroup system_helpers +/** \defgroup system_helpers Helper Macros \brief General useful language macros \ingroup system @@ -222,7 +222,7 @@ by the compiler. This can only be used within a function. Example: - #include <stddef.h> + \#include <stddef.h> ... static char *foo_to_char(struct foo *foo) { @@ -244,7 +244,7 @@ by the compiler. This can be used in an expression: its value is "0". Example: - #define foo_to_char(foo) \ + \#define foo_to_char(foo) \ ((char *)(foo) \ + __build_assert_or_zero(offsetof(struct foo, string) == 0)) diff --git a/kernel/arch/dreamcast/include/arch/irq.h b/kernel/arch/dreamcast/include/arch/irq.h index 3fcb4752..f4858bd5 100644 --- a/kernel/arch/dreamcast/include/arch/irq.h +++ b/kernel/arch/dreamcast/include/arch/irq.h @@ -1,13 +1,13 @@ /* KallistiOS ##version## - arch/dreamcast/include/irq.h + arch/dreamcast/include/arch/irq.h Copyright (C) 2000-2001 Megan Potter Copyright (C) 2024 Paul Cercueil Copyright (C) 2024 Falco Girgis */ -/** \file +/** \file arch/irq.h \brief Interrupt and exception handling. \ingroup irqs @@ -57,7 +57,7 @@ __BEGIN_DECLS @{ */ -/** \defgroup Context +/** \defgroup irq_context Context \brief Thread execution state and accessors This API includes the structure and accessors for a @@ -437,7 +437,7 @@ typedef struct irq_cb { Passing a NULL value for hnd will remove the current handler, if any. \param code The IRQ type to set the handler for - (see \ref irq_exception_codes). + (see #irq_t). \param hnd A pointer to a procedure to handle the exception. \param data A pointer that will be passed along to the callback. @@ -480,7 +480,7 @@ irq_cb_t irq_get_handler(irq_t code); \retval 0 On success (no error conditions defined). */ -int irq_set_global_handler(irq_handler handler, void *data); +int irq_set_global_handler(irq_handler hnd, void *data); /** Get the global exception handler. diff --git a/kernel/arch/dreamcast/include/arch/trap.h b/kernel/arch/dreamcast/include/arch/trap.h index 4bbf05a6..e21c9003 100644 --- a/kernel/arch/dreamcast/include/arch/trap.h +++ b/kernel/arch/dreamcast/include/arch/trap.h @@ -5,7 +5,7 @@ */ -/** \file +/** \file arch/trap.h \brief Interrupt and exception handling. \ingroup traps @@ -59,15 +59,15 @@ typedef uint8_t trapa_t; /** The type of a TRAPA handler - \param trap The IRQ that caused the handler to be called. + \param code The IRQ that caused the handler to be called. \param context The CPU's context. \param data Arbitrary userdata associated with the handler. */ -typedef void (*trapa_handler)(trapa_t trap, irq_context_t *context, void *data); +typedef void (*trapa_handler)(trapa_t code, irq_context_t *context, void *data); /** Set or remove a handler for a trapa code. - \param trap The value passed to the trapa opcode. + \param code The value passed to the trapa opcode. \param hnd A pointer to the procedure to handle the trap. \param data A pointer that will be passed along to the callback. @@ -75,7 +75,7 @@ typedef void (*trapa_handler)(trapa_t trap, irq_context_t *context, void *data); \sa trapa_get_handler() */ -int trapa_set_handler(trapa_t trap, trapa_handler hnd, void *data); +int trapa_set_handler(trapa_t code, trapa_handler hnd, void *data); /** Get an existing TRAPA handler. @@ -87,7 +87,7 @@ int trapa_set_handler(trapa_t trap, trapa_handler hnd, void *data); \sa trapa_set_handler() */ -trapa_handler trapa_get_handler(trapa_t trap, void **data); +trapa_handler trapa_get_handler(trapa_t code, void **data); /** @} */ diff --git a/kernel/arch/dreamcast/include/dc/maple/keyboard.h b/kernel/arch/dreamcast/include/dc/maple/keyboard.h index ea9862b7..aa0dbdfa 100644 --- a/kernel/arch/dreamcast/include/dc/maple/keyboard.h +++ b/kernel/arch/dreamcast/include/dc/maple/keyboard.h @@ -247,7 +247,7 @@ typedef enum __packed kbd_key { KBD_KEY_QUOTE = 0x34, /**< \brief " key */ KBD_KEY_TILDE = 0x35, /**< \brief ~ key */ KBD_KEY_COMMA = 0x36, /**< \brief , key */ - KBD_KEY_PERIOD = 0x37, /**< \brief . key */ + KBD_KEY_PERIOD = 0x37, /**< \brief \. key */ KBD_KEY_SLASH = 0x38, /**< \brief Slash key */ KBD_KEY_CAPSLOCK = 0x39, /**< \brief Caps Lock key */ KBD_KEY_F1 = 0x3a, /**< \brief F1 key */ diff --git a/kernel/arch/dreamcast/include/dc/perf_monitor.h b/kernel/arch/dreamcast/include/dc/perf_monitor.h index 20617623..8f43d032 100644 --- a/kernel/arch/dreamcast/include/dc/perf_monitor.h +++ b/kernel/arch/dreamcast/include/dc/perf_monitor.h @@ -115,5 +115,8 @@ void perf_monitor_exit(void); */ void perf_monitor_print(FILE *f); +/** @} */ + __END_DECLS + #endif /* __KOS_PERF_MONITOR_H */ diff --git a/kernel/arch/dreamcast/include/dc/pvr/pvr_header.h b/kernel/arch/dreamcast/include/dc/pvr/pvr_header.h index c8f6326c..255bec46 100644 --- a/kernel/arch/dreamcast/include/dc/pvr/pvr_header.h +++ b/kernel/arch/dreamcast/include/dc/pvr/pvr_header.h @@ -351,5 +351,8 @@ typedef __attribute__((aligned(32))) struct pvr_poly_hdr { _Static_assert(sizeof(pvr_poly_hdr_t) == 32, "Invalid header size"); +/** @} */ + __END_DECLS + #endif /* __DC_PVR_PVR_HEADER_H */ diff --git a/kernel/arch/dreamcast/include/dc/sound/sound.h b/kernel/arch/dreamcast/include/dc/sound/sound.h index 963bf05f..8d02693d 100644 --- a/kernel/arch/dreamcast/include/dc/sound/sound.h +++ b/kernel/arch/dreamcast/include/dc/sound/sound.h @@ -222,7 +222,7 @@ void snd_adpcm_split(uint32_t *data, uint32_t *left, uint32_t *right, size_t siz This function returns actual the channel position that stores in SPU memory and updated by the SPU firmware. - \param chn The channel to retrieve position. + \param ch The channel to retrieve position. \return Last channel position in samples. */ @@ -233,7 +233,7 @@ uint16_t snd_get_pos(unsigned int ch); This function returns actual the channel playback state that stores in AICA registers directly. - \param chn The channel to check. + \param ch The channel to check. \return True if the channel is playing. */ diff --git a/kernel/arch/dreamcast/include/dc/sound/stream.h b/kernel/arch/dreamcast/include/dc/sound/stream.h index bcca4a06..851e65b4 100644 --- a/kernel/arch/dreamcast/include/dc/sound/stream.h +++ b/kernel/arch/dreamcast/include/dc/sound/stream.h @@ -194,7 +194,6 @@ void snd_stream_filter_remove(snd_stream_hnd_t hnd, This function has no effect. The stream is prefilled on start. This is deprecated and should be removed if used. - \param hnd Param. */ static const int __snd_stream_prefill __depr("snd_stream_prefill has no effect and should be removed") = 0; #define snd_stream_prefill(x) ((void)__snd_stream_prefill) hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-24 14:38: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 pseudo Operating System for the Dreamcast.". The branch, master has been updated via dbdbc9bf1472212954ee49dedd88f9f9129573f2 (commit) from 7bbff2ddd5b553ed9656ad856992fd3e4aa33dc7 (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 dbdbc9bf1472212954ee49dedd88f9f9129573f2 Author: QuzarDC <qu...@co...> Date: Sat May 24 00:39:37 2025 -0400 Correct logical error in snd_stream double init protection. It was exactly backwards and never could have worked. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/sound/snd_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 6275f2dd..76d9c7c1 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -323,7 +323,7 @@ int snd_stream_init(void) { int snd_stream_init_ex(int channels, size_t buffer_size) { - if(!sep_buffer[0]) { + if(sep_buffer[0]) { dbglog(DBG_ERROR, "snd_stream_init_ex(): already initialized\n"); return -1; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-23 22:48:56
|
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 7bbff2ddd5b553ed9656ad856992fd3e4aa33dc7 (commit) from 35d77329f77d75bf74343614fede778fea026ec9 (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 7bbff2ddd5b553ed9656ad856992fd3e4aa33dc7 Author: darc <da...@pr...> Date: Fri May 23 14:57:59 2025 -0500 environ_base.sh: Source environ_dreamcast.sh later The $KOS_SH4_PRECISION check is dependent on $KOS_CC being established, so move the sourcing of environ_dreamcast.sh after compiler paths are set. ----------------------------------------------------------------------- Summary of changes: environ_base.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/environ_base.sh b/environ_base.sh index 092d366f..cd2fcf62 100644 --- a/environ_base.sh +++ b/environ_base.sh @@ -14,9 +14,6 @@ fi # Arch kernel folder. export KOS_ARCH_DIR="${KOS_BASE}/kernel/arch/${KOS_ARCH}" -# Pull in the arch environ file. -. ${KOS_BASE}/environ_${KOS_ARCH}.sh - # Add the compiler bins dir to the path if it is not already. if ! expr ":$PATH:" : ".*:${KOS_CC_BASE}/bin:.*" > /dev/null ; then export PATH="${PATH}:${KOS_CC_BASE}/bin" @@ -48,6 +45,10 @@ export KOS_LD="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-ld" export KOS_RANLIB="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-gcc-ranlib" export KOS_STRIP="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-strip" export KOS_SIZE="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-size" + +# Pull in the arch environ file. +. ${KOS_BASE}/environ_${KOS_ARCH}.sh + export KOS_CFLAGS="${KOS_CFLAGS} ${KOS_INC_PATHS} -D_arch_${KOS_ARCH} -D_arch_sub_${KOS_SUBARCH} -Wall -g" export KOS_CPPFLAGS="${KOS_CPPFLAGS} ${KOS_INC_PATHS_CPP}" hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-23 02:09:21
|
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 35d77329f77d75bf74343614fede778fea026ec9 (commit) via c2327bd77f36f98ba02d7e17eb3b6dccdf6ba9c1 (commit) from 138477b71b164d466023a29e316631f3e0bfcaef (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 35d77329f77d75bf74343614fede778fea026ec9 Author: QuzarDC <qu...@co...> Date: Thu May 22 21:54:28 2025 -0400 Remove double-init of streams in multi-stream example. commit c2327bd77f36f98ba02d7e17eb3b6dccdf6ba9c1 Author: QuzarDC <qu...@co...> Date: Thu May 22 21:50:32 2025 -0400 Prevent double-init of snd_stream. Without this protection, there would be a memory leak caused by separation buffers being allocated multiple times. ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/sound/multi-stream/main.c | 1 - kernel/arch/dreamcast/sound/snd_stream.c | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/dreamcast/sound/multi-stream/main.c b/examples/dreamcast/sound/multi-stream/main.c index 4758bfab..2635afed 100644 --- a/examples/dreamcast/sound/multi-stream/main.c +++ b/examples/dreamcast/sound/multi-stream/main.c @@ -28,7 +28,6 @@ int main(int argc, char **argv) { vid_set_mode(DM_640x480, PM_RGB555); // Initialize sound system and WAV - snd_stream_init(); wav_init(); wav_stream_hnd_t faucet = wav_create("/rd/faucet.wav", LOOP); diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 7f51a9f4..6275f2dd 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -322,6 +322,12 @@ int snd_stream_init(void) { } int snd_stream_init_ex(int channels, size_t buffer_size) { + + if(!sep_buffer[0]) { + dbglog(DBG_ERROR, "snd_stream_init_ex(): already initialized\n"); + return -1; + } + max_channels = channels; if(buffer_size > 0) { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-23 00:07:29
|
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 138477b71b164d466023a29e316631f3e0bfcaef (commit) from f6f303f21187602e2783b64295c73d6650c8c17c (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 138477b71b164d466023a29e316631f3e0bfcaef Author: QuzarDC <qu...@co...> Date: Tue May 20 18:23:58 2025 -0400 Add missing DECLS to pthreads and sys headers. ----------------------------------------------------------------------- Summary of changes: addons/libpthread/pthread-internal.h | 5 +++++ include/sys/_pthreadtypes.h | 5 +++++ include/sys/lock.h | 5 +++++ include/sys/stdio.h | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/addons/libpthread/pthread-internal.h b/addons/libpthread/pthread-internal.h index 9a3b3b2e..c0b457cb 100644 --- a/addons/libpthread/pthread-internal.h +++ b/addons/libpthread/pthread-internal.h @@ -7,6 +7,9 @@ #ifndef __PTHREAD_INTERNAL_H #define __PTHREAD_INTERNAL_H +#include <sys/cdefs.h> +__BEGIN_DECLS + #define __PTHREAD_HAVE_ATTR_TYPE 1 #define __PTHREAD_HAVE_MUTEX_TYPE 1 #define __PTHREAD_HAVE_COND_TYPE 1 @@ -81,4 +84,6 @@ STATIC_ASSERT(__PTHREAD_BARRIER_SIZE == THD_BARRIER_SIZE) #undef STATIC_ASSERT +__END_DECLS + #endif /* !__PTHREAD_INTERNAL_H */ diff --git a/include/sys/_pthreadtypes.h b/include/sys/_pthreadtypes.h index 38291f96..67d6166d 100644 --- a/include/sys/_pthreadtypes.h +++ b/include/sys/_pthreadtypes.h @@ -8,6 +8,9 @@ #ifndef __SYS_PTHREADTYPES_H #define __SYS_PTHREADTYPES_H +#include <sys/cdefs.h> +__BEGIN_DECLS + typedef unsigned long int pthread_t; typedef struct pthread_mutexattr_t { @@ -100,4 +103,6 @@ typedef union pthread_barrier_t { #undef __PTHREAD_BARRIER_SIZE #endif /* !__PTHREAD_HAVE_BARRIER_TYPE */ +__END_DECLS + #endif /* !__SYS_PTHREADTYPES_H */ diff --git a/include/sys/lock.h b/include/sys/lock.h index eec60041..66529899 100644 --- a/include/sys/lock.h +++ b/include/sys/lock.h @@ -19,6 +19,9 @@ #ifndef __SYS_LOCK_H__ #define __SYS_LOCK_H__ +#include <sys/cdefs.h> +__BEGIN_DECLS + /** \cond */ typedef struct { @@ -63,4 +66,6 @@ void __newlib_lock_release_recursive(__newlib_recursive_lock_t*); /** \endcond */ +__END_DECLS + #endif /* __SYS_LOCK_H__ */ diff --git a/include/sys/stdio.h b/include/sys/stdio.h index c186d86c..dee114a5 100644 --- a/include/sys/stdio.h +++ b/include/sys/stdio.h @@ -8,6 +8,9 @@ #ifndef _NEWLIB_STDIO_H #define _NEWLIB_STDIO_H +#include <sys/cdefs.h> +__BEGIN_DECLS + // Cribbed from newlib sys/stdio.h /* Internal locking macros, used to protect stdio functions. In the @@ -31,4 +34,6 @@ #include <stdarg.h> #include <kos/fs.h> +__END_DECLS + #endif /* _NEWLIB_STDIO_H */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-22 14:05: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 f6f303f21187602e2783b64295c73d6650c8c17c (commit) from f643745ca6342e44612a115f7fe28b0a95435a6a (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 f6f303f21187602e2783b64295c73d6650c8c17c Author: Paul Cercueil <pa...@cr...> Date: Thu May 22 11:08:02 2025 +0200 pvr: Get rid of dummy fields in prim headers Those dummy fields were added to the various primitive headers to make sure that they had the correct size. Now that all primitive headers use the same pvr_poly_hdr_t type, which has the correct size even with the dummy fields removed, all the dummy fields can be removed. Note that the driver code was setting them either to 0 or 0xffff'ffff, for some reason. Given that this was written almost 25 years ago and everything seems to work just fine without writing those fields, it seems safe to drop them. Dropping them also fixes #1034, which happened since the switch to the common pvr_poly_hdr_t type, and was caused by the dummy fields moving around (as prior to that, the d1/d2 fields in a pvr_poly_mod_hdr were at different offsets than the d1/d2 fields in a pvr_poly_hdr, for instance). Signed-off-by: Paul Cercueil <pa...@cr...> ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/pvr/pvr_misc.c | 4 ---- kernel/arch/dreamcast/hardware/pvr/pvr_prim.c | 16 ++-------------- kernel/arch/dreamcast/include/dc/pvr/pvr_header.h | 8 -------- 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_misc.c b/kernel/arch/dreamcast/hardware/pvr/pvr_misc.c index 91e604d8..00937aca 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_misc.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_misc.c @@ -264,10 +264,6 @@ void pvr_blank_polyhdr_buf(int type, pvr_poly_hdr_t * poly) { /* Put in the list type */ poly->cmd = FIELD_PREP(PVR_TA_CMD_TYPE, type) | 0x80840012; - - /* Fill in dummy values */ - poly->d1 = poly->d2 = poly->d3 = poly->d4 = 0xffffffff; - } pvr_ptr_t pvr_get_front_buffer(void) { diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_prim.c b/kernel/arch/dreamcast/hardware/pvr/pvr_prim.c index 73d6e38a..45da95f2 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_prim.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_prim.c @@ -96,16 +96,9 @@ void pvr_poly_compile(pvr_poly_hdr_t *dst, const pvr_poly_cxt_t *src) { if(src->fmt.modifier && src->gen.modifier_mode) { /* If we're affected by a modifier volume, silently promote the header to the one that is affected by a modifier volume. */ - dst->d1 = mode2; - dst->d2 = mode3; + dst->mode2_1 = mode2; + dst->mode3_1 = mode3; } - else { - dst->d1 = 0xffffffff; - dst->d2 = 0xffffffff; - } - - dst->d3 = 0xffffffff; - dst->d4 = 0xffffffff; } /* Create a colored polygon context with parameters similar to @@ -353,8 +346,6 @@ void pvr_mod_compile(pvr_mod_hdr_t *dst, pvr_list_t list, uint32 mode, dst->mode1 = FIELD_PREP(PVR_TA_PM1_MODIFIERINST, mode) | FIELD_PREP(PVR_TA_PM1_CULLING, cull); - - dst->d1 = dst->d2 = dst->d3 = dst->d4 = dst->d5 = dst->d6 = 0; } /* Compile a polygon context into a polygon header that is affected by @@ -467,9 +458,6 @@ void pvr_poly_mod_compile(pvr_poly_mod_hdr_t *dst, const pvr_poly_cxt_t *src) { dst->mode2_1 = mode2; dst->mode3_1 = mode3; - - dst->d1 = 0xffffffff; - dst->d2 = 0xffffffff; } /* Create a colored polygon context for polygons affected by modifier volumes */ diff --git a/kernel/arch/dreamcast/include/dc/pvr/pvr_header.h b/kernel/arch/dreamcast/include/dc/pvr/pvr_header.h index f7d80e6c..c8f6326c 100644 --- a/kernel/arch/dreamcast/include/dc/pvr/pvr_header.h +++ b/kernel/arch/dreamcast/include/dc/pvr/pvr_header.h @@ -311,22 +311,14 @@ typedef __attribute__((aligned(32))) struct pvr_poly_hdr { union { uint32_t mode2; /**< Raw access to mode2 param */ uint32_t mode2_0; /**< Legacy name */ - uint32_t d5; /**< Dummy value 5 */ struct pvr_poly_hdr_mode2 m2; /**< mode2 parameters (modifiers: outside volume) */ }; union { uint32_t mode3; /**< Raw access to mode3 param */ uint32_t mode3_0; /**< Legacy name */ - uint32_t d6; /**< Dummy value 6 */ struct pvr_poly_hdr_mode3 m3; /**< mode3 parameters (modifiers: outside volume) */ }; union { - struct { - uint32_t d1; /**< Dummy value 1 */ - uint32_t d2; /**< Dummy value 2 */ - uint32_t d3; /**< Dummy value 3 */ - uint32_t d4; /**< Dummy value 4 */ - }; struct { /* Intensity color */ float a; /**< Intensity color alpha */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-22 14:02:46
|
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 f643745ca6342e44612a115f7fe28b0a95435a6a (commit) from f4657b17a449c13502114404a53835c38de5c3a5 (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 f643745ca6342e44612a115f7fe28b0a95435a6a Author: darc <da...@pr...> Date: Wed May 21 16:27:14 2025 -0500 libpthread: Add support for pthread_getschedparam() and pthread_setschedparam() ----------------------------------------------------------------------- Summary of changes: addons/libpthread/Makefile | 3 ++- addons/libpthread/pthread_getschedparam.c | 31 +++++++++++++++++++++++++++++++ addons/libpthread/pthread_setschedparam.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 addons/libpthread/pthread_getschedparam.c create mode 100644 addons/libpthread/pthread_setschedparam.c diff --git a/addons/libpthread/Makefile b/addons/libpthread/Makefile index 54f2879a..a50f2c46 100644 --- a/addons/libpthread/Makefile +++ b/addons/libpthread/Makefile @@ -66,6 +66,7 @@ OBJS += pthread_barrierattr_init.o pthread_barrierattr_destroy.o \ # Misc. OBJS += pthread_atfork.o pthread_getsetconcurrency.o pthread_yield.o \ - pthread_setprio.o pthread_getprio.o + pthread_setprio.o pthread_getprio.o \ + pthread_setschedparam.o pthread_getschedparam.o include $(KOS_BASE)/addons/Makefile.prefab diff --git a/addons/libpthread/pthread_getschedparam.c b/addons/libpthread/pthread_getschedparam.c new file mode 100644 index 00000000..30da35a2 --- /dev/null +++ b/addons/libpthread/pthread_getschedparam.c @@ -0,0 +1,31 @@ +/* KallistiOS ##version## + + pthread_getschedparam.c + Copyright (C) 2025 Eric Fradella +*/ + +#include "pthread-internal.h" +#include <pthread.h> +#include <sched.h> +#include <errno.h> +#include <kos/thread.h> + +int pthread_getschedparam(pthread_t thread, int *__RESTRICT policy, + struct sched_param *__RESTRICT param) { + kthread_t *thd = (kthread_t *)thread; + + if(!thd) + return EINVAL; + + if(!policy) + return EINVAL; + + if(!param) + return EFAULT; + + *policy = SCHED_RR; + + param->sched_priority = (int)thd_get_prio(thd); + + return 0; +} diff --git a/addons/libpthread/pthread_setschedparam.c b/addons/libpthread/pthread_setschedparam.c new file mode 100644 index 00000000..4f5ae223 --- /dev/null +++ b/addons/libpthread/pthread_setschedparam.c @@ -0,0 +1,30 @@ +/* KallistiOS ##version## + + pthread_setschedparam.c + Copyright (C) 2025 Eric Fradella +*/ + +#include "pthread-internal.h" +#include <pthread.h> +#include <sched.h> +#include <errno.h> +#include <kos/thread.h> + +int pthread_setschedparam(pthread_t thread, int policy, + const struct sched_param *param) { + kthread_t *thd = (kthread_t *)thread; + + if(!thd) + return EINVAL; + + if(policy != SCHED_RR) + return EINVAL; + + if(!param) + return EFAULT; + + if(thd_set_prio(thd, (prio_t)param->sched_priority)) + return EINVAL; + + return 0; +} hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-22 13:57:40
|
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 f4657b17a449c13502114404a53835c38de5c3a5 (commit) from 4d8a1165d929359cca0a6c91f9538cf0e71064f8 (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 f4657b17a449c13502114404a53835c38de5c3a5 Author: darc <da...@pr...> Date: Wed May 21 14:29:00 2025 -0500 Add additional check for m4-single ABI support to fix DreamSDK issues ----------------------------------------------------------------------- Summary of changes: environ_dreamcast.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/environ_dreamcast.sh b/environ_dreamcast.sh index ced09d2f..cacecaa4 100644 --- a/environ_dreamcast.sh +++ b/environ_dreamcast.sh @@ -14,10 +14,12 @@ fi # Default the SH4 floating-point precision if it isn't already set. # m4-single is used if supported by the current toolchain, otherwise # m4-single-only is used as a fallback option. -if [ -z "${KOS_SH4_PRECISION}" ] ; then +if [ -z "${KOS_SH4_PRECISION}" ] || [ "${KOS_SH4_PRECISION}" = "-m4-single" ]; then if echo 'int main(){}' | ${KOS_CC} -x c -c -o /dev/null - -m4-single 2>/dev/null; then export KOS_SH4_PRECISION="-m4-single" else + echo "WARNING: Toolchain does not support m4-single ABI -- falling back to m4-single-only ABI." >&2 + echo "Please recompile the toolchain to enable support for the m4-single ABI." >&2 export KOS_SH4_PRECISION="-m4-single-only" fi fi hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-22 13:53:00
|
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 4d8a1165d929359cca0a6c91f9538cf0e71064f8 (commit) via 67032d5dd373b4614a16bf82814e7be11aa64240 (commit) from 79f8d37af06e725cfe5927936240a36b87cba274 (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 4d8a1165d929359cca0a6c91f9538cf0e71064f8 Author: kapodamy <168...@us...> Date: Mon May 5 19:28:21 2025 -0300 Fix build warnings in netcfg, snd_sfxmgr, vqenc * update netcfg.c: add type cast. * update snd_sfxmgr.c: change type int to uint32_t. * update vqenc.c: use "PRIxPTR" print formatter. commit 67032d5dd373b4614a16bf82814e7be11aa64240 Author: kapodamy <168...@us...> Date: Sat Apr 19 21:54:47 2025 -0300 Update irq.h and g2bus.h files change param type of __irq_scoped_cleanup() function change g2_ctx irq_state field type (again) ----------------------------------------------------------------------- Summary of changes: addons/libkosutils/netcfg.c | 2 +- kernel/arch/dreamcast/include/arch/irq.h | 4 ++-- kernel/arch/dreamcast/include/dc/g2bus.h | 2 +- kernel/arch/dreamcast/sound/snd_sfxmgr.c | 4 ++-- utils/vqenc/vqenc.c | 3 ++- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/addons/libkosutils/netcfg.c b/addons/libkosutils/netcfg.c index 39a78613..3d5cd963 100644 --- a/addons/libkosutils/netcfg.c +++ b/addons/libkosutils/netcfg.c @@ -44,7 +44,7 @@ void netcfg_vmuify(const char *filename_in, const char *filename_out) { pkg.icon_cnt = 1; pkg.icon_anim_speed = 1; memcpy(&pkg.icon_pal[0], netcfg_icon, 32); - pkg.icon_data = netcfg_icon + 32; + pkg.icon_data = (uint8_t *)(netcfg_icon + 32); pkg.eyecatch_type = VMUPKG_EC_NONE; pkg.data_len = fs_total(fd); pkg.data = buf; diff --git a/kernel/arch/dreamcast/include/arch/irq.h b/kernel/arch/dreamcast/include/arch/irq.h index fc5c53e8..3fcb4752 100644 --- a/kernel/arch/dreamcast/include/arch/irq.h +++ b/kernel/arch/dreamcast/include/arch/irq.h @@ -510,12 +510,12 @@ int irq_init(void); */ void irq_shutdown(void); -static inline void __irq_scoped_cleanup(int *state) { +static inline void __irq_scoped_cleanup(irq_mask_t *state) { irq_restore(*state); } #define ___irq_disable_scoped(l) \ - int __scoped_irq_##l __attribute__((cleanup(__irq_scoped_cleanup))) = irq_disable() + irq_mask_t __scoped_irq_##l __attribute__((cleanup(__irq_scoped_cleanup))) = irq_disable() #define __irq_disable_scoped(l) ___irq_disable_scoped(l) /** \endcond */ diff --git a/kernel/arch/dreamcast/include/dc/g2bus.h b/kernel/arch/dreamcast/include/dc/g2bus.h index 8b449aab..248b5a1c 100644 --- a/kernel/arch/dreamcast/include/dc/g2bus.h +++ b/kernel/arch/dreamcast/include/dc/g2bus.h @@ -140,7 +140,7 @@ void g2_dma_shutdown(void); is used in with g2_lock() and g2_unlock(). */ typedef struct { - int irq_state; /** \brief IRQ state when entering a G2 critical block */ + irq_mask_t irq_state; /** \brief IRQ state when entering a G2 critical block */ } g2_ctx_t; /* Internal constants to access suspend registers for G2 DMA. They are not meant for diff --git a/kernel/arch/dreamcast/sound/snd_sfxmgr.c b/kernel/arch/dreamcast/sound/snd_sfxmgr.c index 31f974a9..6fa406d2 100644 --- a/kernel/arch/dreamcast/sound/snd_sfxmgr.c +++ b/kernel/arch/dreamcast/sound/snd_sfxmgr.c @@ -771,7 +771,7 @@ int snd_sfx_play_ex(sfx_play_data_t *data) { } } - int size; + uint32_t size; snd_effect_t *t = (snd_effect_t *)data->idx; AICA_CMDSTR_CHANNEL(tmp, cmd, chan); @@ -790,7 +790,7 @@ int snd_sfx_play_ex(sfx_play_data_t *data) { chan->loop = data->loop; chan->loopstart = data->loopstart; chan->loopend = data->loopend ? data->loopend : size; - chan->freq = data->freq > 0 ? data->freq : t->rate; + chan->freq = data->freq > 0 ? (uint32_t)data->freq : t->rate; chan->vol = data->vol; if(!t->stereo) { diff --git a/utils/vqenc/vqenc.c b/utils/vqenc/vqenc.c index 5924da41..4f487ae9 100644 --- a/utils/vqenc/vqenc.c +++ b/utils/vqenc/vqenc.c @@ -18,6 +18,7 @@ #include <math.h> #include <unistd.h> #include <errno.h> +#include <inttypes.h> #include "get_image.h" #include "vq_internal.h" #include "vq_types.h" @@ -572,7 +573,7 @@ static fquad_t *create_downscaled_map(int res, fquad_t *oneup) { fquad_t *q, *larger, tmp; if(use_debug) { - printf("create_downscaled_map(%d %lx)\n", res, (uintptr_t)oneup); + printf("create_downscaled_map(%d %" PRIxPTR ")\n", res, (uintptr_t)oneup); } /* each quad in the lower resolution is an average of hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-22 13:51:22
|
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 79f8d37af06e725cfe5927936240a36b87cba274 (commit) via b01d552087a846e543e69bd1a6cd477f4b15936c (commit) from 40acafbb21bfaf6e75fa06df75aaf762079d2dd0 (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 79f8d37af06e725cfe5927936240a36b87cba274 Author: QuzarDC <qu...@co...> Date: Fri May 16 21:17:25 2025 -0400 Deprecate `snd_stream_prefill()` The function was only capable of possibly crashing, otherwise would have no effect and be repeated at the call of start. Left an inline compatibility replacement. commit b01d552087a846e543e69bd1a6cd477f4b15936c Author: QuzarDC <qu...@co...> Date: Tue May 13 17:25:46 2025 -0400 Prevent `snd_stream_prefill` from crashing before `snd_stream_start`. `snd_stream_fill` (and thus prefill) is currently not able to be run before the first call to `snd_stream_start` as the number of channels is undefined at the time. This behavior worked partially prior to #346 as the logic for most of the code was `if(channels == 2) ... else{}` so channels being zero didn't cause issues. What I've done is added assert checks to the fill function and a short-circuit in prefill to prevent crashes in these circumstances. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/exports-naomi.txt | 1 - kernel/arch/dreamcast/exports-pristine.txt | 1 - kernel/arch/dreamcast/include/dc/sound/stream.h | 10 ++++---- kernel/arch/dreamcast/sound/snd_stream.c | 33 +++++++++---------------- 4 files changed, 17 insertions(+), 28 deletions(-) diff --git a/kernel/arch/dreamcast/exports-naomi.txt b/kernel/arch/dreamcast/exports-naomi.txt index 2f1d5a17..326910cb 100644 --- a/kernel/arch/dreamcast/exports-naomi.txt +++ b/kernel/arch/dreamcast/exports-naomi.txt @@ -174,7 +174,6 @@ snd_stream_pan snd_stream_alloc snd_stream_destroy snd_stream_reinit -snd_stream_prefill snd_pcm16_split snd_pcm16_split_sq snd_pcm8_split diff --git a/kernel/arch/dreamcast/exports-pristine.txt b/kernel/arch/dreamcast/exports-pristine.txt index db35ee09..a6ff29e7 100644 --- a/kernel/arch/dreamcast/exports-pristine.txt +++ b/kernel/arch/dreamcast/exports-pristine.txt @@ -244,7 +244,6 @@ snd_stream_pan snd_stream_alloc snd_stream_destroy snd_stream_reinit -snd_stream_prefill snd_pcm16_split snd_pcm16_split_sq snd_pcm8_split diff --git a/kernel/arch/dreamcast/include/dc/sound/stream.h b/kernel/arch/dreamcast/include/dc/sound/stream.h index 50e32bee..bcca4a06 100644 --- a/kernel/arch/dreamcast/include/dc/sound/stream.h +++ b/kernel/arch/dreamcast/include/dc/sound/stream.h @@ -191,13 +191,13 @@ void snd_stream_filter_remove(snd_stream_hnd_t hnd, /** \brief Prefill the stream buffers. - This function prefills the stream buffers before starting it. This is - implicitly called by snd_stream_start(), so there's probably no good reason - to call this yourself. + This function has no effect. The stream is prefilled on start. + This is deprecated and should be removed if used. - \param hnd The stream to prefill buffers on. + \param hnd Param. */ -void snd_stream_prefill(snd_stream_hnd_t hnd); +static const int __snd_stream_prefill __depr("snd_stream_prefill has no effect and should be removed") = 0; +#define snd_stream_prefill(x) ((void)__snd_stream_prefill) /** \brief Initialize the stream system. diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 9e11de86..7f51a9f4 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -316,25 +316,6 @@ void snd_pcm16_split_sq(uint32_t *data, uintptr_t left, uintptr_t right, size_t g2_unlock(ctx); } - -/* Prefill buffers -- implicitly called by snd_stream_start() */ -void snd_stream_prefill(snd_stream_hnd_t hnd) { - strchan_t *stream; - - CHECK_HND(hnd); - stream = &streams[hnd]; - - if(!stream->get_data && !stream->req_data) { - return; - } - - snd_stream_fill(hnd, 0, stream->buffer_size / 2); - snd_stream_fill(hnd, stream->buffer_size / 2, stream->buffer_size / 2); - - /* Start playing from the beginning */ - stream->last_write_pos = 0; -} - /* Initialize stream system */ int snd_stream_init(void) { return snd_stream_init_ex(2, SND_STREAM_BUFFER_MAX); @@ -535,8 +516,12 @@ static void snd_stream_start_type(snd_stream_hnd_t hnd, uint32_t type, uint32_t } } - /* Prefill buffers */ - snd_stream_prefill(hnd); + /* As long as there's a way to get/request data, prefill buffers */ + snd_stream_fill(hnd, 0, streams[hnd].buffer_size / 2); + snd_stream_fill(hnd, streams[hnd].buffer_size / 2, streams[hnd].buffer_size / 2); + + /* Start playing from the beginning */ + streams[hnd].last_write_pos = 0; /* Make sure these are sync'd (and/or delayed) */ snd_sh4_to_aica_stop(); @@ -690,6 +675,12 @@ static size_t snd_stream_fill(snd_stream_hnd_t hnd, uint32_t offset, size_t size int got_bytes = 0; void *data = NULL; + /* The stream hasn't been initted or is invalid. */ + CHECK_HND(hnd); + + /* The stream has been initted but not allocated. */ + assert(chans != 0); + if(stream->req_data) { got_bytes = stream->req_data(hnd, (left | SPU_RAM_UNCACHED_BASE), hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-21 18:20:17
|
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 40acafbb21bfaf6e75fa06df75aaf762079d2dd0 (commit) from 07614ba6df19ea975310f41fcb4932dcbe8b7adc (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 40acafbb21bfaf6e75fa06df75aaf762079d2dd0 Author: darc <da...@pr...> Date: Wed May 21 13:01:25 2025 -0500 Fix warnings previously hidden behind ifdef guards ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/fs/fs_vmu.c | 2 +- kernel/fs/elf.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/kernel/arch/dreamcast/fs/fs_vmu.c b/kernel/arch/dreamcast/fs/fs_vmu.c index 7518d017..59ffc09c 100644 --- a/kernel/arch/dreamcast/fs/fs_vmu.c +++ b/kernel/arch/dreamcast/fs/fs_vmu.c @@ -520,7 +520,7 @@ static ssize_t vmu_write(void * hnd, const void *buffer, size_t cnt) { /* insert the data in buffer into fh->data at fh->loc */ if(__is_defined(VMUFS_DEBUG)) { - dbglog(DBG_KDEBUG, "VMUFS: adding %d bytes of data at loc %d (%d avail)\n", + dbglog(DBG_KDEBUG, "VMUFS: adding %d bytes of data at loc %ld (%ld avail)\n", cnt, fh->loc, fh->filesize * 512); } diff --git a/kernel/fs/elf.c b/kernel/fs/elf.c index c080f17a..2d40db4b 100644 --- a/kernel/fs/elf.c +++ b/kernel/fs/elf.c @@ -194,12 +194,12 @@ int elf_load(const char * fn, klibrary_t * shell, elf_prog_t * out) { for(i = 0; i < hdr->shnum; i++) { if(shdrs[i].flags & SHF_ALLOC) { if(shdrs[i].type == SHT_NOBITS) { - DBG((" setting %d bytes of zeros at %08x\n", + DBG((" setting %ld bytes of zeros at %08lx\n", shdrs[i].size, shdrs[i].addr)); memset(imgout + shdrs[i].addr, 0, shdrs[i].size); } else { - DBG((" copying %d bytes from %08x to %08x\n", + DBG((" copying %ld bytes from %08lx to %08lx\n", shdrs[i].size, shdrs[i].offset, shdrs[i].addr)); memcpy(imgout + shdrs[i].addr, img + shdrs[i].offset, @@ -232,7 +232,7 @@ int elf_load(const char * fn, klibrary_t * shell, elf_prog_t * out) { } /* Patch it in */ - DBG((" symbol '%s' patched to 0x%lx\n", + DBG((" symbol '%s' patched to 0x%x\n", (const char *)(symtab[i].name), sym->ptr)); symtab[i].value = sym->ptr; @@ -266,7 +266,7 @@ int elf_load(const char * fn, klibrary_t * shell, elf_prog_t * out) { sym = ELF32_R_SYM(relatab[j].info); if(symtab[sym].shndx == SHN_UNDEF) { - DBG((" Writing undefined RELA %08x(%08lx+%08lx) -> %08x\n", + DBG((" Writing undefined RELA %08lx(%08lx+%08lx) -> %08lx\n", symtab[sym].value + relatab[j].addend, symtab[sym].value, relatab[j].addend, @@ -278,7 +278,7 @@ int elf_load(const char * fn, klibrary_t * shell, elf_prog_t * out) { + relatab[j].addend; } else { - DBG((" Writing RELA %08x(%08x+%08x+%08x+%08x) -> %08x\n", + DBG((" Writing RELA %08lx(%08lx+%08lx+%08lx+%08lx) -> %08lx\n", vma + shdrs[symtab[sym].shndx].addr + symtab[sym].value + relatab[j].addend, vma, shdrs[symtab[sym].shndx].addr, symtab[sym].value, relatab[j].addend, vma + shdrs[sect].addr + relatab[j].offset)); @@ -317,7 +317,7 @@ int elf_load(const char * fn, klibrary_t * shell, elf_prog_t * out) { uint32 value = symtab[sym].value; if(sect == 1 && j < 5) { - DBG((" Writing undefined %s %08x -> %08x", + DBG((" Writing undefined %s %08lx -> %08lx", pcrel ? "PCREL" : "ABSREL", value, vma + shdrs[sect].addr + reltab[j].offset)); @@ -332,7 +332,7 @@ int elf_load(const char * fn, klibrary_t * shell, elf_prog_t * out) { += value; if(sect == 1 && j < 5) { - DBG(("(%08x)\n", *((uint32 *)(imgout + shdrs[sect].addr + reltab[j].offset)))); + DBG(("(%08lx)\n", *((uint32 *)(imgout + shdrs[sect].addr + reltab[j].offset)))); } } else { @@ -340,7 +340,7 @@ int elf_load(const char * fn, klibrary_t * shell, elf_prog_t * out) { + symtab[sym].value; if(sect == 1 && j < 5) { - DBG((" Writing %s %08x(%08x+%08x+%08x) -> %08x", + DBG((" Writing %s %08lx(%08lx+%08lx+%08lx) -> %08lx", pcrel ? "PCREL" : "ABSREL", value, vma, shdrs[symtab[sym].shndx].addr, symtab[sym].value, @@ -356,7 +356,7 @@ int elf_load(const char * fn, klibrary_t * shell, elf_prog_t * out) { += value; if(sect == 1 && j < 5) { - DBG(("(%08x)\n", *((uint32 *)(imgout + shdrs[sect].addr + reltab[j].offset)))); + DBG(("(%08lx)\n", *((uint32 *)(imgout + shdrs[sect].addr + reltab[j].offset)))); } } } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-21 17:44:01
|
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 07614ba6df19ea975310f41fcb4932dcbe8b7adc (commit) via 0249db7c24f94d5938fb78ab120c40211680823e (commit) via d816e5ebf989de54721ded90a7d86aba9684e89e (commit) via c00e94b5c26b25329ab439d386f7cd0be175a929 (commit) via d516a642d461a0ed4456252234225da1ff0c7a17 (commit) from 1a9179047ae8a8e449efdc45a57ed976a63419d3 (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 07614ba6df19ea975310f41fcb4932dcbe8b7adc Author: Paul Cercueil <pa...@cr...> Date: Tue May 20 21:42:30 2025 +0200 Un-hide code behind ifdef guards Hiding code behind ifdef guards has the nasty issue that the code is only seen by the compiler under a specific configuration. As time passes, the guarded code might become stale, causing some rarely used configurations to fail to build. This can be solved by using the __is_defined() macro to conditionally execute the code only if the given guard macro is defined. The difference is that the compiler will see the code, and report issues if it cannot build it, but ultimately drop it as dead code if the guard macro is not defined. Signed-off-by: Paul Cercueil <pa...@cr...> commit 0249db7c24f94d5938fb78ab120c40211680823e Author: Paul Cercueil <pa...@cr...> Date: Tue May 20 23:12:06 2025 +0200 Add missing <kos/dbglog.h> includes Under certain build conditions, the dbglog() was being used without the correct include, causing a build failure. Signed-off-by: Paul Cercueil <pa...@cr...> commit d816e5ebf989de54721ded90a7d86aba9684e89e Author: Paul Cercueil <pa...@cr...> Date: Tue May 20 23:10:42 2025 +0200 fs: Fix debug print in ELF code A debug print was referencing a struct field that does not exist. Signed-off-by: Paul Cercueil <pa...@cr...> commit c00e94b5c26b25329ab439d386f7cd0be175a929 Author: Paul Cercueil <pa...@cr...> Date: Tue May 20 21:40:23 2025 +0200 cdefs.h: Add __is_defined() macro This macro will resolve to a compile-time constant value of 1 (true) if the macro passed as argument resolves to 1, and will resolve to 0 (false) otherwise. Signed-off-by: Paul Cercueil <pa...@cr...> commit d516a642d461a0ed4456252234225da1ff0c7a17 Author: Paul Cercueil <pa...@cr...> Date: Tue May 20 21:39:22 2025 +0200 cdefs.h: Add __stringify() macro Just a simple macro to return a C string from the argument. Signed-off-by: Paul Cercueil <pa...@cr...> ----------------------------------------------------------------------- Summary of changes: include/kos/cdefs.h | 13 ++++ include/kos/version.h | 10 +-- kernel/arch/dreamcast/fs/fs_vmu.c | 27 +++---- .../dreamcast/hardware/maple/maple_init_shutdown.c | 27 ++++--- kernel/arch/dreamcast/hardware/maple/maple_irq.c | 31 ++++---- kernel/arch/dreamcast/hardware/maple/maple_queue.c | 15 ++-- kernel/arch/dreamcast/hardware/maple/maple_utils.c | 4 +- .../dreamcast/hardware/network/broadband_adapter.c | 44 ++++------- .../dreamcast/hardware/pvr/pvr_init_shutdown.c | 26 +++---- kernel/arch/dreamcast/hardware/pvr/pvr_irq.c | 56 +++++++------- kernel/arch/dreamcast/hardware/pvr/pvr_mem.c | 85 ++++++++++------------ kernel/arch/dreamcast/hardware/pvr/pvr_scene.c | 25 +++---- kernel/arch/dreamcast/include/dc/maple.h | 2 - kernel/arch/dreamcast/kernel/irq.c | 4 +- kernel/arch/dreamcast/kernel/stack.c | 11 ++- kernel/arch/dreamcast/sound/snd_mem.c | 46 ++++++------ kernel/fs/elf.c | 11 ++- kernel/libc/koslib/assert.c | 9 +-- 18 files changed, 210 insertions(+), 236 deletions(-) diff --git a/include/kos/cdefs.h b/include/kos/cdefs.h index 22ff1e16..e016a51b 100644 --- a/include/kos/cdefs.h +++ b/include/kos/cdefs.h @@ -277,6 +277,19 @@ #define _array_size_chk(arr) 0 #endif +/** \brief Create a string from the argument. + + \param arg The text to stringify. + */ +#define __stringify(arg) ""#arg + +/** \brief Check if a macro is defined to 1. + + \param macro The macro to check + \return 1 if the macro is defined to 1, 0 otherwise. + */ +#define __is_defined(macro) !__builtin_strcmp(__stringify(macro), "1") + /** @} */ #endif /* __KOS_CDEFS_H */ diff --git a/include/kos/version.h b/include/kos/version.h index 5fe98b1a..9b7e3baf 100644 --- a/include/kos/version.h +++ b/include/kos/version.h @@ -263,9 +263,9 @@ `major.minor.patch` */ #define KOS_VERSION_MAKE_STRING(major, minor, patch) \ - KOS_STRINGIFY(major) "." \ - KOS_STRINGIFY(minor) "." \ - KOS_STRINGIFY(patch) + __stringify(major) "." \ + __stringify(minor) "." \ + __stringify(patch) /** @} */ /** \name Version Checking @@ -381,10 +381,6 @@ (KOS_VERSION_MAKE_COMPARISON(major, minor, patch, >, version)) /** @} */ -/** \cond INTERNAL */ -#define KOS_STRINGIFY(str) #str -/** \endcond */ - /** @} */ #include <kos/cdefs.h> diff --git a/kernel/arch/dreamcast/fs/fs_vmu.c b/kernel/arch/dreamcast/fs/fs_vmu.c index f79cd7b8..7518d017 100644 --- a/kernel/arch/dreamcast/fs/fs_vmu.c +++ b/kernel/arch/dreamcast/fs/fs_vmu.c @@ -166,16 +166,17 @@ static vmu_fh_t *vmu_open_vmu_dir(void) { names[num][0] = p + 'a'; names[num][1] = u + '0'; num++; -#ifdef VMUFS_DEBUG - dbglog(DBG_KDEBUG, "vmu_open_vmu_dir: found memcard (%c%d)\n", 'a' + p, u); -#endif + + if(__is_defined(VMUFS_DEBUG)) { + dbglog(DBG_KDEBUG, "vmu_open_vmu_dir: found memcard (%c%d)\n", + 'a' + p, u); + } } } } -#ifdef VMUFS_DEBUG - dbglog(DBG_KDEBUG, "# of memcards found: %d\n", num); -#endif + if(__is_defined(VMUFS_DEBUG)) + dbglog(DBG_KDEBUG, "# of memcards found: %d\n", num); if(!(dh = malloc(sizeof(vmu_dh_t)))) return NULL; @@ -500,9 +501,8 @@ static ssize_t vmu_write(void * hnd, const void *buffer, size_t cnt) { n = n / 512; -#ifdef VMUFS_DEBUG - dbglog(DBG_KDEBUG, "VMUFS: extending file's filesize by %d\n", n); -#endif + if(__is_defined(VMUFS_DEBUG)) + dbglog(DBG_KDEBUG, "VMUFS: extending file's filesize by %d\n", n); /* We alloc another 512*n bytes for the file */ tmp = realloc(fh->data, (fh->filesize + n) * 512); @@ -519,10 +519,11 @@ static ssize_t vmu_write(void * hnd, const void *buffer, size_t cnt) { } /* insert the data in buffer into fh->data at fh->loc */ -#ifdef VMUFS_DEBUG - dbglog(DBG_KDEBUG, "VMUFS: adding %d bytes of data at loc %d (%d avail)\n", - cnt, fh->loc, fh->filesize * 512); -#endif + if(__is_defined(VMUFS_DEBUG)) { + dbglog(DBG_KDEBUG, "VMUFS: adding %d bytes of data at loc %d (%d avail)\n", + cnt, fh->loc, fh->filesize * 512); + } + memcpy(fh->data + fh->loc + fh->start, buffer, cnt); fh->loc += cnt; diff --git a/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c b/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c index 524aca63..c23848ce 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c @@ -58,20 +58,22 @@ static void maple_hw_init(void) { } /* Allocate the DMA send buffer */ -#if MAPLE_DMA_DEBUG - maple_state.dma_buffer = aligned_alloc(32, MAPLE_DMA_SIZE + 1024); -#else - maple_state.dma_buffer = aligned_alloc(32, MAPLE_DMA_SIZE); -#endif + if(__is_defined(MAPLE_DMA_DEBUG)) + maple_state.dma_buffer = aligned_alloc(32, MAPLE_DMA_SIZE + 1024); + else + maple_state.dma_buffer = aligned_alloc(32, MAPLE_DMA_SIZE); + assert_msg(maple_state.dma_buffer != NULL, "Couldn't allocate maple DMA buffer"); assert_msg((((uint32)maple_state.dma_buffer) & 0x1f) == 0, "DMA buffer was unaligned; bug in dlmalloc; please report!"); /* Force it into the P2 area */ maple_state.dma_buffer = (uint8*)((((uint32)maple_state.dma_buffer) & MEM_AREA_CACHE_MASK) | MEM_AREA_P2_BASE); -#if MAPLE_DMA_DEBUG - maple_state.dma_buffer += 512; - maple_sentinel_setup(maple_state.dma_buffer - 512, MAPLE_DMA_SIZE + 1024); -#endif + + if(__is_defined(MAPLE_DMA_DEBUG)) { + maple_state.dma_buffer += 512; + maple_sentinel_setup(maple_state.dma_buffer - 512, MAPLE_DMA_SIZE + 1024); + } + maple_state.dma_in_progress = 0; dbglog(DBG_INFO, " DMA Buffer at %08lx\n", (uint32)maple_state.dma_buffer); @@ -117,9 +119,10 @@ void maple_hw_shutdown(void) { /* We must cast this back to P1 or cache issues will arise */ if(maple_state.dma_buffer != NULL) { ptr = (uint32)maple_state.dma_buffer; -#if MAPLE_DMA_DEBUG - ptr -= 512; -#endif + + if(__is_defined(MAPLE_DMA_DEBUG)) + ptr -= 512; + ptr = (ptr & MEM_AREA_CACHE_MASK) | MEM_AREA_P1_BASE; free((void *)ptr); maple_state.dma_buffer = NULL; diff --git a/kernel/arch/dreamcast/hardware/maple/maple_irq.c b/kernel/arch/dreamcast/hardware/maple/maple_irq.c index 80fdb6a4..0f116a4a 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_irq.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_irq.c @@ -14,6 +14,7 @@ #include <dc/maple.h> #include <dc/asic.h> #include <dc/pvr.h> +#include <kos/dbglog.h> #include <kos/thread.h> /*********************************************************************/ @@ -48,10 +49,11 @@ static void vbl_chk_disconnect(maple_state_t *state, int p, int u) { (void)state; if(maple_dev_valid(p, u)) { -#if MAPLE_IRQ_DEBUG - dbglog(DBG_KDEBUG, "maple: detach on device %c%c\n", - 'A' + p, '0' + u); -#endif + if(__is_defined(MAPLE_IRQ_DEBUG)) { + dbglog(DBG_KDEBUG, "maple: detach on device %c%c\n", + 'A' + p, '0' + u); + } + if(maple_driver_detach(p, u) >= 0) { assert(!maple_dev_valid(p, u)); } @@ -150,10 +152,11 @@ static void vbl_autodet_callback(maple_state_t *state, maple_frame_t *frm) { else if(resp->response == MAPLE_RESPONSE_DEVINFO) { /* Device is present, check for connections */ if(!dev) { -#if MAPLE_IRQ_DEBUG - dbglog(DBG_KDEBUG, "maple: attach on device %c%c\n", - 'A' + p, '0' + u); -#endif + if(__is_defined(MAPLE_IRQ_DEBUG)) { + dbglog(DBG_KDEBUG, "maple: attach on device %c%c\n", + 'A' + p, '0' + u); + } + if(maple_driver_attach(frm) == 0) { assert(maple_dev_valid(p, u)); } @@ -253,9 +256,10 @@ void maple_dma_irq_hnd(uint32 code, void *data) { /* ACK the receipt */ state->dma_in_progress = 0; -#if MAPLE_DMA_DEBUG - maple_sentinel_verify("state->dma_buffer", state->dma_buffer, MAPLE_DMA_SIZE); -#endif + if(__is_defined(MAPLE_DMA_DEBUG)) { + maple_sentinel_verify("state->dma_buffer", state->dma_buffer, + MAPLE_DMA_SIZE); + } /* For each queued frame, call its callback if it's done */ TAILQ_FOREACH_SAFE(i, &state->frame_queue, frameq, tmp) { @@ -272,9 +276,8 @@ void maple_dma_irq_hnd(uint32 code, void *data) { continue; } -#if MAPLE_DMA_DEBUG - maple_sentinel_verify("i->recv_buf", i->recv_buf, 1024); -#endif + if(__is_defined(MAPLE_DMA_DEBUG)) + maple_sentinel_verify("i->recv_buf", i->recv_buf, 1024); /* Mark it as responded to */ i->state = MAPLE_FRAME_RESPONDED; diff --git a/kernel/arch/dreamcast/hardware/maple/maple_queue.c b/kernel/arch/dreamcast/hardware/maple/maple_queue.c index 6875b3b6..5c1d5922 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_queue.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_queue.c @@ -155,18 +155,17 @@ void maple_frame_init(maple_frame_t *frame) { if(buf_ptr & 0x1f) buf_ptr = (buf_ptr & ~0x1f) + 0x20; -#if MAPLE_DMA_DEBUG - buf_ptr += 512; -#endif + if(__is_defined(MAPLE_DMA_DEBUG)) + buf_ptr += 512; + buf_ptr = (buf_ptr & MEM_AREA_CACHE_MASK) | MEM_AREA_P2_BASE; frame->recv_buf = (uint8*)buf_ptr; /* Clear out the receive buffer */ -#if MAPLE_DMA_DEBUG - maple_sentinel_setup(frame->recv_buf - 512, 1024 + 1024); -#else - memset(frame->recv_buf, 0, 1024); -#endif + if(__is_defined(MAPLE_DMA_DEBUG)) + maple_sentinel_setup(frame->recv_buf - 512, 1024 + 1024); + else + memset(frame->recv_buf, 0, 1024); /* Initialize other state stuff */ frame->cmd = -1; diff --git a/kernel/arch/dreamcast/hardware/maple/maple_utils.c b/kernel/arch/dreamcast/hardware/maple/maple_utils.c index b1a58570..522a3ea5 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_utils.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_utils.c @@ -167,9 +167,9 @@ void maple_gun_read_pos(int *x, int *y) { *y = maple_state.gun_y; } -#if MAPLE_DMA_DEBUG /* Debugging help */ void maple_sentinel_setup(void * buffer, int bufsize) { + assert(__is_defined(MAPLE_DMA_DEBUG)); assert(bufsize % 4 == 0); memset(buffer, 0xdeadbeef, bufsize); } @@ -178,6 +178,7 @@ void maple_sentinel_verify(const char * bufname, void * buffer, int bufsize) { int i; uint32 *b32; + assert(__is_defined(MAPLE_DMA_DEBUG)); assert(bufsize % 4 == 0); b32 = ((uint32 *)buffer) - 512 / 4; @@ -200,4 +201,3 @@ void maple_sentinel_verify(const char * bufname, void * buffer, int bufsize) { } } } -#endif diff --git a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c index 9201a9d8..95de93fb 100644 --- a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c +++ b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c @@ -485,9 +485,7 @@ static semaphore_t bba_rx_sema2; static void bba_rx(void); -#ifdef TX_SEMA static semaphore_t tx_sema; -#endif static uint8 * next_dst; static uint8 * next_src; @@ -543,10 +541,9 @@ static int bba_copy_dma(uint8 * dst, uint32 s, int len) { src -= add; dst -= add; -#ifndef USE_P2_AREA /* Invalidate the dcache over the range of the data. */ - dcache_inval_range((uint32) dst, len); -#endif + if(!__is_defined(USE_P2_AREA)) + dcache_inval_range((uint32) dst, len); if(!dma_used) { dma_used = 1; @@ -574,13 +571,9 @@ static int bba_copy_dma(uint8 * dst, uint32 s, int len) { /* XXX Could probably use a memcpy8 here, even */ static int bba_copy_packet(uint8 * dst, uint32 src, int len) { -#if !RX_NOWRAP - - if((src + len) < RX_BUFFER_LEN) { -#endif + if(__is_defined(RX_NOWRAP) || (src + len) < RX_BUFFER_LEN) { /* Straight copy is ok */ return bba_copy_dma(dst, rtl_mem + src, len); -#if !RX_NOWRAP } else { /* Have to copy around the ring end */ @@ -589,8 +582,6 @@ static int bba_copy_packet(uint8 * dst, uint32 src, int len) { return bba_copy_dma(dst + (RX_BUFFER_LEN - src), rtl_mem, len - (RX_BUFFER_LEN - src)); } - -#endif } static int rx_enq(int ring_offset, size_t pkt_size) { @@ -603,12 +594,10 @@ static int rx_enq(int ring_offset, size_t pkt_size) { /* Receive buffer: temporary space to copy out received data */ -#ifdef USE_P2_AREA - rx_pkt[rxin].rxbuff = rxbuff + 32 + (rxbuff_pos | MEM_AREA_P2_BASE) + (ring_offset & 31); -#else - rx_pkt[rxin].rxbuff = rxbuff + 32 + rxbuff_pos + (ring_offset & 31); -#endif - + if(__is_defined(USE_P2_AREA)) + rx_pkt[rxin].rxbuff = rxbuff + 32 + (rxbuff_pos | MEM_AREA_P2_BASE) + (ring_offset & 31); + else + rx_pkt[rxin].rxbuff = rxbuff + 32 + rxbuff_pos + (ring_offset & 31); rxbuff_pos = (rxbuff_pos + pkt_size + 63) & (RXBSZ - 32); @@ -620,11 +609,7 @@ static int rx_enq(int ring_offset, size_t pkt_size) { } /* Transmit a single packet */ -#ifdef TX_SEMA static int bba_rtx(const uint8 * pkt, int len, int wait) -#else -static int bba_tx(const uint8 * pkt, int len, int wait) -#endif { if(!link_stable) { if(wait == BBA_TX_WAIT) { @@ -683,10 +668,12 @@ static int bba_tx(const uint8 * pkt, int len, int wait) return BBA_TX_OK; } -#ifdef TX_SEMA int bba_tx(const uint8 * pkt, int len, int wait) { int res; + if(!__is_defined(TX_SEMA)) + return bba_rtx(pkt, len, wait); + if(irq_inside_int()) { if(sem_trywait(&tx_sema)) { //printf("bba_tx called from an irq while a thread was running it !\n"); @@ -701,7 +688,6 @@ int bba_tx(const uint8 * pkt, int len, int wait) { return res; } -#endif void bba_lock(void) { //sem_wait(&bba_rx_sema2); @@ -1109,9 +1095,8 @@ int bba_init(void) { /* Use the netcore callback */ bba_set_rx_callback(bba_if_netinput); -#ifdef TX_SEMA - sem_init(&tx_sema, 1); -#endif + if(__is_defined(TX_SEMA)) + sem_init(&tx_sema, 1); /* VP : Initialize rx thread */ // Note: The thread itself is not created here, but when we actually @@ -1186,9 +1171,8 @@ int bba_shutdown(void) { if(bba_if.flags & NETIF_INITIALIZED) bba_if.if_shutdown(&bba_if); -#ifdef TX_SEMA - sem_destroy(&tx_sema); -#endif + if(__is_defined(TX_SEMA)) + sem_destroy(&tx_sema); return 0; } diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c b/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c index 41036b4a..7aa3b019 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c @@ -161,19 +161,19 @@ int pvr_init(const pvr_init_params_t *params) { asic_evt_set_handler(ASIC_EVT_PVR_RENDERDONE_TSP, pvr_int_handler, NULL); asic_evt_enable(ASIC_EVT_PVR_RENDERDONE_TSP, ASIC_IRQ_DEFAULT); -#ifdef PVR_RENDER_DBG - /* Hook up interrupt handlers for error events */ - asic_evt_set_handler(ASIC_EVT_PVR_ISP_OUTOFMEM, pvr_int_handler, NULL); - asic_evt_enable(ASIC_EVT_PVR_ISP_OUTOFMEM, ASIC_IRQ_DEFAULT); - asic_evt_set_handler(ASIC_EVT_PVR_STRIP_HALT, pvr_int_handler, NULL); - asic_evt_enable(ASIC_EVT_PVR_STRIP_HALT, ASIC_IRQ_DEFAULT); - asic_evt_set_handler(ASIC_EVT_PVR_OPB_OUTOFMEM, pvr_int_handler, NULL); - asic_evt_enable(ASIC_EVT_PVR_OPB_OUTOFMEM, ASIC_IRQ_DEFAULT); - asic_evt_set_handler(ASIC_EVT_PVR_TA_INPUT_ERR, pvr_int_handler, NULL); - asic_evt_enable(ASIC_EVT_PVR_TA_INPUT_ERR, ASIC_IRQ_DEFAULT); - asic_evt_set_handler(ASIC_EVT_PVR_TA_INPUT_OVERFLOW, pvr_int_handler, NULL); - asic_evt_enable(ASIC_EVT_PVR_TA_INPUT_OVERFLOW, ASIC_IRQ_DEFAULT); -#endif + if(__is_defined(PVR_RENDER_DBG)) { + /* Hook up interrupt handlers for error events */ + asic_evt_set_handler(ASIC_EVT_PVR_ISP_OUTOFMEM, pvr_int_handler, NULL); + asic_evt_enable(ASIC_EVT_PVR_ISP_OUTOFMEM, ASIC_IRQ_DEFAULT); + asic_evt_set_handler(ASIC_EVT_PVR_STRIP_HALT, pvr_int_handler, NULL); + asic_evt_enable(ASIC_EVT_PVR_STRIP_HALT, ASIC_IRQ_DEFAULT); + asic_evt_set_handler(ASIC_EVT_PVR_OPB_OUTOFMEM, pvr_int_handler, NULL); + asic_evt_enable(ASIC_EVT_PVR_OPB_OUTOFMEM, ASIC_IRQ_DEFAULT); + asic_evt_set_handler(ASIC_EVT_PVR_TA_INPUT_ERR, pvr_int_handler, NULL); + asic_evt_enable(ASIC_EVT_PVR_TA_INPUT_ERR, ASIC_IRQ_DEFAULT); + asic_evt_set_handler(ASIC_EVT_PVR_TA_INPUT_OVERFLOW, pvr_int_handler, NULL); + asic_evt_enable(ASIC_EVT_PVR_TA_INPUT_OVERFLOW, ASIC_IRQ_DEFAULT); + } /* 3d-specific parameters; these are all about rendering and nothing to do with setting up the video; some stuff in here diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c b/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c index 5ace04d7..711b271b 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c @@ -14,9 +14,7 @@ #include <kos/genwait.h> #include <kos/regfield.h> -#ifdef PVR_RENDER_DBG #include <stdio.h> -#endif /* PVR interrupt handler; the way things are setup, we're gonna get @@ -176,34 +174,34 @@ void pvr_int_handler(uint32 code, void *data) { break; } -#ifdef PVR_RENDER_DBG - /* Show register values on each interrupt */ - switch (code) { - case ASIC_EVT_PVR_ISP_OUTOFMEM: - DBG(("[ERROR]: ASIC_EVT_PVR_ISP_OUTOFMEM\n")); - break; - - case ASIC_EVT_PVR_STRIP_HALT: - DBG(("[ERROR]: ASIC_EVT_PVR_STRIP_HALT\n")); - break; - - case ASIC_EVT_PVR_OPB_OUTOFMEM: - DBG(("[ERROR]: ASIC_EVT_PVR_OPB_OUTOFMEM\n")); - DBG(("PVR_TA_OPB_START: %08lx\nPVR_TA_OPB_END: %08lx\nPVR_TA_OPB_POS: %08lx\n", - PVR_GET(PVR_TA_OPB_START), - PVR_GET(PVR_TA_OPB_END), - PVR_GET(PVR_TA_OPB_POS) << 2)); - break; - - case ASIC_EVT_PVR_TA_INPUT_ERR: - DBG(("[ERROR]: ASIC_EVT_PVR_TA_INPUT_ERR\n")); - break; - - case ASIC_EVT_PVR_TA_INPUT_OVERFLOW: - DBG(("[ERROR]: ASIC_EVT_PVR_TA_INPUT_OVERFLOW\n")); ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-21 17:27: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 1a9179047ae8a8e449efdc45a57ed976a63419d3 (commit) from 5ac5dbae9c76ad4a239f3e0afb76d782dd5471df (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 1a9179047ae8a8e449efdc45a57ed976a63419d3 Author: darc <da...@pr...> Date: Tue May 20 12:38:48 2025 -0500 Move gitignore declarations to sub-project dirs ----------------------------------------------------------------------- Summary of changes: .gitignore | 49 +--------------------- examples/dreamcast/basic/exec/.gitignore | 1 + examples/dreamcast/conio/adventure/.gitignore | 2 + examples/dreamcast/gldc/basic/vq/.gitignore | 1 + examples/dreamcast/gldc/nehe/nehe26/.gitignore | 1 + examples/dreamcast/kgl/basic/vq/.gitignore | 1 + examples/dreamcast/kgl/nehe/nehe26/.gitignore | 1 + examples/dreamcast/library/.gitignore | 2 + examples/dreamcast/png/.gitignore | 1 + examples/dreamcast/pvr/bumpmap/.gitignore | 2 + .../dreamcast/pvr/modifier_volume_tex/.gitignore | 1 + examples/dreamcast/pvr/texture_render/.gitignore | 1 + examples/dreamcast/video/screenshot/.gitignore | 1 + kernel/arch/dreamcast/kernel/.gitignore | 2 + kernel/arch/dreamcast/sound/.gitignore | 1 + kernel/arch/dreamcast/sound/arm/.gitignore | 1 + kernel/exports/.gitignore | 1 + kernel/stubs/.gitignore | 1 + utils/bin2c/.gitignore | 1 + utils/bincnv/.gitignore | 1 + utils/dcbumpgen/.gitignore | 1 + utils/genromfs/.gitignore | 1 + utils/gentexfont/.gitignore | 1 + utils/isotest/.gitignore | 1 + utils/kmgenc/.gitignore | 1 + utils/makeip/.gitignore | 1 + utils/makejitter/.gitignore | 1 + utils/naomibintool/.gitignore | 1 + utils/naominetboot/.gitignore | 1 + utils/scramble/.gitignore | 1 + utils/vqenc/.gitignore | 1 + utils/wav2adpcm/.gitignore | 1 + 32 files changed, 37 insertions(+), 47 deletions(-) create mode 100644 examples/dreamcast/basic/exec/.gitignore create mode 100644 examples/dreamcast/conio/adventure/.gitignore create mode 100644 examples/dreamcast/gldc/basic/vq/.gitignore create mode 100644 examples/dreamcast/gldc/nehe/nehe26/.gitignore create mode 100644 examples/dreamcast/kgl/basic/vq/.gitignore create mode 100644 examples/dreamcast/kgl/nehe/nehe26/.gitignore create mode 100644 examples/dreamcast/library/.gitignore create mode 100644 examples/dreamcast/png/.gitignore create mode 100644 examples/dreamcast/pvr/bumpmap/.gitignore create mode 100644 examples/dreamcast/pvr/modifier_volume_tex/.gitignore create mode 100644 examples/dreamcast/pvr/texture_render/.gitignore create mode 100644 examples/dreamcast/video/screenshot/.gitignore create mode 100644 kernel/arch/dreamcast/kernel/.gitignore create mode 100644 kernel/arch/dreamcast/sound/.gitignore create mode 100644 kernel/arch/dreamcast/sound/arm/.gitignore create mode 100644 kernel/exports/.gitignore create mode 100644 kernel/stubs/.gitignore create mode 100644 utils/bin2c/.gitignore create mode 100644 utils/bincnv/.gitignore create mode 100644 utils/dcbumpgen/.gitignore create mode 100644 utils/genromfs/.gitignore create mode 100644 utils/gentexfont/.gitignore create mode 100644 utils/isotest/.gitignore create mode 100644 utils/kmgenc/.gitignore create mode 100644 utils/makejitter/.gitignore create mode 100644 utils/naomibintool/.gitignore create mode 100644 utils/naominetboot/.gitignore create mode 100644 utils/scramble/.gitignore create mode 100644 utils/vqenc/.gitignore create mode 100644 utils/wav2adpcm/.gitignore diff --git a/.gitignore b/.gitignore index cb2657a4..a4e8474b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,52 +10,7 @@ .*.swp .DS_Store .vscode/ -doc/reference/ environ.sh romdisk.img -kernel/stubs/*.c -kernel/exports/kernel_exports.c -kernel/arch/dreamcast/kernel/arch_exports.c -kernel/arch/dreamcast/kernel/banner.h -kernel/arch/dreamcast/sound/snd_stream_drv.c -kernel/arch/dreamcast/sound/arm/stream.drv -utils/bincnv/bincnv -utils/genromfs/genromfs -utils/vqenc/vqenc -utils/wav2adpcm/wav2adpcm -utils/kmgenc/kmgenc -utils/bin2c/bin2c -utils/bincnv/bincnv -utils/gentexfont/gentexfont -utils/isotest/isotest -utils/makejitter/makejitter -utils/dcbumpgen/dcbumpgen -utils/scramble/scramble -utils/makeip/makeip -utils/naomibintool/naomibintool -utils/naominetboot/naominetboot -examples/dreamcast/basic/exec/romdisk/sub.bin -examples/dreamcast/kgl/basic/vq/fruit.vq -examples/dreamcast/kgl/nehe/nehe26/data/txt2bin -examples/dreamcast/gldc/basic/vq/fruit.vq -examples/dreamcast/gldc/nehe/nehe26/data/txt2bin -examples/dreamcast/conio/adventure/data.c -examples/dreamcast/conio/adventure/datagen -examples/dreamcast/png/romdisk_boot.img -examples/dreamcast/pvr/bumpmap/romdisk/bricks.kmg -examples/dreamcast/pvr/bumpmap/romdisk/bumpmap.raw -examples/dreamcast/pvr/modifier_volume_tex/romdisk/fruit.kmg -examples/dreamcast/pvr/texture_render/texture_render.bin -examples/dreamcast/video/screenshot/screenshot*.ppm -examples/dreamcast/library/exports.c -examples/dreamcast/library/exports_stubs.c -examples/dreamcast/library/*/exports.c -examples/dreamcast/library/*/exports_stubs.c -utils/dc-chain/logs -utils/dc-chain/*.tar.bz2 -utils/dc-chain/*.tar.gz -utils/dc-chain/binutils-* -utils/dc-chain/gcc-* -utils/dc-chain/newlib-* -utils/dc-chain/gdb-* -utils/dc-chain/insight-* +/doc/reference/ +/ports/ diff --git a/examples/dreamcast/basic/exec/.gitignore b/examples/dreamcast/basic/exec/.gitignore new file mode 100644 index 00000000..2e6b6d00 --- /dev/null +++ b/examples/dreamcast/basic/exec/.gitignore @@ -0,0 +1 @@ +romdisk/sub.bin diff --git a/examples/dreamcast/conio/adventure/.gitignore b/examples/dreamcast/conio/adventure/.gitignore new file mode 100644 index 00000000..15c61ac7 --- /dev/null +++ b/examples/dreamcast/conio/adventure/.gitignore @@ -0,0 +1,2 @@ +data.c +datagen diff --git a/examples/dreamcast/gldc/basic/vq/.gitignore b/examples/dreamcast/gldc/basic/vq/.gitignore new file mode 100644 index 00000000..4ce9dd50 --- /dev/null +++ b/examples/dreamcast/gldc/basic/vq/.gitignore @@ -0,0 +1 @@ +fruit.vq diff --git a/examples/dreamcast/gldc/nehe/nehe26/.gitignore b/examples/dreamcast/gldc/nehe/nehe26/.gitignore new file mode 100644 index 00000000..cbf6ad08 --- /dev/null +++ b/examples/dreamcast/gldc/nehe/nehe26/.gitignore @@ -0,0 +1 @@ +data/txt2bin diff --git a/examples/dreamcast/kgl/basic/vq/.gitignore b/examples/dreamcast/kgl/basic/vq/.gitignore new file mode 100644 index 00000000..4ce9dd50 --- /dev/null +++ b/examples/dreamcast/kgl/basic/vq/.gitignore @@ -0,0 +1 @@ +fruit.vq diff --git a/examples/dreamcast/kgl/nehe/nehe26/.gitignore b/examples/dreamcast/kgl/nehe/nehe26/.gitignore new file mode 100644 index 00000000..cbf6ad08 --- /dev/null +++ b/examples/dreamcast/kgl/nehe/nehe26/.gitignore @@ -0,0 +1 @@ +data/txt2bin diff --git a/examples/dreamcast/library/.gitignore b/examples/dreamcast/library/.gitignore new file mode 100644 index 00000000..4c936eea --- /dev/null +++ b/examples/dreamcast/library/.gitignore @@ -0,0 +1,2 @@ +exports.c +exports_stubs.c diff --git a/examples/dreamcast/png/.gitignore b/examples/dreamcast/png/.gitignore new file mode 100644 index 00000000..88488290 --- /dev/null +++ b/examples/dreamcast/png/.gitignore @@ -0,0 +1 @@ +romdisk_boot.img diff --git a/examples/dreamcast/pvr/bumpmap/.gitignore b/examples/dreamcast/pvr/bumpmap/.gitignore new file mode 100644 index 00000000..5e74dd6d --- /dev/null +++ b/examples/dreamcast/pvr/bumpmap/.gitignore @@ -0,0 +1,2 @@ +romdisk/bricks.kmg +romdisk/bumpmap.raw diff --git a/examples/dreamcast/pvr/modifier_volume_tex/.gitignore b/examples/dreamcast/pvr/modifier_volume_tex/.gitignore new file mode 100644 index 00000000..86814965 --- /dev/null +++ b/examples/dreamcast/pvr/modifier_volume_tex/.gitignore @@ -0,0 +1 @@ +romdisk/fruit.kmg diff --git a/examples/dreamcast/pvr/texture_render/.gitignore b/examples/dreamcast/pvr/texture_render/.gitignore new file mode 100644 index 00000000..05593098 --- /dev/null +++ b/examples/dreamcast/pvr/texture_render/.gitignore @@ -0,0 +1 @@ +texture_render.bin diff --git a/examples/dreamcast/video/screenshot/.gitignore b/examples/dreamcast/video/screenshot/.gitignore new file mode 100644 index 00000000..078e7823 --- /dev/null +++ b/examples/dreamcast/video/screenshot/.gitignore @@ -0,0 +1 @@ +screenshot*.ppm diff --git a/kernel/arch/dreamcast/kernel/.gitignore b/kernel/arch/dreamcast/kernel/.gitignore new file mode 100644 index 00000000..989e5ff4 --- /dev/null +++ b/kernel/arch/dreamcast/kernel/.gitignore @@ -0,0 +1,2 @@ +arch_exports.c +banner.h diff --git a/kernel/arch/dreamcast/sound/.gitignore b/kernel/arch/dreamcast/sound/.gitignore new file mode 100644 index 00000000..0396d8e2 --- /dev/null +++ b/kernel/arch/dreamcast/sound/.gitignore @@ -0,0 +1 @@ +snd_stream_drv.c diff --git a/kernel/arch/dreamcast/sound/arm/.gitignore b/kernel/arch/dreamcast/sound/arm/.gitignore new file mode 100644 index 00000000..a38dc1ed --- /dev/null +++ b/kernel/arch/dreamcast/sound/arm/.gitignore @@ -0,0 +1 @@ +stream.drv diff --git a/kernel/exports/.gitignore b/kernel/exports/.gitignore new file mode 100644 index 00000000..7f12227d --- /dev/null +++ b/kernel/exports/.gitignore @@ -0,0 +1 @@ +kernel_exports.c diff --git a/kernel/stubs/.gitignore b/kernel/stubs/.gitignore new file mode 100644 index 00000000..064a8d8e --- /dev/null +++ b/kernel/stubs/.gitignore @@ -0,0 +1 @@ +*.c diff --git a/utils/bin2c/.gitignore b/utils/bin2c/.gitignore new file mode 100644 index 00000000..366f3d3e --- /dev/null +++ b/utils/bin2c/.gitignore @@ -0,0 +1 @@ +bin2c diff --git a/utils/bincnv/.gitignore b/utils/bincnv/.gitignore new file mode 100644 index 00000000..4aaffc82 --- /dev/null +++ b/utils/bincnv/.gitignore @@ -0,0 +1 @@ +bincnv diff --git a/utils/dcbumpgen/.gitignore b/utils/dcbumpgen/.gitignore new file mode 100644 index 00000000..ca123d7b --- /dev/null +++ b/utils/dcbumpgen/.gitignore @@ -0,0 +1 @@ +dcbumpgen diff --git a/utils/genromfs/.gitignore b/utils/genromfs/.gitignore new file mode 100644 index 00000000..14354858 --- /dev/null +++ b/utils/genromfs/.gitignore @@ -0,0 +1 @@ +genromfs diff --git a/utils/gentexfont/.gitignore b/utils/gentexfont/.gitignore new file mode 100644 index 00000000..c6f746a8 --- /dev/null +++ b/utils/gentexfont/.gitignore @@ -0,0 +1 @@ +gentexfont diff --git a/utils/isotest/.gitignore b/utils/isotest/.gitignore new file mode 100644 index 00000000..4c1c51d5 --- /dev/null +++ b/utils/isotest/.gitignore @@ -0,0 +1 @@ +isotest diff --git a/utils/kmgenc/.gitignore b/utils/kmgenc/.gitignore new file mode 100644 index 00000000..f636b53b --- /dev/null +++ b/utils/kmgenc/.gitignore @@ -0,0 +1 @@ +kmgenc diff --git a/utils/makeip/.gitignore b/utils/makeip/.gitignore index 9da03220..b1fc47b3 100644 --- a/utils/makeip/.gitignore +++ b/utils/makeip/.gitignore @@ -2,6 +2,7 @@ *.exe IP.BIN ip.bin +makeip src/makeip src/ip.txt src/*.mr diff --git a/utils/makejitter/.gitignore b/utils/makejitter/.gitignore new file mode 100644 index 00000000..f75c1c55 --- /dev/null +++ b/utils/makejitter/.gitignore @@ -0,0 +1 @@ +makejitter diff --git a/utils/naomibintool/.gitignore b/utils/naomibintool/.gitignore new file mode 100644 index 00000000..4c613ef1 --- /dev/null +++ b/utils/naomibintool/.gitignore @@ -0,0 +1 @@ +naomibintool diff --git a/utils/naominetboot/.gitignore b/utils/naominetboot/.gitignore new file mode 100644 index 00000000..0555999c --- /dev/null +++ b/utils/naominetboot/.gitignore @@ -0,0 +1 @@ +naominetboot diff --git a/utils/scramble/.gitignore b/utils/scramble/.gitignore new file mode 100644 index 00000000..b9279f2f --- /dev/null +++ b/utils/scramble/.gitignore @@ -0,0 +1 @@ +scramble diff --git a/utils/vqenc/.gitignore b/utils/vqenc/.gitignore new file mode 100644 index 00000000..867046ef --- /dev/null +++ b/utils/vqenc/.gitignore @@ -0,0 +1 @@ +vqenc diff --git a/utils/wav2adpcm/.gitignore b/utils/wav2adpcm/.gitignore new file mode 100644 index 00000000..735858b1 --- /dev/null +++ b/utils/wav2adpcm/.gitignore @@ -0,0 +1 @@ +wav2adpcm hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-21 16:36: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 5ac5dbae9c76ad4a239f3e0afb76d782dd5471df (commit) from 49e939a5c0fea9af48357bf250dba14db975fc8a (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 5ac5dbae9c76ad4a239f3e0afb76d782dd5471df Author: QuzarDC <qu...@co...> Date: Sun May 18 04:22:28 2025 -0400 `libkosext2fs`: Ensure buffer can store uint32s. As the malloc'd returned buffer is accessed as `uint32_t *` we should ensure that the size of it is a multiple of 4 otherwise we could read into unallocated memory. ----------------------------------------------------------------------- Summary of changes: addons/libkosext2fs/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/libkosext2fs/inode.c b/addons/libkosext2fs/inode.c index a8cb184f..64695b72 100644 --- a/addons/libkosext2fs/inode.c +++ b/addons/libkosext2fs/inode.c @@ -989,9 +989,11 @@ static ext2_dirent_t *search_indir_23(ext2_fs_t *fs, const uint32_t *iblock, uint32_t *buf; int i, block_ents; ext2_dirent_t *rv; + /* Ensure the buffer will hold uint32_ts */ + size_t bufsize = __align_up(block_size, sizeof(buf[0])); /* We're going to need this buffer... */ - if(!(buf = (uint32_t *)malloc(block_size))) { + if(!(buf = (uint32_t *)malloc(bufsize))) { *err = -ENOMEM; return NULL; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-21 00:12: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 49e939a5c0fea9af48357bf250dba14db975fc8a (commit) via 2629afe3291d1bc1e065f0d559cdeace38a23692 (commit) from 7569b6ff7402754c7fa4bca9bc77f43b8005ba82 (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 49e939a5c0fea9af48357bf250dba14db975fc8a Author: darc <da...@pr...> Date: Tue May 20 18:40:44 2025 -0500 Update __newlib_lock_acquire_recursive() - Remove unnecessary irq enable/disable from __newlib_lock_acquire_recursive() - Update __newlib_lock_acquire_recursive() to use thd_get_current() commit 2629afe3291d1bc1e065f0d559cdeace38a23692 Author: Falco Girgis <gyr...@gm...> Date: Tue Jan 9 06:51:52 2024 -0600 Implemented Newlib try_lock() functions - __newlib_lock_try_acquire() and __newlib_lock_try_acquire_recursive() were stubbed out to assert and abort due to not being implemented - Implemented both using the new spinlock_trylock() API - Also had to fix their prototypes, since they both should be returning an integer for whether the lock was successfully obtained ----------------------------------------------------------------------- Summary of changes: include/sys/lock.h | 4 +-- kernel/libc/newlib/lock_common.c | 58 +++++++++++++++++++++------------------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/include/sys/lock.h b/include/sys/lock.h index 9b93a959..eec60041 100644 --- a/include/sys/lock.h +++ b/include/sys/lock.h @@ -52,13 +52,13 @@ typedef __newlib_recursive_lock_t _LOCK_RECURSIVE_T; void __newlib_lock_init(__newlib_lock_t*); void __newlib_lock_close(__newlib_lock_t*); void __newlib_lock_acquire(__newlib_lock_t*); -void __newlib_lock_try_acquire(__newlib_lock_t*); +int __newlib_lock_try_acquire(__newlib_lock_t*); void __newlib_lock_release(__newlib_lock_t*); void __newlib_lock_init_recursive(__newlib_recursive_lock_t*); void __newlib_lock_close_recursive(__newlib_recursive_lock_t*); void __newlib_lock_acquire_recursive(__newlib_recursive_lock_t*); -void __newlib_lock_try_acquire_recursive(__newlib_recursive_lock_t*); +int __newlib_lock_try_acquire_recursive(__newlib_recursive_lock_t*); void __newlib_lock_release_recursive(__newlib_recursive_lock_t*); /** \endcond */ diff --git a/kernel/libc/newlib/lock_common.c b/kernel/libc/newlib/lock_common.c index 2105e017..d9e35ccf 100644 --- a/kernel/libc/newlib/lock_common.c +++ b/kernel/libc/newlib/lock_common.c @@ -1,8 +1,9 @@ /* KallistiOS ##version## lock_common.c - Copyright (C)2004 Megan Potter - + Copyright (C) 2004 Megan Potter + Copyright (C) 2024 Falco Girgis + Copyright (C) 2025 Eric Fradella */ #include <assert.h> @@ -11,51 +12,40 @@ #include <kos/thread.h> #include <sys/lock.h> -void __newlib_lock_init(__newlib_lock_t * lock) { +void __newlib_lock_init(__newlib_lock_t *lock) { spinlock_init(lock); } -void __newlib_lock_close(__newlib_lock_t * lock) { +void __newlib_lock_close(__newlib_lock_t *lock) { (void)lock; } -void __newlib_lock_acquire(__newlib_lock_t * lock) { +void __newlib_lock_acquire(__newlib_lock_t *lock) { spinlock_lock(lock); } -void __newlib_lock_try_acquire(__newlib_lock_t * lock) { - (void)lock; - assert_msg(0, "We don't support try_acquire"); +int __newlib_lock_try_acquire(__newlib_lock_t *lock) { + return spinlock_trylock(lock); } -void __newlib_lock_release(__newlib_lock_t * lock) { +void __newlib_lock_release(__newlib_lock_t *lock) { spinlock_unlock(lock); } -void __newlib_lock_init_recursive(__newlib_recursive_lock_t * lock) { +void __newlib_lock_init_recursive(__newlib_recursive_lock_t *lock) { lock->owner = NULL; lock->nest = 0; spinlock_init(&lock->lock); } -void __newlib_lock_close_recursive(__newlib_recursive_lock_t * lock) { +void __newlib_lock_close_recursive(__newlib_recursive_lock_t *lock) { /* Empty */ (void)lock; } -void __newlib_lock_acquire_recursive(__newlib_recursive_lock_t * lock) { - int old; - int iscur; - - // Check to see if we already own it. If so, everything is clear - // to incr nest. Otherwise, we can safely go on to do a normal - // spinlock wait. - old = irq_disable(); - iscur = lock->owner == thd_current; - irq_restore(old); - - if(iscur) { +void __newlib_lock_acquire_recursive(__newlib_recursive_lock_t *lock) { + if(lock->owner == thd_get_current()) { lock->nest++; return; } @@ -64,16 +54,28 @@ void __newlib_lock_acquire_recursive(__newlib_recursive_lock_t * lock) { spinlock_lock(&lock->lock); // We own it now, so it's safe to init the rest of this. - lock->owner = thd_current; + lock->owner = thd_get_current(); lock->nest = 1; } -void __newlib_lock_try_acquire_recursive(__newlib_recursive_lock_t * lock) { - (void)lock; - assert_msg(0, "We don't support try_acquire"); +/* Similar to __newlib_lock_acquire_recursive(), except that it can + fail to obtain the lock. */ +int __newlib_lock_try_acquire_recursive(__newlib_recursive_lock_t *lock) { + if(lock->owner == thd_get_current()) { + lock->nest++; + return 1; + } + + if(spinlock_trylock(&lock->lock)) { + lock->owner = thd_get_current(); + lock->nest = 1; + return 1; + } + + return 0; } -void __newlib_lock_release_recursive(__newlib_recursive_lock_t * lock) { +void __newlib_lock_release_recursive(__newlib_recursive_lock_t *lock) { // Check to see how much we own it. if(lock->nest == 1) { lock->owner = NULL; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-20 20:14:58
|
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 7569b6ff7402754c7fa4bca9bc77f43b8005ba82 (commit) from b45535a7cee6f8164165d29ff95a6c0ec40c8de6 (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 7569b6ff7402754c7fa4bca9bc77f43b8005ba82 Author: QuzarDC <qu...@co...> Date: Tue May 20 15:49:52 2025 -0400 Fix missing include in speedtest. Add dbglog.h after removal from stdio in #1000 ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/filesystem/sd/speedtest/sd-speedtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/dreamcast/filesystem/sd/speedtest/sd-speedtest.c b/examples/dreamcast/filesystem/sd/speedtest/sd-speedtest.c index 76422c15..f2489049 100644 --- a/examples/dreamcast/filesystem/sd/speedtest/sd-speedtest.c +++ b/examples/dreamcast/filesystem/sd/speedtest/sd-speedtest.c @@ -25,6 +25,7 @@ #include <kos/init.h> #include <kos/dbgio.h> +#include <kos/dbglog.h> #include <kos/blockdev.h> KOS_INIT_FLAGS(INIT_DEFAULT); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-20 20:14:44
|
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 b45535a7cee6f8164165d29ff95a6c0ec40c8de6 (commit) from 7cd49f8777ae38a8dc533f751c0fa3b51f7c1c47 (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 b45535a7cee6f8164165d29ff95a6c0ec40c8de6 Author: QuzarDC <qu...@co...> Date: Sat May 17 18:14:31 2025 -0400 mrbtris: Fix incompatible type error `read_buttons` had no params (not even `void`) and gcc finally sees that this is a problem. Added anonymous `void *` to match `thd_create`. ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/mruby/mrbtris/dckos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dreamcast/mruby/mrbtris/dckos.c b/examples/dreamcast/mruby/mrbtris/dckos.c index b8b23ffd..894fd2ed 100644 --- a/examples/dreamcast/mruby/mrbtris/dckos.c +++ b/examples/dreamcast/mruby/mrbtris/dckos.c @@ -52,7 +52,7 @@ struct InputBuf { static mrb_value btn_mrb_buffer; // buf has to be BUFSIZE elements at least -void *read_buttons() { +void *read_buttons(void*) { while(1) { input_buf.index = (input_buf.index + 1) % BUFSIZE; //printf("index: %" PRIu32 "\n", buf_index); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: kosmirror <kos...@us...> - 2025-05-20 19:17:39
|
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 7cd49f8777ae38a8dc533f751c0fa3b51f7c1c47 (commit) via d1db6cdd7e6abcf86bb0442ee0bc846ca4f906e8 (commit) from 738e494979dc3fff0d7f8e406f5b6a34712038b4 (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 7cd49f8777ae38a8dc533f751c0fa3b51f7c1c47 Author: QuzarDC <qu...@co...> Date: Mon May 12 03:17:22 2025 -0400 Remove kos/dbglog.h from sys/stdio.h This was exposing a lot of stuff for no reason. Helps towards #840 to avoid having internal types spill out. Have replaced the inclusion with the two includes dbglog was exposing prior to #995, which should also help with reducing the impact to kos-ports. commit d1db6cdd7e6abcf86bb0442ee0bc846ca4f906e8 Author: QuzarDC <qu...@co...> Date: Mon May 12 02:05:47 2025 -0400 Add explicit includes of <kos/dbglog.h> All of these were adding it implicitly via stdio.h. ----------------------------------------------------------------------- Summary of changes: addons/libkosext2fs/ext2internal.h | 14 ++++++++------ addons/libkosfat/fatinternal.h | 16 +++++++++------- addons/libnavi/navi_flash.c | 1 + addons/libnavi/navi_ide.c | 1 + include/sys/stdio.h | 6 ++++-- kernel/arch/dreamcast/fs/fs_dcload.c | 1 + kernel/arch/dreamcast/fs/fs_iso9660.c | 1 + kernel/arch/dreamcast/fs/fs_vmu.c | 1 + kernel/arch/dreamcast/fs/vmufs.c | 1 + kernel/arch/dreamcast/hardware/flashrom.c | 1 + kernel/arch/dreamcast/hardware/g2dma.c | 1 + .../arch/dreamcast/hardware/maple/maple_init_shutdown.c | 1 + kernel/arch/dreamcast/hardware/maple/maple_utils.c | 1 + kernel/arch/dreamcast/hardware/maple/sip.c | 1 + kernel/arch/dreamcast/hardware/maple/vmu.c | 1 + .../arch/dreamcast/hardware/network/broadband_adapter.c | 1 + kernel/arch/dreamcast/hardware/network/lan_adapter.c | 1 + kernel/arch/dreamcast/hardware/pvr/pvr_dma.c | 1 + kernel/arch/dreamcast/hardware/pvr/pvr_fog.c | 2 ++ kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c | 1 + kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c | 1 + kernel/arch/dreamcast/hardware/pvr/pvr_scene.c | 1 + kernel/arch/dreamcast/hardware/video.c | 1 + kernel/arch/dreamcast/kernel/init.c | 1 + kernel/arch/dreamcast/kernel/irq.c | 1 + kernel/arch/dreamcast/kernel/mm.c | 1 + kernel/arch/dreamcast/sound/snd_iface.c | 1 + kernel/arch/dreamcast/sound/snd_mem.c | 1 + kernel/arch/dreamcast/sound/snd_sfxmgr.c | 1 + kernel/arch/dreamcast/sound/snd_stream.c | 1 + kernel/arch/dreamcast/util/screenshot.c | 1 + kernel/arch/dreamcast/util/vmu_pkg.c | 1 + kernel/fs/elf.c | 1 + kernel/fs/fs.c | 1 + kernel/fs/fs_dev.c | 1 + kernel/fs/fs_random.c | 1 + kernel/fs/fs_romdisk.c | 1 + kernel/libc/koslib/assert.c | 2 ++ kernel/libc/koslib/malloc.c | 1 + kernel/net/net_arp.c | 1 + kernel/net/net_core.c | 1 + kernel/net/net_icmp.c | 1 + kernel/net/net_icmp6.c | 1 + kernel/thread/genwait.c | 1 + kernel/thread/rwsem.c | 1 + kernel/thread/sem.c | 1 + kernel/thread/thread.c | 1 + 47 files changed, 67 insertions(+), 15 deletions(-) diff --git a/addons/libkosext2fs/ext2internal.h b/addons/libkosext2fs/ext2internal.h index 20808cdb..55ffd87f 100644 --- a/addons/libkosext2fs/ext2internal.h +++ b/addons/libkosext2fs/ext2internal.h @@ -45,13 +45,15 @@ struct ext2fs_struct { #define EXT2_FS_FLAG_SB_DIRTY 1 #ifdef EXT2_NOT_IN_KOS -#include <stdio.h> -#define DBG_DEBUG 0 -#define DBG_KDEBUG 0 -#define DBG_WARNING 0 -#define DBG_ERROR 0 + #include <stdio.h> + #define DBG_DEBUG 0 + #define DBG_KDEBUG 0 + #define DBG_WARNING 0 + #define DBG_ERROR 0 -#define dbglog(lvl, ...) printf(__VA_ARGS__) + #define dbglog(lvl, ...) printf(__VA_ARGS__) +#else + #include <kos/dbglog.h> #endif #endif /* !__EXT2_EXT2INTERNAL_H */ diff --git a/addons/libkosfat/fatinternal.h b/addons/libkosfat/fatinternal.h index 9ff7abcf..b35b0c7b 100644 --- a/addons/libkosfat/fatinternal.h +++ b/addons/libkosfat/fatinternal.h @@ -39,13 +39,15 @@ struct fatfs_struct { #define FAT_FS_FLAG_SB_DIRTY 1 #ifdef FAT_NOT_IN_KOS -#include <stdio.h> -#define DBG_DEBUG 0 -#define DBG_KDEBUG 0 -#define DBG_WARNING 0 -#define DBG_ERROR 0 - -#define dbglog(lvl, ...) printf(__VA_ARGS__) + #include <stdio.h> + #define DBG_DEBUG 0 + #define DBG_KDEBUG 0 + #define DBG_WARNING 0 + #define DBG_ERROR 0 + + #define dbglog(lvl, ...) printf(__VA_ARGS__) +#else + #include <kos/dbglog.h> #endif #endif /* !__FAT_FATINTERNAL_H */ diff --git a/addons/libnavi/navi_flash.c b/addons/libnavi/navi_flash.c index dd00a72c..69934137 100644 --- a/addons/libnavi/navi_flash.c +++ b/addons/libnavi/navi_flash.c @@ -9,6 +9,7 @@ #include <assert.h> #include <stdio.h> #include <navi/flash.h> +#include <kos/dbglog.h> #include <kos/thread.h> /* diff --git a/addons/libnavi/navi_ide.c b/addons/libnavi/navi_ide.c index fff802e9..4e1185ca 100644 --- a/addons/libnavi/navi_ide.c +++ b/addons/libnavi/navi_ide.c @@ -10,6 +10,7 @@ #include <stdio.h> #include <navi/ide.h> #include <dc/g2bus.h> +#include <kos/dbglog.h> #include <kos/thread.h> /* diff --git a/include/sys/stdio.h b/include/sys/stdio.h index effd05b8..c186d86c 100644 --- a/include/sys/stdio.h +++ b/include/sys/stdio.h @@ -26,7 +26,9 @@ # define _funlockfile(fp) #endif -// Added for old KOS source compatibility -#include <kos/dbglog.h> +/* Keep compat with old dbglog.h inclusion */ +#include <unistd.h> +#include <stdarg.h> +#include <kos/fs.h> #endif /* _NEWLIB_STDIO_H */ diff --git a/kernel/arch/dreamcast/fs/fs_dcload.c b/kernel/arch/dreamcast/fs/fs_dcload.c index 81a00ac0..93e7ca5e 100644 --- a/kernel/arch/dreamcast/fs/fs_dcload.c +++ b/kernel/arch/dreamcast/fs/fs_dcload.c @@ -22,6 +22,7 @@ printf goes to the dc-tool console #include <dc/fs_dcload.h> #include <arch/spinlock.h> #include <kos/dbgio.h> +#include <kos/dbglog.h> #include <kos/fs.h> #include <kos/init.h> diff --git a/kernel/arch/dreamcast/fs/fs_iso9660.c b/kernel/arch/dreamcast/fs/fs_iso9660.c index 0246c77f..e0f8b435 100644 --- a/kernel/arch/dreamcast/fs/fs_iso9660.c +++ b/kernel/arch/dreamcast/fs/fs_iso9660.c @@ -36,6 +36,7 @@ ISO9660 systems, as these were used as references as well. #include <kos/mutex.h> #include <kos/fs.h> #include <kos/opts.h> +#include <kos/dbglog.h> #include <stdlib.h> #include <stdio.h> diff --git a/kernel/arch/dreamcast/fs/fs_vmu.c b/kernel/arch/dreamcast/fs/fs_vmu.c index 060df026..f79cd7b8 100644 --- a/kernel/arch/dreamcast/fs/fs_vmu.c +++ b/kernel/arch/dreamcast/fs/fs_vmu.c @@ -15,6 +15,7 @@ #include <arch/types.h> #include <kos/mutex.h> +#include <kos/dbglog.h> #include <dc/fs_vmu.h> #include <dc/vmufs.h> #include <dc/maple.h> diff --git a/kernel/arch/dreamcast/fs/vmufs.c b/kernel/arch/dreamcast/fs/vmufs.c index 67e8a27c..726c223f 100644 --- a/kernel/arch/dreamcast/fs/vmufs.c +++ b/kernel/arch/dreamcast/fs/vmufs.c @@ -10,6 +10,7 @@ #include <string.h> #include <time.h> +#include <kos/dbglog.h> #include <kos/mutex.h> #include <dc/vmufs.h> #include <dc/maple.h> diff --git a/kernel/arch/dreamcast/hardware/flashrom.c b/kernel/arch/dreamcast/hardware/flashrom.c index d2c3b9b5..764e4327 100644 --- a/kernel/arch/dreamcast/hardware/flashrom.c +++ b/kernel/arch/dreamcast/hardware/flashrom.c @@ -19,6 +19,7 @@ #include <stdlib.h> #include <dc/flashrom.h> #include <dc/syscalls.h> +#include <kos/dbglog.h> #include <arch/irq.h> static void strcpy_no_term(char *dest, const char *src, size_t destsize) { diff --git a/kernel/arch/dreamcast/hardware/g2dma.c b/kernel/arch/dreamcast/hardware/g2dma.c index d618a4b4..ed37533d 100644 --- a/kernel/arch/dreamcast/hardware/g2dma.c +++ b/kernel/arch/dreamcast/hardware/g2dma.c @@ -11,6 +11,7 @@ #include <errno.h> #include <dc/asic.h> #include <dc/g2bus.h> +#include <kos/dbglog.h> #include <kos/sem.h> #include <kos/thread.h> diff --git a/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c b/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c index dd1e9e8c..524aca63 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c @@ -14,6 +14,7 @@ #include <dc/vblank.h> #include <kos/thread.h> #include <kos/init.h> +#include <kos/dbglog.h> #include <dc/maple/controller.h> #include <dc/maple/keyboard.h> diff --git a/kernel/arch/dreamcast/hardware/maple/maple_utils.c b/kernel/arch/dreamcast/hardware/maple/maple_utils.c index c12db5c6..b1a58570 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_utils.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_utils.c @@ -10,6 +10,7 @@ #include <string.h> #include <arch/memory.h> #include <dc/maple.h> +#include <kos/dbglog.h> /* Enable / Disable the bus */ void maple_bus_enable(void) { diff --git a/kernel/arch/dreamcast/hardware/maple/sip.c b/kernel/arch/dreamcast/hardware/maple/sip.c index f51cc9ee..7dfb2189 100644 --- a/kernel/arch/dreamcast/hardware/maple/sip.c +++ b/kernel/arch/dreamcast/hardware/maple/sip.c @@ -9,6 +9,7 @@ #include <string.h> #include <stdlib.h> #include <arch/irq.h> +#include <kos/dbglog.h> #include <kos/genwait.h> #include <dc/maple.h> #include <dc/maple/sip.h> diff --git a/kernel/arch/dreamcast/hardware/maple/vmu.c b/kernel/arch/dreamcast/hardware/maple/vmu.c index 2a4fc304..f41a862d 100644 --- a/kernel/arch/dreamcast/hardware/maple/vmu.c +++ b/kernel/arch/dreamcast/hardware/maple/vmu.c @@ -19,6 +19,7 @@ #include <kos/thread.h> #include <kos/genwait.h> #include <kos/platform.h> +#include <kos/dbglog.h> #include <dc/maple.h> #include <dc/maple/vmu.h> #include <dc/math.h> diff --git a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c index 36df6dad..9201a9d8 100644 --- a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c +++ b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c @@ -19,6 +19,7 @@ #include <arch/irq.h> #include <arch/cache.h> #include <arch/memory.h> +#include <kos/dbglog.h> #include <kos/net.h> #include <kos/thread.h> #include <kos/sem.h> diff --git a/kernel/arch/dreamcast/hardware/network/lan_adapter.c b/kernel/arch/dreamcast/hardware/network/lan_adapter.c index 37243343..1507179e 100644 --- a/kernel/arch/dreamcast/hardware/network/lan_adapter.c +++ b/kernel/arch/dreamcast/hardware/network/lan_adapter.c @@ -15,6 +15,7 @@ #include <dc/flashrom.h> #include <dc/net/lan_adapter.h> #include <arch/irq.h> +#include <kos/dbglog.h> #include <kos/net.h> #include <kos/thread.h> diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_dma.c b/kernel/arch/dreamcast/hardware/pvr/pvr_dma.c index 6f40f895..aeb28b39 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_dma.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_dma.c @@ -17,6 +17,7 @@ #include <dc/sq.h> #include <kos/thread.h> #include <kos/sem.h> +#include <kos/dbglog.h> #include "pvr_internal.h" diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_fog.c b/kernel/arch/dreamcast/hardware/pvr/pvr_fog.c index b7da92d3..a582da49 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_fog.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_fog.c @@ -8,6 +8,8 @@ #include <assert.h> #include <stdio.h> #include <dc/pvr.h> +#include <kos/dbglog.h> + #include "pvr_internal.h" #include "pvr_fog_tables.h" diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c b/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c index c70758cf..41036b4a 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c @@ -12,6 +12,7 @@ #include <dc/video.h> #include <dc/asic.h> #include <dc/vblank.h> +#include <kos/dbglog.h> #include "pvr_internal.h" /* diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c b/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c index 65b573e1..dbed3407 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c @@ -33,6 +33,7 @@ #include "pvr_mem_core.h" +#include <kos/dbglog.h> #include <kos/opts.h> #undef DEBUG diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_scene.c b/kernel/arch/dreamcast/hardware/pvr/pvr_scene.c index 74d8a3d1..eee57285 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_scene.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_scene.c @@ -10,6 +10,7 @@ #include <stdint.h> #include <stdio.h> #include <string.h> +#include <kos/dbglog.h> #include <kos/genwait.h> #include <kos/regfield.h> #include <kos/thread.h> diff --git a/kernel/arch/dreamcast/hardware/video.c b/kernel/arch/dreamcast/hardware/video.c index 62a2fe28..d54e2788 100644 --- a/kernel/arch/dreamcast/hardware/video.c +++ b/kernel/arch/dreamcast/hardware/video.c @@ -10,6 +10,7 @@ #include <dc/video.h> #include <dc/pvr.h> #include <dc/sq.h> +#include <kos/dbglog.h> #include <kos/platform.h> #include <string.h> #include <stdio.h> diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index c9f6ccfc..765f8850 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -11,6 +11,7 @@ #include <stdbool.h> #include <stdlib.h> #include <kos/dbgio.h> +#include <kos/dbglog.h> #include <kos/init.h> #include <kos/platform.h> #include <arch/arch.h> diff --git a/kernel/arch/dreamcast/kernel/irq.c b/kernel/arch/dreamcast/kernel/irq.c index f9b8a2a1..f74e984a 100644 --- a/kernel/arch/dreamcast/kernel/irq.c +++ b/kernel/arch/dreamcast/kernel/irq.c @@ -18,6 +18,7 @@ #include <arch/timer.h> #include <arch/stack.h> #include <kos/dbgio.h> +#include <kos/dbglog.h> #include <kos/thread.h> #include <kos/library.h> #include <kos/regfield.h> diff --git a/kernel/arch/dreamcast/kernel/mm.c b/kernel/arch/dreamcast/kernel/mm.c index cce8885b..37641fe0 100644 --- a/kernel/arch/dreamcast/kernel/mm.c +++ b/kernel/arch/dreamcast/kernel/mm.c @@ -17,6 +17,7 @@ #include <arch/types.h> #include <arch/arch.h> #include <arch/irq.h> +#include <kos/dbglog.h> #include <errno.h> #include <stdio.h> diff --git a/kernel/arch/dreamcast/sound/snd_iface.c b/kernel/arch/dreamcast/sound/snd_iface.c index ba57e0f8..c32787e6 100644 --- a/kernel/arch/dreamcast/sound/snd_iface.c +++ b/kernel/arch/dreamcast/sound/snd_iface.c @@ -12,6 +12,7 @@ #include <assert.h> #include <stdio.h> +#include <kos/dbglog.h> #include <kos/mutex.h> #include <arch/timer.h> #include <dc/g2bus.h> diff --git a/kernel/arch/dreamcast/sound/snd_mem.c b/kernel/arch/dreamcast/sound/snd_mem.c index a458817a..b477370c 100644 --- a/kernel/arch/dreamcast/sound/snd_mem.c +++ b/kernel/arch/dreamcast/sound/snd_mem.c @@ -14,6 +14,7 @@ #include <sys/queue.h> #include <dc/sound/sound.h> #include <arch/spinlock.h> +#include <kos/dbglog.h> /* diff --git a/kernel/arch/dreamcast/sound/snd_sfxmgr.c b/kernel/arch/dreamcast/sound/snd_sfxmgr.c index e09bfcbb..31f974a9 100644 --- a/kernel/arch/dreamcast/sound/snd_sfxmgr.c +++ b/kernel/arch/dreamcast/sound/snd_sfxmgr.c @@ -17,6 +17,7 @@ #include <sys/queue.h> #include <sys/ioctl.h> +#include <kos/dbglog.h> #include <kos/fs.h> #include <arch/irq.h> #include <dc/spu.h> diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 87ebf169..9e11de86 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -17,6 +17,7 @@ #include <errno.h> #include <sys/queue.h> +#include <kos/dbglog.h> #include <kos/mutex.h> #include <arch/cache.h> #include <arch/timer.h> diff --git a/kernel/arch/dreamcast/util/screenshot.c b/kernel/arch/dreamcast/util/screenshot.c index 5e6de6d8..da3cc837 100644 --- a/kernel/arch/dreamcast/util/screenshot.c +++ b/kernel/arch/dreamcast/util/screenshot.c @@ -12,6 +12,7 @@ #include <stdlib.h> #include <string.h> #include <dc/video.h> +#include <kos/dbglog.h> #include <kos/fs.h> #include <arch/irq.h> diff --git a/kernel/arch/dreamcast/util/vmu_pkg.c b/kernel/arch/dreamcast/util/vmu_pkg.c index faba9589..1082146d 100644 --- a/kernel/arch/dreamcast/util/vmu_pkg.c +++ b/kernel/arch/dreamcast/util/vmu_pkg.c @@ -9,6 +9,7 @@ #include <stdio.h> #include <string.h> #include <dc/vmu_pkg.h> +#include <kos/dbglog.h> #include <kos/fs.h> #include <kos/regfield.h> diff --git a/kernel/fs/elf.c b/kernel/fs/elf.c index 1430a4c6..a267826f 100644 --- a/kernel/fs/elf.c +++ b/kernel/fs/elf.c @@ -15,6 +15,7 @@ #include <kos/exports.h> #include <kos/thread.h> #include <kos/library.h> +#include <kos/dbglog.h> /* What's our architecture code we're expecting? */ #if defined(_arch_dreamcast) diff --git a/kernel/fs/fs.c b/kernel/fs/fs.c index ce5ffef6..01f669dc 100644 --- a/kernel/fs/fs.c +++ b/kernel/fs/fs.c @@ -39,6 +39,7 @@ something like this: #include <kos/mutex.h> #include <kos/nmmgr.h> #include <kos/dbgio.h> +#include <kos/dbglog.h> /* File handle structure; this is an entirely internal structure so it does not go in a header file. */ diff --git a/kernel/fs/fs_dev.c b/kernel/fs/fs_dev.c index 919f000a..5ca09161 100644 --- a/kernel/fs/fs_dev.c +++ b/kernel/fs/fs_dev.c @@ -11,6 +11,7 @@ #include <errno.h> #include <arch/types.h> +#include <kos/dbglog.h> #include <kos/fs_dev.h> #include <sys/queue.h> diff --git a/kernel/fs/fs_random.c b/kernel/fs/fs_random.c index e8c3de4e..01f9edda 100644 --- a/kernel/fs/fs_random.c +++ b/kernel/fs/fs_random.c @@ -14,6 +14,7 @@ #include <arch/types.h> #include <kos/mutex.h> #include <kos/fs_random.h> +#include <kos/dbglog.h> ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |