early-access version 3517
This commit is contained in:
parent
3a85013cbd
commit
f3d4eb0028
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 3515.
|
This is the source code for early-access 3517.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -280,6 +280,10 @@ void EmulatedController::LoadVirtualGamepadParams() {
|
|||||||
virtual_stick_params[Settings::NativeAnalog::LStick].Set("axis_y", 1);
|
virtual_stick_params[Settings::NativeAnalog::LStick].Set("axis_y", 1);
|
||||||
virtual_stick_params[Settings::NativeAnalog::RStick].Set("axis_x", 2);
|
virtual_stick_params[Settings::NativeAnalog::RStick].Set("axis_x", 2);
|
||||||
virtual_stick_params[Settings::NativeAnalog::RStick].Set("axis_y", 3);
|
virtual_stick_params[Settings::NativeAnalog::RStick].Set("axis_y", 3);
|
||||||
|
virtual_stick_params[Settings::NativeAnalog::LStick].Set("deadzone", 0.0f);
|
||||||
|
virtual_stick_params[Settings::NativeAnalog::LStick].Set("range", 1.0f);
|
||||||
|
virtual_stick_params[Settings::NativeAnalog::RStick].Set("deadzone", 0.0f);
|
||||||
|
virtual_stick_params[Settings::NativeAnalog::RStick].Set("range", 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmulatedController::ReloadInput() {
|
void EmulatedController::ReloadInput() {
|
||||||
|
@ -49,6 +49,7 @@ static void PrintHelp(const char* argv0) {
|
|||||||
" [options] <filename>\n"
|
" [options] <filename>\n"
|
||||||
"--room-name The name of the room\n"
|
"--room-name The name of the room\n"
|
||||||
"--room-description The room description\n"
|
"--room-description The room description\n"
|
||||||
|
"--bind-address The bind address for the room\n"
|
||||||
"--port The port used for the room\n"
|
"--port The port used for the room\n"
|
||||||
"--max_members The maximum number of players for this room\n"
|
"--max_members The maximum number of players for this room\n"
|
||||||
"--password The password for the room\n"
|
"--password The password for the room\n"
|
||||||
@ -195,6 +196,7 @@ int main(int argc, char** argv) {
|
|||||||
std::string web_api_url;
|
std::string web_api_url;
|
||||||
std::string ban_list_file;
|
std::string ban_list_file;
|
||||||
std::string log_file = "yuzu-room.log";
|
std::string log_file = "yuzu-room.log";
|
||||||
|
std::string bind_address;
|
||||||
u64 preferred_game_id = 0;
|
u64 preferred_game_id = 0;
|
||||||
u32 port = Network::DefaultRoomPort;
|
u32 port = Network::DefaultRoomPort;
|
||||||
u32 max_members = 16;
|
u32 max_members = 16;
|
||||||
@ -203,6 +205,7 @@ int main(int argc, char** argv) {
|
|||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{"room-name", required_argument, 0, 'n'},
|
{"room-name", required_argument, 0, 'n'},
|
||||||
{"room-description", required_argument, 0, 'd'},
|
{"room-description", required_argument, 0, 'd'},
|
||||||
|
{"bind-address", required_argument, 0, 's'},
|
||||||
{"port", required_argument, 0, 'p'},
|
{"port", required_argument, 0, 'p'},
|
||||||
{"max_members", required_argument, 0, 'm'},
|
{"max_members", required_argument, 0, 'm'},
|
||||||
{"password", required_argument, 0, 'w'},
|
{"password", required_argument, 0, 'w'},
|
||||||
@ -222,7 +225,8 @@ int main(int argc, char** argv) {
|
|||||||
InitializeLogging(log_file);
|
InitializeLogging(log_file);
|
||||||
|
|
||||||
while (optind < argc) {
|
while (optind < argc) {
|
||||||
int arg = getopt_long(argc, argv, "n:d:p:m:w:g:u:t:a:i:l:hv", long_options, &option_index);
|
int arg =
|
||||||
|
getopt_long(argc, argv, "n:d:s:p:m:w:g:u:t:a:i:l:hv", long_options, &option_index);
|
||||||
if (arg != -1) {
|
if (arg != -1) {
|
||||||
switch (static_cast<char>(arg)) {
|
switch (static_cast<char>(arg)) {
|
||||||
case 'n':
|
case 'n':
|
||||||
@ -231,6 +235,9 @@ int main(int argc, char** argv) {
|
|||||||
case 'd':
|
case 'd':
|
||||||
room_description.assign(optarg);
|
room_description.assign(optarg);
|
||||||
break;
|
break;
|
||||||
|
case 's':
|
||||||
|
bind_address.assign(optarg);
|
||||||
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
port = strtoul(optarg, &endarg, 0);
|
port = strtoul(optarg, &endarg, 0);
|
||||||
break;
|
break;
|
||||||
@ -295,6 +302,9 @@ int main(int argc, char** argv) {
|
|||||||
PrintHelp(argv[0]);
|
PrintHelp(argv[0]);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if (bind_address.empty()) {
|
||||||
|
LOG_INFO(Network, "Bind address is empty: defaulting to 0.0.0.0");
|
||||||
|
}
|
||||||
if (port > UINT16_MAX) {
|
if (port > UINT16_MAX) {
|
||||||
LOG_ERROR(Network, "Port needs to be in the range 0 - 65535!");
|
LOG_ERROR(Network, "Port needs to be in the range 0 - 65535!");
|
||||||
PrintHelp(argv[0]);
|
PrintHelp(argv[0]);
|
||||||
@ -358,8 +368,8 @@ int main(int argc, char** argv) {
|
|||||||
if (auto room = network.GetRoom().lock()) {
|
if (auto room = network.GetRoom().lock()) {
|
||||||
AnnounceMultiplayerRoom::GameInfo preferred_game_info{.name = preferred_game,
|
AnnounceMultiplayerRoom::GameInfo preferred_game_info{.name = preferred_game,
|
||||||
.id = preferred_game_id};
|
.id = preferred_game_id};
|
||||||
if (!room->Create(room_name, room_description, "", port, password, max_members, username,
|
if (!room->Create(room_name, room_description, bind_address, port, password, max_members,
|
||||||
preferred_game_info, std::move(verify_backend), ban_list,
|
username, preferred_game_info, std::move(verify_backend), ban_list,
|
||||||
enable_yuzu_mods)) {
|
enable_yuzu_mods)) {
|
||||||
LOG_INFO(Network, "Failed to create room: ");
|
LOG_INFO(Network, "Failed to create room: ");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -77,6 +77,14 @@ void Fermi2D::Blit() {
|
|||||||
const auto bytes_per_pixel = BytesPerBlock(PixelFormatFromRenderTargetFormat(src.format));
|
const auto bytes_per_pixel = BytesPerBlock(PixelFormatFromRenderTargetFormat(src.format));
|
||||||
const bool delegate_to_gpu = src.width > 512 && src.height > 512 && bytes_per_pixel <= 8 &&
|
const bool delegate_to_gpu = src.width > 512 && src.height > 512 && bytes_per_pixel <= 8 &&
|
||||||
src.format != regs.dst.format;
|
src.format != regs.dst.format;
|
||||||
|
|
||||||
|
auto srcX = args.src_x0;
|
||||||
|
auto srcY = args.src_y0;
|
||||||
|
if (args.sample_mode.origin == Origin::Corner) {
|
||||||
|
srcX -= (args.du_dx >> 33) << 32;
|
||||||
|
srcY -= (args.dv_dy >> 33) << 32;
|
||||||
|
}
|
||||||
|
|
||||||
Config config{
|
Config config{
|
||||||
.operation = regs.operation,
|
.operation = regs.operation,
|
||||||
.filter = args.sample_mode.filter,
|
.filter = args.sample_mode.filter,
|
||||||
@ -86,10 +94,10 @@ void Fermi2D::Blit() {
|
|||||||
.dst_y0 = args.dst_y0,
|
.dst_y0 = args.dst_y0,
|
||||||
.dst_x1 = args.dst_x0 + args.dst_width,
|
.dst_x1 = args.dst_x0 + args.dst_width,
|
||||||
.dst_y1 = args.dst_y0 + args.dst_height,
|
.dst_y1 = args.dst_y0 + args.dst_height,
|
||||||
.src_x0 = static_cast<s32>(args.src_x0 >> 32),
|
.src_x0 = static_cast<s32>(srcX >> 32),
|
||||||
.src_y0 = static_cast<s32>(args.src_y0 >> 32),
|
.src_y0 = static_cast<s32>(srcY >> 32),
|
||||||
.src_x1 = static_cast<s32>((args.du_dx * args.dst_width + args.src_x0) >> 32),
|
.src_x1 = static_cast<s32>((srcX + args.du_dx * args.dst_width) >> 32),
|
||||||
.src_y1 = static_cast<s32>((args.dv_dy * args.dst_height + args.src_y0) >> 32),
|
.src_y1 = static_cast<s32>((srcY + args.dv_dy * args.dst_height) >> 32),
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto need_align_to_pitch =
|
const auto need_align_to_pitch =
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
|
#include "common/bit_util.h"
|
||||||
#include "common/scope_exit.h"
|
#include "common/scope_exit.h"
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
@ -259,12 +260,13 @@ u32 Maxwell3D::GetMaxCurrentVertices() {
|
|||||||
size_t Maxwell3D::EstimateIndexBufferSize() {
|
size_t Maxwell3D::EstimateIndexBufferSize() {
|
||||||
GPUVAddr start_address = regs.index_buffer.StartAddress();
|
GPUVAddr start_address = regs.index_buffer.StartAddress();
|
||||||
GPUVAddr end_address = regs.index_buffer.EndAddress();
|
GPUVAddr end_address = regs.index_buffer.EndAddress();
|
||||||
static constexpr std::array<size_t, 4> max_sizes = {
|
static constexpr std::array<size_t, 3> max_sizes = {std::numeric_limits<u8>::max(),
|
||||||
std::numeric_limits<u8>::max(), std::numeric_limits<u16>::max(),
|
std::numeric_limits<u16>::max(),
|
||||||
std::numeric_limits<u32>::max(), std::numeric_limits<u32>::max()};
|
std::numeric_limits<u32>::max()};
|
||||||
const size_t byte_size = regs.index_buffer.FormatSizeInBytes();
|
const size_t byte_size = regs.index_buffer.FormatSizeInBytes();
|
||||||
|
const size_t log2_byte_size = Common::Log2Floor64(byte_size);
|
||||||
return std::min<size_t>(
|
return std::min<size_t>(
|
||||||
memory_manager.GetMemoryLayoutSize(start_address, byte_size * max_sizes[byte_size]) /
|
memory_manager.GetMemoryLayoutSize(start_address, byte_size * max_sizes[log2_byte_size]) /
|
||||||
byte_size,
|
byte_size,
|
||||||
static_cast<size_t>(end_address - start_address));
|
static_cast<size_t>(end_address - start_address));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user