|
6 | 6 | #include "../Logger.hpp"
|
7 | 7 |
|
8 | 8 | namespace casioemu {
|
| 9 | + // should be ignore read, but for the sake of debugging, this is easier to use. |
9 | 10 | void StandbyControl::Initialise() {
|
10 | 11 | region_stpacp.Setup(
|
11 |
| - 0xF008, 1, "StandbyControl/STPACP", this, MMURegion::IgnoreRead<0x00>, [](MMURegion *region, size_t, uint8_t data) { |
| 12 | + 0xF008, 1, "StandbyControl/STPACP", this, MMURegion::DefaultRead<uint8_t>, [](MMURegion *region, size_t, uint8_t data) { |
12 | 13 | StandbyControl *self = (StandbyControl *)(region->userdata);
|
13 |
| - if ((data & 0xF0) == 0xA0 && (self->stpacp_last & 0xF0) == 0x50) |
| 14 | + if ((data & 0xF0) == 0xA0 && (self->stpacp_last & 0xF0) == 0x50) { |
14 | 15 | self->stop_acceptor_enabled = true;
|
| 16 | + logger::Info("StandbyControl: Stop acceptor enabled!"); |
| 17 | + } |
15 | 18 | self->stpacp_last = data;
|
16 | 19 | },
|
17 | 20 | emulator);
|
18 | 21 |
|
19 | 22 | region_sbycon.Setup(
|
20 |
| - 0xF009, 1, "StandbyControl/SBYCON", this, MMURegion::IgnoreRead<0x00>, [](MMURegion *region, size_t, uint8_t data) { |
| 23 | + 0xF009, 1, "StandbyControl/SBYCON", this, MMURegion::DefaultRead<uint8_t>, [](MMURegion *region, size_t, uint8_t data) { |
21 | 24 | StandbyControl *self = (StandbyControl *)(region->userdata);
|
22 | 25 |
|
23 | 26 | if (data & 0x01) {
|
| 27 | + logger::Info("StandbyControl: Chipset halted!"); |
24 | 28 | self->emulator.chipset.Halt();
|
25 | 29 | return;
|
26 | 30 | }
|
27 | 31 |
|
28 | 32 | if (data & 0x02 && self->stop_acceptor_enabled) {
|
| 33 | + logger::Info("StandbyControl: Chipset stopped!"); |
29 | 34 | self->stop_acceptor_enabled = false;
|
30 | 35 | self->emulator.chipset.Stop();
|
31 | 36 | return;
|
|
0 commit comments