diff options
| author | 2017-09-16 20:06:11 +0200 | |
|---|---|---|
| committer | 2017-09-16 20:06:22 +0200 | |
| commit | 77c5c2db5fedc3f54dcec874a5ce5cbc54dc81c9 (patch) | |
| tree | c4514154a83cc9ba87a17bc706c39f4752058c63 | |
| parent | 573380fb4d0b681fcfa35d42f567d21da3524225 (diff) | |
mn10200: noticed a savestate issue (nw)
| -rw-r--r-- | src/devices/cpu/mn10200/mn10200.cpp | 10 | ||||
| -rw-r--r-- | src/devices/cpu/mn10200/mn10200.h | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/devices/cpu/mn10200/mn10200.cpp b/src/devices/cpu/mn10200/mn10200.cpp index def87ca557f..59407b507ca 100644 --- a/src/devices/cpu/mn10200/mn10200.cpp +++ b/src/devices/cpu/mn10200/mn10200.cpp @@ -208,10 +208,12 @@ void mn10200_device::device_start() m_serial[i].ctrll = 0; m_serial[i].ctrlh = 0; m_serial[i].buf = 0; + m_serial[i].recv = 0; save_item(NAME(m_serial[i].ctrll), i); save_item(NAME(m_serial[i].ctrlh), i); save_item(NAME(m_serial[i].buf), i); + save_item(NAME(m_serial[i].recv), i); } // ports @@ -2153,13 +2155,13 @@ READ8_MEMBER(mn10200_device::io_control_r) case 0x181: case 0x191: return m_serial[(offset-0x180) >> 4].ctrlh; - case 0x182: + case 0x182: //case 0x192: { - static int zz; - return zz++; + int ser = (offset-0x180) >> 4; + return m_serial[ser].recv++; } - case 0x183: + case 0x183: //case 0x193: return 0x10; // 8-bit timers diff --git a/src/devices/cpu/mn10200/mn10200.h b/src/devices/cpu/mn10200/mn10200.h index 221625a60e3..307b0b4b6a9 100644 --- a/src/devices/cpu/mn10200/mn10200.h +++ b/src/devices/cpu/mn10200/mn10200.h @@ -162,6 +162,7 @@ private: uint8_t ctrll; uint8_t ctrlh; uint8_t buf; + uint8_t recv; } m_serial[2]; // ports |
