Moved Voodoo Banshee specific code to separate file banshee.cc.

TODO: code cleanup, update workspace files.
This commit is contained in:
Volker Ruppert 2018-01-05 17:43:51 +00:00
parent 55c9bad4ef
commit 7f321d0c20
10 changed files with 2473 additions and 2341 deletions

62
bochs/configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Id: configure.in 13298 2017-09-16 22:01:49Z vruppert .
# From configure.in Id: configure.in 13419 2017-12-30 14:56:54Z vruppert .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@ -869,6 +869,7 @@ SOUNDHW_OBJS
SOUND_LIB_VAR
CDROM_OBJS
DISPLAY_DLL_TARGETS
DISPLAY_EXTRA_OBJS
DISPLAY_OBJS
NETDEV_DLL_TARGETS
NETLOW_OBJS
@ -5187,7 +5188,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 5190 "configure"' > conftest.$ac_ext
echo '#line 5191 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -6875,11 +6876,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6878: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6879: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6882: \$? = $ac_status" >&5
echo "$as_me:6883: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -7108,11 +7109,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7111: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7112: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7115: \$? = $ac_status" >&5
echo "$as_me:7116: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -7175,11 +7176,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7178: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7179: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7182: \$? = $ac_status" >&5
echo "$as_me:7183: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -8965,7 +8966,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 8968 "configure"
#line 8969 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -9063,7 +9064,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9066 "configure"
#line 9067 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11178,11 +11179,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11181: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11182: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:11185: \$? = $ac_status" >&5
echo "$as_me:11186: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -11245,11 +11246,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11248: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11249: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:11252: \$? = $ac_status" >&5
echo "$as_me:11253: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -12270,7 +12271,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 12273 "configure"
#line 12274 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -12368,7 +12369,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 12371 "configure"
#line 12372 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -13191,11 +13192,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13194: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13195: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:13198: \$? = $ac_status" >&5
echo "$as_me:13199: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -13258,11 +13259,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13261: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13262: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:13265: \$? = $ac_status" >&5
echo "$as_me:13266: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -15223,11 +15224,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15226: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15227: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15230: \$? = $ac_status" >&5
echo "$as_me:15231: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -15456,11 +15457,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15459: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15460: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15463: \$? = $ac_status" >&5
echo "$as_me:15464: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -15523,11 +15524,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15526: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15527: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:15530: \$? = $ac_status" >&5
echo "$as_me:15531: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -17313,7 +17314,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 17316 "configure"
#line 17317 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -17411,7 +17412,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 17414 "configure"
#line 17415 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -19098,7 +19099,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 19101 "configure"
#line 19102 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -23744,6 +23745,7 @@ fi
DISPLAY_OBJS=''
DISPLAY_EXTRA_OBJS=''
DISPLAY_DLL_TARGETS=''
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLGD54XX emulation" >&5
$as_echo_n "checking for CLGD54XX emulation... " >&6; }
@ -23786,6 +23788,7 @@ $as_echo "yes" >&6; }
$as_echo "#define BX_SUPPORT_VOODOO 1" >>confdefs.h
DISPLAY_OBJS="$DISPLAY_OBJS voodoo.o"
DISPLAY_EXTRA_OBJS="$DISPLAY_EXTRA_OBJS banshee.o"
DISPLAY_DLL_TARGETS="$DISPLAY_DLL_TARGETS bx_voodoo.dll"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@ -23807,6 +23810,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lowlevel CDROM support" >&5
$as_echo_n "checking for lowlevel CDROM support... " >&6; }
# Check whether --enable-cdrom was given.

View File

