mirror of
https://github.com/hch12907/orbum.git
synced 2024-06-02 19:38:16 -04:00
Run clang-format and update README
This commit is contained in:
parent
3492c0b152
commit
cc9fd11233
|
@ -9,8 +9,7 @@ I can only work on this in my spare time, so I am thankful for any help!
|
|||
## Current status
|
||||
|
||||
Status as of 2018/08/06:
|
||||
- Primary focus for now is on the GIF/VU's/VIF.
|
||||
- Work started on the VIFs and VUs, mostly just implementing instructions left.
|
||||
- Primary focus for now is on the GIF/VIF.
|
||||
- Work started on the SPU2 (DMA and IOP communication done, sound generation still to be done).
|
||||
- Work started on the SIO/SIO2 (controllers and MC's), IOP communication done.
|
||||
- No work done yet on the IPU and GSCore.
|
||||
|
@ -32,7 +31,7 @@ Run the following commands to invoke a build:
|
|||
|
||||
`cmake ..` optionally specifying `-DBOOST_ROOT={path}` depending on your environment.
|
||||
|
||||
`make` (or equivilant)
|
||||
`make` (or equivalent)
|
||||
|
||||
## Running
|
||||
`./orbumfront`
|
||||
|
|
|
@ -58,8 +58,7 @@ public:
|
|||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(
|
||||
CEREAL_NVP(fifo_queue)
|
||||
);
|
||||
CEREAL_NVP(fifo_queue));
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -86,7 +86,6 @@ public:
|
|||
{
|
||||
archive(
|
||||
CEREAL_NVP(current_slot),
|
||||
CEREAL_NVP(branch_pc)
|
||||
);
|
||||
CEREAL_NVP(branch_pc));
|
||||
}
|
||||
};
|
|
@ -84,8 +84,7 @@ struct uqword
|
|||
{
|
||||
archive(
|
||||
CEREAL_NVP(hi),
|
||||
CEREAL_NVP(lo)
|
||||
);
|
||||
CEREAL_NVP(lo));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ public:
|
|||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(
|
||||
CEREAL_NVP(b)
|
||||
);
|
||||
CEREAL_NVP(b));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -120,7 +120,6 @@ public:
|
|||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(
|
||||
CEREAL_NVP(d)
|
||||
);
|
||||
CEREAL_NVP(d));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <stdexcept>
|
||||
|
||||
|
||||
#include <cereal/cereal.hpp>
|
||||
|
||||
#include "Common/Types/Primitive.hpp"
|
||||
|
@ -77,7 +76,6 @@ public:
|
|||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(
|
||||
CEREAL_NVP(h)
|
||||
);
|
||||
CEREAL_NVP(h));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -142,7 +142,6 @@ public:
|
|||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(
|
||||
CEREAL_NVP(q)
|
||||
);
|
||||
CEREAL_NVP(q));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -98,7 +98,6 @@ public:
|
|||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(
|
||||
CEREAL_NVP(w)
|
||||
);
|
||||
CEREAL_NVP(w));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -116,7 +116,8 @@ void CVif::STCYCL(VifUnit_Base* unit, const VifcodeInstruction inst)
|
|||
void CVif::OFFSET(VifUnit_Base* unit, const VifcodeInstruction inst)
|
||||
{
|
||||
// VIF1 only
|
||||
if (unit->core_id != 1) {
|
||||
if (unit->core_id != 1)
|
||||
{
|
||||
BOOST_LOG(Core::get_logger()) << str(boost::format("Warning: VIF%d called a VIF1-only instruction: OFFSET") % unit->core_id);
|
||||
return;
|
||||
}
|
||||
|
@ -136,7 +137,8 @@ void CVif::OFFSET(VifUnit_Base* unit, const VifcodeInstruction inst)
|
|||
void CVif::BASE(VifUnit_Base* unit, const VifcodeInstruction inst)
|
||||
{
|
||||
// VIF1 only
|
||||
if (unit->core_id != 1) {
|
||||
if (unit->core_id != 1)
|
||||
{
|
||||
BOOST_LOG(Core::get_logger()) << str(boost::format("Warning: VIF%d called a VIF1-only instruction: BASE") % unit->core_id);
|
||||
return;
|
||||
}
|
||||
|
@ -163,7 +165,8 @@ void CVif::STMOD(VifUnit_Base* unit, const VifcodeInstruction inst)
|
|||
void CVif::MSKPATH3(VifUnit_Base* unit, const VifcodeInstruction inst)
|
||||
{
|
||||
// VIF1 only
|
||||
if (unit->core_id != 1) {
|
||||
if (unit->core_id != 1)
|
||||
{
|
||||
BOOST_LOG(Core::get_logger()) << str(boost::format("Warning: VIF%d called a VIF1-only instruction: MSKPATH3") % unit->core_id);
|
||||
return;
|
||||
}
|
||||
|
@ -184,7 +187,8 @@ void CVif::FLUSHE(VifUnit_Base* unit, const VifcodeInstruction inst)
|
|||
void CVif::FLUSH(VifUnit_Base* unit, const VifcodeInstruction inst)
|
||||
{
|
||||
// VIF1 only
|
||||
if (unit->core_id != 1) {
|
||||
if (unit->core_id != 1)
|
||||
{
|
||||
BOOST_LOG(Core::get_logger()) << str(boost::format("Warning: VIF%d called a VIF1-only instruction: FLUSH") % unit->core_id);
|
||||
return;
|
||||
}
|
||||
|
@ -195,7 +199,8 @@ void CVif::FLUSH(VifUnit_Base* unit, const VifcodeInstruction inst)
|
|||
void CVif::FLUSHA(VifUnit_Base* unit, const VifcodeInstruction inst)
|
||||
{
|
||||
// VIF1 only
|
||||
if (unit->core_id != 1) {
|
||||
if (unit->core_id != 1)
|
||||
{
|
||||
BOOST_LOG(Core::get_logger()) << str(boost::format("Warning: VIF%d called a VIF1-only instruction: FLUSHA") % unit->core_id);
|
||||
return;
|
||||
}
|
||||
|
@ -214,7 +219,8 @@ void CVif::MSCNT(VifUnit_Base* unit, const VifcodeInstruction inst)
|
|||
void CVif::MSCALF(VifUnit_Base* unit, const VifcodeInstruction inst)
|
||||
{
|
||||
// VIF1 only
|
||||
if (unit->core_id != 1) {
|
||||
if (unit->core_id != 1)
|
||||
{
|
||||
BOOST_LOG(Core::get_logger()) << str(boost::format("Warning: VIF%d called a VIF1-only instruction: MSCALF") % unit->core_id);
|
||||
return;
|
||||
}
|
||||
|
@ -241,7 +247,8 @@ void CVif::MPG(VifUnit_Base* unit, const VifcodeInstruction inst)
|
|||
void CVif::DIRECT(VifUnit_Base* unit, const VifcodeInstruction inst)
|
||||
{
|
||||
// VIF1 only
|
||||
if (unit->core_id != 1) {
|
||||
if (unit->core_id != 1)
|
||||
{
|
||||
BOOST_LOG(Core::get_logger()) << str(boost::format("Warning: VIF%d called a VIF1-only instruction: DIRECT") % unit->core_id);
|
||||
return;
|
||||
}
|
||||
|
@ -252,7 +259,8 @@ void CVif::DIRECT(VifUnit_Base* unit, const VifcodeInstruction inst)
|
|||
void CVif::DIRECTHL(VifUnit_Base* unit, const VifcodeInstruction inst)
|
||||
{
|
||||
// VIF1 only
|
||||
if (unit->core_id != 1) {
|
||||
if (unit->core_id != 1)
|
||||
{
|
||||
BOOST_LOG(Core::get_logger()) << str(boost::format("Warning: VIF%d called a VIF1-only instruction: DIRECTHL") % unit->core_id);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <boost/format.hpp>
|
||||
|
||||
#include "Controller/Ee/Vpu/Vu/CVu.hpp"
|
||||
|
||||
#include "Resources/RResources.hpp"
|
||||
|
||||
CVu::CVu(Core* core) :
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "Core.hpp"
|
||||
#include "Controller/CController.hpp"
|
||||
#include "Controller/ControllerEvent.hpp"
|
||||
#include "Core.hpp"
|
||||
|
||||
class Core;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <boost/format.hpp>
|
||||
#include <variant>
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "Controller/Ee/Vpu/Vu/Interpreter/CVuInterpreter.hpp"
|
||||
|
||||
#include "Core.hpp"
|
||||
|
@ -156,11 +157,14 @@ int CVuInterpreter::execute_lower_instruction(VuUnit_Base* unit, const VuInstruc
|
|||
unit->lsu.consume_cycle(1);
|
||||
|
||||
// If the units have finished execution, replace the original regs with new ones
|
||||
if (!unit->efu.is_running()) unit->p = unit->efu.new_p;
|
||||
if (!unit->fdiv.is_running()) unit->q = unit->fdiv.new_q;
|
||||
if (!unit->efu.is_running())
|
||||
unit->p = unit->efu.new_p;
|
||||
if (!unit->fdiv.is_running())
|
||||
unit->q = unit->fdiv.new_q;
|
||||
|
||||
// If there's a data hazard, stall
|
||||
if (check_data_hazard(unit, decoder)) return 1;
|
||||
if (check_data_hazard(unit, decoder))
|
||||
return 1;
|
||||
|
||||
switch (info.pipeline)
|
||||
{
|
||||
|
@ -246,7 +250,8 @@ int CVuInterpreter::execute_upper_instruction(VuUnit_Base* unit, VuInstruction i
|
|||
}
|
||||
|
||||
// If there's a data hazard, stall
|
||||
if (check_data_hazard(unit, decoder)) return 1;
|
||||
if (check_data_hazard(unit, decoder))
|
||||
return 1;
|
||||
|
||||
for (FmacPipeline& fmac : unit->fmac)
|
||||
{
|
||||
|
@ -274,19 +279,20 @@ bool CVuInterpreter::check_data_hazard(VuUnit_Base* unit, const VuInstructionDec
|
|||
|
||||
const int lower_read[2] = {
|
||||
decoder.lower_src(0).value_or(-1),
|
||||
decoder.lower_src(1).value_or(-1)
|
||||
};
|
||||
decoder.lower_src(1).value_or(-1)};
|
||||
|
||||
// If the instruction is WAITP, return true if EFU is running
|
||||
if ((decoder.get_lower_inst().value) & 0x7FF == 0x7BF)
|
||||
{
|
||||
if (unit->efu.is_running()) return true;
|
||||
if (unit->efu.is_running())
|
||||
return true;
|
||||
}
|
||||
|
||||
// If the instruction is WAITQ, return true if FDIV is running
|
||||
if ((decoder.get_lower_inst().value) & 0x7FF == 0x3BF)
|
||||
{
|
||||
if (unit->fdiv.is_running()) return true;
|
||||
if (unit->fdiv.is_running())
|
||||
return true;
|
||||
}
|
||||
|
||||
// Upper Instructions data hazard check
|
||||
|
@ -301,16 +307,20 @@ bool CVuInterpreter::check_data_hazard(VuUnit_Base* unit, const VuInstructionDec
|
|||
{
|
||||
for (FmacPipeline& fmac : unit->fmac)
|
||||
{
|
||||
if (fmac.is_using_register(upper_read[0], inst.dest())) return true;
|
||||
if (fmac.is_using_register(upper_read[1], 1 << (3 - inst.bc()))) return true;
|
||||
if (fmac.is_using_register(upper_read[0], inst.dest()))
|
||||
return true;
|
||||
if (fmac.is_using_register(upper_read[1], 1 << (3 - inst.bc())))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (decoder.decode_upper().field == VuDecodedInst::Dest)
|
||||
{
|
||||
for (FmacPipeline& fmac : unit->fmac)
|
||||
{
|
||||
if (fmac.is_using_register(upper_read[0], inst.dest())) return true;
|
||||
if (fmac.is_using_register(upper_read[1], inst.dest())) return true;
|
||||
if (fmac.is_using_register(upper_read[0], inst.dest()))
|
||||
return true;
|
||||
if (fmac.is_using_register(upper_read[1], inst.dest()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -320,18 +330,24 @@ bool CVuInterpreter::check_data_hazard(VuUnit_Base* unit, const VuInstructionDec
|
|||
{
|
||||
for (FmacPipeline& fmac : unit->fmac)
|
||||
{
|
||||
if (fmac.is_using_register(upper_read[0], inst.dest())) return true;
|
||||
if (fmac.is_using_register(upper_read[1], inst.dest())) return true;
|
||||
if (fmac.is_using_register(upper_read[2], 1 << (3 - inst.bc()))) return true;
|
||||
if (fmac.is_using_register(upper_read[0], inst.dest()))
|
||||
return true;
|
||||
if (fmac.is_using_register(upper_read[1], inst.dest()))
|
||||
return true;
|
||||
if (fmac.is_using_register(upper_read[2], 1 << (3 - inst.bc())))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (decoder.decode_upper().field == VuDecodedInst::Dest)
|
||||
{
|
||||
for (FmacPipeline& fmac : unit->fmac)
|
||||
{
|
||||
if (fmac.is_using_register(upper_read[0], inst.dest())) return true;
|
||||
if (fmac.is_using_register(upper_read[1], inst.dest())) return true;
|
||||
if (fmac.is_using_register(upper_read[2], inst.dest())) return true;
|
||||
if (fmac.is_using_register(upper_read[0], inst.dest()))
|
||||
return true;
|
||||
if (fmac.is_using_register(upper_read[1], inst.dest()))
|
||||
return true;
|
||||
if (fmac.is_using_register(upper_read[2], inst.dest()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -345,21 +361,26 @@ bool CVuInterpreter::check_data_hazard(VuUnit_Base* unit, const VuInstructionDec
|
|||
{
|
||||
for (FmacPipeline& fmac : unit->fmac)
|
||||
{
|
||||
if (fmac.is_using_register(lower_read[0], inst.fsf())) return true;
|
||||
if (fmac.is_using_register(lower_read[1], inst.ftf())) return true;
|
||||
if (fmac.is_using_register(lower_read[0], inst.fsf()))
|
||||
return true;
|
||||
if (fmac.is_using_register(lower_read[1], inst.ftf()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (decoder.decode_lower().field == VuDecodedInst::Dest)
|
||||
{
|
||||
for (FmacPipeline& fmac : unit->fmac)
|
||||
{
|
||||
if (fmac.is_using_register(lower_read[0], inst.dest())) return true;
|
||||
if (fmac.is_using_register(lower_read[1], inst.dest())) return true;
|
||||
if (fmac.is_using_register(lower_read[0], inst.dest()))
|
||||
return true;
|
||||
if (fmac.is_using_register(lower_read[1], inst.dest()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (decoder.decode_lower().field == VuDecodedInst::Int)
|
||||
{
|
||||
if (unit->lsu.is_using_register(lower_read[0])) return true;
|
||||
if (unit->lsu.is_using_register(lower_read[0]))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -380,8 +380,7 @@ public:
|
|||
&CVuInterpreter::EEXP,
|
||||
&CVuInterpreter::XGKICK,
|
||||
&CVuInterpreter::XTOP,
|
||||
&CVuInterpreter::XITOP
|
||||
};
|
||||
&CVuInterpreter::XITOP};
|
||||
|
||||
private:
|
||||
bool check_data_hazard(VuUnit_Base* unit, const VuInstructionDecoder& decoder) const;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <boost/format.hpp>
|
||||
#include <cmath>
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "Controller/Ee/Vpu/Vu/Interpreter/CVuInterpreter.hpp"
|
||||
#include "Core.hpp"
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <boost/format.hpp>
|
||||
#include <cmath>
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "Controller/Ee/Vpu/Vu/Interpreter/CVuInterpreter.hpp"
|
||||
#include "Core.hpp"
|
||||
#include "Resources/RResources.hpp"
|
||||
|
|
|
@ -251,7 +251,6 @@ void CVuInterpreter::LOI(VuUnit_Base* unit, const VuInstruction inst)
|
|||
|
||||
unit->i.write_uword(inst.value);
|
||||
|
||||
|
||||
// (In case you are wondering... LOI is a pseudo-instruction, it's
|
||||
// not supposed to be referenced)
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#include <boost/log/utility/setup/file.hpp>
|
||||
|
||||
#include <Console.hpp>
|
||||
#include <Macros.hpp>
|
||||
#include <Datetime.hpp>
|
||||
#include <Macros.hpp>
|
||||
|
||||
#include "Core.hpp"
|
||||
|
||||
|
|
|
@ -95,8 +95,7 @@ public:
|
|||
CEREAL_NVP(access_read_write),
|
||||
CEREAL_NVP(access_area_index),
|
||||
CEREAL_NVP(access_max_block_index),
|
||||
CEREAL_NVP(access_block_index)
|
||||
);
|
||||
CEREAL_NVP(access_block_index));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -37,8 +37,7 @@ public:
|
|||
{
|
||||
archive(
|
||||
CEREAL_NVP(ready),
|
||||
CEREAL_NVP(data_in)
|
||||
);
|
||||
CEREAL_NVP(data_in));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -69,7 +68,6 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<SizedByteRegister>(this),
|
||||
CEREAL_NVP(write_latch)
|
||||
);
|
||||
CEREAL_NVP(write_latch));
|
||||
}
|
||||
};
|
|
@ -37,7 +37,6 @@ public:
|
|||
CEREAL_NVP(day),
|
||||
CEREAL_NVP(month),
|
||||
CEREAL_NVP(year),
|
||||
CEREAL_NVP(microseconds)
|
||||
);
|
||||
CEREAL_NVP(microseconds));
|
||||
}
|
||||
};
|
|
@ -107,7 +107,6 @@ public:
|
|||
CEREAL_NVP(key_xor),
|
||||
CEREAL_NVP(dec_set),
|
||||
CEREAL_NVP(nvram),
|
||||
CEREAL_NVP(rtc)
|
||||
);
|
||||
CEREAL_NVP(rtc));
|
||||
}
|
||||
};
|
|
@ -120,7 +120,6 @@ public:
|
|||
CEREAL_NVP(dvbm),
|
||||
CEREAL_NVP(pccr),
|
||||
CEREAL_NVP(pcr0),
|
||||
CEREAL_NVP(pcr1)
|
||||
);
|
||||
CEREAL_NVP(pcr1));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -127,8 +127,7 @@ public:
|
|||
cereal::base_class<SizedWordRegister>(this),
|
||||
CEREAL_NVP(interrupts_masked),
|
||||
CEREAL_NVP(operating_context),
|
||||
CEREAL_NVP(count_interrupts_enabled)
|
||||
);
|
||||
CEREAL_NVP(count_interrupts_enabled));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -171,8 +170,7 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<SizedWordRegister>(this),
|
||||
CEREAL_NVP(irq_lines)
|
||||
);
|
||||
CEREAL_NVP(irq_lines));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ public:
|
|||
CEREAL_NVP(fpr),
|
||||
CEREAL_NVP(acc),
|
||||
CEREAL_NVP(irr),
|
||||
CEREAL_NVP(csr)
|
||||
);
|
||||
CEREAL_NVP(csr));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -50,7 +50,6 @@ public:
|
|||
CEREAL_NVP(gpr),
|
||||
CEREAL_NVP(hi),
|
||||
CEREAL_NVP(lo),
|
||||
CEREAL_NVP(sa)
|
||||
);
|
||||
CEREAL_NVP(sa));
|
||||
}
|
||||
};
|
|
@ -47,7 +47,6 @@ public:
|
|||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(
|
||||
CEREAL_NVP(tlb_entries)
|
||||
);
|
||||
CEREAL_NVP(tlb_entries));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -55,8 +55,7 @@ public:
|
|||
archive(
|
||||
CEREAL_NVP(pagemask),
|
||||
CEREAL_NVP(evenodd_mask),
|
||||
CEREAL_NVP(tlb_mask)
|
||||
);
|
||||
CEREAL_NVP(tlb_mask));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -89,8 +88,7 @@ public:
|
|||
CEREAL_NVP(pfn),
|
||||
CEREAL_NVP(c),
|
||||
CEREAL_NVP(d),
|
||||
CEREAL_NVP(v)
|
||||
);
|
||||
CEREAL_NVP(v));
|
||||
}
|
||||
} physical_info[2]; // Index 0 = Even, index 1 = Odd.
|
||||
|
||||
|
@ -104,7 +102,6 @@ public:
|
|||
CEREAL_NVP(g),
|
||||
CEREAL_NVP(asid),
|
||||
CEREAL_NVP(s),
|
||||
CEREAL_NVP(physical_info)
|
||||
);
|
||||
CEREAL_NVP(physical_info));
|
||||
}
|
||||
};
|
|
@ -40,7 +40,6 @@ public:
|
|||
CEREAL_NVP(cop0),
|
||||
CEREAL_NVP(fpu),
|
||||
CEREAL_NVP(tlb),
|
||||
CEREAL_NVP(scratchpad_memory)
|
||||
);
|
||||
CEREAL_NVP(scratchpad_memory));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -82,8 +82,7 @@ public:
|
|||
CEREAL_NVP(tag_exit),
|
||||
CEREAL_NVP(tag_stall),
|
||||
CEREAL_NVP(tag_irq),
|
||||
CEREAL_NVP(dma_tag)
|
||||
);
|
||||
CEREAL_NVP(dma_tag));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -58,8 +58,7 @@ public:
|
|||
CEREAL_NVP(channel_id),
|
||||
CEREAL_NVP(madr),
|
||||
CEREAL_NVP(qwc),
|
||||
CEREAL_NVP(chcr)
|
||||
);
|
||||
CEREAL_NVP(chcr));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -81,8 +80,7 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<EeDmacChannel_Base<EeDmacChannelRegister_Chcr_Ty>>(this),
|
||||
CEREAL_NVP(tadr)
|
||||
);
|
||||
CEREAL_NVP(tadr));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -104,8 +102,7 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<EeDmacChannel_Tadr<EeDmacChannelRegister_Chcr_Ty>>(this),
|
||||
CEREAL_NVP(asr)
|
||||
);
|
||||
CEREAL_NVP(asr));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -127,8 +124,7 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<EeDmacChannel_Base<EeDmacChannelRegister_Chcr_Ty>>(this),
|
||||
CEREAL_NVP(sadr)
|
||||
);
|
||||
CEREAL_NVP(sadr));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -152,7 +148,6 @@ public:
|
|||
archive(
|
||||
cereal::base_class<EeDmacChannel_Base<EeDmacChannelRegister_Chcr_Ty>>(this),
|
||||
CEREAL_NVP(tadr),
|
||||
CEREAL_NVP(sadr)
|
||||
);
|
||||
CEREAL_NVP(sadr));
|
||||
}
|
||||
};
|
|
@ -84,7 +84,6 @@ public:
|
|||
{
|
||||
archive(
|
||||
CEREAL_NVP(tag0),
|
||||
CEREAL_NVP(tag1)
|
||||
);
|
||||
CEREAL_NVP(tag1));
|
||||
}
|
||||
};
|
|
@ -98,7 +98,6 @@ public:
|
|||
CEREAL_NVP(memory_e070),
|
||||
CEREAL_NVP(memory_f500),
|
||||
CEREAL_NVP(memory_f530),
|
||||
CEREAL_NVP(memory_f5a0)
|
||||
);
|
||||
CEREAL_NVP(memory_f5a0));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <cereal/cereal.hpp>
|
||||
#include <cereal/access.hpp>
|
||||
#include <cereal/cereal.hpp>
|
||||
#include <cereal/types/polymorphic.hpp>
|
||||
#include <cereal/types/string.hpp>
|
||||
|
||||
|
@ -45,7 +45,8 @@ public:
|
|||
archive(
|
||||
cereal::base_class<ArrayByteMemory>(this)
|
||||
#if DEBUG_LOG_SIO_MESSAGES
|
||||
,CEREAL_NVP(sio_buffer)
|
||||
,
|
||||
CEREAL_NVP(sio_buffer)
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
@ -79,8 +80,7 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<ArrayByteMemory>(this),
|
||||
CEREAL_NVP(rdram_sdevid)
|
||||
);
|
||||
CEREAL_NVP(rdram_sdevid));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ public:
|
|||
CEREAL_NVP(cnt),
|
||||
CEREAL_NVP(p3cnt),
|
||||
CEREAL_NVP(p3tag),
|
||||
CEREAL_NVP(memory_30b0)
|
||||
);
|
||||
CEREAL_NVP(memory_30b0));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -22,7 +22,6 @@ public:
|
|||
archive(
|
||||
CEREAL_NVP(mask),
|
||||
CEREAL_NVP(stat),
|
||||
CEREAL_NVP(memory_f020)
|
||||
);
|
||||
CEREAL_NVP(memory_f020));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -29,7 +29,6 @@ public:
|
|||
CEREAL_NVP(ctrl),
|
||||
CEREAL_NVP(bp),
|
||||
CEREAL_NVP(top),
|
||||
CEREAL_NVP(memory_2040)
|
||||
);
|
||||
CEREAL_NVP(memory_2040));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -78,7 +78,6 @@ public:
|
|||
CEREAL_NVP(memory_f410),
|
||||
CEREAL_NVP(register_f420),
|
||||
CEREAL_NVP(memory_mch),
|
||||
CEREAL_NVP(memory_f450)
|
||||
);
|
||||
CEREAL_NVP(memory_f450));
|
||||
}
|
||||
};
|
|
@ -44,8 +44,7 @@ public:
|
|||
cereal::base_class<SizedWordRegister>(this),
|
||||
CEREAL_NVP(is_overflowed),
|
||||
CEREAL_NVP(prescale_target),
|
||||
CEREAL_NVP(prescale_count)
|
||||
);
|
||||
CEREAL_NVP(prescale_count));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -89,7 +88,6 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<SizedWordRegister>(this),
|
||||
CEREAL_NVP(write_latch)
|
||||
);
|
||||
CEREAL_NVP(write_latch));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -40,8 +40,7 @@ public:
|
|||
archive(
|
||||
CEREAL_NVP(count),
|
||||
CEREAL_NVP(mode),
|
||||
CEREAL_NVP(compare)
|
||||
);
|
||||
CEREAL_NVP(compare));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -59,7 +58,6 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<EeTimersUnit_Base>(this),
|
||||
CEREAL_NVP(hold)
|
||||
);
|
||||
CEREAL_NVP(hold));
|
||||
}
|
||||
};
|
|
@ -28,7 +28,6 @@ public:
|
|||
CEREAL_NVP(unit_0),
|
||||
CEREAL_NVP(unit_1),
|
||||
CEREAL_NVP(unit_2),
|
||||
CEREAL_NVP(unit_3)
|
||||
);
|
||||
CEREAL_NVP(unit_3));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -26,7 +26,6 @@ public:
|
|||
archive(
|
||||
CEREAL_NVP(stat),
|
||||
CEREAL_NVP(vif),
|
||||
CEREAL_NVP(vu)
|
||||
);
|
||||
CEREAL_NVP(vu));
|
||||
}
|
||||
};
|
|
@ -21,7 +21,6 @@ public:
|
|||
{
|
||||
archive(
|
||||
CEREAL_NVP(unit_0),
|
||||
CEREAL_NVP(unit_1)
|
||||
);
|
||||
CEREAL_NVP(unit_1));
|
||||
}
|
||||
};
|
|
@ -69,7 +69,6 @@ public:
|
|||
CEREAL_NVP(code),
|
||||
CEREAL_NVP(stat),
|
||||
CEREAL_NVP(fbrst),
|
||||
CEREAL_NVP(err)
|
||||
);
|
||||
CEREAL_NVP(err));
|
||||
}
|
||||
};
|
|
@ -27,7 +27,6 @@ public:
|
|||
archive(
|
||||
CEREAL_NVP(unit_0),
|
||||
CEREAL_NVP(unit_1),
|
||||
CEREAL_NVP(fbrst)
|
||||
);
|
||||
CEREAL_NVP(fbrst));
|
||||
}
|
||||
};
|
|
@ -107,7 +107,6 @@ public:
|
|||
CEREAL_NVP(current_slot),
|
||||
CEREAL_NVP(branch_pc),
|
||||
CEREAL_NVP(second_branch_pc),
|
||||
CEREAL_NVP(second_branch_pending)
|
||||
);
|
||||
CEREAL_NVP(second_branch_pending));
|
||||
}
|
||||
};
|
|
@ -1,4 +1,5 @@
|
|||
#include "Resources/Ee/Vpu/Vu/VuInstruction.hpp"
|
||||
|
||||
#include "Resources/Ee/Vpu/Vu/VuPipelines.hpp"
|
||||
|
||||
MipsInstructionInfo VU_INSTRUCTION_TABLE[Constants::EE::VPU::VU::NUMBER_VU_INSTRUCTIONS] =
|
||||
|
|
|
@ -80,7 +80,6 @@ struct VuInstruction : public MipsInstruction
|
|||
return fs();
|
||||
}
|
||||
|
||||
|
||||
ubyte opcode() const
|
||||
{
|
||||
return static_cast<ubyte>(OPCODE.extract_from(value));
|
||||
|
@ -101,7 +100,8 @@ struct VuInstruction : public MipsInstruction
|
|||
return static_cast<ubyte>(FSF.extract_from(value));
|
||||
}
|
||||
|
||||
ubyte imm5() const {
|
||||
ubyte imm5() const
|
||||
{
|
||||
// FD is IMM5 in some instructions
|
||||
return static_cast<ubyte>(FD.extract_from(value));
|
||||
}
|
||||
|
|
|
@ -223,8 +223,7 @@ std::optional<int> VuInstructionDecoder::upper_src(int index) const
|
|||
const std::optional<VuDecodeInfo>* src_regs[3] = {
|
||||
&decoded_inst_upper.source_reg_1,
|
||||
&decoded_inst_upper.source_reg_2,
|
||||
&decoded_inst_upper.source_reg_3
|
||||
};
|
||||
&decoded_inst_upper.source_reg_3};
|
||||
|
||||
if (src_regs[index]->has_value())
|
||||
{
|
||||
|
@ -257,8 +256,7 @@ std::optional<int> VuInstructionDecoder::lower_src(int index) const
|
|||
const std::optional<VuDecodeInfo>* src_regs[3] = {
|
||||
&decoded_inst_lower.source_reg_1,
|
||||
&decoded_inst_lower.source_reg_2,
|
||||
&decoded_inst_lower.source_reg_3
|
||||
};
|
||||
&decoded_inst_lower.source_reg_3};
|
||||
|
||||
if (src_regs[index]->has_value())
|
||||
{
|
||||
|
|
|
@ -48,8 +48,7 @@ struct VuDecodedInst
|
|||
std::optional<VuDecodeInfo> src_1,
|
||||
std::optional<VuDecodeInfo> src_2,
|
||||
std::optional<VuDecodeInfo> src_3,
|
||||
int dest_field
|
||||
) :
|
||||
int dest_field) :
|
||||
dest_reg(dest),
|
||||
source_reg_1(src_1),
|
||||
source_reg_2(src_2),
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
struct VuPipeline
|
||||
{
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
FMAC = 0,
|
||||
FDIV = 1,
|
||||
EFU = 2,
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include <cereal/cereal.hpp>
|
||||
#include <cereal/types/polymorphic.hpp>
|
||||
#include <optional>
|
||||
|
||||
#include "Common/Constants.hpp"
|
||||
#include "Common/Types/Bus/ByteBus.hpp"
|
||||
|
@ -107,8 +108,7 @@ public:
|
|||
CEREAL_NVP(mac),
|
||||
CEREAL_NVP(clipping),
|
||||
CEREAL_NVP(pc),
|
||||
CEREAL_NVP(cmsar)
|
||||
);
|
||||
CEREAL_NVP(cmsar));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -147,8 +147,7 @@ public:
|
|||
archive(
|
||||
cereal::base_class<VuUnit_Base>(this),
|
||||
CEREAL_NVP(memory_micro),
|
||||
CEREAL_NVP(memory_mem)
|
||||
);
|
||||
CEREAL_NVP(memory_mem));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -169,7 +168,6 @@ public:
|
|||
archive(
|
||||
cereal::base_class<VuUnit_Base>(this),
|
||||
CEREAL_NVP(memory_micro),
|
||||
CEREAL_NVP(memory_mem)
|
||||
);
|
||||
CEREAL_NVP(memory_mem));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -77,7 +77,6 @@ public:
|
|||
CEREAL_NVP(siglblid),
|
||||
CEREAL_NVP(memory_1090),
|
||||
CEREAL_NVP(memory_1100),
|
||||
CEREAL_NVP(memory_2000)
|
||||
);
|
||||
CEREAL_NVP(memory_2000));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -65,7 +65,6 @@ public:
|
|||
CEREAL_NVP(cause),
|
||||
CEREAL_NVP(epc),
|
||||
CEREAL_NVP(prid),
|
||||
CEREAL_NVP(erreg)
|
||||
);
|
||||
CEREAL_NVP(erreg));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -78,8 +78,7 @@ public:
|
|||
archive(
|
||||
cereal::base_class<SizedWordRegister>(this),
|
||||
CEREAL_NVP(interrupts_masked),
|
||||
CEREAL_NVP(operating_context)
|
||||
);
|
||||
CEREAL_NVP(operating_context));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -116,8 +115,7 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<SizedWordRegister>(this),
|
||||
CEREAL_NVP(irq_lines)
|
||||
);
|
||||
CEREAL_NVP(irq_lines));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ public:
|
|||
CEREAL_NVP(bdelay),
|
||||
CEREAL_NVP(gpr),
|
||||
CEREAL_NVP(hi),
|
||||
CEREAL_NVP(lo)
|
||||
);
|
||||
CEREAL_NVP(lo));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -27,7 +27,6 @@ public:
|
|||
archive(
|
||||
CEREAL_NVP(r3000),
|
||||
CEREAL_NVP(cop0),
|
||||
CEREAL_NVP(scratchpad_memory)
|
||||
);
|
||||
CEREAL_NVP(scratchpad_memory));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -73,8 +73,7 @@ public:
|
|||
archive(
|
||||
cereal::base_class<SizedWordRegister>(this),
|
||||
CEREAL_NVP(dma_started),
|
||||
CEREAL_NVP(dma_tag)
|
||||
);
|
||||
CEREAL_NVP(dma_tag));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -107,8 +106,7 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<SizedWordRegister>(this),
|
||||
CEREAL_NVP(transfer_length)
|
||||
);
|
||||
CEREAL_NVP(transfer_length));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -52,8 +52,7 @@ public:
|
|||
archive(
|
||||
CEREAL_NVP(madr),
|
||||
CEREAL_NVP(bcr),
|
||||
CEREAL_NVP(chcr)
|
||||
);
|
||||
CEREAL_NVP(chcr));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -75,7 +74,6 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<IopDmacChannel_Base<IopDmacChannelRegister_Chcr_Ty>>(this),
|
||||
CEREAL_NVP(tadr)
|
||||
);
|
||||
CEREAL_NVP(tadr));
|
||||
}
|
||||
};
|
|
@ -66,7 +66,6 @@ public:
|
|||
{
|
||||
archive(
|
||||
CEREAL_NVP(tag0),
|
||||
CEREAL_NVP(tag1)
|
||||
);
|
||||
CEREAL_NVP(tag1));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -66,7 +66,6 @@ public:
|
|||
CEREAL_NVP(channel_sif0),
|
||||
CEREAL_NVP(channel_sif1),
|
||||
CEREAL_NVP(channel_tosio2),
|
||||
CEREAL_NVP(channel_fromsio2)
|
||||
);
|
||||
CEREAL_NVP(channel_fromsio2));
|
||||
}
|
||||
};
|
|
@ -19,7 +19,6 @@ public:
|
|||
archive(
|
||||
CEREAL_NVP(ctrl),
|
||||
CEREAL_NVP(mask),
|
||||
CEREAL_NVP(stat)
|
||||
);
|
||||
CEREAL_NVP(stat));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -109,7 +109,6 @@ public:
|
|||
CEREAL_NVP(register_1568),
|
||||
CEREAL_NVP(register_15f0),
|
||||
CEREAL_NVP(register_2070),
|
||||
CEREAL_NVP(register_3800)
|
||||
);
|
||||
CEREAL_NVP(register_3800));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -23,7 +23,6 @@ public:
|
|||
CEREAL_NVP(data),
|
||||
CEREAL_NVP(stat),
|
||||
CEREAL_NVP(mode),
|
||||
CEREAL_NVP(ctrl)
|
||||
);
|
||||
CEREAL_NVP(ctrl));
|
||||
}
|
||||
};
|
|
@ -76,7 +76,6 @@ public:
|
|||
{
|
||||
archive(
|
||||
CEREAL_NVP(command_queue),
|
||||
CEREAL_NVP(response_queue)
|
||||
);
|
||||
CEREAL_NVP(response_queue));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -72,7 +72,6 @@ public:
|
|||
CEREAL_NVP(recv3),
|
||||
CEREAL_NVP(register_8278),
|
||||
CEREAL_NVP(register_827c),
|
||||
CEREAL_NVP(intr)
|
||||
);
|
||||
CEREAL_NVP(intr));
|
||||
}
|
||||
};
|
|
@ -46,7 +46,6 @@ public:
|
|||
archive(
|
||||
cereal::base_class<SizedWordRegister>(this),
|
||||
CEREAL_NVP(write_latch),
|
||||
CEREAL_NVP(port_transfer_started)
|
||||
);
|
||||
CEREAL_NVP(port_transfer_started));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -29,8 +29,7 @@ public:
|
|||
archive(
|
||||
CEREAL_NVP(ctrl_1),
|
||||
CEREAL_NVP(ctrl_2),
|
||||
CEREAL_NVP(ctrl_3)
|
||||
);
|
||||
CEREAL_NVP(ctrl_3));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -44,7 +43,6 @@ public:
|
|||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(
|
||||
CEREAL_NVP(ctrl_3)
|
||||
);
|
||||
CEREAL_NVP(ctrl_3));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -55,7 +55,6 @@ public:
|
|||
CEREAL_NVP(transfer_port),
|
||||
CEREAL_NVP(transfer_port_count),
|
||||
CEREAL_NVP(transfer_direction),
|
||||
CEREAL_NVP(write_latch)
|
||||
);
|
||||
CEREAL_NVP(write_latch));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -55,8 +55,7 @@ public:
|
|||
cereal::base_class<SizedWordRegister>(this),
|
||||
CEREAL_NVP(is_overflowed),
|
||||
CEREAL_NVP(prescale_target),
|
||||
CEREAL_NVP(prescale_count)
|
||||
);
|
||||
CEREAL_NVP(prescale_count));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -108,7 +107,6 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<SizedWordRegister>(this),
|
||||
CEREAL_NVP(write_latch)
|
||||
);
|
||||
CEREAL_NVP(write_latch));
|
||||
}
|
||||
};
|
|
@ -25,7 +25,6 @@ public:
|
|||
archive(
|
||||
CEREAL_NVP(count),
|
||||
CEREAL_NVP(mode),
|
||||
CEREAL_NVP(compare)
|
||||
);
|
||||
CEREAL_NVP(compare));
|
||||
}
|
||||
};
|
|
@ -32,7 +32,6 @@ public:
|
|||
CEREAL_NVP(unit_2),
|
||||
CEREAL_NVP(unit_3),
|
||||
CEREAL_NVP(unit_4),
|
||||
CEREAL_NVP(unit_5)
|
||||
);
|
||||
CEREAL_NVP(unit_5));
|
||||
}
|
||||
};
|
|
@ -114,8 +114,7 @@ public:
|
|||
CEREAL_NVP(fifo_spu2c1),
|
||||
CEREAL_NVP(fifo_dev9),
|
||||
CEREAL_NVP(fifo_fromsio2),
|
||||
CEREAL_NVP(fifo_tosio2)
|
||||
);
|
||||
CEREAL_NVP(fifo_tosio2));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@ public:
|
|||
CEREAL_NVP(memory_0346),
|
||||
CEREAL_NVP(memory_0746),
|
||||
CEREAL_NVP(memory_07b0),
|
||||
CEREAL_NVP(memory_07ce)
|
||||
);
|
||||
CEREAL_NVP(memory_07ce));
|
||||
}
|
||||
};
|
|
@ -17,6 +17,5 @@ struct Spu2CoreConstants
|
|||
static constexpr Spu2CoreInfo SPU2_STATIC_INFO[Constants::SPU2::NUMBER_CORES] =
|
||||
{
|
||||
{0x2000, 0x2200},
|
||||
{0x2400, 0x2600}
|
||||
};
|
||||
{0x2400, 0x2600}};
|
||||
};
|
||||
|
|
|
@ -103,8 +103,7 @@ public:
|
|||
{
|
||||
archive(
|
||||
cereal::base_class<SizedHwordRegister>(this),
|
||||
CEREAL_NVP(dma_offset)
|
||||
);
|
||||
CEREAL_NVP(dma_offset));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ public:
|
|||
CEREAL_NVP(lsaxh),
|
||||
CEREAL_NVP(lsaxl),
|
||||
CEREAL_NVP(naxh),
|
||||
CEREAL_NVP(naxl)
|
||||
);
|
||||
CEREAL_NVP(naxl));
|
||||
}
|
||||
};
|
|
@ -271,7 +271,6 @@ public:
|
|||
CEREAL_NVP(voice_20),
|
||||
CEREAL_NVP(voice_21),
|
||||
CEREAL_NVP(voice_22),
|
||||
CEREAL_NVP(voice_23)
|
||||
);
|
||||
CEREAL_NVP(voice_23));
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue