From: bogglez <bo...@us...> - 2017-03-10 17:09: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 "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via c05fead1a9c03b70ff9511bcc080d9354d62cfda (commit) via 9a8efc21a0bbb1d3e70d2913f48c15cbb0eb6348 (commit) via 3342f3920c878b316a52fe8acdbb962bd9da3df4 (commit) from b8155f31289146d91eb7bbe38846b50ba621abdd (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 c05fead1a9c03b70ff9511bcc080d9354d62cfda Author: bogglez <bo...@pr...> Date: Fri Mar 10 18:08:58 2017 +0100 Turn C++-style comments into C style comments (for old C std) commit 9a8efc21a0bbb1d3e70d2913f48c15cbb0eb6348 Author: bogglez <bo...@pr...> Date: Fri Mar 10 18:07:58 2017 +0100 arm: use correct int type everywhere commit 3342f3920c878b316a52fe8acdbb962bd9da3df4 Author: bogglez <bo...@pr...> Date: Fri Mar 10 18:04:49 2017 +0100 Sound: remove empty lines ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/spu.c | 2 -- kernel/arch/dreamcast/sound/arm/aica.c | 25 +++++++++++++------------ kernel/arch/dreamcast/sound/arm/crt0.s | 6 ------ kernel/arch/dreamcast/sound/arm/main.c | 4 ++-- utils/bincnv/bincnv.c | 1 - utils/dcbumpgen/get_image_jpg.c | 2 +- utils/kmgenc/get_image_jpg.c | 2 +- utils/kmgenc/kmgenc.c | 8 ++++---- utils/kmgenc/kmgenc.h | 12 +++++------- utils/rdtest/rdtest.c | 1 - utils/vqenc/get_image_jpg.c | 2 +- utils/wav2adpcm/wav2adpcm.c | 4 ++-- 12 files changed, 29 insertions(+), 40 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/spu.c b/kernel/arch/dreamcast/hardware/spu.c index f8555e1..dc6fb12 100644 --- a/kernel/arch/dreamcast/hardware/spu.c +++ b/kernel/arch/dreamcast/hardware/spu.c @@ -234,5 +234,3 @@ int spu_shutdown() { spu_memset(0, 0, 0x200000); return 0; } - - diff --git a/kernel/arch/dreamcast/sound/arm/aica.c b/kernel/arch/dreamcast/sound/arm/aica.c index 84428ac..2ff2ca1 100644 --- a/kernel/arch/dreamcast/sound/arm/aica.c +++ b/kernel/arch/dreamcast/sound/arm/aica.c @@ -85,17 +85,18 @@ static inline int calc_aica_pan(int x) { This routine (and the similar ones) owe a lot to Marcus' sound example -- I hadn't gotten quite this far into dissecting the individual regs yet. */ void aica_play(int ch, int delay) { - unsigned long smpptr = chans[ch].base; - int mode = chans[ch].type; - int loopst = chans[ch].loopstart; - int loopend = chans[ch].loopend; - int freq = chans[ch].freq; - int vol = chans[ch].vol; - int pan = chans[ch].pan; - int loopflag = chans[ch].loop; - unsigned long freq_lo, freq_base = 5644800; + uint32 smpptr = chans[ch].base; + uint32 mode = chans[ch].type; + uint32 loopst = chans[ch].loopstart; + uint32 loopend = chans[ch].loopend; + uint32 freq = chans[ch].freq; + uint32 vol = chans[ch].vol; + uint32 pan = chans[ch].pan; + uint32 loopflag = chans[ch].loop; + + uint32 freq_lo, freq_base = 5644800; int freq_hi = 7; - int i; + uint32 i; uint32 playCont; /* Stop the channel (if it's already playing) */ @@ -200,8 +201,8 @@ void aica_pan(int ch) { /* Set channel frequency */ void aica_freq(int ch) { - int freq = chans[ch].freq; - unsigned long freq_lo, freq_base = 5644800; + uint32 freq = chans[ch].freq; + uint32 freq_lo, freq_base = 5644800; int freq_hi = 7; while(freq < freq_base && freq_hi > -8) { diff --git a/kernel/arch/dreamcast/sound/arm/crt0.s b/kernel/arch/dreamcast/sound/arm/crt0.s index 395d917..80857b2 100644 --- a/kernel/arch/dreamcast/sound/arm/crt0.s +++ b/kernel/arch/dreamcast/sound/arm/crt0.s @@ -129,9 +129,3 @@ data_abort: irq: rsrvd: sub pc,r14,#4 - - - - - - diff --git a/kernel/arch/dreamcast/sound/arm/main.c b/kernel/arch/dreamcast/sound/arm/main.c index b9a3145..6979182 100644 --- a/kernel/arch/dreamcast/sound/arm/main.c +++ b/kernel/arch/dreamcast/sound/arm/main.c @@ -17,8 +17,8 @@ #define timer (*((volatile uint32 *)AICA_MEM_CLOCK)) -void timer_wait(int jiffies) { - int fin = timer + jiffies; +void timer_wait(uint32 jiffies) { + uint32 fin = timer + jiffies; while(timer <= fin) ; diff --git a/utils/bincnv/bincnv.c b/utils/bincnv/bincnv.c index 516bd56..4cfc92a 100644 --- a/utils/bincnv/bincnv.c +++ b/utils/bincnv/bincnv.c @@ -152,7 +152,6 @@ static int read_file_contents(char const * const filename, char **data, size_t * f = fopen(filename, "rb"); - // Read texture from file if(!f) { return 1; } diff --git a/utils/dcbumpgen/get_image_jpg.c b/utils/dcbumpgen/get_image_jpg.c index 2211187..0d53afd 100644 --- a/utils/dcbumpgen/get_image_jpg.c +++ b/utils/dcbumpgen/get_image_jpg.c @@ -101,7 +101,7 @@ int get_image_jpg(const char *filename, image_t *image) image->data[offs + i*4 + 2] = buffer[0][i*3 + 1]; image->data[offs + i*4 + 3] = buffer[0][i*3 + 2]; } - // memcpy(image->data + (cinfo.output_scanline-1) * image->stride, buffer[0], image->stride); + /* memcpy(image->data + (cinfo.output_scanline-1) * image->stride, buffer[0], image->stride); */ } /* Step 7: Finish decompression */ diff --git a/utils/kmgenc/get_image_jpg.c b/utils/kmgenc/get_image_jpg.c index 4d7379e..42f93f5 100644 --- a/utils/kmgenc/get_image_jpg.c +++ b/utils/kmgenc/get_image_jpg.c @@ -103,7 +103,7 @@ int get_image_jpg(const char *filename, image_t *image) { image->data[offs + i * 4 + 3] = buffer[0][i * 3 + 2]; } - // memcpy(image->data + (cinfo.output_scanline-1) * image->stride, buffer[0], image->stride); + /* memcpy(image->data + (cinfo.output_scanline-1) * image->stride, buffer[0], image->stride); */ } /* Step 7: Finish decompression */ diff --git a/utils/kmgenc/kmgenc.c b/utils/kmgenc/kmgenc.c index 0b0ee27..f0195ef 100644 --- a/utils/kmgenc/kmgenc.c +++ b/utils/kmgenc/kmgenc.c @@ -63,7 +63,7 @@ static void twiddle(image_t * src, uint16 * output) { int x, y, yout; for(y = 0; y < h; y++) { - // yout = ((h - 1) - y); + /* yout = ((h - 1) - y); */ yout = y; for(x = 0; x < w; x++) { @@ -177,11 +177,11 @@ static void banner(const char *progname) { printf("Usage: %s [options] image1 [image2..]\n", progname); printf("\n"); printf("Options:\n"); - // printf("\t-t, --twiddle\tcreate twiddled textures\n"); - // printf("\t-m, --mipmap\tcreate mipmapped textures (EXPERIMENTAL)\n"); + /* printf("\t-t, --twiddle\tcreate twiddled textures\n"); */ + /* printf("\t-m, --mipmap\tcreate mipmapped textures (EXPERIMENTAL)\n"); */ printf("\t-v, --verbose\tverbose\n"); printf("\t-d, --debug\tshow debug information\n"); - // printf("\t-q, --highq\thigher quality (much slower)\n"); + /* printf("\t-q, --highq\thigher quality (much slower)\n"); */ printf("\t-a4, --argb4444\tuse alpha channel (and output ARGB4444)\n"); printf("\t-a1, --argb1555\tuse alpha channel (and output ARGB1555)\n"); } diff --git a/utils/kmgenc/kmgenc.h b/utils/kmgenc/kmgenc.h index 8724d3b..1db6571 100644 --- a/utils/kmgenc/kmgenc.h +++ b/utils/kmgenc/kmgenc.h @@ -1,7 +1,6 @@ #ifndef __KMGENC_H #define __KMGENC_H -// Some useful global headers #include <stdio.h> #include <fcntl.h> #include <stdlib.h> @@ -10,11 +9,10 @@ #include <unistd.h> #include <errno.h> -// For outputting KMG files +/* For outputting KMG files */ #define NEED_KOS_TYPES #include "kmg.h" -// A single color value typedef struct fcolor { float a; float r; @@ -22,7 +20,7 @@ typedef struct fcolor { float b; } fcolor_t; -// A few useful macros for color manipulation + #define PACK4444(a, r, g, b) ( \ ( (((int)((a)*15))) << 12) | \ ( (((int)((r)*15))) << 8) | \ @@ -62,7 +60,7 @@ static inline void get_fcolor_32(fcolor_t *c, uint8 *pixels) { c->b = pixels[3] / 255.0f; } -// Endian fixing +/* Endian fixing */ static int is_le = -1; static inline int le_detect() { @@ -100,8 +98,8 @@ static inline int le32(int x) { ((val >> 24) & 0x000000ff); } -// Internal includes +/* Internal includes */ #include "get_image.h" -#endif // __KMGENC_H +#endif diff --git a/utils/rdtest/rdtest.c b/utils/rdtest/rdtest.c index 549ac97..ce74a00 100644 --- a/utils/rdtest/rdtest.c +++ b/utils/rdtest/rdtest.c @@ -464,7 +464,6 @@ static int read_file_contents(char const * const filename, char **data, size_t * f = fopen(filename, "rb"); - // Read texture from file if(!f) { return 1; } diff --git a/utils/vqenc/get_image_jpg.c b/utils/vqenc/get_image_jpg.c index 4d7379e..42f93f5 100644 --- a/utils/vqenc/get_image_jpg.c +++ b/utils/vqenc/get_image_jpg.c @@ -103,7 +103,7 @@ int get_image_jpg(const char *filename, image_t *image) { image->data[offs + i * 4 + 3] = buffer[0][i * 3 + 2]; } - // memcpy(image->data + (cinfo.output_scanline-1) * image->stride, buffer[0], image->stride); + /* memcpy(image->data + (cinfo.output_scanline-1) * image->stride, buffer[0], image->stride); */ } /* Step 7: Finish decompression */ diff --git a/utils/wav2adpcm/wav2adpcm.c b/utils/wav2adpcm/wav2adpcm.c index 02e5a5f..5bafd9b 100644 --- a/utils/wav2adpcm/wav2adpcm.c +++ b/utils/wav2adpcm/wav2adpcm.c @@ -26,7 +26,7 @@ static int diff_lookup[16] = { static int index_scale[16] = { 0x0e6, 0x0e6, 0x0e6, 0x0e6, 0x133, 0x199, 0x200, 0x266, - 0x0e6, 0x0e6, 0x0e6, 0x0e6, 0x133, 0x199, 0x200, 0x266 //same value for speedup + 0x0e6, 0x0e6, 0x0e6, 0x0e6, 0x133, 0x199, 0x200, 0x266 /* same value for speedup */ }; static inline int limit(int val, int min, int max) { @@ -40,7 +40,7 @@ void pcm2adpcm(unsigned char *dst, const short *src, size_t length) { signal = 0; step = 0x7f; - // length/=4; + /* length /= 4; */ length = (length + 3) / 4; do { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |