When the host OS is Mac OS X, direct addressing in BII doesn't guarantee
that the allocated memory for frame buffer base address in the host
(FrameBaseHost) satisfies the following conditions:
- FrameBaseHost > RamBaseHost
- (FrameBaseHost - RamBaseHost) + Frame_Size < 4GiB
where RamBaseHost refers to the emulated RAM base address in the host.
This may cause the random hang problem where the allocated frame address
failed to meet the conditions above.
Because the direct addressing mapping is a simple math:
RamAddrMac = RamAddrHost - RamBaseHost.
See details: https://github.com/cebix/macemu/issues/203
Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
- In 8 bit color game, the hack crashed the app.
- After backing out the hack, I can play 256 color game with displaycolordepth 8.
- By default, the displaycolordepth is 0.
Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
By default, without providing `with-sdl2` in configure it uses SDL1.
Users need to explicitly request SDL2.
Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
The old code used the `[[` shell keyword, which is only available in bash.
The interpreter in line 1 is `/bin/sh` though.
This confused my shell portability check in pkgsrc, since that check neither guesses the target platform from the filename, nor assumes that `/bin/sh` is actually bash, even though this may be true on macOS.
The change makes the code shorter with the well-known `${var:-default}` pattern.
Since `$1` is now only accessed when it is defined, this allows the program to have a `set -eu` at the top.
This in turn would make all the `&&` redundant since it applies automatic error checking.
The `{ ... } 1>&2` could also be replaced with a single `exec 1>&2` at the top.
Both of these systems have /dev/ptmx for creating pseudoterminals.
OS X Leopard (10.5) added it in 2007, and Linux has had support for
it since v2.1 (1998).
This fixes a bug with pseudoterminal creation on Linux and macOS
where a new pseudoterminal cannot be created because the wrong
method is being used to find one.
With this fix I can compile with ./configure --enable-addressing=direct,0x100000
and then I don't need to change vm.mmap_min_addr and hence without root
privileges
This is no longer necessary as of glibc 2.2 (released in November 2000),
and it causes breakage when /usr/include/linux is installed using a
symlink-based system like stow.
Linking with -lvdeplug without checking whether it exists causes
failures from later configure tests; this makes it an optional
dependency in the same way as other libraries.