|
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.
|