English
Language : 

VS1033 Datasheet, PDF (46/70 Pages) List of Unclassifed Manufacturers – MP3/AAC/WMA/MIDI AUDIO CODEC
VLSI
Solution y
VS1033a PRELIMINARY
VS1033A
9. OPERATION
9.8 Extra Parameters
The following structure is in X memory at address 0x1940 and can be used to change some extra param-
eters or get various information. The chip ID is also easily available.
#define PARAMETRIC_VERSION 0x0001
struct parametric {
u_int32 chipID;
/*1940/41 Initialized at reset for your convenience */
u_int16 version; /*1942 - structure version */
u_int16 midiConfig; /*1943 */
u_int16 config1; /*1944 */
u_int16 config2; /*1945 configs are not cleared between files */
u_int32 jumpPoints[16]; /*1946..65 file byte offsets */
u_int16 latestJump; /*1966 index to lastly updated jumpPoint */
s_int16 seek1;
/*1967 file data inserted/removed bytes -32768..32767*/
s_int16 seek2;
/*1968 file data inserted/removed kB -32768..32767*/
s_int16 resync;
/*1969 > 0 for automatic m4a, ADIF, WMA resyncs */
union {
struct {
u_int32 curPacketSize;
u_int32 packetSize;
} wma;
struct {
u_int16 sceFoundMask; /* SCE’s found since last clear */
u_int16 cpeFoundMask; /* CPE’s found since last clear */
u_int16 lfeFoundMask; /* LFE’s found since last clear */
u_int16 playSelect; /* 0 = first any, initialized at aac init */
s_int16 dynCompress; /* -8192=1.0, initialized at aac init */
s_int16 dynBoost;
/* 8192=1.0, initialized at aac init */
} aac;
struct {
u_int32 bytesLeft;
} midi;
} i;
};
Notice that reading two-word variables through the SCI WRAMADDR and SCI WRAM interface is
not protected in any way. The variable can be updated between the read of the low and high parts. The
problem arises when both the low and high parts change values. To determine if the value is correct, you
should read the value twice and compare the results.
The following example shows what happens when bytesLeft is decreased from 0x10000 to 0xffff and
the update happens between low and high part reads or after high part read.
Address
0x196a
0x196b
0x196a
0x196b
Read Invalid
Value
0x0000 change after this
0x0000
0xffff
0x0000
Address
0x196a
0x196b
0x196a
0x196b
Read Valid
Value
0x0000
0x0001 change after this
0xffff
0x0000
No Update
Address Value
0x196a 0x0000
0x196b 0x0001
0x196a 0x0000
0x196b 0x0001
You can see that in the invalid read the low part wraps from 0x0000 to 0xffff while the high part stays the
same. In this case the second read gives a valid answer, otherwise always use the value of the first read.
The second read is needed when it is possible that the low part wraps around, changing the high part, i.e.
when the low part is small. bytesLeft is only decreased by one at a time, so a reread is needed only
if the low part is 0.
Version 0.6, 2005-01-05
46