Reduntant includes
This commit is contained in:
3
external/parallel-rdp/ParallelRDPWrapper.hpp
vendored
3
external/parallel-rdp/ParallelRDPWrapper.hpp
vendored
@@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <Core.hpp>
|
#include <backend/Core.hpp>
|
||||||
#include <wsi.hpp>
|
#include <wsi.hpp>
|
||||||
#include <core/mmio/VI.hpp>
|
|
||||||
|
|
||||||
struct Window;
|
struct Window;
|
||||||
static SDL_Window* g_Window;
|
static SDL_Window* g_Window;
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL2/SDL_events.h>
|
#include <SDL2/SDL_events.h>
|
||||||
#include <backend/core/Interpreter.hpp>
|
#include <backend/core/Interpreter.hpp>
|
||||||
#include <backend/core/Mem.hpp>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <backend/core/registers/Registers.hpp>
|
|
||||||
#include <SDL2/SDL_timer.h>
|
#include <SDL2/SDL_timer.h>
|
||||||
|
|
||||||
struct Window;
|
struct Window;
|
||||||
|
|||||||
@@ -52,7 +52,6 @@
|
|||||||
#define PI_REGION 0x04600000 ... 0x046FFFFF
|
#define PI_REGION 0x04600000 ... 0x046FFFFF
|
||||||
#define RI_REGION 0x04700000 ... 0x047FFFFF
|
#define RI_REGION 0x04700000 ... 0x047FFFFF
|
||||||
#define SI_REGION 0x04800000 ... 0x048FFFFF
|
#define SI_REGION 0x04800000 ... 0x048FFFFF
|
||||||
#define SRAM_REGION 0x08000000 ... 0x0FFFFFFF
|
|
||||||
#define CART_REGION_1_1 (CART_REGION_START_1_1) ... (CART_REGION_END_1_1)
|
#define CART_REGION_1_1 (CART_REGION_START_1_1) ... (CART_REGION_END_1_1)
|
||||||
#define CART_REGION_1_2 (CART_REGION_START_1_2) ... (CART_REGION_END_1_2)
|
#define CART_REGION_1_2 (CART_REGION_START_1_2) ... (CART_REGION_END_1_2)
|
||||||
#define CART_REGION_2_1 (CART_REGION_START_2_1) ... (CART_REGION_END_2_1)
|
#define CART_REGION_2_1 (CART_REGION_START_2_1) ... (CART_REGION_END_2_1)
|
||||||
|
|||||||
@@ -2,6 +2,5 @@
|
|||||||
#include <backend/core/mmio/PIF.hpp>
|
#include <backend/core/mmio/PIF.hpp>
|
||||||
|
|
||||||
void LoadTAS(const char* filename);
|
void LoadTAS(const char* filename);
|
||||||
void UnloadTAS();
|
|
||||||
n64::Controller TasNextInputs();
|
n64::Controller TasNextInputs();
|
||||||
bool TasMovieLoaded();
|
bool TasMovieLoaded();
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
#include <Scheduler.hpp>
|
#include <Scheduler.hpp>
|
||||||
#include <Mem.hpp>
|
|
||||||
#include <core/registers/Registers.hpp>
|
#include <core/registers/Registers.hpp>
|
||||||
|
|
||||||
Scheduler scheduler;
|
Scheduler scheduler;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <common.hpp>
|
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include "log.hpp"
|
#include <log.hpp>
|
||||||
|
|
||||||
namespace n64 {
|
namespace n64 {
|
||||||
struct Mem;
|
struct Mem;
|
||||||
|
|||||||
@@ -154,9 +154,7 @@ void PIF::ProcessCommands(Mem &mem) {
|
|||||||
u8* cmd = &ram[i++];
|
u8* cmd = &ram[i++];
|
||||||
u8 cmdlen = cmd[CMD_LEN] & 0x3F;
|
u8 cmdlen = cmd[CMD_LEN] & 0x3F;
|
||||||
|
|
||||||
if (cmdlen == 0) {
|
if (cmdlen == 0 || cmdlen == 0x3D) {
|
||||||
channel++;
|
|
||||||
} else if (cmdlen == 0x3D) {
|
|
||||||
channel++;
|
channel++;
|
||||||
} else if (cmdlen == 0x3E) {
|
} else if (cmdlen == 0x3E) {
|
||||||
break;
|
break;
|
||||||
@@ -171,11 +169,7 @@ void PIF::ProcessCommands(Mem &mem) {
|
|||||||
u8* res = &ram[i + cmdlen];
|
u8* res = &ram[i + cmdlen];
|
||||||
|
|
||||||
switch (cmd[CMD_IDX]) {
|
switch (cmd[CMD_IDX]) {
|
||||||
case 0xff:
|
case 0: case 0xff:
|
||||||
ControllerID(res);
|
|
||||||
channel++;
|
|
||||||
break;
|
|
||||||
case 0:
|
|
||||||
ControllerID(res);
|
ControllerID(res);
|
||||||
channel++;
|
channel++;
|
||||||
break;
|
break;
|
||||||
@@ -249,7 +243,7 @@ void PIF::ProcessCommands(Mem &mem) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PIF::MempakRead(u8* cmd, u8* res) const {
|
void PIF::MempakRead(const u8* cmd, u8* res) const {
|
||||||
u16 offset = cmd[3] << 8;
|
u16 offset = cmd[3] << 8;
|
||||||
offset |= cmd[4];
|
offset |= cmd[4];
|
||||||
|
|
||||||
@@ -305,7 +299,7 @@ void PIF::MempakWrite(u8* cmd, u8* res) const {
|
|||||||
res[0] = data_crc(&cmd[5]);
|
res[0] = data_crc(&cmd[5]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PIF::EepromRead(u8* cmd, u8* res, const Mem& mem) const {
|
void PIF::EepromRead(const u8* cmd, u8* res, const Mem& mem) const {
|
||||||
assert(mem.saveType == SAVE_EEPROM_4k || mem.saveType == SAVE_EEPROM_16k);
|
assert(mem.saveType == SAVE_EEPROM_4k || mem.saveType == SAVE_EEPROM_16k);
|
||||||
if (channel == 4) {
|
if (channel == 4) {
|
||||||
u8 offset = cmd[3];
|
u8 offset = cmd[3];
|
||||||
@@ -321,7 +315,7 @@ void PIF::EepromRead(u8* cmd, u8* res, const Mem& mem) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PIF::EepromWrite(u8* cmd, u8* res, const Mem& mem) const {
|
void PIF::EepromWrite(const u8* cmd, u8* res, const Mem& mem) const {
|
||||||
assert(mem.saveType == SAVE_EEPROM_4k || mem.saveType == SAVE_EEPROM_16k);
|
assert(mem.saveType == SAVE_EEPROM_4k || mem.saveType == SAVE_EEPROM_16k);
|
||||||
if (channel == 4) {
|
if (channel == 4) {
|
||||||
u8 offset = cmd[3];
|
u8 offset = cmd[3];
|
||||||
|
|||||||
@@ -102,10 +102,10 @@ struct PIF {
|
|||||||
void UpdateController();
|
void UpdateController();
|
||||||
bool ReadButtons(u8*) const;
|
bool ReadButtons(u8*) const;
|
||||||
void ControllerID(u8*) const;
|
void ControllerID(u8*) const;
|
||||||
void MempakRead(u8*, u8*) const;
|
void MempakRead(const u8*, u8*) const;
|
||||||
void MempakWrite(u8*, u8*) const;
|
void MempakWrite(u8*, u8*) const;
|
||||||
void EepromRead(u8*, u8*, const Mem&) const;
|
void EepromRead(const u8*, u8*, const Mem&) const;
|
||||||
void EepromWrite(u8*, u8*, const Mem&) const;
|
void EepromWrite(const u8*, u8*, const Mem&) const;
|
||||||
|
|
||||||
bool gamepadConnected = false;
|
bool gamepadConnected = false;
|
||||||
SDL_GameController* gamepad{};
|
SDL_GameController* gamepad{};
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <backend/core/registers/Cop0.hpp>
|
|
||||||
#include <backend/core/registers/Cop1.hpp>
|
#include <backend/core/registers/Cop1.hpp>
|
||||||
|
|
||||||
namespace n64 {
|
namespace n64 {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <nfd.h>
|
#include <nfd.h>
|
||||||
#include <Widgets.hpp>
|
#include <Widgets.hpp>
|
||||||
|
#include <Core.hpp>
|
||||||
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
#include <Core.hpp>
|
#include <common.hpp>
|
||||||
|
|
||||||
|
namespace n64 { struct Core; }
|
||||||
using namespace nlohmann;
|
using namespace nlohmann;
|
||||||
|
|
||||||
struct Settings {
|
struct Settings {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#include <imgui_impl_sdl2.h>
|
#include <imgui_impl_sdl2.h>
|
||||||
#include <imgui_impl_vulkan.h>
|
#include <imgui_impl_vulkan.h>
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#include <backend/Core.hpp>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <frontend/imgui/Settings.hpp>
|
#include <frontend/imgui/Settings.hpp>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user