Fix TRAP restore PC, but better
This commit is contained in:
		
							parent
							
								
									eef255b507
								
							
						
					
					
						commit
						06849b54ba
					
				| 
						 | 
					@ -1636,7 +1636,8 @@ static void cpuSUBF_S(VB *sim) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* TRAP */
 | 
					/* TRAP */
 | 
				
			||||||
static void cpuTRAP(VB *sim) {
 | 
					static void cpuTRAP(VB *sim) {
 | 
				
			||||||
    cpuAdvance(sim, cpuClocks(15));
 | 
					    sim->cpu.clocks += cpuClocks(15);
 | 
				
			||||||
 | 
					    sim->cpu.pc     += 2;
 | 
				
			||||||
    cpuThrow(sim, 0xFFA0 + cpuGetImm5U(sim));
 | 
					    cpuThrow(sim, 0xFFA0 + cpuGetImm5U(sim));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue