Yamaha SFG-05 for Cx5me

Page 3/5
1 | 2 | | 4 | 5

By Grauw

Ascended (10711)

Grauw's picture

14-03-2016, 22:55

Mail sent.

It’s binary identical to one SFG ROM dump I have called sfg-M5.01.011.rom, so it’s been dumped before. Though it’s different from the ROM in my SFG-05 and the ones in the systemroms archive.

By Wierzbowsky

Guardian (3571)

Wierzbowsky's picture

15-03-2016, 00:52

Thanks! With this BIOS the converted module works properly. The BIOS is obviously patched as it does not match the original dumps that I found. Will try to check what exactly was patched...

By Grauw

Ascended (10711)

Grauw's picture

15-03-2016, 09:41

Yeah, very curious now, I thought the modules were near identical.

Something to do with the YM2164 OPP that’s in the SFG-05 perhaps? Maybe for the same reason why the FB-05’s YM2164 can’t be replaced by an YM2151, the SFG-05 BIOS does something YM2164-specific? In which case, that’d be very interesting. Or maybe the interrupt vector support doesn’t work well on the SFG-01 board.

By Wierzbowsky

Guardian (3571)

Wierzbowsky's picture

16-03-2016, 23:17

What I could see in the patched bios was the missing bit operations for the values read from the system area and the missing call to some subroutine. Probably internal register or interrupt related. But the guy who patched it knew what he was doing for sure. Smile

By Grauw

Ascended (10711)

Grauw's picture

07-11-2017, 10:14

If anyone needs that ROM for the SFG-01 to SFG-05 upgrade:

» SFG-01 to 05 upgrade ROM.

By Grauw

Ascended (10711)

Grauw's picture

27-08-2017, 03:36

Alexey wrote:

What I could see in the patched bios was the missing bit operations for the values read from the system area and the missing call to some subroutine. Probably internal register or interrupt related. But the guy who patched it knew what he was doing for sure. Smile

I checked the differences from the SFG-05 ROM for the YM2164 OPP to this ROM for the YM2151 OPM. Found out some nice things about the difference between YM2151 and YM2164, as well about I/O port addresses…

0089H (YM2164): 02H 01H
0089H (YM2151): 00H 00H

I think these are version codes of sorts? They come right after the documented version codes.

085FH (YM2164): writes 2 then 0 to register 9
085FH (YM2151): writes 2 then 0 to register 1

On YM2151 register 1 is the test register. Setting bit 1 to 1 and then back to 0 resets the LFO, this is a documented function of the test register (see page 13. Register 9 is not documented anywhere however. Maybe in the YM2164 the test register moved from register 1 to register 9?

29B7H (YM2164): writes 10H to registers 0-7
29B7H (YM2151): the writes to register 0-7 are omitted

Given that this modifies the test register on YM2151, and setting bit 4 breaks the sound output (nice doc btw, hadn’t found it before), it’s understandable that they patched this out. Question remains, what is the function of registers 0-7 on YM2164?

032CH, 1E73H, 2F4DH (YM2164): scf / rra before writing to register 18
032CH, 1E73H, 2F4DH (YM2151): nop / nop before writing to register 18

The base frequency of timer B on the YM2164 is half that of the YM2151. The timer period value is shifted right by one to compensate (= /2). A 1-bit is shifted in because the period value is negated.

On YM2151 the timer B period (s) is: (1024 * (256 - CLKB)) / 3579545
On YM2164 the timer B period (s) is: (2048 * (256 - CLKB)) / 3579545

3FF0H, 7FF0H: These are the I/O ports, so not actual ROM differences.

This is unrelated, but this did make me realise that the I/O ports probably not only respond to 3FF0H, but also to 7FF0H and BFF0H, it’s mirrored. I confirmed this with VGMPlay, though I couldn’t get it to work for FFF0H somehow (maybe my error). That could be quite handy, since that means you could access the I/O in an arbitrary page instead of page 0 where the BIOS is (and which doesn’t like getting switched out).

@Alexey Does your SFG clone implement this mirroring as well?

By Manuel

Ascended (19308)

Manuel's picture

25-08-2017, 23:41

Perhaps a dumb question (as I'm too lazy to look it up): What is actually the difference between the YM2164 and the YM2151 from a practical/feature point of view?

EDIT: https://en.wikipedia.org/wiki/Yamaha_YM2164 shows the answer... only that test register is different, apparently.

By Grauw

Ascended (10711)

Grauw's picture

25-08-2017, 23:44

Manuel wrote:

Perhaps a dumb question (as I'm too lazy to look it up): What is actually the difference between the YM2164 and the YM2151 from a practical/feature point of view?

They sound the same, that much is for sure.

From what I found right now, it seems that 1. the test register is in a different location (YM2151: register 1, YM2164: register 9), 2. the YM2164 has some unknown functions in registers 0-7, and 3. the YM2164 has some unknown function in bit 7 of register 18 (timer B).

Note that the LFO reset function is located in the test register, so if any VGM song uses this, I would need to dynamically adjust the register address in VGMPlay to make it work.

Manuel wrote:

EDIT: https://en.wikipedia.org/wiki/Yamaha_YM2164 shows the answer... only that test register is different, apparently.

So, that was the information we had so far, and it was very uselessly inspecific :). With these findings, we finally have more details, which can be used to figure out the full story.

By Manuel

Ascended (19308)

Manuel's picture

25-08-2017, 23:49

Great that you're investigating this Smile And strange that this stuff isn't documented anywhere. Apparently the OPP was only for internal use, that may explain the lack of docs.

By Grauw

Ascended (10711)

Grauw's picture

26-08-2017, 00:06

Yeah, if someone ever manages to find an application manual for the YM2164 OPP, it would be great.

But ctr says: “the YM2151 was an off the shelf part and the YM2164 could only be obtained directly from yamaha (by an authorized technician etc)”

Page 3/5
1 | 2 | | 4 | 5