Skip to content

Commit

Permalink
Update CPU.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
CT56567 authored Oct 21, 2023
1 parent 83304c2 commit 278cb7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions PSEMU/CPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void CPU::tick() {
void CPU::reset() {
pc = 0xbfc00000;
next_pc = pc + 4;
current_pc = pc;
current_pc = 0;
hi = 0; lo = 0;
memset(regs, 0, 32 * sizeof(uint32_t));
memset(out_regs, 0, 32 * sizeof(uint32_t));
Expand All @@ -36,16 +36,16 @@ void CPU::fetch() {
Instruction instr;
instr.instruction = bus->load32(pc);

delay_slot = brancha;
brancha = false;

pc = next_pc;
next_pc = pc + 4;

set_reg(std::get<0>(load), std::get<1>(load));

load = std::make_tuple(0, 0);

delay_slot = brancha;
brancha = false;

decode_execute(instr);
just_started = false;
for (int i = 0; i < 32; i++) {
Expand Down

0 comments on commit 278cb7c

Please sign in to comment.