• Ordering from the BitBuilt Store will be disabled until sometime next week. We apologize for the inconvience!

Worklog PPR

Joined
Dec 28, 2016
Messages
101
Likes
795
Got it working. For now I am just putting in analog in thru the LINE_IN pins. As with all TI datasheets, their pdf is garbage and doesn't actually describe anything about LINE IN, I just got it working by guessing. Fan controller works great. It has both internal temp sensor + remote junction support.


The FPGA will be running the audio resampler stolen from UltraHDMI. As you know, the n64 is capable of producing any audio frequency audio signal up to 300khz (Its stock DAC doesn't go past 48khz though). But, it's not actually I2S - it's right justified which is close but not quite. Even worse, it doesn't have any MCLK.
However, the killshot is that the N64 changes sample rate all the time, even within the same game. All DACs expect a constant frequency and do not like having that changed (you'd have to reprogram one constantly). This is exactly why I made the audio resampler in the first place - to take in goofy right-justified any-frequency and produce vanilla I2S.


Terrible video:
 

Aurelio

ᕕ( ᐛ )ᕗ
Staff member
.
.
.
.
.
.
Joined
Mar 3, 2016
Messages
1,907
Likes
2,597
Portables
2
Got it working. For now I am just putting in analog in thru the LINE_IN pins. As with all TI datasheets, their pdf is garbage and doesn't actually describe anything about LINE IN, I just got it working by guessing. Fan controller works great. It has both internal temp sensor + remote junction support.


The FPGA will be running the audio resampler stolen from UltraHDMI. As you know, the n64 is capable of producing any audio frequency audio signal up to 300khz (Its stock DAC doesn't go past 48khz though). But, it's not actually I2S - it's right justified which is close but not quite. Even worse, it doesn't have any MCLK.
However, the killshot is that the N64 changes sample rate all the time, even within the same game. All DACs expect a constant frequency and do not like having that changed (you'd have to reprogram one constantly). This is exactly why I made the audio resampler in the first place - to take in goofy right-justified any-frequency and produce vanilla I2S.


Terrible video:
Love the pills bottles! :D
I didn't do much work on the N64, but I was looking into using the LM49450 for it as well and on the datasheet it looks like it supports right justified mode (register 0x03, b0 and b1).
Also try looking for info about the integrated FIR filter in the LM4950. There's basically no info in the datasheet and if you look online you'll end up on this TI community web page: https://e2e.ti.com/support/amplifiers/audio_amplifiers/f/6/t/514350
 
Joined
Dec 28, 2016
Messages
101
Likes
795
I was planning to do speaker enclosure compensation EQ in the fpga, but even better if the amp could do it. Maybe took a look at the EVM and its documentation? Maybe the companion PC software may have some notes.


Class D is very efficient. Its headphone amp is alright, but not as good as a dedicated one.

 

Aurelio

ᕕ( ᐛ )ᕗ
Staff member
.
.
.
.
.
.
Joined
Mar 3, 2016
Messages
1,907
Likes
2,597
Portables
2
Maybe took a look at the EVM and its documentation?
Yeah, too bad there is no EVM for the LM49450 :/

Oh also could you try reading a register from the LM49450? I tried but it looks like it doesn't work? I get always a fixed value (0xFF iirc).
 
Joined
Dec 28, 2016
Messages
101
Likes
795
I looked around for some other similar National parts and found one that has a similar (if not the same) DSP engine:

http://datasheet.elcodis.com/pdf/9/4/90447/lm49350rlnopb.pdf

Check page 70 onwards or 87+ for the 5 filter bands. They are just 2 bits of cut off and 5 bits gain per band. Maybe try each one (make sure to enable custom filter)
 

Aurelio

ᕕ( ᐛ )ᕗ
Staff member
.
.
.
.
.
.
Joined
Mar 3, 2016
Messages
1,907
Likes
2,597
Portables
2
I looked around for some other similar National parts and found one that has a similar (if not the same) DSP engine:

http://datasheet.elcodis.com/pdf/9/4/90447/lm49350rlnopb.pdf

Check page 70 onwards or 87+ for the 5 filter bands. They are just 2 bits of cut off and 5 bits gain per band. Maybe try each one (make sure to enable custom filter)
Oh that might actually be it. I will definitely take a look into it in few weeks, thanks
 

GingerOfOz

no wario
Staff member
.
.
.
Joined
Dec 16, 2016
Messages
1,007
Likes
2,226
Location
The Oregon Wildlands
Portables
3
LM49450 <3
It’s amazing how versatile that thing is. Do you use the FPGA only for MCLK generation and i2c control of the amp IC, or do you use it for something else?
Got it working. For now I am just putting in analog in thru the LINE_IN pins. As with all TI datasheets, their pdf is garbage and doesn't actually describe anything about LINE IN, I just got it working by guessing. Fan controller works great. It has both internal temp sensor + remote junction support.


The FPGA will be running the audio resampler stolen from UltraHDMI. As you know, the n64 is capable of producing any audio frequency audio signal up to 300khz (Its stock DAC doesn't go past 48khz though). But, it's not actually I2S - it's right justified which is close but not quite. Even worse, it doesn't have any MCLK.
However, the killshot is that the N64 changes sample rate all the time, even within the same game. All DACs expect a constant frequency and do not like having that changed (you'd have to reprogram one constantly). This is exactly why I made the audio resampler in the first place - to take in goofy right-justified any-frequency and produce vanilla I2S.


Terrible video:
Love the pills bottles! :D
I didn't do much work on the N64, but I was looking into using the LM49450 for it as well and on the datasheet it looks like it supports right justified mode (register 0x03, b0 and b1).
Also try looking for info about the integrated FIR filter in the LM4950. There's basically no info in the datasheet and if you look online you'll end up on this TI community web page: https://e2e.ti.com/support/amplifiers/audio_amplifiers/f/6/t/514350
I was planning to do speaker enclosure compensation EQ in the fpga, but even better if the amp could do it. Maybe took a look at the EVM and its documentation? Maybe the companion PC software may have some notes.


Class D is very efficient. Its headphone amp is alright, but not as good as a dedicated one.

Yeah, too bad there is no EVM for the LM49450 :/

Oh also could you try reading a register from the LM49450? I tried but it looks like it doesn't work? I get always a fixed value (0xFF iirc).
I looked around for some other similar National parts and found one that has a similar (if not the same) DSP engine:

http://datasheet.elcodis.com/pdf/9/4/90447/lm49350rlnopb.pdf

Check page 70 onwards or 87+ for the 5 filter bands. They are just 2 bits of cut off and 5 bits gain per band. Maybe try each one (make sure to enable custom filter)
Oh that might actually be it. I will definitely take a look into it in few weeks, thanks
Nintendo-64-Pizza.jpg
 
Joined
Dec 28, 2016
Messages
101
Likes
795
Yeah, too bad there is no EVM for the LM49450 :/

Oh also could you try reading a register from the LM49450? I tried but it looks like it doesn't work? I get always a fixed value (0xFF iirc).
I'd be intersted to know what your first 3 regs are concerning divider mode and CPDIV and such. I'm just trying to set up for vanilla 48khz but I still get crunchy sounding audio.
 

Aurelio

ᕕ( ᐛ )ᕗ
Staff member
.
.
.
.
.
.
Joined
Mar 3, 2016
Messages
1,907
Likes
2,597
Portables
2
I'd be intersted to know what your first 3 regs are concerning divider mode and CPDIV and such. I'm just trying to set up for vanilla 48khz but I still get crunchy sounding audio.
This is the relevant part of code (I included registers 0x03 and 0x04 as well):
i2c_write8(LM49450_ADDR, 0x00, 0x21, &i2c_error);
i2c_write8(LM49450_ADDR, 0x01, 0x00, &i2c_error);
i2c_write8(LM49450_ADDR, 0x02, 0x4B, &i2c_error);
i2c_write8(LM49450_ADDR, 0x03, 0x02, &i2c_error);
i2c_write8(LM49450_ADDR, 0x04, 0x00, &i2c_error);

Just consider that these are for the Wii which provides a 12.288MHz MCLK. Also these might need the left and right channel to be swapped, but that doesn't really matter.
 
Joined
Dec 28, 2016
Messages
101
Likes
795
No new news except someone asked me to transplant parts onto a 3x3 and provided 36mbit ram chips, so here it is running 1080 Snowboarding.
You can see the dies inside each ram chip are almost double size what they are usually.

Surprisingly, even though the game only uses the first 4mb, both chips are almost equally as hot! The 2nd chip is basically doing nothing. So rambus has incredibly high static current and dynamic current over that is not significant. Such is SSTL life.


 
Top