From: ljsebald <ljs...@us...> - 2023-11-22 14:34: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 8aa26e9089de3928faca950a9ad73ad3a392e9d2 (commit) via 9142f596220cf284cb926fc50f5eeec506a63f4a (commit) via 71540de622403aad56876323e6c3c67171eef26a (commit) from c37b8e2ac30db217eb1c217f6b1f314d19dcd3e2 (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 8aa26e9089de3928faca950a9ad73ad3a392e9d2 Merge: 9142f59 71540de Author: Lawrence Sebald <ljs...@us...> Date: Wed Nov 22 09:32:32 2023 -0500 Merge pull request #380 from KallistiOS/readme_update Updated main repo and documentation README commit 9142f596220cf284cb926fc50f5eeec506a63f4a Author: Paul Cercueil <pa...@cr...> Date: Wed Nov 22 15:31:09 2023 +0100 Modularizing KOS, my take (#360) * cdefs.h: Add and use __weak, __used, likely() and unlikely() Add __weak and __used tokens, and use them in the places were the corresponding GCC attributes were used. Add likely() and unlikely() macros, which are yet to be used anywhere. Signed-off-by: Paul Cercueil <pa...@cr...> * fs_romdisk: Make init/shutdown functions void-typed They would always return 0, and the calling code would never check the error code anyway. So they might just as well not return any value. Signed-off-by: Paul Cercueil <pa...@cr...> * exports: Make export_init() and nmmgr_init() void-typed Their potential errors (which in practice will never happen) were ignored by the init code. Therefore it's just simpler to make these functions void-typed. Signed-off-by: Paul Cercueil <pa...@cr...> * maple: Make init functions void-typed The calling code would never check the error code, so they might just as well not return any value. Signed-off-by: Paul Cercueil <pa...@cr...> * fs_romdisk: Make builtin romdisk mount function void-typed The potential error codes is ignored by the init code anyway, so it can be converted to void-typed. Signed-off-by: Paul Cercueil <pa...@cr...> * Make '__kos_init_flags' const It does not need to be mutable and the user shouldn't update it at runtime. Use this occasion to also update from using the deprecated uint32 type to uint32_t. Signed-off-by: Paul Cercueil <pa...@cr...> * Add and use new macros for init/shutdown functions The KOS_INIT_FLAG_EXPORT() is supposed to be used within KOS_INIT_FLAGS(). It will override the weak symbol associated with the function with a strong one, that points to this function if the flag is set, or is NULL if the flag is cleared. The KOS_INIT_FLAG_WEAK() should be used to declare the weak symbol for the init/shutdown function. Finally, the init/shutdown function can be called with KOS_INIT_FLAG_CALL(). If the flag has not been set, the function will not be called, and will be automatically garbage-collected by the compiler. Signed-off-by: Paul Cercueil <pa...@cr...> * Add support for arch-specific init flags This will later allow programs to pick which parts of the hardware should be initialized by KallistiOS. Signed-off-by: Paul Cercueil <pa...@cr...> * Add init flags for all Maple drivers Add init flags for all Maple drivers, so that a program can configure which peripherals should be supported by KallistiOS (the default being all of them). The compiler will then garbage-collect the init/shutdown functions (and all related code) of the disabled Maple drivers. Signed-off-by: Paul Cercueil <pa...@cr...> * Add weak init/shutdown of the whole Maple bus If none of the Maple drivers have been enabled, we can skip initialization/shutdown of the whole Maple bus, allowing the compiler to garbage-collect more code. Signed-off-by: Paul Cercueil <pa...@cr...> * Enable VMU FS according to init flags Use weak init/shutdown functions for the VMU FS. This allows the VMU FS code to be automatically garbage-collected if the INIT_VMU init flag has not been set (it is set by default). Signed-off-by: Paul Cercueil <pa...@cr...> --------- Signed-off-by: Paul Cercueil <pa...@cr...> commit 71540de622403aad56876323e6c3c67171eef26a Author: Falco Girgis <gyr...@gm...> Date: Wed Nov 22 02:14:10 2023 -0600 Updated main repo and documentation README - Added a header with a link to the up-to-date Doxygen, to make it easier for people to find - Expounded upon language and API support more in the Overview - Reworded a lot of things - Added mention of a few peripherals and drivers ----------------------------------------------------------------------- Summary of changes: README.md | 48 ++++++++---- doc/CHANGELOG | 2 + include/kos/cdefs.h | 43 ++++++++++- include/kos/exports.h | 7 +- include/kos/fs_romdisk.h | 4 +- include/kos/init.h | 87 ++++++++++++---------- include/kos/init_base.h | 67 +++++++++++++++++ include/kos/nmmgr.h | 2 +- kernel/arch/dreamcast/hardware/hardware.c | 20 +++-- kernel/arch/dreamcast/hardware/maple/controller.c | 5 +- kernel/arch/dreamcast/hardware/maple/dreameye.c | 5 +- kernel/arch/dreamcast/hardware/maple/keyboard.c | 5 +- kernel/arch/dreamcast/hardware/maple/lightgun.c | 5 +- .../dreamcast/hardware/maple/maple_init_shutdown.c | 62 +++++++++------ kernel/arch/dreamcast/hardware/maple/mouse.c | 5 +- kernel/arch/dreamcast/hardware/maple/purupuru.c | 5 +- kernel/arch/dreamcast/hardware/maple/sip.c | 5 +- kernel/arch/dreamcast/hardware/maple/vmu.c | 5 +- kernel/arch/dreamcast/include/arch/init_flags.h | 65 +++++++++++++++- kernel/arch/dreamcast/include/dc/maple.h | 6 +- .../arch/dreamcast/include/dc/maple/controller.h | 2 +- kernel/arch/dreamcast/include/dc/maple/dreameye.h | 2 +- kernel/arch/dreamcast/include/dc/maple/keyboard.h | 2 +- kernel/arch/dreamcast/include/dc/maple/lightgun.h | 2 +- kernel/arch/dreamcast/include/dc/maple/mouse.h | 2 +- kernel/arch/dreamcast/include/dc/maple/purupuru.h | 2 +- kernel/arch/dreamcast/include/dc/maple/sip.h | 2 +- kernel/arch/dreamcast/include/dc/maple/vmu.h | 2 +- kernel/arch/dreamcast/kernel/init.c | 68 +++++++++-------- kernel/exports/exports.c | 11 +-- kernel/exports/nmmgr.c | 13 ++-- kernel/fs/fs_romdisk.c | 12 +-- kernel/libc/koslib/abort.c | 2 +- kernel/romdisk/romdiskbase.c | 4 +- 34 files changed, 388 insertions(+), 191 deletions(-) create mode 100644 include/kos/init_base.h diff --git a/README.md b/README.md index 2a2ac24..64d7106 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,60 @@ -# KallistiOS -KOS is an unofficial development environment for the SEGA Dreamcast game console with some support for the NAOMI and NAOMI 2 arcade boards. +<!-- PROJECT LOGO --> +<br /> +<div align="center"> + <h1 align="center">KallistiOS</h1> + + <p align="center"> + Independent SDK for the Sega Dreamcast + <br /> + <a href="https://kos-docs.dreamcast.wiki"><strong>Explore the docs »</strong></a> + </p> +</div> + +## Overview + +KOS is an unofficial development kit for the SEGA Dreamcast game console with some support for the NAOMI and NAOMI 2 arcade boards. 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 portions of C23 and C++23, 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. Using the latest GCC toolchain, it supports the entirety of C17 and C++20 including their standard libraries, along with support for portions of C23, C++23, Objective-C, and various POSIX APIs. Additionally, KOS-ports offers a rich set of add-on libraries such as SDL, OpenGL, OpenAL, and Lua for the platform. ## Features ### Core Functionality -* Concurrency with Kernel Threads, C11 Threads, C++11 `std::thread`, Pthreads -* Virtual filesystem abstraction -* IPv4/IPv6 Network stack -* Dynamically loading libraries/modules -* GDB Debug stubs +* Concurrency with Kernel Threads, C11 Threads, C++11 `std::thread`, POSIX threads +* Virtual Filesystem Abstraction +* IPv4/IPv6 Network Stack +* Dynamically Loaded Libraries and Modules +* GDB Debugger Support ### Dreamcast Hardware Support -* GD-Rom driver +* GD-ROM Optical Drive * Low-level 3D PowerVR Graphics * SH4 ASM-Optimized Math Routines * SH4 SCIF Serial I/O * DMA Controller -* Flashrom Access +* Flashrom Filesystem * AICA SPU Sound Processor Driver * Cache and Store Queue Management -* Timer Peripherals, Real-Time Clock, Performance Counters -* MMU Management API +* Timer Peripherals, Real-Time Clock, Watchdog Timer +* Performance Counters +* MMU Management * BIOS Font Rendering ### Peripherals and Accessory Support +* Controller, ASCII Pad +* Arcade Stick, Twin Stick, Mission Stick +* Keyboard +* Mouse * Visual Memory Unit * Puru Puru Vibration Pack * Seaman Microphone * Dreameye Webcam * Lightgun -* Keyboard -* Mouse +* Racing Wheel +* Fishing Rod +* Samba De Amigo Maracas +* Dance Mat * Dial-up Modem * Broadband Adapter * LAN Adapter diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 26be8ae..f8c8c7b 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -207,6 +207,8 @@ KallistiOS version 2.1.0 ----------------------------------------------- - *** Added <netinet/tcp.h> header file and required option [LS] - *** Added <netinet/udp.h> and <netinet/udplite.h> headers and move the related content from <netinet/in.h> [LS] +- *** Added __weak, __used, likely() and unlikely() [FG] +- DC Added Maple-specific KOS_INIT_FLAGS() which allow for GC-ing unused drivers [FG] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Megan Potter == MP] diff --git a/include/kos/cdefs.h b/include/kos/cdefs.h index a2f222d..439ba1c 100644 --- a/include/kos/cdefs.h +++ b/include/kos/cdefs.h @@ -3,18 +3,21 @@ kos/cdefs.h Copyright (C) 2002, 2004 Megan Potter Copyright (C) 2020, 2023 Lawrence Sebald + Copyright (C) 2023 Falco Girgis Based loosely around some stuff in BSD's sys/cdefs.h */ /** \file kos/cdefs.h - \brief Potentially useful definitions for C Programs. + \brief Definitions for builtin attributes and compiler directives This file contains definitions of various __attribute__ directives in - shorter forms for use in programs (to aid in optimization, mainly). + shorter forms for use in programs. These typically aid in optimizations + or provide the compiler with extra information about a symbol. \author Megan Potter \author Lawrence Sebald + \author Falco Girgis */ #ifndef __KOS_CDEFS_H @@ -45,6 +48,16 @@ #define __unused __attribute__((__unused__)) #endif +#ifndef __used +/** \brief Prevent a symbol from being removed from the binary. */ +#define __used __attribute__((used)) +#endif + +#ifndef __weak +/** \brief Identify a function or variable that may be overriden by another symbol. */ +#define __weak __attribute__((weak)) +#endif + #ifndef __dead2 /** \brief Alias for \ref __noreturn. For BSD compatibility. */ #define __dead2 __noreturn /* BSD compat */ @@ -55,6 +68,32 @@ #define __pure2 __pure /* ditto */ #endif +#ifndef likely +/** \brief Directive to inform the compiler the condition is in the likely path. + + This can be used around conditionals or loops to help inform the + compiler which path to optimize for as the common-case. + + \param exp Boolean expression which expected to be true. + + \sa unlikely() +*/ +#define likely(exp) __builtin_expect(!!(exp), 1) +#endif + +#ifndef unlikely +/** \brief Directive to inform the compiler the condition is in the unlikely path. + + This can be used around conditionals or loops to help inform the + compiler which path to optimize against as the infrequent-case. + + \param exp Boolean expression which is expected to be false. + + \sa likely() +*/ +#define unlikely(exp) __builtin_expect(!!(exp), 0) +#endif + #ifndef __deprecated /** \brief Mark something as deprecated. This should be used to warn users that a function/type/etc will be removed diff --git a/include/kos/exports.h b/include/kos/exports.h index f5f816a..d7d9a76 100644 --- a/include/kos/exports.h +++ b/include/kos/exports.h @@ -55,11 +55,8 @@ typedef struct symtab_handler { } symtab_handler_t; #endif -/** \brief Setup initial kernel exports. - \retval 0 On success - \retval -1 On error -*/ -int export_init(void); +/** \brief Setup initial kernel exports. */ +void export_init(void); /** \brief Look up a symbol by name. \param name The symbol to look up diff --git a/include/kos/fs_romdisk.h b/include/kos/fs_romdisk.h index a4a45ff..35a3763 100644 --- a/include/kos/fs_romdisk.h +++ b/include/kos/fs_romdisk.h @@ -32,10 +32,10 @@ __BEGIN_DECLS /** \cond */ /* Initialize the file system */ -int fs_romdisk_init(void); +void fs_romdisk_init(void); /* De-init the file system; also unmounts any mounted images. */ -int fs_romdisk_shutdown(void); +void fs_romdisk_shutdown(void); /** \endcond */ /* NOTE: the mount/unmount are _not_ thread safe as regards doing multiple diff --git a/include/kos/init.h b/include/kos/init.h index 4b563fe..341e04d 100644 --- a/include/kos/init.h +++ b/include/kos/init.h @@ -3,6 +3,8 @@ include/kos/init.h Copyright (C) 2001 Megan Potter Copyright (C) 2023 Lawrence Sebald + Copyright (C) 2023 Paul Cercueil + Copyright (C) 2023 Falco Girgis */ @@ -14,9 +16,13 @@ architecture-independent are specified here, however this file also includes the architecture-specific file to bring in those flags as well. - \author Lawrence Sebald + \sa arch/init_flags.h + \sa kos/init_base.h + \author Megan Potter - \see arch/init_flags.h + \author Lawrence Sebald + \author Paul Cercueil + \author Falco Girgis */ #ifndef __KOS_INIT_H @@ -25,44 +31,43 @@ #include <kos/cdefs.h> __BEGIN_DECLS -#include <arch/types.h> #include <arch/init_flags.h> +#include <kos/init_base.h> +#include <stdint.h> + +/** \brief Exports and initializes the given KOS subsystems. -/** \brief Use this macro to determine the level of initialization you'd like - in your program by default. + KOS_INIT_FLAGS() provides a mechanism through which various components + of KOS can be enabled and initialized depending on whether their flag + has been included within the list. - The defaults will be fine for most things, and will be used if you do not - specify any init flags yourself. + \note + When no KOS_INIT_FLAGS() have been explicitly provided, the default + flags used by KOS are equivalent to KOS_INIT_FLAGS(INIT_DEFAULT). \param flags Parts of KOS to init. - \see kos_initflags - \see dreamcast_initflags -*/ -#define KOS_INIT_FLAGS(flags) \ - uint32 __kos_init_flags = (flags); \ - extern void arch_init_net(void); \ - void (*init_net_weak)(void) = ((flags) & INIT_NET) ? arch_init_net : NULL; \ - extern void net_shutdown(void); \ - void (*net_shutdown_weak)(void) = ((flags) & INIT_NET) ? net_shutdown : NULL; \ - extern void bba_la_init(void); \ - void (*bba_la_init_weak)(void) = ((flags) & INIT_NET) ? bba_la_init : NULL; \ - extern void bba_la_shutdown(void); \ - void (*bba_la_shutdown_weak)(void) = ((flags) & INIT_NET) ? bba_la_shutdown : NULL; \ - extern int fs_romdisk_init(void); \ - int (*fs_romdisk_init_weak)(void) = ((flags) & INIT_FS_ROMDISK) ? fs_romdisk_init : NULL; \ - extern int fs_romdisk_shutdown(void); \ - int (*fs_romdisk_shutdown_weak)(void) = ((flags) & INIT_FS_ROMDISK) ? fs_romdisk_shutdown : NULL; \ - extern int export_init(void); \ - int (*export_init_weak)(void) = ((flags) & INIT_EXPORT) ? export_init : NULL - -/** \brief The init flags. Do not modify this directly! */ -extern uint32 __kos_init_flags; + */ + #define KOS_INIT_FLAGS(flags) \ + const uint32_t __kos_init_flags = (flags); \ + KOS_INIT_FLAG(flags, INIT_NET, arch_init_net); \ + KOS_INIT_FLAG(flags, INIT_NET, net_shutdown); \ + KOS_INIT_FLAG(flags, INIT_NET, bba_la_init); \ + KOS_INIT_FLAG(flags, INIT_NET, bba_la_shutdown); \ + KOS_INIT_FLAG(flags, INIT_FS_ROMDISK, fs_romdisk_init); \ + KOS_INIT_FLAG(flags, INIT_FS_ROMDISK, fs_romdisk_shutdown); \ + KOS_INIT_FLAG(flags, INIT_EXPORT, export_init); \ + KOS_INIT_FLAGS_ARCH(flags) + +/** \cond */ +extern const uint32_t __kos_init_flags; +/** \endcond */ /** \brief Deprecated and not useful anymore. */ #define KOS_INIT_ROMDISK(rd) \ void *__kos_romdisk = (rd); \ - extern int fs_romdisk_mount_builtin(void); \ - int (*fs_romdisk_mount_builtin_weak_legacy)(void) = fs_romdisk_mount_builtin + extern void fs_romdisk_mount_builtin_legacy(void); \ + void (*fs_romdisk_mount_builtin_legacy_weak)(void) = fs_romdisk_mount_builtin_legacy + /** \brief Built-in romdisk. Do not modify this directly! */ extern void * __kos_romdisk; @@ -87,18 +92,18 @@ extern void * __kos_romdisk; @{ */ /** \brief Default init flags (IRQs on, preemption enabled, romdisks). */ -#define INIT_DEFAULT \ - (INIT_IRQ | INIT_THD_PREEMPT | INIT_FS_ROMDISK) +#define INIT_DEFAULT (INIT_IRQ | INIT_THD_PREEMPT | INIT_FS_ROMDISK | \ + INIT_DEFAULT_ARCH) -#define INIT_NONE 0x0000 /**< \brief Don't init optional things */ -#define INIT_IRQ 0x0001 /**< \brief Enable IRQs at startup */ +#define INIT_NONE 0x00000000 /**< \brief Don't init optional things */ +#define INIT_IRQ 0x00000001 /**< \brief Enable IRQs at startup */ /* Preemptive mode is the only mode now. Keeping define for compatability. */ -#define INIT_THD_PREEMPT 0x0002 /**< \brief Enable thread preemption */ -#define INIT_NET 0x0004 /**< \brief Enable built-in networking */ -#define INIT_MALLOCSTATS 0x0008 /**< \brief Enable malloc statistics */ -#define INIT_QUIET 0x0010 /**< \brief Disable dbgio */ -#define INIT_EXPORT 0x0020 /**< \brief Export kernel symbols */ -#define INIT_FS_ROMDISK 0x0040 /**< \brief Enable support for romdisks */ +#define INIT_THD_PREEMPT 0x00000002 /**< \deprecated Already default mode */ +#define INIT_NET 0x00000004 /**< \brief Enable built-in networking */ +#define INIT_MALLOCSTATS 0x00000008 /**< \brief Enable malloc statistics */ +#define INIT_QUIET 0x00000010 /**< \brief Disable dbgio */ +#define INIT_EXPORT 0x00000020 /**< \brief Export kernel symbols */ +#define INIT_FS_ROMDISK 0x00000040 /**< \brief Enable support for romdisks */ /** @} */ __END_DECLS diff --git a/include/kos/init_base.h b/include/kos/init_base.h new file mode 100644 index 0000000..8fe7034 --- /dev/null +++ b/include/kos/init_base.h @@ -0,0 +1,67 @@ +/* KallistiOS ##version## + + include/kos/init_base.h + Copyright (C) 2023 Falco Girgis + +*/ + +/** \file kos/init_base.h + \brief Shared initialization macros and utilities + + This file contains common utilities which can be included within + architecture-specific `init_flags.h` files, providing a base + layer of infrastructure for managing initialization flags. + + \sa kos/init.h + \sa arch/init_flags.h + + \author Falco Girgis +*/ + +#ifndef __KOS_INIT_BASE_H +#define __KOS_INIT_BASE_H + +#include <kos/cdefs.h> +__BEGIN_DECLS + +/** \cond */ + +/* Declares a weak function pointer which can be optionally + overridden and given a value later. */ +#define KOS_INIT_FLAG_WEAK(func, dft_on) \ + void (*func##_weak)(void) __weak = (dft_on) ? func : NULL + +/* Invokes the given function if its weak function pointer + has been overridden to point to a valid function. */ +#define KOS_INIT_FLAG_CALL(func) ({ \ + int ret = 0; \ + if(func##_weak) { \ + (*func##_weak)(); \ + ret = 1; \ + } \ + ret; \ +}) + +/* Export the given function pointer by assigning it to the weak function + * pointer if the given flags value contains all the flags set in the mask. */ +#define KOS_INIT_FLAG_ALL(flags, mask, func) \ + extern void func(void); \ + void (*func##_weak)(void) = ((flags) & (mask)) == (mask) ? func : NULL + +/* Export the given function by assigning it to the weak function pointer if the + given flags value contains none of the flags set in the mask. */ +#define KOS_INIT_FLAG_NONE(flags, mask, func) \ + extern void func(void); \ + void (*func##_weak)(void) = ((flags) & (mask)) ? NULL : func + +/* Export the given function by assigning it to the weak function pointer if the + given flags value contains the selected flag */ +#define KOS_INIT_FLAG(flags, mask, func) \ + extern void func(void); \ + void (*func##_weak)(void) = ((flags) & (mask)) ? func : NULL + +/** \endcond */ + +__END_DECLS + +#endif /* !__ARCH_INIT_BASE_H */ diff --git a/include/kos/nmmgr.h b/include/kos/nmmgr.h index ad48284..e80d058 100644 --- a/include/kos/nmmgr.h +++ b/include/kos/nmmgr.h @@ -127,7 +127,7 @@ int nmmgr_handler_remove(nmmgr_handler_t *hnd); /** \cond */ /* Name manager init */ -int nmmgr_init(void); +void nmmgr_init(void); void nmmgr_shutdown(void); /** \endcond */ diff --git a/kernel/arch/dreamcast/hardware/hardware.c b/kernel/arch/dreamcast/hardware/hardware.c index 7f15b50..c37066c 100644 --- a/kernel/arch/dreamcast/hardware/hardware.c +++ b/kernel/arch/dreamcast/hardware/hardware.c @@ -5,7 +5,9 @@ Copyright (C) 2013 Lawrence Sebald */ +#include <stdbool.h> #include <arch/arch.h> +#include <kos/init.h> #include <dc/spu.h> #include <dc/video.h> #include <dc/cdrom.h> @@ -40,8 +42,6 @@ int hardware_sys_init(void) { return 0; } -void (*bba_la_init_weak)(void) __attribute__((weak)); -void (*bba_la_shutdown_weak)(void) __attribute__((weak)); void bba_la_init(void) { /* Setup network (this won't do anything unless we enable netcore) */ @@ -54,6 +54,10 @@ void bba_la_shutdown(void) { bba_shutdown(); } +KOS_INIT_FLAG_WEAK(bba_la_init, false); +KOS_INIT_FLAG_WEAK(bba_la_shutdown, false); +KOS_INIT_FLAG_WEAK(maple_init, true); + int hardware_periph_init(void) { /* Init sound */ spu_init(); @@ -65,14 +69,13 @@ int hardware_periph_init(void) { #endif /* Setup maple bus */ - maple_init(); + KOS_INIT_FLAG_CALL(maple_init); /* Init video */ vid_init(DEFAULT_VID_MODE, DEFAULT_PIXEL_MODE); #ifndef _arch_sub_naomi - if(bba_la_init_weak) - (*bba_la_init_weak)(); + KOS_INIT_FLAG_CALL(bba_la_init); #endif initted = 2; @@ -80,14 +83,15 @@ int hardware_periph_init(void) { return 0; ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |