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
This commit is contained in:
Jens Arnold 2005-07-03 14:05:12 +00:00
parent d50ed1248d
commit d2456b44f7
24 changed files with 47 additions and 82 deletions

View file

@ -21,15 +21,6 @@
#include "config.h" #include "config.h"
#if CONFIG_CPU == MCF5249 && !defined(SIMULATOR)
#define ICODE_ATTR __attribute__ ((section(".icode")))
#define IDATA_ATTR __attribute__ ((section(".idata")))
#define USE_IRAM 1
#else
#define ICODE_ATTR
#define IDATA_ATTR
#endif
#include <sys/types.h> #include <sys/types.h>
/* Get these functions 'out of the way' of the standard functions. Not doing /* Get these functions 'out of the way' of the standard functions. Not doing

View file

@ -22,15 +22,6 @@
/* Various codec "helper functions" */ /* Various codec "helper functions" */
#if CONFIG_CPU == MCF5249 && !defined(SIMULATOR)
#define ICODE_ATTR __attribute__ ((section(".icode")))
#define IDATA_ATTR __attribute__ ((section(".idata")))
#define USE_IRAM 1
#else
#define ICODE_ATTR
#define IDATA_ATTR
#endif
extern int mem_ptr; extern int mem_ptr;
extern int bufsize; extern int bufsize;
extern unsigned char* mallocbuf; // 512K from the start of MP3 buffer extern unsigned char* mallocbuf; // 512K from the start of MP3 buffer

View file

