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
(25) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Lawrence S. <ljs...@us...> - 2013-06-13 02:59:43
|
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 2244cfbf42ab0616d5d3ac607a102e005542f41e (commit) from 10c8de552055f0c2aa9390ea93b345bec8d71610 (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 2244cfbf42ab0616d5d3ac607a102e005542f41e Author: Lawrence Sebald <ljs...@us...> Date: Wed Jun 12 22:59:14 2013 -0400 strcasecmp/strncasecmp are in <strings.h> not <string.h> (in C99). ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/fs/fs_iso9660.c | 1 + kernel/exports/library.c | 3 ++- kernel/exports/nmmgr.c | 1 + kernel/fs/fs_ramdisk.c | 1 + kernel/fs/fs_romdisk.c | 1 + 5 files changed, 6 insertions(+), 1 deletions(-) diff --git a/kernel/arch/dreamcast/fs/fs_iso9660.c b/kernel/arch/dreamcast/fs/fs_iso9660.c index 2aa9ce9..f68cd5e 100644 --- a/kernel/arch/dreamcast/fs/fs_iso9660.c +++ b/kernel/arch/dreamcast/fs/fs_iso9660.c @@ -40,6 +40,7 @@ ISO9660 systems, as these were used as references as well. #include <stdio.h> #include <ctype.h> #include <string.h> +#include <strings.h> #include <malloc.h> #include <errno.h> diff --git a/kernel/exports/library.c b/kernel/exports/library.c index 11df284..eb814f9 100644 --- a/kernel/exports/library.c +++ b/kernel/exports/library.c @@ -1,11 +1,12 @@ /* KallistiOS ##version## kernel/library.c - Copyright (C)2003 Dan Potter + Copyright (C) 2003 Dan Potter */ #include <assert.h> #include <string.h> +#include <strings.h> #include <malloc.h> #include <stdio.h> #include <errno.h> diff --git a/kernel/exports/nmmgr.c b/kernel/exports/nmmgr.c index 61188a3..33056da 100644 --- a/kernel/exports/nmmgr.c +++ b/kernel/exports/nmmgr.c @@ -18,6 +18,7 @@ interface at the front of their struct. #include <stdio.h> #include <malloc.h> #include <string.h> +#include <strings.h> #include <kos/nmmgr.h> #include <kos/mutex.h> #include <kos/exports.h> diff --git a/kernel/fs/fs_ramdisk.c b/kernel/fs/fs_ramdisk.c index 043f341..3e60a59 100644 --- a/kernel/fs/fs_ramdisk.c +++ b/kernel/fs/fs_ramdisk.c @@ -36,6 +36,7 @@ cache data from disk rather than as a general purpose file system. #include <kos/fs_ramdisk.h> #include <malloc.h> #include <string.h> +#include <strings.h> #include <stdio.h> #include <stdlib.h> #include <assert.h> diff --git a/kernel/fs/fs_romdisk.c b/kernel/fs/fs_romdisk.c index caef7f3..b19e07d 100644 --- a/kernel/fs/fs_romdisk.c +++ b/kernel/fs/fs_romdisk.c @@ -22,6 +22,7 @@ on sunsite.unc.edu in /pub/Linux/system/recovery/, or as a package under Debian #include <kos/fs_romdisk.h> #include <malloc.h> #include <string.h> +#include <strings.h> #include <stdio.h> #include <assert.h> #include <errno.h> hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-13 02:32:23
|
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 10c8de552055f0c2aa9390ea93b345bec8d71610 (commit) from b59f8128097963cc3291c4b267b6371f500132a9 (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 10c8de552055f0c2aa9390ea93b345bec8d71610 Author: Lawrence Sebald <ljs...@us...> Date: Wed Jun 12 22:31:51 2013 -0400 Clean up the last of the warnings with -Wextra -std=gnu99. I expect everyone to continue committing nice warning-free code now. ;-) ----------------------------------------------------------------------- Summary of changes: Makefile | 9 ++++++++- kernel/fs/fs_pty.c | 15 +++++++-------- kernel/libc/koslib/malloc.c | 10 +++++----- kernel/libc/koslib/realpath.c | 2 +- 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index bff7744..f552532 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,16 @@ # KallistiOS ##version## # # Root Makefile -# Copyright (C)2003 Dan Potter +# Copyright (C) 2003 Dan Potter # +# Make sure things compile nice and cleanly. We don't necessarily want to push +# these flags out on to user code, but it's a good idea to keep them around for +# compiling all of KOS proper. +# I expect everyone to keep their code warning free. Don't make me add -Werror +# here too. ;-) +KOS_CFLAGS += -Wextra + # Add stuff to DIRS to auto-compile it with the big tree. DIRS = utils ifdef KOS_CCPLUS diff --git a/kernel/fs/fs_pty.c b/kernel/fs/fs_pty.c index 24fc5f6..63034b8 100644 --- a/kernel/fs/fs_pty.c +++ b/kernel/fs/fs_pty.c @@ -53,7 +53,7 @@ typedef struct ptyhalf { uint8 buffer[PTY_BUFFER_SIZE]; /* Our _receive_ buffer */ int head, tail; /* Insert at head, remove at tail */ - int cnt; /* Byte count in the queue */ + size_t cnt; /* Byte count in the queue */ int refcnt; /* When this reaches zero, we close */ @@ -472,9 +472,9 @@ static ssize_t pty_read_serial(pipefd_t * fdobj, ptyhalf_t * ph, void * buf, siz /* Read from a pty endpoint */ static ssize_t pty_read(void * h, void * buf, size_t bytes) { - int avail; - pipefd_t * fdobj; - ptyhalf_t * ph; + size_t avail; + pipefd_t *fdobj; + ptyhalf_t *ph; fdobj = (pipefd_t *)h; ph = fdobj->d.p; @@ -520,7 +520,6 @@ static ssize_t pty_read(void * h, void * buf, size_t bytes) { ph->head = (ph->head + bytes) % PTY_BUFFER_SIZE; ph->cnt -= bytes; - assert(ph->cnt >= 0); /* Wake anyone waiting for write space */ cond_broadcast(&ph->ready_write); @@ -532,9 +531,9 @@ done: /* Write to a pty endpoint */ static ssize_t pty_write(void * h, const void * buf, size_t bytes) { - int avail; - pipefd_t * fdobj; - ptyhalf_t * ph; + size_t avail; + pipefd_t *fdobj; + ptyhalf_t *ph; fdobj = (pipefd_t *)h; ph = fdobj->d.p; diff --git a/kernel/libc/koslib/malloc.c b/kernel/libc/koslib/malloc.c index f493ff1..c8eda90 100644 --- a/kernel/libc/koslib/malloc.c +++ b/kernel/libc/koslib/malloc.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## malloc.c - Copyright (C)2003 Dan Potter + Copyright (C) 2003 Dan Potter Most of this module was written by Doug Lea and released into the public domain. We have incorporated it under the KallistiOS @@ -2867,7 +2867,7 @@ typedef struct malloc_chunk* mbinptr; Compute index for size. We expect this to be inlined when compiled with optimization, else not, which works out well. */ -static int largebin_index(unsigned int sz) { +static unsigned int largebin_index(unsigned int sz) { unsigned int x = sz >> SMALLBIN_WIDTH; unsigned int m; /* bit position of highest set bit of m */ @@ -3439,7 +3439,7 @@ INTERNAL_SIZE_T s; static void do_check_malloc_state() { mstate av = get_malloc_state(); - int i; + unsigned int i; mchunkptr p; mchunkptr q; mbinptr b; @@ -3448,7 +3448,7 @@ static void do_check_malloc_state() { unsigned int idx; INTERNAL_SIZE_T size; CHUNK_SIZE_T total = 0; - int max_fast_bin; + unsigned int max_fast_bin; /* internal size_t must be no wider than pointer type */ assert(sizeof(INTERNAL_SIZE_T) <= sizeof(char*)); @@ -5210,7 +5210,7 @@ size_t mUSABLe(mem) Void_t* mem; struct mallinfo mALLINFo() { mstate av = get_malloc_state(); struct mallinfo mi; - int i; + unsigned int i; mbinptr b; mchunkptr p; INTERNAL_SIZE_T avail; diff --git a/kernel/libc/koslib/realpath.c b/kernel/libc/koslib/realpath.c index 0fcd4d5..283b1b2 100644 --- a/kernel/libc/koslib/realpath.c +++ b/kernel/libc/koslib/realpath.c @@ -88,7 +88,7 @@ realpath(const char *path, char resolved[PATH_MAX]) { p = strchr(left, '/'); s = p ? p : left + left_len; - if(s - left >= sizeof(next_token)) { + if((unsigned)(s - left) >= sizeof(next_token)) { errno = ENAMETOOLONG; return (NULL); } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-13 02:19:28
|
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 b59f8128097963cc3291c4b267b6371f500132a9 (commit) from 7fa9f7bf8441d8cc465db8c48b039436e6042e04 (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 b59f8128097963cc3291c4b267b6371f500132a9 Author: Lawrence Sebald <ljs...@us...> Date: Wed Jun 12 22:18:49 2013 -0400 More warning cleanup, this time in kernel/arch/dreamcast. Same deal as the last commit: most of these are signed vs. unsigned comparisons. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/fs/fs_dclsocket.c | 4 +- kernel/arch/dreamcast/fs/fs_vmu.c | 39 +++++++++---------- kernel/arch/dreamcast/fs/vmufs.c | 15 ++++--- kernel/arch/dreamcast/hardware/maple/maple_utils.c | 2 +- .../dreamcast/hardware/network/broadband_adapter.c | 4 +- kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c | 2 +- kernel/arch/dreamcast/hardware/pvr/pvr_texture.c | 10 ++-- kernel/arch/dreamcast/kernel/exec.c | 4 +- kernel/arch/dreamcast/kernel/gdb_stub.c | 22 +++++----- kernel/arch/dreamcast/kernel/mmu.c | 41 +++++++++----------- kernel/arch/dreamcast/sound/snd_sfxmgr.c | 4 +- kernel/arch/dreamcast/sound/snd_stream.c | 10 ++-- kernel/arch/dreamcast/util/screenshot.c | 2 +- 13 files changed, 78 insertions(+), 81 deletions(-) diff --git a/kernel/arch/dreamcast/fs/fs_dclsocket.c b/kernel/arch/dreamcast/fs/fs_dclsocket.c index 1f6ce04..6586292 100644 --- a/kernel/arch/dreamcast/fs/fs_dclsocket.c +++ b/kernel/arch/dreamcast/fs/fs_dclsocket.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## kernel/arch/dreamcast/fs/fs_dclsocket.c - Copyright (C) 2007, 2008, 2012 Lawrence Sebald + Copyright (C) 2007, 2008, 2012, 2013 Lawrence Sebald Based on fs_dclnative.c and related files Copyright (C) 2003 Dan Potter @@ -92,7 +92,7 @@ static void dcls_handle_pbin(command_t *cmd) { } static void dcls_handle_dbin(command_t *cmd) { - int i; + unsigned int i; for(i = 0; i < (bin_info.size + 1023) / 1024; ++i) { if(!bin_info.map[i]) diff --git a/kernel/arch/dreamcast/fs/fs_vmu.c b/kernel/arch/dreamcast/fs/fs_vmu.c index 1e425d0..8494b2c 100644 --- a/kernel/arch/dreamcast/fs/fs_vmu.c +++ b/kernel/arch/dreamcast/fs/fs_vmu.c @@ -2,7 +2,7 @@ fs_vmu.c Copyright (C) 2003 Dan Potter - Copyright (C) 2012 Lawrence Sebald + Copyright (C) 2012, 2013 Lawrence Sebald */ @@ -51,29 +51,29 @@ and may be used pretty much simultaneously in the same program. /* File handles */ typedef struct vmu_fh_str { - uint32 strtype; /* 0==dir, 1==file */ + uint32 strtype; /* 0==dir, 1==file */ TAILQ_ENTRY(vmu_fh_str) listent; /* list entry */ - int mode; /* mode the file was opened with */ - char path[17]; /* full path of the file */ - char name[13]; /* name of the file */ - off_t loc; /* current position in the file (bytes) */ - maple_device_t * dev; /* maple address of the vmu to use */ - int filesize; /* file length from dirent (in 512-byte blks) */ - uint8 *data; /* copy of the whole file */ + int mode; /* mode the file was opened with */ + char path[17]; /* full path of the file */ + char name[13]; /* name of the file */ + off_t loc; /* current position in the file (bytes) */ + maple_device_t *dev; /* maple address of the vmu to use */ + uint32 filesize; /* file length from dirent (in 512-byte blks) */ + uint8 *data; /* copy of the whole file */ } vmu_fh_t; /* Directory handles */ typedef struct vmu_dh_str { - uint32 strtype; /* 0==dir, 1==file */ + uint32 strtype; /* 0==dir, 1==file */ TAILQ_ENTRY(vmu_dh_str) listent; /* list entry */ - int rootdir; /* 1 if we're reading /vmu */ - dirent_t dirent; /* Dirent to pass back */ - vmu_dir_t * dirblocks; /* Copy of all directory blocks */ - uint16 entry; /* Current dirent */ - uint16 dircnt; /* Count of dir entries */ - maple_device_t * dev; /* VMU address */ + int rootdir; /* 1 if we're reading /vmu */ + dirent_t dirent; /* Dirent to pass back */ + vmu_dir_t *dirblocks; /* Copy of all directory blocks */ + uint16 entry; /* Current dirent */ + uint16 dircnt; /* Count of dir entries */ + maple_device_t *dev; /* VMU address */ } vmu_dh_t; /* Linked list of open files (controlled by "mutex") */ @@ -99,8 +99,8 @@ static maple_device_t * vmu_path_to_addr(const char *p) { } /* Open the fake vmu root dir /vmu */ -vmu_fh_t *vmu_open_vmu_dir() { - int p, u; +static vmu_fh_t *vmu_open_vmu_dir(void) { + unsigned int p, u; unsigned int num = 0; char names[MAPLE_PORT_COUNT * MAPLE_UNIT_COUNT][2]; vmu_dh_t *dh; @@ -291,7 +291,7 @@ static int vmu_verify_hnd(void * hnd, int type) { mutex_unlock(&fh_mutex); if(rv) - return type == VMU_ANY ? 1 : (cur->strtype == type); + return type == VMU_ANY ? 1 : ((int)cur->strtype == type); else return 0; } @@ -328,7 +328,6 @@ 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))) { diff --git a/kernel/arch/dreamcast/fs/vmufs.c b/kernel/arch/dreamcast/fs/vmufs.c index 752b5d3..9af1b20 100644 --- a/kernel/arch/dreamcast/fs/vmufs.c +++ b/kernel/arch/dreamcast/fs/vmufs.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## vmufs.c - Copyright (C)2003 Dan Potter + Copyright (C) 2003 Dan Potter */ @@ -108,7 +108,8 @@ int vmufs_fat_blocks(vmu_root_t * root_buf) { /* Common code for both dir_read and dir_write */ static int vmufs_dir_ops(maple_device_t * dev, vmu_root_t * root, vmu_dir_t * dir_buf, int write) { uint16 dir_block, dir_size; - int i, needsop, rv; + unsigned int i; + int needsop, rv; /* Find the directory starting block and length */ dir_block = root->dir_loc; @@ -472,7 +473,8 @@ int vmufs_fat_free(vmu_root_t * root, uint16 * fat) { } int vmufs_dir_free(vmu_root_t * root, vmu_dir_t * dir) { - int i, freeblocks; + unsigned int i; + int freeblocks; freeblocks = 0; @@ -569,9 +571,10 @@ static void vmufs_teardown(vmu_dir_t * dir, uint16 * fat) { } int vmufs_readdir(maple_device_t * dev, vmu_dir_t ** outbuf, int * outcnt) { - vmu_root_t root; - vmu_dir_t * dir; - int dircnt, dirsize, i, j, rv = 0; + vmu_root_t root; + vmu_dir_t *dir; + int dircnt, dirsize, rv = 0; + unsigned int i, j; *outbuf = NULL; *outcnt = 0; diff --git a/kernel/arch/dreamcast/hardware/maple/maple_utils.c b/kernel/arch/dreamcast/hardware/maple/maple_utils.c index a649be8..0c470d7 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_utils.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_utils.c @@ -131,7 +131,7 @@ static const char *maple_resp_names[] = { "OK", "DATATRF" }; -#define maple_resp_name_cnt (sizeof(maple_resp_names)/sizeof(char *)) +#define maple_resp_name_cnt ((int)(sizeof(maple_resp_names)/sizeof(char *))) /* Return a string representing the maple response code */ const char * maple_perror(int response) { diff --git a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c index 2da22f9..0da0a39 100644 --- a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c +++ b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c @@ -597,7 +597,7 @@ static int bba_copy_packet(uint8 * dst, uint32 src, int len) { #endif } -static int rx_enq(int ring_offset, int pkt_size) { +static int rx_enq(int ring_offset, size_t pkt_size) { /* If there's no one to receive it, don't bother. */ if(eth_rx_callback) { if(rxin != rxout && @@ -767,7 +767,7 @@ static void *bba_rx_threadfunc(void *dummy) { static void bba_rx() { uint32 rx_status; - int pkt_size, ring_offset; + size_t pkt_size, ring_offset; //vid_border_color(255, 0, 255); while(!(g2_read_8(NIC(RT_CHIPCMD)) & 1)) { diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c b/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c index ae541a4..799df1b 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c @@ -3217,7 +3217,7 @@ size_t mUSABLe(mem) Void_t* mem; struct mallinfo mALLINFo() { mstate av = get_malloc_state(); struct mallinfo mi; - int i; + unsigned int i; mbinptr b; mchunkptr p; INTERNAL_SIZE_T avail; diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_texture.c b/kernel/arch/dreamcast/hardware/pvr/pvr_texture.c index d7dc620..03c5f48 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_texture.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_texture.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## pvr_texture.c - Copyright (C)2002,2004 Dan Potter + Copyright (C) 2002, 2004 Dan Potter */ @@ -51,8 +51,9 @@ void pvr_txr_load(void * src, pvr_ptr_t dst, uint32 count) { PVR_TXRLOAD_INVERT */ -void pvr_txr_load_ex(void * src, pvr_ptr_t dst, uint32 w, uint32 h, uint32 flags) { - int x, y, yout, min, mask, bpp, invert; +void pvr_txr_load_ex(void * src, pvr_ptr_t dst, uint32 w, uint32 h, + uint32 flags) { + uint32 x, y, yout, min, mask, bpp, invert; /* Make sure we're attempting something we can do */ switch(flags & PVR_TXRLOAD_FMT_MASK) { @@ -142,7 +143,7 @@ void pvr_txr_load_ex(void * src, pvr_ptr_t dst, uint32 w, uint32 h, uint32 flags /* Load a KOS Platform Independent Image (subject to restraint checking) */ void pvr_txr_load_kimg(kos_img_t *img, pvr_ptr_t dst, uint32 flags) { - int fmt, w, h; + uint32 fmt, w, h; /* First check and make sure it's a format we can use */ fmt = KOS_IMG_FMT_I(img->fmt) & KOS_IMG_FMT_MASK; @@ -208,4 +209,3 @@ void pvr_txr_load_kimg(kos_img_t *img, pvr_ptr_t dst, uint32 flags) { pvr_txr_load_ex(img->data, dst, w, h, flags); } } - diff --git a/kernel/arch/dreamcast/kernel/exec.c b/kernel/arch/dreamcast/kernel/exec.c index 9e38392..01cf904 100644 --- a/kernel/arch/dreamcast/kernel/exec.c +++ b/kernel/arch/dreamcast/kernel/exec.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## exec.c - (c)2002 Dan Potter + Copyright (C) 2002 Dan Potter */ #include <arch/arch.h> @@ -33,7 +33,7 @@ void arch_exec_at(const void *image, uint32 length, uint32 address) { uint32 tcount = (tend - tstart) / 4; uint32 buffer[tcount]; uint32 * values; - int i; + uint32 i; assert((tend - tstart) % 4 == 0); diff --git a/kernel/arch/dreamcast/kernel/gdb_stub.c b/kernel/arch/dreamcast/kernel/gdb_stub.c index 70a00c2..f837c89 100644 --- a/kernel/arch/dreamcast/kernel/gdb_stub.c +++ b/kernel/arch/dreamcast/kernel/gdb_stub.c @@ -215,14 +215,14 @@ typedef void (*Function)(); */ static int hex(char); -static char *mem2hex(char *, char *, int); -static char *hex2mem(char *, char *, int); -static int hexToInt(char **, int *); +static char *mem2hex(char *, char *, uint32); +static char *hex2mem(char *, char *, uint32); +static int hexToInt(char **, uint32 *); static unsigned char *getpacket(void); static void putpacket(char *); static int computeSignal(int exceptionVector); -static void hardBreakpoint(int, int, int, int, char*); +static void hardBreakpoint(int, int, uint32, int, char*); static void putDebugChar(char); static char getDebugChar(void); static void flushDebugChannel(void); @@ -317,8 +317,8 @@ hex(char ch) { /* convert the memory, pointed to by mem into hex, placing result in buf */ /* return a pointer to the last char put in buf (null) */ static char * -mem2hex(char *mem, char *buf, int count) { - int i; +mem2hex(char *mem, char *buf, uint32 count) { + uint32 i; int ch; for(i = 0; i < count; i++) { @@ -335,8 +335,8 @@ mem2hex(char *mem, char *buf, int count) { /* return a pointer to the character after the last byte written */ static char * -hex2mem(char *buf, char *mem, int count) { - int i; +hex2mem(char *buf, char *mem, uint32 count) { + uint32 i; unsigned char ch; for(i = 0; i < count; i++) { @@ -353,7 +353,7 @@ hex2mem(char *buf, char *mem, int count) { /* RETURN NUMBER OF CHARS PROCESSED */ /**********************************************/ static int -hexToInt(char **ptr, int *intValue) { +hexToInt(char **ptr, uint32 *intValue) { int numChars = 0; int hexValue; @@ -635,7 +635,7 @@ undoSStep(void) { #define BREG(r, o) (*((uint8*)((r)+(o)))) static void -hardBreakpoint(int set, int brktype, int addr, int length, char* resBuffer) { +hardBreakpoint(int set, int brktype, uint32 addr, int length, char* resBuffer) { char* const ucb_base = (char*)0xff200000; static const int ucb_step = 0xc; static const char BAR = 0x0, BAMR = 0x4, BBR = 0x8, /*BASR = 0x14,*/ BRCR = 0x20; @@ -719,7 +719,7 @@ When in the monitor mode we talk a human on the serial line rather than gdb. static void gdb_handle_exception(int exceptionVector) { int sigval, stepping; - int addr, length; + uint32 addr, length; char *ptr; /* reply to host that an exception has occurred */ diff --git a/kernel/arch/dreamcast/kernel/mmu.c b/kernel/arch/dreamcast/kernel/mmu.c index d9835b3..a94ef79 100644 --- a/kernel/arch/dreamcast/kernel/mmu.c +++ b/kernel/arch/dreamcast/kernel/mmu.c @@ -331,11 +331,11 @@ void sc_mmu_mmap(uint32 dst, size_t len, uint32 src) { generic but should probably be replaced by a nice assembly routine for each platform as appropriate. */ int mmu_copyin(mmucontext_t *context, uint32 srcaddr, uint32 srccnt, void *buffer) { - mmupage_t *srcpage; - uint32 srcptr; - uint32 src; - int copied, run, srckrn; - uint8 *dst; + mmupage_t *srcpage; + uint32 srcptr; + uint32 src, run; + int copied, srckrn; + uint8 *dst; /* Setup source pointers */ srcptr = (uint32)srcaddr; @@ -381,19 +381,14 @@ int mmu_copyin(mmucontext_t *context, uint32 srcaddr, uint32 srccnt, void *buffe /* Check for overruns */ srccnt -= run; - if(srccnt <= 0) { - break; - } - else { - if(!srckrn && (srcptr & ~PAGEMASK) != ((srcptr - run) & ~PAGEMASK)) { - srcpage = map_virt(context, srcptr >> PAGESIZE_BITS); + if(!srckrn && (srcptr & ~PAGEMASK) != ((srcptr - run) & ~PAGEMASK)) { + srcpage = map_virt(context, srcptr >> PAGESIZE_BITS); - if(srcpage == NULL) - panic("mmu_copyv with invalid source page (in loop)"); + if(srcpage == NULL) + panic("mmu_copyv with invalid source page (in loop)"); - src = (srcpage->physical << PAGESIZE_BITS) - | (srcptr - (srcptr & ~PAGEMASK)); - } + src = (srcpage->physical << PAGESIZE_BITS) + | (srcptr - (srcptr & ~PAGEMASK)); } copied += run; @@ -410,13 +405,13 @@ int mmu_copyin(mmucontext_t *context, uint32 srcaddr, uint32 srccnt, void *buffe routine for each platform as appropriate. */ int mmu_copyv(mmucontext_t *context1, iovec_t *iov1, int iovcnt1, mmucontext_t *context2, iovec_t *iov2, int iovcnt2) { - mmupage_t *srcpage, *dstpage; - int srciov, dstiov; - int srccnt, dstcnt; - uint32 srcptr, dstptr; - uint32 src, dst; - int copied, run; - int srckrn, dstkrn; + mmupage_t *srcpage, *dstpage; + int srciov, dstiov; + uint32 srccnt, dstcnt; + uint32 srcptr, dstptr; + uint32 src, dst, run; + int copied; + int srckrn, dstkrn; /* static int sproket = 0; */ /* timer_disable_primary(); diff --git a/kernel/arch/dreamcast/sound/snd_sfxmgr.c b/kernel/arch/dreamcast/sound/snd_sfxmgr.c index 81463c0..359e136 100644 --- a/kernel/arch/dreamcast/sound/snd_sfxmgr.c +++ b/kernel/arch/dreamcast/sound/snd_sfxmgr.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## snd_sfxmgr.c - Copyright (c)2000,2001,2002,2003,2004 Dan Potter + Copyright (C) 2000, 2001, 2002, 2003, 2004 Dan Potter Sound effects management system; this thing loads and plays sound effects during game operation. @@ -171,7 +171,7 @@ sfxhnd_t snd_sfx_load(const char *fn) { } else if(chn == 2 && fmt == 1) { /* Stereo PCM */ - int i; + uint32 i; uint16 * sepbuf; sepbuf = malloc(len / 2); diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 8b2f2ca..47f8073 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -1,8 +1,8 @@ /* KallistiOS ##version## snd_stream.c - Copyright (c)2000,2001,2002,2003,2004 Dan Potter - Copyright (c)2002 Florian Schulze + Copyright (C) 2000, 2001, 2002, 2003, 2004 Dan Potter + Copyright (C) 2002 Florian Schulze SH-4 support routines for SPU streaming sound driver */ @@ -49,11 +49,11 @@ typedef struct strchan { int ch[2]; // The last write position in the playing buffer - int last_write_pos; // = 0 + uint32 last_write_pos; // = 0 int curbuffer; // = 0 // The buffer size allocated for this stream. - int buffer_size; // = 0x10000 + uint32 buffer_size; // = 0x10000 // Stream data location in AICA RAM uint32 spu_ram_sch[2]; @@ -445,7 +445,7 @@ static void dma_chain(ptr_t data) { int snd_stream_poll(snd_stream_hnd_t hnd) { uint32 ch0pos, ch1pos; //int realbuffer; - int current_play_pos; + uint32 current_play_pos; int needed_samples; int got_samples; void *data; diff --git a/kernel/arch/dreamcast/util/screenshot.c b/kernel/arch/dreamcast/util/screenshot.c index e585ef4..43184ea 100644 --- a/kernel/arch/dreamcast/util/screenshot.c +++ b/kernel/arch/dreamcast/util/screenshot.c @@ -110,7 +110,7 @@ int vid_screen_shot(const char *destfn) { /* Write a small header */ sprintf(header, "P6\n#KallistiOS Screen Shot\n%d %d\n255\n", vid_mode->width, vid_mode->height); - if(fs_write(f, header, strlen(header)) != strlen(header)) { + if(fs_write(f, header, strlen(header)) != (ssize_t)strlen(header)) { dbglog(DBG_ERROR, "vid_screen_shot: can't write header to output file '%s'\n", destfn); fs_close(f); free(buffer); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-13 01:59:52
|
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 7fa9f7bf8441d8cc465db8c48b039436e6042e04 (commit) from d4c9df5847dd7e5c4ed4d38a52e79f2008cda524 (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 7fa9f7bf8441d8cc465db8c48b039436e6042e04 Author: Lawrence Sebald <ljs...@us...> Date: Wed Jun 12 21:59:07 2013 -0400 Warning cleanup in the network code. This mostly cleans up various warnings about comparisons between signed and unsigned types, but various other things have also been cleaned up along the way. ----------------------------------------------------------------------- Summary of changes: include/kos/fs_socket.h | 10 ++++---- include/kos/net.h | 52 ++++++++++++++++++++++---------------------- kernel/fs/fs_socket.c | 8 +++--- kernel/net/net_arp.c | 8 +++--- kernel/net/net_core.c | 10 ++++---- kernel/net/net_dhcp.c | 10 ++++---- kernel/net/net_dhcp.h | 8 +++--- kernel/net/net_icmp.c | 12 +++++----- kernel/net/net_icmp.h | 4 +- kernel/net/net_icmp6.c | 32 +++++++++++++------------- kernel/net/net_icmp6.h | 5 ++- kernel/net/net_ipv4.c | 22 +++++++++--------- kernel/net/net_ipv4.h | 18 +++++++------- kernel/net/net_ipv4_frag.c | 12 +++++----- kernel/net/net_ipv6.c | 19 ++++++++------- kernel/net/net_ipv6.h | 14 ++++++------ kernel/net/net_multicast.c | 8 +++--- kernel/net/net_ndp.c | 8 +++--- kernel/net/net_tcp.c | 17 +++++++------ kernel/net/net_thd.c | 10 ++++---- kernel/net/net_thd.h | 10 ++++---- kernel/net/net_udp.c | 18 +++++++------- 22 files changed, 159 insertions(+), 156 deletions(-) diff --git a/include/kos/fs_socket.h b/include/kos/fs_socket.h index daf3002..1c97cf4 100644 --- a/include/kos/fs_socket.h +++ b/include/kos/fs_socket.h @@ -1,7 +1,7 @@ /* KallistiOS ##version## kos/fs_socket.h - Copyright (C) 2006, 2009, 2010, 2012 Lawrence Sebald + Copyright (C) 2006, 2009, 2010, 2012, 2013 Lawrence Sebald */ @@ -267,7 +267,7 @@ typedef struct fs_socket_proto { \retval 0 On success */ int (*input)(netif_t *src, int domain, const void *hdr, const uint8 *data, - int size); + size_t size); /** \brief Get socket options. @@ -341,8 +341,8 @@ typedef struct fs_socket_proto { /* \cond */ /* Init/shutdown */ -int fs_socket_init(); -int fs_socket_shutdown(); +int fs_socket_init(void); +int fs_socket_shutdown(void); /* \endcond */ /** \brief Open a socket without calling the protocol initializer. @@ -396,7 +396,7 @@ net_socket_t *fs_socket_open_sock(fs_socket_proto_t *proto); \retval 0 On success */ int fs_socket_input(netif_t *src, int domain, int protocol, const void *hdr, - const uint8 *data, int size); + const uint8 *data, size_t size); /** \brief Add a new protocol for use with fs_socket. diff --git a/include/kos/net.h b/include/kos/net.h index 5eb55fb..ae41958 100644 --- a/include/kos/net.h +++ b/include/kos/net.h @@ -2,7 +2,7 @@ include/kos/net.h Copyright (C) 2002 Dan Potter - Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Lawrence Sebald + Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Lawrence Sebald */ @@ -244,10 +244,10 @@ typedef struct ipv6_hdr_s { /** \brief Init ARP. \retval 0 On success (no error conditions defined). */ -int net_arp_init(); +int net_arp_init(void); /** \brief Shutdown ARP. */ -void net_arp_shutdown(); +void net_arp_shutdown(void); /** \brief Garbage collect timed out ARP entries. @@ -255,7 +255,7 @@ void net_arp_shutdown(); \retval 0 On success (no error conditions defined). */ -int net_arp_gc(); +int net_arp_gc(void); /** \brief Add an entry to the ARP cache manually. @@ -361,7 +361,7 @@ net_input_func net_input_set_target(net_input_func t); \param len The length of the data, in bytes. */ typedef void (*net_echo_cb)(const uint8 *ip, uint16 seq, uint64 delta_us, - uint8 ttl, const uint8 *data, int len); + uint8 ttl, const uint8 *data, size_t len); /** \brief Where will we handle possibly notifying the user of ping replies? */ extern net_echo_cb net_icmp_echo_cb; @@ -376,7 +376,7 @@ extern net_echo_cb net_icmp_echo_cb; \return 0 on success, <0 on failure. */ int net_icmp_send_echo(netif_t *net, const uint8 ipaddr[4], uint16 ident, - uint16 seq, const uint8 *data, int size); + uint16 seq, const uint8 *data, size_t size); /* Valid values for the code in the net_icmp_send_dest_unreach() function. */ #define ICMP_PROTOCOL_UNREACHABLE 2 /**< \brief Protocol unreachable */ @@ -423,7 +423,7 @@ typedef struct net_ipv4_stats { /** \brief Retrieve statistics from the IPv4 layer. \return The net_ipv4_stats_t structure. */ -net_ipv4_stats_t net_ipv4_get_stats(); +net_ipv4_stats_t net_ipv4_get_stats(void); /** \brief Create a 32-bit IP address, based on the individual numbers contained within the IP. @@ -451,7 +451,7 @@ void net_ipv4_parse_address(uint32 addr, uint8 out[4]); */ typedef void (*net6_echo_cb)(const struct in6_addr *ip, uint16 seq, uint64 delta_us, uint8 hlim, const uint8 *data, - int len); + size_t len); /** \brief Where will we handle possibly notifying the user of ping replies? */ extern net6_echo_cb net_icmp6_echo_cb; @@ -466,7 +466,7 @@ extern net6_echo_cb net_icmp6_echo_cb; \return 0 on success, <0 on failure. */ int net_icmp6_send_echo(netif_t *net, const struct in6_addr *dst, uint16 ident, - uint16 seq, const uint8 *data, int size); + uint16 seq, const uint8 *data, size_t size); /** \brief Send a Neighbor Solicitation packet on the specified device. \param net The network device to use. @@ -511,7 +511,7 @@ int net_icmp6_send_rsol(netif_t *net); \return 0 on success, <0 on failure. */ int net_icmp6_send_dest_unreach(netif_t *net, uint8 code, const uint8 *ppkt, - int psz); + size_t psz); /* Time Exceeded codes -- only fragment reassembly time exceeded makes sense */ #define ICMP6_TIME_EXCEEDED_HOPS_EXC 0 /**< \brief Hops exceeded */ @@ -525,7 +525,7 @@ int net_icmp6_send_dest_unreach(netif_t *net, uint8 code, const uint8 *ppkt, \return 0 on success, <0 on failure. */ int net_icmp6_send_time_exceeded(netif_t *net, uint8 code, const uint8 *ppkt, - int psz); + size_t psz); /* Parameter Problem codes */ #define ICMP6_PARAM_PROB_BAD_HEADER 0 /**< \brief Malformed header */ @@ -541,7 +541,7 @@ int net_icmp6_send_time_exceeded(netif_t *net, uint8 code, const uint8 *ppkt, \return 0 on success, <0 on failure. */ int net_icmp6_send_param_prob(netif_t *net, uint8 code, uint32 ptr, - const uint8 *ppkt, int psz); + const uint8 *ppkt, size_t psz); /***** net_ipv6.c *********************************************************/ @@ -564,22 +564,22 @@ typedef struct net_ipv6_stats { /** \brief Retrieve statistics from the IPv6 layer. \return The global IPv6 stats structure. */ -net_ipv6_stats_t net_ipv6_get_stats(); +net_ipv6_stats_t net_ipv6_get_stats(void); /***** net_ndp.c **********************************************************/ /** \brief Init NDP. \retval 0 On success (no error conditions defined). */ -int net_ndp_init(); +int net_ndp_init(void); /** \brief Shutdown NDP. */ -void net_ndp_shutdown(); +void net_ndp_shutdown(void); /** \brief Garbage collect timed out NDP entries. This will be called periodically as NDP queries come in. */ -void net_ndp_gc(); +void net_ndp_gc(void); /** \brief Add an entry to the NDP cache. \param nif The network device in question. @@ -630,25 +630,25 @@ typedef struct net_udp_stats { /** \brief Retrieve statistics from the UDP layer. \return The global UDP stats struct. */ -net_udp_stats_t net_udp_get_stats(); +net_udp_stats_t net_udp_get_stats(void); /** \brief Init UDP. \retval 0 On success (no error conditions defined). */ -int net_udp_init(); +int net_udp_init(void); /** \brief Shutdown UDP. */ -void net_udp_shutdown(); +void net_udp_shutdown(void); /***** net_tcp.c **********************************************************/ /** \brief Init TCP. \retval 0 On success (no error conditions defined). */ -int net_tcp_init(); +int net_tcp_init(void); /** \brief Shutdown TCP. */ -void net_tcp_shutdown(); +void net_tcp_shutdown(void); /***** net_crc.c **********************************************************/ @@ -712,10 +712,10 @@ int net_multicast_check(const uint8 mac[6]); /** \brief Init multicast support. \return 0 on success, !0 on error. */ -int net_multicast_init(); +int net_multicast_init(void); /** \brief Shutdown multicast support. */ -void net_multicast_shutdown(); +void net_multicast_shutdown(void); /***** net_core.c *********************************************************/ @@ -728,7 +728,7 @@ extern struct netif_list net_if_list; \return The network interface list. */ -struct netif_list * net_get_if_list(); +struct netif_list * net_get_if_list(void); /** \brief The default network device, used with sockets (read-only). */ extern netif_t *net_default_dev; @@ -754,10 +754,10 @@ int net_unreg_device(netif_t *device); /** \brief Init network support. \return 0 on success, <0 on failure. */ -int net_init(); +int net_init(void); /** \brief Shutdown network support. */ -void net_shutdown(); +void net_shutdown(void); __END_DECLS diff --git a/kernel/fs/fs_socket.c b/kernel/fs/fs_socket.c index d7ddfaf..01de8fd 100644 --- a/kernel/fs/fs_socket.c +++ b/kernel/fs/fs_socket.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## fs_socket.c - Copyright (C) 2006, 2009, 2012 Lawrence Sebald + Copyright (C) 2006, 2009, 2012, 2013 Lawrence Sebald */ @@ -131,7 +131,7 @@ static vfs_handler_t vh = { /* Have we been initialized? */ static int initted = 0; -int fs_socket_init() { +int fs_socket_init(void) { if(initted == 1) return 0; @@ -146,7 +146,7 @@ int fs_socket_init() { return 0; } -int fs_socket_shutdown() { +int fs_socket_shutdown(void) { net_socket_t *c, *n; fs_socket_proto_t *i, *j; @@ -180,7 +180,7 @@ int fs_socket_shutdown() { } int fs_socket_input(netif_t *src, int domain, int protocol, const void *hdr, - const uint8 *data, int size) { + const uint8 *data, size_t size) { fs_socket_proto_t *i; int rv = -2; diff --git a/kernel/net/net_arp.c b/kernel/net/net_arp.c index 3b75327..22a432c 100644 --- a/kernel/net/net_arp.c +++ b/kernel/net/net_arp.c @@ -3,7 +3,7 @@ kernel/net/net_arp.c Copyright (C) 2002 Dan Potter - Copyright (C) 2005, 2010, 2012 Lawrence Sebald + Copyright (C) 2005, 2010, 2012, 2013 Lawrence Sebald */ #include <string.h> @@ -74,7 +74,7 @@ struct netarp_list net_arp_cache = LIST_HEAD_INITIALIZER(0); /* Cache management */ /* Garbage collect timed out entries */ -int net_arp_gc() { +int net_arp_gc(void) { netarp_t *a1, *a2; a1 = LIST_FIRST(&net_arp_cache); @@ -334,7 +334,7 @@ int net_arp_query(netif_t *nif, const uint8 ip[4]) { /* Init/shutdown */ /* Init */ -int net_arp_init() { +int net_arp_init(void) { /* Initialize the ARP cache */ LIST_INIT(&net_arp_cache); @@ -342,7 +342,7 @@ int net_arp_init() { } /* Shutdown */ -void net_arp_shutdown() { +void net_arp_shutdown(void) { /* Free all ARP entries */ netarp_t *a1, *a2; diff --git a/kernel/net/net_core.c b/kernel/net/net_core.c index d4441c4..73c8575 100644 --- a/kernel/net/net_core.c +++ b/kernel/net/net_core.c @@ -3,7 +3,7 @@ kernel/net/net_core.c Copyright (C) 2002 Dan Potter - Copyright (C) 2005 Lawrence Sebald + Copyright (C) 2005, 2013 Lawrence Sebald */ #include <string.h> @@ -91,7 +91,7 @@ int net_unreg_device(netif_t *device) { return 0; } -struct netif_list * net_get_if_list() { +struct netif_list * net_get_if_list(void) { return &net_if_list; } @@ -108,7 +108,7 @@ netif_t *net_set_default(netif_t *n) { } /* Device detect / init */ -int net_dev_init() { +int net_dev_init(void) { int detected = 0; netif_t *cur; @@ -140,7 +140,7 @@ int net_dev_init() { } /* Init */ -int net_init() { +int net_init(void) { int rv = 0; /* Make sure we haven't already done this */ @@ -189,7 +189,7 @@ int net_init() { } /* Shutdown */ -void net_shutdown() { +void net_shutdown(void) { netif_t *cur; /* Make sure we actually initialized the net stuff to begin with */ diff --git a/kernel/net/net_dhcp.c b/kernel/net/net_dhcp.c index 37ebe3b..5f75d4a 100644 --- a/kernel/net/net_dhcp.c +++ b/kernel/net/net_dhcp.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## kernel/net/net_dhcp.c - Copyright (C) 2008, 2009 Lawrence Sebald + Copyright (C) 2008, 2009, 2013 Lawrence Sebald */ @@ -194,7 +194,7 @@ static uint16 net_dhcp_get_16bit(dhcp_pkt_t *pkt, uint8 opt, int len) { return 0; } -int net_dhcp_request() { +int net_dhcp_request(void) { uint8 pkt[1500]; dhcp_pkt_t *req = (dhcp_pkt_t *)pkt; int optlen; @@ -333,7 +333,7 @@ static void net_dhcp_send_request(dhcp_pkt_t *pkt, int pktlen, dhcp_pkt_t *pkt2, state = DHCP_STATE_REQUESTING; } -static void net_dhcp_renew() { +static void net_dhcp_renew(void) { uint8 buf[1500]; dhcp_pkt_t *req = (dhcp_pkt_t *)buf; int optlen; @@ -613,7 +613,7 @@ static void net_dhcp_thd(void *obj __attribute__((unused))) { mutex_unlock(&dhcp_lock); } -int net_dhcp_init() { +int net_dhcp_init(void) { struct sockaddr_in addr; /* Create the DHCP socket */ @@ -648,7 +648,7 @@ int net_dhcp_init() { return 0; } -void net_dhcp_shutdown() { +void net_dhcp_shutdown(void) { if(dhcp_cbid != -1) { net_thd_del_callback(dhcp_cbid); dhcp_cbid = -1; diff --git a/kernel/net/net_dhcp.h b/kernel/net/net_dhcp.h index 85feda4..2421d1c 100644 --- a/kernel/net/net_dhcp.h +++ b/kernel/net/net_dhcp.h @@ -1,7 +1,7 @@ /* KallistiOS ##version## kernel/net/net_dhcp.h - Copyright (C) 2008 Lawrence Sebald + Copyright (C) 2008, 2013 Lawrence Sebald */ @@ -143,11 +143,11 @@ typedef struct dhcp_pkt { uint8 options[]; } __attribute__((packed)) dhcp_pkt_t; -int net_dhcp_init(); +int net_dhcp_init(void); -void net_dhcp_shutdown(); +void net_dhcp_shutdown(void); -int net_dhcp_request(); +int net_dhcp_request(void); __END_DECLS diff --git a/kernel/net/net_icmp.c b/kernel/net/net_icmp.c index b6bd45d..615d139 100644 --- a/kernel/net/net_icmp.c +++ b/kernel/net/net_icmp.c @@ -3,7 +3,7 @@ kernel/net/net_icmp.c Copyright (C) 2002 Dan Potter - Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011 Lawrence Sebald + Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011, 2013 Lawrence Sebald */ @@ -52,7 +52,7 @@ Message types that are not implemented yet (if ever): */ static void icmp_default_echo_cb(const uint8 *ip, uint16 seq, uint64 delta_us, - uint8 ttl, const uint8* data, int data_sz) { + uint8 ttl, const uint8* data, size_t data_sz) { (void)data; if(delta_us != (uint64) - 1) { @@ -71,7 +71,7 @@ net_echo_cb net_icmp_echo_cb = icmp_default_echo_cb; /* Handle Echo Reply (ICMP type 0) packets */ static void net_icmp_input_0(netif_t *src, ip_hdr_t *ip, icmp_hdr_t *icmp, - const uint8 *d, int s) { + const uint8 *d, size_t s) { uint64 tmr, otmr; uint16 seq; @@ -95,7 +95,7 @@ static void net_icmp_input_0(netif_t *src, ip_hdr_t *ip, icmp_hdr_t *icmp, /* Handle Echo (ICMP type 8) packets */ static void net_icmp_input_8(netif_t *src, ip_hdr_t *ip, icmp_hdr_t *icmp, - const uint8 *d, int s) { + const uint8 *d, size_t s) { /* Set type to echo reply */ icmp->type = ICMP_MESSAGE_ECHO_REPLY; ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-08 17:23: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 d4c9df5847dd7e5c4ed4d38a52e79f2008cda524 (commit) from a62d98709d267c8fbf0402aa64d479a3e57b9485 (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 d4c9df5847dd7e5c4ed4d38a52e79f2008cda524 Author: Lawrence Sebald <ljs...@us...> Date: Sat Jun 8 13:22:52 2013 -0400 Fix signed/unsigned comparison in inet_ntop. ----------------------------------------------------------------------- Summary of changes: kernel/libc/koslib/inet_ntop.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kernel/libc/koslib/inet_ntop.c b/kernel/libc/koslib/inet_ntop.c index 63e90a0..657595e 100644 --- a/kernel/libc/koslib/inet_ntop.c +++ b/kernel/libc/koslib/inet_ntop.c @@ -57,7 +57,8 @@ static const char *inet_ntop4(const void *src, char *dst, socklen_t size) { static const char *inet_ntop6(const void *src, char *dst, socklen_t size) { int tmp[8] = { 0 }; - int runstart = -1, maxzero = 0, dcs = -1, i; + int runstart = -1, maxzero = 0; + socklen_t i, dcs = (socklen_t)-1; char tmpstr[4]; char *ch = tmpstr, *ch2 = dst; int part; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-07 05:54: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 a62d98709d267c8fbf0402aa64d479a3e57b9485 (commit) from 3294e0a069edd98423b74d071a4d5a4dc5f7e369 (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 a62d98709d267c8fbf0402aa64d479a3e57b9485 Author: Lawrence Sebald <ljs...@us...> Date: Fri Jun 7 01:53:35 2013 -0400 strnicmp -> strncasecmp (not strcasecmp)... ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/fs/fs_iso9660.c | 2 +- kernel/exports/nmmgr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/arch/dreamcast/fs/fs_iso9660.c b/kernel/arch/dreamcast/fs/fs_iso9660.c index 26b98e1..2aa9ce9 100644 --- a/kernel/arch/dreamcast/fs/fs_iso9660.c +++ b/kernel/arch/dreamcast/fs/fs_iso9660.c @@ -496,7 +496,7 @@ static iso_dirent_t *find_object(const char *fn, int dir, else fnlen = strlen(fn); - if(!strcasecmp(rrname, fn, fnlen) && ! *(rrname + fnlen)) { + if(!strncasecmp(rrname, fn, fnlen) && ! *(rrname + fnlen)) { if(!((dir << 1) ^ de->flags)) return de; } diff --git a/kernel/exports/nmmgr.c b/kernel/exports/nmmgr.c index 6f229e2..61188a3 100644 --- a/kernel/exports/nmmgr.c +++ b/kernel/exports/nmmgr.c @@ -35,7 +35,7 @@ nmmgr_handler_t * nmmgr_lookup(const char *fn) { /* Scan the handler table and look for a path match */ LIST_FOREACH(cur, &nmmgr_handlers, list_ent) { - if(!strcasecmp(cur->pathname, fn, strlen(cur->pathname))) + if(!strncasecmp(cur->pathname, fn, strlen(cur->pathname))) break; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-07 05:48: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 3294e0a069edd98423b74d071a4d5a4dc5f7e369 (commit) from 74537233a9cef5befab18beb9c0a723dbc1039ef (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 3294e0a069edd98423b74d071a4d5a4dc5f7e369 Author: Lawrence Sebald <ljs...@us...> Date: Fri Jun 7 01:47:47 2013 -0400 asm -> __asm__ ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/biosfont.c | 28 +++++++-------- kernel/arch/dreamcast/hardware/scif-spi.c | 2 +- kernel/arch/dreamcast/hardware/scif.c | 4 +- kernel/arch/dreamcast/hardware/sq.c | 16 ++++----- kernel/arch/dreamcast/include/arch/spinlock.h | 10 +++-- kernel/arch/dreamcast/include/dc/fmath_base.h | 46 ++++++++++++------------ kernel/arch/dreamcast/kernel/gdb_stub.c | 2 +- kernel/arch/dreamcast/kernel/irq.c | 43 ++++++++++------------- kernel/arch/dreamcast/kernel/mmu.c | 20 +++++----- 9 files changed, 81 insertions(+), 90 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/biosfont.c b/kernel/arch/dreamcast/hardware/biosfont.c index a377c6b..c6a2b61 100644 --- a/kernel/arch/dreamcast/hardware/biosfont.c +++ b/kernel/arch/dreamcast/hardware/biosfont.c @@ -2,8 +2,8 @@ biosfont.c - (c)2000-2002 Dan Potter - Japanese code (c) Kazuaki Matsumoto + Copyright (C) 2000-2002 Dan Potter + Japanese code Copyright (C) Kazuaki Matsumoto */ #include <assert.h> @@ -67,19 +67,17 @@ int bfont_set_32bit_mode(int on) { /* A little assembly that grabs the font address */ extern uint8* get_font_address(); -asm( - " .text\n" - " .align 2\n" - "_get_font_address:\n" - " mov.l syscall_b4,r0\n" - " mov.l @r0,r0\n" - " jmp @r0\n" - " mov #0,r1\n" - "\n" - " .align 4\n" - "syscall_b4:\n" - " .long 0x8c0000b4\n" -); +__asm__(" .text\n" + " .align 2\n" + "_get_font_address:\n" + " mov.l syscall_b4,r0\n" + " mov.l @r0,r0\n" + " jmp @r0\n" + " mov #0,r1\n" + "\n" + " .align 4\n" + "syscall_b4:\n" + " .long 0x8c0000b4\n"); /* Shift-JIS -> JIS conversion */ diff --git a/kernel/arch/dreamcast/hardware/scif-spi.c b/kernel/arch/dreamcast/hardware/scif-spi.c index 6c86534..68bc451 100644 --- a/kernel/arch/dreamcast/hardware/scif-spi.c +++ b/kernel/arch/dreamcast/hardware/scif-spi.c @@ -33,7 +33,7 @@ /* This doesn't seem to actually be necessary on any of the SD cards I've tried, but I'm keeping it around, just in case... */ -#define SD_WAIT() asm("nop\n\tnop\n\tnop\n\tnop\n\tnop") +#define SD_WAIT() __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop") static uint16 scsptr2 = 0; diff --git a/kernel/arch/dreamcast/hardware/scif.c b/kernel/arch/dreamcast/hardware/scif.c index 976e1f9..9df880e 100644 --- a/kernel/arch/dreamcast/hardware/scif.c +++ b/kernel/arch/dreamcast/hardware/scif.c @@ -240,7 +240,7 @@ int scif_init() { /* Wait a bit for it to stabilize */ for(i = 0; i < 800000; i++) - asm("nop"); + __asm__("nop"); /* Unreset, enable hardware flow control, triggers on 8 bytes */ SCFCR2 = 0x48; @@ -259,7 +259,7 @@ int scif_init() { /* Wait a bit for it to stabilize */ for(i = 0; i < 800000; i++) - asm("nop"); + __asm__("nop"); return 0; } diff --git a/kernel/arch/dreamcast/hardware/sq.c b/kernel/arch/dreamcast/hardware/sq.c index 1e825bf..d0ef22e 100644 --- a/kernel/arch/dreamcast/hardware/sq.c +++ b/kernel/arch/dreamcast/hardware/sq.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## kernel/arch/dreamcast/hardware/sq.c - (c)2001 Andrew Kieschnick + Copyright (C) 2001 Andrew Kieschnick */ #include <dc/sq.h> @@ -29,7 +29,7 @@ void sq_clr(void *dest, int n) { n >>= 5; while(n--) { - asm("pref @%0" : : "r"(d)); + __asm__("pref @%0" : : "r"(d)); d += 8; } @@ -52,7 +52,7 @@ void * sq_cpy(void *dest, void *src, int n) { n >>= 5; while(n--) { - asm("pref @%0" : : "r"(s + 8)); /* prefetch 32 bytes for next loop */ + __asm__("pref @%0" : : "r"(s + 8)); /* prefetch 32 bytes for next loop */ d[0] = *(s++); d[1] = *(s++); d[2] = *(s++); @@ -61,7 +61,7 @@ void * sq_cpy(void *dest, void *src, int n) { d[5] = *(s++); d[6] = *(s++); d[7] = *(s++); - asm("pref @%0" : : "r"(d)); + __asm__("pref @%0" : : "r"(d)); d += 8; } @@ -93,7 +93,7 @@ void * sq_set(void *s, uint32 c, int n) { n >>= 5; while(n--) { - asm("pref @%0" : : "r"(d)); + __asm__("pref @%0" : : "r"(d)); d += 8; } @@ -125,7 +125,7 @@ void * sq_set16(void *s, uint32 c, int n) { n >>= 5; while(n--) { - asm("pref @%0" : : "r"(d)); + __asm__("pref @%0" : : "r"(d)); d += 8; } @@ -153,7 +153,7 @@ void * sq_set32(void *s, uint32 c, int n) { n >>= 5; while(n--) { - asm("pref @%0" : : "r"(d)); + __asm__("pref @%0" : : "r"(d)); d += 8; } @@ -163,5 +163,3 @@ void * sq_set32(void *s, uint32 c, int n) { return s; } - - diff --git a/kernel/arch/dreamcast/include/arch/spinlock.h b/kernel/arch/dreamcast/include/arch/spinlock.h index ed8c7d7..a8c4e03 100644 --- a/kernel/arch/dreamcast/include/arch/spinlock.h +++ b/kernel/arch/dreamcast/include/arch/spinlock.h @@ -1,7 +1,7 @@ /* KallistiOS ##version## arch/dreamcast/include/spinlock.h - (c)2001 Dan Potter + Copyright (C) 2001 Dan Potter */ @@ -65,9 +65,11 @@ typedef volatile int spinlock_t; spinlock_t * __lock = A; \ int __gotlock = 0; \ while(1) { \ - asm volatile ("tas.b @%1\n\t" \ - "movt %0\n\t" \ - : "=r" (__gotlock) : "r" (__lock) : "t", "memory"); \ + __asm__ __volatile__("tas.b @%1\n\t" \ + "movt %0\n\t" \ + : "=r" (__gotlock) \ + : "r" (__lock) \ + : "t", "memory"); \ if (!__gotlock) \ thd_pass(); \ else break; \ diff --git a/kernel/arch/dreamcast/include/dc/fmath_base.h b/kernel/arch/dreamcast/include/dc/fmath_base.h index fae5224..613f9f3 100644 --- a/kernel/arch/dreamcast/include/dc/fmath_base.h +++ b/kernel/arch/dreamcast/include/dc/fmath_base.h @@ -23,10 +23,10 @@ __BEGIN_DECLS /** \cond */ #define __fsin(x) \ ({ float __value, __arg = (x), __scale = 10430.37835; \ - asm( "fmul %2,%1\n\t" \ - "ftrc %1,fpul\n\t" \ - "fsca fpul,dr0\n\t" \ - "fmov fr0,%0" \ + __asm__("fmul %2,%1\n\t" \ + "ftrc %1,fpul\n\t" \ + "fsca fpul,dr0\n\t" \ + "fmov fr0,%0" \ : "=f" (__value), "+&f" (__scale) \ : "f" (__arg) \ : "fpul", "fr0", "fr1"); \ @@ -34,10 +34,10 @@ __BEGIN_DECLS #define __fcos(x) \ ({ float __value, __arg = (x), __scale = 10430.37835; \ - asm( "fmul %2,%1\n\t" \ - "ftrc %1,fpul\n\t" \ - "fsca fpul,dr0\n\t" \ - "fmov fr1,%0" \ + __asm__("fmul %2,%1\n\t" \ + "ftrc %1,fpul\n\t" \ + "fsca fpul,dr0\n\t" \ + "fmov fr1,%0" \ : "=f" (__value), "+&f" (__scale) \ : "f" (__arg) \ : "fpul", "fr0", "fr1"); \ @@ -45,11 +45,11 @@ __BEGIN_DECLS #define __ftan(x) \ ({ float __value, __arg = (x), __scale = 10430.37835; \ - asm( "fmul %2,%1\n\t" \ - "ftrc %1,fpul\n\t" \ - "fsca fpul,dr0\n\t" \ + __asm__("fmul %2,%1\n\t" \ + "ftrc %1,fpul\n\t" \ + "fsca fpul,dr0\n\t" \ "fdiv fr1, fr0\n\t" \ - "fmov fr0,%0" \ + "fmov fr0,%0" \ : "=f" (__value), "+&f" (__scale) \ : "f" (__arg) \ : "fpul", "fr0", "fr1"); \ @@ -58,9 +58,9 @@ __BEGIN_DECLS #define __fisin(x) \ ({ float __value, __arg = (x); \ - asm( "lds %1,fpul\n\t" \ - "fsca fpul,dr0\n\t" \ - "fmov fr0,%0" \ + __asm__("lds %1,fpul\n\t" \ + "fsca fpul,dr0\n\t" \ + "fmov fr0,%0" \ : "=f" (__value) \ : "r" (__arg) \ : "fpul", "fr0", "fr1"); \ @@ -68,9 +68,9 @@ __BEGIN_DECLS #define __ficos(x) \ ({ float __value, __arg = (x); \ - asm( "lds %1,fpul\n\t" \ - "fsca fpul,dr0\n\t" \ - "fmov fr1,%0" \ + __asm__("lds %1,fpul\n\t" \ + "fsca fpul,dr0\n\t" \ + "fmov fr1,%0" \ : "=f" (__value) \ : "r" (__arg) \ : "fpul", "fr0", "fr1"); \ @@ -78,10 +78,10 @@ __BEGIN_DECLS #define __fitan(x) \ ({ float __value, __arg = (x); \ - asm( "lds %1,fpul\n\t" \ - "fsca fpul,dr0\n\t" \ + __asm__("lds %1,fpul\n\t" \ + "fsca fpul,dr0\n\t" \ "fdiv fr1, fr0\n\t" \ - "fmov fr0,%0" \ + "fmov fr0,%0" \ : "=f" (__value) \ : "r" (__arg) \ : "fpul", "fr0", "fr1"); \ @@ -90,13 +90,13 @@ __BEGIN_DECLS #define __fsqrt(x) \ ({ float __arg = (x); \ - asm( "fsqrt %0\n\t" \ + __asm__("fsqrt %0\n\t" \ : "=f" (__arg) : "0" (__arg)); \ __arg; }) #define __frsqrt(x) \ ({ float __arg = (x); \ - asm( "fsrra %0\n\t" \ + __asm__("fsrra %0\n\t" \ : "=f" (__arg) : "0" (__arg)); \ __arg; }) diff --git a/kernel/arch/dreamcast/kernel/gdb_stub.c b/kernel/arch/dreamcast/kernel/gdb_stub.c index 45247e8..70a00c2 100644 --- a/kernel/arch/dreamcast/kernel/gdb_stub.c +++ b/kernel/arch/dreamcast/kernel/gdb_stub.c @@ -293,7 +293,7 @@ static char lowhex(int x) { * Assembly macros */ -#define BREAKPOINT() asm("trapa #0xff"::); +#define BREAKPOINT() __asm__("trapa #0xff"::); /* diff --git a/kernel/arch/dreamcast/kernel/irq.c b/kernel/arch/dreamcast/kernel/irq.c index 82578e2..d683202 100644 --- a/kernel/arch/dreamcast/kernel/irq.c +++ b/kernel/arch/dreamcast/kernel/irq.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## arch/dreamcast/kernel/irq.c - (c)2000-2001 Dan Potter + Copyright (C) 2000-2001 Dan Potter */ /* This module contains low-level handling for IRQs and related exceptions. */ @@ -282,10 +282,10 @@ static int initted = 0; /* Init routine */ int irq_init() { /* Save SR and VBR */ - asm("stc sr,r0\n" - "mov.l r0,%0" : : "m"(pre_sr)); - asm("stc vbr,r0\n" - "mov.l r0,%0" : : "m"(pre_vbr)); + __asm__("stc sr,r0\n" + "mov.l r0,%0" : : "m"(pre_sr)); + __asm__("stc vbr,r0\n" + "mov.l r0,%0" : : "m"(pre_vbr)); /* Make sure interrupts are disabled */ irq_disable(); @@ -313,35 +313,28 @@ int irq_init() { /* Set VBR to our exception table above, but don't enable exceptions and IRQs yet. */ - asm(" ! Set VBR\n" - " mov.l _vbr_addr,r0\n" - " ldc r0,vbr\n" - " bra _after_vbr\n" - " nop\n" - " .align 2\n" - "_vbr_addr:\n" - " .long _irq_vma_table\n" - "_after_vbr:\n"); + __asm__(" ! Set VBR\n" + " mov.l _vbr_addr,r0\n" + " ldc r0,vbr\n" + " bra _after_vbr\n" + " nop\n" + " .align 2\n" + "_vbr_addr:\n" + " .long _irq_vma_table\n" + "_after_vbr:\n"); initted = 1; return 0; } - void irq_shutdown() { if(!initted) return; /* Restore SR and VBR */ - asm("mov.l %0,r0\n" - "ldc r0,sr" : : "m"(pre_sr)); - asm("mov.l %0,r0\n" - "ldc r0,vbr" : : "m"(pre_vbr)); - + __asm__("mov.l %0,r0\n" + "ldc r0,sr" : : "m"(pre_sr)); + __asm__("mov.l %0,r0\n" + "ldc r0,vbr" : : "m"(pre_vbr)); } - - - - - diff --git a/kernel/arch/dreamcast/kernel/mmu.c b/kernel/arch/dreamcast/kernel/mmu.c index ea16079..d9835b3 100644 --- a/kernel/arch/dreamcast/kernel/mmu.c +++ b/kernel/arch/dreamcast/kernel/mmu.c @@ -94,22 +94,22 @@ static inline void mmu_ldtlb(int asid, uint32 virt, uint32 phys, int sz, int pr, int sh, int wt) { SET_PTEH(virt, asid); SET_PTEL(phys, 1, sz, pr, c, d, sh, wt); - asm("ldtlb"); + __asm__("ldtlb"); } static inline void mmu_ldtlb_quick(uint32 ptehv, uint32 ptelv) { *pteh = ptehv; *ptel = ptelv; - asm("ldtlb"); + __asm__("ldtlb"); } static inline void mmu_ldtlb_wait() { - asm("nop"); - asm("nop"); - asm("nop"); - asm("nop"); - asm("nop"); - asm("nop"); - asm("nop"); - asm("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); + __asm__("nop"); } /* Defined in mmuitlb.s */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-07 05:43: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 74537233a9cef5befab18beb9c0a723dbc1039ef (commit) from efa97a42bbeaddb58b975d1ac67c28a42004d929 (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 74537233a9cef5befab18beb9c0a723dbc1039ef Author: Lawrence Sebald <ljs...@us...> Date: Fri Jun 7 01:43:03 2013 -0400 strnicmp -> strcasecmp. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/fs/fs_iso9660.c | 2 +- kernel/exports/nmmgr.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/arch/dreamcast/fs/fs_iso9660.c b/kernel/arch/dreamcast/fs/fs_iso9660.c index c1690c1..26b98e1 100644 --- a/kernel/arch/dreamcast/fs/fs_iso9660.c +++ b/kernel/arch/dreamcast/fs/fs_iso9660.c @@ -496,7 +496,7 @@ static iso_dirent_t *find_object(const char *fn, int dir, else fnlen = strlen(fn); - if(!strnicmp(rrname, fn, fnlen) && ! *(rrname + fnlen)) { + if(!strcasecmp(rrname, fn, fnlen) && ! *(rrname + fnlen)) { if(!((dir << 1) ^ de->flags)) return de; } diff --git a/kernel/exports/nmmgr.c b/kernel/exports/nmmgr.c index 8cfc950..6f229e2 100644 --- a/kernel/exports/nmmgr.c +++ b/kernel/exports/nmmgr.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## nmmgr.c - Copyright (C)2003 Dan Potter + Copyright (C) 2003 Dan Potter */ @@ -35,7 +35,7 @@ nmmgr_handler_t * nmmgr_lookup(const char *fn) { /* Scan the handler table and look for a path match */ LIST_FOREACH(cur, &nmmgr_handlers, list_ent) { - if(!strnicmp(cur->pathname, fn, strlen(cur->pathname))) + if(!strcasecmp(cur->pathname, fn, strlen(cur->pathname))) break; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-07 04:59: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 efa97a42bbeaddb58b975d1ac67c28a42004d929 (commit) from 09fa80dfbd971a96127cb34827b87c8321e993c6 (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 efa97a42bbeaddb58b975d1ac67c28a42004d929 Author: Lawrence Sebald <ljs...@us...> Date: Fri Jun 7 00:58:21 2013 -0400 Begone pointless unsigned comparisons against 0 (namely >= 0 and < 0 tests). ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/fs/fs_iso9660.c | 33 +++++++++--- kernel/arch/dreamcast/hardware/pvr/pvr_scene.c | 8 ++-- kernel/arch/dreamcast/sound/snd_mem.c | 4 +- kernel/fs/fs_ramdisk.c | 65 ++++++++++++++++------- kernel/fs/fs_romdisk.c | 30 ++++++++--- 5 files changed, 99 insertions(+), 41 deletions(-) diff --git a/kernel/arch/dreamcast/fs/fs_iso9660.c b/kernel/arch/dreamcast/fs/fs_iso9660.c index b808628..c1690c1 100644 --- a/kernel/arch/dreamcast/fs/fs_iso9660.c +++ b/kernel/arch/dreamcast/fs/fs_iso9660.c @@ -4,7 +4,7 @@ Copyright (C) 2000, 2001, 2003 Dan Potter Copyright (C) 2001 Andrew Kieschnick Copyright (C) 2002 Bero - Copyright (C) 2012 Lawrence Sebald + Copyright (C) 2012, 2013 Lawrence Sebald */ @@ -195,7 +195,7 @@ static uint32 iso_733(const uint8 *from) { this cache. As the cache fills up, sectors are removed from the end of it. */ typedef struct { - int32 sector; /* CD sector */ + uint32 sector; /* CD sector */ uint8 data[2048]; /* Sector data */ } cache_block_t; @@ -214,7 +214,7 @@ static void bclear_cache(cache_block_t **cache) { mutex_lock(&cache_mutex); for(i = 0; i < NUM_CACHE_BLOCKS; i++) - cache[i]->sector = -1; + cache[i]->sector = (uint32)-1; mutex_unlock(&cache_mutex); } @@ -257,7 +257,7 @@ static int bread_cache(cache_block_t **cache, uint32 sector) { /* If not, look for an open cache slot; if we find one, use it */ for(i = 0; i < NUM_CACHE_BLOCKS; i++) { - if(cache[i]->sector == -1) break; + if(cache[i]->sector == (uint32)-1) break; } /* If we didn't find one, kick an LRU block out of cache */ @@ -725,27 +725,46 @@ static off_t iso_seek(void * h, off_t offset, int whence) { file_t fd = (file_t)h; /* Check that the fd is valid */ - if(fd >= MAX_ISO_FILES || fh[fd].first_extent == 0 || fh[fd].broken) + if(fd >= MAX_ISO_FILES || fh[fd].first_extent == 0 || fh[fd].broken) { + errno = EBADF; return -1; + } /* Update current position according to arguments */ switch(whence) { case SEEK_SET: + if(offset < 0) { + errno = EINVAL; + return -1; + } + fh[fd].ptr = offset; break; + case SEEK_CUR: + if(offset < 0 && ((uint32)-offset) > fh[fd].ptr) { + errno = EINVAL; + return -1; + } + fh[fd].ptr += offset; break; + case SEEK_END: + if(offset < 0 && ((uint32)-offset) > fh[fd].size) { + errno = EINVAL; + return -1; + } + fh[fd].ptr = fh[fd].size + offset; break; + default: + errno = EINVAL; return -1; } /* Check bounds */ - if(fh[fd].ptr < 0) fh[fd].ptr = 0; - if(fh[fd].ptr > fh[fd].size) fh[fd].ptr = fh[fd].size; return fh[fd].ptr; diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_scene.c b/kernel/arch/dreamcast/hardware/pvr/pvr_scene.c index f560bcf..c649967 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_scene.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_scene.c @@ -30,7 +30,7 @@ void * pvr_set_vertbuf(pvr_list_t list, void * buffer, int len) { assert(pvr_state.dma_mode); // Make sure it's a valid list. - assert(list >= 0 && list < PVR_OPB_COUNT); + assert(list < PVR_OPB_COUNT); // Make sure it's an _enabled_ list. assert(pvr_state.lists_enabled & (1 << list)); @@ -59,7 +59,7 @@ void * pvr_vertbuf_tail(pvr_list_t list) { uint8 * bufbase; // Check the validity of the request. - assert(list >= 0 && list < PVR_OPB_COUNT); + assert(list < PVR_OPB_COUNT); assert(pvr_state.dma_mode); // Get the buffer base. @@ -74,7 +74,7 @@ void pvr_vertbuf_written(pvr_list_t list, uint32 amt) { uint32 val; // Check the validity of the request. - assert(list >= 0 && list < PVR_OPB_COUNT); + assert(list < PVR_OPB_COUNT); assert(pvr_state.dma_mode); // Change the current end of the buffer. @@ -149,7 +149,7 @@ int pvr_list_begin(pvr_list_t list) { #endif /* !NDEBUG */ /* If we already had a list open, close it first */ - if(pvr_state.list_reg_open != -1 && pvr_state.list_reg_open != list) + if(pvr_state.list_reg_open != -1 && pvr_state.list_reg_open != (int)list) pvr_list_finish(); /* Ok, set the flag */ diff --git a/kernel/arch/dreamcast/sound/snd_mem.c b/kernel/arch/dreamcast/sound/snd_mem.c index d20b653..28054ac 100644 --- a/kernel/arch/dreamcast/sound/snd_mem.c +++ b/kernel/arch/dreamcast/sound/snd_mem.c @@ -117,12 +117,10 @@ void snd_mem_shutdown() { /* Allocate a chunk of SPU RAM; we will return an offset into SPU RAM. */ uint32 snd_mem_malloc(size_t size) { snd_block_t *e, *best = NULL; - int best_size = 4 * 1024 * 1024; + size_t best_size = 4 * 1024 * 1024; assert_msg(initted, "Use of snd_mem_malloc before snd_mem_init"); - assert(size >= 0); - if(size == 0) return 0; diff --git a/kernel/fs/fs_ramdisk.c b/kernel/fs/fs_ramdisk.c index fe260e1..043f341 100644 --- a/kernel/fs/fs_ramdisk.c +++ b/kernel/fs/fs_ramdisk.c @@ -1,8 +1,8 @@ /* KallistiOS ##version## fs_ramdisk.c - Copyright (C) 2002,2003 Dan Potter - Copyright (C) 2012 Lawrence Sebald + Copyright (C) 2002, 2003 Dan Potter + Copyright (C) 2012, 2013 Lawrence Sebald */ @@ -432,30 +432,55 @@ static off_t ramdisk_seek(void * h, off_t offset, int whence) { mutex_lock(&rd_mutex); /* Check that the fd is valid */ - if(fd < MAX_RAM_FILES && fh[fd].file != NULL && !fh[fd].dir) { - /* Update current position according to arguments */ - switch(whence) { - case SEEK_SET: - fh[fd].ptr = offset; - break; - case SEEK_CUR: - fh[fd].ptr += offset; - break; - case SEEK_END: - fh[fd].ptr = fh[fd].file->size + offset; - break; - default: + if(fd >= MAX_RAM_FILES || !fh[fd].file || fh[fd].dir) { + errno = EBADF; + mutex_unlock(&rd_mutex); + return -1; + } + + /* Update current position according to arguments */ + switch(whence) { + case SEEK_SET: + if(offset < 0) { + errno = EINVAL; + mutex_unlock(&rd_mutex); return -1; - } + } - /* Check bounds */ - if(fh[fd].ptr < 0) fh[fd].ptr = 0; + fh[fd].ptr = offset; + break; - if(fh[fd].ptr > fh[fd].file->size) fh[fd].ptr = fh[fd].file->size; + case SEEK_CUR: + if(offset < 0 && ((uint32)-offset) > fh[fd].ptr) { + errno = EINVAL; + mutex_unlock(&rd_mutex); + return -1; + } - rv = fh[fd].ptr; + fh[fd].ptr += offset; + break; + + case SEEK_END: + if(offset < 0 && ((uint32)-offset) > fh[fd].file->size) { + errno = EINVAL; + mutex_unlock(&rd_mutex); + return -1; + } + + fh[fd].ptr = fh[fd].file->size + offset; + break; + + default: + errno = EINVAL; + mutex_unlock(&rd_mutex); + return -1; } + /* Check bounds */ + // XXXX: Technically this isn't correct. Fix it sometime. + if(fh[fd].ptr > fh[fd].file->size) fh[fd].ptr = fh[fd].file->size; + + rv = fh[fd].ptr; mutex_unlock(&rd_mutex); return rv; } diff --git a/kernel/fs/fs_romdisk.c b/kernel/fs/fs_romdisk.c index 35f2779..caef7f3 100644 --- a/kernel/fs/fs_romdisk.c +++ b/kernel/fs/fs_romdisk.c @@ -1,8 +1,8 @@ /* KallistiOS ##version## fs_romdisk.c - Copyright (C) 2001,2002,2003 Dan Potter - Copyright (C) 2012 Lawrence Sebald + Copyright (C) 2001, 2002, 2003 Dan Potter + Copyright (C) 2012, 2013 Lawrence Sebald */ @@ -95,7 +95,7 @@ static mutex_t fh_mutex; /* Given a filename and a starting romdisk directory listing (byte offset), search for the entry in the directory and return the byte offset to its entry. */ -static uint32 romdisk_find_object(rd_image_t * mnt, const char *fn, int fnlen, int dir, uint32 offset) { +static uint32 romdisk_find_object(rd_image_t * mnt, const char *fn, size_t fnlen, int dir, uint32 offset) { uint32 i, ni, type; const romdisk_file_t *fhdr; @@ -132,7 +132,6 @@ static uint32 romdisk_find_object(rd_image_t * mnt, const char *fn, int fnlen, i /* Check filename */ if((strlen(fhdr->filename) == fnlen) && (!strncasecmp(fhdr->filename, fn, fnlen))) { - /* Match: return this index */ return i; } @@ -279,28 +278,45 @@ static off_t romdisk_seek(void * h, off_t offset, int whence) { /* Check that the fd is valid */ if(fd >= MAX_RD_FILES || fh[fd].index == 0 || fh[fd].dir) { - errno = EINVAL; + errno = EBADF; return -1; } /* Update current position according to arguments */ switch(whence) { case SEEK_SET: + if(offset < 0) { + errno = EINVAL; + return -1; + } + fh[fd].ptr = offset; break; + case SEEK_CUR: + if(offset < 0 && ((uint32)-offset) > fh[fd].ptr) { + errno = EINVAL; + return -1; + } + fh[fd].ptr += offset; break; + case SEEK_END: + if(offset < 0 && ((uint32)-offset) > fh[fd].size) { + errno = EINVAL; + return -1; + } + fh[fd].ptr = fh[fd].size + offset; break; + default: + errno = EINVAL; return -1; } /* Check bounds */ - if(fh[fd].ptr < 0) fh[fd].ptr = 0; - if(fh[fd].ptr > fh[fd].size) fh[fd].ptr = fh[fd].size; return fh[fd].ptr; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-07 04:08:56
|
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 09fa80dfbd971a96127cb34827b87c8321e993c6 (commit) from 95249813354746d78f1920cf6b2b68867b9dadb5 (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 09fa80dfbd971a96127cb34827b87c8321e993c6 Author: Lawrence Sebald <ljs...@us...> Date: Fri Jun 7 00:08:31 2013 -0400 Get rid of all warnings about initializers that appear with -Wextra. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/modem/modem.c | 6 ++++-- kernel/arch/dreamcast/sound/snd_stream.c | 2 +- kernel/net/net_ipv6.c | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/modem/modem.c b/kernel/arch/dreamcast/hardware/modem/modem.c index 21966c7..fd93f1b 100644 --- a/kernel/arch/dreamcast/hardware/modem/modem.c +++ b/kernel/arch/dreamcast/hardware/modem/modem.c @@ -21,11 +21,13 @@ void modemSoftReset(void); void modemConfigurationReset(void); /* Configures the modem. It's assumed that the modem has already been reset. */ -MODEM_CFG modemCfg = { 0, 0, +MODEM_CFG modemCfg = { + 0, 0, { 0, 0, 0 }, NULL, { 0, MODEM_STATE_NULL, 0 }, - { 0, 0 } + { 0, 0 }, + { 0, 0, 0, 0, 0, 0 } }; /* Internal flags shared to keep track of parts of the driver's state */ diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index a2f86ed..8b2f2ca 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -80,7 +80,7 @@ typedef struct strchan { } strchan_t; // Our stream structs -static strchan_t streams[SND_STREAM_MAX] = { { { 0 } } }; +static strchan_t streams[SND_STREAM_MAX]; // Separation buffers (for stereo) int16 * sep_buffer[2] = { NULL, NULL }; diff --git a/kernel/net/net_ipv6.c b/kernel/net/net_ipv6.c index a404263..a8cd89b 100644 --- a/kernel/net/net_ipv6.c +++ b/kernel/net/net_ipv6.c @@ -239,7 +239,7 @@ net_ipv6_stats_t net_ipv6_get_stats() { uint16 net_ipv6_checksum_pseudo(const struct in6_addr *src, const struct in6_addr *dst, uint32 upper_len, uint8 next_hdr) { - ipv6_pseudo_hdr_t ps = {{{{ 0 }}}}; + ipv6_pseudo_hdr_t ps; /* Since the src and dst addresses aren't necessarily aligned when we send them in from header processing, do this the hard way. */ @@ -256,6 +256,7 @@ uint16 net_ipv6_checksum_pseudo(const struct in6_addr *src, ps.upper_layer_len = htonl(upper_len); ps.next_header = next_hdr; + ps.zero[0] = ps.zero[1] = ps.zero[2] = 0; return ~net_ipv4_checksum((uint8 *)&ps, sizeof(ipv6_pseudo_hdr_t), 0); } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-07 02:11: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 95249813354746d78f1920cf6b2b68867b9dadb5 (commit) from d9c299e747991c7ba85a6c5811ac4b226b481eb0 (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 95249813354746d78f1920cf6b2b68867b9dadb5 Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 6 22:10:38 2013 -0400 Did someone ask for all warnings with -Wunused-parameters to be cleaned up? No? Oh well, I did it anyway. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/fs/fs_dcload.c | 29 +++++++++++- kernel/arch/dreamcast/fs/fs_dclsocket.c | 19 +++++++- kernel/arch/dreamcast/fs/fs_iso9660.c | 18 +++++++- kernel/arch/dreamcast/fs/fs_vmu.c | 16 ++++++- kernel/arch/dreamcast/hardware/asic.c | 3 + kernel/arch/dreamcast/hardware/flashrom.c | 8 ++- kernel/arch/dreamcast/hardware/maple/dreameye.c | 2 + kernel/arch/dreamcast/hardware/maple/keyboard.c | 2 + kernel/arch/dreamcast/hardware/maple/maple_irq.c | 6 ++- kernel/arch/dreamcast/hardware/maple/purupuru.c | 2 + kernel/arch/dreamcast/hardware/maple/sip.c | 3 + kernel/arch/dreamcast/hardware/maple/vmu.c | 1 + kernel/arch/dreamcast/hardware/modem/mintr.c | 7 +++ .../dreamcast/hardware/network/broadband_adapter.c | 26 ++++++++++- .../arch/dreamcast/hardware/network/lan_adapter.c | 8 +++ kernel/arch/dreamcast/hardware/pvr/pvr_dma.c | 2 + kernel/arch/dreamcast/hardware/pvr/pvr_fog.c | 4 ++ kernel/arch/dreamcast/hardware/pvr/pvr_irq.c | 2 + kernel/arch/dreamcast/hardware/pvr/pvr_scene.c | 4 ++ kernel/arch/dreamcast/hardware/scif.c | 6 ++ kernel/arch/dreamcast/hardware/sd.c | 2 + kernel/arch/dreamcast/kernel/gdb_stub.c | 2 + kernel/arch/dreamcast/kernel/irq.c | 8 +++- kernel/arch/dreamcast/kernel/mmu.c | 4 ++ kernel/arch/dreamcast/kernel/timer.c | 4 ++ kernel/arch/dreamcast/util/fb_console.c | 5 ++ kernel/debug/dbgio.c | 9 +++- kernel/fs/elf.c | 2 + kernel/fs/fs_pty.c | 19 +++++++- kernel/fs/fs_ramdisk.c | 16 ++++++- kernel/fs/fs_romdisk.c | 12 ++++- kernel/fs/fs_socket.c | 11 ++++- kernel/libc/koslib/malloc.c | 10 ++++ kernel/libc/koslib/mkdir.c | 1 + kernel/libc/newlib/lock_common.c | 4 ++ kernel/libc/newlib/newlib_close.c | 1 + kernel/libc/newlib/newlib_env_lock.c | 2 + kernel/libc/newlib/newlib_fcntl.c | 1 + kernel/libc/newlib/newlib_fstat.c | 2 + kernel/libc/newlib/newlib_getpid.c | 1 + kernel/libc/newlib/newlib_gettimeofday.c | 3 + kernel/libc/newlib/newlib_isatty.c | 2 + kernel/libc/newlib/newlib_kill.c | 2 + kernel/libc/newlib/newlib_link.c | 1 + kernel/libc/newlib/newlib_lseek.c | 1 + kernel/libc/newlib/newlib_malloc.c | 4 ++ kernel/libc/newlib/newlib_open.c | 2 + kernel/libc/newlib/newlib_read.c | 1 + kernel/libc/newlib/newlib_sbrk.c | 1 + kernel/libc/newlib/newlib_stat.c | 2 + kernel/libc/newlib/newlib_times.c | 2 + kernel/libc/newlib/newlib_unlink.c | 1 + kernel/libc/newlib/newlib_wait.c | 1 + kernel/libc/newlib/newlib_write.c | 1 + kernel/libc/pthreads/pthread_cond.c | 7 +++ kernel/libc/pthreads/pthread_mutex.c | 20 ++++++++ kernel/libc/pthreads/pthread_thd.c | 2 + kernel/libc/pthreads/pthread_thd_attr.c | 49 +++++++++++++++++++- kernel/libc/pthreads/pthread_tls.c | 7 ++- kernel/net/net_arp.c | 7 ++- kernel/net/net_dhcp.c | 3 + kernel/net/net_icmp.c | 5 ++ kernel/net/net_icmp6.c | 17 +++++++ kernel/net/net_ipv4_frag.c | 2 + kernel/net/net_tcp.c | 13 +++++- kernel/net/net_udp.c | 16 ++++++ kernel/thread/thread.c | 6 ++ 67 files changed, 438 insertions(+), 24 deletions(-) diff --git a/kernel/arch/dreamcast/fs/fs_dcload.c b/kernel/arch/dreamcast/fs/fs_dcload.c index e853549..a62249e 100644 --- a/kernel/arch/dreamcast/fs/fs_dcload.c +++ b/kernel/arch/dreamcast/fs/fs_dcload.c @@ -61,6 +61,8 @@ static void * lwip_dclsc = 0; /* Printk replacement */ int dcload_write_buffer(const uint8 *data, int len, int xlat) { + (void)xlat; + if(lwip_dclsc && irq_inside_int()) { errno = EAGAIN; return -1; @@ -99,6 +101,8 @@ void *dcload_open(vfs_handler_t * vfs, const char *fn, int mode) { uint32 h; int dcload_mode = 0; + (void)vfs; + if(lwip_dclsc && irq_inside_int()) return (void *)0; @@ -319,6 +323,8 @@ dirent_t *dcload_readdir(void * h) { int dcload_rename(vfs_handler_t * vfs, const char *fn1, const char *fn2) { int ret; + (void)vfs; + if(lwip_dclsc && irq_inside_int()) return 0; @@ -338,6 +344,8 @@ int dcload_rename(vfs_handler_t * vfs, const char *fn1, const char *fn2) { int dcload_unlink(vfs_handler_t * vfs, const char *fn) { int ret; + (void)vfs; + if(lwip_dclsc && irq_inside_int()) return 0; @@ -352,6 +360,9 @@ int dcload_unlink(vfs_handler_t * vfs, const char *fn) { static int dcload_fcntl(void *h, int cmd, va_list ap) { int rv = -1; + (void)h; + (void)ap; + switch(cmd) { case F_GETFL: /* XXXX: Not the right thing to do... */ @@ -401,7 +412,13 @@ static vfs_handler_t vh = { NULL, /* stat */ NULL, /* mkdir */ NULL, /* rmdir */ - dcload_fcntl + dcload_fcntl, + NULL, /* poll */ + NULL, /* link */ + NULL, /* symlink */ + NULL, /* seek64 */ + NULL, /* tell64 */ + NULL /* total64 */ }; // We have to provide a minimal interface in case dcload usage is @@ -411,7 +428,15 @@ static int never_detected() { } dbgio_handler_t dbgio_dcload = { "fs_dcload_uninit", - never_detected + never_detected, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL }; int fs_dcload_detected() { diff --git a/kernel/arch/dreamcast/fs/fs_dclsocket.c b/kernel/arch/dreamcast/fs/fs_dclsocket.c index edac0a0..1f6ce04 100644 --- a/kernel/arch/dreamcast/fs/fs_dclsocket.c +++ b/kernel/arch/dreamcast/fs/fs_dclsocket.c @@ -210,6 +210,8 @@ static void *dcls_open(struct vfs_handler *vfs, const char *fn, int mode) { int dcload_mode = 0; command_t *cmd = (command_t *)pktbuf; + (void)vfs; + locked = mutex_trylock(&mutex); if(locked == -1 && irq_inside_int()) { @@ -502,6 +504,8 @@ static dirent_t *dcls_readdir(void *hnd) { static int dcls_rename(vfs_handler_t *vfs, const char *fn1, const char *fn2) { int len1 = strlen(fn1), len2 = strlen(fn2), locked; + (void)vfs; + locked = mutex_trylock(&mutex); if(locked == -1 && irq_inside_int()) { @@ -537,6 +541,8 @@ static int dcls_rename(vfs_handler_t *vfs, const char *fn1, const char *fn2) { static int dcls_unlink(vfs_handler_t *vfs, const char *fn) { int len = strlen(fn) + 5, locked; + (void)vfs; + locked = mutex_trylock(&mutex); if(locked == -1 && irq_inside_int()) { @@ -627,6 +633,8 @@ static int dcls_writebuf(const uint8 *buf, int len, int xlat) { int locked; command_3int_t cmd; + (void)xlat; + if(initted < 2) return -1; @@ -657,6 +665,9 @@ static int dcls_writebuf(const uint8 *buf, int len, int xlat) { static int dcls_fcntl(void *h, int cmd, va_list ap) { int rv = -1; + (void)h; + (void)ap; + switch(cmd) { case F_GETFL: /* XXXX: Not the right thing to do... */ @@ -706,7 +717,13 @@ static vfs_handler_t vh = { dcls_stat, NULL, /* mkdir */ NULL, /* rmdir */ - dcls_fcntl + dcls_fcntl, + NULL, /* poll */ + NULL, /* link */ + NULL, /* symlink */ + NULL, /* seek64 */ + NULL, /* tell64 */ + NULL /* total64 */ }; /* dbgio handler */ diff --git a/kernel/arch/dreamcast/fs/fs_iso9660.c b/kernel/arch/dreamcast/fs/fs_iso9660.c index b8f449b..b808628 100644 --- a/kernel/arch/dreamcast/fs/fs_iso9660.c +++ b/kernel/arch/dreamcast/fs/fs_iso9660.c @@ -598,6 +598,8 @@ static void * iso_open(vfs_handler_t * vfs, const char *fn, int mode) { file_t fd; iso_dirent_t *de; + (void)vfs; + /* Make sure they don't want to open things as writeable */ if((mode & O_MODE_MASK) != O_RDONLY) return 0; @@ -891,6 +893,8 @@ static int iso_vblank_hnd; static void iso_vblank(uint32 evt) { int status, disc_type; + (void)evt; + /* Get the status. This may fail if a CD operation is in progress in the foreground. */ if(cdrom_get_status(&status, &disc_type) < 0) @@ -907,6 +911,10 @@ static void iso_vblank(uint32 evt) { /* There's only one ioctl at the moment (re-initialize caches) but you should always clear data and size. */ static int iso_ioctl(void * hnd, void *data, size_t size) { + (void)hnd; + (void)data; + (void)size; + iso_reset(); return 0; @@ -916,6 +924,8 @@ static int iso_fcntl(void *h, int cmd, va_list ap) { file_t fd = (file_t)h; int rv = -1; + (void)ap; + if(fd >= MAX_ISO_FILES || !fh[fd].first_extent || fh[fd].broken) { errno = EBADF; return -1; @@ -973,7 +983,13 @@ static vfs_handler_t vh = { NULL, NULL, NULL, - iso_fcntl + iso_fcntl, + NULL, /* poll */ + NULL, /* link */ + NULL, /* symlink */ + NULL, /* seek64 */ + NULL, /* tell64 */ + NULL /* total64 */ }; /* Initialize the file system */ diff --git a/kernel/arch/dreamcast/fs/fs_vmu.c b/kernel/arch/dreamcast/fs/fs_vmu.c index 16d2258..1e425d0 100644 --- a/kernel/arch/dreamcast/fs/fs_vmu.c +++ b/kernel/arch/dreamcast/fs/fs_vmu.c @@ -238,6 +238,8 @@ static void * vmu_open(vfs_handler_t * vfs, const char *path, int mode) { maple_device_t * dev; /* maple bus address of the vmu unit */ vmu_fh_t *fh; + (void)vfs; + if(!*path || (path[0] == '/' && !path[1])) { /* /vmu should be opened */ fh = vmu_open_vmu_dir(); @@ -547,6 +549,8 @@ static dirent_t *vmu_readdir(void * fd) { static int vmu_unlink(vfs_handler_t * vfs, const char *path) { maple_device_t * dev = NULL; /* address of VMU */ + (void)vfs; + /* convert path to valid VMU address */ dev = vmu_path_to_addr(path); @@ -561,6 +565,8 @@ static int vmu_unlink(vfs_handler_t * vfs, const char *path) { static int vmu_stat(vfs_handler_t * vfs, const char * fn, stat_t * rv) { maple_device_t * dev; + (void)vfs; + if(rv == NULL) { dbglog(DBG_ERROR, "vmu_stat: null output pointer\n"); return -1; @@ -590,6 +596,8 @@ static int vmu_fcntl(void *fd, int cmd, va_list ap) { vmu_fh_t *fh; int rv = -1; + (void)ap; + /* Check the handle */ if(!vmu_verify_hnd(fd, VMU_ANY)) { errno = EBADF; @@ -650,7 +658,13 @@ static vfs_handler_t vh = { vmu_stat, /* stat */ NULL, /* mkdir */ NULL, /* rmdir */ - vmu_fcntl + vmu_fcntl, + NULL, /* poll */ + NULL, /* link */ + NULL, /* symlink */ + NULL, /* seek64 */ + NULL, /* tell64 */ + NULL /* total64 */ }; int fs_vmu_init() { diff --git a/kernel/arch/dreamcast/hardware/asic.c b/kernel/arch/dreamcast/hardware/asic.c index 780cc25..ff280c8 100644 --- a/kernel/arch/dreamcast/hardware/asic.c +++ b/kernel/arch/dreamcast/hardware/asic.c @@ -129,6 +129,9 @@ static void handler_irq9(irq_t source, irq_context_t *context) { vuint32 *asicack = (vuint32*)0xa05f6900; uint32 mask; + (void)source; + (void)context; + /* Go through each event register and look for pending events */ for(reg = 0; reg < 3; reg++) { /* Read the event mask and clear pending */ diff --git a/kernel/arch/dreamcast/hardware/flashrom.c b/kernel/arch/dreamcast/hardware/flashrom.c index a10db1b..49b4fb4 100644 --- a/kernel/arch/dreamcast/hardware/flashrom.c +++ b/kernel/arch/dreamcast/hardware/flashrom.c @@ -1,8 +1,8 @@ /* KallistiOS ##version## flashrom.c - Copyright (c)2003 Dan Potter - Copyright (C)2008 Lawrence Sebald + Copyright (c) 2003 Dan Potter + Copyright (C) 2008 Lawrence Sebald */ /* @@ -67,6 +67,9 @@ int flashrom_write(int offset, void * buffer, int bytes) { irq_restore(old); return rv; #else + (void)offset; + (void)buffer; + (void)bytes; return -1; #endif } @@ -82,6 +85,7 @@ int flashrom_delete(int offset) { irq_restore(old); return rv; #else + (void)offset; return -1; #endif } diff --git a/kernel/arch/dreamcast/hardware/maple/dreameye.c b/kernel/arch/dreamcast/hardware/maple/dreameye.c index 1e763a8..ef48079 100644 --- a/kernel/arch/dreamcast/hardware/maple/dreameye.c +++ b/kernel/arch/dreamcast/hardware/maple/dreameye.c @@ -405,6 +405,8 @@ static void dreameye_periodic(maple_driver_t *drv) { static int dreameye_attach(maple_driver_t *drv, maple_device_t *dev) { dreameye_state_t *de; + (void)drv; + de = (dreameye_state_t *)dev->status; de->image_count = 0; de->image_count_valid = 0; diff --git a/kernel/arch/dreamcast/hardware/maple/keyboard.c b/kernel/arch/dreamcast/hardware/maple/keyboard.c index c0d6d9b..5c9f674 100644 --- a/kernel/arch/dreamcast/hardware/maple/keyboard.c +++ b/kernel/arch/dreamcast/hardware/maple/keyboard.c @@ -335,6 +335,8 @@ static int kbd_attach(maple_driver_t *drv, maple_device_t *dev) { uint32 f = dev->info.functions, tmp = MAPLE_FUNC_KEYBOARD; int d = 0; + (void)drv; + /* Figure out which function data we want to look at. This is borrowed from the maple_enum_type_ex function and isn't really pretty... */ while(tmp != 0x80000000) { diff --git a/kernel/arch/dreamcast/hardware/maple/maple_irq.c b/kernel/arch/dreamcast/hardware/maple/maple_irq.c index c960440..3100420 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_irq.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_irq.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## maple_irq.c - (c)2002 Dan Potter + Copyright (C) 2002 Dan Potter */ #include <malloc.h> @@ -169,6 +169,8 @@ static void vbl_autodetect() { void maple_vbl_irq_hnd(uint32 code) { maple_driver_t *drv; + (void)code; + /* dbgio_write_str("inside vbl_irq_hnd\n"); */ /* Count, for fun and profit */ @@ -198,6 +200,8 @@ void maple_dma_irq_hnd(uint32 code) { maple_frame_t *i; int8 resp; + (void)code; + /* dbgio_write_str("start dma_irq_hnd\n"); */ /* Count, for fun and profit */ diff --git a/kernel/arch/dreamcast/hardware/maple/purupuru.c b/kernel/arch/dreamcast/hardware/maple/purupuru.c index 1c4f5be..70647a5 100644 --- a/kernel/arch/dreamcast/hardware/maple/purupuru.c +++ b/kernel/arch/dreamcast/hardware/maple/purupuru.c @@ -101,9 +101,11 @@ int purupuru_rumble(maple_device_t *dev, purupuru_effect_t *effect) { static void purupuru_periodic(maple_driver_t *drv) { + (void)drv; } static int purupuru_attach(maple_driver_t *drv, maple_device_t *dev) { + (void)drv; dev->status_valid = 1; return 0; } diff --git a/kernel/arch/dreamcast/hardware/maple/sip.c b/kernel/arch/dreamcast/hardware/maple/sip.c index 29d812c..80897eb 100644 --- a/kernel/arch/dreamcast/hardware/maple/sip.c +++ b/kernel/arch/dreamcast/hardware/maple/sip.c @@ -276,11 +276,14 @@ static void sip_periodic(maple_driver_t *drv) { static int sip_attach(maple_driver_t *drv, maple_device_t *dev) { sip_state_t *sip; + (void)drv; + sip = (sip_state_t *)dev->status; sip->is_sampling = 0; sip->amp_gain = SIP_DEFAULT_GAIN; sip->callback = NULL; dev->status_valid = 1; + return 0; } diff --git a/kernel/arch/dreamcast/hardware/maple/vmu.c b/kernel/arch/dreamcast/hardware/maple/vmu.c index f3b338d..2a02901 100644 --- a/kernel/arch/dreamcast/hardware/maple/vmu.c +++ b/kernel/arch/dreamcast/hardware/maple/vmu.c @@ -22,6 +22,7 @@ */ static int vmu_attach(maple_driver_t *drv, maple_device_t *dev) { + (void)drv; dev->status_valid = 1; return 0; } diff --git a/kernel/arch/dreamcast/hardware/modem/mintr.c b/kernel/arch/dreamcast/hardware/modem/mintr.c index 54f7f99..32e2f54 100644 --- a/kernel/arch/dreamcast/hardware/modem/mintr.c +++ b/kernel/arch/dreamcast/hardware/modem/mintr.c @@ -577,6 +577,8 @@ void modemConnection(void) { } static void modemCallback(uint32 code) { + (void)code; + if(modemCallbackCode != NULL) modemCallbackCode(); @@ -715,6 +717,8 @@ void modemIntConfigModem(void) { /* Sets the interrupt handler and state based on the specified mode of operation */ void modemIntSetHandler(int protocol, int mode) { + (void)protocol; + modemCfg.flags &= ~MODEM_CFG_FLAG_CONNECTED; modemCfg.flags |= MODEM_CFG_FLAG_CONNECTING; @@ -742,6 +746,9 @@ void modemIntResetControlCode(void) { is generated until it's stopped. */ static void modemIntrTimeoutCallback(irq_t source, irq_context_t *context) { + (void)source; + (void)context; + if(modemTimeoutCallbackFlag != NULL) *modemTimeoutCallbackFlag = 1; diff --git a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-07 00:53:29
|
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 d9c299e747991c7ba85a6c5811ac4b226b481eb0 (commit) from 2a0ff9035fe0056897c1e1868a33896d3e35beb4 (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 d9c299e747991c7ba85a6c5811ac4b226b481eb0 Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 6 20:53:10 2013 -0400 Clean up warnings with -std=gnu99. ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 1 + kernel/arch/dreamcast/hardware/cdrom.c | 4 ++-- .../arch/dreamcast/hardware/network/lan_adapter.c | 5 ++++- kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c | 4 +++- kernel/arch/dreamcast/sound/snd_stream.c | 4 ++-- kernel/libc/koslib/dbglog.c | 6 +----- kernel/net/net_arp.c | 4 ++-- kernel/net/net_ipv6.c | 5 +++-- 8 files changed, 18 insertions(+), 15 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index e65d0e7..840acb9 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -12,6 +12,7 @@ KallistiOS version 2.0.1 ----------------------------------------------- - *** Removed the GBA, ia32, and ps2 ports. If someone really wants them back and wants to maintain them, let me know. [LS] - DC Fixed fmath functions so they compile in C99 mode [LS] +- *** Cleaned up warnings with -std=gnu99 for C code [LS] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] diff --git a/kernel/arch/dreamcast/hardware/cdrom.c b/kernel/arch/dreamcast/hardware/cdrom.c index 6b4e66f..9d082fb 100644 --- a/kernel/arch/dreamcast/hardware/cdrom.c +++ b/kernel/arch/dreamcast/hardware/cdrom.c @@ -359,7 +359,7 @@ int cdrom_spin_down() { /* Initialize: assume no threading issues */ int cdrom_init() { - uint32 p, x; + uint32 p; volatile uint32 *react = (uint32*)0xa05f74e4, *bios = (uint32*)0xa0000000; @@ -371,7 +371,7 @@ int cdrom_init() { *react = 0x1fffff; for(p = 0; p < 0x200000 / 4; p++) { - x = bios[p]; + (void)bios[p]; } /* Reset system functions */ diff --git a/kernel/arch/dreamcast/hardware/network/lan_adapter.c b/kernel/arch/dreamcast/hardware/network/lan_adapter.c index 08b48ba..f03034f 100644 --- a/kernel/arch/dreamcast/hardware/network/lan_adapter.c +++ b/kernel/arch/dreamcast/hardware/network/lan_adapter.c @@ -262,12 +262,15 @@ static void la_strobe_eeprom() { la_write(BMPR16, BMPR16_ECS); } static void la_read_eeprom(uint8 *data) { - uint8 save16, save17, val; + //uint8 save16, save17 + uint8 val; int n, bit; +#if 0 /* Save the current value of the EEPROM registers */ save16 = la_read(BMPR16); save17 = la_read(BMPR17); +#endif /* Read bytes from EEPROM, two per iteration */ for(n = 0; n < 3; n++) { diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c b/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c index 4831323..5facd9d 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c @@ -27,14 +27,16 @@ void pvr_init_tile_matrix(int which) { int x, y; uint32 *vr; volatile int *opbs; - uint32 matbase, opbbase; + //uint32 matbase, opbbase; vr = (uint32*)PVR_RAM_BASE; buf = pvr_state.ta_buffers + which; opbs = pvr_state.opb_size; +#if 0 matbase = buf->tile_matrix; opbbase = buf->opb; +#endif /* Header of zeros */ vr += buf->tile_matrix / 4; diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 56c2451..a2f86ed 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -444,7 +444,7 @@ static void dma_chain(ptr_t data) { /* Poll streamer to load more data if neccessary */ int snd_stream_poll(snd_stream_hnd_t hnd) { uint32 ch0pos, ch1pos; - int realbuffer; + //int realbuffer; int current_play_pos; int needed_samples; int got_samples; @@ -463,7 +463,7 @@ int snd_stream_poll(snd_stream_hnd_t hnd) { return -1; } - realbuffer = !((ch0pos < (streams[hnd].buffer_size / 4)) && (ch1pos < (streams[hnd].buffer_size / 4))); + //realbuffer = !((ch0pos < (streams[hnd].buffer_size / 4)) && (ch1pos < (streams[hnd].buffer_size / 4))); current_play_pos = (ch0pos < ch1pos) ? (ch0pos) : (ch1pos); diff --git a/kernel/libc/koslib/dbglog.c b/kernel/libc/koslib/dbglog.c index 1a199b7..32f897b 100644 --- a/kernel/libc/koslib/dbglog.c +++ b/kernel/libc/koslib/dbglog.c @@ -29,7 +29,6 @@ void dbglog_set_level(int level) { /* Kernel debug logging facility */ void dbglog(int level, const char *fmt, ...) { va_list args; - int i; /* If this log level is blocked out, don't even bother */ if(level > dbglog_level) @@ -40,7 +39,7 @@ void dbglog(int level, const char *fmt, ...) { spinlock_lock(&mutex); va_start(args, fmt); - i = vsprintf(printf_buf, fmt, args); + (void)vsprintf(printf_buf, fmt, args); va_end(args); if(irq_inside_int()) @@ -51,6 +50,3 @@ void dbglog(int level, const char *fmt, ...) { if(level >= DBG_ERROR && !irq_inside_int()) spinlock_unlock(&mutex); } - - - diff --git a/kernel/net/net_arp.c b/kernel/net/net_arp.c index f8ca244..da92190 100644 --- a/kernel/net/net_arp.c +++ b/kernel/net/net_arp.c @@ -262,10 +262,10 @@ static int net_arp_send(netif_t *nif, arp_pkt_t *pkt) { /* Receive an ARP packet and process it (called by net_input) */ int net_arp_input(netif_t *nif, const uint8 *pkt_in, int len) { - eth_hdr_t *eth_hdr; + //eth_hdr_t *eth_hdr; arp_pkt_t *pkt; - eth_hdr = (eth_hdr_t *)pkt_in; + //eth_hdr = (eth_hdr_t *)pkt_in; pkt = (arp_pkt_t *)(pkt_in + sizeof(eth_hdr_t)); switch(pkt->opcode[1]) { diff --git a/kernel/net/net_ipv6.c b/kernel/net/net_ipv6.c index 246c561..a404263 100644 --- a/kernel/net/net_ipv6.c +++ b/kernel/net/net_ipv6.c @@ -181,7 +181,8 @@ int net_ipv6_input(netif_t *src, const uint8 *pkt, int pktsize, const eth_hdr_t *eth) { ipv6_hdr_t *ip; uint8 next_hdr; - int pos, len, rv; + //int pos; + int len, rv; if(pktsize < sizeof(ipv6_hdr_t)) { /* This is obviously a bad packet, drop it */ @@ -200,7 +201,7 @@ int net_ipv6_input(netif_t *src, const uint8 *pkt, int pktsize, } /* Parse the header to find the payload */ - pos = sizeof(ipv6_hdr_t); + //pos = sizeof(ipv6_hdr_t); // Currently unused, but will be needed later. next_hdr = ip->next_header; if(eth) hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-06 19:43:52
|
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 2a0ff9035fe0056897c1e1868a33896d3e35beb4 (commit) from ab5c4f3bbc7e955cb5ef5daadd604cb6556a12d7 (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 2a0ff9035fe0056897c1e1868a33896d3e35beb4 Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 6 15:43:18 2013 -0400 Use -std=gnu99 for compiling C and -std=gnu++98 for C++. ----------------------------------------------------------------------- Summary of changes: environ_base.sh | 6 ++++++ kernel/Makefile | 3 +++ libk++/Makefile | 2 ++ 3 files changed, 11 insertions(+), 0 deletions(-) diff --git a/environ_base.sh b/environ_base.sh index d3ea09d..83b3f1b 100644 --- a/environ_base.sh +++ b/environ_base.sh @@ -27,6 +27,12 @@ export KOS_STRIP="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-strip" export KOS_CFLAGS="${KOS_CFLAGS} ${KOS_INC_PATHS} -D_arch_${KOS_ARCH} -D_arch_sub_${KOS_SUBARCH} -Wall -g -fno-builtin -fno-strict-aliasing" export KOS_CPPFLAGS="${KOS_CPPFLAGS} ${KOS_INC_PATHS_CPP} -fno-operator-names -fno-rtti -fno-exceptions" +# Which standards modes we want to compile for +# Note that this only covers KOS itself, not necessarily anything else compiled +# with kos-cc or kos-c++. +export KOS_CSTD="-std=gnu99" +export KOS_CPPSTD="-std=gnu++98" + GCCVER="`kos-cc -v 2>&1 | tail -1 | awk '{print $3}'`" case $GCCVER in diff --git a/kernel/Makefile b/kernel/Makefile index 1701a81..1eba879 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -8,6 +8,9 @@ OBJS = SUBDIRS = arch debug fs thread net libc exports STUBS = stubs/kernel_export_stubs.o stubs/arch_export_stubs.o +# Everything from here up should be plain old C. +KOS_CFLAGS += $(KOS_CSTD) + all: subdirs $(STUBS) rm -f $(KOS_BASE)/lib/$(KOS_ARCH)/libkallisti.a kos-ar rcs $(KOS_BASE)/lib/$(KOS_ARCH)/libkallisti.a build/*.o diff --git a/libk++/Makefile b/libk++/Makefile index a13c7a3..f490973 100644 --- a/libk++/Makefile +++ b/libk++/Makefile @@ -9,6 +9,8 @@ OBJS = mem.o pure_virtual.o SUBDIRS = +KOS_CPPFLAGS += $(KOS_CPPSTD) + myall: $(OBJS) rm -f $(KOS_BASE)/lib/$(KOS_ARCH)/libk++.a $(KOS_AR) rcs $(KOS_BASE)/lib/$(KOS_ARCH)/libk++.a $(OBJS) hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Harley L. <los...@us...> - 2013-06-06 19:22:52
|
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 Lua.". The branch, 5.2 has been updated via c7ade45add9464c2c0fbd2e57ae3e659970f6912 (commit) from 553f7a82a2fcd4ad4baf8e360b43d13c82f1e5d6 (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 c7ade45add9464c2c0fbd2e57ae3e659970f6912 Author: Harley Laue <los...@gm...> Date: Thu Jun 6 14:21:36 2013 -0500 And I think this gets 5.2 to a working state ----------------------------------------------------------------------- Summary of changes: include/luaconf.h | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/include/luaconf.h b/include/luaconf.h index e4335df..b39516a 100644 --- a/include/luaconf.h +++ b/include/luaconf.h @@ -74,6 +74,12 @@ #endif +#if defined(LUA_USE_DREAMCAST) || defined(__arch_dreamcast) +#define LUA_USE_LONGLONG /* assume support for long long */ +#define LUA_USE_ISATTY +#define LUA_USE_GMTIME_R +#endif + /* @@ LUA_PATH_DEFAULT is the default path that Lua uses to look for @@ -540,7 +546,9 @@ ** without modifying the main part of the file. */ - +/* These don't work on the Dreamcast */ +#undef LUA_IEEE754TRICK +#undef LUA_NUMBER_DOUBLE #endif hooks/post-receive -- The KallistiOS port of Lua. |
From: Harley L. <los...@us...> - 2013-06-06 17:52:57
|
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 ab5c4f3bbc7e955cb5ef5daadd604cb6556a12d7 (commit) from ca07b70bbfaf56e70e602b121480b0c4d7a2d6d0 (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 ab5c4f3bbc7e955cb5ef5daadd604cb6556a12d7 Author: Harley Laue <los...@gm...> Date: Thu Jun 6 12:50:10 2013 -0500 Fix C++ compilation with missing __END_DECLS ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/include/dc/fmath_base.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/arch/dreamcast/include/dc/fmath_base.h b/kernel/arch/dreamcast/include/dc/fmath_base.h index f6272ac..fae5224 100644 --- a/kernel/arch/dreamcast/include/dc/fmath_base.h +++ b/kernel/arch/dreamcast/include/dc/fmath_base.h @@ -132,5 +132,6 @@ __BEGIN_DECLS __w; }) /** \endcond */ +__END_DECLS #endif /* !__DC_FMATH_BASE_H */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-06 15:27: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 ca07b70bbfaf56e70e602b121480b0c4d7a2d6d0 (commit) from d4332d01e6aff30c621c7a552af9e1ed04aad92d (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 ca07b70bbfaf56e70e602b121480b0c4d7a2d6d0 Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 6 11:26:31 2013 -0400 Fix the Dreamcast fmath functions so they compile as C99 (while still allowing them to compile as C89). ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 1 + kernel/arch/dreamcast/include/dc/fmath.h | 177 ++++++-------------- .../dreamcast/include/dc/{fmath.h => fmath_base.h} | 102 +----------- kernel/arch/dreamcast/math/fmath.c | 15 ++- 4 files changed, 69 insertions(+), 226 deletions(-) copy kernel/arch/dreamcast/include/dc/{fmath.h => fmath_base.h} (66%) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index bbec776..e65d0e7 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -11,6 +11,7 @@ KallistiOS version 2.0.1 ----------------------------------------------- - DC Rearranged the SIP driver to get rid of the internal buffer [LS] - *** Removed the GBA, ia32, and ps2 ports. If someone really wants them back and wants to maintain them, let me know. [LS] +- DC Fixed fmath functions so they compile in C99 mode [LS] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] diff --git a/kernel/arch/dreamcast/include/dc/fmath.h b/kernel/arch/dreamcast/include/dc/fmath.h index 5753f28..eeb0654 100644 --- a/kernel/arch/dreamcast/include/dc/fmath.h +++ b/kernel/arch/dreamcast/include/dc/fmath.h @@ -1,7 +1,8 @@ /* KallistiOS ##version## dc/fmath.h - (C)2001 Andrew Kieschnick + Copyright (C) 2001 Andrew Kieschnick + Copyright (C) 2013 Lawrence Sebald */ @@ -12,6 +13,7 @@ __BEGIN_DECLS #include <arch/types.h> +#include <dc/fmath_base.h> /** \file dc/fmath.h @@ -19,133 +21,31 @@ __BEGIN_DECLS \author Andrew Kieschnick */ -/** PI constant (if you don't want full math.h) */ -#define F_PI 3.1415926f +/* Sigh... C99 treats inline stuff a lot differently than traditional GCC did, + so we need to take care of that... */ +#if __STDC_VERSION__ >= 199901L +#define __FMINLINE static inline +#elif __GNUC__ +#define __FMINLINE extern inline +#else +/* Uhm... I guess this is the best we can do? */ +#define __FMINLINE static +#endif -/** \cond */ -#define __fsin(x) \ - ({ float __value, __arg = (x), __scale = 10430.37835; \ - asm( "fmul %2,%1\n\t" \ - "ftrc %1,fpul\n\t" \ - "fsca fpul,dr0\n\t" \ - "fmov fr0,%0" \ - : "=f" (__value), "+&f" (__scale) \ - : "f" (__arg) \ - : "fpul", "fr0", "fr1"); \ - __value; }) - -#define __fcos(x) \ - ({ float __value, __arg = (x), __scale = 10430.37835; \ - asm( "fmul %2,%1\n\t" \ - "ftrc %1,fpul\n\t" \ - "fsca fpul,dr0\n\t" \ - "fmov fr1,%0" \ - : "=f" (__value), "+&f" (__scale) \ - : "f" (__arg) \ - : "fpul", "fr0", "fr1"); \ - __value; }) - -#define __ftan(x) \ - ({ float __value, __arg = (x), __scale = 10430.37835; \ - asm( "fmul %2,%1\n\t" \ - "ftrc %1,fpul\n\t" \ - "fsca fpul,dr0\n\t" \ - "fdiv fr1, fr0\n\t" \ - "fmov fr0,%0" \ - : "=f" (__value), "+&f" (__scale) \ - : "f" (__arg) \ - : "fpul", "fr0", "fr1"); \ - __value; }) - - -#define __fisin(x) \ - ({ float __value, __arg = (x); \ - asm( "lds %1,fpul\n\t" \ - "fsca fpul,dr0\n\t" \ - "fmov fr0,%0" \ - : "=f" (__value) \ - : "r" (__arg) \ - : "fpul", "fr0", "fr1"); \ - __value; }) - -#define __ficos(x) \ - ({ float __value, __arg = (x); \ - asm( "lds %1,fpul\n\t" \ - "fsca fpul,dr0\n\t" \ - "fmov fr1,%0" \ - : "=f" (__value) \ - : "r" (__arg) \ - : "fpul", "fr0", "fr1"); \ - __value; }) - -#define __fitan(x) \ - ({ float __value, __arg = (x); \ - asm( "lds %1,fpul\n\t" \ - "fsca fpul,dr0\n\t" \ - "fdiv fr1, fr0\n\t" \ - "fmov fr0,%0" \ - : "=f" (__value) \ - : "r" (__arg) \ - : "fpul", "fr0", "fr1"); \ - __value; }) - - -#define __fsqrt(x) \ - ({ float __arg = (x); \ - asm( "fsqrt %0\n\t" \ - : "=f" (__arg) : "0" (__arg)); \ - __arg; }) - -#define __frsqrt(x) \ - ({ float __arg = (x); \ - asm( "fsrra %0\n\t" \ - : "=f" (__arg) : "0" (__arg)); \ - __arg; }) - -/* Floating point inner product (dot product) */ -#define __fipr(x, y, z, w, a, b, c, d) ({ \ - register float __x __asm__("fr0") = (x); \ - register float __y __asm__("fr1") = (y); \ - register float __z __asm__("fr2") = (z); \ - register float __w __asm__("fr3") = (w); \ - register float __a __asm__("fr4") = (a); \ - register float __b __asm__("fr5") = (b); \ - register float __c __asm__("fr6") = (c); \ - register float __d __asm__("fr7") = (d); \ - __asm__ __volatile__( \ - "fipr fv4,fv0" \ - : "+f" (__w) \ - : "f" (__x), "f" (__y), "f" (__z), "f" (__w), \ - "f" (__a), "f" (__b), "f" (__c), "f" (__d) \ - ); \ - __w; }) - -/* Floating point inner product w/self (square of vector magnitude) */ -#define __fipr_magnitude_sqr(x, y, z, w) ({ \ - register float __x __asm__("fr4") = (x); \ - register float __y __asm__("fr5") = (y); \ - register float __z __asm__("fr6") = (z); \ - register float __w __asm__("fr7") = (w); \ - __asm__ __volatile__( \ - "fipr fv4,fv4" \ - : "+f" (__w) \ - : "f" (__x), "f" (__y), "f" (__z), "f" (__w) \ - ); \ - __w; }) - -/** \endcond */ - -/** \return v1 dot v2 (inner product) */ -extern inline float fipr(float x, float y, float z, float w, - float a, float b, float c, float d) { +/** + \brief Floating point inner product. + \return v1 dot v2 (inner product) +*/ +__FMINLINE float fipr(float x, float y, float z, float w, + float a, float b, float c, float d) { return __fipr(x, y, z, w, a, b, c, d); } /** - \brief Floating point inner product w/self (square of vector magnitude) + \brief Floating point inner product w/self (square of vector magnitude) \return v1 dot v1 (square of magnitude) */ -extern inline float fipr_magnitude_sqr(float x, float y, float z, float w) { +__FMINLINE float fipr_magnitude_sqr(float x, float y, float z, float w) { return __fipr_magnitude_sqr(x, y, z, w); } @@ -154,7 +54,7 @@ extern inline float fipr_magnitude_sqr(float x, float y, float z, float w) { \param r a floating point number between 0 and 2*PI \return sin(r), where r is [0..2*PI] */ -extern inline float fsin(float r) { +__FMINLINE float fsin(float r) { return __fsin(r); } @@ -163,7 +63,7 @@ extern inline float fsin(float r) { \param r a floating point number between 0 and 2*PI \return cos(r), where r is [0..2*PI] */ -extern inline float fcos(float r) { +__FMINLINE float fcos(float r) { return __fcos(r); } @@ -172,7 +72,7 @@ extern inline float fcos(float r) { \param r a floating point number between 0 and 2*PI \return tan(r), where r is [0..2*PI] */ -extern inline float ftan(float r) { +__FMINLINE float ftan(float r) { return __ftan(r); } @@ -181,7 +81,7 @@ extern inline float ftan(float r) { \param d an integer between 0 and 65535 \return sin(d), where d is [0..65535] */ -extern inline float fisin(int d) { +__FMINLINE float fisin(int d) { return __fisin(d); } @@ -190,7 +90,7 @@ extern inline float fisin(int d) { \param d an integer between 0 and 65535 \return cos(d), where d is [0..65535] */ -extern inline float ficos(int d) { +__FMINLINE float ficos(int d) { return __ficos(d); } @@ -199,7 +99,7 @@ extern inline float ficos(int d) { \param d an integer between 0 and 65535 \return tan(d), where d is [0..65535] */ -extern inline float fitan(int d) { +__FMINLINE float fitan(int d) { return __fitan(d); } @@ -207,17 +107,36 @@ extern inline float fitan(int d) { \brief Floating point square root \return sqrt(f) */ -extern inline float fsqrt(float f) { +__FMINLINE float fsqrt(float f) { return __fsqrt(f); } /** \return 1.0f / sqrt(f) */ -extern inline float frsqrt(float f) { +__FMINLINE float frsqrt(float f) { return __frsqrt(f); } +/* Make sure we declare the non-inline versions for C99 and non-gcc. Why they'd + ever be needed, since they're inlined above, who knows? I guess in case + someone tries to take the address of one of them? */ +/** \cond */ +#if __STDC_VERSION__ >= 199901L || !defined(__GNUC__) +extern float fipr(float x, float y, float z, float w, float a, float b, float c, + float d); +extern float fipr_magnitude_sqr(float x, float y, float z, float w); +extern float fsin(float r); +extern float fcos(float r); +extern float ftan(float r); +extern float fisin(int d); +extern float ficos(int d); +extern float fitan(int d); +extern float fsqrt(float f); +extern float frsqrt(float f); +#endif /* __STDC_VERSION__ >= 199901L || !defined(__GNUC__) */ +/** \endcond */ + __END_DECLS #endif /* __DC_FMATH_H */ diff --git a/kernel/arch/dreamcast/include/dc/fmath.h b/kernel/arch/dreamcast/include/dc/fmath_base.h similarity index 66% copy from kernel/arch/dreamcast/include/dc/fmath.h copy to kernel/arch/dreamcast/include/dc/fmath_base.h index 5753f28..f6272ac 100644 --- a/kernel/arch/dreamcast/include/dc/fmath.h +++ b/kernel/arch/dreamcast/include/dc/fmath_base.h @@ -1,21 +1,19 @@ /* KallistiOS ##version## - dc/fmath.h - (C)2001 Andrew Kieschnick + dc/fmath_base.h + Copyright (C) 2001 Andrew Kieschnick */ -#ifndef __DC_FMATH_H -#define __DC_FMATH_H +#ifndef __DC_FMATH_BASE_H +#define __DC_FMATH_BASE_H #include <sys/cdefs.h> __BEGIN_DECLS -#include <arch/types.h> - /** - \file dc/fmath.h - \brief Inline functions for the DC's special math instructions + \file dc/fmath_base.h + \brief Base definitions for the DC's special math instructions \author Andrew Kieschnick */ @@ -135,90 +133,4 @@ __BEGIN_DECLS /** \endcond */ -/** \return v1 dot v2 (inner product) */ -extern inline float fipr(float x, float y, float z, float w, - float a, float b, float c, float d) { - return __fipr(x, y, z, w, a, b, c, d); -} - -/** - \brief Floating point inner product w/self (square of vector magnitude) - \return v1 dot v1 (square of magnitude) -*/ -extern inline float fipr_magnitude_sqr(float x, float y, float z, float w) { - return __fipr_magnitude_sqr(x, y, z, w); -} - -/** - \brief Floating point sine - \param r a floating point number between 0 and 2*PI - \return sin(r), where r is [0..2*PI] -*/ -extern inline float fsin(float r) { - return __fsin(r); -} - -/** - \brief Floating point cosine - \param r a floating point number between 0 and 2*PI - \return cos(r), where r is [0..2*PI] -*/ -extern inline float fcos(float r) { - return __fcos(r); -} - -/** - \brief Floating point tangent - \param r a floating point number between 0 and 2*PI - \return tan(r), where r is [0..2*PI] -*/ -extern inline float ftan(float r) { - return __ftan(r); -} - -/** - \brief Integer sine - \param d an integer between 0 and 65535 - \return sin(d), where d is [0..65535] -*/ -extern inline float fisin(int d) { - return __fisin(d); -} - -/** - \brief Integer cosine - \param d an integer between 0 and 65535 - \return cos(d), where d is [0..65535] -*/ -extern inline float ficos(int d) { - return __ficos(d); -} - -/** - \brief Integer tangent - \param d an integer between 0 and 65535 - \return tan(d), where d is [0..65535] -*/ -extern inline float fitan(int d) { - return __fitan(d); -} - -/** - \brief Floating point square root - \return sqrt(f) -*/ -extern inline float fsqrt(float f) { - return __fsqrt(f); -} - -/** - \return 1.0f / sqrt(f) -*/ -extern inline float frsqrt(float f) { - return __frsqrt(f); -} - -__END_DECLS - -#endif /* __DC_FMATH_H */ - +#endif /* !__DC_FMATH_BASE_H */ diff --git a/kernel/arch/dreamcast/math/fmath.c b/kernel/arch/dreamcast/math/fmath.c index 24cb757..872603a 100644 --- a/kernel/arch/dreamcast/math/fmath.c +++ b/kernel/arch/dreamcast/math/fmath.c @@ -1,10 +1,21 @@ /* KallistiOS ##version## dc/fmath.c - (C)2001 Andrew Kieschnick + Copyright (C) 2001 Andrew Kieschnick */ -#include <dc/fmath.h> +#include <dc/fmath_base.h> + +/* v1 dot v2 (inner product) */ +float fipr(float x, float y, float z, float w, float a, float b, float c, + float d) { + return __fipr(x, y, z, w, a, b, c, d); +} + +/* v1 dot v1 (square of magnitude) */ +float fipr_magnitude_sqr(float x, float y, float z, float w) { + return __fipr_magnitude_sqr(x, y, z, w); +} /* Returns sin(r), where r is [0..2*PI] */ float fsin(float r) { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-06 05:36:54
|
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 d4332d01e6aff30c621c7a552af9e1ed04aad92d (commit) from f91fc63edcb6a51ec7524599d138d7a66e08e9f8 (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 d4332d01e6aff30c621c7a552af9e1ed04aad92d Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 6 01:36:21 2013 -0400 libkosext2fs compiles cleanly with -std=c99, so go with that. ----------------------------------------------------------------------- Summary of changes: addons/libkosext2fs/Makefile | 2 +- addons/libkosext2fs/Makefile.nonkos | 2 +- addons/libkosext2fs/fs_ext2.c | 8 ++++++++ addons/libkosext2fs/inode.c | 8 ++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/addons/libkosext2fs/Makefile b/addons/libkosext2fs/Makefile index 108d7d2..0a4f9a7 100644 --- a/addons/libkosext2fs/Makefile +++ b/addons/libkosext2fs/Makefile @@ -6,6 +6,6 @@ OBJS = ext2fs.o bitops.o block.o inode.o superblock.o fs_ext2.o symlink.o \ directory.o # Make sure everything compiles nice and cleanly (or not at all). -KOS_CFLAGS += -W -pedantic -Werror -std=gnu99 +KOS_CFLAGS += -W -pedantic -Werror -std=c99 include $(KOS_BASE)/addons/Makefile.prefab diff --git a/addons/libkosext2fs/Makefile.nonkos b/addons/libkosext2fs/Makefile.nonkos index f1bf9ec..bf01336 100644 --- a/addons/libkosext2fs/Makefile.nonkos +++ b/addons/libkosext2fs/Makefile.nonkos @@ -4,7 +4,7 @@ OBJS = ext2fs.o bitops.o block.o inode.o superblock.o symlink.o directory.o # Make sure everything compiles nice and cleanly (or not at all). -CFLAGS += -W -pedantic -Werror -std=gnu99 -DEXT2_NOT_IN_KOS -g +CFLAGS += -W -pedantic -Werror -std=c99 -DEXT2_NOT_IN_KOS -g libkosext2fs.a: $(OBJS) $(AR) rcs $@ $^ diff --git a/addons/libkosext2fs/fs_ext2.c b/addons/libkosext2fs/fs_ext2.c index deec570..24eedb5 100644 --- a/addons/libkosext2fs/fs_ext2.c +++ b/addons/libkosext2fs/fs_ext2.c @@ -24,6 +24,14 @@ /* For some reason, Newlib doesn't seem to define this function in stdlib.h. */ extern char *realpath(const char *, const char *); +#ifdef __STRICT_ANSI__ +/* These don't necessarily get prototyped in string.h in standard-compliant mode + as they are extensions to the standard. Declaring them this way shouldn't + hurt. */ +char *strtok_r(char *, const char *, char **); +char *strdup(const char *); +#endif + #define MAX_EXT2_FILES 16 typedef struct fs_ext2_fs { diff --git a/addons/libkosext2fs/inode.c b/addons/libkosext2fs/inode.c index f5d568b..4f1b785 100644 --- a/addons/libkosext2fs/inode.c +++ b/addons/libkosext2fs/inode.c @@ -22,6 +22,14 @@ #include "ext2internal.h" #include "directory.h" +#ifdef __STRICT_ANSI__ +/* These don't necessarily get prototyped in string.h in standard-compliant mode + as they are extensions to the standard. Declaring them this way shouldn't + hurt. */ +char *strtok_r(char *, const char *, char **); +char *strdup(const char *); +#endif + #define MAX_INODES (1 << EXT2_LOG_MAX_INODES) #define INODE_HASH_SZ (1 << EXT2_LOG_INODE_HASH) hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-06 04:39:47
|
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 f91fc63edcb6a51ec7524599d138d7a66e08e9f8 (commit) from 2301649311ec1eeb4efad496d11d8829c80b7985 (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 f91fc63edcb6a51ec7524599d138d7a66e08e9f8 Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 6 00:39:18 2013 -0400 Begone ports that are no longer maintained. ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + doc/CHANGELOG | 2 + environ_gba.sh | 7 - environ_ia32.sh | 6 - environ_ps2.sh | 6 - examples/gba/Makefile | 13 - examples/gba/pogo-keen/Makefile | 32 -- examples/gba/pogo-keen/pogo.c | 197 ------------ examples/gba/pogo-keen/romdisk_boot/1.pcx | Bin 1685 -> 0 bytes examples/gba/pogo-keen/romdisk_boot/2.pcx | Bin 1667 -> 0 bytes examples/gba/pogo-keen/romdisk_boot/3.pcx | Bin 1667 -> 0 bytes examples/gba/pogo-keen/romdisk_boot/4.pcx | Bin 1684 -> 0 bytes examples/gba/pogo-keen/romdisk_boot/5.pcx | Bin 1684 -> 0 bytes examples/gba/pogo-keen/romdisk_boot/6.pcx | Bin 1684 -> 0 bytes examples/gba/pogo-keen/romdisk_boot/7.pcx | Bin 1684 -> 0 bytes examples/ps2/Makefile | 15 - examples/ps2/basic/Makefile | 15 - examples/ps2/basic/hello/Makefile | 44 --- examples/ps2/basic/hello/hello.c | 62 ---- include/kos.h | 13 +- kernel/arch/gba/Makefile | 12 - kernel/arch/gba/gba.ld.script | 251 ---------------- kernel/arch/gba/hardware/Makefile | 5 - kernel/arch/gba/include/arch/arch.h | 71 ----- kernel/arch/gba/include/arch/cache.h | 1 - kernel/arch/gba/include/arch/dbgio.h | 42 --- kernel/arch/gba/include/arch/exec.h | 1 - kernel/arch/gba/include/arch/irq.h | 80 ----- kernel/arch/gba/include/arch/rtc.h | 1 - kernel/arch/gba/include/arch/spinlock.h | 48 --- kernel/arch/gba/include/arch/stack.h | 1 - kernel/arch/gba/include/arch/syscall.h | 33 -- kernel/arch/gba/include/arch/timer.h | 37 --- kernel/arch/gba/include/arch/types.h | 79 ----- kernel/arch/gba/include/gba/dma.h | 36 --- kernel/arch/gba/include/gba/keys.h | 29 -- kernel/arch/gba/include/gba/math.h | 1 - kernel/arch/gba/include/gba/sound.h | 33 -- kernel/arch/gba/include/gba/sprite.h | 85 ------ kernel/arch/gba/include/gba/video.h | 94 ------ kernel/arch/gba/kernel/Makefile | 24 -- kernel/arch/gba/kernel/dbgio.c | 69 ----- kernel/arch/gba/kernel/init_flags_default.c | 12 - kernel/arch/gba/kernel/init_romdisk_default.c | 12 - kernel/arch/gba/kernel/irq.c | 5 - kernel/arch/gba/kernel/lazy_porting.c | 53 ---- kernel/arch/gba/kernel/main.c | 53 ---- kernel/arch/gba/kernel/mm.c | 42 --- kernel/arch/gba/kernel/panic.c | 18 -- kernel/arch/gba/kernel/startup.s | 130 -------- kernel/arch/gba/kernel/syscall.c | 1 - kernel/arch/gba/kernel/syscalls.S | 23 -- kernel/arch/gba/kernel/timer.c | 1 - kernel/arch/ia32/Makefile | 12 - kernel/arch/ia32/boot/Makefile | 20 -- kernel/arch/ia32/boot/loader.asm | 220 -------------- kernel/arch/ia32/exports.txt | 5 - kernel/arch/ia32/include/arch/arch.h | 129 -------- kernel/arch/ia32/include/arch/cache.h | 28 -- kernel/arch/ia32/include/arch/dbgio.h | 61 ---- kernel/arch/ia32/include/arch/exec.h | 22 -- kernel/arch/ia32/include/arch/gdb.h | 23 -- kernel/arch/ia32/include/arch/irq.h | 153 ---------- kernel/arch/ia32/include/arch/mmu.h | 172 ----------- kernel/arch/ia32/include/arch/rtc.h | 31 -- kernel/arch/ia32/include/arch/spinlock.h | 55 ---- kernel/arch/ia32/include/arch/stack.h | 27 -- kernel/arch/ia32/include/arch/timer.h | 87 ------ kernel/arch/ia32/include/arch/types.h | 64 ---- kernel/arch/ia32/include/ia32/ports.h | 58 ---- kernel/arch/ia32/kernel/Makefile | 40 --- kernel/arch/ia32/kernel/cache.s | 23 -- kernel/arch/ia32/kernel/dbgio.c | 331 --------------------- kernel/arch/ia32/kernel/entry.s | 380 ------------------------ kernel/arch/ia32/kernel/exec.c | 26 -- kernel/arch/ia32/kernel/gdt.s | 60 ---- kernel/arch/ia32/kernel/init.c | 111 ------- kernel/arch/ia32/kernel/init_flags_default.c | 11 - kernel/arch/ia32/kernel/irq.c | 267 ----------------- kernel/arch/ia32/kernel/make_banner.sh | 24 -- kernel/arch/ia32/kernel/mmu.c | 92 ------ kernel/arch/ia32/kernel/panic.c | 18 -- kernel/arch/ia32/kernel/rtc.c | 42 --- kernel/arch/ia32/kernel/stack.c | 36 --- kernel/arch/ia32/kernel/startup.s | 25 -- kernel/arch/ia32/kernel/thdswitch.s | 45 --- kernel/arch/ia32/kernel/timer.c | 107 ------- kernel/arch/ps2/Makefile | 12 - kernel/arch/ps2/fs/Makefile | 11 - kernel/arch/ps2/fs/fs_ps2load.c | 394 ------------------------- kernel/arch/ps2/include/arch/arch.h | 149 ---------- kernel/arch/ps2/include/arch/atexit.h | 27 -- kernel/arch/ps2/include/arch/cache.h | 34 --- kernel/arch/ps2/include/arch/dbgio.h | 61 ---- kernel/arch/ps2/include/arch/exec.h | 1 - kernel/arch/ps2/include/arch/irq.h | 149 ---------- kernel/arch/ps2/include/arch/rtc.h | 22 -- kernel/arch/ps2/include/arch/spinlock.h | 57 ---- kernel/arch/ps2/include/arch/stack.h | 1 - kernel/arch/ps2/include/arch/syscall.h | 49 --- kernel/arch/ps2/include/arch/timer.h | 82 ----- kernel/arch/ps2/include/arch/types.h | 71 ----- kernel/arch/ps2/include/ps2/asmregs.h | 100 ------- kernel/arch/ps2/include/ps2/fs_ps2load.h | 111 ------- kernel/arch/ps2/include/ps2/ioports.h | 209 ------------- kernel/arch/ps2/include/ps2/sbios.h | 222 -------------- kernel/arch/ps2/kernel/Makefile | 30 -- kernel/arch/ps2/kernel/atexit.c | 53 ---- kernel/arch/ps2/kernel/cache.S | 94 ------ kernel/arch/ps2/kernel/crtbegin.c | 41 --- kernel/arch/ps2/kernel/crtend.c | 22 -- kernel/arch/ps2/kernel/dbgio.c | 136 --------- kernel/arch/ps2/kernel/entry.S | 276 ----------------- kernel/arch/ps2/kernel/init_flags_default.c | 11 - kernel/arch/ps2/kernel/init_romdisk_default.c | 11 - kernel/arch/ps2/kernel/initall_hdrs.h | 18 -- kernel/arch/ps2/kernel/irq.c | 271 ----------------- kernel/arch/ps2/kernel/main.c | 240 --------------- kernel/arch/ps2/kernel/make_banner.sh | 28 -- kernel/arch/ps2/kernel/mm.c | 42 --- kernel/arch/ps2/kernel/panic.c | 18 -- kernel/arch/ps2/kernel/startup.S | 157 ---------- kernel/arch/ps2/kernel/syscall.c | 43 --- kernel/arch/ps2/kernel/timer.c | 171 ----------- kernel/arch/ps2/link-rte.ld | 188 ------------ kernel/arch/ps2/sbios/Makefile | 15 - kernel/arch/ps2/sbios/sbios_init_shutdown.c | 30 -- 127 files changed, 4 insertions(+), 8254 deletions(-) delete mode 100644 environ_gba.sh delete mode 100644 environ_ia32.sh delete mode 100644 environ_ps2.sh delete mode 100644 examples/gba/Makefile delete mode 100644 examples/gba/pogo-keen/Makefile delete mode 100644 examples/gba/pogo-keen/pogo.c delete mode 100644 examples/gba/pogo-keen/romdisk_boot/1.pcx delete mode 100644 examples/gba/pogo-keen/romdisk_boot/2.pcx delete mode 100644 examples/gba/pogo-keen/romdisk_boot/3.pcx delete mode 100644 examples/gba/pogo-keen/romdisk_boot/4.pcx delete mode 100644 examples/gba/pogo-keen/romdisk_boot/5.pcx delete mode 100644 examples/gba/pogo-keen/romdisk_boot/6.pcx delete mode 100644 examples/gba/pogo-keen/romdisk_boot/7.pcx delete mode 100644 examples/ps2/Makefile delete mode 100644 examples/ps2/basic/Makefile delete mode 100644 examples/ps2/basic/hello/Makefile delete mode 100644 examples/ps2/basic/hello/hello.c delete mode 100644 examples/ps2/basic/hello/romdisk/.keepme delete mode 100644 kernel/arch/gba/Makefile delete mode 100644 kernel/arch/gba/gba.ld.script delete mode 100644 kernel/arch/gba/hardware/Makefile delete mode 100644 kernel/arch/gba/include/arch/arch.h delete mode 100644 kernel/arch/gba/include/arch/cache.h delete mode 100644 kernel/arch/gba/include/arch/dbgio.h delete mode 100644 kernel/arch/gba/include/arch/exec.h delete mode 100644 kernel/arch/gba/include/arch/irq.h delete mode 100644 kernel/arch/gba/include/arch/rtc.h delete mode 100644 kernel/arch/gba/include/arch/spinlock.h delete mode 100644 kernel/arch/gba/include/arch/stack.h delete mode 100644 kernel/arch/gba/include/arch/syscall.h delete mode 100644 kernel/arch/gba/include/arch/timer.h delete mode 100644 kernel/arch/gba/include/arch/types.h delete mode 100644 kernel/arch/gba/include/gba/dma.h delete mode 100644 kernel/arch/gba/include/gba/keys.h delete mode 100644 kernel/arch/gba/include/gba/math.h delete mode 100644 kernel/arch/gba/include/gba/sound.h delete mode 100644 kernel/arch/gba/include/gba/sprite.h delete mode 100644 kernel/arch/gba/include/gba/video.h delete mode 100644 kernel/arch/gba/kernel/Makefile delete mode 100644 kernel/arch/gba/kernel/dbgio.c delete mode 100644 kernel/arch/gba/kernel/init_flags_default.c delete mode 100644 kernel/arch/gba/kernel/init_romdisk_default.c delete mode 100644 kernel/arch/gba/kernel/irq.c delete mode 100644 kernel/arch/gba/kernel/lazy_porting.c delete mode 100644 kernel/arch/gba/kernel/main.c delete mode 100644 kernel/arch/gba/kernel/mm.c delete mode 100644 kernel/arch/gba/kernel/panic.c delete mode 100644 kernel/arch/gba/kernel/startup.s delete mode 100644 kernel/arch/gba/kernel/syscall.c delete mode 100644 kernel/arch/gba/kernel/syscalls.S delete mode 100644 kernel/arch/gba/kernel/timer.c delete mode 100644 kernel/arch/ia32/Makefile delete mode 100644 kernel/arch/ia32/boot/Makefile delete mode 100644 kernel/arch/ia32/boot/loader.asm delete mode 100644 kernel/arch/ia32/exports.txt delete mode 100644 kernel/arch/ia32/include/arch/arch.h delete mode 100644 kernel/arch/ia32/include/arch/cache.h delete mode 100644 kernel/arch/ia32/include/arch/dbgio.h delete mode 100644 kernel/arch/ia32/include/arch/exec.h delete mode 100644 kernel/arch/ia32/include/arch/gdb.h delete mode 100644 kernel/arch/ia32/include/arch/irq.h delete mode 100644 kernel/arch/ia32/include/arch/mmu.h delete mode 100644 kernel/arch/ia32/include/arch/rtc.h delete mode 100644 kernel/arch/ia32/include/arch/spinlock.h delete mode 100644 kernel/arch/ia32/include/arch/stack.h delete mode 100644 kernel/arch/ia32/include/arch/timer.h delete mode 100644 kernel/arch/ia32/include/arch/types.h delete mode 100644 kernel/arch/ia32/include/ia32/ports.h delete mode 100644 kernel/arch/ia32/kernel/Makefile delete mode 100644 kernel/arch/ia32/kernel/cache.s delete mode 100644 kernel/arch/ia32/kernel/dbgio.c delete mode 100644 kernel/arch/ia32/kernel/entry.s delete mode 100644 kernel/arch/ia32/kernel/exec.c delete mode 100644 kernel/arch/ia32/kernel/gdt.s delete mode 100644 kernel/arch/ia32/kernel/init.c delete mode 100644 kernel/arch/ia32/kernel/init_flags_default.c delete mode 100644 kernel/arch/ia32/kernel/irq.c delete mode 100755 kernel/arch/ia32/kernel/make_banner.sh delete mode 100644 kernel/arch/ia32/kernel/mmu.c delete mode 100644 kernel/arch/ia32/kernel/panic.c delete mode 100644 kernel/arch/ia32/kernel/rtc.c delete mode 100644 kernel/arch/ia32/kernel/stack.c delete mode 100644 kernel/arch/ia32/kernel/startup.s delete mode 100644 kernel/arch/ia32/kernel/thdswitch.s delete mode 100644 kernel/arch/ia32/kernel/timer.c delete mode 100644 kernel/arch/ps2/Makefile delete mode 100644 kernel/arch/ps2/fs/Makefile delete mode 100644 kernel/arch/ps2/fs/fs_ps2load.c delete mode 100644 kernel/arch/ps2/include/arch/arch.h delete mode 100644 kernel/arch/ps2/include/arch/atexit.h delete mode 100644 kernel/arch/ps2/include/arch/cache.h delete mode 100644 kernel/arch/ps2/include/arch/dbgio.h delete mode 100644 kernel/arch/ps2/include/arch/exec.h delete mode 100644 kernel/arch/ps2/include/arch/irq.h delete mode 100644 kernel/arch/ps2/include/arch/rtc.h delete mode 100644 kernel/arch/ps2/include/arch/spinlock.h delete mode 100644 kernel/arch/ps2/include/arch/stack.h delete mode 100644 kernel/arch/ps2/include/arch/syscall.h delete mode 100644 kernel/arch/ps2/include/arch/timer.h delete mode 100644 kernel/arch/ps2/include/arch/types.h delete mode 100644 kernel/arch/ps2/include/ps2/asmregs.h delete mode 100644 kernel/arch/ps2/include/ps2/fs_ps2load.h delete mode 100644 kernel/arch/ps2/include/ps2/ioports.h delete mode 100644 kernel/arch/ps2/include/ps2/sbios.h delete mode 100644 kernel/arch/ps2/kernel/Makefile delete mode 100644 kernel/arch/ps2/kernel/atexit.c delete mode 100644 kernel/arch/ps2/kernel/cache.S delete mode 100644 kernel/arch/ps2/kernel/crtbegin.c delete mode 100644 kernel/arch/ps2/kernel/crtend.c delete mode 100644 kernel/arch/ps2/kernel/dbgio.c delete mode 100644 kernel/arch/ps2/kernel/entry.S delete mode 100644 kernel/arch/ps2/kernel/init_flags_default.c delete mode 100644 kernel/arch/ps2/kernel/init_romdisk_default.c delete mode 100644 kernel/arch/ps2/kernel/initall_hdrs.h delete mode 100644 kernel/arch/ps2/kernel/irq.c delete mode 100644 kernel/arch/ps2/kernel/main.c delete mode 100755 kernel/arch/ps2/kernel/make_banner.sh delete mode 100644 kernel/arch/ps2/kernel/mm.c delete mode 100644 kernel/arch/ps2/kernel/panic.c delete mode 100644 kernel/arch/ps2/kernel/startup.S delete mode 100644 kernel/arch/ps2/kernel/syscall.c delete mode 100644 kernel/arch/ps2/kernel/timer.c delete mode 100644 kernel/arch/ps2/link-rte.ld delete mode 100644 kernel/arch/ps2/sbios/Makefile delete mode 100644 kernel/arch/ps2/sbios/sbios_init_shutdown.c diff --git a/.gitignore b/.gitignore index 4b54d9d..5bf31ef 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.map *~ .*.swp +.DS_Store doc/reference/ environ.sh romdisk.img diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 7b90de7..bbec776 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -9,6 +9,8 @@ KallistiOS version 2.0.1 ----------------------------------------------- - DC Fixed an issue with the SIP driver that would cause programs to freeze if a microphone was connected at program startup [LS] - DC Rearranged the SIP driver to get rid of the internal buffer [LS] +- *** Removed the GBA, ia32, and ps2 ports. If someone really wants them back + and wants to maintain them, let me know. [LS] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] diff --git a/environ_gba.sh b/environ_gba.sh deleted file mode 100644 index c399f83..0000000 --- a/environ_gba.sh +++ /dev/null @@ -1,7 +0,0 @@ -# KallistiOS environment variable settings. These are the shared pieces -# for the GBA(tm) platform. - -# This is currently configured to produce only Thumb code -export KOS_CFLAGS="${KOS_CFLAGS} -mcpu=arm7tdmi -mthumb -ffreestanding" -export KOS_AFLAGS="${KOS_AFLAGS}" -export KOS_LDFLAGS="${KOS_LDFLAGS} -Wl,-Ttext=0x08000000,-Tdata=0x02000000,-T,$KOS_BASE/kernel/arch/gba/gba.ld.script" diff --git a/environ_ia32.sh b/environ_ia32.sh deleted file mode 100644 index 816d6fd..0000000 --- a/environ_ia32.sh +++ /dev/null @@ -1,6 +0,0 @@ -# KallistiOS environment variable settings. These are the shared pieces -# for the ia32/i386 platform. - -#export KOS_CFLAGS="${KOS_CFLAGS}" -#export KOS_AFLAGS="${KOS_AFLAGS}" -export KOS_LDFLAGS="${KOS_LDFLAGS} -Wl,-Ttext=0x00010000" diff --git a/environ_ps2.sh b/environ_ps2.sh deleted file mode 100644 index e8130e1..0000000 --- a/environ_ps2.sh +++ /dev/null @@ -1,6 +0,0 @@ -# KallistiOS environment variable settings. These are the shared pieces -# for the PS2(tm) platform. - -#export KOS_CFLAGS="${KOS_CFLAGS}" -export KOS_AFLAGS="${KOS_AFLAGS} -Wa,-EL -Wa,-mips3 -Wa,-mcpu=r5900 -I${KOS_BASE}/kernel/arch/${KOS_ARCH}/include -c" -export KOS_LDFLAGS="${KOS_LDFLAGS} -Wl,-T${KOS_BASE}/kernel/arch/${KOS_ARCH}/link-${KOS_SUBARCH}.ld" diff --git a/examples/gba/Makefile b/examples/gba/Makefile deleted file mode 100644 index ca2bfc6..0000000 --- a/examples/gba/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# KallistiOS ##version## -# -# examples/gba/Makefile -# (c)2001 Dan Potter -# - -all: - $(KOS_MAKE) -C pogo-keen - -clean: - $(KOS_MAKE) -C pogo-keen clean - - diff --git a/examples/gba/pogo-keen/Makefile b/examples/gba/pogo-keen/Makefile deleted file mode 100644 index 7aa8186..0000000 --- a/examples/gba/pogo-keen/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# KallistiOS 1.1.6 -# -# pogo-keen/Makefile -# (c)2002 Gil Megidish -# - -all: pogo-keen.gba - -include $(KOS_BASE)/Makefile.rules - -OBJS = pogo.o - -clean: - -rm -f $(OBJS) - -rm -f pogo-keen.gba - -rm -f pogo-keen.elf - -rm -f romdisk_boot.o - -rm -f romdisk_boot.img - -pogo-keen.gba: pogo-keen.elf - $(KOS_BASE)/utils/gba-elf2bin/gba-elf2bin pogo-keen.elf pogo-keen.gba - -rm -f pogo-keen.elf - -DATAOBJS = romdisk_boot.o -pogo-keen.elf: $(OBJS) $(DATAOBJS) - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o pogo-keen.elf \ - $(KOS_START) $(OBJS) $(DATAOBJS) $(OBJEXTRA) -L$(KOS_BASE)/lib -lkallisti -lgcc - -romdisk_boot.o: - $(KOS_GENROMFS) -f romdisk_boot.img -d romdisk_boot -v - $(KOS_BASE)/utils/bin2o/bin2o romdisk_boot.img romdisk_boot romdisk_boot.o - diff --git a/examples/gba/pogo-keen/pogo.c b/examples/gba/pogo-keen/pogo.c deleted file mode 100644 index 6194ac0..0000000 --- a/examples/gba/pogo-keen/pogo.c +++ /dev/null @@ -1,197 +0,0 @@ - -/* KallistiOS ##version## - - pogo.c - (c)2002 Gil Megidish - -*/ - -/* - -This is an inefficient example of how to get your KOS GBA code kicking; it -shows Commander Keen (animation by Blackeye Software,) jumping around with -his pogo stick. - -Absolutely not the way to write games; but this is just to show basic -guidelines of initializing and using the romdisk filesystem with the gba, -and the use of video registers directly. - -*/ - -#include <gba/video.h> -#include <gba/keys.h> -#include <kos.h> -#include <kos/pcx.h> - -extern uint8 romdisk_boot[]; - -void arm_irq_handler() { } - -static uint16 pogo_bitmaps[7][48 * 48]; - -static uint16 *get_pogo_bitmap(int index) { - return pogo_bitmaps[index]; -} - -void gba_setmode(int mode, int bg) { - REG_DISPCNT = mode | (1 << (bg + 8)); -} - -static int sequence = 0; -static int pogo_x = (240 + 48) / 2; -static int pogo_y = (160 - 48); -static int pogo_xmax = 240 - 48 - 1; -static int pogo_ymax = 160 - 48; -static int pogo_dir = 0; - -#define RGB16(r,g,b) ((r>>3) | ((g>>3) << 5) | ((b>>3) << 10)) - -static void draw_bitmap(uint16 *rgb) { - /* this will draw a 48x48 rgb bitmap onto a 16bit video buffer */ - uint16 color; - uint16 *ptr; - int direction; - int i, j; - - ptr = (uint16*)PTR_VID_0 + (pogo_y * 240) + pogo_x; - - if(pogo_dir == 0) - direction = 1; - else { - /* facing right */ - direction = -1; - ptr = ptr + 48; - } - - for(j = 0; j < 48; j++) { - for(i = 0; i < 48; i++) { - color = *rgb++; - - if(color == RGB16(0xff, 0, 0xff)) - color = 0; - - *ptr = color; - ptr = ptr + direction; - } - - ptr = ptr + 240 - (48 * direction); - } -} - -static void animate() { - uint16 *bitmap; - - bitmap = get_pogo_bitmap(sequence); - draw_bitmap(bitmap); -} - -static void wait() { - volatile uint32 *status; - - /* wait for a full vsync */ - status = (uint32*)0x4000004; - - while((*status & 1) == 0); - - while((*status & 1) == 1); -} - -static void sleep(int n) { - while(n > 0) { - wait(); - --n; - } -} - -static void check_keys() { - int keys; - - keys = REG_KEYS; - - if((keys & KEY_LEFT) == 0) { - /* left */ - --pogo_x; - - if(pogo_x < 0) - pogo_x = 0; - - pogo_dir = 0; - } - - if((keys & KEY_RIGHT) == 0) { - /* right */ - ++pogo_x; - - if(pogo_x > pogo_xmax) - pogo_x = pogo_xmax; - - pogo_dir = 1; - } - - if((keys & KEY_UP) == 0) { - /* up */ - --pogo_y; ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-06-05 21:11: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 2301649311ec1eeb4efad496d11d8829c80b7985 (commit) from 447092cd714bf88c3e7c65c258f1734171f4df1c (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 2301649311ec1eeb4efad496d11d8829c80b7985 Author: Lawrence Sebald <ljs...@us...> Date: Wed Jun 5 17:11:24 2013 -0400 Fix a major bug in the mic driver and change how it works internally. ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 7 +- kernel/arch/dreamcast/hardware/maple/sip.c | 132 ++++---------------------- kernel/arch/dreamcast/include/dc/maple/sip.h | 62 +++++-------- 3 files changed, 47 insertions(+), 154 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index e09d43f..7b90de7 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,7 +3,12 @@ applicable platform is listed. If someone besides me found the bug or suggested the fix, I'll put their name in [ ]. KallistiOS version 2.0.1 ----------------------------------------------- -- *** Clean up generated stubs files on a make clean [Lawrence Sebald = LS] +- *** Cleaned up generated stubs files on a make clean [Lawrence Sebald = LS] +- DC Added a function to detect if the program is being run on a retail + Dreamcast or a Set5.xx device [LS] +- DC Fixed an issue with the SIP driver that would cause programs to freeze + if a microphone was connected at program startup [LS] +- DC Rearranged the SIP driver to get rid of the internal buffer [LS] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] diff --git a/kernel/arch/dreamcast/hardware/maple/sip.c b/kernel/arch/dreamcast/hardware/maple/sip.c index 93862af..29d812c 100644 --- a/kernel/arch/dreamcast/hardware/maple/sip.c +++ b/kernel/arch/dreamcast/hardware/maple/sip.c @@ -1,7 +1,7 @@ /* KallistiOS ##version## sip.c - Copyright (C) 2005, 2008 Lawrence Sebald + Copyright (C) 2005, 2008, 2013 Lawrence Sebald */ #include <assert.h> @@ -52,6 +52,7 @@ static void sip_stop_sampling_cb(maple_frame_t *frame) { /* Clear the is_sampling flag. */ sip = (sip_state_t *)frame->dev->status; sip->is_sampling = 0; + sip->callback = NULL; /* Wake up! */ genwait_wake_all(frame); @@ -112,7 +113,7 @@ int sip_set_frequency(maple_device_t *dev, unsigned int freq) { return MAPLE_EOK; } -int sip_start_sampling(maple_device_t *dev, int block) { +int sip_start_sampling(maple_device_t *dev, sip_sample_cb cb, int block) { sip_state_t *sip; uint32 *send_buf; @@ -120,14 +121,16 @@ int sip_start_sampling(maple_device_t *dev, int block) { sip = (sip_state_t *)dev->status; - /* Make sure we aren't yet sampling */ - if(sip->is_sampling) + /* Make sure we aren't yet sampling and that the callback is sane. */ + if(sip->is_sampling || !cb) return MAPLE_EFAIL; /* Lock the frame */ if(maple_frame_lock(&dev->frame) < 0) return MAPLE_EAGAIN; + sip->callback = cb; + /* Reset the frame */ maple_frame_init(&dev->frame); send_buf = (uint32 *)dev->frame.recv_buf; @@ -204,76 +207,10 @@ int sip_stop_sampling(maple_device_t *dev, int block) { return MAPLE_EOK; } -uint8 *sip_get_samples(maple_device_t *dev, size_t *sz) { - sip_state_t *sip; - uint8 *rv; - uint32 old; - - assert(dev != NULL); - assert(sz != NULL); - - /* Disable interrupts so that nothing changes underneath us. */ - old = irq_disable(); - - sip = (sip_state_t *)dev->status; - - /* Make sure that we're not currently sampling. */ - if(sip->is_sampling) { - irq_restore(old); - *sz = (size_t) - 1; - return NULL; - } - - /* Grab the values to return. */ - *sz = sip->buf_pos; - rv = sip->samples_buf; - - /* Allocate us a new buffer. */ - sip->buf_pos = 0; - sip->samples_buf = (uint8 *)malloc(11025 * 2 * 10); - - if(sip->samples_buf == NULL) { - sip->buf_len = 0; - dev->status_valid = 0; - } - else { - sip->buf_len = 11025 * 2 * 10; - dev->status_valid = 1; - } - - irq_restore(old); - return rv; -} - -int sip_clear_samples(maple_device_t *dev) { - sip_state_t *sip; - uint32 old; - - assert(dev != NULL); - - /* Disable IRQs so that nothing changes under us */ - old = irq_disable(); - - sip = (sip_state_t *)dev->status; - - if(sip->is_sampling) { - irq_restore(old); - return MAPLE_EFAIL; - } - - sip->buf_pos = 0; - - irq_restore(old); - - return MAPLE_EOK; -} - static void sip_reply(maple_frame_t *frm) { maple_response_t *resp; uint32 *respbuf; - size_t sz; sip_state_t *sip; - void *tmp; /* Unlock the frame now (it's ok, we're in an IRQ) */ maple_frame_unlock(frm); @@ -293,24 +230,9 @@ static void sip_reply(maple_frame_t *frm) { sip = (sip_state_t *)frm->dev->status; frm->dev->status_valid = 1; - if(sip->is_sampling) { - sz = resp->data_len * 4 - 8; - - /* Resize the buffer, if it is needed. */ - if(sz + sip->buf_pos > sip->buf_len) { - /* Attempt to double the buffer size. */ - tmp = realloc(sip->samples_buf, sip->buf_len << 1); - - if(!tmp) { - return; - } - - sip->samples_buf = tmp; - sip->buf_len <<= 1; - } - - memcpy(sip->samples_buf + sip->buf_pos, resp->data + 8, sz); - sip->buf_pos += sz; + if(sip->is_sampling && sip->callback) { + /* Call the user's callback. */ + sip->callback(frm->dev, resp->data + 8, (resp->data_len << 2) - 8); } } } @@ -322,7 +244,7 @@ static int sip_poll(maple_device_t *dev) { sip = (sip_state_t *)dev->status; /* Test to make sure that the particular mic is enabled */ - if(!sip->is_sampling) { + if(!sip->is_sampling || !sip->callback) { dev->status_valid = 1; return 0; } @@ -354,32 +276,12 @@ static void sip_periodic(maple_driver_t *drv) { static int sip_attach(maple_driver_t *drv, maple_device_t *dev) { sip_state_t *sip; - /* Allocate the sample buffer for 10 seconds worth of samples (11.025kHz, - 16-bit signed samples). */ - sip = (sip_state_t *)dev->status; - sip->samples_buf = (uint8 *)malloc(11025 * 2 * 10); - - if(sip->samples_buf == NULL) { - return -1; - } - else { - sip->is_sampling = 0; - sip->amp_gain = SIP_DEFAULT_GAIN; - sip->buf_pos = 0; - sip->buf_len = 11025 * 2 * 10; - dev->status_valid = 1; - return 0; - } -} - -static void sip_detach(maple_driver_t *drv, maple_device_t *dev) { - sip_state_t *sip; - sip = (sip_state_t *)dev->status; - - if(sip->samples_buf) { - free(sip->samples_buf); - } + sip->is_sampling = 0; + sip->amp_gain = SIP_DEFAULT_GAIN; + sip->callback = NULL; + dev->status_valid = 1; + return 0; } /* Device Driver Struct */ @@ -393,7 +295,7 @@ periodic: attach: sip_attach, detach: - sip_detach + NULL }; /* Add the SIP to the driver chain */ diff --git a/kernel/arch/dreamcast/include/dc/maple/sip.h b/kernel/arch/dreamcast/include/dc/maple/sip.h index e58bbf6..51aabae 100644 --- a/kernel/arch/dreamcast/include/dc/maple/sip.h +++ b/kernel/arch/dreamcast/include/dc/maple/sip.h @@ -1,7 +1,7 @@ /* KallistiOS ##version## dc/maple/sip.h - Copyright (C) 2005, 2008, 2010 Lawrence Sebald + Copyright (C) 2005, 2008, 2010, 2013 Lawrence Sebald */ @@ -28,6 +28,23 @@ __BEGIN_DECLS #include <sys/types.h> #include <dc/maple.h> +/** \brief Type for a microphone sample callback. + + This is the signature that is required for a function to accept samples + from the microphone as it is sampling. This function will be called about + once per frame, and in an interrupt context (so it should be pretty quick + to execute). Basically, all you should do in one of these is copy the + samples out to your own buffer -- do not do any processing on the samples + in your callback other than to copy them out! + + \param dev The device the samples are coming from. + \param samples Pointer to the sample buffer. + \param len The number of bytes in the sample buffer. + + \headerfile dc/maple/sip.h +*/ +typedef void (*sip_sample_cb)(maple_device_t *dev, uint8 *samples, size_t len); + /** \brief SIP status structure. This structure contains information about the status of the microphone @@ -51,14 +68,8 @@ typedef struct sip_state { /** \brief Is the mic currently sampling? */ int is_sampling; - /** \brief How long is the samples buffer? */ - size_t buf_len; - - /** \brief What is the last place written to in the buffer? */ - off_t buf_pos; - - /** \brief Buffer for storing samples in (automatically allocated). */ - uint8 *samples_buf; + /** \brief Sampling callback. */ + sip_sample_cb callback; } sip_state_t; /** \brief Get recorded samples from the microphone device. @@ -156,15 +167,17 @@ int sip_set_frequency(maple_device_t *dev, unsigned int freq); This function informs a microphone it should start recording samples. \param dev The device to start sampling on. + \param cb A callback to call when samples are ready. \param block Set to 1 to wait for the SIP to start sampling. Otherwise check the is_sampling member of the status for dev to know when it has started. \retval MAPLE_EOK On success. \retval MAPLE_EAGAIN If the command couldn't be sent, try again later. - \retval MAPLE_EFAIL If the microphone is already sampling. + \retval MAPLE_EFAIL If the microphone is already sampling or the + callback function is NULL. \retval MAPLE_ETIMEOUT If the command timed out while blocking. */ -int sip_start_sampling(maple_device_t *dev, int block); +int sip_start_sampling(maple_device_t *dev, sip_sample_cb cb, int block); /** \brief Stop sampling on a microphone. @@ -181,33 +194,6 @@ int sip_start_sampling(maple_device_t *dev, int block); */ int sip_stop_sampling(maple_device_t *dev, int block); -/** \brief Retrieve the sample buffer from the microphone. - - This function retrieves the sample buffer from the microphone and allocates - a new buffer for the microphone to record into. This function cannot be - called while the microphone is sampling. The caller is responsible for the - buffer returned, and must free the buffer when it is done with it. - - \param dev The device to fetch samples for. - \param sz On return, the size of the sample buffer in bytes. - This must not be NULL. - \return The sample buffer on success, NULL on failure. -*/ -uint8 *sip_get_samples(maple_device_t *dev, size_t *sz); - -/** \brief Clear the sample buffer of a microphone. - - This function clears out any old samples on the microphone buffer so that - recording will start from the beginning of the buffer again. This does not - resize the buffer in any way. This function will not work if called while - the microphone is sampling. - - \param dev The device to clear the buffer on. - \retval MAPLE_EOK On success. - \retval MAPLE_EFAIL If the device is currently sampling. -*/ -int sip_clear_samples(maple_device_t *dev); - /* \cond */ /* Init / Shutdown */ int sip_init(); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-05-31 03:15:06
|
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 447092cd714bf88c3e7c65c258f1734171f4df1c (commit) from b74b342ce48947e98d6da8141f9eb4fb3c091b9e (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 447092cd714bf88c3e7c65c258f1734171f4df1c Author: Lawrence Sebald <ljs...@us...> Date: Thu May 30 23:13:56 2013 -0400 A few minor changes to dc-chain. 1. Get rid of the #! line, since Makefiles really shouldn't have one. 2. Use the -d flag to make instead of changing into the directory with cd. 3. Get rid of the +x bit on the Makefile. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/Makefile | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) mode change 100755 => 100644 utils/dc-chain/Makefile diff --git a/utils/dc-chain/Makefile b/utils/dc-chain/Makefile old mode 100755 new mode 100644 index 4dc1184..d37f83e --- a/utils/dc-chain/Makefile +++ b/utils/dc-chain/Makefile @@ -1,4 +1,3 @@ -#!/bin/bash # Dreamcast toolchain makefile by Jim Ursetto # adapted from Stalin's build script version 0.3 # @@ -85,16 +84,16 @@ patch-newlib: $(newlib_patches) patch-kos: $(kos_patches) $(newlib_patches): - cd $(newlib_dir); patch -p1 < $@ + patch -d $(newlib_dir) -p1 < $@ $(binutils_patches): - cd $(binutils_dir); patch -p1 < $@ + patch -d $(binutils_dir) -p1 < $@ $(gcc_patches): - cd $(gcc_dir); patch -p1 < $@ + patch -d $(gcc_dir) -p1 < $@ $(kos_patches): - cd $(kos_root); patch -p1 < $@ + patch -d $(kos_root) -p1 < $@ # ---- }}} hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Harley L. <los...@us...> - 2013-05-30 23:17:15
|
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 Lua.". The branch, 5.2 has been created at 553f7a82a2fcd4ad4baf8e360b43d13c82f1e5d6 (commit) - Log ----------------------------------------------------------------- commit 553f7a82a2fcd4ad4baf8e360b43d13c82f1e5d6 Author: Harley Laue <los...@gm...> Date: Thu May 30 18:15:53 2013 -0500 Update to 5.2 ----------------------------------------------------------------------- hooks/post-receive -- The KallistiOS port of Lua. |
From: Lawrence S. <ljs...@us...> - 2013-05-29 21:49:47
|
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 b74b342ce48947e98d6da8141f9eb4fb3c091b9e (commit) from 230f8ecb8121562534cfef55fccac2d6eb5d788c (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 b74b342ce48947e98d6da8141f9eb4fb3c091b9e Author: Lawrence Sebald <ljs...@us...> Date: Wed May 29 17:49:11 2013 -0400 Add a function that effectively is only there to detect whether you're on a retail Dreamcast or a Set5.xx devkit. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/hardware.c | 14 ++++++++- kernel/arch/dreamcast/include/arch/arch.h | 44 +++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/hardware.c b/kernel/arch/dreamcast/hardware/hardware.c index f9a4a0c..312150d 100644 --- a/kernel/arch/dreamcast/hardware/hardware.c +++ b/kernel/arch/dreamcast/hardware/hardware.c @@ -1,7 +1,8 @@ /* KallistiOS ##version## hardware.c - (c)2000-2001 Dan Potter + Copyright (C) 2000-2001 Dan Potter + Copyright (C) 2013 Lawrence Sebald */ #include <arch/arch.h> @@ -16,6 +17,17 @@ static int initted = 0; +#define SYSMODE_REG 0xA05F74B0 + +int hardware_sys_mode(int *region) { + uint32 sm = *((vuint32 *)SYSMODE_REG); + + if(region) + *region = sm & 0x0F; + + return (sm >> 4) & 0x0F; +} + int hardware_sys_init() { /* Setup ASIC stuff */ asic_init(); diff --git a/kernel/arch/dreamcast/include/arch/arch.h b/kernel/arch/dreamcast/include/arch/arch.h index 76413a8..184889b 100644 --- a/kernel/arch/dreamcast/include/arch/arch.h +++ b/kernel/arch/dreamcast/include/arch/arch.h @@ -219,6 +219,50 @@ int hardware_periph_init(); */ void hardware_shutdown(); +/** \defgroup hw_consoles Console types + + These are the various console types that can be returned by the + hardware_sys_mode() function. + + @{ +*/ +#define HW_TYPE_RETAIL 0x0 /**< \brief A retail Dreamcast. */ +#define HW_TYPE_SET5 0x9 /**< \brief A Set5.xx devkit. */ +/** @} */ + +/** \defgroup hw_regions Region codes + + These are the various region codes that can be returned by the + hardware_sys_mode() function. Note that a retail Dreamcast will always + return 0 for the region code. You must read the region of a retail device + from the flashrom. + + \see fr_region + \see flashrom_get_region() + + @{ +*/ +#define HW_REGION_UNKNOWN 0x0 /**< \brief Unknown region. */ +#define HW_REGION_ASIA 0x1 /**< \brief Japan/Asia (NTSC) */ +#define HW_REGION_US 0x4 /**< \brief North America */ +#define HW_REGION_EUROPE 0xC /**< \brief Europe (PAL) */ +/** @} */ + +/** \brief Retrieve the system mode of the console in use. + + This function retrieves the system mode register of the console that is in + use. This register details the actual system type in use (and in some system + types the region of the device). + + \param region On return, the region code (one of the + \ref hw_regions) of the device if the console type + allows reading it through the system mode register + -- otherwise, you must retrieve the region from the + flashrom. + \return The console type (one of the \ref hw_consoles). +*/ +int hardware_sys_mode(int *region); + /* These three aught to be in their own header file at some point, but for now, they'll stay here. */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-05-29 16:48:55
|
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 serial program loader for the Dreamcast.". The branch, master has been updated via 21fb648175fa4b4146db2d8568a31e8f7fc0eb16 (commit) from 91bb4e650355021e9ca7466680c8da2719b6782f (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 21fb648175fa4b4146db2d8568a31e8f7fc0eb16 Author: Lawrence Sebald <ljs...@us...> Date: Wed May 29 12:48:34 2013 -0400 Remove a couple of unneeded files that I missed last commit... ----------------------------------------------------------------------- Summary of changes: target-src/1st_read/crt0.S | 99 ------------------------------- target-src/1st_read/memcmp.c | 105 --------------------------------- target-src/1st_read/memmove.c | 128 ----------------------------------------- 3 files changed, 0 insertions(+), 332 deletions(-) delete mode 100644 target-src/1st_read/crt0.S delete mode 100644 target-src/1st_read/memcmp.c delete mode 100644 target-src/1st_read/memmove.c diff --git a/target-src/1st_read/crt0.S b/target-src/1st_read/crt0.S deleted file mode 100644 index 1af82cc..0000000 --- a/target-src/1st_read/crt0.S +++ /dev/null @@ -1,99 +0,0 @@ - .section .text - .global start - .global _atexit -start: - mov.l setup_cache_k,r0 - mov.l p2_mask,r1 - or r1,r0 - jmp @r0 - nop -setup_cache: - mov.l ccr_addr,r0 - mov.w ccr_data,r1 - mov.l r1,@r0 - mov.l start_2_k,r0 - nop - nop - nop - nop - nop - nop - nop - jmp @r0 - nop -start_2: - mov.l old_stack_k,r14 - mov.l r15,@r14 - mov.l old_pr_k,r14 - sts pr,r15 - mov.l r15,@r14 - mov.l stack_k,r15 - - ! zero out bss - mov.l edata_k,r0 - mov.l end_k,r1 - mov #0,r2 -start_l: - mov.l r2,@r0 - add #4,r0 - cmp/ge r0,r1 - bt start_l - - mov.l set_fpscr_k, r1 - jsr @r1 - mov #0,r4 - lds r3,fpscr - - ! call the mainline - mov.l main_k,r0 - jsr @r0 - nop - - mov.l old_pr_k,r14 - mov.l @r14,r15 - lds r15,pr - mov.l old_stack_k,r14 - mov.l @r14,r15 - -_atexit: - rts - nop - - .align 4 -set_fpscr_k: - .long ___set_fpscr -stack_k: - .long _stack -edata_k: - .long _edata -end_k: - .long _end -main_k: - .long _main -old_stack_k: - .long _old_stack -old_pr_k: - .long _old_pr -_old_stack: - .long 0 -_old_pr: - .long 0 -setup_cache_k: - .long setup_cache -start_2_k: - .long start_2 -p2_mask: - .long 0xa0000000 -ccr_addr: - .long 0xff00001c -ccr_data: - .word 0x090b - - .align 4 - -#ifdef __ELF__ - .section .stack,"aw" -#else - .section .stack -#endif - diff --git a/target-src/1st_read/memcmp.c b/target-src/1st_read/memcmp.c deleted file mode 100644 index 40b803d..0000000 --- a/target-src/1st_read/memcmp.c +++ /dev/null @@ -1,105 +0,0 @@ -/* -FUNCTION - <<memcmp>>---compare two memory areas - -INDEX - memcmp - -ANSI_SYNOPSIS - #include <string.h> - int memcmp(const void *<[s1]>, const void *<[s2]>, size_t <[n]>); - -TRAD_SYNOPSIS - #include <string.h> - int memcmp(<[s1]>, <[s2]>, <[n]>) - void *<[s1]>; - void *<[s2]>; - size_t <[n]>; - -DESCRIPTION - This function compares not more than <[n]> characters of the - object pointed to by <[s1]> with the object pointed to by <[s2]>. - - -RETURNS - The function returns an integer greater than, equal to or - less than zero according to whether the object pointed to by - <[s1]> is greater than, equal to or less than the object - pointed to by <[s2]>. - -PORTABILITY -<<memcmp>> is ANSI C. - -<<memcmp>> requires no supporting OS subroutines. - -QUICKREF - memcmp ansi pure -*/ - -#include <string.h> - - -/* Nonzero if either X or Y is not aligned on a "long" boundary. */ -#define UNALIGNED(X, Y) \ - (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) - -/* How many bytes are copied each iteration of the word copy loop. */ -#define LBLOCKSIZE (sizeof (long)) - -/* Threshhold for punting to the byte copier. */ -#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE) - -int -_DEFUN(memcmp, (m1, m2, n), - _CONST _PTR m1 _AND _CONST _PTR m2 _AND size_t n) -{ -#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) - unsigned char *s1 = (unsigned char *) m1; - unsigned char *s2 = (unsigned char *) m2; - - while (n--) { - if (*s1 != *s2) { - return *s1 - *s2; - } - s1++; - s2++; - } - return 0; -#else - unsigned char *s1 = (unsigned char *) m1; - unsigned char *s2 = (unsigned char *) m2; - unsigned long *a1; - unsigned long *a2; - - /* If the size is too small, or either pointer is unaligned, - then we punt to the byte compare loop. Hopefully this will - not turn up in inner loops. */ - if (!TOO_SMALL(n) && !UNALIGNED(s1, s2)) { - /* Otherwise, load and compare the blocks of memory one - word at a time. */ - a1 = (unsigned long *) s1; - a2 = (unsigned long *) s2; - while (n >= LBLOCKSIZE) { - if (*a1 != *a2) - break; - a1++; - a2++; - n -= LBLOCKSIZE; - } - - /* check m mod LBLOCKSIZE remaining characters */ - - s1 = (char *) a1; - s2 = (char *) a2; - } - - while (n--) { - if (*s1 != *s2) - return *s1 - *s2; - s1++; - s2++; - } - - return 0; -#endif /* not PREFER_SIZE_OVER_SPEED */ -} diff --git a/target-src/1st_read/memmove.c b/target-src/1st_read/memmove.c deleted file mode 100644 index bb4fbf2..0000000 --- a/target-src/1st_read/memmove.c +++ /dev/null @@ -1,128 +0,0 @@ -/* -FUNCTION - <<memmove>>---move possibly overlapping memory - -INDEX - memmove - -ANSI_SYNOPSIS - #include <string.h> - void *memmove(void *<[dst]>, const void *<[src]>, size_t <[length]>); - -TRAD_SYNOPSIS - #include <string.h> - void *memmove(<[dst]>, <[src]>, <[length]>) - void *<[dst]>; - void *<[src]>; - size_t <[length]>; - -DESCRIPTION - This function moves <[length]> characters from the block of - memory starting at <<*<[src]>>> to the memory starting at - <<*<[dst]>>>. <<memmove>> reproduces the characters correctly - at <<*<[dst]>>> even if the two areas overlap. - - -RETURNS - The function returns <[dst]> as passed. - -PORTABILITY -<<memmove>> is ANSI C. - -<<memmove>> requires no supporting OS subroutines. - -QUICKREF - memmove ansi pure -*/ - -#include <string.h> -#include <_ansi.h> -#include <stddef.h> -#include <limits.h> - -/* Nonzero if either X or Y is not aligned on a "long" boundary. */ -#define UNALIGNED(X, Y) \ - (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) - -/* How many bytes are copied each iteration of the 4X unrolled loop. */ -#define BIGBLOCKSIZE (sizeof (long) << 2) - -/* How many bytes are copied each iteration of the word copy loop. */ -#define LITTLEBLOCKSIZE (sizeof (long)) - -/* Threshhold for punting to the byte copier. */ -#define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE) - -/*SUPPRESS 20*/ -_PTR -_DEFUN(memmove, (dst_void, src_void, length), - _PTR dst_void _AND _CONST _PTR src_void _AND size_t length) -{ -#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) - char *dst = dst_void; - _CONST char *src = src_void; - - if (src < dst && dst < src + length) { - /* Have to copy backwards */ - src += length; - dst += length; - while (length--) { - *--dst = *--src; - } - } else { - while (length--) { - *dst++ = *src++; - } - } - - return dst_void; -#else - char *dst = dst_void; - _CONST char *src = src_void; - long *aligned_dst; - _CONST long *aligned_src; - int len = length; - - if (src < dst && dst < src + len) { - /* Destructive overlap...have to copy backwards */ - src += len; - dst += len; - while (len--) { - *--dst = *--src; - } - } else { - /* Use optimizing algorithm for a non-destructive copy to closely - match memcpy. If the size is small or either SRC or DST is unaligned, - then punt into the byte copy loop. This should be rare. */ - if (!TOO_SMALL(len) && !UNALIGNED(src, dst)) { - aligned_dst = (long *) dst; - aligned_src = (long *) src; - - /* Copy 4X long words at a time if possible. */ - while (len >= BIGBLOCKSIZE) { - *aligned_dst++ = *aligned_src++; - *aligned_dst++ = *aligned_src++; - *aligned_dst++ = *aligned_src++; - *aligned_dst++ = *aligned_src++; - len -= BIGBLOCKSIZE; - } - - /* Copy one long word at a time if possible. */ - while (len >= LITTLEBLOCKSIZE) { - *aligned_dst++ = *aligned_src++; - len -= LITTLEBLOCKSIZE; - } - - /* Pick up any residual with a byte copier. */ - dst = (char *) aligned_dst; - src = (char *) aligned_src; - } - - while (len--) { - *dst++ = *src++; - } - } - - return dst_void; -#endif /* not PREFER_SIZE_OVER_SPEED */ -} hooks/post-receive -- A serial program loader for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-05-29 16:35: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 serial program loader for the Dreamcast.". The branch, master has been updated via 91bb4e650355021e9ca7466680c8da2719b6782f (commit) from b5ee0cb923b04023a44b6186fb1687691f887afc (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 91bb4e650355021e9ca7466680c8da2719b6782f Author: Lawrence Sebald <ljs...@us...> Date: Wed May 29 12:35:15 2013 -0400 Fix dcload-serial for GCC 4.x ----------------------------------------------------------------------- Summary of changes: .gitignore | 9 +- README | 2 +- target-src/1st_read/1st_read.c | 45 ------ target-src/1st_read/Makefile | 62 ++------ target-src/1st_read/asm.h | 22 --- target-src/1st_read/dc3.x | 228 ----------------------------- target-src/1st_read/dc4.x | 228 ----------------------------- target-src/1st_read/disable.s | 38 +++--- target-src/1st_read/loader.s | 98 ++++++++++++ target-src/1st_read/memcpy.S | 221 ---------------------------- target-src/1st_read/memset.S | 64 -------- target-src/dcload/Makefile | 2 +- target-src/dcload/dcload.c | 2 +- target-src/dcload/{dcload3.x => dcload.x} | 0 target-src/dcload/dcload4.x | 228 ----------------------------- target-src/dcload/go.s | 2 +- 16 files changed, 140 insertions(+), 1111 deletions(-) delete mode 100644 target-src/1st_read/1st_read.c delete mode 100644 target-src/1st_read/asm.h delete mode 100644 target-src/1st_read/dc3.x delete mode 100644 target-src/1st_read/dc4.x create mode 100644 target-src/1st_read/loader.s delete mode 100644 target-src/1st_read/memcpy.S delete mode 100644 target-src/1st_read/memset.S rename target-src/dcload/{dcload3.x => dcload.x} (100%) delete mode 100644 target-src/dcload/dcload4.x diff --git a/.gitignore b/.gitignore index 43f7004..8c215f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -.o -.bin -.lzo -.srec - +*.o +*.bin +*.lzo +*.srec diff --git a/README b/README index 1b165c6..9bc07ed 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -dcload 1.0.4 - a Dreamcast serial loader by <an...@na...> +dcload 1.0.5 - a Dreamcast serial loader by <an...@na...> Features diff --git a/target-src/1st_read/1st_read.c b/target-src/1st_read/1st_read.c deleted file mode 100644 index 6fe3df3..0000000 --- a/target-src/1st_read/1st_read.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of the dcload Dreamcast serial loader - * - * Copyright (C) 2001 Andrew Kieschnick <andrewk@napalm-xcom> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include "minilzo.h" - -extern char binary_dcload_lzo_start[]; -extern char binary_exception_lzo_start[]; -extern unsigned int binary_dcload_lzo_size[]; -extern unsigned int binary_exception_lzo_size[]; - -#define TARGET1 (char *)0x8c004000 -#define TARGET2 (char *)0x8c00f400 - -extern void disable_cache(void); - -int main(void) -{ - unsigned int n; - - lzo_init(); - - lzo1x_decompress(binary_dcload_lzo_start, binary_dcload_lzo_size, TARGET1, &n, 0); - lzo1x_decompress(binary_exception_lzo_start, binary_exception_lzo_size, TARGET2, &n, 0); - - disable_cache(); - (*(void (*)()) 0x8c004000) (); -} diff --git a/target-src/1st_read/Makefile b/target-src/1st_read/Makefile index 0de24e7..bffede7 100644 --- a/target-src/1st_read/Makefile +++ b/target-src/1st_read/Makefile @@ -1,55 +1,23 @@ include ../../Makefile.cfg -LZOPATH = ../../minilzo.106 +TARGET = 1st_read.bin -CC = $(TARGETCC) -CFLAGS = $(TARGETCFLAGS) -INCLUDE = -I../dcload -I$(LZOPATH) -I../../target-inc -OBJCOPY = $(TARGETOBJCOPY) -LD = $(TARGETLD) - -OBJECTS = crt0.o 1st_read.o disable.o memcpy.o memset.o memmove.o memcmp.o minilzo.o dcload.o exception.o -LZOFILES = $(LZOPATH)/minilzo.c $(LZOPATH)/minilzo.h $(LZOPATH)/lzoconf.h - -.c.o: - $(CC) $(CFLAGS) $(INCLUDE) -o $@ -c $< - -.S.o: - $(CC) $(CFLAGS) $(INCLUDE) -o $@ -c $< - -.s.o: - $(CC) $(CFLAGS) $(INCLUDE) -o $@ -c $< - -all: 1st_read.bin 1st_read.srec - -1st_read.bin: 1st_read - $(OBJCOPY) -O binary $< $@ - -1st_read.srec: 1st_read - $(OBJCOPY) -O srec $< $@ - -1st_read: $(OBJECTS) - $(CC) $(CFLAGS) -Wl,-Tdc$(TARGETCCVER).x -nostartfiles -nostdlib $^ -o $@ -lgcc - -minilzo.o: $(LZOFILES) - $(CC) $(CFLAGS) $(INCLUDE) -o $@ -c $< - -dcload.lzo: ../dcload/dcload.lzo - cp $< $@ - -exception.lzo: ../dcload/exception.lzo - cp $< $@ - -dcload.o: dcload.lzo - $(LD) -A sh -b binary --oformat elf32-shl $< -o $@ -r -EL --no-warn-mismatch - -exception.o: exception.lzo - $(LD) -A sh -b binary --oformat elf32-shl $< -o $@ -r -EL --no-warn-mismatch +all: rm-elf $(TARGET) .PHONY : clean clean: - rm -f $(OBJECTS) 1st_read dcload.lzo exception.lzo + -rm -f $(TARGET) 1st_read.bin loader.elf .PHONY : distclean -distclean: clean - rm -f 1st_read.bin 1st_read.srec +distclean: clean + +.PHONY : rm-elf +rm-elf: + -rm -f $(TARGET) loader.elf + +loader.elf: loader.s disable.s ../dcload/dcload.bin ../dcload/exception.bin + $(TARGETCC) $(TARGETCFLAGS) -o $@ loader.s disable.s -nostartfiles \ + -nostdlib -Ttext=0x8c010000 -Wa,-I../dcload + +1st_read.bin: loader.elf + $(TARGETOBJCOPY) -R .stack -O binary $^ $@ diff --git a/target-src/1st_read/asm.h b/target-src/1st_read/asm.h deleted file mode 100644 index ed27fdb..0000000 --- a/target-src/1st_read/asm.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifdef __STDC__ -# define _C_LABEL(x) _ ## x -#else -# define _C_LABEL(x) _/**/x -#endif -#define _ASM_LABEL(x) x - -#define _ENTRY(name) \ - .text; .align 2; .globl name; name: - -#define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) - -#if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ - || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) -#define DELAYED_BRANCHES -#define SL(branch, dest, in_slot, in_slot_arg2) \ - branch##.s dest; in_slot, in_slot_arg2 -#else -#define SL(branch, dest, in_slot, in_slot_arg2) \ - in_slot, in_slot_arg2; branch dest -#endif diff --git a/target-src/1st_read/dc3.x b/target-src/1st_read/dc3.x deleted file mode 100644 index 5ea23dc..0000000 --- a/target-src/1st_read/dc3.x +++ /dev/null @@ -1,228 +0,0 @@ -/* Sega Dreamcast linker script */ - -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") -OUTPUT_ARCH(sh) -ENTRY(start) - SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); -/* Do we need any of these for elf? - __DYNAMIC = 0; */ - -MEMORY -{ - ram (rwx) : ORIGIN = 0x8c010000, LENGTH = 0xfe0000 -} - -SECTIONS -{ - /* Read-only sections, merged into text segment: */ -/* . = 0x1000;*/ - .interp : { *(.interp) } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rel.init : { *(.rel.init) } - .rela.init : { *(.rela.init) } - .rel.text : - { - *(.rel.text) - *(.rel.text.*) - *(.rel.gnu.linkonce.t*) - } - .rela.text : - { - *(.rela.text) - *(.rela.text.*) - *(.rela.gnu.linkonce.t*) - } - .rel.fini : { *(.rel.fini) } - .rela.fini : { *(.rela.fini) } - .rel.rodata : - { - *(.rel.rodata) - *(.rel.rodata.*) - *(.rel.gnu.linkonce.r*) - } - .rela.rodata : - { - *(.rela.rodata) - *(.rela.rodata.*) - *(.rela.gnu.linkonce.r*) - } - .rel.data : - { - *(.rel.data) - *(.rel.data.*) - *(.rel.gnu.linkonce.d*) - } - .rela.data : - { - *(.rela.data) - *(.rela.data.*) - *(.rela.gnu.linkonce.d*) - } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } - .rela.dtors : { *(.rela.dtors) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.sdata : - { - *(.rel.sdata) - *(.rel.sdata.*) - *(.rel.gnu.linkonce.s*) - } - .rela.sdata : - { - *(.rela.sdata) - *(.rela.sdata.*) - *(.rela.gnu.linkonce.s*) - } - .rel.sbss : { *(.rel.sbss) } - .rela.sbss : { *(.rela.sbss) } - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - .init : - { - KEEP (*(.init)) - } =0 - .plt : { *(.plt) } - .text : - { - *(.text) - *(.text.*) - *(.stub) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - *(.gnu.linkonce.t*) - } =0 - _etext = .; - PROVIDE (etext = .); - .fini : - { - KEEP (*(.fini)) - } =0 - .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) } - .rodata1 : { *(.rodata1) } - /* Adjust the address for the data segment. We want to adjust up to - the same address within the page on the next page up. */ - . = ALIGN(128) + (. & (128 - 1)); - .data : - { - *(.data) - *(.data.*) - *(.gnu.linkonce.d*) - SORT(CONSTRUCTORS) - } - .data1 : { *(.data1) } - .eh_frame : { *(.eh_frame) } - .gcc_except_table : { *(.gcc_except_table) } - .ctors ALIGN(4): - { - ___ctors = .; - /* gcc uses crtbegin.o to find the start of - the constructors, so we make sure it is - first. Because this is a wildcard, it - doesn't matter if the user does not - actually link against crtbegin.o; the - linker won't look for a file to match a - wildcard. The wildcard also means that it - doesn't matter which directory crtbegin.o - is in. */ - KEEP (*crtbegin.o(.ctors)) - /* We don't want to include the .ctor section from - from the crtend.o file until after the sorted ctors. - The .ctor section from the crtend file contains the - end of ctors marker and it must be last */ - KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - ___ctors_end = .; - } - .dtors : - { - ___dtors = .; - KEEP (*crtbegin.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - ___dtors_end = .; - } - .got : { *(.got.plt) *(.got) } - .dynamic : { *(.dynamic) } - /* We want the small data sections together, so single-instruction offsets - can access them all, and initialized data all before uninitialized, so - we can shorten the on-disk segment size. */ - .sdata : - { - *(.sdata) - *(.sdata.*) - *(.gnu.linkonce.s.*) - } - _edata = .; - PROVIDE (edata = .); - __bss_start = .; - .sbss : - { - *(.dynsbss) - *(.sbss) - *(.sbss.*) - *(.scommon) - } - .bss : - { - *(.dynbss) - *(.bss) - *(.bss.*) - *(COMMON) - /* Align here to ensure that the .bss section occupies space up to - _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); - } - . = ALIGN(32 / 8); - _end = .; - PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } -/* .stack 0x8c00f400 : { _stack = .; *(.stack) }*/ - /* These must appear regardless of . */ -_stack = 0x8d000000; -} diff --git a/target-src/1st_read/dc4.x b/target-src/1st_read/dc4.x deleted file mode 100644 index aa78489..0000000 --- a/target-src/1st_read/dc4.x +++ /dev/null @@ -1,228 +0,0 @@ -/* Script for -z combreloc: combine and sort reloc sections */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") -OUTPUT_ARCH(sh) -ENTRY(start) -SEARCH_DIR("/usr/local/dc-new/sh-elf/sh-elf/lib"); -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x8c010000); . = 0x8c010000; - .text : - { - *(.text .stub .text.* .gnu.linkonce.t.*) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - } =0 - .init : - { - KEEP (*(.init)) - } =0 - .fini : - { - KEEP (*(.fini)) - } =0 - .interp : { *(.interp) } - .note.gnu.build-id : { *(.note.gnu.build-id) } - .hash : { *(.hash) } - .gnu.hash : { *(.gnu.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rel.dyn : - { - *(.rel.init) - *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) - *(.rel.fini) - *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) - *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) - *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) - *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) - *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) - *(.rel.ctors) - *(.rel.dtors) - *(.rel.got) - *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) - *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) - *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) - *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) - *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) - } - .rela.dyn : - { - *(.rela.init) - *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) - *(.rela.fini) - *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) - *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) - *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) - *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) - *(.rela.ctors) - *(.rela.dtors) - *(.rela.got) - *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) - *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) - *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) ...<truncated>... hooks/post-receive -- A serial program loader for the Dreamcast. |
From: Lawrence S. <ljs...@us...> - 2013-05-29 16:02: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 serial program loader for the Dreamcast.". The branch, master has been updated via b5ee0cb923b04023a44b6186fb1687691f887afc (commit) via 49666c6f8794d0f1f4b7b10738a414ac2970b724 (commit) from 396e5758df8ce80003cb7059e8064be1b3bc3b0a (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 b5ee0cb923b04023a44b6186fb1687691f887afc Author: Lawrence Sebald <ljs...@us...> Date: Wed May 29 11:56:27 2013 -0400 Change Makefile.cfg to match dc-chain defaults. commit 49666c6f8794d0f1f4b7b10738a414ac2970b724 Author: Lawrence Sebald <ljs...@us...> Date: Wed May 29 11:47:43 2013 -0400 Fix dcload-serial's make-cd Makefile and add a .gitignore. ----------------------------------------------------------------------- Summary of changes: .gitignore | 5 +++++ Makefile.cfg | 4 ++-- make-cd/Makefile | 10 +++++----- 3 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..43f7004 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.o +.bin +.lzo +.srec + diff --git a/Makefile.cfg b/Makefile.cfg index 78519a2..ddcffd8 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -7,7 +7,7 @@ HOSTLDFLAGS = # dc compiler prefix -- this is usually what you used for --prefix when # building your compiler. -TARGETPREFIX = /usr/local/dc/sh-elf +TARGETPREFIX = /opt/toolchains/dc/sh-elf # you may have to change the paths for BFDLIB and BFDINCLUDE to # the correct ones for your system @@ -58,7 +58,7 @@ SERIALDEVICE = /dev/ttyS0 #SERIALDEVICE = COM1 # dir to install dc-tool in -TOOLINSTALLDIR = /usr/local/dc/bin +TOOLINSTALLDIR = /opt/toolchains/dc/bin # uncomment this for cygwin #EXECUTABLEEXTENSION = .exe diff --git a/make-cd/Makefile b/make-cd/Makefile index 3fabfd3..fdf730c 100644 --- a/make-cd/Makefile +++ b/make-cd/Makefile @@ -1,9 +1,9 @@ -CDRECORD = cdrecord dev=0,0,0 speed=8 -#CDRECORD = cdrecord dev=ATAPI:0,0,0 speed=8 +CDRECORD = wodim dev=0,0,0 speed=8 +#CDRECORD = wodim dev=ATAPI:0,0,0 speed=8 SCRAMBLE = scramble DD = dd CP = cp -MKISOFS = mkisofs +MKISOFS = genisoimage CAT = cat TOUCH = touch 1ST_READ = ../target-src/1st_read/1st_read.bin @@ -14,7 +14,7 @@ audio.raw: $(DD) if=/dev/zero of=audio.raw bs=2352 count=300 burn-audio: audio.raw - $(CDRECORD) -multi -audio audio.raw + $(CDRECORD) -multi -audio -tao audio.raw touch burn-audio 1st_read.bin: $(1ST_READ) @@ -27,7 +27,7 @@ tmp.iso: 1st_read.bin burn-audio $(MKISOFS) -C `$(CDRECORD) -msinfo` -o tmp.iso 1st_read.bin burn-data: data.raw - $(CDRECORD) -xa data.raw + $(CDRECORD) -xa -tao -multi data.raw rm -f audio.raw data.raw burn-audio .PHONY : clean hooks/post-receive -- A serial program loader for the Dreamcast. |