Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PSG library port
#4
Thanks for sharing and thanks for all the PMs as I was trying to figure some of this stuff out on my end.

The one thing I think is missing here is a tuner for SMS to NGPC.  They're clocked at different rates, so an SMS-tuned PSG note will be out of tune on the NGPC's z80.  I've got a script that can pre-process these and I can post here when I get to the point of releasing it.

There are normal tone commands that have to be tuned one way, and then third channel tone commands that affect periodic noise on the noise channel.  These have to be tuned and then adjusted from a 16 bit LFSR to 15 bit.  *Big thanks to mic_ for explaining this to me.


Conversion info as I have implemented it based on my understanding:

Normal tone tuning example:
SMS register value for tone channel 1023
SMS input clock 3580000

frequency 109.3597263
NGPC input clock 3070000
NGPC register val = input clock/frequency/32 877.2653631

Periodic noise tuning example:
SMS register value for tone channel 1023
SMS input clock 3580000
frequency 109.3597263
SMS periodic noise freq = freq/16 6.834982893
NGPC frequency = periodic noise freq*15 102.5247434
NGPC input clock 3070000
NGPC register val = input clock/frequency/32 935.7497207
Reply


Messages In This Thread
PSG library port - by sodthor - 08-18-2020, 05:51 AM
RE: PSG library port - by sodthor - 08-18-2020, 05:58 AM
RE: PSG library port - by Flavor - 08-18-2020, 07:13 AM
RE: PSG library port - by winteriscoming - 08-19-2020, 04:54 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)