Reorganization of source & Clang-Format

This commit is contained in:
Xphalnos 2025-06-20 20:33:57 +02:00
parent 3693ac72cb
commit 4d4f0c8490
9 changed files with 28 additions and 36 deletions

2
3rd_Party/rem vendored

@ -1 +1 @@
Subproject commit cf9cff6039b68239cec122b425eba04f9acfcd9c
Subproject commit 2db639ed5715224a42c0d4f3ec070e4c4d6d26ac

View file

@ -1,5 +1,5 @@
<h1 align="center">
<img src="/assets/Logo(1024x1024).webp" height="150px">
<img src="/resources/Logo(1024x1024).webp" height="150px">
<br><br>
<img src="https://img.shields.io/github/stars/pound-emu/pound" width="100">
<a href="https://github.com/pound-emu/pound/actions?query=branch%3Amain">
@ -15,7 +15,9 @@
Join the [**Pound Discord Server**](https://discord.gg/aMmTmKsVC7)!
**Pound** is an early-stage emulator for the **Nintendo Switch 2**, targeting **Android**, **macOS** (Intel and ARM), **Windows**, and **Linux** (Intel and ARM).
**Pound** is an early-stage emulator for the **Nintendo Switch 2**, targeting **Windows**, **Linux** and **macOS** (Intel).
Future Supports: **Android**, **macOS ARM**
> [!IMPORTANT]
> Pound is still in early development — don't expect miracles.
@ -25,7 +27,7 @@ Initial focus is on implementing the **CPU**, leveraging its architectural simil
## How to Compile Pound
See the [**compilation guide**](/docs/compguide.md) for detailed instructions.
See the [**compilation guide**](/resources/docs/compguide.md) for detailed instructions.
## Codebase

View file

@ -1,5 +0,0 @@
# Assets folder
dir: /assets/
This is where all of the assets for the repository and application belong (e.g branding, firmware dumps, images, demo videos)

View file

@ -1,5 +0,0 @@
# Firmware dump folder
dir: /assets/fw/
This is where your dumped firmware will go (will be used heavily during buildtime)

View file

@ -12,9 +12,13 @@ struct CPU {
static constexpr size_t MEM_SIZE = 64 * 1024;
u8 memory[MEM_SIZE];
CPU() { std::memset(memory, 0, MEM_SIZE); }
CPU() {
std::memset(memory, 0, MEM_SIZE);
}
u64 &x(int i) { return regs[i]; }
u64& x(int i) {
return regs[i];
}
u8 read_byte(u64 addr) {
if (addr >= MEM_SIZE) {

View file

@ -28,8 +28,7 @@ create_rem_context(nullptr, nullptr, nullptr, nullptr, nullptr);
size_t offset = 0;
// Decode mock instructions from cpu.memory
if (cpu.memory[0] == 0x05)
{ // MOVZ placeholder
if (cpu.memory[0] == 0x05) { // MOVZ placeholder
code[offset++] = 0x48; // mov rax, imm64
code[offset++] = 0xB8;
u64 imm = 5;
@ -37,8 +36,7 @@ create_rem_context(nullptr, nullptr, nullptr, nullptr, nullptr);
offset += 8;
}
if (cpu.memory[4] == 0x03)
{ // ADD placeholder
if (cpu.memory[4] == 0x03) { // ADD placeholder
code[offset++] = 0x48; // add rax, imm32
code[offset++] = 0x05;
u32 addval = 3;
@ -50,8 +48,7 @@ create_rem_context(nullptr, nullptr, nullptr, nullptr, nullptr);
JitFunc fn = reinterpret_cast<JitFunc>(code);
u64 result;
asm volatile(
"call *%1\n"
asm volatile("call *%1\n"
"mov %%rax, %0\n"
: "=r"(result)
: "r"(fn)

View file

@ -4,8 +4,7 @@
#include "ARM/cpu.h"
class JIT
{
class JIT {
public:
void translate_and_run(CPU& cpu);
};

View file

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Before After
Before After