mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
132e3e507d | ||
|
|
ffa06fbb09 | ||
|
|
028e6cd8a8 | ||
|
|
719063e996 | ||
|
|
5d40f36fa8 | ||
|
|
31ffcfc920 | ||
|
|
c9642b70f6 | ||
|
|
849fa57bf6 | ||
|
|
2c95ef76f1 | ||
|
|
4d9cb885b2 | ||
|
|
e375f98f7a | ||
|
|
1b80f3aea2 | ||
|
|
b0496645f1 | ||
|
|
235cb13647 | ||
|
|
504dd9f513 | ||
|
|
e3fedf1676 |
17
3rdparty/ccc/src/ccc/elf.cpp
vendored
17
3rdparty/ccc/src/ccc/elf.cpp
vendored
@@ -10,34 +10,35 @@ Result<ElfFile> ElfFile::parse(std::vector<u8> image)
|
||||
ElfFile elf;
|
||||
elf.image = std::move(image);
|
||||
|
||||
const ElfIdentHeader* ident = get_packed<ElfIdentHeader>(elf.image, 0);
|
||||
const ElfIdentHeader* ident = get_unaligned<ElfIdentHeader>(elf.image, 0);
|
||||
CCC_CHECK(ident, "ELF ident header out of range.");
|
||||
CCC_CHECK(ident->magic == CCC_FOURCC("\x7f\x45\x4c\x46"), "Not an ELF file.");
|
||||
CCC_CHECK(ident->e_class == ElfIdentClass::B32, "Wrong ELF class (not 32 bit).");
|
||||
|
||||
const ElfFileHeader* header = get_packed<ElfFileHeader>(elf.image, sizeof(ElfIdentHeader));
|
||||
const ElfFileHeader* header = get_unaligned<ElfFileHeader>(elf.image, sizeof(ElfIdentHeader));
|
||||
CCC_CHECK(header, "ELF file header out of range.");
|
||||
elf.file_header = *header;
|
||||
|
||||
const ElfSectionHeader* shstr_section_header = get_packed<ElfSectionHeader>(elf.image, header->shoff + header->shstrndx * sizeof(ElfSectionHeader));
|
||||
const ElfSectionHeader* shstr_section_header =
|
||||
get_unaligned<ElfSectionHeader>(elf.image, header->shoff + header->shstrndx * sizeof(ElfSectionHeader));
|
||||
CCC_CHECK(shstr_section_header, "ELF section name header out of range.");
|
||||
|
||||
for(u32 i = 0; i < header->shnum; i++) {
|
||||
u64 header_offset = header->shoff + i * sizeof(ElfSectionHeader);
|
||||
const ElfSectionHeader* section_header = get_packed<ElfSectionHeader>(elf.image, header_offset);
|
||||
const ElfSectionHeader* section_header = get_unaligned<ElfSectionHeader>(elf.image, header_offset);
|
||||
CCC_CHECK(section_header, "ELF section header out of range.");
|
||||
|
||||
const char* name = get_string(elf.image, shstr_section_header->offset + section_header->name);
|
||||
CCC_CHECK(section_header, "ELF section name out of range.");
|
||||
std::optional<std::string_view> name = get_string(elf.image, shstr_section_header->offset + section_header->name);
|
||||
CCC_CHECK(name.has_value(), "ELF section name out of range.");
|
||||
|
||||
ElfSection& section = elf.sections.emplace_back();
|
||||
section.name = name;
|
||||
section.name = *name;
|
||||
section.header = *section_header;
|
||||
}
|
||||
|
||||
for(u32 i = 0; i < header->phnum; i++) {
|
||||
u64 header_offset = header->phoff + i * sizeof(ElfProgramHeader);
|
||||
const ElfProgramHeader* program_header = get_packed<ElfProgramHeader>(elf.image, header_offset);
|
||||
const ElfProgramHeader* program_header = get_unaligned<ElfProgramHeader>(elf.image, header_offset);
|
||||
CCC_CHECK(program_header, "ELF program header out of range.");
|
||||
|
||||
elf.segments.emplace_back(*program_header);
|
||||
|
||||
25
3rdparty/ccc/src/ccc/elf_symtab.cpp
vendored
25
3rdparty/ccc/src/ccc/elf_symtab.cpp
vendored
@@ -60,7 +60,7 @@ Result<void> import_symbols(
|
||||
DemanglerFunctions demangler)
|
||||
{
|
||||
for(u32 i = 0; i < symtab.size() / sizeof(Symbol); i++) {
|
||||
const Symbol* symbol = get_packed<Symbol>(symtab, i * sizeof(Symbol));
|
||||
const Symbol* symbol = get_unaligned<Symbol>(symtab, i * sizeof(Symbol));
|
||||
CCC_ASSERT(symbol);
|
||||
|
||||
Address address;
|
||||
@@ -86,13 +86,14 @@ Result<void> import_symbols(
|
||||
}
|
||||
}
|
||||
|
||||
const char* string = get_string(strtab, symbol->name);
|
||||
CCC_CHECK(string, "Symbol string out of range.");
|
||||
std::optional<std::string_view> string_view = get_string(strtab, symbol->name);
|
||||
CCC_CHECK(string_view.has_value(), "Symbol string out of range.");
|
||||
std::string string(*string_view);
|
||||
|
||||
switch(symbol->type()) {
|
||||
case SymbolType::NOTYPE: {
|
||||
Result<Label*> label = database.labels.create_symbol(
|
||||
string, group.source, group.module_symbol, address, importer_flags, demangler);
|
||||
std::move(string), group.source, group.module_symbol, address, importer_flags, demangler);
|
||||
CCC_RETURN_IF_ERROR(label);
|
||||
|
||||
// These symbols get emitted at the same addresses as functions
|
||||
@@ -108,7 +109,7 @@ Result<void> import_symbols(
|
||||
case SymbolType::OBJECT: {
|
||||
if(symbol->size != 0) {
|
||||
Result<GlobalVariable*> global_variable = database.global_variables.create_symbol(
|
||||
string, group.source, group.module_symbol, address, importer_flags, demangler);
|
||||
std::move(string), group.source, group.module_symbol, address, importer_flags, demangler);
|
||||
CCC_RETURN_IF_ERROR(global_variable);
|
||||
|
||||
if(*global_variable) {
|
||||
@@ -116,7 +117,7 @@ Result<void> import_symbols(
|
||||
}
|
||||
} else {
|
||||
Result<Label*> label = database.labels.create_symbol(
|
||||
string, group.source, group.module_symbol, address, importer_flags, demangler);
|
||||
std::move(string), group.source, group.module_symbol, address, importer_flags, demangler);
|
||||
CCC_RETURN_IF_ERROR(label);
|
||||
}
|
||||
|
||||
@@ -124,7 +125,7 @@ Result<void> import_symbols(
|
||||
}
|
||||
case SymbolType::FUNC: {
|
||||
Result<Function*> function = database.functions.create_symbol(
|
||||
string, group.source, group.module_symbol, address, importer_flags, demangler);
|
||||
std::move(string), group.source, group.module_symbol, address, importer_flags, demangler);
|
||||
CCC_RETURN_IF_ERROR(function);
|
||||
|
||||
if(*function) {
|
||||
@@ -135,7 +136,7 @@ Result<void> import_symbols(
|
||||
}
|
||||
case SymbolType::FILE: {
|
||||
Result<SourceFile*> source_file = database.source_files.create_symbol(
|
||||
string, group.source, group.module_symbol);
|
||||
std::move(string), group.source, group.module_symbol);
|
||||
CCC_RETURN_IF_ERROR(source_file);
|
||||
|
||||
break;
|
||||
@@ -153,18 +154,18 @@ Result<void> print_symbol_table(FILE* out, std::span<const u8> symtab, std::span
|
||||
fprintf(out, " Num: Value Size Type Bind Vis Ndx Name\n");
|
||||
|
||||
for(u32 i = 0; i < symtab.size() / sizeof(Symbol); i++) {
|
||||
const Symbol* symbol = get_packed<Symbol>(symtab, i * sizeof(Symbol));
|
||||
const Symbol* symbol = get_unaligned<Symbol>(symtab, i * sizeof(Symbol));
|
||||
CCC_ASSERT(symbol);
|
||||
|
||||
const char* type = symbol_type_to_string(symbol->type());
|
||||
const char* bind = symbol_bind_to_string(symbol->bind());
|
||||
const char* visibility = symbol_visibility_to_string(symbol->visibility());
|
||||
|
||||
const char* string = get_string(strtab, symbol->name);
|
||||
CCC_CHECK(string, "Symbol string out of range.");
|
||||
std::optional<std::string_view> string = get_string(strtab, symbol->name);
|
||||
CCC_CHECK(string.has_value(), "Symbol string out of range.");
|
||||
|
||||
fprintf(out, "%6u: %08x %5u %-7s %-7s %-7s %3u %s\n",
|
||||
i, symbol->value, symbol->size, type, bind, visibility, symbol->shndx, string);
|
||||
i, symbol->value, symbol->size, type, bind, visibility, symbol->shndx, string->data());
|
||||
|
||||
}
|
||||
|
||||
|
||||
22
3rdparty/ccc/src/ccc/mdebug_section.cpp
vendored
22
3rdparty/ccc/src/ccc/mdebug_section.cpp
vendored
@@ -90,7 +90,7 @@ Result<void> SymbolTableReader::init(std::span<const u8> elf, s32 section_offset
|
||||
m_elf = elf;
|
||||
m_section_offset = section_offset;
|
||||
|
||||
m_hdrr = get_packed<SymbolicHeader>(m_elf, m_section_offset);
|
||||
m_hdrr = get_unaligned<SymbolicHeader>(m_elf, m_section_offset);
|
||||
CCC_CHECK(m_hdrr != nullptr, "MIPS debug section header out of bounds.");
|
||||
CCC_CHECK(m_hdrr->magic == 0x7009, "Invalid symbolic header.");
|
||||
|
||||
@@ -116,7 +116,7 @@ Result<File> SymbolTableReader::parse_file(s32 index) const
|
||||
File file;
|
||||
|
||||
u64 fd_offset = m_hdrr->file_descriptors_offset + index * sizeof(FileDescriptor);
|
||||
const FileDescriptor* fd_header = get_packed<FileDescriptor>(m_elf, fd_offset + m_fudge_offset);
|
||||
const FileDescriptor* fd_header = get_unaligned<FileDescriptor>(m_elf, fd_offset + m_fudge_offset);
|
||||
CCC_CHECK(fd_header != nullptr, "MIPS debug file descriptor out of bounds.");
|
||||
CCC_CHECK(fd_header->f_big_endian == 0, "Not little endian or bad file descriptor table.");
|
||||
|
||||
@@ -124,16 +124,16 @@ Result<File> SymbolTableReader::parse_file(s32 index) const
|
||||
|
||||
s32 rel_raw_path_offset = fd_header->strings_offset + fd_header->file_path_string_offset;
|
||||
s32 raw_path_offset = m_hdrr->local_strings_offset + rel_raw_path_offset + m_fudge_offset;
|
||||
const char* command_line_path = get_string(m_elf, raw_path_offset);
|
||||
if(command_line_path) {
|
||||
file.command_line_path = command_line_path;
|
||||
std::optional<std::string_view> command_line_path = get_string(m_elf, raw_path_offset);
|
||||
if(command_line_path.has_value()) {
|
||||
file.command_line_path = *command_line_path;
|
||||
}
|
||||
|
||||
// Parse local symbols.
|
||||
for(s64 j = 0; j < fd_header->symbol_count; j++) {
|
||||
u64 rel_symbol_offset = (fd_header->isym_base + j) * sizeof(SymbolHeader);
|
||||
u64 symbol_offset = m_hdrr->local_symbols_offset + rel_symbol_offset + m_fudge_offset;
|
||||
const SymbolHeader* symbol_header = get_packed<SymbolHeader>(m_elf, symbol_offset);
|
||||
const SymbolHeader* symbol_header = get_unaligned<SymbolHeader>(m_elf, symbol_offset);
|
||||
CCC_CHECK(symbol_header != nullptr, "Symbol header out of bounds.");
|
||||
|
||||
s32 strings_offset = m_hdrr->local_strings_offset + fd_header->strings_offset + m_fudge_offset;
|
||||
@@ -155,7 +155,7 @@ Result<File> SymbolTableReader::parse_file(s32 index) const
|
||||
for(s64 i = 0; i < fd_header->procedure_descriptor_count; i++) {
|
||||
u64 rel_procedure_offset = (fd_header->ipd_first + i) * sizeof(ProcedureDescriptor);
|
||||
u64 procedure_offset = m_hdrr->procedure_descriptors_offset + rel_procedure_offset + m_fudge_offset;
|
||||
const ProcedureDescriptor* procedure_descriptor = get_packed<ProcedureDescriptor>(m_elf, procedure_offset);
|
||||
const ProcedureDescriptor* procedure_descriptor = get_unaligned<ProcedureDescriptor>(m_elf, procedure_offset);
|
||||
CCC_CHECK(procedure_descriptor != nullptr, "Procedure descriptor out of bounds.");
|
||||
|
||||
CCC_CHECK(procedure_descriptor->symbol_index < file.symbols.size(), "Symbol index out of bounds.");
|
||||
@@ -175,7 +175,7 @@ Result<std::vector<Symbol>> SymbolTableReader::parse_external_symbols() const
|
||||
std::vector<Symbol> external_symbols;
|
||||
for(s64 i = 0; i < m_hdrr->external_symbols_count; i++) {
|
||||
u64 sym_offset = m_hdrr->external_symbols_offset + i * sizeof(ExternalSymbolHeader);
|
||||
const ExternalSymbolHeader* external_header = get_packed<ExternalSymbolHeader>(m_elf, sym_offset + m_fudge_offset);
|
||||
const ExternalSymbolHeader* external_header = get_unaligned<ExternalSymbolHeader>(m_elf, sym_offset + m_fudge_offset);
|
||||
CCC_CHECK(external_header != nullptr, "External header out of bounds.");
|
||||
|
||||
Result<Symbol> sym = get_symbol(external_header->symbol, m_elf, m_hdrr->external_strings_offset + m_fudge_offset);
|
||||
@@ -351,9 +351,9 @@ static Result<Symbol> get_symbol(const SymbolHeader& header, std::span<const u8>
|
||||
{
|
||||
Symbol symbol;
|
||||
|
||||
const char* string = get_string(elf, strings_offset + header.iss);
|
||||
CCC_CHECK(string, "Symbol has invalid string.");
|
||||
symbol.string = string;
|
||||
std::optional<std::string_view> string = get_string(elf, strings_offset + header.iss);
|
||||
CCC_CHECK(string.has_value(), "Symbol has invalid string.");
|
||||
symbol.string = string->data();
|
||||
|
||||
symbol.value = header.value;
|
||||
symbol.symbol_type = (SymbolType) header.st;
|
||||
|
||||
22
3rdparty/ccc/src/ccc/sndll.cpp
vendored
22
3rdparty/ccc/src/ccc/sndll.cpp
vendored
@@ -54,18 +54,19 @@ static const char* sndll_symbol_type_to_string(SNDLLSymbolType type);
|
||||
|
||||
Result<SNDLLFile> parse_sndll_file(std::span<const u8> image, Address address, SNDLLType type)
|
||||
{
|
||||
const u32* magic = get_packed<u32>(image, 0);
|
||||
std::optional<u32> magic = copy_unaligned<u32>(image, 0);
|
||||
CCC_CHECK(magic.has_value(), "Failed to read SNDLL header.");
|
||||
CCC_CHECK((*magic & 0xffffff) == CCC_FOURCC("SNR\00"), "Not a SNDLL %s.", address.valid() ? "section" : "file");
|
||||
|
||||
char version = *magic >> 24;
|
||||
switch(version) {
|
||||
case '1': {
|
||||
const SNDLLHeaderV1* header = get_packed<SNDLLHeaderV1>(image, 0);
|
||||
const SNDLLHeaderV1* header = get_unaligned<SNDLLHeaderV1>(image, 0);
|
||||
CCC_CHECK(header, "File too small to contain SNDLL V1 header.");
|
||||
return parse_sndll_common(image, address, type, header->common, SNDLL_V1);
|
||||
}
|
||||
case '2': {
|
||||
const SNDLLHeaderV2* header = get_packed<SNDLLHeaderV2>(image, 0);
|
||||
const SNDLLHeaderV2* header = get_unaligned<SNDLLHeaderV2>(image, 0);
|
||||
CCC_CHECK(header, "File too small to contain SNDLL V2 header.");
|
||||
return parse_sndll_common(image, address, type, header->common, SNDLL_V2);
|
||||
}
|
||||
@@ -84,10 +85,9 @@ static Result<SNDLLFile> parse_sndll_common(
|
||||
sndll.version = version;
|
||||
|
||||
if(common.elf_path) {
|
||||
const char* elf_path = get_string(image, common.elf_path);
|
||||
if(elf_path) {
|
||||
sndll.elf_path = elf_path;
|
||||
}
|
||||
std::optional<std::string_view> elf_path = get_string(image, common.elf_path);
|
||||
CCC_CHECK(elf_path.has_value(), "SNDLL header has invalid ELF path field.");
|
||||
sndll.elf_path = *elf_path;
|
||||
}
|
||||
|
||||
CCC_CHECK(common.symbol_count < (32 * 1024 * 1024) / sizeof(SNDLLSymbol), "SNDLL symbol count is too high.");
|
||||
@@ -95,10 +95,10 @@ static Result<SNDLLFile> parse_sndll_common(
|
||||
|
||||
for(u32 i = 0; i < common.symbol_count; i++) {
|
||||
u32 symbol_offset = common.symbols - address.get_or_zero() + i * sizeof(SNDLLSymbolHeader);
|
||||
const SNDLLSymbolHeader* symbol_header = get_packed<SNDLLSymbolHeader>(image, symbol_offset);
|
||||
const SNDLLSymbolHeader* symbol_header = get_unaligned<SNDLLSymbolHeader>(image, symbol_offset);
|
||||
CCC_CHECK(symbol_header, "SNDLL symbol out of range.");
|
||||
|
||||
const char* string = nullptr;
|
||||
std::optional<std::string_view> string;
|
||||
if(symbol_header->string) {
|
||||
string = get_string(image, symbol_header->string - address.get_or_zero());
|
||||
}
|
||||
@@ -106,7 +106,9 @@ static Result<SNDLLFile> parse_sndll_common(
|
||||
SNDLLSymbol& symbol = sndll.symbols.emplace_back();
|
||||
symbol.type = symbol_header->type;
|
||||
symbol.value = symbol_header->value;
|
||||
symbol.string = string;
|
||||
if(string.has_value()) {
|
||||
symbol.string = *string;
|
||||
}
|
||||
}
|
||||
|
||||
return sndll;
|
||||
|
||||
4
3rdparty/ccc/src/ccc/symbol_file.cpp
vendored
4
3rdparty/ccc/src/ccc/symbol_file.cpp
vendored
@@ -7,8 +7,8 @@ namespace ccc {
|
||||
|
||||
Result<std::unique_ptr<SymbolFile>> parse_symbol_file(std::vector<u8> image, std::string file_name)
|
||||
{
|
||||
const u32* magic = get_packed<u32>(image, 0);
|
||||
CCC_CHECK(magic, "File too small.");
|
||||
const std::optional<u32> magic = copy_unaligned<u32>(image, 0);
|
||||
CCC_CHECK(magic.has_value(), "File too small.");
|
||||
|
||||
std::unique_ptr<SymbolFile> symbol_file;
|
||||
|
||||
|
||||
13
3rdparty/ccc/src/ccc/util.cpp
vendored
13
3rdparty/ccc/src/ccc/util.cpp
vendored
@@ -51,14 +51,17 @@ void set_custom_error_callback(CustomErrorCallback callback)
|
||||
custom_error_callback = callback;
|
||||
}
|
||||
|
||||
const char* get_string(std::span<const u8> bytes, u64 offset)
|
||||
std::optional<std::string_view> get_string(std::span<const u8> bytes, u64 offset)
|
||||
{
|
||||
for(const unsigned char* c = bytes.data() + offset; c < bytes.data() + bytes.size(); c++) {
|
||||
if(*c == '\0') {
|
||||
return (const char*) &bytes[offset];
|
||||
for(u64 i = offset; i < bytes.size(); i++) {
|
||||
if(bytes[i] == '\0') {
|
||||
return std::string_view(
|
||||
reinterpret_cast<const char*>(&bytes[offset]),
|
||||
reinterpret_cast<const char*>(&bytes[i]));
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::string merge_paths(const std::string& base, const std::string& path)
|
||||
|
||||
41
3rdparty/ccc/src/ccc/util.h
vendored
41
3rdparty/ccc/src/ccc/util.h
vendored
@@ -71,8 +71,15 @@ void set_custom_error_callback(CustomErrorCallback callback);
|
||||
exit(1); \
|
||||
}
|
||||
|
||||
#define CCC_ABORT_IF_FALSE(condition, ...) \
|
||||
if(!(condition)) { \
|
||||
ccc::Error error = ccc::format_error(__FILE__, __LINE__, __VA_ARGS__); \
|
||||
ccc::report_error(error); \
|
||||
abort(); \
|
||||
}
|
||||
|
||||
#define CCC_ASSERT(condition) \
|
||||
CCC_CHECK_FATAL(condition, #condition)
|
||||
CCC_ABORT_IF_FALSE(condition, #condition)
|
||||
|
||||
// The main error handling construct in CCC. This class is used to bundle
|
||||
// together a return value and a pointer to error information, so that errors
|
||||
@@ -201,16 +208,38 @@ void warn_impl(const char* source_file, int source_line, const char* format, Arg
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
const T* get_packed(std::span<const u8> bytes, u64 offset)
|
||||
const T* get_aligned(std::span<const u8> bytes, u64 offset)
|
||||
{
|
||||
if(offset + sizeof(T) <= bytes.size()) {
|
||||
return reinterpret_cast<const T*>(&bytes[offset]);
|
||||
} else {
|
||||
if(offset > bytes.size() || bytes.size() - offset < sizeof(T) || offset % alignof(T) != 0) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return reinterpret_cast<const T*>(&bytes[offset]);
|
||||
}
|
||||
|
||||
const char* get_string(std::span<const u8> bytes, u64 offset);
|
||||
template <typename T>
|
||||
const T* get_unaligned(std::span<const u8> bytes, u64 offset)
|
||||
{
|
||||
if(offset > bytes.size() || bytes.size() - offset < sizeof(T)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return reinterpret_cast<const T*>(&bytes[offset]);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
std::optional<T> copy_unaligned(std::span<const u8> bytes, u64 offset)
|
||||
{
|
||||
if(offset > bytes.size() || bytes.size() - offset < sizeof(T)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
T value;
|
||||
memcpy(&value, &bytes[offset], sizeof(T));
|
||||
return value;
|
||||
}
|
||||
|
||||
std::optional<std::string_view> get_string(std::span<const u8> bytes, u64 offset);
|
||||
|
||||
#define CCC_BEGIN_END(x) (x).begin(), (x).end()
|
||||
#define CCC_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
@@ -18509,6 +18509,8 @@ SLES-52256:
|
||||
SLES-52257:
|
||||
name: "P.T.O. IV - Pacific Theater of Operations IV"
|
||||
region: "PAL-E"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 3 # Fixes graphical flickering.
|
||||
SLES-52258:
|
||||
name: "Romance of the Three Kingdoms VIII"
|
||||
region: "PAL-E"
|
||||
@@ -21503,47 +21505,42 @@ SLES-53332:
|
||||
region: "PAL-M4"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2
|
||||
recommendedBlendingLevel: 3 # Fixes banding and level lighting.
|
||||
autoFlush: 1 # Fixes sun shinging through surfaces and graphical corruptions.
|
||||
halfPixelOffset: 2 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 2 # Fixes black spots appearing on some surfaces and massively reduces RP TC and TU count.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
nativeScaling: 2 # Fixes bloom misaligment.
|
||||
SLES-53333:
|
||||
name: "Medal of Honor - Les Faucons de Guerre"
|
||||
region: "PAL-F"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2
|
||||
recommendedBlendingLevel: 3 # Fixes banding and level lighting.
|
||||
autoFlush: 1 # Fixes sun shinging through surfaces and graphical corruptions.
|
||||
halfPixelOffset: 2 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 2 # Fixes black spots appearing on some surfaces and massively reduces RP TC and TU count.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
nativeScaling: 2 # Fixes bloom misaligment.
|
||||
SLES-53334:
|
||||
name: "Medal of Honor - European Assault"
|
||||
region: "PAL-G"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2
|
||||
recommendedBlendingLevel: 3 # Fixes banding and level lighting.
|
||||
autoFlush: 1 # Fixes sun shinging through surfaces and graphical corruptions.
|
||||
halfPixelOffset: 2 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 2 # Fixes black spots appearing on some surfaces and massively reduces RP TC and TU count.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
nativeScaling: 2 # Fixes bloom misaligment.
|
||||
SLES-53335:
|
||||
name: "Medal of Honor - European Assault"
|
||||
region: "PAL-I"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2
|
||||
recommendedBlendingLevel: 3 # Fixes banding and level lighting.
|
||||
autoFlush: 1 # Fixes sun shinging through surfaces and graphical corruptions.
|
||||
halfPixelOffset: 2 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 2 # Fixes black spots appearing on some surfaces and massively reduces RP TC and TU count.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
nativeScaling: 2 # Fixes bloom misaligment.
|
||||
SLES-53336:
|
||||
name: "Medal of Honor - European Assault"
|
||||
region: "PAL-S"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2
|
||||
recommendedBlendingLevel: 3 # Fixes banding and level lighting.
|
||||
autoFlush: 1 # Fixes sun shinging through surfaces and graphical corruptions.
|
||||
halfPixelOffset: 2 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 2 # Fixes black spots appearing on some surfaces and massively reduces RP TC and TU count.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
nativeScaling: 2 # Fixes bloom misaligment.
|
||||
SLES-53338:
|
||||
name: "Victorious Boxers 2 - Fighting Spirit"
|
||||
region: "PAL-M3"
|
||||
@@ -29948,11 +29945,10 @@ SLKA-25243:
|
||||
name: "Medal of Honor - European Assault"
|
||||
region: "NTSC-K"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2
|
||||
recommendedBlendingLevel: 3 # Fixes banding and level lighting.
|
||||
autoFlush: 1 # Fixes sun shinging through surfaces and graphical corruptions.
|
||||
halfPixelOffset: 2 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 2 # Fixes black spots appearing on some surfaces and massively reduces RP TC and TU count.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
nativeScaling: 2 # Fixes bloom misaligment.
|
||||
SLKA-25244:
|
||||
name: "WWE SmackDown! vs. Raw"
|
||||
region: "NTSC-K"
|
||||
@@ -31187,11 +31183,10 @@ SLPM-55037:
|
||||
name: "Medal of Honor - European Assault [EASY 1980]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2
|
||||
recommendedBlendingLevel: 3 # Fixes banding and level lighting.
|
||||
autoFlush: 1 # Fixes sun shinging through surfaces and graphical corruptions.
|
||||
halfPixelOffset: 2 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 2 # Fixes black spots appearing on some surfaces and massively reduces RP TC and TU count.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
nativeScaling: 2 # Fixes bloom misaligment.
|
||||
SLPM-55038:
|
||||
name: "Grand Theft Auto - Liberty City Stories [Best Price]"
|
||||
region: "NTSC-J"
|
||||
@@ -33919,6 +33914,8 @@ SLPM-62144:
|
||||
SLPM-62145:
|
||||
name: "Teitoku no Ketsudan IV"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 3 # Fixes graphical flickering.
|
||||
SLPM-62146:
|
||||
name: "Chou Kousoku Mahjong Plus"
|
||||
region: "NTSC-J"
|
||||
@@ -35381,6 +35378,8 @@ SLPM-62469:
|
||||
SLPM-62470:
|
||||
name: "Teitoku no Ketsudan IV with Power Up Kit"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 3 # Fixes graphical flickering.
|
||||
memcardFilters:
|
||||
- "SLPM-62145"
|
||||
- "SLPM-62470"
|
||||
@@ -35652,6 +35651,8 @@ SLPM-62518:
|
||||
name-sort: "ていとくのけつだん4 [KOEI The Best]"
|
||||
name-en: "Teitoku no Ketsudan IV [Koei the Best]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 3 # Fixes graphical flickering.
|
||||
SLPM-62519:
|
||||
name: "三國志VIII [KOEI The Best]"
|
||||
name-sort: "さんごくし8 [KOEI The Best]"
|
||||
@@ -43063,11 +43064,10 @@ SLPM-66079:
|
||||
name: "Medal of Honor - Europe Kyoushuu"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2
|
||||
recommendedBlendingLevel: 3 # Fixes banding and level lighting.
|
||||
autoFlush: 1 # Fixes sun shinging through surfaces and graphical corruptions.
|
||||
halfPixelOffset: 2 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 2 # Fixes black spots appearing on some surfaces and massively reduces RP TC and TU count.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
nativeScaling: 2 # Fixes bloom misaligment.
|
||||
SLPM-66080:
|
||||
name: "GENERATION OF CHAOSIII 〜時の封印〜 [IFコレクション]"
|
||||
name-sort: "じぇねれーしょんおぶかおす 3 ときのふういん [あいであふぁくとりーこれくしょん]"
|
||||
@@ -45807,11 +45807,10 @@ SLPM-66514:
|
||||
name-en: "Medal of Honor - European Assault [EA Best Hits]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2
|
||||
recommendedBlendingLevel: 3 # Fixes banding and level lighting.
|
||||
autoFlush: 1 # Fixes sun shinging through surfaces and graphical corruptions.
|
||||
halfPixelOffset: 2 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 2 # Fixes black spots appearing on some surfaces and massively reduces RP TC and TU count.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
nativeScaling: 2 # Fixes bloom misaligment.
|
||||
SLPM-66515:
|
||||
name: "EA BEST HITS スター・ウォーズ エピソード3 シスの復讐"
|
||||
name-sort: "すたーうぉーず えぴそーど3 しすのふくしゅう [EA BEST HITS]"
|
||||
@@ -61062,6 +61061,8 @@ SLUS-20567:
|
||||
name: "P.T.O. IV - Pacific Theater of Operations"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 3 # Fixes graphical flickering.
|
||||
SLUS-20568:
|
||||
name: "Hard Hitter Tennis"
|
||||
region: "NTSC-U"
|
||||
@@ -64610,11 +64611,10 @@ SLUS-21199:
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2
|
||||
recommendedBlendingLevel: 3 # Fixes banding and level lighting.
|
||||
autoFlush: 1 # Fixes sun shinging through surfaces and graphical corruptions.
|
||||
halfPixelOffset: 2 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 2 # Fixes black spots appearing on some surfaces and massively reduces RP TC and TU count.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
nativeScaling: 2 # Fixes bloom misaligment.
|
||||
SLUS-21200:
|
||||
name: "Armored Core - Nine Breaker"
|
||||
region: "NTSC-U"
|
||||
|
||||
@@ -109,6 +109,9 @@
|
||||
03000000491900001904000000000000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000710100001904000000000000,Amazon Luna Controller,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b8,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b4,rightstick:b7,rightx:a3,righty:a4,start:b6,x:b3,y:b2,platform:Windows,
|
||||
0300000008100000e501000000000000,Anbernic Game Pad,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000020500000913000000000000,Anbernic RG P01,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000373500000710000000000000,Anbernic RG P01,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000373500004610000000000000,Anbernic RG P01,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000830500000160000000000000,Arcade,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b3,x:b4,y:b4,platform:Windows,
|
||||
03000000120c0000100e000000000000,Armor 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000490b00004406000000000000,ASCII Seamic Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows,
|
||||
@@ -498,8 +501,8 @@
|
||||
03000000d620000012a7000000000000,PowerA Fusion Nintendo Switch Fight Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000dd62000016a7000000000000,PowerA Fusion Pro Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000d620000013a7000000000000,PowerA Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000d62000002640000000000000,PowerA OPS Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000d62000003340000000000000,PowerA OPS Pro Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000d62000002640000000000000,PowerA OPS Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000d62000006dca000000000000,PowerA Pro Ex,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
0300000062060000d570000000000000,PowerA PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000d620000014a7000000000000,PowerA Spectra Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
@@ -881,6 +884,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000491900001904000001010000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Mac OS X,
|
||||
03000000710100001904000000010000,Amazon Luna Controller,a:b0,b:b1,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Mac OS X,
|
||||
0300000008100000e501000019040000,Anbernic Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a4,start:b11,x:b4,y:b3,platform:Mac OS X,
|
||||
03000000373500004610000001000000,Anbernic RG P01,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
03000000a30c00002700000003030000,Astro City Mini,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X,
|
||||
03000000a30c00002800000003030000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X,
|
||||
03000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,
|
||||
@@ -1204,6 +1208,10 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000491900001904000011010000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Linux,
|
||||
05000000710100001904000000010000,Amazon Luna Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
|
||||
0300000008100000e501000001010000,Anbernic Gamepad,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a4,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000020500000913000010010000,Anbernic RG P01,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000373500000710000010010000,Anbernic RG P01,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
030000005e0400008e02000072050000,Anbernic RG P01,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
05000000373500004610000001000000,Anbernic RG P01,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000790000003018000011010000,Arcade Fightstick F300,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000a30c00002700000011010000,Astro City Mini,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000a30c00002800000011010000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,
|
||||
@@ -1526,6 +1534,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
05000000504c415953544154494f4e00,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,
|
||||
060000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,
|
||||
030000004c050000a00b000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
030000004c050000c405000000810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
|
||||
030000004c050000a00b000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
|
||||
030000004c050000c405000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
030000004c050000c405000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
|
||||
|
||||
@@ -2238,17 +2238,17 @@ Leaderboard Position: {1} of {2}</source>
|
||||
<context>
|
||||
<name>CDVD</name>
|
||||
<message>
|
||||
<location filename="../../pcsx2/CDVD/CDVDcommon.cpp" line="286"/>
|
||||
<location filename="../../pcsx2/CDVD/CDVDcommon.cpp" line="287"/>
|
||||
<source>Game disc location is on a removable drive, performance issues such as jittering and freezing may occur.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/CDVD/CDVDcommon.cpp" line="381"/>
|
||||
<location filename="../../pcsx2/CDVD/CDVDcommon.cpp" line="382"/>
|
||||
<source>Saving CDVD block dump to '{}'.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/CDVD/CDVDcommon.cpp" line="411"/>
|
||||
<location filename="../../pcsx2/CDVD/CDVDcommon.cpp" line="412"/>
|
||||
<source>Precaching CDVD</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -2273,7 +2273,7 @@ Leaderboard Position: {1} of {2}</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/CDVD/CDVDdiscReader.cpp" line="199"/>
|
||||
<location filename="../../pcsx2/CDVD/CDVDdiscReader.cpp" line="201"/>
|
||||
<source>Precaching is not supported for discs.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
||||
@@ -3013,6 +3013,20 @@ void cdvdWrite(u8 key, u8 rt)
|
||||
case 0x08:
|
||||
cdvdWrite08(rt);
|
||||
break;
|
||||
case 0x09:
|
||||
/*
|
||||
The register 0xC, 0xD, 0xE give back MSF of the current sector being read/played from the actual DSP hardware. They are named "where" registers : where0, where1, where2.
|
||||
They can be read anytime on hw as long as there is a valid disc and mode configured properly. Register 0x9 is where_select register which determines the mode for this registers. The mode must be set according to the used disc.
|
||||
0 = CDDA
|
||||
1 = CDROM
|
||||
2 = DVD
|
||||
|
||||
If no disc or invalid mode for disc type then those registers return 0. Only official usage so far is cdvdman reading those registers and waiting to sync while doing SubQ.
|
||||
Only logging writes different than 0 is enough.
|
||||
*/
|
||||
if (rt != 0)
|
||||
Console.Warning("8bit write to addr 0x1f402009 = 0x%x", rt);
|
||||
break;
|
||||
case 0x0A:
|
||||
cdvdWrite0A(rt);
|
||||
break;
|
||||
@@ -3035,7 +3049,7 @@ void cdvdWrite(u8 key, u8 rt)
|
||||
cdvdWrite3A(rt);
|
||||
break;
|
||||
default:
|
||||
Console.Warning("IOP Unknown 8bit write to addr 0x1f4020%x = 0x%x", key, rt);
|
||||
Console.Warning("IOP Unknown 8bit write to addr 0x1f4020%02x = 0x%x", key, rt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "common/ProgressCallback.h"
|
||||
#include "common/StringUtil.h"
|
||||
|
||||
#include <array>
|
||||
#include <ctype.h>
|
||||
#include <exception>
|
||||
#include <memory>
|
||||
@@ -55,7 +56,7 @@ static OutputIsoFile blockDumpFile;
|
||||
// Information about tracks on disc
|
||||
u8 strack;
|
||||
u8 etrack;
|
||||
cdvdTrack tracks[100];
|
||||
std::array<cdvdTrack, 100> tracks;
|
||||
|
||||
// Assertion check for CDVD != NULL (in devel and debug builds), because its handier than
|
||||
// relying on DEP exceptions -- and a little more reliable too.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
class Error;
|
||||
class ProgressCallback;
|
||||
|
||||
typedef struct _cdvdTrackIndex
|
||||
struct cdvdTrackIndex
|
||||
{
|
||||
bool isPregap;
|
||||
u8 trackM; // current minute offset from first track (BCD encoded)
|
||||
@@ -20,9 +20,9 @@ typedef struct _cdvdTrackIndex
|
||||
u8 discS; // current sector location on the disc (BCD encoded)
|
||||
u8 discF; // current frame location on the disc (BCD encoded)
|
||||
|
||||
} cdvdTrackIndex;
|
||||
};
|
||||
|
||||
typedef struct _cdvdTrack
|
||||
struct cdvdTrack
|
||||
{
|
||||
u32 start_lba; // Starting lba of track, note that some formats will be missing 2 seconds, cue, bin
|
||||
u8 type; // Track Type
|
||||
@@ -36,10 +36,10 @@ typedef struct _cdvdTrack
|
||||
u8 discF; // current frame location on the disc (BCD encoded)
|
||||
|
||||
// 0 is pregap, 1 is data
|
||||
_cdvdTrackIndex index[2];
|
||||
} cdvdTrack;
|
||||
cdvdTrackIndex index[2];
|
||||
};
|
||||
|
||||
typedef struct _cdvdSubQ
|
||||
struct cdvdSubQ
|
||||
{
|
||||
u8 ctrl : 4; // control and adr bits
|
||||
u8 adr : 4; // control and adr bits, note that adr determines what SubQ info we're recieving.
|
||||
@@ -52,19 +52,19 @@ typedef struct _cdvdSubQ
|
||||
u8 discM; // current minute location on the disc (BCD encoded)
|
||||
u8 discS; // current sector location on the disc (BCD encoded)
|
||||
u8 discF; // current frame location on the disc (BCD encoded)
|
||||
} cdvdSubQ;
|
||||
};
|
||||
|
||||
typedef struct _cdvdTD
|
||||
struct cdvdTD
|
||||
{ // NOT bcd coded
|
||||
u32 lsn;
|
||||
u8 type;
|
||||
} cdvdTD;
|
||||
};
|
||||
|
||||
typedef struct _cdvdTN
|
||||
struct cdvdTN
|
||||
{
|
||||
u8 strack; //number of the first track (usually 1)
|
||||
u8 etrack; //number of the last track
|
||||
} cdvdTN;
|
||||
};
|
||||
|
||||
// SpindleCtrl Masks
|
||||
#define CDVD_SPINDLE_SPEED 0x7 // Speed ranges from 0-3 (1, 2, 3, 4x for DVD) and 0-5 (1, 2, 4, 12, 24x for CD)
|
||||
@@ -185,7 +185,7 @@ extern const CDVD_API CDVDapi_NoDisc;
|
||||
|
||||
extern u8 strack;
|
||||
extern u8 etrack;
|
||||
extern cdvdTrack tracks[100];
|
||||
extern std::array<cdvdTrack, 100> tracks;
|
||||
|
||||
extern void CDVDsys_ChangeSource(CDVD_SourceType type);
|
||||
extern void CDVDsys_SetFile(CDVD_SourceType srctype, std::string newfile);
|
||||
|
||||
@@ -54,7 +54,7 @@ static void lsn_to_msf(u8* minute, u8* second, u8* frame, u32 lsn)
|
||||
// TocStuff
|
||||
void cdvdParseTOC()
|
||||
{
|
||||
tracks[1].start_lba = 0;
|
||||
tracks.fill(cdvdTrack{});
|
||||
|
||||
if (!src->GetSectorCount())
|
||||
{
|
||||
@@ -76,35 +76,37 @@ void cdvdParseTOC()
|
||||
strack = 0xFF;
|
||||
etrack = 0;
|
||||
|
||||
int i = 0;
|
||||
|
||||
for (auto& entry : src->ReadTOC())
|
||||
{
|
||||
if (entry.track < 1 || entry.track > 99)
|
||||
const u8 track = entry.track;
|
||||
if (track < 1 || track >= tracks.size())
|
||||
{
|
||||
Console.Warning("CDVD: Invalid track index %u, ignoring\n", track);
|
||||
continue;
|
||||
strack = std::min(strack, entry.track);
|
||||
etrack = std::max(etrack, entry.track);
|
||||
tracks[i].start_lba = entry.lba;
|
||||
}
|
||||
strack = std::min(strack, track);
|
||||
etrack = std::max(etrack, track);
|
||||
tracks[track].start_lba = entry.lba;
|
||||
if ((entry.control & 0x0C) == 0x04)
|
||||
{
|
||||
std::array<u8, 2352> buffer;
|
||||
// Byte 15 of a raw CD data sector determines the track mode
|
||||
if (src->ReadSectors2352(entry.lba, 1, buffer.data()) && (buffer[15] & 3) == 2)
|
||||
{
|
||||
tracks[i].type = CDVD_MODE2_TRACK;
|
||||
tracks[track].type = CDVD_MODE2_TRACK;
|
||||
}
|
||||
else
|
||||
{
|
||||
tracks[i].type = CDVD_MODE1_TRACK;
|
||||
tracks[track].type = CDVD_MODE1_TRACK;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tracks[i].type = CDVD_AUDIO_TRACK;
|
||||
tracks[track].type = CDVD_AUDIO_TRACK;
|
||||
}
|
||||
fprintf(stderr, "Track %u start sector: %u\n", entry.track, entry.lba);
|
||||
|
||||
i += 1;
|
||||
#ifdef PCSX2_DEBUG
|
||||
DevCon.WriteLn("cdvdParseTOC: Track %u: LBA %u, Type %u\n", track, tracks[track].start_lba, tracks[track].type);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +133,7 @@ static void keepAliveThread()
|
||||
std::unique_lock<std::mutex> guard(s_keepalive_lock);
|
||||
|
||||
while (!s_keepalive_cv.wait_for(guard, std::chrono::seconds(30),
|
||||
[]() { return !s_keepalive_is_open; }))
|
||||
[]() { return !s_keepalive_is_open; }))
|
||||
{
|
||||
|
||||
//printf(" * keepAliveThread: polling drive.\n");
|
||||
@@ -271,20 +273,28 @@ static s32 DISCreadSubQ(u32 lsn, cdvdSubQ* subq)
|
||||
|
||||
memset(subq, 0, sizeof(cdvdSubQ));
|
||||
|
||||
lsn_to_msf(&subq->discM, &subq->discS, &subq->discF, lsn + 150);
|
||||
|
||||
u8 i = strack;
|
||||
while (i < etrack && lsn >= tracks[i + 1].start_lba)
|
||||
++i;
|
||||
|
||||
lsn -= tracks[i].start_lba;
|
||||
|
||||
lsn_to_msf(&subq->trackM, &subq->trackS, &subq->trackF, lsn);
|
||||
|
||||
subq->ctrl = tracks[i].type;
|
||||
|
||||
// It's important to note that we do _not_ use the current MSF values
|
||||
// from the host's device. We use the MSF values from the lsn.
|
||||
// An easy way to test an implementation is to see if the OSDSYS
|
||||
// CD player can display the correct minute and second values.
|
||||
// From my testing, the IOCTL returns 0 for ctrl. This also breaks
|
||||
// the OSDSYS player. The only "safe" values to receive from the IOCTL
|
||||
// are ADR, trackNum and trackIndex.
|
||||
if (!src->ReadTrackSubQ(subq))
|
||||
{
|
||||
lsn_to_msf(&subq->discM, &subq->discS, &subq->discF, lsn + 150);
|
||||
|
||||
u8 i = strack;
|
||||
while (i < etrack && lsn >= tracks[i + 1].start_lba)
|
||||
++i;
|
||||
|
||||
lsn -= tracks[i].start_lba;
|
||||
|
||||
lsn_to_msf(&subq->trackM, &subq->trackS, &subq->trackF, lsn);
|
||||
|
||||
subq->adr = 1;
|
||||
subq->ctrl = tracks[i].type;
|
||||
subq->trackNum = i;
|
||||
subq->trackIndex = 1;
|
||||
}
|
||||
@@ -470,11 +480,13 @@ static s32 DISCgetTOC(void* toc)
|
||||
{
|
||||
err = DISCgetTD(i, &trackInfo);
|
||||
lba_to_msf(trackInfo.lsn, &min, &sec, &frm);
|
||||
tocBuff[i * 10 + 30] = trackInfo.type;
|
||||
tocBuff[i * 10 + 32] = err == -1 ? 0 : dec_to_bcd(i); //number
|
||||
tocBuff[i * 10 + 37] = dec_to_bcd(min);
|
||||
tocBuff[i * 10 + 38] = dec_to_bcd(sec);
|
||||
tocBuff[i * 10 + 39] = dec_to_bcd(frm);
|
||||
|
||||
const u8 tocIndex = i - diskInfo.strack;
|
||||
tocBuff[tocIndex * 10 + 30] = trackInfo.type;
|
||||
tocBuff[tocIndex * 10 + 32] = err == -1 ? 0 : dec_to_bcd(i); //number
|
||||
tocBuff[tocIndex * 10 + 37] = dec_to_bcd(min);
|
||||
tocBuff[tocIndex * 10 + 38] = dec_to_bcd(sec);
|
||||
tocBuff[tocIndex * 10 + 39] = dec_to_bcd(frm);
|
||||
fprintf(stderr, "Track %u: %u mins %u secs %u frames\n", i, min, sec, frm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,18 +208,8 @@ bool IOCtlSrc::ReadTrackSubQ(cdvdSubQ* subQ) const
|
||||
}
|
||||
|
||||
subQ->adr = osSubQ.cdsc_adr;
|
||||
subQ->ctrl = osSubQ.cdsc_ctrl;
|
||||
subQ->trackNum = osSubQ.cdsc_trk;
|
||||
subQ->trackIndex = osSubQ.cdsc_ind;
|
||||
|
||||
subQ->discM = osSubQ.cdsc_absaddr.msf.minute;
|
||||
subQ->discS = osSubQ.cdsc_absaddr.msf.second;
|
||||
subQ->discF = osSubQ.cdsc_absaddr.msf.frame;
|
||||
|
||||
subQ->trackM = osSubQ.cdsc_reladdr.msf.minute;
|
||||
subQ->trackS = osSubQ.cdsc_reladdr.msf.second;
|
||||
subQ->trackF = osSubQ.cdsc_reladdr.msf.frame;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -320,17 +320,8 @@ bool IOCtlSrc::ReadTrackSubQ(cdvdSubQ* subQ) const
|
||||
else
|
||||
{
|
||||
subQ->adr = osSubQ.CurrentPosition.ADR;
|
||||
subQ->ctrl = osSubQ.CurrentPosition.Control;
|
||||
subQ->trackNum = osSubQ.CurrentPosition.TrackNumber;
|
||||
subQ->trackIndex = osSubQ.CurrentPosition.IndexNumber;
|
||||
|
||||
subQ->trackM = osSubQ.CurrentPosition.TrackRelativeAddress[0];
|
||||
subQ->trackS = osSubQ.CurrentPosition.TrackRelativeAddress[1];
|
||||
subQ->trackF = osSubQ.CurrentPosition.TrackRelativeAddress[2];
|
||||
|
||||
subQ->discM = osSubQ.CurrentPosition.AbsoluteAddress[0];
|
||||
subQ->discS = osSubQ.CurrentPosition.AbsoluteAddress[1];
|
||||
subQ->discF = osSubQ.CurrentPosition.AbsoluteAddress[2];
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -990,8 +990,8 @@ set(pcsx2x86Sources
|
||||
x86/ix86-32/iR5900Shift.cpp
|
||||
x86/ix86-32/iR5900Templates.cpp
|
||||
x86/ix86-32/recVTLB.cpp
|
||||
x86/newVif_Dynarec.cpp
|
||||
x86/newVif_UnpackSSE.cpp
|
||||
x86/Vif_Dynarec.cpp
|
||||
x86/Vif_UnpackSSE.cpp
|
||||
)
|
||||
|
||||
# x86 headers
|
||||
@@ -1031,15 +1031,15 @@ set(pcsx2x86Headers
|
||||
x86/microVU_Tables.inl
|
||||
x86/microVU_Upper.inl
|
||||
x86/newVif.h
|
||||
x86/newVif_UnpackSSE.h
|
||||
x86/Vif_UnpackSSE.h
|
||||
x86/R5900_Profiler.h
|
||||
)
|
||||
|
||||
# ARM64
|
||||
set(pcsx2arm64Sources
|
||||
arm64/AsmHelpers.cpp
|
||||
arm64/newVif_Dynarec.cpp
|
||||
arm64/newVif_UnpackNEON.cpp
|
||||
arm64/Vif_Dynarec.cpp
|
||||
arm64/Vif_UnpackNEON.cpp
|
||||
arm64/RecStubs.cpp
|
||||
)
|
||||
|
||||
|
||||
@@ -87,8 +87,7 @@ struct ConsoleLog : public LogBase
|
||||
// ConsoleLogFromVM
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Special console logger for Virtual Machine log sources, such as the EE and IOP console
|
||||
// writes (actual game developer messages and such). These logs do *not* automatically
|
||||
// append newlines, since the VM generates them manually; and they do *not* support printf
|
||||
// writes (actual game developer messages and such). These logs do *not* support printf
|
||||
// formatting, since anything coming over the EE/IOP consoles should be considered raw
|
||||
// string data. (otherwise %'s would get mis-interpreted).
|
||||
//
|
||||
@@ -102,22 +101,18 @@ public:
|
||||
{
|
||||
for (const char ch : msg)
|
||||
{
|
||||
if (ch == '\n')
|
||||
{
|
||||
if (!m_buffer.empty())
|
||||
{
|
||||
Console.WriteLn(conColor, m_buffer);
|
||||
m_buffer.clear();
|
||||
}
|
||||
}
|
||||
else if (ch < 0x20)
|
||||
{
|
||||
// Ignore control characters.
|
||||
// Otherwise you get fun bells going off.
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ignore control characters.
|
||||
// Otherwise you get fun bells going off.
|
||||
if (ch < 0x20)
|
||||
continue;
|
||||
|
||||
if (ch != '\n')
|
||||
m_buffer.push_back(ch);
|
||||
|
||||
if (ch == '\n' || m_buffer.size() >= 4096)
|
||||
{
|
||||
Console.WriteLn(conColor, m_buffer);
|
||||
m_buffer.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -623,7 +623,7 @@ void GameList::ScanDirectory(const char* path, bool recursive, bool only_cache,
|
||||
}
|
||||
|
||||
const std::string_view filename = Path::GetFileName(ffd.FileName);
|
||||
progress->SetFormattedStatusText(fmt::format(TRANSLATE_FS("GameList","Scanning {}..."), filename.data()).c_str());
|
||||
progress->SetStatusText(fmt::format(TRANSLATE_FS("GameList","Scanning {}..."), filename.data()).c_str());
|
||||
ScanFile(std::move(ffd.FileName), ffd.ModificationTime, lock, played_time_map, custom_attributes_ini);
|
||||
progress->SetProgressValue(files_scanned);
|
||||
}
|
||||
|
||||
@@ -420,10 +420,11 @@ __forceinline void UpdateSpdifMode()
|
||||
{
|
||||
const int OPM = PlayMode;
|
||||
|
||||
if (Spdif.Out & 0x4 && SPU2::MsgToConsole()) // use 24/32bit PCM data streaming
|
||||
if (Spdif.Out & 0x4) // use 24/32bit PCM data streaming
|
||||
{
|
||||
PlayMode = 8;
|
||||
SPU2::ConLog("* SPU2: WARNING: Possibly CDDA mode set!\n");
|
||||
if (SPU2::MsgToConsole())
|
||||
SPU2::ConLog("* SPU2: WARNING: Possibly CDDA mode set!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ bool _VIF0chain()
|
||||
}
|
||||
|
||||
pMem = (u32*)dmaGetAddr(vif0ch.madr, false);
|
||||
if (pMem == NULL)
|
||||
if (pMem == nullptr)
|
||||
{
|
||||
vif0.cmd = 0;
|
||||
vif0.tag.size = 0;
|
||||
|
||||
@@ -27,7 +27,7 @@ void vif1TransferToMemory()
|
||||
u128* pMem = (u128*)dmaGetAddr(vif1ch.madr, false);
|
||||
|
||||
// VIF from gsMemory
|
||||
if (pMem == NULL)
|
||||
if (pMem == nullptr)
|
||||
{ // Is vif0ptag empty?
|
||||
Console.WriteLn("Vif1 Tag BUSERR");
|
||||
dmacRegs.stat.BEIS = true; // Bus Error
|
||||
@@ -117,7 +117,7 @@ bool _VIF1chain()
|
||||
}
|
||||
|
||||
pMem = (u32*)dmaGetAddr(vif1ch.madr, !vif1ch.chcr.DIR);
|
||||
if (pMem == NULL)
|
||||
if (pMem == nullptr)
|
||||
{
|
||||
vif1.cmd = 0;
|
||||
vif1.tag.size = 0;
|
||||
@@ -305,8 +305,8 @@ __fi void vif1Interrupt()
|
||||
// from the GS then we handle that separately (KH2 for testing)
|
||||
if (vif1ch.chcr.DIR)
|
||||
{
|
||||
bool isDirect = (vif1.cmd & 0x7f) == 0x50;
|
||||
bool isDirectHL = (vif1.cmd & 0x7f) == 0x51;
|
||||
const bool isDirect = (vif1.cmd & 0x7f) == 0x50;
|
||||
const bool isDirectHL = (vif1.cmd & 0x7f) == 0x51;
|
||||
if ((isDirect && !gifUnit.CanDoPath2()) || (isDirectHL && !gifUnit.CanDoPath2HL()))
|
||||
{
|
||||
GUNIT_WARN("vif1Interrupt() - Waiting for Path 2 to be ready");
|
||||
|
||||
@@ -23,7 +23,7 @@ static u32 QWCinVIFMFIFO(u32 DrainADDR, u32 qwc)
|
||||
}
|
||||
else
|
||||
{
|
||||
u32 limit = dmacRegs.rbor.ADDR + dmacRegs.rbsr.RMSK + 16;
|
||||
const u32 limit = dmacRegs.rbor.ADDR + dmacRegs.rbsr.RMSK + 16;
|
||||
//Drain is higher than SPR so it has looped round,
|
||||
//calculate from base to the SPR tag addr and what is left in the top of the ring
|
||||
ret = ((spr0ch.madr - dmacRegs.rbor.ADDR) + (limit - DrainADDR)) >> 4;
|
||||
@@ -35,8 +35,8 @@ static u32 QWCinVIFMFIFO(u32 DrainADDR, u32 qwc)
|
||||
}
|
||||
static __fi bool mfifoVIF1rbTransfer()
|
||||
{
|
||||
u32 msize = dmacRegs.rbor.ADDR + dmacRegs.rbsr.RMSK + 16;
|
||||
u32 mfifoqwc = std::min(QWCinVIFMFIFO(vif1ch.madr, vif1ch.qwc), vif1ch.qwc);
|
||||
const u32 msize = dmacRegs.rbor.ADDR + dmacRegs.rbsr.RMSK + 16;
|
||||
const u32 mfifoqwc = std::min(QWCinVIFMFIFO(vif1ch.madr, vif1ch.qwc), vif1ch.qwc);
|
||||
u32* src;
|
||||
bool ret;
|
||||
|
||||
@@ -49,7 +49,7 @@ static __fi bool mfifoVIF1rbTransfer()
|
||||
/* Check if the transfer should wrap around the ring buffer */
|
||||
if ((vif1ch.madr + (mfifoqwc << 4)) > (msize))
|
||||
{
|
||||
int s1 = ((msize)-vif1ch.madr) >> 2;
|
||||
const int s1 = ((msize)-vif1ch.madr) >> 2;
|
||||
|
||||
VIF_LOG("Split MFIFO");
|
||||
|
||||
@@ -57,7 +57,7 @@ static __fi bool mfifoVIF1rbTransfer()
|
||||
vif1ch.madr = qwctag(vif1ch.madr);
|
||||
|
||||
src = (u32*)PSM(vif1ch.madr);
|
||||
if (src == NULL)
|
||||
if (src == nullptr)
|
||||
return false;
|
||||
|
||||
if (vif1.irqoffset.enabled)
|
||||
@@ -75,7 +75,7 @@ static __fi bool mfifoVIF1rbTransfer()
|
||||
vif1ch.madr = qwctag(vif1ch.madr);
|
||||
|
||||
src = (u32*)PSM(vif1ch.madr);
|
||||
if (src == NULL)
|
||||
if (src == nullptr)
|
||||
return false;
|
||||
VIF1transfer(src, ((mfifoqwc << 2) - s1));
|
||||
}
|
||||
@@ -86,7 +86,7 @@ static __fi bool mfifoVIF1rbTransfer()
|
||||
|
||||
/* it doesn't, so just transfer 'qwc*4' words */
|
||||
src = (u32*)PSM(vif1ch.madr);
|
||||
if (src == NULL)
|
||||
if (src == nullptr)
|
||||
return false;
|
||||
|
||||
if (vif1.irqoffset.enabled)
|
||||
@@ -133,7 +133,7 @@ static __fi void mfifo_VIF1chain()
|
||||
|
||||
//No need to exit on non-mfifo as it is indirect anyway, so it can be transferring this while spr refills the mfifo
|
||||
|
||||
if (pMem == NULL)
|
||||
if (pMem == nullptr)
|
||||
return;
|
||||
|
||||
if (vif1.irqoffset.enabled)
|
||||
@@ -158,7 +158,7 @@ void mfifoVifMaskMem(int id)
|
||||
//DevCon.Warning("VIF MFIFO MADR below bottom of ring buffer, wrapping VIF MADR = %x Ring Bottom %x", vif1ch.madr, dmacRegs.rbor.ADDR);
|
||||
vif1ch.madr = qwctag(vif1ch.madr);
|
||||
}
|
||||
if (vif1ch.madr > (dmacRegs.rbor.ADDR + (u32)dmacRegs.rbsr.RMSK)) //Usual scenario is the tag is near the end (Front Mission 4)
|
||||
if (vif1ch.madr > (dmacRegs.rbor.ADDR + static_cast<u32>(dmacRegs.rbsr.RMSK))) //Usual scenario is the tag is near the end (Front Mission 4)
|
||||
{
|
||||
//DevCon.Warning("VIF MFIFO MADR outside top of ring buffer, wrapping VIF MADR = %x Ring Top %x", vif1ch.madr, (dmacRegs.rbor.ADDR + dmacRegs.rbsr.RMSK)+16);
|
||||
vif1ch.madr = qwctag(vif1ch.madr);
|
||||
@@ -281,8 +281,8 @@ void vifMFIFOInterrupt()
|
||||
|
||||
if (vif1ch.chcr.DIR)
|
||||
{
|
||||
bool isDirect = (vif1.cmd & 0x7f) == 0x50;
|
||||
bool isDirectHL = (vif1.cmd & 0x7f) == 0x51;
|
||||
const bool isDirect = (vif1.cmd & 0x7f) == 0x50;
|
||||
const bool isDirectHL = (vif1.cmd & 0x7f) == 0x51;
|
||||
if ((isDirect && !gifUnit.CanDoPath2()) || (isDirectHL && !gifUnit.CanDoPath2HL()))
|
||||
{
|
||||
GUNIT_WARN("vifMFIFOInterrupt() - Waiting for Path 2 to be ready");
|
||||
|
||||
@@ -109,7 +109,7 @@ static __fi void vuExecMicro(int idx, u32 addr, bool requires_wait)
|
||||
}
|
||||
|
||||
GetVifX.queued_program = true;
|
||||
if ((s32)addr == -1)
|
||||
if (static_cast<s32>(addr) == -1)
|
||||
GetVifX.queued_pc = addr;
|
||||
else
|
||||
GetVifX.queued_pc = addr & (idx ? 0x7ffu : 0x1ffu);
|
||||
@@ -144,7 +144,7 @@ __fi int _vifCode_Direct(int pass, const u8* data, bool isDirectHL)
|
||||
vif1Only();
|
||||
pass1
|
||||
{
|
||||
int vifImm = (u16)vif1Regs.code;
|
||||
const int vifImm = static_cast<u16>(vif1Regs.code);
|
||||
vif1.tag.size = vifImm ? (vifImm * 4) : (65536 * 4);
|
||||
vif1.pass = 1;
|
||||
return 1;
|
||||
@@ -152,9 +152,9 @@ __fi int _vifCode_Direct(int pass, const u8* data, bool isDirectHL)
|
||||
pass2
|
||||
{
|
||||
const char* name = isDirectHL ? "DirectHL" : "Direct";
|
||||
GIF_TRANSFER_TYPE tranType = isDirectHL ? GIF_TRANS_DIRECTHL : GIF_TRANS_DIRECT;
|
||||
uint size = std::min(vif1.vifpacketsize, vif1.tag.size) * 4; // Get size in bytes
|
||||
uint ret = gifUnit.TransferGSPacketData(tranType, (u8*)data, size);
|
||||
const GIF_TRANSFER_TYPE tranType = isDirectHL ? GIF_TRANS_DIRECTHL : GIF_TRANS_DIRECT;
|
||||
const uint size = std::min(vif1.vifpacketsize, vif1.tag.size) * 4; // Get size in bytes
|
||||
const uint ret = gifUnit.TransferGSPacketData(tranType, (u8*)data, size);
|
||||
|
||||
vif1.tag.size -= ret / 4; // Convert to u32's
|
||||
vif1Regs.stat.VGW = false;
|
||||
@@ -202,7 +202,7 @@ vifOp(vifCode_Flush)
|
||||
//vifStruct& vifX = GetVifX;
|
||||
pass1or2
|
||||
{
|
||||
bool p1or2 = (gifRegs.stat.APATH != 0 && gifRegs.stat.APATH != 3);
|
||||
const bool p1or2 = (gifRegs.stat.APATH != 0 && gifRegs.stat.APATH != 3);
|
||||
vif1Regs.stat.VGW = false;
|
||||
vifFlush(idx);
|
||||
if (gifUnit.checkPaths(1, 1, 0) || p1or2)
|
||||
@@ -234,7 +234,7 @@ vifOp(vifCode_FlushA)
|
||||
pass1or2
|
||||
{
|
||||
//Gif_Path& p3 = gifUnit.gifPath[GIF_PATH_3];
|
||||
u32 gifBusy = gifUnit.checkPaths(1, 1, 1) || (gifRegs.stat.APATH != 0);
|
||||
const u32 gifBusy = gifUnit.checkPaths(1, 1, 1) || (gifRegs.stat.APATH != 0);
|
||||
//bool doStall = false;
|
||||
vif1Regs.stat.VGW = false;
|
||||
vifFlush(idx);
|
||||
@@ -298,7 +298,7 @@ vifOp(vifCode_Mark)
|
||||
vifStruct& vifX = GetVifX;
|
||||
pass1
|
||||
{
|
||||
vifXRegs.mark = (u16)vifXRegs.code;
|
||||
vifXRegs.mark = static_cast<u16>(vifXRegs.code);
|
||||
vifXRegs.stat.MRK = true;
|
||||
vifX.cmd = 0;
|
||||
vifX.pass = 0;
|
||||
@@ -311,7 +311,7 @@ static __fi void _vifCode_MPG(int idx, u32 addr, const u32* data, int size)
|
||||
{
|
||||
VURegs& VUx = idx ? VU1 : VU0;
|
||||
vifStruct& vifX = GetVifX;
|
||||
u16 vuMemSize = idx ? 0x4000 : 0x1000;
|
||||
const u16 vuMemSize = idx ? 0x4000 : 0x1000;
|
||||
pxAssert(VUx.Micro);
|
||||
|
||||
vifExecQueue(idx);
|
||||
@@ -371,8 +371,8 @@ vifOp(vifCode_MPG)
|
||||
vifStruct& vifX = GetVifX;
|
||||
pass1
|
||||
{
|
||||
int vifNum = (u8)(vifXRegs.code >> 16);
|
||||
vifX.tag.addr = (u16)(vifXRegs.code << 3) & (idx ? 0x3fff : 0xfff);
|
||||
const int vifNum = static_cast<u8>(vifXRegs.code >> 16);
|
||||
vifX.tag.addr = static_cast<u16>(vifXRegs.code << 3) & (idx ? 0x3fff : 0xfff);
|
||||
vifX.tag.size = vifNum ? (vifNum * 2) : 512;
|
||||
vifFlush(idx);
|
||||
|
||||
@@ -406,7 +406,7 @@ vifOp(vifCode_MPG)
|
||||
//DevCon.Warning("Vif%d MPG Split Overflow full %x", idx, vifX.tag.addr + vifX.tag.size*4);
|
||||
}
|
||||
_vifCode_MPG(idx, vifX.tag.addr, data, vifX.tag.size);
|
||||
int ret = vifX.tag.size;
|
||||
const int ret = vifX.tag.size;
|
||||
vifX.tag.size = 0;
|
||||
vifX.cmd = 0;
|
||||
vifX.pass = 0;
|
||||
@@ -430,7 +430,7 @@ vifOp(vifCode_MSCAL)
|
||||
return 0;
|
||||
}
|
||||
|
||||
vuExecMicro(idx, (u16)(vifXRegs.code), false);
|
||||
vuExecMicro(idx, static_cast<u16>(vifXRegs.code), false);
|
||||
vifX.cmd = 0;
|
||||
vifX.pass = 0;
|
||||
|
||||
@@ -455,7 +455,7 @@ vifOp(vifCode_MSCALF)
|
||||
{
|
||||
vifXRegs.stat.VGW = false;
|
||||
vifFlush(idx);
|
||||
if (u32 a = gifUnit.checkPaths(1, 1, 0))
|
||||
if (const u32 a = gifUnit.checkPaths(1, 1, 0))
|
||||
{
|
||||
GUNIT_WARN("Vif MSCALF: Stall! [%d,%d]", !!(a & 1), !!(a & 2));
|
||||
vif1Regs.stat.VGW = true;
|
||||
@@ -469,7 +469,7 @@ vifOp(vifCode_MSCALF)
|
||||
return 0;
|
||||
}
|
||||
|
||||
vuExecMicro(idx, (u16)(vifXRegs.code), true);
|
||||
vuExecMicro(idx, static_cast<u16>(vifXRegs.code), true);
|
||||
vifX.cmd = 0;
|
||||
vifX.pass = 0;
|
||||
vifExecQueue(idx);
|
||||
@@ -595,7 +595,7 @@ static __fi int _vifCode_STColRow(const u32* data, u32* pmem2)
|
||||
{
|
||||
vifStruct& vifX = GetVifX;
|
||||
|
||||
int ret = std::min(4 - vifX.tag.addr, vifX.vifpacketsize);
|
||||
const int ret = std::min(4 - vifX.tag.addr, vifX.vifpacketsize);
|
||||
pxAssume(vifX.tag.addr < 4);
|
||||
pxAssume(ret > 0);
|
||||
|
||||
@@ -641,7 +641,7 @@ vifOp(vifCode_STCol)
|
||||
}
|
||||
pass2
|
||||
{
|
||||
u32 ret = _vifCode_STColRow<idx>(data, &vifX.MaskCol._u32[vifX.tag.addr]);
|
||||
const u32 ret = _vifCode_STColRow<idx>(data, &vifX.MaskCol._u32[vifX.tag.addr]);
|
||||
if (idx && vifX.tag.size == 0)
|
||||
vu1Thread.WriteCol(vifX);
|
||||
return ret;
|
||||
@@ -662,7 +662,7 @@ vifOp(vifCode_STRow)
|
||||
}
|
||||
pass2
|
||||
{
|
||||
u32 ret = _vifCode_STColRow<idx>(data, &vifX.MaskRow._u32[vifX.tag.addr]);
|
||||
const u32 ret = _vifCode_STColRow<idx>(data, &vifX.MaskRow._u32[vifX.tag.addr]);
|
||||
if (idx && vifX.tag.size == 0)
|
||||
vu1Thread.WriteRow(vifX);
|
||||
return ret;
|
||||
@@ -676,8 +676,8 @@ vifOp(vifCode_STCycl)
|
||||
vifStruct& vifX = GetVifX;
|
||||
pass1
|
||||
{
|
||||
vifXRegs.cycle.cl = (u8)(vifXRegs.code);
|
||||
vifXRegs.cycle.wl = (u8)(vifXRegs.code >> 8);
|
||||
vifXRegs.cycle.cl = static_cast<u8>(vifXRegs.code);
|
||||
vifXRegs.cycle.wl = static_cast<u8>(vifXRegs.code >> 8);
|
||||
vifX.cmd = 0;
|
||||
vifX.pass = 0;
|
||||
}
|
||||
@@ -744,9 +744,9 @@ vifOp(vifCode_Unpack)
|
||||
{
|
||||
vifStruct& vifX = GetVifX;
|
||||
VIFregisters& vifRegs = vifXRegs;
|
||||
uint vl = vifX.cmd & 0x03;
|
||||
uint vn = (vifX.cmd >> 2) & 0x3;
|
||||
bool flg = (vifRegs.code >> 15) & 1;
|
||||
const uint vl = vifX.cmd & 0x03;
|
||||
const uint vn = (vifX.cmd >> 2) & 0x3;
|
||||
const bool flg = (vifRegs.code >> 15) & 1;
|
||||
static const char* const vntbl[] = {"S", "V2", "V3", "V4"};
|
||||
static const uint vltbl[] = {32, 16, 8, 5};
|
||||
|
||||
|
||||
@@ -43,4 +43,4 @@ alignas(16) extern nVifStruct nVif[2];
|
||||
alignas(16) extern nVifCall nVifUpk[(2 * 2 * 16) * 4]; // ([USN][Masking][Unpack Type]) [curCycle]
|
||||
alignas(16) extern u32 nVifMask[3][4][4]; // [MaskNumber][CycleNumber][Vector]
|
||||
|
||||
static constexpr bool newVifDynaRec = 1; // Use code in newVif_Dynarec.inl
|
||||
static constexpr bool newVifDynaRec = 1; // Use code in Vif_Dynarec.inl
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
|
||||
#include "arm64/newVif_UnpackNEON.h"
|
||||
#include "arm64/Vif_UnpackNEON.h"
|
||||
#include "arm64/AsmHelpers.h"
|
||||
#include "MTVU.h"
|
||||
|
||||
@@ -367,7 +367,9 @@ void VifUnpackNEON_Dynarec::ModUnpack(int upknum, bool PostOp)
|
||||
case 3:
|
||||
case 7:
|
||||
case 11:
|
||||
pxFailRel(fmt::format("Vpu/Vif - Invalid Unpack! [{}]", upknum).c_str());
|
||||
// TODO: Needs hardware testing.
|
||||
// Dynasty Warriors 5: Empire - Player 2 chose a character menu.
|
||||
Console.Warning("Vpu/Vif: Invalid Unpack %d", upknum);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
|
||||
#include "newVif_UnpackNEON.h"
|
||||
#include "Vif_UnpackNEON.h"
|
||||
#include "common/Perf.h"
|
||||
|
||||
namespace a64 = vixl::aarch64;
|
||||
@@ -345,7 +345,9 @@ void VifUnpackNEON_Base::xUnpack(int upknum) const
|
||||
case 3:
|
||||
case 7:
|
||||
case 11:
|
||||
pxFailRel(fmt::format("Vpu/Vif - Invalid Unpack! [{}]", upknum).c_str());
|
||||
// TODO: Needs hardware testing.
|
||||
// Dynasty Warriors 5: Empire - Player 2 chose a character menu.
|
||||
Console.Warning("Vpu/Vif: Invalid Unpack %d", upknum);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -117,10 +117,10 @@
|
||||
<ClCompile Include="arm64\AsmHelpers.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'!='ARM64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="arm64\newVif_Dynarec.cpp">
|
||||
<ClCompile Include="arm64\Vif_Dynarec.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'!='ARM64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="arm64\newVif_UnpackNEON.cpp">
|
||||
<ClCompile Include="arm64\Vif_UnpackNEON.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'!='ARM64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="arm64\RecStubs.cpp">
|
||||
@@ -457,10 +457,10 @@
|
||||
<ClCompile Include="Vif_Codes.cpp" />
|
||||
<ClCompile Include="Vif_Transfer.cpp" />
|
||||
<ClCompile Include="Vif_Unpack.cpp" />
|
||||
<ClCompile Include="x86\newVif_Dynarec.cpp">
|
||||
<ClCompile Include="x86\Vif_Dynarec.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'!='x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="x86\newVif_UnpackSSE.cpp">
|
||||
<ClCompile Include="x86\Vif_UnpackSSE.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'!='x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SPR.cpp" />
|
||||
@@ -579,7 +579,7 @@
|
||||
<ClInclude Include="arm64\AsmHelpers.h">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'!='ARM64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="arm64\newVif_UnpackNEON.h">
|
||||
<ClInclude Include="arm64\Vif_UnpackNEON.h">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'!='ARM64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CDVD\BlockdumpFileReader.h" />
|
||||
@@ -898,7 +898,7 @@
|
||||
<ClInclude Include="Vif_Dma.h" />
|
||||
<ClInclude Include="Vif_Unpack.h" />
|
||||
<ClInclude Include="x86\newVif.h" />
|
||||
<ClInclude Include="x86\newVif_UnpackSSE.h" />
|
||||
<ClInclude Include="x86\Vif_UnpackSSE.h" />
|
||||
<ClInclude Include="SPR.h" />
|
||||
<ClInclude Include="Gif.h" />
|
||||
<ClInclude Include="R5900.h" />
|
||||
|
||||
@@ -521,10 +521,10 @@
|
||||
<ClCompile Include="Vif_Unpack.cpp">
|
||||
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="x86\newVif_Dynarec.cpp">
|
||||
<ClCompile Include="x86\Vif_Dynarec.cpp">
|
||||
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="x86\newVif_UnpackSSE.cpp">
|
||||
<ClCompile Include="x86\Vif_UnpackSSE.cpp">
|
||||
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SPR.cpp">
|
||||
@@ -1425,10 +1425,10 @@
|
||||
<ClCompile Include="GS\Renderers\SW\GSSetupPrimCodeGenerator.arm64.cpp">
|
||||
<Filter>System\Ps2\GS\Renderers\Software</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="arm64\newVif_Dynarec.cpp">
|
||||
<ClCompile Include="arm64\Vif_Dynarec.cpp">
|
||||
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec\arm64</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="arm64\newVif_UnpackNEON.cpp">
|
||||
<ClCompile Include="arm64\Vif_UnpackNEON.cpp">
|
||||
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec\arm64</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="arm64\AsmHelpers.cpp">
|
||||
@@ -1532,7 +1532,7 @@
|
||||
<ClInclude Include="x86\newVif.h">
|
||||
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="x86\newVif_UnpackSSE.h">
|
||||
<ClInclude Include="x86\Vif_UnpackSSE.h">
|
||||
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SPR.h">
|
||||
@@ -2387,7 +2387,7 @@
|
||||
<ClInclude Include="GS\GSVector4i_arm64.h">
|
||||
<Filter>System\Ps2\GS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="arm64\newVif_UnpackNEON.h">
|
||||
<ClInclude Include="arm64\Vif_UnpackNEON.h">
|
||||
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec\arm64</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="arm64\AsmHelpers.h">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "newVif_UnpackSSE.h"
|
||||
#include "Vif_UnpackSSE.h"
|
||||
#include "MTVU.h"
|
||||
#include "common/Perf.h"
|
||||
#include "common/StringUtil.h"
|
||||
@@ -46,9 +46,9 @@ __fi void VifUnpackSSE_Dynarec::SetMasks(int cS) const
|
||||
const vifStruct& vif = MTVU_VifX;
|
||||
|
||||
//This could have ended up copying the row when there was no row to write.1810080
|
||||
u32 m0 = vB.mask; //The actual mask example 0x03020100
|
||||
u32 m3 = ((m0 & 0xaaaaaaaa) >> 1) & ~m0; //all the upper bits, so our example 0x01010000 & 0xFCFDFEFF = 0x00010000 just the cols (shifted right for maskmerge)
|
||||
u32 m2 = (m0 & 0x55555555) & (~m0 >> 1); // 0x1000100 & 0xFE7EFF7F = 0x00000100 Just the row
|
||||
const u32 m0 = vB.mask; //The actual mask example 0x03020100
|
||||
const u32 m3 = ((m0 & 0xaaaaaaaa) >> 1) & ~m0; //all the upper bits, so our example 0x01010000 & 0xFCFDFEFF = 0x00010000 just the cols (shifted right for maskmerge)
|
||||
const u32 m2 = (m0 & 0x55555555) & (~m0 >> 1); // 0x1000100 & 0xFE7EFF7F = 0x00000100 Just the row
|
||||
|
||||
if ((doMask && m2) || doMode)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ void VifUnpackSSE_Dynarec::doMaskWrite(const xRegisterSSE& regX) const
|
||||
pxAssertMsg(regX.Id <= 1, "Reg Overflow! XMM2 thru XMM6 are reserved for masking.");
|
||||
|
||||
const int cc = std::min(vCL, 3);
|
||||
u32 m0 = (vB.mask >> (cc * 8)) & 0xff; //The actual mask example 0xE4 (protect, col, row, clear)
|
||||
const u32 m0 = (vB.mask >> (cc * 8)) & 0xff; //The actual mask example 0xE4 (protect, col, row, clear)
|
||||
u32 m3 = ((m0 & 0xaa) >> 1) & ~m0; //all the upper bits (cols shifted right) cancelling out any write protects 0x10
|
||||
u32 m2 = (m0 & 0x55) & (~m0 >> 1); // all the lower bits (rows)cancelling out any write protects 0x04
|
||||
u32 m4 = (m0 & ~((m3 << 1) | m2)) & 0x55; // = 0xC0 & 0x55 = 0x40 (for merge mask)
|
||||
@@ -213,7 +213,9 @@ void VifUnpackSSE_Dynarec::ModUnpack(int upknum, bool PostOp)
|
||||
case 3:
|
||||
case 7:
|
||||
case 11:
|
||||
pxFailRel(fmt::format("Vpu/Vif - Invalid Unpack! [{}]", upknum).c_str());
|
||||
// TODO: Needs hardware testing.
|
||||
// Dynasty Warriors 5: Empire - Player 2 chose a character menu.
|
||||
Console.Warning("Vpu/Vif: Invalid Unpack %d", upknum);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -315,8 +317,8 @@ static u16 dVifComputeLength(uint cl, uint wl, u8 num, bool isFill)
|
||||
|
||||
if (!isFill)
|
||||
{
|
||||
uint skipSize = (cl - wl) * 16;
|
||||
uint blocks = (num + (wl - 1)) / wl; //Need to round up num's to calculate skip size correctly.
|
||||
const uint skipSize = (cl - wl) * 16;
|
||||
const uint blocks = (num + (wl - 1)) / wl; //Need to round up num's to calculate skip size correctly.
|
||||
length += (blocks - 1) * skipSize;
|
||||
}
|
||||
|
||||
@@ -368,15 +370,15 @@ _vifT __fi void dVifUnpack(const u8* data, bool isFill)
|
||||
// in u32 (aka x86 register).
|
||||
//
|
||||
// Warning the order of data in hash_key/key0/key1 depends on the nVifBlock struct
|
||||
u32 hash_key = (u32)(upkType & 0xFF) << 8 | (vifRegs.num & 0xFF);
|
||||
const u32 hash_key = static_cast<u32>(upkType & 0xFF) << 8 | (vifRegs.num & 0xFF);
|
||||
|
||||
u32 key1 = ((u32)vifRegs.cycle.wl << 24) | ((u32)vifRegs.cycle.cl << 16) | ((u32)(vif.start_aligned & 0xFF) << 8) | ((u32)vifRegs.mode & 0xFF);
|
||||
u32 key1 = (static_cast<u32>(vifRegs.cycle.wl) << 24) | (static_cast<u32>(vifRegs.cycle.cl) << 16) | (static_cast<u32>(vif.start_aligned & 0xFF) << 8) | (static_cast<u32>(vifRegs.mode) & 0xFF);
|
||||
if ((upkType & 0xf) != 9)
|
||||
key1 &= 0xFFFF01FF;
|
||||
|
||||
// Zero out the mask parameter if it's unused -- games leave random junk
|
||||
// values here which cause false recblock cache misses.
|
||||
u32 key0 = doMask ? vifRegs.mask : 0;
|
||||
const u32 key0 = doMask ? vifRegs.mask : 0;
|
||||
|
||||
block.hash_key = hash_key;
|
||||
block.key0 = key0;
|
||||
@@ -395,7 +397,7 @@ _vifT __fi void dVifUnpack(const u8* data, bool isFill)
|
||||
|
||||
{ // Execute the block
|
||||
const VURegs& VU = vuRegs[idx];
|
||||
const uint vuMemLimit = idx ? 0x4000 : 0x1000;
|
||||
constexpr uint vuMemLimit = idx ? 0x4000 : 0x1000;
|
||||
|
||||
u8* startmem = VU.Mem + (vif.tag.addr & (vuMemLimit - 0x10));
|
||||
u8* endmem = VU.Mem + vuMemLimit;
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "newVif_UnpackSSE.h"
|
||||
#include "Vif_UnpackSSE.h"
|
||||
#include "common/Perf.h"
|
||||
#include "fmt/core.h"
|
||||
|
||||
@@ -222,7 +222,7 @@ void VifUnpackSSE_Base::xUPK_V3_16() const
|
||||
//However - IF the end of this iteration of the unpack falls on a quadword boundary, W becomes 0
|
||||
//IsAligned is the position through the current QW in the vif packet
|
||||
//Iteration counts where we are in the packet.
|
||||
int result = (((UnpkLoopIteration / 4) + 1 + (4 - IsAligned)) & 0x3);
|
||||
const int result = (((UnpkLoopIteration / 4) + 1 + (4 - IsAligned)) & 0x3);
|
||||
|
||||
if ((UnpkLoopIteration & 0x1) == 0 && result == 0)
|
||||
xBLEND.PS(destReg, zeroReg, 0x8); //zero last word - tested on ps2
|
||||
@@ -308,7 +308,9 @@ void VifUnpackSSE_Base::xUnpack(int upknum) const
|
||||
case 3:
|
||||
case 7:
|
||||
case 11:
|
||||
pxFailRel(fmt::format("Vpu/Vif - Invalid Unpack! [{}]", upknum).c_str());
|
||||
// TODO: Needs hardware testing.
|
||||
// Dynasty Warriors 5: Empire - Player 2 chose a character menu.
|
||||
Console.Warning("Vpu/Vif: Invalid Unpack %d", upknum);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -328,7 +330,7 @@ VifUnpackSSE_Simple::VifUnpackSSE_Simple(bool usn_, bool domask_, int curCycle_)
|
||||
void VifUnpackSSE_Simple::doMaskWrite(const xRegisterSSE& regX) const
|
||||
{
|
||||
xMOVAPS(xmm7, ptr[dstIndirect]);
|
||||
int offX = std::min(curCycle, 3);
|
||||
const int offX = std::min(curCycle, 3);
|
||||
xPAND(regX, ptr32[nVifMask[0][offX]]);
|
||||
xPAND(xmm7, ptr32[nVifMask[1][offX]]);
|
||||
xPOR (regX, ptr32[nVifMask[2][offX]]);
|
||||
@@ -347,7 +349,7 @@ static void nVifGen(int usn, int mask, int curCycle)
|
||||
for (int i = 0; i < 16; ++i)
|
||||
{
|
||||
nVifCall& ucall(nVifUpk[((usnpart + maskpart + i) * 4) + curCycle]);
|
||||
ucall = NULL;
|
||||
ucall = nullptr;
|
||||
if (nVifT[i] == 0)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user