Minimig Discussion Forum

Discussing the Open Source FPGA Amiga Project
It is currently Wed Dec 13, 2017 3:27 am

All times are UTC




Post new topic Reply to topic  [ 121 posts ]  Go to page 1, 2, 3, 4, 5 ... 13  Next
Author Message
 Post subject: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Wed Aug 15, 2012 10:14 pm 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
So thanks to the amazing generosity of Gaula92 I now have a "real" Minimig to experiment with, and tonight i've been looking into the sound issue with Gods.

Just so I know exactly what it is we're dealing with, I've run the game on the Minimig and sampled the audio output. Immediately after the player jumps there is indeed a high-pitched screech. I can't actually hear it at normal listening levels (probably because one of my hard drives makes plenty of noise at a similar pitch) but I can see it quite clearly on the sampled audio. Here's a plot of part of the waveform, amplified to max amplitude.

Attachment:
Gods2.jpg
Gods2.jpg [ 23.65 KiB | Viewed 4143 times ]


Also a spectrum analysis (before amplification)

Attachment:
Gods1.jpg
Gods1.jpg [ 41.36 KiB | Viewed 4143 times ]


(For any masochists that happen to be reading, the amplified sound itself can be heard here: http://retroramblings.net/temp/GodsScreech.mp3)

So the first question is whether this sound is indeed a side-effect of the Sigma-Delta converter, or whether it's something more simple - when the "jump" sound has finished, does Gods park the sound channel on a word with non-matching bytes? Testing on the DE1 port of Minimig would be a good comparison, since that board has a dedicated audio codec - but unfortunately, so far I've had no luck getting Gods to work on the DE1.

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Thu Aug 16, 2012 8:19 pm 
Offline

Joined: Thu Jun 18, 2009 9:54 am
Posts: 349
I'd love to test again GODS with DE1 port, but I don't have my DE1 here right now.
I'll be back home in 5 days and I'll get sure to test it then if no one's able to do it before.


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Fri Aug 17, 2012 4:40 pm 
Offline

Joined: Mon Dec 01, 2008 9:58 pm
Posts: 1568
Location: .de
Its strange. Shortly after the fix was ready the first generated Core had no more such noise.
Or I could not hear/detect it.

It seems more, the Sigma/Delta converter is still instable.
Whole synthesis changed by altering the source somewhere else, so this error noise could reappear by adding any other feature or fix.

I will take a look at this matter soon but Im not an expert in such things!

_________________
_____________________________
JMP $00000BED ; will guru-meditation until next morning


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Fri Aug 17, 2012 5:37 pm 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
boing4000 wrote:
Its strange. Shortly after the fix was ready the first generated Core had no more such noise.
Or I could not hear/detect it.

It seems more, the Sigma/Delta converter is still instable.


Yeah, I just wanted to be sure it wasn't just a quirk of Gods before chasing the problem, but I can't reproduce it using WinUAE, whereas I *can* reproduce in WinUAE the effect I thought might be causing it, by fiddling with the sample repeats in ProTracker. So I agree, it's something to do with the Sigma/Delta converter.

I wonder whether the multiplexer that feeds the sigma/delta converter might be the culprit? Currently, if I'm reading the code correctly, the input of the sigma delta converter is swapped rapidly between two different sound channels, and that happens at the same rate as the sigma-delta modulation itself. [edit: that's how it used to work - the latest version with the audio fix has a nicer implementation which still multiplexes the volume multipliers but which sums their outputs on alternate cycles, so the input to the SD modulator should be stable.]

