Hello!
We are trying to run Nuked-OPN2 on a teensy MCU, everything appears to run OK but no sound.
We are first calling OPN2_Reset
then executing OPN2_Clock() inside our audio buffer,
We get noise at the output when manually updating mor and mol with random numbers inside of the PN2_ChOutput() function,
but no signal is generated by the emulator when we send the test code below (taken from the datasheet):
`ym3438.write(0x22, 0x00); // LFO off
ym3438.write(0x27, 0x00); // Note off (channel 0)
ym3438.write(0x28, 0x01); // Note off (channel 1)
ym3438.write(0x28, 0x02); // Note off (channel 2)
ym3438.write(0x28, 0x04); // Note off (channel 3)
ym3438.write(0x28, 0x05); // Note off (channel 4)
ym3438.write(0x28, 0x06); // Note off (channel 5)
ym3438.write(0x2B, 0x00); // DAC off
ym3438.write(0x30, 0x71); //
ym3438.write(0x34, 0x0D); //
ym3438.write(0x38, 0x33); //
ym3438.write(0x3C, 0x01); // DT1/MUL
ym3438.write(0x40, 0x23); //
ym3438.write(0x44, 0x2D); //
ym3438.write(0x48, 0x26); //
ym3438.write(0x4C, 0x00); // Total level
ym3438.write(0x50, 0x5F); //
ym3438.write(0x54, 0x99); //
ym3438.write(0x58, 0x5F); //
ym3438.write(0x5C, 0x94); // RS/AR
ym3438.write(0x60, 0x05); //
ym3438.write(0x64, 0x05); //
ym3438.write(0x68, 0x05); //
ym3438.write(0x6C, 0x07); // AM/D1R
ym3438.write(0x70, 0x02); //
ym3438.write(0x74, 0x02); //
ym3438.write(0x78, 0x02); //
ym3438.write(0x7C, 0x02); // D2R
ym3438.write(0x80, 0x11); //
ym3438.write(0x84, 0x11); //
ym3438.write(0x88, 0x11); //
ym3438.write(0x8C, 0xA6); // D1L/RR
ym3438.write(0x90, 0x00); //
ym3438.write(0x94, 0x00); //
ym3438.write(0x98, 0x00); //
ym3438.write(0x9C, 0x00); // Proprietary
ym3438.write(0xB0, 0x32); // Feedback/algorithm
ym3438.write(0xB4, 0xC0); // Both speakers on
ym3438.write(0x28, 0x00); // Key off
ym3438.write(0xA4, 0x22); //
ym3438.write(0xA0, 0x69); // Set frequency
while(1){
ym3438.write(0x28, 0xC0); //key on
delay(1000);
ym3438.write(0x28, 0); //key off
delay(1000);
}`
I have a doubts about the following functions:
OPN2_SetTestPin
OPN2_SetChipType
Must they be called to enable signal generation?
Anything else we are missing?
Thanks in advance!
Cheers
Alex