small things
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <common.hpp>
|
||||||
|
|
||||||
#define RDRAM_SIZE 0x800000
|
#define RDRAM_SIZE 0x800000
|
||||||
#define RDRAM_DSIZE (RDRAM_SIZE - 1)
|
#define RDRAM_DSIZE (RDRAM_SIZE - 1)
|
||||||
#define SRAM_SIZE 0x8000000
|
#define SRAM_SIZE 0x8000000
|
||||||
@@ -44,15 +46,15 @@
|
|||||||
#define PIF_ROM_REGION 0x1FC00000 ... 0x1FC007BF
|
#define PIF_ROM_REGION 0x1FC00000 ... 0x1FC007BF
|
||||||
#define PIF_RAM_REGION PIF_RAM_REGION_START ... PIF_RAM_REGION_END
|
#define PIF_RAM_REGION PIF_RAM_REGION_START ... PIF_RAM_REGION_END
|
||||||
|
|
||||||
constexpr size_t operator""_kb(unsigned long long int x) {
|
constexpr u64 operator""_kb(unsigned long long int x) {
|
||||||
return 1024ULL * x;
|
return 1024ULL * x;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr size_t operator""_mb(unsigned long long int x) {
|
constexpr u64 operator""_mb(unsigned long long int x) {
|
||||||
return 1024_kb * x;
|
return 1024_kb * x;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr size_t operator""_gb(unsigned long long int x) {
|
constexpr u64 operator""_gb(unsigned long long int x) {
|
||||||
return 1024_mb * x;
|
return 1024_mb * x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ RSP::RSP() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RSP::Reset() {
|
void RSP::Reset() {
|
||||||
|
lastSuccessfulSPAddr.raw = 0;
|
||||||
|
lastSuccessfulDRAMAddr.raw = 0;
|
||||||
spStatus.raw = 0x1;
|
spStatus.raw = 0x1;
|
||||||
spStatus.halt = true;
|
spStatus.halt = true;
|
||||||
oldPC = 0;
|
oldPC = 0;
|
||||||
@@ -33,29 +35,29 @@ void RSP::Reset() {
|
|||||||
|
|
||||||
inline void logRSP(const RSP& rsp, const u32 instr) {
|
inline void logRSP(const RSP& rsp, const u32 instr) {
|
||||||
Util::print("{:04X} {:08X} ", rsp.oldPC, instr);
|
Util::print("{:04X} {:08X} ", rsp.oldPC, instr);
|
||||||
for (int i = 0; i < 32; i++) {
|
for (auto gpr : rsp.gpr) {
|
||||||
Util::print("{:08X} ", (u32)rsp.gpr[i]);
|
Util::print("{:08X} ", gpr);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 32; i++) {
|
for (auto vpr : rsp.vpr) {
|
||||||
for (int e = 0; e < 8; e++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
Util::print("{:04X}", rsp.vpr[i].element[e]);
|
Util::print("{:04X}", vpr.element[i]);
|
||||||
}
|
}
|
||||||
Util::print(" ");
|
Util::print(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int e = 0; e < 8; e++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
Util::print("{:04X}", rsp.acc.h.element[e]);
|
Util::print("{:04X}", rsp.acc.h.element[i]);
|
||||||
}
|
}
|
||||||
Util::print(" ");
|
Util::print(" ");
|
||||||
|
|
||||||
for (int e = 0; e < 8; e++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
Util::print("{:04X}", rsp.acc.m.element[e]);
|
Util::print("{:04X}", rsp.acc.m.element[i]);
|
||||||
}
|
}
|
||||||
Util::print(" ");
|
Util::print(" ");
|
||||||
|
|
||||||
for (int e = 0; e < 8; e++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
Util::print("{:04X}", rsp.acc.l.element[e]);
|
Util::print("{:04X}", rsp.acc.l.element[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Util::print(" {:04X} {:04X} {:02X}\n", rsp.GetVCC(), rsp.GetVCO(), rsp.GetVCE());
|
Util::print(" {:04X} {:04X} {:02X}\n", rsp.GetVCC(), rsp.GetVCO(), rsp.GetVCE());
|
||||||
|
|||||||
@@ -23,16 +23,6 @@ union VIHsyncLeap {
|
|||||||
u32 raw;
|
u32 raw;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
union VIVideo {
|
|
||||||
struct {
|
|
||||||
unsigned end:10;
|
|
||||||
unsigned:6;
|
|
||||||
unsigned start:10;
|
|
||||||
unsigned:6;
|
|
||||||
};
|
|
||||||
u32 raw;
|
|
||||||
};
|
|
||||||
|
|
||||||
union AxisScale {
|
union AxisScale {
|
||||||
u32 raw;
|
u32 raw;
|
||||||
struct {
|
struct {
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
#include <Audio.hpp>
|
#include <Audio.hpp>
|
||||||
#define SDL_MAIN_HANDLED
|
#define SDL_MAIN_HANDLED
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
|
||||||
#include <Discord.hpp>
|
#include <Discord.hpp>
|
||||||
|
|
||||||
VkInstance instance{};
|
VkInstance instance{};
|
||||||
|
|||||||
Reference in New Issue
Block a user