It is currently Thu Nov 14, 2019 7:12 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Jun 21, 2019 8:27 pm 
Offline

Joined: Sat Apr 27, 2019 11:56 am
Posts: 34
I have recently been taking apart the Taito audio engine in an attempt to write some new music on it. So far I have identified the music table, channel inits, and note locations. I wrote a script to hollow these areas out and insert new values for a basic song.

However while running some tests I noticed my pulse channels cannot go as low as expected. If I write a value greater than 0x3 for the top three bits in the timer register my square wave channel outputs something like a high hat or noise channel hit. I feel like this must be operator error as games such as Castlevania III use notes this low quite often. I modified nosefart to dump the values being written to the registers and I can clearly see the same numbers being put in there.

Nosefart output:
Taito (This outputs a small noise sound)
PC: 0x8119. Storing 0xf2 into Y 0x4002.
PC: 0x812b. Storing 0xd into Y 0x4003. // This has bit 3 set in the store value for the note duration. Essentially this is 0x5 for the top three bits.
// f = 1789773 ÷ (16× (0x5f2))

Konami (This correctly plays a low d)
PC: 0x820b. Storing 0xd into X offset 0x4003.
PC: 0x8221. Storing 0xf2 into X offset 0x4002.

Do I need to dive into the audio engine again and see if anything is being disabled or hamstrung? Is there a setting that prevents the pulse from going too low?


Top
 Profile  
 
PostPosted: Sat Jun 22, 2019 2:10 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7628
Location: Canada
Yes, the sweep units will silence low pitches unless they are disabled.

I would recommend that you write $08 to $4001 and $4005 at startup to initialize the sweep units in a disabled state.


Top
 Profile  
 
PostPosted: Sat Jun 22, 2019 11:17 am 
Offline

Joined: Sat Apr 27, 2019 11:56 am
Posts: 34
Well after reading the sweep unit page it is unfortunate I missed that in my research. I went up and down the pulse page mainly around the frequency equation. I am not sure this problem comes up too often but a note or link to the muting section may be something to add there.

Thanks for the quick answer. Luckily the taito engine has the option of initializing the sweep register before each note. After changing my script the notes coming out are correct. Thank you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


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:  
Powered by phpBB® Forum Software © phpBB Group