Merge branch 'master' of https://github.com/TASEmulators/fceux into TASEmulators-master
This commit is contained in:
commit
0f4411b3d2
50
appveyor.yml
50
appveyor.yml
|
@ -27,37 +27,63 @@ for:
|
|||
- job_name: Windows 32
|
||||
|
||||
build_script:
|
||||
- cmd: pipelines/win32_build.bat
|
||||
- cmd: perl pipelines/build.pl win32
|
||||
|
||||
# -
|
||||
# matrix:
|
||||
# only:
|
||||
# - job_name: Windows 64
|
||||
#
|
||||
#
|
||||
# build_script:
|
||||
# - cmd: pipelines/win64_build.bat
|
||||
#
|
||||
# - cmd: perl pipelines/build.pl win64
|
||||
#
|
||||
# -
|
||||
# matrix:
|
||||
# only:
|
||||
# - job_name: Win64 Qt
|
||||
#
|
||||
#
|
||||
# build_script:
|
||||
# - cmd: pipelines/qwin64_build.bat
|
||||
#
|
||||
# - cmd: perl pipelines/build.pl win64-QtSDL
|
||||
#
|
||||
# -
|
||||
# matrix:
|
||||
# only:
|
||||
# - job_name: Ubuntu
|
||||
#
|
||||
#
|
||||
# build_script:
|
||||
# - sh: ./pipelines/linux_build.sh
|
||||
#
|
||||
# - sh: perl pipelines/build.pl linux
|
||||
#
|
||||
# -
|
||||
# matrix:
|
||||
# only:
|
||||
# - job_name: MacOS
|
||||
#
|
||||
#
|
||||
# build_script:
|
||||
# - sh: ./pipelines/macOS_build.sh
|
||||
# - sh: perl pipelines/build.pl macOS
|
||||
|
||||
deploy:
|
||||
|
||||
- provider: GitHub
|
||||
tag: interim-build
|
||||
release: interim-build
|
||||
description: 'Interim Builds - Latest auto builds off master branch - commit: $(APPVEYOR_REPO_COMMIT)\nDate: $(APPVEYOR_REPO_COMMIT_TIMESTAMP)'
|
||||
auth_token:
|
||||
secure: pYXqhuxNn7vivsJ6cnWCHlORrTtaWO7fyGOvGFUNKtM2apSY44gjbAhGIlD+OdtF
|
||||
artifact: $(WIN32_ARTIFACT), $(WIN64_ARTIFACT), $(WIN64_QTSDL_ARTIFACT), $(MACOS_ARTIFACT), $(LINUX_ARTIFACT)
|
||||
draft: false
|
||||
prerelease: true
|
||||
force_update: true
|
||||
on:
|
||||
branch: master # release from master branch only
|
||||
APPVEYOR_REPO_TAG: false # never deploy on tag push
|
||||
|
||||
- provider: GitHub
|
||||
description: 'Release Builds - commit: $(APPVEYOR_REPO_COMMIT)'
|
||||
auth_token:
|
||||
secure: pYXqhuxNn7vivsJ6cnWCHlORrTtaWO7fyGOvGFUNKtM2apSY44gjbAhGIlD+OdtF
|
||||
artifact: $(WIN32_ARTIFACT), $(WIN64_ARTIFACT), $(WIN64_QTSDL_ARTIFACT), $(MACOS_ARTIFACT)
|
||||
draft: false
|
||||
prerelease: false
|
||||
force_update: false
|
||||
on:
|
||||
APPVEYOR_REPO_TAG: true # deploy on tag push only
|
||||
|
|
|
@ -0,0 +1,170 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use File::Basename;
|
||||
#use File::Spec;
|
||||
|
||||
#
|
||||
# Global Variables
|
||||
#
|
||||
my $platform = "";
|
||||
my $fceuVersionMajor = 1;
|
||||
my $fceuVersionMinor = 0;
|
||||
my $fceuVersionPatch = 0;
|
||||
|
||||
foreach my $arg (@ARGV)
|
||||
{
|
||||
#print $arg, "\n";
|
||||
|
||||
if ($platform eq "")
|
||||
{
|
||||
$platform = $arg;
|
||||
}
|
||||
}
|
||||
|
||||
my $dirname = dirname(__FILE__);
|
||||
my $projRoot = "$dirname/..";
|
||||
my $ReleaseBuild=0;
|
||||
my $ReleaseVersion="";
|
||||
|
||||
#print "PATH: $ENV{PATH}\n";
|
||||
#print "Dir $dirname\n";
|
||||
#
|
||||
($fceuVersionMajor, $fceuVersionMinor, $fceuVersionPatch) = getVersion();
|
||||
|
||||
($ReleaseBuild, $ReleaseVersion) = isReleaseBuild();
|
||||
|
||||
if ($ReleaseBuild)
|
||||
{
|
||||
$ENV{FCEU_RELEASE_VERSION} = $ReleaseVersion;
|
||||
}
|
||||
|
||||
if ($platform eq "win32")
|
||||
{
|
||||
build_win32();
|
||||
}
|
||||
elsif ($platform eq "win64")
|
||||
{
|
||||
build_win64();
|
||||
}
|
||||
elsif ($platform eq "win64-QtSDL")
|
||||
{
|
||||
build_win64_QtSDL();
|
||||
}
|
||||
elsif ($platform eq "linux")
|
||||
{
|
||||
build_ubuntu_linux();
|
||||
}
|
||||
elsif ($platform eq "macOS")
|
||||
{
|
||||
build_macOS();
|
||||
}
|
||||
#--------------------------------------------------------------------------------------------
|
||||
# Build win32 version
|
||||
#--------------------------------------------------------------------------------------------
|
||||
sub build_win32
|
||||
{
|
||||
chdir("$projRoot");
|
||||
|
||||
my $ret = system("cmd.exe /c pipelines\\\\win32_build.bat");
|
||||
|
||||
if ($ret != 0){ die "Build Errors Detected\n";}
|
||||
}
|
||||
#--------------------------------------------------------------------------------------------
|
||||
# Build win64 version
|
||||
#--------------------------------------------------------------------------------------------
|
||||
sub build_win64
|
||||
{
|
||||
chdir("$projRoot");
|
||||
|
||||
my $ret = system("cmd.exe /c pipelines\\\\win64_build.bat");
|
||||
|
||||
if ($ret != 0){ die "Build Errors Detected\n";}
|
||||
}
|
||||
#--------------------------------------------------------------------------------------------
|
||||
# Build win64-Qt/SDL version
|
||||
#--------------------------------------------------------------------------------------------
|
||||
sub build_win64_QtSDL
|
||||
{
|
||||
chdir("$projRoot");
|
||||
|
||||
my $ret = system("cmd.exe /c pipelines\\\\qwin64_build.bat");
|
||||
|
||||
if ($ret != 0){ die "Build Errors Detected\n";}
|
||||
}
|
||||
#--------------------------------------------------------------------------------------------
|
||||
# Build Ubuntu Linux version
|
||||
#--------------------------------------------------------------------------------------------
|
||||
sub build_ubuntu_linux
|
||||
{
|
||||
chdir("$projRoot");
|
||||
|
||||
my $ret = system("./pipelines/linux_build.sh");
|
||||
|
||||
if ($ret != 0){ die "Build Errors Detected\n";}
|
||||
}
|
||||
#--------------------------------------------------------------------------------------------
|
||||
# Build MacOSX version
|
||||
#--------------------------------------------------------------------------------------------
|
||||
sub build_macOS
|
||||
{
|
||||
chdir("$projRoot");
|
||||
|
||||
my $ret = system("./pipelines/macOS_build.sh");
|
||||
|
||||
if ($ret != 0){ die "Build Errors Detected\n";}
|
||||
}
|
||||
#--------------------------------------------------------------------------------------------
|
||||
# Search src/version.h and retrieve version numbers
|
||||
#--------------------------------------------------------------------------------------------
|
||||
sub getVersion
|
||||
{
|
||||
my $versionHeader = "$projRoot/src/version.h";
|
||||
my $line;
|
||||
my $major = 1;
|
||||
my $minor = 0;
|
||||
my $patch = 0;
|
||||
open INFILE, "$versionHeader" or die "Error: Could not open file: $versionHeader\n";
|
||||
while ($line = <INFILE>)
|
||||
{
|
||||
#print $line;
|
||||
if ($line =~ m/\s*#define\s+FCEU_VERSION_MAJOR\s+(\d+)/)
|
||||
{
|
||||
$major = $1;
|
||||
}
|
||||
elsif ($line =~ m/\s*#define\s+FCEU_VERSION_MINOR\s+(\d+)/)
|
||||
{
|
||||
$minor = $1;
|
||||
}
|
||||
elsif ($line =~ m/\s*#define\s+FCEU_VERSION_PATCH\s+(\d+)/)
|
||||
{
|
||||
$patch = $1;
|
||||
}
|
||||
}
|
||||
close(INFILE);
|
||||
|
||||
return ( $major, $minor, $patch );
|
||||
}
|
||||
#--------------------------------------------------------------------------------------------
|
||||
# Returns whether this is a release build and returns the version if detected
|
||||
#--------------------------------------------------------------------------------------------
|
||||
sub isReleaseBuild
|
||||
{
|
||||
my $isRelease = 0;
|
||||
my $tagVersion = "";
|
||||
|
||||
if (defined($ENV{APPVEYOR_REPO_TAG_NAME}))
|
||||
{
|
||||
if ($ENV{APPVEYOR_REPO_TAG_NAME} =~ m/fceux-(\d+\.\d+\.\d+)/)
|
||||
{
|
||||
$tagVersion = $1;
|
||||
$isRelease = 1;
|
||||
}
|
||||
elsif ($ENV{APPVEYOR_REPO_TAG_NAME} =~ m/(\d+\.\d+\.\d+)/)
|
||||
{
|
||||
$tagVersion = $1;
|
||||
$isRelease = 1;
|
||||
}
|
||||
}
|
||||
return ($isRelease, $tagVersion);
|
||||
}
|
|
@ -1,8 +1,11 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use File::Basename;
|
||||
|
||||
my $VERSION="2.6.4";
|
||||
my $dirname = dirname(__FILE__);
|
||||
|
||||
my $VERSION=`perl $dirname/../scripts/fceuVersion.pl`;
|
||||
my $INSTALL_PREFIX="/tmp/fceux";
|
||||
my $CTL_FILENAME="$INSTALL_PREFIX/DEBIAN/control";
|
||||
my $ARCH="amd64";
|
||||
|
|
|
@ -4,6 +4,7 @@ id
|
|||
pwd
|
||||
uname -a
|
||||
cat /etc/os-release
|
||||
env
|
||||
|
||||
SCRIPT_DIR=$( cd $(dirname $BASH_SOURCE[0]); pwd );
|
||||
|
||||
|
@ -20,6 +21,10 @@ echo "APPVEYOR_SSH_KEY=$APPVEYOR_SSH_KEY";
|
|||
echo "APPVEYOR_SSH_BLOCK=$APPVEYOR_SSH_BLOCK";
|
||||
echo '****************************************'
|
||||
|
||||
if [ ! -z $FCEU_RELEASE_VERSION ]; then
|
||||
APPVEYOR_CMAKE_FLAGS=" -DPUBLIC_RELEASE=1 ";
|
||||
fi
|
||||
|
||||
echo '****************************************'
|
||||
echo '****************************************'
|
||||
echo '*** Installing Package Dependencies ***'
|
||||
|
@ -119,6 +124,7 @@ cmake \
|
|||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
$APPVEYOR_CMAKE_FLAGS \
|
||||
..
|
||||
make -j `nproc`
|
||||
make install DESTDIR=$INSTALL_PREFIX
|
||||
|
@ -191,5 +197,13 @@ echo 'Testing Install of Package'
|
|||
echo '**************************************************************'
|
||||
sudo dpkg -i /tmp/fceux-*.deb
|
||||
|
||||
echo 'Pushing Debian Package to Build Artifacts'
|
||||
appveyor PushArtifact /tmp/fceux-*.deb
|
||||
if [ ! -z $APPVEYOR ]; then
|
||||
echo 'Pushing Debian Package to Build Artifacts'
|
||||
if [ -z $FCEU_RELEASE_VERSION ]; then
|
||||
cp /tmp/fceux-*.deb /tmp/fceux-ubuntu-x64.deb
|
||||
appveyor PushArtifact /tmp/fceux-ubuntu-x64.deb
|
||||
appveyor SetVariable -Name LINUX_ARTIFACT -Value fceux-ubuntu-x64.deb
|
||||
else
|
||||
appveyor PushArtifact /tmp/fceux-*.deb
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -5,15 +5,19 @@ id
|
|||
pwd
|
||||
uname -a
|
||||
sw_vers
|
||||
env
|
||||
|
||||
SCRIPT_DIR=$( cd $(dirname $BASH_SOURCE[0]); pwd );
|
||||
|
||||
QT_MAJOR=5;
|
||||
QT_PKGNAME=qt$QT_MAJOR;
|
||||
FCEUX_VERSION_MAJOR=2
|
||||
FCEUX_VERSION_MINOR=6
|
||||
FCEUX_VERSION_PATCH=4
|
||||
FCEUX_VERSION_MAJOR=`perl $SCRIPT_DIR/../scripts/fceuVersion.pl -major`;
|
||||
FCEUX_VERSION_MINOR=`perl $SCRIPT_DIR/../scripts/fceuVersion.pl -minor`;
|
||||
FCEUX_VERSION_PATCH=`perl $SCRIPT_DIR/../scripts/fceuVersion.pl -patch`;
|
||||
FCEUX_VERSION="$FCEUX_VERSION_MAJOR.$FCEUX_VERSION_MINOR.$FCEUX_VERSION_PATCH";
|
||||
SDL2_VERSION=2.0.20
|
||||
|
||||
SCRIPT_DIR=$( cd $(dirname $BASH_SOURCE[0]); pwd );
|
||||
echo "Building Version: $FCEUX_VERSION";
|
||||
|
||||
NPROC=`getconf _NPROCESSORS_ONLN`;
|
||||
echo "Number of Processors: $NPROC";
|
||||
|
@ -34,6 +38,10 @@ echo "APPVEYOR_SSH_KEY=$APPVEYOR_SSH_KEY";
|
|||
echo "APPVEYOR_SSH_BLOCK=$APPVEYOR_SSH_BLOCK";
|
||||
echo '****************************************'
|
||||
|
||||
if [ ! -z $FCEU_RELEASE_VERSION ]; then
|
||||
APPVEYOR_CMAKE_FLAGS=" -DPUBLIC_RELEASE=1 ";
|
||||
fi
|
||||
|
||||
echo '****************************************'
|
||||
echo 'Install Dependency sdl2'
|
||||
echo '****************************************'
|
||||
|
@ -121,13 +129,23 @@ cmake \
|
|||
-DCPACK_PACKAGE_VERSION_MINOR=$FCEUX_VERSION_MINOR \
|
||||
-DCPACK_PACKAGE_VERSION_PATCH=$FCEUX_VERSION_PATCH \
|
||||
-DQT6=$USE_QT6 \
|
||||
$APPVEYOR_CMAKE_FLAGS \
|
||||
.. || exit 1
|
||||
make -j $NPROC || exit 1
|
||||
#sudo make install || exit 1 # make install is already run by cpack
|
||||
sudo cpack -G DragNDrop || exit 1
|
||||
|
||||
echo 'Pushing DMG Package to Build Artifacts'
|
||||
appveyor PushArtifact fceux-*.dmg
|
||||
if [ ! -z $APPVEYOR ]; then
|
||||
echo 'Pushing DMG Package to Build Artifacts'
|
||||
if [ -z $FCEU_RELEASE_VERSION ]; then
|
||||
cp fceux-*.dmg fceux-Darwin.dmg
|
||||
appveyor PushArtifact fceux-Darwin.dmg
|
||||
appveyor SetVariable -Name MACOS_ARTIFACT -Value fceux-Darwin.dmg
|
||||
else
|
||||
appveyor PushArtifact fceux-*.dmg
|
||||
appveyor SetVariable -Name MACOS_ARTIFACT -Value `ls fceux-*.dmg`
|
||||
fi
|
||||
fi
|
||||
|
||||
# Debug via ssh if necessary
|
||||
if [ ! -z $APPVEYOR_SSH_BLOCK ]; then
|
||||
|
|
|
@ -8,6 +8,7 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary
|
|||
|
||||
cd /d %CWD%
|
||||
|
||||
set
|
||||
where cmake
|
||||
where nmake
|
||||
where msbuild
|
||||
|
@ -21,53 +22,68 @@ mkdir build
|
|||
cd build
|
||||
mkdir bin
|
||||
|
||||
curl -s -LO http://www.libsdl.org/release/SDL2-devel-2.0.20-VC.zip
|
||||
curl -s -LO https://github.com/GyanD/codexffmpeg/releases/download/5.0/ffmpeg-5.0-full_build-shared.zip
|
||||
set SDL_VERSION=2.24.1
|
||||
set FFMPEG_VERSION=5.1.2
|
||||
|
||||
curl -s -LO https://github.com/libsdl-org/SDL/releases/download/release-%SDL_VERSION%/SDL2-devel-%SDL_VERSION%-VC.zip
|
||||
curl -s -LO https://github.com/GyanD/codexffmpeg/releases/download/%FFMPEG_VERSION%/ffmpeg-%FFMPEG_VERSION%-full_build-shared.zip
|
||||
|
||||
REM rmdir /q /s SDL2
|
||||
|
||||
powershell -command "Expand-Archive" SDL2-devel-2.0.20-VC.zip .
|
||||
powershell -command "Expand-Archive" ffmpeg-5.0-full_build-shared.zip
|
||||
powershell -command "Expand-Archive" SDL2-devel-%SDL_VERSION%-VC.zip .
|
||||
powershell -command "Expand-Archive" ffmpeg-%FFMPEG_VERSION%-full_build-shared.zip
|
||||
|
||||
rename SDL2-2.0.20 SDL2
|
||||
move ffmpeg-5.0-full_build-shared\ffmpeg-5.0-full_build-shared ffmpeg
|
||||
rmdir ffmpeg-5.0-full_build-shared
|
||||
del ffmpeg-5.0-full_build-shared.zip
|
||||
rename SDL2-%SDL_VERSION% SDL2
|
||||
move ffmpeg-%FFMPEG_VERSION%-full_build-shared\ffmpeg-%FFMPEG_VERSION%-full_build-shared ffmpeg
|
||||
rmdir ffmpeg-%FFMPEG_VERSION%-full_build-shared
|
||||
del ffmpeg-%FFMPEG_VERSION%-full_build-shared.zip
|
||||
|
||||
set SDL_INSTALL_PREFIX=%CD%
|
||||
set FFMPEG_INSTALL_PREFIX=%CD%
|
||||
set PUBLIC_RELEASE=0
|
||||
IF DEFINED FCEU_RELEASE_VERSION (set PUBLIC_RELEASE=1)
|
||||
|
||||
REM cmake -h
|
||||
REM cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DSDL_INSTALL_PREFIX=%SDL_INSTALL_PREFIX% ..
|
||||
cmake -DQT6=0 -DSDL_INSTALL_PREFIX=%SDL_INSTALL_PREFIX% -DUSE_LIBAV=1 -DFFMPEG_INSTALL_PREFIX=%FFMPEG_INSTALL_PREFIX% -G"Visual Studio 16" -T"v142" ..
|
||||
cmake -DQT6=0 -DPUBLIC_RELEASE=%PUBLIC_RELEASE% -DSDL_INSTALL_PREFIX=%SDL_INSTALL_PREFIX% -DUSE_LIBAV=1 -DFFMPEG_INSTALL_PREFIX=%FFMPEG_INSTALL_PREFIX% -G"Visual Studio 16" -T"v142" ..
|
||||
|
||||
REM nmake
|
||||
msbuild /m fceux.sln /p:Configuration=Release
|
||||
@if ERRORLEVEL 1 goto end
|
||||
|
||||
copy src\Release\fceux.exe bin\qfceux.exe
|
||||
copy %PROJECT_ROOT%\src\auxlib.lua bin\.
|
||||
REM copy %PROJECT_ROOT%\src\drivers\win\lua\x64\lua51.dll bin\.
|
||||
REM copy %PROJECT_ROOT%\src\drivers\win\lua\x64\lua5.1.dll bin\.
|
||||
copy %SDL_INSTALL_PREFIX%\SDL2\lib\x64\SDL2.dll bin\.
|
||||
copy %FFMPEG_INSTALL_PREFIX%\ffmpeg\bin\*.dll bin\.
|
||||
|
||||
windeployqt --no-compiler-runtime bin\qfceux.exe
|
||||
|
||||
set ZIP_FILENAME=fceux-win64-QtSDL.zip
|
||||
IF DEFINED FCEU_RELEASE_VERSION set ZIP_FILENAME=fceux-%FCEU_RELEASE_VERSION%-win64-QtSDL.zip
|
||||
|
||||
set DEPLOY_GROUP=master
|
||||
IF DEFINED APPVEYOR_REPO_TAG_NAME set DEPLOY_GROUP=%APPVEYOR_REPO_TAG_NAME%
|
||||
|
||||
dir bin
|
||||
|
||||
REM Create Zip Archive
|
||||
%PROJECT_ROOT%\vc\zip -X -9 -r %PROJECT_ROOT%\vc\qfceux64.zip bin
|
||||
%PROJECT_ROOT%\vc\zip -X -9 -r %PROJECT_ROOT%\vc\%ZIP_FILENAME% bin
|
||||
@if ERRORLEVEL 1 goto end
|
||||
|
||||
cd %PROJECT_ROOT%\output
|
||||
%PROJECT_ROOT%\vc\zip -X -9 -u -r %PROJECT_ROOT%\vc\qfceux64.zip palettes luaScripts tools
|
||||
%PROJECT_ROOT%\vc\zip -X -9 -u -r %PROJECT_ROOT%\vc\%ZIP_FILENAME% palettes luaScripts tools
|
||||
@if ERRORLEVEL 1 goto end
|
||||
|
||||
mkdir doc
|
||||
copy *.chm doc\.
|
||||
%PROJECT_ROOT%\vc\zip -X -9 -u -r %PROJECT_ROOT%\vc\qfceux64.zip doc
|
||||
%PROJECT_ROOT%\vc\zip -X -9 -u -r %PROJECT_ROOT%\vc\%ZIP_FILENAME% doc
|
||||
@if ERRORLEVEL 1 goto end
|
||||
|
||||
cd %PROJECT_ROOT%
|
||||
|
||||
appveyor PushArtifact %PROJECT_ROOT%\vc\qfceux64.zip
|
||||
IF DEFINED APPVEYOR appveyor SetVariable -Name WIN64_QTSDL_ARTIFACT -Value %ZIP_FILENAME%
|
||||
IF DEFINED APPVEYOR appveyor PushArtifact %PROJECT_ROOT%\vc\%ZIP_FILENAME%
|
||||
|
||||
:end
|
||||
|
|
|
@ -1,18 +1,27 @@
|
|||
|
||||
set PROJECT_ROOT=%~dp0..
|
||||
set BUILD_CONFIG=Release
|
||||
|
||||
msbuild %PROJECT_ROOT%\vc\vc14_fceux.vcxproj /p:Configuration=Release /p:Platform="Win32"
|
||||
set ZIP_FILENAME=fceux-win32.zip
|
||||
if defined FCEU_RELEASE_VERSION set ZIP_FILENAME=fceux-%FCEU_RELEASE_VERSION%-win32.zip
|
||||
if defined FCEU_RELEASE_VERSION set BUILD_CONFIG=PublicRelease
|
||||
|
||||
set DEPLOY_GROUP=master
|
||||
IF DEFINED APPVEYOR_REPO_TAG_NAME set DEPLOY_GROUP=%APPVEYOR_REPO_TAG_NAME%
|
||||
|
||||
msbuild %PROJECT_ROOT%\vc\vc14_fceux.vcxproj /p:Configuration=%BUILD_CONFIG% /p:Platform="Win32"
|
||||
@if ERRORLEVEL 1 goto end
|
||||
|
||||
cd %PROJECT_ROOT%\vc
|
||||
|
||||
REM Create Zip Archive
|
||||
cd %PROJECT_ROOT%\output
|
||||
..\vc\zip -X -9 -r ..\vc\fceux.zip fceux.exe fceux.chm taseditor.chm lua5.1.dll lua51.dll 7z.dll auxlib.lua palettes luaScripts tools
|
||||
..\vc\zip -X -9 -r ..\vc\%ZIP_FILENAME% fceux.exe fceux.chm taseditor.chm lua5.1.dll lua51.dll 7z.dll auxlib.lua palettes luaScripts tools
|
||||
@if ERRORLEVEL 1 goto end
|
||||
|
||||
cd %PROJECT_ROOT%
|
||||
|
||||
appveyor PushArtifact %PROJECT_ROOT%\vc\fceux.zip
|
||||
IF DEFINED APPVEYOR appveyor SetVariable -Name WIN32_ARTIFACT -Value %ZIP_FILENAME%
|
||||
IF DEFINED APPVEYOR appveyor PushArtifact %PROJECT_ROOT%\vc\%ZIP_FILENAME%
|
||||
|
||||
:end
|
||||
:end
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
|
||||
set PROJECT_ROOT=%~dp0..
|
||||
set BUILD_CONFIG=Release
|
||||
|
||||
msbuild %PROJECT_ROOT%\vc\vc14_fceux.vcxproj /p:Configuration=Release /p:Platform="x64"
|
||||
set ZIP_FILENAME=fceux-win64.zip
|
||||
if defined FCEU_RELEASE_VERSION set ZIP_FILENAME=fceux-%FCEU_RELEASE_VERSION%-win64.zip
|
||||
if defined FCEU_RELEASE_VERSION set BUILD_CONFIG=PublicRelease
|
||||
|
||||
set DEPLOY_GROUP=master
|
||||
IF DEFINED APPVEYOR_REPO_TAG_NAME set DEPLOY_GROUP=%APPVEYOR_REPO_TAG_NAME%
|
||||
|
||||
msbuild %PROJECT_ROOT%\vc\vc14_fceux.vcxproj /p:Configuration=%BUILD_CONFIG% /p:Platform="x64"
|
||||
@if ERRORLEVEL 1 goto end
|
||||
|
||||
cd %PROJECT_ROOT%\vc
|
||||
|
@ -9,13 +17,14 @@ cd %PROJECT_ROOT%\vc
|
|||
REM Create Zip Archive
|
||||
|
||||
cd %PROJECT_ROOT%\output
|
||||
..\vc\zip -X -9 -j ..\vc\fceux64.zip ..\vc\x64\Release\fceux64.exe ..\src\drivers\win\lua\x64\lua5.1.dll ..\src\drivers\win\lua\x64\lua51.dll ..\src\auxlib.lua ..\src\drivers\win\7z_64.dll
|
||||
..\vc\zip -X -9 -j ..\vc\%ZIP_FILENAME% ..\vc\x64\%BUILD_CONFIG%\fceux64.exe ..\src\drivers\win\lua\x64\lua5.1.dll ..\src\drivers\win\lua\x64\lua51.dll ..\src\auxlib.lua ..\src\drivers\win\7z_64.dll
|
||||
@if ERRORLEVEL 1 goto end
|
||||
..\vc\zip -X -9 -u -r ..\vc\fceux64.zip fceux.chm taseditor.chm palettes luaScripts tools
|
||||
..\vc\zip -X -9 -u -r ..\vc\%ZIP_FILENAME% fceux.chm taseditor.chm palettes luaScripts tools
|
||||
@if ERRORLEVEL 1 goto end
|
||||
|
||||
cd %PROJECT_ROOT%
|
||||
|
||||
appveyor PushArtifact %PROJECT_ROOT%\vc\fceux64.zip
|
||||
IF DEFINED APPVEYOR appveyor SetVariable -Name WIN64_ARTIFACT -Value %ZIP_FILENAME%
|
||||
IF DEFINED APPVEYOR appveyor PushArtifact %PROJECT_ROOT%\vc\%ZIP_FILENAME%
|
||||
|
||||
:end
|
||||
|
|
10
readme.md
10
readme.md
|
@ -26,11 +26,11 @@ An open source NES Emulator for Windows and Unix that features solid emulation a
|
|||
## Builds and Releases
|
||||
|
||||
Interim builds:
|
||||
* Win32: [fceux.zip](https://ci.appveyor.com/api/projects/zeromus/fceux/artifacts/fceux.zip?branch=master&job=Windows%2032)
|
||||
* Win64: [fceux64.zip](https://ci.appveyor.com/api/projects/zeromus/fceux/artifacts/fceux64.zip?branch=master&job=Windows%2064)
|
||||
* Win64 Qt/SDL: [qfceux64.zip](https://ci.appveyor.com/api/projects/zeromus/fceux/artifacts/qfceux64.zip?branch=master&job=Win64%20Qt)
|
||||
* Ubuntu: [fceux-2.6.4-amd64.deb](https://ci.appveyor.com/api/projects/zeromus/fceux/artifacts/fceux-2.6.4-amd64.deb?branch=master&job=Ubuntu)
|
||||
* MacOSX: [fceux-2.6.4-Darwin.dmg](https://ci.appveyor.com/api/projects/zeromus/fceux/artifacts/fceux-2.6.4-Darwin.dmg?branch=master&job=MacOS)
|
||||
* Win32: [fceux-win32.zip](https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-win32.zip)
|
||||
* Win64: [fceux-win64.zip](https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-win64.zip)
|
||||
* Win64 Qt/SDL: [fceux-win64-QtSDL.zip](https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-win64-QtSDL.zip)
|
||||
* Ubuntu: [fceux-ubuntu-x64.deb](https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-ubuntu-x64.deb)
|
||||
* MacOSX: [fceux-Darwin.dmg](https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-Darwin.dmg)
|
||||
* Status: [Appveyor](https://ci.appveyor.com/project/zeromus/fceux/)
|
||||
|
||||
But you might like mesen more: https://github.com/SourMesen/Mesen
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use File::Basename;
|
||||
#use File::Spec;
|
||||
|
||||
my $format = 0;
|
||||
|
||||
foreach my $arg (@ARGV)
|
||||
{
|
||||
#print $arg, "\n";
|
||||
|
||||
if ($arg eq "-major")
|
||||
{
|
||||
$format = 1;
|
||||
}
|
||||
elsif ($arg eq "-minor")
|
||||
{
|
||||
$format = 2;
|
||||
}
|
||||
elsif ($arg eq "-patch")
|
||||
{
|
||||
$format = 3;
|
||||
}
|
||||
}
|
||||
|
||||
#my $file = File::Spec->rel2abs( __FILE__ );
|
||||
my $dirname = dirname(__FILE__);
|
||||
my $projRoot = "$dirname/..";
|
||||
my $versionHeader = "$projRoot/src/version.h";
|
||||
my $major = 1;
|
||||
my $minor = 0;
|
||||
my $patch = 0;
|
||||
|
||||
#print "File: $file\n";
|
||||
#print "Dir $dirname\n";
|
||||
|
||||
my $line;
|
||||
|
||||
open INFILE, "$versionHeader" or die "Error: Could not open file: $versionHeader\n";
|
||||
while ($line = <INFILE>)
|
||||
{
|
||||
#print $line;
|
||||
if ($line =~ m/\s*#define\s+FCEU_VERSION_MAJOR\s+(\d+)/)
|
||||
{
|
||||
$major = $1;
|
||||
}
|
||||
elsif ($line =~ m/\s*#define\s+FCEU_VERSION_MINOR\s+(\d+)/)
|
||||
{
|
||||
$minor = $1;
|
||||
}
|
||||
elsif ($line =~ m/\s*#define\s+FCEU_VERSION_PATCH\s+(\d+)/)
|
||||
{
|
||||
$patch = $1;
|
||||
}
|
||||
}
|
||||
close(INFILE);
|
||||
|
||||
if ($format == 1)
|
||||
{
|
||||
print "$major";
|
||||
}
|
||||
elsif ($format == 2)
|
||||
{
|
||||
print "$minor";
|
||||
}
|
||||
elsif ($format == 3)
|
||||
{
|
||||
print "$patch";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "$major.$minor.$patch";
|
||||
}
|
|
@ -5,6 +5,10 @@ set(CMAKE_AUTOMOC ON)
|
|||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
if (${PUBLIC_RELEASE})
|
||||
add_definitions( -DPUBLIC_RELEASE=1 )
|
||||
endif()
|
||||
|
||||
if ( ${QT6} )
|
||||
message( STATUS "GUI Frontend: Qt6")
|
||||
set( Qt Qt6 )
|
||||
|
@ -28,6 +32,7 @@ else()
|
|||
include_directories( ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Help_INCLUDE_DIRS} )
|
||||
endif()
|
||||
|
||||
|
||||
if(WIN32)
|
||||
find_package(OpenGL REQUIRED)
|
||||
#find_package(Qt5 COMPONENTS Widgets OpenGL REQUIRED)
|
||||
|
@ -391,6 +396,7 @@ set(SRC_CORE
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/boards/cheapocabra.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/boards/cityfighter.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/boards/coolboy.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/boards/coolgirl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/boards/dance2000.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/boards/datalatch.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/boards/dream.cpp
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
* COOLBOY cartridges use registers at address $6xxx
|
||||
* MINDKIDS cartridges use a solder pad labelled "5/6K" to select between $5000 and $6000
|
||||
*
|
||||
*
|
||||
* $xxx0
|
||||
* 7 bit 0
|
||||
* ---- ----
|
||||
|
@ -29,7 +29,7 @@
|
|||
* |||| ||||
|
||||
* |||| |+++-- PRG offset (PRG A19, A18, A17)
|
||||
* |||| +----- Alternate CHR A17
|
||||
* ||++------- PRG offset (PRG A24, A23)
|
||||
* ||++------- PRG offset (PRG A24, A23), CHR offset (CHR A19, A18)
|
||||
* |+--------- PRG mask (PRG A17 from 0: MMC3; 1: offset)
|
||||
* +---------- CHR mask (CHR A17 from 0: MMC3; 1: alternate)
|
||||
*
|
||||
|
@ -55,15 +55,16 @@
|
|||
* $xxx3
|
||||
* 7 bit 0
|
||||
* ---- ----
|
||||
* NPxP QQRx
|
||||
* || | |||
|
||||
* || | +++--- PRG offset for GNROM mode (PRG A16, A15, A14)
|
||||
* || +------- 1: GNROM mode; 0: MMC3 mode
|
||||
* || | (1: PRG A16...13 from QQ, L, R, CPU A14, A13 + CHR A16...10 from MMMM, PPU A12...10;
|
||||
* || | 0: PRG A16...13 from MMC3 + CHR A16...A10 from MMC3 )
|
||||
* NPZP QQRx
|
||||
* |||| |||
|
||||
* |||| +++--- PRG offset for GNROM mode (PRG A16, A15, A14)
|
||||
* |||+------- 1: GNROM mode; 0: MMC3 mode
|
||||
* |||| (1: PRG A16...13 from QQ, L, R, CPU A14, A13 + CHR A16...10 from MMMM, PPU A12...10;
|
||||
* |||| 0: PRG A16...13 from MMC3 + CHR A16...A10 from MMC3 )
|
||||
* ||+-------- 1: Also enable PRG RAM in $5000-$5FFF
|
||||
* |+-+------- Banking mode
|
||||
* |+--------- "Weird MMC3 mode"
|
||||
* +---------- Lockout (prevent further writes to these four registers, only works in MMC3 mode)
|
||||
* +---------- Lockout (prevent further writes to all registers but the one at $xxx2, only works in MMC3 mode)
|
||||
*
|
||||
* Also some new cartridges from MINDKIDS have /WE and /OE pins connected to mapper,
|
||||
* which allows you to rewrite flash memory without soldering.
|
||||
|
@ -75,25 +76,91 @@
|
|||
|
||||
#include "mapinc.h"
|
||||
#include "mmc3.h"
|
||||
#include "../ines.h"
|
||||
|
||||
static void COOLBOYCW(uint32 A, uint8 V) {
|
||||
uint32 mask = 0xFF ^ (EXPREGS[0] & 0x80);
|
||||
if (EXPREGS[3] & 0x10) {
|
||||
if (EXPREGS[3] & 0x40) { // Weird mode
|
||||
const int ROM_CHIP = 0x00;
|
||||
const int WRAM_CHIP = 0x10;
|
||||
const int CFI_CHIP = 0x11;
|
||||
const int FLASH_CHIP = 0x12;
|
||||
|
||||
const uint32 FLASH_SECTOR_SIZE = 128 * 1024;
|
||||
|
||||
extern uint8* WRAM;
|
||||
static uint8* CFI = NULL;
|
||||
static uint8* Flash = NULL;
|
||||
|
||||
static uint8 flash_save = 0;
|
||||
static uint8 flash_state = 0;
|
||||
static uint16 flash_buffer_a[10];
|
||||
static uint8 flash_buffer_v[10];
|
||||
static uint8 cfi_mode = 0;
|
||||
|
||||
static uint16 regs_base = 0;
|
||||
static uint8 flag23 = 0;
|
||||
static uint8 flag45 = 0;
|
||||
static uint8 flag67 = 0;
|
||||
static uint8 flag89 = 0;
|
||||
|
||||
// Macronix 256-mbit memory CFI data
|
||||
const uint8 cfi_data[] =
|
||||
{
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x51, 0x52, 0x59, 0x02, 0x00, 0x40, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x27, 0x36, 0x00, 0x00, 0x03,
|
||||
0x06, 0x09, 0x13, 0x03, 0x05, 0x03, 0x02, 0x19,
|
||||
0x02, 0x00, 0x06, 0x00, 0x01, 0xFF, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
|
||||
0x50, 0x52, 0x49, 0x31, 0x33, 0x14, 0x02, 0x01,
|
||||
0x00, 0x08, 0x00, 0x00, 0x02, 0x95, 0xA5, 0x05,
|
||||
0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
|
||||
};
|
||||
|
||||
static void AA6023CW(uint32 A, uint8 V) {
|
||||
if (flag89) {
|
||||
/*
|
||||
$xxx0
|
||||
7 bit 0
|
||||
---- ----
|
||||
AB.C DEEE
|
||||
|| | ||||
|
||||
|| | |+++-- PRG offset (PRG A19, A18, A17)
|
||||
|| | +----- Alternate CHR A17
|
||||
|| +------- 1=Write-protect CHR-RAM
|
||||
|+--------- PRG mask (PRG A17 from 0: MMC3; 1: offset)
|
||||
+---------- CHR mask (CHR A17 from 0: MMC3; 1: alternate)
|
||||
*/
|
||||
if (EXPREGS[0] & 0b00010000)
|
||||
SetupCartCHRMapping(0, VROM, CHRsize[0], 0); // write-protect CHR-RAM
|
||||
else
|
||||
SetupCartCHRMapping(0, VROM, CHRsize[0], 1); // allow CHR writes
|
||||
}
|
||||
|
||||
uint32 mask = 0xFF ^ (EXPREGS[0] & 0b10000000);
|
||||
if (EXPREGS[3] & 0b00010000) {
|
||||
if (EXPREGS[3] & 0b01000000) { // Weird mode
|
||||
int cbase = (MMC3_cmd & 0x80) << 5;
|
||||
switch (cbase ^ A) { // Don't even try do understand
|
||||
case 0x0400:
|
||||
case 0x0C00: V &= 0x7F; break;
|
||||
}
|
||||
}
|
||||
// Highest bit goes from MMC3 registers when EXPREGS[3]&0x80==0 or from EXPREGS[0]&0x08 otherwise
|
||||
// Highest bit goes from MMC3 registers when EXPREGS[0]&0x80==0 or from EXPREGS[0]&0x08 otherwise
|
||||
setchr1(A,
|
||||
(V & 0x80 & mask) | ((((EXPREGS[0] & 0x08) << 4) & ~mask)) // 7th bit
|
||||
(V & 0x80 & mask) | ((((EXPREGS[0] & 0b00001000) << 4) & ~mask)) // 7th bit
|
||||
| ((EXPREGS[2] & 0x0F) << 3) // 6-3 bits
|
||||
| ((A >> 10) & 7) // 2-0 bits
|
||||
| ((EXPREGS[0] & 0b00110000) << 4) // There are some ROMs with 1 MiB CHR-ROM
|
||||
);
|
||||
} else {
|
||||
if (EXPREGS[3] & 0x40) { // Weird mode, again
|
||||
}
|
||||
else {
|
||||
if (EXPREGS[3] & 0b01000000) { // Weird mode, again
|
||||
int cbase = (MMC3_cmd & 0x80) << 5;
|
||||
switch (cbase ^ A) { // Don't even try do understand
|
||||
case 0x0000: V = DRegBuf[0]; break;
|
||||
|
@ -103,18 +170,81 @@ static void COOLBOYCW(uint32 A, uint8 V) {
|
|||
}
|
||||
}
|
||||
// Simple MMC3 mode
|
||||
// Highest bit goes from MMC3 registers when EXPREGS[3]&0x80==0 or from EXPREGS[0]&0x08 otherwise
|
||||
setchr1(A, (V & mask) | (((EXPREGS[0] & 0x08) << 4) & ~mask));
|
||||
// Highest bit goes from MMC3 registers when EXPREGS[0]&0x80==0 or from EXPREGS[0]&0x08 otherwise
|
||||
setchr1(A,
|
||||
(V & mask)
|
||||
| (((EXPREGS[0] & 0x08) << 4) & ~mask)
|
||||
| ((EXPREGS[0] & 0b00110000) << 4)); // There are some ROMs with 1 MiB CHR-ROM
|
||||
}
|
||||
}
|
||||
|
||||
static void COOLBOYPW(uint32 A, uint8 V) {
|
||||
uint32 mask = ((0x3F | (EXPREGS[1] & 0x40) | ((EXPREGS[1] & 0x20) << 2)) ^ ((EXPREGS[0] & 0x40) >> 2)) ^ ((EXPREGS[1] & 0x80) >> 2);
|
||||
uint32 base = ((EXPREGS[0] & 0x07) >> 0) | ((EXPREGS[1] & 0x10) >> 1) | ((EXPREGS[1] & 0x0C) << 2) | ((EXPREGS[0] & 0x30) << 2);
|
||||
static void AA6023PW(uint32 A, uint8 V) {
|
||||
uint8 CREGS[] = {EXPREGS[0], EXPREGS[1], EXPREGS[2], EXPREGS[3]};
|
||||
// Submappers has scrambled bits
|
||||
if (flag23) {
|
||||
/*
|
||||
$xxx1
|
||||
7 bit 0
|
||||
---- ----
|
||||
GHIL JKKx
|
||||
|||| |||
|
||||
|||| +++--- PRG offset (in order: PRG A20, A21, A22)
|
||||
|||+------- GNROM mode bank PRG size (0: 32 KiB bank, PRG A14=CPU A14; 1: 16 KiB bank, PRG A14=offset A14)
|
||||
||+-------- PRG mask (PRG A20 from 0: offset; 1: MMC3)
|
||||
|+--------- PRG mask (PRG A19 from 0: offset; 1: MMC3)
|
||||
+---------- PRG mask (PRG A18 from 0: MMC3; 1: offset)
|
||||
*/
|
||||
CREGS[1] = (CREGS[1] & 0b11100101)
|
||||
| ((CREGS[1] & 0b00001000) << 1) // PRG A20
|
||||
| ((CREGS[1] & 0b00000010) << 2) // PRG A22
|
||||
| ((((CREGS[1] ^ 0b00010000) & 0b00010000) >> 3)); // GNROM mode bank PRG size
|
||||
}
|
||||
if (flag45) {
|
||||
/*
|
||||
$xxx0
|
||||
7 bit 0
|
||||
---- ----
|
||||
ABCC DEEE
|
||||
|||| ||||
|
||||
|||| |+++-- PRG offset (PRG A19, A18, A17)
|
||||
|||| +----- Alternate CHR A17
|
||||
||++------- PRG offset (PRG A21, A20)
|
||||
|+--------- PRG mask (PRG A17 from 0: MMC3; 1: offset)
|
||||
+---------- CHR mask (CHR A17 from 0: MMC3; 1: alternate)
|
||||
$xxx1
|
||||
7 bit 0
|
||||
---- ----
|
||||
GHIx xxLx
|
||||
||| |
|
||||
||| +--- GNROM mode bank PRG size (1: 32 KiB bank, PRG A14=CPU A14; 0: 16 KiB bank, PRG A14=offset A14)
|
||||
||+-------- PRG mask (PRG A20 from 0: offset; 1: MMC3)
|
||||
|+--------- PRG mask (PRG A19 from 0: offset; 1: MMC3)
|
||||
+---------- PRG mask (PRG A18 from 0: MMC3; 1: offset)
|
||||
*/
|
||||
CREGS[1] = (CREGS[1] & 0b11100011)
|
||||
| ((CREGS[0] & 0b00100000) >> 3) // PRG A21
|
||||
| (CREGS[0] & 0b00010000); // PRG A20
|
||||
CREGS[0] &= 0b11001111;
|
||||
}
|
||||
|
||||
uint32 mask = ((0b00111111 | (CREGS[1] & 0b01000000) | ((CREGS[1] & 0b00100000) << 2)) ^ ((CREGS[0] & 0b01000000) >> 2)) ^ ((CREGS[1] & 0b10000000) >> 2);
|
||||
uint32 base = ((CREGS[0] & 0b00000111) >> 0) | ((CREGS[1] & 0b00010000) >> 1) | ((CREGS[1] & 0b00001100) << 2) | ((CREGS[0] & 0b00110000) << 2);
|
||||
|
||||
if (flash_save && cfi_mode) {
|
||||
setprg32r(CFI_CHIP, 0x8000, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
int chip = !flash_save ? ROM_CHIP : FLASH_CHIP;
|
||||
// There are ROMs with multiple PRG ROM chips
|
||||
int chip_offset = 0;
|
||||
if (flag67 && EXPREGS[0] & 0b00001000) {
|
||||
chip_offset += ROM_size;
|
||||
}
|
||||
|
||||
// Very weird mode
|
||||
// Last banks are first in this mode, ignored when MMC3_cmd&0x40
|
||||
if ((EXPREGS[3] & 0x40) && (V >= 0xFE) && !((MMC3_cmd & 0x40) != 0)) {
|
||||
if ((CREGS[3] & 0b01000000) && (V >= 0xFE) && !((MMC3_cmd & 0x40) != 0)) {
|
||||
switch (A & 0xE000) {
|
||||
case 0xC000:
|
||||
case 0xE000:
|
||||
|
@ -123,91 +253,234 @@ static void COOLBOYPW(uint32 A, uint8 V) {
|
|||
}
|
||||
}
|
||||
|
||||
// Regular MMC3 mode, internal ROM size can be up to 2048kb!
|
||||
if (!(EXPREGS[3] & 0x10))
|
||||
setprg8(A, (((base << 4) & ~mask)) | (V & mask));
|
||||
else { // NROM mode
|
||||
if (!(CREGS[3] & 0x10)) {
|
||||
// Regular MMC3 mode but can be extended to 2MiB
|
||||
setprg8r(chip, A, ((((base << 4) & ~mask)) | (V & mask)) + chip_offset);
|
||||
}
|
||||
else {
|
||||
// NROM mode
|
||||
mask &= 0xF0;
|
||||
uint8 emask;
|
||||
if ((((EXPREGS[1] & 2) != 0))) // 32kb mode
|
||||
emask = (EXPREGS[3] & 0x0C) | ((A & 0x4000) >> 13);
|
||||
if (CREGS[1] & 0b00000010) // 32kb mode
|
||||
emask = (CREGS[3] & 0b00001100) | ((A & 0x4000) >> 13);
|
||||
else // 16kb mode
|
||||
emask = EXPREGS[3] & 0x0E;
|
||||
setprg8(A, ((base << 4) & ~mask) // 7-4 bits are from base (see below)
|
||||
| (V & mask) // ... or from MM3 internal regs, depends on mask
|
||||
| emask // 3-1 (or 3-2 when (EXPREGS[3]&0x0C is set) from EXPREGS[3]
|
||||
| ((A & 0x2000) >> 13)); // 0th just as is
|
||||
emask = CREGS[3] & 0b00001110;
|
||||
setprg8r(chip, A, (
|
||||
((base << 4) & ~mask) // 7-4 bits are from base
|
||||
| (V & mask) // ... or from MM3 internal regs, depends on mask
|
||||
| emask // 3-1 (or 3-2 when (EXPREGS[3]&0x0C is set) from EXPREGS[3]
|
||||
| ((A & 0x2000) >> 13) // 0th just as is
|
||||
) + chip_offset); // For multi-chip ROMs
|
||||
}
|
||||
}
|
||||
|
||||
static DECLFW(COOLBOYWrite) {
|
||||
if(A001B & 0x80)
|
||||
CartBW(A,V);
|
||||
static DECLFW(AA6023WramWrite) {
|
||||
if (A001B & 0x80)
|
||||
CartBW(A, V);
|
||||
}
|
||||
|
||||
static DECLFW(AA6023Write) {
|
||||
if (A >= 0x6000) {
|
||||
AA6023WramWrite(A, V);
|
||||
}
|
||||
|
||||
// Deny any further writes when 7th bit is 1 AND 4th is 0
|
||||
if ((EXPREGS[3] & 0x90) != 0x80) {
|
||||
EXPREGS[A & 3] = V;
|
||||
FixMMC3PRG(MMC3_cmd);
|
||||
FixMMC3CHR(MMC3_cmd);
|
||||
}
|
||||
FixMMC3PRG(MMC3_cmd);
|
||||
FixMMC3CHR(MMC3_cmd);
|
||||
}
|
||||
|
||||
static void COOLBOYReset(void) {
|
||||
static DECLFW(AA6023FlashWrite) {
|
||||
if (A < 0xC000)
|
||||
MMC3_CMDWrite(A, V);
|
||||
else
|
||||
MMC3_IRQWrite(A, V);
|
||||
|
||||
if (!flash_save) return;
|
||||
if (flash_state < sizeof(flash_buffer_a) / sizeof(flash_buffer_a[0])) {
|
||||
flash_buffer_a[flash_state] = A & 0xFFF;
|
||||
flash_buffer_v[flash_state] = V;
|
||||
flash_state++;
|
||||
|
||||
// enter CFI mode
|
||||
if ((flash_state == 1) &&
|
||||
(flash_buffer_a[0] == 0x0AAA) && (flash_buffer_v[0] == 0x98)) {
|
||||
cfi_mode = 1;
|
||||
flash_state = 0;
|
||||
}
|
||||
|
||||
// erase sector
|
||||
if ((flash_state == 6) &&
|
||||
(flash_buffer_a[0] == 0x0AAA) && (flash_buffer_v[0] == 0xAA) &&
|
||||
(flash_buffer_a[1] == 0x0555) && (flash_buffer_v[1] == 0x55) &&
|
||||
(flash_buffer_a[2] == 0x0AAA) && (flash_buffer_v[2] == 0x80) &&
|
||||
(flash_buffer_a[3] == 0x0AAA) && (flash_buffer_v[3] == 0xAA) &&
|
||||
(flash_buffer_a[4] == 0x0555) && (flash_buffer_v[4] == 0x55) &&
|
||||
(flash_buffer_v[5] == 0x30)) {
|
||||
int offset = &Page[A >> 11][A] - Flash;
|
||||
int sector = offset / FLASH_SECTOR_SIZE;
|
||||
for (uint32 i = sector * FLASH_SECTOR_SIZE; i < (sector + 1) * FLASH_SECTOR_SIZE; i++)
|
||||
Flash[i % PRGsize[ROM_CHIP]] = 0xFF;
|
||||
FCEU_printf("Flash sector #%d is erased (0x%08x - 0x%08x).\n", sector, offset, offset + FLASH_SECTOR_SIZE);
|
||||
flash_state = 0;
|
||||
}
|
||||
|
||||
// erase chip, lol
|
||||
if ((flash_state == 6) &&
|
||||
(flash_buffer_a[0] == 0x0AAA) && (flash_buffer_v[0] == 0xAA) &&
|
||||
(flash_buffer_a[1] == 0x0555) && (flash_buffer_v[1] == 0x55) &&
|
||||
(flash_buffer_a[2] == 0x0AAA) && (flash_buffer_v[2] == 0x80) &&
|
||||
(flash_buffer_a[3] == 0x0AAA) && (flash_buffer_v[3] == 0xAA) &&
|
||||
(flash_buffer_a[4] == 0x0555) && (flash_buffer_v[4] == 0x55) &&
|
||||
(flash_buffer_v[5] == 0x10)) {
|
||||
memset(Flash, 0xFF, PRGsize[ROM_CHIP]);
|
||||
FCEU_printf("Flash chip erased.\n");
|
||||
flash_state = 0;
|
||||
}
|
||||
|
||||
// write byte
|
||||
if ((flash_state == 4) &&
|
||||
(flash_buffer_a[0] == 0x0AAA) && (flash_buffer_v[0] == 0xAA) &&
|
||||
(flash_buffer_a[1] == 0x0555) && (flash_buffer_v[1] == 0x55) &&
|
||||
(flash_buffer_a[2] == 0x0AAA) && (flash_buffer_v[2] == 0xA0)) {
|
||||
int offset = &Page[A >> 11][A] - Flash;
|
||||
if (CartBR(A) != 0xFF) {
|
||||
FCEU_PrintError("Error: can't write to 0x%08x, flash sector is not erased.\n", offset);
|
||||
}
|
||||
else {
|
||||
CartBW(A, V);
|
||||
}
|
||||
flash_state = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// not a command
|
||||
if (((A & 0xFFF) != 0x0AAA) && ((A & 0xFFF) != 0x0555)) {
|
||||
flash_state = 0;
|
||||
}
|
||||
|
||||
// reset
|
||||
if (V == 0xF0) {
|
||||
flash_state = 0;
|
||||
cfi_mode = 0;
|
||||
}
|
||||
|
||||
FixMMC3PRG(MMC3_cmd);
|
||||
}
|
||||
|
||||
static void AA6023Reset(void) {
|
||||
MMC3RegReset();
|
||||
EXPREGS[0] = EXPREGS[1] = EXPREGS[2] = EXPREGS[3] = 0;
|
||||
flash_state = 0;
|
||||
cfi_mode = 0;
|
||||
FixMMC3PRG(MMC3_cmd);
|
||||
FixMMC3CHR(MMC3_cmd);
|
||||
}
|
||||
|
||||
static void COOLBOYPower(void) {
|
||||
static void AA6023Power(void) {
|
||||
GenMMC3Power();
|
||||
EXPREGS[0] = EXPREGS[1] = EXPREGS[2] = EXPREGS[3] = 0;
|
||||
FixMMC3PRG(MMC3_cmd);
|
||||
FixMMC3CHR(MMC3_cmd);
|
||||
SetWriteHandler(0x5000, 0x5fff, CartBW); // some games access random unmapped areas and crashes because of KT-008 PCB hack in MMC3 source lol
|
||||
SetWriteHandler(0x6000, 0x6fff, COOLBOYWrite);
|
||||
if (regs_base != 0x5000)
|
||||
SetWriteHandler(0x5000, 0x5fff, CartBW); // some games access random unmapped areas and crashes because of KT-008 PCB hack in MMC3 source lol
|
||||
SetWriteHandler(0x6000, 0x7fff, AA6023WramWrite);
|
||||
SetWriteHandler(regs_base, regs_base + 0x0fff, AA6023Write);
|
||||
SetWriteHandler(0x8000, 0xFFFF, AA6023FlashWrite);
|
||||
SetReadHandler(0x8000, 0xFFFF, CartBR);
|
||||
}
|
||||
|
||||
static void MINDKIDSPower(void) {
|
||||
GenMMC3Power();
|
||||
EXPREGS[0] = EXPREGS[1] = EXPREGS[2] = EXPREGS[3] = 0;
|
||||
static void AA6023Restore(void) {
|
||||
FixMMC3PRG(MMC3_cmd);
|
||||
FixMMC3CHR(MMC3_cmd);
|
||||
SetWriteHandler(0x5000, 0x5fff, COOLBOYWrite);
|
||||
}
|
||||
|
||||
static void AA6023Close(void) {
|
||||
if (WRAM)
|
||||
FCEU_gfree(WRAM);
|
||||
if (Flash)
|
||||
FCEU_gfree(Flash);
|
||||
if (CFI)
|
||||
FCEU_gfree(CFI);
|
||||
WRAM = Flash = CFI = NULL;
|
||||
}
|
||||
|
||||
void CommonInit(CartInfo* info, int submapper)
|
||||
{
|
||||
GenMMC3_Init(info, 2048, info->vram_size / 1024, !info->ines2 ? 8 : (info->wram_size + info->battery_wram_size) / 1024, info->battery);
|
||||
pwrap = AA6023PW;
|
||||
cwrap = AA6023CW;
|
||||
|
||||
switch (submapper)
|
||||
{
|
||||
case 2:
|
||||
regs_base = 0x7000;
|
||||
break;
|
||||
case 0:
|
||||
case 4:
|
||||
case 6:
|
||||
case 8:
|
||||
regs_base = 0x6000;
|
||||
break;
|
||||
case 1:
|
||||
case 3:
|
||||
case 5:
|
||||
case 7:
|
||||
case 9:
|
||||
regs_base = 0x5000;
|
||||
break;
|
||||
default:
|
||||
FCEU_PrintError("Submapper #%d is not supported", submapper);
|
||||
}
|
||||
flag23 = (submapper == 2) || (submapper == 3);
|
||||
flag45 = (submapper == 4) || (submapper == 5);
|
||||
flag67 = (submapper == 6) || (submapper == 7);
|
||||
flag89 = (submapper == 8) || (submapper == 9);
|
||||
info->Power = AA6023Power;
|
||||
info->Reset = AA6023Reset;
|
||||
info->Close = AA6023Close;
|
||||
|
||||
flash_save = info->battery;
|
||||
|
||||
if (flash_save) {
|
||||
CFI = (uint8*)FCEU_gmalloc(sizeof(cfi_data) * 2);
|
||||
for (int i = 0; i < sizeof(cfi_data); i++) {
|
||||
CFI[i * 2] = CFI[i * 2 + 1] = cfi_data[i];
|
||||
}
|
||||
SetupCartPRGMapping(CFI_CHIP, CFI, sizeof(cfi_data) * 2, 0);
|
||||
Flash = (uint8*)FCEU_gmalloc(PRGsize[ROM_CHIP]);
|
||||
for (int i = 0; i < PRGsize[ROM_CHIP]; i++) {
|
||||
Flash[i] = PRGptr[ROM_CHIP][i % PRGsize[ROM_CHIP]];
|
||||
}
|
||||
SetupCartPRGMapping(FLASH_CHIP, Flash, PRGsize[ROM_CHIP], 1);
|
||||
info->SaveGame[1] = Flash;
|
||||
info->SaveGameLen[1] = PRGsize[ROM_CHIP];
|
||||
}
|
||||
|
||||
AddExState(EXPREGS, 4, 0, "EXPR");
|
||||
if (flash_save)
|
||||
{
|
||||
AddExState(&flash_state, sizeof(flash_state), 0, "FLST");
|
||||
AddExState(flash_buffer_a, sizeof(flash_buffer_a), 0, "FLBA");
|
||||
AddExState(flash_buffer_v, sizeof(flash_buffer_v), 0, "FLBV");
|
||||
AddExState(&cfi_mode, sizeof(cfi_mode), 0, "CFIM");
|
||||
AddExState(Flash, PRGsize[ROM_CHIP], 0, "FLAS");
|
||||
}
|
||||
}
|
||||
|
||||
// Registers at $6xxx
|
||||
void COOLBOY_Init(CartInfo *info) {
|
||||
GenMMC3_Init(info, 2048, 256, 8, 1);
|
||||
pwrap = COOLBOYPW;
|
||||
cwrap = COOLBOYCW;
|
||||
info->Power = COOLBOYPower;
|
||||
info->Reset = COOLBOYReset;
|
||||
AddExState(EXPREGS, 4, 0, "EXPR");
|
||||
void COOLBOY_Init(CartInfo* info) {
|
||||
CommonInit(info, 0);
|
||||
}
|
||||
|
||||
// Registers at $5xxx
|
||||
void MINDKIDS_Init(CartInfo *info) {
|
||||
GenMMC3_Init(info, 2048, 256, 8, 1);
|
||||
pwrap = COOLBOYPW;
|
||||
cwrap = COOLBOYCW;
|
||||
info->Power = MINDKIDSPower;
|
||||
info->Reset = COOLBOYReset;
|
||||
AddExState(EXPREGS, 4, 0, "EXPR");
|
||||
void MINDKIDS_Init(CartInfo* info) {
|
||||
CommonInit(info, 1);
|
||||
}
|
||||
|
||||
// For NES 2.0 loader
|
||||
void SMD132_SMD133_Init(CartInfo *info) {
|
||||
switch (info->submapper)
|
||||
{
|
||||
case 0:
|
||||
COOLBOY_Init(info);
|
||||
break;
|
||||
case 1:
|
||||
MINDKIDS_Init(info);
|
||||
break;
|
||||
default:
|
||||
FCEU_PrintError("Unknown submapper: #%d.", info->submapper);
|
||||
break;
|
||||
}
|
||||
void AA6023_Init(CartInfo* info) {
|
||||
CommonInit(info, info->submapper);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
|||
/* FCE Ultra - NES/Famicom Emulator
|
||||
*
|
||||
* Copyright notice for this file:
|
||||
* Copyright (C) 2014 CaitSith2
|
||||
* Copyright (C) 2014 CaitSith2, 2022 Cluster
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Roms still using NES 1.0 format should be loaded as 32K CHR RAM.
|
||||
* Roms still using NES 1.0 format should be loaded as 8K CHR RAM.
|
||||
* Roms defined under NES 2.0 should use the VRAM size field, defining 7, 8 or 9, based on how much VRAM should be present.
|
||||
* UNIF doesn't have this problem, because unique board names can define this information.
|
||||
* The UNIF names are UNROM-512-8K, UNROM-512-16K and UNROM-512-32K
|
||||
|
@ -28,6 +28,7 @@
|
|||
* Known games to use this board are:
|
||||
* Battle Kid 2: Mountain of Torment (512K PRG, 8K CHR RAM, Horizontal Mirroring, Flash disabled)
|
||||
* Study Hall (128K PRG (in 512K flash chip), 8K CHR RAM, Horizontal Mirroring, Flash enabled)
|
||||
* Nix: The Paradox Relic (512 PRG, 8K CHR RAM, Vertical Mirroring, Flash enabled)
|
||||
* Although Xmas 2013 uses a different board, where LEDs can be controlled (with writes to the $8000-BFFF space),
|
||||
* it otherwise functions identically.
|
||||
*/
|
||||
|
@ -35,211 +36,147 @@
|
|||
#include "mapinc.h"
|
||||
#include "../ines.h"
|
||||
|
||||
static uint8 latche, latcheinit, bus_conflict, chrram_mask, software_id=false;
|
||||
const int ROM_CHIP = 0x00;
|
||||
const int CFI_CHIP = 0x10;
|
||||
const int FLASH_CHIP = 0x11;
|
||||
|
||||
const int FLASH_SECTOR_SIZE = 4 * 1024;
|
||||
|
||||
static uint8 flash_save, flash_state, flash_id_mode, latche, bus_conflict;
|
||||
static uint16 latcha;
|
||||
static uint8 *flashdata;
|
||||
static uint32 *flash_write_count;
|
||||
static uint8 *FlashPage[32];
|
||||
//static uint32 *FlashWriteCountPage[32];
|
||||
//static uint8 flashloaded = false;
|
||||
static uint8 *flash_data;
|
||||
static uint16 flash_buffer_a[10];
|
||||
static uint8 flash_buffer_v[10];
|
||||
static uint8 flash_id[2];
|
||||
|
||||
static uint8 flash_save=0, flash_state=0, flash_mode=0, flash_bank;
|
||||
static void (*WLSync)(void);
|
||||
static void (*WHSync)(void);
|
||||
|
||||
static INLINE void setfpageptr(int s, uint32 A, uint8 *p) {
|
||||
uint32 AB = A >> 11;
|
||||
int x;
|
||||
|
||||
if (p)
|
||||
for (x = (s >> 1) - 1; x >= 0; x--) {
|
||||
FlashPage[AB + x] = p - A;
|
||||
}
|
||||
static void UNROM512_Sync() {
|
||||
int chip;
|
||||
if (flash_save)
|
||||
chip = !flash_id_mode ? FLASH_CHIP : CFI_CHIP;
|
||||
else
|
||||
for (x = (s >> 1) - 1; x >= 0; x--) {
|
||||
FlashPage[AB + x] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void setfprg16(uint32 A, uint32 V) {
|
||||
if (PRGsize[0] >= 16384) {
|
||||
V &= PRGmask16[0];
|
||||
setfpageptr(16, A, flashdata ? (&flashdata[V << 14]) : 0);
|
||||
} else {
|
||||
uint32 VA = V << 3;
|
||||
int x;
|
||||
|
||||
for (x = 0; x < 8; x++)
|
||||
setfpageptr(2, A + (x << 11), flashdata ? (&flashdata[((VA + x) & PRGmask2[0]) << 11]) : 0);
|
||||
}
|
||||
}
|
||||
|
||||
void inc_flash_write_count(uint8 bank, uint32 A)
|
||||
{
|
||||
flash_write_count[(bank*4) + ((A&0x3000)>>12)]++;
|
||||
if(!flash_write_count[(bank*4) + ((A&0x3000)>>12)])
|
||||
flash_write_count[(bank*4) + ((A&0x3000)>>12)]++;
|
||||
}
|
||||
|
||||
uint32 GetFlashWriteCount(uint8 bank, uint32 A)
|
||||
{
|
||||
return flash_write_count[(bank*4) + ((A&0x3000)>>12)];
|
||||
chip = ROM_CHIP;
|
||||
setprg16r(chip, 0x8000, latche & 0b11111);
|
||||
setprg16r(chip, 0xc000, ~0);
|
||||
setchr8((latche >> 5) & 0b11);
|
||||
setmirror(MI_0 + ((latche >> 7) & 1));
|
||||
}
|
||||
|
||||
static void StateRestore(int version) {
|
||||
WHSync();
|
||||
UNROM512_Sync();
|
||||
}
|
||||
|
||||
static DECLFW(UNROM512LLatchWrite)
|
||||
static DECLFW(UNROM512FlashWrite)
|
||||
{
|
||||
latche = V;
|
||||
latcha = A;
|
||||
WLSync();
|
||||
if (flash_state < sizeof(flash_buffer_a) / sizeof(flash_buffer_a[0])) {
|
||||
flash_buffer_a[flash_state] = (A & 0x3FFF) | ((latche & 1) << 14);
|
||||
flash_buffer_v[flash_state] = V;
|
||||
flash_state++;
|
||||
|
||||
// enter flash ID mode
|
||||
if ((flash_state == 2) &&
|
||||
(flash_buffer_a[0] == 0x5555) && (flash_buffer_v[0] == 0xAA) &&
|
||||
(flash_buffer_a[1] == 0x2AAA) && (flash_buffer_v[1] == 0x55) &&
|
||||
(flash_buffer_a[1] == 0x5555) && (flash_buffer_v[1] == 0x90)) {
|
||||
flash_id_mode = 0;
|
||||
flash_state = 0;
|
||||
}
|
||||
|
||||
// erase sector
|
||||
if ((flash_state == 6) &&
|
||||
(flash_buffer_a[0] == 0x5555) && (flash_buffer_v[0] == 0xAA) &&
|
||||
(flash_buffer_a[1] == 0x2AAA) && (flash_buffer_v[1] == 0x55) &&
|
||||
(flash_buffer_a[2] == 0x5555) && (flash_buffer_v[2] == 0x80) &&
|
||||
(flash_buffer_a[3] == 0x5555) && (flash_buffer_v[3] == 0xAA) &&
|
||||
(flash_buffer_a[4] == 0x2AAA) && (flash_buffer_v[4] == 0x55) &&
|
||||
(flash_buffer_v[5] == 0x30)) {
|
||||
int offset = &Page[A >> 11][A] - flash_data;
|
||||
int sector = offset / FLASH_SECTOR_SIZE;
|
||||
for (uint32 i = sector * FLASH_SECTOR_SIZE; i < (sector + 1) * FLASH_SECTOR_SIZE; i++)
|
||||
flash_data[i % PRGsize[ROM_CHIP]] = 0xFF;
|
||||
FCEU_printf("Flash sector #%d is erased (0x%08x - 0x%08x).\n", sector, offset, offset + FLASH_SECTOR_SIZE);
|
||||
}
|
||||
|
||||
// erase chip
|
||||
if ((flash_state == 6) &&
|
||||
(flash_buffer_a[0] == 0x5555) && (flash_buffer_v[0] == 0xAA) &&
|
||||
(flash_buffer_a[1] == 0x2AAA) && (flash_buffer_v[1] == 0x55) &&
|
||||
(flash_buffer_a[2] == 0x5555) && (flash_buffer_v[2] == 0x80) &&
|
||||
(flash_buffer_a[3] == 0x5555) && (flash_buffer_v[3] == 0xAA) &&
|
||||
(flash_buffer_a[4] == 0x2AAA) && (flash_buffer_v[4] == 0x55) &&
|
||||
(flash_buffer_a[4] == 0x5555) && (flash_buffer_v[4] == 0x10)) {
|
||||
memset(flash_data, 0xFF, PRGsize[ROM_CHIP]);
|
||||
FCEU_printf("Flash chip erased.\n");
|
||||
flash_state = 0;
|
||||
}
|
||||
|
||||
// write byte
|
||||
if ((flash_state == 4) &&
|
||||
(flash_buffer_a[0] == 0x5555) && (flash_buffer_v[0] == 0xAA) &&
|
||||
(flash_buffer_a[1] == 0x2AAA) && (flash_buffer_v[1] == 0x55) &&
|
||||
(flash_buffer_a[2] == 0x5555) && (flash_buffer_v[2] == 0xA0)) {
|
||||
int offset = &Page[A >> 11][A] - flash_data;
|
||||
if (CartBR(A) != 0xFF) {
|
||||
FCEU_PrintError("Error: can't write to 0x%08x, flash sector is not erased.\n", offset);
|
||||
}
|
||||
else {
|
||||
CartBW(A, V);
|
||||
}
|
||||
flash_state = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// not a command
|
||||
if (((A & 0xFFF) != 0x0AAA) && ((A & 0xFFF) != 0x0555)) {
|
||||
flash_state = 0;
|
||||
}
|
||||
|
||||
// reset
|
||||
if (V == 0xF0) {
|
||||
flash_state = 0;
|
||||
flash_id_mode = 0;
|
||||
}
|
||||
|
||||
UNROM512_Sync();
|
||||
}
|
||||
|
||||
static DECLFW(UNROM512HLatchWrite)
|
||||
{
|
||||
if (bus_conflict)
|
||||
latche = (V == CartBR(A)) ? V : 0;
|
||||
latche = V & CartBR(A);
|
||||
else
|
||||
latche = V;
|
||||
latcha = A;
|
||||
WHSync();
|
||||
}
|
||||
|
||||
static DECLFR(UNROM512LatchRead)
|
||||
{
|
||||
uint8 flash_id[3]={0xB5,0xB6,0xB7};
|
||||
if(software_id)
|
||||
{
|
||||
if(A&1)
|
||||
return flash_id[ROM_size>>4];
|
||||
else
|
||||
return 0xBF;
|
||||
}
|
||||
if(flash_save)
|
||||
{
|
||||
if(A < 0xC000)
|
||||
{
|
||||
if(GetFlashWriteCount(flash_bank,A))
|
||||
return FlashPage[A >> 11][A];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(GetFlashWriteCount(ROM_size-1,A))
|
||||
return FlashPage[A >> 11][A];
|
||||
}
|
||||
}
|
||||
return Page[A >> 11][A];
|
||||
UNROM512_Sync();
|
||||
}
|
||||
|
||||
static void UNROM512LatchPower(void) {
|
||||
latche = latcheinit;
|
||||
WHSync();
|
||||
SetReadHandler(0x8000, 0xFFFF, UNROM512LatchRead);
|
||||
latche = 0;
|
||||
UNROM512_Sync();
|
||||
SetReadHandler(0x8000, 0xFFFF, CartBR);
|
||||
if(!flash_save)
|
||||
SetWriteHandler(0x8000, 0xFFFF, UNROM512HLatchWrite);
|
||||
else
|
||||
{
|
||||
SetWriteHandler(0x8000,0xBFFF,UNROM512LLatchWrite);
|
||||
SetWriteHandler(0x8000,0xBFFF,UNROM512FlashWrite);
|
||||
SetWriteHandler(0xC000,0xFFFF,UNROM512HLatchWrite);
|
||||
}
|
||||
}
|
||||
|
||||
static void UNROM512LatchClose(void) {
|
||||
if(flash_write_count)
|
||||
FCEU_gfree(flash_write_count);
|
||||
if(flashdata)
|
||||
FCEU_gfree(flashdata);
|
||||
flash_write_count = NULL;
|
||||
flashdata = NULL;
|
||||
}
|
||||
|
||||
|
||||
static void UNROM512LSync() {
|
||||
int erase_a[5]={0x9555,0xAAAA,0x9555,0x9555,0xAAAA};
|
||||
int erase_d[5]={0xAA,0x55,0x80,0xAA,0x55};
|
||||
int erase_b[5]={1,0,1,1,0};
|
||||
|
||||
if(flash_mode==0)
|
||||
{
|
||||
if((latcha == erase_a[flash_state]) && (latche == erase_d[flash_state]) && (flash_bank == erase_b[flash_state]))
|
||||
{
|
||||
flash_state++;
|
||||
if(flash_state == 5)
|
||||
{
|
||||
flash_mode=1;
|
||||
}
|
||||
}
|
||||
else if ((flash_state==2)&&(latcha==0x9555)&&(latche==0xA0)&&(flash_bank==1))
|
||||
{
|
||||
flash_state++;
|
||||
flash_mode=2;
|
||||
}
|
||||
else if ((flash_state==2)&&(latcha==0x9555)&&(latche==0x90)&&(flash_bank==1))
|
||||
{
|
||||
flash_state=0;
|
||||
software_id=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(latche==0xF0)
|
||||
software_id=false;
|
||||
flash_state=0;
|
||||
}
|
||||
}
|
||||
else if(flash_mode==1) //Chip Erase or Sector Erase
|
||||
{
|
||||
if(latche==0x30)
|
||||
{
|
||||
inc_flash_write_count(flash_bank,latcha);
|
||||
memset(&FlashPage[(latcha & 0xF000) >> 11][latcha & 0xF000],0xFF,0x1000);
|
||||
}
|
||||
else if (latche==0x10)
|
||||
{
|
||||
for(uint32 i=0;i<(ROM_size*4);i++)
|
||||
inc_flash_write_count(i>>2,i<<12);
|
||||
memset(flashdata,0xFF,ROM_size*0x4000); //Erasing the rom chip as instructed. Crash rate calulated to be 99.9% :)
|
||||
}
|
||||
flash_state=0;
|
||||
flash_mode=0;
|
||||
}
|
||||
else if(flash_mode==2) //Byte Program
|
||||
{
|
||||
if(!GetFlashWriteCount(flash_bank,latcha))
|
||||
{
|
||||
inc_flash_write_count(flash_bank,latcha);
|
||||
memcpy(&FlashPage[(latcha & 0xF000) >> 11][latcha & 0xF000],&Page[(latcha & 0xF000)>>11][latcha & 0xF000],0x1000);
|
||||
}
|
||||
FlashPage[latcha>>11][latcha]&=latche;
|
||||
flash_state=0;
|
||||
flash_mode=0;
|
||||
}
|
||||
}
|
||||
|
||||
static void UNROM512HSync()
|
||||
{
|
||||
flash_bank=latche&(ROM_size-1);
|
||||
|
||||
setprg16(0x8000, flash_bank);
|
||||
setprg16(0xc000, ~0);
|
||||
setfprg16(0x8000, flash_bank);
|
||||
setfprg16(0xC000, ~0);
|
||||
setchr8r(0, (latche & chrram_mask) >> 5);
|
||||
setmirror(MI_0+(latche>>7));
|
||||
if(flash_data)
|
||||
FCEU_gfree(flash_data);
|
||||
flash_data = NULL;
|
||||
}
|
||||
|
||||
void UNROM512_Init(CartInfo *info) {
|
||||
flash_state=0;
|
||||
flash_bank=0;
|
||||
flash_save=info->battery;
|
||||
info->Power = UNROM512LatchPower;
|
||||
info->Close = UNROM512LatchClose;
|
||||
GameStateRestore = StateRestore;
|
||||
|
||||
if(info->vram_size == 8192)
|
||||
chrram_mask = 0;
|
||||
else if (info->vram_size == 16384)
|
||||
chrram_mask = 0x20;
|
||||
else
|
||||
chrram_mask = 0x60;
|
||||
flash_state = 0;
|
||||
flash_id_mode = 0;
|
||||
flash_save = info->battery;
|
||||
bus_conflict = !info->battery; // Is it required by any game?
|
||||
|
||||
int mirror = (head.ROM_type & 1) | ((head.ROM_type & 8) >> 2);
|
||||
switch (mirror)
|
||||
|
@ -258,28 +195,29 @@ void UNROM512_Init(CartInfo *info) {
|
|||
break;
|
||||
}
|
||||
|
||||
bus_conflict = !info->battery;
|
||||
latcheinit = 0;
|
||||
WLSync = UNROM512LSync;
|
||||
WHSync = UNROM512HSync;
|
||||
info->Power = UNROM512LatchPower;
|
||||
info->Close = UNROM512LatchClose;
|
||||
GameStateRestore = StateRestore;
|
||||
if(flash_save)
|
||||
{
|
||||
flashdata = (uint8*)FCEU_gmalloc(ROM_size*0x4000);
|
||||
flash_write_count = (uint32*)FCEU_gmalloc(ROM_size*4*sizeof(uint32));
|
||||
info->SaveGame[0] = (uint8*)flash_write_count;
|
||||
info->SaveGame[1] = flashdata;
|
||||
info->SaveGameLen[0] = ROM_size*4*sizeof(uint32);
|
||||
info->SaveGameLen[1] = ROM_size*0x4000;
|
||||
AddExState(flash_write_count,ROM_size*4*sizeof(uint32),0,"FLASH_WRITE_COUNT");
|
||||
AddExState(flashdata,ROM_size*0x4000,0,"FLASH_DATA");
|
||||
AddExState(&flash_state,1,0,"FLASH_STATE");
|
||||
AddExState(&flash_mode,1,0,"FLASH_MODE");
|
||||
AddExState(&flash_bank,1,0,"FLASH_BANK");
|
||||
AddExState(&latcha,2,0,"LATA");
|
||||
// Allocate memory for flash
|
||||
flash_data = (uint8*)FCEU_gmalloc(PRGsize[ROM_CHIP]);
|
||||
// Copy ROM to flash data
|
||||
for (int i = 0; i < PRGsize[ROM_CHIP]; i++) {
|
||||
flash_data[i] = PRGptr[ROM_CHIP][i % PRGsize[ROM_CHIP]];
|
||||
}
|
||||
SetupCartPRGMapping(FLASH_CHIP, flash_data, PRGsize[ROM_CHIP], 1);
|
||||
info->SaveGame[0] = flash_data;
|
||||
info->SaveGameLen[0] = PRGsize[ROM_CHIP];
|
||||
|
||||
flash_id[0] = 0xBF;
|
||||
flash_id[1] = 0xB5 + (ROM_size >> 4);
|
||||
SetupCartPRGMapping(CFI_CHIP, flash_id, sizeof(flash_id), 0);
|
||||
|
||||
AddExState(flash_data, PRGsize[ROM_CHIP], 0, "FLSH");
|
||||
AddExState(&flash_state, 1, 0, "FLST");
|
||||
AddExState(&flash_id_mode, 1, 0, "FLMD");
|
||||
AddExState(flash_buffer_a, sizeof(flash_buffer_a), 0, "FLBA");
|
||||
AddExState(flash_buffer_v, sizeof(flash_buffer_v), 0, "FLBV");
|
||||
}
|
||||
AddExState(&latcha, 2, 0, "LATA");
|
||||
AddExState(&latche, 1, 0, "LATC");
|
||||
AddExState(&bus_conflict, 1, 0, "BUSC");
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ const char *FCEUI_GetAboutString(void)
|
|||
"zeromus, feos\n"
|
||||
"\n"
|
||||
"Current Contributors:\n"
|
||||
"CaH4e3, rainwarrior, owomomo, punkrockguy318\n"
|
||||
"CaH4e3, rainwarrior, owomomo, punkrockguy318, Cluster\n"
|
||||
"\n"
|
||||
"Past Contributors:\n"
|
||||
"xhainingx, gocha, AnS, mjbudd77\n"
|
||||
|
|
|
@ -671,7 +671,7 @@ void ConsoleViewGL_t::paintGL(void)
|
|||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_ONE, GL_ONE);
|
||||
glBlendFunc(GL_ONE, GL_ZERO);
|
||||
//glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
if ( textureType == GL_TEXTURE_RECTANGLE )
|
||||
|
|
|
@ -894,7 +894,6 @@ void consoleWin_t::createMainMenu(void)
|
|||
QActionGroup *group;
|
||||
int useNativeMenuBar;
|
||||
int customAutofireOnFrames, customAutofireOffFrames;
|
||||
ColorMenuItem *bgColorItem;
|
||||
//QShortcut *shortcut;
|
||||
|
||||
menubar = new consoleMenuBar(this);
|
||||
|
@ -1254,15 +1253,32 @@ void consoleWin_t::createMainMenu(void)
|
|||
|
||||
optMenu->addAction(act);
|
||||
|
||||
optMenu->addSeparator();
|
||||
|
||||
// Options -> Video BG Color
|
||||
fceuLoadConfigColor( "SDL.VideoBgColor", &videoBgColor );
|
||||
|
||||
bgColorItem = new ColorMenuItem( tr("BG Side Panel Color"), "SDL.VideoBgColor", this );
|
||||
bgColorItem->connectColor( &videoBgColor );
|
||||
bgColorMenuItem = new ColorMenuItem( tr("BG Side Panel Color"), "SDL.VideoBgColor", this );
|
||||
bgColorMenuItem->connectColor( &videoBgColor );
|
||||
|
||||
optMenu->addAction(bgColorItem);
|
||||
optMenu->addAction(bgColorMenuItem);
|
||||
|
||||
connect( bgColorItem, SIGNAL(colorChanged(QColor&)), this, SLOT(videoBgColorChanged(QColor&)) );
|
||||
connect( bgColorMenuItem, SIGNAL(colorChanged(QColor&)), this, SLOT(videoBgColorChanged(QColor&)) );
|
||||
|
||||
// Options -> Use BG Palette for Video BG Color
|
||||
g_config->getOption( "SDL.UseBgPaletteForVideo", &usePaletteForVideoBg );
|
||||
|
||||
act = new QAction(tr("Use BG Palette for Video BG Color"), this);
|
||||
//act->setShortcut( QKeySequence(tr("Alt+/")));
|
||||
act->setCheckable(true);
|
||||
act->setChecked( usePaletteForVideoBg );
|
||||
act->setStatusTip(tr("Use BG Palette for Video BG Color"));
|
||||
//act->setIcon( style()->standardIcon( QStyle::SP_TitleBarMaxButton ) );
|
||||
connect(act, SIGNAL(triggered(bool)), this, SLOT(toggleUseBgPaletteForVideo(bool)) );
|
||||
|
||||
optMenu->addAction(act);
|
||||
|
||||
bgColorMenuItem->setEnabled( !usePaletteForVideoBg );
|
||||
//-----------------------------------------------------------------------
|
||||
// Emulation
|
||||
|
||||
|
@ -2152,6 +2168,20 @@ void consoleWin_t::toggleMenuAutoHide(bool checked)
|
|||
g_config->save();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void consoleWin_t::toggleUseBgPaletteForVideo(bool checked)
|
||||
{
|
||||
usePaletteForVideoBg = checked;
|
||||
|
||||
g_config->setOption( "SDL.UseBgPaletteForVideo", usePaletteForVideoBg );
|
||||
g_config->save();
|
||||
|
||||
if ( !usePaletteForVideoBg )
|
||||
{
|
||||
fceuLoadConfigColor( "SDL.VideoBgColor", &videoBgColor );
|
||||
}
|
||||
bgColorMenuItem->setEnabled( !usePaletteForVideoBg );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void consoleWin_t::closeApp(void)
|
||||
{
|
||||
nes_shm->runEmulator = 0;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <QRecursiveMutex>
|
||||
#endif
|
||||
|
||||
#include "Qt/ColorMenu.h"
|
||||
#include "Qt/ConsoleViewerGL.h"
|
||||
#include "Qt/ConsoleViewerSDL.h"
|
||||
#include "Qt/GamePadConf.h"
|
||||
|
@ -259,6 +260,7 @@ class consoleWin_t : public QMainWindow
|
|||
|
||||
QTimer *gameTimer;
|
||||
QColor videoBgColor;
|
||||
ColorMenuItem *bgColorMenuItem;
|
||||
|
||||
std::string errorMsg;
|
||||
bool errorMsgValid;
|
||||
|
@ -453,6 +455,7 @@ class consoleWin_t : public QMainWindow
|
|||
void winActiveChanged(void);
|
||||
void emuFrameFinish(void);
|
||||
void toggleMenuAutoHide(bool);
|
||||
void toggleUseBgPaletteForVideo(bool);
|
||||
void videoBgColorChanged( QColor &c );
|
||||
void loadRomRequestCB( QString s );
|
||||
|
||||
|
|
|
@ -535,6 +535,7 @@ InitConfig()
|
|||
config->addOption('f', "fullscreen", "SDL.Fullscreen", 0);
|
||||
config->addOption("videoDriver", "SDL.VideoDriver", 0);
|
||||
config->addOption("SDL.VideoBgColor", "#000000");
|
||||
config->addOption("SDL.UseBgPaletteForVideo", false);
|
||||
config->addOption("SDL.VideoVsync", 1);
|
||||
|
||||
// set x/y res to 0 for automatic fullscreen resolution detection (no change)
|
||||
|
|
|
@ -89,6 +89,7 @@ bool pauseAfterPlayback = false;
|
|||
bool suggestReadOnlyReplay = true;
|
||||
bool showStatusIconOpt = true;
|
||||
bool drawInputAidsEnable = true;
|
||||
bool usePaletteForVideoBg = false;
|
||||
unsigned int gui_draw_area_width = 256;
|
||||
unsigned int gui_draw_area_height = 256;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ extern bool suggestReadOnlyReplay;
|
|||
extern bool emulatorCycleToggle;
|
||||
extern bool showStatusIconOpt;
|
||||
extern bool drawInputAidsEnable;
|
||||
extern bool usePaletteForVideoBg;
|
||||
extern unsigned int gui_draw_area_width;
|
||||
extern unsigned int gui_draw_area_height;
|
||||
extern unsigned int emulatorCycleCount;
|
||||
|
|
|
@ -65,7 +65,7 @@ static int cspec = 0;
|
|||
static int buttonConfigInProgress = 0;
|
||||
|
||||
extern int gametype;
|
||||
static int DTestButton(ButtConfig *bc);
|
||||
static int DTestButton(ButtConfig *bc, bool isFKB = false);
|
||||
|
||||
//std::list<gamepad_function_key_t *> gpKeySeqList;
|
||||
|
||||
|
@ -1416,12 +1416,18 @@ void ButtonConfigEnd()
|
|||
* Tests to see if a specified button is currently pressed.
|
||||
*/
|
||||
static int
|
||||
DTestButton(ButtConfig *bc)
|
||||
DTestButton(ButtConfig *bc, bool isFKB)
|
||||
{
|
||||
|
||||
if (bc->ButtType == BUTTC_KEYBOARD)
|
||||
{
|
||||
if (g_keyState[SDL_GetScancodeFromKey(bc->ButtonNum)])
|
||||
bool ignoreKB = false;
|
||||
bool fkbActv = g_fkbEnabled && (CurInputType[2] == SIFC_FKB);
|
||||
|
||||
if (fkbActv)
|
||||
{
|
||||
ignoreKB = !isFKB;
|
||||
}
|
||||
if (!ignoreKB && g_keyState[SDL_GetScancodeFromKey(bc->ButtonNum)])
|
||||
{
|
||||
bc->state = 1;
|
||||
return 1;
|
||||
|
@ -1753,6 +1759,10 @@ void FCEUD_SetInput(bool fourscore, bool microphone, ESI port0, ESI port1,
|
|||
CurInputType[1] = port1;
|
||||
CurInputType[2] = fcexp;
|
||||
}
|
||||
if (CurInputType[2] != SIFC_FKB)
|
||||
{
|
||||
g_fkbEnabled = false;
|
||||
}
|
||||
|
||||
replaceP2StartWithMicrophone = microphone;
|
||||
|
||||
|
@ -1880,7 +1890,7 @@ static void UpdateFKB(void)
|
|||
|
||||
vkeyDown = getFamilyKeyboardVirtualKey(50);
|
||||
|
||||
leftShiftDown = DTestButton(&fkbmap[50]) || vkeyDown;
|
||||
leftShiftDown = DTestButton(&fkbmap[50], true) || vkeyDown;
|
||||
|
||||
for (x = 0; x < FAMILYKEYBOARD_NUM_BUTTONS; x++)
|
||||
{
|
||||
|
@ -1896,7 +1906,7 @@ static void UpdateFKB(void)
|
|||
|
||||
vkeyDown = getFamilyKeyboardVirtualKey(x);
|
||||
|
||||
if (DTestButton(&fkbmap[x]) || vkeyDown)
|
||||
if (DTestButton(&fkbmap[x], true) || vkeyDown)
|
||||
{
|
||||
fkbkeys[x] = 1;
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "Qt/sdl-video.h"
|
||||
#include "Qt/AviRecord.h"
|
||||
#include "Qt/fceuWrapper.h"
|
||||
#include "Qt/ConsoleWindow.h"
|
||||
|
||||
#ifdef CREATE_AVI
|
||||
#include "../videolog/nesvideos-piece.h"
|
||||
|
@ -74,6 +75,7 @@ extern bool MaxSpeed;
|
|||
extern int input_display;
|
||||
extern int frame_display;
|
||||
extern int rerecord_display;
|
||||
extern uint8 PALRAM[0x20];
|
||||
|
||||
/**
|
||||
* Attempts to destroy the graphical video display. Returns 0 on
|
||||
|
@ -498,6 +500,19 @@ BlitScreen(uint8 *XBuf)
|
|||
{
|
||||
int i = nes_shm->pixBufIdx;
|
||||
|
||||
if (usePaletteForVideoBg)
|
||||
{
|
||||
unsigned char r, g, b;
|
||||
FCEUD_GetPalette(0x80 | PALRAM[0], &r, &g, &b);
|
||||
|
||||
if (consoleWindow)
|
||||
{
|
||||
QColor *bgColor = consoleWindow->getVideoBgColorPtr();
|
||||
|
||||
*bgColor = QColor::fromRgb(r,g,b);
|
||||
}
|
||||
}
|
||||
|
||||
doBlitScreen(XBuf, (uint8_t*)nes_shm->pixbuf[i]);
|
||||
|
||||
nes_shm->pixBufIdx = (i+1) % NES_VIDEO_BUFLEN;
|
||||
|
|
|
@ -108,7 +108,7 @@ public:
|
|||
int registerChanges(int mod_type, int start = 0, int end =-1, int size = 0, const char* comment = NULL, int consecutivenessTag = 0, RowsSelection* frameset = NULL);
|
||||
int registerAdjustLag(int start, int size);
|
||||
void registerMarkersChange(int modificationType, int start = 0, int end =-1, const char* comment = 0);
|
||||
void registerBookmarkSet(int slot, BOOKMARK& backupÑopy, int oldCurrentBranch);
|
||||
void registerBookmarkSet(int slot, BOOKMARK& backupcopy, int oldCurrentBranch);
|
||||
int registerBranching(int slot, bool markersWereChanged);
|
||||
void registerRecording(int frameOfChange, uint32 joypadDifferenceBits);
|
||||
int registerImport(MovieData& md, char* filename);
|
||||
|
|
|
@ -1078,12 +1078,12 @@ void CloseGame()
|
|||
|
||||
bool ALoad(const char *nameo, char* innerFilename, bool silent)
|
||||
{
|
||||
FCEUFILE* patchTrial = FCEU_fopen(nameo,nullptr,"rb",nullptr,-1);
|
||||
FILE* patchTrial = fopen(nameo, "rb");
|
||||
if(patchTrial)
|
||||
{
|
||||
char sig[10] = {0};
|
||||
FCEU_fread(sig,1,5,patchTrial);
|
||||
FCEU_fclose(patchTrial);
|
||||
fread(sig,1,5,patchTrial);
|
||||
fclose(patchTrial);
|
||||
if(!strcmp(sig,"PATCH"))
|
||||
{
|
||||
//assuming it's a patch:
|
||||
|
|
|
@ -729,7 +729,8 @@ BMAPPINGLocal bmap[] = {
|
|||
{"F-15 MMC3 Based", 259, BMCF15_Init},
|
||||
{"HP10xx/H20xx Boards", 260, BMCHPxx_Init},
|
||||
{"810544-CA-1", 261, BMC810544CA1_Init},
|
||||
{"SMD132/SMD133", 268, SMD132_SMD133_Init},
|
||||
{"AA6023/AA6023B", 268, AA6023_Init},
|
||||
{"COOLGIRL", 342, COOLGIRL_Init },
|
||||
|
||||
{"Impact Soft MMC3 Flash Board", 406, Mapper406_Init },
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ EMUFILE_MEMORY memory_savestate;
|
|||
// temporary buffer for compressed data of a savestate
|
||||
std::vector<uint8> compressed_buf;
|
||||
|
||||
#define SFMDATA_SIZE (64)
|
||||
#define SFMDATA_SIZE (128)
|
||||
static SFORMAT SFMDATA[SFMDATA_SIZE];
|
||||
static int SFEXINDEX;
|
||||
|
||||
|
|
|
@ -475,6 +475,7 @@ static BMAPPING bmap[] = {
|
|||
{ "FNS", FNS_Init, BMCFLAG_16KCHRR },
|
||||
{ "BS-400R", BS400R_Init, 0 },
|
||||
{ "BS-4040R", BS4040R_Init, 0 },
|
||||
{ "COOLGIRL", COOLGIRL_Init, 0 },
|
||||
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
|
|
@ -162,7 +162,8 @@ void MINDKIDS_Init(CartInfo *info);
|
|||
void FNS_Init(CartInfo *info);
|
||||
void BS400R_Init(CartInfo *info);
|
||||
void BS4040R_Init(CartInfo *info);
|
||||
void SMD132_SMD133_Init(CartInfo *info);
|
||||
void AA6023_Init(CartInfo *info);
|
||||
void COOLGIRL_Init(CartInfo* info);
|
||||
|
||||
extern uint8 *UNIFchrrama; // Meh. So I can stop CHR RAM
|
||||
// bank switcherooing with certain boards...
|
||||
|
|
|
@ -62,14 +62,14 @@
|
|||
|
||||
#define FCEU_VERSION_MAJOR 2
|
||||
#define FCEU_VERSION_MINOR 6
|
||||
#define FCEU_VERSION_PATCH 4
|
||||
#define FCEU_VERSION_PATCH 5
|
||||
|
||||
#define FCEU_VERSION_NUMERIC ( (FCEU_VERSION_MAJOR*10000) + (FCEU_VERSION_MINOR*100) + (FCEU_VERSION_PATCH) )
|
||||
#define FCEU_VERSION_MAJOR_DECODE(x) ( (x / 10000) )
|
||||
#define FCEU_VERSION_MINOR_DECODE(x) ( (x / 100) % 100 )
|
||||
#define FCEU_VERSION_PATCH_DECODE(x) (x % 100)
|
||||
|
||||
#define FCEU_VERSION_STRING "2.6.4" FCEU_SUBVERSION_STRING FCEU_FEATURE_STRING FCEU_COMPILER
|
||||
#define FCEU_VERSION_STRING "2.6.5" FCEU_SUBVERSION_STRING FCEU_FEATURE_STRING FCEU_COMPILER
|
||||
#define FCEU_NAME_AND_VERSION FCEU_NAME " " FCEU_VERSION_STRING
|
||||
|
||||
#endif
|
||||
|
|
|
@ -353,7 +353,7 @@ xcopy /y /d "$(ProjectDir)\..\src\drivers\win\7z_64.dll" "$(OutDir)"</Command>
|
|||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.;../src/drivers/win/zlib;../src/drivers/win/directx/x64;../src;../src/drivers/win/lua/include;userconfig;defaultconfig;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;WIN64;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;HAS_vsnprintf;_S9XLUA_H;NDEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>PUBLIC_RELEASE;WIN32;WIN64;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;HAS_vsnprintf;_S9XLUA_H;NDEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
|
@ -473,6 +473,7 @@ xcopy /y /d "$(ProjectDir)\..\src\drivers\win\7z_64.dll" "$(OutDir)"</Command>
|
|||
<ClCompile Include="..\src\boards\cheapocabra.cpp" />
|
||||
<ClCompile Include="..\src\boards\cityfighter.cpp" />
|
||||
<ClCompile Include="..\src\boards\coolboy.cpp" />
|
||||
<ClCompile Include="..\src\boards\coolgirl.cpp" />
|
||||
<ClCompile Include="..\src\boards\dance2000.cpp" />
|
||||
<ClCompile Include="..\src\boards\eh8813a.cpp" />
|
||||
<ClCompile Include="..\src\boards\et-100.cpp" />
|
||||
|
|
|
@ -81,11 +81,11 @@
|
|||
|
||||
<p>If you would like to test the current in-development version of FCEUX, interim builds are available here:</p>
|
||||
<ul>
|
||||
<li><a href="https://ci.appveyor.com/api/projects/zeromus/fceux/artifacts/fceux.zip?branch=master&job=Windows%2032">Windows 32-bit</a></li>
|
||||
<li><a href="https://ci.appveyor.com/api/projects/zeromus/fceux/artifacts/fceux64.zip?branch=master&job=Windows%2064">Windows 64-bit</a></li>
|
||||
<li><a href="https://ci.appveyor.com/api/projects/zeromus/fceux/artifacts/qfceux64.zip?branch=master&job=Win64%20Qt">Win 64 Qt/SDL</a></li>
|
||||
<li><a href="https://ci.appveyor.com/api/projects/zeromus/fceux/artifacts/fceux-2.6.3-amd64.deb?branch=master&job=Ubuntu">Ubuntu Linux</a></li>
|
||||
<li><a href="https://ci.appveyor.com/api/projects/zeromus/fceux/artifacts/fceux-2.6.3-Darwin.dmg?branch=master&job=MacOS">Mac OS X</a></li>
|
||||
<li><a href="https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-win32.zip">Windows 32-bit</a></li>
|
||||
<li><a href="https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-win64.zip">Windows 64-bit</a></li>
|
||||
<li><a href="https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-win64-QtSDL.zip">Win 64 Qt/SDL</a></li>
|
||||
<li><a href="https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-ubuntu-x64.deb">Ubuntu Linux</a></li>
|
||||
<li><a href="https://github.com/TASEmulators/fceux/releases/download/interim-build/fceux-Darwin.dmg">Mac OS X</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Source Code</h3>
|
||||
|
|
Loading…
Reference in New Issue