diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/asmmemfuncs.h | 4 | ||||
-rw-r--r-- | src/os9x_65c816.S | 4 | ||||
-rw-r--r-- | src/os9x_65c816_global.S | 2 | ||||
-rw-r--r-- | src/os9x_65c816_global_armv4.S | 2 | ||||
-rw-r--r-- | src/os9x_65c816_spcasm.S | 4 | ||||
-rw-r--r-- | src/os9x_65c816_spcasm.s.last | 4 | ||||
-rw-r--r-- | src/os9x_65c816_spcc.S | 4 | ||||
-rw-r--r-- | src/port.h | 8 | ||||
-rw-r--r-- | src/snes9x.h | 28 |
9 files changed, 37 insertions, 23 deletions
diff --git a/src/asmmemfuncs.h b/src/asmmemfuncs.h index 6fe7853..d1beb1c 100644 --- a/src/asmmemfuncs.h +++ b/src/asmmemfuncs.h @@ -3,7 +3,7 @@ #if defined(ARM_ASM)
#define memset32(_dst, _c, _count) \
-({ uint32_t *dst = (_dst); uint32_t c __asm__ ("r7") = (_c); int count = (_count); uint32_t dummy0 __asm__ ("r4"), dummy1 __asm__ ("r5"), dummy2 __asm__ ("r6"); \
+({ uint32_t *dst = (_dst); register uint32_t c __asm__ ("r7") = (_c); register int count = (_count); register uint32_t dummy0 __asm__ ("r4"), dummy1 __asm__ ("r5"), dummy2 __asm__ ("r6"); \
__asm__ __volatile__ ( \
" cmp %[count], #4\n" \
" blt 2f\n" \
@@ -36,7 +36,7 @@ })
#define memset16(_dst, _c, _count) \
-({ uint16_t *dst = (_dst); uint16_t c __asm__ ("r7") = (_c); int count = (_count); uint32_t dummy0 __asm__ ("r4"), dummy1 __asm__ ("r5"), dummy2 __asm__ ("r6"); \
+({ uint16_t *dst = (_dst); register uint16_t c __asm__ ("r7") = (_c); register int count = (_count); register uint32_t dummy0 __asm__ ("r4"), dummy1 __asm__ ("r5"), dummy2 __asm__ ("r6"); \
__asm__ __volatile__ ( \
" cmp %[count], #2\n" \
" blt 3f\n" \
diff --git a/src/os9x_65c816.S b/src/os9x_65c816.S index e21cc14..e0328e0 100644 --- a/src/os9x_65c816.S +++ b/src/os9x_65c816.S @@ -3,7 +3,7 @@ /**************************************************************** ****************************************************************/ .align 4 - .include "os9x_65c816_common.s" + .include "os9x_65c816_common.S" @ notaz @@ -60,7 +60,7 @@ .endif .endm - .include "os9x_65c816_opcodes.s" + .include "os9x_65c816_opcodes.S" /* diff --git a/src/os9x_65c816_global.S b/src/os9x_65c816_global.S index bde873e..cee9f11 100644 --- a/src/os9x_65c816_global.S +++ b/src/os9x_65c816_global.S @@ -1,7 +1,7 @@ /* .DATA*/ .text .align 4 - .include "os9x_65c816_common.s" + .include "os9x_65c816_common.S" .globl asmS9xGetByte .globl asmS9xGetWord diff --git a/src/os9x_65c816_global_armv4.S b/src/os9x_65c816_global_armv4.S index 13fa1e2..46cfb7c 100644 --- a/src/os9x_65c816_global_armv4.S +++ b/src/os9x_65c816_global_armv4.S @@ -3,4 +3,4 @@ mov pc, \reg .endm -.include "os9x_65c816_global.s" +.include "os9x_65c816_global.S" diff --git a/src/os9x_65c816_spcasm.S b/src/os9x_65c816_spcasm.S index 5bca8c6..41399c7 100644 --- a/src/os9x_65c816_spcasm.S +++ b/src/os9x_65c816_spcasm.S @@ -3,7 +3,7 @@ /****************************************************************
****************************************************************/
.align 4
- .include "os9x_65c816_common.s"
+ .include "os9x_65c816_common.S"
.macro asmAPU_EXECUTE
@@ -35,7 +35,7 @@ 43211:
.endm
- .include "os9x_65c816_opcodes.s"
+ .include "os9x_65c816_opcodes.S"
/*
diff --git a/src/os9x_65c816_spcasm.s.last b/src/os9x_65c816_spcasm.s.last index 7a622c3..7e8e650 100644 --- a/src/os9x_65c816_spcasm.s.last +++ b/src/os9x_65c816_spcasm.s.last @@ -3,7 +3,7 @@ /****************************************************************
****************************************************************/
.align 4
- .include "os9x_65c816_common.s"
+ .include "os9x_65c816_common.S"
.macro asmAPU_EXECUTE
@@ -35,7 +35,7 @@ 43211:
.endm
- .include "os9x_65c816_opcodes.s"
+ .include "os9x_65c816_opcodes.S"
/*
diff --git a/src/os9x_65c816_spcc.S b/src/os9x_65c816_spcc.S index 031c8a8..17b3cfd 100644 --- a/src/os9x_65c816_spcc.S +++ b/src/os9x_65c816_spcc.S @@ -3,7 +3,7 @@ /****************************************************************
****************************************************************/
.align 4
- .include "os9x_65c816_common.s"
+ .include "os9x_65c816_common.S"
.equ IAPU_PC_offs, 52
@@ -93,7 +93,7 @@ .endm
*/
- .include "os9x_65c816_opcodes.s"
+ .include "os9x_65c816_opcodes.S"
/*
@@ -98,6 +98,14 @@ typedef short int16_32; #define _MAX_PATH PATH_MAX #endif +#ifndef _MAX_FNAME +#define _MAX_FNAME PATH_MAX +#endif + +#ifndef _MAX_EXT +#define _MAX_EXT PATH_MAX +#endif + //True/False Defines #define TRUE 1 #define FALSE 0 diff --git a/src/snes9x.h b/src/snes9x.h index fbea13f..c62e547 100644 --- a/src/snes9x.h +++ b/src/snes9x.h @@ -49,13 +49,19 @@ #define ROM_NAME_LEN 23
-#include <streams/memory_stream.h>
-#define STREAM memstream_t *
-#define READ_STREAM(p, l, s) memstream_read(s, p, l)
-#define WRITE_STREAM(p, l, s) memstream_write(s, p, l)
-#define OPEN_STREAM(f, m) memstream_open(0)
-#define CLOSE_STREAM(s) memstream_close(s)
-#define SEEK_STREAM(p,r,s) memstream_seek(p,r,s)
+/* #include <streams/memory_stream.h> */
+/* #define STREAM memstream_t * */
+/* #define READ_STREAM(p, l, s) memstream_read(s, p, l) */
+/* #define WRITE_STREAM(p, l, s) memstream_write(s, p, l) */
+/* #define OPEN_STREAM(f, m) memstream_open(0) */
+/* #define CLOSE_STREAM(s) memstream_close(s) */
+/* #define SEEK_STREAM(p,r,s) memstream_seek(p,r,s) */
+
+#define STREAM FILE *
+#define READ_STREAM(p, l, s) fread(p, sizeof(char), l, s)
+#define WRITE_STREAM(p, l, s) fwrite(p, sizeof(char), l, s)
+#define OPEN_STREAM(f, m) fopen(f, m)
+#define CLOSE_STREAM(s) fclose(s)
/* SNES screen width and height */
#define SNES_WIDTH 256
@@ -92,12 +98,12 @@ // 1 / PPU clock * 342 -> 64.281us
// 64.281us / (1 / 3.546895MHz) -> 228 cycles per scanline.
-//#define SNES_SCANLINE_TIME (63.695e-6)
-//#define SNES_CLOCK_SPEED (3579545)
+#define SNES_SCANLINE_TIME (63.695e-6)
+#define SNES_CLOCK_SPEED (3579545)
-//#define SNES_CLOCK_LEN (1.0 / SNES_CLOCK_SPEED)
+#define SNES_CLOCK_LEN (1.0 / SNES_CLOCK_SPEED)
-//#define SNES_APUTIMER2_CYCLEx10000 ((uint32) 3355824)
+#define SNES_APUTIMER2_CYCLEx10000 ((uint32) 3355824)
#ifdef VAR_CYCLES
//#define SNES_CYCLES_PER_SCANLINE ((uint32) ((SNES_SCANLINE_TIME / SNES_CLOCK_LEN) * 6 + 0.5))
|