mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-26 12:48:39 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a24db567f | |||
| a9b06974be |
@@ -16,6 +16,11 @@ body:
|
|||||||
Example title:
|
Example title:
|
||||||
Demon’s Souls (PPSA01341)
|
Demon’s Souls (PPSA01341)
|
||||||
|
|
||||||
|
**Before reporting:**
|
||||||
|
- Test the game on a **fresh build from `main`**, not an old release.
|
||||||
|
- Copy the **exact commit SHA** shown at the top of the log.
|
||||||
|
- `DEBUG` and `TRACE` lines are diagnostic context, not errors by themselves; report the last milestone or the first `WARNING`, `ERROR`, or `CRITICAL` line connected to the stop.
|
||||||
|
|
||||||
- type: input
|
- type: input
|
||||||
id: game_name
|
id: game_name
|
||||||
attributes:
|
attributes:
|
||||||
@@ -73,11 +78,20 @@ body:
|
|||||||
id: logs
|
id: logs
|
||||||
attributes:
|
attributes:
|
||||||
label: Log File
|
label: Log File
|
||||||
description: Drag and drop your log file here, or click to browse
|
description: Attach the **full** log file (`.log`, `.txt`, or `.zip`). Do not paste only a fragment — the maintainer needs the complete log from launch to crash.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: true
|
||||||
accept: ".log,.txt,.zip"
|
accept: ".log,.txt,.zip"
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: last_milestone_first_error
|
||||||
|
attributes:
|
||||||
|
label: Last Milestone / First Error
|
||||||
|
description: Paste the **last useful milestone line** or the **first `WARNING`, `ERROR`, or `CRITICAL` line connected to the stop** from the log. `DEBUG`/`TRACE` lines do not count unless a real error follows them.
|
||||||
|
placeholder: e.g. CpuEngine: native-only OR [ERROR] Native backend FAILED: ...
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
id: operating_system
|
id: operating_system
|
||||||
attributes:
|
attributes:
|
||||||
@@ -119,7 +133,8 @@ body:
|
|||||||
id: emulator_version
|
id: emulator_version
|
||||||
attributes:
|
attributes:
|
||||||
label: Emulator Version / Commit
|
label: Emulator Version / Commit
|
||||||
placeholder: e.g. v0.0.1 / a1b2c3d
|
description: Copy the **exact short SHA** from the top of the log. Do not enter just `0.0.1` without a commit hash.
|
||||||
|
placeholder: e.g. a1b2c3d
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ namespace SharpEmu.Libs.Kernel;
|
|||||||
|
|
||||||
public static class KernelRuntimeCompatExports
|
public static class KernelRuntimeCompatExports
|
||||||
{
|
{
|
||||||
|
private const int Efault = 14;
|
||||||
private const ulong TlsErrnoOffset = 0x40;
|
private const ulong TlsErrnoOffset = 0x40;
|
||||||
private const ulong TlsStackChkGuardBaseOffset = 0x800;
|
private const ulong TlsStackChkGuardBaseOffset = 0x800;
|
||||||
private const ulong StackChkGuardFieldOffset = 0x10;
|
private const ulong StackChkGuardFieldOffset = 0x10;
|
||||||
@@ -226,8 +227,11 @@ public static class KernelRuntimeCompatExports
|
|||||||
var now = DateTimeOffset.UtcNow;
|
var now = DateTimeOffset.UtcNow;
|
||||||
var seconds = now.ToUnixTimeSeconds();
|
var seconds = now.ToUnixTimeSeconds();
|
||||||
var microseconds = (now.Ticks % TimeSpan.TicksPerSecond) / 10;
|
var microseconds = (now.Ticks % TimeSpan.TicksPerSecond) / 10;
|
||||||
if (!ctx.TryWriteUInt64(timeAddress, unchecked((ulong)seconds)) ||
|
|
||||||
!ctx.TryWriteUInt64(timeAddress + sizeof(long), unchecked((ulong)microseconds)))
|
Span<byte> timevalBuffer = stackalloc byte[16];
|
||||||
|
BinaryPrimitives.WriteInt64LittleEndian(timevalBuffer, seconds);
|
||||||
|
BinaryPrimitives.WriteInt64LittleEndian(timevalBuffer[sizeof(long)..], microseconds);
|
||||||
|
if (!ctx.Memory.TryWrite(timeAddress, timevalBuffer))
|
||||||
{
|
{
|
||||||
return (int)OrbisGen2Result.ORBIS_GEN2_ERROR_MEMORY_FAULT;
|
return (int)OrbisGen2Result.ORBIS_GEN2_ERROR_MEMORY_FAULT;
|
||||||
}
|
}
|
||||||
@@ -249,18 +253,28 @@ public static class KernelRuntimeCompatExports
|
|||||||
var seconds = now.ToUnixTimeSeconds();
|
var seconds = now.ToUnixTimeSeconds();
|
||||||
var microseconds = (now.Ticks % TimeSpan.TicksPerSecond) / 10;
|
var microseconds = (now.Ticks % TimeSpan.TicksPerSecond) / 10;
|
||||||
|
|
||||||
if (timeAddress != 0 &&
|
if (timeAddress != 0)
|
||||||
(!ctx.TryWriteUInt64(timeAddress, unchecked((ulong)seconds)) ||
|
|
||||||
!ctx.TryWriteUInt64(timeAddress + sizeof(long), unchecked((ulong)microseconds))))
|
|
||||||
{
|
{
|
||||||
return -1;
|
Span<byte> timevalBuffer = stackalloc byte[16];
|
||||||
|
BinaryPrimitives.WriteInt64LittleEndian(timevalBuffer, seconds);
|
||||||
|
BinaryPrimitives.WriteInt64LittleEndian(timevalBuffer[sizeof(long)..], microseconds);
|
||||||
|
if (!ctx.Memory.TryWrite(timeAddress, timevalBuffer))
|
||||||
|
{
|
||||||
|
TrySetErrno(ctx, Efault);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timezoneAddress != 0 &&
|
if (timezoneAddress != 0)
|
||||||
(!ctx.TryWriteInt32(timezoneAddress, 0) ||
|
|
||||||
!ctx.TryWriteInt32(timezoneAddress + sizeof(int), 0)))
|
|
||||||
{
|
{
|
||||||
return -1;
|
Span<byte> timezoneBuffer = stackalloc byte[8];
|
||||||
|
BinaryPrimitives.WriteInt32LittleEndian(timezoneBuffer, 0);
|
||||||
|
BinaryPrimitives.WriteInt32LittleEndian(timezoneBuffer[sizeof(int)..], 0);
|
||||||
|
if (!ctx.Memory.TryWrite(timezoneAddress, timezoneBuffer))
|
||||||
|
{
|
||||||
|
TrySetErrno(ctx, Efault);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx[CpuRegister.Rax] = 0;
|
ctx[CpuRegister.Rax] = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user