commit
01e37962e7
|
@ -50,7 +50,7 @@ std::unique_ptr<Directory> Archive_RomFS::OpenDirectory(const std::string& path)
|
||||||
* @return Number of bytes read
|
* @return Number of bytes read
|
||||||
*/
|
*/
|
||||||
size_t Archive_RomFS::Read(const u64 offset, const u32 length, u8* buffer) const {
|
size_t Archive_RomFS::Read(const u64 offset, const u32 length, u8* buffer) const {
|
||||||
DEBUG_LOG(FILESYS, "called offset=%d, length=%d", offset, length);
|
DEBUG_LOG(FILESYS, "called offset=%llu, length=%d", offset, length);
|
||||||
memcpy(buffer, &raw_data[(u32)offset], length);
|
memcpy(buffer, &raw_data[(u32)offset], length);
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ u32 Directory_SDMC::Read(const u32 count, Entry* entries) {
|
||||||
const std::string& filename = file.virtualName;
|
const std::string& filename = file.virtualName;
|
||||||
Entry& entry = entries[entries_read];
|
Entry& entry = entries[entries_read];
|
||||||
|
|
||||||
WARN_LOG(FILESYS, "File %s: size=%d dir=%d", filename.c_str(), file.size, file.isDirectory);
|
WARN_LOG(FILESYS, "File %s: size=%llu dir=%d", filename.c_str(), file.size, file.isDirectory);
|
||||||
|
|
||||||
// TODO(Link Mauve): use a proper conversion to UTF-16.
|
// TODO(Link Mauve): use a proper conversion to UTF-16.
|
||||||
for (int j = 0; j < FILENAME_LENGTH; ++j) {
|
for (int j = 0; j < FILENAME_LENGTH; ++j) {
|
||||||
|
|
|
@ -153,7 +153,7 @@ public:
|
||||||
u64 offset = cmd_buff[1] | ((u64) cmd_buff[2]) << 32;
|
u64 offset = cmd_buff[1] | ((u64) cmd_buff[2]) << 32;
|
||||||
u32 length = cmd_buff[3];
|
u32 length = cmd_buff[3];
|
||||||
u32 address = cmd_buff[5];
|
u32 address = cmd_buff[5];
|
||||||
DEBUG_LOG(KERNEL, "Read %s %s: offset=0x%x length=%d address=0x%x",
|
DEBUG_LOG(KERNEL, "Read %s %s: offset=0x%llx length=%d address=0x%x",
|
||||||
GetTypeName().c_str(), GetName().c_str(), offset, length, address);
|
GetTypeName().c_str(), GetName().c_str(), offset, length, address);
|
||||||
cmd_buff[2] = backend->Read(offset, length, Memory::GetPointer(address));
|
cmd_buff[2] = backend->Read(offset, length, Memory::GetPointer(address));
|
||||||
break;
|
break;
|
||||||
|
@ -166,7 +166,7 @@ public:
|
||||||
u32 length = cmd_buff[3];
|
u32 length = cmd_buff[3];
|
||||||
u32 flush = cmd_buff[4];
|
u32 flush = cmd_buff[4];
|
||||||
u32 address = cmd_buff[6];
|
u32 address = cmd_buff[6];
|
||||||
DEBUG_LOG(KERNEL, "Write %s %s: offset=0x%x length=%d address=0x%x, flush=0x%x",
|
DEBUG_LOG(KERNEL, "Write %s %s: offset=0x%llx length=%d address=0x%x, flush=0x%x",
|
||||||
GetTypeName().c_str(), GetName().c_str(), offset, length, address, flush);
|
GetTypeName().c_str(), GetName().c_str(), offset, length, address, flush);
|
||||||
cmd_buff[2] = backend->Write(offset, length, flush, Memory::GetPointer(address));
|
cmd_buff[2] = backend->Write(offset, length, flush, Memory::GetPointer(address));
|
||||||
break;
|
break;
|
||||||
|
@ -184,7 +184,7 @@ public:
|
||||||
case FileCommand::SetSize:
|
case FileCommand::SetSize:
|
||||||
{
|
{
|
||||||
u64 size = cmd_buff[1] | ((u64)cmd_buff[2] << 32);
|
u64 size = cmd_buff[1] | ((u64)cmd_buff[2] << 32);
|
||||||
DEBUG_LOG(KERNEL, "SetSize %s %s size=%d", GetTypeName().c_str(), GetName().c_str(), size);
|
DEBUG_LOG(KERNEL, "SetSize %s %s size=%llu", GetTypeName().c_str(), GetName().c_str(), size);
|
||||||
backend->SetSize(size);
|
backend->SetSize(size);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
|
||||||
|
|
||||||
Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle);
|
Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle);
|
||||||
|
|
||||||
DEBUG_LOG(SVC, "called handle=0x%08X(%s:%s), nanoseconds=%d", handle, object->GetTypeName().c_str(),
|
DEBUG_LOG(SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, object->GetTypeName().c_str(),
|
||||||
object->GetName().c_str(), nano_seconds);
|
object->GetName().c_str(), nano_seconds);
|
||||||
|
|
||||||
_assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!");
|
_assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!");
|
||||||
|
@ -138,7 +138,7 @@ Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, bool wa
|
||||||
bool unlock_all = true;
|
bool unlock_all = true;
|
||||||
bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated
|
bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated
|
||||||
|
|
||||||
DEBUG_LOG(SVC, "called handle_count=%d, wait_all=%s, nanoseconds=%d",
|
DEBUG_LOG(SVC, "called handle_count=%d, wait_all=%s, nanoseconds=%lld",
|
||||||
handle_count, (wait_all ? "true" : "false"), nano_seconds);
|
handle_count, (wait_all ? "true" : "false"), nano_seconds);
|
||||||
|
|
||||||
// Iterate through each handle, synchronize kernel object
|
// Iterate through each handle, synchronize kernel object
|
||||||
|
@ -324,7 +324,7 @@ Result ClearEvent(Handle evt) {
|
||||||
|
|
||||||
/// Sleep the current thread
|
/// Sleep the current thread
|
||||||
void SleepThread(s64 nanoseconds) {
|
void SleepThread(s64 nanoseconds) {
|
||||||
DEBUG_LOG(SVC, "called nanoseconds=%d", nanoseconds);
|
DEBUG_LOG(SVC, "called nanoseconds=%lld", nanoseconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This returns the total CPU ticks elapsed since the CPU was powered-on
|
/// This returns the total CPU ticks elapsed since the CPU was powered-on
|
||||||
|
|
|
@ -35,7 +35,7 @@ inline void Read(T &var, const u32 raw_addr) {
|
||||||
|
|
||||||
// Reads other than u32 are untested, so I'd rather have them abort than silently fail
|
// Reads other than u32 are untested, so I'd rather have them abort than silently fail
|
||||||
if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) {
|
if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) {
|
||||||
ERROR_LOG(GPU, "unknown Read%d @ 0x%08X", sizeof(var) * 8, addr);
|
ERROR_LOG(GPU, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, addr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ inline void Write(u32 addr, const T data) {
|
||||||
|
|
||||||
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
|
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
|
||||||
if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) {
|
if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) {
|
||||||
ERROR_LOG(GPU, "unknown Write%d 0x%08X @ 0x%08X", sizeof(data) * 8, data, addr);
|
ERROR_LOG(GPU, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, data, addr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ inline void Read(T &var, const u32 addr) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ERROR_LOG(HW, "unknown Read%d @ 0x%08X", sizeof(var) * 8, addr);
|
ERROR_LOG(HW, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ inline void Write(u32 addr, const T data) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ERROR_LOG(HW, "unknown Write%d 0x%08X @ 0x%08X", sizeof(data) * 8, data, addr);
|
ERROR_LOG(HW, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, data, addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,12 +10,12 @@ namespace NDMA {
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline void Read(T &var, const u32 addr) {
|
inline void Read(T &var, const u32 addr) {
|
||||||
ERROR_LOG(NDMA, "unknown Read%d @ 0x%08X", sizeof(var) * 8, addr);
|
ERROR_LOG(NDMA, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline void Write(u32 addr, const T data) {
|
inline void Write(u32 addr, const T data) {
|
||||||
ERROR_LOG(NDMA, "unknown Write%d 0x%08X @ 0x%08X", sizeof(data) * 8, data, addr);
|
ERROR_LOG(NDMA, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, data, addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Explicitly instantiate template functions because we aren't defining this in the header:
|
// Explicitly instantiate template functions because we aren't defining this in the header:
|
||||||
|
|
|
@ -158,8 +158,8 @@ void ProcessTriangle(OutputVertex &v0, OutputVertex &v1, OutputVertex &v2) {
|
||||||
InitScreenCoordinates(vtx2);
|
InitScreenCoordinates(vtx2);
|
||||||
|
|
||||||
DEBUG_LOG(GPU,
|
DEBUG_LOG(GPU,
|
||||||
"Triangle %u/%u (%u buffer vertices) at position (%.3f, %.3f, %.3f, %.3f), "
|
"Triangle %lu/%lu (%lu buffer vertices) at position (%.3f, %.3f, %.3f, %.3f), "
|
||||||
"(%.3f, %.3f, %.3f, %.3f), (%.3f, %.3f, %.3f, %.3f) and "
|
"(%.3lu, %.3f, %.3f, %.3f), (%.3f, %.3f, %.3f, %.3f) and "
|
||||||
"screen position (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f)",
|
"screen position (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f)",
|
||||||
i,output_list.size(), buffer_vertices.size(),
|
i,output_list.size(), buffer_vertices.size(),
|
||||||
vtx0.pos.x.ToFloat32(), vtx0.pos.y.ToFloat32(), vtx0.pos.z.ToFloat32(), vtx0.pos.w.ToFloat32(),output_list.size(),
|
vtx0.pos.x.ToFloat32(), vtx0.pos.y.ToFloat32(), vtx0.pos.z.ToFloat32(), vtx0.pos.w.ToFloat32(),output_list.size(),
|
||||||
|
|
|
@ -102,7 +102,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) {
|
||||||
(vertex_attribute_formats[i] == 2) ? *(s16*)srcdata :
|
(vertex_attribute_formats[i] == 2) ? *(s16*)srcdata :
|
||||||
*(float*)srcdata;
|
*(float*)srcdata;
|
||||||
input.attr[i][comp] = float24::FromFloat32(srcval);
|
input.attr[i][comp] = float24::FromFloat32(srcval);
|
||||||
DEBUG_LOG(GPU, "Loaded component %x of attribute %x for vertex %x (index %x) from 0x%08x + 0x%08x + 0x%04x: %f",
|
DEBUG_LOG(GPU, "Loaded component %x of attribute %x for vertex %x (index %x) from 0x%08x + 0x%08lx + 0x%04lx: %f",
|
||||||
comp, i, vertex, index,
|
comp, i, vertex, index,
|
||||||
attribute_config.GetBaseAddress(),
|
attribute_config.GetBaseAddress(),
|
||||||
vertex_attribute_sources[i] - base_address,
|
vertex_attribute_sources[i] - base_address,
|
||||||
|
|
Loading…
Reference in a new issue