1
2 /*
3 * HALT: must add log
4 */
5
opBRK(void)6 static UINT32 opBRK(void)
7 {
8 /*
9 UINT32 oldPSW = v60_update_psw_for_exception(0, 0);
10
11 SP -=4;
12 MemWrite32(SP, EXCEPTION_CODE_AND_SIZE(0x0d00, 4));
13 SP -=4;
14 MemWrite32(SP, oldPSW);
15 SP -=4;
16 MemWrite32(SP, PC + 1);
17 PC = GETINTVECT(13);
18 ChangePC(PC);
19 */
20 // logerror("Skipping BRK opcode! PC=%x", PC);
21
22 return 1;
23 }
24
opBRKV(void)25 static UINT32 opBRKV(void)
26 {
27 UINT32 oldPSW = v60_update_psw_for_exception(0, 0);
28
29 SP -=4;
30 MemWrite32(SP, PC);
31 SP -=4;
32 MemWrite32(SP, EXCEPTION_CODE_AND_SIZE(0x1501, 4));
33 SP -=4;
34 MemWrite32(SP, oldPSW);
35 SP -=4;
36 MemWrite32(SP, PC + 1);
37 PC = GETINTVECT(21);
38 ChangePC(PC);
39
40 return 0;
41 }
42
opCLRTLBA(void)43 static UINT32 opCLRTLBA(void)
44 {
45 // @@@ TLB not yet supported
46 // logerror("Skipping CLRTLBA opcode! PC=%x\n", PC);
47 return 1;
48 }
49
opDISPOSE(void)50 static UINT32 opDISPOSE(void)
51 {
52 SP = FP;
53 FP = MemRead32(SP);
54 SP +=4;
55
56 return 1;
57 }
58
opHALT(void)59 static UINT32 opHALT(void)
60 {
61 // @@@ It should wait for an interrupt to occur
62 //logerror("HALT found: skipping");
63 return 1;
64 }
65
opNOP(void)66 static UINT32 opNOP(void) /* TRUSTED */
67 {
68 return 1;
69 }
70
opRSR(void)71 static UINT32 opRSR(void)
72 {
73 PC = MemRead32(SP);
74 SP +=4;
75 ChangePC(PC);
76
77 return 0;
78 }
79
opTRAPFL(void)80 static UINT32 opTRAPFL(void)
81 {
82 if ((TKCW & 0x1F0) & ((v60ReadPSW() & 0x1F00) >> 4))
83 {
84 // @@@ FPU exception
85 //fatalerror("Hit TRAPFL! PC=%x", PC);
86 }
87
88 return 1;
89 }
90
91
92
93
94
95
96
97