MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / handleReset

Method handleReset

gui/qt/emuthread.cpp:235–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235asic_rev_t EmuThread::handleReset(const boot_ver_t* bootVer, asic_rev_t loadedRev, asic_rev_t defaultRev, bool* python) {
236 // Build a list of supported revisions
237 QList<int> supportedRevs;
238 supportedRevs.reserve(ASIC_REV_M - ASIC_REV_A + 1);
239 for (int rev = ASIC_REV_A; rev <= ASIC_REV_M; rev++) {
240 if (bootver_check_rev(bootVer, (asic_rev_t)rev)) {
241 supportedRevs.push_back(rev);
242 }
243 }
244
245 // If CPU reset, override the ASIC revision
246 if (loadedRev == ASIC_REV_AUTO) {
247 loadedRev = (asic_rev_t)m_asicRev.load();
248 if (!m_allowAnyRev.load() && !supportedRevs.contains((int)loadedRev)) {
249 loadedRev = ASIC_REV_AUTO;
250 }
251 Qt::CheckState forcePython = m_forcePython.load();
252 if (forcePython != Qt::PartiallyChecked) {
253 *python = (forcePython == Qt::Checked);
254 }
255 }
256 emit sendAsicRevInfo(supportedRevs, (int)loadedRev, (int)defaultRev, *python);
257
258 return (loadedRev != ASIC_REV_AUTO) ? loadedRev : defaultRev;
259}
260
261void EmuThread::reset() {
262 req(RequestReset);

Callers 1

gui_handle_resetFunction · 0.80

Calls 2

bootver_check_revFunction · 0.85
loadMethod · 0.80

Tested by

no test coverage detected