Mac OS X PPC port limps.

This commit is contained in:
Clifford T. Matthews 2009-06-17 13:18:19 -06:00
parent d11309c188
commit 19e4e464ed
4 changed files with 50 additions and 10 deletions

6
README
View File

@ -70,8 +70,10 @@ the SDL-based version of Executor on Mac OS X Intel, you can try:
../../util/configure.sh '--target=i486-macosx' '--host=i486-macosx' '--front-end=sdl' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--target-file-format=glibc' '--sound=sdl' '--syn68k-target=i486-macosx-glibc'
make
If you have SDL installed and would like to build (but not run) the
SDL-based version of Executor on Mac OS X PPC, you can try:
If you have SDL installed and would like to play with the SDL-based
version of Executor on Mac OS X PPC, you can try the following. Be aware that
the Mac OS X PPC port is the most recent port and is likely to have problems
above and beyond those of the other ports.
mkdir -p build/debug-macosx-sdl
cd build/debug-macosx-sdl

10
TODO
View File

@ -1,5 +1,11 @@
link with a debugging version of Syn68k and figure out where
the Mac OS X PPC port is dieing
Look into Mac OS X PPC glitches
cards don't work right in Eric's Ultimate Solitaire demo
Yank all the misleading RCS strings
Update the copyright notices to make it that the code is under
an MIT-style license
package up the System Folder and whatnot so that people w/o the
old executor-aux can run Executor

View File

@ -22,6 +22,29 @@ char ROMlib_rcsid_emutrap[] =
* to heck with them.
*/
/*
* The first time this code was running on a PowerPC was on an old
* version of Yellow Dog Linux. The calling conventions were
* different than what we get when compiling on Mac OS X. As such,
* there are some places where we check for the preprocessing macro
* "powerpc" and are really concerned with the old calling convention.
* There are othe times when we check for either powerpc or __ppc__ in
* which case the calling convention shouldn't matter.
*
* TODO: switch to a modern version of the GNU build system and use it
* to determine calling convention issues.
*
* The Yellow Dog version was actually able to run a few PPC binaries,
* including (IIRC) the demo versions of a couple of Adobe products
* (Photoshop and Illustrator?). However, none of the code fragment
* manager or mixed-mode code has been tested in years and never under
* Mac OS X. In the incredibly unlikely circumstance that someone
* wants to play with that code and has questions, I'll be happy to
* answer them to the best of my ability, but it was a long time ago
* and was short-lived, so my memory is a bit weak.
*
*/
#define SYN68K_TO_US_CHECK0_CHECKNEG1(addr) \
({ \
typeof(addr) __t; \
@ -42,7 +65,7 @@ PUBLIC syn68k_addr_t PascalToCCall(syn68k_addr_t ignoreme, ptocblock_t *infop)
{
unsigned short pth, ptv;
LONGINT args[11], retval;
#if defined (powerpc) || defined (__ppc__)
#if defined (powerpc)
Point points[11];
int point_count = 0;
#endif
@ -94,7 +117,7 @@ PUBLIC syn68k_addr_t PascalToCCall(syn68k_addr_t ignoreme, ptocblock_t *infop)
ptv = POPSW();
pth = POPSW();
#if !defined(LITTLEENDIAN)
#if !defined (powerpc) && !defined (__ppc__)
#if !defined (powerpc)
args[count++] = (ptv << 16) | pth;
#else
points[point_count].h = pth;
@ -221,7 +244,7 @@ CToPascalCall_m68k(void *wheretogo, unsigned long long magic, va_list ap)
case 3:
ul = va_arg(ap, ULONGINT);
#if !defined(LITTLEENDIAN)
#if !defined (powerpc) && !defined (__ppc__)
#if !defined (powerpc)
PUSHUW(ul);
PUSHUW(ul >> 16);
#else
@ -344,7 +367,7 @@ CToRoutineDescriptorCall (const RoutineDescriptor *p, unsigned long long magic,
case 3: /* point */
{
arg = (uint32) va_arg (ap, unsigned long);
#if defined (powerpc) || defined (__ppc__)
#if defined (powerpc)
arg = *(uint32 *)arg;
#endif
arg = (CW ((uint16) arg) |

View File

@ -15,8 +15,17 @@
#define CLV(rhs) (rhs)
#define Cx(rhs) (rhs)
#define MR(rhs) (rhs) /* Mac to ROMlib */
#define RM(rhs) (rhs) /* ROMlib to Mac */
#if 0
* Do not use these blindly on big-endian machines. There's no longer a
* guarantee that we can get low-memory on all big-endian machines. It doesn't
* work, for example, on Mac OS X PPC.
*
* #define MR(rhs) (rhs) /* Mac to ROMlib */
* #define RM(rhs) (rhs) /* ROMlib to Mac */
#endif
#define MR(n) ((typeof (n))({ typeof (n) _t = n; _t ? ((((unsigned long) (_t))) + ROMlib_offset) : 0;}))
#define RM(n) ((typeof (n))({ typeof (n) _t = n; _t ? ((((unsigned long) (_t)- ROMlib_offset)) ) : 0;}))
#define CLC_NULL NULL