Merge branch 'master' of https://github.com/86Box/86Box
This commit is contained in:
254
.ci/Jenkinsfile
vendored
254
.ci/Jenkinsfile
vendored
@@ -15,48 +15,92 @@
|
||||
* Copyright 2021 RichardG.
|
||||
*/
|
||||
|
||||
/* Run this on /script to get all approvals required to sync build numbers across jobs:
|
||||
def osArchs = [
|
||||
'Windows': ['32', '64'],
|
||||
'Linux': ['x86', 'x86_64', 'arm32', 'arm64']
|
||||
]
|
||||
|
||||
def approval = org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.get()
|
||||
approval.approveSignature('staticMethod jenkins.model.Jenkins getInstance')
|
||||
approval.approveSignature('method hudson.model.ItemGroup getItem java.lang.String')
|
||||
approval.approveSignature('field hudson.model.Job nextBuildNumber')
|
||||
approval.approveSignature('method hudson.model.Job saveNextBuildNumber')
|
||||
def archNames = [
|
||||
'32': 'x86 (32-bit)',
|
||||
'x86': 'x86 (32-bit)',
|
||||
'64': 'x64 (64-bit)',
|
||||
'x86_64': 'x64 (64-bit)',
|
||||
'arm32': 'ARM (32-bit)',
|
||||
'arm64': 'ARM (64-bit)'
|
||||
]
|
||||
|
||||
*/
|
||||
def dynarecNames = [
|
||||
'ODR': 'Old Recompiler (recommended)',
|
||||
'NDR': 'New Recompiler (beta)',
|
||||
'NoDR': 'No Dynamic Recompiler'
|
||||
]
|
||||
|
||||
def dynarecArchs = [
|
||||
'32': ['ODR', 'NDR'],
|
||||
'x86': ['ODR', 'NDR'],
|
||||
'64': ['ODR', 'NDR'],
|
||||
'x86_64': ['ODR', 'NDR'],
|
||||
'arm32': ['NDR'],
|
||||
'ARM32': ['NDR'],
|
||||
'arm64': ['NDR'],
|
||||
'ARM64': ['NDR']
|
||||
]
|
||||
|
||||
def dynarecFlags = [
|
||||
'ODR': '-D NEW_DYNAREC=OFF',
|
||||
'NDR': '-D NEW_DYNAREC=ON',
|
||||
'NoDR': '-D DYNAREC=OFF'
|
||||
]
|
||||
|
||||
def dynarecSlugs = [
|
||||
'ODR': '',
|
||||
'NDR': '-NDR',
|
||||
'NoDR': ''
|
||||
]
|
||||
|
||||
def presets = [
|
||||
'Regular',
|
||||
'Debug'
|
||||
]
|
||||
|
||||
def presetSlugs = [
|
||||
'Regular': '',
|
||||
'Debug': '-Debug',
|
||||
'Dev': '-Dev'
|
||||
]
|
||||
|
||||
def presetFlags = [
|
||||
'Regular': '--preset=regular',
|
||||
'Debug': '--preset=debug',
|
||||
'Dev': '--preset=experimental -D VNC=OFF'
|
||||
]
|
||||
|
||||
def anyFailure = false
|
||||
|
||||
def gitClone() {
|
||||
cleanWs()
|
||||
if (env.GIT_COMMIT == null)
|
||||
env.GIT_COMMIT = BRANCH
|
||||
println "[-] Building git tag [${env.GIT_COMMIT}]"
|
||||
env.GIT_COMMIT = 'master'
|
||||
println "[-] Using git tag [${env.GIT_COMMIT}]"
|
||||
def scmVars = checkout scm: [$class: 'GitSCM',
|
||||
branches: [[name: env.GIT_COMMIT]],
|
||||
userRemoteConfigs: [[url: 'https://github.com/86Box/86Box.git']]]
|
||||
env.GIT_COMMIT = scmVars.GIT_COMMIT
|
||||
}
|
||||
|
||||
def windowsBuild() {
|
||||
bat 'C:\\msys64\\msys2_shell.cmd -msys2 -defterm -here -no-start -c "exec .ci/build.sh"'
|
||||
def removeDir(dir) {
|
||||
if (isUnix())
|
||||
sh "rm -rf \"$dir\" || exit 0"
|
||||
else
|
||||
bat "if exist \"$dir\" rd /s /q \"$dir\" & exit /b 0"
|
||||
}
|
||||
|
||||
def unixBuild() {
|
||||
sh 'chmod u+x .ci/build.sh && exec .ci/build.sh'
|
||||
def runBuild(args) {
|
||||
if (isUnix())
|
||||
sh "chmod u+x \"$WORKSPACE/.ci/build.sh\" && exec \"$WORKSPACE/.ci/build.sh\" $args"
|
||||
else
|
||||
bat "C:\\msys64\\msys2_shell.cmd -msys2 -defterm -here -no-start -c 'exec \"\$(cygpath -u \\'%WORKSPACE%\\')\"/.ci/build.sh $args'"
|
||||
}
|
||||
|
||||
def saveArtifacts() {
|
||||
archiveArtifacts artifacts: "${env.JOB_BASE_NAME}-*"
|
||||
}
|
||||
|
||||
def anySuccess = false
|
||||
|
||||
def buildChain = [
|
||||
'86Box': '86Box-Dev',
|
||||
'86Box-Dev': '86Box-DevODR',
|
||||
'86Box-DevODR': '86Box-Debug',
|
||||
'86Box-TestBuildPleaseIgnore': '86Box-TestBuildPleaseIgnore2'
|
||||
]
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
|
||||
@@ -64,9 +108,6 @@ pipeline {
|
||||
string(name: 'BUILD_TYPE',
|
||||
defaultValue: 'beta', /* !!! CHANGE HERE !!! for build type */
|
||||
description: "Build type to pass on to CMake. Don't change this, you should instead change the default value on .ci/Jenkinsfile")
|
||||
string(name: 'BRANCH',
|
||||
defaultValue: 'master',
|
||||
description: "Used internally to make sure all downstream builds use the same commit. Don't change this.")
|
||||
}
|
||||
|
||||
environment {
|
||||
@@ -74,33 +115,105 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build Windows') {
|
||||
stage('Source Tarball') {
|
||||
agent none
|
||||
|
||||
steps {
|
||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||
node('windows') {
|
||||
gitClone()
|
||||
windowsBuild()
|
||||
saveArtifacts()
|
||||
}
|
||||
|
||||
script {
|
||||
anySuccess = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build Linux') {
|
||||
steps {
|
||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||
node('debian') {
|
||||
/* Run a dummy git clone on any node to try and save the latest commit regardless of executor status.
|
||||
This avoids a timing issue where HEAD changes between polling and the nodes being available below.
|
||||
I talked to a few people, and we reached the conclusion that reading the polled commit from within
|
||||
the pipeline is not really possible (maybe short of switching to a multi-branch pipeline), so we
|
||||
have to live with this hack, which shortens but doesn't fully eliminate the timing issue's window. */
|
||||
node {
|
||||
/* Ignore exceptions as this is not really critical. */
|
||||
try {
|
||||
gitClone()
|
||||
unixBuild()
|
||||
saveArtifacts()
|
||||
} catch (e) {}
|
||||
try {
|
||||
cleanWs()
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
script {
|
||||
anySuccess = true
|
||||
/* Create source tarball. */
|
||||
node('Linux') {
|
||||
try {
|
||||
/* Run git clone. */
|
||||
gitClone()
|
||||
|
||||
/* Switch to temp directory. */
|
||||
dir(WORKSPACE_TMP) {
|
||||
/* Clean output directory of potential stale old builds. */
|
||||
removeDir('output')
|
||||
|
||||
/* Switch to output directory. */
|
||||
dir('output') {
|
||||
/* Run source tarball creation process. */
|
||||
def packageName = "${env.JOB_BASE_NAME}-Source-b${env.BUILD_NUMBER}"
|
||||
runBuild("-s \"$packageName\"")
|
||||
|
||||
/* Archive resulting artifacts. */
|
||||
archiveArtifacts artifacts: "$packageName*"
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
/* Mark that a failure occurred. */
|
||||
anyFailure = true
|
||||
|
||||
/* Force this stage to fail. */
|
||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Build here to avoid creating a redundant parent stage on the stage view. */
|
||||
osArchs.each { os, thisOsArchs ->
|
||||
thisOsArchs.each { arch ->
|
||||
def thisArchDynarecs = dynarecArchs[arch]
|
||||
if (!thisArchDynarecs)
|
||||
thisArchDynarecs = ['NoDR']
|
||||
thisArchDynarecs.each { dynarec ->
|
||||
presets.each { preset ->
|
||||
node(os) {
|
||||
stage("$os $arch $dynarec $preset") {
|
||||
try {
|
||||
/* Run git clone. */
|
||||
gitClone()
|
||||
|
||||
/* Switch to temp directory. */
|
||||
dir(WORKSPACE_TMP) {
|
||||
/* Clean output directory of potential stale old builds. */
|
||||
removeDir('output')
|
||||
|
||||
/* Switch to output directory. */
|
||||
dir('output') {
|
||||
def packageName = "${env.JOB_BASE_NAME}${dynarecSlugs[dynarec]}${presetSlugs[preset]}-$os-$arch-b${env.BUILD_NUMBER}"
|
||||
dir(dynarecNames[dynarec]) {
|
||||
dir("$os - ${archNames[arch]}") {
|
||||
/* Run build process. */
|
||||
runBuild("-b \"$packageName\" \"$arch\" ${presetFlags[preset]} ${dynarecFlags[dynarec]} -D \"BUILD_TYPE=$BUILD_TYPE\" -D \"EMU_BUILD=build ${env.BUILD_NUMBER}\" -D \"EMU_BUILD_NUM=${env.BUILD_NUMBER}\"")
|
||||
}
|
||||
}
|
||||
|
||||
/* Archive resulting artifacts. */
|
||||
archiveArtifacts artifacts: "**/**/$packageName*"
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
/* Mark that a failure occurred. */
|
||||
anyFailure = true
|
||||
|
||||
/* Force this stage to fail. */
|
||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,35 +223,14 @@ pipeline {
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
if (buildChain[env.JOB_BASE_NAME]) {
|
||||
def nextJob = buildChain[env.JOB_BASE_NAME]
|
||||
|
||||
try {
|
||||
/* Set next build number for this job. */
|
||||
def job = Jenkins.instance.getItem(nextJob)
|
||||
job.nextBuildNumber = env.BUILD_NUMBER as Integer
|
||||
job.saveNextBuildNumber()
|
||||
} catch (Exception e) {
|
||||
println "[!] Could not set next build number for [$nextJob], make sure all required script approvals are in place"
|
||||
}
|
||||
|
||||
/* Trigger this job. */
|
||||
build propagate: false,
|
||||
wait: false,
|
||||
job: nextJob,
|
||||
parameters: [
|
||||
string(name: 'BUILD_TYPE', value: BUILD_TYPE),
|
||||
string(name: 'BRANCH', value: env.GIT_COMMIT)
|
||||
]
|
||||
}
|
||||
|
||||
if (!anySuccess) {
|
||||
println "[!] Failing build because all build stages failed"
|
||||
if (anyFailure) {
|
||||
println "[!] Failing build because a build stage failed"
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
|
||||
if (!env.JOB_BASE_NAME.contains("TestBuildPleaseIgnore")) {
|
||||
try {
|
||||
/* Notify Discord. */
|
||||
def result = currentBuild.currentResult.toLowerCase()
|
||||
discordSend webhookURL: DISCORD_WEBHOOK_URL,
|
||||
title: "${env.JOB_BASE_NAME} #${env.BUILD_NUMBER}",
|
||||
@@ -148,11 +240,15 @@ pipeline {
|
||||
enableArtifactsList: false,
|
||||
showChangeset: true
|
||||
|
||||
node { /* IRC notifications need a node for whatever reason */
|
||||
/* Notify IRC, which needs a node for whatever reason. */
|
||||
node {
|
||||
ircNotify()
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace()
|
||||
} catch (e) {
|
||||
/* Force this stage to fail. */
|
||||
catchError(buildResult: currentBuild.result, stageResult: 'FAILURE') {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
431
.ci/build.sh
431
.ci/build.sh
@@ -33,6 +33,7 @@
|
||||
# - TBD
|
||||
#
|
||||
|
||||
# Define common functions.
|
||||
alias is_windows='[ ! -z "$MSYSTEM" ]'
|
||||
alias is_mac='uname -s | grep -q Darwin'
|
||||
|
||||
@@ -104,39 +105,99 @@ make_tar() {
|
||||
return $?
|
||||
}
|
||||
|
||||
build() {
|
||||
# Create a line gap between builds.
|
||||
[ $first_build -eq 0 ] && echo
|
||||
first_build=0
|
||||
# Set common variables.
|
||||
project=86Box
|
||||
cwd=$(pwd)
|
||||
|
||||
# Set argument and environment variables.
|
||||
local job_name=$JOB_BASE_NAME
|
||||
local build_type=$BUILD_TYPE
|
||||
local git_hash=$(echo $GIT_COMMIT | cut -c1-8)
|
||||
local arch=$1
|
||||
# Parse arguments.
|
||||
package_name=
|
||||
arch=
|
||||
tarball_name=
|
||||
cmake_flags=
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case $1 in
|
||||
-b)
|
||||
shift
|
||||
local cmake_flags=$*
|
||||
local cmake_flags_extra=
|
||||
package_name="$1"
|
||||
shift
|
||||
arch="$1"
|
||||
shift
|
||||
;;
|
||||
|
||||
# Check if at least the job name was received.
|
||||
if [ -z "$job_name" ]
|
||||
-s)
|
||||
shift
|
||||
tarball_name="$1"
|
||||
shift
|
||||
;;
|
||||
|
||||
*)
|
||||
if echo $1 | grep -q " "
|
||||
then
|
||||
echo [!] Missing environment variables: received JOB_BASE_NAME=[$JOB_BASE_NAME] BUILD_TYPE=[$BUILD_TYPE] BUILD_NUMBER=[$BUILD_NUMBER] GIT_COMMIT=[$GIT_COMMIT]
|
||||
return 1
|
||||
cmake_flag="\"$1\""
|
||||
else
|
||||
cmake_flag="$1"
|
||||
fi
|
||||
if [ -z "$cmake_flags" ]
|
||||
then
|
||||
cmake_flags="$cmake_flag"
|
||||
else
|
||||
cmake_flags="$cmake_flags $cmake_flag"
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
cmake_flags_extra=
|
||||
|
||||
# Check if mandatory arguments were specified.
|
||||
if [ -z "$package_name" -a -z "$tarball_name" ] || [ ! -z "$package_name" -a -z "$arch" ]
|
||||
then
|
||||
echo '[!] Usage: build.sh -b {package_name} {architecture} [cmake_flags...]'
|
||||
echo ' build.sh -s {source_tarball_name}'
|
||||
exit 100
|
||||
fi
|
||||
|
||||
echo [-] Building [$job_name] [$build_type] [$build_qualifier] [$git_hash] for [$arch] with flags [$cmake_flags]
|
||||
# Switch to the repository root directory.
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Switch to the correct directory.
|
||||
cd "$cwd"
|
||||
[ -e "build.sh" ] && cd ..
|
||||
# Make source tarball if requested.
|
||||
if [ ! -z "$tarball_name" ]
|
||||
then
|
||||
echo [-] Making source tarball [$tarball_name]
|
||||
|
||||
# Clean local tree of gitignored files.
|
||||
git clean -dfX
|
||||
|
||||
# Recreate working directory if it was removed by git clean.
|
||||
[ ! -d "$cwd" ] && mkdir -p "$cwd"
|
||||
|
||||
# Save current HEAD commit to VERSION.
|
||||
git log --stat -1 > VERSION || rm -f VERSION
|
||||
|
||||
# Archive source.
|
||||
make_tar "$cwd/$tarball_name.tar"
|
||||
status=$?
|
||||
|
||||
# Check if the archival succeeded.
|
||||
if [ $status -ne 0 ]
|
||||
then
|
||||
echo [!] Tarball creation failed with status [$status]
|
||||
exit 1
|
||||
else
|
||||
echo [-] Source tarball [$tarball_name] created successfully
|
||||
[ -z "$package_name" ] && exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo [-] Building [$package_name] for [$arch] with flags [$cmake_flags]
|
||||
|
||||
# Perform platform-specific setup.
|
||||
if is_windows
|
||||
then
|
||||
# Switch into the correct MSYSTEM if required.
|
||||
local msys=MINGW$arch
|
||||
[ ! -d "/$msys" ] && local msys=CLANG$arch
|
||||
msys=MINGW$arch
|
||||
[ ! -d "/$msys" ] && msys=CLANG$arch
|
||||
if [ -d "/$msys" ]
|
||||
then
|
||||
if [ "$MSYSTEM" != "$msys" ]
|
||||
@@ -144,13 +205,12 @@ build() {
|
||||
# Call build with the correct MSYSTEM.
|
||||
echo [-] Switching to MSYSTEM [$msys]
|
||||
cd "$cwd"
|
||||
CHERE_INVOKING=yes MSYSTEM="$msys" JOB_BASE_NAME="$JOB_BASE_NAME" BUILD_TYPE="$BUILD_TYPE" BUILD_NUMBER="$BUILD_NUMBER" GIT_COMMIT="$GIT_COMMIT" \
|
||||
bash -lc 'exec "'$0'" -b "'$arch'" '"$cmake_flags" && job_status=0 # make sure the main script exits cleanly on any success
|
||||
return $?
|
||||
CHERE_INVOKING=yes MSYSTEM="$msys" bash -lc 'exec "'"$0"'" -b "'"$package_name"'" "'"$arch"'" '"$cmake_flags"
|
||||
exit $?
|
||||
fi
|
||||
else
|
||||
echo [!] No MSYSTEM for architecture [$arch]
|
||||
return 2
|
||||
exit 2
|
||||
fi
|
||||
echo [-] Using MSYSTEM [$MSYSTEM]
|
||||
elif is_mac
|
||||
@@ -160,36 +220,36 @@ build() {
|
||||
else
|
||||
# Determine Debian architecture.
|
||||
case $arch in
|
||||
x86) local arch_deb="i386";;
|
||||
x86_64) local arch_deb="amd64";;
|
||||
arm32) local arch_deb="armhf";;
|
||||
*) local arch_deb="$arch";;
|
||||
x86) arch_deb="i386";;
|
||||
x86_64) arch_deb="amd64";;
|
||||
arm32) arch_deb="armhf";;
|
||||
*) arch_deb="$arch";;
|
||||
esac
|
||||
|
||||
# Establish general and architecture-specific dependencies.
|
||||
local pkgs="cmake git tar xz-utils dpkg-dev rpm"
|
||||
pkgs="cmake git tar xz-utils dpkg-dev rpm"
|
||||
if [ "$(dpkg --print-architecture)" = "$arch_deb" ]
|
||||
then
|
||||
local pkgs="$pkgs build-essential"
|
||||
pkgs="$pkgs build-essential"
|
||||
else
|
||||
sudo dpkg --add-architecture $arch_deb
|
||||
local pkgs="$pkgs crossbuild-essential-$arch_deb"
|
||||
pkgs="$pkgs crossbuild-essential-$arch_deb"
|
||||
fi
|
||||
local libpkgs=""
|
||||
local longest_libpkg=0
|
||||
libpkgs=""
|
||||
longest_libpkg=0
|
||||
for pkg in libc6-dev linux-libc-dev libopenal-dev libfreetype6-dev libsdl2-dev libpng-dev
|
||||
do
|
||||
local libpkgs="$libpkgs $pkg:$arch_deb"
|
||||
local length=$(echo -n $pkg | sed 's/-dev$//g' | wc -c)
|
||||
libpkgs="$libpkgs $pkg:$arch_deb"
|
||||
length=$(echo -n $pkg | sed 's/-dev$//g' | wc -c)
|
||||
[ $length -gt $longest_libpkg ] && longest_libpkg=$length
|
||||
done
|
||||
|
||||
# Determine GNU toolchain architecture.
|
||||
case $arch in
|
||||
x86) local arch_gnu="i686-linux-gnu";;
|
||||
arm32) local arch_gnu="arm-linux-gnueabihf";;
|
||||
arm64) local arch_gnu="aarch64-linux-gnu";;
|
||||
*) local arch_gnu="$arch-linux-gnu";;
|
||||
x86) arch_gnu="i686-linux-gnu";;
|
||||
arm32) arch_gnu="arm-linux-gnueabihf";;
|
||||
arm64) arch_gnu="aarch64-linux-gnu";;
|
||||
*) arch_gnu="$arch-linux-gnu";;
|
||||
esac
|
||||
|
||||
# Create CMake toolchain file.
|
||||
@@ -211,7 +271,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
EOF
|
||||
local cmake_flags_extra="$cmake_flags_extra -D CMAKE_TOOLCHAIN_FILE=toolchain.cmake"
|
||||
cmake_flags_extra="$cmake_flags_extra -D CMAKE_TOOLCHAIN_FILE=toolchain.cmake"
|
||||
|
||||
# Install or update dependencies.
|
||||
echo [-] Installing dependencies through apt
|
||||
@@ -226,44 +286,38 @@ EOF
|
||||
rm -rf build
|
||||
find . \( -name Makefile -o -name CMakeCache.txt -o -name CMakeFiles \) -exec rm -rf "{}" \; 2> /dev/null
|
||||
|
||||
# Determine available dynarec types for this architecture, and
|
||||
# also specify ARCH right away to skip the arch_detect process.
|
||||
# Determine ARCH to skip the arch_detect process.
|
||||
case $arch in
|
||||
# old dynarec available
|
||||
32 | x86) local cmake_flags_extra="$cmake_flags_extra -D ARCH=i386";;
|
||||
64 | x86_64) local cmake_flags_extra="$cmake_flags_extra -D ARCH=x86_64";;
|
||||
# new dynarec only
|
||||
ARM32 | arm32) local cmake_flags_extra="$cmake_flags_extra -D NEW_DYNAREC=ON -D ARCH=arm";;
|
||||
ARM64 | arm64) local cmake_flags_extra="$cmake_flags_extra -D NEW_DYNAREC=ON -D ARCH=arm64";;
|
||||
# no dynarec
|
||||
*) local cmake_flags_extra="$cmake_flags_extra -D DYNAREC=OFF";;
|
||||
32 | x86) cmake_flags_extra="$cmake_flags_extra -D ARCH=i386";;
|
||||
64 | x86_64) cmake_flags_extra="$cmake_flags_extra -D ARCH=x86_64";;
|
||||
ARM32 | arm32) cmake_flags_extra="$cmake_flags_extra -D ARCH=arm";;
|
||||
ARM64 | arm64) cmake_flags_extra="$cmake_flags_extra -D ARCH=arm64";;
|
||||
*) cmake_flags_extra="$cmake_flags_extra -D \"ARCH=$arch\"";;
|
||||
esac
|
||||
|
||||
# Determine additional CMake flags.
|
||||
[ ! -z "$build_type" ] && local cmake_flags_extra="$cmake_flags_extra -D BUILD_TYPE=\"$build_type\""
|
||||
[ ! -z "$build_qualifier" ] && local cmake_flags_extra="$cmake_flags_extra -D EMU_BUILD=\"$build_qualifier\""
|
||||
[ ! -z "$build_number" ] && local cmake_flags_extra="$cmake_flags_extra -D EMU_BUILD_NUM=\"$build_number\""
|
||||
[ ! -z "$git_hash" ] && local cmake_flags_extra="$cmake_flags_extra -D EMU_GIT_HASH=\"$git_hash\""
|
||||
local cmake_flags_extra="$cmake_flags_extra -D EMU_COPYRIGHT_YEAR=\"$(date +%Y)\""
|
||||
# Add git hash and copyright year.
|
||||
git_hash=$(git rev-parse --short HEAD 2> /dev/null)
|
||||
[ ! -z "$git_hash" ] && cmake_flags_extra="$cmake_flags_extra -D \"EMU_GIT_HASH=$git_hash\""
|
||||
cmake_flags_extra="$cmake_flags_extra -D \"EMU_COPYRIGHT_YEAR=$(date +%Y)\""
|
||||
|
||||
# Run CMake.
|
||||
echo [-] Running CMake with flags [$cmake_flags $cmake_flags_extra]
|
||||
eval cmake -G \"Unix Makefiles\" $cmake_flags $cmake_flags_extra .
|
||||
local status=$?
|
||||
if [ $? -gt 0 ]
|
||||
status=$?
|
||||
if [ $status -ne 0 ]
|
||||
then
|
||||
echo [!] CMake failed with status [$status]
|
||||
return 3
|
||||
exit 3
|
||||
fi
|
||||
|
||||
# Run actual build.
|
||||
echo [-] Running build
|
||||
try_make
|
||||
local status=$?
|
||||
if [ $status -gt 0 ]
|
||||
status=$?
|
||||
if [ $status -ne 0 ]
|
||||
then
|
||||
echo [!] Make failed with status [$status]
|
||||
return 4
|
||||
exit 4
|
||||
fi
|
||||
|
||||
# Create temporary directory for archival.
|
||||
@@ -273,18 +327,18 @@ EOF
|
||||
if [ ! -d "archive_tmp" ]
|
||||
then
|
||||
echo [!] Archive directory creation failed
|
||||
return 5
|
||||
exit 5
|
||||
fi
|
||||
|
||||
# Archive the executable and its dependencies.
|
||||
# The executable should always be archived last for the check after this block.
|
||||
local status=$?
|
||||
status=0
|
||||
if is_windows
|
||||
then
|
||||
# Determine Program Files directory for Ghostscript and 7-Zip.
|
||||
# Manual checks because MSYS is bad at passing the ProgramFiles variables.
|
||||
local pf="/c/Program Files"
|
||||
local sevenzip="$pf/7-Zip/7z.exe"
|
||||
pf="/c/Program Files"
|
||||
sevenzip="$pf/7-Zip/7z.exe"
|
||||
[ "$arch" = "32" -a -d "/c/Program Files (x86)" ] && pf="/c/Program Files (x86)"
|
||||
|
||||
# Archive freetype from local MSYS installation.
|
||||
@@ -297,9 +351,9 @@ EOF
|
||||
done
|
||||
|
||||
# Archive Discord Game SDK DLL from their CDN.
|
||||
local discordarch=
|
||||
[ "$arch" = "32" ] && local discordarch=x86
|
||||
[ "$arch" = "64" ] && local discordarch=x86_64
|
||||
discordarch=
|
||||
[ "$arch" = "32" ] && discordarch=x86
|
||||
[ "$arch" = "64" ] && discordarch=x86_64
|
||||
if [ ! -z "$discordarch" ]
|
||||
then
|
||||
[ ! -e "discord_game_sdk.zip" ] && wget -qOdiscord_game_sdk.zip https://dl-game-sdk.discordapp.net/2.5.6/discord_game_sdk.zip
|
||||
@@ -311,7 +365,7 @@ EOF
|
||||
|
||||
# Archive executable.
|
||||
mv "$build_dir"/src/$project.exe archive_tmp/
|
||||
local status=$?
|
||||
status=$?
|
||||
elif is_mac
|
||||
then
|
||||
# TBD
|
||||
@@ -330,14 +384,14 @@ EOF
|
||||
|
||||
# Archive executable.
|
||||
mv "$build_dir"/src/$project archive_tmp/
|
||||
local status=$?
|
||||
status=$?
|
||||
fi
|
||||
|
||||
# Check if the executable move succeeded.
|
||||
if [ $status -gt 0 ]
|
||||
if [ $status -ne 0 ]
|
||||
then
|
||||
echo [!] Executable move failed with status [$status]
|
||||
return 6
|
||||
exit 6
|
||||
fi
|
||||
|
||||
# Produce artifact archive.
|
||||
@@ -346,239 +400,26 @@ EOF
|
||||
if is_windows
|
||||
then
|
||||
# Create zip.
|
||||
"$sevenzip" a -y -mx9 "..\\$job_name-Windows-$arch$build_fn.zip" *
|
||||
local status=$?
|
||||
"$sevenzip" a -y -mx9 "$(cygpath -w "$cwd")\\$package_name.zip" *
|
||||
status=$?
|
||||
elif is_mac
|
||||
then
|
||||
# TBD
|
||||
:
|
||||
else
|
||||
# Create binary tarball.
|
||||
VERBOSE=1 make_tar ../$job_name-Linux-$arch$build_fn.tar
|
||||
local status=$?
|
||||
VERBOSE=1 make_tar "$cwd/$package_name.tar"
|
||||
status=$?
|
||||
fi
|
||||
cd ..
|
||||
|
||||
# Check if the archival succeeded.
|
||||
if [ $status -gt 0 ]
|
||||
if [ $status -ne 0 ]
|
||||
then
|
||||
echo [!] Artifact archive creation failed with status [$status]
|
||||
return 7
|
||||
exit 7
|
||||
fi
|
||||
|
||||
# All good.
|
||||
echo [-] Build of [$job_name] [$build_type] [$build_qualifier] [$git_hash] for [$arch] with flags [$cmake_flags] successful
|
||||
job_status=0
|
||||
}
|
||||
|
||||
tarball() {
|
||||
# Create a line gap between builds.
|
||||
[ $first_build -eq 0 ] && echo
|
||||
first_build=0
|
||||
|
||||
# Set argument and environment variables.
|
||||
local job_name=$JOB_BASE_NAME
|
||||
|
||||
# Check if the job name was received.
|
||||
if [ -z "$job_name" ]
|
||||
then
|
||||
echo [!] Missing environment variable: received JOB_BASE_NAME=[$JOB_BASE_NAME]
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo [-] Making source tarball for [$job_name]
|
||||
|
||||
# Switch to the correct directory.
|
||||
cd "$cwd"
|
||||
[ -e "build.sh" ] && cd ..
|
||||
|
||||
# Clean local tree of gitignored files.
|
||||
git clean -dfX
|
||||
|
||||
# Save current HEAD commit to VERSION.
|
||||
git log -1 > VERSION || rm -f VERSION
|
||||
|
||||
# Archive source.
|
||||
make_tar $job_name-Source$build_fn.tar
|
||||
|
||||
# Check if the archival succeeded.
|
||||
if [ $? -gt 0 ]
|
||||
then
|
||||
echo [!] Tarball creation failed with status [$status]
|
||||
return 2
|
||||
fi
|
||||
|
||||
echo [-] Source tarball for [$job_name] created successfully
|
||||
}
|
||||
|
||||
# Set common variables.
|
||||
project=86Box
|
||||
cwd=$(pwd)
|
||||
first_build=1
|
||||
job_status=1
|
||||
|
||||
# Parse arguments.
|
||||
single_build=0
|
||||
tarball=0
|
||||
args=0
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case $1 in
|
||||
-b)
|
||||
# Execute single build.
|
||||
[ -z "$JOB_BASE_NAME" ] && JOB_BASE_NAME=$project-Custom
|
||||
single_build=1
|
||||
shift
|
||||
break
|
||||
;;
|
||||
|
||||
-t)
|
||||
# Create tarball.
|
||||
[ -z "$JOB_BASE_NAME" ] && JOB_BASE_NAME=$project
|
||||
tarball=1
|
||||
shift
|
||||
;;
|
||||
|
||||
*)
|
||||
# Allow for manually specifying Jenkins variables.
|
||||
if [ $args -eq 0 ]
|
||||
then
|
||||
JOB_BASE_NAME=$1
|
||||
args=1
|
||||
elif [ $args -eq 1 ]
|
||||
then
|
||||
BUILD_TYPE=$1
|
||||
args=2
|
||||
elif [ $args -eq 2 ]
|
||||
then
|
||||
BUILD_NUMBER=$1
|
||||
args=3
|
||||
elif [ $args -eq 3 ]
|
||||
then
|
||||
GIT_COMMIT=$1
|
||||
args=4
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check if at least the job name was specified.
|
||||
if [ -z "$JOB_BASE_NAME" ]
|
||||
then
|
||||
echo [!] Manual usage: build.sh [{job_name} [{build_type} [{build_number'|"'build_qualifier'"'} [git_hash]]]] [-t] [-b {architecture} [cmake_flags...]]
|
||||
exit 100
|
||||
fi
|
||||
|
||||
# Generate build information. Note that variable names are case sensitive.
|
||||
build_number=$BUILD_NUMBER
|
||||
if echo $build_number | grep -q " "
|
||||
then
|
||||
# A full build qualifier was specified.
|
||||
build_qualifier="$build_number"
|
||||
build_fn="-"$(echo "$build_number" | rev | cut -f1 -d" " | rev | tr '\\/:*?"<>|' '_')
|
||||
build_number= # no build number
|
||||
elif [ ! -z "$build_number" ]
|
||||
then
|
||||
# A build number was specified.
|
||||
build_qualifier="build $build_number"
|
||||
build_fn="-b$build_number"
|
||||
build_number=$(echo "$build_number" | sed "s/[^0-9]//g") # remove non-numeric characters from build number
|
||||
else
|
||||
# No build data was specified.
|
||||
build_number=
|
||||
build_qualifier=
|
||||
build_fn=
|
||||
fi
|
||||
|
||||
# Make tarball if requested.
|
||||
if [ $tarball -ne 0 ]
|
||||
then
|
||||
tarball
|
||||
status=$?
|
||||
[ $single_build -eq 0 ] && exit $status
|
||||
fi
|
||||
|
||||
# Run single build if requested.
|
||||
if [ $single_build -ne 0 ]
|
||||
then
|
||||
build $*
|
||||
exit $?
|
||||
fi
|
||||
|
||||
# Run builds according to the Jenkins job name.
|
||||
case $JOB_BASE_NAME in
|
||||
$project | $project-TestBuildPleaseIgnore*)
|
||||
if is_windows
|
||||
then
|
||||
build 32 --preset=regular
|
||||
build 64 --preset=regular
|
||||
elif is_mac
|
||||
then
|
||||
build Universal --preset=regular
|
||||
else
|
||||
tarball
|
||||
build x86 --preset=regular
|
||||
build x86_64 --preset=regular
|
||||
build arm32 --preset=regular
|
||||
build arm64 --preset=regular
|
||||
fi
|
||||
;;
|
||||
|
||||
$project-Debug)
|
||||
if is_windows
|
||||
then
|
||||
build 32 --preset=debug
|
||||
build 64 --preset=debug
|
||||
elif is_mac
|
||||
then
|
||||
build Universal --preset=debug
|
||||
else
|
||||
build x86 --preset=debug
|
||||
build x86_64 --preset=debug
|
||||
build arm32 --preset=debug
|
||||
build arm64 --preset=debug
|
||||
fi
|
||||
;;
|
||||
|
||||
$project-Dev)
|
||||
if is_windows
|
||||
then
|
||||
build 32 --preset=experimental -D NEW_DYNAREC=ON -D VNC=OFF
|
||||
build 64 --preset=experimental -D NEW_DYNAREC=ON -D VNC=OFF
|
||||
elif is_mac
|
||||
then
|
||||
build Universal --preset=experimental -D NEW_DYNAREC=ON -D VNC=OFF
|
||||
else
|
||||
build x86 --preset=experimental -D NEW_DYNAREC=ON -D VNC=OFF
|
||||
build x86_64 --preset=experimental -D NEW_DYNAREC=ON -D VNC=OFF
|
||||
build arm32 --preset=experimental -D NEW_DYNAREC=ON -D VNC=OFF
|
||||
build arm64 --preset=experimental -D NEW_DYNAREC=ON -D VNC=OFF
|
||||
fi
|
||||
;;
|
||||
|
||||
$project-DevODR)
|
||||
if is_windows
|
||||
then
|
||||
build 32 --preset=experimental -D NEW_DYNAREC=OFF -D VNC=OFF
|
||||
build 64 --preset=experimental -D NEW_DYNAREC=OFF -D VNC=OFF
|
||||
elif is_mac
|
||||
then
|
||||
build Universal --preset=experimental -D NEW_DYNAREC=OFF -D VNC=OFF
|
||||
else
|
||||
build x86 --preset=experimental -D NEW_DYNAREC=OFF -D VNC=OFF
|
||||
build x86_64 --preset=experimental -D NEW_DYNAREC=OFF -D VNC=OFF
|
||||
build arm32 --preset=experimental -D NEW_DYNAREC=OFF -D VNC=OFF
|
||||
build arm64 --preset=experimental -D NEW_DYNAREC=OFF -D VNC=OFF
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
echo [!] Unknown job name $JOB_BASE_NAME
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo
|
||||
echo [-] Exiting with status [$job_status]
|
||||
exit $job_status
|
||||
echo [-] Build of [$package_name] for [$arch] with flags [$cmake_flags] successful
|
||||
exit 0
|
||||
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -29,10 +29,10 @@ Makefile
|
||||
# Build scripts
|
||||
/archive_tmp
|
||||
/static2dll.*
|
||||
/*.zip
|
||||
/*.tar
|
||||
/*.tar.*
|
||||
/VERSION
|
||||
*.zip
|
||||
*.tar
|
||||
*.tar.*
|
||||
|
||||
# Visual Studio Code
|
||||
/.vs
|
||||
|
||||
10
src/86box.c
10
src/86box.c
@@ -33,6 +33,7 @@
|
||||
#ifdef __APPLE__
|
||||
#include <string.h>
|
||||
#include <dispatch/dispatch.h>
|
||||
#include "mac/macOSXGlue.h"
|
||||
#ifdef __aarch64__
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
@@ -393,6 +394,7 @@ pc_init(int argc, char *argv[])
|
||||
{
|
||||
char path[2048], path2[2048];
|
||||
char *cfg = NULL, *p;
|
||||
char mac_rom_path[2048];
|
||||
char temp[128];
|
||||
struct tm *info;
|
||||
time_t now;
|
||||
@@ -585,14 +587,14 @@ usage:
|
||||
plat_dir_create(usr_path);
|
||||
}
|
||||
|
||||
if (vmrp && (path2[0] == '\0')) {
|
||||
#ifdef __APPLE__
|
||||
sprintf("%s/Library/Application Support/86Box/roms", getenv("HOME") ? getenv("HOME") : getpwuid(getuid())->pw_dir);
|
||||
#else
|
||||
getDefaultROMPath(mac_rom_path);
|
||||
strcpy(path2, mac_rom_path);
|
||||
#endif
|
||||
if (vmrp && (path2[0] == '\0')) {
|
||||
strcpy(path2, usr_path);
|
||||
plat_path_slash(path2);
|
||||
strcat(path2, "roms");
|
||||
#endif
|
||||
plat_path_slash(path2);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#
|
||||
|
||||
# Prepare the macOS app bundle icon depending on the release channel
|
||||
set(APP_ICON_MACOSX)
|
||||
if (APPLE)
|
||||
if(RELEASE_BUILD)
|
||||
set(APP_ICON_MACOSX ${CMAKE_CURRENT_SOURCE_DIR}/mac/icons/release/86Box.icns)
|
||||
elseif(BETA_BUILD)
|
||||
@@ -28,12 +30,19 @@ endif()
|
||||
|
||||
set_source_files_properties(${APP_ICON_MACOSX} PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION "Resources")
|
||||
endif()
|
||||
|
||||
#Adding the macOS glue for ROM paths
|
||||
set(MAC_GLUE)
|
||||
if (APPLE)
|
||||
set(MAC_GLUE ${CMAKE_CURRENT_SOURCE_DIR}/mac/macOSXGlue.m)
|
||||
endif()
|
||||
|
||||
# WIN32 marks us as a GUI app on Windows
|
||||
# MACOSX_BUNDLE prepares a macOS application bundle including with the app icon
|
||||
add_executable(86Box WIN32 MACOSX_BUNDLE 86box.c config.c log.c random.c timer.c io.c acpi.c apm.c
|
||||
dma.c ddma.c nmi.c pic.c pit.c port_6x.c port_92.c ppi.c pci.c mca.c usb.c
|
||||
device.c nvr.c nvr_at.c nvr_ps2.c ${APP_ICON_MACOSX})
|
||||
device.c nvr.c nvr_at.c nvr_ps2.c ${APP_ICON_MACOSX} ${MAC_GLUE})
|
||||
|
||||
if(NEW_DYNAREC)
|
||||
add_compile_definitions(USE_NEW_DYNAREC)
|
||||
@@ -184,7 +193,6 @@ endif()
|
||||
if(APPLE)
|
||||
set(APPS ${CMAKE_CURRENT_BINARY_DIR}/86Box.app)
|
||||
install(CODE "
|
||||
include(InstallRequiredSystemLibraries)
|
||||
include(BundleUtilities)
|
||||
fixup_bundle(\"${APPS}\" \"\" \"\")"
|
||||
COMPONENT Runtime)
|
||||
|
||||
@@ -226,6 +226,8 @@ extern void ati68860_hwcursor_draw(svga_t *svga, int displine);
|
||||
extern void att49x_ramdac_out(uint16_t addr, int rs2, uint8_t val, void *p, svga_t *svga);
|
||||
extern uint8_t att49x_ramdac_in(uint16_t addr, int rs2, void *p, svga_t *svga);
|
||||
|
||||
extern void att498_ramdac_out(uint16_t addr, int rs2, uint8_t val, void *p, svga_t *svga);
|
||||
extern uint8_t att498_ramdac_in(uint16_t addr, int rs2, void *p, svga_t *svga);
|
||||
extern float av9194_getclock(int clock, void *p);
|
||||
|
||||
extern void bt48x_ramdac_out(uint16_t addr, int rs2, int rs3, uint8_t val, void *p, svga_t *svga);
|
||||
@@ -278,6 +280,7 @@ extern const device_t ati68860_ramdac_device;
|
||||
extern const device_t att490_ramdac_device;
|
||||
extern const device_t att491_ramdac_device;
|
||||
extern const device_t att492_ramdac_device;
|
||||
extern const device_t att498_ramdac_device;
|
||||
extern const device_t av9194_device;
|
||||
extern const device_t bt484_ramdac_device;
|
||||
extern const device_t att20c504_ramdac_device;
|
||||
|
||||
@@ -226,24 +226,28 @@ extern const device_t compaq_ati28800_device;
|
||||
extern const device_t ati28800_wonderxl24_device;
|
||||
#endif
|
||||
|
||||
/* Cirrus Logic CL-GD 54xx */
|
||||
/* Cirrus Logic GD54xx */
|
||||
extern const device_t gd5401_isa_device;
|
||||
extern const device_t gd5402_isa_device;
|
||||
extern const device_t gd5402_onboard_device;
|
||||
extern const device_t gd5420_isa_device;
|
||||
extern const device_t gd5422_isa_device;
|
||||
extern const device_t gd5424_vlb_device;
|
||||
extern const device_t gd5426_isa_device;
|
||||
extern const device_t gd5426_diamond_speedstar_pro_a1_isa_device;
|
||||
extern const device_t gd5426_vlb_device;
|
||||
extern const device_t gd5426_onboard_device;
|
||||
extern const device_t gd5428_isa_device;
|
||||
extern const device_t gd5428_vlb_device;
|
||||
extern const device_t gd5428_diamond_speedstar_pro_b1_vlb_device;
|
||||
extern const device_t gd5428_mca_device;
|
||||
extern const device_t gd5428_onboard_device;
|
||||
extern const device_t gd5429_isa_device;
|
||||
extern const device_t gd5429_vlb_device;
|
||||
extern const device_t gd5430_vlb_device;
|
||||
extern const device_t gd5430_diamond_speedstar_pro_se_a8_vlb_device;
|
||||
extern const device_t gd5430_pci_device;
|
||||
extern const device_t gd5434_isa_device;
|
||||
extern const device_t gd5434_diamond_speedstar_64_a3_isa_device;
|
||||
extern const device_t gd5434_onboard_pci_device;
|
||||
extern const device_t gd5434_vlb_device;
|
||||
extern const device_t gd5434_pci_device;
|
||||
@@ -369,6 +373,7 @@ extern const device_t s3_mirocrystal_20sv_964_pci_device;
|
||||
extern const device_t s3_mirocrystal_20sd_864_vlb_device;
|
||||
extern const device_t s3_phoenix_vision864_pci_device;
|
||||
extern const device_t s3_phoenix_vision864_vlb_device;
|
||||
extern const device_t s3_9fx_531_pci_device;
|
||||
extern const device_t s3_phoenix_vision868_pci_device;
|
||||
extern const device_t s3_phoenix_vision868_vlb_device;
|
||||
extern const device_t s3_diamond_stealth64_pci_device;
|
||||
@@ -376,6 +381,7 @@ extern const device_t s3_diamond_stealth64_vlb_device;
|
||||
extern const device_t s3_diamond_stealth64_964_pci_device;
|
||||
extern const device_t s3_diamond_stealth64_964_vlb_device;
|
||||
extern const device_t s3_mirovideo_40sv_ergo_968_pci_device;
|
||||
extern const device_t s3_9fx_771_pci_device;
|
||||
extern const device_t s3_phoenix_vision968_pci_device;
|
||||
extern const device_t s3_phoenix_vision968_vlb_device;
|
||||
extern const device_t s3_spea_mercury_p64v_pci_device;
|
||||
|
||||
@@ -24,7 +24,7 @@ add_library(vid OBJECT agpgart.c video.c vid_table.c vid_cga.c vid_cga_comp.c
|
||||
vid_stg_ramdac.c vid_ht216.c vid_oak_oti.c vid_paradise.c vid_rtg310x.c
|
||||
vid_f82c425.c vid_ti_cf62011.c vid_tvga.c vid_tgui9440.c vid_tkd8001_ramdac.c
|
||||
vid_att20c49x_ramdac.c vid_s3.c vid_s3_virge.c vid_ibm_rgb528_ramdac.c
|
||||
vid_sdac_ramdac.c vid_ogc.c vid_nga.c vid_tvp3026_ramdac.c)
|
||||
vid_sdac_ramdac.c vid_ogc.c vid_nga.c vid_tvp3026_ramdac.c vid_att2xc498_ramdac.c)
|
||||
|
||||
if(MGA)
|
||||
target_compile_definitions(vid PRIVATE USE_MGA)
|
||||
|
||||
186
src/video/vid_att2xc498_ramdac.c
Normal file
186
src/video/vid_att2xc498_ramdac.c
Normal file
@@ -0,0 +1,186 @@
|
||||
/*
|
||||
* 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
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Emulation of a AT&T 2xc498 RAMDAC.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_svga.h>
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int type;
|
||||
int state;
|
||||
int loop;
|
||||
uint8_t ctrl;
|
||||
} att498_ramdac_t;
|
||||
|
||||
static void
|
||||
att498_ramdac_control(uint8_t val, void *p, svga_t *svga)
|
||||
{
|
||||
att498_ramdac_t *ramdac = (att498_ramdac_t *) p;
|
||||
ramdac->ctrl = val;
|
||||
|
||||
if (val == 0xff)
|
||||
return;
|
||||
|
||||
switch ((ramdac->ctrl >> 4) & 0x0f) {
|
||||
default:
|
||||
svga->bpp = 8;
|
||||
break;
|
||||
case 1:
|
||||
if (ramdac->ctrl & 4)
|
||||
svga->bpp = 15;
|
||||
else
|
||||
svga->bpp = 8;
|
||||
break;
|
||||
case 3:
|
||||
case 6:
|
||||
svga->bpp = 16;
|
||||
break;
|
||||
case 5:
|
||||
case 7:
|
||||
svga->bpp = 32;
|
||||
break;
|
||||
case 0x0e:
|
||||
svga->bpp = 24;
|
||||
break;
|
||||
}
|
||||
|
||||
svga_set_ramdac_type(svga, (ramdac->ctrl & 2) ? RAMDAC_8BIT : RAMDAC_6BIT);
|
||||
svga_recalctimings(svga);
|
||||
}
|
||||
|
||||
void
|
||||
att498_ramdac_out(uint16_t addr, int rs2, uint8_t val, void *p, svga_t *svga)
|
||||
{
|
||||
att498_ramdac_t *ramdac = (att498_ramdac_t *) p;
|
||||
uint8_t rs = (addr & 0x03);
|
||||
rs |= ((!!rs2) << 2);
|
||||
|
||||
switch (rs) {
|
||||
case 0x00:
|
||||
case 0x01:
|
||||
case 0x03:
|
||||
case 0x04:
|
||||
case 0x05:
|
||||
case 0x07:
|
||||
svga_out(addr, val, svga);
|
||||
ramdac->state = 0;
|
||||
break;
|
||||
case 0x02:
|
||||
switch (ramdac->state) {
|
||||
case 4:
|
||||
att498_ramdac_control(val, ramdac, svga);
|
||||
break;
|
||||
default:
|
||||
svga_out(addr, val, svga);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 0x06:
|
||||
att498_ramdac_control(val, ramdac, svga);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint8_t
|
||||
att498_ramdac_in(uint16_t addr, int rs2, void *p, svga_t *svga)
|
||||
{
|
||||
att498_ramdac_t *ramdac = (att498_ramdac_t *) p;
|
||||
uint8_t temp = 0xff;
|
||||
uint8_t rs = (addr & 0x03);
|
||||
rs |= ((!!rs2) << 2);
|
||||
|
||||
switch (rs) {
|
||||
case 0x00:
|
||||
case 0x01:
|
||||
case 0x03:
|
||||
case 0x04:
|
||||
case 0x05:
|
||||
case 0x07:
|
||||
temp = svga_in(addr, svga);
|
||||
ramdac->state = 0;
|
||||
break;
|
||||
case 0x02:
|
||||
switch (ramdac->state) {
|
||||
case 4:
|
||||
temp = ramdac->ctrl;
|
||||
ramdac->state++;
|
||||
break;
|
||||
case 5:
|
||||
temp = 0x84;
|
||||
ramdac->state++;
|
||||
break;
|
||||
case 6:
|
||||
temp = ramdac->ctrl;
|
||||
ramdac->state = 0;
|
||||
break;
|
||||
default:
|
||||
temp = svga_in(addr, svga);
|
||||
ramdac->state++;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 0x06:
|
||||
temp = ramdac->ctrl;
|
||||
ramdac->state = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
||||
static void *
|
||||
att498_ramdac_init(const device_t *info)
|
||||
{
|
||||
att498_ramdac_t *ramdac = (att498_ramdac_t *) malloc(sizeof(att498_ramdac_t));
|
||||
memset(ramdac, 0, sizeof(att498_ramdac_t));
|
||||
|
||||
ramdac->type = info->local;
|
||||
|
||||
return ramdac;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
att498_ramdac_close(void *priv)
|
||||
{
|
||||
att498_ramdac_t *ramdac = (att498_ramdac_t *) priv;
|
||||
|
||||
if (ramdac)
|
||||
free(ramdac);
|
||||
}
|
||||
|
||||
|
||||
const device_t att498_ramdac_device =
|
||||
{
|
||||
"AT&T 22c498 RAMDAC",
|
||||
0, 0,
|
||||
att498_ramdac_init, att498_ramdac_close,
|
||||
NULL, { NULL }, NULL, NULL
|
||||
};
|
||||
@@ -45,13 +45,15 @@
|
||||
#define BIOS_GD5402_ONBOARD_PATH "roms/machines/cbm_sl386sx25/c000.rom"
|
||||
#define BIOS_GD5420_PATH "roms/video/cirruslogic/5420.vbi"
|
||||
#define BIOS_GD5422_PATH "roms/video/cirruslogic/cl5422.bin"
|
||||
#define BIOS_GD5426_PATH "roms/video/cirruslogic/Diamond SpeedStar PRO VLB v3.04.bin"
|
||||
#define BIOS_GD5426_DIAMOND_A1_ISA_PATH "roms/video/cirruslogic/diamond5426.bin"
|
||||
#define BIOS_GD5428_DIAMOND_B1_VLB_PATH "roms/video/cirruslogic/Diamond SpeedStar PRO VLB v3.04.bin"
|
||||
#define BIOS_GD5428_ISA_PATH "roms/video/cirruslogic/5428.bin"
|
||||
#define BIOS_GD5428_MCA_PATH "roms/video/cirruslogic/SVGA141.ROM"
|
||||
#define BIOS_GD5428_PATH "roms/video/cirruslogic/vlbusjapan.BIN"
|
||||
#define BIOS_GD5429_PATH "roms/video/cirruslogic/5429.vbi"
|
||||
#define BIOS_GD5430_VLB_PATH "roms/video/cirruslogic/diamondvlbus.bin"
|
||||
#define BIOS_GD5430_PCI_PATH "roms/video/cirruslogic/pci.bin"
|
||||
#define BIOS_GD5430_DIAMOND_A8_VLB_PATH "roms/video/cirruslogic/diamondvlbus.bin"
|
||||
#define BIOS_GD5430_PATH "roms/video/cirruslogic/pci.bin"
|
||||
#define BIOS_GD5434_DIAMOND_A3_ISA_PATH "roms/video/cirruslogic/Diamond Multimedia SpeedStar 64 v2.02 EPROM Backup from ST M27C256B-12F1.BIN"
|
||||
#define BIOS_GD5434_PATH "roms/video/cirruslogic/gd5434.bin"
|
||||
#define BIOS_GD5436_PATH "roms/video/cirruslogic/5436.vbi"
|
||||
#define BIOS_GD5440_PATH "roms/video/cirruslogic/BIOS.BIN"
|
||||
@@ -1209,11 +1211,62 @@ gd54xx_in(uint16_t addr, void *p)
|
||||
ret |= 0x80;
|
||||
}
|
||||
break;
|
||||
case 0x0a: /*Scratch Pad 1 (Memory size for 5402/542x)*/
|
||||
ret = svga->seqregs[0x0a] & ~0x1a;
|
||||
if (svga->crtc[0x27] == CIRRUS_ID_CLGD5402) {
|
||||
ret |= 0x01; /*512K of memory*/
|
||||
} else if (svga->crtc[0x27] > CIRRUS_ID_CLGD5402) {
|
||||
switch (gd54xx->vram_size >> 10) {
|
||||
case 512:
|
||||
ret |= 0x08;
|
||||
break;
|
||||
case 1024:
|
||||
ret |= 0x10;
|
||||
break;
|
||||
case 2048:
|
||||
ret |= 0x18;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x0b: case 0x0c: case 0x0d: case 0x0e:
|
||||
ret = gd54xx->vclk_n[svga->seqaddr-0x0b];
|
||||
break;
|
||||
case 0x0f: /*DRAM control*/
|
||||
ret = svga->seqregs[0x0f] & ~0x98;
|
||||
switch (gd54xx->vram_size >> 10) {
|
||||
case 512:
|
||||
ret |= 0x08; /*16-bit DRAM data bus width*/
|
||||
break;
|
||||
case 1024:
|
||||
ret |= 0x10; /*32-bit DRAM data bus width for 1M of memory*/
|
||||
break;
|
||||
case 2048:
|
||||
ret |= (gd54xx_is_5434(svga)) ? 0x98 : 0x18; /*32-bit (Pre-5434)/64-bit (5434 and up) DRAM data bus width for 2M of memory*/
|
||||
break;
|
||||
case 4096:
|
||||
ret |= 0x98; /*64-bit (5434 and up) DRAM data bus width for 4M of memory*/
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 0x15: /*Scratch Pad 3 (Memory size for 543x)*/
|
||||
ret = svga->seqregs[0x15] & ~0x0f;
|
||||
if (svga->crtc[0x27] >= CIRRUS_ID_CLGD5430) {
|
||||
switch (gd54xx->vram_size >> 20) {
|
||||
case 1:
|
||||
ret |= 0x02;
|
||||
break;
|
||||
case 2:
|
||||
ret |= 0x03;
|
||||
break;
|
||||
case 4:
|
||||
ret |= 0x04;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x17:
|
||||
ret = svga->gdcreg[0x17] & ~(7 << 3);
|
||||
ret = svga->seqregs[0x17] & ~(7 << 3);
|
||||
if (svga->crtc[0x27] <= CIRRUS_ID_CLGD5429) {
|
||||
if ((svga->crtc[0x27] == CIRRUS_ID_CLGD5428) || (svga->crtc[0x27] == CIRRUS_ID_CLGD5426)) {
|
||||
if (gd54xx->vlb)
|
||||
@@ -3844,17 +3897,29 @@ static void
|
||||
case CIRRUS_ID_CLGD5426:
|
||||
if (info->local & 0x200)
|
||||
romfn = NULL;
|
||||
else {
|
||||
if (info->local & 0x100)
|
||||
romfn = BIOS_GD5426_DIAMOND_A1_ISA_PATH;
|
||||
else {
|
||||
if (gd54xx->vlb)
|
||||
romfn = BIOS_GD5428_PATH;
|
||||
else
|
||||
romfn = BIOS_GD5426_PATH;
|
||||
romfn = BIOS_GD5428_ISA_PATH;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case CIRRUS_ID_CLGD5428:
|
||||
if (info->local & 0x100)
|
||||
romfn = BIOS_GD5428_DIAMOND_B1_VLB_PATH;
|
||||
else {
|
||||
if (gd54xx->vlb)
|
||||
romfn = BIOS_GD5428_PATH;
|
||||
else if (gd54xx->mca)
|
||||
romfn = BIOS_GD5428_MCA_PATH;
|
||||
else
|
||||
romfn = BIOS_GD5428_ISA_PATH;
|
||||
}
|
||||
break;
|
||||
|
||||
case CIRRUS_ID_CLGD5429:
|
||||
@@ -3873,8 +3938,12 @@ static void
|
||||
if (info->local & 0x200) {
|
||||
romfn = NULL;
|
||||
gd54xx->has_bios = 0;
|
||||
} else
|
||||
} else {
|
||||
if (info->local & 0x100)
|
||||
romfn = BIOS_GD5434_DIAMOND_A3_ISA_PATH;
|
||||
else
|
||||
romfn = BIOS_GD5434_PATH;
|
||||
}
|
||||
break;
|
||||
|
||||
case CIRRUS_ID_CLGD5436:
|
||||
@@ -3896,9 +3965,9 @@ static void
|
||||
romfn = NULL;
|
||||
gd54xx->has_bios = 0;
|
||||
} else if (gd54xx->pci)
|
||||
romfn = BIOS_GD5430_PCI_PATH;
|
||||
romfn = BIOS_GD5430_PATH;
|
||||
else
|
||||
romfn = BIOS_GD5430_VLB_PATH;
|
||||
romfn = BIOS_GD5430_DIAMOND_A8_VLB_PATH;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -3915,23 +3984,24 @@ static void
|
||||
}
|
||||
|
||||
if (info->flags & DEVICE_MCA) {
|
||||
vram = 1;
|
||||
gd54xx->vram_size = 1 << 20;
|
||||
vram = 1024;
|
||||
gd54xx->vram_size = vram << 10;
|
||||
} else {
|
||||
if (id >= CIRRUS_ID_CLGD5420) {
|
||||
if (id <= CIRRUS_ID_CLGD5428) {
|
||||
if ((id == CIRRUS_ID_CLGD5426) && (info->local & 0x200))
|
||||
vram = 1;
|
||||
vram = 1024;
|
||||
else if (id == CIRRUS_ID_CLGD5401)
|
||||
vram = 256;
|
||||
else if (id == CIRRUS_ID_CLGD5402)
|
||||
vram = 512;
|
||||
else
|
||||
vram = device_get_config_int("memory");
|
||||
} else
|
||||
vram = 0;
|
||||
|
||||
if (vram)
|
||||
gd54xx->vram_size = vram << 10;
|
||||
} else {
|
||||
vram = device_get_config_int("memory");
|
||||
gd54xx->vram_size = vram << 20;
|
||||
else
|
||||
gd54xx->vram_size = 1 << 19;
|
||||
}
|
||||
|
||||
}
|
||||
gd54xx->vram_mask = gd54xx->vram_size - 1;
|
||||
|
||||
if (romfn)
|
||||
@@ -3955,7 +4025,7 @@ static void
|
||||
}
|
||||
svga->vblank_start = gd54xx_vblank_start;
|
||||
svga->ven_write = gd54xx_write_modes45;
|
||||
if (vram <= 1)
|
||||
if ((vram == 1) || (vram >= 256 && vram <= 1024))
|
||||
svga->decode_mask = gd54xx->vram_mask;
|
||||
|
||||
if (gd54xx->bit32) {
|
||||
@@ -4039,6 +4109,7 @@ static void
|
||||
svga->crtc[0x27] = id;
|
||||
|
||||
svga->seqregs[6] = 0x0f;
|
||||
|
||||
if (svga->crtc[0x27] >= CIRRUS_ID_CLGD5429)
|
||||
gd54xx->unlocked = 1;
|
||||
|
||||
@@ -4089,9 +4160,9 @@ gd5422_available(void)
|
||||
}
|
||||
|
||||
static int
|
||||
gd5426_available(void)
|
||||
gd5426_diamond_a1_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5426_PATH);
|
||||
return rom_present(BIOS_GD5426_DIAMOND_A1_ISA_PATH);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -4100,6 +4171,12 @@ gd5428_available(void)
|
||||
return rom_present(BIOS_GD5428_PATH);
|
||||
}
|
||||
|
||||
static int
|
||||
gd5428_diamond_b1_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5428_DIAMOND_B1_VLB_PATH);
|
||||
}
|
||||
|
||||
static int
|
||||
gd5428_isa_available(void)
|
||||
{
|
||||
@@ -4119,15 +4196,15 @@ gd5429_available(void)
|
||||
}
|
||||
|
||||
static int
|
||||
gd5430_vlb_available(void)
|
||||
gd5430_diamond_a8_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5430_VLB_PATH);
|
||||
return rom_present(BIOS_GD5430_DIAMOND_A8_VLB_PATH);
|
||||
}
|
||||
|
||||
static int
|
||||
gd5430_pci_available(void)
|
||||
gd5430_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5430_PCI_PATH);
|
||||
return rom_present(BIOS_GD5430_PATH);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -4136,6 +4213,12 @@ gd5434_available(void)
|
||||
return rom_present(BIOS_GD5434_PATH);
|
||||
}
|
||||
|
||||
static int
|
||||
gd5434_diamond_a3_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5434_DIAMOND_A3_ISA_PATH);
|
||||
}
|
||||
|
||||
static int
|
||||
gd5436_available(void)
|
||||
{
|
||||
@@ -4199,28 +4282,96 @@ gd54xx_force_redraw(void *p)
|
||||
gd54xx->svga.fullchange = changeframecount;
|
||||
}
|
||||
|
||||
static const device_config_t gd5422_config[] =
|
||||
static const device_config_t gd542x_config[] =
|
||||
{
|
||||
{
|
||||
"memory","Memory size",CONFIG_SELECTION,"", 1, "", { 0 },
|
||||
.name = "memory",
|
||||
.description = "Memory size",
|
||||
.type = CONFIG_SELECTION,
|
||||
.selection =
|
||||
{
|
||||
{
|
||||
"512 KB", 0
|
||||
.description = "512 KB",
|
||||
.value = 512
|
||||
},
|
||||
{
|
||||
"1 MB", 1
|
||||
.description = "1 MB",
|
||||
.value = 1024
|
||||
},
|
||||
{
|
||||
""
|
||||
.description = ""
|
||||
}
|
||||
},
|
||||
.default_int = 512
|
||||
},
|
||||
{
|
||||
"", "", -1
|
||||
.type = -1
|
||||
}
|
||||
};
|
||||
|
||||
static const device_config_t gd5428_config[] =
|
||||
static const device_config_t gd5426_config[] =
|
||||
{
|
||||
{
|
||||
.name = "memory",
|
||||
.description = "Memory size",
|
||||
.type = CONFIG_SELECTION,
|
||||
.selection =
|
||||
{
|
||||
{
|
||||
.description = "512 KB",
|
||||
.value = 512
|
||||
},
|
||||
{
|
||||
.description = "1 MB",
|
||||
.value = 1024
|
||||
},
|
||||
{
|
||||
.description = "2 MB",
|
||||
.value = 2048
|
||||
},
|
||||
{
|
||||
.description = ""
|
||||
}
|
||||
},
|
||||
.default_int = 2048
|
||||
},
|
||||
{
|
||||
.type = -1
|
||||
}
|
||||
};
|
||||
|
||||
static const device_config_t gd5428_onboard_config[] =
|
||||
{
|
||||
{
|
||||
.name = "memory",
|
||||
.description = "Onboard memory size",
|
||||
.type = CONFIG_SELECTION,
|
||||
.selection =
|
||||
{
|
||||
{
|
||||
.description = "512 KB",
|
||||
.value = 512
|
||||
},
|
||||
{
|
||||
.description = "1 MB",
|
||||
.value = 1024
|
||||
},
|
||||
{
|
||||
.description = "2 MB",
|
||||
.value = 2048
|
||||
},
|
||||
{
|
||||
.description = ""
|
||||
}
|
||||
},
|
||||
.default_int = 2048
|
||||
},
|
||||
{
|
||||
.type = -1
|
||||
}
|
||||
};
|
||||
|
||||
static const device_config_t gd5429_config[] =
|
||||
{
|
||||
{
|
||||
.name = "memory",
|
||||
@@ -4247,38 +4398,11 @@ static const device_config_t gd5428_config[] =
|
||||
}
|
||||
};
|
||||
|
||||
static const device_config_t gd5428_onboard_config[] =
|
||||
{
|
||||
{
|
||||
.name = "memory",
|
||||
.description = "Onboard Video RAM size",
|
||||
.type = CONFIG_SELECTION,
|
||||
.selection =
|
||||
{
|
||||
{
|
||||
.description = "1 MB",
|
||||
.value = 1
|
||||
},
|
||||
{
|
||||
.description = "2 MB",
|
||||
.value = 2
|
||||
},
|
||||
{
|
||||
.description = ""
|
||||
}
|
||||
},
|
||||
.default_int = 2
|
||||
},
|
||||
{
|
||||
.type = -1
|
||||
}
|
||||
};
|
||||
|
||||
static const device_config_t gd5440_onboard_config[] =
|
||||
{
|
||||
{
|
||||
.name = "memory",
|
||||
.description = "Video memory size",
|
||||
.description = "Onboard memory size",
|
||||
.type = CONFIG_SELECTION,
|
||||
.selection =
|
||||
{
|
||||
@@ -4302,6 +4426,68 @@ static const device_config_t gd5440_onboard_config[] =
|
||||
};
|
||||
|
||||
static const device_config_t gd5434_config[] =
|
||||
{
|
||||
{
|
||||
.name = "memory",
|
||||
.description = "Memory size",
|
||||
.type = CONFIG_SELECTION,
|
||||
.selection =
|
||||
{
|
||||
{
|
||||
.description = "1 MB",
|
||||
.value = 1
|
||||
},
|
||||
{
|
||||
.description = "2 MB",
|
||||
.value = 2
|
||||
},
|
||||
{
|
||||
.description = "4 MB",
|
||||
.value = 4
|
||||
},
|
||||
{
|
||||
.description = ""
|
||||
}
|
||||
},
|
||||
.default_int = 4
|
||||
},
|
||||
{
|
||||
.type = -1
|
||||
}
|
||||
};
|
||||
|
||||
static const device_config_t gd5434_onboard_config[] =
|
||||
{
|
||||
{
|
||||
.name = "memory",
|
||||
.description = "Onboard memory size",
|
||||
.type = CONFIG_SELECTION,
|
||||
.selection =
|
||||
{
|
||||
{
|
||||
.description = "1 MB",
|
||||
.value = 1
|
||||
},
|
||||
{
|
||||
.description = "2 MB",
|
||||
.value = 2
|
||||
},
|
||||
{
|
||||
.description = "4 MB",
|
||||
.value = 4
|
||||
},
|
||||
{
|
||||
.description = ""
|
||||
}
|
||||
},
|
||||
.default_int = 4
|
||||
},
|
||||
{
|
||||
.type = -1
|
||||
}
|
||||
};
|
||||
|
||||
static const device_config_t gd5480_config[] =
|
||||
{
|
||||
{
|
||||
.name = "memory",
|
||||
@@ -4330,7 +4516,7 @@ static const device_config_t gd5434_config[] =
|
||||
|
||||
const device_t gd5401_isa_device =
|
||||
{
|
||||
"Cirrus Logic GD-5401 (ACUMOS AVGA1)",
|
||||
"Cirrus Logic GD5401 (ISA) (ACUMOS AVGA1)",
|
||||
DEVICE_ISA,
|
||||
CIRRUS_ID_CLGD5401,
|
||||
gd54xx_init, gd54xx_close,
|
||||
@@ -4343,7 +4529,7 @@ const device_t gd5401_isa_device =
|
||||
|
||||
const device_t gd5402_isa_device =
|
||||
{
|
||||
"Cirrus Logic GD-5402 (ACUMOS AVGA2)",
|
||||
"Cirrus Logic GD5402 (ISA) (ACUMOS AVGA2)",
|
||||
DEVICE_ISA,
|
||||
CIRRUS_ID_CLGD5402,
|
||||
gd54xx_init, gd54xx_close,
|
||||
@@ -4356,7 +4542,7 @@ const device_t gd5402_isa_device =
|
||||
|
||||
const device_t gd5402_onboard_device =
|
||||
{
|
||||
"Cirrus Logic GD-5402 (ACUMOS AVGA2) (On-Board)",
|
||||
"Cirrus Logic GD5402 (ISA) (ACUMOS AVGA2) (On-Board)",
|
||||
DEVICE_AT | DEVICE_ISA,
|
||||
CIRRUS_ID_CLGD5402 | 0x200,
|
||||
gd54xx_init, gd54xx_close,
|
||||
@@ -4369,7 +4555,7 @@ const device_t gd5402_onboard_device =
|
||||
|
||||
const device_t gd5420_isa_device =
|
||||
{
|
||||
"Cirrus Logic GD-5420",
|
||||
"Cirrus Logic GD5420 (ISA)",
|
||||
DEVICE_AT | DEVICE_ISA,
|
||||
CIRRUS_ID_CLGD5420,
|
||||
gd54xx_init, gd54xx_close,
|
||||
@@ -4377,11 +4563,11 @@ const device_t gd5420_isa_device =
|
||||
{ gd5420_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5422_config,
|
||||
gd542x_config,
|
||||
};
|
||||
|
||||
const device_t gd5422_isa_device = {
|
||||
"Cirrus Logic GD-5422",
|
||||
"Cirrus Logic GD5422 (ISA)",
|
||||
DEVICE_AT | DEVICE_ISA,
|
||||
CIRRUS_ID_CLGD5422,
|
||||
gd54xx_init, gd54xx_close,
|
||||
@@ -4389,11 +4575,11 @@ const device_t gd5422_isa_device = {
|
||||
{ gd5422_available }, /* Common BIOS between 5422 and 5424 */
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5422_config,
|
||||
gd542x_config,
|
||||
};
|
||||
|
||||
const device_t gd5424_vlb_device = {
|
||||
"Cirrus Logic GD-5424",
|
||||
"Cirrus Logic GD5424 (VLB)",
|
||||
DEVICE_VLB,
|
||||
CIRRUS_ID_CLGD5424,
|
||||
gd54xx_init, gd54xx_close,
|
||||
@@ -4401,26 +4587,57 @@ const device_t gd5424_vlb_device = {
|
||||
{ gd5422_available }, /* Common BIOS between 5422 and 5424 */
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5422_config,
|
||||
gd542x_config,
|
||||
};
|
||||
|
||||
const device_t gd5426_isa_device =
|
||||
{
|
||||
"Cirrus Logic GD5426 (ISA)",
|
||||
DEVICE_AT | DEVICE_ISA,
|
||||
CIRRUS_ID_CLGD5426,
|
||||
gd54xx_init,
|
||||
gd54xx_close,
|
||||
gd54xx_reset,
|
||||
{ gd5428_isa_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5426_config
|
||||
};
|
||||
|
||||
|
||||
/*According to a Diamond bios file listing and vgamuseum*/
|
||||
const device_t gd5426_diamond_speedstar_pro_a1_isa_device =
|
||||
{
|
||||
"Cirrus Logic GD5426 (ISA) (Diamond SpeedStar Pro Rev. A1)",
|
||||
DEVICE_AT | DEVICE_ISA,
|
||||
CIRRUS_ID_CLGD5426 | 0x100,
|
||||
gd54xx_init,
|
||||
gd54xx_close,
|
||||
gd54xx_reset,
|
||||
{ gd5426_diamond_a1_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5426_config
|
||||
};
|
||||
|
||||
const device_t gd5426_vlb_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5426 (VLB)",
|
||||
"Cirrus Logic GD5426 (VLB)",
|
||||
DEVICE_VLB,
|
||||
CIRRUS_ID_CLGD5426,
|
||||
gd54xx_init,
|
||||
gd54xx_close,
|
||||
gd54xx_reset,
|
||||
{ gd5426_available },
|
||||
{ gd5428_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5428_config
|
||||
gd5426_config
|
||||
};
|
||||
|
||||
|
||||
const device_t gd5426_onboard_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5426 (On-board)",
|
||||
"Cirrus Logic GD5426 (VLB) (On-Board)",
|
||||
DEVICE_VLB,
|
||||
CIRRUS_ID_CLGD5426 | 0x200,
|
||||
gd54xx_init,
|
||||
@@ -4434,7 +4651,7 @@ const device_t gd5426_onboard_device =
|
||||
|
||||
const device_t gd5428_isa_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5428 (ISA)",
|
||||
"Cirrus Logic GD5428 (ISA)",
|
||||
DEVICE_AT | DEVICE_ISA,
|
||||
CIRRUS_ID_CLGD5428,
|
||||
gd54xx_init,
|
||||
@@ -4443,12 +4660,12 @@ const device_t gd5428_isa_device =
|
||||
{ gd5428_isa_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5428_config
|
||||
gd5426_config
|
||||
};
|
||||
|
||||
const device_t gd5428_vlb_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5428 (VLB)",
|
||||
"Cirrus Logic GD5428 (VLB)",
|
||||
DEVICE_VLB,
|
||||
CIRRUS_ID_CLGD5428,
|
||||
gd54xx_init,
|
||||
@@ -4457,12 +4674,27 @@ const device_t gd5428_vlb_device =
|
||||
{ gd5428_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5428_config
|
||||
gd5426_config
|
||||
};
|
||||
|
||||
/*According to a Diamond bios file listing and vgamuseum*/
|
||||
const device_t gd5428_diamond_speedstar_pro_b1_vlb_device =
|
||||
{
|
||||
"Cirrus Logic GD5428 (VLB) (Diamond SpeedStar Pro Rev. B1)",
|
||||
DEVICE_VLB,
|
||||
CIRRUS_ID_CLGD5428 | 0x100,
|
||||
gd54xx_init,
|
||||
gd54xx_close,
|
||||
gd54xx_reset,
|
||||
{ gd5428_diamond_b1_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5426_config
|
||||
};
|
||||
|
||||
const device_t gd5428_mca_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5428 (IBM SVGA Adapter/A)",
|
||||
"Cirrus Logic GD5428 (MCA) (IBM SVGA Adapter/A)",
|
||||
DEVICE_MCA,
|
||||
CIRRUS_ID_CLGD5428,
|
||||
gd54xx_init,
|
||||
@@ -4476,7 +4708,7 @@ const device_t gd5428_mca_device =
|
||||
|
||||
const device_t gd5428_onboard_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5428 (On-Board)",
|
||||
"Cirrus Logic GD5428 (ISA) (On-Board)",
|
||||
DEVICE_AT | DEVICE_ISA,
|
||||
CIRRUS_ID_CLGD5428,
|
||||
gd54xx_init,
|
||||
@@ -4490,7 +4722,7 @@ const device_t gd5428_onboard_device =
|
||||
|
||||
const device_t gd5429_isa_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5429 (ISA)",
|
||||
"Cirrus Logic GD5429 (ISA)",
|
||||
DEVICE_AT | DEVICE_ISA,
|
||||
CIRRUS_ID_CLGD5429,
|
||||
gd54xx_init,
|
||||
@@ -4499,12 +4731,12 @@ const device_t gd5429_isa_device =
|
||||
{ gd5429_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5428_config
|
||||
gd5429_config
|
||||
};
|
||||
|
||||
const device_t gd5429_vlb_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5429 (VLB)",
|
||||
"Cirrus Logic GD5429 (VLB)",
|
||||
DEVICE_VLB,
|
||||
CIRRUS_ID_CLGD5429,
|
||||
gd54xx_init,
|
||||
@@ -4513,40 +4745,41 @@ const device_t gd5429_vlb_device =
|
||||
{ gd5429_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5428_config
|
||||
gd5429_config
|
||||
};
|
||||
|
||||
const device_t gd5430_vlb_device =
|
||||
/*According to a Diamond bios file listing and vgamuseum*/
|
||||
const device_t gd5430_diamond_speedstar_pro_se_a8_vlb_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5430 (VLB)",
|
||||
"Cirrus Logic GD5430 (VLB) (Diamond SpeedStar Pro SE Rev. A8)",
|
||||
DEVICE_VLB,
|
||||
CIRRUS_ID_CLGD5430,
|
||||
gd54xx_init,
|
||||
gd54xx_close,
|
||||
gd54xx_reset,
|
||||
{ gd5430_vlb_available },
|
||||
{ gd5430_diamond_a8_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5428_config
|
||||
gd5429_config
|
||||
};
|
||||
|
||||
const device_t gd5430_pci_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5430 (PCI)",
|
||||
"Cirrus Logic GD5430 (PCI)",
|
||||
DEVICE_PCI,
|
||||
CIRRUS_ID_CLGD5430,
|
||||
gd54xx_init,
|
||||
gd54xx_close,
|
||||
gd54xx_reset,
|
||||
{ gd5430_pci_available },
|
||||
{ gd5430_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5428_config
|
||||
gd5429_config
|
||||
};
|
||||
|
||||
const device_t gd5434_isa_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5434 (ISA)",
|
||||
"Cirrus Logic GD5434 (ISA)",
|
||||
DEVICE_AT | DEVICE_ISA,
|
||||
CIRRUS_ID_CLGD5434,
|
||||
gd54xx_init,
|
||||
@@ -4558,9 +4791,24 @@ const device_t gd5434_isa_device =
|
||||
gd5434_config
|
||||
};
|
||||
|
||||
/*According to a Diamond bios file listing and vgamuseum*/
|
||||
const device_t gd5434_diamond_speedstar_64_a3_isa_device =
|
||||
{
|
||||
"Cirrus Logic GD5434 (ISA) (Diamond SpeedStar 64 Rev. A3)",
|
||||
DEVICE_AT | DEVICE_ISA,
|
||||
CIRRUS_ID_CLGD5434 | 0x100,
|
||||
gd54xx_init,
|
||||
gd54xx_close,
|
||||
gd54xx_reset,
|
||||
{ gd5434_diamond_a3_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5429_config
|
||||
};
|
||||
|
||||
const device_t gd5434_onboard_pci_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5434-4 (On-Board PCI)",
|
||||
"Cirrus Logic GD5434-4 (PCI) (On-Board)",
|
||||
DEVICE_PCI,
|
||||
CIRRUS_ID_CLGD5434 | 0x200,
|
||||
gd54xx_init,
|
||||
@@ -4569,12 +4817,12 @@ const device_t gd5434_onboard_pci_device =
|
||||
{ NULL },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5434_config
|
||||
gd5434_onboard_config
|
||||
};
|
||||
|
||||
const device_t gd5434_vlb_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5434 (VLB)",
|
||||
"Cirrus Logic GD5434 (VLB)",
|
||||
DEVICE_VLB,
|
||||
CIRRUS_ID_CLGD5434,
|
||||
gd54xx_init,
|
||||
@@ -4588,7 +4836,7 @@ const device_t gd5434_vlb_device =
|
||||
|
||||
const device_t gd5434_pci_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5434 (PCI)",
|
||||
"Cirrus Logic GD5434 (PCI)",
|
||||
DEVICE_PCI,
|
||||
CIRRUS_ID_CLGD5434,
|
||||
gd54xx_init,
|
||||
@@ -4602,7 +4850,7 @@ const device_t gd5434_pci_device =
|
||||
|
||||
const device_t gd5436_pci_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5436 (PCI)",
|
||||
"Cirrus Logic GD5436 (PCI)",
|
||||
DEVICE_PCI,
|
||||
CIRRUS_ID_CLGD5436,
|
||||
gd54xx_init,
|
||||
@@ -4616,7 +4864,7 @@ const device_t gd5436_pci_device =
|
||||
|
||||
const device_t gd5440_onboard_pci_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5440 (On-Board PCI)",
|
||||
"Cirrus Logic GD5440 (PCI) (On-Board)",
|
||||
DEVICE_PCI,
|
||||
CIRRUS_ID_CLGD5440 | 0x600,
|
||||
gd54xx_init,
|
||||
@@ -4630,7 +4878,7 @@ const device_t gd5440_onboard_pci_device =
|
||||
|
||||
const device_t gd5440_pci_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5440 (PCI)",
|
||||
"Cirrus Logic GD5440 (PCI)",
|
||||
DEVICE_PCI,
|
||||
CIRRUS_ID_CLGD5440 | 0x400,
|
||||
gd54xx_init,
|
||||
@@ -4639,12 +4887,12 @@ const device_t gd5440_pci_device =
|
||||
{ gd5440_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5428_config
|
||||
gd5429_config
|
||||
};
|
||||
|
||||
const device_t gd5446_pci_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5446 (PCI)",
|
||||
"Cirrus Logic GD5446 (PCI)",
|
||||
DEVICE_PCI,
|
||||
CIRRUS_ID_CLGD5446,
|
||||
gd54xx_init,
|
||||
@@ -4658,7 +4906,7 @@ const device_t gd5446_pci_device =
|
||||
|
||||
const device_t gd5446_stb_pci_device =
|
||||
{
|
||||
"STB Nitro 64V (PCI)",
|
||||
"Cirrus Logic GD5446 (PCI) (STB Nitro 64V)",
|
||||
DEVICE_PCI,
|
||||
CIRRUS_ID_CLGD5446 | 0x100,
|
||||
gd54xx_init,
|
||||
@@ -4672,7 +4920,7 @@ const device_t gd5446_stb_pci_device =
|
||||
|
||||
const device_t gd5480_pci_device =
|
||||
{
|
||||
"Cirrus Logic CL-GD 5480 (PCI)",
|
||||
"Cirrus Logic GD5480 (PCI)",
|
||||
DEVICE_PCI,
|
||||
CIRRUS_ID_CLGD5480,
|
||||
gd54xx_init,
|
||||
@@ -4681,5 +4929,5 @@ const device_t gd5480_pci_device =
|
||||
{ gd5480_available },
|
||||
gd54xx_speed_changed,
|
||||
gd54xx_force_redraw,
|
||||
gd5434_config
|
||||
gd5480_config
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -40,7 +40,7 @@ typedef struct paradise_t
|
||||
|
||||
rom_t bios_rom;
|
||||
|
||||
uint8_t pr0a, pr0b, pr1, pr5, bank_mask;
|
||||
uint8_t bank_mask;
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -54,7 +54,7 @@ typedef struct paradise_t
|
||||
uint32_t read_bank[4], write_bank[4];
|
||||
|
||||
int interlace;
|
||||
int check;
|
||||
int check, check2;
|
||||
|
||||
struct {
|
||||
uint8_t reg_block_ptr;
|
||||
@@ -81,7 +81,7 @@ void paradise_out(uint16_t addr, uint8_t val, void *p)
|
||||
{
|
||||
paradise_t *paradise = (paradise_t *)p;
|
||||
svga_t *svga = ¶dise->svga;
|
||||
uint8_t old, o;
|
||||
uint8_t old;
|
||||
|
||||
if (paradise->vram_mask <= ((512 << 10) - 1))
|
||||
paradise->bank_mask = 0x7f;
|
||||
@@ -94,8 +94,7 @@ void paradise_out(uint16_t addr, uint8_t val, void *p)
|
||||
switch (addr)
|
||||
{
|
||||
case 0x3c5:
|
||||
if (svga->seqaddr > 7)
|
||||
{
|
||||
if (svga->seqaddr > 7) {
|
||||
if (paradise->type < WD90C11 || svga->seqregs[6] != 0x48)
|
||||
return;
|
||||
svga->seqregs[svga->seqaddr & 0x1f] = val;
|
||||
@@ -115,53 +114,45 @@ void paradise_out(uint16_t addr, uint8_t val, void *p)
|
||||
|
||||
case 0x3cf:
|
||||
if (svga->gdcaddr >= 9 && svga->gdcaddr <= 0x0e) {
|
||||
if ((paradise->pr5 & 7) != 5)
|
||||
if ((svga->gdcreg[0x0f] & 7) != 5)
|
||||
return;
|
||||
}
|
||||
|
||||
switch (svga->gdcaddr) {
|
||||
case 6:
|
||||
if (val & 8)
|
||||
svga->banked_mask = 0x7fff;
|
||||
else
|
||||
if ((svga->gdcreg[6] & 0x0c) != (val & 0x0c)) {
|
||||
switch (val & 0x0c) {
|
||||
case 0x00: /*128k at A0000*/
|
||||
mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x20000);
|
||||
svga->banked_mask = 0xffff;
|
||||
if (svga->gdcreg[6] != val)
|
||||
break;
|
||||
case 0x04: /*64k at A0000*/
|
||||
mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000);
|
||||
svga->banked_mask = 0xffff;
|
||||
break;
|
||||
case 0x08: /*32k at B0000*/
|
||||
mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000);
|
||||
svga->banked_mask = 0x7fff;
|
||||
break;
|
||||
case 0x0c: /*32k at B8000*/
|
||||
mem_mapping_set_addr(&svga->mapping, 0xb8000, 0x08000);
|
||||
svga->banked_mask = 0x7fff;
|
||||
break;
|
||||
}
|
||||
}
|
||||
svga->gdcreg[6] = val;
|
||||
paradise_remap(paradise);
|
||||
break;
|
||||
return;
|
||||
|
||||
case 9:
|
||||
paradise->pr0a = val & paradise->bank_mask;
|
||||
paradise_remap(paradise);
|
||||
break;
|
||||
case 0x0a:
|
||||
paradise->pr0b = val & paradise->bank_mask;
|
||||
svga->gdcreg[svga->gdcaddr] = val & paradise->bank_mask;
|
||||
paradise_remap(paradise);
|
||||
break;
|
||||
return;
|
||||
case 0x0b:
|
||||
paradise->pr1 = val;
|
||||
svga->gdcreg[0x0b] = val;
|
||||
paradise_remap(paradise);
|
||||
break;
|
||||
case 0x0d:
|
||||
o = svga->gdcreg[0x0d];
|
||||
svga->gdcreg[0x0d] = val;
|
||||
if ((o ^ val) & 0x18)
|
||||
svga_recalctimings(svga);
|
||||
break;
|
||||
case 0x0e:
|
||||
o = svga->gdcreg[0x0e];
|
||||
svga->gdcreg[0x0e] = val;
|
||||
if ((o ^ val) & 0x01)
|
||||
svga_recalctimings(svga);
|
||||
break;
|
||||
case 0x0c:
|
||||
svga->gdcreg[0x0c] = val;
|
||||
break;
|
||||
case 0x0f:
|
||||
paradise->pr5 = val;
|
||||
break;
|
||||
default:
|
||||
svga->gdcreg[svga->gdcaddr] = val;
|
||||
break;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -216,10 +207,8 @@ uint8_t paradise_in(uint16_t addr, void *p)
|
||||
{
|
||||
if (paradise->type < WD90C11 || svga->seqregs[6] != 0x48)
|
||||
return 0xff;
|
||||
if (paradise->type < WD90C30) {
|
||||
if (svga->seqaddr > 0x12)
|
||||
return 0xff;
|
||||
}
|
||||
return svga->seqregs[svga->seqaddr & 0x1f];
|
||||
}
|
||||
break;
|
||||
@@ -231,36 +220,21 @@ uint8_t paradise_in(uint16_t addr, void *p)
|
||||
|
||||
case 0x3cf:
|
||||
if (svga->gdcaddr >= 9 && svga->gdcaddr <= 0x0e) {
|
||||
if (paradise->pr5 & 0x10)
|
||||
if (svga->gdcreg[0x0f] & 0x10)
|
||||
return 0xff;
|
||||
}
|
||||
switch (svga->gdcaddr) {
|
||||
case 9:
|
||||
return paradise->pr0a;
|
||||
case 0x0a:
|
||||
return paradise->pr0b;
|
||||
case 0x0b:
|
||||
if (paradise->vram_mask == (512 << 10) - 1) {
|
||||
paradise->pr1 |= 0xc0;
|
||||
paradise->pr1 &= ~0x40;
|
||||
} else if (paradise->vram_mask == (1024 << 10) - 1) {
|
||||
paradise->pr1 |= 0xc0;
|
||||
/*The following is a horrible tweak, but needed to get around black corruption in 1M mode*/
|
||||
if (svga->bpp >= 8 && (svga->gdcreg[0x0e] & 0x01) && paradise->check)
|
||||
paradise->pr1 &= ~0x40;
|
||||
else if (!(svga->gdcreg[0x0e] & 0x01) && !(svga->crtc[0x14] & 0x40) && paradise->check)
|
||||
paradise->check = 0;
|
||||
if (paradise->type == WD90C30) {
|
||||
if (paradise->vram_mask == ((512 << 10) - 1)) {
|
||||
svga->gdcreg[0x0b] |= 0xc0;
|
||||
svga->gdcreg[0x0b] &= ~0x40;
|
||||
}
|
||||
return paradise->pr1;
|
||||
case 6:
|
||||
case 0x0c:
|
||||
case 0x0d:
|
||||
case 0x0e:
|
||||
return svga->gdcreg[svga->gdcaddr];
|
||||
}
|
||||
return svga->gdcreg[0x0b];
|
||||
|
||||
case 0x0f:
|
||||
return (paradise->pr5 & 0x17) | 0x80;
|
||||
default:
|
||||
return svga->gdcreg[svga->gdcaddr];
|
||||
return (svga->gdcreg[0x0f] & 0x17) | 0x80;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -279,47 +253,35 @@ uint8_t paradise_in(uint16_t addr, void *p)
|
||||
void paradise_remap(paradise_t *paradise)
|
||||
{
|
||||
svga_t *svga = ¶dise->svga;
|
||||
paradise->check = 0;
|
||||
|
||||
if (svga->seqregs[0x11] & 0x80) {
|
||||
paradise->read_bank[0] = (paradise->pr0a) << 12;
|
||||
paradise->read_bank[1] = paradise->read_bank[0] + ((svga->gdcreg[6] & 8) ? 0 : 0x8000);
|
||||
paradise->read_bank[2] = paradise->read_bank[0];
|
||||
paradise->read_bank[3] = paradise->read_bank[1];
|
||||
paradise->write_bank[0] = (paradise->pr0b) << 12;
|
||||
paradise->write_bank[1] = paradise->write_bank[0] + ((svga->gdcreg[6] & 8) ? 0 : 0x8000);
|
||||
paradise->write_bank[2] = paradise->write_bank[0];
|
||||
paradise->write_bank[3] = paradise->write_bank[1];
|
||||
} else if (paradise->pr1 & 8) {
|
||||
paradise->read_bank[0] = paradise->read_bank[2] = svga->gdcreg[9] << 12;
|
||||
paradise->read_bank[1] = paradise->read_bank[3] = (svga->gdcreg[9] << 12) + ((svga->gdcreg[6] & 0x08) ? 0 : 0x8000);
|
||||
paradise->write_bank[0] = paradise->write_bank[2] = svga->gdcreg[0x0a] << 12;
|
||||
paradise->write_bank[1] = paradise->write_bank[3] = (svga->gdcreg[0x0a] << 12) + ((svga->gdcreg[6] & 0x08) ? 0 : 0x8000);
|
||||
} else if (svga->gdcreg[0x0b] & 0x08) {
|
||||
if (svga->gdcreg[6] & 0x0c) {
|
||||
paradise->read_bank[0] = (paradise->pr0b) << 12;
|
||||
paradise->read_bank[1] = ((paradise->pr0a) << 12) + ((svga->gdcreg[6] & 8) ? 0 : 0x8000);
|
||||
paradise->read_bank[2] = paradise->read_bank[0];
|
||||
paradise->read_bank[3] = paradise->read_bank[1];
|
||||
paradise->write_bank[0] = (paradise->pr0b) << 12;
|
||||
paradise->write_bank[1] = ((paradise->pr0a) << 12) + ((svga->gdcreg[6] & 8) ? 0 : 0x8000);
|
||||
paradise->write_bank[2] = paradise->write_bank[0];
|
||||
paradise->write_bank[3] = paradise->write_bank[1];
|
||||
paradise->read_bank[0] = paradise->read_bank[2] = svga->gdcreg[0x0a] << 12;
|
||||
paradise->write_bank[0] = paradise->write_bank[2] = svga->gdcreg[0x0a] << 12;
|
||||
paradise->read_bank[1] = paradise->read_bank[3] = (svga->gdcreg[9] << 12) + ((svga->gdcreg[6] & 0x08) ? 0 : 0x8000);
|
||||
paradise->write_bank[1] = paradise->write_bank[3] = (svga->gdcreg[9] << 12) + ((svga->gdcreg[6] & 0x08) ? 0 : 0x8000);
|
||||
} else {
|
||||
paradise->read_bank[0] = (paradise->pr0b) << 12;
|
||||
paradise->read_bank[1] = paradise->read_bank[0] + ((svga->gdcreg[6] & 8) ? 0 : 0x8000);
|
||||
paradise->read_bank[2] = (paradise->pr0a) << 12;
|
||||
paradise->read_bank[3] = paradise->read_bank[2] + ((svga->gdcreg[6] & 8) ? 0 : 0x8000);
|
||||
paradise->write_bank[0] = (paradise->pr0b) << 12;
|
||||
paradise->write_bank[1] = paradise->write_bank[0] + ((svga->gdcreg[6] & 8) ? 0 : 0x8000);
|
||||
paradise->write_bank[2] = (paradise->pr0a) << 12;
|
||||
paradise->write_bank[3] = paradise->write_bank[2] + ((svga->gdcreg[6] & 8) ? 0 : 0x8000);
|
||||
paradise->read_bank[0] = paradise->write_bank[0] = svga->gdcreg[0x0a] << 12;
|
||||
paradise->read_bank[1] = paradise->write_bank[1] = (svga->gdcreg[0xa] << 12) + ((svga->gdcreg[6] & 0x08) ? 0 : 0x8000);
|
||||
paradise->read_bank[2] = paradise->write_bank[2] = svga->gdcreg[9] << 12;
|
||||
paradise->read_bank[3] = paradise->write_bank[3] = (svga->gdcreg[9] << 12) + ((svga->gdcreg[6] & 0x08) ? 0 : 0x8000);
|
||||
}
|
||||
} else {
|
||||
paradise->read_bank[0] = (paradise->pr0a) << 12;
|
||||
paradise->write_bank[0] = (paradise->pr0a) << 12;
|
||||
paradise->read_bank[1] = paradise->read_bank[0] + ((svga->gdcreg[6] & 8) ? 0 : 0x8000);
|
||||
paradise->write_bank[1] = paradise->write_bank[0] + ((svga->gdcreg[6] & 8) ? 0 : 0x8000);
|
||||
paradise->read_bank[2] = paradise->read_bank[0];
|
||||
paradise->write_bank[2] = paradise->write_bank[0];
|
||||
paradise->read_bank[3] = paradise->read_bank[0] + ((svga->gdcreg[6] & 8) ? 0 : 0x8000);
|
||||
paradise->write_bank[3] = paradise->write_bank[0] + ((svga->gdcreg[6] & 8) ? 0 : 0x8000);
|
||||
paradise->read_bank[0] = paradise->read_bank[2] = svga->gdcreg[9] << 12;
|
||||
paradise->read_bank[1] = paradise->read_bank[3] = (svga->gdcreg[9] << 12) + ((svga->gdcreg[6] & 0x08) ? 0 : 0x8000);
|
||||
paradise->write_bank[0] = paradise->write_bank[2] = svga->gdcreg[9] << 12;
|
||||
paradise->write_bank[1] = paradise->write_bank[3] = (svga->gdcreg[9] << 12) + ((svga->gdcreg[6] & 0x08) ? 0 : 0x8000);
|
||||
}
|
||||
|
||||
if ((((svga->gdcreg[0x0b] & 0xc0) == 0xc0) && !svga->chain4 && (svga->crtc[0x14] & 0x40) && ((svga->gdcreg[6] >> 2) & 3) == 1))
|
||||
paradise->check = 1;
|
||||
|
||||
if (paradise->bank_mask == 0x7f) {
|
||||
paradise->read_bank[1] &= 0x7ffff;
|
||||
paradise->write_bank[1] &= 0x7ffff;
|
||||
@@ -330,9 +292,6 @@ void paradise_recalctimings(svga_t *svga)
|
||||
{
|
||||
paradise_t *paradise = (paradise_t *) svga->p;
|
||||
|
||||
if (svga->gdcreg[0x0d] & 0x08) svga->ma_latch |= 0x10000;
|
||||
if (svga->gdcreg[0x0d] & 0x10) svga->ma_latch |= 0x20000;
|
||||
|
||||
svga->lowres = !(svga->gdcreg[0x0e] & 0x01);
|
||||
|
||||
if (paradise->type == WD90C30) {
|
||||
@@ -355,8 +314,6 @@ void paradise_recalctimings(svga_t *svga)
|
||||
|
||||
if (paradise->type < WD90C30) {
|
||||
if (svga->bpp >= 8 && !svga->lowres) {
|
||||
if ((svga->crtc[0x17] == 0xc2) && (svga->crtc[0x14] & 0x40))
|
||||
paradise->check = 1;
|
||||
svga->render = svga_render_8bpp_highres;
|
||||
}
|
||||
} else {
|
||||
@@ -368,8 +325,6 @@ void paradise_recalctimings(svga_t *svga)
|
||||
svga->render = svga_render_15bpp_highres;
|
||||
svga->hdisp >>= 1;
|
||||
} else {
|
||||
if ((svga->crtc[0x17] == 0xc2) && (svga->crtc[0x14] & 0x40))
|
||||
paradise->check = 1;
|
||||
svga->render = svga_render_8bpp_highres;
|
||||
}
|
||||
}
|
||||
@@ -380,20 +335,94 @@ static void paradise_write(uint32_t addr, uint8_t val, void *p)
|
||||
{
|
||||
paradise_t *paradise = (paradise_t *)p;
|
||||
svga_t *svga = ¶dise->svga;
|
||||
uint32_t prev_addr, prev_addr2;
|
||||
|
||||
addr &= svga->banked_mask;
|
||||
addr = (addr & 0x7fff) + paradise->write_bank[(addr >> 15) & 3];
|
||||
|
||||
/*Could be done in a better way but it works.*/
|
||||
if (!svga->lowres) {
|
||||
if (paradise->check) {
|
||||
prev_addr = addr & 3;
|
||||
prev_addr2 = addr & 0xfffc;
|
||||
if ((addr & 3) == 3) {
|
||||
if ((addr & 0x30000) == 0x20000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x10000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x00000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
} else if ((addr & 3) == 2) {
|
||||
if ((addr & 0x30000) == 0x30000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x10000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x00000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
} else if ((addr & 3) == 1) {
|
||||
if ((addr & 0x30000) == 0x30000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x20000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x00000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
} else if ((addr & 3) == 0) {
|
||||
if ((addr & 0x30000) == 0x30000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x20000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x10000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
svga_write_linear(addr, val, svga);
|
||||
}
|
||||
static void paradise_writew(uint32_t addr, uint16_t val, void *p)
|
||||
{
|
||||
paradise_t *paradise = (paradise_t *)p;
|
||||
svga_t *svga = ¶dise->svga;
|
||||
uint32_t prev_addr, prev_addr2;
|
||||
|
||||
addr &= svga->banked_mask;
|
||||
addr = (addr & 0x7fff) + paradise->write_bank[(addr >> 15) & 3];
|
||||
|
||||
/*Could be done in a better way but it works.*/
|
||||
if (!svga->lowres) {
|
||||
if (paradise->check) {
|
||||
prev_addr = addr & 3;
|
||||
prev_addr2 = addr & 0xfffc;
|
||||
if ((addr & 3) == 3) {
|
||||
if ((addr & 0x30000) == 0x20000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x10000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x00000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
} else if ((addr & 3) == 2) {
|
||||
if ((addr & 0x30000) == 0x30000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x10000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x00000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
} else if ((addr & 3) == 1) {
|
||||
if ((addr & 0x30000) == 0x30000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x20000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x00000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
} else if ((addr & 3) == 0) {
|
||||
if ((addr & 0x30000) == 0x30000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x20000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x10000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
svga_writew_linear(addr, val, svga);
|
||||
}
|
||||
|
||||
@@ -401,20 +430,94 @@ static uint8_t paradise_read(uint32_t addr, void *p)
|
||||
{
|
||||
paradise_t *paradise = (paradise_t *)p;
|
||||
svga_t *svga = ¶dise->svga;
|
||||
uint32_t prev_addr, prev_addr2;
|
||||
|
||||
addr &= svga->banked_mask;
|
||||
addr = (addr & 0x7fff) + paradise->read_bank[(addr >> 15) & 3];
|
||||
|
||||
/*Could be done in a better way but it works.*/
|
||||
if (!svga->lowres) {
|
||||
if (paradise->check) {
|
||||
prev_addr = addr & 3;
|
||||
prev_addr2 = addr & 0xfffc;
|
||||
if ((addr & 3) == 3) {
|
||||
if ((addr & 0x30000) == 0x20000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x10000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x00000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
} else if ((addr & 3) == 2) {
|
||||
if ((addr & 0x30000) == 0x30000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x10000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x00000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
} else if ((addr & 3) == 1) {
|
||||
if ((addr & 0x30000) == 0x30000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x20000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x00000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
} else if ((addr & 3) == 0) {
|
||||
if ((addr & 0x30000) == 0x30000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x20000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x10000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return svga_read_linear(addr, svga);
|
||||
}
|
||||
static uint16_t paradise_readw(uint32_t addr, void *p)
|
||||
{
|
||||
paradise_t *paradise = (paradise_t *)p;
|
||||
svga_t *svga = ¶dise->svga;
|
||||
uint32_t prev_addr, prev_addr2;
|
||||
|
||||
addr &= svga->banked_mask;
|
||||
addr = (addr & 0x7fff) + paradise->read_bank[(addr >> 15) & 3];
|
||||
|
||||
/*Could be done in a better way but it works.*/
|
||||
if (!svga->lowres) {
|
||||
if (paradise->check) {
|
||||
prev_addr = addr & 3;
|
||||
prev_addr2 = addr & 0xfffc;
|
||||
if ((addr & 3) == 3) {
|
||||
if ((addr & 0x30000) == 0x20000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x10000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x00000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
} else if ((addr & 3) == 2) {
|
||||
if ((addr & 0x30000) == 0x30000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x10000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x00000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
} else if ((addr & 3) == 1) {
|
||||
if ((addr & 0x30000) == 0x30000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x20000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x00000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
} else if ((addr & 3) == 0) {
|
||||
if ((addr & 0x30000) == 0x30000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x20000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
else if ((addr & 0x30000) == 0x10000)
|
||||
addr = (addr >> 16) | (prev_addr << 16) | prev_addr2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return svga_readw_linear(addr, svga);
|
||||
}
|
||||
|
||||
@@ -653,9 +756,6 @@ static const device_config_t paradise_pvga1a_config[] =
|
||||
{
|
||||
"512 kB", 512
|
||||
},
|
||||
{
|
||||
"1 MB", 1024
|
||||
},
|
||||
{
|
||||
""
|
||||
}
|
||||
|
||||
@@ -62,9 +62,11 @@
|
||||
#define ROM_DIAMOND_STEALTH_SE "roms/video/s3/DiamondStealthSE.VBI"
|
||||
#define ROM_ELSAWIN2KPROX_964 "roms/video/s3/elsaw20004m.BIN"
|
||||
#define ROM_ELSAWIN2KPROX "roms/video/s3/elsaw20008m.BIN"
|
||||
#define ROM_NUMBER9_9FX_531 "roms/video/s3/numbernine.BIN"
|
||||
#define ROM_PHOENIX_VISION868 "roms/video/s3/1-DSV3868.BIN"
|
||||
#define ROM_MIROVIDEO40SV_ERGO_968_PCI "roms/video/s3/S3_968PCI_TVP3026_miroVideo40SV_PCI_1.04.BIN"
|
||||
#define ROM_SPEA_MERCURY_P64V "roms/video/s3/S3_968PCI_TVP3026_SPEAMecuryP64V_ver1.01.BIN"
|
||||
#define ROM_NUMBER9_9FX_771 "roms/video/s3/no9motionfx771.BIN"
|
||||
#define ROM_PHOENIX_VISION968 "roms/video/s3/1-DSV3968P.BIN"
|
||||
|
||||
enum
|
||||
@@ -100,7 +102,9 @@ enum
|
||||
S3_MIROCRYSTAL20SV_964,
|
||||
S3_MIROCRYSTAL20SD_864,
|
||||
S3_PHOENIX_VISION968,
|
||||
S3_MIROCRYSTAL8S_805
|
||||
S3_MIROCRYSTAL8S_805,
|
||||
S3_NUMBER9_9FX_531,
|
||||
S3_NUMBER9_9FX_771
|
||||
};
|
||||
|
||||
|
||||
@@ -1140,7 +1144,8 @@ s3_accel_out_fifo(s3_t *s3, uint16_t port, uint8_t val)
|
||||
break;
|
||||
s3->accel.pix_trans[0] = val;
|
||||
if (s3->accel.cmd & 0x100) {
|
||||
if (!(s3->accel.cmd & 0x600)) {
|
||||
switch (s3->accel.cmd & 0x600) {
|
||||
case 0x000:
|
||||
if (((s3->accel.multifunc[0xa] & 0xc0) == 0x80) || (s3->accel.cmd & 2)) {
|
||||
if (((s3->accel.frgd_mix & 0x60) != 0x40) || ((s3->accel.bkgd_mix & 0x60) != 0x40))
|
||||
s3_accel_start(8, 1, s3->accel.pix_trans[0], 0, s3);
|
||||
@@ -1152,6 +1157,17 @@ s3_accel_out_fifo(s3_t *s3, uint16_t port, uint8_t val)
|
||||
else
|
||||
s3_accel_start(1, 1, 0xffffffff, s3->accel.pix_trans[0], s3);
|
||||
}
|
||||
break;
|
||||
case 0x200:
|
||||
if (((s3->accel.multifunc[0xa] & 0xc0) == 0x80) || (s3->accel.cmd & 2)) {
|
||||
if (((s3->accel.frgd_mix & 0x60) != 0x40) || ((s3->accel.bkgd_mix & 0x60) != 0x40))
|
||||
s3_accel_start(16, 1, s3->accel.pix_trans[0] | (s3->accel.pix_trans[0] << 8), 0, s3);
|
||||
else
|
||||
s3_accel_start(2, 1, 0xffffffff, s3->accel.pix_trans[0] | (s3->accel.pix_trans[0] << 8), s3);
|
||||
} else {
|
||||
s3_accel_start(2, 1, 0xffffffff, s3->accel.pix_trans[0] | (s3->accel.pix_trans[0] << 8), s3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2442,7 +2458,7 @@ s3_out(uint16_t addr, uint8_t val, void *p)
|
||||
rs3 = 0;
|
||||
bt48x_ramdac_out(addr, rs2, rs3, val, svga->ramdac, svga);
|
||||
} else if ((s3->chip == S3_VISION964 && s3->card_type == S3_ELSAWIN2KPROX_964) || (s3->chip == S3_VISION968 && (s3->card_type == S3_ELSAWIN2KPROX ||
|
||||
s3->card_type == S3_PHOENIX_VISION968)))
|
||||
s3->card_type == S3_PHOENIX_VISION968 || s3->card_type == S3_NUMBER9_9FX_771)))
|
||||
ibm_rgb528_ramdac_out(addr, rs2, val, svga->ramdac, svga);
|
||||
else if ((s3->chip == S3_VISION968 && (s3->card_type == S3_SPEA_MERCURY_P64V || s3->card_type == S3_MIROVIDEO40SV_ERGO_968))) {
|
||||
rs3 = !!(svga->crtc[0x55] & 0x02);
|
||||
@@ -2451,7 +2467,9 @@ s3_out(uint16_t addr, uint8_t val, void *p)
|
||||
att49x_ramdac_out(addr, rs2, val, svga->ramdac, svga);
|
||||
else if (s3->chip <= S3_86C924) {
|
||||
sc1148x_ramdac_out(addr, rs2, val, svga->ramdac, svga);
|
||||
} else
|
||||
} else if (s3->card_type == S3_NUMBER9_9FX_531)
|
||||
att498_ramdac_out(addr, rs2, val, svga->ramdac, svga);
|
||||
else
|
||||
sdac_ramdac_out(addr, rs2, val, svga->ramdac, svga);
|
||||
return;
|
||||
|
||||
@@ -2728,7 +2746,7 @@ s3_in(uint16_t addr, void *p)
|
||||
rs3 = !!(svga->crtc[0x55] & 0x02);
|
||||
return bt48x_ramdac_in(addr, rs2, rs3, svga->ramdac, svga);
|
||||
} else if ((s3->chip == S3_VISION964 && s3->card_type == S3_ELSAWIN2KPROX_964) || (s3->chip == S3_VISION968 && (s3->card_type == S3_ELSAWIN2KPROX ||
|
||||
s3->card_type == S3_PHOENIX_VISION968)))
|
||||
s3->card_type == S3_PHOENIX_VISION968 || s3->card_type == S3_NUMBER9_9FX_771)))
|
||||
return ibm_rgb528_ramdac_in(addr, rs2, svga->ramdac, svga);
|
||||
else if ((s3->chip == S3_VISION968 && (s3->card_type == S3_SPEA_MERCURY_P64V || s3->card_type == S3_MIROVIDEO40SV_ERGO_968))) {
|
||||
rs3 = !!(svga->crtc[0x55] & 0x02);
|
||||
@@ -2737,6 +2755,8 @@ s3_in(uint16_t addr, void *p)
|
||||
return att49x_ramdac_in(addr, rs2, svga->ramdac, svga);
|
||||
else if (s3->chip <= S3_86C924)
|
||||
return sc1148x_ramdac_in(addr, rs2, svga->ramdac, svga);
|
||||
else if (s3->card_type == S3_NUMBER9_9FX_531)
|
||||
return att498_ramdac_in(addr, rs2, svga->ramdac, svga);
|
||||
else
|
||||
return sdac_ramdac_in(addr, rs2, svga->ramdac, svga);
|
||||
break;
|
||||
@@ -2839,7 +2859,7 @@ static void s3_recalctimings(svga_t *svga)
|
||||
else
|
||||
ibm_rgb528_recalctimings(svga->ramdac, svga);
|
||||
} else
|
||||
svga->interlace = svga->crtc[0x42] & 0x20;
|
||||
svga->interlace = !!(svga->crtc[0x42] & 0x20);
|
||||
|
||||
if ((((svga->miscout >> 2) & 3) == 3) && s3->chip < S3_TRIO32)
|
||||
clk_sel = svga->crtc[0x42] & 0x0f;
|
||||
@@ -2856,10 +2876,25 @@ static void s3_recalctimings(svga_t *svga)
|
||||
|
||||
if (s3->card_type == S3_MIROCRYSTAL10SD_805 || s3->card_type == S3_MIROCRYSTAL20SD_864 ||
|
||||
s3->card_type == S3_MIROCRYSTAL20SV_964 || s3->card_type == S3_SPEA_MIRAGE_86C801 ||
|
||||
s3->card_type == S3_SPEA_MIRAGE_86C805 || s3->card_type == S3_MIROCRYSTAL8S_805) {
|
||||
s3->card_type == S3_SPEA_MIRAGE_86C805 || s3->card_type == S3_MIROCRYSTAL8S_805 ||
|
||||
s3->card_type == S3_NUMBER9_9FX_531) {
|
||||
if (!(svga->crtc[0x5e] & 0x04))
|
||||
svga->vblankstart = svga->dispend;
|
||||
if (svga->bpp != 32) {
|
||||
if (svga->crtc[0x31] & 2) /*This is needed if the pixel width gets set with delays*/
|
||||
s3->width = 2048;
|
||||
else {
|
||||
if (s3->card_type == S3_MIROCRYSTAL10SD_805) {
|
||||
if (svga->hdisp == 1280 && s3->width == 1024) {
|
||||
s3->width = 1280;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (s3->card_type == S3_NUMBER9_9FX_531) {
|
||||
if (svga->hdisp == 1600 && s3->width == 1600)
|
||||
s3->width = 800;
|
||||
}
|
||||
}
|
||||
} else if (s3->chip == S3_86C928) {
|
||||
if (svga->bpp == 15) {
|
||||
@@ -2889,15 +2924,16 @@ static void s3_recalctimings(svga_t *svga)
|
||||
if (s3->chip != S3_VISION868) {
|
||||
if (s3->chip == S3_86C928) {
|
||||
if (s3->width == 2048 || s3->width == 1280 || s3->width == 1600)
|
||||
svga->hdisp *= 2;
|
||||
svga->hdisp <<= 1;
|
||||
} else if ((s3->chip != S3_86C801) && (s3->chip != S3_86C805) && (s3->chip != S3_TRIO32) &&
|
||||
(s3->chip != S3_TRIO64) && (s3->chip != S3_VISION964) && (s3->chip != S3_VISION968)) {
|
||||
if (s3->width == 1280 || s3->width == 1600)
|
||||
svga->hdisp *= 2;
|
||||
svga->hdisp <<= 1;
|
||||
} else if (s3->card_type == S3_SPEA_MERCURY_P64V) {
|
||||
if (s3->width == 1280 || s3->width == 1600)
|
||||
svga->hdisp *= 2;
|
||||
}
|
||||
svga->hdisp <<= 1;
|
||||
} else if (s3->card_type == S3_NUMBER9_9FX_771)
|
||||
svga->hdisp <<= 1;
|
||||
|
||||
if (s3->card_type == S3_MIROVIDEO40SV_ERGO_968 || s3->card_type == S3_MIROCRYSTAL20SD_864 ||
|
||||
s3->card_type == S3_PHOENIX_VISION968 || s3->card_type == S3_SPEA_MERCURY_P64V) {
|
||||
@@ -2948,19 +2984,21 @@ static void s3_recalctimings(svga_t *svga)
|
||||
if ((s3->chip != S3_VISION964) && (s3->card_type != S3_SPEA_MIRAGE_86C801) &&
|
||||
(s3->card_type != S3_SPEA_MIRAGE_86C805)) {
|
||||
if (s3->chip == S3_86C928)
|
||||
svga->hdisp *= 2;
|
||||
svga->hdisp <<= 1;
|
||||
else if (s3->chip != S3_VISION968)
|
||||
svga->hdisp /= 2;
|
||||
svga->hdisp >>= 1;
|
||||
}
|
||||
if ((s3->chip != S3_VISION868) && (s3->chip != S3_TRIO32) &&
|
||||
(s3->chip != S3_TRIO64) && (s3->chip != S3_VISION964)) {
|
||||
if (s3->width == 1280 || s3->width == 1600)
|
||||
svga->hdisp *= 2;
|
||||
svga->hdisp <<= 1;
|
||||
else if (s3->card_type == S3_NUMBER9_9FX_771)
|
||||
svga->hdisp <<= 1;
|
||||
}
|
||||
if (s3->card_type == S3_MIROVIDEO40SV_ERGO_968 || s3->card_type == S3_PHOENIX_VISION968 ||
|
||||
s3->card_type == S3_SPEA_MERCURY_P64V) {
|
||||
if (svga->hdisp == (1408*2))
|
||||
svga->hdisp /= 2;
|
||||
svga->hdisp >>= 1;
|
||||
else
|
||||
svga->hdisp = s3->width;
|
||||
}
|
||||
@@ -2973,21 +3011,22 @@ static void s3_recalctimings(svga_t *svga)
|
||||
if ((s3->chip != S3_VISION964) && (s3->card_type != S3_SPEA_MIRAGE_86C801) &&
|
||||
(s3->card_type != S3_SPEA_MIRAGE_86C805)) {
|
||||
if (s3->chip == S3_86C928)
|
||||
svga->hdisp *= 2;
|
||||
svga->hdisp <<= 1;
|
||||
else if (s3->chip != S3_VISION968)
|
||||
svga->hdisp /= 2;
|
||||
} else if ((s3->card_type == S3_SPEA_MIRAGE_86C801) || (s3->card_type == S3_SPEA_MIRAGE_86C805)) {
|
||||
svga->hdisp /= 2;
|
||||
}
|
||||
svga->hdisp >>= 1;
|
||||
} else if ((s3->card_type == S3_SPEA_MIRAGE_86C801) || (s3->card_type == S3_SPEA_MIRAGE_86C805))
|
||||
svga->hdisp >>= 1;
|
||||
if ((s3->chip != S3_VISION868) && (s3->chip != S3_TRIO32) &&
|
||||
(s3->chip != S3_TRIO64) && (s3->chip != S3_VISION964)) {
|
||||
if (s3->width == 1280 || s3->width == 1600)
|
||||
svga->hdisp *= 2;
|
||||
svga->hdisp <<= 1;
|
||||
else if (s3->card_type == S3_NUMBER9_9FX_771)
|
||||
svga->hdisp <<= 1;
|
||||
}
|
||||
if (s3->card_type == S3_MIROVIDEO40SV_ERGO_968 || s3->card_type == S3_PHOENIX_VISION968 ||
|
||||
s3->card_type == S3_SPEA_MERCURY_P64V) {
|
||||
if (svga->hdisp == (1408*2))
|
||||
svga->hdisp /= 2;
|
||||
svga->hdisp >>= 1;
|
||||
else
|
||||
svga->hdisp = s3->width;
|
||||
}
|
||||
@@ -3013,12 +3052,13 @@ static void s3_recalctimings(svga_t *svga)
|
||||
if ((s3->chip < S3_TRIO32) && (s3->chip != S3_VISION964) &&
|
||||
(s3->chip != S3_VISION968) && (s3->chip != S3_86C928)) {
|
||||
if (s3->chip == S3_VISION868)
|
||||
svga->hdisp /= 2;
|
||||
svga->hdisp >>= 1;
|
||||
else
|
||||
svga->hdisp /= 4;
|
||||
svga->hdisp >>= 2;
|
||||
}
|
||||
if (s3->width == 1280 || s3->width == 1600 || (s3->card_type == S3_SPEA_MERCURY_P64V))
|
||||
svga->hdisp *= 2;
|
||||
if (s3->width == 1280 || s3->width == 1600 || (s3->card_type == S3_SPEA_MERCURY_P64V ||
|
||||
s3->card_type == S3_NUMBER9_9FX_771))
|
||||
svga->hdisp <<= 1;
|
||||
if (s3->card_type == S3_MIROVIDEO40SV_ERGO_968 || s3->card_type == S3_MIROCRYSTAL20SV_964 ||
|
||||
s3->card_type == S3_MIROCRYSTAL20SD_864 || s3->card_type == S3_PHOENIX_VISION968 ||
|
||||
s3->card_type == S3_SPEA_MERCURY_P64V) {
|
||||
@@ -3110,11 +3150,11 @@ static void s3_trio64v_recalctimings(svga_t *svga)
|
||||
break;
|
||||
case 15:
|
||||
svga->render = svga_render_15bpp_highres;
|
||||
svga->hdisp /= 2;
|
||||
svga->hdisp >>= 1;
|
||||
break;
|
||||
case 16:
|
||||
svga->render = svga_render_16bpp_highres;
|
||||
svga->hdisp /= 2;
|
||||
svga->hdisp >>= 1;
|
||||
break;
|
||||
case 24:
|
||||
svga->render = svga_render_24bpp_highres;
|
||||
@@ -6530,6 +6570,7 @@ static void s3_reset(void *priv)
|
||||
case S3_ELSAWIN2KPROX:
|
||||
case S3_SPEA_MERCURY_P64V:
|
||||
case S3_MIROVIDEO40SV_ERGO_968:
|
||||
case S3_NUMBER9_9FX_771:
|
||||
case S3_PHOENIX_VISION968:
|
||||
if (s3->pci) {
|
||||
svga->crtc[0x53] = 0x18;
|
||||
@@ -6544,6 +6585,7 @@ static void s3_reset(void *priv)
|
||||
}
|
||||
break;
|
||||
|
||||
case S3_NUMBER9_9FX_531:
|
||||
case S3_PHOENIX_VISION868:
|
||||
if (s3->pci) {
|
||||
svga->crtc[0x53] = 0x18;
|
||||
@@ -6679,6 +6721,11 @@ static void *s3_init(const device_t *info)
|
||||
else
|
||||
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_s3_vision864_vlb);
|
||||
break;
|
||||
case S3_NUMBER9_9FX_531:
|
||||
bios_fn = ROM_NUMBER9_9FX_531;
|
||||
chip = S3_VISION868;
|
||||
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_s3_vision868_pci);
|
||||
break;
|
||||
case S3_PHOENIX_VISION868:
|
||||
bios_fn = ROM_PHOENIX_VISION868;
|
||||
chip = S3_VISION868;
|
||||
@@ -6710,6 +6757,11 @@ static void *s3_init(const device_t *info)
|
||||
chip = S3_VISION968;
|
||||
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_s3_vision968_pci);
|
||||
break;
|
||||
case S3_NUMBER9_9FX_771:
|
||||
bios_fn = ROM_NUMBER9_9FX_771;
|
||||
chip = S3_VISION968;
|
||||
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_s3_vision968_pci);
|
||||
break;
|
||||
case S3_PHOENIX_VISION968:
|
||||
bios_fn = ROM_PHOENIX_VISION968;
|
||||
chip = S3_VISION968;
|
||||
@@ -6887,7 +6939,7 @@ static void *s3_init(const device_t *info)
|
||||
if (chip == S3_VISION964 && info->local != S3_ELSAWIN2KPROX_964)
|
||||
svga->dac_hwcursor_draw = bt48x_hwcursor_draw;
|
||||
else if ((chip == S3_VISION964 && info->local == S3_ELSAWIN2KPROX_964) || (chip == S3_VISION968 && (info->local == S3_ELSAWIN2KPROX ||
|
||||
info->local == S3_PHOENIX_VISION968)))
|
||||
info->local == S3_PHOENIX_VISION968 || info->local == S3_NUMBER9_9FX_771)))
|
||||
svga->dac_hwcursor_draw = ibm_rgb528_hwcursor_draw;
|
||||
else if (chip == S3_VISION968 && (info->local == S3_SPEA_MERCURY_P64V || info->local == S3_MIROVIDEO40SV_ERGO_968))
|
||||
svga->dac_hwcursor_draw = tvp3026_hwcursor_draw;
|
||||
@@ -7048,7 +7100,7 @@ static void *s3_init(const device_t *info)
|
||||
|
||||
case S3_PARADISE_BAHAMAS64:
|
||||
case S3_PHOENIX_VISION864:
|
||||
case S3_MIROCRYSTAL20SD_864:
|
||||
case S3_MIROCRYSTAL20SD_864: /*BIOS 3.xx has a SDAC ramdac.*/
|
||||
svga->decode_mask = (8 << 20) - 1;
|
||||
if (info->local == S3_PARADISE_BAHAMAS64 || info->local == S3_MIROCRYSTAL20SD_864)
|
||||
stepping = 0xc0; /*Vision864*/
|
||||
@@ -7085,6 +7137,7 @@ static void *s3_init(const device_t *info)
|
||||
case S3_ELSAWIN2KPROX:
|
||||
case S3_SPEA_MERCURY_P64V:
|
||||
case S3_MIROVIDEO40SV_ERGO_968:
|
||||
case S3_NUMBER9_9FX_771:
|
||||
case S3_PHOENIX_VISION968:
|
||||
svga->decode_mask = (8 << 20) - 1;
|
||||
s3->id = 0xe1; /*Vision968*/
|
||||
@@ -7102,7 +7155,8 @@ static void *s3_init(const device_t *info)
|
||||
svga->crtc[0x5a] = 0x0a;
|
||||
}
|
||||
|
||||
if (info->local == S3_ELSAWIN2KPROX || info->local == S3_PHOENIX_VISION968)
|
||||
if (info->local == S3_ELSAWIN2KPROX || info->local == S3_PHOENIX_VISION968 ||
|
||||
info->local == S3_NUMBER9_9FX_771)
|
||||
svga->ramdac = device_add(&ibm_rgb528_ramdac_device);
|
||||
else
|
||||
svga->ramdac = device_add(&tvp3026_ramdac_device);
|
||||
@@ -7111,6 +7165,7 @@ static void *s3_init(const device_t *info)
|
||||
svga->getclock = icd2061_getclock;
|
||||
break;
|
||||
|
||||
case S3_NUMBER9_9FX_531:
|
||||
case S3_PHOENIX_VISION868:
|
||||
svga->decode_mask = (8 << 20) - 1;
|
||||
s3->id = 0xe1; /*Vision868*/
|
||||
@@ -7129,9 +7184,15 @@ static void *s3_init(const device_t *info)
|
||||
svga->crtc[0x5a] = 0x0a;
|
||||
}
|
||||
|
||||
if (info->local == S3_NUMBER9_9FX_531) {
|
||||
svga->ramdac = device_add(&att498_ramdac_device);
|
||||
svga->clock_gen = device_add(&icd2061_device);
|
||||
svga->getclock = icd2061_getclock;
|
||||
} else {
|
||||
svga->ramdac = device_add(&sdac_ramdac_device);
|
||||
svga->clock_gen = svga->ramdac;
|
||||
svga->getclock = sdac_getclock;
|
||||
}
|
||||
break;
|
||||
|
||||
case S3_PHOENIX_TRIO32:
|
||||
@@ -7261,6 +7322,11 @@ static int s3_phoenix_vision864_available(void)
|
||||
return rom_present(ROM_PHOENIX_VISION864);
|
||||
}
|
||||
|
||||
static int s3_9fx_531_available(void)
|
||||
{
|
||||
return rom_present(ROM_NUMBER9_9FX_531);
|
||||
}
|
||||
|
||||
static int s3_phoenix_vision868_available(void)
|
||||
{
|
||||
return rom_present(ROM_PHOENIX_VISION868);
|
||||
@@ -7286,6 +7352,11 @@ static int s3_mirovideo_40sv_ergo_968_pci_available(void)
|
||||
return rom_present(ROM_MIROVIDEO40SV_ERGO_968_PCI);
|
||||
}
|
||||
|
||||
static int s3_9fx_771_available(void)
|
||||
{
|
||||
return rom_present(ROM_NUMBER9_9FX_771);
|
||||
}
|
||||
|
||||
static int s3_phoenix_vision968_available(void)
|
||||
{
|
||||
return rom_present(ROM_PHOENIX_VISION968);
|
||||
@@ -7448,7 +7519,7 @@ static const device_config_t s3_phoenix_trio32_config[] =
|
||||
static const device_config_t s3_standard_config[] =
|
||||
{
|
||||
{
|
||||
"memory", "Video memory size", CONFIG_SELECTION, "", 4, "", { 0 },
|
||||
"memory", "Memory size", CONFIG_SELECTION, "", 4, "", { 0 },
|
||||
{
|
||||
{
|
||||
"1 MB", 1
|
||||
@@ -7750,6 +7821,20 @@ const device_t s3_diamond_stealth64_964_pci_device =
|
||||
s3_standard_config
|
||||
};
|
||||
|
||||
const device_t s3_9fx_771_pci_device =
|
||||
{
|
||||
"S3 Vision968 PCI (Number 9 9FX 771)",
|
||||
DEVICE_PCI,
|
||||
S3_NUMBER9_9FX_771,
|
||||
s3_init,
|
||||
s3_close,
|
||||
s3_reset,
|
||||
{ s3_9fx_771_available },
|
||||
s3_speed_changed,
|
||||
s3_force_redraw,
|
||||
s3_standard_config
|
||||
};
|
||||
|
||||
const device_t s3_phoenix_vision968_pci_device =
|
||||
{
|
||||
"S3 Vision968 PCI (Phoenix)",
|
||||
@@ -7989,6 +8074,20 @@ const device_t s3_phoenix_vision864_pci_device =
|
||||
s3_standard_config
|
||||
};
|
||||
|
||||
const device_t s3_9fx_531_pci_device =
|
||||
{
|
||||
"S3 Vision868 PCI (Number 9 9FX 531)",
|
||||
DEVICE_PCI,
|
||||
S3_NUMBER9_9FX_531,
|
||||
s3_init,
|
||||
s3_close,
|
||||
s3_reset,
|
||||
{ s3_9fx_531_available },
|
||||
s3_speed_changed,
|
||||
s3_force_redraw,
|
||||
s3_9fx_config
|
||||
};
|
||||
|
||||
const device_t s3_phoenix_vision868_vlb_device =
|
||||
{
|
||||
"S3 Vision868 VLB (Phoenix)",
|
||||
|
||||
@@ -72,9 +72,12 @@ video_cards[] = {
|
||||
{ "cl_gd5402_isa", &gd5402_isa_device },
|
||||
{ "cl_gd5420_isa", &gd5420_isa_device },
|
||||
{ "cl_gd5422_isa", &gd5422_isa_device },
|
||||
{ "cl_gd5426_isa", &gd5426_isa_device },
|
||||
{ "cl_gd5426_diamond_a1_isa", &gd5426_diamond_speedstar_pro_a1_isa_device },
|
||||
{ "cl_gd5428_isa", &gd5428_isa_device },
|
||||
{ "cl_gd5429_isa", &gd5429_isa_device },
|
||||
{ "cl_gd5434_isa", &gd5434_isa_device },
|
||||
{ "cl_gd5434_diamond_a3_isa", &gd5434_diamond_speedstar_64_a3_isa_device },
|
||||
{ "compaq_cga", &compaq_cga_device },
|
||||
{ "compaq_cga_2", &compaq_cga_2_device },
|
||||
{ "compaq_ega", &cpqega_device },
|
||||
@@ -123,14 +126,15 @@ video_cards[] = {
|
||||
{ "radius_mc", &radius_svga_multiview_mca_device },
|
||||
{ "mach64gx_pci", &mach64gx_pci_device },
|
||||
{ "mach64vt2", &mach64vt2_device },
|
||||
{ "et4000w32p_revc_pci", &et4000w32p_revc_pci_device },
|
||||
{ "et4000w32p_pci", &et4000w32p_cardex_pci_device },
|
||||
{ "et4000w32p_nc_pci", &et4000w32p_noncardex_pci_device },
|
||||
{ "et4000w32p_revc_pci", &et4000w32p_revc_pci_device },
|
||||
{ "cl_gd5430_pci", &gd5430_pci_device, },
|
||||
{ "cl_gd5434_pci", &gd5434_pci_device },
|
||||
{ "cl_gd5436_pci", &gd5436_pci_device },
|
||||
{ "cl_gd5440_pci", &gd5440_pci_device },
|
||||
{ "cl_gd5446_pci", &gd5446_pci_device },
|
||||
{ "cl_gd5446_stb_pci", &gd5446_stb_pci_device },
|
||||
{ "cl_gd5480_pci", &gd5480_pci_device },
|
||||
{ "ctl3d_banshee_pci", &creative_voodoo_banshee_device },
|
||||
{ "stealth32_pci", &et4000w32p_pci_device },
|
||||
@@ -146,8 +150,10 @@ video_cards[] = {
|
||||
{ "px_trio64_pci", &s3_phoenix_trio64_pci_device },
|
||||
{ "elsawin2kprox_pci", &s3_elsa_winner2000_pro_x_pci_device },
|
||||
{ "mirovideo40sv_pci", &s3_mirovideo_40sv_ergo_968_pci_device },
|
||||
{ "n9_9fx_771_pci", &s3_9fx_771_pci_device },
|
||||
{ "px_vision968_pci", &s3_phoenix_vision968_pci_device },
|
||||
{ "spea_mercury64p_pci", &s3_spea_mercury_p64v_pci_device },
|
||||
{ "n9_9fx_531_pci", &s3_9fx_531_pci_device },
|
||||
{ "px_vision868_pci", &s3_phoenix_vision868_pci_device },
|
||||
{ "px_trio64vplus_pci", &s3_phoenix_trio64vplus_pci_device },
|
||||
{ "trio64v2dx_pci", &s3_trio64v2_dx_pci_device },
|
||||
@@ -164,7 +170,6 @@ video_cards[] = {
|
||||
{ "mystique", &mystique_device },
|
||||
{ "mystique_220", &mystique_220_device },
|
||||
#endif
|
||||
{ "cl_gd5446_stb_pci", &gd5446_stb_pci_device },
|
||||
{ "tgui9440_pci", &tgui9440_pci_device },
|
||||
{ "tgui9660_pci", &tgui9660_pci_device },
|
||||
{ "tgui9680_pci", &tgui9680_pci_device },
|
||||
@@ -173,16 +178,17 @@ video_cards[] = {
|
||||
{ "voodoo3_3k_pci", &voodoo_3_3000_device },
|
||||
{ "mach64gx_vlb", &mach64gx_vlb_device },
|
||||
{ "et4000w32i_vlb", &et4000w32i_vlb_device },
|
||||
{ "et4000w32p_vlb", &et4000w32p_cardex_vlb_device },
|
||||
{ "et4000w32p_nc_vlb", &et4000w32p_noncardex_vlb_device },
|
||||
{ "et4000w32p_revc_vlb", &et4000w32p_revc_vlb_device },
|
||||
{ "cl_gd5424_vlb", &gd5424_vlb_device },
|
||||
{ "cl_gd5428_vlb", &gd5428_vlb_device },
|
||||
{ "cl_gd5429_vlb", &gd5429_vlb_device },
|
||||
{ "cl_gd5434_vlb", &gd5434_vlb_device },
|
||||
{ "et4000w32p_vlb", &et4000w32p_cardex_vlb_device },
|
||||
{ "stealth32_vlb", &et4000w32p_vlb_device },
|
||||
{ "et4000w32p_nc_vlb", &et4000w32p_noncardex_vlb_device },
|
||||
{ "cl_gd5424_vlb", &gd5424_vlb_device },
|
||||
{ "cl_gd5426_vlb", &gd5426_vlb_device },
|
||||
{ "cl_gd5430_vlb", &gd5430_vlb_device },
|
||||
{ "cl_gd5428_vlb", &gd5428_vlb_device },
|
||||
{ "cl_gd5428_diamond_b1_vlb", &gd5428_diamond_speedstar_pro_b1_vlb_device },
|
||||
{ "cl_gd5429_vlb", &gd5429_vlb_device },
|
||||
{ "cl_gd5430_vlb", &gd5430_diamond_speedstar_pro_se_a8_vlb_device },
|
||||
{ "cl_gd5434_vlb", &gd5434_vlb_device },
|
||||
{ "metheus928_vlb", &s3_metheus_86c928_vlb_device },
|
||||
{ "mirocrystal8s_vlb", &s3_mirocrystal_8s_805_vlb_device },
|
||||
{ "mirocrystal10sd_vlb", &s3_mirocrystal_10sd_805_vlb_device },
|
||||
|
||||
@@ -730,6 +730,7 @@ VIDOBJ := agpgart.o video.o \
|
||||
vid_tvga.o \
|
||||
vid_tgui9440.o vid_tkd8001_ramdac.o \
|
||||
vid_att20c49x_ramdac.o \
|
||||
vid_att2xc498_ramdac.o \
|
||||
vid_s3.o vid_s3_virge.o \
|
||||
vid_ibm_rgb528_ramdac.o vid_sdac_ramdac.o \
|
||||
vid_ogc.o \
|
||||
|
||||
@@ -135,10 +135,10 @@ BEGIN
|
||||
MENUITEM "Activer journaux de IDE\tCtrl+F8", IDM_LOG_IDE
|
||||
# endif
|
||||
# ifdef ENABLE_SERIAL_LOG
|
||||
MENUITEM "Activer journaux de porte sériel\tCtrl+F3", IDM_LOG_SERIAL
|
||||
MENUITEM "Activer journaux de port série\tCtrl+F3", IDM_LOG_SERIAL
|
||||
# endif
|
||||
# ifdef ENABLE_NIC_LOG
|
||||
MENUITEM "Activer journaux de réseau\tCtrl+F9", IDM_LOG_NIC
|
||||
MENUITEM "Activer journaux du réseau\tCtrl+F9", IDM_LOG_NIC
|
||||
# endif
|
||||
# ifdef ENABLE_LOG_COMMANDS
|
||||
# ifdef ENABLE_LOG_TOGGLES
|
||||
@@ -172,7 +172,7 @@ BEGIN
|
||||
MENUITEM "&Nouvelle image...", IDM_CASSETTE_IMAGE_NEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Image &Existante...", IDM_CASSETTE_IMAGE_EXISTING
|
||||
MENUITEM "Existing image (&Write-protected)...", IDM_CASSETTE_IMAGE_EXISTING_WP
|
||||
MENUITEM "Image Exsistane(&Lecture seule)...", IDM_CASSETTE_IMAGE_EXISTING_WP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "En®istrer", IDM_CASSETTE_RECORD
|
||||
MENUITEM "&Jouer", IDM_CASSETTE_PLAY
|
||||
@@ -200,7 +200,7 @@ BEGIN
|
||||
MENUITEM "&Nouvelle image...", IDM_FLOPPY_IMAGE_NEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Image &Existante...", IDM_FLOPPY_IMAGE_EXISTING
|
||||
MENUITEM "Existing image (&Write-protected)...", IDM_FLOPPY_IMAGE_EXISTING_WP
|
||||
MENUITEM "Image Existante(&Lecture seule)...", IDM_FLOPPY_IMAGE_EXISTING_WP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "E&xport vers 86F...", IDM_FLOPPY_EXPORT_TO_86F
|
||||
MENUITEM SEPARATOR
|
||||
@@ -212,7 +212,7 @@ CdromSubmenu MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP ""
|
||||
BEGIN
|
||||
MENUITEM "&Mute", IDM_CDROM_MUTE
|
||||
MENUITEM "&Couper", IDM_CDROM_MUTE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "E&jecter", IDM_CDROM_EMPTY
|
||||
MENUITEM "&Recharger image précedente", IDM_CDROM_RELOAD
|
||||
@@ -228,7 +228,7 @@ BEGIN
|
||||
MENUITEM "&Nouvelle image...", IDM_ZIP_IMAGE_NEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Image &Existante...", IDM_ZIP_IMAGE_EXISTING
|
||||
MENUITEM "Existing image (&Write-protected)...", IDM_ZIP_IMAGE_EXISTING_WP
|
||||
MENUITEM "Image Existante (&Lecture Seule)...", IDM_ZIP_IMAGE_EXISTING_WP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "E&jecter", IDM_ZIP_EJECT
|
||||
MENUITEM "&Recharger image précédente", IDM_ZIP_RELOAD
|
||||
@@ -242,7 +242,7 @@ BEGIN
|
||||
MENUITEM "&Nouvelle image...", IDM_MO_IMAGE_NEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Image &Existante...", IDM_MO_IMAGE_EXISTING
|
||||
MENUITEM "Image Existante (&Write-protected)...", IDM_MO_IMAGE_EXISTING_WP
|
||||
MENUITEM "Image Existante (&Lecture Seule)...", IDM_MO_IMAGE_EXISTING_WP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "E&jecter", IDM_MO_EJECT
|
||||
MENUITEM "&Recharger image précédente", IDM_MO_RELOAD
|
||||
@@ -281,7 +281,7 @@ END
|
||||
|
||||
#define STR_OK "OK"
|
||||
#define STR_CANCEL "Annuler"
|
||||
#define STR_GLOBAL "Salve ces paramètres comme valeurs par défaut &globales"
|
||||
#define STR_GLOBAL "Sauver ces paramètres comme valeurs par défaut &globales"
|
||||
#define STR_DEFAULT "&Défaut"
|
||||
#define STR_LANGUAGE "Langue:"
|
||||
#define STR_ICONSET "Ensemble d'icônes:"
|
||||
@@ -297,10 +297,10 @@ END
|
||||
#define STR_HEIGHT "Hauteur:"
|
||||
#define STR_LOCK_TO_SIZE "Verrouiller à cette taille"
|
||||
|
||||
#define STR_MACHINE_TYPE "Type de la machine:"
|
||||
#define STR_MACHINE_TYPE "Type de machine:"
|
||||
#define STR_MACHINE "Machine:"
|
||||
#define STR_CONFIGURE "Configurer"
|
||||
#define STR_CPU_TYPE "Typ du processeur:"
|
||||
#define STR_CPU_TYPE "Type du processeur:"
|
||||
#define STR_SPEED "Vitesse:"
|
||||
#define STR_FPU "FPU:"
|
||||
#define STR_WAIT_STATES "États d'attente:"
|
||||
@@ -338,10 +338,10 @@ END
|
||||
#define STR_LPT1 "Dispositif LPT1:"
|
||||
#define STR_LPT2 "Dispositif LPT2:"
|
||||
#define STR_LPT3 "Dispositif LPT3:"
|
||||
#define STR_SERIAL1 "Port sériel 1"
|
||||
#define STR_SERIAL2 "Port sériel 2"
|
||||
#define STR_SERIAL3 "Port sériel 3"
|
||||
#define STR_SERIAL4 "Port sériel 4"
|
||||
#define STR_SERIAL1 "Port série 1"
|
||||
#define STR_SERIAL2 "Port série 2"
|
||||
#define STR_SERIAL3 "Port série 3"
|
||||
#define STR_SERIAL4 "Port série 4"
|
||||
#define STR_PARALLEL1 "Port parallèle 1"
|
||||
#define STR_PARALLEL2 "Port parallèle 2"
|
||||
#define STR_PARALLEL3 "Port parallèle 3"
|
||||
@@ -375,12 +375,12 @@ END
|
||||
#define STR_BLOCK_SIZE "Taille du bloc:"
|
||||
|
||||
#define STR_FLOPPY_DRIVES "Lecteurs de disquettes:"
|
||||
#define STR_TURBO "Temps de turbo"
|
||||
#define STR_TURBO "Turbo"
|
||||
#define STR_CHECKBPB "Vérifier BPB"
|
||||
#define STR_CDROM_DRIVES "Lecterus CD-ROM:"
|
||||
|
||||
#define STR_MO_DRIVES "Lecteurs magnéto-optiques:"
|
||||
#define STR_ZIP_DRIVES "Lecterus ZIP:"
|
||||
#define STR_ZIP_DRIVES "Lecteurs ZIP:"
|
||||
#define STR_250 "ZIP 250"
|
||||
|
||||
#define STR_ISARTC "Horloge temps réel ISA:"
|
||||
@@ -406,7 +406,7 @@ STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
2048 "86Box"
|
||||
IDS_2049 "Erreur"
|
||||
IDS_2050 "Erreur fatal"
|
||||
IDS_2050 "Erreur fatale"
|
||||
IDS_2051 "<reservée>"
|
||||
IDS_2052 "Appuyez sur CTRL+ALT+PAGE ↓ pour revenir au mode fenêtré."
|
||||
IDS_2053 "Vitesse"
|
||||
@@ -419,12 +419,12 @@ BEGIN
|
||||
IDS_2060 "Activé"
|
||||
IDS_2061 "Désactivé"
|
||||
IDS_2062 "Tous les images (*.86F;*.DSK;*.FLP;*.IM?;*.*FD?)\0*.86F;*.DSK;*.FLP;*.IM?;*.*FD?\0Images basiques du secteur (*.DSK;*.FLP;*.IM?;*.*FD?)\0*.DSK;*.FLP;*.IM?;*.IMG;*.*FD?\0Images de la surface (*.86F)\0*.86F\0"
|
||||
IDS_2063 "La machine ""%hs"" n'est pas disponible en raison de l'absence de ROMs en le répertoire roms/machines. Basculer vers une machine disponible."
|
||||
IDS_2063 "La machine ""%hs"" n'est pas disponible en raison de l'absence de ROMs dans le répertoire roms/machines. Basculer vers une machine disponible."
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_2064 "La carte vidéo ""%hs"" n'est pas disponible en raison de l'absence de ROMs en le répertoire roms/video. Basculer vers une carte vidéo disponible."
|
||||
IDS_2064 "La carte vidéo ""%hs"" n'est pas disponible en raison de l'absence de ROMs dans le répertoire roms/video. Basculer vers une carte vidéo disponible."
|
||||
IDS_2065 "Machine"
|
||||
IDS_2066 "Affichage"
|
||||
IDS_2067 "Dispositifs d'entrée"
|
||||
@@ -460,10 +460,10 @@ BEGIN
|
||||
IDS_2093 "Impossible d'initialiser PCap"
|
||||
IDS_2094 "Aucun dispositif PCap trouvé"
|
||||
IDS_2095 "Dispositif PCap non valide"
|
||||
IDS_2096 "Manette(s) de command standard avec 2 boutons"
|
||||
IDS_2097 "Manette de command standard avec 4 boutons"
|
||||
IDS_2098 "Manette de command standard avec 6 boutons"
|
||||
IDS_2099 "Manette de command standard avec 6 boutons"
|
||||
IDS_2096 "Manette(s) standard avec 2 boutons"
|
||||
IDS_2097 "Manette standard avec 4 boutons"
|
||||
IDS_2098 "Manette standard avec 6 boutons"
|
||||
IDS_2099 "Manette standard avec 6 boutons"
|
||||
IDS_2100 "CH Flightstick Pro"
|
||||
IDS_2101 "Microsoft SideWinder Pad"
|
||||
IDS_2102 "Système de contrôle de vol Thrustmaster"
|
||||
@@ -477,16 +477,16 @@ BEGIN
|
||||
IDS_2110 "Impossible d'initialiser FreeType"
|
||||
IDS_2111 "Impossible d'initialiser SDL, SDL2.dll est nécessaire"
|
||||
IDS_2112 "Etes-vous sûr de vouloir réinitialiser la machine émulée ?"
|
||||
IDS_2113 "Etes-vous sûr de vouloir sortir du86Box?"
|
||||
IDS_2113 "Etes-vous sûr de vouloir quitter 86Box?"
|
||||
IDS_2114 "Impossible d'initialiser Ghostscript"
|
||||
IDS_2115 "Magnéto-optique %i (%ls): %ls"
|
||||
IDS_2116 "Images magnéto-optiques (*.IM?;*.MDI)\0*.IM?;*.MDI\0Tous les fichiers (*.*)\0*.*\0"
|
||||
IDS_2117 "Bienvenues dans 86Box !"
|
||||
IDS_2117 "Bienvenue dans 86Box !"
|
||||
IDS_2118 "Côntrolleur interne"
|
||||
IDS_2119 "Sortir"
|
||||
IDS_2120 "Pas de ROMs trouvées"
|
||||
IDS_2121 "Voulez-vous sauver les paramètres ?"
|
||||
IDS_2122 "Ce entraînera la réinitialisation complète de la machine émulée."
|
||||
IDS_2122 "Cela entraînera la réinitialisation complète de la machine émulée."
|
||||
IDS_2123 "Sauver"
|
||||
IDS_2124 "À propos de 86Box"
|
||||
IDS_2125 "86Box v" EMU_VERSION
|
||||
@@ -499,7 +499,7 @@ BEGIN
|
||||
#else
|
||||
#define LIB_NAME_PCAP "libpcap"
|
||||
#endif
|
||||
IDS_2129 "Assurez-vous que " LIB_NAME_PCAP " est installé e que vou utilizes une connexion de réseau compatible avec " LIB_NAME_PCAP "."
|
||||
IDS_2129 "Assurez-vous que " LIB_NAME_PCAP " est installé et que vou utilisez une connexion réseau compatible avec " LIB_NAME_PCAP "."
|
||||
IDS_2130 "Configuration non valide"
|
||||
#ifdef _WIN32
|
||||
#define LIB_NAME_FREETYPE "freetype.dll"
|
||||
@@ -549,22 +549,22 @@ BEGIN
|
||||
IDS_4101 "Personnalisé (grand)..."
|
||||
IDS_4102 "Ajouter un nouveau disque dur"
|
||||
IDS_4103 "Ajouter un disque dur existant"
|
||||
IDS_4104 "Les images de disque HDI ne peuvent pas être plus grandes de 4 Go."
|
||||
IDS_4105 "Les images de disque ne peuvent pas être plus grandes de 127 Go."
|
||||
IDS_4104 "Les images de disque HDI ne peuvent pas avoir une taille supériure à Go."
|
||||
IDS_4105 "Les images de disque ne peuvent pas avoir un taille supérieure à 127 Go."
|
||||
IDS_4106 "Images de dique dur (*.HD?;*.IM?;*.VHD)\0*.HD?;*.IM?;*.VHD\0Tous les fichiers (*.*)\0*.*\0"
|
||||
IDS_4107 "Impossible de lire le fichier"
|
||||
IDS_4108 "Impossible d'écrire le fichier"
|
||||
IDS_4109 "Les images HDI ou HDX avec une taille de secteur que non est 512 non sont pas prises en charge."
|
||||
IDS_4110 "USB n'est pas encore pris en charge"
|
||||
IDS_4111 "Le fichier de la image du sique déjà existe"
|
||||
IDS_4109 "Les images HDI ou HDX avec une taille de secteur différente de 512 non sont pas prises en charge."
|
||||
IDS_4110 "USB n'est pas encore pris en charge."
|
||||
IDS_4111 "Le fichier de l'image disque existe déjà."
|
||||
IDS_4112 "Veuillez spécifier un nom de fichier valide."
|
||||
IDS_4113 "Image de disque créée"
|
||||
IDS_4114 "Assurez-vous que le fichier existe et est lisible."
|
||||
IDS_4115 "Assurez-vous que est en train d'être sauvé dans une répertoire accessible en écriture."
|
||||
IDS_4116 "Image de disque trop grande"
|
||||
IDS_4115 "Assurez-vous que le fichier en cours d'enregistrement se trouve dans un répertoire accessible en écriture."
|
||||
IDS_4116 "Image disque trop grande"
|
||||
IDS_4117 "N'oubliez pas de partitionner et de formater le nouveau disque créé."
|
||||
IDS_4118 "Le fichier sélectionné sera écrasé. Etes-vous sûr de vouloir l'utiliser?"
|
||||
IDS_4119 "Image de sique non prise en charge"
|
||||
IDS_4119 "Image disque non prise en charge"
|
||||
IDS_4120 "Écraser"
|
||||
IDS_4121 "Ne pas écraser"
|
||||
IDS_4122 "Image brute (.img)"
|
||||
@@ -577,7 +577,7 @@ BEGIN
|
||||
IDS_4129 "Blocs petits (512 KB)"
|
||||
IDS_4130 "Fichiers VHD (*.VHD)\0*.VHD\0Tous les fichiers (*.*)\0*.*\0"
|
||||
IDS_4131 "Sélectionnez le VHD parent"
|
||||
IDS_4132 "Est possible que la image parente a été modifié après la création de la image à différenciation.\n\nEst même possible que les fichiers de la image ont été déplacés ou copiés ou il était une bogue dans le programme que a créé ce disque.\n\nVoulez-vous Do you want to réparer l'horodatage?"
|
||||
IDS_4132 "Il est possible que l'image parente a été modifié après la création de l'image à différenciation.\n\nIl est même possible que les fichiers de l'mage ont été déplacés ou copiés ou il existe un bogue dans le programme que a créé ce disque.\n\nVoulez-vous réparer l'horodatage?"
|
||||
IDS_4133 "Les horodatages des disques parent et enfant ne correspondent pas"
|
||||
IDS_4134 "Impossible de réparer l'horodatage du VHD."
|
||||
IDS_4135 "%01i:%02i"
|
||||
|
||||
@@ -55,7 +55,7 @@ dynld_module(const char *name, dllimp_t *table)
|
||||
|
||||
/* See if we can load the desired module. */
|
||||
if ((h = LoadLibrary(name)) == NULL) {
|
||||
dynld_log("DynLd(\"%s\"): library not found!\n", name);
|
||||
dynld_log("DynLd(\"%s\"): library not found! (%08X)\n", name, GetLastError());
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@ dynld_module(const char *name, dllimp_t *table)
|
||||
for (imp=table; imp->name!=NULL; imp++) {
|
||||
func = GetProcAddress(h, imp->name);
|
||||
if (func == NULL) {
|
||||
dynld_log("DynLd(\"%s\"): function '%s' not found!\n",
|
||||
name, imp->name);
|
||||
dynld_log("DynLd(\"%s\"): function '%s' not found! (%08X)\n",
|
||||
name, imp->name, GetLastError());
|
||||
FreeLibrary(h);
|
||||
return(NULL);
|
||||
}
|
||||
@@ -74,6 +74,7 @@ dynld_module(const char *name, dllimp_t *table)
|
||||
}
|
||||
|
||||
/* All good. */
|
||||
pclog("loaded %s\n", name);
|
||||
return((void *)h);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user