diff options
author | Phil Blundell <philb@gnu.org> | 2008-07-27 09:39:01 +0000 |
---|---|---|
committer | Phil Blundell <philb@gnu.org> | 2008-07-27 09:39:01 +0000 |
commit | 2d1d95212b6b6c4b4fad0c9bd1859ec2cf2e3f09 (patch) | |
tree | ccedd2bbf505e3f6e918e9d0e94764af371e9658 /packages | |
parent | 6353c314cbae4a0b27cfe7f6ab55c3065663fda1 (diff) |
snes9x: fix cross-compiling problem with 64 bit host
Diffstat (limited to 'packages')
-rw-r--r-- | packages/snes9x/64bit.patch | 110 | ||||
-rw-r--r-- | packages/snes9x/snes9x_1.43-WIP1.bb | 3 |
2 files changed, 112 insertions, 1 deletions
diff --git a/packages/snes9x/64bit.patch b/packages/snes9x/64bit.patch new file mode 100644 index 0000000000..a8388de0a2 --- /dev/null +++ b/packages/snes9x/64bit.patch @@ -0,0 +1,110 @@ +--- s/offsets.cpp~ 2004-07-11 22:50:59.000000000 +0100 ++++ s/offsets.cpp 2008-07-27 10:28:40.000000000 +0100 +@@ -100,30 +100,30 @@ + #endif + + #define OFFSET(N,F) \ +-fprintf (S9xSTREAM, "#define " #N " CPU + %d\n", (int) &((struct SCPUState *) 0)->F); ++fprintf (S9xSTREAM, "#define " #N " CPU + %d\n", &((struct SCPUState *) 0)->F); + #define OFFSET2(N,F) \ +-fprintf (S9xSTREAM, "#define " #N " Registers + %d\n", (int) &((struct SRegisters *) 0)->F); ++fprintf (S9xSTREAM, "#define " #N " Registers + %d\n", &((struct SRegisters *) 0)->F); + #define OFFSET3(F) \ +-fprintf (S9xSTREAM, "#define " #F " Memory + %d\n", (int) &((class CMemory *) 0)->F); ++fprintf (S9xSTREAM, "#define " #F " Memory + %d\n", &((class CMemory *) 0)->F); + #define OFFSET4(N,F) \ +-fprintf (S9xSTREAM, "#define " #N " APU + %d\n", (int) &((struct SAPU *) 0)->F); ++fprintf (S9xSTREAM, "#define " #N " APU + %d\n", &((struct SAPU *) 0)->F); + #define OFFSET5(N,F) \ +-fprintf (S9xSTREAM, "#define " #N " IAPU + %d\n", (int) &((struct SIAPU *) 0)->F); ++fprintf (S9xSTREAM, "#define " #N " IAPU + %d\n", &((struct SIAPU *) 0)->F); + #define OFFSET6(N,F) \ +-fprintf (S9xSTREAM, "#define " #N " ICPU + %d\n", (int) &((struct SICPU *) 0)->F); ++fprintf (S9xSTREAM, "#define " #N " ICPU + %d\n", &((struct SICPU *) 0)->F); + #define OFFSET7(N,F) \ +-fprintf (S9xSTREAM, "#define " #N " Settings + %d\n", (int) &((struct SSettings *) 0)->F); ++fprintf (S9xSTREAM, "#define " #N " Settings + %d\n", &((struct SSettings *) 0)->F); + #define OFFSET8(N, F) \ +-fprintf (S9xSTREAM, "#define " #N " APURegisters + %d\n", (int) &((struct SAPURegisters *) 0)->F); ++fprintf (S9xSTREAM, "#define " #N " APURegisters + %d\n", &((struct SAPURegisters *) 0)->F); + + #define OFFSET9(N, F) \ +-fprintf (S9xSTREAM, "#define " #N " PPU + %d\n", (int) &((struct SPPU *) 0)->F); ++fprintf (S9xSTREAM, "#define " #N " PPU + %d\n", &((struct SPPU *) 0)->F); + #define OFFSET10(N, F) \ +-fprintf (S9xSTREAM, "#define " #N " IPPU + %d\n", (int) &((struct InternalPPU *) 0)->F); ++fprintf (S9xSTREAM, "#define " #N " IPPU + %d\n", &((struct InternalPPU *) 0)->F); + #define OFFSET11(N, F) \ +-fprintf (S9xSTREAM, "#define " #N " SA1 + %d\n", (int) &((struct SSA1 *) 0)->F); ++fprintf (S9xSTREAM, "#define " #N " SA1 + %d\n", &((struct SSA1 *) 0)->F); + #define OFFSET12(N, F) \ +-fprintf (S9xSTREAM, "#define " #N " SA1Registers + %d\n", (int) &((struct SSA1Registers *) 0)->F); ++fprintf (S9xSTREAM, "#define " #N " SA1Registers + %d\n", &((struct SSA1Registers *) 0)->F); + + int main (int /*argc*/, char ** /*argv*/) + { +--- s/getset.h~ 2004-07-11 22:50:58.000000000 +0100 ++++ s/getset.h 2008-07-27 10:30:38.000000000 +0100 +@@ -120,7 +120,7 @@ + return (*(GetAddress + (Address & 0xffff))); + } + +- switch ((int) GetAddress) ++ switch ((long)GetAddress) + { + case CMemory::MAP_PPU: + return (S9xGetPPU (Address & 0xffff)); +@@ -225,7 +225,7 @@ + #endif + } + +- switch ((int) GetAddress) ++ switch ((long) GetAddress) + { + case CMemory::MAP_PPU: + return (S9xGetPPU (Address & 0xffff) | +@@ -349,7 +349,7 @@ + return; + } + +- switch ((int) SetAddress) ++ switch ((long) SetAddress) + { + case CMemory::MAP_PPU: + S9xSetPPU (Byte, Address & 0xffff); +@@ -482,7 +482,7 @@ + return; + } + +- switch ((int) SetAddress) ++ switch ((long) SetAddress) + { + case CMemory::MAP_PPU: + S9xSetPPU ((uint8) Word, Address & 0xffff); +@@ -603,7 +603,7 @@ + { + return s7r.bank50; + } +- switch ((int) GetAddress) ++ switch ((long) GetAddress) + { + case CMemory::MAP_SPC7110_DRAM: + #ifdef SPC7110_DEBUG +@@ -669,7 +669,7 @@ + if(Settings.SPC7110&&((Address&0x7FFFFF)==0x4800)) + return s7r.bank50; + +- switch ((int) GetAddress) ++ switch ((long) GetAddress) + { + case CMemory::MAP_SPC7110_DRAM: + #ifdef SPC7110_DEBUG +@@ -729,7 +729,7 @@ + return; + } + +- switch ((int) GetAddress) ++ switch ((long) GetAddress) + { + case CMemory::MAP_PPU: + CPU.PCBase = Memory.FillRAM; diff --git a/packages/snes9x/snes9x_1.43-WIP1.bb b/packages/snes9x/snes9x_1.43-WIP1.bb index b30dccecee..0b746795f2 100644 --- a/packages/snes9x/snes9x_1.43-WIP1.bb +++ b/packages/snes9x/snes9x_1.43-WIP1.bb @@ -7,7 +7,8 @@ RDEPENDS_epia = "kernel-module-joydev" SRC_URI = "http://www.lysator.liu.se/snes9x/1.43-WIP1/snes9x-1.43-WIP1-src.tar.gz \ file://makefile.patch;patch=1;pnum=2 \ - file://private.patch;patch=1;pnum=0" + file://private.patch;patch=1;pnum=0 \ + file://64bit.patch;patch=1" S = "${WORKDIR}/snes9x-1.43-dev-src/snes9x" |