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
(20) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: falcovorbis <fal...@us...> - 2024-08-19 04:15:26
|
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 8f1db16e84dbbc968567f5bda8c6f96b012b74b1 (commit) via 3d61838a3ee4c93ad4aa83efe3cd0025376e20d6 (commit) via f9f426bae33fa886039aab1f85a6744225aaaa0c (commit) from 3c99eb588dd1ae664b0e42481b15ba8c57381cf3 (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 8f1db16e84dbbc968567f5bda8c6f96b012b74b1 Author: Paul Cercueil <pa...@cr...> Date: Mon Aug 19 06:15:09 2024 +0200 Support chained LBA28 DMA transfers in IDE and DMA transfers in FAT (#662) * g1ata: Factorize code Factorize the code that sets the sector LBA and length of the next transfer, into a dedicated function. Signed-off-by: Paul Cercueil <pa...@cr...> * g1ata: Support chained LBA28 DMA transfers Add support for transferring more than 256 sectors worth of data using DMA on devices that don't support LBA48. This works by cutting the DMA transfer into chunks of 256 sectors, that are transferred automatically: every time a 256-sectors transfer is done, the DMA complete IRQ will start the next one. Signed-off-by: Paul Cercueil <pa...@cr...> * libkosfat: Align buffers to 32 bytes to support DMA Use memalign() to allocate buffers aligned to 32 bytes for those that need it; and also align buffers on the stack when needed. This makes it possible to mount a FAT filesystem on a IDE drive using DMA accesses for faster and CPU-free transfers. Signed-off-by: Paul Cercueil <pa...@cr...> --------- Signed-off-by: Paul Cercueil <pa...@cr...> commit 3d61838a3ee4c93ad4aa83efe3cd0025376e20d6 Author: Paul Cercueil <pa...@cr...> Date: Mon Aug 19 06:09:27 2024 +0200 Fix 24-bit / 32-bit video modes (#697) * video: Configure PVR video mode in vid_set_mode() Also configure the pixel mode at which the PVR will render, instead of only configuring the framebuffer mode. This makes the 24-bit and 32-bit video modes usable with the PVR. Signed-off-by: Paul Cercueil <pa...@cr...> * pvr: Fix PVR rendering for 24/32-bit video modes Replace hardcoded x2 with the corresponding multiplier for the pixel mode. Signed-off-by: Paul Cercueil <pa...@cr...> --------- Signed-off-by: Paul Cercueil <pa...@cr...> commit f9f426bae33fa886039aab1f85a6744225aaaa0c Author: Andy Barajas <and...@gm...> Date: Sun Aug 18 21:06:05 2024 -0700 Make FD_SETSIZE configurable (#703) * Reduce FD_SETSIZE from 1024 => 64 The maximum amount of files that can be opened at once is 64. We can save 11.25 KB if we reduce FD_SETSIZE to 64. * Allow FD_SETSIZE value to be overwritten Move all the #define FD_SETSIZE definitions to one file, opts.h. Add an option to environ.sh to allow FD_SETSIZE to be configured. Add an printf message if opening a file fails and FD_SETSIZE is not set to the default. * Updated documenation comment ----------------------------------------------------------------------- Summary of changes: addons/libkosfat/bpb.c | 6 +- addons/libkosfat/bpb.h | 4 +- addons/libkosfat/fatfs.c | 5 +- doc/environ.sh.sample | 15 ++ include/kos/fs.h | 6 +- include/kos/opts.h | 6 + include/sys/_types.h | 4 - include/sys/select.h | 6 +- kernel/arch/dreamcast/hardware/g1ata.c | 220 +++++++++------------ kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c | 2 +- .../dreamcast/hardware/pvr/pvr_init_shutdown.c | 2 +- kernel/arch/dreamcast/hardware/pvr/pvr_misc.c | 2 +- kernel/arch/dreamcast/hardware/video.c | 19 ++ kernel/fs/fs.c | 7 +- 14 files changed, 154 insertions(+), 150 deletions(-) diff --git a/addons/libkosfat/bpb.c b/addons/libkosfat/bpb.c index b34eece0..740a64e0 100644 --- a/addons/libkosfat/bpb.c +++ b/addons/libkosfat/bpb.c @@ -4,6 +4,7 @@ Copyright (C) 2012, 2019 Lawrence Sebald */ +#include <malloc.h> #include <stdio.h> #include <errno.h> #include <stdlib.h> @@ -18,7 +19,7 @@ static int fat_read_raw_boot(fat_bootblock_t *sb, kos_blockdev_t *bd) { if(bd->l_block_size > 9) { uint8_t *buf; - if(!(buf = (uint8_t *)malloc(1 << bd->l_block_size))) + if(!(buf = (uint8_t *)memalign(32, 1 << bd->l_block_size))) return -ENOMEM; if(bd->read_blocks(bd, 0, 1, buf)) @@ -28,9 +29,6 @@ static int fat_read_raw_boot(fat_bootblock_t *sb, kos_blockdev_t *bd) { free(buf); return 0; } - else if(bd->l_block_size == 9) { - return bd->read_blocks(bd, 0, 1, sb); - } else { return bd->read_blocks(bd, 0, 512 >> bd->l_block_size, sb); } diff --git a/addons/libkosfat/bpb.h b/addons/libkosfat/bpb.h index bc57f9b7..b7ac1e95 100644 --- a/addons/libkosfat/bpb.h +++ b/addons/libkosfat/bpb.h @@ -64,7 +64,7 @@ typedef struct fat_bootblock { fat16_ebpb_t fat16; fat32_ebpb_t fat32; } ebpb; -} __attribute__((packed)) fat_bootblock_t; +} __attribute__((packed,aligned(32))) fat_bootblock_t; typedef struct fat32_fsinfo { uint32_t fsinfo_sig1; @@ -74,7 +74,7 @@ typedef struct fat32_fsinfo { uint32_t last_alloc_cluster; uint8_t reserved2[12]; uint32_t fsinfo_sig3; -} __attribute__((packed)) fat32_fsinfo_t; +} __attribute__((packed,aligned(32))) fat32_fsinfo_t; #define FAT32_FSINFO_SIG1 0x41615252 #define FAT32_FSINFO_SIG2 0x61417272 diff --git a/addons/libkosfat/fatfs.c b/addons/libkosfat/fatfs.c index 3e458806..438ba739 100644 --- a/addons/libkosfat/fatfs.c +++ b/addons/libkosfat/fatfs.c @@ -4,6 +4,7 @@ Copyright (C) 2012, 2013, 2019 Lawrence Sebald */ +#include <malloc.h> #include <stdio.h> #include <errno.h> #include <stdint.h> @@ -315,7 +316,7 @@ fat_fs_t *fat_fs_init_ex(kos_blockdev_t *bd, uint32_t flags, int cache_sz, } for(j = 0; j < cache_sz; ++j) { - if(!(rv->bcache[j]->data = (uint8_t *)malloc(cluster_size))) { + if(!(rv->bcache[j]->data = (uint8_t *)memalign(32, cluster_size))) { goto out_bcache; } @@ -337,7 +338,7 @@ fat_fs_t *fat_fs_init_ex(kos_blockdev_t *bd, uint32_t flags, int cache_sz, } for(j = 0; j < fcache_sz; ++j) { - if(!(rv->fcache[j]->data = (uint8_t *)malloc(block_size))) { + if(!(rv->fcache[j]->data = (uint8_t *)memalign(32, block_size))) { goto out_fcache2; } diff --git a/doc/environ.sh.sample b/doc/environ.sh.sample index f1a0989d..ad12f47e 100644 --- a/doc/environ.sh.sample +++ b/doc/environ.sh.sample @@ -144,6 +144,21 @@ export KOS_CFLAGS="${KOS_CFLAGS} -O2" # #export KOS_CFLAGS="${KOS_CFLAGS} -freorder-blocks-algorithm=simple -flto=auto" +# RAM-Saving Optimization +# +# Uncomment the line below to reduce the default size of FD_SETSIZE from the +# default value of 1024 to 64. FD_SETSIZE defines the maximum number of files +# that can be opened simultaneously, including files on the ramdisk, romdisk, +# CD, VMU, network sockets, etc. The default setting allows 1024 files to be +# opened at once, which is typically more than most use cases require. +# +# By reducing this value, you can save approximately ~11.25 KB of RAM, which +# can be particularly useful when porting large games to the Dreamcast that +# are strapped for memory. However, be cautious not to set it too low, as this +# may limit the number of files and sockets that can be opened simultaneously. +# +# export KOS_CFLAGS="${KOS_CFLAGS} -DFD_SETSIZE=64" + # Frame Pointers # # Controls whether frame pointers are emitted or not. Disabled by diff --git a/include/kos/fs.h b/include/kos/fs.h index d3e58b90..2cc3924d 100644 --- a/include/kos/fs.h +++ b/include/kos/fs.h @@ -29,6 +29,7 @@ __BEGIN_DECLS #include <sys/types.h> #include <kos/limits.h> +#include <kos/opts.h> #include <time.h> #include <sys/queue.h> #include <stdarg.h> @@ -205,11 +206,6 @@ typedef struct vfs_handler { int (*fstat)(void *hnd, struct stat *st); } vfs_handler_t; -/** \brief The number of distinct file descriptors that can be in use at a - time. -*/ -#define FD_SETSIZE 1024 - /** \cond */ /* This is the private struct that will be used as raw file handles underlying descriptors. */ diff --git a/include/kos/opts.h b/include/kos/opts.h index 888e428a..fe005278 100644 --- a/include/kos/opts.h +++ b/include/kos/opts.h @@ -129,6 +129,12 @@ __BEGIN_DECLS #define FS_RAMDISK_MAX_FILES 8 #endif +/** \brief The number of distinct file descriptors that can be in use at a + time. This value can be overwritten in environ.sh */ +#ifndef FD_SETSIZE +#define FD_SETSIZE 1024 +#endif + /** @} */ __END_DECLS diff --git a/include/sys/_types.h b/include/sys/_types.h index 4e3df568..2cbc2027 100644 --- a/include/sys/_types.h +++ b/include/sys/_types.h @@ -159,10 +159,6 @@ typedef _TIMER_T_ __timer_t; typedef _CLOCK_T_ __clock_t; -// This part inserted to fix newlib brokenness. -/** \brief Size of an fd_set. */ -#define FD_SETSIZE 1024 - /* The architecture should define the macro BYTE_ORDER in <arch/types.h> to equal one of these macros for code that looks for these BSD-style macros. */ /** \brief Little Endian test macro */ diff --git a/include/sys/select.h b/include/sys/select.h index bcc78eec..9d12ed14 100644 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -26,6 +26,7 @@ __BEGIN_DECLS #include <newlib.h> +#include <kos/opts.h> #if __NEWLIB__ > 2 || (__NEWLIB__ == 2 && __NEWLIB_MINOR__ > 2) #include <sys/_timeval.h> @@ -41,11 +42,6 @@ __BEGIN_DECLS #define _SYS_TYPES_FD_SET -#ifndef FD_SETSIZE -/* This matches fs.h. */ -#define FD_SETSIZE 1024 -#endif - #define NFDBITS 32 /** \brief Represents a set of file descriptors */ diff --git a/kernel/arch/dreamcast/hardware/g1ata.c b/kernel/arch/dreamcast/hardware/g1ata.c index 5d4e3fcc..7faa8c0a 100644 --- a/kernel/arch/dreamcast/hardware/g1ata.c +++ b/kernel/arch/dreamcast/hardware/g1ata.c @@ -170,6 +170,9 @@ static uint8_t orig_dev = 0x00; /* Variables related to DMA. */ static int dma_in_progress = 0; static int dma_blocking = 0; +static uint8_t dma_cmd = 0; +static size_t dma_nb_sectors = 0; +static uint64_t dma_sector = 0; static semaphore_t dma_done = SEM_INITIALIZER(0); static kthread_t *dma_thd = NULL; @@ -211,12 +214,47 @@ inline int g1_ata_mutex_unlock(void) { return mutex_unlock(&_g1_ata_mutex); } +static void g1_ata_set_sector_and_count(uint64_t sector, uint32_t count, int lba28) { + if(!lba28) { + OUT8(G1_ATA_SECTOR_COUNT, (uint8_t)(count >> 8)); + OUT8(G1_ATA_LBA_LOW, (uint8_t)((sector >> 24) & 0xFF)); + OUT8(G1_ATA_LBA_MID, (uint8_t)((sector >> 32) & 0xFF)); + OUT8(G1_ATA_LBA_HIGH, (uint8_t)((sector >> 40) & 0xFF)); + } + + /* Write out the number of sectors we want and the lower 24-bits of + the LBA we're looking for. Note that putting 0 into the sector count + register returns 256 sectors. */ + OUT8(G1_ATA_SECTOR_COUNT, (uint8_t)count); + OUT8(G1_ATA_LBA_LOW, (uint8_t)((sector >> 0) & 0xFF)); + OUT8(G1_ATA_LBA_MID, (uint8_t)((sector >> 8) & 0xFF)); + OUT8(G1_ATA_LBA_HIGH, (uint8_t)((sector >> 16) & 0xFF)); +} + static void g1_dma_irq_hnd(uint32 code, void *data) { + unsigned int nb_sectors; + /* XXXX: Probably should look at the code to make sure it isn't an error. */ (void)code; (void)data; - if(dma_in_progress) { + if(dma_in_progress && dma_nb_sectors > 256) { + dma_sector += 256; + dma_nb_sectors -= 256; + nb_sectors = dma_nb_sectors <= 256 ? dma_nb_sectors : 256; + + /* Set the DMA parameters for the next transfer. */ + g1_ata_set_sector_and_count(dma_sector, nb_sectors, 1); + OUT32(G1_ATA_DMA_ADDRESS, IN32(G1_ATA_DMA_ADDRESS) + 256 * 512); + OUT32(G1_ATA_DMA_LENGTH, nb_sectors * 512); + + /* Write out the command to the device. */ + OUT8(G1_ATA_COMMAND_REG, dma_cmd); + + /* Re-start the DMA transfer. */ + OUT32(G1_ATA_DMA_STATUS, 1); + } + else if(dma_in_progress) { /* Signal the calling thread to continue, if it is blocking. */ if(dma_blocking) { sem_signal(&dma_done); @@ -283,6 +321,8 @@ static int dma_common(uint8_t cmd, size_t nsects, uint32_t addr, int dir, int block) { uint8_t status; + dma_cmd = cmd; + /* Set the thread ID that initiated this DMA. */ dma_thd = thd_current; @@ -489,6 +529,7 @@ int g1_ata_read_lba(uint64_t sector, size_t count, void *buf) { uint8_t nsects = (uint8_t)count; uint16_t word; uint8_t *ptr = (uint8_t *)buf; + int lba28, cmd; /* Make sure that we've been initialized and there's a disk attached. */ if(!devices) { @@ -520,44 +561,26 @@ int g1_ata_read_lba(uint64_t sector, size_t count, void *buf) { count -= nsects; /* Which mode are we using: LBA28 or LBA48? */ - if((sector + nsects) <= 0x0FFFFFFF) { + lba28 = (sector + nsects) <= 0x0FFFFFFF; + if(lba28) { g1_ata_select_device(G1_ATA_SLAVE | G1_ATA_LBA_MODE | ((sector >> 24) & 0x0F)); - - /* Write out the number of sectors we want and the lower 24-bits of - the LBA we're looking for. */ - OUT8(G1_ATA_SECTOR_COUNT, nsects); - OUT8(G1_ATA_LBA_LOW, (uint8_t)((sector >> 0) & 0xFF)); - OUT8(G1_ATA_LBA_MID, (uint8_t)((sector >> 8) & 0xFF)); - OUT8(G1_ATA_LBA_HIGH, (uint8_t)((sector >> 16) & 0xFF)); - - /* Wait until the drive is ready to accept the command. */ - g1_ata_wait_nbsy(); - g1_ata_wait_drdy(); - - /* Write out the command to the device. */ - OUT8(G1_ATA_COMMAND_REG, ATA_CMD_READ_SECTORS); + cmd = ATA_CMD_READ_SECTORS; } else { g1_ata_select_device(G1_ATA_SLAVE | G1_ATA_LBA_MODE); + cmd = ATA_CMD_READ_SECTORS_EXT; + } - /* Write out the number of sectors we want and the LBA. */ - OUT8(G1_ATA_SECTOR_COUNT, 0); - OUT8(G1_ATA_LBA_LOW, (uint8_t)((sector >> 24) & 0xFF)); - OUT8(G1_ATA_LBA_MID, (uint8_t)((sector >> 32) & 0xFF)); - OUT8(G1_ATA_LBA_HIGH, (uint8_t)((sector >> 40) & 0xFF)); - OUT8(G1_ATA_SECTOR_COUNT, nsects); - OUT8(G1_ATA_LBA_LOW, (uint8_t)((sector >> 0) & 0xFF)); - OUT8(G1_ATA_LBA_MID, (uint8_t)((sector >> 8) & 0xFF)); - OUT8(G1_ATA_LBA_HIGH, (uint8_t)((sector >> 16) & 0xFF)); - - /* Wait until the drive is ready to accept the command. */ - g1_ata_wait_nbsy(); - g1_ata_wait_drdy(); + /* Write out the number of sectors we want and the LBA. */ + g1_ata_set_sector_and_count(sector, nsects, lba28); - /* Write out the command to the device. */ - OUT8(G1_ATA_COMMAND_REG, ATA_CMD_READ_SECTORS_EXT); - } + /* Wait until the drive is ready to accept the command. */ + g1_ata_wait_nbsy(); + g1_ata_wait_drdy(); + + /* Write out the command to the device. */ + OUT8(G1_ATA_COMMAND_REG, cmd); /* Now, wait for the drive to give us back each sector. */ for(i = 0; i < nsects; ++i, ++sector) { @@ -589,9 +612,9 @@ out: int g1_ata_read_lba_dma(uint64_t sector, size_t count, void *buf, int block) { - int rv = 0; + int lba28, old, can_lba48 = CAN_USE_LBA48(); uint32_t addr; - int old, can_lba48 = CAN_USE_LBA48(); + uint8_t cmd; /* Make sure we're actually being asked to do work... */ if(!count) @@ -621,7 +644,7 @@ int g1_ata_read_lba_dma(uint64_t sector, size_t count, void *buf, } /* Chaining isn't done yet, so make sure we don't need to. */ - if(count > 65536 || (!can_lba48 && count > 256)) { + if(count > 65536) { errno = EOVERFLOW; return -1; } @@ -663,56 +686,41 @@ int g1_ata_read_lba_dma(uint64_t sector, size_t count, void *buf, /* Set the settings for this transfer and re-enable IRQs. */ dma_blocking = block; dma_in_progress = 1; + dma_nb_sectors = count; + dma_sector = sector; irq_restore(old); + if(!can_lba48 && count > 256) + count = 256; + /* Wait for the device to signal it is ready. */ g1_ata_wait_bsydrq(); /* Which mode are we using: LBA28 or LBA48? */ - if(!can_lba48 || use_lba28(sector, count)) { + lba28 = !can_lba48 || use_lba28(sector, count); + if(lba28) { g1_ata_select_device(G1_ATA_SLAVE | G1_ATA_LBA_MODE | ((sector >> 24) & 0x0F)); - - /* Write out the number of sectors we want and the lower 24-bits of - the LBA we're looking for. Note that putting 0 into the sector count - register returns 256 sectors. */ - OUT8(G1_ATA_SECTOR_COUNT, (uint8_t)count); - OUT8(G1_ATA_LBA_LOW, (uint8_t)((sector >> 0) & 0xFF)); - OUT8(G1_ATA_LBA_MID, (uint8_t)((sector >> 8) & 0xFF)); - OUT8(G1_ATA_LBA_HIGH, (uint8_t)((sector >> 16) & 0xFF)); - - /* Do the rest of the work... */ - rv = dma_common(ATA_CMD_READ_DMA, count, addr, G1_DMA_TO_MEMORY, block); + cmd = ATA_CMD_READ_DMA; } else { g1_ata_select_device(G1_ATA_SLAVE | G1_ATA_LBA_MODE); - - /* Write out the number of sectors we want and the LBA. Note that in - LBA48 mode, putting 0 into the sector count register returns 65536 - sectors (not that we have that much RAM on the Dreamcast). */ - OUT8(G1_ATA_SECTOR_COUNT, (uint8_t)(count >> 8)); - OUT8(G1_ATA_LBA_LOW, (uint8_t)((sector >> 24) & 0xFF)); - OUT8(G1_ATA_LBA_MID, (uint8_t)((sector >> 32) & 0xFF)); - OUT8(G1_ATA_LBA_HIGH, (uint8_t)((sector >> 40) & 0xFF)); - OUT8(G1_ATA_SECTOR_COUNT, (uint8_t)count); - OUT8(G1_ATA_LBA_LOW, (uint8_t)((sector >> 0) & 0xFF)); - OUT8(G1_ATA_LBA_MID, (uint8_t)((sector >> 8) & 0xFF)); - OUT8(G1_ATA_LBA_HIGH, (uint8_t)((sector >> 16) & 0xFF)); - - /* Do the rest of the work... */ - rv = dma_common(ATA_CMD_READ_DMA_EXT, count, addr, G1_DMA_TO_MEMORY, - block); + cmd = ATA_CMD_READ_DMA_EXT; } - return rv; + /* Write out the number of sectors we want and the LBA. */ + g1_ata_set_sector_and_count(sector, count, lba28); + + /* Do the rest of the work... */ + return dma_common(cmd, count, addr, G1_DMA_TO_MEMORY, block); } int g1_ata_write_lba(uint64_t sector, size_t count, const void *buf) { - int rv = 0; unsigned int i, j; uint8_t nsects = (uint8_t)count; uint16_t word; uint8_t *ptr = (uint8_t *)buf; + int cmd, lba28; /* Make sure that we've been initialized and there's a disk attached. */ if(!devices) { @@ -744,37 +752,23 @@ int g1_ata_write_lba(uint64_t sector, size_t count, const void *buf) { count -= nsects; /* Which mode are we using: LBA28 or LBA48? */ - if((sector + nsects) <= 0x0FFFFFFF) { + lba28 = (sector + nsects) <= 0x0FFFFFFF; + if(lba28) { g1_ata_select_device(G1_ATA_SLAVE | G1_ATA_LBA_MODE | ((sector >> 24) & 0x0F)); - - /* Write out the number of sectors we want and the lower 24-bits of - the LBA we're looking for. */ - OUT8(G1_ATA_SECTOR_COUNT, nsects); - OUT8(G1_ATA_LBA_LOW, (uint8_t)((sector >> 0) & 0xFF)); - OUT8(G1_ATA_LBA_MID, (uint8_t)((sector >> 8) & 0xFF)); - OUT8(G1_ATA_LBA_HIGH, (uint8_t)((sector >> 16) & 0xFF)); - - /* Write out the command to the device. */ - OUT8(G1_ATA_COMMAND_REG, ATA_CMD_WRITE_SECTORS); + cmd = ATA_CMD_WRITE_SECTORS; } else { g1_ata_select_device(G1_ATA_SLAVE | G1_ATA_LBA_MODE); - - /* Write out the number of sectors we want and the LBA. */ - OUT8(G1_ATA_SECTOR_COUNT, 0); - OUT8(G1_ATA_LBA_LOW, (uint8_t)((sector >> 24) & 0xFF)); - OUT8(G1_ATA_LBA_MID, (uint8_t)((sector >> 32) & 0xFF)); - OUT8(G1_ATA_LBA_HIGH, (uint8_t)((sector >> 40) & 0xFF)); - OUT8(G1_ATA_SECTOR_COUNT, nsects); - OUT8(G1_ATA_LBA_LOW, (uint8_t)((sector >> 0) & 0xFF)); - OUT8(G1_ATA_LBA_MID, (uint8_t)((sector >> 8) & 0xFF)); - OUT8(G1_ATA_LBA_HIGH, (uint8_t)((sector >> 16) & 0xFF)); - - /* Write out the command to the device. */ - OUT8(G1_ATA_COMMAND_REG, ATA_CMD_WRITE_SECTORS_EXT); + cmd = ATA_CMD_WRITE_SECTORS_EXT; } + /* Write out the number of sectors we want and the LBA. */ + g1_ata_set_sector_and_count(sector, nsects, lba28); + + /* Write out the command to the device. */ + OUT8(G1_ATA_COMMAND_REG, cmd); + /* Now, send the drive each sector. */ for(i = 0; i < nsects; ++i, ++sector) { /* Wait for the device to signal it is ready. */ @@ -792,18 +786,15 @@ int g1_ata_write_lba(uint64_t sector, size_t count, const void *buf) { /* Wait for the device to signal that it has finished writing the data. */ g1_ata_wait_bsydrq(); - rv = 0; - g1_ata_mutex_unlock(); - return rv; + return 0; } int g1_ata_write_lba_dma(uint64_t sector, size_t count, const void *buf, int block) { - int rv = 0; + int cmd, lba28, old, can_lba48 = CAN_USE_LBA48(); uint32_t addr; - int old, can_lba48 = CAN_USE_LBA48(); /* Make sure we're actually being asked to do work... */ if(!count) @@ -875,49 +866,30 @@ int g1_ata_write_lba_dma(uint64_t sector, size_t count, const void *buf, /* Set the settings for this transfer and re-enable IRQs. */ dma_blocking = block; dma_in_progress = 1; + dma_nb_sectors = count; + dma_sector = sector; irq_restore(old); ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-08-19 03:52:45
|
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 3c99eb588dd1ae664b0e42481b15ba8c57381cf3 (commit) via 253b193654d8b0d794c56f4520e97ec9d4364957 (commit) from 63c8b0c0b174af2762fa7f00cb34048bfaa5235b (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 3c99eb588dd1ae664b0e42481b15ba8c57381cf3 Author: Paul Cercueil <pa...@cr...> Date: Mon Aug 19 05:51:39 2024 +0200 vmu: Add function vmu_printf() (#699) This function can be used to print a string to every connect VMU, using the built-in VMU font. Signed-off-by: Paul Cercueil <pa...@cr...> commit 253b193654d8b0d794c56f4520e97ec9d4364957 Author: Andy Barajas <and...@gm...> Date: Sun Aug 18 20:47:59 2024 -0700 Fix kos doxygen warnings (#711) ----------------------------------------------------------------------- Summary of changes: include/netinet/in.h | 2 +- include/poll.h | 6 +- kernel/arch/dreamcast/include/arch/byteorder.h | 5 +- kernel/arch/dreamcast/include/dc/video.h | 2 +- kernel/arch/dreamcast/include/dc/vmu_fb.h | 11 ++ kernel/arch/dreamcast/util/Makefile | 2 +- kernel/arch/dreamcast/util/vmu_printf.c | 147 +++++++++++++++++++++++++ 7 files changed, 169 insertions(+), 6 deletions(-) create mode 100644 kernel/arch/dreamcast/util/vmu_printf.c diff --git a/include/netinet/in.h b/include/netinet/in.h index ad614083..5fb23321 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -208,7 +208,7 @@ extern const struct in6_addr in6addr_loopback; #define IPPROTO_UDP 17 /** \brief Internet Protocol Version 6. - \ingroup networking_ipv + \ingroup networking_ip */ #define IPPROTO_IPV6 41 diff --git a/include/poll.h b/include/poll.h index aa7acf3f..bdf6e83d 100644 --- a/include/poll.h +++ b/include/poll.h @@ -6,7 +6,7 @@ /** \file poll.h \brief Definitions for the poll() function. - \ingroup threading_posix + \ingroup threading_polling This file contains the definitions needed for using the poll() function, as directed by the POSIX 2008 standard (aka The Open Group Base Specifications @@ -27,7 +27,9 @@ __BEGIN_DECLS -/** \addtogroup threading_posix +/** \defgroup threading_polling Polling + \brief Implementation of POSIX polling. + \ingroup threading_posix @{ */ diff --git a/kernel/arch/dreamcast/include/arch/byteorder.h b/kernel/arch/dreamcast/include/arch/byteorder.h index aae54433..2585f247 100644 --- a/kernel/arch/dreamcast/include/arch/byteorder.h +++ b/kernel/arch/dreamcast/include/arch/byteorder.h @@ -32,7 +32,10 @@ __BEGIN_DECLS #undef BYTE_ORDER #endif -/** \addtogroup arch +/** \defgroup system_arch Byte Order + \brief Byte-order management for the SH4 architecture + \ingroup arch + @{ */ diff --git a/kernel/arch/dreamcast/include/dc/video.h b/kernel/arch/dreamcast/include/dc/video.h index de8dc1b0..04b59984 100644 --- a/kernel/arch/dreamcast/include/dc/video.h +++ b/kernel/arch/dreamcast/include/dc/video.h @@ -318,7 +318,7 @@ uint32_t vid_border_color(uint8_t r, uint8_t g, uint8_t b); void vid_clear(uint8_t r, uint8_t g, uint8_t b); /** \brief Clear VRAM. - \ingroup video_vram + \ingroup video_fb This function is essentially a memset() for the whole of VRAM that will clear it all to 0 bytes. diff --git a/kernel/arch/dreamcast/include/dc/vmu_fb.h b/kernel/arch/dreamcast/include/dc/vmu_fb.h index 8f440ca7..ae38a21d 100644 --- a/kernel/arch/dreamcast/include/dc/vmu_fb.h +++ b/kernel/arch/dreamcast/include/dc/vmu_fb.h @@ -136,4 +136,15 @@ vmufb_print_string(vmufb_t *fb, const vmufb_font_t *font, const char *str) { vmufb_print_string_into(fb, font, 0, 0, 48, 32, 0, str); } +/** \brief Render a string to attached VMUs using the built-in font + + Uses the built-in VMU font to render a string to all VMUs connected to the + system. + + \param fmt The format string, optionally followed by extra + arguments. + */ +__attribute__ ((format (printf, 1, 2))) +void vmu_printf(const char *fmt, ...); + #endif /* __DC_VMU_FB_H */ diff --git a/kernel/arch/dreamcast/util/Makefile b/kernel/arch/dreamcast/util/Makefile index 3bcc7111..37d94f7b 100644 --- a/kernel/arch/dreamcast/util/Makefile +++ b/kernel/arch/dreamcast/util/Makefile @@ -4,7 +4,7 @@ # Copyright (C) 2001 Megan Potter # -OBJS = vmu_fb.o vmu_pkg.o screenshot.o minifont.o +OBJS = vmu_fb.o vmu_pkg.o vmu_printf.o screenshot.o minifont.o SUBDIRS = ifneq ($(KOS_SUBARCH), naomi) diff --git a/kernel/arch/dreamcast/util/vmu_printf.c b/kernel/arch/dreamcast/util/vmu_printf.c new file mode 100644 index 00000000..6024415c --- /dev/null +++ b/kernel/arch/dreamcast/util/vmu_printf.c @@ -0,0 +1,147 @@ +/* KallistiOS ##version## + + util/vmu_fb.c + Copyright (C) 2024 Paul Cercueil +*/ + +#include <stdarg.h> +#include <stdio.h> + +#include <dc/vmu_fb.h> + +static vmufb_t vmufb; + +/* Linux 4x6 font: lib/fonts/font_mini_4x6.c + * + * Created by Kenneth Albanowski. + * No rights reserved, released to the public domain. + */ +static const char fontdata_4x6[] = { + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, + 0x00, 0x00, 0x00, 0x44, 0x40, 0x40, 0xaa, 0x00, + 0x00, 0xaf, 0xfa, 0x00, 0x46, 0xec, 0x40, 0xa2, + 0x48, 0xa0, 0x69, 0x6a, 0xd0, 0x24, 0x00, 0x00, + 0x24, 0x44, 0x20, 0x42, 0x22, 0x40, 0x0e, 0xee, + 0x00, 0x04, 0xe4, 0x00, 0x00, 0x04, 0x80, 0x00, + 0xe0, 0x00, 0x00, 0x00, 0x40, 0x02, 0x48, 0x00, + 0x4a, 0xaa, 0x40, 0x4c, 0x44, 0xe0, 0xc2, 0x48, + 0xe0, 0xe2, 0x62, 0xe0, 0xaa, 0xe2, 0x20, 0xe8, + 0xe2, 0xe0, 0xe8, 0xea, 0xe0, 0xe2, 0x22, 0x20, + 0xea, 0xea, 0xe0, 0xea, 0xe2, 0x20, 0x00, 0x40, + 0x40, 0x00, 0x40, 0x48, 0x24, 0x84, 0x20, 0x0e, + 0x0e, 0x00, 0x84, 0x24, 0x80, 0xe2, 0x60, 0x40, + 0x4e, 0xe8, 0x40, 0x4a, 0xea, 0xa0, 0xca, 0xca, + 0xc0, 0x68, 0x88, 0x60, 0xca, 0xaa, 0xc0, 0xe8, + 0xe8, 0xe0, 0xe8, 0xe8, 0x80, 0x68, 0xea, 0x60, + 0xaa, 0xea, 0xa0, 0xe4, 0x44, 0xe0, 0x22, 0x2a, + 0x40, 0xaa, 0xca, 0xa0, 0x88, 0x88, 0xe0, 0xae, + 0xea, 0xa0, 0xae, 0xee, 0xa0, 0x4a, 0xaa, 0x40, + 0xca, 0xc8, 0x80, 0x4a, 0xae, 0x60, 0xca, 0xec, + 0xa0, 0x68, 0x42, 0xc0, 0xe4, 0x44, 0x40, 0xaa, + 0xaa, 0x60, 0xaa, 0xa4, 0x40, 0xaa, 0xee, 0xa0, + 0xaa, 0x4a, 0xa0, 0xaa, 0x44, 0x40, 0xe2, 0x48, + 0xe0, 0x64, 0x44, 0x60, 0x08, 0x42, 0x00, 0x62, + 0x22, 0x60, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x0f, + 0x84, 0x00, 0x00, 0x00, 0x6a, 0xe0, 0x88, 0xca, + 0xc0, 0x00, 0x68, 0x60, 0x22, 0x6a, 0x60, 0x0e, + 0xe8, 0x60, 0x24, 0xe4, 0x40, 0x06, 0xa6, 0xe0, + 0x88, 0xca, 0xa0, 0x40, 0x44, 0x40, 0x40, 0x44, + 0x80, 0x08, 0xac, 0xa0, 0x0c, 0x44, 0xe0, 0x00, + 0xee, 0xa0, 0x00, 0xca, 0xa0, 0x04, 0xaa, 0x40, + 0x00, 0xca, 0xc8, 0x00, 0x6a, 0x62, 0x0c, 0xa8, + 0x80, 0x06, 0xc2, 0xc0, 0x04, 0xe4, 0x40, 0x00, + 0xaa, 0x60, 0x00, 0xae, 0x40, 0x00, 0xae, 0xe0, + 0x00, 0xa4, 0xa0, 0x00, 0xae, 0x2c, 0x0e, 0x6c, + 0xe0, 0x24, 0xc4, 0x20, 0x44, 0x44, 0x40, 0x84, + 0x64, 0x80, 0x5a, 0x00, 0x00, 0x4a, 0xae, 0x00, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0x06, 0xc6, 0x00, 0x0c, 0x6c, 0x00, + 0x82, 0x82, 0x82, 0xa5, 0xa5, 0xa5, 0xdb, 0xdb, + 0xdb, 0x44, 0x44, 0x44, 0x44, 0xc4, 0x44, 0x44, + 0xcc, 0x44, 0x66, 0xe6, 0x66, 0x00, 0xe6, 0x66, + 0x00, 0xcc, 0x44, 0x66, 0xee, 0x66, 0x66, 0x66, + 0x66, 0x00, 0xee, 0x66, 0x66, 0xee, 0x00, 0x66, + 0xe0, 0x00, 0x44, 0xcc, 0x00, 0x00, 0xc4, 0x44, + 0x44, 0x70, 0x00, 0x44, 0xf0, 0x00, 0x00, 0xf4, + 0x44, 0x44, 0x74, 0x44, 0x00, 0xf0, 0x00, 0x44, + 0xf4, 0x44, 0x44, 0x77, 0x44, 0x66, 0x76, 0x66, + 0x66, 0x77, 0x00, 0x00, 0x77, 0x66, 0x66, 0xff, + 0x00, 0x00, 0xff, 0x66, 0x66, 0x77, 0x66, 0x00, + 0xff, 0x00, 0x66, 0xff, 0x66, 0x44, 0xff, 0x00, + 0x66, 0xf0, 0x00, 0x00, 0xff, 0x44, 0x00, 0xf6, + 0x66, 0x66, 0x70, 0x00, 0x44, 0x77, 0x00, 0x00, + 0x77, 0x44, 0x00, 0x76, 0x66, 0x66, 0xf6, 0x66, + 0x44, 0xff, 0x44, 0x44, 0xc0, 0x00, 0x00, 0x74, + 0x44, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xcc, + 0xcc, 0xcc, 0x33, 0x33, 0x33, 0xff, 0xf0, 0x00, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, + 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, + 0xe0, 0xee, 0xee, 0xe0, 0xee, 0xee, 0xe0, 0xee, + 0xee, 0xe0, 0x00, 0x66, 0x00, 0xee, 0xee, 0xe0, +}; + +static const vmufb_font_t vmufb_font4x6 = { + .w = 4, + .h = 6, + .stride = 3, + .fontdata = fontdata_4x6, +}; + +void vmu_printf(const char *fmt, ...) +{ + maple_device_t *dev; + unsigned int vmu; + char buf[256]; + va_list va; + + buf[sizeof(buf) - 1] = '\0'; + + va_start(va, fmt); + vsnprintf(buf, sizeof(buf), fmt, va); + va_end(va); + + vmufb_print_string(&vmufb, &vmufb_font4x6, buf); + + for (vmu = 0; ; vmu++) { + dev = maple_enum_type(vmu, MAPLE_FUNC_LCD); + if (!dev) + break; + + vmufb_present(&vmufb, dev); + } +} hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-08-19 03:47:08
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 63c8b0c0b174af2762fa7f00cb34048bfaa5235b (commit) from 084658a4859a9e29da6dbaa43f05ba0fceade10f (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 63c8b0c0b174af2762fa7f00cb34048bfaa5235b Author: Tchan0 <617...@us...> Date: Mon Aug 19 05:46:43 2024 +0200 Naomi: examples Makefile: exclude network, modem & g1ata (#713) * Naomi: examples Makefile: exclude modem & g1ata Exclude examples /modem & /g1ata when building for Naomi, as the corresponding functions do not exist for Naomi * Naomi: examples Makefile: exclude network Exclude network examples, as network is also excluded when building KallistiOS for Naomi ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/dreamcast/Makefile b/examples/dreamcast/Makefile index 8afe9ad9..221b371c 100644 --- a/examples/dreamcast/Makefile +++ b/examples/dreamcast/Makefile @@ -5,10 +5,14 @@ # Copyright (C) 2024 Andy Barajas # -DIRS = 2ndmix basic libdream kgl hello sound png network vmu conio pvr video \ - lua parallax modem dreameye filesystem sd g1ata lightgun keyboard sdl dev rumble \ +DIRS = 2ndmix basic libdream kgl hello sound png vmu conio pvr video \ + lua parallax dreameye filesystem sd lightgun keyboard sdl dev rumble \ micropython +ifneq ($(KOS_SUBARCH), naomi) + DIRS += network modem g1ata +endif + ifdef KOS_CCPLUS DIRS += cpp tsunami endif hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-08-19 03:45: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 084658a4859a9e29da6dbaa43f05ba0fceade10f (commit) from 41528fef656ffbbdfe16663e895c01c912f71b43 (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 084658a4859a9e29da6dbaa43f05ba0fceade10f Author: Andy Barajas <and...@gm...> Date: Sun Aug 18 20:44:40 2024 -0700 Cleanup documentation. Rearrange error checking code. Remove unused symbol. (#716) ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/sq.c | 8 ++++++-- kernel/arch/dreamcast/hardware/sq_fast_cpy.s | 3 +-- kernel/arch/dreamcast/sound/snd_pcm_split.s | 1 - kernel/arch/dreamcast/sound/snd_stream.c | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/sq.c b/kernel/arch/dreamcast/hardware/sq.c index 10ef13bd..41dc3ee2 100644 --- a/kernel/arch/dreamcast/hardware/sq.c +++ b/kernel/arch/dreamcast/hardware/sq.c @@ -123,11 +123,15 @@ void *sq_set16(void *dest, uint32_t c, size_t n) { void *sq_set32(void *dest, uint32_t c, size_t n) { uint32_t *d = SQ_MASK_DEST(dest); - sq_lock(dest); - /* Write them as many times necessary */ n >>= 5; + /* Exit early if we dont have enough data to set */ + if(n == 0) + return dest; + + sq_lock(dest); + while(n--) { /* Fill both store queues with c */ d[0] = d[1] = d[2] = d[3] = d[4] = d[5] = d[6] = d[7] = c; diff --git a/kernel/arch/dreamcast/hardware/sq_fast_cpy.s b/kernel/arch/dreamcast/hardware/sq_fast_cpy.s index 134ee374..b58544ab 100644 --- a/kernel/arch/dreamcast/hardware/sq_fast_cpy.s +++ b/kernel/arch/dreamcast/hardware/sq_fast_cpy.s @@ -1,6 +1,6 @@ ! KallistiOS ##version## ! -! arch/dreamcast/hardware/sq_fast_path.s +! arch/dreamcast/hardware/sq_fast_cpy.s ! Copyright (C) 2024 Andy Barajas ! ! Optimized SH4 assembler function for copying 32 bytes of data @@ -43,4 +43,3 @@ _sq_fast_cpy: .exit: rts fschg - diff --git a/kernel/arch/dreamcast/sound/snd_pcm_split.s b/kernel/arch/dreamcast/sound/snd_pcm_split.s index fa27a159..089b568c 100644 --- a/kernel/arch/dreamcast/sound/snd_pcm_split.s +++ b/kernel/arch/dreamcast/sound/snd_pcm_split.s @@ -9,7 +9,6 @@ .section .text .globl _snd_pcm16_split -.globl _snd_pcm16_split_sq_start .globl _snd_pcm8_split .globl _snd_adpcm_split diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index e499c909..d79ff314 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -237,7 +237,7 @@ void snd_pcm16_split_sq(uint32_t *data, uintptr_t left, uintptr_t right, size_t /* Make sure the FIFOs are empty */ g2_fifo_wait(); - /* Separating channels and do fill/write queues as many times necessary. */ + /* Separating channels and fill/write queues as many times as necessary. */ for(; remain >= 128; remain -= 128) { /* Fill SQ0 */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-08-16 00:45: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 41528fef656ffbbdfe16663e895c01c912f71b43 (commit) via 5f3e39dc6f69aeac2a29abe59a924137a4a0f12a (commit) via a85d2f28840b6b1e95c6d6d472305535d6e52697 (commit) from 2751f20f40083c856e767b90eff4c64206987b68 (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 41528fef656ffbbdfe16663e895c01c912f71b43 Merge: a85d2f28 5f3e39dc Author: darcagn <da...@pr...> Date: Thu Aug 15 19:44:47 2024 -0500 Merge pull request #712 from Tchan0/gitignore_add_vscode gitignore: add .vscode folders commit 5f3e39dc6f69aeac2a29abe59a924137a4a0f12a Author: Tchan0 <617...@us...> Date: Thu Aug 15 19:50:42 2024 +0200 gitignore: add .vscode folders Add .vscode folders that could be added in the examples by the users, when using Visual Studio Code commit a85d2f28840b6b1e95c6d6d472305535d6e52697 Author: darcagn <da...@pr...> Date: Mon Aug 12 07:17:13 2024 -0500 dc-chain: Fix ARM toolchain build error when JIT is enabled for SH toolchain (#709) ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + utils/dc-chain/doc/CHANGELOG.md | 6 ++++++ utils/dc-chain/scripts/gcc-pass1.mk | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 02d16d33..107e5e4f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *~ .*.swp .DS_Store +.vscode/ doc/reference/ environ.sh romdisk.img diff --git a/utils/dc-chain/doc/CHANGELOG.md b/utils/dc-chain/doc/CHANGELOG.md index 75c15e5d..498ee2c9 100644 --- a/utils/dc-chain/doc/CHANGELOG.md +++ b/utils/dc-chain/doc/CHANGELOG.md @@ -2,6 +2,12 @@ | Date<br/>_____________ | Author(s)<br/>_____________ | Changes<br/>_____________ | |:-----------------------|:----------------------------|---------------------------| +| 2024-08-11 | Eric Fradella | Fix ARM toolchain build error when JIT is enabled for SH toolchain. | +| 2024-08-07 | Eric Fradella | Updated binutils to 2.43. Updated GCC 11 profile with support for GCC 11.5.0. | +| 2024-08-01 | Eric Fradella | Updated GCC 14 profile with support for GCC 14.2.0. | +| 2024-07-15 | Eric Fradella | Updated profiles for GDB 15.1. | +| 2024-06-26 | Eric Fradella | Updated GCC 12 profile with support for GCC 12.4.0. | +| 2024-05-24 | Eric Fradella | Added support for GCC 13.3.0. | | 2024-05-08 | Falco Girgis | Added configuration option for libstdc++'s timezone database. | | 2024-05-02 | Eric Fradella | Deprecated GCC 4.7.4 profile. Revamped configuration system into separate profiles and Makefile.cfg. Revised configuration options and documentation. | | 2024-05-01 | Falco Girgis | Added config option for enabling the Ada langauge. | diff --git a/utils/dc-chain/scripts/gcc-pass1.mk b/utils/dc-chain/scripts/gcc-pass1.mk index 5958a858..4cfbf87c 100644 --- a/utils/dc-chain/scripts/gcc-pass1.mk +++ b/utils/dc-chain/scripts/gcc-pass1.mk @@ -2,7 +2,9 @@ # This file is part of KallistiOS. build-sh4-gcc-pass1: build = build-gcc-$(target)-$(gcc_ver)-pass1 +build-sh4-gcc-pass1: enabled_languages = $(pass1_languages) build-arm-gcc-pass1: build = build-gcc-$(target)-$(gcc_ver) +build-arm-gcc-pass1: enabled_languages = c $(build_gcc_pass1) $(build_gcc_pass2): src_dir = gcc-$(gcc_ver) $(build_gcc_pass1) $(build_gcc_pass2): log = $(logdir)/$(build).log $(build_gcc_pass1): logdir @@ -17,7 +19,7 @@ $(build_gcc_pass1): logdir --with-gnu-ld \ --without-headers \ --with-newlib \ - --enable-languages=$(pass1_languages) \ + --enable-languages=$(enabled_languages) \ --disable-libssp \ --enable-checking=release \ $(cpu_configure_args) \ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-08-11 15:36:59
|
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 2751f20f40083c856e767b90eff4c64206987b68 (commit) from 002de35db2462e7d2d78713b2a954ff2d0c8a756 (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 2751f20f40083c856e767b90eff4c64206987b68 Author: José Ribeiro <602...@us...> Date: Sun Aug 11 16:36:21 2024 +0100 Expanded VFS documentation (#684) * Reworking FS driver explanation and size warning * Update include/kos/fs_romdisk.h Co-authored-by: Andy Barajas <and...@gm...> * Update include/kos/fs_romdisk.h Co-authored-by: Andy Barajas <and...@gm...> * Update include/kos/fs_romdisk.h Co-authored-by: Andy Barajas <and...@gm...> * Update include/kos/fs_romdisk.h Co-authored-by: Andy Barajas <and...@gm...> * Update include/kos/fs_romdisk.h Co-authored-by: Falco Girgis <gyr...@gm...> * Explain how to build and embed fs image * Rewworking the line sizes * Update include/kos/fs_romdisk.h Co-authored-by: Falco Girgis <gyr...@gm...> --------- Co-authored-by: Andy Barajas <and...@gm...> Co-authored-by: Falco Girgis <gyr...@gm...> ----------------------------------------------------------------------- Summary of changes: include/kos/fs_romdisk.h | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/include/kos/fs_romdisk.h b/include/kos/fs_romdisk.h index c322bbb5..274d00a5 100644 --- a/include/kos/fs_romdisk.h +++ b/include/kos/fs_romdisk.h @@ -15,9 +15,33 @@ with the genromfs program that is included in the utils portion of the tree. You can choose to automount one ROMFS image by embedding it into your binary - and using the appropriate KOS_INIT_FLAGS() setting. The embedded ROMFS will - mount itself on /rd. You can also mount additional images that you load - from some other source on whatever mountpoint you want. + and using the appropriate flags (INIT_DEFAULT by itself or INIT_FS_ROMDISK with other flags) + when calling the KOS_INIT_FLAGS() macro with a custom flag selection. The embedded ROMFS + will mount itself on /rd. + + \warning + An embedded romdisk image is linked to your executable and cannot be evicted from + system RAM! + + Mounting additional images that you load from some other sources (such as a modified BIOS) + on whatever mountpoint you want, is also possible. Using fs_romdisk_mount() and passing a + pointer to the location of a romdisk image will mount it. + + \remark + Mounted images will reside in system RAM for as long as your program is running + or until you unmount them with fs_romdisk_unmount(). The size of your generated + ROMFS image must be kept below 16MB, with 14MB being the maximum recommended size, + as your binary will also reside in RAM and you need to leave some memory available + for it. Generating files larger than the available RAM will lead to system crashes. + + A romdisk filesystem image can be created by adding "KOS_ROMDISK_DIR=" to your Makefile + and pointing it to the directory contaning all the resources you wish to have embeded in + filesystem image. A rule to create the image is provided in the rules provided in Makefile.rules, + the created object file must be linked with your binary file by adding romdisk.o to your + list of objects. + + \see INIT_FS_ROMDISK + \see KOS_INIT_FLAGS() \author Megan Potter */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-08-11 06:34:22
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 002de35db2462e7d2d78713b2a954ff2d0c8a756 (commit) via e8dfbf4db231e4d90dea0bcc91664e760c45db7e (commit) via 0bc7d702180a9fcf7f3759a3a739856536c5477c (commit) from cca9753dc0e3f58fca4a36d1d4ab0f1a89754b52 (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 002de35db2462e7d2d78713b2a954ff2d0c8a756 Merge: cca9753d e8dfbf4d Author: darcagn <da...@pr...> Date: Sun Aug 11 01:33:03 2024 -0500 Merge pull request #529 from pcercuei/libc-fix-lto Fix atomics with LTO commit e8dfbf4db231e4d90dea0bcc91664e760c45db7e Author: Paul Cercueil <pa...@cr...> Date: Thu Aug 8 16:08:00 2024 +0200 thread: Mark thd_pass() as __used This fixes atomics when building with LTO. Signed-off-by: Paul Cercueil <pa...@cr...> commit 0bc7d702180a9fcf7f3759a3a739856536c5477c Author: Paul Cercueil <pa...@cr...> Date: Thu Aug 8 16:06:13 2024 +0200 init: Mark arch_init() as __used And add the __noreturn that was missing to the implementation. Without the __used and when using LTO, some programs may have undefined references to arch_init(). Signed-off-by: Paul Cercueil <pa...@cr...> ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/kernel/init.c | 1 + kernel/thread/thread.c | 1 + 2 files changed, 2 insertions(+) diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index 6c71b278..ed90b7f1 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -388,6 +388,7 @@ void arch_menu(void) { /* Called to shut down non-gracefully; assume the system is in peril and don't try to call the dtors */ +__used __noreturn void arch_abort(void) { /* Disable the WDT, if active */ wdt_disable(); diff --git a/kernel/thread/thread.c b/kernel/thread/thread.c index 5fe46097..319149de 100644 --- a/kernel/thread/thread.c +++ b/kernel/thread/thread.c @@ -828,6 +828,7 @@ void thd_sleep(unsigned int ms) { } /* Manually cause a re-schedule */ +__used void thd_pass(void) { /* Makes no sense inside int */ if(irq_inside_int()) return; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: quzar <qu...@us...> - 2024-08-11 00:52:21
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The KallistiOS port of OpenGL.". The branch, master has been updated via 8374cbee6c350612f38aeedf9a0af541e83aae76 (commit) from 8a4be75e53e7520ff558df1e2b2736db0f4abbb4 (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 8374cbee6c350612f38aeedf9a0af541e83aae76 Author: Falco Girgis <gyr...@gm...> Date: Sat Aug 10 16:05:53 2024 -0500 Correct KGL header usage (#3) * Ensure pointing to <KGL/GL.h> rather than the <GL/GL.h> which will pick up GLdc. * Roll back enabling of DMA from (#2) ----------------------------------------------------------------------- Summary of changes: gl-sh4.h | 2 -- include/glu.h | 2 +- include/glut.h | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gl-sh4.h b/gl-sh4.h index a669995..1ca91ed 100644 --- a/gl-sh4.h +++ b/gl-sh4.h @@ -11,8 +11,6 @@ #include <arch/args.h> -#define GL_KOS_USE_DMA 1 - typedef float vector3f[3]; /* 3 float vector */ typedef float matrix4f[4][4]; /* 4x4 float matrix */ diff --git a/include/glu.h b/include/glu.h index 6397441..c740dec 100644 --- a/include/glu.h +++ b/include/glu.h @@ -17,7 +17,7 @@ __BEGIN_DECLS #ifndef BUILD_LIBGL -#include <GL/gl.h> +#include <KGL/gl.h> #endif #define GLU_FALSE 0 diff --git a/include/glut.h b/include/glut.h index 91e4b04..b115bc2 100644 --- a/include/glut.h +++ b/include/glut.h @@ -13,7 +13,7 @@ __BEGIN_DECLS #ifndef BUILD_LIBGL -#include <GL/gl.h> +#include <KGL/gl.h> #endif /* Flush the Submitted Primitive Data to the GPU for render */ hooks/post-receive -- The KallistiOS port of OpenGL. |
From: falcovorbis <fal...@us...> - 2024-08-10 05:26: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 cca9753dc0e3f58fca4a36d1d4ab0f1a89754b52 (commit) via 858e77a016364bab6d921fc118936552d5e97d27 (commit) from db242c8af3110d3ed31cea395aa20361d576396b (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 cca9753dc0e3f58fca4a36d1d4ab0f1a89754b52 Author: Andy Barajas <and...@gm...> Date: Fri Aug 9 21:29:25 2024 -0700 Remove g1ata mutex use in biosfont (#700) Removed mutex from biosfont because it causes an issue in DS bootloader as well as give the ability to use biofonts inside of an IRQ context commit 858e77a016364bab6d921fc118936552d5e97d27 Author: Andy Barajas <and...@gm...> Date: Fri Aug 9 20:48:21 2024 -0700 Fix -Wmaybe-uninitialize warning (#701) ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/vmu/vmu_beep/beep.c | 2 +- kernel/arch/dreamcast/hardware/biosfont.c | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/examples/dreamcast/vmu/vmu_beep/beep.c b/examples/dreamcast/vmu/vmu_beep/beep.c index 666eef77..75d74085 100644 --- a/examples/dreamcast/vmu/vmu_beep/beep.c +++ b/examples/dreamcast/vmu/vmu_beep/beep.c @@ -50,7 +50,7 @@ static void on_reset(uint8_t addr, uint32_t btns) { } int main(int argc, char *argv[]) { - maple_device_t *dev, *vmudev; + maple_device_t *dev, *vmudev = NULL; cont_state_t *state; point_t w; plx_font_t *fnt; diff --git a/kernel/arch/dreamcast/hardware/biosfont.c b/kernel/arch/dreamcast/hardware/biosfont.c index 328d278f..0792279a 100644 --- a/kernel/arch/dreamcast/hardware/biosfont.c +++ b/kernel/arch/dreamcast/hardware/biosfont.c @@ -14,7 +14,6 @@ #include <dc/syscalls.h> #include <kos/dbglog.h> -#include <kos/mutex.h> /* @@ -75,12 +74,7 @@ int bfont_set_32bit_mode(int on) { return rv; } -/* From cdrom.c */ -extern mutex_t _g1_ata_mutex; - int lock_bfont(void) { - if(mutex_lock(&_g1_ata_mutex) == -1) return -1; - /* Just make sure no outside system took the lock */ while(syscall_font_lock() != 0) thd_pass(); @@ -89,8 +83,6 @@ int lock_bfont(void) { } int unlock_bfont(void) { - if(mutex_unlock(&_g1_ata_mutex) == -1) return -1; - syscall_font_unlock(); return 0; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-08-08 11:25:08
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via db242c8af3110d3ed31cea395aa20361d576396b (commit) from 5f4e519c3e234980fbd7d430160c740710b1b6f3 (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 db242c8af3110d3ed31cea395aa20361d576396b Author: Falco Girgis <gyr...@gm...> Date: Thu Aug 8 06:19:46 2024 -0500 Manually aligned PVR primitives to 32-bytes (#678) This is necessary to leverage the "fast" store-queue path for pvr_prim(), and everyone doing any level of performance work is having to manually align every single vertex at the time of declaration... time to fix this in KOS itself like we did for matrix_t.` 1) Aligned all PVR vertex types to 32-bytes. 2) Aligned all PVR header types to 32-bytes. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/include/dc/pvr.h | 49 +++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/kernel/arch/dreamcast/include/dc/pvr.h b/kernel/arch/dreamcast/include/dc/pvr.h index bd070e11..ecc37286 100644 --- a/kernel/arch/dreamcast/include/dc/pvr.h +++ b/kernel/arch/dreamcast/include/dc/pvr.h @@ -39,6 +39,8 @@ #include <sys/cdefs.h> __BEGIN_DECLS +#include <stdalign.h> + #include <arch/memory.h> #include <arch/types.h> #include <arch/cache.h> @@ -723,7 +725,8 @@ typedef struct { \headerfile dc/pvr.h */ -typedef struct { +typedef struct pvr_poly_hdr { + alignas(32) uint32_t cmd; /**< \brief TA command */ uint32_t mode1; /**< \brief Parameter word 1 */ uint32_t mode2; /**< \brief Parameter word 2 */ @@ -740,7 +743,8 @@ typedef struct { \headerfile dc/pvr.h */ -typedef struct { +typedef struct pvr_poly_ic_hdr { + alignas(32) uint32_t cmd; /**< \brief TA command */ uint32_t mode1; /**< \brief Parameter word 1 */ uint32_t mode2; /**< \brief Parameter word 2 */ @@ -758,7 +762,8 @@ typedef struct { \headerfile dc/pvr.h */ -typedef struct { +typedef struct pvr_poly_mod_hdr { + alignas(32) uint32_t cmd; /**< \brief TA command */ uint32_t mode1; /**< \brief Parameter word 1 */ uint32_t mode2_0; /**< \brief Parameter word 2 (outside volume) */ @@ -776,7 +781,8 @@ typedef struct { \headerfile dc/pvr.h */ -typedef struct { +typedef struct pvr_sprite_hdr { + alignas(32) uint32_t cmd; /**< \brief TA command */ uint32_t mode1; /**< \brief Parameter word 1 */ uint32_t mode2; /**< \brief Parameter word 2 */ @@ -794,7 +800,8 @@ typedef struct { \headerfile dc/pvr.h */ -typedef struct { +typedef struct pvr_mod_hdr { + alignas(32) uint32_t cmd; /**< \brief TA command */ uint32_t mode1; /**< \brief Parameter word 1 */ uint32_t d1; /**< \brief Dummy value */ @@ -822,7 +829,8 @@ typedef struct { \headerfile dc/pvr.h */ -typedef struct { +typedef struct pvr_vertex { + alignas(32) uint32_t flags; /**< \brief TA command (vertex flags) */ float x; /**< \brief X coordinate */ float y; /**< \brief Y coordinate */ @@ -841,7 +849,8 @@ typedef struct { \headerfile dc/pvr.h */ -typedef struct { +typedef struct pvr_vertex_pcm { + alignas(32) uint32_t flags; /**< \brief TA command (vertex flags) */ float x; /**< \brief X coordinate */ float y; /**< \brief Y coordinate */ @@ -860,17 +869,18 @@ typedef struct { \headerfile dc/pvr.h */ -typedef struct { +typedef struct pvr_vertex_tpcm { + alignas(32) uint32_t flags; /**< \brief TA command (vertex flags) */ - float x; /**< \brief X coordinate */ - float y; /**< \brief Y coordinate */ - float z; /**< \brief Z coordinate */ - float u0; /**< \brief Texture U coordinate (outside) */ - float v0; /**< \brief Texture V coordinate (outside) */ + float x; /**< \brief X coordinate */ + float y; /**< \brief Y coordinate */ + float z; /**< \brief Z coordinate */ + float u0; /**< \brief Texture U coordinate (outside) */ + float v0; /**< \brief Texture V coordinate (outside) */ uint32_t argb0; /**< \brief Vertex color (outside) */ uint32_t oargb0; /**< \brief Vertex offset color (outside) */ - float u1; /**< \brief Texture U coordinate (inside) */ - float v1; /**< \brief Texture V coordinate (inside) */ + float u1; /**< \brief Texture U coordinate (inside) */ + float v1; /**< \brief Texture V coordinate (inside) */ uint32_t argb1; /**< \brief Vertex color (inside) */ uint32_t oargb1; /**< \brief Vertex offset color (inside) */ uint32_t d1; /**< \brief Dummy value */ @@ -891,7 +901,8 @@ typedef struct { \headerfile dc/pvr.h */ -typedef struct { +typedef struct pvr_sprite_txr { + alignas(32) uint32_t flags; /**< \brief TA command (vertex flags) */ float ax; /**< \brief First X coordinate */ float ay; /**< \brief First Y coordinate */ @@ -915,7 +926,8 @@ typedef struct { This vertex type is to be used with the sprite polygon header and the sprite related commands to draw untextured sprites (aka, quads). */ -typedef struct { +typedef struct pvr_sprite_col { + alignas(32) uint32_t flags; /**< \brief TA command (vertex flags) */ float ax; /**< \brief First X coordinate */ float ay; /**< \brief First Y coordinate */ @@ -939,7 +951,8 @@ typedef struct { This vertex type is to be used with the modifier volume header to specify triangular modifier areas. */ -typedef struct { +typedef struct pvr_modifier_vol { + alignas(32) uint32_t flags; /**< \brief TA command (vertex flags) */ float ax; /**< \brief First X coordinate */ float ay; /**< \brief First Y coordinate */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-08-08 11:20:18
|
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, skmp_pvr_bg_fix has been created at e0b526286e4e8cd83a4459610b3cc3718cdf5ad7 (commit) - Log ----------------------------------------------------------------- commit e0b526286e4e8cd83a4459610b3cc3718cdf5ad7 Author: Falco Girgis <gyr...@gm...> Date: Tue Aug 6 17:42:48 2024 -0500 Fixed overflow with writing pvr bg plane. - skmp (correctly) reported that our little loop to copy the internally populated pvr_bkg_poly_t polygon (which gets color info from pvr_set_bg_color()) was looping too far. * structure is only 60 bytes, we looped for 64 and then wrote another word even beyond that. - swapped implementation to use memcpy() based on sizeof(pvr_bkg_poly_t) which is safer, and is smart enough to do per-word operations when they are valid (not here, lolz). - removed final vrl[0x11] = 0 assignment, as it clearly wasn't necessary and doesn't appear to even be doing anything useful at-all. The BG polygon types are special and don't need end-of-list flags, and interpolate the 4th vertex, more like PVR sprites. ----------------------------------------------------------------------- hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: quzar <qu...@us...> - 2024-08-07 21:40:49
|
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 5f4e519c3e234980fbd7d430160c740710b1b6f3 (commit) from 90f95e840f1bbfcb03c71240250bf1c3b84219d2 (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 5f4e519c3e234980fbd7d430160c740710b1b6f3 Author: darcagn <da...@pr...> Date: Wed Aug 7 16:39:30 2024 -0500 dc-chain: Updates to profiles and patches (#695) - GCC 11.x profile updated to 11.5.0 - Binutils updated to 2.43 for all non-legacy toolchains - Patch offsets updated to cleanly patch GCC 15.0.0-dev toolchain ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/Makefile.default.cfg | 4 +- utils/dc-chain/README.md | 22 ++++---- .../{gcc-11.4.0-kos.diff => gcc-11.5.0-kos.diff} | 58 +++++++++++----------- utils/dc-chain/patches/gcc-15.0.0-kos.diff | 4 +- utils/dc-chain/profiles/profile.10.5.0.mk | 4 +- .../{profile.11.4.0.mk => profile.11.5.0.mk} | 6 +-- utils/dc-chain/profiles/profile.12.4.0.mk | 4 +- utils/dc-chain/profiles/profile.13.3.0.mk | 4 +- utils/dc-chain/profiles/profile.13.3.1-dev.mk | 4 +- utils/dc-chain/profiles/profile.14.2.0.mk | 4 +- utils/dc-chain/profiles/profile.14.2.1-dev.mk | 4 +- utils/dc-chain/profiles/profile.15.0.0-dev.mk | 4 +- utils/dc-chain/profiles/profile.gccrs-dev.mk | 4 +- utils/dc-chain/profiles/profile.rustc-dev.mk | 4 +- utils/dc-chain/profiles/profile.stable.mk | 4 +- 15 files changed, 67 insertions(+), 67 deletions(-) rename utils/dc-chain/patches/{gcc-11.4.0-kos.diff => gcc-11.5.0-kos.diff} (73%) rename utils/dc-chain/profiles/{profile.11.4.0.mk => profile.11.5.0.mk} (94%) diff --git a/utils/dc-chain/Makefile.default.cfg b/utils/dc-chain/Makefile.default.cfg index d539b43e..f7b2bfbf 100644 --- a/utils/dc-chain/Makefile.default.cfg +++ b/utils/dc-chain/Makefile.default.cfg @@ -10,9 +10,9 @@ # - 9.3.0-legacy: Former 'stable' option, based on GCC 9.3.0 and Newlib 3.3.0. # - 9.5.0-winxp: Most recent versions of tools which run on Windows XP. # - 10.5.0: Last release in the GCC 10 series, released 2023-07-07. +# - 11.5.0: Last release in the GCC 11 series, released 2024-07-19. # Supported upstream: -# - 11.4.0: Latest release in the GCC 11 series, released 2023-05-15. -# - 12.4.0: Latest release in the GCC 12 series, released 2023-06-20. +# - 12.4.0: Latest release in the GCC 12 series, released 2024-06-20. # - stable: Tested stable; based on GCC 13.2.0, released 2023-07-27. # - 13.3.0: Latest release in the GCC 13 series, released 2024-05-21. # - 14.2.0: Latest release in the GCC 14 series, released 2024-08-01. diff --git a/utils/dc-chain/README.md b/utils/dc-chain/README.md index 7f645d11..1e802874 100644 --- a/utils/dc-chain/README.md +++ b/utils/dc-chain/README.md @@ -100,17 +100,17 @@ The following toolchain profiles are available for users to select in |---------:|:-------:|:----------:|:------------:|:-------:|:----------------:|:------| | 9.3.0-legacy | 9.3.0 | 3.3.0 | 2.34 | 8.4.0 | 2.34 | Former 'stable' option, based on GCC 9<br />GCC 9 series support ended upstream | | 9.5.0-winxp | 9.5.0 | 4.3.0 | 2.34 | 8.5.0 | 2.34 | Most recent versions of tools which run on Windows XP<br />GCC 9 series support ended upstream | -| 10.5.0 | 10.5.0 | 4.3.0 | 2.41 | 8.5.0 | 2.41 | Latest release in the GCC 10 series, released 2023-07-07<br />GCC 10 series support ended upstream | -| 11.4.0 | 11.4.0 | 4.3.0 | 2.41 | 8.5.0 | 2.41 | Latest release in the GCC 11 series, released 2023-05-15 | -| 12.3.0 | 12.3.0 | 4.3.0 | 2.41 | 8.5.0 | 2.41 | Latest release in the GCC 12 series, released 2023-05-08 | -| **stable** | **13.2.0** | **4.3.0** | **2.41** | **8.5.0** | **2.41** | **Tested stable; based on GCC 13.2.0, released 2023-07-27** | -| 13.3.0 | 13.3.0 | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Latest release in the GCC 13 series, released 2024-05-21 | -| 14.2.0 | 14.2.0 | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Latest release in the GCC 14 series, released 2024-08-01 | -| 13.3.1-dev | 13.3.1 (git) | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Bleeding edge GCC 13 series from git | -| 14.2.1-dev | 14.2.1 (git) | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Bleeding edge GCC 14 series from git | -| 15.0.0-dev | 15.0.0 (git) | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Bleeding edge GCC 15 series from git | -| gccrs-dev | 14.x | 4.4.0 | 2.42 | 8.5.0 | 2.42 | GCC fork for development of the GCCRS Rust compiler | -| rustc-dev | 14.x | 4.4.0 | 2.42 | 8.5.0 | 2.42 | GCC fork for development of the libgccjit rustc GCC codegen | +| 10.5.0 | 10.5.0 | 4.3.0 | 2.43 | 8.5.0 | 2.43 | Latest release in the GCC 10 series, released 2023-07-07<br />GCC 10 series support ended upstream | +| 11.5.0 | 11.5.0 | 4.3.0 | 2.43 | 8.5.0 | 2.43 | Latest release in the GCC 11 series, released 2024-07-19<br />GCC 11 series support ended upstream | +| 12.3.0 | 12.3.0 | 4.3.0 | 2.43 | 8.5.0 | 2.43 | Latest release in the GCC 12 series, released 2023-05-08 | +| **stable** | **13.2.0** | **4.3.0** | **2.43** | **8.5.0** | **2.43** | **Tested stable; based on GCC 13.2.0, released 2023-07-27** | +| 13.3.0 | 13.3.0 | 4.4.0 | 2.43 | 8.5.0 | 2.43 | Latest release in the GCC 13 series, released 2024-05-21 | +| 14.2.0 | 14.2.0 | 4.4.0 | 2.43 | 8.5.0 | 2.43 | Latest release in the GCC 14 series, released 2024-08-01 | +| 13.3.1-dev | 13.3.1 (git) | 4.4.0 | 2.43 | 8.5.0 | 2.43 | Bleeding edge GCC 13 series from git | +| 14.2.1-dev | 14.2.1 (git) | 4.4.0 | 2.43 | 8.5.0 | 2.43 | Bleeding edge GCC 14 series from git | +| 15.0.0-dev | 15.0.0 (git) | 4.4.0 | 2.43 | 8.5.0 | 2.43 | Bleeding edge GCC 15 series from git | +| gccrs-dev | 14.x | 4.4.0 | 2.43 | 8.5.0 | 2.43 | GCC fork for development of the GCCRS Rust compiler | +| rustc-dev | 14.x | 4.4.0 | 2.43 | 8.5.0 | 2.43 | GCC fork for development of the libgccjit rustc GCC codegen | The **stable** profile is the primary, widely tested target for KallistiOS, and is the most recent toolchain profile known to work with all example programs. diff --git a/utils/dc-chain/patches/gcc-11.4.0-kos.diff b/utils/dc-chain/patches/gcc-11.5.0-kos.diff similarity index 73% rename from utils/dc-chain/patches/gcc-11.4.0-kos.diff rename to utils/dc-chain/patches/gcc-11.5.0-kos.diff index b05d6d5d..4dc35670 100644 --- a/utils/dc-chain/patches/gcc-11.4.0-kos.diff +++ b/utils/dc-chain/patches/gcc-11.5.0-kos.diff @@ -1,6 +1,6 @@ -diff --color -ruN gcc-11.4.0/gcc/config/sh/sh-c.c gcc-11.4.0-kos/gcc/config/sh/sh-c.c ---- gcc-11.4.0/gcc/config/sh/sh-c.c 2023-06-05 16:36:14.199287582 -0500 -+++ gcc-11.4.0-kos/gcc/config/sh/sh-c.c 2023-06-05 16:36:16.723296050 -0500 +diff --color -ruN gcc-11.5.0/gcc/config/sh/sh-c.c gcc-11.5.0-kos/gcc/config/sh/sh-c.c +--- gcc-11.5.0/gcc/config/sh/sh-c.c 2023-06-05 16:36:14.199287582 -0500 ++++ gcc-11.5.0-kos/gcc/config/sh/sh-c.c 2023-06-05 16:36:16.723296050 -0500 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -13,9 +13,9 @@ diff --color -ruN gcc-11.4.0/gcc/config/sh/sh-c.c gcc-11.4.0-kos/gcc/config/sh/s + /* Toolchain supports setting up stack for 32MB */ + builtin_define ("__KOS_GCC_32MB__"); } -diff --color -ruN gcc-11.4.0/gcc/config/sh/sh_treg_combine.cc gcc-11.4.0-kos/gcc/config/sh/sh_treg_combine.cc ---- gcc-11.4.0/gcc/config/sh/sh_treg_combine.cc 2023-06-05 16:36:14.199287582 -0500 -+++ gcc-11.4.0-kos/gcc/config/sh/sh_treg_combine.cc 2023-06-05 16:36:16.724296054 -0500 +diff --color -ruN gcc-11.5.0/gcc/config/sh/sh_treg_combine.cc gcc-11.5.0-kos/gcc/config/sh/sh_treg_combine.cc +--- gcc-11.5.0/gcc/config/sh/sh_treg_combine.cc 2023-06-05 16:36:14.199287582 -0500 ++++ gcc-11.5.0-kos/gcc/config/sh/sh_treg_combine.cc 2023-06-05 16:36:16.724296054 -0500 @@ -37,6 +37,7 @@ #include "cfgrtl.h" #include "tree-pass.h" @@ -35,10 +35,10 @@ diff --color -ruN gcc-11.4.0/gcc/config/sh/sh_treg_combine.cc gcc-11.4.0-kos/gcc // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // RTL pass class -diff --color -ruN gcc-11.4.0/gcc/configure gcc-11.4.0-kos/gcc/configure ---- gcc-11.4.0/gcc/configure 2023-06-05 16:36:16.428295060 -0500 -+++ gcc-11.4.0-kos/gcc/configure 2023-06-05 16:36:16.726296060 -0500 -@@ -12635,7 +12635,7 @@ +diff --color -ruN gcc-11.5.0/gcc/configure gcc-11.5.0-kos/gcc/configure +--- gcc-11.5.0/gcc/configure 2023-06-05 16:36:16.428295060 -0500 ++++ gcc-11.5.0-kos/gcc/configure 2023-06-05 16:36:16.726296060 -0500 +@@ -12658,7 +12658,7 @@ target_thread_file='single' ;; aix | dce | lynx | mipssde | posix | rtems | \ @@ -47,9 +47,9 @@ diff --color -ruN gcc-11.4.0/gcc/configure gcc-11.4.0-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff --color -ruN gcc-11.4.0/libgcc/config/sh/t-sh gcc-11.4.0-kos/libgcc/config/sh/t-sh ---- gcc-11.4.0/libgcc/config/sh/t-sh 2023-06-05 16:36:13.515285288 -0500 -+++ gcc-11.4.0-kos/libgcc/config/sh/t-sh 2023-06-05 16:36:16.726296060 -0500 +diff --color -ruN gcc-11.5.0/libgcc/config/sh/t-sh gcc-11.5.0-kos/libgcc/config/sh/t-sh +--- gcc-11.5.0/libgcc/config/sh/t-sh 2023-06-05 16:36:13.515285288 -0500 ++++ gcc-11.5.0-kos/libgcc/config/sh/t-sh 2023-06-05 16:36:16.726296060 -0500 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -59,9 +59,9 @@ diff --color -ruN gcc-11.4.0/libgcc/config/sh/t-sh gcc-11.4.0-kos/libgcc/config/ crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff --color -ruN gcc-11.4.0/libgcc/configure gcc-11.4.0-kos/libgcc/configure ---- gcc-11.4.0/libgcc/configure 2023-06-05 16:36:13.547285395 -0500 -+++ gcc-11.4.0-kos/libgcc/configure 2023-06-05 16:36:16.727296064 -0500 +diff --color -ruN gcc-11.5.0/libgcc/configure gcc-11.5.0-kos/libgcc/configure +--- gcc-11.5.0/libgcc/configure 2023-06-05 16:36:13.547285395 -0500 ++++ gcc-11.5.0-kos/libgcc/configure 2023-06-05 16:36:16.727296064 -0500 @@ -5688,6 +5688,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -70,9 +70,9 @@ diff --color -ruN gcc-11.4.0/libgcc/configure gcc-11.4.0-kos/libgcc/configure esac -diff --color -ruN gcc-11.4.0/libobjc/configure gcc-11.4.0-kos/libobjc/configure ---- gcc-11.4.0/libobjc/configure 2023-06-05 16:36:13.230284332 -0500 -+++ gcc-11.4.0-kos/libobjc/configure 2023-06-05 16:36:16.728296067 -0500 +diff --color -ruN gcc-11.5.0/libobjc/configure gcc-11.5.0-kos/libobjc/configure +--- gcc-11.5.0/libobjc/configure 2023-06-05 16:36:13.230284332 -0500 ++++ gcc-11.5.0-kos/libobjc/configure 2023-06-05 16:36:16.728296067 -0500 @@ -2917,11 +2917,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -85,9 +85,9 @@ diff --color -ruN gcc-11.4.0/libobjc/configure gcc-11.4.0-kos/libobjc/configure ; return 0; } -diff --color -ruN gcc-11.4.0/libobjc/Makefile.in gcc-11.4.0-kos/libobjc/Makefile.in ---- gcc-11.4.0/libobjc/Makefile.in 2023-06-05 16:36:13.229284328 -0500 -+++ gcc-11.4.0-kos/libobjc/Makefile.in 2023-06-05 16:36:16.728296067 -0500 +diff --color -ruN gcc-11.5.0/libobjc/Makefile.in gcc-11.5.0-kos/libobjc/Makefile.in +--- gcc-11.5.0/libobjc/Makefile.in 2023-06-05 16:36:13.229284328 -0500 ++++ gcc-11.5.0-kos/libobjc/Makefile.in 2023-06-05 16:36:16.728296067 -0500 @@ -308,14 +308,16 @@ $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) @@ -118,9 +118,9 @@ diff --color -ruN gcc-11.4.0/libobjc/Makefile.in gcc-11.4.0-kos/libobjc/Makefile mostlyclean: -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo -diff --color -ruN gcc-11.4.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-11.4.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-11.4.0/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-05 16:36:13.754286089 -0500 -+++ gcc-11.4.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-05 16:36:16.728296067 -0500 +diff --color -ruN gcc-11.5.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-11.5.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h +--- gcc-11.5.0/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-05 16:36:13.754286089 -0500 ++++ gcc-11.5.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-06-05 16:36:16.728296067 -0500 @@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -171,10 +171,10 @@ diff --color -ruN gcc-11.4.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-11.4.0-k + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -diff --color -ruN gcc-11.4.0/libstdc++-v3/configure gcc-11.4.0-kos/libstdc++-v3/configure ---- gcc-11.4.0/libstdc++-v3/configure 2023-06-05 16:36:14.088287210 -0500 -+++ gcc-11.4.0-kos/libstdc++-v3/configure 2023-06-05 16:36:16.733296084 -0500 -@@ -15753,6 +15753,7 @@ +diff --color -ruN gcc-11.5.0/libstdc++-v3/configure gcc-11.5.0-kos/libstdc++-v3/configure +--- gcc-11.5.0/libstdc++-v3/configure 2023-06-05 16:36:14.088287210 -0500 ++++ gcc-11.5.0-kos/libstdc++-v3/configure 2023-06-05 16:36:16.733296084 -0500 +@@ -15769,6 +15769,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; win32) thread_header=config/i386/gthr-win32.h ;; diff --git a/utils/dc-chain/patches/gcc-15.0.0-kos.diff b/utils/dc-chain/patches/gcc-15.0.0-kos.diff index e10d57d0..b937ea5d 100644 --- a/utils/dc-chain/patches/gcc-15.0.0-kos.diff +++ b/utils/dc-chain/patches/gcc-15.0.0-kos.diff @@ -16,7 +16,7 @@ diff -ruN gcc-15.0.0/gcc/config/sh/sh-c.cc gcc-15.0.0-kos/gcc/config/sh/sh-c.cc diff -ruN gcc-15.0.0/gcc/configure gcc-15.0.0-kos/gcc/configure --- gcc-15.0.0/gcc/configure 2024-01-04 16:01:33.801051764 -0600 +++ gcc-15.0.0-kos/gcc/configure 2024-01-04 16:01:42.913094480 -0600 -@@ -13220,7 +13220,7 @@ +@@ -13051,7 +13051,7 @@ target_thread_file='single' ;; aix | dce | lynx | mipssde | posix | rtems | \ @@ -40,7 +40,7 @@ diff -ruN gcc-15.0.0/libgcc/config/sh/t-sh gcc-15.0.0-kos/libgcc/config/sh/t-sh diff -ruN gcc-15.0.0/libgcc/configure gcc-15.0.0-kos/libgcc/configure --- gcc-15.0.0/libgcc/configure 2024-01-04 16:01:37.139067412 -0600 +++ gcc-15.0.0-kos/libgcc/configure 2024-01-04 16:01:42.914094485 -0600 -@@ -5763,6 +5763,7 @@ +@@ -5731,6 +5731,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; win32) thread_header=config/i386/gthr-win32.h ;; diff --git a/utils/dc-chain/profiles/profile.10.5.0.mk b/utils/dc-chain/profiles/profile.10.5.0.mk index 4cf8a4fd..36134d8f 100644 --- a/utils/dc-chain/profiles/profile.10.5.0.mk +++ b/utils/dc-chain/profiles/profile.10.5.0.mk @@ -2,7 +2,7 @@ # This file is part of KallistiOS. # Toolchain versions for SH -sh_binutils_ver=2.41 +sh_binutils_ver=2.43 sh_gcc_ver=10.5.0 newlib_ver=4.3.0.20230120 gdb_ver=15.1 @@ -10,7 +10,7 @@ gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core # used in the Dreamcast's AICA is not available in versions of GCC beyond 8.5.0. -arm_binutils_ver=2.41 +arm_binutils_ver=2.43 arm_gcc_ver=8.5.0 # GCC custom dependencies diff --git a/utils/dc-chain/profiles/profile.11.4.0.mk b/utils/dc-chain/profiles/profile.11.5.0.mk similarity index 94% rename from utils/dc-chain/profiles/profile.11.4.0.mk rename to utils/dc-chain/profiles/profile.11.5.0.mk index 34266f51..c0427f55 100644 --- a/utils/dc-chain/profiles/profile.11.4.0.mk +++ b/utils/dc-chain/profiles/profile.11.5.0.mk @@ -2,15 +2,15 @@ # This file is part of KallistiOS. # Toolchain versions for SH -sh_binutils_ver=2.41 -sh_gcc_ver=11.4.0 +sh_binutils_ver=2.43 +sh_gcc_ver=11.5.0 newlib_ver=4.3.0.20230120 gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core # used in the Dreamcast's AICA is not available in versions of GCC beyond 8.5.0. -arm_binutils_ver=2.41 +arm_binutils_ver=2.43 arm_gcc_ver=8.5.0 # GCC custom dependencies diff --git a/utils/dc-chain/profiles/profile.12.4.0.mk b/utils/dc-chain/profiles/profile.12.4.0.mk index f4628cd9..283f7ffd 100644 --- a/utils/dc-chain/profiles/profile.12.4.0.mk +++ b/utils/dc-chain/profiles/profile.12.4.0.mk @@ -2,7 +2,7 @@ # This file is part of KallistiOS. # Toolchain versions for SH -sh_binutils_ver=2.41 +sh_binutils_ver=2.43 sh_gcc_ver=12.4.0 newlib_ver=4.3.0.20230120 gdb_ver=15.1 @@ -10,7 +10,7 @@ gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core # used in the Dreamcast's AICA is not available in versions of GCC beyond 8.5.0. -arm_binutils_ver=2.41 +arm_binutils_ver=2.43 arm_gcc_ver=8.5.0 # GCC custom dependencies diff --git a/utils/dc-chain/profiles/profile.13.3.0.mk b/utils/dc-chain/profiles/profile.13.3.0.mk index 9e32135f..ab3d9903 100644 --- a/utils/dc-chain/profiles/profile.13.3.0.mk +++ b/utils/dc-chain/profiles/profile.13.3.0.mk @@ -2,7 +2,7 @@ # This file is part of KallistiOS. # Toolchain versions for SH -sh_binutils_ver=2.42 +sh_binutils_ver=2.43 sh_gcc_ver=13.3.0 newlib_ver=4.4.0.20231231 gdb_ver=15.1 @@ -10,7 +10,7 @@ gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core # used in the Dreamcast's AICA is not available in versions of GCC beyond 8.5.0. -arm_binutils_ver=2.42 +arm_binutils_ver=2.43 arm_gcc_ver=8.5.0 # GCC custom dependencies diff --git a/utils/dc-chain/profiles/profile.13.3.1-dev.mk b/utils/dc-chain/profiles/profile.13.3.1-dev.mk index c383442e..fb13ea9e 100644 --- a/utils/dc-chain/profiles/profile.13.3.1-dev.mk +++ b/utils/dc-chain/profiles/profile.13.3.1-dev.mk @@ -9,7 +9,7 @@ ############################################################################### # Toolchain versions for SH -sh_binutils_ver=2.42 +sh_binutils_ver=2.43 sh_gcc_ver=13.3.1 newlib_ver=4.4.0.20231231 gdb_ver=15.1 @@ -22,7 +22,7 @@ sh_gcc_git_branch=releases/gcc-13 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core # used in the Dreamcast's AICA is not available in versions of GCC beyond 8.5.0. -arm_binutils_ver=2.42 +arm_binutils_ver=2.43 arm_gcc_ver=8.5.0 # GCC custom dependencies diff --git a/utils/dc-chain/profiles/profile.14.2.0.mk b/utils/dc-chain/profiles/profile.14.2.0.mk index c7e015e2..6f599b84 100644 --- a/utils/dc-chain/profiles/profile.14.2.0.mk +++ b/utils/dc-chain/profiles/profile.14.2.0.mk @@ -2,7 +2,7 @@ # This file is part of KallistiOS. # Toolchain versions for SH -sh_binutils_ver=2.42 +sh_binutils_ver=2.43 sh_gcc_ver=14.2.0 newlib_ver=4.4.0.20231231 gdb_ver=15.1 @@ -10,7 +10,7 @@ gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core # used in the Dreamcast's AICA is not available in versions of GCC beyond 8.5.0. -arm_binutils_ver=2.42 +arm_binutils_ver=2.43 arm_gcc_ver=8.5.0 # GCC custom dependencies diff --git a/utils/dc-chain/profiles/profile.14.2.1-dev.mk b/utils/dc-chain/profiles/profile.14.2.1-dev.mk index 9fd615d5..5bea7f27 100644 --- a/utils/dc-chain/profiles/profile.14.2.1-dev.mk +++ b/utils/dc-chain/profiles/profile.14.2.1-dev.mk @@ -9,7 +9,7 @@ ############################################################################### # Toolchain versions for SH -sh_binutils_ver=2.42 +sh_binutils_ver=2.43 sh_gcc_ver=14.2.1 newlib_ver=4.4.0.20231231 gdb_ver=15.1 @@ -22,7 +22,7 @@ sh_gcc_git_branch=releases/gcc-14 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core # used in the Dreamcast's AICA is not available in versions of GCC beyond 8.5.0. -arm_binutils_ver=2.42 +arm_binutils_ver=2.43 arm_gcc_ver=8.5.0 # GCC custom dependencies diff --git a/utils/dc-chain/profiles/profile.15.0.0-dev.mk b/utils/dc-chain/profiles/profile.15.0.0-dev.mk index ffd0dbde..9e5942c7 100644 --- a/utils/dc-chain/profiles/profile.15.0.0-dev.mk +++ b/utils/dc-chain/profiles/profile.15.0.0-dev.mk @@ -9,7 +9,7 @@ ############################################################################### # Toolchain versions for SH -sh_binutils_ver=2.42 +sh_binutils_ver=2.43 sh_gcc_ver=15.0.0 newlib_ver=4.4.0.20231231 gdb_ver=15.1 @@ -22,7 +22,7 @@ sh_gcc_git_branch=master # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core # used in the Dreamcast's AICA is not available in versions of GCC beyond 8.5.0. -arm_binutils_ver=2.42 +arm_binutils_ver=2.43 arm_gcc_ver=8.5.0 # GCC custom dependencies diff --git a/utils/dc-chain/profiles/profile.gccrs-dev.mk b/utils/dc-chain/profiles/profile.gccrs-dev.mk index 1f14127e..148c11d9 100644 --- a/utils/dc-chain/profiles/profile.gccrs-dev.mk +++ b/utils/dc-chain/profiles/profile.gccrs-dev.mk @@ -9,7 +9,7 @@ ############################################################################### # Toolchain versions for SH -sh_binutils_ver=2.42 +sh_binutils_ver=2.43 sh_gcc_ver=rs newlib_ver=4.4.0.20231231 gdb_ver=15.1 @@ -22,7 +22,7 @@ sh_gcc_git_branch=master # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core # used in the Dreamcast's AICA is not available in versions of GCC beyond 8.5.0. -arm_binutils_ver=2.42 +arm_binutils_ver=2.43 arm_gcc_ver=8.5.0 # GCC custom dependencies diff --git a/utils/dc-chain/profiles/profile.rustc-dev.mk b/utils/dc-chain/profiles/profile.rustc-dev.mk index 7a472357..b2f96aa4 100644 --- a/utils/dc-chain/profiles/profile.rustc-dev.mk +++ b/utils/dc-chain/profiles/profile.rustc-dev.mk @@ -9,7 +9,7 @@ ############################################################################### # Toolchain versions for SH -sh_binutils_ver=2.42 +sh_binutils_ver=2.43 sh_gcc_ver=rustc newlib_ver=4.4.0.20231231 gdb_ver=15.1 @@ -22,7 +22,7 @@ sh_gcc_git_branch=master # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core # used in the Dreamcast's AICA is not available in versions of GCC beyond 8.5.0. -arm_binutils_ver=2.42 +arm_binutils_ver=2.43 arm_gcc_ver=8.5.0 # GCC custom dependencies diff --git a/utils/dc-chain/profiles/profile.stable.mk b/utils/dc-chain/profiles/profile.stable.mk index 8072b2da..8dd0b74e 100644 --- a/utils/dc-chain/profiles/profile.stable.mk +++ b/utils/dc-chain/profiles/profile.stable.mk @@ -2,7 +2,7 @@ # This file is part of KallistiOS. # Toolchain versions for SH -sh_binutils_ver=2.41 +sh_binutils_ver=2.43 sh_gcc_ver=13.2.0 newlib_ver=4.3.0.20230120 gdb_ver=15.1 @@ -10,7 +10,7 @@ gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core # used in the Dreamcast's AICA is not available in versions of GCC beyond 8.5.0. -arm_binutils_ver=2.41 +arm_binutils_ver=2.43 arm_gcc_ver=8.5.0 # GCC custom dependencies hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: quzar <qu...@us...> - 2024-08-06 06:40:19
|
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 90f95e840f1bbfcb03c71240250bf1c3b84219d2 (commit) from 013fef38184d6d8517a42e8acea8f6b9558e33d9 (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 90f95e840f1bbfcb03c71240250bf1c3b84219d2 Author: Falco Girgis <gyr...@gm...> Date: Tue Aug 6 01:38:34 2024 -0500 Added declaration for nanosleep to time.h. (#691) Since we don't define _POSIX_TIMERS (since we don't suppor them (yet)), Newlib does not provide us with a protype for nanosleep(). I've added it to KOS's time.h extension header. ----------------------------------------------------------------------- Summary of changes: include/kos/time.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/kos/time.h b/include/kos/time.h index fe6f2ddc..5fa1f7ba 100644 --- a/include/kos/time.h +++ b/include/kos/time.h @@ -113,12 +113,14 @@ extern __time_t timegm(struct tm *timeptr); #endif /* Explicitly provided function declarations for POSIX clock API, since -getting them from Newlib requires supporting the rest of the _POSIX_TIMERS -API, which is not implemented yet. */ + getting them from Newlib requires supporting the rest of the _POSIX_TIMERS + API, which is not implemented yet. */ extern int clock_settime(__clockid_t clock_id, const struct timespec *ts); extern int clock_gettime(__clockid_t clock_id, struct timespec *ts); extern int clock_getres(__clockid_t clock_id, struct timespec *res); +extern int nanosleep(const struct timespec *req, struct timespec *rem); + #endif /** \endcond */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-08-02 03:44: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 013fef38184d6d8517a42e8acea8f6b9558e33d9 (commit) from c8aef24a4e9674e77cb8b6854c652cf68e3eac40 (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 013fef38184d6d8517a42e8acea8f6b9558e33d9 Author: darcagn <da...@pr...> Date: Thu Aug 1 22:44:05 2024 -0500 * dc-chain: Update 14.1.0 profile to GCC 14.2.0 (#689) * dc-chain: Update 14.1.1-dev profile to GCC 14.2.1 (git) ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/Makefile.default.cfg | 4 +- utils/dc-chain/README.md | 4 +- .../{gcc-14.1.0-kos.diff => gcc-14.2.0-kos.diff} | 48 +++++++++++----------- .../{gcc-14.1.1-kos.diff => gcc-14.2.1-kos.diff} | 48 +++++++++++----------- .../{profile.14.1.0.mk => profile.14.2.0.mk} | 2 +- ...profile.14.1.1-dev.mk => profile.14.2.1-dev.mk} | 4 +- 6 files changed, 55 insertions(+), 55 deletions(-) rename utils/dc-chain/patches/{gcc-14.1.0-kos.diff => gcc-14.2.0-kos.diff} (75%) rename utils/dc-chain/patches/{gcc-14.1.1-kos.diff => gcc-14.2.1-kos.diff} (74%) rename utils/dc-chain/profiles/{profile.14.1.0.mk => profile.14.2.0.mk} (98%) rename utils/dc-chain/profiles/{profile.14.1.1-dev.mk => profile.14.2.1-dev.mk} (94%) diff --git a/utils/dc-chain/Makefile.default.cfg b/utils/dc-chain/Makefile.default.cfg index d877a823..d539b43e 100644 --- a/utils/dc-chain/Makefile.default.cfg +++ b/utils/dc-chain/Makefile.default.cfg @@ -15,10 +15,10 @@ # - 12.4.0: Latest release in the GCC 12 series, released 2023-06-20. # - stable: Tested stable; based on GCC 13.2.0, released 2023-07-27. # - 13.3.0: Latest release in the GCC 13 series, released 2024-05-21. -# - 14.1.0: Latest release in the GCC 14 series, released 2024-05-07. +# - 14.2.0: Latest release in the GCC 14 series, released 2024-08-01. # Development versions: # - 13.3.1-dev Bleeding edge GCC 13 series from git. -# - 14.1.1-dev Bleeding edge GCC 14 series from git. +# - 14.2.1-dev Bleeding edge GCC 14 series from git. # - 15.0.0-dev Bleeding edge GCC 15 series from git. # - gccrs-dev: GCC fork for development of the GCCRS Rust compiler. # - rustc-dev: GCC fork for development of the libgccjit rustc GCC codegen. diff --git a/utils/dc-chain/README.md b/utils/dc-chain/README.md index 02a54190..7f645d11 100644 --- a/utils/dc-chain/README.md +++ b/utils/dc-chain/README.md @@ -105,9 +105,9 @@ The following toolchain profiles are available for users to select in | 12.3.0 | 12.3.0 | 4.3.0 | 2.41 | 8.5.0 | 2.41 | Latest release in the GCC 12 series, released 2023-05-08 | | **stable** | **13.2.0** | **4.3.0** | **2.41** | **8.5.0** | **2.41** | **Tested stable; based on GCC 13.2.0, released 2023-07-27** | | 13.3.0 | 13.3.0 | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Latest release in the GCC 13 series, released 2024-05-21 | -| 14.1.0 | 14.1.0 | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Latest release in the GCC 14 series, released 2024-05-07 | +| 14.2.0 | 14.2.0 | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Latest release in the GCC 14 series, released 2024-08-01 | | 13.3.1-dev | 13.3.1 (git) | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Bleeding edge GCC 13 series from git | -| 14.1.1-dev | 14.0.1 (git) | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Bleeding edge GCC 14 series from git | +| 14.2.1-dev | 14.2.1 (git) | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Bleeding edge GCC 14 series from git | | 15.0.0-dev | 15.0.0 (git) | 4.4.0 | 2.42 | 8.5.0 | 2.42 | Bleeding edge GCC 15 series from git | | gccrs-dev | 14.x | 4.4.0 | 2.42 | 8.5.0 | 2.42 | GCC fork for development of the GCCRS Rust compiler | | rustc-dev | 14.x | 4.4.0 | 2.42 | 8.5.0 | 2.42 | GCC fork for development of the libgccjit rustc GCC codegen | diff --git a/utils/dc-chain/patches/gcc-14.1.0-kos.diff b/utils/dc-chain/patches/gcc-14.2.0-kos.diff similarity index 75% rename from utils/dc-chain/patches/gcc-14.1.0-kos.diff rename to utils/dc-chain/patches/gcc-14.2.0-kos.diff index ffb4f677..d76c0b44 100644 --- a/utils/dc-chain/patches/gcc-14.1.0-kos.diff +++ b/utils/dc-chain/patches/gcc-14.2.0-kos.diff @@ -1,6 +1,6 @@ -diff -ruN gcc-14.1.0/gcc/config/sh/sh-c.cc gcc-14.1.0-kos/gcc/config/sh/sh-c.cc ---- gcc-14.1.0/gcc/config/sh/sh-c.cc 2024-01-04 16:01:33.790051712 -0600 -+++ gcc-14.1.0-kos/gcc/config/sh/sh-c.cc 2024-01-04 16:01:42.910094466 -0600 +diff -ruN gcc-14.2.0/gcc/config/sh/sh-c.cc gcc-14.2.0-kos/gcc/config/sh/sh-c.cc +--- gcc-14.2.0/gcc/config/sh/sh-c.cc 2024-01-04 16:01:33.790051712 -0600 ++++ gcc-14.2.0-kos/gcc/config/sh/sh-c.cc 2024-01-04 16:01:42.910094466 -0600 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -13,9 +13,9 @@ diff -ruN gcc-14.1.0/gcc/config/sh/sh-c.cc gcc-14.1.0-kos/gcc/config/sh/sh-c.cc + /* Toolchain supports setting up stack for 32MB */ + builtin_define ("__KOS_GCC_32MB__"); } -diff -ruN gcc-14.1.0/gcc/configure gcc-14.1.0-kos/gcc/configure ---- gcc-14.1.0/gcc/configure 2024-01-04 16:01:33.801051764 -0600 -+++ gcc-14.1.0-kos/gcc/configure 2024-01-04 16:01:42.913094480 -0600 +diff -ruN gcc-14.2.0/gcc/configure gcc-14.2.0-kos/gcc/configure +--- gcc-14.2.0/gcc/configure 2024-01-04 16:01:33.801051764 -0600 ++++ gcc-14.2.0-kos/gcc/configure 2024-01-04 16:01:42.913094480 -0600 @@ -13220,7 +13220,7 @@ target_thread_file='single' ;; @@ -25,9 +25,9 @@ diff -ruN gcc-14.1.0/gcc/configure gcc-14.1.0-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff -ruN gcc-14.1.0/libgcc/config/sh/t-sh gcc-14.1.0-kos/libgcc/config/sh/t-sh ---- gcc-14.1.0/libgcc/config/sh/t-sh 2024-01-04 16:01:37.134067388 -0600 -+++ gcc-14.1.0-kos/libgcc/config/sh/t-sh 2024-01-04 16:01:42.914094485 -0600 +diff -ruN gcc-14.2.0/libgcc/config/sh/t-sh gcc-14.2.0-kos/libgcc/config/sh/t-sh +--- gcc-14.2.0/libgcc/config/sh/t-sh 2024-01-04 16:01:37.134067388 -0600 ++++ gcc-14.2.0-kos/libgcc/config/sh/t-sh 2024-01-04 16:01:42.914094485 -0600 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -37,9 +37,9 @@ diff -ruN gcc-14.1.0/libgcc/config/sh/t-sh gcc-14.1.0-kos/libgcc/config/sh/t-sh crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff -ruN gcc-14.1.0/libgcc/configure gcc-14.1.0-kos/libgcc/configure ---- gcc-14.1.0/libgcc/configure 2024-01-04 16:01:37.139067412 -0600 -+++ gcc-14.1.0-kos/libgcc/configure 2024-01-04 16:01:42.914094485 -0600 +diff -ruN gcc-14.2.0/libgcc/configure gcc-14.2.0-kos/libgcc/configure +--- gcc-14.2.0/libgcc/configure 2024-01-04 16:01:37.139067412 -0600 ++++ gcc-14.2.0-kos/libgcc/configure 2024-01-04 16:01:42.914094485 -0600 @@ -5763,6 +5763,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -48,9 +48,9 @@ diff -ruN gcc-14.1.0/libgcc/configure gcc-14.1.0-kos/libgcc/configure mcf) thread_header=config/i386/gthr-mcf.h ;; esac -diff -ruN gcc-14.1.0/libobjc/configure gcc-14.1.0-kos/libobjc/configure ---- gcc-14.1.0/libobjc/configure 2024-01-04 16:01:37.499069099 -0600 -+++ gcc-14.1.0-kos/libobjc/configure 2024-01-04 16:01:42.915094489 -0600 +diff -ruN gcc-14.2.0/libobjc/configure gcc-14.2.0-kos/libobjc/configure +--- gcc-14.2.0/libobjc/configure 2024-01-04 16:01:37.499069099 -0600 ++++ gcc-14.2.0-kos/libobjc/configure 2024-01-04 16:01:42.915094489 -0600 @@ -2924,11 +2924,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -63,9 +63,9 @@ diff -ruN gcc-14.1.0/libobjc/configure gcc-14.1.0-kos/libobjc/configure ; return 0; } -diff -ruN gcc-14.1.0/libobjc/Makefile.in gcc-14.1.0-kos/libobjc/Makefile.in ---- gcc-14.1.0/libobjc/Makefile.in 2024-01-04 16:01:37.499069099 -0600 -+++ gcc-14.1.0-kos/libobjc/Makefile.in 2024-01-04 16:01:42.915094489 -0600 +diff -ruN gcc-14.2.0/libobjc/Makefile.in gcc-14.2.0-kos/libobjc/Makefile.in +--- gcc-14.2.0/libobjc/Makefile.in 2024-01-04 16:01:37.499069099 -0600 ++++ gcc-14.2.0-kos/libobjc/Makefile.in 2024-01-04 16:01:42.915094489 -0600 @@ -308,14 +308,16 @@ $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) @@ -96,9 +96,9 @@ diff -ruN gcc-14.1.0/libobjc/Makefile.in gcc-14.1.0-kos/libobjc/Makefile.in mostlyclean: -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo -diff -ruN gcc-14.1.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-14.1.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-14.1.0/libstdc++-v3/config/cpu/sh/atomicity.h 2024-01-04 16:01:37.608069611 -0600 -+++ gcc-14.1.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2024-01-04 16:01:42.916094494 -0600 +diff -ruN gcc-14.2.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-14.2.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h +--- gcc-14.2.0/libstdc++-v3/config/cpu/sh/atomicity.h 2024-01-04 16:01:37.608069611 -0600 ++++ gcc-14.2.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2024-01-04 16:01:42.916094494 -0600 @@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -149,9 +149,9 @@ diff -ruN gcc-14.1.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-14.1.0-kos/libst + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -diff -ruN gcc-14.1.0/libstdc++-v3/configure gcc-14.1.0-kos/libstdc++-v3/configure ---- gcc-14.1.0/libstdc++-v3/configure 2024-01-04 16:01:37.616069648 -0600 -+++ gcc-14.1.0-kos/libstdc++-v3/configure 2024-01-04 16:01:42.919094508 -0600 +diff -ruN gcc-14.2.0/libstdc++-v3/configure gcc-14.2.0-kos/libstdc++-v3/configure +--- gcc-14.2.0/libstdc++-v3/configure 2024-01-04 16:01:37.616069648 -0600 ++++ gcc-14.2.0-kos/libstdc++-v3/configure 2024-01-04 16:01:42.919094508 -0600 @@ -15974,6 +15974,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; diff --git a/utils/dc-chain/patches/gcc-14.1.1-kos.diff b/utils/dc-chain/patches/gcc-14.2.1-kos.diff similarity index 74% rename from utils/dc-chain/patches/gcc-14.1.1-kos.diff rename to utils/dc-chain/patches/gcc-14.2.1-kos.diff index c4fa40a7..a9033017 100644 --- a/utils/dc-chain/patches/gcc-14.1.1-kos.diff +++ b/utils/dc-chain/patches/gcc-14.2.1-kos.diff @@ -1,6 +1,6 @@ -diff -ruN gcc-14.1.1/gcc/config/sh/sh-c.cc gcc-14.1.1-kos/gcc/config/sh/sh-c.cc ---- gcc-14.1.1/gcc/config/sh/sh-c.cc 2024-01-04 16:01:33.790051712 -0600 -+++ gcc-14.1.1-kos/gcc/config/sh/sh-c.cc 2024-01-04 16:01:42.910094466 -0600 +diff -ruN gcc-14.2.1/gcc/config/sh/sh-c.cc gcc-14.2.1-kos/gcc/config/sh/sh-c.cc +--- gcc-14.2.1/gcc/config/sh/sh-c.cc 2024-01-04 16:01:33.790051712 -0600 ++++ gcc-14.2.1-kos/gcc/config/sh/sh-c.cc 2024-01-04 16:01:42.910094466 -0600 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -13,9 +13,9 @@ diff -ruN gcc-14.1.1/gcc/config/sh/sh-c.cc gcc-14.1.1-kos/gcc/config/sh/sh-c.cc + /* Toolchain supports setting up stack for 32MB */ + builtin_define ("__KOS_GCC_32MB__"); } -diff -ruN gcc-14.1.1/gcc/configure gcc-14.1.1-kos/gcc/configure ---- gcc-14.1.1/gcc/configure 2024-01-04 16:01:33.801051764 -0600 -+++ gcc-14.1.1-kos/gcc/configure 2024-01-04 16:01:42.913094480 -0600 +diff -ruN gcc-14.2.1/gcc/configure gcc-14.2.1-kos/gcc/configure +--- gcc-14.2.1/gcc/configure 2024-01-04 16:01:33.801051764 -0600 ++++ gcc-14.2.1-kos/gcc/configure 2024-01-04 16:01:42.913094480 -0600 @@ -13220,7 +13220,7 @@ target_thread_file='single' ;; @@ -25,9 +25,9 @@ diff -ruN gcc-14.1.1/gcc/configure gcc-14.1.1-kos/gcc/configure target_thread_file=${enable_threads} ;; *) -diff -ruN gcc-14.1.1/libgcc/config/sh/t-sh gcc-14.1.1-kos/libgcc/config/sh/t-sh ---- gcc-14.1.1/libgcc/config/sh/t-sh 2024-01-04 16:01:37.134067388 -0600 -+++ gcc-14.1.1-kos/libgcc/config/sh/t-sh 2024-01-04 16:01:42.914094485 -0600 +diff -ruN gcc-14.2.1/libgcc/config/sh/t-sh gcc-14.2.1-kos/libgcc/config/sh/t-sh +--- gcc-14.2.1/libgcc/config/sh/t-sh 2024-01-04 16:01:37.134067388 -0600 ++++ gcc-14.2.1-kos/libgcc/config/sh/t-sh 2024-01-04 16:01:42.914094485 -0600 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -37,9 +37,9 @@ diff -ruN gcc-14.1.1/libgcc/config/sh/t-sh gcc-14.1.1-kos/libgcc/config/sh/t-sh crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff -ruN gcc-14.1.1/libgcc/configure gcc-14.1.1-kos/libgcc/configure ---- gcc-14.1.1/libgcc/configure 2024-01-04 16:01:37.139067412 -0600 -+++ gcc-14.1.1-kos/libgcc/configure 2024-01-04 16:01:42.914094485 -0600 +diff -ruN gcc-14.2.1/libgcc/configure gcc-14.2.1-kos/libgcc/configure +--- gcc-14.2.1/libgcc/configure 2024-01-04 16:01:37.139067412 -0600 ++++ gcc-14.2.1-kos/libgcc/configure 2024-01-04 16:01:42.914094485 -0600 @@ -5763,6 +5763,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -48,9 +48,9 @@ diff -ruN gcc-14.1.1/libgcc/configure gcc-14.1.1-kos/libgcc/configure mcf) thread_header=config/i386/gthr-mcf.h ;; esac -diff -ruN gcc-14.1.1/libobjc/configure gcc-14.1.1-kos/libobjc/configure ---- gcc-14.1.1/libobjc/configure 2024-01-04 16:01:37.499069099 -0600 -+++ gcc-14.1.1-kos/libobjc/configure 2024-01-04 16:01:42.915094489 -0600 +diff -ruN gcc-14.2.1/libobjc/configure gcc-14.2.1-kos/libobjc/configure +--- gcc-14.2.1/libobjc/configure 2024-01-04 16:01:37.499069099 -0600 ++++ gcc-14.2.1-kos/libobjc/configure 2024-01-04 16:01:42.915094489 -0600 @@ -2924,11 +2924,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -63,9 +63,9 @@ diff -ruN gcc-14.1.1/libobjc/configure gcc-14.1.1-kos/libobjc/configure ; return 0; } -diff -ruN gcc-14.1.1/libobjc/Makefile.in gcc-14.1.1-kos/libobjc/Makefile.in ---- gcc-14.1.1/libobjc/Makefile.in 2024-01-04 16:01:37.499069099 -0600 -+++ gcc-14.1.1-kos/libobjc/Makefile.in 2024-01-04 16:01:42.915094489 -0600 +diff -ruN gcc-14.2.1/libobjc/Makefile.in gcc-14.2.1-kos/libobjc/Makefile.in +--- gcc-14.2.1/libobjc/Makefile.in 2024-01-04 16:01:37.499069099 -0600 ++++ gcc-14.2.1-kos/libobjc/Makefile.in 2024-01-04 16:01:42.915094489 -0600 @@ -308,14 +308,16 @@ $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) @@ -96,9 +96,9 @@ diff -ruN gcc-14.1.1/libobjc/Makefile.in gcc-14.1.1-kos/libobjc/Makefile.in mostlyclean: -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo -diff -ruN gcc-14.1.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-14.1.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-14.1.1/libstdc++-v3/config/cpu/sh/atomicity.h 2024-01-04 16:01:37.608069611 -0600 -+++ gcc-14.1.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2024-01-04 16:01:42.916094494 -0600 +diff -ruN gcc-14.2.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-14.2.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h +--- gcc-14.2.1/libstdc++-v3/config/cpu/sh/atomicity.h 2024-01-04 16:01:37.608069611 -0600 ++++ gcc-14.2.1-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2024-01-04 16:01:42.916094494 -0600 @@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -149,9 +149,9 @@ diff -ruN gcc-14.1.1/libstdc++-v3/config/cpu/sh/atomicity.h gcc-14.1.1-kos/libst + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -diff -ruN gcc-14.1.1/libstdc++-v3/configure gcc-14.1.1-kos/libstdc++-v3/configure ---- gcc-14.1.1/libstdc++-v3/configure 2024-01-04 16:01:37.616069648 -0600 -+++ gcc-14.1.1-kos/libstdc++-v3/configure 2024-01-04 16:01:42.919094508 -0600 +diff -ruN gcc-14.2.1/libstdc++-v3/configure gcc-14.2.1-kos/libstdc++-v3/configure +--- gcc-14.2.1/libstdc++-v3/configure 2024-01-04 16:01:37.616069648 -0600 ++++ gcc-14.2.1-kos/libstdc++-v3/configure 2024-01-04 16:01:42.919094508 -0600 @@ -15974,6 +15974,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; diff --git a/utils/dc-chain/profiles/profile.14.1.0.mk b/utils/dc-chain/profiles/profile.14.2.0.mk similarity index 98% rename from utils/dc-chain/profiles/profile.14.1.0.mk rename to utils/dc-chain/profiles/profile.14.2.0.mk index 380bd801..c7e015e2 100644 --- a/utils/dc-chain/profiles/profile.14.1.0.mk +++ b/utils/dc-chain/profiles/profile.14.2.0.mk @@ -3,7 +3,7 @@ # Toolchain versions for SH sh_binutils_ver=2.42 -sh_gcc_ver=14.1.0 +sh_gcc_ver=14.2.0 newlib_ver=4.4.0.20231231 gdb_ver=15.1 diff --git a/utils/dc-chain/profiles/profile.14.1.1-dev.mk b/utils/dc-chain/profiles/profile.14.2.1-dev.mk similarity index 94% rename from utils/dc-chain/profiles/profile.14.1.1-dev.mk rename to utils/dc-chain/profiles/profile.14.2.1-dev.mk index 8dd7962e..9fd615d5 100644 --- a/utils/dc-chain/profiles/profile.14.1.1-dev.mk +++ b/utils/dc-chain/profiles/profile.14.2.1-dev.mk @@ -4,13 +4,13 @@ ############################################################################### ############################################################################### ### THIS CONFIG IS FOR AN EXPERIMENTAL VERSION OF GCC! -## THERE ARE NO KNOWN ISSUES BUILDING THIS VERSION as of 2024-04-26. +## THERE ARE NO KNOWN ISSUES BUILDING THIS VERSION as of 2024-08-01. ############################################################################### ############################################################################### # Toolchain versions for SH sh_binutils_ver=2.42 -sh_gcc_ver=14.1.1 +sh_gcc_ver=14.2.1 newlib_ver=4.4.0.20231231 gdb_ver=15.1 hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-07-31 18:58:25
|
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 c8aef24a4e9674e77cb8b6854c652cf68e3eac40 (commit) from 973216532c9cd340ce71aefa28c1233c10ffeff3 (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 c8aef24a4e9674e77cb8b6854c652cf68e3eac40 Author: Andy Barajas <and...@gm...> Date: Wed Jul 31 11:57:02 2024 -0700 Update minimum macOS version for toolchain build (#685) Updated the CXX line to set -mmacosx-version-min to 10.14 from 10.7 to support building the toolchain on M1 Macs. This ensures compatibility with newer macOS versions. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/scripts/init.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/dc-chain/scripts/init.mk b/utils/dc-chain/scripts/init.mk index bc37f4db..0115ca7d 100644 --- a/utils/dc-chain/scripts/init.mk +++ b/utils/dc-chain/scripts/init.mk @@ -63,7 +63,7 @@ ifdef MACOS sdkroot = $(shell xcrun --sdk macosx --show-sdk-path) macos_extra_args = -isysroot $(sdkroot) CC += -Wno-nullability-completeness -Wno-missing-braces $(macos_extra_args) - CXX += -stdlib=libc++ -mmacosx-version-min=10.7 $(macos_extra_args) + CXX += -stdlib=libc++ -mmacosx-version-min=10.14 $(macos_extra_args) SH_CC_FOR_TARGET += $(macos_extra_args) SH_CXX_FOR_TARGET += $(macos_extra_args) macos_gcc_configure_args = --with-sysroot --with-native-system-header=/usr/include hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-07-31 17:59:48
|
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 973216532c9cd340ce71aefa28c1233c10ffeff3 (commit) from 25a851792351a9818cc5d02762f5f925ee05e69b (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 973216532c9cd340ce71aefa28c1233c10ffeff3 Author: Donald Haase <qu...@ya...> Date: Wed Jul 31 13:59:22 2024 -0400 Replace duplicated define for the size of the PVR RAM (#688) Co-authored-by: QuzarDC <qu...@co...> ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/video.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/video.c b/kernel/arch/dreamcast/hardware/video.c index 6cae86f9..df945333 100644 --- a/kernel/arch/dreamcast/hardware/video.c +++ b/kernel/arch/dreamcast/hardware/video.c @@ -14,9 +14,6 @@ #include <string.h> #include <stdio.h> -/* The size of the vram. TODO: This needs a better home */ -#define PVR_MEM_SIZE 0x800000 - /*-----------------------------------------------------------------------------*/ /* This table is indexed w/ DM_* */ vid_mode_t vid_builtin[DM_MODE_COUNT] = { @@ -283,7 +280,7 @@ void vid_set_mode(int dm, vid_pixel_mode_t pm) { if(mb == DM_MULTIBUFFER) { /* Fill vram with framebuffers */ - mode.fb_count = PVR_MEM_SIZE / mode.fb_size; + mode.fb_count = PVR_RAM_SIZE / mode.fb_size; } /* This is also to be generic */ @@ -433,7 +430,7 @@ void vid_set_vram(uint32_t base) { void vid_set_start(uint32_t base) { /* Set vram base of current framebuffer */ - base &= (PVR_MEM_SIZE - 1); + base &= (PVR_RAM_SIZE - 1); PVR_SET(PVR_FB_ADDR, base); vid_set_vram(base); @@ -531,7 +528,7 @@ void vid_clear(uint8_t r, uint8_t g, uint8_t b) { /*-----------------------------------------------------------------------------*/ /* Clears all of video memory as quickly as possible */ void vid_empty(void) { - sq_clr((uint32_t *)PVR_RAM_BASE, PVR_MEM_SIZE); + sq_clr((uint32_t *)PVR_RAM_BASE, PVR_RAM_SIZE); } /*-----------------------------------------------------------------------------*/ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: quzar <qu...@us...> - 2024-07-31 16:58:18
|
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 25a851792351a9818cc5d02762f5f925ee05e69b (commit) via 3f12e2627cbb9c7446345ed4627278c6e0cbf099 (commit) via d3e17e6bcfc558bda85ef8b0a63379061d646ea7 (commit) from d07bebfc468cd0046364031a01158c2e83ea2e00 (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 25a851792351a9818cc5d02762f5f925ee05e69b Author: Falco Girgis <gyr...@gm...> Date: Wed Jul 31 11:55:31 2024 -0500 Added utime h POSIX header file (#658) * Added utime.h header for missing declaration. - Freaking Newlib does NOT publicly declare the utime() function within the cross-platform header, utime.h; however, we have utime() implemented for SH. - Trying to use the utime() function prior to GCC14 would result in an implicit declaration of the function, which would resolve at link-time. GCC14 deprecated this, so now it's a hard error. - Added utime.h header file to KOS's root include folder so that #include <utime.h> will look there and find it first, rather than using Newlib's (worthless) header. commit 3f12e2627cbb9c7446345ed4627278c6e0cbf099 Author: Falco Girgis <gyr...@gm...> Date: Wed Jul 31 11:52:43 2024 -0500 Fixed GCC9+10 build failures: pthread_atfork() (#663) 1) pthread_atfork()'s implementation was not declaring agument variables by name, which was not supported in ancient GCC9 and GCC10, apparently. 2) pthread_atfork() was added as a symbol for CMake checks for pthreads to pass, yet we were never declaring the symbol publicly anywhere, and implicit declarations of C functions are now deprecated in GCC14+. commit d3e17e6bcfc558bda85ef8b0a63379061d646ea7 Author: Andy Barajas <and...@gm...> Date: Wed Jul 31 09:47:23 2024 -0700 Fix ramdisk_find (#687) Fix ramdisk_find by making sure we also compare the filename lengths so false positives wont occur ----------------------------------------------------------------------- Summary of changes: include/pthread.h | 3 ++- include/utime.h | 32 ++++++++++++++++++++++++++++++++ kernel/fs/fs_ramdisk.c | 4 ++-- kernel/libc/pthreads/pthread_thd.c | 5 +++-- 4 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 include/utime.h diff --git a/include/pthread.h b/include/pthread.h index bfff123a..c9ba378f 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -62,7 +62,8 @@ extern "C" { NOTE: RTEMS does not provide pthread_atfork(). */ #if !defined(__rtems__) -// #warning "Add pthread_atfork() prototype" + int pthread_atfork(void (*prepare)(void), void (*parent)(void), + void (*child)(void)); #endif /* Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81 */ diff --git a/include/utime.h b/include/utime.h new file mode 100644 index 00000000..c7f9ef45 --- /dev/null +++ b/include/utime.h @@ -0,0 +1,32 @@ +/* KallistiOS ##version## + + utime.h + Copyright (C) 2024 Falco Girgis +*/ + +/** \file utime.h + \brief KOS extension of Newlib's utime.h + + Newlib does not ever actually declare a prototype for utime() within + its header, despite implementing it for SH. We add the prototype ourselves. + + \author Falco Girgis +*/ + +#ifndef __KOS_UTIME_H +#define __KOS_UTIME_H + +__BEGIN_DECLS + +#include <time.h> + +struct utimbuf { + time_t actime; /**< access time */ + time_t modtime; /**< modification time */ +}; + +extern int utime(const char *path, struct utimbuf *times); + +__END_DECLS + +#endif /* __KOS_UTIME_H */ diff --git a/kernel/fs/fs_ramdisk.c b/kernel/fs/fs_ramdisk.c index b2c8d57e..2dd0eda3 100644 --- a/kernel/fs/fs_ramdisk.c +++ b/kernel/fs/fs_ramdisk.c @@ -103,11 +103,11 @@ static mutex_t rd_mutex; /* Search a directory for the named file; return the struct if we find it. Assumes we hold rd_mutex. */ -static rd_file_t * ramdisk_find(rd_dir_t * parent, const char * name, int namelen) { +static rd_file_t *ramdisk_find(rd_dir_t *parent, const char *name, size_t namelen) { rd_file_t *f; LIST_FOREACH(f, parent, dirlist) { - if(!strncasecmp(name, f->name, namelen)) + if((strlen(f->name) == namelen) && !strncasecmp(name, f->name, namelen)) return f; } diff --git a/kernel/libc/pthreads/pthread_thd.c b/kernel/libc/pthreads/pthread_thd.c index 9217c9e8..04152942 100644 --- a/kernel/libc/pthreads/pthread_thd.c +++ b/kernel/libc/pthreads/pthread_thd.c @@ -71,7 +71,8 @@ int pthread_equal(pthread_t t1, pthread_t t2) { return t1 == t2; } -int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)) -{ +int pthread_atfork(void (*prepare)(void), void (*parent)(void), + void (*child)(void)) { + (void)prepare; (void)parent; (void)child; return 0; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-07-31 01:51: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 d07bebfc468cd0046364031a01158c2e83ea2e00 (commit) from 2fdebacac9d70c372e0b6926ffd4ff73728c93ec (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 d07bebfc468cd0046364031a01158c2e83ea2e00 Author: Andy Barajas <and...@gm...> Date: Fri Jul 26 05:49:17 2024 -0700 Fix PVR_PACK_COLOR macro (#683) ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/include/dc/pvr.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/arch/dreamcast/include/dc/pvr.h b/kernel/arch/dreamcast/include/dc/pvr.h index 84341efb..bd070e11 100644 --- a/kernel/arch/dreamcast/include/dc/pvr.h +++ b/kernel/arch/dreamcast/include/dc/pvr.h @@ -969,10 +969,10 @@ typedef struct { \return The packed color value */ #define PVR_PACK_COLOR(a, r, g, b) ( \ - ( ((uint8)( a * 255 ) ) << 24 ) | \ - ( ((uint8)( r * 255 ) ) << 16 ) | \ - ( ((uint8)( g * 255 ) ) << 8 ) | \ - ( ((uint8)( b * 255 ) ) << 0 ) ) + ( ((uint8_t)( (a) * 255 ) ) << 24 ) | \ + ( ((uint8_t)( (r) * 255 ) ) << 16 ) | \ + ( ((uint8_t)( (g) * 255 ) ) << 8 ) | \ + ( ((uint8_t)( (b) * 255 ) ) << 0 ) ) /** \brief Pack two floating point coordinates into one 32-bit value, truncating them to 16-bits each. hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-07-17 03:34:11
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 2fdebacac9d70c372e0b6926ffd4ff73728c93ec (commit) from 1baf3245a6e8d30613ebcf943142fc884e3d8b6a (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 2fdebacac9d70c372e0b6926ffd4ff73728c93ec Author: Paul Cercueil <pa...@cr...> Date: Wed Jul 17 05:33:52 2024 +0200 CMake: Support romdisks in C++ projects (#677) * bin2c: Generate code compilable with C++ compiler Mark the variables as "extern C" so that the generated source file can be compiled with a C++ compiler and still link properly with KallistiOS. Signed-off-by: Paul Cercueil <pa...@cr...> * CMake: Support generating romdisk in C++-only projects When the project is C++ only, any .c file added to the target sources will be ignored by CMake. This meant that the source file generated by kos_add_romdisk() macro would not be compiled. Address this issue by changing the extension of the generated source file to .cpp when a C++ compiler is used. Signed-off-by: Paul Cercueil <pa...@cr...> --------- Signed-off-by: Paul Cercueil <pa...@cr...> ----------------------------------------------------------------------- Summary of changes: utils/bin2c/bin2c.c | 3 +++ utils/cmake/dreamcast.cmake | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/utils/bin2c/bin2c.c b/utils/bin2c/bin2c.c index 66924a26..7ba8847d 100644 --- a/utils/bin2c/bin2c.c +++ b/utils/bin2c/bin2c.c @@ -26,7 +26,10 @@ void convert(char *ifn, char *ofn, char *prefix) { fseek(i, 0, SEEK_SET); setbuf(o, buf); + fprintf(o, "#ifdef __cplusplus\nextern \"C\"\n#endif\n"); fprintf(o, "const int %s_size = %d;\n", prefix, left); + + fprintf(o, "#ifdef __cplusplus\nextern \"C\"\n#endif\n"); fprintf(o, "const unsigned char %s_data[%d] =", prefix, left); fprintf(o, "{\n\t"); diff --git a/utils/cmake/dreamcast.cmake b/utils/cmake/dreamcast.cmake index 9781bdfe..a8f7b5a4 100644 --- a/utils/cmake/dreamcast.cmake +++ b/utils/cmake/dreamcast.cmake @@ -66,7 +66,13 @@ function(kos_add_romdisk target romdiskPath) file(REAL_PATH "${romdiskPath}" romdiskPath) - set(c_tmp ${CMAKE_CURRENT_BINARY_DIR}/${romdiskName}_tmp.c) + if(CMAKE_CXX_COMPILER_LOADED) + set(tmpExt cpp) + else() + set(tmpExt c) + endif() + + set(c_tmp ${CMAKE_CURRENT_BINARY_DIR}/${romdiskName}_tmp.${tmpExt}) set(img ${CMAKE_CURRENT_BINARY_DIR}/${romdiskName}.img) # Variable holding all files in the romdiskPath folder hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-07-16 00:18: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 1baf3245a6e8d30613ebcf943142fc884e3d8b6a (commit) from a03ea3dc765c332ae2b1263ad2c87143a4c69ac3 (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 1baf3245a6e8d30613ebcf943142fc884e3d8b6a Author: Andy Barajas <and...@gm...> Date: Mon Jul 15 17:17:49 2024 -0700 Using dcache_inval_range instead should work now since zcrc fixed it (#668) ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/network/broadband_adapter.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c index 76852d8f..36df6dad 100644 --- a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c +++ b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c @@ -543,11 +543,8 @@ static int bba_copy_dma(uint8 * dst, uint32 s, int len) { dst -= add; #ifndef USE_P2_AREA - /* - used to be a call to dcache_inval_range, but for some strange reasons, I need to - make a full flush now ... - */ - dcache_flush_range((uint32) dst, len); + /* Invalidate the dcache over the range of the data. */ + dcache_inval_range((uint32) dst, len); #endif if(!dma_used) { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-07-15 22:45:51
|
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 a03ea3dc765c332ae2b1263ad2c87143a4c69ac3 (commit) from 15115fbf34867109f2e73fb066d8eeee5d70320c (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 a03ea3dc765c332ae2b1263ad2c87143a4c69ac3 Author: Donald Haase <qu...@ya...> Date: Mon Jul 15 18:45:26 2024 -0400 Ensure thd_current does not get set to null (#674) * Remove the use of setting thd_current to null to signal wait. As this also was only happening when the thread state was being set to STATE_WAIT, the checks against it were always pointless due to being followed by testing against STATE_RUNNING. The dontenq variable can be removed entirely due to this. I can only imagine that this predated the state system. * Remove accidentally added includes to genwait. --------- Co-authored-by: QuzarDC <qu...@co...> ----------------------------------------------------------------------- Summary of changes: kernel/thread/genwait.c | 1 - kernel/thread/thread.c | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/kernel/thread/genwait.c b/kernel/thread/genwait.c index 64285666..da50dbb2 100644 --- a/kernel/thread/genwait.c +++ b/kernel/thread/genwait.c @@ -81,7 +81,6 @@ int genwait_wait(void * obj, const char * mesg, int timeout, void (*callback)(vo /* Prepare us for sleep */ me = thd_current; - thd_current = NULL; me->state = STATE_WAIT; me->wait_obj = obj; me->wait_msg = mesg; diff --git a/kernel/thread/thread.c b/kernel/thread/thread.c index b7b360dd..5fe46097 100644 --- a/kernel/thread/thread.c +++ b/kernel/thread/thread.c @@ -660,16 +660,11 @@ static void thd_update_cpu_time(kthread_t *thd) { don't want a full context switch inside the same priority group. */ void thd_schedule(bool front_of_line, uint64_t now) { - int dontenq; kthread_t *thd; if(now == 0) now = timer_ms_gettime64(); - /* We won't re-enqueue the current thread if it's NULL (i.e., the - thread blocked itself somewhere) or if it's a zombie (below) */ - dontenq = !thd_current; - /* If there's only two thread left, it's the idle task and the reaper task: exit the OS */ if(thd_count == 2) { @@ -679,7 +674,7 @@ void thd_schedule(bool front_of_line, uint64_t now) { /* If the current thread is supposed to be in the front of the line, and it did not die, re-enqueue it to the front of the line now. */ - if(front_of_line && !dontenq && thd_current->state == STATE_RUNNING) { + if(front_of_line && thd_current->state == STATE_RUNNING) { thd_current->state = STATE_READY; thd_add_to_runnable(thd_current, front_of_line); } @@ -698,7 +693,7 @@ void thd_schedule(bool front_of_line, uint64_t now) { /* If we didn't already re-enqueue the thread and we are supposed to do so, do it now. */ - if(!front_of_line && !dontenq && thd_current->state == STATE_RUNNING) { + if(!front_of_line && thd_current->state == STATE_RUNNING) { thd_current->state = STATE_READY; thd_add_to_runnable(thd_current, front_of_line); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-07-15 22:29: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 15115fbf34867109f2e73fb066d8eeee5d70320c (commit) from dc3fa1718003934c9281b33355e124376e9de423 (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 15115fbf34867109f2e73fb066d8eeee5d70320c Author: Colton Pawielski <cep...@us...> Date: Mon Jul 15 17:29:09 2024 -0500 Avoid returning error code when examples are too old for toolchain version (#631) * Avoid returning error when examples are too old for toolchain version * Add shared warning for GCC Version Check ----------------------------------------------------------------------- Summary of changes: Makefile.rules | 35 ++++++++++++------------ examples/dreamcast/basic/breaking/Makefile | 12 +++++++- examples/dreamcast/basic/fpu/exc/Makefile | 10 ++++++- examples/dreamcast/basic/stackprotector/Makefile | 10 +++++-- examples/dreamcast/cpp/concurrency/Makefile | 10 +++++-- 5 files changed, 54 insertions(+), 23 deletions(-) diff --git a/Makefile.rules b/Makefile.rules index 487b9028..a62b1a5a 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -77,20 +77,21 @@ romdisk.o: romdisk.img rm romdisk_tmp.c romdisk_tmp.o endif -# Define KOS_GCCVER_MIN in your Makefile if you want to enforce a minimum GCC version. -ifdef KOS_GCCVER_MIN - ifeq ($(shell \ - awk 'BEGIN { \ - split("$(KOS_GCCVER_MIN)", min, "."); \ - split("$(KOS_GCCVER)", cur, "."); \ - if (cur[1] > min[1] || \ - (cur[1] == min[1] && cur[2] > min[2]) || \ - (cur[1] == min[1] && cur[2] == min[2] && cur[3] >= min[3])) { \ - print 1; \ - } else { \ - print 0; \ - } \ - }'), 0) - $(error A minimum GCC version of $(KOS_GCCVER_MIN) is required, but $(KOS_GCCVER) is currently in use.) - endif -endif +define KOS_GCCVER_MIN_CHECK +$(shell \ + awk 'BEGIN { \ + split("$(1)", min, "."); \ + split("$(KOS_GCCVER)", cur, "."); \ + if (cur[1] > min[1] || \ + (cur[1] == min[1] && cur[2] > min[2]) || \ + (cur[1] == min[1] && cur[2] == min[2] && cur[3] >= min[3])) { \ + print 1; \ + } else { \ + print 0; \ + } \ + }') +endef + +define KOS_GCCVER_MIN_WARNING +@echo "Skipping $(TARGET) build as current GCC version ($(KOS_GCCVER)) is less than $(KOS_GCCVER_MIN)." +endef diff --git a/examples/dreamcast/basic/breaking/Makefile b/examples/dreamcast/basic/breaking/Makefile index 362230d6..5d3f9a1c 100644 --- a/examples/dreamcast/basic/breaking/Makefile +++ b/examples/dreamcast/basic/breaking/Makefile @@ -9,10 +9,14 @@ OBJS = breaking.o KOS_CFLAGS += -std=gnu2x -Wno-strict-aliasing KOS_GCCVER_MIN = 13.0.0 -all: rm-elf $(TARGET) + include $(KOS_BASE)/Makefile.rules +ifeq ($(call KOS_GCCVER_MIN_CHECK,$(KOS_GCCVER_MIN)),1) + +all: rm-elf $(TARGET) + clean: rm-elf -rm -f $(OBJS) @@ -28,3 +32,9 @@ run: $(TARGET) dist: $(TARGET) -rm -f $(OBJS) $(KOS_STRIP) $(TARGET) + +else + all $(TARGET) clean rm-elf run dist: + $(KOS_GCCVER_MIN_WARNING) +endif + diff --git a/examples/dreamcast/basic/fpu/exc/Makefile b/examples/dreamcast/basic/fpu/exc/Makefile index f6bbb8e7..adc90725 100644 --- a/examples/dreamcast/basic/fpu/exc/Makefile +++ b/examples/dreamcast/basic/fpu/exc/Makefile @@ -8,10 +8,14 @@ TARGET = fpu_exc.elf OBJS = fpu_exc.o KOS_GCCVER_MIN = 5.0.0 -all: rm-elf $(TARGET) + include $(KOS_BASE)/Makefile.rules +ifeq ($(call KOS_GCCVER_MIN_CHECK,$(KOS_GCCVER_MIN)),1) + +all: rm-elf $(TARGET) + clean: rm-elf -rm -f $(OBJS) @@ -28,3 +32,7 @@ dist: $(TARGET) -rm -f $(OBJS) $(KOS_STRIP) $(TARGET) +else + all $(TARGET) clean rm-elf run dist: + $(KOS_GCCVER_MIN_WARNING) +endif diff --git a/examples/dreamcast/basic/stackprotector/Makefile b/examples/dreamcast/basic/stackprotector/Makefile index a898d5d2..01f62b54 100644 --- a/examples/dreamcast/basic/stackprotector/Makefile +++ b/examples/dreamcast/basic/stackprotector/Makefile @@ -9,10 +9,12 @@ OBJS = stackprotector.o KOS_CFLAGS += -fstack-protector-all KOS_GCCVER_MIN = 4.0.0 -all: rm-elf $(TARGET) - include $(KOS_BASE)/Makefile.rules +ifeq ($(call KOS_GCCVER_MIN_CHECK,$(KOS_GCCVER_MIN)),1) + +all: rm-elf $(TARGET) + clean: rm-elf -rm -f $(OBJS) @@ -29,6 +31,10 @@ dist: $(TARGET) -rm -f $(OBJS) $(KOS_STRIP) $(TARGET) +else + all $(TARGET) clean rm-elf run dist: + $(KOS_GCCVER_MIN_WARNING) +endif .PHONY: run dist clean rm-elf diff --git a/examples/dreamcast/cpp/concurrency/Makefile b/examples/dreamcast/cpp/concurrency/Makefile index 16eac365..3ace6f9d 100644 --- a/examples/dreamcast/cpp/concurrency/Makefile +++ b/examples/dreamcast/cpp/concurrency/Makefile @@ -8,10 +8,12 @@ OBJS = concurrency.o KOS_CPPFLAGS += -std=c++20 KOS_GCCVER_MIN = 12.0.0 -all: rm-elf $(TARGET) - include $(KOS_BASE)/Makefile.rules +ifeq ($(call KOS_GCCVER_MIN_CHECK,$(KOS_GCCVER_MIN)),1) + +all: rm-elf $(TARGET) + clean: -rm -f $(TARGET) $(OBJS) @@ -28,3 +30,7 @@ dist: rm -f $(OBJS) $(KOS_STRIP) $(TARGET) +else + all $(TARGET) clean rm-elf run dist: + $(KOS_GCCVER_MIN_WARNING) +endif hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2024-07-15 22:02:44
|
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 dc3fa1718003934c9281b33355e124376e9de423 (commit) via 3f86969c5d4a0846a532823a208ea95a94879897 (commit) from 86190e3414b9793843d777594dd4754f43278d95 (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 dc3fa1718003934c9281b33355e124376e9de423 Author: darcagn <da...@pr...> Date: Mon Jul 15 16:01:53 2024 -0600 Update profiles using GDB 14.2 to the latest GDB 15.1 (#672) commit 3f86969c5d4a0846a532823a208ea95a94879897 Author: Andy Barajas <and...@gm...> Date: Mon Jul 8 04:53:39 2024 -0700 Made temp_tex static (#667) ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/png/example.c | 2 +- utils/dc-chain/profiles/profile.10.5.0.mk | 2 +- utils/dc-chain/profiles/profile.11.4.0.mk | 2 +- utils/dc-chain/profiles/profile.12.4.0.mk | 2 +- utils/dc-chain/profiles/profile.13.3.0.mk | 2 +- utils/dc-chain/profiles/profile.13.3.1-dev.mk | 2 +- utils/dc-chain/profiles/profile.14.1.0.mk | 2 +- utils/dc-chain/profiles/profile.14.1.1-dev.mk | 2 +- utils/dc-chain/profiles/profile.15.0.0-dev.mk | 4 ++-- utils/dc-chain/profiles/profile.9.5.0-winxp.mk | 2 +- utils/dc-chain/profiles/profile.gccrs-dev.mk | 2 +- utils/dc-chain/profiles/profile.rustc-dev.mk | 2 +- utils/dc-chain/profiles/profile.stable.mk | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/dreamcast/png/example.c b/examples/dreamcast/png/example.c index 4b3a9896..52d42bca 100644 --- a/examples/dreamcast/png/example.c +++ b/examples/dreamcast/png/example.c @@ -30,7 +30,7 @@ void back_init(void) { /* init font */ void font_init(void) { int i, x, y, c; - unsigned short temp_tex[256 * 128 * 2]; + static unsigned short temp_tex[256 * 128 * 2]; font_tex = pvr_mem_malloc(256 * 256 * 2); diff --git a/utils/dc-chain/profiles/profile.10.5.0.mk b/utils/dc-chain/profiles/profile.10.5.0.mk index 14d495c9..4cf8a4fd 100644 --- a/utils/dc-chain/profiles/profile.10.5.0.mk +++ b/utils/dc-chain/profiles/profile.10.5.0.mk @@ -5,7 +5,7 @@ sh_binutils_ver=2.41 sh_gcc_ver=10.5.0 newlib_ver=4.3.0.20230120 -gdb_ver=14.2 +gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core diff --git a/utils/dc-chain/profiles/profile.11.4.0.mk b/utils/dc-chain/profiles/profile.11.4.0.mk index 886a53ba..34266f51 100644 --- a/utils/dc-chain/profiles/profile.11.4.0.mk +++ b/utils/dc-chain/profiles/profile.11.4.0.mk @@ -5,7 +5,7 @@ sh_binutils_ver=2.41 sh_gcc_ver=11.4.0 newlib_ver=4.3.0.20230120 -gdb_ver=14.2 +gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core diff --git a/utils/dc-chain/profiles/profile.12.4.0.mk b/utils/dc-chain/profiles/profile.12.4.0.mk index 8443ee97..f4628cd9 100644 --- a/utils/dc-chain/profiles/profile.12.4.0.mk +++ b/utils/dc-chain/profiles/profile.12.4.0.mk @@ -5,7 +5,7 @@ sh_binutils_ver=2.41 sh_gcc_ver=12.4.0 newlib_ver=4.3.0.20230120 -gdb_ver=14.2 +gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core diff --git a/utils/dc-chain/profiles/profile.13.3.0.mk b/utils/dc-chain/profiles/profile.13.3.0.mk index 7f9f801e..9e32135f 100644 --- a/utils/dc-chain/profiles/profile.13.3.0.mk +++ b/utils/dc-chain/profiles/profile.13.3.0.mk @@ -5,7 +5,7 @@ sh_binutils_ver=2.42 sh_gcc_ver=13.3.0 newlib_ver=4.4.0.20231231 -gdb_ver=14.2 +gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core diff --git a/utils/dc-chain/profiles/profile.13.3.1-dev.mk b/utils/dc-chain/profiles/profile.13.3.1-dev.mk index ee427ee8..c383442e 100644 --- a/utils/dc-chain/profiles/profile.13.3.1-dev.mk +++ b/utils/dc-chain/profiles/profile.13.3.1-dev.mk @@ -12,7 +12,7 @@ sh_binutils_ver=2.42 sh_gcc_ver=13.3.1 newlib_ver=4.4.0.20231231 -gdb_ver=14.2 +gdb_ver=15.1 # Overide SH toolchain download type sh_gcc_download_type=git diff --git a/utils/dc-chain/profiles/profile.14.1.0.mk b/utils/dc-chain/profiles/profile.14.1.0.mk index 6636ff6a..380bd801 100644 --- a/utils/dc-chain/profiles/profile.14.1.0.mk +++ b/utils/dc-chain/profiles/profile.14.1.0.mk @@ -5,7 +5,7 @@ sh_binutils_ver=2.42 sh_gcc_ver=14.1.0 newlib_ver=4.4.0.20231231 -gdb_ver=14.2 +gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core diff --git a/utils/dc-chain/profiles/profile.14.1.1-dev.mk b/utils/dc-chain/profiles/profile.14.1.1-dev.mk index 1016b789..8dd7962e 100644 --- a/utils/dc-chain/profiles/profile.14.1.1-dev.mk +++ b/utils/dc-chain/profiles/profile.14.1.1-dev.mk @@ -12,7 +12,7 @@ sh_binutils_ver=2.42 sh_gcc_ver=14.1.1 newlib_ver=4.4.0.20231231 -gdb_ver=14.2 +gdb_ver=15.1 # Overide SH toolchain download type sh_gcc_download_type=git diff --git a/utils/dc-chain/profiles/profile.15.0.0-dev.mk b/utils/dc-chain/profiles/profile.15.0.0-dev.mk index fa3c4143..ffd0dbde 100644 --- a/utils/dc-chain/profiles/profile.15.0.0-dev.mk +++ b/utils/dc-chain/profiles/profile.15.0.0-dev.mk @@ -4,7 +4,7 @@ ############################################################################### ############################################################################### ### THIS CONFIG IS FOR AN EXPERIMENTAL VERSION OF GCC! -## THERE ARE NO KNOWN ISSUES BUILDING THIS VERSION as of 2024-04-26. +## THERE ARE NO KNOWN ISSUES BUILDING THIS VERSION as of 2024-07-09. ############################################################################### ############################################################################### @@ -12,7 +12,7 @@ sh_binutils_ver=2.42 sh_gcc_ver=15.0.0 newlib_ver=4.4.0.20231231 -gdb_ver=14.2 +gdb_ver=15.1 # Overide SH toolchain download type sh_gcc_download_type=git diff --git a/utils/dc-chain/profiles/profile.9.5.0-winxp.mk b/utils/dc-chain/profiles/profile.9.5.0-winxp.mk index dd349f1b..4425d643 100644 --- a/utils/dc-chain/profiles/profile.9.5.0-winxp.mk +++ b/utils/dc-chain/profiles/profile.9.5.0-winxp.mk @@ -5,7 +5,7 @@ sh_binutils_ver=2.34 sh_gcc_ver=9.5.0 newlib_ver=4.3.0.20230120 -gdb_ver=14.2 +gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core diff --git a/utils/dc-chain/profiles/profile.gccrs-dev.mk b/utils/dc-chain/profiles/profile.gccrs-dev.mk index 14239966..1f14127e 100644 --- a/utils/dc-chain/profiles/profile.gccrs-dev.mk +++ b/utils/dc-chain/profiles/profile.gccrs-dev.mk @@ -12,7 +12,7 @@ sh_binutils_ver=2.42 sh_gcc_ver=rs newlib_ver=4.4.0.20231231 -gdb_ver=14.2 +gdb_ver=15.1 # Overide SH toolchain download type sh_gcc_download_type=git diff --git a/utils/dc-chain/profiles/profile.rustc-dev.mk b/utils/dc-chain/profiles/profile.rustc-dev.mk index 0b60d0ae..7a472357 100644 --- a/utils/dc-chain/profiles/profile.rustc-dev.mk +++ b/utils/dc-chain/profiles/profile.rustc-dev.mk @@ -12,7 +12,7 @@ sh_binutils_ver=2.42 sh_gcc_ver=rustc newlib_ver=4.4.0.20231231 -gdb_ver=14.2 +gdb_ver=15.1 # Overide SH toolchain download type sh_gcc_download_type=git diff --git a/utils/dc-chain/profiles/profile.stable.mk b/utils/dc-chain/profiles/profile.stable.mk index 315e26a3..8072b2da 100644 --- a/utils/dc-chain/profiles/profile.stable.mk +++ b/utils/dc-chain/profiles/profile.stable.mk @@ -5,7 +5,7 @@ sh_binutils_ver=2.41 sh_gcc_ver=13.2.0 newlib_ver=4.3.0.20230120 -gdb_ver=14.2 +gdb_ver=15.1 # Toolchain for ARM # The ARM version of gcc/binutils is separated as support for the ARM7DI core hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2024-07-06 16:22:20
|
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 86190e3414b9793843d777594dd4754f43278d95 (commit) from 4de3b94311fcff91f860c62cf565dd56dece209f (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 86190e3414b9793843d777594dd4754f43278d95 Author: Paul Cercueil <pa...@cr...> Date: Sat Jul 6 18:20:34 2024 +0200 cache: Fix ranges of i/d cache flush/inval (#664) ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/kernel/cache.s | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/kernel/arch/dreamcast/kernel/cache.s b/kernel/arch/dreamcast/kernel/cache.s index 484148a2..c3d2b6de 100644 --- a/kernel/arch/dreamcast/kernel/cache.s +++ b/kernel/arch/dreamcast/kernel/cache.s @@ -66,7 +66,7 @@ _icache_flush_range: and r3, r7 add #32, r4 ! Move on to next cache block - cmp/hs r4, r5 + cmp/hi r4, r5 bt/s .iflush_loop mov.l r7, @r6 ! *addr = data @@ -107,9 +107,9 @@ _dcache_inval_range: .dinval_loop: ! Invalidate the dcache ocbi @r4 - cmp/hs r4, r5 - bt/s .dinval_loop add #32, r4 ! Move on to next cache block + cmp/hi r4, r5 + bt .dinval_loop .dinval_exit: rts @@ -141,9 +141,9 @@ _dcache_flush_range: .dflush_loop: ! Write back the dcache ocbwb @r4 - cmp/hs r4, r5 - bt/s .dflush_loop add #32, r4 ! Move on to next cache block + cmp/hi r4, r5 + bt .dflush_loop .dflush_exit: rts @@ -197,9 +197,9 @@ _dcache_purge_range: .dpurge_loop: ! Write back and invalidate the D cache ocbp @r4 - cmp/hs r4, r5 - bt/s .dpurge_loop add #32, r4 ! Move on to next cache block + cmp/hi r4, r5 + bt .dpurge_loop .dpurge_exit: rts @@ -239,9 +239,9 @@ _dcache_purge_all_with_buffer: ! Allocate and then invalidate the dcache line movca.l r0, @r4 ocbi @r4 - cmp/hs r4, r5 - bt/s .dpurge_all_buffer_loop add #32, r4 ! Move on to next cache block + cmp/hi r4, r5 + bt .dpurge_all_buffer_loop rts nop hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: quzar <qu...@us...> - 2024-07-05 06:57:22
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 4de3b94311fcff91f860c62cf565dd56dece209f (commit) via dd953d2dcb233506f7292ce84a4e2cd2559ab913 (commit) from d604fc0f7d2b5cbe181d940451592fd280b88caf (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 4de3b94311fcff91f860c62cf565dd56dece209f Author: Andy Barajas <and...@gm...> Date: Thu Jul 4 23:56:04 2024 -0700 Returned to some old ways of checking ref counts (#660) * Roll back the behavior of fs_fdtbl_destroy to how it was, before PR #599. This ensures that both all fds are cleaned up and that it's safe for use with dup'd files. * Have fs_shutdown run before shutting down any of the vfses. * Rearrange fs_hnd_unref to ensure that it frees handles even if they have no handler. commit dd953d2dcb233506f7292ce84a4e2cd2559ab913 Author: UnknownShadow200 <unk...@gm...> Date: Thu Jul 4 12:50:21 2024 +1000 CDFS: Set errno on error (#652) ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/fs/fs_iso9660.c | 34 ++++++++++++++++++++++++++-------- kernel/arch/dreamcast/kernel/init.c | 2 +- kernel/fs/fs.c | 30 ++++++++++-------------------- kernel/fs/fs_pty.c | 10 +++++----- 4 files changed, 42 insertions(+), 34 deletions(-) diff --git a/kernel/arch/dreamcast/fs/fs_iso9660.c b/kernel/arch/dreamcast/fs/fs_iso9660.c index ce8e2cb8..f8445cad 100644 --- a/kernel/arch/dreamcast/fs/fs_iso9660.c +++ b/kernel/arch/dreamcast/fs/fs_iso9660.c @@ -603,19 +603,26 @@ static void * iso_open(vfs_handler_t * vfs, const char *fn, int mode) { (void)vfs; /* Make sure they don't want to open things as writeable */ - if((mode & O_MODE_MASK) != O_RDONLY) + if((mode & O_MODE_MASK) != O_RDONLY) { + errno = EROFS; return 0; + } /* Do this only when we need to (this is still imperfect) */ - if(!percd_done && init_percd() < 0) + if(!percd_done && init_percd() < 0) { + errno = ENODEV; return 0; + } percd_done = 1; /* Find the file we want */ de = find_object_path(fn, (mode & O_DIR) ? 1 : 0, &root_dirent); - if(!de) return 0; + if(!de) { + errno = ENOENT; + return 0; + } /* Find a free file handle */ mutex_lock(&fh_mutex); @@ -628,8 +635,10 @@ static void * iso_open(vfs_handler_t * vfs, const char *fn, int mode) { mutex_unlock(&fh_mutex); - if(fd >= FS_CD_MAX_FILES) + if(fd >= FS_CD_MAX_FILES) { + errno = ENFILE; return 0; + } /* Fill in the file handle and return the fd */ fh[fd].first_extent = iso_733(de->extent); @@ -660,8 +669,10 @@ static ssize_t iso_read(void * h, void *buf, size_t bytes) { file_t fd = (file_t)h; /* Check that the fd is valid */ - if(fd >= FS_CD_MAX_FILES || fh[fd].first_extent == 0 || fh[fd].broken) + if(fd >= FS_CD_MAX_FILES || fh[fd].first_extent == 0 || fh[fd].broken) { + errno = EBADF; return -1; + } rv = 0; outbuf = (uint8 *)buf; @@ -707,7 +718,10 @@ static ssize_t iso_read(void * h, void *buf, size_t bytes) { /* Do the read */ c = bdread(fh[fd].first_extent + fh[fd].ptr / 2048); - if(c < 0) return -1; + if(c < 0) { + errno = EIO; + return -1; + } memcpy(outbuf, dcache[c]->data + (fh[fd].ptr % 2048), toread); /* } */ @@ -776,8 +790,10 @@ static off_t iso_seek(void * h, off_t offset, int whence) { static off_t iso_tell(void * h) { file_t fd = (file_t)h; - if(fd >= FS_CD_MAX_FILES || fh[fd].first_extent == 0 || fh[fd].broken) + if(fd >= FS_CD_MAX_FILES || fh[fd].first_extent == 0 || fh[fd].broken) { + errno = EBADF; return -1; + } return fh[fd].ptr; } @@ -786,8 +802,10 @@ static off_t iso_tell(void * h) { static size_t iso_total(void * h) { file_t fd = (file_t)h; - if(fd >= FS_CD_MAX_FILES || fh[fd].first_extent == 0 || fh[fd].broken) + if(fd >= FS_CD_MAX_FILES || fh[fd].first_extent == 0 || fh[fd].broken) { + errno = EBADF; return -1; + } return fh[fd].size; } diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index 1c6bbd4d..6c71b278 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -246,12 +246,12 @@ void __weak arch_auto_shutdown(void) { #if defined(__NEWLIB__) && !(__NEWLIB__ < 2 && __NEWLIB_MINOR__ < 4) fs_rnd_shutdown(); #endif + fs_shutdown(); fs_ramdisk_shutdown(); KOS_INIT_FLAG_CALL(fs_romdisk_shutdown); fs_pty_shutdown(); fs_null_shutdown(); fs_dev_shutdown(); - fs_shutdown(); thd_shutdown(); rtc_shutdown(); } diff --git a/kernel/fs/fs.c b/kernel/fs/fs.c index a4e745b1..ee9b7e51 100644 --- a/kernel/fs/fs.c +++ b/kernel/fs/fs.c @@ -169,22 +169,18 @@ static void fs_hnd_ref(fs_hnd_t * ref) { to a raw handle is no longer applicable. This function may destroy the file handle, so under no circumstances should you presume that it will still exist later. */ -static int fs_hnd_unref(fs_hnd_t * ref) { +static int fs_hnd_unref(fs_hnd_t *ref) { int retval = 0; assert(ref); assert(ref->refcnt > 0); - ref->refcnt--; - if(ref->refcnt == 0) { - if(ref->handler != NULL) { - if(ref->handler->close == NULL) return retval; + if(--ref->refcnt > 0) + return retval; /* Still references left, nothing to do */ - retval = ref->handler->close(ref->hnd); - } - - free(ref); - } + if(ref->handler && ref->handler->close) + retval = ref->handler->close(ref->hnd); + free(ref); return retval; } @@ -214,17 +210,11 @@ static int fs_hnd_assign(fs_hnd_t * hnd) { int fs_fdtbl_destroy(void) { int i; - for (i = 0; i < FD_SETSIZE; i++) { - fs_hnd_t *handle = fd_table[i]; + for(i = 0; i < FD_SETSIZE; i++) { + if(fd_table[i]) + fs_hnd_unref(fd_table[i]); - if(handle) { - if(handle->handler && handle->handler->close) { - handle->handler->close(handle->hnd); - } - - free(handle); - fd_table[i] = NULL; - } + fd_table[i] = NULL; } return 0; diff --git a/kernel/fs/fs_pty.c b/kernel/fs/fs_pty.c index 55147fe4..27028ed1 100644 --- a/kernel/fs/fs_pty.c +++ b/kernel/fs/fs_pty.c @@ -108,7 +108,7 @@ static void pty_destroy_unused(void); #define PF_DIR 1 /* Creates a pty pair */ -int fs_pty_create(char * buffer, int maxbuflen, file_t * master_out, file_t * slave_out) { +int fs_pty_create(char *buffer, int maxbuflen, file_t *master_out, file_t *slave_out) { ptyhalf_t *master, *slave; int boot; char mname[16], sname[16]; @@ -208,7 +208,7 @@ cleanup: /* Autoclean totally unreferenced PTYs (zero refcnt). */ /* XXX This is a kinda nasty piece of code... goto!! */ static void pty_destroy_unused(void) { - ptyhalf_t * c, * n; + ptyhalf_t *c, *n; int old; /* Make sure no one else is messing with the list and then disable @@ -427,8 +427,8 @@ static void * pty_open(vfs_handler_t * vfs, const char * fn, int mode) { } /* Close pty or dirlist */ -static int pty_close(void * h) { - pipefd_t * fdobj; +static int pty_close(void *h) { + pipefd_t *fdobj; assert(h); fdobj = (pipefd_t *)h; @@ -699,7 +699,7 @@ static int pty_ioctl(void *h, int cmd, va_list ap) { switch (cmd) { case TIOCGETA: - if (arg == NULL) { + if(arg == NULL) { errno = EINVAL; return -1; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |