From: ljsebald <ljs...@us...> - 2023-02-11 00:04:30
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via da62e62955d2edad42c218257a50da10aff59f56 (commit) via 6dc10df220c38444bd1159ec1edb61cad09d924c (commit) via 352cb529d8f192a327e74bbf8e3fea8e8693f9ea (commit) via 73e6bd83c8e5f892ca553f002ad0ec29a2323c8f (commit) via 5d977013f492a4a6110b91dccf4dd501e4304b6a (commit) via c28c5f53f6670fdfde9c7e45be8c8f7ddcc31e0a (commit) via 678c374a9db9f0e92c4e8eb604b75c7d54b72063 (commit) via 497683aa49e61cbf6aa960d83be02682e36a9ee8 (commit) via d5419656b5df5a8d8e033fbb93b339b789a299eb (commit) via 378c2d53ea5abf65090240bf1728667efa53a4c4 (commit) via 0302794d75a97d8305d27c90a7934c7aed5274f2 (commit) via 39250ae10b99871e85930a78fa052c3368ab29e3 (commit) via 9eeec75aa3e4a7970c6a4e5aec0a53f516e979db (commit) via 986b1a4edb1756bb5c58e1f9acfb5e462d55d33f (commit) via 5c464c05b2737629a81545eb212a90f6076b0e60 (commit) via a4468b6947f43a6820e48afca45dfc7e046dcb99 (commit) via 148845fed59a3ab9d1417800629bf08c437cc5a4 (commit) via f9e5fd7ce1b4b6aa968ad2be831655b650e2ec84 (commit) via 5b8d5c1e96adcb8c942ff925f0e4d2a53fd17570 (commit) via f3b11349a0ddfbfb041b7cf7dd00bbb5c92e9c9d (commit) via 9c111dd9a505c9dee1b24b7394123416adf89c7a (commit) via 36d993c6d9d694c48f883a8b13633287564d903b (commit) via 3dc33b7666ca478b3fe5d03a874ae9b028bcac84 (commit) via 06c92c69e1b3fca51ae09b36a02342d6fdec7193 (commit) from 99c716c8915ff0199fc657b6fb41ff549361cbf0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit da62e62955d2edad42c218257a50da10aff59f56 Author: Lawrence Sebald <ljs...@us...> Date: Fri Feb 10 19:04:13 2023 -0500 Style fixes and such. commit 6dc10df220c38444bd1159ec1edb61cad09d924c Merge: 352cb52 5d97701 Author: Lawrence Sebald <ljs...@us...> Date: Fri Feb 10 18:47:33 2023 -0500 Merge pull request #104 from DC-SWAT/spi-sd Fixed and improved reading for SCIF SPI and use it for SD. commit 352cb529d8f192a327e74bbf8e3fea8e8693f9ea Merge: 73e6bd8 39250ae Author: Lawrence Sebald <ljs...@us...> Date: Fri Feb 10 18:12:50 2023 -0500 Merge pull request #88 from KallistiOS/dont-panic-on-oom Return -1 and set ENOMEM if sbrk fails commit 73e6bd83c8e5f892ca553f002ad0ec29a2323c8f Merge: 497683a 678c374 Author: Lawrence Sebald <ljs...@us...> Date: Fri Feb 10 18:10:40 2023 -0500 Merge pull request #101 from DC-SWAT/master Improved cache management commit 5d977013f492a4a6110b91dccf4dd501e4304b6a Author: Ruslan Rostovtsev <rus...@em...des> Date: Fri Feb 10 18:11:54 2023 +0700 Fixed and improved reading for SCIF SPI. - Fixed and improved scif_spi_read_byte. - Added optimized SPI data reading. - Used optimized reading for SD cards. - Added SPI functions to exports. commit c28c5f53f6670fdfde9c7e45be8c8f7ddcc31e0a Author: Ruslan Rostovtsev <rus...@em...des> Date: Fri Feb 10 18:04:32 2023 +0700 Added example for SD card speed testing commit 678c374a9db9f0e92c4e8eb604b75c7d54b72063 Author: Ruslan Rostovtsev <rus...@em...des> Date: Fri Feb 10 14:58:02 2023 +0700 Improved cache management commit 497683aa49e61cbf6aa960d83be02682e36a9ee8 Merge: d541965 378c2d5 Author: Lawrence Sebald <ljs...@us...> Date: Tue Feb 7 18:01:49 2023 -0500 Merge pull request #100 from Dreamcast-Projects/master Fix Conio adventure example Closes GitHub issue #98. commit d5419656b5df5a8d8e033fbb93b339b789a299eb Merge: 5c464c0 0302794 Author: Lawrence Sebald <ljs...@us...> Date: Tue Feb 7 17:58:28 2023 -0500 Merge pull request #99 from cepawiel/stackprotector_example Skip building stackprotector example when using GCC4 commit 378c2d53ea5abf65090240bf1728667efa53a4c4 Author: Andress Barajas <and...@gm...> Date: Mon Feb 6 22:35:30 2023 -0800 Fix Conio adventure example commit 0302794d75a97d8305d27c90a7934c7aed5274f2 Author: cepawiel <cep...@mt...> Date: Sun Feb 5 12:40:48 2023 -0600 Skip building stackprotector example when using GCC4 commit 39250ae10b99871e85930a78fa052c3368ab29e3 Author: falco <gyr...@gm...> Date: Sat Feb 4 22:51:15 2023 -0500 Added test to upper level Makefile for directory. commit 9eeec75aa3e4a7970c6a4e5aec0a53f516e979db Author: falco <gyr...@gm...> Date: Sat Feb 4 22:34:30 2023 -0500 Added example to demonstrate std::bad_alloc. commit 986b1a4edb1756bb5c58e1f9acfb5e462d55d33f Merge: 06c92c6 a4468b6 Author: falco <gyr...@gm...> Date: Sat Feb 4 22:00:48 2023 -0500 Merge branch 'master' into dont-panic-on-oom commit 5c464c05b2737629a81545eb212a90f6076b0e60 Merge: 148845f a4468b6 Author: Falco Girgis <gyr...@gm...> Date: Sat Feb 4 04:59:45 2023 -0500 Merge pull request #97 from gyrovorbis/master Bumped C++ version from 17 to 20 on new README.md. commit a4468b6947f43a6820e48afca45dfc7e046dcb99 Author: falco <gyr...@gm...> Date: Sat Feb 4 04:57:48 2023 -0500 Bumped C++ version from 17 to 20 on new README.md. commit 148845fed59a3ab9d1417800629bf08c437cc5a4 Merge: f3b1134 f9e5fd7 Author: darcagn <da...@pr...> Date: Sat Feb 4 01:44:33 2023 -0600 Merge pull request #96 from gyrovorbis/master Renamed "latest" toolchain config script to "testing" and updated README.md commit f9e5fd7ce1b4b6aa968ad2be831655b650e2ec84 Author: falco <gyr...@gm...> Date: Sat Feb 4 02:39:00 2023 -0500 Fixed permissions on "testing" toolchain config - Fixed permissiosn on testing toolchain config - Deleted previous, "latest," config (became testing) commit 5b8d5c1e96adcb8c942ff925f0e4d2a53fd17570 Author: falco <gyr...@gm...> Date: Sat Feb 4 02:35:24 2023 -0500 Latest GCC12.2.0->Testing, updated dc-chain README - It was decided that GCC12 would be called "testing" while anything beyond it (upcoming 13) would be called "latest." - The README.md for dc-chain was updated to reflect filename and naming scheme changes. commit f3b11349a0ddfbfb041b7cf7dd00bbb5c92e9c9d Merge: 36d993c 9c111dd Author: Falco Girgis <gyr...@gm...> Date: Sat Feb 4 02:19:08 2023 -0500 Merge pull request #95 from gyrovorbis/master Updated toolchain configs: legacy, stable, latest commit 9c111dd9a505c9dee1b24b7394123416adf89c7a Author: falco <gyr...@gm...> Date: Sat Feb 4 02:13:29 2023 -0500 Updated toolchain configs: legacy, stable, latest - GCC4.7.4 has been decided to be called the "legacy" toolchain, as we still support it, but there's not really any argument for using it over 9.3.0. - GCC9.3.0 has been voted in as the new "stable," as nobody has issues with it, it's been tested for years, and it has fewer bugs than 4.7. - GCC12.2.0 and onward will now be called the "latest" as we attempt to stay up-to-date. This toolchain has had far less testing than stable, but may have new features and updates commit 36d993c6d9d694c48f883a8b13633287564d903b Merge: 99c716c 3dc33b7 Author: darcagn <da...@pr...> Date: Sat Feb 4 00:05:38 2023 -0600 Merge pull request #94 from darcagn/master Update patch for building GCC 12.2.0 toolchain on macOS commit 3dc33b7666ca478b3fe5d03a874ae9b028bcac84 Author: darcagn <da...@pr...> Date: Sat Feb 4 00:01:04 2023 -0600 Update patch for building GCC 12.2.0 toolchain on macOS commit 06c92c69e1b3fca51ae09b36a02342d6fdec7193 Author: Luke Benstead <ka...@gm...> Date: Wed Jan 25 08:56:05 2023 +0000 Return -1 and set ENOMEM if sbrk fails ----------------------------------------------------------------------- Summary of changes: AUTHORS | 3 +- README.md | 2 +- examples/dreamcast/basic/stackprotector/Makefile | 11 + examples/dreamcast/conio/adventure/Makefile | 2 +- examples/dreamcast/conio/adventure/globalvars.c | 64 ++++ examples/dreamcast/conio/adventure/hdr.h | 195 ++++++------ examples/dreamcast/conio/adventure/init.c | 1 + examples/dreamcast/cpp/Makefile | 5 +- examples/dreamcast/cpp/out_of_memory/Makefile | 29 ++ .../dreamcast/cpp/out_of_memory/out_of_memory.cc | 64 ++++ examples/dreamcast/sd/Makefile | 3 + .../{g1ata/atatest => sd/speedtest}/Makefile | 6 +- examples/dreamcast/sd/speedtest/sd-speedtest.c | 90 ++++++ include/kos/cdefs.h | 7 +- kernel/arch/dreamcast/exports-naomi.txt | 10 + kernel/arch/dreamcast/exports-pristine.txt | 10 + kernel/arch/dreamcast/hardware/scif-spi.c | 179 +++++++++-- kernel/arch/dreamcast/include/arch/cache.h | 56 +++- kernel/arch/dreamcast/include/dc/scif.h | 19 +- kernel/arch/dreamcast/kernel/cache.s | 84 ++--- kernel/arch/dreamcast/kernel/mm.c | 8 +- kernel/exports.txt | 2 + utils/dc-chain/README.md | 12 +- utils/dc-chain/config.mk.latest.sample | 147 --------- ...ig.mk.stable.sample => config.mk.legacy.sample} | 0 utils/dc-chain/config.mk.stable.sample | 26 +- utils/dc-chain/config.mk.testing.sample | 10 +- .../patches/{ => arm-Darwin}/gcc-12.2.0-kos.diff | 337 +++++++++++---------- 28 files changed, 871 insertions(+), 511 deletions(-) create mode 100644 examples/dreamcast/conio/adventure/globalvars.c create mode 100644 examples/dreamcast/cpp/out_of_memory/Makefile create mode 100644 examples/dreamcast/cpp/out_of_memory/out_of_memory.cc copy examples/dreamcast/{g1ata/atatest => sd/speedtest}/Makefile (78%) create mode 100644 examples/dreamcast/sd/speedtest/sd-speedtest.c delete mode 100755 utils/dc-chain/config.mk.latest.sample copy utils/dc-chain/{config.mk.stable.sample => config.mk.legacy.sample} (100%) copy utils/dc-chain/patches/{ => arm-Darwin}/gcc-12.2.0-kos.diff (93%) diff --git a/AUTHORS b/AUTHORS index 28c2422..326a61d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,7 +22,7 @@ please see the README.KOS file in the doc directory. Contributors list (under the normal KOS license): ------------------------------------------------- Dan Potter: 1997, 2000, 2001, 2002, 2003, 2004 -Lawrence Sebald: 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 +Lawrence Sebald: 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Sam Steele: 2004 Gil Megidish: 2002 Florian Schulze: 2002 @@ -44,6 +44,7 @@ Stefan Galowicz: 2016, 2017 Luke Benstead: 2020, 2021 Eric Fradella: 2023 Falco Girgis: 2023 +Ruslan Rostovtsev: 2014, 2016, 2023 Files with Specific licenses: ----------------------------- diff --git a/README.md b/README.md index cdcf93c..90f69cf 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ KOS is an unofficial development environment for the SEGA Dreamcast game console KOS was developed from scratch over the internet by a group of free software developers and has no relation to the official Sega Katana or Microsoft Windows CE Dreamcast development kits. This has allowed it to fuel a thriving Dreamcast homebrew scene, powering many commercial releases for the platform over the years. It supports a signficiant portion of the Dreamcast's hardware capabilities and a wide variety of peripherals, accessories, and add-ons for the console, including custom hardware modifications that have been created by the scene. -Despite the console's age, KOS offers an extremely modern, programmer-friendly development environment, supporting C17 and C++17, with the majority of their standard libraries fully supported and additional support for many POSIX APIs. Additionally, KOS-ports offers a rich set of add-on libraries such as SDL, OpenGL, and Lua for the platform. +Despite the console's age, KOS offers an extremely modern, programmer-friendly development environment, supporting C17 and C++20, with the majority of their standard libraries fully supported and additional support for many POSIX APIs. Additionally, KOS-ports offers a rich set of add-on libraries such as SDL, OpenGL, and Lua for the platform. ## Features ##### Core Functionality diff --git a/examples/dreamcast/basic/stackprotector/Makefile b/examples/dreamcast/basic/stackprotector/Makefile index c931465..722d5fb 100644 --- a/examples/dreamcast/basic/stackprotector/Makefile +++ b/examples/dreamcast/basic/stackprotector/Makefile @@ -2,6 +2,15 @@ TARGET = stackprotector.elf OBJS = stackprotector.o KOS_CFLAGS += -fstack-protector-all +GCC_MAJOR = $(basename $(basename $(KOS_GCCVER))) + +ifeq ($(GCC_MAJOR), 4) + +all dist: + $(warning GCC4 missing stackprotector patch, skip building example) + +else + all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules @@ -24,3 +33,5 @@ dist: $(TARGET) .PHONY: run dist clean rm-elf + +endif \ No newline at end of file diff --git a/examples/dreamcast/conio/adventure/Makefile b/examples/dreamcast/conio/adventure/Makefile index 30cbbda..921032d 100644 --- a/examples/dreamcast/conio/adventure/Makefile +++ b/examples/dreamcast/conio/adventure/Makefile @@ -29,7 +29,7 @@ all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules -OBJS = porthelper.o crc.o done.o init.o io.o adventure.o save.o subr.o vocab.o wizard.o data.o +OBJS = porthelper.o crc.o done.o init.o io.o adventure.o save.o subr.o vocab.o wizard.o data.o globalvars.o $(DATA_TARGET): $(HOST_CC) -o $(SETUP_TARGET) $(SETUP_SOURCE) $(SETUP_CFLAGS) diff --git a/examples/dreamcast/conio/adventure/globalvars.c b/examples/dreamcast/conio/adventure/globalvars.c new file mode 100644 index 0000000..9dd9df1 --- /dev/null +++ b/examples/dreamcast/conio/adventure/globalvars.c @@ -0,0 +1,64 @@ +#include "hdr.h" + +int datfd; +int yea; + +int loc, newloc, oldloc, oldlc2, wzdark, gaveup, kq, k, k2; +char *wd1, *wd2; /* the complete words */ +int verb, obj, spk; +int saved, savet, mxscor, latncy; + +struct hashtab voc[HTSIZE]; + +struct text rtext[RTXSIZ]; /* random text messages */ +struct text mtext[MAGSIZ]; /* magic messages */ + +int clsses; +struct text ctext[CLSMAX]; /* classes of adventurer */ +int cval[CLSMAX]; + +struct text ptext[101]; /* object descriptions */ + +#define LOCSIZ 141 /* number of locations */ +struct text ltext[LOCSIZ]; /* long loc description */ +struct text stext[LOCSIZ]; /* short loc descriptions */ + +struct travlist *travel[LOCSIZ], *tkk; /* travel is closer to keys(...)*/ + +int atloc[LOCSIZ]; + +int plac[101]; /* initial object placement */ +int fixd[101], fixed[101]; /* location fixed? */ + +int actspk[35]; /* rtext msg for verb <n> */ + +int cond[LOCSIZ]; /* various condition bits */ + +int hntmax; +int hints[20][5]; /* info on hints */ +int hinted[20], hintlc[20]; + +int place[101], prop[101], linkx[201]; +int abb[LOCSIZ]; + +int maxtrs, tally, tally2; /* treasure values */ + +int keys, lamp, grate, cage, rod, rod2, steps, /* mnemonics */ + bird, door, pillow, snake, fissur, tablet, clam, oyster, magzin, + dwarf, knife, food, bottle, water, oil, plant, plant2, axe, mirror, dragon, + chasm, troll, troll2, bear, messag, vend, batter, + nugget, coins, chest, eggs, tridnt, vase, emrald, pyram, pearl, rug, chain, + spices, + back, look, cave, null, entrnc, dprssn, + enter, stream, pour, + say, lock, throw, find, invent; + +int chloc, chloc2, dseen[7], dloc[7], /* dwarf stuff */ + odloc[7], dflag, daltlc; + +int tk[21], stick, dtotal, attack; +int turns, lmwarn, iwest, knfloc, detail, /* various flags & counters */ + abbnum, maxdie, numdie, holdng, dkill, foobar, bonus, clock1, clock2, + closng, apanic, closed, scorng; + +int demo, limit; \ No newline at end of file diff --git a/examples/dreamcast/conio/adventure/hdr.h b/examples/dreamcast/conio/adventure/hdr.h index dc9839d..87cee26 100644 --- a/examples/dreamcast/conio/adventure/hdr.h +++ b/examples/dreamcast/conio/adventure/hdr.h @@ -85,9 +85,9 @@ typedef unsigned long u_long; #include "porthelper.h" #endif -int datfd; /* message file descriptor */ +extern int datfd; /* message file descriptor */ /* volatile sig_atomic_t delhit; */ -int yea; +extern int yea; extern char data_file[]; /* Virtual data file */ #define TAB '\t' @@ -96,11 +96,11 @@ extern char data_file[]; /* Virtual data file */ #define FLUSHLF while (next()!=LF) -int loc, newloc, oldloc, oldlc2, wzdark, gaveup, kq, k, k2; -char *wd1, *wd2; /* the complete words */ -int verb, obj, spk; +extern int loc, newloc, oldloc, oldlc2, wzdark, gaveup, kq, k, k2; +extern char *wd1, *wd2; /* the complete words */ +extern int verb, obj, spk; extern int blklin; -int saved, savet, mxscor, latncy; +extern int saved, savet, mxscor, latncy; #define SHORT 50 /* How short is a demo game? */ @@ -110,68 +110,65 @@ int saved, savet, mxscor, latncy; struct hashtab { /* hash table for vocabulary */ int val; /* word type &index (ktab) */ char *atab; /* pointer to actual string */ -} voc[HTSIZE]; +}; +extern struct hashtab voc[HTSIZE]; #define SEED 1815622 /* "Encryption" seed */ struct text -#ifdef OLDSTUFF { - int seekadr; /* DATFILE must be < 2**16 */ -#endif /* !OLDSTUFF */ - { - char *seekadr; /* Msg start in virtual disk */ - int txtlen; /* length of msg starting here */ - }; + char *seekadr; /* Msg start in virtual disk */ + int txtlen; /* length of msg starting here */ +}; #define RTXSIZ 205 - struct text rtext[RTXSIZ]; /* random text messages */ +extern struct text rtext[RTXSIZ]; /* random text messages */ #define MAGSIZ 35 - struct text mtext[MAGSIZ]; /* magic messages */ +extern struct text mtext[MAGSIZ]; /* magic messages */ - int clsses; +extern int clsses; #define CLSMAX 12 - struct text ctext[CLSMAX]; /* classes of adventurer */ - int cval[CLSMAX]; +extern struct text ctext[CLSMAX]; /* classes of adventurer */ +extern int cval[CLSMAX]; - struct text ptext[101]; /* object descriptions */ +extern struct text ptext[101]; /* object descriptions */ #define LOCSIZ 141 /* number of locations */ - struct text ltext[LOCSIZ]; /* long loc description */ - struct text stext[LOCSIZ]; /* short loc descriptions */ +extern struct text ltext[LOCSIZ]; /* long loc description */ +extern struct text stext[LOCSIZ]; /* short loc descriptions */ - struct travlist { /* direcs & conditions of travel*/ - struct travlist *next; /* ptr to next list entry */ - int conditions; /* m in writeup (newloc / 1000) */ - int tloc; /* n in writeup (newloc % 1000) */ - int tverb; /* the verb that takes you there*/ - } *travel[LOCSIZ], *tkk; /* travel is closer to keys(...)*/ +extern struct travlist { /* direcs & conditions of travel*/ + struct travlist *next; /* ptr to next list entry */ + int conditions; /* m in writeup (newloc / 1000) */ + int tloc; /* n in writeup (newloc % 1000) */ + int tverb; /* the verb that takes you there*/ +} *travel[LOCSIZ], *tkk; /* travel is closer to keys(...)*/ - int atloc[LOCSIZ]; +extern int atloc[LOCSIZ]; - int plac[101]; /* initial object placement */ - int fixd[101], fixed[101]; /* location fixed? */ +extern int plac[101]; /* initial object placement */ +extern int fixd[101], fixed[101]; /* location fixed? */ - int actspk[35]; /* rtext msg for verb <n> */ +extern int actspk[35]; /* rtext msg for verb <n> */ - int cond[LOCSIZ]; /* various condition bits */ +extern int cond[LOCSIZ]; /* various condition bits */ - extern int setbit[16]; /* bit defn masks 1,2,4,... */ +extern int setbit[16]; /* bit defn masks 1,2,4,... */ - int hntmax; - int hints[20][5]; /* info on hints */ - int hinted[20], hintlc[20]; +extern int hntmax; +extern int hints[20][5]; /* info on hints */ +extern int hinted[20], hintlc[20]; - int place[101], prop[101], linkx[201]; - int abb[LOCSIZ]; +extern int place[101], prop[101], linkx[201]; +extern int abb[LOCSIZ]; - int maxtrs, tally, tally2; /* treasure values */ +extern int maxtrs, tally, tally2; /* treasure values */ #define FALSE 0 #define TRUE 1 - int keys, lamp, grate, cage, rod, rod2, steps, /* mnemonics */ +extern int keys, lamp, grate, cage, rod, rod2, steps, /* mnemonics */ bird, door, pillow, snake, fissur, tablet, clam, oyster, magzin, dwarf, knife, food, bottle, water, oil, plant, plant2, axe, mirror, dragon, chasm, troll, troll2, bear, messag, vend, batter, @@ -181,69 +178,69 @@ struct text enter, stream, pour, say, lock, throw, find, invent; - int chloc, chloc2, dseen[7], dloc[7], /* dwarf stuff */ +extern int chloc, chloc2, dseen[7], dloc[7], /* dwarf stuff */ odloc[7], dflag, daltlc; - int tk[21], stick, dtotal, attack; - int turns, lmwarn, iwest, knfloc, detail, /* various flags & counters */ +extern int tk[21], stick, dtotal, attack; +extern int turns, lmwarn, iwest, knfloc, detail, /* various flags & counters */ abbnum, maxdie, numdie, holdng, dkill, foobar, bonus, clock1, clock2, closng, apanic, closed, scorng; - int demo, limit; - - int at(int objj); - int bug(int n); - void carry(int, int); - void caveclose(void); - void checkhints(void); - void ciao(void); - void closing(void); - u_long crc(const char *ptr, int nr); - void crc_start(void); - int dark(void); - void datime(int *d, int *t); - char *decr(int, int, int, int, int); - void die(int entry); - void done(int entry); - void drop(int object, int where); - void dstroy(int); - int fdwarf(void); - int forced(int locc); - void getin(char **wrd1, char **wrd2); - int here(int objj); - void my_init(void); - void juggle(int); - int liq(void); - int liqloc(int locc); - int march(void); - void move(int, int); - void mspeak(int); - int pct(int n); - void poof(void); - void pspeak(int m, int skip); - int put(int, int, int); - int ran(int range); - void rdata(void); - int restore(const char *infile); - void rspeak(int); - int save(const char *); - int score(void); - void speak(const struct text *); - int Start(void); - void startup(void); - int toting(int objj); - void trapdel(int sig); - int trdrop(void); - int trfeed(void); - int trfill(void); - int trkill(void); - int tropen(void); - int trsay(void); - int trtake(void); - int trtoss(void); - int vocab(const char *, int, int); - int yes(int x, int y, int z); - int yesm(int x, int y, int z); +extern int demo, limit; + +int at(int objj); +int bug(int n); +void carry(int, int); +void caveclose(void); +void checkhints(void); +void ciao(void); +void closing(void); +u_long crc(const char *ptr, int nr); +void crc_start(void); +int dark(void); +void datime(int *d, int *t); +char *decr(int, int, int, int, int); +void die(int entry); +void done(int entry); +void drop(int object, int where); +void dstroy(int); +int fdwarf(void); +int forced(int locc); +void getin(char **wrd1, char **wrd2); +int here(int objj); +void my_init(void); +void juggle(int); +int liq(void); +int liqloc(int locc); +int march(void); +void move(int, int); +void mspeak(int); +int pct(int n); +void poof(void); +void pspeak(int m, int skip); +int put(int, int, int); +int ran(int range); +void rdata(void); +int restore(const char *infile); +void rspeak(int); +int save(const char *); +int score(void); +void speak(const struct text *); +int Start(void); +void startup(void); +int toting(int objj); +void trapdel(int sig); +int trdrop(void); +int trfeed(void); +int trfill(void); +int trkill(void); +int tropen(void); +int trsay(void); +int trtake(void); +int trtoss(void); +int vocab(const char *, int, int); +int yes(int x, int y, int z); +int yesm(int x, int y, int z); /* We need to get a little tricky to avoid strings */ /* #define DECR(a,b,c,d,e) decr('a'+'+','b'+'-','c'+'#','d'+'&','e'+'%') */ diff --git a/examples/dreamcast/conio/adventure/init.c b/examples/dreamcast/conio/adventure/init.c index 261a100..dc5a466 100644 --- a/examples/dreamcast/conio/adventure/init.c +++ b/examples/dreamcast/conio/adventure/init.c @@ -54,6 +54,7 @@ static const char rcsid[] = int blklin = TRUE; +/* bit defn masks 1,2,4,... */ int setbit[16] = {1, 2, 4, 010, 020, 040, 0100, 0200, 0400, 01000, 02000, 04000, 010000, 020000, 040000, 0100000 }; diff --git a/examples/dreamcast/cpp/Makefile b/examples/dreamcast/cpp/Makefile index 4d0a65a..0b7faab 100644 --- a/examples/dreamcast/cpp/Makefile +++ b/examples/dreamcast/cpp/Makefile @@ -9,17 +9,20 @@ all: $(KOS_MAKE) -C dcplib $(KOS_MAKE) -C clock $(KOS_MAKE) -C modplug_test + $(KOS_MAKE) -C out_of_memory clean: $(KOS_MAKE) -C gltest clean $(KOS_MAKE) -C dcplib clean $(KOS_MAKE) -C clock clean $(KOS_MAKE) -C modplug_test clean - + $(KOS_MAKE) -C out_of_memory clean + dist: $(KOS_MAKE) -C gltest dist $(KOS_MAKE) -C dcplib dist $(KOS_MAKE) -C clock dist $(KOS_MAKE) -C modplug_test dist + $(KOS_MAKE) -C out_of_memory dist diff --git a/examples/dreamcast/cpp/out_of_memory/Makefile b/examples/dreamcast/cpp/out_of_memory/Makefile new file mode 100644 index 0000000..0d05a2b --- /dev/null +++ b/examples/dreamcast/cpp/out_of_memory/Makefile @@ -0,0 +1,29 @@ +# +# C++ out-of-memory demonstration +# (c)2023 Falco Girgis +# + +TARGET = out_of_memory.elf +OBJS = out_of_memory.o +KOS_CPPFLAGS += -fexceptions + +all: rm-elf $(TARGET) + +include $(KOS_BASE)/Makefile.rules + +clean: + -rm -f $(TARGET) $(OBJS) + +rm-elf: + -rm -f $(TARGET) + +$(TARGET): $(OBJS) + kos-c++ -o $(TARGET) $(OBJS) -lm + +run: $(TARGET) + $(KOS_LOADER) $(TARGET) ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |