Re: [hatari-devel] Removing magic values from PSG?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On 03/02/2012 23:32, Eero Tamminen wrote:
Hi,

On lauantai 04 helmikuu 2012, Nicolas Pomarède wrote:
memset(PSGRegisters, 0, sizeof(PSGRegisters));
- for ( i=0 ; i<14 ; i++ ) /* Update sound's emulation registers */
+ /* Update sound's emulation registers */
+ for ( i=0 ; i<  NUM_PSG_SOUND_REGISTERS; i++ )
Sound_WriteReg ( i , 0 );
...
By the way eero, you should use PSG_REG_IO_PORTA (=14) instead of
NUM_PSG_SOUND_REGISTERS. Only sound related psg's registers should be
sent to Sound_WriteReg (values above 14 will be ignored, but it's
useless to send them anyway)

NUM_PSG_SOUND_REGISTERS is 14.  (It was already in the psg.h header,
I didn't need to add that, just use it everywhere it's appropriate.)

My mistake, I mised it with NUM_PSG_REGISTERS that was added to the enum. So it's ok.

Nicolas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/