The first thing I plan to try is changing this multiplexer to an addition, so that the input to the modulator is stable from cycle to cycle. I think the point of the multiplexing is to share the volume multipliers between pairs of channels, but we have multipliers to spare, yes? [edit: Tobiflex has already taken care of this, in such a way that extra multpliers aren't needed! Nice!]

Even if doing that doesn't fix the problem, it'll make trying out Frenchshark's 3rd order converter easier, and will be necessary for box-filtering, too.

The other thing I shall try, just to prove the source of the issue, is to set up Paula so that the output is always zero if the sample repeat length is set to minimum. It'll probably break some chiptune or other, but it'll at least help identify what it is about Gods in particular that causes the issue.

Quote:
Whole synthesis changed by altering the source somewhere else, so this error noise could reappear by adding any other feature or fix.


Oh great - a build-to-build instability problem! That's always fun!

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Mon Aug 20, 2012 9:10 am 
Offline

Joined: Thu Jun 18, 2009 9:54 am
Posts: 349
I have just tried GODS on the Altera DE1, using chaos's latest build, with no luck: it stalls in a loading screen.
So, is there anything else I can try on this board to help improving minimig port's audio?


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Mon Aug 20, 2012 11:42 am 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
gaula92 wrote:
I have just tried GODS on the Altera DE1, using chaos's latest build, with no luck: it stalls in a loading screen.


Yeah, I've not yet managed to load GODS on anything TG68-based. Even the WHDLoad version crashes with a line 1111 error.

Quote:
So, is there anything else I can try on this board to help improving minimig port's audio?


Well I'm still experimenting for the moment - I've plumbed in the 3rd-order Sigma-Delta converter, but without the requisite filtering the standing tones are even worse than the first-order modulator. I'll make some builds available when I get time, so people can at least see what I mean.

I've started on the run-length-encoded box filter, too - but it's currently buggy, and after a while overflows and causes distortion. I'll keep at it, as time allows!

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Mon Aug 20, 2012 4:03 pm 
Offline

Joined: Mon Dec 01, 2008 9:58 pm
Posts: 1568
Location: .de
MMrobinsonb5 wrote:
Yeah, I've not yet managed to load GODS on anything TG68-based. Even the WHDLoad version crashes with a line 1111 error.


The game also freez/stall on the MCC216, so I can't compare the core to another FPGA board too.

_________________
_____________________________
JMP $00000BED ; will guru-meditation until next morning


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Mon Aug 20, 2012 10:24 pm 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
boing4000 wrote:
The game also freez/stall on the MCC216, so I can't compare the core to another FPGA board too.


How annoying - I wonder how well or badly it behaves under WinUAE? Whether it requires cycle-accurate timing?

Incidentally, does anyone see a reason why the sigma delta part can't be run at 28Mhz rather than 7?

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Tue Aug 21, 2012 1:35 pm 
Offline

Joined: Mon Dec 01, 2008 9:58 pm
Posts: 1568
Location: .de
In current MinimigV1 sources the DAC already works at 28MHz.

I have tested Gods in Linux e-uae.
The emulator prompt this info at the console while the green bar "Loading Game" is shown below on the screen:
Code:
Illegal instruction: 4afc at 00035db8 -> 00035dba
Illegal instruction: 4e7a at 00035dca -> 00035dda
Illegal instruction: 4e7b at 0003a8c2 -> 0003a8c6

Maybe this is the reason why the game fail at the TG68k driven Minimig.
The uae ignore this instructions and just continue loading.

_________________
_____________________________
JMP $00000BED ; will guru-meditation until next morning


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Tue Aug 21, 2012 5:19 pm 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
boing4000 wrote:
In current MinimigV1 sources the DAC already works at 28MHz.


Oh yes - so it does! Yet in FSB120420 (the zipfile here: viewtopic.php?f=5&t=485 ) it's at 7Mhz (clk rather than clk28m) - I wonder why?

Quote:
I have tested Gods in Linux e-uae.
The emulator prompt this info at the console while the green bar "Loading Game" is shown below on the screen:
Code:
Illegal instruction: 4afc at 00035db8 -> 00035dba
Illegal instruction: 4e7a at 00035dca -> 00035dda
Illegal instruction: 4e7b at 0003a8c2 -> 0003a8c6

Maybe this is the reason why the game fail at the TG68k driven Minimig.
The uae ignore this instructions and just continue loading.


Good catch - that may well have something to do with it. 4afc is the designated ILLEGAL instruction, which I guess Gods is using to trigger an exception - but 4e7a and 4e7b are MOVEC instructions, for which I think the TG68's support is still experimental.

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 121 posts ]  Go to page 1, 2, 3, 4, 5 ... 13  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Translated by Xaphos © 2007, 2008, 2009 phpBB.fr