File: upd96050.cpp

package info (click to toggle)
libretro-bsnes-mercury 094%2Bgit20220807-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 9,792 kB
  • sloc: cpp: 109,408; ansic: 3,554; makefile: 991; xml: 115; asm: 55; sh: 1
file content (45 lines) | stat: -rw-r--r-- 853 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <processor/processor.hpp>
#include "upd96050.hpp"

namespace Processor {

#include "instructions.cpp"
#include "memory.cpp"
#include "disassembler.cpp"
#include "serialization.cpp"

void uPD96050::power() {
  if(revision == Revision::uPD7725) {
    regs.pc.bits(11);
    regs.rp.bits(10);
    regs.dp.bits( 8);
  }

  if(revision == Revision::uPD96050) {
    regs.pc.bits(14);
    regs.rp.bits(11);
    regs.dp.bits(11);
  }

  for(unsigned n = 0; n < 16; n++) regs.stack[n] = 0x0000;
  regs.pc = 0x0000;
  regs.rp = 0x0000;
  regs.dp = 0x0000;
  regs.sp = 0x0;
  regs.k = 0x0000;
  regs.l = 0x0000;
  regs.m = 0x0000;
  regs.n = 0x0000;
  regs.a = 0x0000;
  regs.b = 0x0000;
  regs.flaga = 0x00;
  regs.flagb = 0x00;
  regs.tr = 0x0000;
  regs.trb = 0x0000;
  regs.sr = 0x0000;
  regs.dr = 0x0000;
  regs.si = 0x0000;
  regs.so = 0x0000;
}

}