From: Guillaume D. <ya...@us...> - 2006-05-14 12:08:11
|
Update of /cvsroot/desmume/desmume/src In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13138/src Modified Files: MMU.hpp Makefile.am Makefile.in NDSSystem.hpp Added Files: FIFO.c FIFO.h Removed Files: FIFO.cpp FIFO.hpp Log Message: FIFO is now in C. --- FIFO.cpp DELETED --- Index: Makefile.in =================================================================== RCS file: /cvsroot/desmume/desmume/src/Makefile.in,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile.in 13 May 2006 22:34:38 -0000 1.12 +++ Makefile.in 14 May 2006 12:08:05 -0000 1.13 @@ -92,7 +92,7 @@ arm_instructions.cpp arm_instructions.hpp \ bios.cpp bios.hpp cp15.cpp cp15.hpp \ Disassembler.cpp Disassembler.hpp \ - FIFO.cpp FIFO.hpp \ + FIFO.c FIFO.h \ GPU.cpp GPU.hpp debug.c debug.h \ MMU.cpp MMU.hpp NDSSystem.cpp NDSSystem.hpp \ thumb_instructions.cpp thumb_instructions.hpp Index: MMU.hpp =================================================================== RCS file: /cvsroot/desmume/desmume/src/MMU.hpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- MMU.hpp 12 May 2006 21:53:26 -0000 1.10 +++ MMU.hpp 14 May 2006 12:08:05 -0000 1.11 @@ -24,7 +24,7 @@ #include "types.h" -#include "FIFO.hpp" +#include "FIFO.h" #define IPCFIFO 0 --- FIFO.hpp DELETED --- Index: NDSSystem.hpp =================================================================== RCS file: /cvsroot/desmume/desmume/src/NDSSystem.hpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- NDSSystem.hpp 14 May 2006 07:18:55 -0000 1.19 +++ NDSSystem.hpp 14 May 2006 12:08:05 -0000 1.20 @@ -26,7 +26,7 @@ #include "types.h" #include "armcpu.h" -#include "FIFO.hpp" +#include "FIFO.h" #include "Disassembler.hpp" #include "GPU.hpp" Index: Makefile.am =================================================================== RCS file: /cvsroot/desmume/desmume/src/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.am 15 Apr 2006 13:12:13 -0000 1.5 +++ Makefile.am 14 May 2006 12:08:05 -0000 1.6 @@ -5,7 +5,7 @@ arm_instructions.cpp arm_instructions.hpp \ bios.cpp bios.hpp cp15.cpp cp15.hpp \ Disassembler.cpp Disassembler.hpp \ - FIFO.cpp FIFO.hpp \ + FIFO.c FIFO.h \ GPU.cpp GPU.hpp debug.c debug.h \ MMU.cpp MMU.hpp NDSSystem.cpp NDSSystem.hpp \ thumb_instructions.cpp thumb_instructions.hpp --- NEW FILE: FIFO.c --- /* Copyright (C) 2006 yopyop yop...@if... yopyop156.ifrance.com This file is part of DeSmuME DeSmuME 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. DeSmuME 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 DeSmuME; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "FIFO.h" void FIFOInit(FIFO * fifo) { unsigned long i; fifo->begin = 0; fifo->end = 0; for(i = 0; i<0x2000; ++i) fifo->data[i] = 0; fifo->full = FALSE; fifo->empty = TRUE; fifo->error = FALSE; } void FIFOAdd(FIFO * fifo, unsigned long v) { if(fifo->full) { fifo->error = TRUE; return; } fifo->data[fifo->end] = v; fifo->end = (fifo->end + 1)& 0x1FFF; fifo->full = (fifo->end == fifo->begin); fifo->empty = FALSE; } unsigned long FIFOValue(FIFO * fifo) { if(fifo->empty) { fifo->error = TRUE; return 0; } unsigned long v = fifo->data[fifo->begin]; fifo->begin = (fifo->begin + 1)& 0x1FFF; fifo->empty = (fifo->begin == fifo->end); return v; } --- NEW FILE: FIFO.h --- /* Copyright (C) 2006 yopyop yop...@if... yopyop156.ifrance.com This file is part of DeSmuME DeSmuME 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. DeSmuME 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 DeSmuME; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef FIFO_H #define FIFO_H #include "types.h" #ifdef __cplusplus extern "C" { #endif typedef struct { unsigned long data[0x2000]; unsigned long begin; unsigned long end; BOOL full; BOOL empty; BOOL error; } FIFO; void FIFOInit(FIFO * fifo); void FIFOAdd(FIFO * fifo, unsigned long v); unsigned long FIFOValue(FIFO * fifo); #ifdef __cplusplus } #endif #endif |