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
(17) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Lawrence S. <ljs...@us...> - 2020-06-11 04:59:37
|
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 ee7ee4578a57d429cca99db78889921e7d0d3bfe (commit) via 1e009f7507f1b4275875c97c80049e04d161eb9f (commit) via fe8d07afcaef7bafa8f0207f106674f738b9f3f1 (commit) via 12b78a0768bc66778ecef2e656283df25c3457c7 (commit) from d1543f541ff355cec9ad59bb3aebcc3a3acebb76 (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 ee7ee4578a57d429cca99db78889921e7d0d3bfe Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 11 00:59:18 2020 -0400 Update CHANGELOG. commit 1e009f7507f1b4275875c97c80049e04d161eb9f Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 11 00:52:44 2020 -0400 Add minifont to the examples to be built in video. commit fe8d07afcaef7bafa8f0207f106674f738b9f3f1 Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 11 00:52:28 2020 -0400 Add simple minifont example. commit 12b78a0768bc66778ecef2e656283df25c3457c7 Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 11 00:44:48 2020 -0400 Remove reference to lwIP from hello example. ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 8 +++-- examples/dreamcast/hello/hello.c | 6 ++-- examples/dreamcast/video/Makefile | 4 ++- .../{keyboard/keytest => video/minifont}/Makefile | 6 ++-- examples/dreamcast/video/minifont/minifont.c | 37 ++++++++++++++++++++++ 5 files changed, 51 insertions(+), 10 deletions(-) copy examples/dreamcast/{keyboard/keytest => video/minifont}/Makefile (77%) create mode 100644 examples/dreamcast/video/minifont/minifont.c diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 114b275..fb4f966 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -104,9 +104,13 @@ KallistiOS version 2.1.0 ----------------------------------------------- - NAO Added preliminary support for compiling to target the NAOMI and NAOMI 2 arcade systems with a NetDIMM board attached [LS] - NAO Added a simple utility to parse NetDIMM binary header data [LS] -- DC Fixed aica crash when volume is set to 255 [AB == Andress Barajas] -- DC Put a cap on the amount of samples requested by AICA so we don't get a +- DC Fixed AICA crash when volume is set to 255 [AB == Andress Barajas] +- DC Placed a cap on the amount of samples requested by AICA so we don't get a Buffer overflow [AB] +- DC Added a very simple minifont and an example of its use [LS] +- NAO Added a NAOMI-specific version of fb_console using minifont [LS] +- NAO Cleaned up the build process to not build certain parts of the DC hardware + support that are either not useful or not (yet?) functional on NAOMI [LS] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] diff --git a/examples/dreamcast/hello/hello.c b/examples/dreamcast/hello/hello.c index 9ead12b..65a2297 100644 --- a/examples/dreamcast/hello/hello.c +++ b/examples/dreamcast/hello/hello.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## hello.c - (c)2001 Dan Potter + Copyright (C) 2001 Dan Potter */ #include <kos.h> @@ -16,7 +16,7 @@ extern uint8 romdisk[]; INIT_NONE -- don't do any auto init INIT_IRQ -- Enable IRQs INIT_THD_PREEMPT -- Enable pre-emptive threading - INIT_NET -- Enable networking (doesn't imply lwIP!) + INIT_NET -- Enable networking (including sockets) INIT_MALLOCSTATS -- Enable a call to malloc_stats() right before shutdown You can OR any or all of those together. If you want to start out with @@ -33,5 +33,3 @@ int main(int argc, char **argv) { return 0; } - - diff --git a/examples/dreamcast/video/Makefile b/examples/dreamcast/video/Makefile index a0d8fcf..035ab27 100644 --- a/examples/dreamcast/video/Makefile +++ b/examples/dreamcast/video/Makefile @@ -7,12 +7,14 @@ all: $(KOS_MAKE) -C bfont $(KOS_MAKE) -C palmenu + $(KOS_MAKE) -C minifont clean: $(KOS_MAKE) -C bfont clean $(KOS_MAKE) -C palmenu clean + $(KOS_MAKE) -C minifont clean dist: $(KOS_MAKE) -C bfont dist $(KOS_MAKE) -C palmenu dist - + $(KOS_MAKE) -C minifont dist diff --git a/examples/dreamcast/keyboard/keytest/Makefile b/examples/dreamcast/video/minifont/Makefile similarity index 77% copy from examples/dreamcast/keyboard/keytest/Makefile copy to examples/dreamcast/video/minifont/Makefile index 0692e64..bff92f3 100644 --- a/examples/dreamcast/keyboard/keytest/Makefile +++ b/examples/dreamcast/video/minifont/Makefile @@ -1,10 +1,10 @@ # KallistiOS ##version## # -# examples/dreamcast/keyboard/keytest/Makefile +# video/minifont/Makefile # -TARGET = keytest.elf -OBJS = keytest.o +OBJS = minifont.o +TARGET = minifont.elf all: rm-elf $(TARGET) diff --git a/examples/dreamcast/video/minifont/minifont.c b/examples/dreamcast/video/minifont/minifont.c new file mode 100644 index 0000000..b37a12d --- /dev/null +++ b/examples/dreamcast/video/minifont/minifont.c @@ -0,0 +1,37 @@ +/* KallistiOS ##version## + + minifont.c + Copyright (C) 2020 Lawrence Sebald + + This is just a very quick and simple example of the minifont functionality. + There's really not much to see here, to be perfectly honest, except for how + simple it really is to use... +*/ + +#include <dc/video.h> +#include <dc/minifont.h> +#include <kos/thread.h> + +int main(int argc, char **argv) { + int x, y, o; + + /* Draw a pattern on the screen. */ + for(y = 0; y < 480; y++) { + for(x = 0; x < 640; x++) { + int c = (x ^ y) & 255; + vram_s[y * 640 + x] = ((c >> 3) << 12) + | ((c >> 2) << 5) + | ((c >> 3) << 0); + } + } + + o = 20 * 640 + 20; + + /* Write the requisite line. */ + minifont_draw_str(vram_s + o, 640, "Hello, World!"); + + /* Pause to see the results */ + thd_sleep(10 * 1000); + + return 0; +} hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-06-11 03:23:37
|
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 d1543f541ff355cec9ad59bb3aebcc3a3acebb76 (commit) from e52380c54ffca72358d622f7b852c75a527178b1 (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 d1543f541ff355cec9ad59bb3aebcc3a3acebb76 Author: Lawrence Sebald <ljs...@us...> Date: Wed Jun 10 23:23:09 2020 -0400 Add fb_console_naomi, which uses minifont to draw dbgio to the framebuffer. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/kernel/init.c | 3 ++- kernel/arch/dreamcast/util/Makefile | 2 ++ .../util/{fb_console.c => fb_console_naomi.c} | 26 ++++++++++++---------- 3 files changed, 18 insertions(+), 13 deletions(-) copy kernel/arch/dreamcast/util/{fb_console.c => fb_console_naomi.c} (81%) diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index f878f7a..e52c3ae 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -47,7 +47,8 @@ dbgio_handler_t * dbgio_handlers[] = { &dbgio_null, &dbgio_fb #else - &dbgio_null + &dbgio_null, + &dbgio_fb #endif }; int dbgio_handler_cnt = sizeof(dbgio_handlers) / sizeof(dbgio_handler_t *); diff --git a/kernel/arch/dreamcast/util/Makefile b/kernel/arch/dreamcast/util/Makefile index 5628834..e09d8bd 100644 --- a/kernel/arch/dreamcast/util/Makefile +++ b/kernel/arch/dreamcast/util/Makefile @@ -9,6 +9,8 @@ SUBDIRS = ifneq ($(KOS_SUBARCH), naomi) OBJS += fb_console.o +else + OBJS += fb_console_naomi.o endif include $(KOS_BASE)/Makefile.prefab diff --git a/kernel/arch/dreamcast/util/fb_console.c b/kernel/arch/dreamcast/util/fb_console_naomi.c similarity index 81% copy from kernel/arch/dreamcast/util/fb_console.c copy to kernel/arch/dreamcast/util/fb_console_naomi.c index 745ddf2..75b33b8 100644 --- a/kernel/arch/dreamcast/util/fb_console.c +++ b/kernel/arch/dreamcast/util/fb_console_naomi.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## - util/fb_console.c - Copyright (C) 2009 Lawrence Sebald + util/fb_console_naomi.c + Copyright (C) 2009, 2020 Lawrence Sebald */ @@ -10,29 +10,31 @@ #include <kos/dbgio.h> #include <kos/string.h> #include <dc/fb_console.h> -#include <dc/biosfont.h> #include <dc/video.h> +#include <dc/minifont.h> -/* This is a very simple dbgio interface for doing debug to the framebuffer with - the biosfont functionality. Basically, this was written to aid in debugging - the network stack, and I figured other people would probably get some use out - of it as well. */ +/* This is a modified version of fb_console to use a built-in font, rather + than trying to use the romfont. I haven't yet figured out if the NAOMI has + an accessible romfont or where it is, so this is the substitute. */ static uint16 *fb; static int fb_w, fb_h; static int cur_x, cur_y; static int min_x, min_y, max_x, max_y; -#define FONT_CHAR_WIDTH 12 -#define FONT_CHAR_HEIGHT 24 +#define FONT_CHAR_WIDTH 8 +#define FONT_CHAR_HEIGHT 16 + +#define FONT_CHARS_PER_LINE 32 +#define FONT_LINES 3 +#define FONT_WIDTH 256 +#define FONT_HEIGHT 48 static int fb_detected() { return 1; } static int fb_init() { - bfont_set_encoding(BFONT_CODE_ISO8859_1); - /* Assume we're using 640x480x16bpp */ fb = NULL; fb_w = 640; @@ -68,7 +70,7 @@ static int fb_write(int c) { t = vram_s; if(c != '\n') { - bfont_draw(t + cur_y * fb_w + cur_x, fb_w, 1, c); + minifont_draw(t + cur_y * fb_w + cur_x, fb_w, c); cur_x += FONT_CHAR_WIDTH; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-06-11 03:07:10
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via e52380c54ffca72358d622f7b852c75a527178b1 (commit) from c62f4d699d928b4d2fc020f28442ec944c6dadad (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 e52380c54ffca72358d622f7b852c75a527178b1 Author: Lawrence Sebald <ljs...@us...> Date: Wed Jun 10 23:06:52 2020 -0400 Add public header for minifont. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/include/dc/minifont.h | 57 +++++++++++++++++++++++++++++ kernel/arch/dreamcast/util/minifont.c | 1 + kernel/arch/dreamcast/util/minifont.h | 18 +++++++-- 3 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 kernel/arch/dreamcast/include/dc/minifont.h diff --git a/kernel/arch/dreamcast/include/dc/minifont.h b/kernel/arch/dreamcast/include/dc/minifont.h new file mode 100644 index 0000000..8e85b73 --- /dev/null +++ b/kernel/arch/dreamcast/include/dc/minifont.h @@ -0,0 +1,57 @@ +/* KallistiOS ##version## + + dc/minifont.h + Copyright (C) 2020 Lawrence Sebald + +*/ + +/** \file dc/minifont.h + \brief Simple font drawing functions. + + This file provides support for utilizing the "Naomi" font that is included + in the KOS source code (in the utils/minifont.h file). This was designed for + use when you really just want a *very* simple font to draw with. + + Only ASCII characters are usable here. No other fancy encodings are + supported, nor are any extended ASCII characters beyond the 7-bit range. + Also, only 16-bit buffers (like what you would normally have for the + framebuffer) are currently supported. + + \author Lawrence Sebald +*/ + +#ifndef __DC_MINIFONT_H +#define __DC_MINIFONT_H + +#include <kos/cdefs.h> +__BEGIN_DECLS + +#include <arch/types.h> + +/** \brief Draw a single character to a buffer. + + This function draws a single character to the given buffer. + + \param buffer The buffer to draw to (at least 8 x 16 pixels) + \param bufwidth The width of the buffer in pixels + \param c The character to draw + \return Amount of width covered in 16-bit increments. +*/ +int minifont_draw(uint16 *buffer, uint32 bufwidth, uint32 c); + +/** \brief Draw a full string to any sort of buffer. + + This function draws a NUL-terminated string to the given buffer. Only + standard ASCII encoded strings are supported (no extended ASCII, ANSI, + Unicode, JIS, EUC, etc). + + \param b The buffer to draw to. + \param width The width of the buffer in pixels. + \param str The string to draw. + \return Amount of width covered in 16-bit increments. +*/ +int minifont_draw_str(uint16 *b, uint32 bufwidth, const char *str); + +__END_DECLS + +#endif /* __DC_MINIFONT_H */ diff --git a/kernel/arch/dreamcast/util/minifont.c b/kernel/arch/dreamcast/util/minifont.c index 07325e3..0cc3b13 100644 --- a/kernel/arch/dreamcast/util/minifont.c +++ b/kernel/arch/dreamcast/util/minifont.c @@ -6,6 +6,7 @@ */ #include <string.h> +#include <dc/minifont.h> #include "minifont.h" #define CHAR_WIDTH 8 diff --git a/kernel/arch/dreamcast/util/minifont.h b/kernel/arch/dreamcast/util/minifont.h index f162f66..93a199f 100644 --- a/kernel/arch/dreamcast/util/minifont.h +++ b/kernel/arch/dreamcast/util/minifont.h @@ -1,3 +1,18 @@ +/* KallistiOS ##version## + + util/minifont.h + Copyright (C) 2020 Lawrence Sebald + +*/ + +/* This file defines a very simple 1bpp font called "Naomi" that I designed for + use when you just don't want to (or can't) use the biosfont. It's called + Naomi because, well, it was specifically put to use there first of all for + my early debugging with it. + + Only ASCII characters 33-126 are present here. Each one taking up 16 bytes + of the data. Each character is 8x16 pixels in size. */ + static const int minifont_size = 1504; static const unsigned char minifont_data[1504] = { 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, @@ -189,6 +204,3 @@ static const unsigned char minifont_data[1504] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x51, 0x8a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; - -int minifont_draw(uint16 *buffer, uint32 bufwidth, uint32 c); -int minifont_draw_str(uint16 *buffer, uint32 bufwidth, const char *str); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-06-11 02:33:07
|
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 c62f4d699d928b4d2fc020f28442ec944c6dadad (commit) via bc06a21351b868c654a3a76484fa9fdfae249978 (commit) from ff76e28d68ac374e485c9cf6f60032f6158e5a69 (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 c62f4d699d928b4d2fc020f28442ec944c6dadad Author: Lawrence Sebald <ljs...@us...> Date: Wed Jun 10 22:32:34 2020 -0400 Don't build things on naomi that we don't need and fix the exports to not cause naomi compile errors. commit bc06a21351b868c654a3a76484fa9fdfae249978 Author: Lawrence Sebald <ljs...@us...> Date: Wed Jun 10 22:29:16 2020 -0400 Fix drawing with minifont. ----------------------------------------------------------------------- Summary of changes: kernel/Makefile | 4 +--- .../dreamcast/{exports.txt => exports-naomi.txt} | 26 ---------------------- .../{exports.txt => exports-pristine.txt} | 0 kernel/arch/dreamcast/hardware/Makefile | 17 +++++++++----- kernel/arch/dreamcast/kernel/Makefile | 4 ++-- kernel/arch/dreamcast/kernel/init.c | 4 +++- kernel/arch/dreamcast/util/minifont.c | 8 +++---- 7 files changed, 21 insertions(+), 42 deletions(-) copy kernel/arch/dreamcast/{exports.txt => exports-naomi.txt} (90%) rename kernel/arch/dreamcast/{exports.txt => exports-pristine.txt} (100%) diff --git a/kernel/Makefile b/kernel/Makefile index 1eba879..e36822a 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -19,7 +19,7 @@ all: subdirs $(STUBS) stubs/kernel_export_stubs.c: exports.txt $(KOS_BASE)/utils/genexports/genexportstubs.sh $< stubs/kernel_export_stubs.c -stubs/arch_export_stubs.c: arch/$(KOS_ARCH)/exports.txt +stubs/arch_export_stubs.c: arch/$(KOS_ARCH)/exports-$(KOS_SUBARCH).txt $(KOS_BASE)/utils/genexports/genexportstubs.sh $< stubs/arch_export_stubs.c include $(KOS_BASE)/Makefile.prefab @@ -30,5 +30,3 @@ clean: clean_subdirs rm -f stubs/*.o stubs/kernel_export_stubs.c stubs/arch_export_stubs.c run: - - diff --git a/kernel/arch/dreamcast/exports.txt b/kernel/arch/dreamcast/exports-naomi.txt similarity index 90% copy from kernel/arch/dreamcast/exports.txt copy to kernel/arch/dreamcast/exports-naomi.txt index 5ad5e7e..801001b 100644 --- a/kernel/arch/dreamcast/exports.txt +++ b/kernel/arch/dreamcast/exports-naomi.txt @@ -60,31 +60,6 @@ vid_screen_shot vmu_pkg_build vmu_pkg_parse -# Bios Font -bfont_set_encoding -bfont_draw_thin -bfont_draw_wide -bfont_draw -bfont_draw_str - -# CD-Rom -cdrom_reinit -cdrom_read_toc -cdrom_read_sectors -cdrom_locate_data_track -cdrom_cdda_play -cdrom_cdda_pause -cdrom_cdda_resume -cdrom_spin_down - -# FlashRom -flashrom_info -flashrom_read -flashrom_write -flashrom_delete -flashrom_get_syscfg -flashrom_get_region - # SPU spu_memload spu_memread @@ -247,4 +222,3 @@ mat_rotate_z mat_rotate mat_perspective mat_lookat - diff --git a/kernel/arch/dreamcast/exports.txt b/kernel/arch/dreamcast/exports-pristine.txt similarity index 100% rename from kernel/arch/dreamcast/exports.txt rename to kernel/arch/dreamcast/exports-pristine.txt diff --git a/kernel/arch/dreamcast/hardware/Makefile b/kernel/arch/dreamcast/hardware/Makefile index d8110eb..6442bfb 100644 --- a/kernel/arch/dreamcast/hardware/Makefile +++ b/kernel/arch/dreamcast/hardware/Makefile @@ -8,7 +8,9 @@ OBJS = hardware.o # BIOS services -OBJS += biosfont.o cdrom.o flashrom.o +ifneq ($(KOS_SUBARCH), naomi) + OBJS += biosfont.o cdrom.o flashrom.o +endif # Sound OBJS += spu.o spudma.o @@ -26,11 +28,14 @@ OBJS += sq.o scif.o OBJS += scif-spi.o sd.o # G1 Bus ATA support -OBJS += g1ata.o - -SUBDIRS = pvr network maple modem - -include $(KOS_BASE)/Makefile.prefab +ifneq ($(KOS_SUBARCH), naomi) + OBJS += g1ata.o +endif +SUBDIRS = pvr maple +ifneq ($(KOS_SUBARCH), naomi) + SUBDIRS += network modem +endif +include $(KOS_BASE)/Makefile.prefab diff --git a/kernel/arch/dreamcast/kernel/Makefile b/kernel/arch/dreamcast/kernel/Makefile index 14c4245..b2d8b00 100644 --- a/kernel/arch/dreamcast/kernel/Makefile +++ b/kernel/arch/dreamcast/kernel/Makefile @@ -40,8 +40,8 @@ authors.h: make_authors.awk arch_exports.o: arch_exports.c -arch_exports.c: ../exports.txt - $(KOS_BASE)/utils/genexports/genexports.sh ../exports.txt arch_exports.c arch_symtab +arch_exports.c: ../exports-$(KOS_SUBARCH).txt + $(KOS_BASE)/utils/genexports/genexports.sh ../exports-$(KOS_SUBARCH).txt arch_exports.c arch_symtab clean: -rm -f banner.h authors.h diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index 7f3b9d8..f878f7a 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -44,9 +44,11 @@ dbgio_handler_t * dbgio_handlers[] = { &dbgio_dcload, &dbgio_dcls, &dbgio_scif, -#endif &dbgio_null, &dbgio_fb +#else + &dbgio_null +#endif }; int dbgio_handler_cnt = sizeof(dbgio_handlers) / sizeof(dbgio_handler_t *); diff --git a/kernel/arch/dreamcast/util/minifont.c b/kernel/arch/dreamcast/util/minifont.c index 0b51407..07325e3 100644 --- a/kernel/arch/dreamcast/util/minifont.c +++ b/kernel/arch/dreamcast/util/minifont.c @@ -19,15 +19,15 @@ int minifont_draw(uint16 *buffer, uint32 bufwidth, uint32 c) { uint16 *cur; if(c < 33 || c > 126) - return (CHAR_WIDTH / 8); + return CHAR_WIDTH; pos = (c - 33) * BYTES_PER_CHAR; for(i = 0; i < CHAR_HEIGHT; ++i) { cur = buffer; - for(j = 0; j < CHAR_WIDTH; ++j) { - byte = minifont_data[pos + j]; + for(j = 0; j < CHAR_WIDTH / 8; ++j) { + byte = minifont_data[pos + (i * (CHAR_WIDTH / 8)) + j]; for(k = 0; k < 8; ++k) { if(byte & (1 << (7 - k))) @@ -40,7 +40,7 @@ int minifont_draw(uint16 *buffer, uint32 bufwidth, uint32 c) { buffer += bufwidth; } - return (CHAR_WIDTH / 8); + return CHAR_WIDTH; } int minifont_draw_str(uint16 *buffer, uint32 bufwidth, const char *str) { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-06-11 01:03: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 ff76e28d68ac374e485c9cf6f60032f6158e5a69 (commit) from c5e27069604dc95ff062a1d97ccb05f0dd760f63 (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 ff76e28d68ac374e485c9cf6f60032f6158e5a69 Author: Lawrence Sebald <ljs...@us...> Date: Wed Jun 10 21:02:57 2020 -0400 Add mini font for use when you really don't want the biosfont for some reason. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/util/Makefile | 12 ++- kernel/arch/dreamcast/util/minifont.c | 55 ++++++++++ kernel/arch/dreamcast/util/minifont.h | 194 ++++++++++++++++++++++++++++++++++ 3 files changed, 256 insertions(+), 5 deletions(-) create mode 100644 kernel/arch/dreamcast/util/minifont.c create mode 100644 kernel/arch/dreamcast/util/minifont.h diff --git a/kernel/arch/dreamcast/util/Makefile b/kernel/arch/dreamcast/util/Makefile index 7ad99ce..5628834 100644 --- a/kernel/arch/dreamcast/util/Makefile +++ b/kernel/arch/dreamcast/util/Makefile @@ -1,12 +1,14 @@ # KallistiOS ##version## # # arch/dreamcast/util/Makefile -# (c)2001 Dan Potter +# Copyright (C) 2001 Dan Potter # -OBJS = vmu_pkg.o screenshot.o fb_console.o -SUBDIRS = - -include $(KOS_BASE)/Makefile.prefab +OBJS = vmu_pkg.o screenshot.o minifont.o +SUBDIRS = +ifneq ($(KOS_SUBARCH), naomi) + OBJS += fb_console.o +endif +include $(KOS_BASE)/Makefile.prefab diff --git a/kernel/arch/dreamcast/util/minifont.c b/kernel/arch/dreamcast/util/minifont.c new file mode 100644 index 0000000..0b51407 --- /dev/null +++ b/kernel/arch/dreamcast/util/minifont.c @@ -0,0 +1,55 @@ +/* KallistiOS ##version## + + util/minifont.c + Copyright (C) 2020 Lawrence Sebald + +*/ + +#include <string.h> +#include "minifont.h" + +#define CHAR_WIDTH 8 +#define CHAR_HEIGHT 16 + +#define BYTES_PER_CHAR ((CHAR_WIDTH / 8) * CHAR_HEIGHT) + +int minifont_draw(uint16 *buffer, uint32 bufwidth, uint32 c) { + int pos, i, j, k; + uint8 byte; + uint16 *cur; + + if(c < 33 || c > 126) + return (CHAR_WIDTH / 8); + + pos = (c - 33) * BYTES_PER_CHAR; + + for(i = 0; i < CHAR_HEIGHT; ++i) { + cur = buffer; + + for(j = 0; j < CHAR_WIDTH; ++j) { + byte = minifont_data[pos + j]; + + for(k = 0; k < 8; ++k) { + if(byte & (1 << (7 - k))) + *cur++ = 0xFFFF; + else + ++cur; + } + } + + buffer += bufwidth; + } + + return (CHAR_WIDTH / 8); +} + +int minifont_draw_str(uint16 *buffer, uint32 bufwidth, const char *str) { + char c; + int adv = 0; + + while((c = *str++)) { + adv += minifont_draw(buffer + adv, bufwidth, c); + } + + return adv; +} diff --git a/kernel/arch/dreamcast/util/minifont.h b/kernel/arch/dreamcast/util/minifont.h new file mode 100644 index 0000000..f162f66 --- /dev/null +++ b/kernel/arch/dreamcast/util/minifont.h @@ -0,0 +1,194 @@ +static const int minifont_size = 1504; +static const unsigned char minifont_data[1504] = { + 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x36, 0x36, 0x12, 0x24, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x7e, 0x24, + 0x24, 0x7e, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x38, 0x54, 0x92, 0x90, 0x50, + 0x3c, 0x12, 0x92, 0x54, 0x38, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x54, 0x28, 0x08, + 0x10, 0x14, 0x2a, 0x24, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x10, + 0x28, 0x4a, 0x46, 0x44, 0x4c, 0x32, 0x00, 0x00, + 0x00, 0x18, 0x18, 0x08, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, + 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, + 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x54, 0x38, + 0x7c, 0x38, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, + 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x18, 0x08, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x38, 0x44, 0x82, 0x82, 0x86, 0x8a, 0x92, + 0xa2, 0xc2, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x50, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x42, 0x04, 0x04, 0x08, 0x08, + 0x10, 0x10, 0x20, 0x20, 0x40, 0x7e, 0x00, 0x00, + 0x00, 0x18, 0x24, 0x42, 0x02, 0x02, 0x04, 0x18, + 0x04, 0x02, 0x02, 0x42, 0x24, 0x18, 0x00, 0x00, + 0x00, 0x08, 0x48, 0x48, 0x48, 0x48, 0x7c, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, + 0x00, 0x7e, 0x40, 0x40, 0x40, 0x58, 0x64, 0x42, + 0x02, 0x02, 0x02, 0x42, 0x24, 0x18, 0x00, 0x00, + 0x00, 0x38, 0x44, 0x80, 0x80, 0x80, 0x80, 0xb8, + 0xc4, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, + 0x00, 0x7e, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, + 0x08, 0x10, 0x10, 0x20, 0x20, 0x20, 0x00, 0x00, + 0x00, 0x18, 0x24, 0x42, 0x42, 0x42, 0x24, 0x18, + 0x24, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00, 0x00, + 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x46, 0x3a, + 0x02, 0x02, 0x02, 0x02, 0x44, 0x38, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x18, 0x08, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, + 0x40, 0x20, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, + 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x10, 0x08, + 0x04, 0x08, 0x10, 0x20, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x18, 0x24, 0x42, 0x02, 0x04, 0x08, + 0x08, 0x08, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x38, 0x44, 0x82, 0x92, 0xaa, 0xaa, + 0xa4, 0x98, 0x80, 0x82, 0x44, 0x38, 0x00, 0x00, + 0x00, 0x10, 0x28, 0x28, 0x28, 0x28, 0x44, 0x44, + 0x7c, 0x44, 0x82, 0x82, 0x82, 0x82, 0x00, 0x00, + 0x00, 0xf8, 0x84, 0x82, 0x82, 0x82, 0x84, 0xf8, + 0x84, 0x82, 0x82, 0x82, 0x84, 0xf8, 0x00, 0x00, + 0x00, 0x38, 0x44, 0x82, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x82, 0x44, 0x38, 0x00, 0x00, + 0x00, 0xe0, 0x90, 0x88, 0x84, 0x84, 0x82, 0x82, + 0x82, 0x84, 0x84, 0x88, 0x90, 0xe0, 0x00, 0x00, + 0x00, 0xfe, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf8, + 0x80, 0x80, 0x80, 0x80, 0x80, 0xfe, 0x00, 0x00, + 0x00, 0xfe, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf8, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, + 0x00, 0x38, 0x44, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x8e, 0x84, 0x84, 0x84, 0x44, 0x38, 0x00, 0x00, + 0x00, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xfe, + 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x00, 0x00, + 0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, + 0x00, 0x3e, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x88, 0x88, 0x70, 0x00, 0x00, + 0x00, 0x82, 0x82, 0x84, 0x84, 0x88, 0x88, 0xf0, + 0x88, 0x88, 0x84, 0x84, 0x82, 0x82, 0x00, 0x00, + 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0xfe, 0x00, 0x00, + 0x00, 0x82, 0xc6, 0xaa, 0xaa, 0xaa, 0xaa, 0x92, + 0x92, 0x92, 0x82, 0x82, 0x82, 0x82, 0x00, 0x00, + 0x00, 0x82, 0xc2, 0xa2, 0xa2, 0x92, 0x92, 0x92, + 0x92, 0x8a, 0x8a, 0x8a, 0x86, 0x82, 0x00, 0x00, + 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, + 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, + 0x00, 0xf8, 0x84, 0x82, 0x82, 0x84, 0xf8, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, + 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, + 0x82, 0x82, 0x82, 0x8a, 0x44, 0x3a, 0x00, 0x00, + 0x00, 0xf8, 0x84, 0x82, 0x82, 0x84, 0xf8, 0xc0, + 0xa0, 0x90, 0x90, 0x88, 0x84, 0x82, 0x00, 0x00, + 0x00, 0x38, 0x44, 0x82, 0x80, 0x80, 0x40, 0x38, + 0x04, 0x02, 0x02, 0x82, 0x44, 0x38, 0x00, 0x00, + 0x00, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, + 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, + 0x00, 0x82, 0x82, 0x82, 0x44, 0x44, 0x44, 0x44, + 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x82, 0x82, 0x82, 0x82, 0x82, 0x92, 0x92, + 0x92, 0xaa, 0xaa, 0xaa, 0xc6, 0x82, 0x00, 0x00, + 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, + 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, 0x00, 0x00, + 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, + 0x00, 0xfe, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0xfe, 0x00, 0x00, + 0x00, 0x78, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x78, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x40, 0x20, 0x20, 0x10, + 0x10, 0x08, 0x08, 0x04, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x78, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, + 0x00, 0x40, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, + 0x26, 0x42, 0x42, 0x42, 0x26, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x58, + 0x64, 0x42, 0x42, 0x42, 0x64, 0x58, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, + 0x22, 0x40, 0x40, 0x40, 0x22, 0x1c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x1a, + 0x26, 0x42, 0x42, 0x42, 0x26, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x24, 0x42, 0x7c, 0x40, 0x22, 0x1c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x40, + 0x40, 0xf0, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, + 0x42, 0x42, 0x42, 0x26, 0x1a, 0x02, 0x44, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, + 0x58, 0x64, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x02, 0x42, 0x24, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x42, 0x44, + 0x48, 0x50, 0x70, 0x48, 0x44, 0x42, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, + 0x6a, 0x4a, 0x4a, 0x42, 0x42, 0x42, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, + 0x62, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, + 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, + 0x64, 0x42, 0x42, 0x64, 0x58, 0x40, 0x40, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, + 0x26, 0x42, 0x42, 0x26, 0x1a, 0x02, 0x02, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, + 0x62, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, + 0x42, 0x40, 0x3c, 0x02, 0x42, 0x3c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x78, + 0x20, 0x20, 0x20, 0x20, 0x22, 0x1c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, + 0x42, 0x42, 0x42, 0x42, 0x46, 0x3a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, + 0x42, 0x42, 0x24, 0x24, 0x24, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, + 0x42, 0x42, 0x52, 0x52, 0x52, 0x2c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, + 0x24, 0x24, 0x18, 0x24, 0x24, 0x42, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, + 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x44, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, + 0x04, 0x08, 0x10, 0x10, 0x20, 0x7e, 0x00, 0x00, + 0x00, 0x1c, 0x20, 0x40, 0x40, 0x20, 0x20, 0x40, + 0x20, 0x20, 0x40, 0x40, 0x20, 0x1c, 0x00, 0x00, + 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x70, 0x08, 0x04, 0x04, 0x08, 0x08, 0x04, + 0x08, 0x08, 0x04, 0x04, 0x08, 0x70, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x51, 0x8a, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +int minifont_draw(uint16 *buffer, uint32 bufwidth, uint32 c); +int minifont_draw_str(uint16 *buffer, uint32 bufwidth, const char *str); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-06-06 20:25:34
|
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 c5e27069604dc95ff062a1d97ccb05f0dd760f63 (commit) via 1ab17bd756d138461c6ee68fdc3283f02ccf0304 (commit) via f777a6c7537058d139f0e0b57c233327c7dc488f (commit) via 7263360018c02a6b979da6c312f6d03356eff6b3 (commit) from 600d529ada11f8b69b5ca94195368c2a00b74fa5 (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 c5e27069604dc95ff062a1d97ccb05f0dd760f63 Merge: 600d529 1ab17bd Author: Lawrence Sebald <ljs...@us...> Date: Sat Jun 6 16:25:16 2020 -0400 Merge pull request #31 from andressbarajas/master Update CHANGELOG commit 1ab17bd756d138461c6ee68fdc3283f02ccf0304 Author: Andress Barajas <and...@gm...> Date: Sat Jun 6 13:24:20 2020 -0700 Update CHANGELOG commit f777a6c7537058d139f0e0b57c233327c7dc488f Author: Andress Barajas <and...@gm...> Date: Sat Jun 6 13:19:11 2020 -0700 Update CHANGELOG again commit 7263360018c02a6b979da6c312f6d03356eff6b3 Author: Andress Barajas <and...@gm...> Date: Sat Jun 6 13:17:18 2020 -0700 Update CHANGELOG ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index cfce6f2..114b275 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -104,6 +104,9 @@ KallistiOS version 2.1.0 ----------------------------------------------- - NAO Added preliminary support for compiling to target the NAOMI and NAOMI 2 arcade systems with a NetDIMM board attached [LS] - NAO Added a simple utility to parse NetDIMM binary header data [LS] +- DC Fixed aica crash when volume is set to 255 [AB == Andress Barajas] +- DC Put a cap on the amount of samples requested by AICA so we don't get a + Buffer overflow [AB] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-06-06 20:07:14
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 600d529ada11f8b69b5ca94195368c2a00b74fa5 (commit) via 57c19fc6375711b685a2497d3428b3a2389b66fe (commit) via dd19997767feb8ff8f3543abbdb9eaa57c2020bb (commit) via dda1fe92d77c65127079194bd6f4117d9da76958 (commit) from 1dbd1da4bccb05be745599f321171c40e2ad6445 (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 600d529ada11f8b69b5ca94195368c2a00b74fa5 Merge: 1dbd1da 57c19fc Author: Lawrence Sebald <ljs...@us...> Date: Sat Jun 6 16:06:52 2020 -0400 Merge pull request #30 from andressbarajas/master Fixed sfx vol 255 crash commit 57c19fc6375711b685a2497d3428b3a2389b66fe Author: Andress Barajas <and...@gm...> Date: Sat Jun 6 12:53:08 2020 -0700 Picky stuff commit dd19997767feb8ff8f3543abbdb9eaa57c2020bb Author: Andress Barajas <and...@gm...> Date: Sat Jun 6 12:39:10 2020 -0700 Remove unused variable commit dda1fe92d77c65127079194bd6f4117d9da76958 Author: Andress Barajas <and...@gm...> Date: Sat Jun 6 01:59:04 2020 -0700 Fixed sfx vol 255 crash ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/sound/arm/aica.c | 14 +++----------- kernel/arch/dreamcast/sound/snd_stream.c | 4 ++-- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/kernel/arch/dreamcast/sound/arm/aica.c b/kernel/arch/dreamcast/sound/arm/aica.c index 2ff2ca1..411922b 100644 --- a/kernel/arch/dreamcast/sound/arm/aica.c +++ b/kernel/arch/dreamcast/sound/arm/aica.c @@ -96,7 +96,6 @@ void aica_play(int ch, int delay) { uint32 freq_lo, freq_base = 5644800; int freq_hi = 7; - uint32 i; uint32 playCont; /* Stop the channel (if it's already playing) */ @@ -124,14 +123,13 @@ void aica_play(int ch, int delay) { /* Write resulting values */ CHNREG32(ch, 24) = (freq_hi << 11) | (freq_lo & 1023); - /* Set volume, pan */ + /* Convert the incoming pan into a hardware value and set it */ CHNREG8(ch, 36) = calc_aica_pan(pan); CHNREG8(ch, 37) = 0xf; /* turn off Low Pass Filter (LPF) */ CHNREG8(ch, 40) = 0x24; - /* Convert the incoming volume and pan into hardware values */ - /* Vol starts at zero so we can ramp */ - CHNREG8(ch, 41) = 0xff; + /* Convert the incoming volume into a hardware value and set it */ + CHNREG8(ch, 41) = calc_aica_vol(vol); /* If we supported volume envelopes (which we don't yet) then this value would set that up. The top 4 bits determine the @@ -149,21 +147,15 @@ void aica_play(int ch, int delay) { also set the bits to start playback here. */ CHNREG32(ch, 4) = smpptr & 0xffff; playCont = (mode << 7) | (smpptr >> 16); - vol = calc_aica_vol(vol); if(loopflag) playCont |= 0x0200; if(delay) { CHNREG32(ch, 0) = playCont; /* key off */ - CHNREG8(ch, 41) = vol; } else { CHNREG32(ch, 0) = 0xc000 | playCont; /* key on */ - - /* ramp up the volume */ - for(i = 0xff; i >= vol; i--) - CHNREG8(ch, 41) = i; } } diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 900c82c..6fb6b24 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -432,7 +432,7 @@ void snd_stream_stop(snd_stream_hnd_t hnd) { /* Channel 1 */ cmd->cmd_id = streams[hnd].ch[1]; - snd_sh4_to_aica(tmp, AICA_CMDSTR_CHANNEL_SIZE); + snd_sh4_to_aica(tmp, cmd->size); } /* The DMA will chain to this to start the second DMA. */ @@ -476,7 +476,7 @@ int snd_stream_poll(snd_stream_hnd_t hnd) { /* round it a little bit */ needed_samples &= ~0x7ff; - /* printf("last_write_pos %6i, current_play_pos %6i, needed_samples %6i\n",last_write_pos,current_play_pos,needed_samples); */ + /* printf("last_write_pos %6u, current_play_pos %6u, needed_samples %6i\n",streams[hnd].last_write_pos,current_play_pos,needed_samples); */ if(needed_samples > 0) { if(streams[hnd].stereo) { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-06-05 00:39:12
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 1dbd1da4bccb05be745599f321171c40e2ad6445 (commit) via 15b3b2887cd43524fbea51591727eb6bca4d6fab (commit) from b3967a49ba45219759a9b28a884b9093a46927f4 (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 1dbd1da4bccb05be745599f321171c40e2ad6445 Merge: b3967a4 15b3b28 Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 4 20:38:48 2020 -0400 Merge pull request #29 from andressbarajas/master Cap needed_samples so req isnt greather than buffer_size commit 15b3b2887cd43524fbea51591727eb6bca4d6fab Author: Andress Barajas <and...@gm...> Date: Thu Jun 4 15:29:37 2020 -0700 Cap needed_samples so req isnt greather than buffer_size ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/sound/snd_stream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 47f8073..900c82c 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -480,6 +480,7 @@ int snd_stream_poll(snd_stream_hnd_t hnd) { if(needed_samples > 0) { if(streams[hnd].stereo) { + needed_samples = (needed_samples > streams[hnd].buffer_size/4) ? streams[hnd].buffer_size/4 : needed_samples; data = streams[hnd].get_data(hnd, needed_samples * 4, &got_samples); process_filters(hnd, &data, &got_samples); @@ -491,6 +492,7 @@ int snd_stream_poll(snd_stream_hnd_t hnd) { } } else { + needed_samples = needed_samples > streams[hnd].buffer_size/2 ? streams[hnd].buffer_size/2 : needed_samples; data = streams[hnd].get_data(hnd, needed_samples * 2, &got_samples); process_filters(hnd, &data, &got_samples); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-05-31 15:24:39
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via b3967a49ba45219759a9b28a884b9093a46927f4 (commit) from eb77357a703e07af08ba538f20b3d2fe8252c3f4 (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 b3967a49ba45219759a9b28a884b9093a46927f4 Author: Lawrence Sebald <ljs...@us...> Date: Sun May 31 11:24:12 2020 -0400 Add __va_list definition to sys/_types.h. ----------------------------------------------------------------------- Summary of changes: include/sys/_types.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/sys/_types.h b/include/sys/_types.h index 82a3859..71d68ce 100644 --- a/include/sys/_types.h +++ b/include/sys/_types.h @@ -9,6 +9,9 @@ #ifndef _SYS__TYPES_H #define _SYS__TYPES_H +#include <kos/cdefs.h> +__BEGIN_DECLS + #include <sys/lock.h> // This part copied from newlib's sys/_types.h. @@ -201,4 +204,12 @@ typedef _CLOCK_T_ __clock_t; #endif #endif /* !__RESTRICT */ +#if __GNUC_MINOR__ > 95 || __GNUC__ >= 3 +typedef __builtin_va_list __va_list; +#else +typedef char * __va_list; +#endif + +__END_DECLS + #endif /* _SYS__TYPES_H */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-05-27 15:26:03
|
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 eb77357a703e07af08ba538f20b3d2fe8252c3f4 (commit) from a143d20206722d1803d89c878ec4c042a4d8f413 (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 eb77357a703e07af08ba538f20b3d2fe8252c3f4 Author: Lawrence Sebald <ljs...@us...> Date: Wed May 27 11:25:44 2020 -0400 Add C++ guards around <sys/dirent.h>. ----------------------------------------------------------------------- Summary of changes: include/sys/dirent.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/sys/dirent.h b/include/sys/dirent.h index 5006dae..bfdef69 100644 --- a/include/sys/dirent.h +++ b/include/sys/dirent.h @@ -16,6 +16,10 @@ #ifndef __SYS_DIRENT_H #define __SYS_DIRENT_H +#include <kos/cdefs.h> + +__BEGIN_DECLS + #include <unistd.h> #include <arch/types.h> #include <kos/fs.h> @@ -130,9 +134,13 @@ void rewinddir(DIR *dir); int scandir(const char *dir, struct dirent ***namelist, int(*filter)(const struct dirent *), int(*compar)(const struct dirent **, const struct dirent **)); + /** \brief Not implemented */ void seekdir(DIR *dir, off_t offset); + /** \brief Not implemented */ off_t telldir(DIR *dir); +__END_DECLS + #endif hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-05-12 03:32: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 a143d20206722d1803d89c878ec4c042a4d8f413 (commit) from 79517f1ba522c532540b6f02a3df1f5818099be4 (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 a143d20206722d1803d89c878ec4c042a4d8f413 Author: Lawrence Sebald <ljs...@us...> Date: Mon May 11 23:31:55 2020 -0400 Fix a comment. ----------------------------------------------------------------------- Summary of changes: addons/include/ppp/ppp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/include/ppp/ppp.h b/addons/include/ppp/ppp.h index 4d02945..56a2d5c 100644 --- a/addons/include/ppp/ppp.h +++ b/addons/include/ppp/ppp.h @@ -363,7 +363,7 @@ int ppp_scif_init(int bps); /** \brief Initialize the Dreamcast modem for a PPP link. - This function sets up the Dreamcast serial port to act as a communications + This function sets up the Dreamcast modem to act as a communications link for a point-to-point connection. This includes dialing the specified phone number and establishing the low-level link. hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-04-08 00:39:39
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 79517f1ba522c532540b6f02a3df1f5818099be4 (commit) via 8084918ab8038947d52b45672469c971fbaadb5b (commit) from dccc475d238aa81c2dc4cccdf6597bfc635fcce3 (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 79517f1ba522c532540b6f02a3df1f5818099be4 Merge: dccc475 8084918 Author: Lawrence Sebald <ljs...@us...> Date: Tue Apr 7 20:39:02 2020 -0400 Merge pull request #25 from einsteinx2/dc-chain-prefer-curl Prefer curl over wget in dc-chain download script commit 8084918ab8038947d52b45672469c971fbaadb5b Author: Ben Baron <be...@ei...> Date: Tue Apr 7 19:32:39 2020 -0500 Prefer curl over wget in dc-chain download script Curl works better when building Docker images as wget prints to many lines while curl prints over the same line. All I did was switch the order of the checks in download.sh and added the --progress-bar flag that is used in the kos-ports Makefile to get the same style of output. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/download.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/utils/dc-chain/download.sh b/utils/dc-chain/download.sh index a6a3f24..36b3acb 100755 --- a/utils/dc-chain/download.sh +++ b/utils/dc-chain/download.sh @@ -35,53 +35,53 @@ while [ "$1" != "" ]; do done # Download everything. -if command -v wget >/dev/null 2>&1; then - echo "Downloading binutils-$BINUTILS_VER..." - wget -c https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS_VER.tar.xz || exit 1 +if command -v curl >/dev/null 2>&1; then + echo "Downloading Binutils $BINUTILS_VER..." + curl --progress-bar -C - -O https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS_VER.tar.xz || exit 1 echo "Downloading GCC $SH_GCC_VER..." - wget -c https://ftp.gnu.org/gnu/gcc/gcc-$SH_GCC_VER/gcc-$SH_GCC_VER.tar.gz || exit 1 + curl --progress-bar -C - -O https://ftp.gnu.org/gnu/gcc/gcc-$SH_GCC_VER/gcc-$SH_GCC_VER.tar.gz || exit 1 echo "Downloading GCC $ARM_GCC_VER..." - wget -c https://ftp.gnu.org/gnu/gcc/gcc-$ARM_GCC_VER/gcc-$ARM_GCC_VER.tar.gz || exit 1 + curl --progress-bar -C - -O https://ftp.gnu.org/gnu/gcc/gcc-$ARM_GCC_VER/gcc-$ARM_GCC_VER.tar.gz || exit 1 echo "Downloading Newlib $NEWLIB_VER..." - wget -c https://sourceware.org/pub/newlib/newlib-$NEWLIB_VER.tar.gz || exit 1 + curl --progress-bar -C - -O https://sourceware.org/pub/newlib/newlib-$NEWLIB_VER.tar.gz || exit 1 if [ -n "$GMP_VER" ]; then echo "Downloading GMP $GMP_VER..." - wget -c https://gcc.gnu.org/pub/gcc/infrastructure/gmp-$GMP_VER.tar.bz2 || exit 1 + curl --progress-bar -C - -O https://gcc.gnu.org/pub/gcc/infrastructure/gmp-$GMP_VER.tar.bz2 || exit 1 fi if [ -n "$MPFR_VER" ]; then echo "Downloading MPFR $MPFR_VER..." - wget -c https://gcc.gnu.org/pub/gcc/infrastructure/mpfr-$MPFR_VER.tar.bz2 || exit 1 + curl --progress-bar -C - -O https://gcc.gnu.org/pub/gcc/infrastructure/mpfr-$MPFR_VER.tar.bz2 || exit 1 fi if [ -n "$MPC_VER" ]; then echo "Downloading MPC $MPC_VER..." - wget -c https://gcc.gnu.org/pub/gcc/infrastructure/mpc-$MPC_VER.tar.gz || exit 1 + curl --progress-bar -C - -O https://gcc.gnu.org/pub/gcc/infrastructure/mpc-$MPC_VER.tar.gz || exit 1 fi -elif command -v curl >/dev/null 2>&1; then - echo "Downloading Binutils $BINUTILS_VER..." - curl -C - -O https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS_VER.tar.xz || exit 1 +elif command -v wget >/dev/null 2>&1; then + echo "Downloading binutils-$BINUTILS_VER..." + wget -c https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS_VER.tar.xz || exit 1 echo "Downloading GCC $SH_GCC_VER..." - curl -C - -O https://ftp.gnu.org/gnu/gcc/gcc-$SH_GCC_VER/gcc-$SH_GCC_VER.tar.gz || exit 1 + wget -c https://ftp.gnu.org/gnu/gcc/gcc-$SH_GCC_VER/gcc-$SH_GCC_VER.tar.gz || exit 1 echo "Downloading GCC $ARM_GCC_VER..." - curl -C - -O https://ftp.gnu.org/gnu/gcc/gcc-$ARM_GCC_VER/gcc-$ARM_GCC_VER.tar.gz || exit 1 + wget -c https://ftp.gnu.org/gnu/gcc/gcc-$ARM_GCC_VER/gcc-$ARM_GCC_VER.tar.gz || exit 1 echo "Downloading Newlib $NEWLIB_VER..." - curl -C - -O https://sourceware.org/pub/newlib/newlib-$NEWLIB_VER.tar.gz || exit 1 + wget -c https://sourceware.org/pub/newlib/newlib-$NEWLIB_VER.tar.gz || exit 1 if [ -n "$GMP_VER" ]; then echo "Downloading GMP $GMP_VER..." - curl -C - -O https://gcc.gnu.org/pub/gcc/infrastructure/gmp-$GMP_VER.tar.bz2 || exit 1 + wget -c https://gcc.gnu.org/pub/gcc/infrastructure/gmp-$GMP_VER.tar.bz2 || exit 1 fi if [ -n "$MPFR_VER" ]; then echo "Downloading MPFR $MPFR_VER..." - curl -C - -O https://gcc.gnu.org/pub/gcc/infrastructure/mpfr-$MPFR_VER.tar.bz2 || exit 1 + wget -c https://gcc.gnu.org/pub/gcc/infrastructure/mpfr-$MPFR_VER.tar.bz2 || exit 1 fi if [ -n "$MPC_VER" ]; then echo "Downloading MPC $MPC_VER..." - curl -C - -O https://gcc.gnu.org/pub/gcc/infrastructure/mpc-$MPC_VER.tar.gz || exit 1 + wget -c https://gcc.gnu.org/pub/gcc/infrastructure/mpc-$MPC_VER.tar.gz || exit 1 fi else echo >&2 "You must have either wget or cURL installed to use this script!" hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-04-07 03:14: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 dccc475d238aa81c2dc4cccdf6597bfc635fcce3 (commit) via 8fef896044e7c058d9dc84679ac0318e77adf6c8 (commit) via 0b613e15227307ee6bcd71d10f250f1484cec3c1 (commit) via f58f75dcd8504d04e768e9097ea351fb4b04e40a (commit) from a67c781ce1b9170fa1c207a9bd20ed400599745d (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 dccc475d238aa81c2dc4cccdf6597bfc635fcce3 Merge: a67c781 8fef896 Author: Lawrence Sebald <ljs...@us...> Date: Mon Apr 6 23:13:29 2020 -0400 Merge pull request #24 from einsteinx2/gcc9-fix GCC 9 fix commit 8fef896044e7c058d9dc84679ac0318e77adf6c8 Author: Ben Baron <be...@ei...> Date: Mon Apr 6 21:02:20 2020 -0500 Updated threading comment to mention newer GCC commit 0b613e15227307ee6bcd71d10f250f1484cec3c1 Author: Ben Baron <be...@ei...> Date: Mon Apr 6 20:56:34 2020 -0500 Changed GCC to install-strip to save 100s of MB These GCC binaries in the libexec subfolders take up a ton of space, almost 1 GB if you don't include Obj-C or Obj-C++ and over 1.3 GB if you do include them. This makes docker containers (and all installations) unnecessarily huge and unless you ever need to debug GCC itself, which you shouldn't, they're unneeded. Changing install to install-strip should save around 70% of that space. commit f58f75dcd8504d04e768e9097ea351fb4b04e40a Author: Ben Baron <be...@ei...> Date: Sun Apr 5 19:44:25 2020 -0500 Fixed building GCC 9.3 toolchain with deps - Now copying deps into both GCC directories - Updated GMP, MPFR, MPC, and GDB versions - Fixed GDB clean in main dc-chain Makefile ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/Makefile | 16 ++++++++-------- utils/dc-chain/cleanup.sh | 6 +++--- utils/dc-chain/download.sh | 6 +++--- utils/dc-chain/unpack.sh | 15 +++++++++------ 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/utils/dc-chain/Makefile b/utils/dc-chain/Makefile index 4bd7154..b0ccf8a 100644 --- a/utils/dc-chain/Makefile +++ b/utils/dc-chain/Makefile @@ -31,7 +31,7 @@ kos_base=$(CURDIR)/../.. sh_binutils_ver=2.34 sh_gcc_ver=9.3.0 newlib_ver=3.3.0 -gdb_ver=7.11.1 +gdb_ver=9.1 insight_ver=6.8-1 # The ARM version of binutils/gcc is separated out as the @@ -40,10 +40,10 @@ insight_ver=6.8-1 arm_binutils_ver=2.34 arm_gcc_ver=8.4.0 -# With GCC 4.x versions, the patches provide a kos thread model, so you should -# use it. With 3.4.6, you probably want posix here. If you really don't want -# threading support for C++ (or Objective C/Objective C++), you can set this to -# single (why you would is beyond me, though). +# With GCC 4.x versions and higher, the patches provide a kos thread model, +# so you should use it. With 3.4.6, you probably want posix here. If you +# really don't want threading support for C++ (or Objective C/Objective C++), +# you can set this to single (why you would is beyond me, though). thread_model=kos erase=1 verbose=1 @@ -174,7 +174,7 @@ $(build_gcc_pass1): logdir > $(log) cd $(build); ../$(src_dir)/configure --target=$(target) --prefix=$(prefix) --without-headers --with-newlib --enable-languages=c --disable-libssp --disable-tls $(extra_configure_args) CXX=$(CXX) $(to_log) $(MAKE) $(makejobs) -C $(build) DESTDIR=$(DESTDIR) $(to_log) - $(MAKE) -C $(build) install DESTDIR=$(DESTDIR) $(to_log) + $(MAKE) -C $(build) install-strip DESTDIR=$(DESTDIR) $(to_log) $(build_newlib): build = build-newlib-$(target)-$(newlib_ver) $(build_newlib): src_dir = newlib-$(newlib_ver) @@ -212,7 +212,7 @@ $(build_gcc_pass2): logdir cd $(build); ../$(src_dir)/configure --target=$(target) --prefix=$(prefix) --with-newlib --disable-libssp --disable-tls \ --enable-threads=$(thread_model) --enable-languages=$(pass2_languages) $(extra_configure_args) CXX=$(CXX) $(to_log) $(MAKE) $(makejobs) -C $(build) DESTDIR=$(DESTDIR) $(to_log) - $(MAKE) -C $(build) install DESTDIR=$(DESTDIR) $(to_log) + $(MAKE) -C $(build) install-strip DESTDIR=$(DESTDIR) $(to_log) $(clean_up) # ---- }}}} @@ -317,7 +317,7 @@ clean: -rm -rf build-gcc-$(arm_target)-$(gcc_ver) -rm -rf build-binutils-$(sh_target)-$(binutils_ver) -rm -rf build-binutils-$(arm_target)-$(binutils_ver) - -rm -rf build-gdb-$(gdb_ver) install_gdb_stamp build_gdb_stamp unpack_gdb_stamp + -rm -rf build-gdb-$(gdb_ver) gdb-$(gdb_ver) gdb-$(gdb_ver).tar.gz install_gdb_stamp build_gdb_stamp unpack_gdb_stamp -rm -rf build-insight-$(insight_ver) install_insight_stamp build_insight_stamp unpack_insight_stamp logdir: diff --git a/utils/dc-chain/cleanup.sh b/utils/dc-chain/cleanup.sh index de72538..d5a6c66 100755 --- a/utils/dc-chain/cleanup.sh +++ b/utils/dc-chain/cleanup.sh @@ -5,9 +5,9 @@ export SH_GCC_VER=9.3.0 export ARM_GCC_VER=8.4.0 export BINUTILS_VER=2.34 export NEWLIB_VER=3.3.0 -export GMP_VER=4.3.2 -export MPFR_VER=2.4.2 -export MPC_VER=0.8.1 +export GMP_VER=6.1.0 +export MPFR_VER=3.1.4 +export MPC_VER=1.0.3 while [ "$1" != "" ]; do PARAM=`echo $1 | awk -F= '{print $1}'` diff --git a/utils/dc-chain/download.sh b/utils/dc-chain/download.sh index 9056f25..a6a3f24 100755 --- a/utils/dc-chain/download.sh +++ b/utils/dc-chain/download.sh @@ -5,9 +5,9 @@ export SH_GCC_VER=9.3.0 export ARM_GCC_VER=8.4.0 export BINUTILS_VER=2.34 export NEWLIB_VER=3.3.0 -export GMP_VER=4.3.2 -export MPFR_VER=2.4.2 -export MPC_VER=0.8.1 +export GMP_VER=6.1.0 +export MPFR_VER=3.1.4 +export MPC_VER=1.0.3 while [ "$1" != "" ]; do PARAM=`echo $1 | awk -F= '{print $1}'` diff --git a/utils/dc-chain/unpack.sh b/utils/dc-chain/unpack.sh index 8b8859c..8190da6 100755 --- a/utils/dc-chain/unpack.sh +++ b/utils/dc-chain/unpack.sh @@ -5,9 +5,9 @@ export SH_GCC_VER=9.3.0 export ARM_GCC_VER=8.4.0 export BINUTILS_VER=2.34 export NEWLIB_VER=3.3.0 -export GMP_VER=4.3.2 -export MPFR_VER=2.4.2 -export MPC_VER=0.8.1 +export GMP_VER=6.1.0 +export MPFR_VER=3.1.4 +export MPC_VER=1.0.3 while [ "$1" != "" ]; do PARAM=`echo $1 | awk -F= '{print $1}'` @@ -47,15 +47,18 @@ tar xf newlib-$NEWLIB_VER.tar.gz || exit 1 # Unpack the GCC dependencies and move them into their required locations. if [ -n "$GMP_VER" ]; then tar jxf gmp-$GMP_VER.tar.bz2 || exit 1 - mv gmp-$GMP_VER gcc-$GCC_VER/gmp + cp -pr gmp-$GMP_VER gcc-$SH_GCC_VER/gmp + mv gmp-$GMP_VER gcc-$ARM_GCC_VER/gmp fi if [ -n "$MPFR_VER" ]; then tar jxf mpfr-$MPFR_VER.tar.bz2 || exit 1 - mv mpfr-$MPFR_VER gcc-$GCC_VER/mpfr + cp -pr mpfr-$MPFR_VER gcc-$SH_GCC_VER/mpfr + mv mpfr-$MPFR_VER gcc-$ARM_GCC_VER/mpfr fi if [ -n "$MPC_VER" ]; then tar zxf mpc-$MPC_VER.tar.gz || exit 1 - mv mpc-$MPC_VER gcc-$GCC_VER/mpc + cp -pr mpc-$MPC_VER gcc-$SH_GCC_VER/mpc + mv mpc-$MPC_VER gcc-$ARM_GCC_VER/mpc fi hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-04-03 20:10:02
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via a67c781ce1b9170fa1c207a9bd20ed400599745d (commit) from afa0f62a55f72db78706e9efcd8a89fbf8641248 (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 a67c781ce1b9170fa1c207a9bd20ed400599745d Author: Lawrence Sebald <ljs...@us...> Date: Fri Apr 3 16:09:39 2020 -0400 Cut out useless stuff from dc-chain's gcc 9.3.0 patch. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/patches/gcc-9.3.0-kos.diff | 120258 +-------------------------- 1 file changed, 1356 insertions(+), 118902 deletions(-) diff --git a/utils/dc-chain/patches/gcc-9.3.0-kos.diff b/utils/dc-chain/patches/gcc-9.3.0-kos.diff index b9ad916..c42a553 100644 --- a/utils/dc-chain/patches/gcc-9.3.0-kos.diff +++ b/utils/dc-chain/patches/gcc-9.3.0-kos.diff @@ -1,6 +1,6 @@ diff -ruN gcc-9.3.0/gcc/configure gcc-9.3.0-kos/gcc/configure --- gcc-9.3.0/gcc/configure 2020-03-12 07:08:30.000000000 -0400 -+++ gcc-9.3.0-kos/gcc/configure 2020-04-03 15:36:59.490000000 -0400 ++++ gcc-9.3.0-kos/gcc/configure 2020-04-03 16:07:04.540000000 -0400 @@ -11862,7 +11862,7 @@ target_thread_file='single' ;; @@ -10,119031 +10,1485 @@ diff -ruN gcc-9.3.0/gcc/configure gcc-9.3.0-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff -ruN gcc-9.3.0/gcc/configure.orig gcc-9.3.0-kos/gcc/configure.orig ---- gcc-9.3.0/gcc/configure.orig 1969-12-31 19:00:00.000000000 -0500 -+++ gcc-9.3.0-kos/gcc/configure.orig 2020-03-12 07:08:30.000000000 -0400 -@@ -0,0 +1,31673 @@ -+#! /bin/sh -+# Guess values for system-dependent variables and create Makefiles. -+# Generated by GNU Autoconf 2.69. -+# -+# -+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -+# -+# -+# This configure script is free software; the Free Software Foundation -+# gives unlimited permission to copy, distribute and modify it. -+## -------------------- ## -+## M4sh Initialization. ## -+## -------------------- ## -+ -+# Be more Bourne compatible -+DUALCASE=1; export DUALCASE # for MKS sh -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : -+ emulate sh -+ NULLCMD=: -+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which -+ # is contrary to our usage. Disable this feature. -+ alias -g '${1+"$@"}'='"$@"' -+ setopt NO_GLOB_SUBST -+else -+ case `(set -o) 2>/dev/null` in #( -+ *posix*) : -+ set -o posix ;; #( -+ *) : -+ ;; -+esac -+fi -+ -+ -+as_nl=' -+' -+export as_nl -+# Printing a long string crashes Solaris 7 /usr/bin/printf. -+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -+# Prefer a ksh shell builtin over an external printf program on Solaris, -+# but without wasting forks for bash or zsh. -+if test -z "$BASH_VERSION$ZSH_VERSION" \ -+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then -+ as_echo='print -r --' -+ as_echo_n='print -rn --' -+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then -+ as_echo='printf %s\n' -+ as_echo_n='printf %s' -+else -+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then -+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' -+ as_echo_n='/usr/ucb/echo -n' -+ else -+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"' -+ as_echo_n_body='eval -+ arg=$1; -+ case $arg in #( -+ *"$as_nl"*) -+ expr "X$arg" : "X\\(.*\\)$as_nl"; -+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; -+ esac; -+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" -+ ' -+ export as_echo_n_body -+ as_echo_n='sh -c $as_echo_n_body as_echo' -+ fi -+ export as_echo_body -+ as_echo='sh -c $as_echo_body as_echo' -+fi -+ -+# The user is always right. -+if test "${PATH_SEPARATOR+set}" != set; then -+ PATH_SEPARATOR=: -+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { -+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || -+ PATH_SEPARATOR=';' -+ } -+fi -+ -+ -+# IFS -+# We need space, tab and new line, in precisely that order. Quoting is -+# there to prevent editors from complaining about space-tab. -+# (If _AS_PATH_WALK were called with IFS unset, it would disable word -+# splitting by setting IFS to empty value.) -+IFS=" "" $as_nl" -+ -+# Find who we are. Look in the path if we contain no directory separator. -+as_myself= -+case $0 in #(( -+ *[\\/]* ) as_myself=$0 ;; -+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -+ done -+IFS=$as_save_IFS -+ -+ ;; -+esac -+# We did not find ourselves, most probably we were run as `sh COMMAND' -+# in which case we are not to be found in the path. -+if test "x$as_myself" = x; then -+ as_myself=$0 -+fi -+if test ! -f "$as_myself"; then -+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -+ exit 1 -+fi -+ -+# Unset variables that we do not need and which cause bugs (e.g. in -+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -+# suppresses any "Segmentation fault" message there. '((' could -+# trigger a bug in pdksh 5.2.14. -+for as_var in BASH_ENV ENV MAIL MAILPATH -+do eval test x\${$as_var+set} = xset \ -+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -+done -+PS1='$ ' -+PS2='> ' -+PS4='+ ' -+ -+# NLS nuisances. -+LC_ALL=C -+export LC_ALL -+LANGUAGE=C -+export LANGUAGE -+ -+# CDPATH. -+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -+ -+# Use a proper internal environment variable to ensure we don't fall -+ # into an infinite loop, continuously re-executing ourselves. -+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then -+ _as_can_reexec=no; export _as_can_reexec; -+ # We cannot yet assume a decent shell, so we have to provide a -+# neutralization value for shells without unset; and this also -+# works around shells that cannot unset nonexistent variables. -+# Preserve -v and -x to the replacement shell. -+BASH_ENV=/dev/null -+ENV=/dev/null -+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -+case $- in # (((( -+ *v*x* | *x*v* ) as_opts=-vx ;; -+ *v* ) as_opts=-v ;; -+ *x* ) as_opts=-x ;; -+ * ) as_opts= ;; -+esac -+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -+# Admittedly, this is quite paranoid, since all the known shells bail -+# out after a failed `exec'. -+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -+as_fn_exit 255 -+ fi -+ # We don't want this to propagate to other subprocesses. -+ { _as_can_reexec=; unset _as_can_reexec;} -+if test "x$CONFIG_SHELL" = x; then -+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : -+ emulate sh -+ NULLCMD=: -+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which -+ # is contrary to our usage. Disable this feature. -+ alias -g '\${1+\"\$@\"}'='\"\$@\"' -+ setopt NO_GLOB_SUBST -+else -+ case \`(set -o) 2>/dev/null\` in #( -+ *posix*) : -+ set -o posix ;; #( -+ *) : -+ ;; -+esac -+fi -+" -+ as_required="as_fn_return () { (exit \$1); } -+as_fn_success () { as_fn_return 0; } -+as_fn_failure () { as_fn_return 1; } -+as_fn_ret_success () { return 0; } -+as_fn_ret_failure () { return 1; } -+ -+exitcode=0 -+as_fn_success || { exitcode=1; echo as_fn_success failed.; } -+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -+ -+else -+ exitcode=1; echo positional parameters were not saved. -+fi -+test x\$exitcode = x0 || exit 1 -+test -x / || exit 1" -+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO -+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO -+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && -+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -+test \$(( 1 + 1 )) = 2 || exit 1 -+ -+ test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( -+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO -+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO -+ PATH=/empty FPATH=/empty; export PATH FPATH -+ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ -+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" -+ if (eval "$as_required") 2>/dev/null; then : -+ as_have_required=yes -+else -+ as_have_required=no -+fi -+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -+ -+else -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+as_found=false -+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ as_found=: -+ case $as_dir in #( -+ /*) -+ for as_base in sh bash ksh sh5; do -+ # Try only shells that exist, to save several forks. -+ as_shell=$as_dir/$as_base -+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } && -+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : -+ CONFIG_SHELL=$as_shell as_have_required=yes -+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : -+ break 2 -+fi -+fi -+ done;; -+ esac -+ as_found=false -+done -+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && -+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : -+ CONFIG_SHELL=$SHELL as_have_required=yes -+fi; } -+IFS=$as_save_IFS -+ -+ -+ if test "x$CONFIG_SHELL" != x; then : -+ export CONFIG_SHELL -+ # We cannot yet assume a decent shell, so we have to provide a -+# neutralization value for shells without unset; and this also -+# works around shells that cannot unset nonexistent variables. -+# Preserve -v and -x to the replacement shell. -+BASH_ENV=/dev/null -+ENV=/dev/null -+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -+case $- in # (((( -+ *v*x* | *x*v* ) as_opts=-vx ;; -+ *v* ) as_opts=-v ;; -+ *x* ) as_opts=-x ;; -+ * ) as_opts= ;; -+esac -+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -+# Admittedly, this is quite paranoid, since all the known shells bail -+# out after a failed `exec'. -+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -+exit 255 -+fi -+ -+ if test x$as_have_required = xno; then : -+ $as_echo "$0: This script requires a shell more modern than all" -+ $as_echo "$0: the shells that I found on your system." -+ if test x${ZSH_VERSION+set} = xset ; then -+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" -+ $as_echo "$0: be upgraded to zsh 4.3.4 or later." -+ else -+ $as_echo "$0: Please tell bug...@gn... about your system, -+$0: including any error possibly output before this -+$0: message. Then install a modern shell, or manually run -+$0: the script under such a shell if you do have one." -+ fi -+ exit 1 -+fi -+fi -+fi -+SHELL=${CONFIG_SHELL-/bin/sh} -+export SHELL -+# Unset more variables known to interfere with behavior of common tools. -+CLICOLOR_FORCE= GREP_OPTIONS= -+unset CLICOLOR_FORCE GREP_OPTIONS -+ -+## --------------------- ## -+## M4sh Shell Functions. ## -+## --------------------- ## -+# as_fn_unset VAR -+# --------------- -+# Portably unset VAR. -+as_fn_unset () -+{ -+ { eval $1=; unset $1;} -+} -+as_unset=as_fn_unset -+ -+# as_fn_set_status STATUS -+# ----------------------- -+# Set $? to STATUS, without forking. -+as_fn_set_status () -+{ -+ return $1 -+} # as_fn_set_status +diff -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/sh/crt1.S +--- gcc-9.3.0/libgcc/config/sh/crt1.S 2020-03-12 07:07:23.000000000 -0400 ++++ gcc-9.3.0-kos/libgcc/config/sh/crt1.S 2020-04-03 16:07:04.540000000 -0400 +@@ -1,724 +1,197 @@ +-/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +- This file was pretty much copied from newlib. ++! KallistiOS ##version## ++! ++! startup.s ++! (c)2000-2001 Dan Potter ++! ++! This file must appear FIRST in your linking order, or your program won't ++! work correctly as a raw binary. ++! ++! This is very loosely based on Marcus' crt0.s/startup.s ++! + -+# as_fn_exit STATUS -+# ----------------- -+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -+as_fn_exit () -+{ -+ set +e -+ as_fn_set_status $1 -+ exit $1 -+} # as_fn_exit ++.globl start ++.globl _start ++.globl _arch_real_exit ++.globl __arch_old_sr ++.globl __arch_old_vbr ++.globl __arch_old_stack ++.globl __arch_old_fpscr + +-This file is part of GCC. +- +-GCC is free software; you can redistribute it and/or modify it +-under the terms of the GNU General Public License as published by the +-Free Software Foundation; either version 3, or (at your option) any +-later version. +- +-GCC is distributed in the hope that it will be useful, +-but WITHOUT ANY WARRANTY; without even the implied warranty of +-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-General Public License for more details. +- +-Under Section 7 of GPL version 3, you are granted additional +-permissions described in the GCC Runtime Library Exception, version +-3.1, as published by the Free Software Foundation. +- +-You should have received a copy of the GNU General Public License and +-a copy of the GCC Runtime Library Exception along with this program; +-see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +-<http://www.gnu.org/licenses/>. */ +- +-#include "crt.h" +- +-#ifdef MMU_SUPPORT +- /* Section used for exception/timer interrupt stack area */ +- .section .data.vbr.stack,"aw" +- .align 4 +- .global __ST_VBR +-__ST_VBR: +- .zero 1024 * 2 /* ; 2k for VBR handlers */ +-/* Label at the highest stack address where the stack grows from */ +-__timer_stack: +-#endif /* MMU_SUPPORT */ +- +- /* ;---------------------------------------- +- Normal newlib crt1.S */ +- +- ! make a place to keep any previous value of the vbr register +- ! this will only have a value if it has been set by redboot (for example) +- .section .bss +-old_vbr: +- .long 0 +-#ifdef PROFILE +-profiling_enabled: +- .long 0 +-#endif +- +- +- .section .text +- .global start +- .import ___rtos_profiler_start_timer +- .weak ___rtos_profiler_start_timer ++_start: + start: +- mov.l stack_k,r15 +- +-#if defined (__SH3__) || (defined (__SH_FPU_ANY__) && ! defined (__SH2E__) && ! defined (__SH2A__)) || defined (__SH4_NOFPU__) +-#define VBR_SETUP +- ! before zeroing the bss ... +- ! if the vbr is already set to vbr_start then the program has been restarted +- ! (i.e. it is not the first time the program has been run since reset) +- ! reset the vbr to its old value before old_vbr (in bss) is wiped +- ! this ensures that the later code does not create a circular vbr chain +- stc vbr, r1 +- mov.l vbr_start_k, r2 +- cmp/eq r1, r2 +- bf 0f +- ! reset the old vbr value +- mov.l old_vbr_k, r1 +- mov.l @r1, r2 +- ldc r2, vbr +-0: +-#endif /* VBR_SETUP */ +- +- ! zero out bss +- mov.l edata_k,r0 +- mov.l end_k,r1 +- mov #0,r2 +-start_l: +- mov.l r2,@r0 +- add #4,r0 +- cmp/ge r0,r1 +- bt start_l +- +-#if defined (__SH_FPU_ANY__) +- mov.l set_fpscr_k, r1 +- mov #4,r4 +- jsr @r1 +- shll16 r4 ! Set DN bit (flush denormal inputs to zero) +- lds r3,fpscr ! Switch to default precision +-#endif /* defined (__SH_FPU_ANY__) */ +- +-#ifdef VBR_SETUP +- ! save the existing contents of the vbr +- ! there will only be a prior value when using something like redboot +- ! otherwise it will be zero +- stc vbr, r1 +- mov.l old_vbr_k, r2 +- mov.l r1, @r2 +- ! setup vbr +- mov.l vbr_start_k, r1 +- ldc r1,vbr +-#endif /* VBR_SETUP */ +- +- ! if an rtos is exporting a timer start fn, +- ! then pick up an SR which does not enable ints +- ! (the rtos will take care of this) +- mov.l rtos_start_fn, r0 +- mov.l sr_initial_bare, r1 +- tst r0, r0 +- bt set_sr +- +- mov.l sr_initial_rtos, r1 +- +-set_sr: +- ! Set status register (sr) +- ldc r1, sr +- +- ! arrange for exit to call fini +- mov.l atexit_k,r0 +- mov.l fini_k,r4 +- jsr @r0 ++ ! Disable interrupts (if they're enabled) ++ mov.l old_sr_addr,r0 ++ stc sr,r1 ++ mov.l r1,@r0 ++ mov.l init_sr,r0 ++ ldc r0,sr + -+# as_fn_mkdir_p -+# ------------- -+# Create "$as_dir" as a directory, including parents if necessary. -+as_fn_mkdir_p () -+{ ++ ! Run in the P2 area ++ mov.l setup_cache_addr,r0 ++ mov.l p2_mask,r1 ++ or r1,r0 ++ jmp @r0 + nop + +-#ifdef PROFILE +- ! arrange for exit to call _mcleanup (via stop_profiling) +- mova stop_profiling,r0 +- mov.l atexit_k,r1 +- jsr @r1 +- mov r0, r4 ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-04-03 20:02:46
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via afa0f62a55f72db78706e9efcd8a89fbf8641248 (commit) from d36620e015c9ab32bd0c261a7d4b7ad952532d32 (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 afa0f62a55f72db78706e9efcd8a89fbf8641248 Author: Lawrence Sebald <ljs...@us...> Date: Fri Apr 3 16:00:22 2020 -0400 Updates to dc-chain. This update is a big one. 1. Update versions of GCC, Binutils, and Newlib used for the SH4 to 9.3.0, 2.34, and 3.3.0 respectively. 2. Add support for using a different version of GCC and Binutils for ARM. This is required because GCC dropped support for the ARM7DI (which is what's in the AICA) in GCC 9.0.0. Thus, we use GCC 8.4.0 for ARM now (doing so in Binutils is just to ensure that we don't have problems later as the current version of Binutils still works fine). ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/00README | 6 +- utils/dc-chain/Makefile | 28 +- utils/dc-chain/cleanup.sh | 13 +- utils/dc-chain/download.sh | 19 +- utils/dc-chain/patches/gcc-9.2.0-kos.diff | 27 +- utils/dc-chain/patches/gcc-9.3.0-kos.diff | 119040 ++++++++++++++++++++++++ utils/dc-chain/patches/newlib-3.3.0-kos.diff | 218 +- utils/dc-chain/unpack.sh | 12 +- 8 files changed, 119261 insertions(+), 102 deletions(-) create mode 100644 utils/dc-chain/patches/gcc-9.3.0-kos.diff diff --git a/utils/dc-chain/00README b/utils/dc-chain/00README index 73a1e4b..7f4e257 100644 --- a/utils/dc-chain/00README +++ b/utils/dc-chain/00README @@ -21,8 +21,10 @@ its path in the Makefile, because some KOS includes are copied over to newlib. Finally, run make. If anything goes wrong, check the output in logs/. -Some patches are included in this package as well. As of this writing, -they patch newlib-2.0.0 and gcc-4.7.3 to work with KOS. +Some patches are included in this package as well. There are several different +versions provided for GCC and Newlib. The most well tested combination is +GCC 4.7.4 with Newlib 2.0.0, but there are also newer possibilities that are in +testing (GCC 9.3.0 with Newlib 3.3.0). You should not attempt to spawn multiple jobs with make. Using "make -j2" or any other number after the -j will probably break things. There is however now an diff --git a/utils/dc-chain/Makefile b/utils/dc-chain/Makefile index a28ed49..4bd7154 100644 --- a/utils/dc-chain/Makefile +++ b/utils/dc-chain/Makefile @@ -3,7 +3,7 @@ # # Interesting parameters: # erase=0|1 Erase build directories on the fly to save space -# thread_model=posix|single|kos Set gcc threading model +# thread_model=single|kos Set gcc threading model # verbose=0|1 Display # makejobs=-jn Set the number of jobs for calls to make to n # @@ -28,12 +28,18 @@ arm_prefix := /opt/toolchains/dc/$(arm_target) kos_root=$(CURDIR)/../../.. # kos_base: equivalent of KOS_BASE (contains include/ and kernel/) kos_base=$(CURDIR)/../.. -binutils_ver=2.31.1 -gcc_ver=4.7.4 -newlib_ver=2.0.0 +sh_binutils_ver=2.34 +sh_gcc_ver=9.3.0 +newlib_ver=3.3.0 gdb_ver=7.11.1 insight_ver=6.8-1 +# 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 + # With GCC 4.x versions, the patches provide a kos thread model, so you should # use it. With 3.4.6, you probably want posix here. If you really don't want # threading support for C++ (or Objective C/Objective C++), you can set this to @@ -47,7 +53,7 @@ verbose=1 # Tracking down problems with multiple make jobs is much more difficult than # with just one running at a time. So, if you run into trouble, then you should # clear this variable and try again with just one job running. -makejobs=-j4 +makejobs=-j2 # Set the languages to build for pass 2 of building gcc for sh-elf. The default # here is to build C, C++, Objective C, and Objective C++. You may want to take @@ -79,14 +85,14 @@ patches := $(pwd)/patches logdir := $(pwd)/logs PATH := $(sh_prefix)/bin:$(arm_prefix)/bin:$(PATH) binutils_dir=binutils-$(binutils_ver) -gcc_dir=gcc-$(gcc_ver) +gcc_dir=gcc-$(sh_gcc_ver) newlib_dir=newlib-$(newlib_ver) all: patch build # ---- patch {{{ binutils_patches := $(wildcard $(patches)/binutils-$(binutils_ver)*.diff) -gcc_patches := $(wildcard $(patches)/gcc-$(gcc_ver)*.diff) +gcc_patches := $(wildcard $(patches)/gcc-$(sh_gcc_ver)*.diff) newlib_patches := $(wildcard $(patches)/newlib-$(newlib_ver)*.diff) kos_patches := $(wildcard $(patches)/kos-*.diff) @@ -127,10 +133,14 @@ build_sh4_targets=build-sh4-binutils build-sh4-gcc build-sh4-gcc-pass1 build-sh4 build_arm_targets=build-arm-binutils build-arm-gcc build-arm-gcc-pass1 $(build_sh4_targets): prefix = $(sh_prefix) $(build_sh4_targets): target = $(sh_target) -$(build_sh4_targets): extra_configure_args = --with-multilib-list=m4-single-only,m4-nofpu,m4 --with-endian=little --with-cpu=m4-single-only +$(build_sh4_targets): extra_configure_args = --with-multilib-list=m4-single-only --with-endian=little --with-cpu=m4-single-only +$(build_sh4_targets): gcc_ver = $(sh_gcc_ver) +$(build_sh4_targets): binutils_ver = $(sh_binutils_ver) $(build_arm_targets): prefix = $(arm_prefix) $(build_arm_targets): target = $(arm_target) -$(build_arm_targets): extra_configure_args = --with-arch=armv4 +$(build_arm_targets): extra_configure_args = --with-arch=armv4 --with-mode=arm --disable-multilib +$(build_arm_targets): gcc_ver = $(arm_gcc_ver) +$(build_arm_targets): binutils_ver = $(arm_binutils_ver) # To avoid code repetition, we use the same commands for both # architectures. But we can't create a single target called diff --git a/utils/dc-chain/cleanup.sh b/utils/dc-chain/cleanup.sh index 00b01d2..de72538 100755 --- a/utils/dc-chain/cleanup.sh +++ b/utils/dc-chain/cleanup.sh @@ -1,9 +1,10 @@ #!/bin/sh # These version numbers are all that should ever have to be changed. -export GCC_VER=4.7.4 -export BINUTILS_VER=2.31.1 -export NEWLIB_VER=2.0.0 +export SH_GCC_VER=9.3.0 +export ARM_GCC_VER=8.4.0 +export BINUTILS_VER=2.34 +export NEWLIB_VER=3.3.0 export GMP_VER=4.3.2 export MPFR_VER=2.4.2 export MPC_VER=0.8.1 @@ -36,7 +37,8 @@ done # Clean up downloaded tarballs... echo "Deleting downloaded packages..." rm -f binutils-$BINUTILS_VER.tar.xz -rm -f gcc-$GCC_VER.tar.bz2 +rm -f gcc-$SH_GCC_VER.tar.gz +rm -f gcc-$ARM_GCC_VER.tar.gz rm -f newlib-$NEWLIB_VER.tar.gz if [ -n "$GMP_VER" ]; then @@ -57,7 +59,8 @@ echo "---------------------------------------" # Clean up echo "Deleting unpacked package sources..." rm -rf binutils-$BINUTILS_VER -rm -rf gcc-$GCC_VER +rm -rf gcc-$SH_GCC_VER +rm -rf gcc-$ARM_GCC_VER rm -rf newlib-$NEWLIB_VER if [ -n "$GMP_VER" ]; then diff --git a/utils/dc-chain/download.sh b/utils/dc-chain/download.sh index e13c56a..9056f25 100755 --- a/utils/dc-chain/download.sh +++ b/utils/dc-chain/download.sh @@ -1,9 +1,10 @@ #!/bin/sh # These version numbers are all that should ever have to be changed. -export GCC_VER=4.7.4 -export BINUTILS_VER=2.31.1 -export NEWLIB_VER=2.0.0 +export SH_GCC_VER=9.3.0 +export ARM_GCC_VER=8.4.0 +export BINUTILS_VER=2.34 +export NEWLIB_VER=3.3.0 export GMP_VER=4.3.2 export MPFR_VER=2.4.2 export MPC_VER=0.8.1 @@ -37,8 +38,10 @@ done if command -v wget >/dev/null 2>&1; then echo "Downloading binutils-$BINUTILS_VER..." wget -c https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS_VER.tar.xz || exit 1 - echo "Downloading GCC $GCC_VER..." - wget -c https://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/gcc-$GCC_VER.tar.bz2 || exit 1 + echo "Downloading GCC $SH_GCC_VER..." + wget -c https://ftp.gnu.org/gnu/gcc/gcc-$SH_GCC_VER/gcc-$SH_GCC_VER.tar.gz || exit 1 + echo "Downloading GCC $ARM_GCC_VER..." + wget -c https://ftp.gnu.org/gnu/gcc/gcc-$ARM_GCC_VER/gcc-$ARM_GCC_VER.tar.gz || exit 1 echo "Downloading Newlib $NEWLIB_VER..." wget -c https://sourceware.org/pub/newlib/newlib-$NEWLIB_VER.tar.gz || exit 1 @@ -59,8 +62,10 @@ if command -v wget >/dev/null 2>&1; then elif command -v curl >/dev/null 2>&1; then echo "Downloading Binutils $BINUTILS_VER..." curl -C - -O https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS_VER.tar.xz || exit 1 - echo "Downloading GCC $GCC_VER..." - curl -C - -O https://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/gcc-$GCC_VER.tar.bz2 || exit 1 + echo "Downloading GCC $SH_GCC_VER..." + curl -C - -O https://ftp.gnu.org/gnu/gcc/gcc-$SH_GCC_VER/gcc-$SH_GCC_VER.tar.gz || exit 1 + echo "Downloading GCC $ARM_GCC_VER..." + curl -C - -O https://ftp.gnu.org/gnu/gcc/gcc-$ARM_GCC_VER/gcc-$ARM_GCC_VER.tar.gz || exit 1 echo "Downloading Newlib $NEWLIB_VER..." curl -C - -O https://sourceware.org/pub/newlib/newlib-$NEWLIB_VER.tar.gz || exit 1 diff --git a/utils/dc-chain/patches/gcc-9.2.0-kos.diff b/utils/dc-chain/patches/gcc-9.2.0-kos.diff index 2c2d80b..e7fdad2 100644 --- a/utils/dc-chain/patches/gcc-9.2.0-kos.diff +++ b/utils/dc-chain/patches/gcc-9.2.0-kos.diff @@ -1,6 +1,6 @@ diff -ruN gcc-9.2.0/gcc/configure gcc-9.2.0-kos/gcc/configure --- gcc-9.2.0/gcc/configure 2019-06-26 05:15:46.000000000 -0400 -+++ gcc-9.2.0-kos/gcc/configure 2020-01-26 16:53:07.946777000 -0500 ++++ gcc-9.2.0-kos/gcc/configure 2020-03-27 23:04:55.000000000 -0400 @@ -11861,7 +11861,7 @@ target_thread_file='single' ;; @@ -12,7 +12,7 @@ diff -ruN gcc-9.2.0/gcc/configure gcc-9.2.0-kos/gcc/configure *) diff -ruN gcc-9.2.0/libgcc/config/sh/crt1.S gcc-9.2.0-kos/libgcc/config/sh/crt1.S --- gcc-9.2.0/libgcc/config/sh/crt1.S 2019-01-01 07:31:55.000000000 -0500 -+++ gcc-9.2.0-kos/libgcc/config/sh/crt1.S 2020-01-26 23:46:01.472675000 -0500 ++++ gcc-9.2.0-kos/libgcc/config/sh/crt1.S 2020-03-27 23:04:55.000000000 -0400 @@ -1,724 +1,197 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. - This file was pretty much copied from newlib. @@ -920,7 +920,7 @@ diff -ruN gcc-9.2.0/libgcc/config/sh/crt1.S gcc-9.2.0-kos/libgcc/config/sh/crt1. + .word 0x092d diff -ruN gcc-9.2.0/libgcc/config/sh/fake-kos.S gcc-9.2.0-kos/libgcc/config/sh/fake-kos.S --- gcc-9.2.0/libgcc/config/sh/fake-kos.S 1969-12-31 19:00:00.000000000 -0500 -+++ gcc-9.2.0-kos/libgcc/config/sh/fake-kos.S 2020-01-26 23:22:58.662852300 -0500 ++++ gcc-9.2.0-kos/libgcc/config/sh/fake-kos.S 2020-03-27 23:04:55.000000000 -0400 @@ -0,0 +1,78 @@ +! Weakly linked symbols used to get GCC to hopefully compile itself properly. +! These will be replaced by the real symbols in actual compiled programs. @@ -1002,7 +1002,7 @@ diff -ruN gcc-9.2.0/libgcc/config/sh/fake-kos.S gcc-9.2.0-kos/libgcc/config/sh/f + mov #-1, r0 diff -ruN gcc-9.2.0/libgcc/config/sh/gthr-kos.h gcc-9.2.0-kos/libgcc/config/sh/gthr-kos.h --- gcc-9.2.0/libgcc/config/sh/gthr-kos.h 1969-12-31 19:00:00.000000000 -0500 -+++ gcc-9.2.0-kos/libgcc/config/sh/gthr-kos.h 2020-01-27 01:04:29.760158200 -0500 ++++ gcc-9.2.0-kos/libgcc/config/sh/gthr-kos.h 2020-03-27 23:04:55.000000000 -0400 @@ -0,0 +1,401 @@ +/* Copyright (C) 2009, 2010, 2011, 2012, 2020 Lawrence Sebald */ + @@ -1407,7 +1407,7 @@ diff -ruN gcc-9.2.0/libgcc/config/sh/gthr-kos.h gcc-9.2.0-kos/libgcc/config/sh/g +#endif /* ! GCC_GTHR_KOS_H */ diff -ruN gcc-9.2.0/libgcc/config/sh/t-sh gcc-9.2.0-kos/libgcc/config/sh/t-sh --- gcc-9.2.0/libgcc/config/sh/t-sh 2019-01-01 07:31:55.000000000 -0500 -+++ gcc-9.2.0-kos/libgcc/config/sh/t-sh 2020-01-26 16:58:16.357964100 -0500 ++++ gcc-9.2.0-kos/libgcc/config/sh/t-sh 2020-03-27 23:04:55.000000000 -0400 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -1419,7 +1419,7 @@ diff -ruN gcc-9.2.0/libgcc/config/sh/t-sh gcc-9.2.0-kos/libgcc/config/sh/t-sh diff -ruN gcc-9.2.0/libgcc/configure gcc-9.2.0-kos/libgcc/configure --- gcc-9.2.0/libgcc/configure 2018-10-31 13:03:16.000000000 -0400 -+++ gcc-9.2.0-kos/libgcc/configure 2020-01-26 16:58:46.715764800 -0500 ++++ gcc-9.2.0-kos/libgcc/configure 2020-03-27 23:04:55.000000000 -0400 @@ -5550,6 +5550,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -1430,8 +1430,8 @@ diff -ruN gcc-9.2.0/libgcc/configure gcc-9.2.0-kos/libgcc/configure diff -ruN gcc-9.2.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-9.2.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h --- gcc-9.2.0/libstdc++-v3/config/cpu/sh/atomicity.h 2019-01-01 07:31:55.000000000 -0500 -+++ gcc-9.2.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2020-01-27 17:17:44.983814800 -0500 -@@ -22,14 +22,35 @@ ++++ gcc-9.2.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2020-04-03 15:19:35.120000000 -0400 +@@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -1451,7 +1451,12 @@ diff -ruN gcc-9.2.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-9.2.0-kos/libstdc + +namespace +{ -+ __gnu_cxx::__mutex atomic_mutex; ++ __gnu_cxx::__mutex& ++ get_atomic_mutex() ++ { ++ static __gnu_cxx::__mutex atomic_mutex; ++ return atomic_mutex; ++ } +} // anonymous namespace + +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) @@ -1462,7 +1467,7 @@ diff -ruN gcc-9.2.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-9.2.0-kos/libstdc + __attribute__ ((__unused__)) + __exchange_and_add(volatile _Atomic_word* __mem, int __val) throw () + { -+ __gnu_cxx::__scoped_lock sentry(atomic_mutex); ++ __gnu_cxx::__scoped_lock sentry(get_atomic_mutex()); + _Atomic_word __result; + __result = *__mem; + *__mem += __val; @@ -1478,7 +1483,7 @@ diff -ruN gcc-9.2.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-9.2.0-kos/libstdc +} // namespace diff -ruN gcc-9.2.0/libstdc++-v3/configure gcc-9.2.0-kos/libstdc++-v3/configure --- gcc-9.2.0/libstdc++-v3/configure 2019-07-03 17:09:13.000000000 -0400 -+++ gcc-9.2.0-kos/libstdc++-v3/configure 2020-01-26 23:17:50.963073000 -0500 ++++ gcc-9.2.0-kos/libstdc++-v3/configure 2020-03-27 23:04:55.000000000 -0400 @@ -15426,6 +15426,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; diff --git a/utils/dc-chain/patches/gcc-9.3.0-kos.diff b/utils/dc-chain/patches/gcc-9.3.0-kos.diff new file mode 100644 index 0000000..b9ad916 --- /dev/null +++ b/utils/dc-chain/patches/gcc-9.3.0-kos.diff @@ -0,0 +1,119040 @@ +diff -ruN gcc-9.3.0/gcc/configure gcc-9.3.0-kos/gcc/configure +--- gcc-9.3.0/gcc/configure 2020-03-12 07:08:30.000000000 -0400 ++++ gcc-9.3.0-kos/gcc/configure 2020-04-03 15:36:59.490000000 -0400 +@@ -11862,7 +11862,7 @@ + target_thread_file='single' + ;; + aix | dce | lynx | mipssde | posix | rtems | \ +- single | tpf | vxworks | win32) ++ single | tpf | vxworks | win32 | kos) + target_thread_file=${enable_threads} + ;; + *) +diff -ruN gcc-9.3.0/gcc/configure.orig gcc-9.3.0-kos/gcc/configure.orig +--- gcc-9.3.0/gcc/configure.orig 1969-12-31 19:00:00.000000000 -0500 ++++ gcc-9.3.0-kos/gcc/configure.orig 2020-03-12 07:08:30.000000000 -0400 +@@ -0,0 +1,31673 @@ ++#! /bin/sh ++# Guess values for system-dependent variables and create Makefiles. ++# Generated by GNU Autoconf 2.69. ++# ++# ++# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. ++# ++# ++# This configure script is free software; the Free Software Foundation ++# gives unlimited permission to copy, distribute and modify it. ++## -------------------- ## ++## M4sh Initialization. ## ++## -------------------- ## ++ ++# Be more Bourne compatible ++DUALCASE=1; export DUALCASE # for MKS sh ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : ++ emulate sh ++ NULLCMD=: ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '${1+"$@"}'='"$@"' ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in #( ++ *posix*) : ++ set -o posix ;; #( ++ *) : ++ ;; ++esac ++fi ++ ++ ++as_nl=' ++' ++export as_nl ++# Printing a long string crashes Solaris 7 /usr/bin/printf. ++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo ++# Prefer a ksh shell builtin over an external printf program on Solaris, ++# but without wasting forks for bash or zsh. ++if test -z "$BASH_VERSION$ZSH_VERSION" \ ++ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then ++ as_echo='print -r --' ++ as_echo_n='print -rn --' ++elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then ++ as_echo='printf %s\n' ++ as_echo_n='printf %s' ++else ++ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then ++ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' ++ as_echo_n='/usr/ucb/echo -n' ++ else ++ as_echo_body='eval expr "X$1" : "X\\(.*\\)"' ++ as_echo_n_body='eval ++ arg=$1; ++ case $arg in #( ++ *"$as_nl"*) ++ expr "X$arg" : "X\\(.*\\)$as_nl"; ++ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; ++ esac; ++ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ++ ' ++ export as_echo_n_body ++ as_echo_n='sh -c $as_echo_n_body as_echo' ++ fi ++ export as_echo_body ++ as_echo='sh -c $as_echo_body as_echo' ++fi ++ ++# The user is always right. ++if test "${PATH_SEPARATOR+set}" != set; then ++ PATH_SEPARATOR=: ++ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { ++ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || ++ PATH_SEPARATOR=';' ++ } ++fi ++ ++ ++# IFS ++# We need space, tab and new line, in precisely that order. Quoting is ++# there to prevent editors from complaining about space-tab. ++# (If _AS_PATH_WALK were called with IFS unset, it would disable word ++# splitting by setting IFS to empty value.) ++IFS=" "" $as_nl" ++ ++# Find who we are. Look in the path if we contain no directory separator. ++as_myself= ++case $0 in #(( ++ *[\\/]* ) as_myself=$0 ;; ++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++ done ++IFS=$as_save_IFS ++ ++ ;; ++esac ++# We did not find ourselves, most probably we were run as `sh COMMAND' ++# in which case we are not to be found in the path. ++if test "x$as_myself" = x; then ++ as_myself=$0 ++fi ++if test ! -f "$as_myself"; then ++ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ exit 1 ++fi ++ ++# Unset variables that we do not need and which cause bugs (e.g. in ++# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" ++# suppresses any "Segmentation fault" message there. '((' could ++# trigger a bug in pdksh 5.2.14. ++for as_var in BASH_ENV ENV MAIL MAILPATH ++do eval test x\${$as_var+set} = xset \ ++ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : ++done ++PS1='$ ' ++PS2='> ' ++PS4='+ ' ++ ++# NLS nuisances. ++LC_ALL=C ++export LC_ALL ++LANGUAGE=C ++export LANGUAGE ++ ++# CDPATH. ++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH ++ ++# Use a proper internal environment variable to ensure we don't fall ++ # into an infinite loop, continuously re-executing ourselves. ++ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then ++ _as_can_reexec=no; export _as_can_reexec; ++ # We cannot yet assume a decent shell, so we have to provide a ++# neutralization value for shells without unset; and this also ++# works around shells that cannot unset nonexistent variables. ++# Preserve -v and -x to the replacement shell. ++BASH_ENV=/dev/null ++ENV=/dev/null ++(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV ++case $- in # (((( ++ *v*x* | *x*v* ) as_opts=-vx ;; ++ *v* ) as_opts=-v ;; ++ *x* ) as_opts=-x ;; ++ * ) as_opts= ;; ++esac ++exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} ++# Admittedly, this is quite paranoid, since all the known shells bail ++# out after a failed `exec'. ++$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 ++as_fn_exit 255 ++ fi ++ # We don't want this to propagate to other subprocesses. ++ { _as_can_reexec=; unset _as_can_reexec;} ++if test "x$CONFIG_SHELL" = x; then ++ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : ++ emulate sh ++ NULLCMD=: ++ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '\${1+\"\$@\"}'='\"\$@\"' ++ setopt NO_GLOB_SUBST ++else ++ case \`(set -o) 2>/dev/null\` in #( ++ *posix*) : ++ set -o posix ;; #( ++ *) : ++ ;; ++esac ++fi ++" ++ as_required="as_fn_return () { (exit \$1); } ++as_fn_success () { as_fn_return 0; } ++as_fn_failure () { as_fn_return 1; } ++as_fn_ret_success () { return 0; } ++as_fn_ret_failure () { return 1; } ++ ++exitcode=0 ++as_fn_success || { exitcode=1; echo as_fn_success failed.; } ++as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } ++as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } ++as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } ++if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : ++ ++else ++ exitcode=1; echo positional parameters were not saved. ++fi ++test x\$exitcode = x0 || exit 1 ++test -x / || exit 1" ++ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO ++ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO ++ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && ++ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 ++test \$(( 1 + 1 )) = 2 || exit 1 ++ ++ test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ++ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-03-29 20:42:41
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via d36620e015c9ab32bd0c261a7d4b7ad952532d32 (commit) from 20be9367dabe5886365caa8824af1e094718f796 (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 d36620e015c9ab32bd0c261a7d4b7ad952532d32 Author: Lawrence Sebald <ljs...@us...> Date: Sun Mar 29 16:42:23 2020 -0400 Update changelog. ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 58d7a75..cfce6f2 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -103,6 +103,7 @@ KallistiOS version 2.1.0 ----------------------------------------------- from the KOS_CFLAGS [mrneo240 && LS] - NAO Added preliminary support for compiling to target the NAOMI and NAOMI 2 arcade systems with a NetDIMM board attached [LS] +- NAO Added a simple utility to parse NetDIMM binary header data [LS] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-03-29 20:07:05
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 20be9367dabe5886365caa8824af1e094718f796 (commit) from 1fe213c524b1c5d67cc0c36fd79b94411ea8a607 (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 20be9367dabe5886365caa8824af1e094718f796 Author: Lawrence Sebald <ljs...@us...> Date: Sun Mar 29 16:06:41 2020 -0400 Add simple util to parse NAOMI NetDIMM binaries and print out some header information from them. ----------------------------------------------------------------------- Summary of changes: utils/naomibin/Makefile | 13 +++++ utils/naomibin/naomibin.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 utils/naomibin/Makefile create mode 100644 utils/naomibin/naomibin.c diff --git a/utils/naomibin/Makefile b/utils/naomibin/Makefile new file mode 100644 index 0000000..afd184e --- /dev/null +++ b/utils/naomibin/Makefile @@ -0,0 +1,13 @@ +# KallistiOS ##version## +# +# utils/naomibin/Makefile +# Copyright (C) 2020 Lawrence Sebald +# + +all: naomibin + +naomibin: naomibin.c + gcc -o naomibin naomibin.c + +clean: + -rm -f naomibin diff --git a/utils/naomibin/naomibin.c b/utils/naomibin/naomibin.c new file mode 100644 index 0000000..a959571 --- /dev/null +++ b/utils/naomibin/naomibin.c @@ -0,0 +1,120 @@ +/* KallistiOS ##version## + + naomibin.c + Copyright (C) 2020 Lawrence Sebald + +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <stdint.h> +#include <inttypes.h> + +typedef struct naomi_hdr { + char signature[16]; + char developer[32]; + char region_title[8][32]; +} naomi_hdr_t; + +typedef struct naomi_segment { + uint32_t rom; + uint32_t ram; + uint32_t size; +} naomi_segment_t; + +static void print_header(const naomi_hdr_t *hdr) { + int i; + + printf("Platform Signature: %.16s\n", hdr->signature); + printf("Developer: %.32s\n", hdr->developer); + + for(i = 0; i < 8; ++i) { + printf("Region title %d: %.32s\n", i + 1, hdr->region_title[i]); + } +} + +static naomi_segment_t *read_segments(FILE *fp, int *num_segments) { + int addr = 0x0360; + int ns = 0; + naomi_segment_t seg; + + fseek(fp, addr, SEEK_SET); + + while(addr < 0x0420) { + fread(&seg, sizeof(naomi_segment_t), 1, fp); + + if(seg.size == 0 || (seg.rom & 0x80000000)) + break; + + printf("Segment %d\n", ns + 1); + printf("ROM Address: %08" PRIx32 "\n", seg.rom); + printf("RAM Address: %08" PRIx32 "\n", seg.ram); + printf("Length: %" PRIu32 "\n", seg.size); + addr += 12; + ++ns; + } + + *num_segments = ns; + + return NULL; +} + +static int read_entry(FILE *fp, uint32_t *entry, uint32_t *entry2) { + fseek(fp, 0x0420, SEEK_SET); + + fread(entry, sizeof(uint32_t), 1, fp); + fread(entry2, sizeof(uint32_t), 1, fp); + + printf("Entry point: %08" PRIx32 "\n", *entry); + printf("Reset point: %08" PRIx32 "\n", *entry2); + + return 0; +} + +static int read_interrupts(FILE *fp) { + uint32_t vec[22]; + int i; + + fseek(fp, 0x0130, SEEK_SET); + + for(i = 0; i < 22; ++i) { + fread(vec + i, sizeof(uint32_t), 1, fp); + printf("Vector %d: %08" PRIx32 "\n", i, vec[i]); + } + + return 0; +} + +int main(int argc, char *argv[]) { + FILE *fp; + naomi_hdr_t hdr; + int tmp; + uint32_t entry, reset; + + if(argc != 2) { + fprintf(stderr, "Usage: %s filename\n", argv[0]); + exit(EXIT_FAILURE); + } + + fp = fopen(argv[1], "rb"); + if(!fp) { + perror("Error opening file"); + exit(EXIT_FAILURE); + } + + if(fread(&hdr, sizeof(naomi_hdr_t), 1, fp) != 1) { + perror("Error reading file"); + fclose(fp); + exit(EXIT_FAILURE); + } + + print_header(&hdr); + read_segments(fp, &tmp); + read_entry(fp, &entry, &reset); + read_interrupts(fp); + + fclose(fp); + return 0; +} hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-03-29 20:03: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 1fe213c524b1c5d67cc0c36fd79b94411ea8a607 (commit) from e4a8358f2fb6f67bee157576914dd8bea1767d58 (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 1fe213c524b1c5d67cc0c36fd79b94411ea8a607 Author: Lawrence Sebald <ljs...@us...> Date: Sun Mar 29 16:00:53 2020 -0400 More work on NAOMI support. This commit adds a NAOMI-specific linker script. I'm actually not positive this is needed, but I couldn't find any NAOMI binaries that were linked to an earlier start address than 8c020000, so I'm just going with that for now to be safe until I can be sure it is or is not a problem. Also, this commit moves the priority of dbgio_null above dbgio_fb so that we never start writing to the framebuffer early on if any of the other dbgio setups cannot be used. ----------------------------------------------------------------------- Summary of changes: environ_dreamcast.sh | 11 ++++++++--- kernel/arch/dreamcast/kernel/init.c | 4 ++-- utils/ldscripts/{shlelf.xc => shlelf-naomi.xc} | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) copy utils/ldscripts/{shlelf.xc => shlelf-naomi.xc} (98%) diff --git a/environ_dreamcast.sh b/environ_dreamcast.sh index eb27981..bf47375 100644 --- a/environ_dreamcast.sh +++ b/environ_dreamcast.sh @@ -3,9 +3,14 @@ export KOS_CFLAGS="${KOS_CFLAGS} -ml -m4-single-only -ffunction-sections -fdata-sections" export KOS_AFLAGS="${KOS_AFLAGS} -little" -export KOS_LDFLAGS="${KOS_LDFLAGS} -ml -m4-single-only -Wl,-Ttext=0x8c010000 -Wl,--gc-sections" -# Needed for GCC >= 4 -export KOS_LD_SCRIPT="-T${KOS_BASE}/utils/ldscripts/shlelf.xc" + +if [ x${KOS_SUBARCH} = xnaomi ]; then + export KOS_LDFLAGS="${KOS_LDFLAGS} -ml -m4-single-only -Wl,-Ttext=0x8c020000 -Wl,--gc-sections" + export KOS_LD_SCRIPT="-T${KOS_BASE}/utils/ldscripts/shlelf-naomi.xc" +else + export KOS_LDFLAGS="${KOS_LDFLAGS} -ml -m4-single-only -Wl,-Ttext=0x8c010000 -Wl,--gc-sections" + export KOS_LD_SCRIPT="-T${KOS_BASE}/utils/ldscripts/shlelf.xc" +fi # If we're building for DC, we need the ARM compiler paths as well. if [ x${KOS_ARCH} = xdreamcast ]; then diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index da6c03a..7f3b9d8 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -44,9 +44,9 @@ dbgio_handler_t * dbgio_handlers[] = { &dbgio_dcload, &dbgio_dcls, &dbgio_scif, - &dbgio_fb, #endif - &dbgio_null + &dbgio_null, + &dbgio_fb }; int dbgio_handler_cnt = sizeof(dbgio_handlers) / sizeof(dbgio_handler_t *); diff --git a/utils/ldscripts/shlelf.xc b/utils/ldscripts/shlelf-naomi.xc similarity index 98% copy from utils/ldscripts/shlelf.xc copy to utils/ldscripts/shlelf-naomi.xc index 60418ea..989d1ef 100644 --- a/utils/ldscripts/shlelf.xc +++ b/utils/ldscripts/shlelf-naomi.xc @@ -3,11 +3,11 @@ OUTPUT_FORMAT("elf32-shl", "elf32-shl", "elf32-shl") OUTPUT_ARCH(sh) ENTRY(start) -SEARCH_DIR("/usr/local/dc-new/sh-elf/sh-elf/lib"); +SEARCH_DIR("/opt/toolchains/dc/sh-elf/sh-elf/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x8c010000); . = 0x8c010000; + PROVIDE (__executable_start = 0x8c020000); . = 0x8c020000; .text : { *(.text .stub .text.* .gnu.linkonce.t.*) hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Kazade <kaz...@us...> - 2020-03-26 21:03:37
|
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 e4a8358f2fb6f67bee157576914dd8bea1767d58 (commit) via b3e63da90d13bbff92294c3460d3b8ad32bdfc40 (commit) via 52adb14f4181c704d1069ece998e5363e098c512 (commit) from ed52af3b2cf1c2e909121324ce0faf3408aab4cc (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 e4a8358f2fb6f67bee157576914dd8bea1767d58 Merge: ed52af3 b3e63da Author: Luke Benstead <ka...@gm...> Date: Thu Mar 26 20:53:57 2020 +0000 Merge pull request #23 from Kazade/concurrence_lock_error Fix concurrence lock error and upgrade to GCC 4.7.4 commit b3e63da90d13bbff92294c3460d3b8ad32bdfc40 Author: Luke Benstead <ka...@gm...> Date: Thu Mar 26 17:56:46 2020 +0000 Remove broken 4.7.3 patch commit 52adb14f4181c704d1069ece998e5363e098c512 Author: Luke Benstead <ka...@gm...> Date: Thu Mar 26 17:56:29 2020 +0000 Add gcc 4.7.4 patch with concurrence error fix, and update versions ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/Makefile | 2 +- utils/dc-chain/cleanup.sh | 2 +- utils/dc-chain/download.sh | 2 +- .../{gcc-4.7.3-kos.diff => gcc-4.7.4-kos.diff} | 74 +++++++++++++++------- utils/dc-chain/unpack.sh | 2 +- 5 files changed, 54 insertions(+), 28 deletions(-) rename utils/dc-chain/patches/{gcc-4.7.3-kos.diff => gcc-4.7.4-kos.diff} (95%) diff --git a/utils/dc-chain/Makefile b/utils/dc-chain/Makefile index ac0dddc..a28ed49 100644 --- a/utils/dc-chain/Makefile +++ b/utils/dc-chain/Makefile @@ -29,7 +29,7 @@ kos_root=$(CURDIR)/../../.. # kos_base: equivalent of KOS_BASE (contains include/ and kernel/) kos_base=$(CURDIR)/../.. binutils_ver=2.31.1 -gcc_ver=4.7.3 +gcc_ver=4.7.4 newlib_ver=2.0.0 gdb_ver=7.11.1 insight_ver=6.8-1 diff --git a/utils/dc-chain/cleanup.sh b/utils/dc-chain/cleanup.sh index 71c74d9..00b01d2 100755 --- a/utils/dc-chain/cleanup.sh +++ b/utils/dc-chain/cleanup.sh @@ -1,7 +1,7 @@ #!/bin/sh # These version numbers are all that should ever have to be changed. -export GCC_VER=4.7.3 +export GCC_VER=4.7.4 export BINUTILS_VER=2.31.1 export NEWLIB_VER=2.0.0 export GMP_VER=4.3.2 diff --git a/utils/dc-chain/download.sh b/utils/dc-chain/download.sh index a915941..e13c56a 100755 --- a/utils/dc-chain/download.sh +++ b/utils/dc-chain/download.sh @@ -1,7 +1,7 @@ #!/bin/sh # These version numbers are all that should ever have to be changed. -export GCC_VER=4.7.3 +export GCC_VER=4.7.4 export BINUTILS_VER=2.31.1 export NEWLIB_VER=2.0.0 export GMP_VER=4.3.2 diff --git a/utils/dc-chain/patches/gcc-4.7.3-kos.diff b/utils/dc-chain/patches/gcc-4.7.4-kos.diff similarity index 95% rename from utils/dc-chain/patches/gcc-4.7.3-kos.diff rename to utils/dc-chain/patches/gcc-4.7.4-kos.diff index cb8ae00..7d5936f 100644 --- a/utils/dc-chain/patches/gcc-4.7.3-kos.diff +++ b/utils/dc-chain/patches/gcc-4.7.4-kos.diff @@ -1,6 +1,6 @@ -diff -ruN gcc-4.7.3/gcc/configure gcc-4.7.3-kos/gcc/configure ---- gcc-4.7.3/gcc/configure 2013-02-06 10:23:55.000000000 -0500 -+++ gcc-4.7.3-kos/gcc/configure 2016-12-10 20:52:47.000000000 -0500 +diff -ruN gcc-4.7.4/gcc/configure gcc-4.7.4-new/gcc/configure +--- gcc-4.7.4/gcc/configure 2014-02-12 16:43:47.000000000 +0000 ++++ gcc-4.7.4-new/gcc/configure 2020-03-25 14:40:04.452765679 +0000 @@ -11338,7 +11338,7 @@ target_thread_file='single' ;; @@ -10,9 +10,9 @@ diff -ruN gcc-4.7.3/gcc/configure gcc-4.7.3-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff -ruN gcc-4.7.3/gcc/cp/cfns.h gcc-4.7.3-kos/gcc/cp/cfns.h ---- gcc-4.7.3/gcc/cp/cfns.h 2009-04-21 15:03:23.000000000 -0400 -+++ gcc-4.7.3-kos/gcc/cp/cfns.h 2016-12-10 20:52:48.000000000 -0500 +diff -ruN gcc-4.7.4/gcc/cp/cfns.h gcc-4.7.4-new/gcc/cp/cfns.h +--- gcc-4.7.4/gcc/cp/cfns.h 2009-04-21 20:03:23.000000000 +0100 ++++ gcc-4.7.4-new/gcc/cp/cfns.h 2020-03-25 14:40:04.460765725 +0000 @@ -53,6 +53,9 @@ static unsigned int hash (const char *, unsigned int); #ifdef __GNUC__ @@ -32,9 +32,9 @@ diff -ruN gcc-4.7.3/gcc/cp/cfns.h gcc-4.7.3-kos/gcc/cp/cfns.h switch (hval) { -diff -ruN gcc-4.7.3/gcc/doc/gcc.texi gcc-4.7.3-kos/gcc/doc/gcc.texi ---- gcc-4.7.3/gcc/doc/gcc.texi 2010-06-09 19:46:33.000000000 -0400 -+++ gcc-4.7.3-kos/gcc/doc/gcc.texi 2016-12-10 20:54:56.000000000 -0500 +diff -ruN gcc-4.7.4/gcc/doc/gcc.texi gcc-4.7.4-new/gcc/doc/gcc.texi +--- gcc-4.7.4/gcc/doc/gcc.texi 2010-06-10 00:46:33.000000000 +0100 ++++ gcc-4.7.4-new/gcc/doc/gcc.texi 2020-03-25 14:40:04.464765748 +0000 @@ -86,9 +86,9 @@ @item GNU Press @tab Website: www.gnupress.org @@ -47,9 +47,9 @@ diff -ruN gcc-4.7.3/gcc/doc/gcc.texi gcc-4.7.3-kos/gcc/doc/gcc.texi @item 51 Franklin Street, Fifth Floor @tab Tel 617-542-5942 @item Boston, MA 02110-1301 USA -diff -ruN gcc-4.7.3/libgcc/config/sh/crt1.S gcc-4.7.3-kos/libgcc/config/sh/crt1.S ---- gcc-4.7.3/libgcc/config/sh/crt1.S 2011-11-02 10:33:56.000000000 -0400 -+++ gcc-4.7.3-kos/libgcc/config/sh/crt1.S 2016-12-10 20:52:47.000000000 -0500 +diff -ruN gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-new/libgcc/config/sh/crt1.S +--- gcc-4.7.4/libgcc/config/sh/crt1.S 2011-11-02 14:33:56.000000000 +0000 ++++ gcc-4.7.4-new/libgcc/config/sh/crt1.S 2020-03-25 14:40:04.485765870 +0000 @@ -1,1369 +1,202 @@ -/* Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2009, 2011 - Free Software Foundation, Inc. @@ -1601,9 +1601,9 @@ diff -ruN gcc-4.7.3/libgcc/config/sh/crt1.S gcc-4.7.3-kos/libgcc/config/sh/crt1. - .ualong 0x0 -#endif /* VBR_SETUP */ -#endif /* ! __SH5__ */ -diff -ruN gcc-4.7.3/libgcc/config/sh/fake-kos.S gcc-4.7.3-kos/libgcc/config/sh/fake-kos.S ---- gcc-4.7.3/libgcc/config/sh/fake-kos.S 1969-12-31 19:00:00.000000000 -0500 -+++ gcc-4.7.3-kos/libgcc/config/sh/fake-kos.S 2016-12-10 20:52:47.000000000 -0500 +diff -ruN gcc-4.7.4/libgcc/config/sh/fake-kos.S gcc-4.7.4-new/libgcc/config/sh/fake-kos.S +--- gcc-4.7.4/libgcc/config/sh/fake-kos.S 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.7.4-new/libgcc/config/sh/fake-kos.S 2020-03-25 14:40:04.486765876 +0000 @@ -0,0 +1,75 @@ +! Weakly linked symbols used to get GCC to hopefully compile itself properly. +! These will be replaced by the real symbols in actual compiled programs. @@ -1681,9 +1681,9 @@ diff -ruN gcc-4.7.3/libgcc/config/sh/fake-kos.S gcc-4.7.3-kos/libgcc/config/sh/f + mov #-1, r0 + \ No newline at end of file -diff -ruN gcc-4.7.3/libgcc/config/sh/gthr-kos.h gcc-4.7.3-kos/libgcc/config/sh/gthr-kos.h ---- gcc-4.7.3/libgcc/config/sh/gthr-kos.h 1969-12-31 19:00:00.000000000 -0500 -+++ gcc-4.7.3-kos/libgcc/config/sh/gthr-kos.h 2016-12-10 20:52:47.000000000 -0500 +diff -ruN gcc-4.7.4/libgcc/config/sh/gthr-kos.h gcc-4.7.4-new/libgcc/config/sh/gthr-kos.h +--- gcc-4.7.4/libgcc/config/sh/gthr-kos.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.7.4-new/libgcc/config/sh/gthr-kos.h 2020-03-25 14:40:04.486765876 +0000 @@ -0,0 +1,355 @@ +/* Copyright (C) 2009, 2010, 2011, 2012 Lawrence Sebald */ + @@ -2040,9 +2040,9 @@ diff -ruN gcc-4.7.3/libgcc/config/sh/gthr-kos.h gcc-4.7.3-kos/libgcc/config/sh/g +#endif /* _LIBOBJC */ + +#endif /* ! GCC_GTHR_KOS_H */ -diff -ruN gcc-4.7.3/libgcc/config/sh/t-sh gcc-4.7.3-kos/libgcc/config/sh/t-sh ---- gcc-4.7.3/libgcc/config/sh/t-sh 2011-11-07 12:14:32.000000000 -0500 -+++ gcc-4.7.3-kos/libgcc/config/sh/t-sh 2016-12-10 20:52:47.000000000 -0500 +diff -ruN gcc-4.7.4/libgcc/config/sh/t-sh gcc-4.7.4-new/libgcc/config/sh/t-sh +--- gcc-4.7.4/libgcc/config/sh/t-sh 2011-11-07 17:14:32.000000000 +0000 ++++ gcc-4.7.4-new/libgcc/config/sh/t-sh 2020-03-25 14:40:04.488765888 +0000 @@ -24,6 +24,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -2052,9 +2052,9 @@ diff -ruN gcc-4.7.3/libgcc/config/sh/t-sh gcc-4.7.3-kos/libgcc/config/sh/t-sh crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff -ruN gcc-4.7.3/libgcc/configure gcc-4.7.3-kos/libgcc/configure ---- gcc-4.7.3/libgcc/configure 2012-08-06 10:34:27.000000000 -0400 -+++ gcc-4.7.3-kos/libgcc/configure 2016-12-10 20:52:47.000000000 -0500 +diff -ruN gcc-4.7.4/libgcc/configure gcc-4.7.4-new/libgcc/configure +--- gcc-4.7.4/libgcc/configure 2012-08-06 15:34:27.000000000 +0100 ++++ gcc-4.7.4-new/libgcc/configure 2020-03-25 14:40:04.508766004 +0000 @@ -4480,6 +4480,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -2063,3 +2063,29 @@ diff -ruN gcc-4.7.3/libgcc/configure gcc-4.7.3-kos/libgcc/configure esac # Substitute configuration variables +diff -ruN gcc-4.7.4/libstdc++-v3/config/cpu/sh/atomicity.h gcc-4.7.4-new/libstdc++-v3/config/cpu/sh/atomicity.h +--- gcc-4.7.4/libstdc++-v3/config/cpu/sh/atomicity.h 2020-03-25 15:15:51.300215413 +0000 ++++ gcc-4.7.4-new/libstdc++-v3/config/cpu/sh/atomicity.h 2020-03-25 15:16:20.010371542 +0000 +@@ -80,7 +80,12 @@ + + namespace + { +- __gnu_cxx::__mutex atomic_mutex; ++ __gnu_cxx::__mutex& ++ get_atomic_mutex() ++ { ++ static __gnu_cxx::__mutex atomic_mutex; ++ return atomic_mutex; ++ } + } // anonymous namespace + + namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +@@ -91,7 +96,7 @@ + __attribute__ ((__unused__)) + __exchange_and_add(volatile _Atomic_word* __mem, int __val) throw () + { +- __gnu_cxx::__scoped_lock sentry(atomic_mutex); ++ __gnu_cxx::__scoped_lock sentry(get_atomic_mutex()); + _Atomic_word __result; + __result = *__mem; + *__mem += __val; diff --git a/utils/dc-chain/unpack.sh b/utils/dc-chain/unpack.sh index 8a6b25e..a727c1b 100755 --- a/utils/dc-chain/unpack.sh +++ b/utils/dc-chain/unpack.sh @@ -1,7 +1,7 @@ #!/bin/sh # These version numbers are all that should ever have to be changed. -export GCC_VER=4.7.3 +export GCC_VER=4.7.4 export BINUTILS_VER=2.31.1 export NEWLIB_VER=2.0.0 export GMP_VER=4.3.2 hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-03-23 15:17:38
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via ed52af3b2cf1c2e909121324ce0faf3408aab4cc (commit) from c1ce9c5375725836c9a9390878c90d0f01634f43 (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 ed52af3b2cf1c2e909121324ce0faf3408aab4cc Author: Lawrence Sebald <ljs...@us...> Date: Mon Mar 23 11:17:23 2020 -0400 Add pvr_set_zclip() function. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/pvr/pvr_misc.c | 5 +++++ kernel/arch/dreamcast/include/dc/pvr.h | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_misc.c b/kernel/arch/dreamcast/hardware/pvr/pvr_misc.c index 192bef9..0db97ff 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_misc.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_misc.c @@ -37,6 +37,11 @@ void pvr_set_shadow_scale(int enable, float scale_value) { PVR_SET(PVR_CHEAP_SHADOW, ((!!enable) << 8) | (s & 0xFF)); } +/* Set the Z-Clip value (that is to say the depth of the background layer). */ +void pvr_set_zclip(float zc) { + pvr_state.zclip = zc; +} + /* Return the current VBlank count */ int pvr_get_vbl_count() { return pvr_state.vbl_count; diff --git a/kernel/arch/dreamcast/include/dc/pvr.h b/kernel/arch/dreamcast/include/dc/pvr.h index 507f143..9ff7544 100644 --- a/kernel/arch/dreamcast/include/dc/pvr.h +++ b/kernel/arch/dreamcast/include/dc/pvr.h @@ -1204,6 +1204,15 @@ void pvr_set_bg_color(float r, float g, float b); */ void pvr_set_shadow_scale(int enable, float scale_value); +/** \brief Set Z clipping depth. + + This function sets the Z clipping depth. The default value for this is + 0.0001. + + \param zc The new value to set the z clip parameter to. +*/ +void pvr_set_zclip(float zc); + /** \brief Retrieve the current VBlank count. This function retrieves the number of VBlank interrupts that have occurred hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: <ap...@us...> - 2020-02-29 06:23: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 "An ethernet program loader for the Dreamcast.". The branch, experimental has been updated via 98453cdb66c130dd6bfb6744bb5dda23a4b43be0 (commit) via 5382de0d251097bddc9de61253483f722545a6cd (commit) from 25114e63cf8529b6e00fc731aee0744844aae955 (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 98453cdb66c130dd6bfb6744bb5dda23a4b43be0 Author: Moopthehedgehog <587...@us...> Date: Sat Feb 29 01:21:56 2020 -0500 because nothing gets the file ext case change right commit 5382de0d251097bddc9de61253483f722545a6cd Author: Moopthehedgehog <587...@us...> Date: Sat Feb 29 01:20:49 2020 -0500 Sync up with https://github.com/Moopthehedgehog/dcload-ip ----------------------------------------------------------------------- Summary of changes: .gitignore | 7 + CHANGES | 67 ++- Makefile.cfg | 180 ++++++-- Makefile.hostdetect | 40 ++ NETWORK | 6 +- README | 111 ----- README.md | 291 ++++++++++++ example-src/Makefile | 26 +- example-src/README | 4 +- example-src/console-test.c | 5 +- example-src/crt0.S | 43 +- example-src/dc3.x | 11 +- example-src/dc4.x | 10 +- example-src/dcload-syscall.h | 4 +- example-src/dcload-syscalls.c | 42 +- example-src/dcload-syscalls.h | 29 +- example-src/exception-test.c | 17 +- example-src/gethostinfo.c | 5 +- example-src/startup_support.c | 34 ++ host-src/tool/Makefile | 42 +- host-src/tool/commands.h | 4 +- host-src/tool/config.h | 28 ++ host-src/tool/dc-tool.c | 223 ++++++--- host-src/tool/syscalls.c | 41 +- host-src/tool/syscalls.h | 3 + host-src/tool/utils.c | 130 ++++++ host-src/tool/utils.h | 84 ++++ make-cd/Makefile | 3 + target-inc/string.h | 22 +- target-src/1st_read/Makefile | 16 +- target-src/1st_read/loader.s | 17 + target-src/dcload/Makefile | 18 +- target-src/dcload/adapter.c | 18 +- target-src/dcload/adapter.h | 52 ++- target-src/dcload/cdfs_redir.s | 7 + target-src/dcload/cdfs_syscalls.c | 6 +- target-src/dcload/commands.c | 311 +++++++++++-- target-src/dcload/commands.h | 17 +- target-src/dcload/dcload-crt0.s | 50 +- target-src/dcload/dcload.c | 612 ++++++++++++++++++++++--- target-src/dcload/dcload.h | 122 ++++- target-src/dcload/dcload.x | 41 +- target-src/dcload/dhcp.c | 522 +++++++++++++++++++++ target-src/dcload/dhcp.h | 170 +++++++ target-src/dcload/{exception.s => exception.S} | 145 +++--- target-src/dcload/go.h | 2 +- target-src/dcload/lan_adapter.c | 362 +++++++++++---- target-src/dcload/lan_adapter.h | 21 +- target-src/dcload/maple.c | 14 +- target-src/dcload/memcmp.c | 150 +++--- target-src/dcload/memfuncs.c | 501 ++++++++++++++++++++ target-src/dcload/memfuncs.h | 20 + target-src/dcload/memset.S | 64 --- target-src/dcload/net.c | 269 ++++++----- target-src/dcload/net.h | 32 +- target-src/dcload/packet.c | 118 +++-- target-src/dcload/packet.h | 9 +- target-src/dcload/perfctr.c | 240 ++++++++++ target-src/dcload/perfctr.h | 320 +++++++++++++ target-src/dcload/rtl8139.c | 276 +++++++---- target-src/dcload/rtl8139.h | 11 +- target-src/dcload/startup_support.c | 198 ++++++++ target-src/dcload/syscalls.c | 76 +-- target-src/dcload/video.h | 2 - target-src/dcload/video.s | 153 +------ 65 files changed, 5290 insertions(+), 1184 deletions(-) create mode 100644 Makefile.hostdetect delete mode 100644 README create mode 100644 README.md create mode 100644 example-src/startup_support.c create mode 100644 host-src/tool/config.h create mode 100644 host-src/tool/utils.c create mode 100644 host-src/tool/utils.h create mode 100644 target-src/dcload/dhcp.c create mode 100644 target-src/dcload/dhcp.h rename target-src/dcload/{exception.s => exception.S} (74%) create mode 100644 target-src/dcload/memfuncs.c create mode 100644 target-src/dcload/memfuncs.h delete mode 100644 target-src/dcload/memset.S create mode 100644 target-src/dcload/perfctr.c create mode 100644 target-src/dcload/perfctr.h create mode 100644 target-src/dcload/startup_support.c diff --git a/.gitignore b/.gitignore index 8c215f9..688c00f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,10 @@ *.bin *.lzo *.srec +*.exe +*.elf +example-src/console-test +example-src/exception-test +example-src/gethostinfo +target-src/dcload/dcload +target-src/dcload/exception diff --git a/CHANGES b/CHANGES index 0e5dd3d..011f26a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,60 @@ -WHATS NEW IN 1.0.4 +WHAT'S NEW IN 1.1.2 -* Maintenance versions of dcload moved into the CA CVS repository on +* LAN Adapter is now bug fixed and fully supported. Functions just like the BBA. + [Moopthehedgehog] +* Automatic detection and performance tuning depending on which adapter is installed. + WARNING: This is a semi-major change, and though dc-tool-ip 1.1.2 is still + backwards compatible with older versions of dcload-ip, it will not work + optimally unless used with dcload-ip 1.1.2. [Moopthehedgehog] + +WHAT'S NEW IN 1.1.1 + +* Overhauled the video subsystem, so non-VGA PAL video works now. VGA output is + also not egregiously shifted upwards anymore like it used to be. [Moopthehedgehog] +* Fixed startup code bugs that have probably been there for decades and would + cause random crashes when bss would go out of alignment, particularly if there + were no bss section. The startup code would also overwrite 4 bytes beyond the + end of the binary because it was using the wrong comparison instruction. Yay. + [Moopthehedgehog] +* Fixed the example-src folder, as it was in pretty bad shape. [Moopthehedgehog] +* Fixed the exception handler so that it actually works now, and it dumps + exceptions over the network (both to the dc-tool console and to a file named + "dcload_exception_dump.bin" in whatever directory the terminal is currently + in) in addition to printing them on-screen. [Moopthehedgehog] + +WHAT'S NEW IN 1.1.0 + +* IPv4 DHCP support! Hurray! It's got a nifty DHCP lease countdown timer, too, + which persists across loaded programs to keep track of time for DHCP renewal + purposes without impacting running programs. [Moopthehedgehog] +* Performance counter monitoring support from across the network. The Dreamcast + has two 48-bit performance counters that can be configured independently in a + variety of ways, and this functionality allows for controlling them in much the + same way the a Maple passthrough support from 1.0.5. + -- One of the counters is used to keep track of time for DHCP, but it can be + disabled by a packet if it's needed for user programs (the DHCP timer will be + totally off if this is done, but there isn't anything we can do about that, + sorry. That really should never be an issue, though, and bear in mind that they + cannot be written to with an initial value to count from, so no saving/restoring + state that way). [Moopthehedgehog] +* Added an option in Makefile.cfg to slow down dc-tool a tiny bit to help with + CPU usage on laptops that run the network polling loop far faster in 2020 than + laptops did in 2004. It's called "SAVE_MY_FANS" [Moopthehedgehog] +* Added support for GCC 9.2 (if using GCC 4.x from KallistiOS, make sure + USING_KOS_GCC is uncommented in Makefile.cfg) [Moopthehedgehog] +* Presumably many tens of issues were fixed. Feels like a hundred, honestly, but + it's probably more like 20-30. The whole Dreamcast side of the program got a + pretty major backend overhaul. [Moopthehedgehog] + +WHAT'S NEW IN 1.0.5 + +* Maple passthrough support. +* Some fixes. +* No one ever really documented the changes from 1.0.4 to 1.0.5. + +WHAT'S NEW IN 1.0.4 + +* Maintenance versions of dcload moved into the CA CVS repository on SourceForge with the blessings of adk. Please send future bug reports and patches to ba...@al.... If there is sufficient demand, we'll setup a separate mailing list for it, but you can also join the KOS mailing @@ -17,10 +71,10 @@ WHATS NEW IN 1.0.4 * Multi-pass retry in host tool to avoid incorrect data [dp] * Renamed some conflicting struct members for glibc2.3.x [WvN] -WHATS NEW IN 1.0.3 +WHAT'S NEW IN 1.0.3 * actually seems to be working right, unlike 1.0.1 and 1.0.2, which were both - buggy as hell under many (most?) conditions. If 1.0.1 and 1.0.2 locked up, + buggy as hell under many (most?) conditions. If 1.0.1 and 1.0.2 locked up, went berzerk, or did other strange and horrible things when you used them, try 1.0.3. * dc-tool should now be able to recover from dropped packets in nearly all @@ -32,13 +86,13 @@ WHATS NEW IN 1.0.3 starts, when you execute dc-tool -r, or if you disconnect and reconnect the ethernet cable. If the message stays there, check your ethernet cable. -WHATS NEW IN 1.0.2 +WHAT'S NEW IN 1.0.2 * fixed bug where rx configuration was not restored properly (only affected dcload syscalls - could cause dc-tool to segfault apparently, and who knows what else...) -WHATS NEW IN 1.0.1 +WHAT'S NEW IN 1.0.1 * works with 100mbit now * added syscall to return the ip and port of the dc-tool host @@ -47,4 +101,3 @@ WHATS NEW IN 1.0.1 WHATS NEW IN 1.0.0 * initial release of dcload-ip - diff --git a/Makefile.cfg b/Makefile.cfg index 0606705..0f27f94 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -1,57 +1,147 @@ -# host compiler and flags -HOSTCC = gcc -HOSTCFLAGS = -O2 -HOSTLDFLAGS = -# cygwin may need this -#HOSTCFLAGS = -O2 -D_WIN32 - -# you may have to change the paths for BFDLIB and BFDINCLUDE to -# the ones in your system - -# these must point to your sh-elf bfd, not the system one -BFDLIB = -L/opt/dc/sh-elf/lib -lbfd -liberty -lintl -BFDINCLUDE = -I/opt/dc/sh-elf/include - -# cygwin -# these must point to your sh-elf bfd, not the system one -#BFDLIB = -L/usr/local/lib -lbfd -liberty -lintl -#BFDINCLUDE = -I/usr/local/include - -# MinGW -# these must point to your sh-elf bfd, not the system one -#BFDLIB = -L/usr/local/lib -lbfd -liberty -lws2_32 -lwsock32 -#BFDINCLUDE = -I/usr/local/include +# dcload-ip Makefile Configuration + +# Uncomment this if using KOS +USING_KOS_GCC = 1 + +# Detect the host +ROOTDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) +include $(ROOTDIR)/Makefile.hostdetect + +# Host compiler and flags +HOSTCC = gcc +HOSTCFLAGS = -O2 -I/usr/local/include +HOSTLDFLAGS = -L/usr/local/lib + +# For MinGW/MSYS, MinGW-w64/MSYS2 and Cygwin +ifdef WINDOWS + HOSTCFLAGS += -D_WIN32 + EXECUTABLEEXTENSION = .exe +endif + +# dc compiler prefix -- this is usually what you used for --prefix when +# building your compiler. Note: BINTARGETPREFIX is just binutils. + +ifdef USING_KOS_GCC + # Use these for GCC 4.x (for KOS) + TARGETPREFIX = /opt/toolchains/dc/sh-elf + BINTARGETPREFIX = $(TARGETPREFIX) +else + # This is for portable sh4-elf-gcc GCC 9.2.0 + TARGETPREFIX = /mnt/c/DreamcastKOS/gcc-sh4 + BINTARGETPREFIX = /mnt/c/DreamcastKOS/binutils-sh4 +endif + +# dir to install dc-tool in +TOOLINSTALLDIR = /opt/toolchains/dc/bin + +# To build dc-tool, we need to use libelf or libfd +# By default, libelf is used + +# Define this if you want to use libbfd instead of libelf (which is default) +WITH_BFD = 0 + +# For MinGW/MSYS, we need to use libbfd instead of libelf +ifdef MINGW + WITH_BFD = 1 +endif + +# You may have to change the paths for BFDLIB and BFDINCLUDE to the correct +# ones for your system. These must point to your sh-elf bfd, not the system one! +# If you built the dc-chain with the v0.4, you'll have it installed in the +# correct location. +BFDLIB = $(TARGETPREFIX)/lib +BFDINCLUDE = $(TARGETPREFIX)/include # When using libelf instead of BFD, these must point to your # libelf installation (leave empty or undefined if libelf is part of the system) -ELFLIB = -L/usr/local/lib -ELFINCLUDE = -I/usr/local/include +ELFLIB = $(TARGETPREFIX)/lib +ELFINCLUDE = $(TARGETPREFIX)/include + +# For macOS, libelf is here when installed through Homebrew +ifdef MACOS + ELFINCLUDE = /usr/local/include/libelf +endif # sh-elf-stuff -# if you have the SH compiler in your path you can leave SHTOOLS empty, -# otherwise set it to the bin directory of your SH compiler installation -# (include trailing slash) -#SHTOOLS = /opt/dcgcc-4.7.0/sh-elf/bin/ -SHTOOLS = -TARGETCC = $(SHTOOLS)sh-elf-gcc -TARGETCFLAGS = -O2 -ml -m4-single-only -TARGETOBJCOPY = $(SHTOOLS)sh-elf-objcopy -TARGETLD = $(SHTOOLS)sh-elf-ld +# You don't need to change these + +ifdef USING_KOS_GCC + # Use these for GCC 4.x (for KOS) + TARGETCC = $(TARGETPREFIX)/bin/sh-elf-gcc + TARGETCFLAGS = -Os -ml -m4-single-only + TARGETOBJCOPY = $(BINTARGETPREFIX)/bin/sh-elf-objcopy -R .stack + TARGETLD = $(BINTARGETPREFIX)/bin/sh-elf-ld +else + # This is for portable sh4-elf-gcc GCC 9.2.0 + TARGETCC = $(TARGETPREFIX)/bin/sh4-elf-gcc + #TODO + TARGETCFLAGS = -Os -ml -m4-single-only -Wpedantic -Wno-address-of-packed-member + TARGETOBJCOPY = $(BINTARGETPREFIX)/bin/sh4-elf-objcopy -R .stack + TARGETLD = $(BINTARGETPREFIX)/bin/sh4-elf-ld +endif + # set TARGETCCVER to 3 or 4, depending on your SH compiler version (gcc 3.x or gcc 4.x) # this line tries to detect the version automatically -TARGETCCVER = $(shell $(TARGETCC) --version | head -1 | sed "s/.* \([[:digit:]][[:digit:]]*\)\.[[:digit:]][[:digit:]]*.*/\1/") +#TARGETCCVER = $(shell $(TARGETCC) --version | head -1 | sed "s/.* \([[:digit:]][[:digit:]]*\)\.[[:digit:]][[:digit:]]*.*/\1/") +TARGETCCVER = 4 -# you generally shouldn't change this unless you are making forked +# You generally shouldn't change this unless you are making forked # versions (or test versions) -VERFLAGS = -DDCLOAD_VERSION=\"1.0.5\" -TARGETCFLAGS += $(VERFLAGS) -HOSTCFLAGS += $(VERFLAGS) +VERSION = 1.1.2 -# the ip of your dreamcast - set to 0.0.0.0 if you want to use arp on pc -DREAMCAST_IP = 0.0.0.0 +# MinGW/MSYS +# Define this if you want a standalone, no dependency binary +# When the binary is standalone, it can be run outside MSYS environment +#STANDALONE_BINARY = 1 -# dir to install dc-tool in -TOOLINSTALLDIR = /usr/local/bin +# On a laptop and dc-tool's got your fans running too high? +# Enable this. It will slow dc-tool's network console down a teeny bit, but it'll +# drastically reduce CPU usage. Not necessary if on something like an 8-core desktop. +# Set to 1 to enable, 0 to disable. +SAVE_MY_FANS = 0 + +# This sets the number of seconds to show the register dump on-screen if an +# exception occurs. Maximum is 60 seconds, minimum is 0 seconds (no display), +# default is 15 seconds. +EXCEPTION_SECONDS = 15 + +# This sets a delay between data bursts that dc-tool sends to the Dreamcast. +# dcload-ip configures the Dreamcast to use a 16kB receive buffer (the largest +# size common to both the BBA and LAN adapter), so after every 16kB dc-tool gives +# the Dreamcast a chance to empty its buffer. A "safe" value is 51, and this number +# is used like this: 250000 usec (= 0.25 sec) / 51 = 4901 usec (= 0.0049 sec, or 5 ms). +# +# Increasing this number may increase network throughput performance, as it will +# shorten the delay time. However, making it too high will cause packets to be +# dropped by the Dreamcast. +# BBA: 51 +# LAN: 18 +DREAMCAST_BBA_RX_FIFO_DELAY_DIV = 51 +DREAMCAST_LAN_RX_FIFO_DELAY_DIV = 18 + +# Similarly, increasing this number may increase network throughput performance, +# as it will increase packet transfer "burst" quantity. However, making it too +# high will cause packets to be dropped by the Dreamcast due to RX FIFO overflow. +# Both adapters use ring buffers, so when the buffer reaches the end it is +# internally looped back to the beginning. +# NOTE: Increasing this number means the FIFO delay div value above should be +# decreased to compensate. +# BBA: 15 +# LAN: 15 +DREAMCAST_BBA_RX_FIFO_DELAY_COUNT = 15 +DREAMCAST_LAN_RX_FIFO_DELAY_COUNT = 15 -# uncomment this for cygwin -#EXECUTABLEEXTENSION = .exe +# +# IMPORTANT IP ADDRESS INFORMATION: +# +# Note that with the addition of DHCP, each octet here must be 3 numbers long. +# That means use leading zeroes like this when specifying an IP address: +# 192.168.001.058 or 010.000.076.002, etc. Prior versions of this program could +# not handle addresses like 192.168.0.x, and the fix for that means leading +# zeroes are now required when specifying an IP address below. +# +# Any IP in the 0.0.0.0/8 range, meaning 000.xxx.xxx.xxx, will enable DHCP mode. +# If in doubt, just use 000.000.000.000. Some routers may not accept other IPs. +# +# The IP of your dreamcast - set to 169.254.xxx.xxx if you want to use arp on pc +DREAMCAST_IP = 000.000.000.000 diff --git a/Makefile.hostdetect b/Makefile.hostdetect new file mode 100644 index 0000000..9f0f5d7 --- /dev/null +++ b/Makefile.hostdetect @@ -0,0 +1,40 @@ +# Determine on what platform we are running + +# This is much more simpler than using the "config.guess" mechanism, as we +# don't need the full host triplet, but it will be sufficient here. + +# For a more complete mechanism, based on host triplet and "config.guess", +# check the "dc-chain/Makefile". + +HOST = $(shell uname -s) + +# BSD +ifneq ($(shell echo $(HOST) | grep -i 'BSD$$'),) + BSD := 1 +endif + +# macOS +ifeq ($(shell echo $(HOST)),Darwin) + MACOS := 1 +endif + +# MinGW/MSYS +ifeq ($(shell echo $(HOST) | cut -c-5),MINGW) +# Both MinGW/MSYS legacy environment and MinGW-w64/MSYS2 environment + MINGW32 := 1 + mingw_w64_checker = $(shell echo $$MSYSTEM_CHOST) + ifneq ($(mingw_w64_checker),) +# Only MinGW-w64/MSYS2 environment, both for x86 / x64 + MINGW64 := 1 + else +# Only original and legacy MinGW/MSYS environment + MINGW := 1 + endif + WINDOWS := 1 +endif + +# Cygwin +ifeq ($(shell echo $(HOST) | cut -c-6),CYGWIN) + CYGWIN := 1 + WINDOWS := 1 +endif diff --git a/NETWORK b/NETWORK index e5ac9b0..1433b6f 100644 --- a/NETWORK +++ b/NETWORK @@ -9,8 +9,6 @@ dcload-ip implements (to some extent) the following protocols: * ICMP - dcload-ip responds to ICMP echo requests (ping) -* UDP - dcload-ip uses UDP for transfering data and commands - - - +* UDP - dcload-ip uses UDP for transfering data and commands +* DHCP - dcload-ip can use IPv4 DHCP to get an IP address now diff --git a/README b/README deleted file mode 100644 index 1939a76..0000000 --- a/README +++ /dev/null @@ -1,111 +0,0 @@ -dcload-ip 1.0.5 -A Dreamcast ethernet loader originally by <an...@na...> - -Features - -* Load elf, srec, and bin -* PC I/O (read, write, etc to PC - compatible with original dcload) -* Exception handler -* Extremely fast (at least for me - I get 1130Kbyte/sec on 10mbit half-duplex) -* Now works on 100mbit (I get 2580Kbyte/sec on 100mbit half-duplex) -* Supports both the Broadband Adapter (HIT-0400) and Lan Adapter (HIT-0300) - in a single binary - -Building - -1. Edit Makefile.cfg for your system and network, and then run make - -Installation - -1. PC - run make install (installs dc-tool) -2. DC - a. cd make-cd, edit Makefile, insert blank cd-r, run make - or - b. take target-src/1st_read/1st_read.bin and stuff it on a cd yourself - (please use the IP.BIN from the make-cd directory if you are going - to distribute either cds or cd images) - -On-screen display - -* If you see the message "NO ETHERNET ADAPTER DETECTED!", something has - gone wrong. The background of the screen will be red. - -* The correct display is something like: - dcload-ip 1.0.4 <- name/version - Broadband Adapter (HIT-0400) <- adapter driver in use - 00:d0:f1:02:ab:dd <- dc hardware address - c0.a8.00.04 <- dc ip address (in hex) - idle... <- status - - The background of the screen will be blue. - -* For the Broadband Adapter only: if the status line reports "link - change..." and does not change back to "idle..." within a short period - of time, you may have a cable problem. dcload-ip will not work while - "link change..." is displayed, or before it is displayed the first time. - The "link change..." message normally is seen when you start dcload-ip, - when you execute dc-tool -r, and when you disconnect the ethernet cable. - -* If an exception is caught while a loaded program is running, the screen ...<truncated>... hooks/post-receive -- An ethernet program loader for the Dreamcast. |
From: <ap...@us...> - 2020-02-29 06:17:13
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "An ethernet program loader for the Dreamcast.". The branch, experimental has been created at 25114e63cf8529b6e00fc731aee0744844aae955 (commit) - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- hooks/post-receive -- An ethernet program loader for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-02-21 04:24:35
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via c1ce9c5375725836c9a9390878c90d0f01634f43 (commit) from d1f4403d1e2231afa619e503ebe77fd42fde50ef (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 c1ce9c5375725836c9a9390878c90d0f01634f43 Author: Lawrence Sebald <ljs...@us...> Date: Thu Feb 20 23:24:14 2020 -0500 Init a few more things normally for NAOMI. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/hardware.c | 4 +++- kernel/arch/dreamcast/kernel/init.c | 12 ++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/hardware.c b/kernel/arch/dreamcast/hardware/hardware.c index fddfee3..2802150 100644 --- a/kernel/arch/dreamcast/hardware/hardware.c +++ b/kernel/arch/dreamcast/hardware/hardware.c @@ -48,10 +48,10 @@ int hardware_periph_init() { #ifndef _arch_sub_naomi /* Init CD-ROM.. NOTE: NO GD-ROM SUPPORT. ONLY CDs/CDRs. */ cdrom_init(); +#endif /* Setup maple bus */ maple_init(); -#endif /* Init video */ vid_init(DEFAULT_VID_MODE, DEFAULT_PIXEL_MODE); @@ -73,7 +73,9 @@ void hardware_shutdown() { #ifndef _arch_sub_naomi la_shutdown(); bba_shutdown(); +#endif maple_shutdown(); +#if 0 cdrom_shutdown(); #endif spu_dma_shutdown(); diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index fe0eda9..da6c03a 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -44,8 +44,8 @@ dbgio_handler_t * dbgio_handlers[] = { &dbgio_dcload, &dbgio_dcls, &dbgio_scif, -#endif &dbgio_fb, +#endif &dbgio_null }; int dbgio_handler_cnt = sizeof(dbgio_handlers) / sizeof(dbgio_handler_t *); @@ -78,7 +78,6 @@ int __attribute__((weak)) arch_auto_init() { /* Init debug IO */ dbgio_init(); -#ifndef _arch_sub_naomi /* Print a banner */ if(__kos_init_flags & INIT_QUIET) dbgio_disable(); @@ -87,9 +86,6 @@ int __attribute__((weak)) arch_auto_init() { dbgio_write_str("\n--\n"); dbgio_write_str(kos_get_banner()); } -#else - dbgio_disable(); -#endif timer_init(); /* Timers */ hardware_sys_init(); /* DC low-level hardware init */ @@ -124,9 +120,9 @@ int __attribute__((weak)) arch_auto_init() { } fs_iso9660_init(); +#endif vmufs_init(); fs_vmu_init(); -#endif /* Initialize library handling */ library_init(); @@ -134,9 +130,7 @@ int __attribute__((weak)) arch_auto_init() { /* Now comes the optional stuff */ if(__kos_init_flags & INIT_IRQ) { irq_enable(); /* Turn on IRQs */ -#ifndef _arch_sub_naomi maple_wait_scan(); /* Wait for the maple scan to complete */ -#endif } #ifndef _arch_sub_naomi @@ -184,8 +178,10 @@ void __attribute__((weak)) arch_auto_shutdown() { library_shutdown(); #ifndef _arch_sub_naomi fs_dcload_shutdown(); +#endif fs_vmu_shutdown(); vmufs_shutdown(); +#ifndef _arch_sub_naomi fs_iso9660_shutdown(); #endif fs_ramdisk_shutdown(); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-02-19 04:04: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 d1f4403d1e2231afa619e503ebe77fd42fde50ef (commit) from f9bbd470a9313d707447144a62d399df56df37ad (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 d1f4403d1e2231afa619e503ebe77fd42fde50ef Author: Lawrence Sebald <ljs...@us...> Date: Tue Feb 18 23:03:33 2020 -0500 Add initial support for the NAOMI and NAOMI 2 arcade systems with a NetDIMM board attached. ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 2 ++ doc/environ.sh.sample | 17 ++++++----------- kernel/arch/dreamcast/hardware/hardware.c | 8 ++++++-- kernel/arch/dreamcast/hardware/video.c | 6 ++++++ kernel/arch/dreamcast/include/arch/arch.h | 10 +++++++++- kernel/arch/dreamcast/kernel/init.c | 31 ++++++++++++++++++++++++------- 6 files changed, 53 insertions(+), 21 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index cdf339f..58d7a75 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -101,6 +101,8 @@ KallistiOS version 2.1.0 ----------------------------------------------- - *** Added dirname() and basename() functions to koslib [LS] - DC Clean up strict aliasing rule violations and remove -fno-strict-aliasing from the KOS_CFLAGS [mrneo240 && LS] +- NAO Added preliminary support for compiling to target the NAOMI and NAOMI 2 + arcade systems with a NetDIMM board attached [LS] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] diff --git a/doc/environ.sh.sample b/doc/environ.sh.sample index 258ae1a..a87b984 100644 --- a/doc/environ.sh.sample +++ b/doc/environ.sh.sample @@ -3,21 +3,21 @@ # This is a sample script. Configure to suit your setup. Some possible # alternatives for the values below are included as an example. # -# This script should be executed in your current shell environment (probably +# This script should be sourced in your current shell environment (probably # by bashrc or something similar). # # Build architecture. Set the major architecture you'll be building for. +# The only option here is "dreamcast" as of KOS 2.0.0. export KOS_ARCH="dreamcast" -#export KOS_ARCH="gba" -#export KOS_ARCH="ps2" -#export KOS_ARCH="ia32" # Build sub-architecture. If you need a particular sub-architecture, then set # that here; otherwise use "pristine". +# Possible subarch options include: +# "pristine" - a normal Dreamcast console or HKT-0120 devkit +# "navi" - a Dreamcast with the navi mod applied to it +# "naomi" - a NAOMI or NAOMI 2 arcade board export KOS_SUBARCH="pristine" -# export KOS_SUBARCH="navi" # DC -# export KOS_SUBARCH="rte" # PS2 # KOS main base path export KOS_BASE="/opt/toolchains/dc/kos" @@ -30,7 +30,6 @@ export KOS_MAKE="make" # Load utility export KOS_LOADER="dc-tool -x" # dcload, preconfigured # export KOS_LOADER="dc-tool-ser -t /dev/ttyS0 -x" # dcload-serial -# export KOS_LOADER="vgba -sound 44100 -nocrc" # GBA/vgba # Genromfs utility export KOS_GENROMFS="${KOS_BASE}/utils/genromfs/genromfs" @@ -41,10 +40,6 @@ export KOS_GENROMFS="${KOS_BASE}/utils/genromfs/genromfs" #export KOS_CC_PREFIX="dc" export KOS_CC_BASE="/opt/toolchains/dc/sh-elf" # DC export KOS_CC_PREFIX="sh-elf" -#export KOS_CC_BASE="${EE}" # PS2 -#export KOS_CC_PREFIX="ee" -#export KOS_CC_BASE="/usr/local/gba/arm-elf" # GBA -#export KOS_CC_PREFIX="arm-elf" # If you are compiling for DC and have an ARM compiler, use these too. # If you're using a newer compiler (GCC 4.7.0 and newer), you should probably be diff --git a/kernel/arch/dreamcast/hardware/hardware.c b/kernel/arch/dreamcast/hardware/hardware.c index 312150d..fddfee3 100644 --- a/kernel/arch/dreamcast/hardware/hardware.c +++ b/kernel/arch/dreamcast/hardware/hardware.c @@ -45,18 +45,22 @@ int hardware_periph_init() { spu_init(); spu_dma_init(); +#ifndef _arch_sub_naomi /* Init CD-ROM.. NOTE: NO GD-ROM SUPPORT. ONLY CDs/CDRs. */ cdrom_init(); /* Setup maple bus */ maple_init(); +#endif /* Init video */ vid_init(DEFAULT_VID_MODE, DEFAULT_PIXEL_MODE); +#ifndef _arch_sub_naomi /* Setup network (this won't do anything unless we enable netcore) */ bba_init(); la_init(); +#endif initted = 2; @@ -66,10 +70,12 @@ int hardware_periph_init() { void hardware_shutdown() { switch(initted) { case 2: +#ifndef _arch_sub_naomi la_shutdown(); bba_shutdown(); maple_shutdown(); cdrom_shutdown(); +#endif spu_dma_shutdown(); spu_shutdown(); vid_shutdown(); @@ -82,5 +88,3 @@ void hardware_shutdown() { return; } } - - diff --git a/kernel/arch/dreamcast/hardware/video.c b/kernel/arch/dreamcast/hardware/video.c index 2e1ebaf..9c033d3 100644 --- a/kernel/arch/dreamcast/hardware/video.c +++ b/kernel/arch/dreamcast/hardware/video.c @@ -427,12 +427,18 @@ uint32 *vram_l; [This is the old KOS function by Dan.] */ int vid_check_cable() { +#ifndef _arch_sub_naomi vuint32 * porta = (vuint32 *)0xff80002c; *porta = (*porta & 0xfff0ffff) | 0x000a0000; /* Read port8 and port9 */ return (*((vuint16*)(porta + 1)) >> 8) & 3; +#else + /* XXXX: This still needs to be figured out for NAOMI. For now, assume + VGA mode. */ + return 0; +#endif } /*-----------------------------------------------------------------------------*/ diff --git a/kernel/arch/dreamcast/include/arch/arch.h b/kernel/arch/dreamcast/include/arch/arch.h index 847d53c..2e53d22 100644 --- a/kernel/arch/dreamcast/include/arch/arch.h +++ b/kernel/arch/dreamcast/include/arch/arch.h @@ -2,7 +2,7 @@ arch/dreamcast/include/arch.h Copyright (C) 2001 Dan Potter - Copyright (C) 2013 Lawrence Sebald + Copyright (C) 2013, 2020 Lawrence Sebald */ @@ -27,10 +27,14 @@ __BEGIN_DECLS #define PAGESIZE_BITS 12 /**< \brief Bits for page size */ #define PAGEMASK (PAGESIZE - 1) /**< \brief Mask for page offset */ +#ifndef _arch_sub_naomi /** \brief Page count "variable". The number of pages is static, so we can optimize this quite a bit. */ #define page_count ((16*1024*1024 - 0x10000) / PAGESIZE) +#else +#define page_count ((32*1024*1024 - 0x10000) / PAGESIZE) +#endif /** \brief Base address of available physical pages. */ #define page_phys_base 0x8c010000 @@ -350,6 +354,7 @@ const char *kos_get_authors(void); */ #define arch_fptr_next(fptr) (*((uint32*)(fptr+4))) +#ifndef _arch_sub_naomi /** \brief Returns true if the passed address is likely to be valid. Doesn't have to be exact, just a sort of general idea. @@ -357,6 +362,9 @@ const char *kos_get_authors(void); memory access. */ #define arch_valid_address(ptr) ((ptr_t)(ptr) >= 0x8c010000 && (ptr_t)(ptr) < 0x8d000000) +#else +#define arch_valid_address(ptr) ((ptr_t)(ptr) >= 0x8c010000 && (ptr_t)(ptr) < 0x8e000000) +#endif __END_DECLS diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index f54e0e6..fe0eda9 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -40,17 +40,19 @@ uint32 _fs_dclsocket_get_ip(void); /* We have to put this here so we can include plat-specific devices */ dbgio_handler_t * dbgio_handlers[] = { +#ifndef _arch_sub_naomi &dbgio_dcload, &dbgio_dcls, &dbgio_scif, +#endif &dbgio_fb, &dbgio_null }; int dbgio_handler_cnt = sizeof(dbgio_handlers) / sizeof(dbgio_handler_t *); -/* Auto-init stuff: comment out here if you don't like this stuff - to be running in your build, and also below in arch_main() */ -/* #if 0 */ +/* Auto-init stuff: override with a non-weak symbol if you don't want all of + this to be linked into your code (and do the same with the + arch_auto_shutdown function too). */ int __attribute__((weak)) arch_auto_init() { union { uint32 ipl; @@ -65,23 +67,29 @@ int __attribute__((weak)) arch_auto_init() { irq_init(); /* IRQs */ irq_disable(); /* Turn on exceptions */ +#ifndef _arch_sub_naomi if(!(__kos_init_flags & INIT_NO_DCLOAD)) fs_dcload_init_console(); /* Init dc-load console, if applicable */ - // Init SCIF for debug stuff (maybe) + /* Init SCIF for debug stuff (maybe) */ scif_init(); +#endif /* Init debug IO */ dbgio_init(); +#ifndef _arch_sub_naomi /* Print a banner */ if(__kos_init_flags & INIT_QUIET) dbgio_disable(); else { - // PTYs not initialized yet + /* PTYs not initialized yet */ dbgio_write_str("\n--\n"); dbgio_write_str(kos_get_banner()); } +#else + dbgio_disable(); +#endif timer_init(); /* Timers */ hardware_sys_init(); /* DC low-level hardware init */ @@ -109,6 +117,7 @@ int __attribute__((weak)) arch_auto_init() { fs_romdisk_mount("/rd", __kos_romdisk, 0); } +#ifndef _arch_sub_naomi if(!(__kos_init_flags & INIT_NO_DCLOAD) && *DCLOADMAGICADDR == DCLOADMAGICVALUE) { dbglog(DBG_INFO, "dc-load console support enabled\n"); fs_dcload_init(); @@ -117,16 +126,20 @@ int __attribute__((weak)) arch_auto_init() { fs_iso9660_init(); vmufs_init(); fs_vmu_init(); +#endif - // Initialize library handling + /* Initialize library handling */ library_init(); /* Now comes the optional stuff */ if(__kos_init_flags & INIT_IRQ) { irq_enable(); /* Turn on IRQs */ +#ifndef _arch_sub_naomi maple_wait_scan(); /* Wait for the maple scan to complete */ +#endif } +#ifndef _arch_sub_naomi if(__kos_init_flags & INIT_NET) { ip.ipl = 0; @@ -152,13 +165,16 @@ int __attribute__((weak)) arch_auto_init() { } } } +#endif return 0; } void __attribute__((weak)) arch_auto_shutdown() { +#ifndef _arch_sub_naomi fs_dclsocket_shutdown(); net_shutdown(); +#endif irq_disable(); snd_shutdown(); @@ -166,10 +182,12 @@ void __attribute__((weak)) arch_auto_shutdown() { hardware_shutdown(); pvr_shutdown(); library_shutdown(); +#ifndef _arch_sub_naomi fs_dcload_shutdown(); fs_vmu_shutdown(); vmufs_shutdown(); fs_iso9660_shutdown(); +#endif fs_ramdisk_shutdown(); fs_romdisk_shutdown(); fs_pty_shutdown(); @@ -177,7 +195,6 @@ void __attribute__((weak)) arch_auto_shutdown() { thd_shutdown(); rtc_shutdown(); } -/* endif */ /* This is the entry point inside the C program */ int arch_main() { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2020-02-12 04:56: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 f9bbd470a9313d707447144a62d399df56df37ad (commit) from 956a83c75c40b17197474162beae60d055cf6cbb (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 f9bbd470a9313d707447144a62d399df56df37ad Author: Lawrence Sebald <ljs...@us...> Date: Tue Feb 11 23:56:16 2020 -0500 Fix a few more fall-through cases that GCC didn't complain about. Because GCC actually looks at comments before complaining about these, apparently. ----------------------------------------------------------------------- Summary of changes: addons/libppp/lcp.c | 4 ++++ kernel/net/net_tcp.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/addons/libppp/lcp.c b/addons/libppp/lcp.c index 220c70f..986d1e6 100644 --- a/addons/libppp/lcp.c +++ b/addons/libppp/lcp.c @@ -218,6 +218,7 @@ static int lcp_handle_configure_req(ppp_protocol_t *self, const lcp_pkt_t *pkt, case PPP_STATE_OPENED: /* XXXX: This layer down. */ /* Fall through... */ + __fallthrough; case PPP_STATE_STOPPED: lcp_send_client_cfg(self, 0); @@ -486,6 +487,7 @@ static int lcp_handle_configure_ack(ppp_protocol_t *self, const lcp_pkt_t *pkt, /* Uh oh... Something's gone wrong. */ /* XXXX: This layer down. */ /* Fall through... */ + __fallthrough; case PPP_STATE_ACK_RECEIVED: /* Well, this isn't good... Resend the configure request and back @@ -542,6 +544,7 @@ static int lcp_handle_configure_nak(ppp_protocol_t *self, const lcp_pkt_t *pkt, case PPP_STATE_OPENED: /* XXXX: This layer down. */ /* Fall through... */ + __fallthrough; case PPP_STATE_REQUEST_SENT: case PPP_STATE_ACK_RECEIVED: @@ -698,6 +701,7 @@ static int lcp_handle_configure_rej(ppp_protocol_t *self, const lcp_pkt_t *pkt, case PPP_STATE_OPENED: /* XXXX: This layer down. */ /* Fall through... */ + __fallthrough; case PPP_STATE_REQUEST_SENT: case PPP_STATE_ACK_RECEIVED: diff --git a/kernel/net/net_tcp.c b/kernel/net/net_tcp.c index 0dfd346..f16305b 100644 --- a/kernel/net/net_tcp.c +++ b/kernel/net/net_tcp.c @@ -388,6 +388,7 @@ retry: } /* Fall through... */ + __fallthrough; case TCP_STATE_SYN_RECEIVED: /* Don't have to worry about queued packets, since we don't allow @@ -2009,6 +2010,7 @@ static short net_tcp_poll(net_socket_t *hnd, short events) { if(sock->data.sndbuf_cur_sz < sock->sndbuf_sz) rv |= POLLWRNORM | POLLWRBAND; /* Fall through... */ + __fallthrough; case TCP_STATE_TIME_WAIT: case TCP_STATE_CLOSING: @@ -2020,6 +2022,7 @@ static short net_tcp_poll(net_socket_t *hnd, short events) { if(sock->data.sndbuf_cur_sz < sock->sndbuf_sz) rv |= POLLWRNORM | POLLWRBAND; /* Fall through... */ + __fallthrough; case TCP_STATE_FIN_WAIT_1: case TCP_STATE_FIN_WAIT_2: hooks/post-receive -- A pseudo Operating System for the Dreamcast. |