Jump to content
IGNORED

POKEY 16-bit mode and other AUDCTL settings - A7800 emulation


Recommended Posts

To give some imagination of a bass use at 64kHz.

You might know that RMT isn't really supporting 16 Bit, and my experiments go even more to wave-form manipulations . It also allows 4 channels all the time. By "tickling" the bass generator, the resulting frequency is differently recognizable.

 

 

Link to comment
Share on other sites

3 hours ago, RevEng said:

TIA+POKEY chords might work better if you change to A minor, to take advantage of Perceptual Tuning.

 

There is no doubt a perceptual tuning key for which problematic POKEY ranges sound more in tune also, but nobody has investigated that.

Well, there's a lot to investigate ... so many different settings, many of them undocumemted

  • Like 1
Link to comment
Share on other sites

11 minutes ago, Synthpopalooza said:

I will add that standard 8-bit POKEY usage entails $Ax standard square wave which is good up to maybe C6 where tuning errors start.  Bass uses $Cx which is only good to about C3 before it sounds off key.

good decision.

In my opinion the main cause for the bass is to fit below the real gen "A" notes. The higher bass notes are a "side effect" , that's why the creator of POKEY didn't add some "stabilizing solutions". Using 16 Bit seems to sound very clean, just by the fact that the polycounter isn't that raw to sound much different from 16 bit note to 16 bit note.

Also: The gen "C3" is still a little off, the "higher basses" can be adjusted using vibratos.

Link to comment
Share on other sites

  • 3 weeks later...

Version 4.0 of a7800 got released today ...

 

I have tried it out, and there are some improvements ... specifically on some of the SKCTLS examples ...

 

From earlier in the thread, the Mario overworld theme, Zanac, and Worldrunner all show improvements ... still not 100% to real HW yet but they are not out of tune anymore. 

 

Things are progressing ... :)  Thanks to Trebor and RevEng for the awesome work you are doing.  I hope to keep you all busy for awhile lol.

  • Like 1
Link to comment
Share on other sites

So here is an example of the improved emulation ... from up in the thread, the Super Mario World title theme ...

 

0 - silent (frequency carrier)

1 - $Ax (modulation)

2 - $Ax (standard square)

3 - $Ax (standard square)

 

The music sounds more in tune ... however:  The SKCTLS channel plays an octave lower than in real hardware.  :)  But still, I call this a major improvement.  My ears don't bleed anymore.

 

SKCTLS in $Ax works in the following manner ... the silent channel is a frequency carrier, and the audible channel carries the modulation.  There are several intervals that are used which will change the timbre of the sound ... in this case, I used the second zone, which tunes the melody up an octave and introduces a slight pulse wave into the sound.

 

Reposting those here ... I think my original versions up in the thread got hosed.  But check it out in the new A7800 4.0 ...

marioworld-pokey450.A78 marioworld-pokey450.asm marioworld-pokey450.bin marioworld.A78 marioworld.asm

Link to comment
Share on other sites

Example #2:

 

SKCTLS in 1.79 mhz mode ... in this case, the SKCTLS channel is 100% to real hardware.

 

This is the mario overworld theme from up in the thread ...

 

AUDCTL=$60 (1.79 mhz on 0 and 2)

 

0 - silent (frequency carrier)

1 - $Ax (modulation)

2 - $Cx (1.79 high saw wave)

3 - $Cx (mod 3 8-bit bass)

 

 

This time, SKCTLS channel is a lot closer to real HW, and in the right octave, apart from the high zero frequencies (meant to be rests) which are a bit more audible to my ears than they are on real HW.  I will need to listen more closely though.

 

The $Cx saw wave channel does not play above a certain frequency ... I believe the previous A7800 also has this as well.

 

Reposting the binaries here.

marioworld1-450.A78 marioworld1-450.asm marioworld1-450.bin marioworld1.A78 marioworld1.asm marioworld1.bin

Link to comment
Share on other sites

And the last example ... 3-D Worldrunner

 

AUDCTL=$20 (1.79 mhz on channel 2)

 

0 - Silent (frequency carrier)

1 - $Ax (modulation)

2 - $Cx (1.79 high saw wave)

3 - $Ax (standard square wave - bass)

 

Again ... SKCTLS is in tune but an octave down from real HW ... and the 1.79 mhz $Cx channel which plays mostly high notes, plays improperly (a carryover from the previous A7800)

 

Sounding a lot better tho!

 

 

worldrunner.A78 worldrunner.asm worldrunner.bin worldrunner-450.A78 worldrunner-450.asm worldrunner-450.bin

Link to comment
Share on other sites

