summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-07-03 14:05:12 +0000
committerJens Arnold <amiconn@rockbox.org>2005-07-03 14:05:12 +0000
commitd2456b44f73e6a1310d8dc2c98db92364b70e793 (patch)
tree5f6a7ff48924ebb9b35dd57775c4538d3388d136 /apps/plugins
parentd50ed1248de6f347e928bae349c3393696a0383f (diff)
Centralised the ICODE_ATTR and IDATA_ATTR #defines. Renamed some musepack and rockboy headers to avoid clashes with rockbox headers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6991 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/rockboy/cpu-gb.h (renamed from apps/plugins/rockboy/cpu.h)4
-rw-r--r--apps/plugins/rockboy/cpu.c2
-rw-r--r--apps/plugins/rockboy/cpuregs.h2
-rw-r--r--apps/plugins/rockboy/debug.c2
-rw-r--r--apps/plugins/rockboy/dynarec.c2
-rw-r--r--apps/plugins/rockboy/emu.c6
-rw-r--r--apps/plugins/rockboy/hw.c4
-rw-r--r--apps/plugins/rockboy/lcd-gb.h (renamed from apps/plugins/rockboy/lcd.h)16
-rw-r--r--apps/plugins/rockboy/lcd.c3
-rw-r--r--apps/plugins/rockboy/lcdc.c4
-rw-r--r--apps/plugins/rockboy/loader.c3
-rw-r--r--apps/plugins/rockboy/mem.c4
-rw-r--r--apps/plugins/rockboy/rockmacros.h20
-rw-r--r--apps/plugins/rockboy/rtc-gb.h (renamed from apps/plugins/rockboy/rtc.h)4
-rw-r--r--apps/plugins/rockboy/rtc.c2
-rw-r--r--apps/plugins/rockboy/save.c6
-rw-r--r--apps/plugins/rockboy/sound.c2
-rw-r--r--apps/plugins/rockboy/sys_rockbox.c2
18 files changed, 33 insertions, 55 deletions
diff --git a/apps/plugins/rockboy/cpu.h b/apps/plugins/rockboy/cpu-gb.h
index c7ec36ccf8..937b477b53 100644
--- a/apps/plugins/rockboy/cpu.h
+++ b/apps/plugins/rockboy/cpu-gb.h
@@ -1,7 +1,7 @@
-#ifndef __CPU_H__
-#define __CPU_H__
+#ifndef __CPU_GB_H__
+#define __CPU_GB_H__
diff --git a/apps/plugins/rockboy/cpu.c b/apps/plugins/rockboy/cpu.c
index 60c76a1302..6118633899 100644
--- a/apps/plugins/rockboy/cpu.c
+++ b/apps/plugins/rockboy/cpu.c
@@ -5,7 +5,7 @@
#include "defs.h"
#include "regs.h"
#include "hw.h"
-#include "cpu.h"
+#include "cpu-gb.h"
#include "lcdc.h"
#include "mem.h"
#include "fastmem.h"
diff --git a/apps/plugins/rockboy/cpuregs.h b/apps/plugins/rockboy/cpuregs.h
index e4b1426a3e..3b7d5eda27 100644
--- a/apps/plugins/rockboy/cpuregs.h
+++ b/apps/plugins/rockboy/cpuregs.h
@@ -7,7 +7,7 @@
#include "defs.h"
-#include "cpu.h"
+#include "cpu-gb.h"
#define LB(r) ((r).b[LO][LO])
#define HB(r) ((r).b[LO][HI])
diff --git a/apps/plugins/rockboy/debug.c b/apps/plugins/rockboy/debug.c
index d0e106ba94..8459ad3d5b 100644
--- a/apps/plugins/rockboy/debug.c
+++ b/apps/plugins/rockboy/debug.c
@@ -4,7 +4,7 @@
#include "rockmacros.h"
#include "defs.h"
-#include "cpu.h"
+#include "cpu-gb.h"
#include "mem.h"
#include "fastmem.h"
#include "regs.h"
diff --git a/apps/plugins/rockboy/dynarec.c b/apps/plugins/rockboy/dynarec.c
index 14ec7a5ca9..6d424a047f 100644
--- a/apps/plugins/rockboy/dynarec.c
+++ b/apps/plugins/rockboy/dynarec.c
@@ -4,7 +4,7 @@
#include "defs.h"
#include "regs.h"
#include "hw.h"
-#include "cpu.h"
+#include "cpu-gb.h"
#include "lcdc.h"
#include "mem.h"
#include "fastmem.h"
diff --git a/apps/plugins/rockboy/emu.c b/apps/plugins/rockboy/emu.c
index 18a9edb324..57385f8e5f 100644
--- a/apps/plugins/rockboy/emu.c
+++ b/apps/plugins/rockboy/emu.c
@@ -5,12 +5,12 @@
#include "defs.h"
#include "regs.h"
#include "hw.h"
-#include "cpu.h"
+#include "cpu-gb.h"
#include "mem.h"
-#include "lcd.h"
+#include "lcd-gb.h"
#include "rc.h"
#include "sound.h"
-#include "rtc.h"
+#include "rtc-gb.h"
static int framelen = 16743;
static int framecount;
diff --git a/apps/plugins/rockboy/hw.c b/apps/plugins/rockboy/hw.c
index c287e24f8a..794e4e4516 100644
--- a/apps/plugins/rockboy/hw.c
+++ b/apps/plugins/rockboy/hw.c
@@ -3,10 +3,10 @@
#include "rockmacros.h"
#include "defs.h"
-#include "cpu.h"
+#include "cpu-gb.h"
#include "hw.h"
#include "regs.h"
-#include "lcd.h"
+#include "lcd-gb.h"
#include "mem.h"
#include "fastmem.h"
diff --git a/apps/plugins/rockboy/lcd.h b/apps/plugins/rockboy/lcd-gb.h
index 776c8592f4..3a612887e5 100644
--- a/apps/plugins/rockboy/lcd.h
+++ b/apps/plugins/rockboy/lcd-gb.h
@@ -1,7 +1,7 @@
-#ifndef __LCD_H__
-#define __LCD_H__
+#ifndef __LCD_GB_H__
+#define __LCD_GB_H__
#include "defs.h"
@@ -52,13 +52,6 @@ extern struct lcd lcd;
extern struct scan scan;
-
-
-
-#endif
-
-
-
void updatepatpix(void) ICODE_ATTR;
void tilebuf(void);
void bg_scan(void);
@@ -76,3 +69,8 @@ void vram_write(int a, byte b);
void vram_dirty(void);
void pal_dirty(void);
void lcd_reset(void);
+
+#endif
+
+
+
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c
index 04ca06e958..651c82286f 100644
--- a/apps/plugins/rockboy/lcd.c
+++ b/apps/plugins/rockboy/lcd.c
@@ -1,12 +1,11 @@
-#include "config.h"
#include "rockmacros.h"
#include "defs.h"
#include "regs.h"
#include "hw.h"
#include "mem.h"
-#include "lcd.h"
+#include "lcd-gb.h"
#include "rc.h"
#include "fb.h"
#include "palette.h"
diff --git a/apps/plugins/rockboy/lcdc.c b/apps/plugins/rockboy/lcdc.c
index c82b828354..3c1cf9196d 100644
--- a/apps/plugins/rockboy/lcdc.c
+++ b/apps/plugins/rockboy/lcdc.c
@@ -4,9 +4,9 @@
#include "defs.h"
#include "hw.h"
-#include "cpu.h"
+#include "cpu-gb.h"
#include "regs.h"
-#include "lcd.h"
+#include "lcd-gb.h"
#define C (cpu.lcdc)
diff --git a/apps/plugins/rockboy/loader.c b/apps/plugins/rockboy/loader.c
index dc89cddf8b..53839d6150 100644
--- a/apps/plugins/rockboy/loader.c
+++ b/apps/plugins/rockboy/loader.c
@@ -8,7 +8,8 @@
#include "regs.h"
#include "mem.h"
#include "hw.h"
-#include "rtc.h"
+#include "lcd-gb.h"
+#include "rtc-gb.h"
#include "rc.h"
#include "save.h"
#include "sound.h"
diff --git a/apps/plugins/rockboy/mem.c b/apps/plugins/rockboy/mem.c
index 2e1e0e7154..6bfedcb6c8 100644
--- a/apps/plugins/rockboy/mem.c
+++ b/apps/plugins/rockboy/mem.c
@@ -6,8 +6,8 @@
#include "hw.h"
#include "regs.h"
#include "mem.h"
-#include "rtc.h"
-#include "lcd.h"
+#include "rtc-gb.h"
+#include "lcd-gb.h"
#include "lcdc.h"
#include "sound.h"
diff --git a/apps/plugins/rockboy/rockmacros.h b/apps/plugins/rockboy/rockmacros.h
index e246086f05..71acfdbbcc 100644
--- a/apps/plugins/rockboy/rockmacros.h
+++ b/apps/plugins/rockboy/rockmacros.h
@@ -51,16 +51,6 @@ void savestate(int fd);
#define isalpha(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && ((c) <= 'Z')))
#define isalnum(c) (isdigit(c) || (isalpha(c)))
-/* FIXME: This is a q&d fix for these #defines not being available from
- * rockbox' lcd.h because rockboy has its own lcd.h. Renaming the file and
- * adapting the other files produced weird errors I couldn't figure out
- * -- amiconn 20050624 -- */
-#define DRMODE_COMPLEMENT 0
-#define DRMODE_BG 1
-#define DRMODE_FG 2
-#define DRMODE_SOLID 3
-#define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */
-
#ifdef SIMULATOR
#undef opendir
#define opendir(a) rb->sim_opendir((a))
@@ -72,22 +62,12 @@ void savestate(int fd);
#define open(a,b) rb->sim_open((a),(b))
#undef lseek
#define lseek(a,b,c) rb->sim_lseek((a),(b),(c))
-#define ICODE_ATTR
-#define IDATA_ATTR
#else /* !SIMULATOR */
#define opendir(a) rb->opendir((a))
#define closedir(a) rb->closedir((a))
#define mkdir(a,b) rb->mkdir((a),(b))
#define open(a,b) rb->open((a),(b))
#define lseek(a,b,c) rb->lseek((a),(b),(c))
-#if CONFIG_CPU == MCF5249
-#define ICODE_ATTR __attribute__ ((section(".icode")))
-#define IDATA_ATTR __attribute__ ((section(".idata")))
-#define USE_IRAM 1
-#else
-#define ICODE_ATTR
-#define IDATA_ATTR
-#endif
#endif /* !SIMULATOR */
#define strcat(a,b) rb->strcat((a),(b))
diff --git a/apps/plugins/rockboy/rtc.h b/apps/plugins/rockboy/rtc-gb.h
index 2665cd81c3..39c6145161 100644
--- a/apps/plugins/rockboy/rtc.h
+++ b/apps/plugins/rockboy/rtc-gb.h
@@ -1,7 +1,7 @@
-#ifndef __RTC_H__
-#define __RTC_H__
+#ifndef __RTC_GB_H__
+#define __RTC_GB_H__
struct rtc
diff --git a/apps/plugins/rockboy/rtc.c b/apps/plugins/rockboy/rtc.c
index 99e71dcfae..51c641cdce 100644
--- a/apps/plugins/rockboy/rtc.c
+++ b/apps/plugins/rockboy/rtc.c
@@ -6,7 +6,7 @@
#include "defs.h"
#include "mem.h"
-#include "rtc.h"
+#include "rtc-gb.h"
#include "rc.h"
struct rtc rtc;
diff --git a/apps/plugins/rockboy/save.c b/apps/plugins/rockboy/save.c
index f14a7191c1..0277eb53d1 100644
--- a/apps/plugins/rockboy/save.c
+++ b/apps/plugins/rockboy/save.c
@@ -4,12 +4,12 @@
#include <stdio.h>
#include "defs.h"
-#include "cpu.h"
+#include "cpu-gb.h"
#include "cpuregs.h"
#include "hw.h"
#include "regs.h"
-#include "lcd.h"
-#include "rtc.h"
+#include "lcd-gb.h"
+#include "rtc-gb.h"
#include "mem.h"
#include "sound.h"
diff --git a/apps/plugins/rockboy/sound.c b/apps/plugins/rockboy/sound.c
index 10fc504063..accfda2540 100644
--- a/apps/plugins/rockboy/sound.c
+++ b/apps/plugins/rockboy/sound.c
@@ -5,7 +5,7 @@
#include "defs.h"
#include "pcm.h"
#include "sound.h"
-#include "cpu.h"
+#include "cpu-gb.h"
#include "hw.h"
#include "regs.h"
#include "rc.h"
diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c
index 0d4426987a..45608b9f36 100644
--- a/apps/plugins/rockboy/sys_rockbox.c
+++ b/apps/plugins/rockboy/sys_rockbox.c
@@ -21,7 +21,7 @@
#include "fb.h"
#include "input.h"
#include "rc.h"
-#include "lcd.h"
+#include "lcd-gb.h"
#include "hw.h"
#include "config.h"