Previous 15994 Revisions Next

r2390 Sunday 13th April, 2008 at 19:12:03 UTC by Wilbert Pol
[ODYSSEY2] Added first implementation of noise.
[src/mess/video]odyssey2.c

src/mess/video/odyssey2.c
r2389r2390
167167static int         start_vpos;
168168static int         start_vblank;
169169static UINT8      lum;      /* Output of P1 bit 7 influences the intensity of the background and grid colours */
170static UINT16      lfsr;
170171
171172static sound_stream *odyssey2_sh_channel;
172173
r2389r2390
605606            {
606607               signal |= *buffer << 23;
607608            }
609            /* Noise poly is : L=16 W=2 10000000000100001 */
610            lfsr = ( lfsr >> 1 ) | ( ( ( lfsr & 0x01 ) ^ ( ( lfsr & 0x800 ) >> 11 ) ) << 15 );
611            if ( ! lfsr ) {
612               lfsr = 0xFFFF;
613            }
614            /* Check if noise should be applied */
615            if ( o2_vdc.s.sound & 0x10 ) {
616               *buffer |= ( lfsr & 0x01 );
617            }
608618            o2_vdc.s.shift3 = signal & 0xFF;
609619            o2_vdc.s.shift2 = ( signal >> 8 ) & 0xFF;
610620            o2_vdc.s.shift1 = ( signal >> 16 ) & 0xFF;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team