Closed Volutar closed 4 years ago
https://github.com/samstyle/Xpeccy/blob/master/src/xgui/debuga/debuger.cpp#L828
ui.leEnvTone->setText(gethexword((chp->reg[11] << 8) | chp->reg[12])); Должно быть: ui.leEnvTone->setText(gethexword((chp->reg[12] << 8) | chp->reg[11]));
Кстати чуть выше (818-820) тоже путаница (с регистрами тонов): ui.leToneA->setText(gethexword(((chp->reg[0] << 8) | chp->reg[1]) & 0x0fff)); ui.leToneB->setText(gethexword(((chp->reg[2] << 8) | chp->reg[3]) & 0x0fff)); ui.leToneC->setText(gethexword(((chp->reg[4] << 8) | chp->reg[5]) & 0x0fff)); Должно быть ui.leToneA->setText(gethexword(((chp->reg[1] << 8) | chp->reg[0]) & 0x0fff)); ui.leToneB->setText(gethexword(((chp->reg[3] << 8) | chp->reg[2]) & 0x0fff)); ui.leToneC->setText(gethexword(((chp->reg[5] << 8) | chp->reg[4]) & 0x0fff));
Для референса: https://faqwiki.zxnet.co.uk/wiki/AY-3-8912#Register_map
https://github.com/samstyle/Xpeccy/blob/master/src/xgui/debuga/debuger.cpp#L828
ui.leEnvTone->setText(gethexword((chp->reg[11] << 8) | chp->reg[12])); Должно быть: ui.leEnvTone->setText(gethexword((chp->reg[12] << 8) | chp->reg[11]));
Кстати чуть выше (818-820) тоже путаница (с регистрами тонов): ui.leToneA->setText(gethexword(((chp->reg[0] << 8) | chp->reg[1]) & 0x0fff)); ui.leToneB->setText(gethexword(((chp->reg[2] << 8) | chp->reg[3]) & 0x0fff)); ui.leToneC->setText(gethexword(((chp->reg[4] << 8) | chp->reg[5]) & 0x0fff)); Должно быть ui.leToneA->setText(gethexword(((chp->reg[1] << 8) | chp->reg[0]) & 0x0fff)); ui.leToneB->setText(gethexword(((chp->reg[3] << 8) | chp->reg[2]) & 0x0fff)); ui.leToneC->setText(gethexword(((chp->reg[5] << 8) | chp->reg[4]) & 0x0fff));
Для референса: https://faqwiki.zxnet.co.uk/wiki/AY-3-8912#Register_map