small things

This commit is contained in:
CocoSimone
2023-02-19 12:17:21 +01:00
parent e335304b23
commit 50ec9a8a9e
4 changed files with 18 additions and 26 deletions

View File

@@ -1,4 +1,6 @@
#pragma once
#include <common.hpp>
#define RDRAM_SIZE 0x800000
#define RDRAM_DSIZE (RDRAM_SIZE - 1)
#define SRAM_SIZE 0x8000000
@@ -44,15 +46,15 @@
#define PIF_ROM_REGION 0x1FC00000 ... 0x1FC007BF
#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;
}
constexpr size_t operator""_mb(unsigned long long int x) {
constexpr u64 operator""_mb(unsigned long long int 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;
}

View File

@@ -9,6 +9,8 @@ RSP::RSP() {
}
void RSP::Reset() {
lastSuccessfulSPAddr.raw = 0;
lastSuccessfulDRAMAddr.raw = 0;
spStatus.raw = 0x1;
spStatus.halt = true;
oldPC = 0;
@@ -33,29 +35,29 @@ void RSP::Reset() {
inline void logRSP(const RSP& rsp, const u32 instr) {
Util::print("{:04X} {:08X} ", rsp.oldPC, instr);
for (int i = 0; i < 32; i++) {
Util::print("{:08X} ", (u32)rsp.gpr[i]);
for (auto gpr : rsp.gpr) {
Util::print("{:08X} ", gpr);
}
for (int i = 0; i < 32; i++) {
for (int e = 0; e < 8; e++) {
Util::print("{:04X}", rsp.vpr[i].element[e]);
for (auto vpr : rsp.vpr) {
for (int i = 0; i < 8; i++) {
Util::print("{:04X}", vpr.element[i]);
}
Util::print(" ");
}
for (int e = 0; e < 8; e++) {
Util::print("{:04X}", rsp.acc.h.element[e]);
for (int i = 0; i < 8; i++) {
Util::print("{:04X}", rsp.acc.h.element[i]);
}
Util::print(" ");
for (int e = 0; e < 8; e++) {
Util::print("{:04X}", rsp.acc.m.element[e]);
for (int i = 0; i < 8; i++) {
Util::print("{:04X}", rsp.acc.m.element[i]);
}
Util::print(" ");
for (int e = 0; e < 8; e++) {
Util::print("{:04X}", rsp.acc.l.element[e]);
for (int i = 0; i < 8; i++) {
Util::print("{:04X}", rsp.acc.l.element[i]);
}
Util::print(" {:04X} {:04X} {:02X}\n", rsp.GetVCC(), rsp.GetVCO(), rsp.GetVCE());

View File

@@ -23,16 +23,6 @@ union VIHsyncLeap {
u32 raw;
} ;
union VIVideo {
struct {
unsigned end:10;
unsigned:6;
unsigned start:10;
unsigned:6;
};
u32 raw;
};
union AxisScale {
u32 raw;
struct {

View File

@@ -5,8 +5,6 @@
#include <Audio.hpp>
#define SDL_MAIN_HANDLED
#include <SDL2/SDL.h>
#include <iostream>
#include <fstream>
#include <Discord.hpp>
VkInstance instance{};