2012-04-29 06:16:44 +00:00
|
|
|
#include <processor/processor.hpp>
|
|
|
|
#include "gsu.hpp"
|
|
|
|
|
2015-06-28 08:44:56 +00:00
|
|
|
//note: multiplication results *may* sometimes be invalid when both CLSR and MS0 are set
|
|
|
|
//the product of multiplication in this mode (21mhz + fast-multiply) has not been analyzed;
|
|
|
|
//however, the timing of this mode has been confirmed to work as specified below
|
|
|
|
|
2012-04-29 06:16:44 +00:00
|
|
|
namespace Processor {
|
|
|
|
|
|
|
|
#include "instructions.cpp"
|
|
|
|
#include "table.cpp"
|
|
|
|
#include "serialization.cpp"
|
|
|
|
|
2015-06-27 02:38:47 +00:00
|
|
|
auto GSU::power() -> void {
|
|
|
|
}
|
|
|
|
|
|
|
|
auto GSU::reset() -> void {
|
2013-05-05 09:21:30 +00:00
|
|
|
for(auto& r : regs.r) r = 0x0000;
|
2015-06-27 02:38:47 +00:00
|
|
|
regs.sfr = 0x0000;
|
|
|
|
regs.pbr = 0x00;
|
|
|
|
regs.rombr = 0x00;
|
|
|
|
regs.rambr = 0;
|
|
|
|
regs.cbr = 0x0000;
|
|
|
|
regs.scbr = 0x00;
|
|
|
|
regs.scmr = 0x00;
|
|
|
|
regs.colr = 0x00;
|
|
|
|
regs.por = 0x00;
|
|
|
|
regs.bramr = 0;
|
|
|
|
regs.vcr = 0x04;
|
|
|
|
regs.cfgr = 0x00;
|
|
|
|
regs.clsr = 0;
|
2012-04-29 06:16:44 +00:00
|
|
|
regs.pipeline = 0x01; //nop
|
2015-06-27 02:38:47 +00:00
|
|
|
regs.ramaddr = 0x0000;
|
2012-04-29 06:16:44 +00:00
|
|
|
regs.reset();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|