AY8930: add TEST register effect

This commit is contained in:
tildearrow 2022-03-31 17:14:45 -05:00
parent 2d6a3b93d8
commit 6d1d91ca68
3 changed files with 11 additions and 0 deletions

View File

@ -427,6 +427,7 @@ int DivPlatformAY8910::dispatch(DivCommand c) {
chan[c.chan].freqChanged=true;
break;
case DIV_CMD_AY_IO_WRITE:
if (c.value==255) break;
if (c.value) { // port B
ioPortB=true;
portBVal=c.value2;

View File

@ -100,6 +100,9 @@ const char* DivPlatformAY8930::getEffectName(unsigned char effect) {
case 0x29:
return "29xy: Set auto-envelope (x: numerator; y: denominator)";
break;
case 0x2d:
return "2Dxx: NOT TO BE EMPLOYED BY THE COMPOSER";
break;
case 0x2e:
return "2Exx: Write to I/O port A";
break;
@ -446,6 +449,10 @@ int DivPlatformAY8930::dispatch(DivCommand c) {
chan[c.chan].freqChanged=true;
break;
case DIV_CMD_AY_IO_WRITE:
if (c.value==255) {
immWrite(0x1f,c.value2);
break;
}
if (c.value) { // port B
ioPortB=true;
portBVal=c.value2;

View File

@ -730,6 +730,9 @@ bool DivEngine::perSystemPostEffect(int ch, unsigned char effect, unsigned char
case 0x29: // auto-envelope
dispatchCmd(DivCommand(DIV_CMD_AY_AUTO_ENVELOPE,ch,effectVal));
break;
case 0x2d: // TEST
dispatchCmd(DivCommand(DIV_CMD_AY_IO_WRITE,ch,255,effectVal));
break;
case 0x2e: // I/O port A
dispatchCmd(DivCommand(DIV_CMD_AY_IO_WRITE,ch,0,effectVal));
break;