@ -1796,6 +1796,7 @@ AC_ARG_ENABLE(raw-serial,
)
DISPLAY_OBJS=''
DISPLAY_EXTRA_OBJS=''
DISPLAY_DLL_TARGETS=''
AC_MSG_CHECKING(for CLGD54XX emulation)
AC_ARG_ENABLE(clgd54xx,
@ -1825,6 +1826,7 @@ AC_ARG_ENABLE(voodoo,
fi
AC_DEFINE(BX_SUPPORT_VOODOO, 1)
DISPLAY_OBJS="$DISPLAY_OBJS voodoo.o"
DISPLAY_EXTRA_OBJS="$DISPLAY_EXTRA_OBJS banshee.o"
DISPLAY_DLL_TARGETS="$DISPLAY_DLL_TARGETS bx_voodoo.dll"
else
AC_MSG_RESULT(no)
@ -1836,6 +1838,7 @@ AC_ARG_ENABLE(voodoo,
]
)
AC_SUBST(DISPLAY_OBJS)
AC_SUBST(DISPLAY_EXTRA_OBJS)
AC_SUBST(DISPLAY_DLL_TARGETS)

View File

@ -1,4 +1,4 @@
# Copyright (C) 2012-2017 The Bochs Project
# Copyright (C) 2012-2018 The Bochs Project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@ -50,6 +50,7 @@ LIBTOOL=@LIBTOOL@
WIN32_DLL_IMPORT_LIBRARY=../../@WIN32_DLL_IMPORT_LIB@
DISPLAY_OBJS = @DISPLAY_OBJS@
DISPLAY_EXTRA_OBJS = @DISPLAY_EXTRA_OBJS@
BX_INCDIRS = -I.. -I../.. -I$(srcdir)/.. -I$(srcdir)/../.. -I../../@INSTRUMENT_DIR@ -I$(srcdir)/../../@INSTRUMENT_DIR@
LOCAL_CXXFLAGS = $(MCH_CFLAGS)
@ -59,7 +60,8 @@ OBJS_THAT_CAN_BE_PLUGINS = \
$(DISPLAY_OBJS)
OBJS_THAT_SUPPORT_OTHER_PLUGINS = \
vgacore.o
vgacore.o \
$(DISPLAY_EXTRA_OBJS)
NONPLUGIN_OBJS = @IODEV_EXT_NON_PLUGIN_OBJS@
PLUGIN_OBJS = @IODEV_EXT_PLUGIN_OBJS@
@ -96,8 +98,8 @@ libbx_vga.la: vga.lo vgacore.lo
libbx_svga_cirrus.la: svga_cirrus.lo vgacore.lo
$(LIBTOOL) --mode=link --tag CXX $(CXX) -module svga_cirrus.lo vgacore.lo -o libbx_svga_cirrus.la -rpath $(PLUGIN_PATH)
libbx_voodoo.la: voodoo.lo vgacore.lo
$(LIBTOOL) --mode=link --tag CXX $(CXX) -module voodoo.lo vgacore.lo -o libbx_voodoo.la -rpath $(PLUGIN_PATH)
libbx_voodoo.la: voodoo.lo banshee.lo vgacore.lo
$(LIBTOOL) --mode=link --tag CXX $(CXX) -module voodoo.lo banshee.lo vgacore.lo -o libbx_voodoo.la -rpath $(PLUGIN_PATH)
#### building DLLs for win32 (Cygwin and MinGW/MSYS)
bx_%.dll: %.o
@ -110,8 +112,8 @@ bx_vga.dll: vga.o vgacore.o
bx_svga_cirrus.dll: svga_cirrus.o vgacore.o
@LINK_DLL@ svga_cirrus.o vgacore.o $(WIN32_DLL_IMPORT_LIBRARY)
bx_voodoo.dll: voodoo.o vgacore.o
@LINK_DLL@ voodoo.o vgacore.o $(WIN32_DLL_IMPORT_LIBRARY)
bx_voodoo.dll: voodoo.o banshee.o vgacore.o
@LINK_DLL@ voodoo.o banshee.o vgacore.o $(WIN32_DLL_IMPORT_LIBRARY)
##### end DLL section
@ -131,6 +133,13 @@ dist-clean: clean
# and then again with an identical .lo rule. The .lo rules are used when
# building plugins.
###########################################
banshee.o: banshee.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
../../memory/memory-bochs.h ../../pc_system.h ../../gui/gui.h \
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
../../param_names.h ../pci.h vgacore.h voodoo.h ../virt_timer.h \
../../bxthread.h bitblt.h voodoo_types.h voodoo_data.h voodoo_main.h
svga_cirrus.o: svga_cirrus.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
@ -157,6 +166,13 @@ voodoo.o: voodoo.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h ../../osde
../../param_names.h ../pci.h vgacore.h voodoo.h ../virt_timer.h \
../../bxthread.h bitblt.h voodoo_types.h voodoo_data.h voodoo_main.h \
voodoo_func.h
banshee.lo: banshee.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
../../memory/memory-bochs.h ../../pc_system.h ../../gui/gui.h \
../../instrument/stubs/instrument.h ../../plugin.h ../../extplugin.h \
../../param_names.h ../pci.h vgacore.h voodoo.h ../virt_timer.h \
../../bxthread.h bitblt.h voodoo_types.h voodoo_data.h voodoo_main.h
svga_cirrus.lo: svga_cirrus.@CPP_SUFFIX@ ../iodev.h ../../bochs.h ../../config.h \
../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2017 The Bochs Project
// Copyright (C) 2017-2018 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -66,6 +66,7 @@ typedef void (*bx_bitblt_rop_t)(
} \
}
#ifdef BX_USE_BINARY_ROP
IMPLEMENT_FORWARD_BITBLT(0, *dst = 0)
IMPLEMENT_FORWARD_BITBLT(src_and_dst, *dst = (*src) & (*dst))
IMPLEMENT_FORWARD_BITBLT(nop, (void)0)
@ -99,7 +100,9 @@ IMPLEMENT_BACKWARD_BITBLT(src_or_notdst, *dst = (*src) | (~(*dst)))
IMPLEMENT_BACKWARD_BITBLT(notsrc, *dst = (~(*src)))
IMPLEMENT_BACKWARD_BITBLT(notsrc_or_dst, *dst = (~(*src)) | (*dst))
IMPLEMENT_BACKWARD_BITBLT(notsrc_and_notdst, *dst = (~(*src)) & (~(*dst)))
#endif
#ifdef BX_USE_TERNARY_ROP
static void bx_ternary_rop(Bit8u rop0, Bit8u *dst_ptr, Bit8u *src_ptr, Bit8u *pat_ptr,
int dpxsize)
{
@ -120,5 +123,6 @@ static void bx_ternary_rop(Bit8u rop0, Bit8u *dst_ptr, Bit8u *src_ptr, Bit8u *pa
pat_ptr++;
}
}
#endif
#endif

