From: kosmirror <kos...@us...> - 2025-08-06 12:47: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 412d64c645f788feed54dd2c1f205b307cae22e9 (commit) via f43d4bd83719f02e9eb85815a26893a953751a67 (commit) via 28d6de2e3863d68424875b8272997d1c4b667b40 (commit) via 99b905a977d5949f5cf7ff890e55a365f6dfd0cc (commit) from f7ee03a8533adbba8dd6f03cc458a28b69802a89 (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 412d64c645f788feed54dd2c1f205b307cae22e9 Author: QuzarDC <qu...@co...> Date: Tue Jul 29 18:30:38 2025 -0400 Remove trailing whitespaces. commit f43d4bd83719f02e9eb85815a26893a953751a67 Author: QuzarDC <qu...@co...> Date: Tue Jul 29 10:22:59 2025 -0400 Replace windows-style EOL with unix-style. commit 28d6de2e3863d68424875b8272997d1c4b667b40 Author: QuzarDC <qu...@co...> Date: Tue Jul 29 10:17:34 2025 -0400 Replace extraneous tabs with appropriate numbers of spaces. commit 99b905a977d5949f5cf7ff890e55a365f6dfd0cc Author: QuzarDC <qu...@co...> Date: Tue Jul 29 10:07:26 2025 -0400 Remove extraneous spaces between conditionals and parens. ----------------------------------------------------------------------- Summary of changes: addons/libkosutils/netcfg.c | 2 +- addons/libnavi/navi_ide.c | 4 +- kernel/arch/dreamcast/fs/fs_iso9660.c | 4 +- kernel/arch/dreamcast/fs/fs_vmu.c | 4 +- kernel/arch/dreamcast/fs/vmufs.c | 2 +- kernel/arch/dreamcast/hardware/asic.c | 10 +- kernel/arch/dreamcast/hardware/flashrom.c | 2 +- kernel/arch/dreamcast/hardware/g2dma.c | 22 +- kernel/arch/dreamcast/hardware/hardware.c | 8 +- kernel/arch/dreamcast/hardware/maple/keyboard.c | 4 +- kernel/arch/dreamcast/hardware/maple/maple_irq.c | 10 +- kernel/arch/dreamcast/hardware/maple/vmu.c | 6 +- kernel/arch/dreamcast/hardware/modem/modem.c | 8 +- kernel/arch/dreamcast/hardware/pvr/pvr_irq.c | 2 +- kernel/arch/dreamcast/hardware/pvr/pvr_prim.c | 16 +- kernel/arch/dreamcast/hardware/sci.c | 6 +- kernel/arch/dreamcast/hardware/sd.c | 6 +- kernel/arch/dreamcast/hardware/spu.c | 2 +- kernel/arch/dreamcast/hardware/sq.c | 18 +- kernel/arch/dreamcast/hardware/video.c | 26 +- kernel/arch/dreamcast/include/arch/dmac.h | 2 +- kernel/arch/dreamcast/include/arch/memory.h | 730 +++++++++++------------ kernel/arch/dreamcast/include/arch/rtc.h | 2 +- kernel/arch/dreamcast/include/arch/timer.h | 2 +- kernel/arch/dreamcast/include/arch/tls_static.h | 6 +- kernel/arch/dreamcast/include/arch/trap.h | 6 +- kernel/arch/dreamcast/include/arch/wdt.h | 36 +- kernel/arch/dreamcast/include/dc/asic.h | 2 +- kernel/arch/dreamcast/include/dc/biosfont.h | 28 +- kernel/arch/dreamcast/include/dc/fifo.h | 12 +- kernel/arch/dreamcast/include/dc/math.h | 2 +- kernel/arch/dreamcast/include/dc/matrix.h | 4 +- kernel/arch/dreamcast/include/dc/minifont.h | 4 +- kernel/arch/dreamcast/include/dc/perf_monitor.h | 2 +- kernel/arch/dreamcast/include/dc/perfctr.h | 34 +- kernel/arch/dreamcast/include/dc/pvr.h | 30 +- kernel/arch/dreamcast/include/dc/sd.h | 2 +- kernel/arch/dreamcast/include/dc/sound/sfxmgr.h | 12 +- kernel/arch/dreamcast/include/dc/sound/sound.h | 6 +- kernel/arch/dreamcast/include/dc/vmu_fb.h | 2 +- kernel/arch/dreamcast/kernel/irq.c | 2 +- kernel/arch/dreamcast/kernel/perfctr.c | 2 +- kernel/arch/dreamcast/kernel/timer.c | 2 +- kernel/arch/dreamcast/sound/arm/aica.c | 4 +- kernel/arch/dreamcast/sound/snd_sfxmgr.c | 18 +- kernel/arch/dreamcast/util/screenshot.c | 6 +- kernel/arch/dreamcast/util/vmu_fb.c | 6 +- kernel/arch/dreamcast/util/vmu_printf.c | 32 +- kernel/exports/exports.c | 2 +- kernel/fs/fs_dev.c | 8 +- kernel/fs/fs_null.c | 2 +- kernel/fs/fs_pty.c | 2 +- kernel/fs/fs_utils.c | 6 +- kernel/libc/c11/thrd_join.c | 2 +- kernel/thread/oneshot_timer.c | 4 +- kernel/thread/worker.c | 10 +- 56 files changed, 597 insertions(+), 597 deletions(-) diff --git a/addons/libkosutils/netcfg.c b/addons/libkosutils/netcfg.c index 3d5cd963..df38d593 100644 --- a/addons/libkosutils/netcfg.c +++ b/addons/libkosutils/netcfg.c @@ -333,7 +333,7 @@ int netcfg_save_to(const char * fn, const netcfg_t * cfg) { #define WRITESTR(fmt, data) \ sprintf(buf, fmt, data); \ - if (fwrite(buf, strlen(buf), 1, f) != 1) \ + if(fwrite(buf, strlen(buf), 1, f) != 1) \ goto error; WRITESTR("driver=%s\n", cfg->driver); diff --git a/addons/libnavi/navi_ide.c b/addons/libnavi/navi_ide.c index 4e1185ca..7961e0f4 100644 --- a/addons/libnavi/navi_ide.c +++ b/addons/libnavi/navi_ide.c @@ -141,7 +141,7 @@ static int ide_read_chs(uint32 cyl, uint32 head, uint32 sector, uint32 numsects, wait_data(); /* wait for data to be read */ for(o = 0; o < 256; o++) { - /*if (inp(0x1f7) & 1) { + /*if(inp(0x1f7) & 1) { printf("as of %d, error code is %x/%x\n", o, inp(0x1f7), inp(0x1f1)); return -1; } */ @@ -175,7 +175,7 @@ static int ide_write_chs(uint32 cyl, uint32 head, uint32 sector, uint32 numsects wait_data(); /* wait for data to be ready */ for(o = 0; o < 256; o++) { - /* if (inp(0x1f7) & 1) { + /* if(inp(0x1f7) & 1) { printf("as of %d, error code is %x/%x\n", o, inp(0x1f7), inp(0x1f1)); return -1; } */ diff --git a/kernel/arch/dreamcast/fs/fs_iso9660.c b/kernel/arch/dreamcast/fs/fs_iso9660.c index d67e465f..7c745482 100644 --- a/kernel/arch/dreamcast/fs/fs_iso9660.c +++ b/kernel/arch/dreamcast/fs/fs_iso9660.c @@ -1103,7 +1103,7 @@ static int iso_stat(vfs_handler_t *vfs, const char *path, struct stat *st, mode_t md; iso_dirent_t *de; size_t len = strlen(path); - + (void)vfs; (void)flag; @@ -1134,7 +1134,7 @@ static int iso_stat(vfs_handler_t *vfs, const char *path, struct stat *st, errno = ENOENT; return -1; } - + memset(st, 0, sizeof(struct stat)); st->st_dev = (dev_t)('c' | ('d' << 8)); st->st_mode = md | S_IRUSR | S_IRGRP | S_IROTH | S_IXUSR | S_IXGRP | S_IXOTH; diff --git a/kernel/arch/dreamcast/fs/fs_vmu.c b/kernel/arch/dreamcast/fs/fs_vmu.c index 54b97c1f..5c0ac872 100644 --- a/kernel/arch/dreamcast/fs/fs_vmu.c +++ b/kernel/arch/dreamcast/fs/fs_vmu.c @@ -415,8 +415,8 @@ static int vmu_close(void * hnd) { case VMU_FILE: if((fh->mode & O_MODE_MASK) == O_WRONLY || (fh->mode & O_MODE_MASK) == O_RDWR) { - if ((st = vmu_write_close(hnd))) { - if (st == -7) + if((st = vmu_write_close(hnd))) { + if(st == -7) errno = ENOSPC; else errno = EIO; diff --git a/kernel/arch/dreamcast/fs/vmufs.c b/kernel/arch/dreamcast/fs/vmufs.c index f80b8613..d9e2a135 100644 --- a/kernel/arch/dreamcast/fs/vmufs.c +++ b/kernel/arch/dreamcast/fs/vmufs.c @@ -759,7 +759,7 @@ int vmufs_write(maple_device_t * dev, const char * fn, void * inbuf, int insize, fnlength = strlen(fn); fnlength = fnlength > 12 ? 12 : fnlength; memcpy(nd.filename, fn, fnlength); - if (fnlength < 12) { + if(fnlength < 12) { memset(nd.filename + fnlength, '\0', 12 - fnlength); } diff --git a/kernel/arch/dreamcast/hardware/asic.c b/kernel/arch/dreamcast/hardware/asic.c index 30c610e4..725ff3ae 100644 --- a/kernel/arch/dreamcast/hardware/asic.c +++ b/kernel/arch/dreamcast/hardware/asic.c @@ -255,14 +255,14 @@ static void asic_threaded_irq(void *data) { thdata->hdl(thdata->source, thdata->data); - if (thdata->unmask) + if(thdata->unmask) thdata->unmask(thdata->source); } static void asic_thirq_dispatch(uint32_t source, void *data) { struct asic_thdata *thdata = data; - if (thdata->ack_and_mask) + if(thdata->ack_and_mask) thdata->ack_and_mask(source); thdata->source = source; @@ -280,7 +280,7 @@ int asic_evt_request_threaded_handler(uint16_t code, asic_evt_handler hnd, kthread_t *thd; thdata = malloc(sizeof(*thdata)); - if (!thdata) + if(!thdata) return -1; /* TODO: What return code? */ thdata->hdl = hnd; @@ -291,7 +291,7 @@ int asic_evt_request_threaded_handler(uint16_t code, asic_evt_handler hnd, flags = irq_disable(); thdata->worker = thd_worker_create(asic_threaded_irq, thdata); - if (!thdata->worker) { + if(!thdata->worker) { irq_restore(flags); free(thdata); return -1; /* TODO: What return code? */ @@ -325,7 +325,7 @@ void asic_evt_remove_handler(uint16_t code) entry = asic_evt_handlers[evtreg][evt]; asic_evt_set_handler(code, NULL, NULL); - if (entry.hdl == asic_thirq_dispatch) { + if(entry.hdl == asic_thirq_dispatch) { thdata = entry.data; thd_worker_destroy(thdata->worker); diff --git a/kernel/arch/dreamcast/hardware/flashrom.c b/kernel/arch/dreamcast/hardware/flashrom.c index 764e4327..19a66f2a 100644 --- a/kernel/arch/dreamcast/hardware/flashrom.c +++ b/kernel/arch/dreamcast/hardware/flashrom.c @@ -28,7 +28,7 @@ static void strcpy_no_term(char *dest, const char *src, size_t destsize) { srclength = strlen(src); srclength = srclength > destsize ? destsize : srclength; memcpy(dest, src, srclength); - if (srclength < destsize) { + if(srclength < destsize) { memset(dest + srclength, '\0', destsize - srclength); } } diff --git a/kernel/arch/dreamcast/hardware/g2dma.c b/kernel/arch/dreamcast/hardware/g2dma.c index a70a83af..6d1120e2 100644 --- a/kernel/arch/dreamcast/hardware/g2dma.c +++ b/kernel/arch/dreamcast/hardware/g2dma.c @@ -51,11 +51,11 @@ static int dma_init; #define G2_DMA_REG_BASE 0xa05f7800 static volatile g2_dma_reg_t * const g2_dma = (g2_dma_reg_t *)G2_DMA_REG_BASE; -/* +/* List of possible initiation triggers values to assign to trigger_select: CPU_TRIGGER: Software-driven. (Setting enable and start to 1) HARDWARE_TRIGGER: Via AICA (DMA0) or expansion device. - INTERRUPT_TRIGGER: Based on interrupt signals. + INTERRUPT_TRIGGER: Based on interrupt signals. */ #define CPU_TRIGGER 0 #define HARDWARE_TRIGGER 1 @@ -72,9 +72,9 @@ static volatile g2_dma_reg_t * const g2_dma = (g2_dma_reg_t *)G2_DMA_REG_BASE; #define DMA_SUSPEND_ENABLED 0x00000004 #define DMA_SUSPEND_DISABLED 0x00000000 -/* - For sh4 and g2bus addresses, ensure bits 31-29 & 4-0 are '0' to avoid - illegal interrupts. Only bits 28-5 are used for valid addresses. +/* + For sh4 and g2bus addresses, ensure bits 31-29 & 4-0 are '0' to avoid + illegal interrupts. Only bits 28-5 are used for valid addresses. */ #define MASK_ADDRESS 0x1fffffe0 @@ -88,9 +88,9 @@ static volatile g2_dma_reg_t * const g2_dma = (g2_dma_reg_t *)G2_DMA_REG_BASE; #define PRESERVE_ENABLED 0x00000000 #define RESET_ENABLED 0x80000000 -/* +/* Specifies system memory address range for G2-DMA across channels 0-3. - If a DMA transfer is generated outside of this range, an overrun error + If a DMA transfer is generated outside of this range, an overrun error occurs. Previous range (0x4659404f): @@ -115,12 +115,12 @@ static volatile g2_dma_reg_t * const g2_dma = (g2_dma_reg_t *)G2_DMA_REG_BASE; #define DISABLE_SYS_MEM_PROTECTION (SYS_MEM_SECURITY_CODE << 16 | 0x007F) #define ENABLE_SYS_MEM_PROTECTION (SYS_MEM_SECURITY_CODE << 16 | 0x7F00) -/* - Set the DS# (Data Strobe) timeout to 27 clock cycles for the external DMA. +/* + Set the DS# (Data Strobe) timeout to 27 clock cycles for the external DMA. If data isn't ready for latching by this time, an interrupt will be triggered. - - Not sure why its 27 but can be changed later. Default value + + Not sure why its 27 but can be changed later. Default value is 1023 cycles (0x3ff). */ #define DS_CYCLE_OVERRIDE 27 diff --git a/kernel/arch/dreamcast/hardware/hardware.c b/kernel/arch/dreamcast/hardware/hardware.c index d97130f8..9b1ad726 100644 --- a/kernel/arch/dreamcast/hardware/hardware.c +++ b/kernel/arch/dreamcast/hardware/hardware.c @@ -66,7 +66,7 @@ int hardware_periph_init(void) { spu_init(); g2_dma_init(); - if (!KOS_PLATFORM_IS_NAOMI) { + if(!KOS_PLATFORM_IS_NAOMI) { /* Init CD-ROM.. NOTE: NO GD-ROM SUPPORT. ONLY CDs/CDRs. */ KOS_INIT_FLAG_CALL(cdrom_init); } @@ -77,7 +77,7 @@ int hardware_periph_init(void) { /* Init video */ vid_init(DEFAULT_VID_MODE, DEFAULT_PIXEL_MODE); - if (!KOS_PLATFORM_IS_NAOMI) + if(!KOS_PLATFORM_IS_NAOMI) KOS_INIT_FLAG_CALL(bba_la_init); initted = 2; @@ -90,10 +90,10 @@ KOS_INIT_FLAG_WEAK(maple_shutdown, true); void hardware_shutdown(void) { switch(initted) { case 2: - if (!KOS_PLATFORM_IS_NAOMI) + if(!KOS_PLATFORM_IS_NAOMI) KOS_INIT_FLAG_CALL(bba_la_shutdown); KOS_INIT_FLAG_CALL(maple_shutdown); - if (!KOS_PLATFORM_IS_NAOMI) + if(!KOS_PLATFORM_IS_NAOMI) KOS_INIT_FLAG_CALL(cdrom_shutdown); g2_dma_shutdown(); spu_shutdown(); diff --git a/kernel/arch/dreamcast/hardware/maple/keyboard.c b/kernel/arch/dreamcast/hardware/maple/keyboard.c index 13d3d409..8599f774 100644 --- a/kernel/arch/dreamcast/hardware/maple/keyboard.c +++ b/kernel/arch/dreamcast/hardware/maple/keyboard.c @@ -49,7 +49,7 @@ typedef struct kbd_state_private { kbd_leds_t leds; /**< \brief Persistent LED state for toggles */ struct { - kbd_key_t key; /**< \brief Key that is repeating. */ + kbd_key_t key; /**< \brief Key that is repeating. */ uint64_t timeout; /**< \brief Time that the next repeat will trigger. */ } repeater; } kbd_state_private_t; @@ -651,7 +651,7 @@ static void kbd_check_poll(maple_frame_t *frm) { } // Sync persistent LED state to cond - state->cond.leds = pstate->leds; + state->cond.leds = pstate->leds; /* If the key hadn't been pressed. */ if(state->key_states[cond->keys[i]].value == KEY_STATE_CHANGED_DOWN) { if(key != KBD_KEY_NONE) { diff --git a/kernel/arch/dreamcast/hardware/maple/maple_irq.c b/kernel/arch/dreamcast/hardware/maple/maple_irq.c index 0f116a4a..f5d02e41 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_irq.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_irq.c @@ -64,7 +64,7 @@ static void vbl_chk_next_subdev(maple_state_t *state, maple_frame_t *frm, int p) maple_device_t *dev = maple_enum_dev(p, 0); int u; - if (dev && dev->probe_mask) { + if(dev && dev->probe_mask) { u = __builtin_ffs(dev->probe_mask); dev->probe_mask &= ~(1 << (u - 1)); @@ -78,7 +78,7 @@ static void vbl_chk_next_subdev(maple_state_t *state, maple_frame_t *frm, int p) static void vbl_dev_probed(int p, int u) { maple_device_t *dev = maple_enum_dev(p, 0); - if (dev) + if(dev) dev->dev_mask |= 1 << (u - 1); } @@ -91,7 +91,7 @@ static void vbl_chk_subdevs(maple_state_t *state, int p, uint8 newmask) { /* Disconnect any device that disappeared */ for(u = 1; u < MAPLE_UNIT_COUNT; u++) { - if (dev->dev_mask & ~newmask & (1 << (u - 1))) { + if(dev->dev_mask & ~newmask & (1 << (u - 1))) { vbl_chk_disconnect(state, p, u); } } @@ -115,7 +115,7 @@ static void vbl_autodet_callback(maple_state_t *state, maple_frame_t *frm) { maple_device_t *dev; int p, u; - if (irq_inside_int() && !malloc_irq_safe()) { + if(irq_inside_int() && !malloc_irq_safe()) { /* We can't create or remove a device now. Fail silently as the device * will be re-probed in the next loop of the periodic IRQ. */ maple_frame_unlock(frm); @@ -200,7 +200,7 @@ static void vbl_autodetect(maple_state_t *state) { state->detect_port_next, 0); /* Move to the next device */ - if (queued) { + if(queued) { state->detect_port_next++; if(state->detect_port_next >= MAPLE_PORT_COUNT) diff --git a/kernel/arch/dreamcast/hardware/maple/vmu.c b/kernel/arch/dreamcast/hardware/maple/vmu.c index 30420641..d95a392c 100644 --- a/kernel/arch/dreamcast/hardware/maple/vmu.c +++ b/kernel/arch/dreamcast/hardware/maple/vmu.c @@ -177,7 +177,7 @@ void vmu_set_buttons_enabled(int enable) { } /* Determine whether polling for button input is enabled or not by presence of periodic callback. */ -int vmu_get_buttons_enabled(void) { +int vmu_get_buttons_enabled(void) { return !!vmu_drv.periodic; } @@ -249,7 +249,7 @@ int vmu_set_custom_color(maple_device_t *dev, uint8_t red, uint8_t green, uint8_ int vmu_set_icon_shape(maple_device_t *dev, uint8_t icon_shape) { vmu_root_t root; - if (KOS_PLATFORM_IS_NAOMI) + if(KOS_PLATFORM_IS_NAOMI) return -1; if(icon_shape < BFONT_ICON_VMUICON || icon_shape > BFONT_ICON_EMBROIDERY) @@ -351,7 +351,7 @@ int vmu_draw_lcd_rotated(maple_device_t *dev, const void *bitmap) { uint32_t bitmap_inverted[48]; unsigned int i; - for (i = 0; i < 48; i++) { + for(i = 0; i < 48; i++) { bitmap_inverted[i] = bit_reverse(((uint32 *)bitmap)[47 - i]); } diff --git a/kernel/arch/dreamcast/hardware/modem/modem.c b/kernel/arch/dreamcast/hardware/modem/modem.c index 90052809..940a02b2 100644 --- a/kernel/arch/dreamcast/hardware/modem/modem.c +++ b/kernel/arch/dreamcast/hardware/modem/modem.c @@ -744,8 +744,8 @@ void modem_disconnect(void) { modemSetBits(REGLOC(0x15), 0x4); /* Set RREN */ /* Wait for a disconnection or a timeout */ - for (i = 0; i < 500; i++) { - if (!(modemRead(REGLOC(0xF)) & 0x80)) + for(i = 0; i < 500; i++) { + if(!(modemRead(REGLOC(0xF)) & 0x80)) break; thd_sleep(10); @@ -756,8 +756,8 @@ void modem_disconnect(void) { modemWrite(REGLOC(0x12), 0xC0); modemSetBits(REGLOC(0x15), 0x4); /* Set RREN */ - for (i = 0; i < 500; i++) { - if (!(modemRead(REGLOC(0xF)) & 0x80) || + for(i = 0; i < 500; i++) { + if(!(modemRead(REGLOC(0xF)) & 0x80) || modemRead(REGLOC(0x14)) == 0x96) { break; } diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c b/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c index fe298e21..4bbcb747 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c @@ -166,7 +166,7 @@ void pvr_int_handler(uint32 code, void *data) { case ASIC_EVT_PVR_RENDERDONE_TSP: //DBG(("irq_renderdone\n")); pvr_state.render_busy = 0; - if (!pvr_state.was_to_texture) + if(!pvr_state.was_to_texture) pvr_state.render_completed = 1; pvr_sync_stats(PVR_SYNC_RNDDONE); diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_prim.c b/kernel/arch/dreamcast/hardware/pvr/pvr_prim.c index a7460a4e..904c0511 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_prim.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_prim.c @@ -68,9 +68,9 @@ void pvr_poly_compile(pvr_poly_hdr_t *dst, const pvr_poly_cxt_t *src) { } else { assert_msg(__builtin_popcount(src->txr.width) == 1 - && src->txr.width <= 1024, "Invalid texture U size"); + && src->txr.width <= 1024, "Invalid texture U size"); assert_msg(__builtin_popcount(src->txr.height) == 1 - && src->txr.height <= 1024, "Invalid texture V size"); + && src->txr.height <= 1024, "Invalid texture V size"); mode2 |= FIELD_PREP(PVR_TA_PM2_TXRALPHA, src->txr.alpha) | FIELD_PREP(PVR_TA_PM2_UVFLIP, src->txr.uv_flip) @@ -304,9 +304,9 @@ void pvr_sprite_compile(pvr_sprite_hdr_t *dst, const pvr_sprite_cxt_t *src) { } else { assert_msg(__builtin_popcount(src->txr.width) == 1 - && src->txr.width <= 1024, "Invalid texture U size"); + && src->txr.width <= 1024, "Invalid texture U size"); assert_msg(__builtin_popcount(src->txr.height) == 1 - && src->txr.height <= 1024, "Invalid texture V size"); + && src->txr.height <= 1024, "Invalid texture V size"); mode2 |= FIELD_PREP(PVR_TA_PM2_TXRALPHA, src->txr.alpha) | FIELD_PREP(PVR_TA_PM2_UVFLIP, src->txr.uv_flip) @@ -393,9 +393,9 @@ void pvr_poly_mod_compile(pvr_poly_mod_hdr_t *dst, const pvr_poly_cxt_t *src) { } else { assert_msg(__builtin_popcount(src->txr.width) == 1 - && src->txr.width <= 1024, "Invalid texture U size"); + && src->txr.width <= 1024, "Invalid texture U size"); assert_msg(__builtin_popcount(src->txr.height) == 1 - && src->txr.height <= 1024, "Invalid texture V size"); + && src->txr.height <= 1024, "Invalid texture V size"); mode2 |= FIELD_PREP(PVR_TA_PM2_TXRALPHA, src->txr.alpha) | FIELD_PREP(PVR_TA_PM2_UVFLIP, src->txr.uv_flip) @@ -432,9 +432,9 @@ void pvr_poly_mod_compile(pvr_poly_mod_hdr_t *dst, const pvr_poly_cxt_t *src) { } else { assert_msg(__builtin_popcount(src->txr2.width) == 1 - && src->txr2.width <= 1024, "Invalid texture U size"); + && src->txr2.width <= 1024, "Invalid texture U size"); assert_msg(__builtin_popcount(src->txr2.height) == 1 - && src->txr2.height <= 1024, "Invalid texture V size"); + && src->txr2.height <= 1024, "Invalid texture V size"); mode2 |= FIELD_PREP(PVR_TA_PM2_TXRALPHA, src->txr2.alpha) | FIELD_PREP(PVR_TA_PM2_UVFLIP, src->txr2.uv_flip) diff --git a/kernel/arch/dreamcast/hardware/sci.c b/kernel/arch/dreamcast/hardware/sci.c index 40f6898f..82322412 100644 --- a/kernel/arch/dreamcast/hardware/sci.c +++ b/kernel/arch/dreamcast/hardware/sci.c @@ -443,7 +443,7 @@ void sci_configure_spi(sci_spi_cs_mode_t cs, size_t buffer_size) { sci_shutdown_spi_cs(); /* Allocate a single aligned buffer for both TX and RX DMA operations */ - if (buffer_size > 0) { + if(buffer_size > 0) { if(spi_dma_buffer != NULL && spi_buffer_size != buffer_size) { free(spi_dma_buffer); spi_dma_buffer = NULL; @@ -451,7 +451,7 @@ void sci_configure_spi(sci_spi_cs_mode_t cs, size_t buffer_size) { if(spi_dma_buffer == NULL) { spi_dma_buffer = aligned_alloc(32, buffer_size); - if (spi_dma_buffer == NULL) { + if(spi_dma_buffer == NULL) { dbglog(DBG_ERROR, "SCI: Failed to allocate DMA buffer\n"); ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |