Yeah, I noticed that. I have a feeling that register may not exist on the YM2612, as according to this documentation, the register defaults to 0, which would mean the chip would power up in 3 channel mode. It's definitely worth testing though. They might have just changed the default. There's also the interrupt control bits in that same register which I'd be interested in testing, even though the interrupt line of the YM2612 isn't connected in the Mega Drive.
Another thing which is very interesting is the "Priscarar function" (phonetic for something?). It appears that writing to registers 0x2D, 0x2E, and 0x2F in the YM2608 adjusts the clock divider for the FM and SSG sound generation units. I'd be interested in testing whethter these registers have any effect on the YM2612.
The thing I'm most interesting in solving once and for all with this new documentation is the cause of the unusual sound in Flashback, and several other Mega Drive games. There's some discussion about it in the following thread on this forum:
http://www.spritesmind.net/_GenDev/foru ... =2699#2699
What we know is that this problematic instrument uses the channel 3 "special" mode, where a separate frequency is specified for each operator in the channel. I've been going through the documentation trying to get my head around all the implications of this mode, and here's what I've got so far. Here's what the new YM2608 manual says about this mode:
Code: Select all
2-8-4 Setting of mode of CH3
Channel 3 can set the mode by $27 “D7,D6".
Table 2-1C CH3 mode
------------------------------------------------------------------------
|D7|D6|Mode | Function |
|--|--|------------|---------------------------------------------------|
| 0| 0|Normality |It pronounces normally as well as other CH. |
|--|--|------------|---------------------------------------------------|
| 0| 1|CSM |It becomes CSM voice synthesis mode, and F-Number |
| | | |can be set each every of the four slots. Key-on/off|
| | | |at the CSM mode is done with timer A. |
|--|--|------------|---------------------------------------------------|
| 1| 0|Effect sound|Separate F-Number can be set to each slot as well |
| 1| 0| |as CSM. |
------------------------------------------------------------------------
Several things about this table:
1. My reading is that the last entry should apply to bit patterns 10 and 11. I think the fact they list 10 twice for the last entry is an obvious typo.
2. My understanding of the description is that the CSM and "Effect Sound" modes both enable the use of the extra channel 3 registers to specify the frequency/block data for each operator separately. The difference between the two seems to be that in the CSM mode, Timer A is somehow used to automatically toggle key on/off. The text seems to suggest that this does not happen in "Effect sound" mode, it simply activates the separate frequency numbers for each operator.
What I don't know from reading this documentation is how exactly this "key on/off" on Timer A works. Obviously something happens when Timer A expires, but there's a few different ways I could imagine this being implemented. Does it always simply set key on for each Timer A, and never send a key-off? Does it alternate between key on/key off as the timer expires? I'd want to confirm exactly what the behaviour is.
Comparing the table in the YM2608 manual with the one in the Genesis Software Sound Manual, here's what Sega says about this mode:
Code: Select all
-------------------------------------------------------------
|CH 3 Mode |D7|D6| |
|----------|--|--|------------------------------------------|
|NORMAL | 0| 0|Channel 3 is the same as the others. |
|----------|--|--|------------------------------------------|
|SPECIAL | 0| 1|Channel 3 has four separate frequencies. |
|----------|--|--|------------------------------------------|
|ILLEGAL | 1| X| |
-------------------------------------------------------------
This would suggest that what we currently call channel 3 "special" mode is in fact CSM mode, and that in order to emulate it, we should be doing the key on/off on Timer A. Perhaps the sound error is due to this feature not being emulated?
Another thing of note, is that the Sega documentation and the YM2608 documentation disagree about which frequency values affect which operators. Here's what it says in the Genesis Software Sound Manual, page 12:
"Channel 3 operator 1's frequency is in Registers A2 and A6. Operators 2 and 4 are in Registers A8 and AC, A9 and AE, and AA and AE, respectively."
Well, for one thing, I assume they meant to say "Operators 2
, 3, and 4", and there's the glaring error that they listed register AE twice. The third pair should have been A9, AD. Even if you account for those errors though, that doesn't match up with the register assignments given in the YM2608 manual. The table on page 20 of the YM2608 Application Manual gives the following register allocation:
Code: Select all
------------------
|Operator 1|A9,AD|
|Operator 2|AA,AE|
|Operator 3|A8,AC|
|Operator 4|A2,A6|
------------------
Compared with the numbers they were trying to give in Sega's documentation:
Code: Select all
------------------
|Operator 1|A2,A6|
|Operator 2|A8,AC|
|Operator 3|A9,AD|
|Operator 4|AA,AE|
------------------
We know that the registers for operators 2 and 3 are switched in the Sega documentation, so if you use the same operator numbers as are given in the register list in the Sega documentation, you should reverse operators 2 and 3 in that table. Even if you do that however, the Sega documentation clearly says that the frequency for operator 1 is in A2,A6, while the YM2608 manual says that's the frequency for operator 4. Can anyone who's worked with the YM2612 in hardware, or written a working YM2612 core, confirm which register numbers match up to which operators?