Merge remote-tracking branch 'refs/remotes/OBattler/master'

This commit is contained in:
basic2004
2017-07-20 19:27:26 +09:00
36 changed files with 438 additions and 11167 deletions

View File

View File

@@ -1 +0,0 @@
/usr/share/automake-1.11/INSTALL

View File

@@ -1,2 +0,0 @@
SUBDIRS = src

View File

@@ -1,670 +0,0 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \
install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ALLEGRO_CONFIG = @ALLEGRO_CONFIG@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EXEEXT = @EXEEXT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
allegro_CFLAGS = @allegro_CFLAGS@
allegro_LIBS = @allegro_LIBS@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = src
all: all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
distclean distclean-generic distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am html html-am info \
info-am install install-am install-data install-data-am \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

0
NEWS
View File

1179
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
/usr/share/automake-1.11/compile

1533
config.guess vendored

File diff suppressed because it is too large Load Diff

1693
config.sub vendored

File diff suppressed because it is too large Load Diff

5776
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,69 +0,0 @@
# configure.ac for PCem
#
AC_PREREQ([2.61])
AC_INIT(PCem, v10.1, Tom Walker <tommowalker@tommowalker.co.uk>, pcem)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE
AC_PROG_CC
AC_PROG_CXX
AM_PROG_CC_C_O
AC_MSG_CHECKING([whether to enable debugging])
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug], [build debug executable]))
if test "$enable_debug" = "yes"; then
CFLAGS="-Wall -O0 -g -D_DEBUG"
AC_MSG_RESULT([yes])
else
CFLAGS="-O3"
AC_MSG_RESULT([no])
fi
AC_MSG_CHECKING([for cpu])
case "${host_cpu}" in
i?86)
CPU=i386
AC_MSG_RESULT(${host_cpu})
;;
x86_64)
CPU=x86_64
AC_MSG_RESULT(${host_cpu})
;;
*)
AC_MSG_ERROR([Unsupported CPU.])
;;
esac
AM_CONDITIONAL(CPU_I386, test "$CPU" = "i386")
AM_CONDITIONAL(CPU_X86_64, test "$CPU" = "x86_64")
#AC_MSG_CHECKING([for libz])
#AX_CHECK_ZLIB
AM_CONDITIONAL(OS_WIN, test "$OS" = "win")
AM_CONDITIONAL(OS_LINUX, test "$OS" = "linux")
# Do not run test for Allegro with Win32/MinGW version, as binary builds have
# `allegro-config' missing.
# NOTE: For the following Autoconf macro to be supported, you need to extract
# allegro.m4 from the DOS/Windows Allegro sources (the file is contained
# in `misc') and copy it to this directory or MSYS's `/share/aclocal'.
if test "$OS" != "win"; then
AM_PATH_ALLEGRO(, , AC_MSG_ERROR(building PCem requires Allegro to be installed))
fi
AC_CHECK_LIB([openal], [alGetError], [], \
[echo "You need to install the OpenAL library."
exit -1])
AC_CHECK_LIB([alut], [alutInit], [], \
[echo "You need to install the ALUT library."
exit -1])
AC_CHECK_LIB([pthread], [pthread_create])
AC_OUTPUT([Makefile src/Makefile])

View File

@@ -1 +0,0 @@
/usr/share/automake-1.11/depcomp

View File

@@ -1 +0,0 @@
/usr/share/automake-1.11/install-sh

View File

@@ -1 +0,0 @@
/usr/share/automake-1.11/missing

View File

@@ -2197,14 +2197,17 @@ void taskswitch286(uint16_t seg, uint16_t *segdat, int is32)
if (optype==OPTYPE_INT || optype==CALL)
{
writememl(base,0,tr.seg);
new_flags|=NT_FLAG;
if (cpu_state.abrt)
return;
}
if (cpu_state.abrt) return;
new_cr3=readmeml(base,0x1C);
new_pc=readmeml(base,0x20);
new_flags=readmeml(base,0x24);
if (optype == OPTYPE_INT || optype == CALL)
new_flags |= NT_FLAG;
new_eax=readmeml(base,0x28);
new_ecx=readmeml(base,0x2C);
new_edx=readmeml(base,0x30);
@@ -2383,13 +2386,16 @@ void taskswitch286(uint16_t seg, uint16_t *segdat, int is32)
if (optype==OPTYPE_INT || optype==CALL)
{
writememw(base,0,tr.seg);
new_flags|=NT_FLAG;
if (cpu_state.abrt)
return;
}
if (cpu_state.abrt) return;
new_pc=readmemw(base,0x0E);
new_flags=readmemw(base,0x10);
if (optype == OPTYPE_INT || optype == CALL)
new_flags |= NT_FLAG;
new_eax=readmemw(base,0x12);
new_ecx=readmemw(base,0x14);
new_edx=readmemw(base,0x16);

View File

@@ -132,6 +132,7 @@ endif
ifeq ($(WALTJE), y)
OPENDIR = win_opendir.o
SERIAL = serial.o
WSERIAL = win_serial.o
WFLAGS = -DWALTJE
@@ -241,7 +242,7 @@ VIDOBJ = video.o \
WINOBJ = win.o \
win_ddraw.o win_ddraw_fs.o win_ddraw_screenshot.o \
win_d3d.o win_d3d_fs.o \
win_language.o win_status.o win_opendir.o win_dynld.o \
win_language.o win_status.o $(OPENDIR) win_dynld.o \
win_video.o $(WSERIAL) win_keyboard.o win_mouse.o \
win_iodev.o win_joystick.o win_midi.o \
win_settings.o win_deviceconfig.o win_joystickconfig.o \

View File

@@ -782,10 +782,16 @@ void ega_write(uint32_t addr, uint8_t val, void *p)
if (addr & 1)
writemask2 <<= 1;
addr &= ~1;
if (addr & 0x4000)
addr |= 1;
addr &= ~0x4000;
}
addr <<= 2;
if (addr >= ega->vram_limit)
return;
if (!(ega->gdcreg[6] & 1))
fullchange = 2;
@@ -909,10 +915,16 @@ uint8_t ega_read(uint32_t addr, void *p)
{
readplane = (readplane & 2) | (addr & 1);
addr &= ~1;
if (addr & 0x4000)
addr |= 1;
addr &= ~0x4000;
}
addr <<= 2;
if (addr >= ega->vram_limit)
return 0xff;
ega->la = ega->vram[addr];
ega->lb = ega->vram[addr | 0x1];
ega->lc = ega->vram[addr | 0x2];
@@ -975,6 +987,10 @@ void ega_init(ega_t *ega)
pallook16[c] = makecol32(0xaa, 0x55, 0);
}
ega->pallook = pallook16;
ega->vram_limit = 256 * 1024;
ega->vrammask = ega->vram_limit-1;
old_overscan_color = 0;
}
@@ -1024,6 +1040,9 @@ void *ega_standalone_init()
ega_common_defaults(ega);
ega->vram_limit = device_get_config_int("memory") * 1024;
ega->vrammask = ega->vram_limit-1;
mem_mapping_add(&ega->mapping, 0xa0000, 0x20000, ega_read, NULL, NULL, ega_write, NULL, NULL, NULL, MEM_MAPPING_EXTERNAL, ega);
timer_add(ega_poll, &ega->vidtime, TIMER_ALWAYS_ENABLED, ega);
io_sethandler(0x03c0, 0x0020, ega_in, NULL, NULL, ega_out, NULL, NULL, ega);
@@ -1060,6 +1079,9 @@ void *cpqega_standalone_init()
ega_common_defaults(ega);
ega->vram_limit = device_get_config_int("memory") * 1024;
ega->vrammask = ega->vram_limit-1;
mem_mapping_add(&ega->mapping, 0xa0000, 0x20000, ega_read, NULL, NULL, ega_write, NULL, NULL, NULL, MEM_MAPPING_EXTERNAL, ega);
timer_add(ega_poll, &ega->vidtime, TIMER_ALWAYS_ENABLED, ega);
io_sethandler(0x03c0, 0x0020, ega_in, NULL, NULL, ega_out, NULL, NULL, ega);
@@ -1096,6 +1118,9 @@ void *sega_standalone_init()
ega_common_defaults(ega);
ega->vram_limit = device_get_config_int("memory") * 1024;
ega->vrammask = ega->vram_limit-1;
mem_mapping_add(&ega->mapping, 0xa0000, 0x20000, ega_read, NULL, NULL, ega_write, NULL, NULL, NULL, MEM_MAPPING_EXTERNAL, ega);
timer_add(ega_poll, &ega->vidtime, TIMER_ALWAYS_ENABLED, ega);
io_sethandler(0x03c0, 0x0020, ega_in, NULL, NULL, ega_out, NULL, NULL, ega);
@@ -1238,6 +1263,30 @@ void ega_speed_changed(void *p)
ega_recalctimings(ega);
}
static device_config_t ega_config[] =
{
{
"memory", "Memory size", CONFIG_SELECTION, "", 256,
{
{
"64 kB", 64
},
{
"128 kB", 128
},
{
"256 kB", 256
},
{
""
}
}
},
{
"", "", -1
}
};
device_t ega_device =
{
"EGA",
@@ -1247,7 +1296,8 @@ device_t ega_device =
ega_standalone_available,
ega_speed_changed,
NULL,
NULL
NULL,
ega_config
};
device_t cpqega_device =
@@ -1259,7 +1309,8 @@ device_t cpqega_device =
cpqega_standalone_available,
ega_speed_changed,
NULL,
NULL
NULL,
ega_config
};
device_t sega_device =
@@ -1271,7 +1322,8 @@ device_t sega_device =
sega_standalone_available,
ega_speed_changed,
NULL,
NULL
NULL,
ega_config
};
device_t jega_device =
@@ -1283,5 +1335,6 @@ device_t jega_device =
sega_standalone_available,
ega_speed_changed,
NULL,
NULL
NULL,
ega_config
};

