You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(35) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(37) |
Feb
(10) |
Mar
|
Apr
(2) |
May
(17) |
Jun
(1) |
Jul
(14) |
Aug
(14) |
Sep
(4) |
Oct
|
Nov
(14) |
Dec
(4) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(92) |
Dec
(12) |
2006 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(5) |
May
(3) |
Jun
(15) |
Jul
(3) |
Aug
(1) |
Sep
(29) |
Oct
(1) |
Nov
(6) |
Dec
(5) |
2007 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
(3) |
May
(14) |
Jun
(2) |
Jul
(16) |
Aug
(73) |
Sep
(12) |
Oct
(9) |
Nov
(27) |
Dec
(3) |
2008 |
Jan
(4) |
Feb
(4) |
Mar
(3) |
Apr
(8) |
May
(23) |
Jun
(4) |
Jul
(1) |
Aug
(3) |
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
2009 |
Jan
|
Feb
(10) |
Mar
|
Apr
(4) |
May
(4) |
Jun
(10) |
Jul
|
Aug
(1) |
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
(6) |
May
|
Jun
(3) |
Jul
(11) |
Aug
(1) |
Sep
|
Oct
(15) |
Nov
(1) |
Dec
(5) |
2011 |
Jan
(4) |
Feb
(1) |
Mar
(6) |
Apr
|
May
(22) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2012 |
Jan
|
Feb
(10) |
Mar
(1) |
Apr
(6) |
May
(27) |
Jun
(48) |
Jul
(30) |
Aug
(4) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(11) |
2013 |
Jan
(4) |
Feb
(7) |
Mar
(6) |
Apr
(18) |
May
(28) |
Jun
(20) |
Jul
|
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(7) |
2014 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(9) |
May
(11) |
Jun
(10) |
Jul
|
Aug
(18) |
Sep
(12) |
Oct
(17) |
Nov
(10) |
Dec
(16) |
2015 |
Jan
(5) |
Feb
(1) |
Mar
(5) |
Apr
(4) |
May
(28) |
Jun
(2) |
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
(2) |
Dec
(1) |
2016 |
Jan
(14) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(1) |
2017 |
Jan
(11) |
Feb
|
Mar
(21) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(4) |
Nov
|
Dec
(1) |
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
(10) |
Feb
(9) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(18) |
Jul
(4) |
Aug
(2) |
Sep
(20) |
Oct
(2) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2022 |
Jan
(1) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2023 |
Jan
(10) |
Feb
(7) |
Mar
(29) |
Apr
(31) |
May
(29) |
Jun
(34) |
Jul
(3) |
Aug
(24) |
Sep
(22) |
Oct
(10) |
Nov
(38) |
Dec
(27) |
2024 |
Jan
(15) |
Feb
(8) |
Mar
(4) |
Apr
(20) |
May
(33) |
Jun
(18) |
Jul
(15) |
Aug
(23) |
Sep
(26) |
Oct
(32) |
Nov
(6) |
Dec
(4) |
2025 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
(4) |
May
(46) |
Jun
(19) |
Jul
(26) |
Aug
(25) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Lawrence S. <ljs...@us...> - 2022-08-18 01:15:33
|
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 ecf95142ff084eeb7728432e867240ecc398b217 (commit) from 807ea13be5d8f5a43b3b328c1f50505be4f482a8 (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 ecf95142ff084eeb7728432e867240ecc398b217 Author: Lawrence Sebald <ljs...@us...> Date: Wed Aug 17 21:15:04 2022 -0400 Update dc-chain readme to mention pitfalls of using older versions... ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/README.md | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/utils/dc-chain/README.md b/utils/dc-chain/README.md index 619ba8e..4a5f600 100644 --- a/utils/dc-chain/README.md +++ b/utils/dc-chain/README.md @@ -1,9 +1,9 @@ # Sega Dreamcast Toolchains Maker (`dc-chain`) The **Sega Dreamcast Toolchains Maker** (`dc-chain`) utility is a set of files -made for building all the needed toolchains used in **Sega Dreamcast** -programming under the **KallistiOS** environment. It was first released by -*Jim Ursetto* back in 2004 and was initially adapted from *Stalin*'s build +made for building all the needed toolchains used in **Sega Dreamcast** +programming under the **KallistiOS** environment. It was first released by +*Jim Ursetto* back in 2004 and was initially adapted from *Stalin*'s build script v0.3. This utility is part of **KallistiOS** (**KOS**). By using this utility, 2 toolchains will be built for **Dreamcast** development: @@ -11,14 +11,14 @@ By using this utility, 2 toolchains will be built for **Dreamcast** development: - A `sh-elf` toolchain, which is the main toolchain as it targets the CPU of the **Dreamcast**, i.e. the **Hitachi SH-4 CPU** (a.k.a. **SuperH**). - An `arm-eabi` toolchain, which is the toolchain used only for the **Yamaha - Super Intelligent Sound Processor** (**AICA**). This processor is based + Super Intelligent Sound Processor** (**AICA**). This processor is based on an **ARM7** core. Under **KallistiOS**, only the sound driver is compiled with that toolchain, so you won't need to use it directly. The `dc-chain` package will build everything you need to compile **KallistiOS** and then finally develop for the **Sega Dreamcast** system. Please note that `dc-chain` optimize the both toolchains for the use of **KallistiOS** so if you -plan to use another **Dreamcast** library (e.g. `libronin`), `dc-chain` may +plan to use another **Dreamcast** library (e.g. `libronin`), `dc-chain` may not be so useful for you, at least *out-of-the-box*. ## Overview @@ -31,8 +31,8 @@ Components included in the toolchains built through `dc-chain` are: - **GNU Debugger** (`gdb`) - Optional; - **Insight** (A `gdb` UI based on **X11**) - Optional. -**Binutils** and **GCC** are installed for both targets (i.e. `sh-elf` and -`arm-eabi`) where **Newlib** and **GNU Debugger** (**GDB**) are needed only +**Binutils** and **GCC** are installed for both targets (i.e. `sh-elf` and +`arm-eabi`) where **Newlib** and **GNU Debugger** (**GDB**) are needed only for the main toolchain (`sh-elf`). ## Getting started @@ -48,9 +48,9 @@ most of the time just out-of-the-box for your environment. ### `dc-chain` utility installation -`dc-chain` is part of **KallistiOS** so you should have it installed in the -`$KOS_BASE/utils/dc-chain` directory. You don't need to have **KallistiOS** -configured (i.e. have the `$KOS_BASE/environ.sh` file created) as building +`dc-chain` is part of **KallistiOS** so you should have it installed in the +`$KOS_BASE/utils/dc-chain` directory. You don't need to have **KallistiOS** +configured (i.e. have the `$KOS_BASE/environ.sh` file created) as building toolchains is a prerequisite in order to build **KallistiOS** itself. ### Prerequisites installation @@ -61,6 +61,12 @@ working compilation environment on your computer. If you need help on this step, everything is described in the `./doc` directory. +Please note that you may be required to use older versions of some of the +prerequisites in certain configurations. For instance, building GCC 4.7.4 may +require an older version of the `flex` tool be installed. If you receive errors +about tools you have installed, check your system's package manager for an older +version of that tool. + ## Configuration In order to allow `dc-chain` to work, you'll need to provide a `config.mk` file. @@ -101,9 +107,9 @@ Working **GCC** and **Newlib** version combinations are: (**testing**; the most modern combination); - GCC `4.7.4` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (**stable**; the most well tested combination, [some issues may happen in C++](https://dcemulation.org/phpBB/viewtopic.php?f=29&t=104724)); -- GCC `4.7.3` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (**old-stable**; +- GCC `4.7.3` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (**old-stable**; previous version, [some issues may happen in C++](https://dcemulation.org/phpBB/viewtopic.php?f=29&t=104724)). - + To help you on this, 2 `config.mk` templates are provided with `dc-chain`: - `config.mk.testing.sample` (testing); @@ -118,12 +124,12 @@ don't try to update the version of the `arm-eabi-gcc` component. You have the possibility to **use custom dependencies for GCC** directly in the `config.mk` file. In that case, you have to define `use_custom_dependencies=1`. -Doing so will use your custom versions of **GMP**, **MPC**, **MPFR** and +Doing so will use your custom versions of **GMP**, **MPC**, **MPFR** and **ISL** rather than the provided versions with GCC. You may also use this flag if you have trouble using the `contrib/download_prerequisites` script provided with GCC. -Please note that you have the possibility to specify the `tarball_type` +Please note that you have the possibility to specify the `tarball_type` extensions you want to download too; this may be useful if a package changes its extension on the servers. For example, for GCC `4.7.4`, there is no `xz` tarball file, so you may change this to `gz`. @@ -134,10 +140,10 @@ you shouldn't update/change this. ### Toolchains base `toolchains_base` indicates the root directory where toolchains will be -installed. This should match your `environ.sh` configuration. Default is +installed. This should match your `environ.sh` configuration. Default is `/opt/toolchains/dc`. -In clear, after building the toolchains, by using the default `toolchains_base`, +In clear, after building the toolchains, by using the default `toolchains_base`, you'll have two additional directories: - `/opt/toolchains/dc/arm-eabi`; @@ -160,7 +166,7 @@ files. ### Make jobs You may attempt to spawn multiple jobs with `make`. Using `make -j2` is -recommended for speeding up the building of the toolchain. There is an option +recommended for speeding up the building of the toolchain. There is an option inside the `config.mk` to set the number of jobs for the building phases. Set the `makejobs` variable in the `config.mk` to whatever you would normally feel the need to use on the command line, and it will do the right thing. @@ -201,9 +207,9 @@ You must have either [Wget](https://www.gnu.org/software/wget/) or ### GCC threading model -With GCC `4.x` versions and up, the patches provide a `kos` thread model, so you +With GCC `4.x` versions and up, the patches provide a `kos` thread model, so you should use it. If you really don't want threading support for C++, Objective C -or Objective C++, you can set this to `single`. With GCC `3.x`, you probably +or Objective C++, you can set this to `single`. With GCC `3.x`, you probably want `posix` here; but this mode is deprecated as the GCC `3.x` branch is not supported anymore. @@ -250,7 +256,7 @@ instructions in the `./doc` directory for your environment. 2. Finally, input (for **BSD**, please use `gmake` instead): make - + Depending of your environment, this can take a bunch of hours. So please be patient! hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2022-08-18 01:06:11
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 807ea13be5d8f5a43b3b328c1f50505be4f482a8 (commit) from 9e6c35a3fe8be09619fd02d9feb0eee64cf44d23 (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 807ea13be5d8f5a43b3b328c1f50505be4f482a8 Author: Lawrence Sebald <ljs...@us...> Date: Wed Aug 17 21:05:32 2022 -0400 Remove '-J' flag from cURL command in dc-chain. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/scripts/init.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/dc-chain/scripts/init.mk b/utils/dc-chain/scripts/init.mk index ad30e5c..8063bf9 100644 --- a/utils/dc-chain/scripts/init.mk +++ b/utils/dc-chain/scripts/init.mk @@ -38,7 +38,7 @@ endif # package. Copy the original file somewhere outside your MinGW/MSYS installation # and replace it with the provided patched version. # -# The patched version is coming from the C::B Advanced package. The major fix +# The patched version is coming from the C::B Advanced package. The major fix # applied is the heap size increase, from 256 MB to more than 1024 MB. # # After building the whole toolchain, please remove the patched version and move @@ -47,7 +47,7 @@ endif ifdef MINGW msys_patched_checksum = 2e627b60938fb8894b3536fc8fe0587a5477f570 msys_checksum = $(shell sha1sum /bin/msys-1.0.dll | cut -c-40) - ifneq ($(msys_checksum),$(msys_patched_checksum)) + ifneq ($(msys_checksum),$(msys_patched_checksum)) $(warning Please consider temporarily patching '/bin/msys-1.0.dll') endif endif @@ -71,7 +71,7 @@ ifdef MACOS SH_CC_FOR_TARGET += $(macos_extra_args) SH_CXX_FOR_TARGET += $(macos_extra_args) macos_gcc_configure_args = --with-sysroot --with-native-system-header=/usr/include - macos_gdb_configure_args = --with-sysroot=$(sdkroot) + macos_gdb_configure_args = --with-sysroot=$(sdkroot) endif endif @@ -108,7 +108,7 @@ endif # Web downloaders command-lines wget_cmd=wget -c -curl_cmd=curl -C - -O -J +curl_cmd=curl -C - -O # Determine if we want to apply fixup sh4 newlib do_auto_fixup_sh4_newlib := 1 hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2022-08-18 00:59:57
|
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 9e6c35a3fe8be09619fd02d9feb0eee64cf44d23 (commit) via a26009baf8b20e8d08087baffd0bbcfc554c57a6 (commit) from 1d1d49eddcf4f3041bda9b44c7464641ede77a6f (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 9e6c35a3fe8be09619fd02d9feb0eee64cf44d23 Merge: 1d1d49e a26009b Author: Lawrence Sebald <ljs...@us...> Date: Wed Aug 17 20:58:38 2022 -0400 Merge pull request #76 from ArtemioUrbina/master Fixed controller capability Masks commit a26009baf8b20e8d08087baffd0bbcfc554c57a6 Author: Artemio Urbina <au...@ju...> Date: Thu Jun 16 00:08:19 2022 -0500 - Fixed controller capability Masks. Confirmed with a several official controllers in hardware using the 240p Test Suite Controller Test ----------------------------------------------------------------------- Summary of changes: .../arch/dreamcast/include/dc/maple/controller.h | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/kernel/arch/dreamcast/include/dc/maple/controller.h b/kernel/arch/dreamcast/include/dc/maple/controller.h index c0ae950..a4204ee 100644 --- a/kernel/arch/dreamcast/include/dc/maple/controller.h +++ b/kernel/arch/dreamcast/include/dc/maple/controller.h @@ -143,28 +143,28 @@ void cont_btn_callback(uint8 addr, uint32 btns, cont_btn_callback_t cb); @{ */ -#define CONT_CAPABILITY_C (1<<0) -#define CONT_CAPABILITY_B (1<<1) -#define CONT_CAPABILITY_A (1<<2) -#define CONT_CAPABILITY_START (1<<3) -#define CONT_CAPABILITY_DPAD_UP (1<<4) -#define CONT_CAPABILITY_DPAD_DOWN (1<<5) -#define CONT_CAPABILITY_DPAD_LEFT (1<<6) -#define CONT_CAPABILITY_DPAD_RIGHT (1<<7) -#define CONT_CAPABILITY_Z (1<<8) -#define CONT_CAPABILITY_Y (1<<9) -#define CONT_CAPABILITY_X (1<<10) -#define CONT_CAPABILITY_D (1<<11) -#define CONT_CAPABILITY_DPAD2_UP (1<<12) -#define CONT_CAPABILITY_DPAD2_DOWN (1<<13) -#define CONT_CAPABILITY_DPAD2_LEFT (1<<14) -#define CONT_CAPABILITY_DPAD2_RIGHT (1<<15) -#define CONT_CAPABILITY_RTRIG (1<<16) -#define CONT_CAPABILITY_LTRIG (1<<17) -#define CONT_CAPABILITY_ANALOG_X (1<<18) -#define CONT_CAPABILITY_ANALOG_Y (1<<19) -#define CONT_CAPABILITY_ANALOG2_X (1<<20) -#define CONT_CAPABILITY_ANALOG2_Y (1<<21) +#define CONT_CAPABILITY_C (1<<24) +#define CONT_CAPABILITY_B (1<<25) +#define CONT_CAPABILITY_A (1<<26) +#define CONT_CAPABILITY_START (1<<27) +#define CONT_CAPABILITY_DPAD_UP (1<<28) +#define CONT_CAPABILITY_DPAD_DOWN (1<<29) +#define CONT_CAPABILITY_DPAD_LEFT (1<<30) +#define CONT_CAPABILITY_DPAD_RIGHT (1<<31) +#define CONT_CAPABILITY_Z (1<<16) +#define CONT_CAPABILITY_Y (1<<17) +#define CONT_CAPABILITY_X (1<<18) +#define CONT_CAPABILITY_D (1<<19) +#define CONT_CAPABILITY_DPAD2_UP (1<<20) +#define CONT_CAPABILITY_DPAD2_DOWN (1<<21) +#define CONT_CAPABILITY_DPAD2_LEFT (1<<22) +#define CONT_CAPABILITY_DPAD2_RIGHT (1<<23) +#define CONT_CAPABILITY_RTRIG (1<<8) +#define CONT_CAPABILITY_LTRIG (1<<9) +#define CONT_CAPABILITY_ANALOG_X (1<<10) +#define CONT_CAPABILITY_ANALOG_Y (1<<11) +#define CONT_CAPABILITY_ANALOG2_X (1<<12) +#define CONT_CAPABILITY_ANALOG2_Y (1<<13) /** @} */ __END_DECLS hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2022-08-18 00:54:08
|
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 1d1d49eddcf4f3041bda9b44c7464641ede77a6f (commit) from 81ec331be28e755ce34dc02bf6a1b0d1bf0559b0 (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 1d1d49eddcf4f3041bda9b44c7464641ede77a6f Author: Lawrence Sebald <ljs...@us...> Date: Wed Aug 17 20:53:44 2022 -0400 Add simple implementation of _times_r. ----------------------------------------------------------------------- Summary of changes: kernel/libc/newlib/newlib_times.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/kernel/libc/newlib/newlib_times.c b/kernel/libc/newlib/newlib_times.c index 6038a84..1f957b9 100644 --- a/kernel/libc/newlib/newlib_times.c +++ b/kernel/libc/newlib/newlib_times.c @@ -1,15 +1,30 @@ /* KallistiOS ##version## newlib_times.c - Copyright (C)2004 Dan Potter + Copyright (C) 2004 Dan Potter + Copyright (C) 2022 Lawrence Sebald */ +#include <errno.h> #include <sys/reent.h> #include <sys/times.h> +#include <arch/timer.h> int _times_r(struct _reent * re, struct tms * tmsbuf) { (void)re; - (void)tmsbuf; + + if(tmsbuf) { + /* Conveniently, CLOCKS_PER_SEC is 1000, so we can just use the + millisecond timer. */ + tmsbuf->tms_utime = (clock_t)timer_ms_gettime64(); + tmsbuf->tms_stime = 0; + tmsbuf->tms_cutime = 0; + tmsbuf->tms_cstime = 0; + + return (int)tmsbuf->tms_utime; + } + + re->_errno = EFAULT; return -1; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2022-04-28 23:22:55
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 81ec331be28e755ce34dc02bf6a1b0d1bf0559b0 (commit) via 3df13d4cc68c20e9d53645e54326b8966078bc97 (commit) via 0ebbd92dc1c07618e671901e6a906f35897a3522 (commit) via d371a30efb673ee92d972a8af4a23aab81402b83 (commit) via e29c3eb8015f2f5200bc0655c2782e4d10db4ba7 (commit) from f0b2c9517541c308af1f5920bf87411a82a9ed56 (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 81ec331be28e755ce34dc02bf6a1b0d1bf0559b0 Merge: f0b2c95 3df13d4 Author: Luke Benstead <ka...@gm...> Date: Thu Apr 28 09:37:26 2022 +0100 Merge pull request #74 from KallistiOS/modem-tx-fixes Modem transmission fixes commit 3df13d4cc68c20e9d53645e54326b8966078bc97 Author: Luke Benstead <ka...@gm...> Date: Thu Apr 28 09:36:36 2022 +0100 Fix incorrect TXFNF register This fixes sporadic modem transmission failures. This commit also changes the logic slightly so we block waiting for CTS rather than returning and sending nothing in the event the modem wasn't ready. commit 0ebbd92dc1c07618e671901e6a906f35897a3522 Author: Luke Benstead <ka...@gm...> Date: Thu Apr 28 09:36:22 2022 +0100 Add a FIXME commit d371a30efb673ee92d972a8af4a23aab81402b83 Author: Luke Benstead <ka...@gm...> Date: Thu Apr 28 09:36:09 2022 +0100 Reset mintCounter when we reset the timeout commit e29c3eb8015f2f5200bc0655c2782e4d10db4ba7 Author: Luke Benstead <ka...@gm...> Date: Thu Apr 28 09:35:48 2022 +0100 Add a modem PPP example ----------------------------------------------------------------------- Summary of changes: addons/libppp/ppp_modem.c | 1 + examples/dreamcast/modem/{basic => ppp}/Makefile | 7 +- examples/dreamcast/modem/ppp/example1.c | 127 +++++++++++++++++++++++ kernel/arch/dreamcast/hardware/modem/mdata.c | 43 ++++---- kernel/arch/dreamcast/hardware/modem/mintr.c | 1 + 5 files changed, 153 insertions(+), 26 deletions(-) copy examples/dreamcast/modem/{basic => ppp}/Makefile (74%) create mode 100644 examples/dreamcast/modem/ppp/example1.c diff --git a/addons/libppp/ppp_modem.c b/addons/libppp/ppp_modem.c index ddcaa05..3d9a2e8 100644 --- a/addons/libppp/ppp_modem.c +++ b/addons/libppp/ppp_modem.c @@ -39,6 +39,7 @@ static int ppp_modem_tx(ppp_device_t *self, const uint8_t *data, size_t len, /* As long as we have something to send, do so. */ while(done < len) { + /* FIXME: This will loop infinitely if modem_write_data always fails */ done += modem_write_data((unsigned char *)data + done, (int)len - done); } diff --git a/examples/dreamcast/modem/basic/Makefile b/examples/dreamcast/modem/ppp/Makefile similarity index 74% copy from examples/dreamcast/modem/basic/Makefile copy to examples/dreamcast/modem/ppp/Makefile index 8d2e9f2..31f1a1b 100644 --- a/examples/dreamcast/modem/basic/Makefile +++ b/examples/dreamcast/modem/ppp/Makefile @@ -1,8 +1,3 @@ -# -# Basic modem test program -# Copyright (C)2003 Nick Kochakian -# - TARGET = example1.elf OBJS = example1.o @@ -18,7 +13,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) + kos-cc -o $(TARGET) $(OBJS) -lppp run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/modem/ppp/example1.c b/examples/dreamcast/modem/ppp/example1.c new file mode 100644 index 0000000..e85815b --- /dev/null +++ b/examples/dreamcast/modem/ppp/example1.c @@ -0,0 +1,127 @@ +/* KallistiOS ##version## + + example1.c + Copyright (C)2022 Luke Benstead + + Modem PPP example (intended for DreamPi connection) +*/ + +#include <stdio.h> +#include <kos.h> +#include <netdb.h> +#include <arpa/inet.h> +#include <sys/socket.h> +#include <kos/net.h> +#include <ppp/ppp.h> +#include <time.h> + +KOS_INIT_FLAGS(INIT_DEFAULT | INIT_NET); + + +int main() { + char buffer[1024]; + + int err; + struct addrinfo *ai; + struct addrinfo hints; + + const struct sockaddr* addr_ptr; + socklen_t addr_len; + struct sockaddr_in addr4; + struct sockaddr_in6 addr6; + + time_t start; + int total_bytes = 0; + + if(!modem_init()) { + printf("modem_init failed!\n"); + return 1; + } + + ppp_init(); + + printf("Dialing connection\n"); + err = ppp_modem_init("555", 0, NULL); + if(err != 0) { + printf("Couldn't dial a connection (%d)\n", err); + return 1; + } + + printf("Establishing PPP link\n"); + ppp_set_login("dream", "cast"); + + err = ppp_connect(); + if(err != 0) { + printf("Couldn't establish PPP link (%d)\n", err); + return 1; + } + + /* Make a DNS lookup for google */ + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET; + err = getaddrinfo("google.com", "80", &hints, &ai); + if(err != 0) { + printf("Unable to perform DNS lookup (%d)\n", err); + return 1; + } + + /* Get the first address v4 or v6, whatever */ + if(ai->ai_family == AF_INET) { + addr4 = *(struct sockaddr_in *) ai->ai_addr; + addr4.sin_family = AF_INET; + addr4.sin_port = htons(80); + addr_ptr = (const struct sockaddr*) &addr4; + addr_len = sizeof(struct sockaddr_in); + } else if(ai->ai_family == AF_INET6) { + addr6 = *(struct sockaddr_in6 *) ai->ai_addr; + addr6.sin6_family = AF_INET6; + addr6.sin6_port = htons(80); + addr_ptr = (const struct sockaddr*) &addr6; + addr_len = sizeof(struct sockaddr_in6); + } else { + printf("Unexpected IP family\n"); + return 1; + } + + freeaddrinfo(ai); + + /* Make a POST request to Google to make sure things are working */ + const char* req = "POST / HTTP/1.1\r\nHost: www.google.com\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 27\r\n\r\nfield1=value1&field2=value2\r\n\r\n"; + + int s = socket(AF_INET, SOCK_STREAM, 0); + err = connect(s, addr_ptr, addr_len); + + for(int i = 0; i < 10; ++i) { + sleep(1); + printf("Sending request: %d. Response follows: \n\n\n\n", i); + int sent = send(s, req, strlen(req), 0); + if(sent == -1) { + printf("Error sending request\n"); + return 1; + } else if(sent != strlen(req)) { + printf("Error sending full request\n"); + return 1; + } + + start = time(NULL); + total_bytes = 0; + while(1) { + int bytes = recv(s, buffer, 1024, MSG_DONTWAIT); + if(bytes <= 0) { + if(total_bytes) { + /* We received something previously so we're done */ + break; + } else if(time(NULL) > start + 30) { + printf("Timeout while waiting for response\n"); + usleep(10); + break; + } + } else { + total_bytes += bytes; + printf("%s", buffer); + } + } + } + + return 0; +} diff --git a/kernel/arch/dreamcast/hardware/modem/mdata.c b/kernel/arch/dreamcast/hardware/modem/mdata.c index f153f77..f576627 100644 --- a/kernel/arch/dreamcast/hardware/modem/mdata.c +++ b/kernel/arch/dreamcast/hardware/modem/mdata.c @@ -177,30 +177,33 @@ void modemDataInternalHandleOutgoingData(void) { return; /* CTS needs to be set before any data can be copied into TBUFFER */ - if(modemRead(REGLOC(0xF)) & 0x20) { - /* Copy data from the local TX FIFO buffer into the MDP's TX FIFO buffer - while there's data in the local buffer and there's space in the MDP's - buffer */ - counter = 0; - - while((modemRead(REGLOC(0x1D)) & 0x2) && bufferLength > 0 && - counter < MODEM_DATA_LIMIT) { /* Checks TXFNF */ - /* Read a byte from the chain buffer */ - if(readFromChainBuffer(txBuffer, &data, 1) != 1) - assert(0); /* This should never happen */ + while(!(modemRead(REGLOC(0xF)) & 0x20)) { + thd_pass(); + } - /* Write the byte to TBUFFER */ - modemWrite(REGLOC(0x10), data); + /* Copy data from the local TX FIFO buffer into the MDP's TX FIFO buffer + while there's data in the local buffer and there's space in the MDP's + buffer */ + counter = 0; - bufferLength--; - counter++; - } + while((modemRead(REGLOC(0x0D)) & 0x2) && bufferLength > 0 && + counter < MODEM_DATA_LIMIT) { /* Checks TXFNF */ + /* Read a byte from the chain buffer */ + if(readFromChainBuffer(txBuffer, &data, 1) != 1) + assert(0); /* This should never happen */ - /* If the buffer was emptied then generate the corresponding event - if the event handler is set */ - if(bufferLength <= 0 && modemCfg.eventHandler) - modemCfg.eventHandler(MODEM_EVENT_TX_EMPTY); + /* Write the byte to TBUFFER */ + modemWrite(REGLOC(0x10), data); + + bufferLength--; + counter++; } + + /* If the buffer was emptied then generate the corresponding event + if the event handler is set */ + if(bufferLength <= 0 && modemCfg.eventHandler) + modemCfg.eventHandler(MODEM_EVENT_TX_EMPTY); + } /* Internal. Called by the interrupt service routine to update the receive diff --git a/kernel/arch/dreamcast/hardware/modem/mintr.c b/kernel/arch/dreamcast/hardware/modem/mintr.c index 32e2f54..f9258b4 100644 --- a/kernel/arch/dreamcast/hardware/modem/mintr.c +++ b/kernel/arch/dreamcast/hardware/modem/mintr.c @@ -33,6 +33,7 @@ void mintDelayCallback(void) { if(mintCounter >= 5) { modemIntResetTimeoutTimer(); modemIntShutdownTimeoutTimer(); + mintCounter = 0; /* Reset the counter for subsequent connections */ modemCfg.flags &= ~MODEM_CFG_FLAG_CONNECTING; modemCfg.flags |= MODEM_CFG_FLAG_CONNECTED; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2022-03-14 02:30:22
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via f0b2c9517541c308af1f5920bf87411a82a9ed56 (commit) from 02c5acc219f4b0c8838b40b1bd9bc8d6fed81c5e (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 f0b2c9517541c308af1f5920bf87411a82a9ed56 Author: Lawrence Sebald <ljs...@us...> Date: Sun Mar 13 22:30:00 2022 -0400 A bit of warning cleanup (mostly implicit function definitions). ----------------------------------------------------------------------- Summary of changes: AUTHORS | 2 +- kernel/arch/dreamcast/kernel/banner.c | 2 +- kernel/arch/dreamcast/sound/snd_stream.c | 6 ++++-- kernel/libc/koslib/malloc.c | 5 +++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/AUTHORS b/AUTHORS index 7d7755d..47262fc 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,7 +22,7 @@ please see the README.KOS file in the doc directory. Contributors list (under the normal KOS license): ------------------------------------------------- Dan Potter: 1997, 2000, 2001, 2002, 2003, 2004 -Lawrence Sebald: 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 +Lawrence Sebald: 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Sam Steele: 2004 Gil Megidish: 2002 Florian Schulze: 2002 diff --git a/kernel/arch/dreamcast/kernel/banner.c b/kernel/arch/dreamcast/kernel/banner.c index 25d29b0..ddd7481 100644 --- a/kernel/arch/dreamcast/kernel/banner.c +++ b/kernel/arch/dreamcast/kernel/banner.c @@ -8,7 +8,7 @@ #include "authors.h" static const char license[] = -"Copyright (C) 1997-2021 KallistiOS Contributors. All rights reserved.\n" +"Copyright (C) 1997-2022 KallistiOS Contributors. All rights reserved.\n" "\n" "Redistribution and use in source and binary forms, with or without\n" "modification, are permitted provided that the following conditions\n" diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 04a66ca..dd84ebd 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -15,6 +15,7 @@ #include <malloc.h> #include <sys/queue.h> +#include <arch/cache.h> #include <arch/timer.h> #include <dc/g2bus.h> #include <dc/spu.h> @@ -452,6 +453,7 @@ void snd_stream_stop(snd_stream_hnd_t hnd) { /* The DMA will chain to this to start the second DMA. */ static uint32 dmadest, dmacnt; static void dma_chain(ptr_t data) { + (void)data; spu_dma_transfer(sep_buffer[1], dmadest, dmacnt, 0, NULL, 0); } @@ -528,8 +530,8 @@ int snd_stream_poll(snd_stream_hnd_t hnd) { sep_data(data, needed_samples * 2, streams[hnd].stereo); // Second DMA will get started by the chain handler - dcache_flush_range(sep_buffer[0], needed_samples*2); - dcache_flush_range(sep_buffer[1], needed_samples*2); + dcache_flush_range((uint32)sep_buffer[0], needed_samples*2); + dcache_flush_range((uint32)sep_buffer[1], needed_samples*2); dmadest = streams[hnd].spu_ram_sch[1] + (streams[hnd].last_write_pos * 2); dmacnt = needed_samples * 2; spu_dma_transfer(sep_buffer[0], streams[hnd].spu_ram_sch[0] + (streams[hnd].last_write_pos * 2), needed_samples * 2, 0, dma_chain, 0); diff --git a/kernel/libc/koslib/malloc.c b/kernel/libc/koslib/malloc.c index 50d705c..dffc5a6 100644 --- a/kernel/libc/koslib/malloc.c +++ b/kernel/libc/koslib/malloc.c @@ -53,8 +53,9 @@ int malloc_irq_safe() { return !spinlock_is_locked(&mALLOC_MUTEx); } -/* This is arch-specific */ -// extern void * sbrk(size_t amt); +/* <unistd.h> doesn't define this in strict standard-compliant mode, so do so + here instead. */ +extern void *sbrk (ptrdiff_t __incr); /* Next KOS-specific mods are around line 1600... */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2022-03-13 18:10:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 02c5acc219f4b0c8838b40b1bd9bc8d6fed81c5e (commit) from 98cc111e505b81ed90daf133ec44ff8c0fa49aa0 (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 02c5acc219f4b0c8838b40b1bd9bc8d6fed81c5e Author: Lawrence Sebald <ljs...@us...> Date: Sun Mar 13 14:09:05 2022 -0400 Unlock TLS spinlock on key error in kthread_setspecific. Thanks to ryancaicse on GitHub for reporting the issue (GitHub Issue #72). ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/include/dc/pvr.h | 2 +- kernel/thread/tls.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/arch/dreamcast/include/dc/pvr.h b/kernel/arch/dreamcast/include/dc/pvr.h index 9ff7544..3fa03db 100644 --- a/kernel/arch/dreamcast/include/dc/pvr.h +++ b/kernel/arch/dreamcast/include/dc/pvr.h @@ -1440,7 +1440,7 @@ void pvr_mem_stats(); /* Scene rendering ***************************************************/ /* This API is used to submit triangle strips to the PVR via the TA - interace in the chip. + interface in the chip. An important side note about the PVR is that all primitive types must be submitted grouped together. If you have 10 polygons for each diff --git a/kernel/thread/tls.c b/kernel/thread/tls.c index 0b426e6..4490d3e 100644 --- a/kernel/thread/tls.c +++ b/kernel/thread/tls.c @@ -134,6 +134,7 @@ int kthread_setspecific(kthread_key_t key, const void *value) { /* Make sure the key is valid. */ if(key >= next_key || key < 1) { errno = EINVAL; + spinlock_unlock(&mutex); return -1; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2022-02-23 19:55:57
|
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 98cc111e505b81ed90daf133ec44ff8c0fa49aa0 (commit) via a9a893420d05b5d2e2553da562b2711795bc3721 (commit) from 6ce15aff975014867f1e9b8aa80b840b1db85714 (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 98cc111e505b81ed90daf133ec44ff8c0fa49aa0 Merge: 6ce15af a9a8934 Author: Luke Benstead <ka...@gm...> Date: Wed Feb 23 19:48:14 2022 +0000 Merge pull request #69 from KallistiOS/fix-sizeof-issue-in-fs-dclsocket Fix an incorrect sizeof() statement that caused corruption commit a9a893420d05b5d2e2553da562b2711795bc3721 Author: Luke Benstead <ka...@gm...> Date: Wed Feb 23 19:43:43 2022 +0000 Fix an incorrect sizeof() statement that caused corruption ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/fs/fs_dclsocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/arch/dreamcast/fs/fs_dclsocket.c b/kernel/arch/dreamcast/fs/fs_dclsocket.c index 307e789..aa221f4 100644 --- a/kernel/arch/dreamcast/fs/fs_dclsocket.c +++ b/kernel/arch/dreamcast/fs/fs_dclsocket.c @@ -588,7 +588,7 @@ static int dcls_stat(vfs_handler_t *vfs, const char *fn, struct stat *rv, memcpy(cmd->id, "DC13", 4); cmd->address = htonl((uint32) &filestat); - cmd->size = htonl(sizeof(struct stat)); + cmd->size = htonl(sizeof(dcload_stat_t)); strcpy((char *)(cmd->data), fn); send(dcls_socket, cmd, sizeof(command_t) + strlen(fn) + 1, 0); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2022-02-23 14:18:00
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 6ce15aff975014867f1e9b8aa80b840b1db85714 (commit) via 75cfc550e361752fec8dd3c5fa79e232b2afe03c (commit) from d96e864b4d49addd9a1465eee99d9f881a856ab3 (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 6ce15aff975014867f1e9b8aa80b840b1db85714 Merge: d96e864 75cfc55 Author: Luke Benstead <ka...@gm...> Date: Sat Jan 29 14:12:20 2022 +0000 Merge pull request #68 from Kazade/master Implement getsockopt for TCP and UDP commit 75cfc550e361752fec8dd3c5fa79e232b2afe03c Author: Luke Benstead <ka...@gm...> Date: Sat Jan 29 14:11:08 2022 +0000 Implement getsockopt for TCP and UDP ----------------------------------------------------------------------- Summary of changes: include/kos/fs_socket.h | 19 +++++++++++ include/sys/socket.h | 16 +++++++++ kernel/fs/fs_socket.c | 19 +++++++++++ kernel/net/net_tcp.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ kernel/net/net_udp.c | 74 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 214 insertions(+) diff --git a/include/kos/fs_socket.h b/include/kos/fs_socket.h index 1c97cf4..03e7448 100644 --- a/include/kos/fs_socket.h +++ b/include/kos/fs_socket.h @@ -309,6 +309,25 @@ typedef struct fs_socket_proto { int (*setsockopt)(net_socket_t *s, int level, int option_name, const void *option_value, socklen_t option_len); + /** \brief Get socket name. + + This function should implement the ::getsockname() system call for the + given protocol. The semantics are exactly as defined for that function. + + Currently all options (regardless of level) are passed onto the + protocol handler. + + \param s The socket to get the name of. + \param name Pointer to a sockaddr structure which will hold + the resulting address information. + \param name_len The amount of space pointed to by name, in + bytes. On return, this is set to the actual size + of the returned address information. + \retval -1 On error (set errno appropriately). + \retval 0 On success. + */ + int (*getsockname)(net_socket_t *s, struct sockaddr *name, socklen_t *name_len); + /** \brief Manipulate file options. This function should implement the fcntl() system call for the given diff --git a/include/sys/socket.h b/include/sys/socket.h index e1f642b..682c866 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -340,6 +340,22 @@ int shutdown(int socket, int how); */ int socket(int domain, int type, int protocol); +/** \brief Get socket name. + + This function returns the locally bound address information for a specified + socket. + + \param s The socket to get the name of. + \param name Pointer to a sockaddr structure which will hold the + resulting address information. + \param name_len The amount of space pointed to by name, in bytes. + On return, this is set to the actual size of the + returned address information. + \retval -1 On error, sets errno as appropriate. + \retval 0 On success. +*/ +int getsockname(int socket, struct sockaddr *name, socklen_t *name_len); + /** \brief Get socket options. This function retrieves options associated with a socket. This function diff --git a/kernel/fs/fs_socket.c b/kernel/fs/fs_socket.c index e35a8cc..ed93080 100644 --- a/kernel/fs/fs_socket.c +++ b/kernel/fs/fs_socket.c @@ -567,6 +567,25 @@ int shutdown(int sock, int how) { return hnd->protocol->shutdownsock(hnd, how); } +int getsockname(int sock, struct sockaddr *name, socklen_t *name_len) { + net_socket_t *hnd; + + hnd = (net_socket_t *)fs_get_handle(sock); + + if(hnd == NULL) { + errno = EBADF; + return -1; + } + + /* Make sure this is actually a socket. */ + if(fs_get_handler(sock) != &vh) { + errno = ENOTSOCK; + return -1; + } + + return hnd->protocol->getsockname(hnd, name, name_len); +} + int getsockopt(int sock, int level, int option_name, void *option_value, socklen_t *option_len) { net_socket_t *hnd; diff --git a/kernel/net/net_tcp.c b/kernel/net/net_tcp.c index f16305b..ca86731 100644 --- a/kernel/net/net_tcp.c +++ b/kernel/net/net_tcp.c @@ -1890,6 +1890,91 @@ ret_success: return 0; } +static int net_tcp_getsockname(net_socket_t *hnd, struct sockaddr *name, + socklen_t *name_len) { + struct tcp_sock *sock; + struct sockaddr_in realaddr; + struct sockaddr_in6 realaddr6; + + if(!name || !name_len) { + errno = EFAULT; + return -1; + } + + if(irq_inside_int()) { + if(rwsem_read_trylock(&tcp_sem)) { + errno = EWOULDBLOCK; + return -1; + } + } + else { + rwsem_read_lock(&tcp_sem); + } + + if(!(sock = (struct tcp_sock *)hnd->data)) { + rwsem_read_unlock(&tcp_sem); + errno = EBADF; + return -1; + } + + if(irq_inside_int()) { + if(mutex_trylock(&sock->mutex)) { + rwsem_read_unlock(&tcp_sem); + errno = EWOULDBLOCK; + return -1; + } + } + else { + mutex_lock(&sock->mutex); + } + + if(sock->domain == AF_INET) { + memset(&realaddr, 0, sizeof(struct sockaddr_in)); + realaddr.sin_family = AF_INET; + realaddr.sin_addr.s_addr = + sock->local_addr.sin6_addr.__s6_addr.__s6_addr32[3]; + realaddr.sin_port = sock->local_addr.sin6_port; + + if(*name_len <= sizeof(struct sockaddr_in)) { + /* Passed in a structure not big enough so truncate*/ + memcpy(name, &realaddr, *name_len); + } else { + memcpy(name, &realaddr, sizeof(struct sockaddr_in)); + } + + *name_len = sizeof(struct sockaddr_in); + + goto ret_success; + + } else if(sock->domain == AF_INET6) { + memset(&realaddr6, 0, sizeof(struct sockaddr_in6)); + realaddr6.sin6_family = AF_INET6; + realaddr6.sin6_addr = sock->local_addr.sin6_addr; + realaddr6.sin6_port = sock->local_addr.sin6_port; + + if(*name_len <= sizeof(struct sockaddr_in6)) { + /* Passed in a structure not big enough */ + memcpy(name, &realaddr6, *name_len); + } else { + memcpy(name, &realaddr6, sizeof(struct sockaddr_in6)); + } + + *name_len = sizeof(struct sockaddr_in6); + + goto ret_success; + } + + mutex_unlock(&sock->mutex); + rwsem_read_unlock(&tcp_sem); + errno = ENOTSOCK; + return -1; + +ret_success: + mutex_unlock(&sock->mutex); + rwsem_read_unlock(&tcp_sem); + return 0; +} + static int net_tcp_fcntl(net_socket_t *hnd, int cmd, va_list ap) { struct tcp_sock *sock; @@ -3013,6 +3098,7 @@ static fs_socket_proto_t proto = { net_tcp_input, /* input */ net_tcp_getsockopt, /* getsockopt */ net_tcp_setsockopt, /* setsockopt */ + net_tcp_getsockname, /* getsockname */ net_tcp_fcntl, /* fcntl */ net_tcp_poll /* poll */ }; diff --git a/kernel/net/net_udp.c b/kernel/net/net_udp.c index d806e20..dcc38a5 100644 --- a/kernel/net/net_udp.c +++ b/kernel/net/net_udp.c @@ -944,6 +944,78 @@ ret_success: return 0; } +static int net_udp_getsockname(net_socket_t *hnd, struct sockaddr *name, + socklen_t *name_len) { + struct udp_sock *sock; + struct sockaddr_in realaddr; + struct sockaddr_in6 realaddr6; + + if(!name || !name_len) { + errno = EFAULT; + return -1; + } + + if(irq_inside_int()) { + if(mutex_trylock(&udp_mutex) == -1) { + errno = EWOULDBLOCK; + return -1; + } + } + else { + mutex_lock(&udp_mutex); + } + + if(!(sock = (struct udp_sock *)hnd->data)) { + mutex_unlock(&udp_mutex); + errno = EBADF; + return -1; + } + + if(sock->domain == AF_INET) { + memset(&realaddr, 0, sizeof(struct sockaddr_in)); + realaddr.sin_family = AF_INET; + realaddr.sin_addr.s_addr = + sock->local_addr.sin6_addr.__s6_addr.__s6_addr32[3]; + realaddr.sin_port = sock->local_addr.sin6_port; + + if(*name_len <= sizeof(struct sockaddr_in)) { + /* Passed in a structure not big enough so truncate*/ + memcpy(name, &realaddr, *name_len); + } else { + memcpy(name, &realaddr, sizeof(struct sockaddr_in)); + } + + *name_len = sizeof(struct sockaddr_in); + + goto ret_success; + + } else if(sock->domain == AF_INET6) { + memset(&realaddr6, 0, sizeof(struct sockaddr_in6)); + realaddr6.sin6_family = AF_INET6; + realaddr6.sin6_addr = sock->local_addr.sin6_addr; + realaddr6.sin6_port = sock->local_addr.sin6_port; + + if(*name_len <= sizeof(struct sockaddr_in6)) { + /* Passed in a structure not big enough */ + memcpy(name, &realaddr6, *name_len); + } else { + memcpy(name, &realaddr6, sizeof(struct sockaddr_in6)); + } + + *name_len = sizeof(struct sockaddr_in6); + + goto ret_success; + } + + mutex_unlock(&udp_mutex); + errno = ENOTSOCK; + return -1; + +ret_success: + mutex_unlock(&udp_mutex); + return 0; +} + static int net_udp_fcntl(net_socket_t *hnd, int cmd, va_list ap) { struct udp_sock *sock; long val; @@ -1436,6 +1508,7 @@ static fs_socket_proto_t proto = { net_udp_input, net_udp_getsockopt, net_udp_setsockopt, + net_udp_getsockname, net_udp_fcntl, net_udp_poll }; @@ -1457,6 +1530,7 @@ static fs_socket_proto_t proto_lite = { net_udp_input, net_udp_getsockopt, net_udp_setsockopt, + net_udp_getsockname, net_udp_fcntl, net_udp_poll }; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2022-01-01 17:49:09
|
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 d96e864b4d49addd9a1465eee99d9f881a856ab3 (commit) via 553959100373de022f768fea1e016c9f139e5d64 (commit) via e211a085a99e9de7b2a4e9053fbeb8cd50297c41 (commit) via bca61293e6f90a99468fc29964b4fb6000827381 (commit) via b726265d75cef4ca77e10253934fd77810a35c1d (commit) via b734bcc10bf38c49f2c119522a1420f6f9e5b8f5 (commit) via 5652dcb870d129f74183453151a94996a47d4a0d (commit) via 7f2e7e91bc3baf0b14d7fedf7776225fbfe096c7 (commit) via a763e6ef0cdcf209af2f7115f8b7446f7bd413f3 (commit) via c629e8101e31a69aa15a8aae1e2e014191c173b0 (commit) via 31b3783810c3b40c01f56ca621548b2d29149a63 (commit) via 395c9af8db16918c88c68962f42704b8838d4162 (commit) via 1d72966ffb798de86ede9dcc7d3b486c71d45ff7 (commit) from 44e6e771d564ffeab15d1d70415e282c547f6e5e (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 d96e864b4d49addd9a1465eee99d9f881a856ab3 Merge: 5539591 a763e6e Author: Lawrence Sebald <ljs...@us...> Date: Sat Jan 1 12:48:20 2022 -0500 Merge pull request #64 from Tchan0/add_missing_start_to_kgl_examples Add missing start to kgl examples (1/2) commit 553959100373de022f768fea1e016c9f139e5d64 Merge: e211a08 b726265 Author: Lawrence Sebald <ljs...@us...> Date: Sat Jan 1 12:47:52 2022 -0500 Merge pull request #67 from gameblabla/spu_dma_fix_megavolt85 Re-enable SPU DMA code commit e211a085a99e9de7b2a4e9053fbeb8cd50297c41 Merge: bca6129 b734bcc Author: Lawrence Sebald <ljs...@us...> Date: Sat Jan 1 12:46:16 2022 -0500 Merge pull request #66 from sizious/utils-update Small changes in the `utils` directory commit bca61293e6f90a99468fc29964b4fb6000827381 Merge: 44e6e77 7f2e7e9 Author: Lawrence Sebald <ljs...@us...> Date: Sat Jan 1 12:45:53 2022 -0500 Merge pull request #65 from gameblabla/fix_adpcm_tool wav2adpcm : Fix 64-bits related issues on x86_64. commit b726265d75cef4ca77e10253934fd77810a35c1d Author: gameblabla <gam...@pr...> Date: Sat Jan 1 17:55:30 2022 +0100 Re-enable SPU DMA code. Previously it was disabled as it was reported as broken. However when i tried it with the OGG example that makse use of it, it seemed to work just fine (?). Let's re-enable it. commit b734bcc10bf38c49f2c119522a1420f6f9e5b8f5 Author: SiZiOUS <si...@gm...> Date: Fri Dec 31 17:59:53 2021 +0100 `makejitter`: Documenting that `libimageload` is required. commit 5652dcb870d129f74183453151a94996a47d4a0d Author: SiZiOUS <si...@gm...> Date: Fri Dec 31 17:57:23 2021 +0100 `utils`: Updating root `Makefile`. - Removing not essential tools: `isotest` and `rdtest`. - Removing `makejitter`, as this one requires the `libimageload` KallistiOS Port - so this utility can't be made when compiling KallistiOS the first time. commit 7f2e7e91bc3baf0b14d7fedf7776225fbfe096c7 Author: gameblabla <gam...@pr...> Date: Tue Dec 28 00:04:06 2021 +0100 wav2adpcm : Fix 64-bits related issues on x86_64. commit a763e6ef0cdcf209af2f7115f8b7446f7bd413f3 Author: Tchan0 <617...@us...> Date: Mon Dec 13 22:53:19 2021 +0100 Add missing exit (start) pad input Add missing exit (start) pad input commit c629e8101e31a69aa15a8aae1e2e014191c173b0 Author: Tchan0 <617...@us...> Date: Mon Dec 13 22:32:48 2021 +0100 Add missing exit (start) pad input Add missing exit (start) pad input commit 31b3783810c3b40c01f56ca621548b2d29149a63 Author: Tchan0 <617...@us...> Date: Mon Dec 13 22:30:35 2021 +0100 Add missing exit (start) pad input Add missing exit (start) pad input commit 395c9af8db16918c88c68962f42704b8838d4162 Author: Tchan0 <617...@us...> Date: Mon Dec 13 22:29:30 2021 +0100 Add missing exit (start) pad input Add missing exit (start) pad input commit 1d72966ffb798de86ede9dcc7d3b486c71d45ff7 Author: Tchan0 <617...@us...> Date: Mon Dec 13 22:27:06 2021 +0100 Add missing exit (start) pad input Add missing exit (start) pad input ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/kgl/basic/txrenv/gltest.c | 14 +++++++++++--- examples/dreamcast/kgl/demos/mipmap/gl-mipmap.c | 8 ++++++++ examples/dreamcast/kgl/demos/specular/specular.c | 13 ++++++++++--- kernel/arch/dreamcast/sound/snd_stream.c | 13 +++++-------- utils/Makefile | 2 +- utils/makejitter/makejitter.c | 1 + utils/wav2adpcm/wav2adpcm.c | 11 ++++++----- 7 files changed, 42 insertions(+), 20 deletions(-) diff --git a/examples/dreamcast/kgl/basic/txrenv/gltest.c b/examples/dreamcast/kgl/basic/txrenv/gltest.c index 0966a29..bbd3eaa 100644 --- a/examples/dreamcast/kgl/basic/txrenv/gltest.c +++ b/examples/dreamcast/kgl/basic/txrenv/gltest.c @@ -11,6 +11,7 @@ the PVR hardware is used to perform transparency. User may press 'A' or 'B' to Enable or Disable rendering to Translucent list. Use D-Pad to toggle different blending modes. + Press 'Start' to exit. */ #include <kos.h> @@ -71,14 +72,17 @@ void RenderCallback() { glutSwapBuffers(); } -void InputCallback() { +int InputCallback() { maple_device_t *cont = maple_enum_type(0, MAPLE_FUNC_CONTROLLER); if(cont) { cont_state_t *state = (cont_state_t *)maple_dev_status(cont); if(!state) - return; + return 1; + + if(state->buttons & CONT_START) + return 0; if(state->buttons & CONT_DPAD_UP) { ENV_MODE = 0; @@ -108,6 +112,8 @@ void InputCallback() { BLEND = 0; } } + + return 1; } extern uint8 romdisk[]; @@ -136,7 +142,9 @@ int main(int argc, char **argv) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_FILTER, GL_LINEAR); while(1) { - InputCallback(); + if (!InputCallback()) + return 0; + RenderCallback(); } diff --git a/examples/dreamcast/kgl/demos/mipmap/gl-mipmap.c b/examples/dreamcast/kgl/demos/mipmap/gl-mipmap.c index 1448ec6..7e0d3a3 100644 --- a/examples/dreamcast/kgl/demos/mipmap/gl-mipmap.c +++ b/examples/dreamcast/kgl/demos/mipmap/gl-mipmap.c @@ -11,6 +11,7 @@ Y = Use Base Texture D-pad UP = Scale image size up D-pad DOWN = Scale image size down + Start = Exit */ #include <kos.h> @@ -27,6 +28,7 @@ extern GLuint glTextureLoadPVR(char *fname, unsigned char isMipMapped, unsigned #define INP_RESIZE_DOWN 2 #define INP_USE_MIP_MAP 3 #define INP_NO_MIP_MAP 4 +#define INP_EXIT 5 /* Simple Input Callback with a return value */ int InputCallback() { @@ -38,6 +40,9 @@ int InputCallback() { if(!state) return 0; + if(state->buttons & CONT_START) + return INP_EXIT; + if(state->buttons & CONT_DPAD_UP) return INP_RESIZE_UP; @@ -127,6 +132,9 @@ int main(int argc, char **argv) { case INP_USE_MIP_MAP: curTexID = texID1; break; + + case INP_EXIT: + return 0; } RenderTexturedQuadCentered(curTexID, width, height); diff --git a/examples/dreamcast/kgl/demos/specular/specular.c b/examples/dreamcast/kgl/demos/specular/specular.c index 793f388..ef89924 100644 --- a/examples/dreamcast/kgl/demos/specular/specular.c +++ b/examples/dreamcast/kgl/demos/specular/specular.c @@ -28,6 +28,7 @@ Hold Right trigger, then press A,B,X, or Y to Disable Light1->4 D-pad to rotate camera A,B,X,Y to move camera + Start to exit As Vertex Clipping and Lighting is being applied using immediate mode, this really is a brute-force approach to the vertex submission pipeline. @@ -956,14 +957,17 @@ extern uint8 romdisk[]; KOS_INIT_ROMDISK(romdisk); static unsigned char LE[8] = {0, 1, 0, 0, 0, 0, 0, 0}; -void InputCb() { +int InputCb() { maple_device_t *cont = maple_enum_type(0, MAPLE_FUNC_CONTROLLER); if(cont) { cont_state_t *state = (cont_state_t *)maple_dev_status(cont); if(!state) - return; + return 1; + + if(state->buttons & CONT_START) + return 0; if(state->ltrig > 0) { if(state->buttons & CONT_A) @@ -993,6 +997,8 @@ void InputCb() { LE[4] = 0; } } + + return 1; } int main() { @@ -1077,7 +1083,8 @@ int main() { GLuint start = GetTime(); - InputCb(); + if (!InputCb()) + return 0; glSetCameraPosition(camFrom, camTo); diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index c2ae83b..04a66ca 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -450,10 +450,10 @@ void snd_stream_stop(snd_stream_hnd_t hnd) { } /* The DMA will chain to this to start the second DMA. */ -/* static uint32 dmadest, dmacnt; +static uint32 dmadest, dmacnt; static void dma_chain(ptr_t data) { spu_dma_transfer(sep_buffer[1], dmadest, dmacnt, 0, NULL, 0); -} */ +} /* Poll streamer to load more data if neccessary */ int snd_stream_poll(snd_stream_hnd_t hnd) { @@ -526,16 +526,13 @@ int snd_stream_poll(snd_stream_hnd_t hnd) { } sep_data(data, needed_samples * 2, streams[hnd].stereo); - spu_memload(streams[hnd].spu_ram_sch[0] + (streams[hnd].last_write_pos * 2), (uint8*)sep_buffer[0], needed_samples * 2); - spu_memload(streams[hnd].spu_ram_sch[1] + (streams[hnd].last_write_pos * 2), (uint8*)sep_buffer[1], needed_samples * 2); // Second DMA will get started by the chain handler - /* dcache_flush_range(sep_buffer[0], needed_samples*2); + dcache_flush_range(sep_buffer[0], needed_samples*2); dcache_flush_range(sep_buffer[1], needed_samples*2); - dmadest = spu_ram_sch2 + (last_write_pos * 2); + dmadest = streams[hnd].spu_ram_sch[1] + (streams[hnd].last_write_pos * 2); dmacnt = needed_samples * 2; - spu_dma_transfer(sep_buffer[0], spu_ram_sch1 + (last_write_pos * 2), needed_samples * 2, - 0, dma_chain, 0); */ + spu_dma_transfer(sep_buffer[0], streams[hnd].spu_ram_sch[0] + (streams[hnd].last_write_pos * 2), needed_samples * 2, 0, dma_chain, 0); streams[hnd].last_write_pos += needed_samples; diff --git a/utils/Makefile b/utils/Makefile index 262afbe..9b725f7 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -4,7 +4,7 @@ # Copyright (C) 2001 Dan Potter # -DIRS = bin2c bincnv dcbumpgen genromfs isotest kmgenc makeip makejitter rdtest scramble vqenc wav2adpcm +DIRS = bin2c bincnv dcbumpgen genromfs kmgenc makeip scramble vqenc wav2adpcm ifeq ($(KOS_SUBARCH), naomi) DIRS += naomibintool naominetboot diff --git a/utils/makejitter/makejitter.c b/utils/makejitter/makejitter.c index f35b5c7..e73ca0f 100644 --- a/utils/makejitter/makejitter.c +++ b/utils/makejitter/makejitter.c @@ -2,6 +2,7 @@ #include <stdlib.h> #include <time.h> +/* This utility requires the "libimageload" KallistiOS Port. */ #include <imageload/jitterdefs.h> int ijitter[JITTER_TABLE_SIZE]; diff --git a/utils/wav2adpcm/wav2adpcm.c b/utils/wav2adpcm/wav2adpcm.c index 5bafd9b..0ee34c1 100644 --- a/utils/wav2adpcm/wav2adpcm.c +++ b/utils/wav2adpcm/wav2adpcm.c @@ -17,6 +17,7 @@ #include <stdio.h> #include <stdlib.h> +#include <stdint.h> #include <string.h> static int diff_lookup[16] = { @@ -166,19 +167,19 @@ void interleave(void *buffer, size_t size) { struct wavhdr_t { char hdr1[4]; - long totalsize; + int32_t totalsize; char hdr2[8]; - long hdrsize; + int32_t hdrsize; short format; short channels; - long freq; - long byte_per_sec; + int32_t freq; + int32_t byte_per_sec; short blocksize; short bits; char hdr3[4]; - long datasize; + int32_t datasize; }; int wav2adpcm(const char *infile, const char *outfile) { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2021-12-13 01:52:58
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 44e6e771d564ffeab15d1d70415e282c547f6e5e (commit) via fc9c3acd39ea292d5c5108c7ba3c3efc04477ca2 (commit) via b16b5901c13537dd6d058fe65daf80f01602444c (commit) via d25eae15cffc96dcf9c8633c4303e34483d7ac09 (commit) via 39cbb7dba873090c5b340b3edbb83816462f6f45 (commit) via a8d2db71999ce5556ca88349c023fa275ed8155d (commit) via cc2c662504ca1cfe77262c49ca3b23a44cb30bdd (commit) via 866d00668f75e37cb2bd1aa20e3b9593637c4f80 (commit) via 18e126974a5f0ac17930b7674a8561b583c3beb3 (commit) via 2de05be85c4549e7d98df9f9f4e53a99d9e55c34 (commit) via cfd99ef109c23b913b3f72f38e7774d787f75fd0 (commit) via cd55e1e562ecab9cf73c5e1391ebd2e4918048b1 (commit) via bb9fbc563c1cc55af6e0dbc7eed73d43ff618699 (commit) via d0aa07277eb49816f24e26dc3173b6cc309e186e (commit) via eba532567c8845e3bcf102f4b09e6dc4a95df2e9 (commit) via 864930e9bc2be2edb926cbcab72e4715dd06d0d5 (commit) via 3ccfa603111ad6c8c289091ec447528d771d58ef (commit) via ca69adea9311e0df7e924f45c62d82ed7ef698fa (commit) via c668eded2cbead4de30fca285179b2d1b041e1db (commit) via 097bf1caf67e2444018384f19c2f14e962a005e9 (commit) via b78231d913550302b293997e6a858ce71da93273 (commit) via ba8dad1d4eb58a2cb3660cee06608c82a131e3f5 (commit) via 60ef03fa48affb758704f28ecbf592fff7bb7b4a (commit) via cfef44a9fe0c0153009966eff92ae8117be3ef0e (commit) via 72208de195d287682d9bf5c8cc8493dc8d078cfa (commit) via 27dac9d64e21996ac26abf213d745b71ecf2f245 (commit) via aebc643efed188397d24726656c5180c40683724 (commit) via 9d38dc08fc32e997a8e90ea62e9eeb5915744f7a (commit) via 6dff03492ca9c485f4bc9fd4e8bea9af39f7a452 (commit) via 0aaf86349a084761fd4216a624dd5dfdb40feed9 (commit) via 5c331ded1fdb31140f24a8f6eff2cbd70fb8bfda (commit) via 8ca4ed1fa6060aa90f14b60523a736bd1129e4ff (commit) via a53a12fb61065d82d63fd39da1ff94f6450da84f (commit) via 251d217808882310ff3561ada2fe47f895972bd9 (commit) via 52b91514db14bda9f69ead6e422107ba10265cad (commit) via 52915f40ac79ffb595d66e84fd64914ee0843205 (commit) via a25ecfa3d9565ed4a4963f2169e83566fbda2bd0 (commit) via c87fccf479af4fe93047b26719f58f46673784f8 (commit) via b862e52f84e41e169753f7c58e06ca2c7d06603c (commit) via 2b951ed5ce334747e15f04691e09ab8877ba4da6 (commit) via 8014ecde4d2665dd8a9ba7fe5e7f4f8013657684 (commit) via 2a2a53be782db849d032319f6b6080da3a203ff3 (commit) via 761ee2368766e028d693a8971939f39d13904061 (commit) via 0deed124bf210d67233d22b60f33669960a2c1ac (commit) via 5260227f8cb13c1c040daf6efaf1c4c9728f5d5a (commit) via 1b14fdfc821d23d7ba78a07a4e0a9d04849fd8d5 (commit) via 1695582b4f2889ea21d866e2bcdc3c301bb2cd99 (commit) via bc076de1da946076ebe478d8372f5c9a313c281d (commit) from ae3d5ec3ed7bbc0f0ea8fdd9f8d25e68ba7e8673 (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 44e6e771d564ffeab15d1d70415e282c547f6e5e Merge: fc9c3ac d25eae1 Author: Lawrence Sebald <ljs...@us...> Date: Sun Dec 12 16:10:20 2021 -0500 Merge pull request #63 from Tchan0/Add_DC_ARM_Wrappers Add dc arm wrappers commit fc9c3acd39ea292d5c5108c7ba3c3efc04477ca2 Merge: b16b590 cc2c662 Author: Lawrence Sebald <ljs...@us...> Date: Sun Dec 12 16:09:34 2021 -0500 Merge pull request #62 from Tchan0/Clean_SDL_Sound_Example Clean sdl sound example commit b16b5901c13537dd6d058fe65daf80f01602444c Merge: cd55e1e 2de05be Author: Lawrence Sebald <ljs...@us...> Date: Sun Dec 12 16:09:03 2021 -0500 Merge pull request #61 from Tchan0/Improve_Consistency_Of_PVR_Texture_Render_Example Improve consistency of pvr texture render example commit d25eae15cffc96dcf9c8633c4303e34483d7ac09 Author: Tchan0 <617...@us...> Date: Sun Dec 12 21:09:15 2021 +0100 dc-arm gnu wrappers gnu wrappers for the SPU. Not useful for a lot of people, but very useful for people wanting to write their own driver & co commit 39cbb7dba873090c5b340b3edbb83816462f6f45 Author: Tchan0 <617...@us...> Date: Sun Dec 12 21:07:30 2021 +0100 add extra DC_ARM defines add extra DC_ARM defines to be more in line with the KOS (sh-elf) defines. Won't be used by a lot of people, but can be handy for people who want to write their own driver. commit a8d2db71999ce5556ca88349c023fa275ed8155d Author: Tchan0 <617...@us...> Date: Sun Dec 12 21:04:52 2021 +0100 move arch kernel dir define to earlier in file It's more handy to define the arch kernel folder before the include of environ_${KOS_ARCH}.sh, so that it can be used in there commit cc2c662504ca1cfe77262c49ca3b23a44cb30bdd Author: Tchan0 <617...@us...> Date: Sun Dec 12 19:46:39 2021 +0100 Update and rename example.c to sdl_sound.c Rename to sdl_sound.c to have it match the target .elf file name commit 866d00668f75e37cb2bd1aa20e3b9593637c4f80 Author: Tchan0 <617...@us...> Date: Sun Dec 12 19:46:00 2021 +0100 Rename object to sdl_sound rename object to sdl_sound to have a matching name for the main .c & target .elf file commit 18e126974a5f0ac17930b7674a8561b583c3beb3 Author: Tchan0 <617...@us...> Date: Sun Dec 12 19:44:39 2021 +0100 Add sdl subfolder add sdl subfolder to include it in the make all of the examples commit 2de05be85c4549e7d98df9f9f4e53a99d9e55c34 Author: Tchan0 <617...@us...> Date: Sun Dec 12 19:34:29 2021 +0100 Rename ta.c to texture_render.c renamed the main file so that it corrsponds to the .elf file name, to be consistent with all the other examples. commit cfd99ef109c23b913b3f72f38e7774d787f75fd0 Author: Tchan0 <617...@us...> Date: Sun Dec 12 19:33:40 2021 +0100 Update Makefile - texture_render is the only example that defines a TARGET_ELF, and also outputs a .bin file. This was removed to be more consistent with all the other examples, since it's quite unnecessary... - name of the object renamed so that the main file name corresponds to the .elf file name, to be consistent with all the other examples. commit cd55e1e562ecab9cf73c5e1391ebd2e4918048b1 Merge: bb9fbc5 bc076de Author: Lawrence Sebald <ljs...@us...> Date: Sun Dec 12 13:11:30 2021 -0500 Merge pull request #58 from Tchan0/Add_Missing_Utils_In_Make Add missing utilities in /utils/Makefile commit bb9fbc563c1cc55af6e0dbc7eed73d43ff618699 Merge: d0aa072 eba5325 Author: Lawrence Sebald <ljs...@us...> Date: Sun Dec 12 13:11:04 2021 -0500 Merge pull request #60 from Tchan0/Add_Missing_Examples_In_Make_All Add missing examples in make all commit d0aa07277eb49816f24e26dc3173b6cc309e186e Merge: ae3d5ec 3ccfa60 Author: Lawrence Sebald <ljs...@us...> Date: Sun Dec 12 13:10:37 2021 -0500 Merge pull request #59 from Tchan0/Rename_Main_c_files_in_Examples Improve consistency in the examples by using the same name for the main file and the target commit eba532567c8845e3bcf102f4b09e6dc4a95df2e9 Author: Tchan0 <617...@us...> Date: Sun Dec 12 19:04:51 2021 +0100 Update Makefile Add example serpent_dma to make all commit 864930e9bc2be2edb926cbcab72e4715dd06d0d5 Author: Tchan0 <617...@us...> Date: Sun Dec 12 19:04:05 2021 +0100 Update Makefile Add examples httpd and isp-settings to the make all commit 3ccfa603111ad6c8c289091ec447528d771d58ef Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:34:30 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit ca69adea9311e0df7e924f45c62d82ed7ef698fa Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:16:55 2021 +0100 Update and rename main.c to specular.c Improve consistency in the examples by using the same name for the main file and the target commit c668eded2cbead4de30fca285179b2d1b041e1db Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:16:23 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit 097bf1caf67e2444018384f19c2f14e962a005e9 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:15:51 2021 +0100 Update and rename main.c to gl-multitex-elements.c Improve consistency in the examples by using the same name for the main file and the target commit b78231d913550302b293997e6a858ce71da93273 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:15:28 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit ba8dad1d4eb58a2cb3660cee06608c82a131e3f5 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:14:55 2021 +0100 Update and rename main.c to gl-multitex-arrays.c Improve consistency in the examples by using the same name for the main file and the target commit 60ef03fa48affb758704f28ecbf592fff7bb7b4a Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:14:29 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit cfef44a9fe0c0153009966eff92ae8117be3ef0e Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:13:52 2021 +0100 Update and rename main.c to gl-mipmap.c Improve consistency in the examples by using the same name for the main file and the target commit 72208de195d287682d9bf5c8cc8493dc8d078cfa Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:13:29 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit 27dac9d64e21996ac26abf213d745b71ecf2f245 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:12:53 2021 +0100 Update and rename main.c to radial_blur.c Improve consistency in the examples by using the same name for the main file and the target commit aebc643efed188397d24726656c5180c40683724 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:12:32 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit 9d38dc08fc32e997a8e90ea62e9eeb5915744f7a Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:11:45 2021 +0100 Rename main.c to nehe26.c Improve consistency in the examples by using the same name for the main file and the target commit 6dff03492ca9c485f4bc9fd4e8bea9af39f7a452 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:11:27 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit 0aaf86349a084761fd4216a624dd5dfdb40feed9 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:10:51 2021 +0100 Rename main.c to nehe09.c Improve consistency in the examples by using the same name for the main file and the target commit 5c331ded1fdb31140f24a8f6eff2cbd70fb8bfda Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:10:33 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit 8ca4ed1fa6060aa90f14b60523a736bd1129e4ff Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:10:01 2021 +0100 Rename main.c to nehe08.c Improve consistency in the examples by using the same name for the main file and the target commit a53a12fb61065d82d63fd39da1ff94f6450da84f Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:09:40 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit 251d217808882310ff3561ada2fe47f895972bd9 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:09:10 2021 +0100 Rename main.c to nehe06.c Improve consistency in the examples by using the same name for the main file and the target commit 52b91514db14bda9f69ead6e422107ba10265cad Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:08:50 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit 52915f40ac79ffb595d66e84fd64914ee0843205 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:08:17 2021 +0100 Rename main.c to nehe05.c Improve consistency in the examples by using the same name for the main file and the target commit a25ecfa3d9565ed4a4963f2169e83566fbda2bd0 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:07:54 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit c87fccf479af4fe93047b26719f58f46673784f8 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:07:23 2021 +0100 Rename main.c to nehe02.c Improve consistency in the examples by using the same name for the main file and the target commit b862e52f84e41e169753f7c58e06ca2c7d06603c Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:06:58 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit 2b951ed5ce334747e15f04691e09ab8877ba4da6 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:06:14 2021 +0100 Update and rename main.c to gl-arrays.c Improve consistency in the examples by using the same name for the main file and the target commit 8014ecde4d2665dd8a9ba7fe5e7f4f8013657684 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:05:50 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit 2a2a53be782db849d032319f6b6080da3a203ff3 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:04:54 2021 +0100 Update and rename main.c to gltest.c Improve consistency in the examples by using the same name for the main file and the target commit 761ee2368766e028d693a8971939f39d13904061 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:04:26 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit 0deed124bf210d67233d22b60f33669960a2c1ac Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:03:31 2021 +0100 Update and rename main.c to gl-elements.c Improve consistency in the examples by using the same name for the main file and the target commit 5260227f8cb13c1c040daf6efaf1c4c9728f5d5a Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:03:00 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit 1b14fdfc821d23d7ba78a07a4e0a9d04849fd8d5 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:02:05 2021 +0100 Update and rename main.c to adventure.c Improve consistency in the examples by using the same name for the main file and the target commit 1695582b4f2889ea21d866e2bcdc3c301bb2cd99 Author: Tchan0 <617...@us...> Date: Sun Dec 12 18:01:09 2021 +0100 Update Makefile Improve consistency in the examples by using the same name for the main file and the target commit bc076de1da946076ebe478d8372f5c9a313c281d Author: Tchan0 <617...@us...> Date: Sun Dec 12 11:30:35 2021 +0100 Add missing utils in Makefile A few small utilities are missing from the /utils/Makefile, forcing people to manually compile them after the installation of kos: bin2c, bincnv, isotest, kmgenc, makejitter, rdtest. Also, sorted the DIRS alphabetically. ----------------------------------------------------------------------- Summary of changes: environ_base.sh | 5 +++-- environ_dreamcast.sh | 5 +++++ examples/dreamcast/Makefile | 2 +- examples/dreamcast/conio/adventure/Makefile | 2 +- .../conio/adventure/{main.c => adventure.c} | 4 ++-- examples/dreamcast/dreameye/basic/Makefile | 20 ++++++++++---------- examples/dreamcast/kgl/basic/elements/Makefile | 2 +- .../kgl/basic/elements/{main.c => gl-elements.c} | 2 +- examples/dreamcast/kgl/basic/txrenv/Makefile | 2 +- .../dreamcast/kgl/basic/txrenv/{main.c => gltest.c} | 2 +- examples/dreamcast/kgl/basic/zclip_arrays/Makefile | 2 +- .../kgl/basic/zclip_arrays/{main.c => gl-arrays.c} | 2 +- examples/dreamcast/kgl/demos/blur/Makefile | 2 +- .../kgl/demos/blur/{main.c => radial_blur.c} | 2 +- examples/dreamcast/kgl/demos/mipmap/Makefile | 2 +- .../kgl/demos/mipmap/{main.c => gl-mipmap.c} | 2 +- .../dreamcast/kgl/demos/multitexture-arrays/Makefile | 2 +- .../{main.c => gl-multitex-arrays.c} | 2 +- .../kgl/demos/multitexture-elements/Makefile | 2 +- .../{main.c => gl-multitex-elements.c} | 2 +- examples/dreamcast/kgl/demos/specular/Makefile | 2 +- .../kgl/demos/specular/{main.c => specular.c} | 2 +- examples/dreamcast/kgl/nehe/nehe02/Makefile | 2 +- .../dreamcast/kgl/nehe/nehe02/{main.c => nehe02.c} | 0 examples/dreamcast/kgl/nehe/nehe05/Makefile | 2 +- .../dreamcast/kgl/nehe/nehe05/{main.c => nehe05.c} | 0 examples/dreamcast/kgl/nehe/nehe06/Makefile | 2 +- .../dreamcast/kgl/nehe/nehe06/{main.c => nehe06.c} | 0 examples/dreamcast/kgl/nehe/nehe08/Makefile | 2 +- .../dreamcast/kgl/nehe/nehe08/{main.c => nehe08.c} | 0 examples/dreamcast/kgl/nehe/nehe09/Makefile | 2 +- .../dreamcast/kgl/nehe/nehe09/{main.c => nehe09.c} | 0 examples/dreamcast/kgl/nehe/nehe26/Makefile | 2 +- .../dreamcast/kgl/nehe/nehe26/{main.c => nehe26.c} | 0 examples/dreamcast/network/Makefile | 6 ++++++ examples/dreamcast/parallax/Makefile | 2 +- examples/dreamcast/pvr/texture_render/Makefile | 12 ++++-------- .../pvr/texture_render/{ta.c => texture_render.c} | 0 examples/dreamcast/sdl/sound/Makefile | 2 +- .../dreamcast/sdl/sound/{example.c => sdl_sound.c} | 2 +- utils/Makefile | 2 +- utils/gnu_wrappers/dc-arm-ar | 3 +++ utils/gnu_wrappers/dc-arm-as | 3 +++ utils/gnu_wrappers/{kos-cc => dc-arm-cc} | 12 ++++++------ utils/gnu_wrappers/dc-arm-ld | 3 +++ utils/gnu_wrappers/dc-arm-make | 3 +++ utils/gnu_wrappers/{kos-objcopy => dc-arm-objcopy} | 2 +- 47 files changed, 77 insertions(+), 57 deletions(-) rename examples/dreamcast/conio/adventure/{main.c => adventure.c} (99%) rename examples/dreamcast/kgl/basic/elements/{main.c => gl-elements.c} (96%) rename examples/dreamcast/kgl/basic/txrenv/{main.c => gltest.c} (95%) rename examples/dreamcast/kgl/basic/zclip_arrays/{main.c => gl-arrays.c} (96%) rename examples/dreamcast/kgl/demos/blur/{main.c => radial_blur.c} (96%) rename examples/dreamcast/kgl/demos/mipmap/{main.c => gl-mipmap.c} (95%) rename examples/dreamcast/kgl/demos/multitexture-arrays/{main.c => gl-multitex-arrays.c} (96%) rename examples/dreamcast/kgl/demos/multitexture-elements/{main.c => gl-multitex-elements.c} (96%) rename examples/dreamcast/kgl/demos/specular/{main.c => specular.c} (96%) rename examples/dreamcast/kgl/nehe/nehe02/{main.c => nehe02.c} (100%) rename examples/dreamcast/kgl/nehe/nehe05/{main.c => nehe05.c} (100%) rename examples/dreamcast/kgl/nehe/nehe06/{main.c => nehe06.c} (100%) rename examples/dreamcast/kgl/nehe/nehe08/{main.c => nehe08.c} (100%) rename examples/dreamcast/kgl/nehe/nehe09/{main.c => nehe09.c} (100%) rename examples/dreamcast/kgl/nehe/nehe26/{main.c => nehe26.c} (100%) rename examples/dreamcast/pvr/texture_render/{ta.c => texture_render.c} (100%) rename examples/dreamcast/sdl/sound/{example.c => sdl_sound.c} (99%) create mode 100644 utils/gnu_wrappers/dc-arm-ar create mode 100644 utils/gnu_wrappers/dc-arm-as copy utils/gnu_wrappers/{kos-cc => dc-arm-cc} (71%) mode change 100755 => 100644 create mode 100644 utils/gnu_wrappers/dc-arm-ld create mode 100644 utils/gnu_wrappers/dc-arm-make copy utils/gnu_wrappers/{kos-objcopy => dc-arm-objcopy} (87%) mode change 100755 => 100644 diff --git a/environ_base.sh b/environ_base.sh index 29bc4f7..46f781f 100644 --- a/environ_base.sh +++ b/environ_base.sh @@ -6,6 +6,9 @@ if [ -z "${KOS_PORTS}" ] ; then export KOS_PORTS="${KOS_BASE}/../kos-ports" fi +# Arch kernel folder +export KOS_ARCH_DIR="${KOS_BASE}/kernel/arch/${KOS_ARCH}" + # Pull in the arch environ file . ${KOS_BASE}/environ_${KOS_ARCH}.sh @@ -49,8 +52,6 @@ case $KOS_GCCVER in esac # Some extra vars based on architecture -export KOS_ARCH_DIR="${KOS_BASE}/kernel/arch/${KOS_ARCH}" - case $KOS_GCCVER in 2* | 3*) export KOS_START="${KOS_ARCH_DIR}/kernel/startup.o" ;; diff --git a/environ_dreamcast.sh b/environ_dreamcast.sh index bf47375..3182bc6 100644 --- a/environ_dreamcast.sh +++ b/environ_dreamcast.sh @@ -21,4 +21,9 @@ if [ x${KOS_ARCH} = xdreamcast ]; then export DC_ARM_LD="${DC_ARM_BASE}/bin/${DC_ARM_PREFIX}-ld" export DC_ARM_CFLAGS="-mcpu=arm7di -Wall -O2 -fno-strict-aliasing -Wl,--fix-v4bx -Wa,--fix-v4bx" export DC_ARM_AFLAGS="-mcpu=arm7di --fix-v4bx" + export DC_ARM_MAKE="make" + export DC_ARM_START="${KOS_ARCH_DIR}/sound/arm/crt0.s" + export DC_ARM_LDFLAGS="${DC_ARM_LDFLAGS} -Wl,-Ttext=0x00000000,-N -nostartfiles -nostdlib -e reset" + export DC_ARM_LIB_PATHS="" + export DC_ARM_LIBS="-Wl,--start-group -lgcc -Wl,--end-group" fi diff --git a/examples/dreamcast/Makefile b/examples/dreamcast/Makefile index b9c7dcc..7ff5a70 100644 --- a/examples/dreamcast/Makefile +++ b/examples/dreamcast/Makefile @@ -5,7 +5,7 @@ # DIRS = 2ndmix basic libdream kgl hello sound png network vmu conio pvr video \ - lua parallax modem dreameye sd g1ata lightgun keyboard + lua parallax modem dreameye sd g1ata lightgun keyboard sdl ifdef KOS_CCPLUS DIRS += cpp tsunami endif diff --git a/examples/dreamcast/conio/adventure/Makefile b/examples/dreamcast/conio/adventure/Makefile index f192fc8..30cbbda 100644 --- a/examples/dreamcast/conio/adventure/Makefile +++ b/examples/dreamcast/conio/adventure/Makefile @@ -29,7 +29,7 @@ all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules -OBJS = porthelper.o crc.o done.o init.o io.o main.o save.o subr.o vocab.o wizard.o data.o +OBJS = porthelper.o crc.o done.o init.o io.o adventure.o save.o subr.o vocab.o wizard.o data.o $(DATA_TARGET): $(HOST_CC) -o $(SETUP_TARGET) $(SETUP_SOURCE) $(SETUP_CFLAGS) diff --git a/examples/dreamcast/conio/adventure/main.c b/examples/dreamcast/conio/adventure/adventure.c similarity index 99% rename from examples/dreamcast/conio/adventure/main.c rename to examples/dreamcast/conio/adventure/adventure.c index 5f734f3..0344541 100644 --- a/examples/dreamcast/conio/adventure/main.c +++ b/examples/dreamcast/conio/adventure/adventure.c @@ -44,10 +44,10 @@ static const char copyright[] = #ifndef lint #if 0 -static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/2/93"; +static char sccsid[] = "@(#)adventure.c 8.1 (Berkeley) 6/2/93"; #endif static const char rcsid[] = - "$FreeBSD: src/games/adventure/main.c,v 1.9.2.1 2001/03/05 11:43:11 kris Exp $"; + "$FreeBSD: src/games/adventure/adventure.c,v 1.9.2.1 2001/03/05 11:43:11 kris Exp $"; #endif /* not lint */ /* Re-coding of advent in C: main program */ diff --git a/examples/dreamcast/dreameye/basic/Makefile b/examples/dreamcast/dreameye/basic/Makefile index 5e0a6aa..d43b116 100644 --- a/examples/dreamcast/dreameye/basic/Makefile +++ b/examples/dreamcast/dreameye/basic/Makefile @@ -4,26 +4,26 @@ # Copyright (C) 2009 Lawrence Sebald # -all: rm-elf dreameye_test.elf +TARGET = dreameye.elf +OBJS = dreameye.o -include $(KOS_BASE)/Makefile.rules +all: rm-elf $(TARGET) -OBJS = dreameye.o +include $(KOS_BASE)/Makefile.rules clean: rm-elf -rm -f $(OBJS) rm-elf: - -rm -f dreameye_test.elf + -rm -f $(TARGET) -dreameye_test.elf: $(OBJS) - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o dreameye_test.elf $(KOS_START) \ +$(TARGET): $(OBJS) + $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \ $(OBJS) $(DATAOBJS) $(OBJEXTRA) $(KOS_LIBS) - -run: dreameye_test.elf - $(KOS_LOADER) dreameye_test.elf +run: $(TARGET).elf + $(KOS_LOADER) $(TARGET).elf dist: rm -f $(OBJS) - $(KOS_STRIP) dreameye_test.elf + $(KOS_STRIP) $(TARGET).elf diff --git a/examples/dreamcast/kgl/basic/elements/Makefile b/examples/dreamcast/kgl/basic/elements/Makefile index c162a08..3fb208a 100644 --- a/examples/dreamcast/kgl/basic/elements/Makefile +++ b/examples/dreamcast/kgl/basic/elements/Makefile @@ -5,7 +5,7 @@ TARGET = gl-elements.elf -OBJS = main.o pvr-texture.o +OBJS = gl-elements.o pvr-texture.o OBJS += romdisk.o diff --git a/examples/dreamcast/kgl/basic/elements/main.c b/examples/dreamcast/kgl/basic/elements/gl-elements.c similarity index 96% rename from examples/dreamcast/kgl/basic/elements/main.c rename to examples/dreamcast/kgl/basic/elements/gl-elements.c index f8315e0..c03d5b2 100644 --- a/examples/dreamcast/kgl/basic/elements/main.c +++ b/examples/dreamcast/kgl/basic/elements/gl-elements.c @@ -1,7 +1,7 @@ /* KallistiOS 2.0.0 - main.c + gl-elements.c (c)2014 Josh Pearson Open GL example using Vertex Array Submission and GL Lighting. diff --git a/examples/dreamcast/kgl/basic/txrenv/Makefile b/examples/dreamcast/kgl/basic/txrenv/Makefile index 73b8b01..1be21e1 100644 --- a/examples/dreamcast/kgl/basic/txrenv/Makefile +++ b/examples/dreamcast/kgl/basic/txrenv/Makefile @@ -5,7 +5,7 @@ TARGET = gltest.elf -OBJS = main.o pvr-texture.o +OBJS = gltest.o pvr-texture.o OBJS += romdisk.o diff --git a/examples/dreamcast/kgl/basic/txrenv/main.c b/examples/dreamcast/kgl/basic/txrenv/gltest.c similarity index 95% rename from examples/dreamcast/kgl/basic/txrenv/main.c rename to examples/dreamcast/kgl/basic/txrenv/gltest.c index c589ec0..0966a29 100644 --- a/examples/dreamcast/kgl/basic/txrenv/main.c +++ b/examples/dreamcast/kgl/basic/txrenv/gltest.c @@ -1,7 +1,7 @@ /* KallistiOS 2.0.0 - main.c + gltest.c (C) 2014 Josh Pearson OpenGL Texture Environment Example. diff --git a/examples/dreamcast/kgl/basic/zclip_arrays/Makefile b/examples/dreamcast/kgl/basic/zclip_arrays/Makefile index b4a0845..b88d614 100644 --- a/examples/dreamcast/kgl/basic/zclip_arrays/Makefile +++ b/examples/dreamcast/kgl/basic/zclip_arrays/Makefile @@ -5,7 +5,7 @@ TARGET = gl-arrays.elf -OBJS = main.o pvr-texture.o +OBJS = gl-arrays.o pvr-texture.o OBJS += romdisk.o diff --git a/examples/dreamcast/kgl/basic/zclip_arrays/main.c b/examples/dreamcast/kgl/basic/zclip_arrays/gl-arrays.c similarity index 96% rename from examples/dreamcast/kgl/basic/zclip_arrays/main.c rename to examples/dreamcast/kgl/basic/zclip_arrays/gl-arrays.c index 0597ab3..d32bed5 100644 --- a/examples/dreamcast/kgl/basic/zclip_arrays/main.c +++ b/examples/dreamcast/kgl/basic/zclip_arrays/gl-arrays.c @@ -1,7 +1,7 @@ /* KallistiOS 2.0.0 - main.c + gl-arrays.c (c)2014 Josh Pearson Open GL example using Vertex Array Submission with Near Z Clipping. diff --git a/examples/dreamcast/kgl/demos/blur/Makefile b/examples/dreamcast/kgl/demos/blur/Makefile index 9a19c3e..74c3542 100644 --- a/examples/dreamcast/kgl/demos/blur/Makefile +++ b/examples/dreamcast/kgl/demos/blur/Makefile @@ -5,7 +5,7 @@ TARGET = radial_blur.elf -OBJS = main.o pvr-texture.o +OBJS = radial_blur.o pvr-texture.o OBJS += romdisk.o diff --git a/examples/dreamcast/kgl/demos/blur/main.c b/examples/dreamcast/kgl/demos/blur/radial_blur.c similarity index 96% rename from examples/dreamcast/kgl/demos/blur/main.c rename to examples/dreamcast/kgl/demos/blur/radial_blur.c index 33991ce..57eabfd 100644 --- a/examples/dreamcast/kgl/demos/blur/main.c +++ b/examples/dreamcast/kgl/demos/blur/radial_blur.c @@ -1,7 +1,7 @@ /* KallistiOS 2.0.0 - main.c + radial_blur.c (c)2014 Josh Pearson (c)2001 Benoit Miller (c)2000 Tom Stanis/Jeff Molofee diff --git a/examples/dreamcast/kgl/demos/mipmap/Makefile b/examples/dreamcast/kgl/demos/mipmap/Makefile index eef50a2..04b27bd 100644 --- a/examples/dreamcast/kgl/demos/mipmap/Makefile +++ b/examples/dreamcast/kgl/demos/mipmap/Makefile @@ -5,7 +5,7 @@ TARGET = gl-mipmap.elf -OBJS = main.o pvr-texture.o +OBJS = gl-mipmap.o pvr-texture.o OBJS += romdisk.o diff --git a/examples/dreamcast/kgl/demos/mipmap/main.c b/examples/dreamcast/kgl/demos/mipmap/gl-mipmap.c similarity index 95% rename from examples/dreamcast/kgl/demos/mipmap/main.c rename to examples/dreamcast/kgl/demos/mipmap/gl-mipmap.c index 840b56b..1448ec6 100644 --- a/examples/dreamcast/kgl/demos/mipmap/main.c +++ b/examples/dreamcast/kgl/demos/mipmap/gl-mipmap.c @@ -1,7 +1,7 @@ /* KallistiOS 2.0.0 - main.c + gl-mipmap.c (c)2014 Josh Pearson Open GL Mip-Map example. diff --git a/examples/dreamcast/kgl/demos/multitexture-arrays/Makefile b/examples/dreamcast/kgl/demos/multitexture-arrays/Makefile index 77ddf2f..ab47609 100644 --- a/examples/dreamcast/kgl/demos/multitexture-arrays/Makefile +++ b/examples/dreamcast/kgl/demos/multitexture-arrays/Makefile @@ -5,7 +5,7 @@ TARGET = gl-multitex-arrays.elf -OBJS = main.o pvr-texture.o +OBJS = gl-multitex-arrays.o pvr-texture.o OBJS += romdisk.o diff --git a/examples/dreamcast/kgl/demos/multitexture-arrays/main.c b/examples/dreamcast/kgl/demos/multitexture-arrays/gl-multitex-arrays.c similarity index 96% rename from examples/dreamcast/kgl/demos/multitexture-arrays/main.c rename to examples/dreamcast/kgl/demos/multitexture-arrays/gl-multitex-arrays.c index 64a61ab..6a839ca 100644 --- a/examples/dreamcast/kgl/demos/multitexture-arrays/main.c +++ b/examples/dreamcast/kgl/demos/multitexture-arrays/gl-multitex-arrays.c @@ -1,7 +1,7 @@ /* KallistiOS 2.0.0 - main.c + gl-multitex-arrays.c (c)2014 Josh Pearson Open GL Multi-Texture example using Vertex Array Submission. diff --git a/examples/dreamcast/kgl/demos/multitexture-elements/Makefile b/examples/dreamcast/kgl/demos/multitexture-elements/Makefile index 3fa7fca..6580e24 100644 --- a/examples/dreamcast/kgl/demos/multitexture-elements/Makefile +++ b/examples/dreamcast/kgl/demos/multitexture-elements/Makefile @@ -5,7 +5,7 @@ TARGET = gl-multitex-elements.elf -OBJS = main.o pvr-texture.o +OBJS = gl-multitex-elements.o pvr-texture.o OBJS += romdisk.o diff --git a/examples/dreamcast/kgl/demos/multitexture-elements/main.c b/examples/dreamcast/kgl/demos/multitexture-elements/gl-multitex-elements.c similarity index 96% rename from examples/dreamcast/kgl/demos/multitexture-elements/main.c rename to examples/dreamcast/kgl/demos/multitexture-elements/gl-multitex-elements.c index 80d3669..101e437 100644 --- a/examples/dreamcast/kgl/demos/multitexture-elements/main.c +++ b/examples/dreamcast/kgl/demos/multitexture-elements/gl-multitex-elements.c @@ -1,7 +1,7 @@ /* KallistiOS 2.0.0 - main.c + gl-multitex-elements.c (c)2014 Josh Pearson Open GL Multi-Texture example using Vertex Array Submission. diff --git a/examples/dreamcast/kgl/demos/specular/Makefile b/examples/dreamcast/kgl/demos/specular/Makefile index d73f3cb..390c80f 100644 --- a/examples/dreamcast/kgl/demos/specular/Makefile +++ b/examples/dreamcast/kgl/demos/specular/Makefile @@ -4,7 +4,7 @@ TARGET = specular.elf -OBJS = main.o vector.o input.o pvr-texture.o font.o timer.o +OBJS = specular.o vector.o input.o pvr-texture.o font.o timer.o OBJS += romdisk.o diff --git a/examples/dreamcast/kgl/demos/specular/main.c b/examples/dreamcast/kgl/demos/specular/specular.c similarity index 96% rename from examples/dreamcast/kgl/demos/specular/main.c rename to examples/dreamcast/kgl/demos/specular/specular.c index 36aa6ec..793f388 100644 --- a/examples/dreamcast/kgl/demos/specular/main.c +++ b/examples/dreamcast/kgl/demos/specular/specular.c @@ -1,7 +1,7 @@ /* KallistiOS 2.0.0 - main.c + specular.c (c)2014 Josh Pearson Open GL Specular Lighting Example . diff --git a/examples/dreamcast/kgl/nehe/nehe02/Makefile b/examples/dreamcast/kgl/nehe/nehe02/Makefile index b9f5c7e..b398a66 100644 --- a/examples/dreamcast/kgl/nehe/nehe02/Makefile +++ b/examples/dreamcast/kgl/nehe/nehe02/Makefile @@ -6,7 +6,7 @@ TARGET = nehe02.elf -OBJS = main.o +OBJS = nehe02.o all: rm-elf $(TARGET) diff --git a/examples/dreamcast/kgl/nehe/nehe02/main.c b/examples/dreamcast/kgl/nehe/nehe02/nehe02.c similarity index 100% rename from examples/dreamcast/kgl/nehe/nehe02/main.c rename to examples/dreamcast/kgl/nehe/nehe02/nehe02.c diff --git a/examples/dreamcast/kgl/nehe/nehe05/Makefile b/examples/dreamcast/kgl/nehe/nehe05/Makefile index 980db0b..38d5140 100644 --- a/examples/dreamcast/kgl/nehe/nehe05/Makefile +++ b/examples/dreamcast/kgl/nehe/nehe05/Makefile @@ -6,7 +6,7 @@ TARGET = nehe05.elf -OBJS = main.o +OBJS = nehe05.o all: rm-elf $(TARGET) diff --git a/examples/dreamcast/kgl/nehe/nehe05/main.c b/examples/dreamcast/kgl/nehe/nehe05/nehe05.c similarity index 100% rename from examples/dreamcast/kgl/nehe/nehe05/main.c rename to examples/dreamcast/kgl/nehe/nehe05/nehe05.c diff --git a/examples/dreamcast/kgl/nehe/nehe06/Makefile b/examples/dreamcast/kgl/nehe/nehe06/Makefile index c199d00..43effa1 100644 --- a/examples/dreamcast/kgl/nehe/nehe06/Makefile +++ b/examples/dreamcast/kgl/nehe/nehe06/Makefile @@ -6,7 +6,7 @@ TARGET = nehe06.elf -OBJS = main.o pvr-texture.o +OBJS = nehe06.o pvr-texture.o OBJS += romdisk.o diff --git a/examples/dreamcast/kgl/nehe/nehe06/main.c b/examples/dreamcast/kgl/nehe/nehe06/nehe06.c similarity index 100% rename from examples/dreamcast/kgl/nehe/nehe06/main.c rename to examples/dreamcast/kgl/nehe/nehe06/nehe06.c diff --git a/examples/dreamcast/kgl/nehe/nehe08/Makefile b/examples/dreamcast/kgl/nehe/nehe08/Makefile index 45f4f33..3509eef 100644 --- a/examples/dreamcast/kgl/nehe/nehe08/Makefile +++ b/examples/dreamcast/kgl/nehe/nehe08/Makefile @@ -6,7 +6,7 @@ TARGET = nehe08.elf -OBJS = main.o pvr-texture.o +OBJS = nehe08.o pvr-texture.o OBJS += romdisk.o diff --git a/examples/dreamcast/kgl/nehe/nehe08/main.c b/examples/dreamcast/kgl/nehe/nehe08/nehe08.c similarity index 100% rename from examples/dreamcast/kgl/nehe/nehe08/main.c rename to examples/dreamcast/kgl/nehe/nehe08/nehe08.c diff --git a/examples/dreamcast/kgl/nehe/nehe09/Makefile b/examples/dreamcast/kgl/nehe/nehe09/Makefile index 07cb639..92acda4 100644 --- a/examples/dreamcast/kgl/nehe/nehe09/Makefile +++ b/examples/dreamcast/kgl/nehe/nehe09/Makefile @@ -6,7 +6,7 @@ TARGET = nehe09.elf -OBJS = main.o pvr-texture.o +OBJS = nehe09.o pvr-texture.o OBJS += romdisk.o diff --git a/examples/dreamcast/kgl/nehe/nehe09/main.c b/examples/dreamcast/kgl/nehe/nehe09/nehe09.c ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Allura u. <al...@lw...> - 2021-12-11 01:45:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The KallistiOS port of OpenGL.". The branch, master has been updated via 07f346a758576af2b58e18bd0c139c2f5249407e (commit) from c4938f4b976cb7a1defd0ede491ab4f68355fbd3 (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 07f346a758576af2b58e18bd0c139c2f5249407e Author: t-chan <t_c...@ho...> Date: Sun Jun 20 10:44:24 2021 +0200 libGL: glClearDepth() defined as macro gives problems when kos/addons has another gl.h include ----------------------------------------------------------------------- Summary of changes: gl-api.c | 5 +++++ include/gl.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gl-api.c b/gl-api.c index 0f54352..9291164 100644 --- a/gl-api.c +++ b/gl-api.c @@ -186,6 +186,11 @@ void APIENTRY glClearDepthf(GLfloat depth) { ; } +//== NoOp ==// +void APIENTRY glClearDepth(GLfloat depth) { + ; +} + void APIENTRY glDepthFunc(GLenum func) { switch(func) { case GL_LESS: diff --git a/include/gl.h b/include/gl.h index 9808254..befd3b4 100644 --- a/include/gl.h +++ b/include/gl.h @@ -479,7 +479,7 @@ GLAPI void APIENTRY glClearColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a); /* Depth Testing */ GLAPI void APIENTRY glClearDepthf(GLfloat depth); -#define glClearDepth glClearDepthf +GLAPI void APIENTRY glClearDepth(GLfloat depth); GLAPI void APIENTRY glDepthMask(GLboolean flag); GLAPI void APIENTRY glDepthFunc(GLenum func); hooks/post-receive -- The KallistiOS port of OpenGL. |
From: Lawrence S. <ljs...@us...> - 2021-08-30 01:13: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 ae3d5ec3ed7bbc0f0ea8fdd9f8d25e68ba7e8673 (commit) from 71a725939a49b1c46b931f5389cf459378086a09 (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 ae3d5ec3ed7bbc0f0ea8fdd9f8d25e68ba7e8673 Author: Lawrence Sebald <ljs...@us...> Date: Sun Aug 29 21:13:26 2021 -0400 Update AUTHORS and banner year (again). ----------------------------------------------------------------------- Summary of changes: AUTHORS | 3 ++- kernel/arch/dreamcast/kernel/banner.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index a8b4606..7d7755d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,7 +22,7 @@ please see the README.KOS file in the doc directory. Contributors list (under the normal KOS license): ------------------------------------------------- Dan Potter: 1997, 2000, 2001, 2002, 2003, 2004 -Lawrence Sebald: 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 +Lawrence Sebald: 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Sam Steele: 2004 Gil Megidish: 2002 Florian Schulze: 2002 @@ -41,6 +41,7 @@ Brian Paul: 1999, 2000, 2001 Josh Pearson: 2013, 2014, 2015, 2016 Joe Fenton: 2016 Stefan Galowicz: 2016, 2017 +Luke Benstead: 2020, 2021 Files with Specific licenses: ----------------------------- diff --git a/kernel/arch/dreamcast/kernel/banner.c b/kernel/arch/dreamcast/kernel/banner.c index 1bddc05..25d29b0 100644 --- a/kernel/arch/dreamcast/kernel/banner.c +++ b/kernel/arch/dreamcast/kernel/banner.c @@ -8,7 +8,7 @@ #include "authors.h" static const char license[] = -"Copyright (C) 1997-2020 KallistiOS Contributors. All rights reserved.\n" +"Copyright (C) 1997-2021 KallistiOS Contributors. All rights reserved.\n" "\n" "Redistribution and use in source and binary forms, with or without\n" "modification, are permitted provided that the following conditions\n" hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2021-08-29 03:29:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 71a725939a49b1c46b931f5389cf459378086a09 (commit) from c3e7be36c342cf9c457cd5e7c6edad610f10a6b1 (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 71a725939a49b1c46b931f5389cf459378086a09 Author: Lawrence Sebald <ljs...@us...> Date: Sat Aug 28 23:28:47 2021 -0400 Update license banner copyright year. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/kernel/banner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/arch/dreamcast/kernel/banner.c b/kernel/arch/dreamcast/kernel/banner.c index b1e1850..1bddc05 100644 --- a/kernel/arch/dreamcast/kernel/banner.c +++ b/kernel/arch/dreamcast/kernel/banner.c @@ -8,7 +8,7 @@ #include "authors.h" static const char license[] = -"Copyright (C) 1997-2018 KallistiOS Contributors. All rights reserved.\n" +"Copyright (C) 1997-2020 KallistiOS Contributors. All rights reserved.\n" "\n" "Redistribution and use in source and binary forms, with or without\n" "modification, are permitted provided that the following conditions\n" hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2021-07-19 01:59:11
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via c3e7be36c342cf9c457cd5e7c6edad610f10a6b1 (commit) from 2e285a00ad4f09f4de694aef9a9f4442daba3ae8 (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 c3e7be36c342cf9c457cd5e7c6edad610f10a6b1 Author: Lawrence Sebald <ljs...@us...> Date: Sun Jul 18 21:58:55 2021 -0400 Update IRC channel location. ----------------------------------------------------------------------- Summary of changes: README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a3ac08..50b2495 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,4 @@ in the wiki at http://dcemulation.org/?title=Development Ask for help on the forums: http://dcemulation.org/phpBB/viewforum.php?f=29 -IRC chat: irc.freenode.net #dreamcastdev +IRC chat: irc.libera.chat #dreamcastdev hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2021-06-19 00:40:56
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 2e285a00ad4f09f4de694aef9a9f4442daba3ae8 (commit) via e124df20e0e4cb1b94ee7a1a253f63fa46e310af (commit) from 8a8efb7aee698605b0f230ed9641f5bbc22d04e0 (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 2e285a00ad4f09f4de694aef9a9f4442daba3ae8 Merge: 8a8efb7 e124df2 Author: Lawrence Sebald <ljs...@us...> Date: Fri Jun 18 20:40:44 2021 -0400 Merge pull request #55 from Tchan0/DynamicSubArch Sub Arch Pass-through commit e124df20e0e4cb1b94ee7a1a253f63fa46e310af Author: Tchan0 <617...@us...> Date: Fri Jun 18 17:36:14 2021 +0200 Update environ.sh.sample ----------------------------------------------------------------------- Summary of changes: doc/environ.sh.sample | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/environ.sh.sample b/doc/environ.sh.sample index a87b984..8539dc6 100644 --- a/doc/environ.sh.sample +++ b/doc/environ.sh.sample @@ -17,7 +17,12 @@ export KOS_ARCH="dreamcast" # "pristine" - a normal Dreamcast console or HKT-0120 devkit # "navi" - a Dreamcast with the navi mod applied to it # "naomi" - a NAOMI or NAOMI 2 arcade board -export KOS_SUBARCH="pristine" +# You can also pre-define it in eg the build config of your IDE +if [ -z "${KOS_SUBARCH}" ] ; then + export KOS_SUBARCH="pristine" +else + export KOS_SUBARCH +fi # KOS main base path export KOS_BASE="/opt/toolchains/dc/kos" hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2021-06-19 00:39:56
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 8a8efb7aee698605b0f230ed9641f5bbc22d04e0 (commit) via a9728519f8a7e6c63f39636fa105b7739e823992 (commit) from eda687f373dbc489b235f6536883c20471e0b882 (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 8a8efb7aee698605b0f230ed9641f5bbc22d04e0 Merge: eda687f a972851 Author: Lawrence Sebald <ljs...@us...> Date: Fri Jun 18 20:39:32 2021 -0400 Merge pull request #56 from Tchan0/NaomiNetBootUsage naominetboot.c: call usage() commit a9728519f8a7e6c63f39636fa105b7739e823992 Author: Tchan0 <617...@us...> Date: Fri Jun 18 20:52:28 2021 +0200 call usage() usage() is defined but not called yet ----------------------------------------------------------------------- Summary of changes: utils/naominetboot/naominetboot.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/naominetboot/naominetboot.c b/utils/naominetboot/naominetboot.c index 983e64b..1b97107 100644 --- a/utils/naominetboot/naominetboot.c +++ b/utils/naominetboot/naominetboot.c @@ -295,6 +295,11 @@ int main(int argc, char *argv[]) { memset(&naomi_addr, 0, sizeof(struct sockaddr_in)); + if(argc < 5) { + usage(argv[0]); + exit(EXIT_FAILURE); + } + /* Parse arguments. */ while((c = getopt(argc, argv, ":t:x:a")) != -1) { switch(c) { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2021-05-04 00:45:08
|
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 eda687f373dbc489b235f6536883c20471e0b882 (commit) via 29929ddfd50e073d9633c589a899b60bc345fc1c (commit) from 2b200fb8aa4c37f259c5837a6fec13ca4bd966ef (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 eda687f373dbc489b235f6536883c20471e0b882 Merge: 2b200fb 29929dd Author: Lawrence Sebald <ljs...@us...> Date: Mon May 3 20:44:40 2021 -0400 Merge pull request #52 from 7dog123/master Fix download of ARM binutils version if it is different from SH binutils version. commit 29929ddfd50e073d9633c589a899b60bc345fc1c Author: 7dog123 <fut...@gm...> Date: Mon May 3 11:34:40 2021 -0500 Binutils arm will now properly be downloaded. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/download.sh | 2 +- utils/dc-chain/scripts/common.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/dc-chain/download.sh b/utils/dc-chain/download.sh index 34b0870..1541dc8 100755 --- a/utils/dc-chain/download.sh +++ b/utils/dc-chain/download.sh @@ -77,7 +77,7 @@ if [ -z "${CONFIG_GUESS_ONLY}" ]; then download "Newlib" "$NEWLIB_VER" "$NEWLIB_URL" # Downloading ARM components - download "Binutils" $ARM_BINUTILS_VER"" "$ARM_BINUTILS_URL" + download "Binutils" "$ARM_BINUTILS_VER" "$ARM_BINUTILS_URL" download "GCC" "$ARM_GCC_VER" "$ARM_GCC_URL" download_dependencies "arm" fi diff --git a/utils/dc-chain/scripts/common.sh b/utils/dc-chain/scripts/common.sh index 68f2256..baf75db 100755 --- a/utils/dc-chain/scripts/common.sh +++ b/utils/dc-chain/scripts/common.sh @@ -63,7 +63,7 @@ export SH_GCC_URL=ftp.gnu.org/gnu/gcc/gcc-${SH_GCC_VER}/gcc-${SH_GCC_VER}.tar.${ export NEWLIB_URL=sourceware.org/pub/newlib/newlib-${NEWLIB_VER}.tar.${NEWLIB_TARBALL_TYPE} export GDB_URL=ftp.gnu.org/gnu/gdb/gdb-${GDB_VER}.tar.${GDB_TARBALL_TYPE} export INSIGHT_URL=mirrors.kernel.org/sourceware/insight/releases/insight-${INSIGHT_VER}a.tar.${INSIGHT_TARBALL_TYPE} -export ARM_BINUTILS_URL=ftp.gnu.org/gnu/binutils/binutils-${SH_BINUTILS_VER}.tar.${SH_BINUTILS_TARBALL_TYPE} +export ARM_BINUTILS_URL=ftp.gnu.org/gnu/binutils/binutils-${ARM_BINUTILS_VER}.tar.${ARM_BINUTILS_TARBALL_TYPE} export ARM_GCC_URL=ftp.gnu.org/gnu/gcc/gcc-${ARM_GCC_VER}/gcc-${ARM_GCC_VER}.tar.${ARM_GCC_TARBALL_TYPE} export DOWNLOAD_PROTOCOL="`get_make_var download_protocol`://" hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2021-04-30 21:36:28
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 2b200fb8aa4c37f259c5837a6fec13ca4bd966ef (commit) via 69d64eedf007fd56b24ee5192218e9cd3df9eaa8 (commit) via d9fff77cd4cb9e3cd6998c8c4a5e24f225cac9f1 (commit) from 057d05fe4f2b6fc3e2c93215d3b83c871ae4e23c (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 2b200fb8aa4c37f259c5837a6fec13ca4bd966ef Merge: 057d05f 69d64ee Author: Lawrence Sebald <ljs...@us...> Date: Fri Apr 30 17:35:42 2021 -0400 Merge pull request #51 from KallistiOS/pvr-buffer-bugfix Pvr buffer bugfix commit 69d64eedf007fd56b24ee5192218e9cd3df9eaa8 Author: Luke Benstead <ka...@gm...> Date: Fri Apr 30 20:43:43 2021 +0100 Clean up commit d9fff77cd4cb9e3cd6998c8c4a5e24f225cac9f1 Author: Luke Benstead <ka...@gm...> Date: Fri Apr 30 20:43:35 2021 +0100 Correctly set addresses for all lists ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c b/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c index 6b2ffaf..0178bdf 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c @@ -149,6 +149,7 @@ up and placed at 0x000000 and 0x400000. */ #define BUF_ALIGN 128 #define BUF_ALIGN_MASK (BUF_ALIGN - 1) +#define APPLY_ALIGNMENT(addr) (((addr) + BUF_ALIGN_MASK) & ~BUF_ALIGN_MASK) void pvr_allocate_buffers(pvr_init_params_t *params) { volatile pvr_ta_buffers_t *buf; @@ -242,23 +243,24 @@ void pvr_allocate_buffers(pvr_init_params_t *params) { buf->vertex_size = params->vertex_buf_size; outaddr += buf->vertex_size; /* N-byte align */ - outaddr = (outaddr + BUF_ALIGN_MASK) & ~BUF_ALIGN_MASK; + outaddr = APPLY_ALIGNMENT(outaddr); /* Object Pointer Buffers */ buf->opb = outaddr; buf->opb_size = opb_total_size; - outaddr += opb_total_size; /* Set up the opb pointers to each section */ opb_size_accum = 0; for(j = 0; j < PVR_OPB_COUNT; j++) { buf->opb_addresses[j] = buf->opb + opb_size_accum; - opb_size_accum += pvr_state.opb_size[j]; + opb_size_accum += pvr_state.opb_size[j] * pvr_state.tw * pvr_state.th; } + assert(buf->opb_size == opb_size_accum); + /* N-byte align */ - outaddr = (outaddr + BUF_ALIGN_MASK) & ~BUF_ALIGN_MASK; + outaddr = APPLY_ALIGNMENT(outaddr); /* Tile Matrix */ buf->tile_matrix = outaddr; @@ -266,7 +268,7 @@ void pvr_allocate_buffers(pvr_init_params_t *params) { outaddr += buf->tile_matrix_size; /* N-byte align */ - outaddr = (outaddr + BUF_ALIGN_MASK) & ~BUF_ALIGN_MASK; + outaddr = APPLY_ALIGNMENT(outaddr); /* Output buffer */ fbuf->frame = outaddr; @@ -274,7 +276,7 @@ void pvr_allocate_buffers(pvr_init_params_t *params) { outaddr += fbuf->frame_size; /* N-byte align */ - outaddr = (outaddr + BUF_ALIGN_MASK) & ~BUF_ALIGN_MASK; + outaddr = APPLY_ALIGNMENT(outaddr); } /* Texture ram is whatever is left */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2021-04-24 17:47:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 057d05fe4f2b6fc3e2c93215d3b83c871ae4e23c (commit) via 5945b261ca3d5d981e321bbb670d7e682cbebb0f (commit) from 525cbdac17317acfc2e4937e2efd7b99c85e73a3 (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 057d05fe4f2b6fc3e2c93215d3b83c871ae4e23c Merge: 525cbda 5945b26 Author: Lawrence Sebald <ljs...@us...> Date: Sat Apr 24 13:47:09 2021 -0400 Merge pull request #50 from KallistiOS/pvr-buffers-fix Fix vram wastage in pvr buffer alloc code due to an error in the tile⦠commit 5945b261ca3d5d981e321bbb670d7e682cbebb0f Author: Luke Benstead <ka...@gm...> Date: Mon Apr 19 17:16:58 2021 +0100 Fix vram wastage in pvr buffer alloc code due to an error in the tile matrix setup ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c | 103 +++++++++++++--------- kernel/arch/dreamcast/hardware/pvr/pvr_internal.h | 3 +- 2 files changed, 62 insertions(+), 44 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c b/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c index 3730493..6b2ffaf 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c @@ -20,27 +20,43 @@ */ + +/* There's quite a bit of byte vs word conversion in this file + * these macros just help make that more readable */ +#define BYTES_TO_WORDS(x) ((x) >> 2) +#define WORDS_TO_BYTES(x) ((x) << 2) + +#define IS_ALIGNED(x, m) ((x) % (m) == 0) + +#define LIST_ENABLED(i) (pvr_state.lists_enabled & (1 << i)) + + /* Fill Tile Matrix buffers. This function takes a base address and sets up the rendering structures there. Each tile of the screen (32x32) receives a small buffer space. */ static void pvr_init_tile_matrix(int which, int presort) { volatile pvr_ta_buffers_t *buf; - int x, y; - uint32 *vr; - volatile int *opbs; + int x, y, tn; + uint32 *vr; /* Note: We're working in 4-byte pointer maths in this function */ + volatile int *opb_sizes; //uint32 matbase, opbbase; vr = (uint32*)PVR_RAM_BASE; buf = pvr_state.ta_buffers + which; - opbs = pvr_state.opb_size; + opb_sizes = pvr_state.opb_size; #if 0 matbase = buf->tile_matrix; opbbase = buf->opb; #endif + /* + FIXME? Is this header necessary? If we're moving the tilematrix + register to after it, how does the Dreamcast know this is here? + */ + /* Header of zeros */ - vr += buf->tile_matrix / 4; + vr += BYTES_TO_WORDS(buf->tile_matrix); for(x = 0; x < 0x48; x += 4) * vr++ = 0; @@ -54,6 +70,9 @@ static void pvr_init_tile_matrix(int which, int presort) { vr[5] = 0x80000000; vr += 6; + /* Must skip over zeroed header for actual usage */ + buf->tile_matrix += 0x48; + /* Now the main tile matrix */ #if 0 dbglog(DBG_KDEBUG, " Using poly buffers %08lx/%08lx/%08lx/%08lx/%08lx\r\n", @@ -64,33 +83,45 @@ static void pvr_init_tile_matrix(int which, int presort) { buf->opb_type[4]); #endif /* !NDEBUG */ + /* + This sets up the addresses for each list, for each tile in the + memory we allocate in pvr_allocate_buffers. If a list isn't enabled + for a tile, then we set the address to 0x80000000 which tells the PVR + to ignore it. + + Memory for each frame is arranged sort-of like this: + + [vertex_buffer | object pointer buffers | tilematrix header | tile matrix] + + This is the tile matrix setup. + */ + for(x = 0; x < pvr_state.tw; x++) { for(y = 0; y < pvr_state.th; y++) { + tn = (pvr_state.tw * y) + x; + /* Control word */ vr[0] = (y << 8) | (x << 2) | (presort << 29); /* Opaque poly buffer */ - vr[1] = buf->opb_type[0] + opbs[0] * pvr_state.tw * y + opbs[0] * x; + vr[1] = LIST_ENABLED(0) ? buf->opb_addresses[0] + (opb_sizes[0] * tn) : 0x80000000; /* Opaque volume mod buffer */ - vr[2] = buf->opb_type[1] + opbs[1] * pvr_state.tw * y + opbs[1] * x; + vr[2] = LIST_ENABLED(1) ? buf->opb_addresses[1] + (opb_sizes[1] * tn) : 0x80000000; /* Translucent poly buffer */ - vr[3] = buf->opb_type[2] + opbs[2] * pvr_state.tw * y + opbs[2] * x; + vr[3] = LIST_ENABLED(2) ? buf->opb_addresses[2] + (opb_sizes[2] * tn) : 0x80000000; /* Translucent volume mod buffer */ - vr[4] = buf->opb_type[3] + opbs[3] * pvr_state.tw * y + opbs[3] * x; + vr[4] = LIST_ENABLED(3) ? buf->opb_addresses[3] + (opb_sizes[3] * tn) : 0x80000000; /* Punch-thru poly buffer */ - vr[5] = buf->opb_type[4] + opbs[4] * pvr_state.tw * y + opbs[4] * x; + vr[5] = LIST_ENABLED(4) ? buf->opb_addresses[4] + (opb_sizes[4] * tn) : 0x80000000; vr += 6; } } vr[-6] |= 1 << 31; - - /* Must skip over zeroed header for actual usage */ - buf->tile_matrix += 0x48; } /* Fill all tile matrices */ @@ -118,11 +149,12 @@ up and placed at 0x000000 and 0x400000. */ #define BUF_ALIGN 128 #define BUF_ALIGN_MASK (BUF_ALIGN - 1) + void pvr_allocate_buffers(pvr_init_params_t *params) { volatile pvr_ta_buffers_t *buf; volatile pvr_frame_buffers_t *fbuf; int i, j; - uint32 outaddr, polybuf, sconst, polybuf_alloc; + uint32 outaddr, sconst, opb_size_accum, opb_total_size; /* Set screen sizes; pvr_init has ensured that we have a valid mode and all that by now, so we can freely dig into the vid_mode @@ -138,7 +170,7 @@ void pvr_allocate_buffers(pvr_init_params_t *params) { /* We can actually handle non-mod-32 heights pretty easily -- just extend the frame buffer a bit, but use a pixel clip for the real mode. */ - if((pvr_state.h % 32) != 0) { + if(!IS_ALIGNED(pvr_state.h, 32)) { pvr_state.h = (pvr_state.h + 32) & ~31; pvr_state.th++; } @@ -157,13 +189,14 @@ void pvr_allocate_buffers(pvr_init_params_t *params) { /* Look at active lists and figure out how much to allocate for each poly type */ - polybuf = 0; + opb_total_size = 0; pvr_state.list_reg_mask = 1 << 20; for(i = 0; i < PVR_OPB_COUNT; i++) { - pvr_state.opb_size[i] = params->opb_sizes[i] * 4; /* in bytes */ - pvr_state.opb_ind[i] = pvr_state.opb_size[i] * pvr_state.tw * pvr_state.th; - polybuf += pvr_state.opb_ind[i]; + pvr_state.opb_size[i] = WORDS_TO_BYTES(params->opb_sizes[i]); /* in bytes */ + + /* Calculate the total size of the OPBs for this list */ + opb_total_size += pvr_state.opb_size[i] * pvr_state.tw * pvr_state.th; switch(params->opb_sizes[i]) { case PVR_BINSIZE_0: @@ -208,36 +241,28 @@ void pvr_allocate_buffers(pvr_init_params_t *params) { buf->vertex = outaddr; buf->vertex_size = params->vertex_buf_size; outaddr += buf->vertex_size; - /* N-byte align */ outaddr = (outaddr + BUF_ALIGN_MASK) & ~BUF_ALIGN_MASK; /* Object Pointer Buffers */ - /* XXX What the heck is this 0x50580 magic value?? All I - remember about it is that removing it makes it fail. */ - buf->opb_size = 0x50580 + polybuf; - outaddr += buf->opb_size; - // buf->poly_buf_size = (outaddr - polybuf) - buf->vertex; - polybuf_alloc = buf->opb = outaddr - polybuf; + buf->opb = outaddr; + buf->opb_size = opb_total_size; + outaddr += opb_total_size; + + /* Set up the opb pointers to each section */ + opb_size_accum = 0; for(j = 0; j < PVR_OPB_COUNT; j++) { - if(pvr_state.opb_size[j] > 0) { - buf->opb_type[j] = polybuf_alloc; - polybuf_alloc += pvr_state.opb_ind[j]; - } - else { - buf->opb_type[j] = 0x80000000; - } + buf->opb_addresses[j] = buf->opb + opb_size_accum; + opb_size_accum += pvr_state.opb_size[j]; } - outaddr += buf->opb_size; /* Do we _really_ need this twice? */ - /* N-byte align */ outaddr = (outaddr + BUF_ALIGN_MASK) & ~BUF_ALIGN_MASK; /* Tile Matrix */ buf->tile_matrix = outaddr; - buf->tile_matrix_size = (18 + 6 * pvr_state.tw * pvr_state.th) * 4; + buf->tile_matrix_size = WORDS_TO_BYTES(18 + 6 * pvr_state.tw * pvr_state.th); outaddr += buf->tile_matrix_size; /* N-byte align */ @@ -275,12 +300,6 @@ void pvr_allocate_buffers(pvr_init_params_t *params) { } dbglog(DBG_KDEBUG, " list_mask %08lx\n", pvr_state.list_reg_mask); - dbglog(DBG_KDEBUG, " opb sizes per type: %08lx/%08lx/%08lx/%08lx/%08lx\n", - pvr_state.opb_ind[0], - pvr_state.opb_ind[1], - pvr_state.opb_ind[2], - pvr_state.opb_ind[3], - pvr_state.opb_ind[4]); dbglog(DBG_KDEBUG, " w/h = %d/%d, tw/th = %d/%d\n", pvr_state.w, pvr_state.h, pvr_state.tw, pvr_state.th); dbglog(DBG_KDEBUG, " zclip %08lx\n", *((uint32*)&pvr_state.zclip)); diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_internal.h b/kernel/arch/dreamcast/hardware/pvr/pvr_internal.h index bd5e041..a25eb17 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_internal.h +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_internal.h @@ -124,7 +124,7 @@ typedef struct { uint32 vertex, vertex_size; /* Vertex buffer */ uint32 opb, opb_size; /* Object pointer buffers, size */ - uint32 opb_type[PVR_OPB_COUNT]; /* Object pointer buffers (of each type) */ + uint32 opb_addresses[PVR_OPB_COUNT]; /* Object pointer buffers (of each type) */ uint32 tile_matrix, tile_matrix_size; /* Tile matrix, size */ } pvr_ta_buffers_t; @@ -153,7 +153,6 @@ typedef struct { uint32 list_reg_mask; // Active lists register mask int dma_mode; // 1 if we are using DMA to transfer vertices int opb_size[PVR_OPB_COUNT]; // opb size flags - uint32 opb_ind[PVR_OPB_COUNT]; // Individual opb sizes (in bytes) // Pipeline state int ram_target; // RAM buffer we're writing into hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-10-07 23:45: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 fae2358ca346842f3f4d36237be3994fe6135139 (commit) from 380b73bb62327dfca14f2c139886bddeb819d3ba (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 fae2358ca346842f3f4d36237be3994fe6135139 Author: Lawrence Sebald <ljs...@us...> Date: Wed Oct 7 19:45:19 2020 -0400 Add user data to the sound stream structure and an accessor/mutator for it. ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 1 + kernel/arch/dreamcast/include/dc/sound/stream.h | 27 ++++++++++++++++++++++++- kernel/arch/dreamcast/sound/snd_stream.c | 16 +++++++++++++-- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 1d5905d..87282da 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -134,6 +134,7 @@ KallistiOS version 2.1.0 ----------------------------------------------- - NAO Added naominetboot - a tool to upload NAOMI formatted binaries to a NetDIMM board for executing on the NAOMI [LS] - DC Prevent double-initialization of Maple devices from breaking things [LS] +- DC Add a user data pointer to snd_stream [LS] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] diff --git a/kernel/arch/dreamcast/include/dc/sound/stream.h b/kernel/arch/dreamcast/include/dc/sound/stream.h index 70556c1..2df47c1 100644 --- a/kernel/arch/dreamcast/include/dc/sound/stream.h +++ b/kernel/arch/dreamcast/include/dc/sound/stream.h @@ -2,6 +2,7 @@ dc/sound/stream.h Copyright (C) 2002, 2004 Dan Potter + Copyright (C) 2020 Lawrence Sebald */ @@ -14,6 +15,8 @@ to worry about that yourself (or use something in kos-ports). \author Dan Potter + \author Florian Schulze + \author Lawrence Sebald */ #ifndef __DC_SOUND_STREAM_H @@ -68,6 +71,29 @@ typedef void *(*snd_stream_callback_t)(snd_stream_hnd_t hnd, int smp_req, */ void snd_stream_set_callback(snd_stream_hnd_t hnd, snd_stream_callback_t cb); +/** \brief Set the user data for a given stream. + + This function sets the user data pointer for the given stream, overwriting + any existing one that may have been in place. This is designed to allow the + user the ability to associate a piece of data with the stream for instance + to assist in identifying what sound is playing on a stream. The driver does + not attempt to use this data in any way. + + \param hnd The stream handle to look up. + \param cb A pointer to the user data. +*/ +void snd_stream_set_userdata(snd_stream_hnd_t hnd, void *d); + +/** \brief Get the user data for a given stream. + + This function retrieves the set user data pointer for a given stream. + + \param handle The stream handle to look up. + \return The user data pointer set for this stream or NULL + if no data pointer has been set. +*/ +void *snd_stream_get_userdata(snd_stream_hnd_t hnd); + /* Add an effect filter to the sound stream chain. When the stream buffer filler needs more data, it starts out by calling the initial callback (set above). It then calls each function in the effect @@ -255,4 +281,3 @@ void snd_stream_volume(snd_stream_hnd_t hnd, int vol); __END_DECLS #endif /* __DC_SOUND_STREAM_H */ - diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 314460e..c2ae83b 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -3,6 +3,7 @@ snd_stream.c Copyright (C) 2000, 2001, 2002, 2003, 2004 Dan Potter Copyright (C) 2002 Florian Schulze + Copyright (C) 2020 Lawrence Sebald SH-4 support routines for SPU streaming sound driver */ @@ -77,6 +78,9 @@ typedef struct strchan { /* Have we been initialized yet? (and reserved a buffer, etc) */ volatile int initted; + + /* User data. */ + void *user_data; } strchan_t; // Our stream structs @@ -100,6 +104,16 @@ void snd_stream_set_callback(snd_stream_hnd_t hnd, snd_stream_callback_t cb) { streams[hnd].get_data = cb; } +void snd_stream_set_userdata(snd_stream_hnd_t hnd, void *d) { + CHECK_HND(hnd); + streams[hnd].user_data = d; +} + +void *snd_stream_get_userdata(snd_stream_hnd_t hnd) { + CHECK_HND(hnd); + return streams[hnd].user_data; +} + void snd_stream_filter_add(snd_stream_hnd_t hnd, snd_stream_filter_t filtfunc, void * obj) { filter_t * f; @@ -549,5 +563,3 @@ void snd_stream_volume(snd_stream_hnd_t hnd, int vol) { cmd->cmd_id = streams[hnd].ch[1]; snd_sh4_to_aica(tmp, cmd->size); } - - hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-10-04 15:09:23
|
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 380b73bb62327dfca14f2c139886bddeb819d3ba (commit) from 166ac5706d78617f45eb7601bfef2277708a1653 (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 380b73bb62327dfca14f2c139886bddeb819d3ba Author: Lawrence Sebald <ljs...@us...> Date: Sun Oct 4 11:09:04 2020 -0400 Fix crash caused by double-initting maple devices. ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 1 + kernel/arch/dreamcast/hardware/maple/controller.c | 6 ++-- kernel/arch/dreamcast/hardware/maple/dreameye.c | 4 ++- kernel/arch/dreamcast/hardware/maple/keyboard.c | 36 ++++++++++++----------- kernel/arch/dreamcast/hardware/maple/lightgun.c | 4 ++- kernel/arch/dreamcast/hardware/maple/mouse.c | 4 ++- kernel/arch/dreamcast/hardware/maple/purupuru.c | 4 ++- kernel/arch/dreamcast/hardware/maple/sip.c | 4 ++- kernel/arch/dreamcast/hardware/maple/vmu.c | 4 ++- 9 files changed, 42 insertions(+), 25 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index e2a5483..1d5905d 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -133,6 +133,7 @@ KallistiOS version 2.1.0 ----------------------------------------------- binaries and renamed it to naomibintool [LS] - NAO Added naominetboot - a tool to upload NAOMI formatted binaries to a NetDIMM board for executing on the NAOMI [LS] +- DC Prevent double-initialization of Maple devices from breaking things [LS] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] diff --git a/kernel/arch/dreamcast/hardware/maple/controller.c b/kernel/arch/dreamcast/hardware/maple/controller.c index 4fc7cc7..0a9f28e 100644 --- a/kernel/arch/dreamcast/hardware/maple/controller.c +++ b/kernel/arch/dreamcast/hardware/maple/controller.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## controller.c - (C)2002 Dan Potter + Copyright (C) 2002 Dan Potter */ @@ -108,7 +108,9 @@ static maple_driver_t controller_drv = { /* Add the controller to the driver chain */ int cont_init() { - return maple_driver_reg(&controller_drv); + if(!controller_drv.drv_list.le_prev) + return maple_driver_reg(&controller_drv); + return -1; } void cont_shutdown() { diff --git a/kernel/arch/dreamcast/hardware/maple/dreameye.c b/kernel/arch/dreamcast/hardware/maple/dreameye.c index d76cd90..9e6058e 100644 --- a/kernel/arch/dreamcast/hardware/maple/dreameye.c +++ b/kernel/arch/dreamcast/hardware/maple/dreameye.c @@ -431,7 +431,9 @@ static maple_driver_t dreameye_drv = { /* Add the Dreameye to the driver chain */ int dreameye_init() { - return maple_driver_reg(&dreameye_drv); + if(!dreameye_drv.drv_list.le_prev) + return maple_driver_reg(&dreameye_drv); + return -1; } void dreameye_shutdown() { diff --git a/kernel/arch/dreamcast/hardware/maple/keyboard.c b/kernel/arch/dreamcast/hardware/maple/keyboard.c index 5af52c0..329ab81 100644 --- a/kernel/arch/dreamcast/hardware/maple/keyboard.c +++ b/kernel/arch/dreamcast/hardware/maple/keyboard.c @@ -22,10 +22,10 @@ repeat handling. */ -/* These are global timings for key repeat. It would be possible to put - them in the state, but I don't see a reason to. - It seems unreasonable that one might want different repeat - timings set on each keyboard. +/* These are global timings for key repeat. It would be possible to put + them in the state, but I don't see a reason to. + It seems unreasonable that one might want different repeat + timings set on each keyboard. The values are arbitrary based off a survey of common values. */ uint16 kbd_repeat_start = 600, kbd_repeat_interval = 20; @@ -458,25 +458,25 @@ static void kbd_check_poll(maple_frame_t *frm) { state->kbd_repeat_key = KBD_KEY_NONE; state->kbd_repeat_timer = 0; } - + /* Update modifiers and LEDs */ state->shift_keys = cond->modifiers; mods = cond->modifiers | (cond->leds << 8); /* Process all pressed keys */ for(i = 0; i < MAX_PRESSED_KEYS; i++) { - + /* Once we get to a 'none', the rest will be 'none' */ if (cond->keys[i] == KBD_KEY_NONE){ - /* This could be used to indicate how many keys are pressed by setting it to ~i or i+1 + /* This could be used to indicate how many keys are pressed by setting it to ~i or i+1 or similar. This could be useful, but would make it a weird exception. */ - /* If the first key in the key array is none, there are no non-modifer keys pressed at all. */ - if (i==0)state->matrix[KBD_KEY_NONE] = KEY_STATE_PRESSED; + /* If the first key in the key array is none, there are no non-modifer keys pressed at all. */ + if (i==0)state->matrix[KBD_KEY_NONE] = KEY_STATE_PRESSED; break; } /* Between None and A are error indicators. This would be a good place to do... something. If an error occurs the whole array will be error.*/ else if (cond->keys[i]>KBD_KEY_NONE && cond->keys[i]<KBD_KEY_A) { - state->matrix[cond->keys[i]] = KEY_STATE_PRESSED; + state->matrix[cond->keys[i]] = KEY_STATE_PRESSED; break; } /* The rest of the keys are treated normally */ @@ -497,7 +497,7 @@ static void kbd_check_poll(maple_frame_t *frm) { if(time >= (state->kbd_repeat_timer)){ kbd_enqueue(state, cond->keys[i], mods); state->kbd_repeat_timer = time + kbd_repeat_interval; - } + } } } else assert_msg(0, "invalid key matrix array detected"); @@ -506,15 +506,15 @@ static void kbd_check_poll(maple_frame_t *frm) { /* Now normalize the key matrix */ /* If it was determined no keys are pressed, wipe the matrix */ - if (state->matrix[KBD_KEY_NONE] == KEY_STATE_PRESSED) + if (state->matrix[KBD_KEY_NONE] == KEY_STATE_PRESSED) memset (state->matrix, KEY_STATE_NONE, MAX_KBD_KEYS); /* Otherwise, walk through the whole matrix */ else { for(i = 0; i < MAX_KBD_KEYS; i++) { if (state->matrix[i] == KEY_STATE_NONE) continue; - + else if (state->matrix[i] == KEY_STATE_WAS_PRESSED) state->matrix[i] = KEY_STATE_NONE; - + else if (state->matrix[i] == KEY_STATE_PRESSED) state->matrix[i] = KEY_STATE_WAS_PRESSED; else assert_msg(0, "invalid key matrix array detected"); } @@ -584,7 +584,7 @@ static int kbd_attach(maple_driver_t *drv, maple_device_t *dev) { are on each device. The only one above the keyboard function is lightgun. Only if it is ALSO a lightgun, will the keyboard function be second. */ if(dev->info.functions&MAPLE_FUNC_LIGHTGUN) d = 1; - + /* Retrieve the region data */ state->region = dev->info.function_data[d] & 0xFF; @@ -594,7 +594,7 @@ static int kbd_attach(maple_driver_t *drv, maple_device_t *dev) { /* Make sure all the queue variables are set up properly... */ state->queue_tail = state->queue_head = state->queue_len = 0; - + /* Make sure all the key repeat variables are set up properly too */ state->kbd_repeat_key = KBD_KEY_NONE; state->kbd_repeat_timer = 0; @@ -613,7 +613,9 @@ static maple_driver_t kbd_drv = { /* Add the keyboard to the driver chain */ int kbd_init() { - return maple_driver_reg(&kbd_drv); + if(!kbd_drv.drv_list.le_prev) + return maple_driver_reg(&kbd_drv); + return -1; } void kbd_shutdown() { diff --git a/kernel/arch/dreamcast/hardware/maple/lightgun.c b/kernel/arch/dreamcast/hardware/maple/lightgun.c index 59fa018..6f7cd2a 100644 --- a/kernel/arch/dreamcast/hardware/maple/lightgun.c +++ b/kernel/arch/dreamcast/hardware/maple/lightgun.c @@ -27,7 +27,9 @@ static maple_driver_t lightgun_drv = { /* Add the lightgun to the driver chain */ int lightgun_init(void) { - return maple_driver_reg(&lightgun_drv); + if(!lightgun_drv.drv_list.le_prev) + return maple_driver_reg(&lightgun_drv); + return -1; } void lightgun_shutdown(void) { diff --git a/kernel/arch/dreamcast/hardware/maple/mouse.c b/kernel/arch/dreamcast/hardware/maple/mouse.c index 9a4bea4..cd86fbc 100644 --- a/kernel/arch/dreamcast/hardware/maple/mouse.c +++ b/kernel/arch/dreamcast/hardware/maple/mouse.c @@ -80,7 +80,9 @@ static maple_driver_t mouse_drv = { /* Add the mouse to the driver chain */ int mouse_init() { - return maple_driver_reg(&mouse_drv); + if(!mouse_drv.drv_list.le_prev) + return maple_driver_reg(&mouse_drv); + return -1; } void mouse_shutdown() { diff --git a/kernel/arch/dreamcast/hardware/maple/purupuru.c b/kernel/arch/dreamcast/hardware/maple/purupuru.c index 41fd5ff..935f415 100644 --- a/kernel/arch/dreamcast/hardware/maple/purupuru.c +++ b/kernel/arch/dreamcast/hardware/maple/purupuru.c @@ -121,7 +121,9 @@ static maple_driver_t purupuru_drv = { /* Add the purupuru to the driver chain */ int purupuru_init() { - return maple_driver_reg(&purupuru_drv); + if(!purupuru_drv.drv_list.le_prev) + return maple_driver_reg(&purupuru_drv); + return -1; } void purupuru_shutdown() { diff --git a/kernel/arch/dreamcast/hardware/maple/sip.c b/kernel/arch/dreamcast/hardware/maple/sip.c index 7bcab0d..18c2368 100644 --- a/kernel/arch/dreamcast/hardware/maple/sip.c +++ b/kernel/arch/dreamcast/hardware/maple/sip.c @@ -298,7 +298,9 @@ static maple_driver_t sip_drv = { /* Add the SIP to the driver chain */ int sip_init() { - return maple_driver_reg(&sip_drv); + if(!sip_drv.drv_list.le_prev) + return maple_driver_reg(&sip_drv); + return -1; } void sip_shutdown() { diff --git a/kernel/arch/dreamcast/hardware/maple/vmu.c b/kernel/arch/dreamcast/hardware/maple/vmu.c index 0089c3b..5e3050f 100644 --- a/kernel/arch/dreamcast/hardware/maple/vmu.c +++ b/kernel/arch/dreamcast/hardware/maple/vmu.c @@ -40,7 +40,9 @@ static maple_driver_t vmu_drv = { /* Add the VMU to the driver chain */ int vmu_init() { - return maple_driver_reg(&vmu_drv); + if(!vmu_drv.drv_list.le_prev) + return maple_driver_reg(&vmu_drv); + return -1; } void vmu_shutdown() { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-09-23 02:38:31
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 166ac5706d78617f45eb7601bfef2277708a1653 (commit) from 65d7af35aae0b331591bbb0dc724217485a880ed (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 166ac5706d78617f45eb7601bfef2277708a1653 Author: Lawrence Sebald <ljs...@us...> Date: Tue Sep 22 22:38:02 2020 -0400 Add banner.h to the .gitignore. ----------------------------------------------------------------------- Summary of changes: .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f9ade36..8f23fd5 100644 --- a/.gitignore +++ b/.gitignore @@ -12,10 +12,10 @@ romdisk.img kernel/stubs/*.c kernel/exports/kernel_exports.c kernel/arch/dreamcast/kernel/arch_exports.c +kernel/arch/dreamcast/kernel/banner.h lib/dreamcast/*.a addons/lib/dreamcast/*.a utils/bincnv/bincnv -utils/gba-crcfix/gba-crcfix utils/genromfs/genromfs utils/vqenc/vqenc utils/wav2adpcm/wav2adpcm hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-09-23 02:27:33
|
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 65d7af35aae0b331591bbb0dc724217485a880ed (commit) from 168b67940c9111179a51c3ce7deb33d9afbf971d (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 65d7af35aae0b331591bbb0dc724217485a880ed Author: Lawrence Sebald <ljs...@us...> Date: Tue Sep 22 22:27:13 2020 -0400 Fix kern_version generation on git revisions. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/kernel/make_banner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/arch/dreamcast/kernel/make_banner.sh b/kernel/arch/dreamcast/kernel/make_banner.sh index 248a12f..218d805 100755 --- a/kernel/arch/dreamcast/kernel/make_banner.sh +++ b/kernel/arch/dreamcast/kernel/make_banner.sh @@ -44,7 +44,7 @@ printf ';\n' >> banner.h printf 'static const char kern_version[] = \n"' >> banner.h -if [ -n "$gitrev" ]; then +if [ -z "$gitrev" ]; then printf "$relver" >> banner.h else printf "${gitrev#?}" >> banner.h hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-09-22 21:06:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 168b67940c9111179a51c3ce7deb33d9afbf971d (commit) via 4d0b220186d5a84954276b69462663a928fbb095 (commit) via d62f4d92845b3f7028e1cbb21c65a761f2dd94db (commit) via 7b41c90d5b5ae7b11ac4d54d3fcc8cb2d1d13aa2 (commit) from 76f197a96250ad7b52cf543817b56536bddf368a (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 168b67940c9111179a51c3ce7deb33d9afbf971d Merge: 76f197a 4d0b220 Author: Lawrence Sebald <ljs...@us...> Date: Tue Sep 22 17:05:41 2020 -0400 Merge pull request #49 from sizious/dc-chain-config-mk-update dc-chain: Provide multiple example configuration files for the build. commit 4d0b220186d5a84954276b69462663a928fbb095 Author: SiZiOUS <si...@gm...> Date: Tue Sep 22 22:24:51 2020 +0200 Wording: Renaming 'edge' to 'testing' commit d62f4d92845b3f7028e1cbb21c65a761f2dd94db Author: SiZiOUS <si...@gm...> Date: Tue Sep 22 22:11:06 2020 +0200 Improvements on the 'config.mk' handling. - The 'config.mk' file should be created by the user, like the 'environ.sh.sample' file for KOS. - 2 templates are provided, an 'edge' supplying GCC 9.3.0 and a 'stable' supplying GCC 4.7.4. - Dockerfiles were updated. - Documentation was updated to reflect this change. - Several fail-safes has been put in place for checking the 'config.mk' file presence. commit 7b41c90d5b5ae7b11ac4d54d3fcc8cb2d1d13aa2 Merge: ce33885 76f197a Author: SiZiOUS <si...@gm...> Date: Tue Sep 22 21:06:52 2020 +0200 Merge pull request #1 from KallistiOS/master Update Sync 20200922 ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/.gitignore | 1 + utils/dc-chain/Makefile | 9 +++- utils/dc-chain/README.md | 48 ++++++++++++++-------- .../{config.mk => config.mk.stable.sample} | 26 ++++++------ .../{config.mk => config.mk.testing.sample} | 0 utils/dc-chain/doc/bsd/README.md | 7 +--- utils/dc-chain/doc/cygwin/README.md | 7 +--- utils/dc-chain/doc/linux/alpine.md | 7 +--- utils/dc-chain/doc/linux/debian.md | 7 +--- utils/dc-chain/doc/macos/README.md | 7 +--- utils/dc-chain/doc/mingw/mingw-w64.md | 7 +--- utils/dc-chain/doc/mingw/mingw.md | 7 +--- utils/dc-chain/docker/README.md | 4 +- utils/dc-chain/docker/stable/Dockerfile | 6 ++- .../dc-chain/docker/{stable => testing}/Dockerfile | 6 ++- utils/dc-chain/scripts/common.sh | 6 +++ 16 files changed, 81 insertions(+), 74 deletions(-) copy utils/dc-chain/{config.mk => config.mk.stable.sample} (95%) rename utils/dc-chain/{config.mk => config.mk.testing.sample} (100%) copy utils/dc-chain/docker/{stable => testing}/Dockerfile (79%) diff --git a/utils/dc-chain/.gitignore b/utils/dc-chain/.gitignore index 01041b6..835f45d 100644 --- a/utils/dc-chain/.gitignore +++ b/utils/dc-chain/.gitignore @@ -8,3 +8,4 @@ insight-* build-* *.stamp config.guess +config.mk diff --git a/utils/dc-chain/Makefile b/utils/dc-chain/Makefile index 09c1ac5..75e8c0d 100644 --- a/utils/dc-chain/Makefile +++ b/utils/dc-chain/Makefile @@ -5,7 +5,7 @@ # Initially adapted from Stalin's build script version 0.3. # -# Please edit 'config.mk' to customize your 'dc-chain' setup. +# Please create/edit 'config.mk' to customize your 'dc-chain' setup. # # Display startup banner @@ -13,7 +13,12 @@ include scripts/banner-variables.mk include scripts/banner.mk # User configuration -include config.mk +config_file=config.mk +ifneq ("$(wildcard $(config_file))","") + include $(config_file) +else + $(error The required $(config_file) file is missing) +endif # Detect host machine include scripts/host-detect.mk diff --git a/utils/dc-chain/README.md b/utils/dc-chain/README.md index 269fb01..619ba8e 100644 --- a/utils/dc-chain/README.md +++ b/utils/dc-chain/README.md @@ -63,14 +63,18 @@ If you need help on this step, everything is described in the `./doc` directory. ## Configuration -The recommended settings are already set but if you want to tweak your setup, -feel free to open the `config.mk` file in your favorite editor. +In order to allow `dc-chain` to work, you'll need to provide a `config.mk` file. +This file will contain the settings used for making the toolchains. -Please find below every parameter available in the `config.mk` file. +You may create this `config.mk` file from scratch or use a provided template +as base. + +Please find below every parameter available in the `config.mk` file and more +information about `config.mk` templates. ### Toolchains components -All component's version of the toolchains are declared in the `config.mk` file. +All component's versions of the toolchains are declared in the `config.mk` file. For the `sh-elf` toolchain, they are: @@ -86,19 +90,27 @@ For the `arm-eabi` toolchain, they are: - `arm_gcc_ver` Speaking about the best versions of the components to use for the Dreamcast -development, they are already set in the `config.mk` file. This is particularly -true for **GCC** and **Newlib** as these components are patched to compile with -**KallistiOS**. For **Binutils** or **GDB**, you may in theory use the latest -available versions without problems. +development, this is a very critical point. Indeed, **GCC** and **Newlib** +versions are core components; they are patched to compile with **KallistiOS**. +For **Binutils** or **GDB**, you may in theory use the latest available versions +without problems. -Well tested **GCC** and **Newlib** version combinations are: +Working **GCC** and **Newlib** version combinations are: - GCC `9.3.0` with Newlib `3.3.0` for `sh-elf` and GCC `8.4.0` for `arm-eabi` - (edge; default values in `config.mk`); -- GCC `4.7.4` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (stable; the most - well tested combination, [some issues may happen in C++](https://dcemulation.org/phpBB/viewtopic.php?f=29&t=104724)); -- GCC `4.7.3` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (stable; previous - version, [some issues may happen in C++](https://dcemulation.org/phpBB/viewtopic.php?f=29&t=104724)). + (**testing**; the most modern combination); +- GCC `4.7.4` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (**stable**; the + most well tested combination, [some issues may happen in C++](https://dcemulation.org/phpBB/viewtopic.php?f=29&t=104724)); +- GCC `4.7.3` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (**old-stable**; + previous version, [some issues may happen in C++](https://dcemulation.org/phpBB/viewtopic.php?f=29&t=104724)). + +To help you on this, 2 `config.mk` templates are provided with `dc-chain`: + +- `config.mk.testing.sample` (testing); +- `config.mk.stable.sample` (stable). + +Just copy the relevant `config.mk` sample file to `config.mk` and you are good +to go. **Note:** The GCC's maximum version number possible for the `arm-eabi` toolchain is `8.4.0`. Support of the **ARM7** chip is dropped after that GCC version. So @@ -116,7 +128,7 @@ extensions you want to download too; this may be useful if a package changes its extension on the servers. For example, for GCC `4.7.4`, there is no `xz` tarball file, so you may change this to `gz`. -**Note:** All download url are computed in the `scripts/common.sh` file, but +**Note:** All download URL are computed in the `scripts/common.sh` file, but you shouldn't update/change this. ### Toolchains base @@ -153,7 +165,7 @@ inside the `config.mk` to set the number of jobs for the building phases. Set the `makejobs` variable in the `config.mk` to whatever you would normally feel the need to use on the command line, and it will do the right thing. -In the old times, this option may breaks things, so, if you run into trouble, +In the old times, this option may break things, so, if you run into trouble, you should clear this variable and try again with just one job running (i.e. `makejobs=`). @@ -267,8 +279,8 @@ This will save a lot of space by removing all unnecessary files. ## Final note Please see the comments at the top of the `config.mk` file for more build -options. For example if something goes wrong, you may restart the compilation -of the bogus step only rather than running the whole process again. +options. For example, if something goes wrong, you may restart the compilation +of the problematic step only rather than running the whole process again. Interesting targets (you can `make` any of these): diff --git a/utils/dc-chain/config.mk b/utils/dc-chain/config.mk.stable.sample similarity index 95% copy from utils/dc-chain/config.mk copy to utils/dc-chain/config.mk.stable.sample index d79bbf5..0b34d65 100644 --- a/utils/dc-chain/config.mk +++ b/utils/dc-chain/config.mk.stable.sample @@ -19,14 +19,14 @@ # Toolchain versions for SH sh_binutils_ver=2.34 -sh_gcc_ver=9.3.0 -newlib_ver=3.3.0 +sh_gcc_ver=4.7.4 +newlib_ver=2.0.0 gdb_ver=9.2 insight_ver=6.8-1 # Tarball extensions to download for SH sh_binutils_tarball_type=xz -sh_gcc_tarball_type=xz +sh_gcc_tarball_type=bz2 newlib_tarball_type=gz gdb_tarball_type=xz insight_tarball_type=bz2 @@ -35,11 +35,11 @@ insight_tarball_type=bz2 # The ARM version of binutils/gcc is separated out as the particular CPU # versions we need may not be available in newer versions of GCC. arm_binutils_ver=2.34 -arm_gcc_ver=8.4.0 +arm_gcc_ver=4.7.4 # Tarball extensions to download for ARM arm_binutils_tarball_type=xz -arm_gcc_tarball_type=xz +arm_gcc_tarball_type=bz2 # GCC custom dependencies # Specify here if you want to use custom GMP, MPFR and MPC libraries as they are @@ -55,10 +55,10 @@ arm_gcc_tarball_type=xz # only if the 'use_custom_dependencies' flag is set to '1'. # GCC dependencies for SH -sh_gmp_ver=6.1.0 -sh_mpfr_ver=3.1.4 -sh_mpc_ver=1.0.3 -sh_isl_ver=0.18 +sh_gmp_ver=4.3.2 +sh_mpfr_ver=2.4.2 +sh_mpc_ver=0.8.1 +#sh_isl_ver=0.18 # Tarball extensions to download for GCC dependencies for SH sh_gmp_tarball_type=bz2 @@ -67,10 +67,10 @@ sh_mpc_tarball_type=gz sh_isl_tarball_type=bz2 # GCC dependencies for ARM -arm_gmp_ver=6.1.0 -arm_mpfr_ver=3.1.4 -arm_mpc_ver=1.0.3 -arm_isl_ver=0.18 +arm_gmp_ver=4.3.2 +arm_mpfr_ver=2.4.2 +arm_mpc_ver=0.8.1 +#arm_isl_ver=0.18 # Tarball extensions to download for GCC dependencies for ARM arm_gmp_tarball_type=bz2 diff --git a/utils/dc-chain/config.mk b/utils/dc-chain/config.mk.testing.sample similarity index 100% rename from utils/dc-chain/config.mk rename to utils/dc-chain/config.mk.testing.sample diff --git a/utils/dc-chain/doc/bsd/README.md b/utils/dc-chain/doc/bsd/README.md index 1bd2bf9..877e717 100644 --- a/utils/dc-chain/doc/bsd/README.md +++ b/utils/dc-chain/doc/bsd/README.md @@ -78,11 +78,8 @@ Everything is ready, now it's time to make the toolchains. toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/doc/cygwin/README.md b/utils/dc-chain/doc/cygwin/README.md index 36d2c7a..082ce54 100644 --- a/utils/dc-chain/doc/cygwin/README.md +++ b/utils/dc-chain/doc/cygwin/README.md @@ -95,11 +95,8 @@ Everything is ready, now it's time to make the toolchains. toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/doc/linux/alpine.md b/utils/dc-chain/doc/linux/alpine.md index 1adc67f..003e200 100644 --- a/utils/dc-chain/doc/linux/alpine.md +++ b/utils/dc-chain/doc/linux/alpine.md @@ -68,11 +68,8 @@ Everything is ready, now it's time to make the toolchains. toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/doc/linux/debian.md b/utils/dc-chain/doc/linux/debian.md index 346d36a..b341609 100644 --- a/utils/dc-chain/doc/linux/debian.md +++ b/utils/dc-chain/doc/linux/debian.md @@ -68,11 +68,8 @@ Everything is ready, now it's time to make the toolchains. toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/doc/macos/README.md b/utils/dc-chain/doc/macos/README.md index adeb276..5783923 100644 --- a/utils/dc-chain/doc/macos/README.md +++ b/utils/dc-chain/doc/macos/README.md @@ -96,11 +96,8 @@ Everything is ready, now it's time to make the toolchains. toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/doc/mingw/mingw-w64.md b/utils/dc-chain/doc/mingw/mingw-w64.md index bcef7da..d7deeb0 100644 --- a/utils/dc-chain/doc/mingw/mingw-w64.md +++ b/utils/dc-chain/doc/mingw/mingw-w64.md @@ -106,11 +106,8 @@ Everything is ready, now it's time to make the toolchains. toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/doc/mingw/mingw.md b/utils/dc-chain/doc/mingw/mingw.md index d8b0e58..7dd0882 100644 --- a/utils/dc-chain/doc/mingw/mingw.md +++ b/utils/dc-chain/doc/mingw/mingw.md @@ -171,11 +171,8 @@ Basically, if you just plan to use the **MinGW/MSYS** environment through the toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/docker/README.md b/utils/dc-chain/docker/README.md index 23cbe90..ed14587 100644 --- a/utils/dc-chain/docker/README.md +++ b/utils/dc-chain/docker/README.md @@ -24,5 +24,5 @@ building them can take hours and don't change often. Of course, the Docker image produced here can be used for CI/CD pipelines! Don't hesitate to have multiple `config.mk` files; this may be useful for -building customized toolchains (e.g. a `stable` Docker image with `gcc-9.3.0` -and a `legacy` one with `gcc-4.7.4`...). +building customized toolchains (e.g. a `testing` Docker image with `gcc-9.3.0` +and a `stable` one with `gcc-4.7.4`...). diff --git a/utils/dc-chain/docker/stable/Dockerfile b/utils/dc-chain/docker/stable/Dockerfile index 51cd19f..87ccdb1 100644 --- a/utils/dc-chain/docker/stable/Dockerfile +++ b/utils/dc-chain/docker/stable/Dockerfile @@ -1,5 +1,5 @@ # -# Dockerfile for Sega Dreamcast Toolchains Maker (dc-chain) +# Dockerfile for Sega Dreamcast Toolchains Maker (dc-chain): Stable # # Stage 1 @@ -27,7 +27,9 @@ RUN apk --update add --no-cache \ # You may adapt the KallistiOS repository URL if needed RUN mkdir -p /opt/toolchains/dc \ && git clone https://git.code.sf.net/p/cadcdev/kallistios /opt/toolchains/dc/kos \ - && cd /opt/toolchains/dc/kos/utils/dc-chain && ./download.sh && ./unpack.sh && make && make gdb \ + && cd /opt/toolchains/dc/kos/utils/dc-chain + && cp config.mk.stable.sample config.mk + && ./download.sh && ./unpack.sh && make && make gdb \ && rm -rf /opt/toolchains/dc/kos # Stage 2 diff --git a/utils/dc-chain/docker/stable/Dockerfile b/utils/dc-chain/docker/testing/Dockerfile similarity index 79% copy from utils/dc-chain/docker/stable/Dockerfile copy to utils/dc-chain/docker/testing/Dockerfile index 51cd19f..a6469b7 100644 --- a/utils/dc-chain/docker/stable/Dockerfile +++ b/utils/dc-chain/docker/testing/Dockerfile @@ -1,5 +1,5 @@ # -# Dockerfile for Sega Dreamcast Toolchains Maker (dc-chain) +# Dockerfile for Sega Dreamcast Toolchains Maker (dc-chain): Testing # # Stage 1 @@ -27,7 +27,9 @@ RUN apk --update add --no-cache \ # You may adapt the KallistiOS repository URL if needed RUN mkdir -p /opt/toolchains/dc \ && git clone https://git.code.sf.net/p/cadcdev/kallistios /opt/toolchains/dc/kos \ - && cd /opt/toolchains/dc/kos/utils/dc-chain && ./download.sh && ./unpack.sh && make && make gdb \ + && cd /opt/toolchains/dc/kos/utils/dc-chain + && cp config.mk.testing.sample config.mk + && ./download.sh && ./unpack.sh && make && make gdb \ && rm -rf /opt/toolchains/dc/kos # Stage 2 diff --git a/utils/dc-chain/scripts/common.sh b/utils/dc-chain/scripts/common.sh index e1b119f..68f2256 100755 --- a/utils/dc-chain/scripts/common.sh +++ b/utils/dc-chain/scripts/common.sh @@ -34,6 +34,12 @@ function print_banner() printf "*** ${var} Utility for ${banner_text} ***\n\n" } +# Check for config.mk +if [ ! -f "config.mk" ]; then + echo >&2 "The required config.mk file was not found!" + exit 1 +fi + export CONFIG_GUESS="config.guess" export SH_BINUTILS_VER=`get_make_var sh_binutils_ver` hooks/post-receive -- A pseudo Operating System for the Dreamcast. |