You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(35) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(37) |
Feb
(10) |
Mar
|
Apr
(2) |
May
(17) |
Jun
(1) |
Jul
(14) |
Aug
(14) |
Sep
(4) |
Oct
|
Nov
(14) |
Dec
(4) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(92) |
Dec
(12) |
2006 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(5) |
May
(3) |
Jun
(15) |
Jul
(3) |
Aug
(1) |
Sep
(29) |
Oct
(1) |
Nov
(6) |
Dec
(5) |
2007 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
(3) |
May
(14) |
Jun
(2) |
Jul
(16) |
Aug
(73) |
Sep
(12) |
Oct
(9) |
Nov
(27) |
Dec
(3) |
2008 |
Jan
(4) |
Feb
(4) |
Mar
(3) |
Apr
(8) |
May
(23) |
Jun
(4) |
Jul
(1) |
Aug
(3) |
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
2009 |
Jan
|
Feb
(10) |
Mar
|
Apr
(4) |
May
(4) |
Jun
(10) |
Jul
|
Aug
(1) |
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
(6) |
May
|
Jun
(3) |
Jul
(11) |
Aug
(1) |
Sep
|
Oct
(15) |
Nov
(1) |
Dec
(5) |
2011 |
Jan
(4) |
Feb
(1) |
Mar
(6) |
Apr
|
May
(22) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2012 |
Jan
|
Feb
(10) |
Mar
(1) |
Apr
(6) |
May
(27) |
Jun
(48) |
Jul
(30) |
Aug
(4) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(11) |
2013 |
Jan
(4) |
Feb
(7) |
Mar
(6) |
Apr
(18) |
May
(28) |
Jun
(20) |
Jul
|
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(7) |
2014 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(9) |
May
(11) |
Jun
(10) |
Jul
|
Aug
(18) |
Sep
(12) |
Oct
(17) |
Nov
(10) |
Dec
(16) |
2015 |
Jan
(5) |
Feb
(1) |
Mar
(5) |
Apr
(4) |
May
(28) |
Jun
(2) |
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
(2) |
Dec
(1) |
2016 |
Jan
(14) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(1) |
2017 |
Jan
(11) |
Feb
|
Mar
(21) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(4) |
Nov
|
Dec
(1) |
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
(10) |
Feb
(9) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(18) |
Jul
(4) |
Aug
(2) |
Sep
(20) |
Oct
(2) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2022 |
Jan
(1) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2023 |
Jan
(10) |
Feb
(7) |
Mar
(29) |
Apr
(31) |
May
(29) |
Jun
(34) |
Jul
(3) |
Aug
(24) |
Sep
(22) |
Oct
(10) |
Nov
(38) |
Dec
(27) |
2024 |
Jan
(15) |
Feb
(8) |
Mar
(4) |
Apr
(20) |
May
(33) |
Jun
(18) |
Jul
(15) |
Aug
(23) |
Sep
(26) |
Oct
(32) |
Nov
(6) |
Dec
(4) |
2025 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
(4) |
May
(46) |
Jun
(19) |
Jul
(20) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: falcovorbis <fal...@us...> - 2024-05-28 16:25:05
|
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 788aafa96191e5a1008a05a563ee58370fc484c9 (commit) from 241724aaf43c5962ff16f214985872895bbdf757 (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 788aafa96191e5a1008a05a563ee58370fc484c9 Author: Donald Haase <qu...@ya...> Date: Tue May 28 12:24:32 2024 -0400 Add missing __END_DECLS (#596) Co-authored-by: QuzarDC <qu...@co...> ----------------------------------------------------------------------- Summary of changes: addons/libkosext2fs/inode.h | 2 ++ addons/libkosfat/bpb.h | 2 ++ addons/libkosfat/directory.h | 2 ++ addons/libkosfat/ucs.h | 2 ++ include/kos/oneshot_timer.h | 2 ++ kernel/arch/dreamcast/include/dc/math.h | 2 ++ 6 files changed, 12 insertions(+) diff --git a/addons/libkosext2fs/inode.h b/addons/libkosext2fs/inode.h index 24d43419..35a4be09 100644 --- a/addons/libkosext2fs/inode.h +++ b/addons/libkosext2fs/inode.h @@ -162,4 +162,6 @@ uint8_t *ext2_inode_read_block(ext2_fs_t *fs, const ext2_inode_t *inode, int ext2_resolve_symlink(ext2_fs_t *fs, ext2_inode_t *inode, char *rv, size_t *rv_len); +__END_DECLS + #endif /* !__EXT2_INODE_H */ diff --git a/addons/libkosfat/bpb.h b/addons/libkosfat/bpb.h index 8f89c2d7..bc57f9b7 100644 --- a/addons/libkosfat/bpb.h +++ b/addons/libkosfat/bpb.h @@ -112,4 +112,6 @@ int fat_write_fsinfo(fat_fs_t *fs); void fat_print_superblock(const fat_superblock_t *sb); #endif +__END_DECLS + #endif /* !__FAT_BPB_H */ diff --git a/addons/libkosfat/directory.h b/addons/libkosfat/directory.h index f04be5f6..b938ef40 100644 --- a/addons/libkosfat/directory.h +++ b/addons/libkosfat/directory.h @@ -81,4 +81,6 @@ void fat_update_mtime(fat_dentry_t *ent); void fat_dentry_print(const fat_dentry_t *ent); #endif +__END_DECLS + #endif /* !__FAT_DIRECTORY_H */ diff --git a/addons/libkosfat/ucs.h b/addons/libkosfat/ucs.h index 8a8cf283..1b73a42c 100644 --- a/addons/libkosfat/ucs.h +++ b/addons/libkosfat/ucs.h @@ -20,4 +20,6 @@ int fat_ucs2_to_utf8(uint8_t *out, const uint16_t *in, size_t olen, size_t fat_strlen_ucs2(const uint16_t *in); void fat_ucs2_tolower(uint16_t *in, size_t len); +__END_DECLS + #endif /* !__FAT_UCS_H */ diff --git a/include/kos/oneshot_timer.h b/include/kos/oneshot_timer.h index 2d060a64..40c27048 100644 --- a/include/kos/oneshot_timer.h +++ b/include/kos/oneshot_timer.h @@ -121,4 +121,6 @@ static inline void oneshot_timer_reset(oneshot_timer_t *timer) { oneshot_timer_start(timer); } +__END_DECLS + #endif /* __KOS_ONESHOT_TIMER_H */ diff --git a/kernel/arch/dreamcast/include/dc/math.h b/kernel/arch/dreamcast/include/dc/math.h index 7fb238ad..245a6ff0 100644 --- a/kernel/arch/dreamcast/include/dc/math.h +++ b/kernel/arch/dreamcast/include/dc/math.h @@ -35,4 +35,6 @@ unsigned int bit_reverse(unsigned int value); /** @} */ +__END_DECLS + #endif /* __DC_MATH_H */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-05-23 21:18: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 b0662100c30161bb25c9af862b5b774e6743c981 (commit) from d5553ac464fdd0057240f608a8f26d266c2c091a (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 b0662100c30161bb25c9af862b5b774e6743c981 Author: Donald Haase <qu...@ya...> Date: Thu May 23 17:17:58 2024 -0400 Cleaning up filename function to simplify and correct buffer overflow (#590) Co-authored-by: QuzarDC <qu...@co...> ----------------------------------------------------------------------- Summary of changes: utils/vqenc/vqenc.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/utils/vqenc/vqenc.c b/utils/vqenc/vqenc.c index d8685d04..f88933c0 100644 --- a/utils/vqenc/vqenc.c +++ b/utils/vqenc/vqenc.c @@ -684,30 +684,21 @@ static void place_quads(context_t *cb, mipmap_t *m) { static const char *figure_outfilename(const char *f, const char *newext) { - char *newname; char *ext; + size_t namelen; + char *newname; ext = strrchr(f, '.'); - if(ext == NULL) { - newname = (char *)malloc(strlen(f) + strlen(newext) + 2); + namelen = (ext == NULL) ? strlen(f) : (ext - f); - if(newname) { - sprintf(newname, "%s.%s", f, newext); - } - } - else { - int len; + newname = (char *)calloc(namelen + strlen(newext) + 2, sizeof(char)); - len = (ext - f) + strlen(newext) + 2; - newname = (char *)malloc(len); + if(!newname) return NULL; - if(newname) { - strcpy(newname, f); - ext = strrchr(newname, '.') + 1; - strcpy(ext, newext); - } - } + strncpy(newname, f, namelen); + strcat(newname, "."); + strcat(newname, newext); return newname; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-05-23 02:56: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 d5553ac464fdd0057240f608a8f26d266c2c091a (commit) from da8b487f97bc72ee11e601f5513eff6970ecae95 (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 d5553ac464fdd0057240f608a8f26d266c2c091a Author: darcagn <da...@pr...> Date: Wed May 22 20:56:01 2024 -0600 dc-chain: Update profiles for 13.3.0 release (#585) ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/Makefile.default.cfg | 3 +- utils/dc-chain/README.md | 3 +- .../{gcc-13.2.1-kos.diff => gcc-13.3.0-kos.diff} | 48 +++++++++++----------- .../{gcc-13.2.1-kos.diff => gcc-13.3.1-kos.diff} | 48 +++++++++++----------- .../{profile.14.1.0.mk => profile.13.3.0.mk} | 2 +- ...profile.13.2.1-dev.mk => profile.13.3.1-dev.mk} | 4 +- 6 files changed, 55 insertions(+), 53 deletions(-) copy utils/dc-chain/patches/{gcc-13.2.1-kos.diff => gcc-13.3.0-kos.diff} (74%) rename utils/dc-chain/patches/{gcc-13.2.1-kos.diff => gcc-13.3.1-kos.diff} (74%) copy utils/dc-chain/profiles/{profile.14.1.0.mk => profile.13.3.0.mk} (98%) rename utils/dc-chain/profiles/{profile.13.2.1-dev.mk => profile.13.3.1-dev.mk} (94%) diff --git a/utils/dc-chain/Makefile.default.cfg b/utils/dc-chain/Makefile.default.cfg index d7c9089f..203f66d2 100644 --- a/utils/dc-chain/Makefile.default.cfg +++ b/utils/dc-chain/Makefile.default.cfg @@ -14,9 +14,10 @@ # - 11.4.0: Latest release in the GCC 11 series, released 2023-05-15. # - 12.3.0: Latest release in the GCC 12 series, released 2023-05-08. # - stable: Tested stable; based on GCC 13.2.0, released 2023-07-27. +# - 13.3.0: Latest release in the GCC 13 series, released 2024-05-21. # - 14.1.0: Latest release in the GCC 14 series, released 2024-05-07. # Development versions: -# - 13.2.1-dev Bleeding edge GCC 13 series from git. +# - 13.3.1-dev Bleeding edge GCC 13 series from git. # - 14.1.1-dev Bleeding edge GCC 14 series from git. # - 15.0.0-dev Bleeding edge GCC 15 series from git. # - gccrs-dev: GCC fork for development of the GCCRS Rust compiler. diff --git a/utils/dc-chain/README.md b/utils/dc-chain/README.md index 990d203a..02a54190 100644 --- a/utils/dc-chain/README.md +++ b/utils/dc-chain/README.md @@ -104,8 +104,9 @@ The following toolchain profiles are available for users to select in | 11.4.0 | 11.4.0 | 4.3.0 | 2.41 | 8.5.0 | 2.41 | Latest release in the GCC 11 series, released 2023-05-15 | | 12.3.0 | 12.3.0 | 4.3.0 | 2.41 | 8.5.0 | 2.41 | Latest release in the GCC 12 series, released 2023-05-08 | | **stable** | **13.2.0** | **4.3.0** | **2.41** | **8.5.0** | **2.41** | **Tested stable; based on GCC 13.2.0, released 2023-07-27** | +| 13.3.0 | 13.3.0 | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Latest release in the GCC 13 series, released 2024-05-21 | | 14.1.0 | 14.1.0 | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Latest release in the GCC 14 series, released 2024-05-07 | -| 13.2.1-dev | 13.2.1 (git) | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Bleeding edge GCC 13 series from git | +| 13.3.1-dev | 13.3.1 (git) | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Bleeding edge GCC 13 series from git | | 14.1.1-dev | 14.0.1 (git) | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Bleeding edge GCC 14 series from git | | 15.0.0-dev | 15.0.0 (git) | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Bleeding edge GCC 15 series from git | | gccrs-dev | 14.x | 4.4.0 | 2.42 | 8.5.0 | 2.42 | GCC fork for development of the GCCRS Rust compiler | diff --git a/utils/dc-chain/patches/gcc-13.2.1-kos.diff b/utils/dc-chain/patches/gcc-13.3.0-kos.diff similarity index 74% copy from utils/dc-chain/patches/gcc-13.2.1-kos.diff copy to utils/dc-chain/patches/gcc-13.3.0-kos.diff index d3330154..b5efbe57 100644 --- a/utils/dc-chain/patches/gcc-13.2.1-kos.diff +++ b/utils/dc-chain/patches/gcc-13.3.0-kos.diff @@ -1,6 +1,6 @@ -diff --color -ruN gcc-13.2.1/gcc/config/sh/sh-c.cc gcc-13.2.1-kos/gcc/config/sh/sh-c.cc ---- gcc-13.2.1/gcc/config/sh/sh-c.cc 2023-06-04 20:48:46.612552162 -0500 -+++ gcc-13.2.1-kos/gcc/config/sh/sh-c.cc 2023-06-04 20:49:03.486606055 -0500 +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 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -13,9 +13,9 @@ diff --color -ruN gcc-13.2.1/gcc/config/sh/sh-c.cc gcc-13.2.1-kos/gcc/config/sh/ + /* Toolchain supports setting up stack for 32MB */ + builtin_define ("__KOS_GCC_32MB__"); } -diff --color -ruN gcc-13.2.1/gcc/configure gcc-13.2.1-kos/gcc/configure ---- gcc-13.2.1/gcc/configure 2023-06-04 20:48:49.679561957 -0500 -+++ gcc-13.2.1-kos/gcc/configure 2023-06-04 20:49:03.488606061 -0500 +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 @@ target_thread_file='single' ;; @@ -25,9 +25,9 @@ diff --color -ruN gcc-13.2.1/gcc/configure gcc-13.2.1-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff --color -ruN gcc-13.2.1/libgcc/config/sh/t-sh gcc-13.2.1-kos/libgcc/config/sh/t-sh ---- gcc-13.2.1/libgcc/config/sh/t-sh 2023-06-04 20:48:45.741549380 -0500 -+++ gcc-13.2.1-kos/libgcc/config/sh/t-sh 2023-06-04 20:49:03.488606061 -0500 +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 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -37,9 +37,9 @@ diff --color -ruN gcc-13.2.1/libgcc/config/sh/t-sh gcc-13.2.1-kos/libgcc/config/ crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff --color -ruN gcc-13.2.1/libgcc/configure gcc-13.2.1-kos/libgcc/configure ---- gcc-13.2.1/libgcc/configure 2023-06-04 20:48:45.787549527 -0500 -+++ gcc-13.2.1-kos/libgcc/configure 2023-06-04 20:49:03.489606065 -0500 +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 @@ -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.2.1/libgcc/configure gcc-13.2.1-kos/libgcc/configure mcf) thread_header=config/i386/gthr-mcf.h ;; esac -diff --color -ruN gcc-13.2.1/libobjc/configure gcc-13.2.1-kos/libobjc/configure ---- gcc-13.2.1/libobjc/configure 2023-06-04 20:48:49.902562670 -0500 -+++ gcc-13.2.1-kos/libobjc/configure 2023-06-04 20:49:03.489606065 -0500 +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 @@ -2918,11 +2918,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -63,9 +63,9 @@ diff --color -ruN gcc-13.2.1/libobjc/configure gcc-13.2.1-kos/libobjc/configure ; return 0; } -diff --color -ruN gcc-13.2.1/libobjc/Makefile.in gcc-13.2.1-kos/libobjc/Makefile.in ---- gcc-13.2.1/libobjc/Makefile.in 2023-06-04 20:48:49.901562666 -0500 -+++ gcc-13.2.1-kos/libobjc/Makefile.in 2023-06-04 20:49:03.490606068 -0500 +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 @@ -308,14 +308,16 @@ $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) @@ -96,9 +96,9 @@ diff --color -ruN gcc-13.2.1/libobjc/Makefile.in gcc-13.2.1-kos/libobjc/Makefile mostlyclean: -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo -diff --color -ruN gcc-13.2.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.2.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-13.2.1/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-04 20:48:46.047550357 -0500 -+++ gcc-13.2.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-04 20:49:03.490606068 -0500 +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 @@ -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.2.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.2.1-k + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -diff --color -ruN gcc-13.2.1/libstdc++-v3/configure gcc-13.2.1-kos/libstdc++-v3/configure ---- gcc-13.2.1/libstdc++-v3/configure 2023-06-04 20:48:46.398551478 -0500 -+++ gcc-13.2.1-kos/libstdc++-v3/configure 2023-06-04 20:49:03.493606077 -0500 +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 @@ -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.2.1-kos.diff b/utils/dc-chain/patches/gcc-13.3.1-kos.diff similarity index 74% rename from utils/dc-chain/patches/gcc-13.2.1-kos.diff rename to utils/dc-chain/patches/gcc-13.3.1-kos.diff index d3330154..aa831e2b 100644 --- a/utils/dc-chain/patches/gcc-13.2.1-kos.diff +++ b/utils/dc-chain/patches/gcc-13.3.1-kos.diff @@ -1,6 +1,6 @@ -diff --color -ruN gcc-13.2.1/gcc/config/sh/sh-c.cc gcc-13.2.1-kos/gcc/config/sh/sh-c.cc ---- gcc-13.2.1/gcc/config/sh/sh-c.cc 2023-06-04 20:48:46.612552162 -0500 -+++ gcc-13.2.1-kos/gcc/config/sh/sh-c.cc 2023-06-04 20:49:03.486606055 -0500 +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 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -13,9 +13,9 @@ diff --color -ruN gcc-13.2.1/gcc/config/sh/sh-c.cc gcc-13.2.1-kos/gcc/config/sh/ + /* Toolchain supports setting up stack for 32MB */ + builtin_define ("__KOS_GCC_32MB__"); } -diff --color -ruN gcc-13.2.1/gcc/configure gcc-13.2.1-kos/gcc/configure ---- gcc-13.2.1/gcc/configure 2023-06-04 20:48:49.679561957 -0500 -+++ gcc-13.2.1-kos/gcc/configure 2023-06-04 20:49:03.488606061 -0500 +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 @@ target_thread_file='single' ;; @@ -25,9 +25,9 @@ diff --color -ruN gcc-13.2.1/gcc/configure gcc-13.2.1-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff --color -ruN gcc-13.2.1/libgcc/config/sh/t-sh gcc-13.2.1-kos/libgcc/config/sh/t-sh ---- gcc-13.2.1/libgcc/config/sh/t-sh 2023-06-04 20:48:45.741549380 -0500 -+++ gcc-13.2.1-kos/libgcc/config/sh/t-sh 2023-06-04 20:49:03.488606061 -0500 +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 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -37,9 +37,9 @@ diff --color -ruN gcc-13.2.1/libgcc/config/sh/t-sh gcc-13.2.1-kos/libgcc/config/ crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff --color -ruN gcc-13.2.1/libgcc/configure gcc-13.2.1-kos/libgcc/configure ---- gcc-13.2.1/libgcc/configure 2023-06-04 20:48:45.787549527 -0500 -+++ gcc-13.2.1-kos/libgcc/configure 2023-06-04 20:49:03.489606065 -0500 +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 @@ -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.2.1/libgcc/configure gcc-13.2.1-kos/libgcc/configure mcf) thread_header=config/i386/gthr-mcf.h ;; esac -diff --color -ruN gcc-13.2.1/libobjc/configure gcc-13.2.1-kos/libobjc/configure ---- gcc-13.2.1/libobjc/configure 2023-06-04 20:48:49.902562670 -0500 -+++ gcc-13.2.1-kos/libobjc/configure 2023-06-04 20:49:03.489606065 -0500 +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 @@ -2918,11 +2918,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -63,9 +63,9 @@ diff --color -ruN gcc-13.2.1/libobjc/configure gcc-13.2.1-kos/libobjc/configure ; return 0; } -diff --color -ruN gcc-13.2.1/libobjc/Makefile.in gcc-13.2.1-kos/libobjc/Makefile.in ---- gcc-13.2.1/libobjc/Makefile.in 2023-06-04 20:48:49.901562666 -0500 -+++ gcc-13.2.1-kos/libobjc/Makefile.in 2023-06-04 20:49:03.490606068 -0500 +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 @@ -308,14 +308,16 @@ $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) @@ -96,9 +96,9 @@ diff --color -ruN gcc-13.2.1/libobjc/Makefile.in gcc-13.2.1-kos/libobjc/Makefile mostlyclean: -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo -diff --color -ruN gcc-13.2.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.2.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-13.2.1/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-04 20:48:46.047550357 -0500 -+++ gcc-13.2.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-04 20:49:03.490606068 -0500 +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 @@ -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.2.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.2.1-k + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -diff --color -ruN gcc-13.2.1/libstdc++-v3/configure gcc-13.2.1-kos/libstdc++-v3/configure ---- gcc-13.2.1/libstdc++-v3/configure 2023-06-04 20:48:46.398551478 -0500 -+++ gcc-13.2.1-kos/libstdc++-v3/configure 2023-06-04 20:49:03.493606077 -0500 +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 @@ -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/profiles/profile.14.1.0.mk b/utils/dc-chain/profiles/profile.13.3.0.mk similarity index 98% copy from utils/dc-chain/profiles/profile.14.1.0.mk copy to utils/dc-chain/profiles/profile.13.3.0.mk index 6636ff6a..7f9f801e 100644 --- a/utils/dc-chain/profiles/profile.14.1.0.mk +++ b/utils/dc-chain/profiles/profile.13.3.0.mk @@ -3,7 +3,7 @@ # Toolchain versions for SH sh_binutils_ver=2.42 -sh_gcc_ver=14.1.0 +sh_gcc_ver=13.3.0 newlib_ver=4.4.0.20231231 gdb_ver=14.2 diff --git a/utils/dc-chain/profiles/profile.13.2.1-dev.mk b/utils/dc-chain/profiles/profile.13.3.1-dev.mk similarity index 94% rename from utils/dc-chain/profiles/profile.13.2.1-dev.mk rename to utils/dc-chain/profiles/profile.13.3.1-dev.mk index c4beb88b..ee427ee8 100644 --- a/utils/dc-chain/profiles/profile.13.2.1-dev.mk +++ b/utils/dc-chain/profiles/profile.13.3.1-dev.mk @@ -4,13 +4,13 @@ ############################################################################### ############################################################################### ### THIS CONFIG IS FOR AN EXPERIMENTAL VERSION OF GCC! -## THERE ARE NO KNOWN ISSUES BUILDING THIS VERSION as of 2024-04-23. +## THERE ARE NO KNOWN ISSUES BUILDING THIS VERSION as of 2024-05-21. ############################################################################### ############################################################################### # Toolchain versions for SH sh_binutils_ver=2.42 -sh_gcc_ver=13.2.1 +sh_gcc_ver=13.3.1 newlib_ver=4.4.0.20231231 gdb_ver=14.2 hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-05-21 13:56:02
|
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 da8b487f97bc72ee11e601f5513eff6970ecae95 (commit) from e0b462e01dfe24cd573fd63c705d8e1300ec7cba (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 da8b487f97bc72ee11e601f5513eff6970ecae95 Author: Falco Girgis <gyr...@gm...> Date: Tue May 21 08:55:30 2024 -0500 Stack Protector environ.sh Option + Example Tweak (#580) * Fixed up stackprotector example to work with LTO. And to eventually be usable as an automated test which has its return value examined. * Added environ config option for stack protector. ----------------------------------------------------------------------- Summary of changes: doc/environ.sh.sample | 11 +++++++++ .../basic/stackprotector/stackprotector.c | 27 ++++++++++++++++------ kernel/arch/dreamcast/include/arch/stack.h | 2 +- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/doc/environ.sh.sample b/doc/environ.sh.sample index b2d26752..0c6347b1 100644 --- a/doc/environ.sh.sample +++ b/doc/environ.sh.sample @@ -143,6 +143,17 @@ export KOS_CFLAGS="${KOS_CFLAGS} -O2" export KOS_CFLAGS="${KOS_CFLAGS} -fomit-frame-pointer" #export KOS_CFLAGS="${KOS_CFLAGS} -fno-omit-frame-pointer -DFRAME_POINTERS" +# Stack Protector +# +# Controls whether GCC emits extra code to check for buffer overflows or stack +# smashing, which can be very useful for debugging. -fstack-protector only +# covers vulnerable objects, while -fstack-protector-strong provides medium +# coverage, and -fstack-protector-all provides full coverage. You may also +# override the default stack excepton handler by providing your own +# implementation of "void __stack_chk_fail(void)." +# +#export KOS_CFLAGS="${KOS_CFLAGS} -fstack-protector-all" + # GCC Builtin Functions # # Comment out this line to enable GCC to use its own builtin implementations of diff --git a/examples/dreamcast/basic/stackprotector/stackprotector.c b/examples/dreamcast/basic/stackprotector/stackprotector.c index 4f8ea139..ca89b594 100644 --- a/examples/dreamcast/basic/stackprotector/stackprotector.c +++ b/examples/dreamcast/basic/stackprotector/stackprotector.c @@ -2,6 +2,7 @@ stackprotector.c Copyright (C) 2021 Lawrence Sebald + Copyright (C) 2024 Falco Girgis */ /* This example shows how to make use of GCC's -fstack-protector options to @@ -26,19 +27,29 @@ #include <string.h> #include <stdio.h> #include <arch/arch.h> +#include <stdlib.h> /* This function will override the default stack protector handler that is defined in Newlib. This is not necessary to enable the stack protector, but is nice for being able to draw the error message to the screen or - whatnot (not that we do any of that here). */ -void __stack_chk_fail(void) { + whatnot (not that we do any of that here). + + NOTE: Typically you would want to call abort() and/or write to stderr + rather than stdout, but we exit gracefully in this example due to + the fact that we're simply testing the stack checker functionality. + + WARNING: This function must be explicitly marked with the used attribute + when compiling with LTO enabled to prevent it from being removed, + which means you will be calling into Newlib's default handler. +*/ +__used void __stack_chk_fail(void) { unsigned int pr = (unsigned int)arch_get_ret_addr(); printf("Stack smashed at PR=0x%08x\n", pr); - printf("Aborting program.\n"); - arch_abort(); + printf("Successfully detected stack corruption!\n"); + exit(EXIT_SUCCESS); } -__attribute__((noinline)) void badfunc(void) { +__noinline void badfunc(void) { char buffer[8]; strcpy(buffer, "This string is entirely too long and will overflow."); } @@ -46,10 +57,12 @@ __attribute__((noinline)) void badfunc(void) { int main(int argc, char **argv) { printf("Stack protector test....\n"); printf("About to call badfunc()...\n"); + badfunc(); - printf("This shouldn't print out if stack protector is enabled.\n"); - return 0; + fprintf(stderr, "This shouldn't print out if stack protector is enabled.\n"); + + return EXIT_FAILURE; } diff --git a/kernel/arch/dreamcast/include/arch/stack.h b/kernel/arch/dreamcast/include/arch/stack.h index 80cc1f8c..38f1b0be 100644 --- a/kernel/arch/dreamcast/include/arch/stack.h +++ b/kernel/arch/dreamcast/include/arch/stack.h @@ -6,7 +6,7 @@ */ /** \file arch/stack.h - \brief Stack traces. + \brief Stack tracing. \ingroup debugging_stacktrace The functions in this file deal with doing stack traces. These functions hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-05-21 13:32: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 e0b462e01dfe24cd573fd63c705d8e1300ec7cba (commit) via e53988facb6269cbb09d3c5c1bdd4c9ef35beef9 (commit) from e21c5e1e96f4a075d7e006f5c0976ccbca26d858 (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 e0b462e01dfe24cd573fd63c705d8e1300ec7cba Author: Paul Cercueil <pa...@cr...> Date: Tue May 21 15:31:51 2024 +0200 dc/vmu_fb.h: Add missing header guards (#584) Signed-off-by: Paul Cercueil <pa...@cr...> commit e53988facb6269cbb09d3c5c1bdd4c9ef35beef9 Author: Andy Barajas <and...@gm...> Date: Sat May 18 23:16:21 2024 -0700 Add KOS_OBJDUMP (#582) ----------------------------------------------------------------------- Summary of changes: environ_base.sh | 1 + kernel/arch/dreamcast/include/dc/vmu_fb.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/environ_base.sh b/environ_base.sh index f215f98e..ada69c13 100644 --- a/environ_base.sh +++ b/environ_base.sh @@ -32,6 +32,7 @@ export KOS_CCPLUS="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-g++" export KOS_AS="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-as" export KOS_AR="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-gcc-ar" export KOS_OBJCOPY="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-objcopy" +export KOS_OBJDUMP="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-objdump" 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" diff --git a/kernel/arch/dreamcast/include/dc/vmu_fb.h b/kernel/arch/dreamcast/include/dc/vmu_fb.h index 322a5a5f..8f440ca7 100644 --- a/kernel/arch/dreamcast/include/dc/vmu_fb.h +++ b/kernel/arch/dreamcast/include/dc/vmu_fb.h @@ -5,6 +5,9 @@ */ +#ifndef __DC_VMU_FB_H +#define __DC_VMU_FB_H + /** \file dc/vmu_fb.h \brief VMU framebuffer. \ingroup vmu @@ -132,3 +135,5 @@ static __inline__ void vmufb_print_string(vmufb_t *fb, const vmufb_font_t *font, const char *str) { vmufb_print_string_into(fb, font, 0, 0, 48, 32, 0, str); } + +#endif /* __DC_VMU_FB_H */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-05-18 23:32: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 e21c5e1e96f4a075d7e006f5c0976ccbca26d858 (commit) from caf28811f7dd3959565f07ce6dd0bb5e4fa6cde4 (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 e21c5e1e96f4a075d7e006f5c0976ccbca26d858 Author: Falco Girgis <gyr...@gm...> Date: Sat May 18 18:32:09 2024 -0500 Bumped KOS's Default C and C++ Versions to 11 (#561) * Bumped KOS's default C and C++ versions to 11. * Update environ_base.sh Co-authored-by: Donald Haase <qu...@ya...> * Update environ_base.sh Co-authored-by: darcagn <da...@pr...> --------- Co-authored-by: Donald Haase <qu...@ya...> Co-authored-by: darcagn <da...@pr...> ----------------------------------------------------------------------- Summary of changes: environ_base.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environ_base.sh b/environ_base.sh index a02b9018..f215f98e 100644 --- a/environ_base.sh +++ b/environ_base.sh @@ -41,8 +41,8 @@ export KOS_CPPFLAGS="${KOS_CPPFLAGS} ${KOS_INC_PATHS_CPP} -fno-operator-names" # Which standards modes we want to compile for # Note that this only covers KOS itself, not necessarily anything else compiled # with kos-cc or kos-c++. -export KOS_CSTD="-std=c99" -export KOS_CPPSTD="-std=gnu++98" +export KOS_CSTD="-std=gnu17" +export KOS_CPPSTD="-std=gnu++17" export KOS_GCCVER="`kos-cc -dumpversion`" hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: quzar <qu...@us...> - 2024-05-18 01:09:50
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via caf28811f7dd3959565f07ce6dd0bb5e4fa6cde4 (commit) from 426aea1b7727de803f1532dd86e696d2c0914ccd (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 caf28811f7dd3959565f07ce6dd0bb5e4fa6cde4 Author: Falco Girgis <gyr...@gm...> Date: Fri May 17 20:08:49 2024 -0500 Per-thread CPU time implementation (#506) * Initial per-thread CPU time implementation - Maintaining and updating threads' CPU time upon context switches - Printing out time and % of whole when doing thd_pslist() to print - Still seem to have an issue with not having 100% of the CPU time accounted for - Also accidentally snuck in a bunch of general clean-up * Thread-specific CPU time is now WORKING! 1) Fixed a bug with an active thread getting rescheduled which caused it to leak out CPU time 2) Implemented CLOCK_THREAD_CPUTIME_ID for clock_gettime() 3) Still need to make thd_plist() printing prettier for CPU time 4) Enabled _POSIX_THREAD_CPUTIME in time.h - thd_current() -> thd_get_current() in clock_gettime.c. * Got thd_plist() printing prettily finally... - But I really hope that's not just based on how many spaces I have my own terminal configured to represent tabs as... 1) Cleaned up the rest of the threading API to be more "proper" and idiomatic C. No, I shouldn't have broken backwards compat. 2) Added Colton's copyright info, because he did a lot of good TLS work last year and forgot to add it to thread.h and thread.c 3) Tweaked formatting more for thd_pslist()... looks good on my terminal... 4) Cleaned up Doxygen, added everything to kthread group 5) Added comments to initial CPU time synchronization during main thread initialization * Updated thread.h todo list + CHANGELOG. * Apply suggestions from code review Co-authored-by: Andy Barajas <and...@gm...> * Upgraded/fixed _times_r()/clock() based on C spec. - clock() is supposed to measure ACTIVE PROCESS TIME, but we were measuring Wall time, previously. - clock() now attempts to use the performance counters to get active process CPU ticks, but will fall back to the TMU units and wall time. - clock() now gracefully returns -1, per the spec, when the number of ticks can no longer be represented by a clock_t. - Main thread cpu time initialization could also share common update function - Had to tweak the control flow for the display loop grabbing each thread's CPU time to take into consideration how much time is elapsing during printing each value - Found a bug in performance counter stop, which was potentially clearing its configuration and wasn't stopping it. - Added missing performance counter API function: perf_cntr_resume() for non-clearing start after a stop. - Updated general-threading test to show some of the cool new stats. * Apply suggestions from code review Co-authored-by: Donald Haase <qu...@ya...> --------- Co-authored-by: Andy Barajas <and...@gm...> Co-authored-by: darcagn <da...@pr...> Co-authored-by: Donald Haase <qu...@ya...> ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 1 + .../threading/general/general_threading_test.c | 15 +- include/kos/thread.h | 216 +++++++++++++-------- include/kos/time.h | 4 +- kernel/arch/dreamcast/include/dc/perfctr.h | 16 +- kernel/arch/dreamcast/kernel/perfctr.c | 13 +- kernel/libc/newlib/newlib_times.c | 22 ++- kernel/libc/posix/clock_gettime.c | 18 +- kernel/thread/thread.c | 63 ++++-- 9 files changed, 258 insertions(+), 110 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index d367f2cb..3471ca46 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -225,6 +225,7 @@ KallistiOS version 2.1.0 ----------------------------------------------- - *** Add support for worker threads [PC] - DC Added new System Calls module [AB] - DC Add timer_spin_delay_{us,ns} and use them in scif-spi [PC] +- *** Added thread support for tracking CPU time + updated clock_gettime() [FG] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Megan Potter == MP] diff --git a/examples/dreamcast/basic/threading/general/general_threading_test.c b/examples/dreamcast/basic/threading/general/general_threading_test.c index 248494d8..a8afbcf5 100644 --- a/examples/dreamcast/basic/threading/general/general_threading_test.c +++ b/examples/dreamcast/basic/threading/general/general_threading_test.c @@ -2,7 +2,8 @@ general_threading_test.c - (c)2000-2002 Megan Potter + Copyright (C) 2000-2002 Megan Potter + Copyright (C) 2024 Falco Girgis A simple thread example @@ -27,6 +28,8 @@ void *thd_0(void *v) { for(x = 0; x < 320; x++) vram_s[y * 640 + x] = (((x * x) + (y * y)) & 0x1f) << 11; + thd_pslist(printf); + printf("Thread 0 finished\n"); return NULL; } @@ -43,6 +46,9 @@ void *thd_1(void *v) { printf("Thread 1 waiting:\n"); thd_sleep(5000); + + thd_pslist(printf); + printf("Thread 1 exiting\n"); return NULL; } @@ -61,6 +67,9 @@ void *thd_2(void *v) { printf("sem_wait_timed returns %d\n", sem_wait_timed(&sem, 200)); printf("sem_wait_timed returns %d\n", sem_wait_timed(&sem, 200)); printf("sem_wait_timed returns %d\n", sem_wait_timed(&sem, 200)); + + thd_pslist(printf); + printf("Thread 2 exiting\n"); return NULL; } @@ -106,7 +115,7 @@ int main(int argc, char **argv) { (cont_btn_callback_t)arch_exit); /* Print a banner */ - printf("KOS 1.1.x thread program:\n"); + printf("KOS 2.0.x thread program:\n"); /* Create a semaphore for timing purposes */ sem_init(&sem, 1); @@ -189,6 +198,8 @@ int main(int argc, char **argv) { cond_broadcast(&cv); mutex_unlock(&mut); + thd_pslist(printf); + for(i = 0; i < 10; i++) thd_join(t3[i], NULL); diff --git a/include/kos/thread.h b/include/kos/thread.h index 0649f0c1..d8cfba6c 100644 --- a/include/kos/thread.h +++ b/include/kos/thread.h @@ -15,9 +15,6 @@ This file contains the interface to the threading system of KOS. Timer interrupts are used to reschedule threads within the system. - \author Megan Potter - \author Lawrence Sebald - \see arch/timer.h \see kos/genwait.h \see kos/mutex.h @@ -26,6 +23,14 @@ \see kos/rwsem.h \see kos/sem.h \see kos/tls.h + + \todo + - Remove deprecated thread mode API + - Remove global extern pointer to current thread + + \author Megan Potter + \author Lawrence Sebald + \author Falco Girgis */ #ifndef __KOS_THREAD_H @@ -39,7 +44,9 @@ __BEGIN_DECLS #include <arch/irq.h> #include <sys/queue.h> #include <sys/reent.h> + #include <stdint.h> +#include <stdbool.h> /** \defgroup kthreads Kernel \brief KOS Native Kernel Threading API @@ -66,6 +73,8 @@ __BEGIN_DECLS considered detached threads. \sa semaphore_t, mutex_t, kthread_once_t, kthread_key_t, rw_semaphore_t + + @{ */ /** \brief Process ID @@ -110,7 +119,36 @@ TAILQ_HEAD(ktqueue, kthread); LIST_HEAD(ktlist, kthread); /* \endcond */ -/** \brief Control Block Header +/** \name Thread flag values + \brief Flags for kthread_flags_t + + These are possible values for the flags field on the kthread_t structure. + These can be ORed together. + + @{ +*/ +#define THD_DEFAULTS 0 /**< \brief Defaults: no flags */ +#define THD_USER 1 /**< \brief Thread runs in user mode */ +#define THD_QUEUED 2 /**< \brief Thread is in the run queue */ +#define THD_DETACHED 4 /**< \brief Thread is detached */ +/** @} */ + +/** \brief Kernel thread flags type */ +typedef uint8_t kthread_flags_t; + +/** \brief Kernel thread state + + Each thread in the system is in exactly one of this set of states. +*/ +typedef enum kthread_state { + STATE_ZOMBIE = 0x0000, /**< \brief Waiting to die */ + STATE_RUNNING = 0x0001, /**< \brief Process is "current" */ + STATE_READY = 0x0002, /**< \brief Ready to be scheduled */ + STATE_WAIT = 0x0003, /**< \brief Blocked on a genwait */ + STATE_FINISHED = 0x0004 /**< \brief Finished execution */ +} kthread_state_t; + +/** \brief Thread Control Block Header Header preceding the static TLS data segments as defined by the SH-ELF TLS ABI (version 1). This is what the thread pointer @@ -126,8 +164,6 @@ typedef struct tcbhead { Each thread has one of these structures assigned to it, which holds all the data associated with the thread. There are various functions to manipulate the data in here, so you shouldn't generally do so manually. - - \headerfile kos/thread.h */ typedef __attribute__((aligned(32))) struct kthread { /** \brief Register store -- used to save thread context. */ @@ -148,20 +184,22 @@ typedef __attribute__((aligned(32))) struct kthread { /** \brief Static priority: 0..PRIO_MAX (higher means lower priority). */ prio_t prio; - /** \brief Thread flags. - \see thd_flags */ - uint32_t flags; + /** \brief Thread flags. */ + kthread_flags_t flags; - /** \brief Process state. - \see thd_states */ - int state; + /** \brief Process state */ + kthread_state_t state; /** \brief Generic wait target, if waiting. - \see kos/genwait.h */ + + \see kos/genwait.h + */ void *wait_obj; /** \brief Generic wait message, if waiting. - \see kos/genwait.h */ + + \see kos/genwait.h + */ const char *wait_msg; /** \brief Wait timeout callback. @@ -174,24 +212,36 @@ typedef __attribute__((aligned(32))) struct kthread { void (*wait_callback)(void *obj); /** \brief Next scheduled time. + This value is used for sleep and timed block operations. This value is in milliseconds since the start of timer_ms_gettime(). This should be - enough for something like 2 million years of wait time. ;) */ + enough for something like 2 million years of wait time. ;) + */ uint64_t wait_timeout; + /** \brief Per-Thread CPU Time. */ + struct { + uint64_t scheduled; /**< \brief time when the thread became active */ + uint64_t total; /**< \brief total running CPU time for thread */ + } cpu_time; + /** \brief Thread label. - This value is used when printing out a user-readable process listing. */ + + This value is used when printing out a user-readable process listing. + */ char label[KTHREAD_LABEL_SIZE]; /** \brief Current file system path. */ char pwd[KTHREAD_PWD_SIZE]; /** \brief Thread private stack. - This should be a pointer to the base of a stack page. */ - uint32_t *stack; + + This should be a pointer to the base of a stack page. + */ + void *stack; /** \brief Size of the thread's stack, in bytes. */ - uint32_t stack_size; + size_t stack_size; /** \brief Thread errno variable. */ int thd_errno; @@ -200,45 +250,21 @@ typedef __attribute__((aligned(32))) struct kthread { struct _reent thd_reent; /** \brief OS-level thread-local storage. - \see kos/tls.h */ + + \see kos/tls.h + */ struct kthread_tls_kv_list tls_list; /** \brief Compiler-level thread-local storage. */ tcbhead_t* tcbhead; /** \brief Return value of the thread function. - This is only used in joinable threads. */ + + This is only used in joinable threads. + */ void *rv; } kthread_t; -/** \name Thread flag values - \brief kthread_t::flags values - - These are possible values for the flags field on the kthread_t structure. - These can be ORed together. - - @{ -*/ -#define THD_DEFAULTS 0 /**< \brief Defaults: no flags */ -#define THD_USER 1 /**< \brief Thread runs in user mode */ -#define THD_QUEUED 2 /**< \brief Thread is in the run queue */ -#define THD_DETACHED 4 /**< \brief Thread is detached */ -/** @} */ - -/** \name Thread states - \brief kthread_t::state values - - Each thread in the system is in exactly one of this set of states. - - @{ -*/ -#define STATE_ZOMBIE 0x0000 /**< \brief Waiting to die */ -#define STATE_RUNNING 0x0001 /**< \brief Process is "current" */ -#define STATE_READY 0x0002 /**< \brief Ready to be scheduled */ -#define STATE_WAIT 0x0003 /**< \brief Blocked on a genwait */ -#define STATE_FINISHED 0x0004 /**< \brief Finished execution */ -/** @} */ - /** \brief Thread creation attributes. This structure allows you to specify the various attributes for a thread to @@ -253,10 +279,10 @@ typedef __attribute__((aligned(32))) struct kthread { */ typedef struct kthread_attr { /** \brief 1 for a detached thread. */ - int create_detached; + bool create_detached; /** \brief Set the size of the stack to be created. */ - uint32_t stack_size; + size_t stack_size; /** \brief Pre-allocate a stack for the thread. \note If you use this attribute, you must also set stack_size. */ @@ -269,18 +295,19 @@ typedef struct kthread_attr { const char *label; } kthread_attr_t; -/** \name Threading system modes - \brief kthread mode values +/** \brief kthread mode values + + \deprecated + Only preemptive scheduling is still supported! The threading system will always be in one of the following modes. This represents either pre-emptive scheduling or an un-initialized state. - - @{ */ -#define THD_MODE_NONE -1 /**< \brief Threads not running */ -#define THD_MODE_COOP 0 /**< \brief Cooperative mode \deprecated */ -#define THD_MODE_PREEMPT 1 /**< \brief Preemptive threading mode */ -/** @} */ +typedef enum kthread_mode { + THD_MODE_NONE = -1, /**< \brief Threads not running */ + THD_MODE_COOP = 0, /**< \brief Cooperative mode \deprecated */ + THD_MODE_PREEMPT = 1 /**< \brief Preemptive threading mode */ +} kthread_mode_t; /** \cond The currently executing thread -- Do not manipulate directly! */ extern kthread_t *thd_current; @@ -333,13 +360,13 @@ kthread_t *thd_by_tid(tid_t tid); of its priority group. Generally, you will not have to do this manually. \param t The thread to queue. - \param front_of_line Set to 1 to put this thread in front of other - threads of the same priority, 0 to put it behind the - other threads (normal behavior). + \param front_of_line Set to true to put this thread in front of other + threads of the same priority, false to put it + behind the other threads (normal behavior). \sa thd_remove_from_runnable */ -void thd_add_to_runnable(kthread_t *t, int front_of_line); +void thd_add_to_runnable(kthread_t *t, bool front_of_line); /** \brief Removes a thread from the runnable queue, if it's there. \relatesalso kthread_t @@ -364,8 +391,8 @@ int thd_remove_from_runnable(kthread_t *thd); routine completes if the thread is created detached, otherwise you must join the thread with thd_join() to clean up after it. - \param detach Set to 1 to create a detached thread. Set to 0 to - create a joinable thread. + \param detach Set to true to create a detached thread. Set to + false to create a joinable thread. \param routine The function to call in the new thread. \param param A parameter to pass to the function called. @@ -373,9 +400,9 @@ int thd_remove_from_runnable(kthread_t *thd); \sa thd_create_ex, thd_destroy */ -kthread_t *thd_create(int detach, void *(*routine)(void *param), void *param); +kthread_t *thd_create(bool detach, void *(*routine)(void *param), void *param); -/** \brief Create a new thread with the specified set of attributes. +/** \brief Create a new thread with the specified set of attributes. \relatesalso kthread_t This function creates a new kernel thread with the specified set of @@ -433,12 +460,12 @@ void thd_exit(void *rv) __noreturn; thd_current. Set 'now' to non-zero if you want to use a particular system time for checking timeouts. - \param front_of_line Set to 0, unless you have a good reason not to. + \param front_of_line Set to false, unless you have a good reason not to. \param now Set to 0, unless you have a good reason not to. \sa thd_schedule_next */ -void thd_schedule(int front_of_line, uint64_t now); +void thd_schedule(bool front_of_line, uint64_t now); /** \brief Force a given thread to the front of the queue. \relatesalso kthread_t @@ -446,6 +473,8 @@ void thd_schedule(int front_of_line, uint64_t now); This function promotes the given thread to be the next one that will be swapped in by the scheduler. This function is only callable inside an interrupt context (it simply returns otherwise). + + \param thd The thread to schedule next. */ void thd_schedule_next(kthread_t *thd); @@ -464,9 +493,12 @@ void thd_pass(void); at least the given number of milliseconds. If another thread is running, it will likely sleep longer. + \note + When \p ms is given a value of `0`, this is equivalent to thd_pass(). + \param ms The number of milliseconds to sleep. */ -void thd_sleep(int ms); +void thd_sleep(unsigned ms); /** \brief Set a thread's priority value. \relatesalso kthread_t @@ -572,20 +604,41 @@ int *thd_get_errno(kthread_t *thd); */ struct _reent *thd_get_reent(kthread_t *thd); + +/** \brief Retrieves the thread's elapsed CPU time + \relatesalso kthread_t + + Returns the amount of active CPU time the thread has consumed in + nanoseconds. + + \warning + The implementation uses perf_cntr_timer_ns() internally when maintaining + this CPU time, so disabling or clearing the nanosecond timer will + interfere with this time keeping. + + \param thd The thead to retrieve the CPU time for + + \retval Total utilized CPU time in nanoseconds OR + 0 if the nanosecond timer of the performance + counters has been disturbed. +*/ +uint64_t thd_get_cpu_time(kthread_t *thd); + /** \brief Change threading modes. This function changes the current threading mode of the system. With preemptive threading being the only mode. \deprecated - This is now deprecated. + This is now deprecated \param mode One of the THD_MODE values. + \return The old mode of the threading system. \sa thd_get_mode */ -int thd_set_mode(int mode) __deprecated; +int thd_set_mode(kthread_mode_t mode) __deprecated; /** \brief Fetch the current threading mode. @@ -598,7 +651,7 @@ int thd_set_mode(int mode) __deprecated; \sa thd_set_mode */ -int thd_get_mode(void) __deprecated; +kthread_mode_t thd_get_mode(void) __deprecated; /** \brief Set the scheduler's frequency. @@ -652,7 +705,7 @@ int thd_join(kthread_t *thd, void **value_ptr); \return 0 on success or less than 0 if the thread is non-existent or already detached. - \sa thd_join() + \sa thd_join() */ int thd_detach(kthread_t *thd); @@ -690,27 +743,32 @@ int thd_pslist(int (*pf)(const char *fmt, ...)); */ int thd_pslist_queue(int (*pf)(const char *fmt, ...)); -/** \brief Initialize the threading system. +/** \cond INTERNAL */ +/** \brief Initialize the threading system. + This is normally done for you by default when KOS starts. This will also initialize all the various synchronization primitives. - \retval -1 If threads are already initialized. \retval 0 On success. - \sa thd_shutdown */ int thd_init(void); -/** \brief Shutdown the threading system. +/** \brief Shutdown the threading system. + This is done for you by the normal shutdown procedure of KOS. This will also shutdown all the various synchronization primitives. - ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-05-18 00:58:14
|
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 426aea1b7727de803f1532dd86e696d2c0914ccd (commit) via 3d160ba7a574bf953bcb67ca7dbcd69b2d253c0e (commit) from 1e8449ffef661f8be82dd5680a8669e79ae0eeb6 (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 426aea1b7727de803f1532dd86e696d2c0914ccd Author: Falco Girgis <gyr...@gm...> Date: Fri May 17 19:23:52 2024 -0500 Linking to libm by Default in environ_base.sh. (#569) * Linking to libm by default in environ_base.sh. Because I don't think it's a good idea not to. It's an annoying little nuance of KOS-specific libc/Newlib/GCC toolchain configuration that it's a separate library, it leaks its way out to having to be added manually and intrusively to CMake, and I've just never had to care how or where the C standard library's math got implemented in a build system... PLUS you have to add the lib in a particular order due to circular dependendencies, which is a PITA, plus it'll get garbage collected if you don't use it, etc, etc. * Removed explicit -lm from all example Makefiles. commit 3d160ba7a574bf953bcb67ca7dbcd69b2d253c0e Author: Andy Barajas <and...@gm...> Date: Fri May 17 16:55:32 2024 -0700 Fix Cache functions (#570) * Fix cache functions by checking for zero counts. Fix dcache flush and purge functions to handle counts lower than 32 * Implement zcrc asm suggestions * Move dcache variables to dcache section Update the documentation for icache_flush_range() * Added zcrc's copyright ----------------------------------------------------------------------- Summary of changes: environ_base.sh | 2 +- examples/dreamcast/basic/breaking/Makefile | 2 +- examples/dreamcast/conio/kosh/Makefile | 2 +- examples/dreamcast/cpp/clock/Makefile | 2 +- examples/dreamcast/cpp/concurrency/Makefile | 2 +- examples/dreamcast/cpp/dcplib/Makefile | 2 +- examples/dreamcast/cpp/gltest/Makefile | 2 +- examples/dreamcast/cpp/modplug_test/Makefile | 2 +- examples/dreamcast/gldc/2D_tex_quad/Makefile | 2 +- examples/dreamcast/gldc/basic/gl/Makefile | 2 +- examples/dreamcast/gldc/basic/vq/Makefile | 2 +- .../dreamcast/gldc/benchmarks/quadmark/Makefile | 2 +- .../dreamcast/gldc/benchmarks/trimark/Makefile | 2 +- .../gldc/benchmarks/tristripmark/Makefile | 2 +- examples/dreamcast/gldc/nehe/nehe02/Makefile | 2 +- examples/dreamcast/gldc/nehe/nehe05/Makefile | 2 +- examples/dreamcast/gldc/nehe/nehe06/Makefile | 2 +- examples/dreamcast/gldc/nehe/nehe08/Makefile | 2 +- examples/dreamcast/gldc/nehe/nehe09/Makefile | 2 +- examples/dreamcast/gldc/nehe/nehe16/Makefile | 2 +- examples/dreamcast/gldc/nehe/nehe26/Makefile | 2 +- examples/dreamcast/kgl/basic/elements/Makefile | 2 +- examples/dreamcast/kgl/basic/txrenv/Makefile | 2 +- examples/dreamcast/kgl/basic/vq/Makefile | 2 +- examples/dreamcast/kgl/basic/zclip_arrays/Makefile | 2 +- examples/dreamcast/kgl/demos/blur/Makefile | 2 +- examples/dreamcast/kgl/demos/mipmap/Makefile | 2 +- .../kgl/demos/multitexture-arrays/Makefile | 2 +- .../kgl/demos/multitexture-elements/Makefile | 2 +- examples/dreamcast/kgl/demos/specular/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe02/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe05/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe06/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe08/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe09/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe26/Makefile | 2 +- examples/dreamcast/lua/basic/Makefile | 2 +- examples/dreamcast/mruby/dreampresent/Makefile | 2 +- examples/dreamcast/mruby/mrbtris/Makefile | 2 +- examples/dreamcast/parallax/delay_cube/Makefile | 2 +- examples/dreamcast/parallax/font/Makefile | 2 +- examples/dreamcast/parallax/raster_melt/Makefile | 2 +- examples/dreamcast/parallax/serpent_dma/Makefile | 2 +- examples/dreamcast/parallax/sinus/Makefile | 2 +- examples/dreamcast/png/Makefile | 2 +- examples/dreamcast/rumble/Makefile | 2 +- .../dreamcast/sound/ghettoplay-vorbis/Makefile | 2 +- examples/dreamcast/sound/hello-mp3/Makefile | 2 +- examples/dreamcast/sound/hello-ogg/Makefile | 4 +- examples/dreamcast/tsunami/banner/Makefile | 2 +- examples/dreamcast/tsunami/font/Makefile | 2 +- examples/dreamcast/tsunami/genmenu/Makefile | 2 +- examples/dreamcast/vmu/vmu_beep/Makefile | 2 +- examples/dreamcast/vmu/vmu_lcd/Makefile | 2 +- kernel/arch/dreamcast/kernel/cache.s | 117 +++++++++++---------- 55 files changed, 118 insertions(+), 109 deletions(-) diff --git a/environ_base.sh b/environ_base.sh index 60be5201..a02b9018 100644 --- a/environ_base.sh +++ b/environ_base.sh @@ -24,7 +24,7 @@ export KOS_INC_PATHS="${KOS_INC_PATHS} -I${KOS_BASE}/include \ # "System" libraries export KOS_LIB_PATHS="-L${KOS_BASE}/lib/${KOS_ARCH} -L${KOS_BASE}/addons/lib/${KOS_ARCH} -L${KOS_PORTS}/lib" -export KOS_LIBS="-Wl,--start-group -lkallisti -lc -lgcc -Wl,--end-group" +export KOS_LIBS="-Wl,--start-group -lkallisti -lm -lc -lgcc -Wl,--end-group" # Main arch compiler paths export KOS_CC="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-gcc" diff --git a/examples/dreamcast/basic/breaking/Makefile b/examples/dreamcast/basic/breaking/Makefile index 87f96037..7dfd29be 100644 --- a/examples/dreamcast/basic/breaking/Makefile +++ b/examples/dreamcast/basic/breaking/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -lm + kos-cc -o $(TARGET) $(OBJS) run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/conio/kosh/Makefile b/examples/dreamcast/conio/kosh/Makefile index 0c98252e..e6d49ae6 100644 --- a/examples/dreamcast/conio/kosh/Makefile +++ b/examples/dreamcast/conio/kosh/Makefile @@ -17,7 +17,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -lkosh -lconio -lm + kos-cc -o $(TARGET) $(OBJS) -lkosh -lconio run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/cpp/clock/Makefile b/examples/dreamcast/cpp/clock/Makefile index 95f3e66b..bd0eb4e2 100644 --- a/examples/dreamcast/cpp/clock/Makefile +++ b/examples/dreamcast/cpp/clock/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-c++ -o $(TARGET) $(OBJS) -ldcplib -lm + kos-c++ -o $(TARGET) $(OBJS) -ldcplib run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/cpp/concurrency/Makefile b/examples/dreamcast/cpp/concurrency/Makefile index 65c77652..36ab65b0 100644 --- a/examples/dreamcast/cpp/concurrency/Makefile +++ b/examples/dreamcast/cpp/concurrency/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-c++ -o $(TARGET) $(OBJS) -lm + kos-c++ -o $(TARGET) $(OBJS) run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/cpp/dcplib/Makefile b/examples/dreamcast/cpp/dcplib/Makefile index d659359d..38c317e0 100644 --- a/examples/dreamcast/cpp/dcplib/Makefile +++ b/examples/dreamcast/cpp/dcplib/Makefile @@ -20,7 +20,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-c++ -o $(TARGET) $(OBJS) -ldcplib -lm + kos-c++ -o $(TARGET) $(OBJS) -ldcplib run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/cpp/gltest/Makefile b/examples/dreamcast/cpp/gltest/Makefile index 78156339..03c50d34 100644 --- a/examples/dreamcast/cpp/gltest/Makefile +++ b/examples/dreamcast/cpp/gltest/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-c++ -o $(TARGET) $(OBJS) -lGL -lm -lkosutils + kos-c++ -o $(TARGET) $(OBJS) -lGL -lkosutils run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/cpp/modplug_test/Makefile b/examples/dreamcast/cpp/modplug_test/Makefile index 0c7b791c..bb417eb7 100644 --- a/examples/dreamcast/cpp/modplug_test/Makefile +++ b/examples/dreamcast/cpp/modplug_test/Makefile @@ -13,7 +13,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-c++ -o $(TARGET) $(OBJS) -lmodplug -lm + kos-c++ -o $(TARGET) $(OBJS) -lmodplug run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/gldc/2D_tex_quad/Makefile b/examples/dreamcast/gldc/2D_tex_quad/Makefile index d2d0f908..c99f9ccf 100644 --- a/examples/dreamcast/gldc/2D_tex_quad/Makefile +++ b/examples/dreamcast/gldc/2D_tex_quad/Makefile @@ -15,7 +15,7 @@ OBJS := main.o romdisk.o # Compiler Flags KOS_CPPSTD := -std=c++20 -LDLIBS := -lstb_image -lGL -lkmg -lkosutils -lm +LDLIBS := -lstb_image -lGL -lkmg -lkosutils TARGET = 2D_tex_quad.elf diff --git a/examples/dreamcast/gldc/basic/gl/Makefile b/examples/dreamcast/gldc/basic/gl/Makefile index c223d077..59a1eb90 100644 --- a/examples/dreamcast/gldc/basic/gl/Makefile +++ b/examples/dreamcast/gldc/basic/gl/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -lGL -lm -lpcx -lkosutils + kos-cc -o $(TARGET) $(OBJS) -lGL -lpcx -lkosutils run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/gldc/basic/vq/Makefile b/examples/dreamcast/gldc/basic/vq/Makefile index 1069bd3b..6283044e 100644 --- a/examples/dreamcast/gldc/basic/vq/Makefile +++ b/examples/dreamcast/gldc/basic/vq/Makefile @@ -14,7 +14,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL fruit.o: fruit.vq $(KOS_BASE)/utils/bin2o/bin2o fruit.vq fruit fruit.o diff --git a/examples/dreamcast/gldc/benchmarks/quadmark/Makefile b/examples/dreamcast/gldc/benchmarks/quadmark/Makefile index 951b2f81..ad4f9fb4 100644 --- a/examples/dreamcast/gldc/benchmarks/quadmark/Makefile +++ b/examples/dreamcast/gldc/benchmarks/quadmark/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -lGL -lm + kos-cc -o $(TARGET) $(OBJS) -lGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/gldc/benchmarks/trimark/Makefile b/examples/dreamcast/gldc/benchmarks/trimark/Makefile index 4c14f6a7..397b0657 100644 --- a/examples/dreamcast/gldc/benchmarks/trimark/Makefile +++ b/examples/dreamcast/gldc/benchmarks/trimark/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -lGL -lm + kos-cc -o $(TARGET) $(OBJS) -lGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/gldc/benchmarks/tristripmark/Makefile b/examples/dreamcast/gldc/benchmarks/tristripmark/Makefile index 2a9592cb..f6c40746 100644 --- a/examples/dreamcast/gldc/benchmarks/tristripmark/Makefile +++ b/examples/dreamcast/gldc/benchmarks/tristripmark/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -lGL -lm + kos-cc -o $(TARGET) $(OBJS) -lGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/gldc/nehe/nehe02/Makefile b/examples/dreamcast/gldc/nehe/nehe02/Makefile index bea27da5..d03777a3 100644 --- a/examples/dreamcast/gldc/nehe/nehe02/Makefile +++ b/examples/dreamcast/gldc/nehe/nehe02/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/gldc/nehe/nehe05/Makefile b/examples/dreamcast/gldc/nehe/nehe05/Makefile index 9295f245..7f54e3a1 100644 --- a/examples/dreamcast/gldc/nehe/nehe05/Makefile +++ b/examples/dreamcast/gldc/nehe/nehe05/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/gldc/nehe/nehe06/Makefile b/examples/dreamcast/gldc/nehe/nehe06/Makefile index a4802cc6..3092d30a 100644 --- a/examples/dreamcast/gldc/nehe/nehe06/Makefile +++ b/examples/dreamcast/gldc/nehe/nehe06/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/gldc/nehe/nehe08/Makefile b/examples/dreamcast/gldc/nehe/nehe08/Makefile index 90227cb1..acbdde43 100644 --- a/examples/dreamcast/gldc/nehe/nehe08/Makefile +++ b/examples/dreamcast/gldc/nehe/nehe08/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/gldc/nehe/nehe09/Makefile b/examples/dreamcast/gldc/nehe/nehe09/Makefile index 31fdb517..309537c6 100644 --- a/examples/dreamcast/gldc/nehe/nehe09/Makefile +++ b/examples/dreamcast/gldc/nehe/nehe09/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/gldc/nehe/nehe16/Makefile b/examples/dreamcast/gldc/nehe/nehe16/Makefile index dfb7b687..9ae67732 100644 --- a/examples/dreamcast/gldc/nehe/nehe16/Makefile +++ b/examples/dreamcast/gldc/nehe/nehe16/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/gldc/nehe/nehe26/Makefile b/examples/dreamcast/gldc/nehe/nehe26/Makefile index 30acd79e..6c4816e7 100644 --- a/examples/dreamcast/gldc/nehe/nehe26/Makefile +++ b/examples/dreamcast/gldc/nehe/nehe26/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/basic/elements/Makefile b/examples/dreamcast/kgl/basic/elements/Makefile index 97a0e38b..943c7461 100644 --- a/examples/dreamcast/kgl/basic/elements/Makefile +++ b/examples/dreamcast/kgl/basic/elements/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/basic/txrenv/Makefile b/examples/dreamcast/kgl/basic/txrenv/Makefile index 5bc57bdc..5996bc23 100644 --- a/examples/dreamcast/kgl/basic/txrenv/Makefile +++ b/examples/dreamcast/kgl/basic/txrenv/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/basic/vq/Makefile b/examples/dreamcast/kgl/basic/vq/Makefile index 2545372d..c162f11b 100644 --- a/examples/dreamcast/kgl/basic/vq/Makefile +++ b/examples/dreamcast/kgl/basic/vq/Makefile @@ -14,7 +14,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL fruit.o: fruit.vq $(KOS_BASE)/utils/bin2o/bin2o fruit.vq fruit fruit.o diff --git a/examples/dreamcast/kgl/basic/zclip_arrays/Makefile b/examples/dreamcast/kgl/basic/zclip_arrays/Makefile index 791088d0..af29c50b 100644 --- a/examples/dreamcast/kgl/basic/zclip_arrays/Makefile +++ b/examples/dreamcast/kgl/basic/zclip_arrays/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/demos/blur/Makefile b/examples/dreamcast/kgl/demos/blur/Makefile index b7a10202..e1775036 100644 --- a/examples/dreamcast/kgl/demos/blur/Makefile +++ b/examples/dreamcast/kgl/demos/blur/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/demos/mipmap/Makefile b/examples/dreamcast/kgl/demos/mipmap/Makefile index 7a0b31e6..04654a46 100644 --- a/examples/dreamcast/kgl/demos/mipmap/Makefile +++ b/examples/dreamcast/kgl/demos/mipmap/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/demos/multitexture-arrays/Makefile b/examples/dreamcast/kgl/demos/multitexture-arrays/Makefile index 30091f44..f4368a18 100644 --- a/examples/dreamcast/kgl/demos/multitexture-arrays/Makefile +++ b/examples/dreamcast/kgl/demos/multitexture-arrays/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/demos/multitexture-elements/Makefile b/examples/dreamcast/kgl/demos/multitexture-elements/Makefile index 77ac4195..5d3f8b35 100644 --- a/examples/dreamcast/kgl/demos/multitexture-elements/Makefile +++ b/examples/dreamcast/kgl/demos/multitexture-elements/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/demos/specular/Makefile b/examples/dreamcast/kgl/demos/specular/Makefile index a0e24691..090d6866 100644 --- a/examples/dreamcast/kgl/demos/specular/Makefile +++ b/examples/dreamcast/kgl/demos/specular/Makefile @@ -17,7 +17,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/nehe/nehe02/Makefile b/examples/dreamcast/kgl/nehe/nehe02/Makefile index b12ce888..df20f765 100644 --- a/examples/dreamcast/kgl/nehe/nehe02/Makefile +++ b/examples/dreamcast/kgl/nehe/nehe02/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/nehe/nehe05/Makefile b/examples/dreamcast/kgl/nehe/nehe05/Makefile index 1906dfdd..2bb429a9 100644 --- a/examples/dreamcast/kgl/nehe/nehe05/Makefile +++ b/examples/dreamcast/kgl/nehe/nehe05/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/nehe/nehe06/Makefile b/examples/dreamcast/kgl/nehe/nehe06/Makefile index 9dc0dc50..b1b4307b 100644 --- a/examples/dreamcast/kgl/nehe/nehe06/Makefile +++ b/examples/dreamcast/kgl/nehe/nehe06/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/nehe/nehe08/Makefile b/examples/dreamcast/kgl/nehe/nehe08/Makefile index 578d6900..2ac21d04 100644 --- a/examples/dreamcast/kgl/nehe/nehe08/Makefile +++ b/examples/dreamcast/kgl/nehe/nehe08/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/nehe/nehe09/Makefile b/examples/dreamcast/kgl/nehe/nehe09/Makefile index 754b73de..3e4cab42 100644 --- a/examples/dreamcast/kgl/nehe/nehe09/Makefile +++ b/examples/dreamcast/kgl/nehe/nehe09/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL -lm + kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lKGL run: $(TARGET) $(KOS_LOADER) $(TARGET) ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-05-17 19:07:04
|
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 1e8449ffef661f8be82dd5680a8669e79ae0eeb6 (commit) via 162e88d88cdf51c07319cdeceb8f9a12bc68cc2c (commit) from 5ff6cd01cd9d1d47472e45c0f29d955bfe864eec (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 1e8449ffef661f8be82dd5680a8669e79ae0eeb6 Author: Falco Girgis <gyr...@gm...> Date: Fri May 17 14:06:25 2024 -0500 Added dc-chain Configuration Option for C++'s Timezone Database (#554) * Added dc-chain configure option for C++'s tzdb. - Added new config option, libstdcxx_tzdb, for specifying how you want C++'s std::chrono::tzdb to be populated: 0 - None (only UTC and GMT supported), 1 - Automatic (system DB + downloading IANA DB), Path - Custom path to directory containing "tzdata.zi" database file + downloading IANA DB. - Default option is to disable the DB for C++. * Forgot to handle the default/NULL case for option. Whoops. If you left the config with the defaults, the option was never defined, so it was never passing anything to the toolchain, so the database was still getting added, despite the fact we want the default to disable it... Fixed. * Update utils/dc-chain/Makefile.default.cfg Co-authored-by: darcagn <da...@pr...> --------- Co-authored-by: darcagn <da...@pr...> commit 162e88d88cdf51c07319cdeceb8f9a12bc68cc2c Author: Paul Cercueil <pa...@cr...> Date: Fri May 17 07:55:29 2024 +0200 timers: Add timer_spin_delay_{us,ns} (#568) * timers: Add timer_spin_delay_{us,ns} These two functions can be used to busy-wait until a given timeout expires. They are similar to timer_spin_sleep(), except that they are much more precise and don't use a dedicated TIMER UNIT channel, which makes them inherently thread-safe. Signed-off-by: Paul Cercueil <pa...@cr...> * dc: scif-spi: Delay using timer_spin_delay_ns() Use the timer_spin_delay_ns() function instead of hardcoding the use of the TIMER UNIT 1. Signed-off-by: Paul Cercueil <pa...@cr...> --------- Signed-off-by: Paul Cercueil <pa...@cr...> Co-authored-by: Falco Girgis <gyr...@gm...> ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 1 + kernel/arch/dreamcast/hardware/scif-spi.c | 13 ++----------- kernel/arch/dreamcast/include/arch/timer.h | 28 +++++++++++++++++++++++++++- kernel/arch/dreamcast/kernel/timer.c | 18 +++++++++++++++++- utils/dc-chain/Makefile.default.cfg | 13 +++++++++++++ utils/dc-chain/doc/CHANGELOG.md | 3 ++- utils/dc-chain/scripts/init.mk | 13 +++++++++++++ 7 files changed, 75 insertions(+), 14 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 252729cd..d367f2cb 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -224,6 +224,7 @@ KallistiOS version 2.1.0 ----------------------------------------------- - *** Added support for modifying scheduler frequency at runtime [FG] - *** Add support for worker threads [PC] - DC Added new System Calls module [AB] +- DC Add timer_spin_delay_{us,ns} and use them in scif-spi [PC] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Megan Potter == MP] diff --git a/kernel/arch/dreamcast/hardware/scif-spi.c b/kernel/arch/dreamcast/hardware/scif-spi.c index b910bc57..cef162b1 100644 --- a/kernel/arch/dreamcast/hardware/scif-spi.c +++ b/kernel/arch/dreamcast/hardware/scif-spi.c @@ -3,6 +3,7 @@ hardware/scif-spi.c Copyright (C) 2012 Lawrence Sebald Copyright (C) 2023 Ruslan Rostovtsev + Copyright (C) 2024 Paul Cercueil */ #include <dc/scif.h> @@ -122,17 +123,7 @@ uint8 scif_spi_rw_byte(uint8 b) { /* Very accurate 1.5usec delay... */ static void slow_rw_delay(void) { - timer_prime(TMU1, 2000000, 0); - timer_clear(TMU1); - timer_start(TMU1); - - while(!timer_clear(TMU1)) - ; - while(!timer_clear(TMU1)) - ; - while(!timer_clear(TMU1)) - ; - timer_stop(TMU1); + timer_spin_delay_ns(1500); } uint8 scif_spi_slow_rw_byte(uint8 b) { diff --git a/kernel/arch/dreamcast/include/arch/timer.h b/kernel/arch/dreamcast/include/arch/timer.h index 30724489..9f8b3ec7 100644 --- a/kernel/arch/dreamcast/include/arch/timer.h +++ b/kernel/arch/dreamcast/include/arch/timer.h @@ -3,7 +3,8 @@ arch/dreamcast/include/timer.h Copyright (c) 2000, 2001 Megan Potter Copyright (c) 2023 Falco Girgis - + Copyright (c) 2024 Paul Cercueil + */ /** \file arch/timer.h @@ -348,6 +349,31 @@ uint64_t timer_ns_gettime64(void); */ void timer_spin_sleep(int ms); +/** \brief Spin-loop delay function with microsecond granularity + \ingroup tmu_sleep + + This function is meant as a very accurate delay function, even if threading + and interrupts are disabled. It is a delay and not a sleep, which means that + the CPU will be busy-looping during that time frame. For any time frame + bigger than a few hundred microseconds, it is recommended to sleep instead. + + \param us The number of microseconds to wait for. + \sa timer_spin_delay_ns, thd_sleep +*/ +void timer_spin_delay_us(unsigned short us); + +/** \brief Spin-loop delay function with nanosecond granularity + \ingroup tmu_sleep + + This function is meant as a very accurate delay function, even if threading + and interrupts are disabled. It is a delay and not a sleep, which means that + the CPU will be busy-looping during that time frame. + + \param ns The number of nanoseconds to wait for. + \sa timer_spin_delay_us, thd_sleep +*/ +void timer_spin_delay_ns(unsigned short ns); + /** \defgroup tmu_primary Primary Timer \brief Primary timer used by the kernel. \ingroup timers diff --git a/kernel/arch/dreamcast/kernel/timer.c b/kernel/arch/dreamcast/kernel/timer.c index f3d9fd73..a3dd8219 100644 --- a/kernel/arch/dreamcast/kernel/timer.c +++ b/kernel/arch/dreamcast/kernel/timer.c @@ -3,7 +3,7 @@ timer.c Copyright (C) 2000, 2001, 2002 Megan Potter Copyright (C) 2023 Falco Girgis - Copyright (C) 2023 Paul Cercueil <pa...@cr...> + Copyright (C) 2023, 2024 Paul Cercueil <pa...@cr...> */ #include <assert.h> @@ -171,6 +171,22 @@ void timer_spin_sleep(int ms) { timer_stop(TMU1); } +void timer_spin_delay_ns(unsigned short ns) { + uint64_t timeout = timer_ns_gettime64() + ns; + + /* Note that we don't actually care about the counter overflowing. + Nobody will run their Dreamcast straight for 585 years. */ + while(timer_ns_gettime64() < timeout); +} + +void timer_spin_delay_us(unsigned short us) { + uint64_t timeout = timer_us_gettime64() + us; + + /* Note that we don't actually care about the counter overflowing. + Nobody will run their Dreamcast straight for 584942 years. */ + while(timer_us_gettime64() < timeout); +} + /* Enable timer interrupts; needs to move to irq.c sometime. */ void timer_enable_ints(int which) { volatile uint16_t *ipra = (uint16_t *)0xffd00004; diff --git a/utils/dc-chain/Makefile.default.cfg b/utils/dc-chain/Makefile.default.cfg index e78e3a31..d7c9089f 100644 --- a/utils/dc-chain/Makefile.default.cfg +++ b/utils/dc-chain/Makefile.default.cfg @@ -204,6 +204,19 @@ newlib_c99_formats=1 # performance. #newlib_opt_space=1 +################### +### C++ OPTIONS ### +################### + +### Timezone database support (1|0|path) +# Uncomment this option to enable building support for C++'s std::chrono::tzdb +# into your C++ standard library by using a combination of the system's local +# timezone DB and one dynamically fetched from the "IANA Time Zone Database." +# Without support enabled, only the "UTC" and "GMT" timezones will be defined. +# You can optionally provide the path to a directory with a custom "tzdata.zi" +# database file. NOTE: Enabling this will result in larger C++ binaries! +#libstdcxx_tzdb=1 + ####################### ### WINDOWS OPTIONS ### ####################### diff --git a/utils/dc-chain/doc/CHANGELOG.md b/utils/dc-chain/doc/CHANGELOG.md index 6e4138e3..75c15e5d 100644 --- a/utils/dc-chain/doc/CHANGELOG.md +++ b/utils/dc-chain/doc/CHANGELOG.md @@ -2,7 +2,8 @@ | Date<br/>_____________ | Author(s)<br/>_____________ | Changes<br/>_____________ | |:-----------------------|:----------------------------|---------------------------| -| 2024-05-02| Eric Fradella | Deprecated GCC 4.7.4 profile. Revamped configuration system into separate profiles and Makefile.cfg. Revised configuration options and documentation. | +| 2024-05-08 | Falco Girgis | Added configuration option for libstdc++'s timezone database. | +| 2024-05-02 | Eric Fradella | Deprecated GCC 4.7.4 profile. Revamped configuration system into separate profiles and Makefile.cfg. Revised configuration options and documentation. | | 2024-05-01 | Falco Girgis | Added config option for enabling the Ada langauge. | | 2024-04-30 | Falco Girgis | Added config option for enabling iconv library support in Newlib. | | 2024-04-29 | Donald Haase<br/>Eric Fradella | Patch Newlib headers to expose lstat() declaration. | diff --git a/utils/dc-chain/scripts/init.mk b/utils/dc-chain/scripts/init.mk index 2889328b..bc37f4db 100644 --- a/utils/dc-chain/scripts/init.mk +++ b/utils/dc-chain/scripts/init.mk @@ -163,6 +163,19 @@ ifdef newlib_iconv_encodings endif endif +# Handle libstdc++ configuration options +ifdef libstdcxx_tzdb + ifeq (0,$(libstdcxx_tzdb)) + gcc_extra_configure_args += --with-libstdcxx-zoneinfo=no + else ifeq (1,$(libstdcxx_tzdb)) + gcc_extra_configure_args += --with-libstdcxx-zoneinfo=yes + else + gcc_extra_configure_args += --with-libstdcxx-zoneinfo=$(libstdcxx_tzdb),static + endif +else + gcc_extra_configure_args += --with-libstdcxx-zoneinfo=no +endif + # Handle install mode for toolchain debug symbols ifdef toolchain_debug ifneq (0,$(toolchain_debug)) hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-05-17 05:56:42
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, link_libm_default has been created at 8d5d6ac07fcda08b4f427860ae1b6acb1075e3f9 (commit) - Log ----------------------------------------------------------------- commit 8d5d6ac07fcda08b4f427860ae1b6acb1075e3f9 Author: Falco Girgis <gyr...@gm...> Date: Fri May 10 22:44:38 2024 -0500 Linking to libm by default in environ_base.sh. Because I don't think it's a good idea not to. It's an annoying little nuance of KOS-specific libc/Newlib/GCC toolchain configuration that it's a separate library, it leaks its way out to having to be added manually and intrusively to CMake, and I've just never had to care how or where the C standard library's math got implemented in a build system... PLUS you have to add the lib in a particular order due to circular dependendencies, which is a PITA, plus it'll get garbage collected if you don't use it, etc, etc. ----------------------------------------------------------------------- hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: quzar <qu...@us...> - 2024-05-16 16:50: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 5ff6cd01cd9d1d47472e45c0f29d955bfe864eec (commit) from c3ce8d43582762f5224631319e7350168d88f416 (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 5ff6cd01cd9d1d47472e45c0f29d955bfe864eec Author: Falco Girgis <gyr...@gm...> Date: Thu May 16 11:46:36 2024 -0500 Updated the FPU exception example. (#572) - There's no need for inline assembly anymore, thanks to the compiler intrinsic for fpscr implemented by Oleg endo. - Show off how to reproduce even more different exception types. - Tested for both -m4-single-only and -m4-single ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/basic/fpu/exc/fpu_exc.c | 138 +++++++++++++++++++++++++---- 1 file changed, 119 insertions(+), 19 deletions(-) diff --git a/examples/dreamcast/basic/fpu/exc/fpu_exc.c b/examples/dreamcast/basic/fpu/exc/fpu_exc.c index 5cc5256f..718d5e0d 100644 --- a/examples/dreamcast/basic/fpu/exc/fpu_exc.c +++ b/examples/dreamcast/basic/fpu/exc/fpu_exc.c @@ -1,39 +1,139 @@ /* KallistiOS ##version## fpu_exc.c - (c)2002 Megan Potter + Copyright (C) 2002 Megan Potter + Copyright (C) 2024 Falco Girgis +*/ + +/* + This file serves as both an example of and an automatable test case for + working with the SH4's FPU state and exceptions. */ #include <kos.h> +#include <stdio.h> +#include <stdlib.h> +#include <float.h> -asm( - " .text\n" - " .align 2\n" - "__get_fpscr:\n" - " rts\n" - " sts fpscr,r0\n" -); +#ifdef __SH4_SINGLE_ONLY__ +# define SH4_FPU_CONFIG_NAME "-m4-single-only" +#elif defined(__SH4_SINGLE__) +# define SH4_FPU_CONFIG_NAME "-m4-single" +#else +# define SH4_FPU_CONFIG_NAME "unknown" +#endif -extern uint32 _get_fpscr(); +static const char* +fpscr_stringify(unsigned int value, char* buffer, size_t bytes) { -int main(int argc, char **argv) { - uint32 fpscr; - double d = 1.0; + snprintf(buffer, bytes, + "\tFPSCR [%x]:\n" + "\t\tFR = %d\n" + "\t\tSZ = %d\n" + "\t\tPR = %d\n" + "\t\tDN = %d\n" + "\t\tCause = %x\n" + "\t\tEnable = %x\n" + "\t\tFlag = %x\n" + "\t\tRM = %x\n", + value, + !!(value & (1 << 21)), + !!(value & (1 << 20)), + !!(value & (1 << 19)), + !!(value & (1 << 18)), + (value >> 12) & 0x3f, + (value >> 7) & 0x3f, + (value >> 2) & 0x3f, + value & 0x3); - /* Exit parachute */ - cont_btn_callback(0, CONT_START, (cont_btn_callback_t)arch_exit); + return buffer; +} + +static bool fpscr_test(const char *name, unsigned mask, void (*test)(void)) { + char buffer[512]; + bool success = true; + + const unsigned begin_fpscr = __builtin_sh_get_fpscr(); + + printf("Beginning %s test!\n", name); - fpscr = _get_fpscr(); - printf("fpscr is %08x\n", (unsigned int)fpscr); + test(); + unsigned fpscr = __builtin_sh_get_fpscr(); + printf("%s", fpscr_stringify(fpscr, buffer, sizeof(buffer))); + + if(!(fpscr & mask)) { + fprintf(stderr, "\tFAILURE: %s flag not asserted!\n", name); + success = false; + } + else { + printf("\tSUCCESS!\n"); + } + + __builtin_sh_set_fpscr(begin_fpscr); + + return success; +} + +static void fpscr_underflow(void) { + volatile double d = 1.0; while(d > 0.0) { - printf("%f\n", d); +// printf("\t%.15lf\n", d); d *= 0.01; } +} + +static void fpscr_overflow(void) { + volatile double d = 1.0; + while(d < DBL_MAX) { +// printf("\t%.15lf\n", d); + d *= 1.1; + } +} + +static void fpscr_nan(void) { + volatile double d = 0.0; + volatile double c = 0.0; + volatile double e = d / c; + (void)e; +} + +static void fpscr_div_zero(void) { + volatile double d = 1.0; + volatile double c = 0.0; + volatile double e = d / c; + (void)e; +} + +int main(int argc, char **argv) { + char buffer[512]; + bool success = true; - printf("Underflow occurred, no exceptions!\n"); + /* Exit parachute */ + cont_btn_callback(0, CONT_START, (cont_btn_callback_t)arch_exit); + + printf("Beginning the FPU exception test!\n"); + printf("\tFPU Config: %s\n", SH4_FPU_CONFIG_NAME); + printf("\tsizeof(float): %zu\n", sizeof(float)); + printf("\tsizeof(double): %zu\n", sizeof(double)); + + unsigned fpscr_start = __builtin_sh_get_fpscr(); + printf("Original Value:\n%s", fpscr_stringify(fpscr_start, buffer, sizeof(buffer))); + + success &= fpscr_test("underflow", (1 << 3), fpscr_underflow); + success &= fpscr_test("overflow", (1 << 4), fpscr_overflow); + success &= fpscr_test("divde-by-zero", (1 << 5), fpscr_div_zero); + success &= fpscr_test("NAN", (1 << 6), fpscr_nan); + + if(success) { + printf("\nTEST SUCCEEDED!\n"); + return EXIT_SUCCESS; + } + else { + fprintf(stderr, "\nTEST FAILED!\n"); + return EXIT_FAILURE; + } - return 0; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: quzar <qu...@us...> - 2024-05-16 13:24:54
|
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 c3ce8d43582762f5224631319e7350168d88f416 (commit) from 635e6aaf63b3144409ebcc806f5ed3edd5df2554 (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 c3ce8d43582762f5224631319e7350168d88f416 Author: Andy Barajas <and...@gm...> Date: Thu May 16 06:24:15 2024 -0700 Improve Screenshot (#575) * Speed up 16bpp => 24bpp by 57%. Moved file creation to the top of the function so it can fail sooner. Print a message when the screenshot has been written * Clean up makefile documentation for video examples. Gitignore some gldc files to mirror ignored files for kgl * Add screenshot example * Added PM_RGB888P support thanks to SWAT * Updated Makefile comment to include Ubuntu on list of OS that require sudo, code cleanup ----------------------------------------------------------------------- Summary of changes: .gitignore | 3 + examples/dreamcast/video/Makefile | 3 + examples/dreamcast/video/bfont/Makefile | 4 +- examples/dreamcast/video/palmenu/Makefile | 5 + examples/dreamcast/video/screenshot/Makefile | 31 ++++++ examples/dreamcast/video/screenshot/screenshot.c | 98 ++++++++++++++++++ kernel/arch/dreamcast/hardware/sq.c | 6 +- kernel/arch/dreamcast/hardware/syscalls.c | 4 +- kernel/arch/dreamcast/util/screenshot.c | 121 ++++++++++++++--------- 9 files changed, 222 insertions(+), 53 deletions(-) create mode 100644 examples/dreamcast/video/screenshot/Makefile create mode 100644 examples/dreamcast/video/screenshot/screenshot.c diff --git a/.gitignore b/.gitignore index e3e4cd17..02d16d33 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,8 @@ 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 @@ -41,6 +43,7 @@ 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 utils/dc-chain/logs utils/dc-chain/*.tar.bz2 utils/dc-chain/*.tar.gz diff --git a/examples/dreamcast/video/Makefile b/examples/dreamcast/video/Makefile index a24bf8b0..f7c4e8aa 100644 --- a/examples/dreamcast/video/Makefile +++ b/examples/dreamcast/video/Makefile @@ -9,15 +9,18 @@ all: $(KOS_MAKE) -C palmenu $(KOS_MAKE) -C minifont $(KOS_MAKE) -C multibuffer + $(KOS_MAKE) -C screenshot clean: $(KOS_MAKE) -C bfont clean $(KOS_MAKE) -C palmenu clean $(KOS_MAKE) -C minifont clean $(KOS_MAKE) -C multibuffer clean + $(KOS_MAKE) -C screenshot clean dist: $(KOS_MAKE) -C bfont dist $(KOS_MAKE) -C palmenu dist $(KOS_MAKE) -C minifont dist $(KOS_MAKE) -C multibuffer dist + $(KOS_MAKE) -C screenshot dist diff --git a/examples/dreamcast/video/bfont/Makefile b/examples/dreamcast/video/bfont/Makefile index 67462aff..82f57ad3 100644 --- a/examples/dreamcast/video/bfont/Makefile +++ b/examples/dreamcast/video/bfont/Makefile @@ -1,7 +1,7 @@ # KallistiOS ##version## # -# basic/bfont/Makefile -# (c)2002 Megan Potter +# video/bfont/Makefile +# Copyright (C) 2002 Megan Potter # TARGET = bfont.elf diff --git a/examples/dreamcast/video/palmenu/Makefile b/examples/dreamcast/video/palmenu/Makefile index d0c54788..befc2048 100644 --- a/examples/dreamcast/video/palmenu/Makefile +++ b/examples/dreamcast/video/palmenu/Makefile @@ -1,3 +1,8 @@ +# KallistiOS ##version## +# +# video/palmenu/Makefile +# + # Put the filename of the output binary here TARGET = palmenu.elf diff --git a/examples/dreamcast/video/screenshot/Makefile b/examples/dreamcast/video/screenshot/Makefile new file mode 100644 index 00000000..51f8dcb4 --- /dev/null +++ b/examples/dreamcast/video/screenshot/Makefile @@ -0,0 +1,31 @@ +# KallistiOS ##version## +# +# video/screenshot/Makefile +# Copyright (C) 2024 Andy Barajas +# + +TARGET = screenshot.elf +OBJS = screenshot.o + +all: rm-elf $(TARGET) + +include $(KOS_BASE)/Makefile.rules + +clean: rm-elf + -rm -f $(OBJS) + -rm -f screenshot*.ppm + +rm-elf: + -rm -f $(TARGET) + +$(TARGET): $(OBJS) + kos-cc -o $(TARGET) $(OBJS) + +# For Mac, Linux, Ubuntu sudo is required with the -c "." command to save data to the PC +# sudo $(KOS_LOADER) $(TARGET) -c "." +run: $(TARGET) + $(KOS_LOADER) $(TARGET) -c "." + +dist: $(TARGET) + -rm -f $(OBJS) + $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/video/screenshot/screenshot.c b/examples/dreamcast/video/screenshot/screenshot.c new file mode 100644 index 00000000..51074b34 --- /dev/null +++ b/examples/dreamcast/video/screenshot/screenshot.c @@ -0,0 +1,98 @@ +/* KallistiOS ##version## + + screenshot.c + Copyright (C) 2024 Andy Barajas + +*/ + +/* + This program demonstrates how to use the vid_screen_shot() function + to capture and save a screenshot in the PPM format to your computer + using the DC Tool. This tool requires the '-c "."' command-line argument + to operate correctly. + + The program cycles through a color gradient background and allows user + interaction to capture screenshots or exit the program. + + Usage: + Ensure the '/pc/' directory path is correctly specified in the vid_screen_shot() + function call so that the screenshot.ppm file is saved in the appropriate + directory on your computer. +*/ + +#include <stdio.h> + +#include <dc/video.h> +#include <dc/fmath.h> +#include <dc/maple.h> +#include <dc/biosfont.h> +#include <dc/maple/controller.h> + +#include <kos/thread.h> + +#define SHOW_BLACK_BG 1 + +/* Keeps track of the amount of screenshots you have taken */ +static int counter = 0; + +int main(int argc, char **argv) { + uint8_t r, g, b; + uint32_t t = 0; + int font_height_offset = 0; + char filename[256]; + + /* Adjust frequency for faster or slower transitions */ + float frequency = 0.01; + + maple_device_t *cont; + cont_state_t *state; + + /* Set the video mode */ + vid_set_mode(DM_640x480, PM_RGB565); + + while(1) { + if((cont = maple_enum_type(0, MAPLE_FUNC_CONTROLLER)) != NULL) { + state = (cont_state_t *)maple_dev_status(cont); + + if(state == NULL) + break; + + if(state->buttons & CONT_START) + break; + + if(state->buttons & CONT_A) { + sprintf(filename, "/pc/screenshot%03d.ppm", counter); + vid_screen_shot(filename); + counter = (counter + 1) % 1000; + } + } + + /* Wait for VBlank */ + vid_waitvbl(); + + /* Calculate next background color */ + r = (uint8_t)((fsin(frequency * t + 0) * 127.5) + 127.5); + g = (uint8_t)((fsin(frequency * t + 2 * F_PI / 3) * 127.5) + 127.5); + b = (uint8_t)((fsin(frequency * t + 4 * F_PI / 3) * 127.5) + 127.5); + + /* Increment t to change color in the next cycle */ + t = (t + 1) % INT32_MAX; + + /* Draw Background */ + vid_clear(r, g, b); + + /* Draw Foreground */ + font_height_offset = (640 * (480 - (BFONT_HEIGHT * 6))) + (BFONT_THIN_WIDTH * 2); + bfont_draw_str(vram_s + font_height_offset, 640, SHOW_BLACK_BG, + "Press Start to exit"); + + font_height_offset += 640 * BFONT_HEIGHT * 2; + bfont_draw_str(vram_s + font_height_offset, 640, SHOW_BLACK_BG, + "Press A to take a screen shot"); + + /* Without this the bfont wont show on the screen */ + thd_sleep(10); + } + + return 0; +} diff --git a/kernel/arch/dreamcast/hardware/sq.c b/kernel/arch/dreamcast/hardware/sq.c index 23d047cb..7f34633a 100644 --- a/kernel/arch/dreamcast/hardware/sq.c +++ b/kernel/arch/dreamcast/hardware/sq.c @@ -93,7 +93,7 @@ __attribute__((noinline)) void *sq_cpy(void *dest, const void *src, size_t n) { } /* Fills n bytes at dest with byte c, dest must be 32-byte aligned */ -void * sq_set(void *dest, uint32_t c, size_t n) { +void *sq_set(void *dest, uint32_t c, size_t n) { /* Duplicate low 8-bits of c into high 24-bits */ c = c & 0xff; c = (c << 24) | (c << 16) | (c << 8) | c; @@ -102,7 +102,7 @@ void * sq_set(void *dest, uint32_t c, size_t n) { } /* Fills n bytes at dest with short c, dest must be 32-byte aligned */ -void * sq_set16(void *dest, uint32_t c, size_t n) { +void *sq_set16(void *dest, uint32_t c, size_t n) { /* Duplicate low 16-bits of c into high 16-bits */ c = c & 0xffff; c = (c << 16) | c; @@ -111,7 +111,7 @@ void * sq_set16(void *dest, uint32_t c, size_t n) { } /* Fills n bytes at dest with int c, dest must be 32-byte aligned */ -void * sq_set32(void *dest, uint32_t c, size_t n) { +void *sq_set32(void *dest, uint32_t c, size_t n) { uint32_t *d = SQ_MASK_DEST(dest); sq_lock(dest); diff --git a/kernel/arch/dreamcast/hardware/syscalls.c b/kernel/arch/dreamcast/hardware/syscalls.c index 476e1e33..60d7cf07 100644 --- a/kernel/arch/dreamcast/hardware/syscalls.c +++ b/kernel/arch/dreamcast/hardware/syscalls.c @@ -73,8 +73,8 @@ #define FUNC_GDROM_PIO_CALLBACK 11 #define FUNC_GDROM_PIO_TRANSFER 12 #define FUNC_GDROM_PIO_CHECK 13 -#define FUNC_GDROM_UNKNOWN1 14 -#define FUNC_GDROM_UNKNOWN2 15 +#define FUNC_GDROM_STUB1 14 +#define FUNC_GDROM_STUB2 15 /* SYSTEM functions */ #define FUNC_SYSTEM_RESET -1 diff --git a/kernel/arch/dreamcast/util/screenshot.c b/kernel/arch/dreamcast/util/screenshot.c index c835c27b..5489c456 100644 --- a/kernel/arch/dreamcast/util/screenshot.c +++ b/kernel/arch/dreamcast/util/screenshot.c @@ -1,8 +1,11 @@ /* KallistiOS ##version## screenshot.c - (c)2002 Megan Potter - (c)2008 Donald Haase + + Copyright (C) 2002 Megan Potter + Copyright (C) 2008 Donald Haase + Copyright (C) 2024 Andy Barajas + */ #include <stdio.h> @@ -12,6 +15,8 @@ #include <kos/fs.h> #include <arch/irq.h> +#include <arch/timer.h> + /* Provides a very simple screen shot facility (dumps raw RGB PPM files from the @@ -24,73 +29,104 @@ This will now work with any of the supported video modes. */ int vid_screen_shot(const char *destfn) { - file_t f; - int i, numpix; - uint8 *buffer; - char header[256]; - uint32 save; - uint32 pixel; /* to fit 888 mode */ - uint8 r, g, b; - uint8 bpp; - + file_t f; + uint8_t *buffer; + uint8_t *vram_b; /* Used for PM_RGB888P(24-bit) */ + char header[256]; + int i, numpix; + uint32_t save; + uint32_t pixel, pixel1, pixel2; + uint8_t bpp; bpp = 3; /* output to ppm is 3 bytes per pixel */ numpix = vid_mode->width * vid_mode->height; /* Allocate a new buffer so we can blast it all at once */ - buffer = (uint8 *)malloc(numpix * bpp); + buffer = (uint8_t *)malloc(numpix * bpp); if(buffer == NULL) { dbglog(DBG_ERROR, "vid_screen_shot: can't allocate ss memory\n"); return -1; } + /* Open output file */ + f = fs_open(destfn, O_WRONLY | O_TRUNC); + + if(!f) { + dbglog(DBG_ERROR, "vid_screen_shot: can't open output file '%s'\n", destfn); + free(buffer); + return -1; + } + /* Disable interrupts */ save = irq_disable(); - /* Write out each pixel as 24 bits */ + /* Write out each pixel as 24-bits */ switch(vid_mode->pm) { - case(PM_RGB555): { - for(i = 0; i < numpix; i++) { - pixel = vram_s[i]; - r = (((pixel >> 10) & 0x1f) << 3); - g = (((pixel >> 5) & 0x1f) << 3); - b = (((pixel >> 0) & 0x1f) << 3); - buffer[i * 3 + 0] = r; - buffer[i * 3 + 1] = g; - buffer[i * 3 + 2] = b; + case(PM_RGB555): { /* (15-bit) */ + /* Process two 16-bit pixels at a time */ + for(i = 0; i < numpix/2; i++) { + pixel = vram_l[i]; + pixel1 = pixel & 0xFFFF; + pixel2 = pixel >> 16; + + /* Process the first pixel */ + buffer[i * 6 + 0] = (((pixel1 >> 10) & 0x1f) << 3); /* R */ + buffer[i * 6 + 1] = (((pixel1 >> 5) & 0x1f) << 3); /* G */ + buffer[i * 6 + 2] = (((pixel1 >> 0) & 0x1f) << 3); /* B */ + + /* Process the second pixel */ + buffer[i * 6 + 3] = (((pixel2 >> 10) & 0x1f) << 3); /* R */ + buffer[i * 6 + 4] = (((pixel2 >> 5) & 0x1f) << 3); /* G */ + buffer[i * 6 + 5] = (((pixel2 >> 0) & 0x1f) << 3); /* B */ + } + + break; + } + case(PM_RGB565): { /* (16-bit) */ + /* Process two 16-bit pixels at a time */ + for(i = 0; i < numpix/2; i++) { + pixel = vram_l[i]; + pixel1 = pixel & 0xFFFF; + pixel2 = pixel >> 16; + + /* Process the first pixel */ + buffer[i * 6 + 0] = (((pixel1 >> 11) & 0x1f) << 3); /* R */ + buffer[i * 6 + 1] = (((pixel1 >> 5) & 0x3f) << 2); /* G */ + buffer[i * 6 + 2] = (((pixel1 >> 0) & 0x1f) << 3); /* B */ + + /* Process the second pixel */ + buffer[i * 6 + 3] = (((pixel2 >> 11) & 0x1f) << 3); /* R */ + buffer[i * 6 + 4] = (((pixel2 >> 5) & 0x3f) << 2); /* G */ + buffer[i * 6 + 5] = (((pixel2 >> 0) & 0x1f) << 3); /* B */ } break; } - case(PM_RGB565): { + case(PM_RGB888P): { /* (24-bit) */ + vram_b = (uint8_t *)vram_l; for(i = 0; i < numpix; i++) { - pixel = vram_s[i]; - r = (((pixel >> 11) & 0x1f) << 3); - g = (((pixel >> 5) & 0x3f) << 2); - b = (((pixel >> 0) & 0x1f) << 3); - buffer[i * 3 + 0] = r; - buffer[i * 3 + 1] = g; - buffer[i * 3 + 2] = b; + buffer[i * 3 + 0] = vram_b[i * 3 + 2]; /* R */ + buffer[i * 3 + 1] = vram_b[i * 3 + 1]; /* G */ + buffer[i * 3 + 2] = vram_b[i * 3 + 0]; /* B */ } break; } - case(PM_RGB888): { + case(PM_RGB0888): { /* (32-bit) */ for(i = 0; i < numpix; i++) { pixel = vram_l[i]; - r = (((pixel >> 16) & 0xff)); - g = (((pixel >> 8) & 0xff)); - b = (((pixel >> 0) & 0xff)); - buffer[i * 3 + 0] = r; - buffer[i * 3 + 1] = g; - buffer[i * 3 + 2] = b; + buffer[i * 3 + 0] = (((pixel >> 16) & 0xff)); /* R */ + buffer[i * 3 + 1] = (((pixel >> 8) & 0xff)); /* G */ + buffer[i * 3 + 2] = (((pixel >> 0) & 0xff)); /* B */ } break; } + default: { dbglog(DBG_ERROR, "vid_screen_shot: can't process pixel mode %d\n", vid_mode->pm); irq_restore(save); + fs_close(f); free(buffer); return -1; } @@ -98,15 +134,6 @@ int vid_screen_shot(const char *destfn) { irq_restore(save); - /* Open output file */ - f = fs_open(destfn, O_WRONLY | O_TRUNC); - - if(!f) { - dbglog(DBG_ERROR, "vid_screen_shot: can't open output file '%s'\n", destfn); - free(buffer); - return -1; - } - /* Write a small header */ sprintf(header, "P6\n#KallistiOS Screen Shot\n%d %d\n255\n", vid_mode->width, vid_mode->height); @@ -128,5 +155,7 @@ int vid_screen_shot(const char *destfn) { fs_close(f); free(buffer); + dbglog(DBG_INFO, "vid_screen_shot: written to output file '%s'\n", destfn); + return 0; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: quzar <qu...@us...> - 2024-05-16 05:20:02
|
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 635e6aaf63b3144409ebcc806f5ed3edd5df2554 (commit) from e17f49f99fc204220008a85f4b887ab301595f02 (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 635e6aaf63b3144409ebcc806f5ed3edd5df2554 Author: Colton Pawielski <cep...@us...> Date: Thu May 16 00:12:15 2024 -0500 Copy GNU configs into toolchain sources (#323) This change downloads the newest versions of config.guess & config.sub into the dc-chain directory and then uses those files to replace any found in the downloaded sources. This should fix issues when building older releases on newer machines that the old scripts wouldn't recognize properly. Co-authored-by: darcagn <da...@pr...> ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/.gitignore | 1 + utils/dc-chain/scripts/clean.mk | 4 ++++ utils/dc-chain/scripts/host-detect.mk | 3 +++ utils/dc-chain/scripts/patch.mk | 22 ++++++++++++++++++++++ 4 files changed, 30 insertions(+) diff --git a/utils/dc-chain/.gitignore b/utils/dc-chain/.gitignore index 5d007085..bfcd920c 100644 --- a/utils/dc-chain/.gitignore +++ b/utils/dc-chain/.gitignore @@ -7,4 +7,5 @@ gdb-* build-* *.stamp config.guess +config.sub *.cfg diff --git a/utils/dc-chain/scripts/clean.mk b/utils/dc-chain/scripts/clean.mk index 8550e44d..f7e677c4 100644 --- a/utils/dc-chain/scripts/clean.mk +++ b/utils/dc-chain/scripts/clean.mk @@ -46,6 +46,8 @@ clean-gdb-archives: -rm -f $(gdb_file) clean-arm-archives: + -rm -f $(config_guess) + -rm -f $(config_sub) -rm -f $(arm_binutils_file) -rm -f $(arm_gcc_file) -rm -f $(arm_gmp_file) @@ -54,6 +56,8 @@ clean-arm-archives: -rm -f $(arm_isl_file) clean-sh-archives: + -rm -f $(config_guess) + -rm -f $(config_sub) -rm -f $(sh_binutils_file) -rm -f $(sh_gcc_file) -rm -f $(newlib_file) diff --git a/utils/dc-chain/scripts/host-detect.mk b/utils/dc-chain/scripts/host-detect.mk index 05bb89be..6782d4d3 100644 --- a/utils/dc-chain/scripts/host-detect.mk +++ b/utils/dc-chain/scripts/host-detect.mk @@ -9,6 +9,8 @@ # This will help a lot to execute conditional steps depending on the host. config_guess = config.guess config_guess_url = http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=${config_guess};hb=HEAD +config_sub = config.sub +config_sub_url = http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=${config_sub};hb=HEAD is_clean_target=$(findstring clean,$(MAKECMDGOALS)) config_guess_check=$(shell test -f ./config.guess || echo 0) @@ -16,6 +18,7 @@ ifeq ($(is_clean_target),) ifeq ($(config_guess_check),0) $(info Downloading $(config_guess)) $(shell $(call web_download,$(config_guess_url),$(config_guess))) + $(shell $(call web_download,$(config_sub_url),$(config_sub))) $(shell chmod +x $(config_guess)) endif endif diff --git a/utils/dc-chain/scripts/patch.mk b/utils/dc-chain/scripts/patch.mk index 8314dd20..df724905 100644 --- a/utils/dc-chain/scripts/patch.mk +++ b/utils/dc-chain/scripts/patch.mk @@ -82,6 +82,25 @@ define patch_apply fi; endef +# This function is used to replace the config.guess & config.sub that come +# bundled with the sources with updated versions from GNU. This fixes issues +# when trying to compile older versions of the toolchain software on newer +# hardware. +define update_configs + @echo "+++ Updating $(1) files in $(src_dir)"; \ + files=$$(find $(src_dir) -name $(1)); \ + echo "$${files}" | while I= read -r line; do \ + echo " $${line}"; \ + cp $(1) $${line} > /dev/null; \ + done; \ + echo "" +endef + +define update_config_guess_sub + $(call update_configs,config.guess) + $(call update_configs,config.sub) +endef + # Binutils $(patch_binutils): patch_target_name = Binutils $(patch_binutils): src_dir = binutils-$(binutils_ver) @@ -90,6 +109,7 @@ $(patch_binutils): diff_patches := $(wildcard $(patches)/$(src_dir)*.diff) $(patch_binutils): diff_patches += $(wildcard $(patches)/$(host_triplet)/$(src_dir)*.diff) $(patch_binutils): $(call patch_apply) + $(call update_config_guess_sub) # GNU Compiler Collection (GCC) $(patch_gcc): patch_target_name = GCC @@ -104,6 +124,7 @@ endif endif $(patch_gcc): $(call patch_apply) + $(call update_config_guess_sub) # Newlib $(patch_newlib): patch_target_name = Newlib @@ -113,3 +134,4 @@ $(patch_newlib): diff_patches := $(wildcard $(patches)/$(src_dir)*.diff) $(patch_newlib): diff_patches += $(wildcard $(patches)/$(host_triplet)/$(src_dir)*.diff) $(patch_newlib): $(call patch_apply) + $(call update_config_guess_sub) hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-05-16 04:10: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 e17f49f99fc204220008a85f4b887ab301595f02 (commit) via 8d44c070d5d84d4d2bc67083393cb9742523a2b9 (commit) via 0604048c364bd8ac500fff800698eac91ab34d89 (commit) via 90206865bcfe14ab1939d6c42a4227da205d27dd (commit) from d5656890a901d02c470671669925d2ca76b353f3 (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 e17f49f99fc204220008a85f4b887ab301595f02 Author: Andy Barajas <and...@gm...> Date: Wed May 15 21:10:04 2024 -0700 Make docs_open depends on docs. We rebuild everytime but it only takes a few secs and we always want to look at the latest right? (#578) commit 8d44c070d5d84d4d2bc67083393cb9742523a2b9 Author: Falco Girgis <gyr...@gm...> Date: Wed May 15 15:45:00 2024 -0500 Added Makefile Rules for Doxygen Documentation (#571) * Added Doxygen rules for documentation. - docs: generates documentation - docs_clean: removes autogenerated documentation files - docs_open: opens index.html from docs in the default browser * Update Makefile Co-authored-by: Andy Barajas <and...@gm...> * Update Makefile Co-authored-by: darcagn <da...@pr...> --------- Co-authored-by: Andy Barajas <and...@gm...> Co-authored-by: darcagn <da...@pr...> commit 0604048c364bd8ac500fff800698eac91ab34d89 Author: Falco Girgis <gyr...@gm...> Date: Wed May 15 15:21:56 2024 -0500 Fix mke2fs example with Raylib Installed (#562) In a cruel twist of fate, if you have Raylib installed into KOS-ports, the mke2fs example will no longer build... Why? Because the include for "utils.h" will pick up the one in kos-ports from Raylib before picking up the one in the ext2fs addon directory. - Swapped the order for the Makefile's extra include directory flag to ensure that it comes before kos-ports commit 90206865bcfe14ab1939d6c42a4227da205d27dd Author: darcagn <da...@pr...> Date: Wed May 15 14:11:55 2024 -0600 More dc-chain improvements (#574) * dc-chain: Move build libgccjit to GCC pass1 * dc-chain: Clean up D and Ada language selection * dc-chain: Improve make target behavior: clean is now distclean; clean-keep-archives is now clean * dc-chain: Add all .cfg to gitignore * dc-chain: Store default config in Makefile.default.cfg, copy to Makefile.cfg to adjust * dc-chain: Fix not passing pass1 languages configure ----------------------------------------------------------------------- Summary of changes: Makefile | 10 ++++++++ examples/dreamcast/sd/mke2fs/Makefile | 2 +- utils/dc-chain/.gitignore | 2 +- utils/dc-chain/Makefile | 10 ++++++-- .../{Makefile.cfg => Makefile.default.cfg} | 4 +-- utils/dc-chain/README.md | 20 ++++++++------- utils/dc-chain/doc/alpine.md | 15 ++++++----- utils/dc-chain/doc/bsd.md | 15 ++++++----- utils/dc-chain/doc/cygwin.md | 15 ++++++----- utils/dc-chain/doc/debian.md | 15 ++++++----- utils/dc-chain/doc/macos.md | 15 ++++++----- utils/dc-chain/doc/mingw/mingw-w64.md | 15 ++++++----- utils/dc-chain/doc/mingw/mingw.md | 15 ++++++----- utils/dc-chain/scripts/clean.mk | 4 +-- utils/dc-chain/scripts/gcc-pass1.mk | 4 +-- utils/dc-chain/scripts/gcc-pass2.mk | 26 ++++++++----------- utils/dc-chain/scripts/init.mk | 30 ++++++++++++---------- utils/dc-chain/scripts/phony.mk | 3 ++- 18 files changed, 121 insertions(+), 99 deletions(-) rename utils/dc-chain/{Makefile.cfg => Makefile.default.cfg} (98%) diff --git a/Makefile b/Makefile index 5deedffa..584de843 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ # # Root Makefile # Copyright (C) 2003 Megan Potter +# Copyright (C) 2024 Falco Girgis # # Make sure things compile nice and cleanly. We don't necessarily want to push @@ -33,6 +34,15 @@ distclean: clean -rm -f lib/$(KOS_ARCH)/* -rm -f addons/lib/$(KOS_ARCH)/* +docs: + doxygen $(KOS_BASE)/doc/Doxyfile + +docs_clean: + -rm -rf $(KOS_BASE)/doc/reference + +docs_open: docs + open $(KOS_BASE)/doc/reference/html/index.html + kos-ports_all: $(KOS_PORTS)/utils/build-all.sh diff --git a/examples/dreamcast/sd/mke2fs/Makefile b/examples/dreamcast/sd/mke2fs/Makefile index afec1ada..d34b2773 100644 --- a/examples/dreamcast/sd/mke2fs/Makefile +++ b/examples/dreamcast/sd/mke2fs/Makefile @@ -8,7 +8,7 @@ OBJS = mke2fs.o # We need the private headers from libkosext2fs, since we're not using the # facilities of fs_ext2 here. -KOS_CFLAGS += -I$(KOS_BASE)/addons/libkosext2fs -Werror -W -std=gnu99 +KOS_CFLAGS := -I$(KOS_BASE)/addons/libkosext2fs -Werror -W -std=gnu99 $(KOS_CFLAGS) all: rm-elf $(TARGET) diff --git a/utils/dc-chain/.gitignore b/utils/dc-chain/.gitignore index 9861c537..5d007085 100644 --- a/utils/dc-chain/.gitignore +++ b/utils/dc-chain/.gitignore @@ -7,4 +7,4 @@ gdb-* build-* *.stamp config.guess -Makefile.cfg +*.cfg diff --git a/utils/dc-chain/Makefile b/utils/dc-chain/Makefile index 98facf16..81f68dec 100644 --- a/utils/dc-chain/Makefile +++ b/utils/dc-chain/Makefile @@ -11,9 +11,15 @@ include scripts/banner.mk # User configuration config_file=Makefile.cfg ifneq ("$(wildcard $(config_file))","") + $(info +++ Using configuration from $(config_file)) include $(config_file) else - $(error The required $(config_file) file is missing) + ifneq ("$(wildcard Makefile.default.cfg)","") + $(info +++ Using configuration from Makefile.default.cfg) + include Makefile.default.cfg + else + $(error No configuration file found at $(config_file) or Makefile.default.cfg) + endif endif # Toolchain profiles @@ -21,7 +27,7 @@ include scripts/profile-defaults.mk ifneq ("$(wildcard profiles/profile.$(toolchain_profile).mk)","") include profiles/profile.$(toolchain_profile).mk else - $(error No configuration found at profiles/profile.$(toolchain_profile).mk) + $(error No toolchain profile file found at profiles/profile.$(toolchain_profile).mk) endif # Download functions diff --git a/utils/dc-chain/Makefile.cfg b/utils/dc-chain/Makefile.default.cfg similarity index 98% rename from utils/dc-chain/Makefile.cfg rename to utils/dc-chain/Makefile.default.cfg index e9f99c4e..e78e3a31 100644 --- a/utils/dc-chain/Makefile.cfg +++ b/utils/dc-chain/Makefile.default.cfg @@ -128,9 +128,7 @@ enable_objcpp=1 ### Enable libgccjit # Enables the libgccjit embeddable GCC library. This is most commonly enabled to # allow using this toolchain as a backend for the official rustc compiler. Use -# with the rustc-dev toolchain profile if this is your use case. Enabling this -# option will force the toolchain host code to build as position-independent, -# which will result in slightly slower compilation times for this toolchain. +# with the rustc-dev toolchain profile if this is your use case. #enable_libgccjit=1 ################### diff --git a/utils/dc-chain/README.md b/utils/dc-chain/README.md index bae59505..990d203a 100644 --- a/utils/dc-chain/README.md +++ b/utils/dc-chain/README.md @@ -82,12 +82,14 @@ instructions mentioned above for installing dependencies on your system. ## Configuration -Before running `dc-chain`, you may wish to set up the -[`Makefile.cfg`](Makefile.cfg) file containing selections for the toolchain -profile and additional configurable options for building the toolchain(s). The -normal, stable defaults have already been set up for you, so most users can -skip this step. If you'd like to make changes, open and read the options in -[`Makefile.cfg`](Makefile.cfg) in your text editor. +Before running `dc-chain`, you may wish to set up the `Makefile.cfg` file +containing selections for the toolchain profile and additional configurable +options for building the toolchain(s). The normal, stable defaults have already +been set up for you in [`Makefile.default.cfg`](Makefile.default.cfg), so most +users can skip this step. If you'd like to make changes, copy +[`Makefile.default.cfg`](Makefile.default.cfg) to `Makefile.cfg`; then open and +read the options in [`Makefile.cfg`](Makefile.cfg) in your text editor. When +building, the customizations in `Makefile.cfg` will override the defaults. ### Toolchain profiles @@ -129,8 +131,8 @@ on your platform. ## Building the toolchain -With prerequisites installed and a [`Makefile.cfg`](Makefile.cfg) set up with -desired options, the toolchains are ready to be built. +With prerequisites installed (and optionally a [`Makefile.cfg`](Makefile.cfg) +set up with desired custom options), the toolchains are ready to be built. In the `dc-chain` directory, you may run (for **BSD**, please use `gmake` instead): @@ -152,7 +154,7 @@ If anything goes wrong, check the output in `logs/`. After the toolchain compilation, you may save space by cleaning up downloaded and temporary generated files by entering: ``` -make clean +make distclean ``` ## Finished diff --git a/utils/dc-chain/doc/alpine.md b/utils/dc-chain/doc/alpine.md index cb818e07..4a9c8a19 100644 --- a/utils/dc-chain/doc/alpine.md +++ b/utils/dc-chain/doc/alpine.md @@ -39,11 +39,12 @@ git clone git://git.code.sf.net/p/cadcdev/kos-ports ## Compilation ## -The **dc-chain** system may be customized by altering the -[`Makefile.cfg`](../Makefile.cfg) file in the root of the `dc-chain` directory -tree. If this is desired, read the main [README.md](../README.md) for more -information on setting up custom options for the toolchain; however, in most -circumstances, the stable defaults already set up will be fine. +The **dc-chain** system may be customized by setting up a +[`Makefile.cfg`] file in the root of the `dc-chain` directory tree. If this is +desired, read the main [README.md](../README.md) for more information on +setting up custom options for the toolchain; however, in most circumstances, +the stable defaults already present in +[`Makefile.default.cfg`](../Makefile.default.cfg) will be fine. ### Building the toolchain ### @@ -54,7 +55,7 @@ To build the toolchain, do the following: cd /opt/toolchains/dc/kos/utils/dc-chain/ ``` -2. Alter the `Makefile.cfg` file options to your liking. +2. (Optional) Copy and alter the `Makefile.cfg` file options to your liking. 3. Enter the following to start downloading and building toolchain: ``` @@ -68,7 +69,7 @@ hours will be needed to build the full toolchain, depending on your system. After everything is done, you can cleanup all temporary files by entering: ``` -make clean +make distclean ``` ## Next steps ## diff --git a/utils/dc-chain/doc/bsd.md b/utils/dc-chain/doc/bsd.md index fca21268..f67ecfa5 100644 --- a/utils/dc-chain/doc/bsd.md +++ b/utils/dc-chain/doc/bsd.md @@ -53,11 +53,12 @@ git clone git://git.code.sf.net/p/cadcdev/kos-ports ## Compilation ## -The **dc-chain** system may be customized by altering the -[`Makefile.cfg`](../Makefile.cfg) file in the root of the `dc-chain` directory -tree. If this is desired, read the main [README.md](../README.md) for more -information on setting up custom options for the toolchain; however, in most -circumstances, the stable defaults already set up will be fine. +The **dc-chain** system may be customized by setting up a +[`Makefile.cfg`] file in the root of the `dc-chain` directory tree. If this is +desired, read the main [README.md](../README.md) for more information on +setting up custom options for the toolchain; however, in most circumstances, +the stable defaults already present in +[`Makefile.default.cfg`](../Makefile.default.cfg) will be fine. ### Building the toolchain ### @@ -71,7 +72,7 @@ To build the toolchain, do the following: ``` cd /opt/toolchains/dc/kos/utils/dc-chain/ ``` -3. Alter the `Makefile.cfg` file options to your liking. +3. (Optional) Copy and alter the `Makefile.cfg` file options to your liking. 4. Enter the following to start downloading and building toolchain: ``` @@ -85,7 +86,7 @@ hours will be needed to build the full toolchain, depending on your system. After everything is done, you can cleanup all temporary files by entering: ``` -gmake clean +gmake distclean ``` ## Next steps ## diff --git a/utils/dc-chain/doc/cygwin.md b/utils/dc-chain/doc/cygwin.md index 9a4299b8..d6311a0c 100644 --- a/utils/dc-chain/doc/cygwin.md +++ b/utils/dc-chain/doc/cygwin.md @@ -92,11 +92,12 @@ Everything is ready, now it's time to make the toolchains. ## Compilation ## -The **dc-chain** system may be customized by altering the -[`Makefile.cfg`](../Makefile.cfg) file in the root of the `dc-chain` directory -tree. If this is desired, read the main [README.md](../README.md) for more -information on setting up custom options for the toolchain; however, in most -circumstances, the stable defaults already set up will be fine. +The **dc-chain** system may be customized by setting up a +[`Makefile.cfg`] file in the root of the `dc-chain` directory tree. If this is +desired, read the main [README.md](../README.md) for more information on +setting up custom options for the toolchain; however, in most circumstances, +the stable defaults already present in +[`Makefile.default.cfg`](../Makefile.default.cfg) will be fine. ### Building the toolchain ### @@ -109,7 +110,7 @@ To build the toolchain, do the following: cd /opt/toolchains/dc/kos/utils/dc-chain/ ``` -3. Alter the `Makefile.cfg` file options to your liking. +3. (Optional) Copy and alter the `Makefile.cfg` file options to your liking. 4. Enter the following to start downloading and building toolchain: ``` @@ -123,7 +124,7 @@ hours will be needed to build the full toolchain, depending on your system. After everything is done, you can cleanup all temporary files by entering: ``` -make clean +make distclean ``` ## Next steps ## diff --git a/utils/dc-chain/doc/debian.md b/utils/dc-chain/doc/debian.md index 615dd0e2..db68adc3 100644 --- a/utils/dc-chain/doc/debian.md +++ b/utils/dc-chain/doc/debian.md @@ -49,11 +49,12 @@ git clone git://git.code.sf.net/p/cadcdev/kos-ports ## Compilation ## -The **dc-chain** system may be customized by altering the -[`Makefile.cfg`](../Makefile.cfg) file in the root of the `dc-chain` directory -tree. If this is desired, read the main [README.md](../README.md) for more -information on setting up custom options for the toolchain; however, in most -circumstances, the stable defaults already set up will be fine. +The **dc-chain** system may be customized by setting up a +[`Makefile.cfg`] file in the root of the `dc-chain` directory tree. If this is +desired, read the main [README.md](../README.md) for more information on +setting up custom options for the toolchain; however, in most circumstances, +the stable defaults already present in +[`Makefile.default.cfg`](../Makefile.default.cfg) will be fine. ### Building the toolchain ### @@ -64,7 +65,7 @@ To build the toolchain, do the following: cd /opt/toolchains/dc/kos/utils/dc-chain/ ``` -2. Alter the `Makefile.cfg` file options to your liking. +2. (Optional) Copy and alter the `Makefile.cfg` file options to your liking. 3. Enter the following to start downloading and building toolchain: ``` @@ -78,7 +79,7 @@ hours will be needed to build the full toolchain, depending on your system. After everything is done, you can cleanup all temporary files by entering: ``` -make clean +make distclean ``` ## Next steps ## diff --git a/utils/dc-chain/doc/macos.md b/utils/dc-chain/doc/macos.md index d3b6d92f..ed33c68b 100644 --- a/utils/dc-chain/doc/macos.md +++ b/utils/dc-chain/doc/macos.md @@ -85,11 +85,12 @@ git clone git://git.code.sf.net/p/cadcdev/kos-ports ## Compilation ## -The **dc-chain** system may be customized by altering the -[`Makefile.cfg`](../Makefile.cfg) file in the root of the `dc-chain` directory -tree. If this is desired, read the main [README.md](../README.md) for more -information on setting up custom options for the toolchain; however, in most -circumstances, the stable defaults already set up will be fine. +The **dc-chain** system may be customized by setting up a +[`Makefile.cfg`] file in the root of the `dc-chain` directory tree. If this is +desired, read the main [README.md](../README.md) for more information on +setting up custom options for the toolchain; however, in most circumstances, +the stable defaults already present in +[`Makefile.default.cfg`](../Makefile.default.cfg) will be fine. ### Building the toolchain ### @@ -100,7 +101,7 @@ To build the toolchain, do the following: cd /opt/toolchains/dc/kos/utils/dc-chain/ ``` -2. Alter the `Makefile.cfg` file options to your liking. +2. (Optional) Copy and alter the `Makefile.cfg` file options to your liking. 3. Enter the following to start downloading and building toolchain: ``` @@ -114,7 +115,7 @@ hours will be needed to build the full toolchain, depending on your system. After everything is done, you can cleanup all temporary files by entering: ``` -make clean +make distclean ``` ## Next steps ## diff --git a/utils/dc-chain/doc/mingw/mingw-w64.md b/utils/dc-chain/doc/mingw/mingw-w64.md index 58cffa5c..1c9886ee 100644 --- a/utils/dc-chain/doc/mingw/mingw-w64.md +++ b/utils/dc-chain/doc/mingw/mingw-w64.md @@ -102,11 +102,12 @@ Everything is ready, now it's time to make the toolchains. ## Compilation ## -The **dc-chain** system may be customized by altering the -[`Makefile.cfg`](../Makefile.cfg) file in the root of the `dc-chain` directory -tree. If this is desired, read the main [README.md](../../README.md) for more -information on setting up custom options for the toolchain; however, in most -circumstances, the stable defaults already set up will be fine. +The **dc-chain** system may be customized by setting up a +[`Makefile.cfg`] file in the root of the `dc-chain` directory tree. If this is +desired, read the main [README.md](../../README.md) for more information on +setting up custom options for the toolchain; however, in most circumstances, +the stable defaults already present in +[`Makefile.default.cfg`](../../Makefile.default.cfg) will be fine. ### Building the toolchains ### @@ -119,7 +120,7 @@ To build the toolchain, do the following: cd /opt/toolchains/dc/kos/utils/dc-chain/ ``` -3. Alter the `Makefile.cfg` file options to your liking. +3. (Optional) Copy and alter the `Makefile.cfg` file options to your liking. 4. Enter the following to start downloading and building toolchain: ``` @@ -133,7 +134,7 @@ hours will be needed to build the full toolchain, depending on your system. After everything is done, you can cleanup all temporary files by entering: ``` -make clean +make distclean ``` ## Fixing up Newlib for SH4 ## diff --git a/utils/dc-chain/doc/mingw/mingw.md b/utils/dc-chain/doc/mingw/mingw.md index ae671562..97f25d82 100644 --- a/utils/dc-chain/doc/mingw/mingw.md +++ b/utils/dc-chain/doc/mingw/mingw.md @@ -166,11 +166,12 @@ Basically, if you just plan to use the **MinGW/MSYS** environment through the ## Compilation ## -The **dc-chain** system may be customized by altering the -[`Makefile.cfg`](../Makefile.cfg) file in the root of the `dc-chain` directory -tree. If this is desired, read the main [README.md](../../README.md) for more -information on setting up custom options for the toolchain; however, in most -circumstances, the stable defaults already set up will be fine. +The **dc-chain** system may be customized by setting up a +[`Makefile.cfg`] file in the root of the `dc-chain` directory tree. If this is +desired, read the main [README.md](../../README.md) for more information on +setting up custom options for the toolchain; however, in most circumstances, +the stable defaults already present in +[`Makefile.default.cfg`](../../Makefile.default.cfg) will be fine. ### Building the toolchain ### @@ -183,7 +184,7 @@ To build the toolchain, do the following: cd /opt/toolchains/dc/kos/utils/dc-chain/ ``` -3. Alter the `Makefile.cfg` file options to your liking. +3. (Optional) Copy and alter the `Makefile.cfg` file options to your liking. 4. Enter the following to start downloading and building toolchain: ``` @@ -197,7 +198,7 @@ hours will be needed to build the full toolchain, depending on your system. After everything is done, you can cleanup all temporary files by entering: ``` -make clean +make distclean ``` ## Removing the MSYS heap patch ## diff --git a/utils/dc-chain/scripts/clean.mk b/utils/dc-chain/scripts/clean.mk index bd811063..8550e44d 100644 --- a/utils/dc-chain/scripts/clean.mk +++ b/utils/dc-chain/scripts/clean.mk @@ -1,9 +1,9 @@ # Sega Dreamcast Toolchains Maker (dc-chain) # This file is part of KallistiOS. -clean: clean-archives clean-downloads clean-builds clean_patches_stamp +clean: clean-downloads clean-builds clean_patches_stamp -clean-keep-archives: clean-downloads clean-builds clean_patches_stamp +distclean: clean-archives clean-downloads clean-builds clean_patches_stamp clean_patches_stamp: -@tmpdir=.tmp; \ diff --git a/utils/dc-chain/scripts/gcc-pass1.mk b/utils/dc-chain/scripts/gcc-pass1.mk index ebba6436..5958a858 100644 --- a/utils/dc-chain/scripts/gcc-pass1.mk +++ b/utils/dc-chain/scripts/gcc-pass1.mk @@ -17,11 +17,11 @@ $(build_gcc_pass1): logdir --with-gnu-ld \ --without-headers \ --with-newlib \ - --enable-languages=c \ + --enable-languages=$(pass1_languages) \ --disable-libssp \ --enable-checking=release \ $(cpu_configure_args) \ - $(gcc_extra_configure_args) \ + $(gcc_pass1_configure_args) \ $(macos_gcc_configure_args) \ MAKEINFO=missing \ CC="$(CC)" \ diff --git a/utils/dc-chain/scripts/gcc-pass2.mk b/utils/dc-chain/scripts/gcc-pass2.mk index 10220c26..73344793 100644 --- a/utils/dc-chain/scripts/gcc-pass2.mk +++ b/utils/dc-chain/scripts/gcc-pass2.mk @@ -1,12 +1,6 @@ # Sega Dreamcast Toolchains Maker (dc-chain) # This file is part of KallistiOS. -disable_libada="" - -ifneq (,$(findstring ada,$(enabled_languages))) - disable_libada=--disable-libada -endif - $(build_gcc_pass2): build = build-gcc-$(target)-$(gcc_ver)-pass2 $(build_gcc_pass2): logdir @echo "+++ Building $(src_dir) to $(build) (pass 2)..." @@ -20,22 +14,22 @@ $(build_gcc_pass2): logdir --with-gnu-ld \ --with-newlib \ --disable-libssp \ - --disable-libphobos \ - $(disable_libada) \ --enable-threads=$(thread_model) \ - --enable-languages=$(enabled_languages) \ + --enable-languages=$(pass2_languages) \ --enable-checking=release \ $(cpu_configure_args) \ - $(gcc_extra_configure_args) \ + $(gcc_pass2_configure_args) \ $(macos_gcc_configure_args) \ MAKEINFO=missing \ CC="$(CC)" \ ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: quzar <qu...@us...> - 2024-05-14 21:07:30
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via d5656890a901d02c470671669925d2ca76b353f3 (commit) from 39ade8b98f51fb6536e3e4aa3e04f78b4bdb5d74 (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 d5656890a901d02c470671669925d2ca76b353f3 Author: darcagn <da...@pr...> Date: Tue May 14 15:06:25 2024 -0600 Rename gnu_wrappers to build_wrappers (#577) ----------------------------------------------------------------------- Summary of changes: environ_base.sh | 4 ++-- utils/{gnu_wrappers => build_wrappers}/dc-arm-ar | 0 utils/{gnu_wrappers => build_wrappers}/dc-arm-as | 0 utils/{gnu_wrappers => build_wrappers}/dc-arm-cc | 0 utils/{gnu_wrappers => build_wrappers}/dc-arm-ld | 0 utils/{gnu_wrappers => build_wrappers}/dc-arm-make | 0 utils/{gnu_wrappers => build_wrappers}/dc-arm-objcopy | 0 utils/{gnu_wrappers => build_wrappers}/kos-ar | 0 utils/{gnu_wrappers => build_wrappers}/kos-as | 0 utils/{gnu_wrappers => build_wrappers}/kos-c++ | 0 utils/{gnu_wrappers => build_wrappers}/kos-cc | 0 utils/{gnu_wrappers => build_wrappers}/kos-ccmake | 0 utils/{gnu_wrappers => build_wrappers}/kos-cmake | 0 utils/{gnu_wrappers => build_wrappers}/kos-ld | 0 utils/{gnu_wrappers => build_wrappers}/kos-make | 0 utils/{gnu_wrappers => build_wrappers}/kos-objcopy | 0 utils/{gnu_wrappers => build_wrappers}/kos-ranlib | 0 utils/{gnu_wrappers => build_wrappers}/kos-strip | 0 utils/cmake/dreamcast.toolchain.cmake | 18 +++++++++--------- 19 files changed, 11 insertions(+), 11 deletions(-) rename utils/{gnu_wrappers => build_wrappers}/dc-arm-ar (100%) mode change 100644 => 100755 rename utils/{gnu_wrappers => build_wrappers}/dc-arm-as (100%) mode change 100644 => 100755 rename utils/{gnu_wrappers => build_wrappers}/dc-arm-cc (100%) mode change 100644 => 100755 rename utils/{gnu_wrappers => build_wrappers}/dc-arm-ld (100%) mode change 100644 => 100755 rename utils/{gnu_wrappers => build_wrappers}/dc-arm-make (100%) mode change 100644 => 100755 rename utils/{gnu_wrappers => build_wrappers}/dc-arm-objcopy (100%) mode change 100644 => 100755 rename utils/{gnu_wrappers => build_wrappers}/kos-ar (100%) rename utils/{gnu_wrappers => build_wrappers}/kos-as (100%) rename utils/{gnu_wrappers => build_wrappers}/kos-c++ (100%) rename utils/{gnu_wrappers => build_wrappers}/kos-cc (100%) rename utils/{gnu_wrappers => build_wrappers}/kos-ccmake (100%) rename utils/{gnu_wrappers => build_wrappers}/kos-cmake (100%) rename utils/{gnu_wrappers => build_wrappers}/kos-ld (100%) rename utils/{gnu_wrappers => build_wrappers}/kos-make (100%) rename utils/{gnu_wrappers => build_wrappers}/kos-objcopy (100%) rename utils/{gnu_wrappers => build_wrappers}/kos-ranlib (100%) rename utils/{gnu_wrappers => build_wrappers}/kos-strip (100%) diff --git a/environ_base.sh b/environ_base.sh index 4fe54147..60be5201 100644 --- a/environ_base.sh +++ b/environ_base.sh @@ -13,8 +13,8 @@ export KOS_ARCH_DIR="${KOS_BASE}/kernel/arch/${KOS_ARCH}" . ${KOS_BASE}/environ_${KOS_ARCH}.sh # Add the gnu wrappers dir to the path if it is not already -if [[ ":$PATH:" != *":${KOS_BASE}/utils/gnu_wrappers"* ]]; then - export PATH="${PATH}:${KOS_BASE}/utils/gnu_wrappers" +if [[ ":$PATH:" != *":${KOS_BASE}/utils/build_wrappers:"* ]]; then + export PATH="${PATH}:${KOS_BASE}/utils/build_wrappers" fi # Our includes diff --git a/utils/gnu_wrappers/dc-arm-ar b/utils/build_wrappers/dc-arm-ar old mode 100644 new mode 100755 similarity index 100% rename from utils/gnu_wrappers/dc-arm-ar rename to utils/build_wrappers/dc-arm-ar diff --git a/utils/gnu_wrappers/dc-arm-as b/utils/build_wrappers/dc-arm-as old mode 100644 new mode 100755 similarity index 100% rename from utils/gnu_wrappers/dc-arm-as rename to utils/build_wrappers/dc-arm-as diff --git a/utils/gnu_wrappers/dc-arm-cc b/utils/build_wrappers/dc-arm-cc old mode 100644 new mode 100755 similarity index 100% rename from utils/gnu_wrappers/dc-arm-cc rename to utils/build_wrappers/dc-arm-cc diff --git a/utils/gnu_wrappers/dc-arm-ld b/utils/build_wrappers/dc-arm-ld old mode 100644 new mode 100755 similarity index 100% rename from utils/gnu_wrappers/dc-arm-ld rename to utils/build_wrappers/dc-arm-ld diff --git a/utils/gnu_wrappers/dc-arm-make b/utils/build_wrappers/dc-arm-make old mode 100644 new mode 100755 similarity index 100% rename from utils/gnu_wrappers/dc-arm-make rename to utils/build_wrappers/dc-arm-make diff --git a/utils/gnu_wrappers/dc-arm-objcopy b/utils/build_wrappers/dc-arm-objcopy old mode 100644 new mode 100755 similarity index 100% rename from utils/gnu_wrappers/dc-arm-objcopy rename to utils/build_wrappers/dc-arm-objcopy diff --git a/utils/gnu_wrappers/kos-ar b/utils/build_wrappers/kos-ar similarity index 100% rename from utils/gnu_wrappers/kos-ar rename to utils/build_wrappers/kos-ar diff --git a/utils/gnu_wrappers/kos-as b/utils/build_wrappers/kos-as similarity index 100% rename from utils/gnu_wrappers/kos-as rename to utils/build_wrappers/kos-as diff --git a/utils/gnu_wrappers/kos-c++ b/utils/build_wrappers/kos-c++ similarity index 100% rename from utils/gnu_wrappers/kos-c++ rename to utils/build_wrappers/kos-c++ diff --git a/utils/gnu_wrappers/kos-cc b/utils/build_wrappers/kos-cc similarity index 100% rename from utils/gnu_wrappers/kos-cc rename to utils/build_wrappers/kos-cc diff --git a/utils/gnu_wrappers/kos-ccmake b/utils/build_wrappers/kos-ccmake similarity index 100% rename from utils/gnu_wrappers/kos-ccmake rename to utils/build_wrappers/kos-ccmake diff --git a/utils/gnu_wrappers/kos-cmake b/utils/build_wrappers/kos-cmake similarity index 100% rename from utils/gnu_wrappers/kos-cmake rename to utils/build_wrappers/kos-cmake diff --git a/utils/gnu_wrappers/kos-ld b/utils/build_wrappers/kos-ld similarity index 100% rename from utils/gnu_wrappers/kos-ld rename to utils/build_wrappers/kos-ld diff --git a/utils/gnu_wrappers/kos-make b/utils/build_wrappers/kos-make similarity index 100% rename from utils/gnu_wrappers/kos-make rename to utils/build_wrappers/kos-make diff --git a/utils/gnu_wrappers/kos-objcopy b/utils/build_wrappers/kos-objcopy similarity index 100% rename from utils/gnu_wrappers/kos-objcopy rename to utils/build_wrappers/kos-objcopy diff --git a/utils/gnu_wrappers/kos-ranlib b/utils/build_wrappers/kos-ranlib similarity index 100% rename from utils/gnu_wrappers/kos-ranlib rename to utils/build_wrappers/kos-ranlib diff --git a/utils/gnu_wrappers/kos-strip b/utils/build_wrappers/kos-strip similarity index 100% rename from utils/gnu_wrappers/kos-strip rename to utils/build_wrappers/kos-strip diff --git a/utils/cmake/dreamcast.toolchain.cmake b/utils/cmake/dreamcast.toolchain.cmake index 281c0e91..66c75cfe 100644 --- a/utils/cmake/dreamcast.toolchain.cmake +++ b/utils/cmake/dreamcast.toolchain.cmake @@ -17,11 +17,11 @@ # # kos-cmake /path/to/src # -# Frame pointers are enabled in debug builds as these are required for +# Frame pointers are enabled in debug builds as these are required for # stack traces and GDB. They are disabled in release. -# -# The original toolchain file was created by Kazade for the Simulant -# engine who has graciously allowed the rest of the scene to warez it. +# +# The original toolchain file was created by Kazade for the Simulant +# engine who has graciously allowed the rest of the scene to copy it. #### This minimum is due to the use of add_link_options cmake_minimum_required(VERSION 3.13) @@ -50,11 +50,11 @@ set(PLATFORM_DREAMCAST TRUE) ##### Configure Cross-Compiler ##### set(CMAKE_CROSSCOMPILING TRUE) -set(CMAKE_ASM_COMPILER ${KOS_BASE}/utils/gnu_wrappers/kos-as) -set(CMAKE_C_COMPILER ${KOS_BASE}/utils/gnu_wrappers/kos-cc) -set(CMAKE_CXX_COMPILER ${KOS_BASE}/utils/gnu_wrappers/kos-c++) -set(CMAKE_OBJC_COMPILER ${KOS_BASE}/utils/gnu_wrappers/kos-cc) -set(CMAKE_OBJCXX_COMPILER ${KOS_BASE}/utils/gnu_wrappers/kos-c++) +set(CMAKE_ASM_COMPILER ${KOS_BASE}/utils/build_wrappers/kos-as) +set(CMAKE_C_COMPILER ${KOS_BASE}/utils/build_wrappers/kos-cc) +set(CMAKE_CXX_COMPILER ${KOS_BASE}/utils/build_wrappers/kos-c++) +set(CMAKE_OBJC_COMPILER ${KOS_BASE}/utils/build_wrappers/kos-cc) +set(CMAKE_OBJCXX_COMPILER ${KOS_BASE}/utils/build_wrappers/kos-c++) set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: quzar <qu...@us...> - 2024-05-12 04:24:02
|
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 39ade8b98f51fb6536e3e4aa3e04f78b4bdb5d74 (commit) from 1bd6f475dc9c9d3f6fac03357e1d1401513d3f51 (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 39ade8b98f51fb6536e3e4aa3e04f78b4bdb5d74 Author: Falco Girgis <gyr...@gm...> Date: Sat May 11 23:23:32 2024 -0500 Fixed directory reading using FAM to conserve RAM (#546) * Fixed directory reading using FAM to conserve RAM - The zero-sized array approach that was tried previously was apparently causing undefined behavior since it was not the last member of the DIR structure, when calling readdir() - Modified it back to using a FAM, except this time got it working with C++ (and GNU extensions), by using a unionization of the inner dirent structure along with an additional extension to hold the name. * Fixed handling NULL terminator for NAME_MAX. The POSIX NAME_MAX is not supposed to be the array capacity for the name, it's supposed to be the MAX STRING LENGTH, meaning we also must have one extra byte for a NULL terminator! --------- ----------------------------------------------------------------------- Summary of changes: include/sys/dirent.h | 50 ++++++++++++++++++++++++++++++-------------- kernel/libc/koslib/readdir.c | 8 ++++++- kernel/libc/koslib/scandir.c | 2 +- 3 files changed, 42 insertions(+), 18 deletions(-) diff --git a/include/sys/dirent.h b/include/sys/dirent.h index 7951c390..37bff92f 100644 --- a/include/sys/dirent.h +++ b/include/sys/dirent.h @@ -54,35 +54,53 @@ __BEGIN_DECLS #define DT_WHT 14 /**< \brief Whiteout (ignored) */ /** @} */ -/** \brief POSIX directory entry structure. +/** \brief POSIX directory entry structure. This structure contains information about a single entry in a directory in the VFS. - - \headerfile sys/dirent.h */ struct dirent { - int d_ino; /**< \brief File unique identifier. */ - off_t d_off; /**< \brief File offset */ - uint16_t d_reclen; /**< \brief Record length */ - uint8_t d_type; /**< \brief File type */ - char d_name[0]; /**< \brief Filename */ + int d_ino; /**< \brief File unique identifier */ + off_t d_off; /**< \brief File offset */ + uint16_t d_reclen; /**< \brief Record length */ + uint8_t d_type; /**< \brief File type */ + /** \brief File name + + \warning + This field is a flexible array member, which means the structure + requires manual over-allocation to reserve storage for this string. + \note + This allows us to optimize our memory usage by only allocating + exactly as many bytes as the string is long for this field. + */ + char d_name[]; }; -/** \brief Type representing a directory stream. +/** \brief Type representing a directory stream. This type represents a directory stream and is used by the directory reading functions to trace their position in the directory. - The values in this function are all private and subject to change. Do not - attempt to use any of them directly. - - \headerfile sys/dirent.h + \note + The end of this structure is providing extra fixed storage for its inner + d_ent.d_name[] FAM, hence the unionization of the d_ent structure along + with a d_name[NAME_MAX] extension. */ typedef struct { - file_t fd; /**< \brief File descriptor for the directory */ - struct dirent d_ent; /**< \brief Current directory entry */ - char d_name[NAME_MAX]; /**< \brief Filename */ + /** \brief File descriptor for the directory */ + file_t fd; + /** \brief Union of dirent + extended dirent required for C++ */ + union { + /** \brief Current directory entry */ + struct dirent d_ent; + /** \brief Extended dirent structure with name storage */ + struct { + /** \brief Current directory entry (alias) */ + struct dirent d_ent2; + /** \brief Storage for d_ent::d_name[] FAM */ + char d_name[NAME_MAX + 1]; + }; + }; } DIR; // Standard UNIX dir functions. Not all of these are fully functional diff --git a/kernel/libc/koslib/readdir.c b/kernel/libc/koslib/readdir.c index d2bbd601..3fd51ea2 100644 --- a/kernel/libc/koslib/readdir.c +++ b/kernel/libc/koslib/readdir.c @@ -12,6 +12,7 @@ struct dirent *readdir(DIR *dir) { dirent_t *d; + size_t len; if(!dir) { errno = EBADF; @@ -32,7 +33,12 @@ struct dirent *readdir(DIR *dir) { else dir->d_ent.d_type = DT_REG; - strncpy(dir->d_name, d->name, sizeof(dir->d_name)); + len = strlen(d->name); + if(len > sizeof(dir->d_name) - 1) + len = sizeof(dir->d_name) - 1; + + strncpy(dir->d_ent.d_name, d->name, len); + dir->d_ent.d_name[len] = '\0'; return &dir->d_ent; } diff --git a/kernel/libc/koslib/scandir.c b/kernel/libc/koslib/scandir.c index 1c26c445..c81106e5 100644 --- a/kernel/libc/koslib/scandir.c +++ b/kernel/libc/koslib/scandir.c @@ -62,7 +62,7 @@ static int push_back(struct dirent ***list, int *size, int *capacity, entry_size = sizeof(struct dirent) + strlen(dir->d_name) + 1; new_dir = malloc(entry_size); - /* Check for malloc() failure of the singel entry */ + /* Check for malloc() failure of the single entry */ if(!new_dir) goto out_of_memory; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: quzar <qu...@us...> - 2024-05-12 02:27: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 1bd6f475dc9c9d3f6fac03357e1d1401513d3f51 (commit) from 71aa13a7edebe7c236c306f5e12abddb27f0a8f3 (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 1bd6f475dc9c9d3f6fac03357e1d1401513d3f51 Author: Andy Barajas <and...@gm...> Date: Sat May 11 18:38:33 2024 -0700 examples/dreamcast/makefile rework (#538) * Continue building examples and give a list at the end of any failures ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/Makefile | 62 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 4 deletions(-) diff --git a/examples/dreamcast/Makefile b/examples/dreamcast/Makefile index 23e25f7b..1b36dc2f 100644 --- a/examples/dreamcast/Makefile +++ b/examples/dreamcast/Makefile @@ -1,7 +1,8 @@ # KallistiOS ##version## # # examples/dreamcast/Makefile -# Copyright (C)2003 Megan Potter +# Copyright (C) 2003 Megan Potter +# Copyright (C) 2024 Andy Barajas # DIRS = 2ndmix basic libdream kgl hello sound png network vmu conio pvr video \ @@ -12,11 +13,64 @@ ifdef KOS_CCPLUS DIRS += cpp tsunami endif +.PHONY: all + all: - for i in $(DIRS); do $(KOS_MAKE) -C $$i || exit -1; done + @for dir in $(DIRS); do \ + $(KOS_MAKE) check-dir DIR=$$dir; \ + done; + + @if [ -f errors.txt ]; then \ + echo "\n-------------------------------------------------"; \ + echo "$$(cat error_count.txt 2>/dev/null || echo 0) error(s) occurred during the build process:"; \ + cat errors.txt; \ + fi; + @rm -f errors.txt error_count.txt + +# ALGORITHM EXPLANATION: +# This script recursively checks each directory to determine if it should +# execute its Makefile based on the presence of Makefiles in its subdirectories. +# +# Steps: +# 1. For each directory, identify all direct subdirectories. +# 2. Check each subdirectory for the existence of a Makefile. +# 3. If any subdirectory contains a Makefile, recursively perform this check on +# that subdirectory and do not execute the Makefile in the current directory. +# 4. If no subdirectories contain a Makefile, execute the Makefile in the +# current directory. +# +# Purpose: +# - This approach ensures that Makefiles are only executed in the most specific +# (deepest) directories that do not contain further subdirectories with +# Makefiles. +# - This prevents redundant builds in parent directories and ensures errors are +# logged with specific directory paths, providing clear visibility into which +# particular build process failed without aggregating errors at a higher +# directory level. +check-dir: + @should_make="yes"; \ + for subdir in $(DIR)/*; do \ + if [ -e "$$subdir/Makefile" ]; then \ + should_make="no"; \ + $(KOS_MAKE) check-dir DIR=$$subdir; \ + fi; \ + done; \ + if [ "$$should_make" = "yes" ]; then \ + $(KOS_MAKE) -C $(DIR); \ + rv=$$?; \ + if [ "$$rv" -ne 0 ]; then \ + echo "$(DIR): Build failed with return code $$rv" >> errors.txt; \ + echo $$(($$(cat error_count.txt 2>/dev/null || echo 0) + 1)) > error_count.txt; \ + fi; \ + fi; clean: - for i in $(DIRS); do $(KOS_MAKE) -C $$i clean || exit -1; done + @for dir in $(DIRS); do \ + $(KOS_MAKE) -C $$dir clean; \ + done dist: - for i in $(DIRS); do $(KOS_MAKE) -C $$i dist || exit -1; done + @for dir in $(DIRS); do \ + $(KOS_MAKE) -C $$dir dist; \ + done + hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-05-11 03:33: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 71aa13a7edebe7c236c306f5e12abddb27f0a8f3 (commit) from 9a1358bc2e4636d1333b52160fdbef5b41131d02 (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 71aa13a7edebe7c236c306f5e12abddb27f0a8f3 Author: Andy Barajas <and...@gm...> Date: Fri May 10 20:32:34 2024 -0700 Add Syscalls module (#536) * Added syscalls module and updated modules that use the syscalls --------- Co-authored-by: Falco Girgis <gyr...@gm...> Co-authored-by: Donald Haase <qu...@ya...> ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 1 + kernel/arch/dreamcast/hardware/Makefile | 3 + kernel/arch/dreamcast/hardware/biosfont.c | 59 ++-- kernel/arch/dreamcast/hardware/cdrom.c | 118 ++------ kernel/arch/dreamcast/hardware/flashrom.c | 17 +- kernel/arch/dreamcast/hardware/syscall_font.s | 58 ++++ kernel/arch/dreamcast/hardware/syscalls.c | 266 +++++++++++++++++ kernel/arch/dreamcast/include/dc/syscalls.h | 403 ++++++++++++++++++++++++++ kernel/arch/dreamcast/kernel/init.c | 8 +- 9 files changed, 798 insertions(+), 135 deletions(-) create mode 100644 kernel/arch/dreamcast/hardware/syscall_font.s create mode 100644 kernel/arch/dreamcast/hardware/syscalls.c create mode 100644 kernel/arch/dreamcast/include/dc/syscalls.h diff --git a/doc/CHANGELOG b/doc/CHANGELOG index cb37cfe0..252729cd 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -223,6 +223,7 @@ KallistiOS version 2.1.0 ----------------------------------------------- - DC Increased the resolution of pvr_stats_t from milli to nanoseconds [FG] - *** Added support for modifying scheduler frequency at runtime [FG] - *** Add support for worker threads [PC] +- DC Added new System Calls module [AB] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Megan Potter == MP] diff --git a/kernel/arch/dreamcast/hardware/Makefile b/kernel/arch/dreamcast/hardware/Makefile index 297c4493..f83f51db 100644 --- a/kernel/arch/dreamcast/hardware/Makefile +++ b/kernel/arch/dreamcast/hardware/Makefile @@ -12,6 +12,9 @@ ifneq ($(KOS_SUBARCH), naomi) OBJS += biosfont.o cdrom.o flashrom.o endif +# System Calls +OBJS += syscalls.o syscall_font.o + # G2 OBJS += g2dma.o diff --git a/kernel/arch/dreamcast/hardware/biosfont.c b/kernel/arch/dreamcast/hardware/biosfont.c index a8b9c3c1..328d278f 100644 --- a/kernel/arch/dreamcast/hardware/biosfont.c +++ b/kernel/arch/dreamcast/hardware/biosfont.c @@ -4,12 +4,17 @@ Copyright (C) 2000-2002 Megan Potter Japanese code Copyright (C) Kazuaki Matsumoto - Copyright (C) 2017 Donald Haase + Copyright (C) 2017, 2024 Donald Haase + Copyright (C) 2024 Andy Barajas */ #include <assert.h> + #include <dc/biosfont.h> +#include <dc/syscalls.h> + #include <kos/dbglog.h> +#include <kos/mutex.h> /* @@ -70,20 +75,26 @@ int bfont_set_32bit_mode(int on) { return rv; } -/* A little assembly that grabs the font address */ -extern uint8* get_font_address(void); -__asm__(" .text\n" - " .align 2\n" - ".globl _get_font_address\n" - "_get_font_address:\n" - " mov.l syscall_b4,r0\n" - " mov.l @r0,r0\n" - " jmp @r0\n" - " mov #0,r1\n" - "\n" - " .align 4\n" - "syscall_b4:\n" - " .long 0x8c0000b4\n"); +/* From cdrom.c */ +extern mutex_t _g1_ata_mutex; + +int lock_bfont(void) { + if(mutex_lock(&_g1_ata_mutex) == -1) return -1; + + /* Just make sure no outside system took the lock */ + while(syscall_font_lock() != 0) + thd_pass(); + + return 0; +} + +int unlock_bfont(void) { + if(mutex_unlock(&_g1_ata_mutex) == -1) return -1; + + syscall_font_unlock(); + + return 0; +} /* Shift-JIS -> JIS conversion */ uint32 sjis2jis(uint32 sjis) { @@ -114,7 +125,7 @@ uint32 euc2jis(uint32 euc) { /* Given an ASCII character, find it in the BIOS font if possible */ uint8 *bfont_find_char(uint32 ch) { - uint8 *fa = get_font_address(); + uint8 *fa = syscall_font_address(); /* By default, map to a space */ uint32 index = 72 << 2; @@ -131,7 +142,7 @@ uint8 *bfont_find_char(uint32 ch) { /* JIS -> (kuten) -> address conversion */ uint8 *bfont_find_char_jp(uint32 ch) { - uint8 *fa = get_font_address(); + uint8 *fa = syscall_font_address(); uint32 ku, ten, kuten = 0; /* Do the requested code conversion */ @@ -164,7 +175,7 @@ uint8 *bfont_find_char_jp(uint32 ch) { /* Half-width kana -> address conversion */ uint8 *bfont_find_char_jp_half(uint32 ch) { - uint8 *fa = get_font_address(); + uint8 *fa = syscall_font_address(); return fa + (32 + ch) * (BFONT_THIN_WIDTH*BFONT_HEIGHT/8); } @@ -227,9 +238,14 @@ unsigned char bfont_draw_ex(uint8 *buffer, uint32 bufwidth, uint32 fg, uint32 bg return 0; } + if(lock_bfont() < 0) { + dbglog(DBG_ERROR, "bfont_draw_ex: error requesting font access\n"); + return 0; + } + /* Translate the character */ if(bfont_code_mode == BFONT_CODE_RAW) - ch = get_font_address() + c; + ch = syscall_font_address() + c; else if(wide && ((bfont_code_mode == BFONT_CODE_EUC) || (bfont_code_mode == BFONT_CODE_SJIS))) ch = bfont_find_char_jp(c); else { @@ -258,6 +274,9 @@ unsigned char bfont_draw_ex(uint8 *buffer, uint32 bufwidth, uint32 fg, uint32 bg else buffer += ((bufwidth - BFONT_WIDE_WIDTH)*bpp)/8; } + if(unlock_bfont() < 0) + dbglog(DBG_ERROR, "bfont_draw_ex: error releasing font access\n"); + /* Return the horizontal distance covered in bytes */ if(wide) return (BFONT_WIDE_WIDTH*bpp)/8; @@ -345,6 +364,6 @@ uint8 *bfont_find_icon(uint8 icon) { int icon_offset = BFONT_VMU_DREAMCAST_SPECIFIC + (icon * BFONT_ICON_DIMEN * BFONT_ICON_DIMEN/8); - uint8 *fa = get_font_address(); + uint8 *fa = syscall_font_address(); return fa + icon_offset; } diff --git a/kernel/arch/dreamcast/hardware/cdrom.c b/kernel/arch/dreamcast/hardware/cdrom.c index abb4b028..e842e336 100644 --- a/kernel/arch/dreamcast/hardware/cdrom.c +++ b/kernel/arch/dreamcast/hardware/cdrom.c @@ -6,6 +6,7 @@ Copyright (C) 2014 Lawrence Sebald Copyright (C) 2014 Donald Haase Copyright (C) 2023 Ruslan Rostovtsev + Copyright (C) 2024 Andy Barajas */ #include <assert.h> @@ -15,6 +16,7 @@ #include <dc/cdrom.h> #include <dc/g1ata.h> +#include <dc/syscalls.h> #include <kos/thread.h> #include <kos/mutex.h> @@ -40,96 +42,16 @@ normally the case with the default options. If in doubt, decompile the output and look to make sure. XXX: This could all be done in a non-blocking way by taking advantage of -command queuing. Every call to gdc_req_cmd returns a 'request id' which -just needs to eventually be checked by cmd_stat. A non-blocking version -of all functions would simply require manual calls to check the status. -Doing this would probably allow data reading while cdda is playing without -hiccups (by severely reducing the number of gd commands being sent). +command queuing. Every call to syscall_gdrom_send_command returns a +'request id' which just needs to eventually be checked by cmd_stat. A +non-blocking version of all functions would simply require manual calls +to check the status. Doing this would probably allow data reading while +cdda is playing without hiccups (by severely reducing the number of gd +commands being sent). */ - -/* GD-Rom BIOS calls... named mostly after Marcus' code. None have more - than two parameters; R7 (fourth parameter) needs to describe - which syscall we want. */ - -#define MAKE_SYSCALL(rs, p1, p2, idx) \ - uint32_t *syscall_bc = (uint32_t *)(0x0c0000bc | MEM_AREA_P1_BASE); \ - int (*syscall)() = (int (*)())(*syscall_bc); \ - rs syscall((p1), (p2), 0, (idx)); - typedef int gdc_cmd_hnd_t; -/* Reset system functions */ -static void gdc_init_system(void) { - MAKE_SYSCALL(/**/, 0, 0, 3); -} - -/* Submit a command to the system */ -static gdc_cmd_hnd_t gdc_req_cmd(int cmd, void *param) { - MAKE_SYSCALL(return, cmd, param, 0); -} - -/* Check status on an executed command */ -static int gdc_get_cmd_stat(gdc_cmd_hnd_t hnd, void *status) { - MAKE_SYSCALL(return, hnd, status, 1); -} - -/* Execute submitted commands */ -static void gdc_exec_server(void) { - MAKE_SYSCALL(/**/, 0, 0, 2); -} - -/* Check drive status and get disc type */ -static int gdc_get_drv_stat(void *param) { - MAKE_SYSCALL(return, param, 0, 4); -} - -/* Set disc access mode */ -static int gdc_change_data_type(void *param) { - MAKE_SYSCALL(return, param, 0, 10); -} - -/* Abort the current command */ -static void gdc_abort_cmd(gdc_cmd_hnd_t hnd) { - MAKE_SYSCALL(/**/, hnd, 0, 8); -} - -/* Reset the GD-ROM syscalls */ -static void gdc_reset(void) { - MAKE_SYSCALL(/**/, 0, 0, 9); -} -#if 0 /* Not used yet */ -/* DMA end interrupt handler */ -static void gdc_dma_end(uintptr_t callback, void *param) { - MAKE_SYSCALL(/**/, callback, param, 5); -} - -/* Request DMA transfer for DMAREAD_STREAM commands */ -static int gdc_req_dma_transfer(gdc_cmd_hnd_t hnd, int *params) { - MAKE_SYSCALL(return, hnd, params, 6); -} - -/* Check DMA transfer for DMAREAD_STREAM commands */ -static int gdc_check_dma_transfer(gdc_cmd_hnd_t hnd, int *size) { - MAKE_SYSCALL(return, hnd, size, 7); -} - -/* Setup PIO transfer end callback for PIOREAD_STREAM commands */ -static void gdc_set_pio_callback(uintptr_t callback, void *param) { - MAKE_SYSCALL(/**/, callback, param, 11); -} - -/* Request PIO transfer for PIOREAD_STREAM commands */ -static int gdc_req_pio_transfer(gdc_cmd_hnd_t hnd, int *params) { - MAKE_SYSCALL(return, hnd, params, 12); -} - -/* Check PIO transfer for PIOREAD_STREAM commands */ -static int gdc_check_pio_transfer(gdc_cmd_hnd_t hnd, int *size) { - MAKE_SYSCALL(return, hnd, size, 13); -} -#endif - /* The G1 ATA access mutex */ mutex_t _g1_ata_mutex = MUTEX_INITIALIZER; @@ -144,7 +66,7 @@ int cdrom_exec_cmd(int cmd, void *param) { } int cdrom_exec_cmd_timed(int cmd, void *param, int timeout) { - int status[4] = { + int32_t status[4] = { 0, /* Error code 1 */ 0, /* Error code 2 */ 0, /* Transferred size */ @@ -159,11 +81,11 @@ int cdrom_exec_cmd_timed(int cmd, void *param, int timeout) { /* Submit the command */ for(n = 0; n < 10; ++n) { - hnd = gdc_req_cmd(cmd, param); + hnd = syscall_gdrom_send_command(cmd, param); if (hnd != 0) { break; } - gdc_exec_server(); + syscall_gdrom_exec_server(); thd_pass(); } @@ -177,16 +99,16 @@ int cdrom_exec_cmd_timed(int cmd, void *param, int timeout) { begin = timer_ms_gettime64(); } do { - gdc_exec_server(); - n = gdc_get_cmd_stat(hnd, status); + syscall_gdrom_exec_server(); + n = syscall_gdrom_check_command(hnd, status); if(n != PROCESSING && n != BUSY) { break; } if(timeout) { if((timer_ms_gettime64() - begin) >= (unsigned)timeout) { - gdc_abort_cmd(hnd); - gdc_exec_server(); + syscall_gdrom_abort_command(hnd); + syscall_gdrom_exec_server(); rv = ERR_TIMEOUT; dbglog(DBG_ERROR, "cdrom_exec_cmd_timed: Timeout exceeded\n"); break; @@ -235,7 +157,7 @@ int cdrom_get_status(int *status, int *disc_type) { } do { - rv = gdc_get_drv_stat(params); + rv = syscall_gdrom_check_drive(params); if(rv != BUSY) { break; @@ -287,7 +209,7 @@ int cdrom_change_datatype(int sector_part, int cdxa, int sector_size) { if(cdxa == -1) { /* If not overriding cdxa, check what the drive thinks we should use */ - gdc_get_drv_stat(params); + syscall_gdrom_check_drive(params); cdxa = (params[1] == 32 ? 2048 : 1024); } @@ -302,7 +224,7 @@ int cdrom_change_datatype(int sector_part, int cdxa, int sector_size) { params[1] = sector_part; /* Get Data or Full Sector */ params[2] = cdxa; /* CD-XA mode 1/2 */ params[3] = sector_size; /* sector size */ - rv = gdc_change_data_type(params); + rv = syscall_gdrom_sector_mode(params); mutex_unlock(&_g1_ata_mutex); return rv; } @@ -496,8 +418,8 @@ void cdrom_init(void) { } /* Reset system functions */ - gdc_reset(); - gdc_init_system(); + syscall_gdrom_reset(); + syscall_gdrom_init(); mutex_unlock(&_g1_ata_mutex); cdrom_reinit(); diff --git a/kernel/arch/dreamcast/hardware/flashrom.c b/kernel/arch/dreamcast/hardware/flashrom.c index 3acd338b..d2c3b9b5 100644 --- a/kernel/arch/dreamcast/hardware/flashrom.c +++ b/kernel/arch/dreamcast/hardware/flashrom.c @@ -3,6 +3,7 @@ flashrom.c Copyright (c) 2003 Megan Potter Copyright (C) 2008 Lawrence Sebald + Copyright (C) 2024 Andy Barajas */ /* @@ -17,6 +18,7 @@ #include <stdio.h> #include <stdlib.h> #include <dc/flashrom.h> +#include <dc/syscalls.h> #include <arch/irq.h> static void strcpy_no_term(char *dest, const char *src, size_t destsize) { @@ -39,17 +41,13 @@ static void strcpy_with_term(char *dest, const char *src, size_t destsize) { dest[srclength] = '\0'; } -/* First, implementation of the syscall wrappers. */ -typedef int (*flashrom_sc)(int, void *, int, int); - int flashrom_info(int part, int * start_out, int * size_out) { - flashrom_sc sc = (flashrom_sc)(*((uint32 *)0x8c0000b8)); uint32 ptrs[2]; int old, rv; old = irq_disable(); - if(!(rv = sc(part, ptrs, 0, 0))) { + if(!(rv = syscall_flashrom_info(part, ptrs))) { *start_out = ptrs[0]; *size_out = ptrs[1]; } @@ -60,31 +58,28 @@ int flashrom_info(int part, int * start_out, int * size_out) { } int flashrom_read(int offset, void * buffer_out, int bytes) { - flashrom_sc sc = (flashrom_sc)(*((uint32 *)0x8c0000b8)); int old, rv; old = irq_disable(); - rv = sc(offset, buffer_out, bytes, 1); + rv = syscall_flashrom_read(offset, buffer_out, bytes); irq_restore(old); return rv; } int flashrom_write(int offset, void * buffer, int bytes) { - flashrom_sc sc = (flashrom_sc)(*((uint32 *)0x8c0000b8)); int old, rv; old = irq_disable(); - rv = sc(offset, buffer, bytes, 2); + rv = syscall_flashrom_write(offset, buffer, bytes); irq_restore(old); return rv; } int flashrom_delete(int offset) { - flashrom_sc sc = (flashrom_sc)(*((uint32 *)0x8c0000b8)); int old, rv; old = irq_disable(); - rv = sc(offset, 0, 0, 3); + rv = syscall_flashrom_delete(offset); irq_restore(old); return rv; } diff --git a/kernel/arch/dreamcast/hardware/syscall_font.s b/kernel/arch/dreamcast/hardware/syscall_font.s new file mode 100644 index 00000000..44507c38 --- /dev/null +++ b/kernel/arch/dreamcast/hardware/syscall_font.s @@ -0,0 +1,58 @@ + +! KallistiOS ##version## +! +! arch/dreamcast/hardware/syscall_font.s +! +! Copyright (C) 2024 Andy Barajas +! +! Assembly code for font system calls +! + .text + .globl _syscall_font_address + .globl _syscall_font_lock + .globl _syscall_font_unlock + +! +! uint8_t *syscall_font_address(void); +! + .align 2 +_syscall_font_address: + mov.l syscall_font, r0 + mov.l @r0, r0 + jmp @r0 + mov #0, r1 ! 0 is FUNC_ROMFONT_ADDRESS + + rts + nop + +! +! int syscall_font_lock(void); +! + .align 2 +_syscall_font_lock: + mov.l syscall_font, r0 + mov.l @r0, r0 + jmp @r0 + mov #1, r1 ! 1 is FUNC_ROMFONT_LOCK + + rts + nop + +! +! void syscall_font_unlock(void); +! + .align 2 +_syscall_font_unlock: + mov.l syscall_font, r0 + mov.l @r0, r0 + jmp @r0 + mov #2, r1 ! 2 is FUNC_ROMFONT_UNLOCK + + rts + nop + +! Variables + .align 4 + +syscall_font: + .long 0x8C0000B4 ! VEC_BIOFONT diff --git a/kernel/arch/dreamcast/hardware/syscalls.c b/kernel/arch/dreamcast/hardware/syscalls.c new file mode 100644 index 00000000..476e1e33 --- /dev/null ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-05-10 18:10: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 9a1358bc2e4636d1333b52160fdbef5b41131d02 (commit) from 8493f97e5570ce1fcb5c9a16a8fab466e034b339 (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 9a1358bc2e4636d1333b52160fdbef5b41131d02 Author: Paul Cercueil <pa...@cr...> Date: Fri May 10 20:10:07 2024 +0200 Avoid conditionally-compiled code & fix NAOMI build (#566) * Avoid conditionally-compiled code Conditionally-compiled code (wrapped by #ifdef/#ifndef guards) is problematic; because it is very difficult to compile-test all possible combinations of the various flags verified by the guard macros. Instead, evaluate compile-time constants, which will cause the compiler to compile the exact same code independently of the configuration, which means if it compiles for one configuration, it will compile for all configurations. The compiler will then be smart enough to garbage-collect dead code, dropping everything not included in the current configuration. Signed-off-by: Paul Cercueil <pa...@cr...> * dc: Call cdrom_shutdown() only on Dreamcast The NAOMI has no CD-ROM player. Signed-off-by: Paul Cercueil <pa...@cr...> --------- Signed-off-by: Paul Cercueil <pa...@cr...> ----------------------------------------------------------------------- Summary of changes: include/kos/platform.h | 28 +++++++++++++++++++++ kernel/arch/dreamcast/hardware/hardware.c | 25 ++++++++----------- kernel/arch/dreamcast/hardware/maple/vmu.c | 10 +++----- kernel/arch/dreamcast/hardware/video.c | 13 +++++----- kernel/arch/dreamcast/kernel/init.c | 40 ++++++++++++------------------ 5 files changed, 66 insertions(+), 50 deletions(-) create mode 100644 include/kos/platform.h diff --git a/include/kos/platform.h b/include/kos/platform.h new file mode 100644 index 00000000..4548ae26 --- /dev/null +++ b/include/kos/platform.h @@ -0,0 +1,28 @@ +/* KallistiOS ##version## + + include/kos/platform.h + Copyright (C) 2024 Paul Cercueil + +*/ + +/** \file kos/platform.h + \brief Platform detection macros. + \author Paul Cercueil +*/ + +#ifndef __KOS_PLATFORM_H +#define __KOS_PLATFORM_H + +#ifdef __NAOMI__ +# define KOS_PLATFORM_IS_NAOMI 1 +#else +# define KOS_PLATFORM_IS_NAOMI 0 +#endif + +#ifdef __DREAMCAST__ +# define KOS_PLATFORM_IS_DREAMCAST 1 +#else +# define KOS_PLATFORM_IS_DREAMCAST 0 +#endif + +#endif /* __KOS_PLATFORM_H */ diff --git a/kernel/arch/dreamcast/hardware/hardware.c b/kernel/arch/dreamcast/hardware/hardware.c index a91a0ba6..d97130f8 100644 --- a/kernel/arch/dreamcast/hardware/hardware.c +++ b/kernel/arch/dreamcast/hardware/hardware.c @@ -8,6 +8,7 @@ #include <stdbool.h> #include <arch/arch.h> #include <kos/init.h> +#include <kos/platform.h> #include <dc/spu.h> #include <dc/video.h> #include <dc/cdrom.h> @@ -57,21 +58,18 @@ void bba_la_shutdown(void) { KOS_INIT_FLAG_WEAK(bba_la_init, false); KOS_INIT_FLAG_WEAK(bba_la_shutdown, false); KOS_INIT_FLAG_WEAK(maple_init, true); - -#ifndef _arch_sub_naomi KOS_INIT_FLAG_WEAK(cdrom_init, true); KOS_INIT_FLAG_WEAK(cdrom_shutdown, true); -#endif int hardware_periph_init(void) { /* Init sound */ spu_init(); g2_dma_init(); -#ifndef _arch_sub_naomi - /* Init CD-ROM.. NOTE: NO GD-ROM SUPPORT. ONLY CDs/CDRs. */ - KOS_INIT_FLAG_CALL(cdrom_init); -#endif + if (!KOS_PLATFORM_IS_NAOMI) { + /* Init CD-ROM.. NOTE: NO GD-ROM SUPPORT. ONLY CDs/CDRs. */ + KOS_INIT_FLAG_CALL(cdrom_init); + } /* Setup maple bus */ KOS_INIT_FLAG_CALL(maple_init); @@ -79,9 +77,8 @@ int hardware_periph_init(void) { /* Init video */ vid_init(DEFAULT_VID_MODE, DEFAULT_PIXEL_MODE); -#ifndef _arch_sub_naomi - KOS_INIT_FLAG_CALL(bba_la_init); -#endif + if (!KOS_PLATFORM_IS_NAOMI) + KOS_INIT_FLAG_CALL(bba_la_init); initted = 2; @@ -93,11 +90,11 @@ KOS_INIT_FLAG_WEAK(maple_shutdown, true); void hardware_shutdown(void) { switch(initted) { case 2: -#ifndef _arch_sub_naomi - KOS_INIT_FLAG_CALL(bba_la_shutdown); -#endif + if (!KOS_PLATFORM_IS_NAOMI) + KOS_INIT_FLAG_CALL(bba_la_shutdown); KOS_INIT_FLAG_CALL(maple_shutdown); - KOS_INIT_FLAG_CALL(cdrom_shutdown); + if (!KOS_PLATFORM_IS_NAOMI) + KOS_INIT_FLAG_CALL(cdrom_shutdown); g2_dma_shutdown(); spu_shutdown(); vid_shutdown(); diff --git a/kernel/arch/dreamcast/hardware/maple/vmu.c b/kernel/arch/dreamcast/hardware/maple/vmu.c index d1854fcb..aa984531 100644 --- a/kernel/arch/dreamcast/hardware/maple/vmu.c +++ b/kernel/arch/dreamcast/hardware/maple/vmu.c @@ -18,6 +18,7 @@ #include <stdio.h> #include <kos/thread.h> #include <kos/genwait.h> +#include <kos/platform.h> #include <dc/maple.h> #include <dc/maple/vmu.h> #include <dc/math.h> @@ -237,9 +238,11 @@ int vmu_set_custom_color(maple_device_t *dev, uint8_t red, uint8_t green, uint8_ for icon_shape are listed in the biosfont.h and start with BFONT_ICON_VMUICON. */ int vmu_set_icon_shape(maple_device_t *dev, uint8_t icon_shape) { -#ifndef _arch_sub_naomi vmu_root_t root; + if (KOS_PLATFORM_IS_NAOMI) + return -1; + if(icon_shape < BFONT_ICON_VMUICON || icon_shape > BFONT_ICON_EMBROIDERY) return -1; @@ -255,11 +258,6 @@ int vmu_set_icon_shape(maple_device_t *dev, uint8_t icon_shape) { return -1; return 0; -#else - (void)dev; - (void)icon_shape; - return -1; -#endif } /* These interfaces will probably change eventually, but for now they diff --git a/kernel/arch/dreamcast/hardware/video.c b/kernel/arch/dreamcast/hardware/video.c index 73551fed..6cae86f9 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/platform.h> #include <string.h> #include <stdio.h> @@ -210,18 +211,18 @@ uint32_t *vram_l; [This is the old KOS function by Megan.] */ int8_t vid_check_cable(void) { -#ifndef _arch_sub_naomi volatile uint32_t * porta = (vuint32 *)0xff80002c; + if (KOS_PLATFORM_IS_NAOMI) { + /* XXXX: This still needs to be figured out for NAOMI. For now, assume + VGA mode. */ + return CT_VGA; + } + *porta = (*porta & 0xfff0ffff) | 0x000a0000; /* Read port8 and port9 */ return (*((volatile uint16_t*)(porta + 1)) >> 8) & 3; -#else - /* XXXX: This still needs to be figured out for NAOMI. For now, assume - VGA mode. */ - return CT_VGA; -#endif } /*-----------------------------------------------------------------------------*/ diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index 45d391d9..e28dbb62 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -12,6 +12,7 @@ #include <stdlib.h> #include <kos/dbgio.h> #include <kos/init.h> +#include <kos/platform.h> #include <arch/arch.h> #include <arch/irq.h> #include <arch/memory.h> @@ -42,11 +43,9 @@ void (*__kos_init_early_fn)(void) __attribute__((weak,section(".data"))) = NULL; int main(int argc, char **argv); uint32 _fs_dclsocket_get_ip(void); -#ifdef _arch_sub_naomi #define SAR2 ((vuint32 *)0xFFA00020) #define CHCR2 ((vuint32 *)0xFFA0002C) #define DMAOR ((vuint32 *)0xFFA00040) -#endif /* We have to put this here so we can include plat-specific devices */ dbgio_handler_t * dbgio_handlers[] = { @@ -125,11 +124,8 @@ KOS_INIT_FLAG_WEAK(fs_romdisk_mount_builtin, false); KOS_INIT_FLAG_WEAK(fs_romdisk_mount_builtin_legacy, false); KOS_INIT_FLAG_WEAK(vmu_fs_init, true); KOS_INIT_FLAG_WEAK(vmu_fs_shutdown, true); - -#ifndef _arch_sub_naomi KOS_INIT_FLAG_WEAK(fs_iso9660_init, true); KOS_INIT_FLAG_WEAK(fs_iso9660_shutdown, true); -#endif void dcload_init(void) { if (*DCLOADMAGICADDR == DCLOADMAGICVALUE) { @@ -209,9 +205,8 @@ int __weak arch_auto_init(void) { KOS_INIT_FLAG_CALL(dcload_init); -#ifndef _arch_sub_naomi - KOS_INIT_FLAG_CALL(fs_iso9660_init); -#endif + if (!KOS_PLATFORM_IS_NAOMI) + KOS_INIT_FLAG_CALL(fs_iso9660_init); KOS_INIT_FLAG_CALL(vmu_fs_init); @@ -224,18 +219,16 @@ int __weak arch_auto_init(void) { KOS_INIT_FLAG_CALL(maple_wait_scan); /* Wait for the maple scan to complete */ } -#ifndef _arch_sub_naomi - KOS_INIT_FLAG_CALL(arch_init_net); -#endif + if (!KOS_PLATFORM_IS_NAOMI) + KOS_INIT_FLAG_CALL(arch_init_net); return 0; } void __weak arch_auto_shutdown(void) { KOS_INIT_FLAG_CALL(fs_dclsocket_shutdown); -#ifndef _arch_sub_naomi - KOS_INIT_FLAG_CALL(net_shutdown); -#endif + if (!KOS_PLATFORM_IS_NAOMI) + KOS_INIT_FLAG_CALL(net_shutdown); irq_disable(); snd_shutdown(); @@ -245,9 +238,8 @@ void __weak arch_auto_shutdown(void) { library_shutdown(); KOS_INIT_FLAG_CALL(fs_dcload_shutdown); KOS_INIT_FLAG_CALL(vmu_fs_shutdown); -#ifndef _arch_sub_naomi - KOS_INIT_FLAG_CALL(fs_iso9660_shutdown); -#endif + if (!KOS_PLATFORM_IS_NAOMI) + KOS_INIT_FLAG_CALL(fs_iso9660_shutdown); #if defined(__NEWLIB__) && !(__NEWLIB__ < 2 && __NEWLIB_MINOR__ < 4) fs_rnd_shutdown(); #endif @@ -267,13 +259,13 @@ void arch_main(void) { uint8 *bss_end = (uint8 *)(&end); int rv; -#ifdef _arch_sub_naomi - /* Ugh. I'm really not sure why we have to set up these DMA registers this - way on boot, but failing to do so breaks maple... */ - *SAR2 = 0; - *CHCR2 = 0x1201; - *DMAOR = 0x8201; -#endif /* _arch_sub_naomi */ + if (KOS_PLATFORM_IS_NAOMI) { + /* Ugh. I'm really not sure why we have to set up these DMA registers this + way on boot, but failing to do so breaks maple... */ + *SAR2 = 0; + *CHCR2 = 0x1201; + *DMAOR = 0x8201; + } /* Ensure the WDT is not enabled from a previous session */ wdt_disable(); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-05-10 03:29:20
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 8493f97e5570ce1fcb5c9a16a8fab466e034b339 (commit) from 4fde7cc16056bd59fb34ce6aaef8c84268fae0c5 (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 8493f97e5570ce1fcb5c9a16a8fab466e034b339 Author: Falco Girgis <gyr...@gm...> Date: Thu May 9 22:28:27 2024 -0500 Teensy Doxygen fix for worker_thread.h. (#563) - Apparently Doxygen can't figure out opaque structures without explicitly marking them with the \struct tag. - Misnamed parameter for thd_worker_dequeue_job(). ----------------------------------------------------------------------- Summary of changes: include/kos/worker_thread.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/kos/worker_thread.h b/include/kos/worker_thread.h index 2ec940e8..0d291897 100644 --- a/include/kos/worker_thread.h +++ b/include/kos/worker_thread.h @@ -37,9 +37,8 @@ __BEGIN_DECLS struct kthread_worker; -/** \brief Structure describing one worker thread. - - \headerfile kos/thread.h +/** \struct kthread_worker_t + \brief Opaque structure describing one worker thread. */ typedef struct kthread_worker kthread_worker_t; @@ -145,7 +144,7 @@ void thd_worker_add_job(kthread_worker_t *thd, kthread_job_t *job); previously queued using thd_worker_add_job(). This function is typically used inside the work function registered with thd_worker_create(). - \param thd The worker thread to add a job to. + \param worker The worker thread to add a job to. \return A new job to process, or NULL if there is none. */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-05-10 03:05:38
|
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 4fde7cc16056bd59fb34ce6aaef8c84268fae0c5 (commit) from 9d2176ea7d0917b9759185b92c4d08cf773d8980 (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 4fde7cc16056bd59fb34ce6aaef8c84268fae0c5 Author: Andy Barajas <and...@gm...> Date: Thu May 9 20:05:23 2024 -0700 Update gitignore (#557) * Added utils/bincnv/bincnv.dSYM/ to gitignore * Add examples/dreamcast/kgl/nehe/nehe26/data/txt2bin to the list * Remove -g flag * Undo previous change ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + utils/bincnv/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9d351605..e3e4cd17 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ 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/conio/adventure/data.c examples/dreamcast/conio/adventure/datagen examples/dreamcast/png/romdisk_boot.img diff --git a/utils/bincnv/Makefile b/utils/bincnv/Makefile index d03dcb92..f671a797 100644 --- a/utils/bincnv/Makefile +++ b/utils/bincnv/Makefile @@ -7,7 +7,7 @@ all: bincnv bincnv: bincnv.c - gcc -g -o bincnv bincnv.c + gcc -o bincnv bincnv.c clean: -rm -f bincnv hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-05-10 02:40:25
|
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 9d2176ea7d0917b9759185b92c4d08cf773d8980 (commit) from 716ab792d9dad5c1fcc9a55c5f495fa6c1a9e12a (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 9d2176ea7d0917b9759185b92c4d08cf773d8980 Author: Tchan0 <617...@us...> Date: Fri May 10 04:39:15 2024 +0200 fb_console: use memcpy4/memset4 (#549) Co-authored-by: T_chan <> ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/util/fb_console.c | 4 ++-- kernel/arch/dreamcast/util/fb_console_naomi.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/arch/dreamcast/util/fb_console.c b/kernel/arch/dreamcast/util/fb_console.c index dd8bc4bd..681978bf 100644 --- a/kernel/arch/dreamcast/util/fb_console.c +++ b/kernel/arch/dreamcast/util/fb_console.c @@ -76,10 +76,10 @@ static int fb_write(int c) { /* If going down a line put us over the edge of the screen, move everything up a line, fixing the problem. */ if(cur_y + FONT_CHAR_HEIGHT > max_y) { - memcpy2(t + min_y * fb_w, t + (min_y + FONT_CHAR_HEIGHT) * fb_w, + memcpy4(t + min_y * fb_w, t + (min_y + FONT_CHAR_HEIGHT) * fb_w, (cur_y - min_y - FONT_CHAR_HEIGHT) * fb_w * 2); cur_y -= FONT_CHAR_HEIGHT; - memset2(t + cur_y * fb_w, 0, FONT_CHAR_HEIGHT * fb_w * 2); + memset4(t + cur_y * fb_w, 0, FONT_CHAR_HEIGHT * fb_w * 2); } } diff --git a/kernel/arch/dreamcast/util/fb_console_naomi.c b/kernel/arch/dreamcast/util/fb_console_naomi.c index c221b44b..65264479 100644 --- a/kernel/arch/dreamcast/util/fb_console_naomi.c +++ b/kernel/arch/dreamcast/util/fb_console_naomi.c @@ -78,10 +78,10 @@ static int fb_write(int c) { /* If going down a line put us over the edge of the screen, move everything up a line, fixing the problem. */ if(cur_y + FONT_CHAR_HEIGHT > max_y) { - memcpy2(t + min_y * fb_w, t + (min_y + FONT_CHAR_HEIGHT) * fb_w, + memcpy4(t + min_y * fb_w, t + (min_y + FONT_CHAR_HEIGHT) * fb_w, (cur_y - min_y - FONT_CHAR_HEIGHT) * fb_w * 2); cur_y -= FONT_CHAR_HEIGHT; - memset2(t + cur_y * fb_w, 0, FONT_CHAR_HEIGHT * fb_w * 2); + memset4(t + cur_y * fb_w, 0, FONT_CHAR_HEIGHT * fb_w * 2); } } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-05-09 19:24:41
|
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 716ab792d9dad5c1fcc9a55c5f495fa6c1a9e12a (commit) from e6608bb5ff7506b95b3d38df70aa91d70f668c07 (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 716ab792d9dad5c1fcc9a55c5f495fa6c1a9e12a Author: darcagn <da...@pr...> Date: Thu May 9 13:23:32 2024 -0600 Dockerfile: Fix flex errors building GCC, dependency issues with GDB, and disable ARM build (#558) ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/docker/Dockerfile | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/utils/dc-chain/docker/Dockerfile b/utils/dc-chain/docker/Dockerfile index e4fd6de2..8081ce11 100644 --- a/utils/dc-chain/docker/Dockerfile +++ b/utils/dc-chain/docker/Dockerfile @@ -14,20 +14,23 @@ MAINTAINER KallistiOS <cad...@li...> # Installing prerequisites RUN apk --update add --no-cache \ - build-base \ - patch \ - bash \ - texinfo \ - libjpeg-turbo-dev \ - libpng-dev \ - curl \ - wget \ - git \ - python3 \ - subversion \ - gmp-dev \ - elfutils-dev \ - && rm -rf /var/cache/apk/* + build-base \ + gmp-dev \ + mpfr-dev \ + mpc1-dev \ + patch \ + bash \ + texinfo \ + flex \ + curl \ + wget \ + git \ + subversion \ + elfutils-dev \ + libjpeg-turbo-dev \ + libpng-dev \ + python3 \ + && rm -rf /var/cache/apk/* # Making Sega Dreamcast toolchains # You may adapt the KallistiOS repository URL if needed @@ -36,7 +39,7 @@ ARG makejobs=2 RUN mkdir -p /opt/toolchains/dc \ && git clone https://git.code.sf.net/p/cadcdev/kallistios /opt/toolchains/dc/kos || git clone https://github.com/KallistiOS/KallistiOS.git /opt/toolchains/dc/kos \ && cd /opt/toolchains/dc/kos/utils/dc-chain \ - && make all toolchain_profile=$dc_chain makejobs=$makejobs use_custom_dependencies=1 + && make build toolchain_profile=$dc_chain makejobs=$makejobs \ && rm -rf /opt/toolchains/dc/kos # Stage 2 hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-05-09 14:10:41
|
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 e6608bb5ff7506b95b3d38df70aa91d70f668c07 (commit) from fbfa927626fb360ad73e339a8186f043f378683f (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 e6608bb5ff7506b95b3d38df70aa91d70f668c07 Author: Andy Barajas <and...@gm...> Date: Thu May 9 07:07:07 2024 -0700 Update KOS_PORTS path so its prettier in error messages (#556) Update KOS_PORTS path so its prettier in error messages ----------------------------------------------------------------------- Summary of changes: doc/environ.sh.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/environ.sh.sample b/doc/environ.sh.sample index fadb0529..b2d26752 100644 --- a/doc/environ.sh.sample +++ b/doc/environ.sh.sample @@ -43,7 +43,7 @@ export KOS_BASE="/opt/toolchains/dc/kos" # # Specifies the path to the KOS-ports directory # -export KOS_PORTS="${KOS_BASE}/../kos-ports" +export KOS_PORTS="/opt/toolchains/dc/kos-ports" # SH Compiler Prefixes # hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-05-09 01:37: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 fbfa927626fb360ad73e339a8186f043f378683f (commit) from 11b6ae37fd7d38b2379b263f0ae483ed013b2a80 (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 fbfa927626fb360ad73e339a8186f043f378683f Author: darcagn <da...@pr...> Date: Wed May 8 19:37:14 2024 -0600 Add LRA option to environ.sh (#553) * Add LRA option to environ.sh * Apply suggestions from code review Co-authored-by: Falco Girgis <gyr...@gm...> --------- Co-authored-by: Falco Girgis <gyr...@gm...> ----------------------------------------------------------------------- Summary of changes: doc/environ.sh.sample | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/doc/environ.sh.sample b/doc/environ.sh.sample index f53ad3a2..fadb0529 100644 --- a/doc/environ.sh.sample +++ b/doc/environ.sh.sample @@ -161,13 +161,13 @@ export KOS_CFLAGS="${KOS_CFLAGS} -fno-builtin" # however, they do so at the price of accuracy and are not IEEE compliant. # NOTE: This also requires -fno-builtin be removed from KOS_CFLAGS to take effect! # -# export KOS_CFLAGS="${KOS_CFLAGS} -ffast-math -ffp-contract=fast -mfsrra -mfsca" +#export KOS_CFLAGS="${KOS_CFLAGS} -ffast-math -ffp-contract=fast -mfsrra -mfsca" # SH4 Floating Point Arithmetic Precision # # KallistiOS only officially supports the single-precision-only floating-point -# arithmetic mode (-m4-single-only), but double precision default (-m4) or -# double precision, single default (-m4-single) modes can be enabled here by +# arithmetic mode (-m4-single-only), but double precision, single default +# (-m4-single) or double precision default (-m4) modes can be enabled here by # adjusting KOS_SH4_PRECISION. # WARNING: Adjusting this setting has a high likelihood of breaking KallistiOS, # kos-ports, and existing codebases which assume -m4-single-only. @@ -177,6 +177,16 @@ export KOS_CFLAGS="${KOS_CFLAGS} -fno-builtin" # export KOS_SH4_PRECISION="-m4-single-only" +# Use LRA (Local Register Allocator) Pass +# +# Uncomment this line to use the modern Local Register Allocator pass during +# code generation instead of the default older reload pass. This option is +# known to be unstable or less performant for SH at this time, but will likely +# become mandatory in future versions of GCC, so feel free to help us test. +# Only enable this setting if you understand what you are doing! +# +#export KOS_CFLAGS="${KOS_CFLAGS} -mlra" + # Additional Tools Path # # If not already set, add "bin" directory to PATH variable, which is where @@ -194,4 +204,3 @@ fi # options or see where other build flags are set, look at this file. # . ${KOS_BASE}/environ_base.sh - hooks/post-receive -- A pseudo Operating System for the Dreamcast. |