1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-23 11:13:19 +01:00
This commit is contained in:
Nekotekina 2014-07-10 02:07:53 +04:00
commit b5f376f834
5 changed files with 159 additions and 125 deletions

View File

@ -8,6 +8,9 @@ branches:
only:
- master
git:
submodules: false
before_install:
- echo "yes" | sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
- echo "yes" | sudo apt-add-repository 'deb http://repos.codelite.org/wx3.0/ubuntu/ precise universe'
@ -25,11 +28,11 @@ before_install:
sudo ./cmake-2.8.12.1-Linux-i386.sh --skip-license --prefix=/usr;
before_script:
- git submodule update --init --recursive
- git submodule update --init asmjit ffmpeg
- mkdir build
- cd build
- cmake ..
script:
- make
- make -j 4

56
appveyor.yml Normal file
View File

@ -0,0 +1,56 @@
# version format
version: 0.1.{build}
branches:
only:
- appveyorbuild
# blacklist
#except:
# - gh-pages
#---------------------------------#
# environment configuration #
#---------------------------------#
# clone directory
clone_folder: c:\projects\rpcs3
platform:
- x64
configuration:
- Release
install:
- cmd: cinst wget -x86
- cmd: cinst 7zip.commandline -x86
- cmd: git submodule update --init --recursive .\ffmpeg .\asmjit
- cmd: wget -q --no-check-certificate https://googledrive.com/host/0B3tDmChwjRbRTTdhaTFOeGN1eEU/wxWidgets.7z -O c:\projects\rpcs3\wxwidgets.7z
- cmd: 7z x C:\projects\rpcs3\wxwidgets.7z -oc:\projects\rpcs3\wxWidgets
build:
build_script:
- msbuild /m /p:Configuration=Release rpcs3_buildbot.sln
after_build:
- cmd: package.bat
artifacts:
- path: .\rpcs3*.7z
deploy: OFF
# - provider: FTP
# server:
# secure: kZT7rsbEPGQ0fC2GFRBGfL2vPwUgih2JkwjbSuw00T8=
# username:
# secure: YJzwsi4wfSezFLqaB9uiww==
# password:
# secure: EQ3xa2LoRgelAdE57+qakQ==
# folder: .\rpcs3\
# enable_ssl: false
test: OFF

View File