Next step ... try working up a demo using $Ax SKCTLS in 15khz bass mode.  Let's just see what this new emulator can handle ... ?

 

SKCTLS in other settings besides $Ax is unimplemented at the moment in emulation. ... which is ok.  I got a lot more work to do yet on that front as far as documenting everything. 

Link to comment
Share on other sites

A slight reworking of the top gun danger zone theme ... this is the lead only, which uses the SKCTLS channels 0 and 1 in 15 khz bass mode, AUDCTL=$01, and set to $Ax square wave

 

As before ... the new A7800 v 4.0 plays it an octave below where it should, but otherwise in the correct key. :)

 

 

Check this on real hardware please ...

 

topgun-dzone-skctls-4000.A78 topgun-dzone-skctls-4000.asm topgun-dzone-skctls-4000.bin topgun-dzone-skctls-450.A78 topgun-dzone-skctls-450.asm topgun-dzone-skctls-450.bin

Link to comment
Share on other sites

I am next going to modify my POKEY emulator test for $Ax SKCTLS at the standard 64khz clock.  There are at least 8 different note tables to be had, each one with an adjustable pulse width.  This might be a tool to help improve the emulation. 

 

The next update of my POKEY table will have these settings as well.

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Just a heads up ... I have been messing around with the hi-pass filter using $2x with 1.79 mhz.  This makes distorted guitars alot like the reverse 16 $4x and $8x settings, except these are a lot sharper and clearer, and I think the note range is better too.  Another 65,536 frequencies to step through and we'll have ourselves a note table. :)

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...

OK, went back and revisited an old experiment!

 

The Zanac theme ... which uses SKCTLS 2-tone setting at $Ax.  This time, instead of silencing the frequency carrier second channel, I allow it to play atop the modulated channel.  This transposes the melody down an octave, changes the wave into a sort of 25% duty cycle wave, and makes it sound fuller.

 

I also fixed the volume stutter issues with this mode. 

 

Emulation:  As expected, Prosystem fails to play the two tone modulation.  The new A7800 will play this, but in the wrong octave, so you don't really hear the full effect.

 

Next steps:  Experiment with this method using other distortions with SKCTLS 2-tone ...

 

Real hardware test please. :)

 

 

zanac2.A78 zanac2.asm zanac2.bin zanac2-450.A78 zanac2-450.asm zanac2-450.bin

  • Like 4
Link to comment
Share on other sites

  • 4 weeks later...

I am progressing on $2x @1.79 plus hi-pass.  I have worked out a pattern!

 

You set AUDCTL=$64.  This clocks 0 and 3 at 1.79 and sets up a high pass filter on those two channels.

 

AUDF0 has the frequency value taken from my $2x @1.79mhz table.  AUDF3 modulates it.  Warbling distorted guitars can be had, but at a much better frequency range, reaching up into the 6th octave without tuning errors!

 

Note table soon!

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

So meanwhile, this happened:

 

 

 

This is a POKEY exploration tool which runs on Altirra ... should make exploring and mapping these new POKEY settings easier!  In addition, frequency sweeps can be recorded to PC using Altirra emulator, and then the frequencies analyzed using a Linux utility called aubiopitch.  This should automate the generation of note tables!

 

$Ax and $2x with AUDCTL=$64 (hi-pass, 1.79+1.79) should be done in short order.  Demo tune not far away. :)

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...

OK ... new note table.  This is for AUDCTL=$64, AUDC1=$Ax, AUDC3=$00

 

This sets the inappropriately named "hi-pass filter" on channels 0 and 3, and also clocks both channels at 1.79 mhz.  At this high a clock rate, the filter effect creates a triangle wave similar to the NES.  As the frequencies get lower, a noise artifact creeps in. 

 

When making frequencies, we work in intervals ... a frequency differential between AUDF1 and AUDF3.  So for example, c1 on this table is $e5e6 (that is, $e5 in channel 1 and $e6 in channel 3).  If you reverse these settings to $e6e5, you get the same frequency, but the triangle wave is inverted.  The frequency differential is 1, in this case.

 

This table was calculated using the prime intervals of 1, 3, 5, and 7.  Higher primes such as 11 and 13 are not very useful.   Also, the reversal of frequencies does not work on the 5 interval, as there is a 1 step offset.  These are marked as * in my note table.  Also, as you get to higher frequencies, the apparent volume gets lower.

 

The table also gets to C9 without any noticable tuning errors!  ?  In addition, the A4 note is an almost perfect 440 hz!

 

TXT file attached.  A demo tune will be the next step.

 

 

AUDCTL=$64 AUDC1=$AX AUDC3=$00.txt

Edited by Synthpopalooza
  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...