|
From: quzar <qu...@us...> - 2025-03-01 17:55: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 f94e9a5b4bb8cfc281fa00884bb04e3da510eb96 (commit)
via c255d3e59d2d46f75b95b3020694c37765c1f531 (commit)
via 69b70d414718de41e9241bcee4266d5103a161dc (commit)
via 0b82f6d39dbc8941025684586caff6f12d460acf (commit)
via d448dd4a093dbef9f9530c13696bf68703786cb0 (commit)
via 90279816136a797b3334bb79102da6a810d3aa08 (commit)
via a8076a56aa2ee6676e19f1982ca2684cb2dec3ee (commit)
via 793cddbb360ce6a0f82ed460b88836663108a082 (commit)
via 01de4c6948b09030515dfec77f314ccc8df4ce69 (commit)
via 02c99c9a32f8af87a259e48b8bfab9626defd82d (commit)
via 16185f57e2ba828df4899bb80f3d0f5036369ccf (commit)
via 8bf3d94c8360e5e7cdabd3595860dac56036142f (commit)
via 2d95f5e56465420273067d2d920e771d6d18c068 (commit)
via 8f4221181e98eb643313c20d180dcdc04c43b82c (commit)
via de6da59523e46b89f3ab193668c49de3d45b974c (commit)
via f497f5fd8d530624a546ded8bccfedb087876d61 (commit)
via 2bad2f3a523c95c5e24c6b88edde8b4d5628236d (commit)
via a36ffe35979dd5cc140afe3b8dd51b892635fd1d (commit)
via f6f50e2d886fb2b6a309625b30236bbedc29cb81 (commit)
via 2c2e3d2606d2e844e936a41e4d780678a9f76504 (commit)
via 36d53a3fc479dc6af9e0dcd11fac61aa56b1061d (commit)
via 72021525d21e19571cebfcec5b3e46d326283df4 (commit)
via 35bd5bc29636897f09eb6afd7dc48d6bf57d0b63 (commit)
via c8887c60fec135d238622a25f50d5f46e6f226da (commit)
via 19e98d7537d37abb0fe563a360e5564260fb383b (commit)
via c34052a24c5fe8ad3ac68298c1f55d8f0be1b46e (commit)
via d37fc9df97d7d50dcf559feffd22d4d535cc9c4d (commit)
via 6900a5bfd775e9835a56e5c65c18a8c0372a15d0 (commit)
via f57ea860c40e508d6d0b8884bf430382c2414b1f (commit)
via 974133fd60dc8a90f0c3acb184118bf738d9039b (commit)
via ac7e73ab95f72eafeeeae22ab66f246394d91c73 (commit)
via b0d20e72c6ae74d3053c187fe2cee594c1f6ba4d (commit)
via a7847b3e13449e22f9f60fe0fff2b629cbd417f7 (commit)
via f07d0b17598d599a5c04fa7e9afecf8c1b081bd9 (commit)
via 8c3148fb5c21ecdfeab02ad80fe10a621a48b84d (commit)
via 071bc16df3d086a191fe25e3ee50498ac3dba77b (commit)
via 588411cd0032385cf64a681bc3292379ae10e4ce (commit)
via a560517a9968edd899c4e98daf8fca4bbb712495 (commit)
via 086ef6f917123d93d6db95d61f4e05fb97c6cff7 (commit)
from bad425592df5401515f296802a05ddfef1afe8b5 (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 f94e9a5b4bb8cfc281fa00884bb04e3da510eb96
Author: QuzarDC <qu...@co...>
Date: Sun Feb 16 23:54:27 2025 -0500
Separate out pvr_misc API.
Split from #539. Split out various misc
global and stats functions matching
`pvr_misc.c`
commit c255d3e59d2d46f75b95b3020694c37765c1f531
Author: QuzarDC <qu...@co...>
Date: Sun Feb 16 16:22:18 2025 -0500
Separate out pvr_mem API.
Split from #539. Split out the pvr_mem API.
This one has to be included at top of pvr.h
as pvr_ptr_t is used throughout.
commit 69b70d414718de41e9241bcee4266d5103a161dc
Author: darc <da...@pr...>
Date: Wed Feb 19 17:56:20 2025 -0600
Simplify toolchain profiles by deprecating older toolchain components
Remove profiles and patches for older toolchains (9.3.0, 10.5.0, 11.5.0, 12.4.0) and Rust dev toolchains.
Support for Newlib versions prior to 4.x now deprecated.
commit 0b82f6d39dbc8941025684586caff6f12d460acf
Author: Tchan0 <617...@us...>
Date: Sun Feb 23 17:41:18 2025 +0100
fix Naomi build after PR 552
The Naomi has some different hardware connected to the Maple Bus (ie, the MIE), eg it will respond with a MAPLE_RESPONSE_BADCMD to a MAPLE_COMMAND_DEVINFO to A0.
So the 'catch all' else in vbl_autodet_callback() must set scan_ready_mask, otherwise maple_wait_scan() in arch_auto_init() will wait endlessly
commit d448dd4a093dbef9f9530c13696bf68703786cb0
Author: Tchan0 <617...@us...>
Date: Sun Feb 23 17:39:03 2025 +0100
fix Naomi build after PR 734
PR 734 introduced a call to DC syscalls, not present on Naomi, making the Naomi programs crash
commit 90279816136a797b3334bb79102da6a810d3aa08
Author: Daniel Roberts <ade...@gm...>
Date: Sun Feb 23 21:16:21 2025 -0600
Fix Alpine dc-chain instructions
commit a8076a56aa2ee6676e19f1982ca2684cb2dec3ee
Author: DC-SWAT <sw...@21...>
Date: Wed Feb 12 22:07:56 2025 +0700
cdrom: Improved work with G1 bus protection system.
- Initiating BIOS checking only if needed.
- Unlocking all memory on the Root Bus for G1 DMA transfers.
commit 793cddbb360ce6a0f82ed460b88836663108a082
Author: DC-SWAT <sw...@21...>
Date: Sat Feb 8 11:44:48 2025 +0700
g1ata: Added defines for the protection system on the G1 bus.
commit 01de4c6948b09030515dfec77f314ccc8df4ce69
Author: Paul Cercueil <pa...@cr...>
Date: Wed Feb 12 14:11:33 2025 +0100
Replace expanded attributes with their cdefs.h macro
We have macros for the "noinline" and "deprecated" attributes, use them.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 02c99c9a32f8af87a259e48b8bfab9626defd82d
Author: Paul Cercueil <pa...@cr...>
Date: Wed Feb 12 14:09:15 2025 +0100
Remove pointless "packed" attributes
None of these structures actually need to be packed, because none of
them have gaps between their fields. This has been verified with static
asserts for every single change.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 16185f57e2ba828df4899bb80f3d0f5036369ccf
Author: QuzarDC <qu...@co...>
Date: Sun Feb 16 12:31:52 2025 -0500
Correct erroneous resetting of output buffer in vmu_pkg_build.
Regression from #907
commit 8bf3d94c8360e5e7cdabd3595860dac56036142f
Author: DC-SWAT <sw...@21...>
Date: Thu Feb 6 15:06:07 2025 +0700
isofs: Short-circuit the cache and use multi-sector reads if possible.
Also fixed check for cdrom_read_sectors_ex() result.
commit 2d95f5e56465420273067d2d920e771d6d18c068
Author: QuzarDC <qu...@co...>
Date: Tue Feb 4 20:16:26 2025 -0500
Separate out pvr_txr API.
Split from #539. Splits out the textures API.
Additionally removed some tabs that snuck in.
commit 8f4221181e98eb643313c20d180dcdc04c43b82c
Author: QuzarDC <qu...@co...>
Date: Tue Feb 4 20:06:38 2025 -0500
Separate out pvr_regs API.
Split from #539. Split out the register defines.
These had to go first in the list of included
headers in pvr.h as pvr_pal.h references some.
commit de6da59523e46b89f3ab193668c49de3d45b974c
Author: QuzarDC <qu...@co...>
Date: Tue Feb 4 19:48:29 2025 -0500
Separate out pvr_pal API.
Split from #539. Split out the palette API.
Also adjust doxygen for pvr_set_pal_format
to properly mark the warning.
commit f497f5fd8d530624a546ded8bccfedb087876d61
Author: QuzarDC <qu...@co...>
Date: Tue Feb 4 19:29:27 2025 -0500
Separate out pvr_dma API.
Split from #539. Split out the dma API from the
main pvr.h. Moved the included subsystem headers
to the bottom of the file and added a note.
Additionally add parens where missing in doxygen
for pvr_sq_set32.
commit 2bad2f3a523c95c5e24c6b88edde8b4d5628236d
Author: QuzarDC <qu...@co...>
Date: Tue Feb 4 15:03:27 2025 -0500
Separate out pvr_fog API.
Split from #539. Split out the fog API from the
main pvr.h. Additionally adjust the formatting of
the doxygen comments slightly (add backticks,
remove brief tags, add \sa refs, etc).
commit a36ffe35979dd5cc140afe3b8dd51b892635fd1d
Author: QuzarDC <qu...@co...>
Date: Fri Feb 7 20:59:01 2025 -0500
Replace memalign with C11 standard alligned_alloc.
commit f6f50e2d886fb2b6a309625b30236bbedc29cb81
Author: QuzarDC <qu...@co...>
Date: Fri Feb 7 20:01:55 2025 -0500
Remove inclusions of non-standard malloc.h
We've blindly used malloc.h for some time when the appropriate
include is just stdlib.h. This switches most uses in the codebase.
commit 2c2e3d2606d2e844e936a41e4d780678a9f76504
Author: QuzarDC <qu...@co...>
Date: Sat Feb 1 00:21:54 2025 -0500
Validate inputs, OOM, and cleanup in vmu_pkg.
commit 36d53a3fc479dc6af9e0dcd11fac61aa56b1061d
Author: Paul Cercueil <pa...@cr...>
Date: Tue Jan 28 15:14:10 2025 +0100
cache: Fix non-working dcache_{flush,purge}_all()
The algorithm of dcache_flush_all() and dcache_purge_all() were
sometimes exhibiting problems under unidentified conditions, in which
case some cache lines were not written back properly to RAM.
This caused all kind of memory corruption problems, when the PVR DMA was
used for transfers with a size above the threshold at which the
"dcache_flush_all()" function is called.
Fix these functions by accessing the cache address array using
association. Since the underlying problem is not fully understood, the
fix is not fully understood either, but it was reported as fixing the
memory corruption in Doom64.
Fixes #928.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 72021525d21e19571cebfcec5b3e46d326283df4
Author: DC-SWAT <sw...@21...>
Date: Sat Feb 8 12:20:09 2025 +0700
asic: Add ability to set a chain of handlers for IRQ's.
commit 35bd5bc29636897f09eb6afd7dc48d6bf57d0b63
Merge: c8887c60 c34052a2
Author: Lawrence Sebald <ljs...@us...>
Date: Thu Feb 6 22:42:48 2025 -0500
Merge pull request #911 from KallistiOS/ansi_cleanups
Ansi cleanups
commit c8887c60fec135d238622a25f50d5f46e6f226da
Merge: 19e98d75 b0d20e72
Author: Donald Haase <qu...@ya...>
Date: Wed Feb 5 18:13:24 2025 -0500
Merge pull request #932 from KallistiOS/shrink_pcaps
Right-size the pcaps buffer.
commit 19e98d7537d37abb0fe563a360e5564260fb383b
Merge: 6900a5bf 974133fd
Author: Donald Haase <qu...@ya...>
Date: Wed Feb 5 18:13:02 2025 -0500
Merge pull request #804 from KallistiOS/revalidate_maple
Persist allocated `maple_device_t`s
commit c34052a24c5fe8ad3ac68298c1f55d8f0be1b46e
Author: QuzarDC <qu...@co...>
Date: Sat Jan 25 16:56:31 2025 -0500
Clean up stray C++ style comments.
We use ISO C style almost everywhere else.
commit d37fc9df97d7d50dcf559feffd22d4d535cc9c4d
Author: QuzarDC <qu...@co...>
Date: Sat Jan 25 16:57:36 2025 -0500
Clean up C++ style comments in sys includes.
commit 6900a5bfd775e9835a56e5c65c18a8c0372a15d0
Merge: f57ea860 ac7e73ab
Author: Lawrence Sebald <ljs...@us...>
Date: Tue Feb 4 15:43:42 2025 -0500
Merge pull request #933 from KallistiOS/dump_b_types
Remove redefined 'BSD-style' types.
commit f57ea860c40e508d6d0b8884bf430382c2414b1f
Merge: bad42559 071bc16d
Author: Lawrence Sebald <ljs...@us...>
Date: Tue Feb 4 15:42:42 2025 -0500
Merge pull request #873 from pcercuei/ico-loader
vmu_pkg: Add function to load VMU icons from .ico files
commit 974133fd60dc8a90f0c3acb184118bf738d9039b
Author: QuzarDC <qu...@co...>
Date: Sat Nov 16 03:53:40 2024 -0500
Adjust rumble example to rely again on dev->valid.
* Remove workarounds for the removal of dev->valid.
* Correct comment as dev->valid is now bool.
* Correct bug that would allow null deref
commit ac7e73ab95f72eafeeeae22ab66f246394d91c73
Author: QuzarDC <qu...@co...>
Date: Mon Feb 3 01:36:31 2025 -0500
Remove redefined 'BSD-style' types.
This should help reduce the possible impact of #840
which describes how types defined in this file escape
out and can conflict with other codebases.
This is in-line with our general move to stdint types
and, as far as I can tell, there was only one use of
these types in the codebase.
commit b0d20e72c6ae74d3053c187fe2cee594c1f6ba4d
Author: QuzarDC <qu...@co...>
Date: Sun Feb 2 03:07:53 2025 -0500
Right-size the pcaps buffer.
There's no reason for it to be 1kb static. The largest we
currently ever return is 36.
commit a7847b3e13449e22f9f60fe0fff2b629cbd417f7
Author: QuzarDC <qu...@co...>
Date: Sat Jan 25 16:54:40 2025 -0500
Clean up comments and 'usleep' in libnavi.
Brings it all more inline with the rest of the codebase's
style and usages.
commit f07d0b17598d599a5c04fa7e9afecf8c1b081bd9
Author: QuzarDC <qu...@co...>
Date: Fri Jan 24 10:20:24 2025 -0500
Forward declare strnlen which is missing in strict ansi.
To match patching like is seen in gethostbyname.c and
others. It might make sense to just relegate these into
cdefs or just no longer care about -ansi.
commit 8c3148fb5c21ecdfeab02ad80fe10a621a48b84d
Author: QuzarDC <qu...@co...>
Date: Sat Nov 16 03:39:50 2024 -0500
Persist allocated maple_device_t's (#804)
* #552 had the unintended impact of breaking usage that
relied on maple_device_ts being static and preallocated.
* Adjust the dynamically allocated dev structures to persist
in the global table. This prevents use-after-frees that
had not been possible with static devices.
* Restore the maple_device_t->valid member with the same
purpose it previously had of noting if an allocated dev
is valid or not.
* Adjust autodetection to use the device's frame for allocated
devices.
commit 071bc16df3d086a191fe25e3ee50498ac3dba77b
Author: Paul Cercueil <pa...@cr...>
Date: Fri Jan 3 21:59:26 2025 +0100
examples: vmu_pkg: Be a bit more explicit about icon size
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 588411cd0032385cf64a681bc3292379ae10e4ce
Author: Paul Cercueil <pa...@cr...>
Date: Fri Jan 3 21:51:58 2025 +0100
Whitespace fixes
No functional changes intended.
Co-authored-by: Lawrence Sebald <ljs...@us...>
Signed-off-by: Paul Cercueil <pa...@cr...>
commit a560517a9968edd899c4e98daf8fca4bbb712495
Author: Paul Cercueil <pa...@cr...>
Date: Mon Dec 23 14:08:18 2024 +0100
examples: vmu_pkg: Add an icon to the save file
Use the function vmu_pkg_load_icon() to add an icon to the save file.
The provided icon was drawn by myself.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 086ef6f917123d93d6db95d61f4e05fb97c6cff7
Author: Paul Cercueil <pa...@cr...>
Date: Sun Dec 22 19:36:12 2024 +0100
vmu_pkg: Add function to load VMU icons from .ico files
Add the function vmu_pkg_load_icon(), which can load a VMU save icon
from a .ico file.
Icon files must be in the ICO file format, be 32x32 in size, contain a
bitmap (no PNG or compressed BMP), and use paletted 4bpp.
They can contain more than one frame, and they can use up to 16 colors
if transparency is not used, or 15 colors otherwise. Finally, all frames
must use the same palette.
This function assumes that the vmu_pkg_t has been properly initialized;
in particular, the .icon_cnt must be set, and the .icon_data must point to
a valid buffer (of 512 bytes per frame).
If the .ico file contains more frames than requested, only the first ones
are loaded. If it contains less frames than requested, the .icon_cnt field
will be updated to the new frame count.
Signed-off-by: Paul Cercueil <pa...@cr...>
-----------------------------------------------------------------------
Summary of changes:
addons/libkosutils/img.c | 2 +-
addons/libnavi/navi_flash.c | 3 +-
addons/libnavi/navi_ide.c | 21 +-
examples/dreamcast/conio/wump/wump.c | 2 +-
.../dreamcast/kgl/basic/elements/gl-elements.c | 1 -
.../dreamcast/kgl/basic/zclip_arrays/gl-arrays.c | 1 -
examples/dreamcast/kgl/demos/specular/font.c | 2 +-
examples/dreamcast/parallax/serpent_dma/serpent.c | 2 +-
examples/dreamcast/pvr/plasma/plasma.c | 2 +-
.../dreamcast/pvr/yuv_converter/YUV420/yuv420.c | 8 +-
.../dreamcast/pvr/yuv_converter/YUV422/yuv422.c | 8 +-
examples/dreamcast/rumble/rumble.c | 14 +-
examples/dreamcast/vmu/vmu_pkg/Makefile | 6 +-
examples/dreamcast/vmu/vmu_pkg/romdisk/ebook.ico | Bin 0 -> 1526 bytes
examples/dreamcast/vmu/vmu_pkg/vmu.c | 13 +-
include/kos/net.h | 13 +-
include/sys/_pthread.h | 2 +-
include/sys/_types.h | 2 +-
include/sys/lock.h | 3 +-
kernel/arch/dreamcast/fs/fs_dcload.c | 2 +-
kernel/arch/dreamcast/fs/fs_dclsocket.c | 8 +-
kernel/arch/dreamcast/fs/fs_iso9660.c | 51 +-
kernel/arch/dreamcast/fs/fs_vmu.c | 3 +-
kernel/arch/dreamcast/fs/vmufs.c | 3 +-
kernel/arch/dreamcast/hardware/asic.c | 10 +-
kernel/arch/dreamcast/hardware/cdrom.c | 68 +-
.../arch/dreamcast/hardware/maple/maple_driver.c | 85 +-
kernel/arch/dreamcast/hardware/maple/maple_enum.c | 11 +-
.../dreamcast/hardware/maple/maple_init_shutdown.c | 21 +-
kernel/arch/dreamcast/hardware/maple/maple_irq.c | 20 +-
kernel/arch/dreamcast/hardware/maple/maple_utils.c | 2 +-
kernel/arch/dreamcast/hardware/sq.c | 2 +-
kernel/arch/dreamcast/hardware/vblank.c | 2 +-
kernel/arch/dreamcast/include/arch/types.h | 25 -
kernel/arch/dreamcast/include/dc/asic.h | 10 +-
kernel/arch/dreamcast/include/dc/g1ata.h | 57 +-
kernel/arch/dreamcast/include/dc/maple.h | 5 +-
kernel/arch/dreamcast/include/dc/maple/keyboard.h | 4 +-
kernel/arch/dreamcast/include/dc/pvr.h | 902 +--------------------
kernel/arch/dreamcast/include/dc/pvr/pvr_dma.h | 260 ++++++
kernel/arch/dreamcast/include/dc/pvr/pvr_fog.h | 133 +++
kernel/arch/dreamcast/include/dc/pvr/pvr_mem.h | 110 +++
kernel/arch/dreamcast/include/dc/pvr/pvr_misc.h | 185 +++++
kernel/arch/dreamcast/include/dc/pvr/pvr_pal.h | 91 +++
kernel/arch/dreamcast/include/dc/pvr/pvr_regs.h | 213 +++++
kernel/arch/dreamcast/include/dc/pvr/pvr_txr.h | 134 +++
kernel/arch/dreamcast/include/dc/scif.h | 2 +-
kernel/arch/dreamcast/include/dc/video.h | 24 +-
kernel/arch/dreamcast/include/dc/vmu_pkg.h | 72 +-
kernel/arch/dreamcast/include/dc/vmufs.h | 11 +-
kernel/arch/dreamcast/kernel/cache.s | 2 +-
kernel/arch/dreamcast/kernel/init.c | 3 +-
kernel/arch/dreamcast/kernel/mmu.c | 2 +-
kernel/arch/dreamcast/kernel/panic.c | 1 -
kernel/arch/dreamcast/sound/snd_sfxmgr.c | 27 +-
kernel/arch/dreamcast/sound/snd_stream.c | 3 +-
kernel/arch/dreamcast/util/vmu_pkg.c | 222 ++++-
kernel/exports/library.c | 2 +-
kernel/exports/nmmgr.c | 3 +-
kernel/fs/elf.c | 5 +-
kernel/fs/fs.c | 2 +-
kernel/fs/fs_dev.c | 2 +-
kernel/fs/fs_null.c | 3 +-
kernel/fs/fs_pty.c | 2 +-
kernel/fs/fs_ramdisk.c | 2 +-
kernel/fs/fs_random.c | 3 +-
kernel/fs/fs_romdisk.c | 2 +-
kernel/fs/fs_socket.c | 3 +-
kernel/fs/fs_utils.c | 2 +-
kernel/libc/koslib/readdir.c | 7 +
kernel/mm/cplusplus.c | 2 +-
kernel/net/net_arp.c | 7 +-
kernel/net/net_core.c | 3 +-
kernel/net/net_dhcp.h | 2 +-
kernel/net/net_icmp.c | 4 +-
kernel/net/net_icmp.h | 4 +-
kernel/net/net_icmp6.h | 34 +-
kernel/net/net_ipv4.h | 6 +-
kernel/net/net_ipv6.h | 12 +-
kernel/net/net_tcp.c | 2 +-
kernel/net/net_udp.c | 10 +-
kernel/thread/genwait.c | 1 -
kernel/thread/sem.c | 2 +-
kernel/thread/thread.c | 4 +-
utils/dc-chain/Makefile.default.cfg | 11 +-
utils/dc-chain/README.md | 6 -
utils/dc-chain/doc/CHANGELOG.md | 1 +
utils/dc-chain/doc/alpine.md | 4 +-
utils/dc-chain/patches/gcc-rs-fix.diff | 25 -
utils/dc-chain/patches/gcc-rs-kos.diff | 162 ----
utils/dc-chain/patches/gcc-rustc-kos.diff | 162 ----
.../patches/{ => historical}/gcc-10.5.0-kos.diff | 0
.../patches/{ => historical}/gcc-11.5.0-kos.diff | 0
.../patches/{ => historical}/gcc-12.4.0-kos.diff | 0
.../patches/{ => historical}/gcc-13.1.0-kos.diff | 0
.../patches/{ => historical}/gcc-9.3.0-kos.diff | 0
.../patches/{ => historical}/newlib-3.3.0-kos.diff | 0
utils/dc-chain/profiles/profile.10.5.0.mk | 35 -
utils/dc-chain/profiles/profile.11.5.0.mk | 35 -
utils/dc-chain/profiles/profile.12.4.0.mk | 35 -
utils/dc-chain/profiles/profile.9.3.0-legacy.mk | 35 -
utils/dc-chain/profiles/profile.gccrs-dev.mk | 47 --
utils/dc-chain/profiles/profile.rustc-dev.mk | 47 --
103 files changed, 1796 insertions(+), 1831 deletions(-)
create mode 100644 examples/dreamcast/vmu/vmu_pkg/romdisk/ebook.ico
create mode 100644 kernel/arch/dreamcast/include/dc/pvr/pvr_dma.h
create mode 100644 kernel/arch/dreamcast/include/dc/pvr/pvr_fog.h
create mode 100644 kernel/arch/dreamcast/include/dc/pvr/pvr_mem.h
create mode 100644 kernel/arch/dreamcast/include/dc/pvr/pvr_misc.h
create mode 100644 kernel/arch/dreamcast/include/dc/pvr/pvr_pal.h
create mode 100644 kernel/arch/dreamcast/include/dc/pvr/pvr_regs.h
create mode 100644 kernel/arch/dreamcast/include/dc/pvr/pvr_txr.h
delete mode 100644 utils/dc-chain/patches/gcc-rs-fix.diff
delete mode 100644 utils/dc-chain/patches/gcc-rs-kos.diff
delete mode 100644 utils/dc-chain/patches/gcc-rustc-kos.diff
rename utils/dc-chain/patches/{ => historical}/gcc-10.5.0-kos.diff (100%)
rename utils/dc-chain/patches/{ => historical}/gcc-11.5.0-kos.diff (100%)
rename utils/dc-chain/patches/{ => historical}/gcc-12.4.0-kos.diff (100%)
rename utils/dc-chain/patches/{ => historical}/gcc-13.1.0-kos.diff (100%)
rename utils/dc-chain/patches/{ => historical}/gcc-9.3.0-kos.diff (100%)
rename utils/dc-chain/patches/{ => historical}/newlib-3.3.0-kos.diff (100%)
delete mode 100644 utils/dc-chain/profiles/profile.10.5.0.mk
delete mode 100644 utils/dc-chain/profiles/profile.11.5.0.mk
delete mode 100644 utils/dc-chain/profiles/profile.12.4.0.mk
delete mode 100644 utils/dc-chain/profiles/profile.9.3.0-legacy.mk
delete mode 100644 utils/dc-chain/profiles/profile.gccrs-dev.mk
delete mode 100644 utils/dc-chain/profiles/profile.rustc-dev.mk
diff --git a/addons/libkosutils/img.c b/addons/libkosutils/img.c
index 0fc72f52..3e4ad38d 100644
--- a/addons/libkosutils/img.c
+++ b/addons/libkosutils/img.c
@@ -6,8 +6,8 @@
Platform independent image handling
*/
-#include <malloc.h>
#include <assert.h>
+#include <stdlib.h>
#include <kos/img.h>
/* Free a kos_img_t which was created by an image loader; set struct_also to non-zero
diff --git a/addons/libnavi/navi_flash.c b/addons/libnavi/navi_flash.c
index 16854ea1..dd00a72c 100644
--- a/addons/libnavi/navi_flash.c
+++ b/addons/libnavi/navi_flash.c
@@ -9,6 +9,7 @@
#include <assert.h>
#include <stdio.h>
#include <navi/flash.h>
+#include <kos/thread.h>
/*
@@ -105,7 +106,7 @@ static int nvflash_wait_ready(uint32 addr, int timeout) {
while(timeout-- && nvflash_busy(addr)) {
if(wait)
- usleep(1000);
+ thd_sleep(1);
}
if(timeout <= 0) {
diff --git a/addons/libnavi/navi_ide.c b/addons/libnavi/navi_ide.c
index e540754b..fff802e9 100644
--- a/addons/libnavi/navi_ide.c
+++ b/addons/libnavi/navi_ide.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <navi/ide.h>
#include <dc/g2bus.h>
+#include <kos/thread.h>
/*
A *very* simple port-level ATA-IDE device driver. This was ported up
@@ -36,7 +37,7 @@ static void ide_outp(int port, uint16 value, int size) {
return;
}
- //printf("ide_outp %02x -> %04x(%08x)\n", value, port, addr);
+ /* printf("ide_outp %02x -> %04x(%08x)\n", value, port, addr); */
g2_write_16(addr, value);
}
@@ -76,7 +77,7 @@ static void wait_controller(void) {
int timeout = 1000;
while((inp(0x1f7) & 0x80) && timeout) {
- usleep(1 * 1000);
+ thd_sleep(1);
timeout--;
}
@@ -90,7 +91,7 @@ static void wait_data(void) {
int timeout = 1000;
while(!(inp(0x1f7) & 0x08) && timeout) {
- usleep(1 * 1000);
+ thd_sleep(1);
timeout--;
}
@@ -112,7 +113,7 @@ static char *get_ascii(uint16 *in_data, uint32 off_start, uint32 off_end) {
ret_val [loop1++] = (char)(in_data [loop] % 256); /* Get Low byte */
}
- // Now, go back and eliminate the blank spaces
+ /* Now, go back and eliminate the blank spaces */
for(; (ret_val[loop1] < 'A' || ret_val[loop1] > 'z') && loop1 >= 0 ; loop1--)
ret_val[loop1] = '\0';
@@ -124,8 +125,8 @@ static int ide_read_chs(uint32 cyl, uint32 head, uint32 sector, uint32 numsects,
int o;
uint16 *bufptr16 = (uint16*)bufptr;
- //printf("reading C/H/S/Cnt %d/%d/%d/%d\n",
- // cyl, head, sector, numsects);
+ /** printf("reading C/H/S/Cnt %d/%d/%d/%d\n",
+ cyl, head, sector, numsects); */
wait_controller(); /* wait for controller to be not busy */
@@ -158,8 +159,8 @@ static int ide_write_chs(uint32 cyl, uint32 head, uint32 sector, uint32 numsects
int o;
uint16 *bufptr16 = (uint16*)bufptr;
- //printf("writing C/H/S/Cnt %d/%d/%d/%d\n",
- // cyl, head, sector, numsects);
+ /** printf("writing C/H/S/Cnt %d/%d/%d/%d\n",
+ cyl, head, sector, numsects); */
wait_controller(); /* wait for controller to be not busy */
@@ -248,9 +249,9 @@ int ide_init(void) {
/* Reset */
outp(0x3f6, 0x0e);
- usleep(10 * 1000);
+ thd_sleep(10);
outp(0x3f6, 0x0a);
- usleep(10 * 1000);
+ thd_sleep(10);
wait_controller();
outp(0x1f6, 0xa0); /* get info on first drive. 0xb0 == 2nd */
diff --git a/examples/dreamcast/conio/wump/wump.c b/examples/dreamcast/conio/wump/wump.c
index 9881aa3b..53d26d7e 100644
--- a/examples/dreamcast/conio/wump/wump.c
+++ b/examples/dreamcast/conio/wump/wump.c
@@ -652,7 +652,7 @@ cave_init() {
* make it easier on the intrepid adventurer.
*/
for(i = 1; i <= room_num; ++i)
- qsort(cave[i].tunnel, (u_int)link_num,
+ qsort(cave[i].tunnel, link_num,
sizeof(cave[i].tunnel[0]), int_compare);
#ifdef DEBUG
diff --git a/examples/dreamcast/kgl/basic/elements/gl-elements.c b/examples/dreamcast/kgl/basic/elements/gl-elements.c
index 513358b7..54212b66 100644
--- a/examples/dreamcast/kgl/basic/elements/gl-elements.c
+++ b/examples/dreamcast/kgl/basic/elements/gl-elements.c
@@ -9,7 +9,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <malloc.h>
#include <KGL/gl.h>
#include <KGL/glu.h>
diff --git a/examples/dreamcast/kgl/basic/zclip_arrays/gl-arrays.c b/examples/dreamcast/kgl/basic/zclip_arrays/gl-arrays.c
index 3d0ef7e4..346582b8 100644
--- a/examples/dreamcast/kgl/basic/zclip_arrays/gl-arrays.c
+++ b/examples/dreamcast/kgl/basic/zclip_arrays/gl-arrays.c
@@ -9,7 +9,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <malloc.h>
#include <KGL/gl.h>
#include <KGL/glu.h>
diff --git a/examples/dreamcast/kgl/demos/specular/font.c b/examples/dreamcast/kgl/demos/specular/font.c
index 6490d9ec..97bcdfe6 100644
--- a/examples/dreamcast/kgl/demos/specular/font.c
+++ b/examples/dreamcast/kgl/demos/specular/font.c
@@ -7,8 +7,8 @@
DC Font Render Routine using GL and KOS (C) Josh PH3NOM Pearson 2013
*/
-#include <malloc.h>
#include <stdio.h>
+#include <stdlib.h>
#include <KGL/gl.h>
diff --git a/examples/dreamcast/parallax/serpent_dma/serpent.c b/examples/dreamcast/parallax/serpent_dma/serpent.c
index 11c3924c..bdb51aa1 100644
--- a/examples/dreamcast/parallax/serpent_dma/serpent.c
+++ b/examples/dreamcast/parallax/serpent_dma/serpent.c
@@ -54,7 +54,7 @@ static void sphere(sphere_t *s) { /* {{{ */
float yaw;
pvr_vertex_t *v;
- s->data = (pvr_vertex_t *)memalign(32, s->stacks * (s->slices + 2) * sizeof(pvr_vertex_t));
+ s->data = (pvr_vertex_t *)aligned_alloc(32, s->stacks * (s->slices + 2) * sizeof(pvr_vertex_t));
if(s->data == NULL) return;
v = s->data;
diff --git a/examples/dreamcast/pvr/plasma/plasma.c b/examples/dreamcast/pvr/plasma/plasma.c
index d4f43bd7..958c8f10 100644
--- a/examples/dreamcast/pvr/plasma/plasma.c
+++ b/examples/dreamcast/pvr/plasma/plasma.c
@@ -125,7 +125,7 @@ void pvr_setup(void) {
for(i = 0; i < 2; i++) {
txr[i] = pvr_mem_malloc(64 * 64 * 2);
memset(txr[i], 0, 64 * 64 * 2);
- txr_buf[i] = memalign(32, 64 * 64 * 2);
+ txr_buf[i] = aligned_alloc(32, 64 * 64 * 2);
pvr_poly_cxt_txr(&cxt, PVR_LIST_OP_POLY, PVR_TXRFMT_RGB565, 64, 64, txr[i], PVR_FILTER_BILINEAR);
pvr_poly_compile(&hdr[i], &cxt);
diff --git a/examples/dreamcast/pvr/yuv_converter/YUV420/yuv420.c b/examples/dreamcast/pvr/yuv_converter/YUV420/yuv420.c
index da414647..2536222f 100644
--- a/examples/dreamcast/pvr/yuv_converter/YUV420/yuv420.c
+++ b/examples/dreamcast/pvr/yuv_converter/YUV420/yuv420.c
@@ -35,7 +35,7 @@
*/
#include <stdio.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <arch/arch.h>
#include <arch/cache.h>
@@ -71,9 +71,9 @@ static int load_image(void) {
goto error;
}
- y_plane = memalign(32, FRAME_TEXTURE_WIDTH * FRAME_TEXTURE_HEIGHT);
- u_plane = memalign(32, FRAME_TEXTURE_WIDTH * FRAME_TEXTURE_HEIGHT / 4);
- v_plane = memalign(32, FRAME_TEXTURE_WIDTH * FRAME_TEXTURE_HEIGHT / 4);
+ y_plane = aligned_alloc(32, FRAME_TEXTURE_WIDTH * FRAME_TEXTURE_HEIGHT);
+ u_plane = aligned_alloc(32, FRAME_TEXTURE_WIDTH * FRAME_TEXTURE_HEIGHT / 4);
+ v_plane = aligned_alloc(32, FRAME_TEXTURE_WIDTH * FRAME_TEXTURE_HEIGHT / 4);
if(!y_plane || !u_plane || !v_plane) {
printf("Could not allocate memory for y,u, or v plane\n");
diff --git a/examples/dreamcast/pvr/yuv_converter/YUV422/yuv422.c b/examples/dreamcast/pvr/yuv_converter/YUV422/yuv422.c
index a1bd8036..5b666bc8 100644
--- a/examples/dreamcast/pvr/yuv_converter/YUV422/yuv422.c
+++ b/examples/dreamcast/pvr/yuv_converter/YUV422/yuv422.c
@@ -35,7 +35,7 @@
*/
#include <stdio.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <arch/arch.h>
#include <arch/cache.h>
@@ -71,9 +71,9 @@ static int load_image(void) {
goto error;
}
- y_plane = memalign(32, FRAME_TEXTURE_WIDTH * FRAME_TEXTURE_HEIGHT);
- u_plane = memalign(32, FRAME_TEXTURE_WIDTH * FRAME_TEXTURE_HEIGHT / 2);
- v_plane = memalign(32, FRAME_TEXTURE_WIDTH * FRAME_TEXTURE_HEIGHT / 2);
+ y_plane = aligned_alloc(32, FRAME_TEXTURE_WIDTH * FRAME_TEXTURE_HEIGHT);
+ u_plane = aligned_alloc(32, FRAME_TEXTURE_WIDTH * FRAME_TEXTURE_HEIGHT / 2);
+ v_plane = aligned_alloc(32, FRAME_TEXTURE_WIDTH * FRAME_TEXTURE_HEIGHT / 2);
if(!y_plane || !u_plane || !v_plane) {
printf("Could not allocate memory for y,u, or v plane\n");
diff --git a/examples/dreamcast/rumble/rumble.c b/examples/dreamcast/rumble/rumble.c
index 2cb80e79..521b8452 100644
--- a/examples/dreamcast/rumble/rumble.c
+++ b/examples/dreamcast/rumble/rumble.c
@@ -157,9 +157,10 @@ void wait_for_dev_attach(maple_device_t **dev_ptr, unsigned int func) {
point_t w = {40.0f, 200.0f, 10.0f, 0.0f};
/* If we already have it, and it's still valid, leave */
- /* dev->valid is set to 0 by the driver if the device
+ /* dev->valid is set to false by the driver if the device
is detached, but dev will stay not-null */
- if((dev != NULL) && (maple_dev_valid(dev->port, dev->unit) != 0)) return;
+ if((dev != NULL) && dev->valid)
+ return;
/* Draw up a screen */
pvr_wait_ready();
@@ -178,7 +179,7 @@ void wait_for_dev_attach(maple_device_t **dev_ptr, unsigned int func) {
pvr_scene_finish();
/* Repeatedly check until we find one and it's valid */
- while((dev == NULL) || (maple_dev_valid(dev->port, dev->unit) == 0)) {
+ while((dev == NULL) || !dev->valid) {
*dev_ptr = maple_enum_type(0, func);
dev = *dev_ptr;
usleep(50);
@@ -269,6 +270,11 @@ int main(int argc, char *argv[]) {
/* Store current button states + buttons which have been released. */
state = (cont_state_t *)maple_dev_status(contdev);
+
+ /* Make sure we can rely on the state, otherwise loop. */
+ if(state == NULL)
+ continue;
+
rel_buttons = (old_buttons ^ state->buttons);
if((state->buttons & CONT_DPAD_LEFT) && (rel_buttons & CONT_DPAD_LEFT)) {
@@ -347,7 +353,7 @@ int main(int argc, char *argv[]) {
}
/* Stop rumbling before exiting, if it still exists. */
- if((purudev != NULL) && (maple_dev_valid(purudev->port, purudev->unit) != 0))
+ if((purudev != NULL) && purudev->valid)
purupuru_rumble_raw(purudev, 0x00000000);
plx_font_destroy(fnt);
diff --git a/examples/dreamcast/vmu/vmu_pkg/Makefile b/examples/dreamcast/vmu/vmu_pkg/Makefile
index d1c16bb0..55f247b1 100644
--- a/examples/dreamcast/vmu/vmu_pkg/Makefile
+++ b/examples/dreamcast/vmu/vmu_pkg/Makefile
@@ -7,14 +7,16 @@
TARGET = vmu.elf
# List all of your C files here, but change the extension to ".o"
-OBJS = vmu.o
+OBJS = vmu.o romdisk.o
+
+KOS_ROMDISK_DIR = romdisk
all: rm-elf $(TARGET)
include $(KOS_BASE)/Makefile.rules
clean: rm-elf
- -rm -f $(OBJS)
+ -rm -f $(OBJS) romdisk.img
rm-elf:
-rm -f $(TARGET)
diff --git a/examples/dreamcast/vmu/vmu_pkg/romdisk/ebook.ico b/examples/dreamcast/vmu/vmu_pkg/romdisk/ebook.ico
new file mode 100644
index 00000000..810d99ff
Binary files /dev/null and b/examples/dreamcast/vmu/vmu_pkg/romdisk/ebook.ico differ
diff --git a/examples/dreamcast/vmu/vmu_pkg/vmu.c b/examples/dreamcast/vmu/vmu_pkg/vmu.c
index 65896555..553ef9aa 100644
--- a/examples/dreamcast/vmu/vmu_pkg/vmu.c
+++ b/examples/dreamcast/vmu/vmu_pkg/vmu.c
@@ -10,6 +10,11 @@
#include <kos.h>
+/* An icon is always 32x32 4bpp */
+#define ICON_SIZE (32 * 32 / 2)
+
+#define NB_ICONS_MAX 3
+
void draw_dir(void) {
file_t d;
int y = 88;
@@ -76,6 +81,8 @@ int wait_start(void) {
}
}
+static unsigned char vmu_icon[ICON_SIZE * NB_ICONS_MAX];
+
/* Here's the actual meat of it */
void write_entry(void) {
vmu_pkg_t pkg;
@@ -87,8 +94,9 @@ void write_entry(void) {
strcpy(pkg.desc_short, "VMU Test");
strcpy(pkg.desc_long, "This is a test VMU file");
strcpy(pkg.app_id, "KOS");
- pkg.icon_cnt = 0;
- pkg.icon_anim_speed = 0;
+ pkg.icon_cnt = NB_ICONS_MAX;
+ pkg.icon_data = vmu_icon;
+ pkg.icon_anim_speed = 8;
pkg.eyecatch_type = VMUPKG_EC_NONE;
pkg.data_len = 4096;
pkg.data = data;
@@ -96,6 +104,7 @@ void write_entry(void) {
for(i = 0; i < 4096; i++)
data[i] = i & 255;
+ vmu_pkg_load_icon(&pkg, "/rd/ebook.ico");
vmu_pkg_build(&pkg, &pkg_out, &pkg_size);
fs_unlink("/vmu/a1/TESTFILE");
diff --git a/include/kos/net.h b/include/kos/net.h
index b43ccfb0..26abe780 100644
--- a/include/kos/net.h
+++ b/include/kos/net.h
@@ -220,12 +220,6 @@ typedef struct knetif {
/** \cond */
/* Define the list type */
LIST_HEAD(netif_list, knetif);
-
-#ifdef PACKED
-#undef PACKED
-#endif
-
-#define PACKED __attribute__((packed))
/** \endcond */
/** \defgroup networking_ip IP
@@ -253,7 +247,7 @@ typedef struct ip_hdr_s {
uint16 checksum; /**< \brief IP checksum */
...<truncated>...
hooks/post-receive
--
A pseudo Operating System for the Dreamcast.
|