View File

@ -5,7 +5,7 @@
// Copyright (c) 2004 Makoto Suzuki (suzu)
// Volker Ruppert (vruppert)
// Robin Kay (komadori)
// Copyright (C) 2004-2017 The Bochs Project
// Copyright (C) 2004-2018 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -39,6 +39,7 @@
#include "iodev.h"
#include "vgacore.h"
#define BX_USE_BINARY_ROP
#include "bitblt.h"
#include "svga_cirrus.h"
#include "virt_timer.h"

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2012-2017 The Bochs Project
// Copyright (C) 2012-2018 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -196,4 +196,8 @@ public:
protected:
virtual void update(void);
};
extern bx_voodoo_base_c* theVoodooDevice;
extern bx_voodoo_vga_c* theVoodooVga;
#endif

View File

@ -1714,6 +1714,8 @@ struct _poly_extra_data
};
#define BX_ROP_PATTERN 0x01
typedef struct _banshee_info banshee_info;
struct _banshee_info
{
@ -1820,9 +1822,9 @@ struct _voodoo_state
// FIFO event handling
BX_MUTEX(fifo_mutex);
bx_thread_event_t fifo_wakeup;
bx_thread_event_t fifo_not_full;
extern BX_MUTEX(fifo_mutex);
extern bx_thread_event_t fifo_wakeup;
extern bx_thread_event_t fifo_not_full;
/*************************************

View File

@ -66,6 +66,10 @@ BX_THREAD_VAR(fifo_thread_var);
BX_MUTEX(cmdfifo_mutex);
/* render mutex (Banshee) */
BX_MUTEX(render_mutex);
/* FIFO event stuff */
BX_MUTEX(fifo_mutex);
bx_thread_event_t fifo_wakeup;
bx_thread_event_t fifo_not_full;
/* fast dither lookup */
static Bit8u dither4_lookup[256*16*2];
@ -3403,8 +3407,6 @@ void init_tmu_shared(tmu_shared_state *s)
v->banshee.blt.rop_flags[num] = flags; \
} while (0);
#define BX_ROP_PATTERN 0x01
void banshee_bitblt_init()
{
for (int i = 0; i < 0x100; i++) {