@ -19,14 +19,7 @@
/* Various "helper functions" common to all the xxx2wav decoder plugins */ /* Various "helper functions" common to all the xxx2wav decoder plugins */
#if CONFIG_CPU == MCF5249 && !defined(SIMULATOR) #include "config.h"
#define ICODE_ATTR __attribute__ ((section(".icode")))
#define IDATA_ATTR __attribute__ ((section(".idata")))
#define USE_IRAM 1
#else
#define ICODE_ATTR
#define IDATA_ATTR
#endif
/* the main data structure of the program */ /* the main data structure of the program */
typedef struct { typedef struct {

View file

@ -8,7 +8,7 @@
# #
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA ifdef APPEXTRA
INCLUDES += -I$(APPSDIR)/$(APPEXTRA) INCLUDES += -I$(APPSDIR)/$(APPEXTRA)

View file

@ -1,7 +1,7 @@
#ifndef __CPU_H__ #ifndef __CPU_GB_H__
#define __CPU_H__ #define __CPU_GB_H__

View file

@ -5,7 +5,7 @@
#include "defs.h" #include "defs.h"
#include "regs.h" #include "regs.h"
#include "hw.h" #include "hw.h"
#include "cpu.h" #include "cpu-gb.h"
#include "lcdc.h" #include "lcdc.h"
#include "mem.h" #include "mem.h"
#include "fastmem.h" #include "fastmem.h"

View file

@ -7,7 +7,7 @@
#include "defs.h" #include "defs.h"
#include "cpu.h" #include "cpu-gb.h"
#define LB(r) ((r).b[LO][LO]) #define LB(r) ((r).b[LO][LO])
#define HB(r) ((r).b[LO][HI]) #define HB(r) ((r).b[LO][HI])

View file

@ -4,7 +4,7 @@
#include "rockmacros.h" #include "rockmacros.h"
#include "defs.h" #include "defs.h"
#include "cpu.h" #include "cpu-gb.h"
#include "mem.h" #include "mem.h"
#include "fastmem.h" #include "fastmem.h"
#include "regs.h" #include "regs.h"

View file

@ -4,7 +4,7 @@
#include "defs.h" #include "defs.h"
#include "regs.h" #include "regs.h"
#include "hw.h" #include "hw.h"
#include "cpu.h" #include "cpu-gb.h"
#include "lcdc.h" #include "lcdc.h"
#include "mem.h" #include "mem.h"
#include "fastmem.h" #include "fastmem.h"

View file

@ -5,12 +5,12 @@
#include "defs.h" #include "defs.h"
#include "regs.h" #include "regs.h"
#include "hw.h" #include "hw.h"
#include "cpu.h" #include "cpu-gb.h"
#include "mem.h" #include "mem.h"
#include "lcd.h" #include "lcd-gb.h"
#include "rc.h" #include "rc.h"
#include "sound.h" #include "sound.h"
#include "rtc.h" #include "rtc-gb.h"
static int framelen = 16743; static int framelen = 16743;
static int framecount; static int framecount;

View file

@ -3,10 +3,10 @@
#include "rockmacros.h" #include "rockmacros.h"
#include "defs.h" #include "defs.h"
#include "cpu.h" #include "cpu-gb.h"
#include "hw.h" #include "hw.h"
#include "regs.h" #include "regs.h"
#include "lcd.h" #include "lcd-gb.h"
#include "mem.h" #include "mem.h"
#include "fastmem.h" #include "fastmem.h"

View file

@ -1,7 +1,7 @@
#ifndef __LCD_H__ #ifndef __LCD_GB_H__
#define __LCD_H__ #define __LCD_GB_H__
#include "defs.h" #include "defs.h"
@ -52,13 +52,6 @@ extern struct lcd lcd;
extern struct scan scan; extern struct scan scan;
#endif
void updatepatpix(void) ICODE_ATTR; void updatepatpix(void) ICODE_ATTR;
void tilebuf(void); void tilebuf(void);
void bg_scan(void); void bg_scan(void);
@ -76,3 +69,8 @@ void vram_write(int a, byte b);
void vram_dirty(void); void vram_dirty(void);
void pal_dirty(void); void pal_dirty(void);
void lcd_reset(void); void lcd_reset(void);
#endif

View file

@ -1,12 +1,11 @@
#include "config.h"
#include "rockmacros.h" #include "rockmacros.h"
#include "defs.h" #include "defs.h"
#include "regs.h" #include "regs.h"
#include "hw.h" #include "hw.h"
#include "mem.h" #include "mem.h"
#include "lcd.h" #include "lcd-gb.h"
#include "rc.h" #include "rc.h"
#include "fb.h" #include "fb.h"
#include "palette.h" #include "palette.h"

View file

@ -4,9 +4,9 @@
#include "defs.h" #include "defs.h"
#include "hw.h" #include "hw.h"
#include "cpu.h" #include "cpu-gb.h"
#include "regs.h" #include "regs.h"
#include "lcd.h" #include "lcd-gb.h"
#define C (cpu.lcdc) #define C (cpu.lcdc)

View file

@ -8,7 +8,8 @@
#include "regs.h" #include "regs.h"
#include "mem.h" #include "mem.h"
#include "hw.h" #include "hw.h"
#include "rtc.h" #include "lcd-gb.h"
#include "rtc-gb.h"
#include "rc.h" #include "rc.h"
#include "save.h" #include "save.h"
#include "sound.h" #include "sound.h"

View file

@ -6,8 +6,8 @@
#include "hw.h" #include "hw.h"
#include "regs.h" #include "regs.h"
#include "mem.h" #include "mem.h"
#include "rtc.h" #include "rtc-gb.h"
#include "lcd.h" #include "lcd-gb.h"
#include "lcdc.h" #include "lcdc.h"
#include "sound.h" #include "sound.h"

View file

@ -51,16 +51,6 @@ void savestate(int fd);
#define isalpha(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && ((c) <= 'Z'))) #define isalpha(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && ((c) <= 'Z')))
#define isalnum(c) (isdigit(c) || (isalpha(c))) #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 #ifdef SIMULATOR
#undef opendir #undef opendir
#define opendir(a) rb->sim_opendir((a)) #define opendir(a) rb->sim_opendir((a))
@ -72,22 +62,12 @@ void savestate(int fd);
#define open(a,b) rb->sim_open((a),(b)) #define open(a,b) rb->sim_open((a),(b))
#undef lseek #undef lseek
#define lseek(a,b,c) rb->sim_lseek((a),(b),(c)) #define lseek(a,b,c) rb->sim_lseek((a),(b),(c))
#define ICODE_ATTR
#define IDATA_ATTR
#else /* !SIMULATOR */ #else /* !SIMULATOR */
#define opendir(a) rb->opendir((a)) #define opendir(a) rb->opendir((a))
#define closedir(a) rb->closedir((a)) #define closedir(a) rb->closedir((a))
#define mkdir(a,b) rb->mkdir((a),(b)) #define mkdir(a,b) rb->mkdir((a),(b))
#define open(a,b) rb->open((a),(b)) #define open(a,b) rb->open((a),(b))
#define lseek(a,b,c) rb->lseek((a),(b),(c)) #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 */ #endif /* !SIMULATOR */
#define strcat(a,b) rb->strcat((a),(b)) #define strcat(a,b) rb->strcat((a),(b))

View file

@ -1,7 +1,7 @@
#ifndef __RTC_H__ #ifndef __RTC_GB_H__
#define __RTC_H__ #define __RTC_GB_H__
struct rtc struct rtc

View file

@ -6,7 +6,7 @@
#include "defs.h" #include "defs.h"
#include "mem.h" #include "mem.h"
#include "rtc.h" #include "rtc-gb.h"
#include "rc.h" #include "rc.h"
struct rtc rtc; struct rtc rtc;

View file

@ -4,12 +4,12 @@
#include <stdio.h> #include <stdio.h>
#include "defs.h" #include "defs.h"
#include "cpu.h" #include "cpu-gb.h"
#include "cpuregs.h" #include "cpuregs.h"
#include "hw.h" #include "hw.h"
#include "regs.h" #include "regs.h"
#include "lcd.h" #include "lcd-gb.h"
#include "rtc.h" #include "rtc-gb.h"
#include "mem.h" #include "mem.h"
#include "sound.h" #include "sound.h"

View file

@ -5,7 +5,7 @@
#include "defs.h" #include "defs.h"
#include "pcm.h" #include "pcm.h"
#include "sound.h" #include "sound.h"
#include "cpu.h" #include "cpu-gb.h"
#include "hw.h" #include "hw.h"
#include "regs.h" #include "regs.h"
#include "rc.h" #include "rc.h"

View file

@ -21,7 +21,7 @@
#include "fb.h" #include "fb.h"
#include "input.h" #include "input.h"
#include "rc.h" #include "rc.h"
#include "lcd.h" #include "lcd-gb.h"
#include "hw.h" #include "hw.h"
#include "config.h" #include "config.h"

View file

@ -112,4 +112,16 @@
#define CODEC_SIZE 0 #define CODEC_SIZE 0
#endif #endif
/* IRAM usage */
#if !defined(SIMULATOR) && /* Not for simulators */ \
(((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
(CONFIG_CPU == MCF5249)) /* Coldfire: core, plugins, codecs */
#define ICODE_ATTR __attribute__ ((section(".icode")))
#define IDATA_ATTR __attribute__ ((section(".idata")))
#define USE_IRAM
#else
#define ICODE_ATTR
#define IDATA_ATTR
#endif
#endif #endif