Jump to content
IGNORED

PoKey emulation?


analmux

Recommended Posts

Getting closer...

 

http://www.scrameta.net/autobuild/instrumentarium/Instrumentariumv2.mp3

 

I re-did the plls - timing should be much closer (2% vs 0.1% wrong - I can't get exact for PAL).

I fixed 2-tone I think (bit 7 forces serial out to 0 - I was doing this after the 2-tone logic).

Poly counters now pass Perry's linked test.

 

Still not sure about the poly 5 issue though - does the problem still exist?

Edited by foft
  • Like 3
Link to comment
Share on other sites

One example:

...

You can find more here. I hope it's now clear enough.

 

http://atariage.com/forums/topic/149261-a-new-pokey-tune-unusual-instruments/?p=1820884

 

 

Thank you a lot! I fixed this - actually, this was caused by the pokey "channel mute" logic being a bit overly ambitious as it disabled the high-counter of a high-low channel pair even though the high-counter is required to drive the reset-logic of the low counter. Thus, next release will get this right!

  • Like 2
Link to comment
Share on other sites

Still not sure about the poly 5 issue though - does the problem still exist?

So from the times with problems I guess the issue I have is with:

----------------------------------------------------

Distortion 2 at 1.79 MHz: (0:46 - 1:09, 1:32 - 1:39)

 

Channel: 1 or 3

Pokey Distortion: 2

AUDCTL settings: x1x0x0xx or xx1x00xx

Custom Notation Table 1

 

Remarks:

-This instrument gives better-tuned high notes, independent of 15 kHz or 64 kHz mode

(see http://atariage.com/forums/topic/149261-a-new-pokey-tune-unusual-instruments/?p=1820884).

 

I tried to reproduce this in basic, but I get what appears to be a near identical sound.

 

10 P=53760

20 TL=250

30 POKE P+8,64

40 POKE P+1,74

50 POKE P,TL

60 GOTO 60

 

i.e. 1.79MHz channel1, distortion 2 (010 - 4 bit and 5 bit together)

 

Is this the sound the problem is heard with?

Link to comment
Share on other sites

Ah, I see in line 40: POKE P+1,74 is equivalent to distortion 4: use hi nybble: 74 = 16*4 + 10, thus distortion 4, volume 10. Yes, this is poly4+poly5.

 

POKE P,TL, with TL=250 gives the real pitch: 250+4 = 254 = 2*127, which isn't divisible by 3,5 and 31: it's a maximal sound combination w.r.t. poly4 and poly5.

Link to comment
Share on other sites

Reproduced. Removed inversion on the poly 5 output (its on the decap schematic, which also has the wrong terms to the xnor) and it matches now with my test.

 

Thanks for the help, this should be pretty close now.

 

Sure enough instrument starting just after 45seconds ish match frequency better:-)

Instrumentariumv3.mp3

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

Another interesting case:
10 P=53760
20 POKE P+8,64
30 POKE P+1,10+32
31 POKE 53775,11
40 POKE P,20
50 GOTO 50

Relatively low frequency on my 600XL, higher frequency on my implementation and on Altirra 2.5 (not checked latest test).

Perhaps down to two tone delays? I haven't adjusted delays with 2-tone mode. Two-tone extra delay description. Have to connect up the scope/LA I guess...

  • Like 1
Link to comment
Share on other sites

I've known about some inaccuracies in Altirra's emulation with two-tone mode at 1.79MHz rates but haven't gotten around to tracking them down. Last time I ran into it was when I was working with PWM audio, where some max amplitudes worked in emulation but crackled on the real hardware.

 

If I simplify the case to a lower pitch square wave and hold down timer 2 so it doesn't interfere, it sounds like the timer 1 period needs to be lengthened by two cycles. However, that's not enough to fix the case above, where there is some other interaction going on.

  • Like 1
Link to comment
Share on other sites

Anti forget propaganda ;)

 

The Video shows some different tunes played in Altirra. Seems the 60Hz plays "speed stable". Not sure about the timing.

Some tunes use "instruments" with special timings and some also use "Filter-Modulations" .

Minimod has only some adjustments and the main filter runs free (for example)

 

All of them were played at 50Hz speed. Not sure about the channel mixing. To me it seem "over" compared to the real thing.

 

It's all the same volume and the same Altirra-settings. Just different usage of the soundgenerators.

 

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

  • 3 weeks later...

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...