- Details
- Written by Mr.Mouse
On the Commodore 64, talking about SID DIGI (sample) play routines, there are many forms. What they all have in common is that they need to use a Timer routine to play samples at a certain rate. The time in cycles that it takes for that Timer interrupt driven sample playback determines the maximum sample rate.
On a PAL machine, one cycle equals 1.015 microsecond.
This means, if you wish to have a sample play at 8000 hz (update 8000 times a second), you need to call the sample play routine every 1/8000 = 0.000125 seconds. Or 125 microseconds. This is 125/1.015 = ~123 cycles. Meaning the Timer will need to be set to cause the interrupt at $7b cycles. It also means that the sample playback routine should not spend more than 123 cycles to complete in total, otherwise the next update will start when the previous did not finish yet. Also, if any other stuff needs to be done, like scrollers, graphical stuff, or even a whole game running (for example using other interrupts) things can get tricky if the sample play routine is taking too long, leaving no cycles for other things.
So let's take a look at some sample playback routines used in the Commodore 64 music scene.
- Details
- Written by Mr.Mouse
I. Introduction
If you read a bit about Adlib and the OPL1 or OPL2 chips, many manuals and texts always tell you that you have to wait a number of cycles after a register-select write to the chip, and even more cycles after a register-value write. I also used that in my Edlib music player for the C64 based on that idea.
When I read through the music player code for the MSX game Xak (that also uses OPL1, the Y8950 or the poor man's version of the OPL2, the YM2413), I noticed that the programmers only waited a bit for the register select output to the YM3812 and did not put any extra waiting loop after register value write. See below for the code. Thus, I went ahead and wanted to know what is the minimum required waiting needed to use the OPL on the C64, and leave more cycles for other coding. Read the whole article by clicking on the Read More button.
Read more: YM3812 (OPL2) register write timing on the Commodore 64
- Details
- Written by Mr.Mouse
I recently had the honour to give a presentation at X2018 about FM-YAM! I decided to record the same presentation a week later at my home studio for anyone interested that missed the one at X. Check it out here: View the video.
- Details
- Written by Mr.Mouse
I will ship the first bulk of FM-YAM's from the second batch next week! I hope you will enjoy them, and make some music for it as well! :D
Page 2 of 3