Skip to content

Instantly share code, notes, and snippets.

@rickyzhang82
Created August 19, 2017 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickyzhang82/e1ab8d2cf8ef30368640278fc2372281 to your computer and use it in GitHub Desktop.
Save rickyzhang82/e1ab8d2cf8ef30368640278fc2372281 to your computer and use it in GitHub Desktop.
part of configure.ac that determines addressing mode
if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
ADDRESSING_MODE="real"
else
ADDRESSING_MODE=""
AC_MSG_CHECKING([for the addressing mode to use])
for am in $ADDRESSING_TEST_ORDER; do
case $am in
real)
dnl Requires ability to mmap() Low Memory globals
if [[ "x$ac_cv_can_map_lm$ac_cv_pagezero_hack" = "xnono" ]]; then
continue
fi
dnl Requires VOSF screen updates
if [[ "x$CAN_VOSF" = "xno" ]]; then
continue
fi
dnl Real addressing will probably work.
ADDRESSING_MODE="real"
WANT_VOSF=yes dnl we can use VOSF and we need it actually
DEFINES="$DEFINES -DREAL_ADDRESSING"
if [[ "x$ac_cv_pagezero_hack" = "xyes" ]]; then
BLESS=Darwin/lowmem
LDFLAGS="$LDFLAGS -pagezero_size 0x2000"
fi
break
;;
direct)
dnl Requires VOSF screen updates
if [[ "x$CAN_VOSF" = "xyes" ]]; then
ADDRESSING_MODE="direct"
WANT_VOSF=yes dnl we can use VOSF and we need it actually
DEFINES="$DEFINES -DDIRECT_ADDRESSING"
break
fi
;;
banks)
dnl Default addressing mode
ADDRESSING_MODE="memory banks"
break
;;
*)
AC_MSG_ERROR([Internal configure.in script error for $am addressing mode])
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment