WolPSX
Loading...
Searching...
No Matches
bus_utils.cpp
1#include <core/interconnect/bus.hpp>
2#include <core/cpu/cpu.hpp>
3
15uint32_t Bus::region_mask(uint32_t addr)
16{
17 switch(addr >> 29)
18 {
19 case 0:
20 return 0x1fffffff; //KUSEG
21 case 1:
22 return 0x1fffffff; //KUSEG
23 case 2:
24 return 0x1fffffff; //KUSEG
25 case 3:
26 return 0x1fffffff; //KUSEG
27 case 4:
28 return 0x1fffffff; //KSEG0
29 case 5:
30 return 0x1fffffff; //KSEG1
31 case 6:
32 return 0xffffffff; //KSEG2
33 case 7:
34 return 0xffffffff; //KSEG2
35 default:
36 return 0x00000000; //Should never happen
37 }
38}
39
48{
49 cpu->clock();
50}
void clock()
Clocks the PSX.
Definition bus_utils.cpp:47
CPU * cpu
Pointer to the CPU object.
Definition bus.hpp:101
uint32_t region_mask(uint32_t addr)
Returns the region mask for a given address.
Definition bus_utils.cpp:15
void clock()
Clocks the CPU once.
Definition cpu.cpp:33