View File

@@ -87,6 +87,8 @@ typedef struct ega_t
uint8_t *vram;
int vrammask;
uint32_t vram_limit;
int video_res_x, video_res_y, video_bpp;
uint8_t RMOD1, RMOD2, RDAGS, RDFFB, RDFSB, RDFAP, RPESL, RPULP, RPSSC, RPSSU, RPSSL;

View File

@@ -66,85 +66,84 @@ void ega_render_blank(ega_t *ega)
}
void ega_render_text_standard(ega_t *ega, int drawcursor)
{
{
int x, xx;
int x_add = (enable_overscan) ? 8 : 0;
int dl = ega_display_line(ega);
uint8_t chr, dat, attr;
uint32_t charaddr;
int x, xx;
uint32_t fg, bg;
for (x = 0; x < ega->hdisp; x++)
{
int drawcursor = ((ega->ma == ega->ca) && ega->con && ega->cursoron);
uint8_t chr = ega->vram[(ega->ma << 1) & ega->vrammask];
uint8_t attr = ega->vram[((ega->ma << 1) + 1) & ega->vrammask];
uint8_t dat;
uint32_t fg, bg;
uint32_t charaddr;
if (attr & 8)
charaddr = ega->charsetb + (chr * 128);
else
charaddr = ega->charseta + (chr * 128);
if (fullchange)
{
for (x = 0; x < ega->hdisp; x++)
{
drawcursor = ((ega->ma == ega->ca) && ega->con && ega->cursoron);
chr = ega->vram[(ega->ma << 1) & ega->vrammask];
attr = ega->vram[((ega->ma << 1) + 1) & ega->vrammask];
if (drawcursor)
{
bg = ega->pallook[ega->egapal[attr & 15]];
fg = ega->pallook[ega->egapal[attr >> 4]];
}
else
{
fg = ega->pallook[ega->egapal[attr & 15]];
bg = ega->pallook[ega->egapal[attr >> 4]];
if (attr & 0x80 && ega->attrregs[0x10] & 8)
{
bg = ega->pallook[ega->egapal[(attr >> 4) & 7]];
if (ega->blink & 16)
fg = bg;
}
}
if (attr & 8) charaddr = ega->charsetb + (chr * 128);
else charaddr = ega->charseta + (chr * 128);
if (drawcursor)
{
bg = ega->pallook[ega->egapal[attr & 15]];
fg = ega->pallook[ega->egapal[attr >> 4]];
}
else
{
fg = ega->pallook[ega->egapal[attr & 15]];
bg = ega->pallook[ega->egapal[attr >> 4]];
if (attr & 0x80 && ega->attrregs[0x10] & 8)
{
bg = ega->pallook[ega->egapal[(attr >> 4) & 7]];
if (ega->blink & 16)
fg = bg;
}
}
dat = ega->vram[charaddr + (ega->sc << 2)];
if (ega->seqregs[1] & 8)
{
if (ega->seqregs[1] & 1)
{
for (xx = 0; xx < 8; xx++)
((uint32_t *)buffer32->line[dl])[(((x << 4) + 32 + (xx << 1)) & 2047) + x_add] =
((uint32_t *)buffer32->line[dl])[(((x << 4) + 33 + (xx << 1)) & 2047) + x_add] = (dat & (0x80 >> xx)) ? fg : bg;
}
else
{
for (xx = 0; xx < 8; xx++)
((uint32_t *)buffer32->line[dl])[(((x * 18) + 32 + (xx << 1)) & 2047) + x_add] =
((uint32_t *)buffer32->line[dl])[(((x * 18) + 33 + (xx << 1)) & 2047) + x_add] = (dat & (0x80 >> xx)) ? fg : bg;
if ((chr & ~0x1f) != 0xc0 || !(ega->attrregs[0x10] & 4))
((uint32_t *)buffer32->line[dl])[(((x * 18) + 32 + 16) & 2047) + x_add] =
((uint32_t *)buffer32->line[dl])[(((x * 18) + 32 + 17) & 2047) + x_add] = bg;
else
((uint32_t *)buffer32->line[dl])[(((x * 18) + 32 + 16) & 2047) + x_add] =
((uint32_t *)buffer32->line[dl])[(((x * 18) + 32 + 17) & 2047) + x_add] = (dat & 1) ? fg : bg;
}
}
else
{
if (ega->seqregs[1] & 1)
{
for (xx = 0; xx < 8; xx++)
((uint32_t *)buffer32->line[dl])[(((x << 3) + 32 + xx) & 2047) + x_add] = (dat & (0x80 >> xx)) ? fg : bg;
}
else
{
for (xx = 0; xx < 8; xx++)
((uint32_t *)buffer32->line[dl])[(((x * 9) + 32 + xx) & 2047) + x_add] = (dat & (0x80 >> xx)) ? fg : bg;
if ((chr & ~0x1f) != 0xc0 || !(ega->attrregs[0x10] & 4))
((uint32_t *)buffer32->line[dl])[(((x * 9) + 32 + 8) & 2047) + x_add] = bg;
else
((uint32_t *)buffer32->line[dl])[(((x * 9) + 32 + 8) & 2047) + x_add] = (dat & 1) ? fg : bg;
}
}
ega->ma += 4;
ega->ma &= ega->vrammask;
}
}
dat = ega->vram[charaddr + (ega->sc << 2)];
if (ega->seqregs[1] & 8)
{
if (ega->seqregs[1] & 1)
{
for (xx = 0; xx < 8; xx++)
((uint32_t *)buffer32->line[dl])[((x << 4) + 32 + (xx << 1) + x_add) & 2047] =
((uint32_t *)buffer32->line[dl])[((x << 4) + 33 + (xx << 1) + x_add) & 2047] = (dat & (0x80 >> xx)) ? fg : bg;
}
else
{
for (xx = 0; xx < 8; xx++)
((uint32_t *)buffer32->line[dl])[((x * 18) + 32 + (xx << 1) + x_add) & 2047] =
((uint32_t *)buffer32->line[dl])[((x * 18) + 33 + (xx << 1) + x_add) & 2047] = (dat & (0x80 >> xx)) ? fg : bg;
if ((chr & ~0x1f) != 0xc0 || !(ega->attrregs[0x10] & 4))
((uint32_t *)buffer32->line[dl])[((x * 18) + 32 + 16 + x_add) & 2047] =
((uint32_t *)buffer32->line[dl])[((x * 18) + 32 + 17 + x_add) & 2047] = bg;
else
((uint32_t *)buffer32->line[dl])[((x * 18) + 32 + 16 + x_add) & 2047] =
((uint32_t *)buffer32->line[dl])[((x * 18) + 32 + 17 + x_add) & 2047] = (dat & 1) ? fg : bg;
}
}
else
{
if (ega->seqregs[1] & 1)
{
for (xx = 0; xx < 8; xx++)
((uint32_t *)buffer32->line[dl])[((x << 3) + 32 + xx + x_add) & 2047] = (dat & (0x80 >> xx)) ? fg : bg;
}
else
{
for (xx = 0; xx < 8; xx++)
((uint32_t *)buffer32->line[dl])[((x * 9) + 32 + xx + x_add) & 2047] = (dat & (0x80 >> xx)) ? fg : bg;
if ((chr & ~0x1f) != 0xc0 || !(ega->attrregs[0x10] & 4))
((uint32_t *)buffer32->line[dl])[((x * 9) + 32 + 8 + x_add) & 2047] = bg;
else
((uint32_t *)buffer32->line[dl])[((x * 9) + 32 + 8 + x_add) & 2047] = (dat & 1) ? fg : bg;
}
}
ega->ma += 4;
ega->ma &= ega->vrammask;
}
}
static __inline int is_kanji1(uint8_t chr)
@@ -381,24 +380,35 @@ void ega_render_2bpp_lowres(ega_t *ega)
int x_add = (enable_overscan) ? 8 : 0;
int dl = ega_display_line(ega);
int x;
int offset;
uint8_t edat[4];
int offset = ((8 - ega->scrollcache) << 1) + 16;
for (x = 0; x <= ega->hdisp; x++)
{
uint8_t edat[2];
uint32_t addr = ega->ma;
if (!(ega->crtc[0x17] & 0x40))
{
addr = (addr << 1) & ega->vrammask;
addr &= ~7;
if ((ega->crtc[0x17] & 0x20) && (ega->ma & 0x20000))
addr |= 4;
if (!(ega->crtc[0x17] & 0x20) && (ega->ma & 0x8000))
addr |= 4;
}
if (!(ega->crtc[0x17] & 0x01))
addr = (addr & ~0x8000) | ((ega->sc & 1) ? 0x8000 : 0);
if (!(ega->crtc[0x17] & 0x02))
addr = (addr & ~0x10000) | ((ega->sc & 2) ? 0x10000 : 0);
offset = ((8 - ega->scrollcache) << 1) + 16;
for (x = 0; x <= ega->hdisp; x++)
{
if (ega->sc & 1 && !(ega->crtc[0x17] & 1))
{
edat[0] = ega->vram[(ega->ma << 1) + 0x8000];
edat[1] = ega->vram[(ega->ma << 1) + 0x8001];
}
else
{
edat[0] = ega->vram[(ega->ma << 1)];
edat[1] = ega->vram[(ega->ma << 1) + 1];
}
ega->ma += 4;
ega->ma &= ega->vrammask;
edat[0] = ega->vram[addr];
edat[1] = ega->vram[addr | 0x1];
if (ega->seqregs[1] & 4)
ega->ma += 2;
else
ega->ma += 4;
ega->ma &= ega->vrammask;
((uint32_t *)buffer32->line[dl])[(x << 4) + 14 + offset + x_add]= ((uint32_t *)buffer32->line[dl])[(x << 4) + 15 + offset + x_add] = ega->pallook[ega->egapal[edat[1] & 3]];
((uint32_t *)buffer32->line[dl])[(x << 4) + 12 + offset + x_add] = ((uint32_t *)buffer32->line[dl])[(x << 4) + 13 + offset + x_add] = ega->pallook[ega->egapal[(edat[1] >> 2) & 3]];
@@ -416,24 +426,35 @@ void ega_render_2bpp_highres(ega_t *ega)
int x_add = (enable_overscan) ? 8 : 0;
int dl = ega_display_line(ega);
int x;
int offset;
uint8_t edat[4];
int offset = ((8 - ega->scrollcache) << 1) + 16;
for (x = 0; x <= ega->hdisp; x++)
{
uint8_t edat[2];
uint32_t addr = ega->ma;
if (!(ega->crtc[0x17] & 0x40))
{
addr = (addr << 1) & ega->vrammask;
addr &= ~7;
if ((ega->crtc[0x17] & 0x20) && (ega->ma & 0x20000))
addr |= 4;
if (!(ega->crtc[0x17] & 0x20) && (ega->ma & 0x8000))
addr |= 4;
}
if (!(ega->crtc[0x17] & 0x01))
addr = (addr & ~0x8000) | ((ega->sc & 1) ? 0x8000 : 0);
if (!(ega->crtc[0x17] & 0x02))
addr = (addr & ~0x10000) | ((ega->sc & 2) ? 0x10000 : 0);
offset = ((8 - ega->scrollcache) << 1) + 16;
for (x = 0; x <= ega->hdisp; x++)
{
if (ega->sc & 1 && !(ega->crtc[0x17] & 1))
{
edat[0] = ega->vram[(ega->ma << 1) + 0x8000];
edat[1] = ega->vram[(ega->ma << 1) + 0x8001];
}
else
{
edat[0] = ega->vram[(ega->ma << 1)];
edat[1] = ega->vram[(ega->ma << 1) + 1];
}
ega->ma += 4;
ega->ma &= ega->vrammask;
edat[0] = ega->vram[addr];
edat[1] = ega->vram[addr | 0x1];
if (ega->seqregs[1] & 4)
ega->ma += 2;
else
ega->ma += 4;
ega->ma &= ega->vrammask;
((uint32_t *)buffer32->line[dl])[(x << 4) + 7 + offset + x_add] = ega->pallook[ega->egapal[edat[1] & 3]];
((uint32_t *)buffer32->line[dl])[(x << 4) + 6 + offset + x_add] = ega->pallook[ega->egapal[(edat[1] >> 2) & 3]];
@@ -450,30 +471,49 @@ void ega_render_4bpp_lowres(ega_t *ega)
{
int x_add = (enable_overscan) ? 8 : 0;
int dl = ega_display_line(ega);
uint8_t dat;
int x;
int offset;
uint8_t edat[4];
int offset = ((8 - ega->scrollcache) << 1) + 16;
for (x = 0; x <= ega->hdisp; x++)
{
uint8_t edat[4];
uint8_t dat;
uint32_t addr = ega->ma;
int oddeven = 0;
if (!(ega->crtc[0x17] & 0x40))
{
addr = (addr << 1) & ega->vrammask;
if (ega->seqregs[1] & 4)
oddeven = (addr & 4) ? 1 : 0;
addr &= ~7;
if ((ega->crtc[0x17] & 0x20) && (ega->ma & 0x20000))
addr |= 4;
if (!(ega->crtc[0x17] & 0x20) && (ega->ma & 0x8000))
addr |= 4;
}
if (!(ega->crtc[0x17] & 0x01))
addr = (addr & ~0x8000) | ((ega->sc & 1) ? 0x8000 : 0);
if (!(ega->crtc[0x17] & 0x02))
addr = (addr & ~0x10000) | ((ega->sc & 2) ? 0x10000 : 0);
if (ega->seqregs[1] & 4)
{
edat[0] = ega->vram[addr | oddeven];
edat[2] = ega->vram[addr | oddeven | 0x2];
edat[1] = edat[3] = 0;
ega->ma += 2;
}
else
{
edat[0] = ega->vram[addr];
edat[1] = ega->vram[addr | 0x1];
edat[2] = ega->vram[addr | 0x2];
edat[3] = ega->vram[addr | 0x3];
ega->ma += 4;
}
ega->ma &= ega->vrammask;
offset = ((8 - ega->scrollcache) << 1) + 16;
for (x = 0; x <= ega->hdisp; x++)
{
if (ega->sc & 1 && !(ega->crtc[0x17] & 1))
{
edat[0] = ega->vram[ega->ma | 0x8000];
edat[1] = ega->vram[ega->ma | 0x8001];
edat[2] = ega->vram[ega->ma | 0x8002];
edat[3] = ega->vram[ega->ma | 0x8003];
}
else
{
edat[0] = ega->vram[ega->ma];
edat[1] = ega->vram[ega->ma | 0x1];
edat[2] = ega->vram[ega->ma | 0x2];
edat[3] = ega->vram[ega->ma | 0x3];
}
ega->ma += 4;
ega->ma &= ega->vrammask;
dat = edatlookup[edat[0] & 3][edat[1] & 3] | (edatlookup[edat[2] & 3][edat[3] & 3] << 2);
((uint32_t *)buffer32->line[dl])[(x << 4) + 14 + offset + x_add] = ((uint32_t *)buffer32->line[dl])[(x << 4) + 15 + offset + x_add] = ega->pallook[ega->egapal[(dat & 0xf) & ega->attrregs[0x12]]];
((uint32_t *)buffer32->line[dl])[(x << 4) + 12 + offset + x_add] = ((uint32_t *)buffer32->line[dl])[(x << 4) + 13 + offset + x_add] = ega->pallook[ega->egapal[(dat >> 4) & ega->attrregs[0x12]]];
@@ -493,30 +533,48 @@ void ega_render_4bpp_highres(ega_t *ega)
{
int x_add = (enable_overscan) ? 8 : 0;
int dl = ega_display_line(ega);
uint8_t dat;
int x;
int offset;
uint8_t edat[4];
int offset = (8 - ega->scrollcache) + 24;
for (x = 0; x <= ega->hdisp; x++)
{
uint8_t edat[4];
uint8_t dat;
uint32_t addr = ega->ma;
int oddeven = 0;
offset = (8 - ega->scrollcache) + 24;
for (x = 0; x <= ega->hdisp; x++)
{
if (ega->sc & 1 && !(ega->crtc[0x17] & 1))
{
edat[0] = ega->vram[ega->ma | 0x8000];
edat[1] = ega->vram[ega->ma | 0x8001];
edat[2] = ega->vram[ega->ma | 0x8002];
edat[3] = ega->vram[ega->ma | 0x8003];
}
else
{
edat[0] = ega->vram[ega->ma];
edat[1] = ega->vram[ega->ma | 0x1];
edat[2] = ega->vram[ega->ma | 0x2];
edat[3] = ega->vram[ega->ma | 0x3];
}
ega->ma += 4;
ega->ma &= ega->vrammask;
if (!(ega->crtc[0x17] & 0x40))
{
addr = (addr << 1) & ega->vrammask;
if (ega->seqregs[1] & 4)
oddeven = (addr & 4) ? 1 : 0;
addr &= ~7;
if ((ega->crtc[0x17] & 0x20) && (ega->ma & 0x20000))
addr |= 4;
if (!(ega->crtc[0x17] & 0x20) && (ega->ma & 0x8000))
addr |= 4;
}
if (!(ega->crtc[0x17] & 0x01))
addr = (addr & ~0x8000) | ((ega->sc & 1) ? 0x8000 : 0);
if (!(ega->crtc[0x17] & 0x02))
addr = (addr & ~0x10000) | ((ega->sc & 2) ? 0x10000 : 0);
if (ega->seqregs[1] & 4)
{
edat[0] = ega->vram[addr | oddeven];
edat[2] = ega->vram[addr | oddeven | 0x2];
edat[1] = edat[3] = 0;
ega->ma += 2;
}
else
{
edat[0] = ega->vram[addr];
edat[1] = ega->vram[addr | 0x1];
edat[2] = ega->vram[addr | 0x2];
edat[3] = ega->vram[addr | 0x3];
ega->ma += 4;
}
ega->ma &= ega->vrammask;
dat = edatlookup[edat[0] & 3][edat[1] & 3] | (edatlookup[edat[2] & 3][edat[3] & 3] << 2);
((uint32_t *)buffer32->line[dl])[(x << 3) + 7 + offset + x_add] = ega->pallook[ega->egapal[(dat & 0xf) & ega->attrregs[0x12]]];

View File

@@ -4034,7 +4034,7 @@ static void *s3_virge_375_4_init()
static void s3_virge_close(void *p)
{
virge_t *virge = (virge_t *)p;
#ifndef RELEASE_BUILD
#if 0
FILE *f = fopen("vram.dmp", "wb");
fwrite(virge->svga.vram, 4 << 20, 1, f);
fclose(f);

View File

@@ -401,7 +401,7 @@ uint8_t svga_in(uint16_t addr, void *p)
case 0x3C1:
return svga->attrregs[svga->attraddr];
case 0x3c2:
if ((romset == ROM_IBMPS1_2011) || (romset == ROM_IBMPS1_2121) || (romset == ROM_IBMPS2_M30_286))
if ((romset == ROM_IBMPS1_2011) || (romset == ROM_IBMPS1_2121) || (romset == ROM_IBMPS1_2121_ISA) || (romset == ROM_IBMPS1_2133) || (romset == ROM_IBMPS2_M30_286) || (romset == ROM_IBMPS2_M50) || (romset == ROM_IBMPS2_M55SX) || (romset == ROM_IBMPS2_M80))
{
if ((svga->vgapal[0].r + svga->vgapal[0].g + svga->vgapal[0].b) >= 0x50)
{

View File

@@ -17,7 +17,6 @@
*/
#include <stdio.h>
#include <math.h>
#include "../ibm.h"
#include "../mem.h"
#include "video.h"
@@ -27,61 +26,95 @@
int invert_display = 0;
int video_grayscale = 0;
int video_graytype = 0;
uint32_t shade[5][256] =
{
{0}, // RGB Color (unused)
{0}, // RGB Grayscale (unused)
{ // Amber monitor
0x000000, 0x060000, 0x090000, 0x0d0000, 0x100000, 0x120100, 0x150100, 0x170100, 0x1a0100, 0x1c0100, 0x1e0200, 0x210200, 0x230200, 0x250300, 0x270300, 0x290300,
0x2b0400, 0x2d0400, 0x2f0400, 0x300500, 0x320500, 0x340500, 0x360600, 0x380600, 0x390700, 0x3b0700, 0x3d0700, 0x3f0800, 0x400800, 0x420900, 0x440900, 0x450a00,
0x470a00, 0x480b00, 0x4a0b00, 0x4c0c00, 0x4d0c00, 0x4f0d00, 0x500d00, 0x520e00, 0x530e00, 0x550f00, 0x560f00, 0x581000, 0x591000, 0x5b1100, 0x5c1200, 0x5e1200,
0x5f1300, 0x601300, 0x621400, 0x631500, 0x651500, 0x661600, 0x671600, 0x691700, 0x6a1800, 0x6c1800, 0x6d1900, 0x6e1a00, 0x701a00, 0x711b00, 0x721c00, 0x741c00,
0x751d00, 0x761e00, 0x781e00, 0x791f00, 0x7a2000, 0x7c2000, 0x7d2100, 0x7e2200, 0x7f2300, 0x812300, 0x822400, 0x832500, 0x842600, 0x862600, 0x872700, 0x882800,
0x8a2900, 0x8b2900, 0x8c2a00, 0x8d2b00, 0x8e2c00, 0x902c00, 0x912d00, 0x922e00, 0x932f00, 0x953000, 0x963000, 0x973100, 0x983200, 0x993300, 0x9b3400, 0x9c3400,
0x9d3500, 0x9e3600, 0x9f3700, 0xa03800, 0xa23900, 0xa33a00, 0xa43a00, 0xa53b00, 0xa63c00, 0xa73d00, 0xa93e00, 0xaa3f00, 0xab4000, 0xac4000, 0xad4100, 0xae4200,
0xaf4300, 0xb14400, 0xb24500, 0xb34600, 0xb44700, 0xb54800, 0xb64900, 0xb74a00, 0xb94a00, 0xba4b00, 0xbb4c00, 0xbc4d00, 0xbd4e00, 0xbe4f00, 0xbf5000, 0xc05100,
0xc15200, 0xc25300, 0xc45400, 0xc55500, 0xc65600, 0xc75700, 0xc85800, 0xc95900, 0xca5a00, 0xcb5b00, 0xcc5c00, 0xcd5d00, 0xce5e00, 0xcf5f00, 0xd06000, 0xd26101,
0xd36201, 0xd46301, 0xd56401, 0xd66501, 0xd76601, 0xd86701, 0xd96801, 0xda6901, 0xdb6a01, 0xdc6b01, 0xdd6c01, 0xde6d01, 0xdf6e01, 0xe06f01, 0xe17001, 0xe27201,
0xe37301, 0xe47401, 0xe57501, 0xe67602, 0xe77702, 0xe87802, 0xe97902, 0xeb7a02, 0xec7b02, 0xed7c02, 0xee7e02, 0xef7f02, 0xf08002, 0xf18103, 0xf28203, 0xf38303,
0xf48403, 0xf58503, 0xf68703, 0xf78803, 0xf88903, 0xf98a04, 0xfa8b04, 0xfb8c04, 0xfc8d04, 0xfd8f04, 0xfe9005, 0xff9105, 0xff9205, 0xff9305, 0xff9405, 0xff9606,
0xff9706, 0xff9806, 0xff9906, 0xff9a07, 0xff9b07, 0xff9d07, 0xff9e08, 0xff9f08, 0xffa008, 0xffa109, 0xffa309, 0xffa409, 0xffa50a, 0xffa60a, 0xffa80a, 0xffa90b,
0xffaa0b, 0xffab0c, 0xffac0c, 0xffae0d, 0xffaf0d, 0xffb00e, 0xffb10e, 0xffb30f, 0xffb40f, 0xffb510, 0xffb610, 0xffb811, 0xffb912, 0xffba12, 0xffbb13, 0xffbd14,
0xffbe14, 0xffbf15, 0xffc016, 0xffc217, 0xffc317, 0xffc418, 0xffc619, 0xffc71a, 0xffc81b, 0xffca1c, 0xffcb1d, 0xffcc1e, 0xffcd1f, 0xffcf20, 0xffd021, 0xffd122,
0xffd323, 0xffd424, 0xffd526, 0xffd727, 0xffd828, 0xffd92a, 0xffdb2b, 0xffdc2c, 0xffdd2e, 0xffdf2f, 0xffe031, 0xffe133, 0xffe334, 0xffe436, 0xffe538, 0xffe739
},
{ // Green monitor
0x000000, 0x000400, 0x000700, 0x000900, 0x000b00, 0x000d00, 0x000f00, 0x001100, 0x001300, 0x001500, 0x001600, 0x001800, 0x001a00, 0x001b00, 0x001d00, 0x001e00,
0x002000, 0x002100, 0x002300, 0x002400, 0x002601, 0x002701, 0x002901, 0x002a01, 0x002b01, 0x002d01, 0x002e01, 0x002f01, 0x003101, 0x003201, 0x003301, 0x003401,
0x003601, 0x003702, 0x003802, 0x003902, 0x003b02, 0x003c02, 0x003d02, 0x003e02, 0x004002, 0x004102, 0x004203, 0x004303, 0x004403, 0x004503, 0x004703, 0x004803,
0x004903, 0x004a03, 0x004b04, 0x004c04, 0x004d04, 0x004e04, 0x005004, 0x005104, 0x005205, 0x005305, 0x005405, 0x005505, 0x005605, 0x005705, 0x005806, 0x005906,
0x005a06, 0x005b06, 0x005d06, 0x005e07, 0x005f07, 0x006007, 0x006107, 0x006207, 0x006308, 0x006408, 0x006508, 0x006608, 0x006708, 0x006809, 0x006909, 0x006a09,
0x006b09, 0x016c0a, 0x016d0a, 0x016e0a, 0x016f0a, 0x01700b, 0x01710b, 0x01720b, 0x01730b, 0x01740c, 0x01750c, 0x01760c, 0x01770c, 0x01780d, 0x01790d, 0x017a0d,
0x017b0d, 0x017b0e, 0x017c0e, 0x017d0e, 0x017e0f, 0x017f0f, 0x01800f, 0x018110, 0x028210, 0x028310, 0x028410, 0x028511, 0x028611, 0x028711, 0x028812, 0x028912,
0x028a12, 0x028a13, 0x028b13, 0x028c13, 0x028d14, 0x028e14, 0x038f14, 0x039015, 0x039115, 0x039215, 0x039316, 0x039416, 0x039417, 0x039517, 0x039617, 0x039718,
0x049818, 0x049918, 0x049a19, 0x049b19, 0x049c19, 0x049c1a, 0x049d1a, 0x049e1b, 0x059f1b, 0x05a01b, 0x05a11c, 0x05a21c, 0x05a31c, 0x05a31d, 0x05a41d, 0x06a51e,
0x06a61e, 0x06a71f, 0x06a81f, 0x06a920, 0x06aa20, 0x07aa21, 0x07ab21, 0x07ac21, 0x07ad22, 0x07ae22, 0x08af23, 0x08b023, 0x08b024, 0x08b124, 0x08b225, 0x09b325,
0x09b426, 0x09b526, 0x09b527, 0x0ab627, 0x0ab728, 0x0ab828, 0x0ab929, 0x0bba29, 0x0bba2a, 0x0bbb2a, 0x0bbc2b, 0x0cbd2b, 0x0cbe2c, 0x0cbf2c, 0x0dbf2d, 0x0dc02d,
0x0dc12e, 0x0ec22e, 0x0ec32f, 0x0ec42f, 0x0fc430, 0x0fc530, 0x0fc631, 0x10c731, 0x10c832, 0x10c932, 0x11c933, 0x11ca33, 0x11cb34, 0x12cc35, 0x12cd35, 0x12cd36,
0x13ce36, 0x13cf37, 0x13d037, 0x14d138, 0x14d139, 0x14d239, 0x15d33a, 0x15d43a, 0x16d43b, 0x16d53b, 0x17d63c, 0x17d73d, 0x17d83d, 0x18d83e, 0x18d93e, 0x19da3f,
0x19db40, 0x1adc40, 0x1adc41, 0x1bdd41, 0x1bde42, 0x1cdf43, 0x1ce043, 0x1de044, 0x1ee145, 0x1ee245, 0x1fe346, 0x1fe446, 0x20e447, 0x20e548, 0x21e648, 0x22e749,
0x22e74a, 0x23e84a, 0x23e94b, 0x24ea4c, 0x25ea4c, 0x25eb4d, 0x26ec4e, 0x27ed4e, 0x27ee4f, 0x28ee50, 0x29ef50, 0x29f051, 0x2af152, 0x2bf153, 0x2cf253, 0x2cf354,
0x2df455, 0x2ef455, 0x2ff556, 0x2ff657, 0x30f758, 0x31f758, 0x32f859, 0x32f95a, 0x33fa5a, 0x34fa5b, 0x35fb5c, 0x36fc5d, 0x37fd5d, 0x38fd5e, 0x38fe5f, 0x39ff60
},
{ // White monitor
0x000000, 0x010102, 0x020203, 0x020304, 0x030406, 0x040507, 0x050608, 0x060709, 0x07080a, 0x08090c, 0x080a0d, 0x090b0e, 0x0a0c0f, 0x0b0d10, 0x0c0e11, 0x0d0f12,
0x0e1013, 0x0f1115, 0x101216, 0x111317, 0x121418, 0x121519, 0x13161a, 0x14171b, 0x15181c, 0x16191d, 0x171a1e, 0x181b1f, 0x191c20, 0x1a1d21, 0x1b1e22, 0x1c1f23,
0x1d2024, 0x1e2125, 0x1f2226, 0x202327, 0x212428, 0x222529, 0x22262b, 0x23272c, 0x24282d, 0x25292e, 0x262a2f, 0x272b30, 0x282c30, 0x292d31, 0x2a2e32, 0x2b2f33,
0x2c3034, 0x2d3035, 0x2e3136, 0x2f3237, 0x303338, 0x313439, 0x32353a, 0x33363b, 0x34373c, 0x35383d, 0x36393e, 0x373a3f, 0x383b40, 0x393c41, 0x3a3d42, 0x3b3e43,
0x3c3f44, 0x3d4045, 0x3e4146, 0x3f4247, 0x404348, 0x414449, 0x42454a, 0x43464b, 0x44474c, 0x45484d, 0x46494d, 0x474a4e, 0x484b4f, 0x484c50, 0x494d51, 0x4a4e52,
0x4b4f53, 0x4c5054, 0x4d5155, 0x4e5256, 0x4f5357, 0x505458, 0x515559, 0x52565a, 0x53575b, 0x54585b, 0x55595c, 0x565a5d, 0x575b5e, 0x585c5f, 0x595d60, 0x5a5e61,
0x5b5f62, 0x5c6063, 0x5d6164, 0x5e6265, 0x5f6366, 0x606466, 0x616567, 0x626668, 0x636769, 0x64686a, 0x65696b, 0x666a6c, 0x676b6d, 0x686c6e, 0x696d6f, 0x6a6e70,
0x6b6f70, 0x6c7071, 0x6d7172, 0x6f7273, 0x707374, 0x707475, 0x717576, 0x727677, 0x747778, 0x757879, 0x767979, 0x777a7a, 0x787b7b, 0x797c7c, 0x7a7d7d, 0x7b7e7e,
0x7c7f7f, 0x7d8080, 0x7e8181, 0x7f8281, 0x808382, 0x818483, 0x828584, 0x838685, 0x848786, 0x858887, 0x868988, 0x878a89, 0x888b89, 0x898c8a, 0x8a8d8b, 0x8b8e8c,
0x8c8f8d, 0x8d8f8e, 0x8e908f, 0x8f9190, 0x909290, 0x919391, 0x929492, 0x939593, 0x949694, 0x959795, 0x969896, 0x979997, 0x989a98, 0x999b98, 0x9a9c99, 0x9b9d9a,
0x9c9e9b, 0x9d9f9c, 0x9ea09d, 0x9fa19e, 0xa0a29f, 0xa1a39f, 0xa2a4a0, 0xa3a5a1, 0xa4a6a2, 0xa6a7a3, 0xa7a8a4, 0xa8a9a5, 0xa9aaa5, 0xaaaba6, 0xabaca7, 0xacada8,
0xadaea9, 0xaeafaa, 0xafb0ab, 0xb0b1ac, 0xb1b2ac, 0xb2b3ad, 0xb3b4ae, 0xb4b5af, 0xb5b6b0, 0xb6b7b1, 0xb7b8b2, 0xb8b9b2, 0xb9bab3, 0xbabbb4, 0xbbbcb5, 0xbcbdb6,
0xbdbeb7, 0xbebfb8, 0xbfc0b8, 0xc0c1b9, 0xc1c2ba, 0xc2c3bb, 0xc3c4bc, 0xc5c5bd, 0xc6c6be, 0xc7c7be, 0xc8c8bf, 0xc9c9c0, 0xcacac1, 0xcbcbc2, 0xccccc3, 0xcdcdc3,
0xcecec4, 0xcfcfc5, 0xd0d0c6, 0xd1d1c7, 0xd2d2c8, 0xd3d3c9, 0xd4d4c9, 0xd5d5ca, 0xd6d6cb, 0xd7d7cc, 0xd8d8cd, 0xd9d9ce, 0xdadacf, 0xdbdbcf, 0xdcdcd0, 0xdeddd1,
0xdfded2, 0xe0dfd3, 0xe1e0d4, 0xe2e1d4, 0xe3e2d5, 0xe4e3d6, 0xe5e4d7, 0xe6e5d8, 0xe7e6d9, 0xe8e7d9, 0xe9e8da, 0xeae9db, 0xebeadc, 0xecebdd, 0xedecde, 0xeeeddf,
0xefeedf, 0xf0efe0, 0xf1f0e1, 0xf2f1e2, 0xf3f2e3, 0xf4f3e3, 0xf6f3e4, 0xf7f4e5, 0xf8f5e6, 0xf9f6e7, 0xfaf7e8, 0xfbf8e9, 0xfcf9e9, 0xfdfaea, 0xfefbeb, 0xfffcec
}
};
uint32_t svga_color_transform(uint32_t color)
{
uint32_t temp = 0;
temp = color;
if (video_grayscale != 0)
{
temp = ((77 * (color & 0xff0000)) >> 24) + ((150 * (color & 0xff00)) >> 16) + ((29 * (color & 0xff)) >> 8);
if (temp > 0xff)
temp = 0xff;
float temp_r = 0;
float temp_g = 0;
float temp_b = 0;
temp_r = temp_g = temp_b = ((float)temp) / 256;
if (video_graytype)
{
if (video_graytype == 1)
temp = ((54 * ((color & 0xff0000) >> 16)) + (183 * ((color & 0xff00) >> 8)) + (18 * (color & 0xff))) / 255;
else
temp = (((color & 0xff0000) >> 16) + ((color & 0xff00) >> 8) + (color & 0xff)) / 3;
}
else
temp = ((76 * ((color & 0xff0000) >> 16)) + (150 * ((color & 0xff00) >> 8)) + (29 * (color & 0xff))) / 255;
switch (video_grayscale)
{
case 2:
temp_r = pow(temp_r, 0.6);
temp_g = 0.9 * pow(temp_g, 2);
temp_b = 0.2 * pow(temp_b, 6);
break;
case 3:
temp_r = 0.225 * pow(temp_r, 4);
temp_g = pow(temp_g, 0.75);
temp_b = 0.375 * pow(temp_b, 2);
break;
case 4:
temp_r = pow(temp_r, 1.05);
temp_g = 0.99 * temp_g;
temp_b = 0.925 * pow(temp_b, 0.9);
color = shade[video_grayscale][temp];
break;
default:
color = temp;
color |= temp << 8;
color |= temp << 16;
break;
}
if (temp_r >= 1)
temp = 0xff0000;
else if (temp_r <= 0)
temp = 0x000000;
else
temp = (int)(temp_r * 256) << 16;
if (temp_g >= 1)
temp |= 0x00ff00;
else if (temp_g <= 0)
temp &= 0xff00ff;
else
temp = temp + ((int)(temp_g * 256) << 8);
if (temp_b >= 1)
temp |= 0x0000ff;
else if (temp_b <= 0)
temp &= 0xffff00;
else
temp = temp + (int)(temp_b * 256);
color = temp;
}
if (invert_display)
{
@@ -89,6 +122,8 @@ uint32_t svga_color_transform(uint32_t color)
temp |= (0xff00 - (color & 0xff00));
temp |= (0xff0000 - (color & 0xff0000));
}
else
return color;
return temp;
}

View File

@@ -113,6 +113,9 @@ void ddraw_fs_take_screenshot(wchar_t *fn);
extern int cga_palette;
extern int vid_cga_contrast;
extern int video_grayscale;
extern int video_graytype;
void loadfont(wchar_t *s, int format);
void initvideo();
void video_init();

View File

@@ -1,4 +1,4 @@
/*
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
@@ -81,14 +81,20 @@ BEGIN
BEGIN
MENUITEM "&Inverted VGA monitor", IDM_VID_INVERT
MENUITEM "E&GA/(S)VGA overscan", IDM_VID_OVERSCAN
POPUP "VGA Screen &type"
BEGIN
MENUITEM "RGB &Color", IDM_VID_GRAY_RGB
MENUITEM "&RGB Grayscale", IDM_VID_GRAY_MONO
MENUITEM "&Amber monitor", IDM_VID_GRAY_AMBER
MENUITEM "&Green monitor", IDM_VID_GRAY_GREEN
MENUITEM "&White monitor", IDM_VID_GRAY_WHITE
END
POPUP "VGA screen &type"
BEGIN
MENUITEM "RGB &Color", IDM_VID_GRAY_RGB
MENUITEM "&RGB Grayscale", IDM_VID_GRAY_MONO
MENUITEM "&Amber monitor", IDM_VID_GRAY_AMBER
MENUITEM "&Green monitor", IDM_VID_GRAY_GREEN
MENUITEM "&White monitor", IDM_VID_GRAY_WHITE
END
POPUP "Grayscale &conversion type"
BEGIN
MENUITEM "BT&601 (NTSC/PAL)", IDM_VID_GRAYCT_601
MENUITEM "BT&709 (HDTV)", IDM_VID_GRAYCT_709
MENUITEM "&Average", IDM_VID_GRAYCT_AVE
END
END
MENUITEM SEPARATOR
MENUITEM "F&orce 4:3 display ratio", IDM_VID_FORCE43

View File

@@ -410,6 +410,9 @@
#define IDM_VID_OVERSCAN 40076
#define IDM_VID_INVERT 40079
#define IDM_VID_CGACON 40080
#define IDM_VID_GRAYCT_601 40085
#define IDM_VID_GRAYCT_709 40086
#define IDM_VID_GRAYCT_AVE 40087
#define IDM_VID_GRAY_RGB 40090
#define IDM_VID_GRAY_MONO 40091
#define IDM_VID_GRAY_AMBER 40092

View File

@@ -1532,6 +1532,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpsz
CheckMenuItem(menu, IDM_VID_SCALE_1X + scale, MF_CHECKED);
CheckMenuItem(menu, IDM_VID_CGACON, vid_cga_contrast ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(menu, IDM_VID_GRAYCT_601 + video_graytype, MF_CHECKED);
CheckMenuItem(menu, IDM_VID_GRAY_RGB + video_grayscale, MF_CHECKED);
d=romset;
@@ -1971,6 +1972,16 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
saveconfig();
break;
case IDM_VID_GRAYCT_601:
case IDM_VID_GRAYCT_709:
case IDM_VID_GRAYCT_AVE:
CheckMenuItem(hmenu, IDM_VID_GRAYCT_601 + video_graytype, MF_UNCHECKED);
video_graytype = LOWORD(wParam) - IDM_VID_GRAYCT_601;
CheckMenuItem(hmenu, IDM_VID_GRAYCT_601 + video_graytype, MF_CHECKED);
saveconfig();
device_force_redraw();
break;
case IDM_VID_GRAY_RGB:
case IDM_VID_GRAY_MONO:
case IDM_VID_GRAY_AMBER:

View File

@@ -198,7 +198,7 @@ int file_dlg_w(HWND hwnd, WCHAR *f, WCHAR *fn, int save)
}
if (r)
{
wcstombs(openfilestring, wopenfilestring, 520);
wcstombs(openfilestring, wopenfilestring, sizeof(openfilestring));
pclog("File dialog return true\n");
return 0;
}

View File

@@ -663,7 +663,7 @@ static BOOL CALLBACK win_settings_machine_proc(HWND hdlg, UINT message, WPARAM w
h = GetDlgItem(hdlg, IDC_MEMTEXT);
SendMessage(h, WM_GETTEXT, 255, (LPARAM) lptsTemp);
wcstombs(stransi, lptsTemp, (wcslen(lptsTemp) * 2) + 2);
wcstombs(stransi, lptsTemp, sizeof(stransi));
sscanf(stransi, "%i", &temp_mem_size);
temp_mem_size &= ~(models[temp_model].ram_granularity - 1);
if (temp_mem_size < models[temp_model].min_ram)
@@ -765,7 +765,7 @@ static BOOL CALLBACK win_settings_video_proc(HWND hdlg, UINT message, WPARAM wPa
h = GetDlgItem(hdlg, IDC_COMBO_VIDEO);
SendMessage(h, CB_GETLBTEXT, SendMessage(h, CB_GETCURSEL, 0, 0), (LPARAM) lptsTemp);
wcstombs(stransi, lptsTemp, (wcslen(lptsTemp) * 2) + 2);
wcstombs(stransi, lptsTemp, sizeof(stransi));
gfx = video_card_getid(stransi);
h = GetDlgItem(hdlg, IDC_CONFIGURE_VID);
@@ -792,7 +792,7 @@ static BOOL CALLBACK win_settings_video_proc(HWND hdlg, UINT message, WPARAM wPa
h = GetDlgItem(hdlg, IDC_COMBO_VIDEO);
SendMessage(h, CB_GETLBTEXT, SendMessage(h, CB_GETCURSEL, 0, 0), (LPARAM) lptsTemp);
wcstombs(stransi, lptsTemp, (wcslen(lptsTemp) * 2) + 2);
wcstombs(stransi, lptsTemp, sizeof(stransi));
gfx = video_card_getid(stransi);
temp_gfxcard = video_new_to_old(gfx);
@@ -828,7 +828,7 @@ static BOOL CALLBACK win_settings_video_proc(HWND hdlg, UINT message, WPARAM wPa
h = GetDlgItem(hdlg, IDC_COMBO_VIDEO);
SendMessage(h, CB_GETLBTEXT, SendMessage(h, CB_GETCURSEL, 0, 0), (LPARAM) lptsTemp);
wcstombs(stransi, lptsTemp, (wcslen(lptsTemp) * 2) + 2);
wcstombs(stransi, lptsTemp, sizeof(stransi));
deviceconfig_open(hdlg, (void *)video_card_getdevice(video_card_getid(stransi)));
free(stransi);
@@ -843,7 +843,7 @@ static BOOL CALLBACK win_settings_video_proc(HWND hdlg, UINT message, WPARAM wPa
h = GetDlgItem(hdlg, IDC_COMBO_VIDEO);
SendMessage(h, CB_GETLBTEXT, SendMessage(h, CB_GETCURSEL, 0, 0), (LPARAM) lptsTemp);
wcstombs(stransi, lptsTemp, (wcslen(lptsTemp) * 2) + 2);
wcstombs(stransi, lptsTemp, sizeof(stransi));
temp_gfxcard = video_new_to_old(video_card_getid(stransi));
h = GetDlgItem(hdlg, IDC_COMBO_VIDEO_SPEED);
@@ -2436,7 +2436,7 @@ static void get_edit_box_contents(HWND hdlg, int id, uint64_t *val)
h = GetDlgItem(hdlg, id);
SendMessage(h, WM_GETTEXT, 255, (LPARAM) szText);
wcstombs(stransi, szText, (wcslen(szText) * 2) + 2);
wcstombs(stransi, szText, sizeof(stransi));
sscanf(stransi, "%" PRIu64, val);
}

View File

@@ -2400,7 +2400,7 @@ void cdrom_command(uint8_t id, uint8_t *cdb)
break;
case GPCMD_MECHANISM_STATUS:
len = (cdbufferb[7] << 16) | (cdbufferb[8] << 8) | cdbufferb[9];
len = (cdb[7] << 16) | (cdb[8] << 8) | cdb[9];
memset(cdbufferb, 0, 8);
cdbufferb[5] = 1;

View File

@@ -985,7 +985,7 @@ int image_open(uint8_t id, wchar_t *fn)
}
cdimg[id] = new CDROM_Interface_Image();
wcstombs(afn, fn, (wcslen(fn) << 1) + 2);
wcstombs(afn, fn, sizeof(afn));
if (!cdimg[id]->SetDevice(afn, false))
{
image_close(id);

View File

@@ -225,7 +225,7 @@ int config_load(wchar_t *fn)
strncpy(new_entry->name, ename, 256);
memcpy(new_entry->wdata, &cfgbuffer[data_pos], 512);
new_entry->wdata[255] = L'\0';
wcstombs(new_entry->data, new_entry->wdata, 512);
wcstombs(new_entry->data, new_entry->wdata, sizeof(new_entry->data));
new_entry->data[255] = '\0';
list_add(&new_entry->list, &current_section->entry_head);
}
@@ -805,6 +805,7 @@ static void loadconfig_general(void)
enable_overscan = !!config_get_int(cat, "enable_overscan", 0);
vid_cga_contrast = !!config_get_int(cat, "vid_cga_contrast", 0);
video_grayscale = config_get_int(cat, "video_grayscale", 0);
video_graytype = config_get_int(cat, "video_graytype", 0);
window_remember = config_get_int(cat, "window_remember", 0);
@@ -1810,6 +1811,14 @@ static void saveconfig_general(void)
config_set_int(cat, "video_grayscale", video_grayscale);
}
if (video_graytype == 0)
{
config_delete_var(cat, "video_graytype");
}
else
{
config_set_int(cat, "video_graytype", video_graytype);
}
if (window_remember)
{

View File

@@ -32,7 +32,7 @@
#include "timer.h"
wchar_t discfns[4][256];
wchar_t discfns[4][512];
extern int driveempty[4];
int disc_poll_time[FDD_NUM] = { 16, 16, 16, 16 };
@@ -157,7 +157,7 @@ void disc_close(int drive)
if (loaders[driveloaders[drive]].close) loaders[driveloaders[drive]].close(drive);
drive_empty[drive] = 1;
fdd_set_head(real_drive(drive), 0);
discfns[drive][0] = L'\0';
discfns[drive][0] = 0;
drives[drive].hole = NULL;
drives[drive].poll = NULL;
drives[drive].seek = NULL;

View File

@@ -374,7 +374,7 @@ extern int pic_intpending;
extern int disctime;
extern wchar_t discfns[4][256];
extern wchar_t discfns[4][512];
extern int driveempty[4];
#define MDA ((gfxcard==GFX_MDA || gfxcard==GFX_HERCULES || gfxcard==GFX_HERCULESPLUS || gfxcard==GFX_INCOLOR || gfxcard==GFX_GENIUS) && (romset<ROM_TANDY || romset>=ROM_IBMAT))
@@ -737,7 +737,6 @@ extern int serial_enabled[2];
extern int lpt_enabled, bugger_enabled;
extern int invert_display;
extern int video_grayscale;
uint32_t svga_color_transform(uint32_t color);

View File

@@ -216,23 +216,25 @@ int loadbios()
fclose(f);
return 1;
#if 0
case ROM_PORTABLEII:
f = romfopen(L"roms/machines/portableii/62x0820.u27", L"rb");
ff =romfopen(L"roms/machines/portableii/62x0821.u47", L"rb");
f = romfopen(L"roms/machines/portableii/106438-001.BIN", L"rb");
ff =romfopen(L"roms/machines/portableii/106437-001.BIN", L"rb");
if (!f || !ff) break;
for (c=0x0000;c<0x10000;c+=2)
for (c=0x0000;c<0x8000;c+=2)
{
rom[c]=getc(f);
rom[c+1]=getc(ff);
}
fclose(ff);
fclose(f);
biosmask = 0x7fff;
return 1;
case ROM_PORTABLEIII:
case ROM_PORTABLEIII386:
f = romfopen(L"roms/machines/portableiii/62x0820.u27", L"rb");
ff =romfopen(L"roms/machines/portableiii/62x0821.u47", L"rb");
f = romfopen(L"roms/machines/portableiii/109738-002.BIN", L"rb");
ff =romfopen(L"roms/machines/portableiii/109737-002.BIN", L"rb");
if (!f || !ff) break;
for (c=0x0000;c<0x10000;c+=2)
{
@@ -242,6 +244,7 @@ int loadbios()
fclose(ff);
fclose(f);
return 1;
#endif
case ROM_GENXT:
f=romfopen(L"roms/machines/genxt/pcxt.rom",L"rb");

View File

@@ -165,14 +165,16 @@ MODEL models[] =
{"[286] AMI 286 clone", ROM_AMI286, "ami286", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_HAS_IDE, 512,16384, 128, 127, at_neat_init, NULL },
{"[286] Award 286 clone", ROM_AWARD286, "award286", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_HAS_IDE, 512,16384, 128, 127, at_scat_init, NULL },
#if 0
{"[286] Compaq Portable II", ROM_PORTABLEII, "portableii", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MODEL_AT, 1, 15, 1, 63, at_init, NULL },
{"[286] Compaq Portable III", ROM_PORTABLEIII, "portableiii", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MODEL_AT, 1, 15, 1, 63, at_init, NULL },
#endif
{"[286] Commodore PC 30 III", ROM_CMDPC30, "cmdpc30", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_HAS_IDE, 640,16384, 128, 127, cmdpc30_init, NULL },
{"[286] Hyundai Super-286TR", ROM_SUPER286TR, "super286tr", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_HAS_IDE, 512,16384, 128, 127, at_scat_init, NULL },
{"[286] IBM AT", ROM_IBMAT, "ibmat", {{"", cpus_ibmat}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MODEL_AT, 256,15872, 128, 63, ibm_at_init, NULL },
{"[286] IBM PS/1 model 2011", ROM_IBMPS1_2011, "ibmps1es", {{"", cpus_ps1_m2011}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD, 512,16384, 512, 127, ps1_m2011_init, NULL },
{"[286] IBM PS/2 Model 30-286", ROM_IBMPS2_M30_286, "ibmps2_m30_286", {{"", cpus_ps2_m30_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD, 1, 16, 1, 127, ps2_m30_286_init, NULL },
{"[286] IBM PS/2 Model 50", ROM_IBMPS2_M50, "ibmps2_m50", {{"", cpus_ps2_m30_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD | MODEL_MCA, 1, 16, 1, 63, ps2_model_50_init, NULL },
{"[286] IBM PS/2 Model 30-286", ROM_IBMPS2_M30_286, "ibmps2_m30_286", {{"", cpus_ps2_m30_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD, 1, 16, 1, 127, ps2_m30_286_init, NULL },
{"[286] IBM PS/2 Model 50", ROM_IBMPS2_M50, "ibmps2_m50", {{"", cpus_ps2_m30_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD | MODEL_MCA, 1, 16, 1, 63, ps2_model_50_init, NULL },
{"[286] Samsung SPC-4200P", ROM_SPC4200P, "spc4200p", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE, 512,16384, 128, 127, at_scat_init, NULL },
{"[386SX] AMI 386SX clone", ROM_AMI386SX, "ami386", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_HAS_IDE, 512,16384, 128, 127, at_headland_init, NULL },
@@ -180,13 +182,15 @@ MODEL models[] =
{"[386SX] DTK 386SX clone", ROM_DTK386, "dtk386", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_HAS_IDE, 512,16384, 128, 127, at_neat_init, NULL },
{"[386SX] IBM PS/1 model 2121", ROM_IBMPS1_2121, "ibmps1_2121", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 1, MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE, 1, 16, 1, 127, ps1_m2121_init, NULL },
{"[386SX] IBM PS/1 m.2121+ISA", ROM_IBMPS1_2121_ISA, "ibmps1_2121_isa", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE, 1, 16, 1, 127, ps1_m2121_init, NULL },
{"[386SX] IBM PS/2 Model 55SX", ROM_IBMPS2_M55SX, "ibmps2_m55sx", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD | MODEL_MCA, 1, 8, 1, 63, ps2_model_55sx_init, NULL },
{"[386SX] IBM PS/2 Model 55SX", ROM_IBMPS2_M55SX, "ibmps2_m55sx", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 1, MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD | MODEL_MCA, 1, 8, 1, 63, ps2_model_55sx_init, NULL },
{"[386DX] AMI 386DX clone", ROM_AMI386DX_OPTI495, "ami386dx", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_HAS_IDE, 1, 64, 1, 127, at_opti495_init, NULL },
{"[386DX] Amstrad MegaPC 386DX",ROM_MEGAPCDX, "megapcdx", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 1, MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE, 1, 16, 1, 127, at_wd76c10_init, NULL },
{"[386DX] Compaq Deskpro 386", ROM_DESKPRO_386, "dekspro386", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 0, MODEL_AT, 1, 15, 1, 63, deskpro386_init, NULL },
#if 0
{"[386DX] Compaq Portable III 386",ROM_PORTABLEIII386, "portableiii386", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 0, MODEL_AT, 1, 15, 1, 63, at_init, NULL },
{"[386DX] IBM PS/2 Model 80", ROM_IBMPS2_M80, "ibmps2_m80", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD | MODEL_MCA, 1, 12, 1, 63, ps2_model_80_init, NULL },
#endif
{"[386DX] IBM PS/2 Model 80", ROM_IBMPS2_M80, "ibmps2_m80", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 1, MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD | MODEL_MCA, 1, 12, 1, 63, ps2_model_80_init, NULL },
{"[386DX] MR 386DX clone", ROM_MR386DX_OPTI495, "mr386dx", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_HAS_IDE, 1, 64, 1, 127, at_opti495_init, NULL },
{"[486] AMI 486 clone", ROM_AMI486, "ami486", {{"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}, {"", NULL}, {"", NULL}}, 0, MODEL_AT | MODEL_HAS_IDE, 1, 64, 1, 127, at_ali1429_init, NULL },

View File

@@ -27,6 +27,7 @@
#include "io.h"
#include "mem.h"
#include "model.h"
#include "nmi.h"
#include "nvr.h"
#include "pic.h"
#include "rom.h"
@@ -184,7 +185,11 @@ void writenvr(uint16_t addr, uint8_t val, void *priv)
}
}
}
else nvraddr=val&nvrmask;
else
{
nvraddr=val&nvrmask;
nmi_mask = ~val & 0x80;
}
}
uint8_t readnvr(uint16_t addr, void *priv)