@ -1266,14 +1266,15 @@ static void blackman(float window[])
window[3] = ((100.f - SEVIRITY) / 100.f + SEVIRITY / 100.f*a3);
}
int CreateInterlaceTable(mem32_t ea, float srcH, float dstH, CellRescTableElement depth, int length)
int CreateInterlaceTable(u32 ea_addr, float srcH, float dstH, CellRescTableElement depth, int length)
{
float phi[4], transient[4], *buf32 = (float*)ea.GetAddr();
float phi[4], transient[4];
float y_fraction;
float bandwidth = 0.5f / (srcH / dstH);
float phi_b = 2.f * M_PI * bandwidth;
float window[4];
u16 *buf16 = (u16*)ea.GetAddr();
mem16_ptr_t buf16(ea_addr);
mem32_ptr_t buf32(ea_addr);
blackman(window);
@ -1312,9 +1313,9 @@ int CreateInterlaceTable(mem32_t ea, float srcH, float dstH, CellRescTableElemen
return CELL_OK;
}
int cellRescCreateInterlaceTable(mem32_t ea, float srcH, CellRescTableElement depth, int length)
int cellRescCreateInterlaceTable(u32 ea_addr, float srcH, CellRescTableElement depth, int length)
{
cellResc->Warning("cellRescCreateInterlaceTable(ea=0x%x, depth = %i, length = %i)", ea.GetAddr(), depth, length);
cellResc->Warning("cellRescCreateInterlaceTable(ea_addr=0x%x, depth = %i, length = %i)", ea_addr, depth, length);
if (!s_rescInternalInstance->m_bInitialized)
{
@ -1322,7 +1323,7 @@ int cellRescCreateInterlaceTable(mem32_t ea, float srcH, CellRescTableElement de
return CELL_RESC_ERROR_NOT_INITIALIZED;
}
if ((!ea.IsGood()) || (srcH <= 0.f) || (!(depth == CELL_RESC_ELEMENT_HALF || depth == CELL_RESC_ELEMENT_FLOAT)) || (length <= 0))
if ((ea_addr == NULL) || (srcH <= 0.f) || (!(depth == CELL_RESC_ELEMENT_HALF || depth == CELL_RESC_ELEMENT_FLOAT)) || (length <= 0))
{
cellResc->Error("cellRescCreateInterlaceTable : CELL_RESC_ERROR_NOT_INITIALIZED");
return CELL_RESC_ERROR_BAD_ARGUMENT;
@ -1337,9 +1338,9 @@ int cellRescCreateInterlaceTable(mem32_t ea, float srcH, CellRescTableElement de
float ratioModeCoefficient = (s_rescInternalInstance->m_initConfig.ratioMode != CELL_RESC_LETTERBOX) ? 1.f : (1.f - 2.f * XY_DELTA_LB);
float dstH = s_rescInternalInstance->m_dstHeight * ratioModeCoefficient * s_rescInternalInstance->m_ratioAdjY;
if (int retValue = CreateInterlaceTable(ea, srcH, dstH, depth, length) == CELL_OK)
if (int retValue = CreateInterlaceTable(ea_addr, srcH, dstH, depth, length) == CELL_OK)
{
s_rescInternalInstance->m_interlaceTableEA = ea;
s_rescInternalInstance->m_interlaceTableEA = ea_addr;
s_rescInternalInstance->m_interlaceElement = depth;
s_rescInternalInstance->m_interlaceTableLength = length;
return CELL_OK;

View File

@ -5,6 +5,7 @@
#include <algorithm>
#include <cctype>
#include <regex>
#define DEF_CONFIG_NAME "./rpcs3.ini"
@ -26,69 +27,40 @@ void saveIniFile()
getIniFile()->SaveFile(DEF_CONFIG_NAME);
}
std::pair<int, int> rDefaultSize = { -1, -1 };
Inis Ini;
static bool StringToBool(const wxString& str)
static bool StringToBool(const std::string& str)
{
if (
!str.CmpNoCase("enable") ||
!str.CmpNoCase("e") ||
!str.CmpNoCase("1") ||
!str.CmpNoCase("true") ||
!str.CmpNoCase("t"))
{
return true;
}
return false;
return std::regex_match(str.begin(), str.end(),
std::regex("1|e|t|enable|true", std::regex_constants::icase));
}
static wxString BoolToString(const bool b)
static inline std::string BoolToString(const bool b)
{
if (b) return "true";
return "false";
return b ? "true" : "false";
}
//takes a string of format "[number]x[number]" and returns a pair of ints
//example input would be "123x456" and the returned value would be {123,456}
static std::pair<int, int> StringToSize(const std::string& str)
{
std::pair<int, int> ret;
std::string s[2] = { "", "" };
for (uint i = 0, a = 0; i<str.size(); ++i)
{
if (!fmt::CmpNoCase(str.substr(i, 1), "x"))
{
if (++a >= 2) return rDefaultSize;
continue;
std::size_t start = 0, found;
std::vector<int> vec;
for (int i = 0; i < 2 && (found = str.find_first_of('x', start)); i++) {
try {
vec.push_back(std::stoi(str.substr(start, found == std::string::npos ? found : found - start)));
}
catch (const std::invalid_argument& e) {
return std::make_pair(-1, -1);
}
if (found == std::string::npos)
break;
start = found + 1;
}
if (vec.size() < 2 || vec[0] < 0 || vec[1] < 0)
return std::make_pair(-1, -1);
s[a] += str.substr(i, 1);
}
if (s[0].empty() || s[1].empty())
{
return rDefaultSize;
}
try{
ret.first = std::stoi(s[0]);
ret.first = std::stoi(s[1]);
}
catch (const std::invalid_argument &e)
{
return rDefaultSize;
}
if (ret.first < 0 || ret.second < 0)
{
return rDefaultSize;
}
return ret;
return std::make_pair(vec[0], vec[1]);
}
static std::string SizeToString(const std::pair<int, int>& size)
@ -96,77 +68,25 @@ static std::string SizeToString(const std::pair<int, int>& size)
return fmt::Format("%dx%d", size.first, size.second);
}
static wxPoint StringToPosition(const wxString& str)
{
wxPoint ret;
wxString s[2] = { wxEmptyString, wxEmptyString };
for (uint i = 0, a = 0; i<str.Length(); ++i)
{
if (!str(i, 1).CmpNoCase("x"))
{
if (++a >= 2) return wxDefaultPosition;
continue;
}
s[a] += str(i, 1);
}
if (s[0].IsEmpty() || s[1].IsEmpty())
{
return wxDefaultPosition;
}
s[0].ToLong((long*)&ret.x);
s[1].ToLong((long*)&ret.y);
if (ret.x <= 0 || ret.y <= 0)
{
return wxDefaultPosition;
}
return ret;
}
static WindowInfo StringToWindowInfo(const std::string& str)
{
WindowInfo ret = WindowInfo(rDefaultSize, rDefaultSize);
std::string s[4] = { "", "", "", "" };
for (uint i = 0, a = 0; i<str.size(); ++i)
{
if (!fmt::CmpNoCase(str.substr(i, 1), "x") || !fmt::CmpNoCase(str.substr(i, 1), ":"))
{
if (++a >= 4) return WindowInfo::GetDefault();
continue;
std::size_t start = 0, found;
std::vector<int> vec;
for (int i = 0; i < 4 && (found = str.find_first_of("x:", start)); i++) {
try {
vec.push_back(std::stoi(str.substr(start, found == std::string::npos ? found : found - start)));
}
s[a] += str.substr(i, 1);
catch (const std::invalid_argument& e) {
return WindowInfo::GetDefault();
}
if (found == std::string::npos)
break;
start = found + 1;
}
if (s[0].empty() || s[1].empty() || s[2].empty() || s[3].empty())
{
if (vec.size() < 4 || vec[0] <= 0 || vec[1] <= 0 || vec[2] < 0 || vec[3] < 0)
return WindowInfo::GetDefault();
}
try{
ret.size.first = std::stoi(s[0]);
ret.size.second = std::stoi(s[1]);
ret.position.first = std::stoi(s[2]);
ret.position.second = std::stoi(s[3]);
}
catch (const std::invalid_argument &e)
{
return WindowInfo::GetDefault();
}
if (ret.size.first <= 0 || ret.size.second <= 0)
{
return WindowInfo::GetDefault();
}
return ret;
return WindowInfo(std::make_pair(vec[0], vec[1]), std::make_pair(vec[2], vec[3]));
}
static std::string WindowInfoToString(const WindowInfo& wind)
@ -246,4 +166,4 @@ WindowInfo Ini::Load(const std::string& section, const std::string& key, const W
{
return StringToWindowInfo(m_Config->GetValue(section.c_str(), key.c_str(), WindowInfoToString(def_value).c_str()));
saveIniFile();
}
}

54
rpcs3_buildbot.sln Normal file
View File

@ -0,0 +1,54 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Windows Desktop
VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}"
ProjectSection(ProjectDependencies) = postProject
{AC40FF01-426E-4838-A317-66354CEFAE88} = {AC40FF01-426E-4838-A317-66354CEFAE88}
{C4A10229-4712-4BD2-B63E-50D93C67A038} = {C4A10229-4712-4BD2-B63E-50D93C67A038}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "stblib", "stblib", "{9D839DFB-76E6-4F10-8EED-BA2AC7CC3FB6}"
ProjectSection(SolutionItems) = preProject
stblib\stb_image.c = stblib\stb_image.c
stblib\stb_image.h = stblib\stb_image.h
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asmjit", "asmjitsrc\asmjit.vcxproj", "{AC40FF01-426E-4838-A317-66354CEFAE88}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "asmjit", "asmjit", "{E2A982F2-4B1A-48B1-8D77-A17A589C58D7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "emucore", "rpcs3\emucore.vcxproj", "{C4A10229-4712-4BD2-B63E-50D93C67A038}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug - MemLeak|x64 = Debug - MemLeak|x64
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - MemLeak|x64.Build.0 = Debug - MemLeak|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.ActiveCfg = Debug|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.Build.0 = Debug|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.ActiveCfg = Release|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.Build.0 = Release|x64
{AC40FF01-426E-4838-A317-66354CEFAE88}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{AC40FF01-426E-4838-A317-66354CEFAE88}.Debug|x64.ActiveCfg = Debug|x64
{AC40FF01-426E-4838-A317-66354CEFAE88}.Debug|x64.Build.0 = Debug|x64
{AC40FF01-426E-4838-A317-66354CEFAE88}.Release|x64.ActiveCfg = Release|x64
{AC40FF01-426E-4838-A317-66354CEFAE88}.Release|x64.Build.0 = Release|x64
{C4A10229-4712-4BD2-B63E-50D93C67A038}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64
{C4A10229-4712-4BD2-B63E-50D93C67A038}.Debug - MemLeak|x64.Build.0 = Debug - MemLeak|x64
{C4A10229-4712-4BD2-B63E-50D93C67A038}.Debug|x64.ActiveCfg = Debug|x64
{C4A10229-4712-4BD2-B63E-50D93C67A038}.Debug|x64.Build.0 = Debug|x64
{C4A10229-4712-4BD2-B63E-50D93C67A038}.Release|x64.ActiveCfg = Release|x64
{C4A10229-4712-4BD2-B63E-50D93C67A038}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{AC40FF01-426E-4838-A317-66354CEFAE88} = {E2A982F2-4B1A-48B1-8D77-A17A589C58D7}
EndGlobalSection
EndGlobal