Fix for NMS-1205 Music Module with 7MHz turbo kits?

By sd_snatcher

Prophet (3609)

sd_snatcher's picture

18-01-2009, 14:12

Hi all,

I once found on the net a document describing how to install a crystal inside the Music Module to have it compatible with any turbo kit (7 or 10MHz). I goggled around a lot and unfortunately could not find such document.

Does anybody has it or know where to find it?

Login or register to post comments

By msd

Paragon (1510)

msd's picture

18-01-2009, 15:33

I think I now this fix. The msx-audio chip needs the default osc freq of 3.54Mhz. You have to put a seperate osc. on it from 3,54Mhz, however this is not in sync with the msx osc. and sometimes notes will be missed.

By sd_snatcher

Prophet (3609)

sd_snatcher's picture

19-01-2009, 02:49

however this is not in sync with the msx osc. and sometimes notes will be missed.

Notes will be missed only when the Z80 is running at >=7MHz or even at 3,5MHz? If only when the turbo is activated that the notes are missed, probably it's because of the higher CPU speed, as it happens with the YM2413 on MSX Turbo-R, right?

But if even at 3,5MHz there are missing notes, then this is really weird: afterall both Moonsound and the OPL3 cartridge have their own crystals and the lack of sync is no problem. Or is the higher clock of the OPL3 and OPL4 that eliminates the problem?

By msd

Paragon (1510)

msd's picture

19-01-2009, 21:50

it just has a better interface

By RetroTechie

Paragon (1563)

RetroTechie's picture

20-01-2009, 04:53

You can just put a 3,58 MHz. signal on the soundchip's "master clock" input (check datasheet or Music Module schematic for exact pin), that's all. Don't forget to cut the connection from that pin to cartridge slot clock signal !

A 3,58 MHz. crystal oscillator is easy to put together - try Google: www.google.com/search?q="crystal+oscillator"+circuit
You could also use the quartz oscillator circuit in my very own MSX Super Turbo circuit - see here for info: msx.retro8bits.com/msxsuperturbo/supturbo.htm
Read the description first... component values not entirely optimal if you need fixed 3,58 MHz. but I guarantee you it works. If I'm not mistaken there even exists an un-used inverter in the Philips Music Module, which *MIGHT* (?) be abused for this purpose.

(..) however this is not in sync with the msx osc. and sometimes notes will be missed.

The 'out of sync' is irrelevant here - the audio IC uses the clock input only as a timebase for sound generation, not for synchronizing bus signals with a CPU. When you have the turbo circuit enabled, sometimes notes *are* missed though:

The audio IC is accessed through I/O ports, and turbo circuits are usually rigged to switch back to 3,58 MHz. for a short while (a fraction of a millisecond) when *ANY* I/O port is accessed, no problem there. Just at the exact point in time it happens, the machine is still running at the higher clock. As a result, the first few *parts* of the clock cycle where that I/O port access occurs, is significantly shorter then it would be at 3,58 MHz. Usually this works out just fine (since everything after this follows 3,58 MHz. timing), sometimes it doesn't. Ofcourse the higher the turbo clock, the more often errors occur, and it's very similar for MSX-Music (YM2413) and MSX-Audio chips, since bus timing of these IC's have comparable tolerances.

But believe me: this effect is very minor. I've got an MSX2+ running at 8 MHz. (has been at 10 MHz. too), and with independent clock (3,58 MHz.) both internal MSX-Music and external Toshiba audio module *can* be heard to make small 'goofs', but overall they sound just fine. That is, when playing music while the turbo circuit is enabled. Also my MSX Super Turbo circuit and the more common 7 MHz. upgrade perform very similar in this respect. And how this works with CUC's 6 MHz. clock upgrade? No idea... (that's a crap design anyway B-) )

By sd_snatcher

Prophet (3609)

sd_snatcher's picture

20-01-2009, 23:52

Hi!

I'm here exactly because a friend of mine is thinking about putting a turbo kit on his Sony MSX2+ and I suggested your design! Its the better turbo kit I found, and I must thank you for this excellent design!

And I was thinking on how to solve the 3.58MHz problem for the sound generators. Probably I'll have to supply the 3.58MHz to the PSG (integrated on the S1985 on that Sony) and to the YM2413, but the external Y8950 gets tricky. I'm not sure if the SCC uses the slot CLOCK signal for frequency generation also.

Ademir's Expert-turbo mobo just supply 3.58MHz to the slots, but isn't that a bit weird since internally the Z80H is running at 7MHz? I'm not sure if there are any MSX cartridges that use the CLOCK signal for anything besides sound generation, but I believe the SD/MMC interfaces use the CLOCK signal.

That is why I believe the better solution is really to modify the Music Module to have its own crystal.

If I'm not mistaken there even exists an un-used inverter in the Philips Music Module, which *MIGHT* (?) be abused for this purpose.

Unfortunately that port was already used by the 256KB SampleRAM upgrade, but it should not be hard to sneak-in an SMD IC to do that.

Following your tip I found this design for the crystal oscillator circuit. It seems to be adequate.

I've got an MSX2+ running at 8 MHz. (has been at 10 MHz. too)
Why did you slowed it down to 8 MHz?

I noticed that the V9958 already has a 10MHz output on pin-2 and I believe its a high quality signal. Can I use that to the input clock of your superturbo? As the VDP uses TTL signal levels, probably I'll need to build the superturbo using HCT ICs instead of HC, right?

I'm also thinking about implementing two different delay circuits: One for short delays (*1) and other for long delays (*2). Probably I'll have to switch the 7404 by a 7400 to NAND them before the 74175.

*1: The longer delay will be used for the FM chips, which are as slow as hell.
*2: The shorter delay will be used for faster I/O chips, like the VDP. (maybe all other I/O)

By dhau

Paragon (1570)

dhau's picture

21-01-2009, 02:53

Hi RetroTechie,

Could you please explain where do I connect "clock out" output and 6 irq diode inputs? To some pins of Z80? Or VDP?

I can reproduce your PCB and solder all components correctly, but I need to know how to connect it to MSX.

Thanks!

By RetroTechie

Paragon (1563)

RetroTechie's picture

22-01-2009, 03:23


And I was thinking on how to solve the 3.58MHz problem for the sound generators. Probably I'll have to supply the 3.58MHz to the PSG (integrated on the S1985 on that Sony) and to the YM2413, but the external Y8950 gets tricky. I'm not sure if the SCC uses the slot CLOCK signal for frequency generation also.

Ademir's Expert-turbo mobo just supply 3.58MHz to the slots, but isn't that a bit weird since internally the Z80H is running at 7MHz? I'm not sure if there are any MSX cartridges that use the CLOCK signal for anything besides sound generation, but I believe the SD/MMC interfaces use the CLOCK signal.

That is why I believe the better solution is really to modify the Music Module to have its own crystal.

I doubt you could turbo-upgrade an MSX and feed S1985 engine a fixed 3.58 MHz signal, since that is *very probably* used for DRAM signal timing too... You might get away with it if you replace internal memory with static RAM. Externally, AFAIK there's just 2 kinds of cartridges that use the clock signal:
* Audio cartridges (FM / MSX-Audio / SCC): they just need a timebase, a fixed frequency of 3.58 MHz. nominal. Out of sync with CPU clock doesn't matter
* External memory mappers: they need the CPU clock, and proper sync with CPU / wire delays etc. can be VERY critical!
* Maybe there's others, can't think of any example though Question

You can easily generate independent, fixed frequencies inside a cartridge if you need to. But you CAN'T generate the CPU clock signal inside a cartridge, not even derive it from other signals on the cartridge connector. That alone is a good reason to read 'clock' as 'CPU clock', and not as 'fixed 3.58 MHz. signal'. To put a fixed 3.58 MHz. on the cartridge-slot of a turbo-upgraded MSX, is a bit silly IMHO. However, different people have different needs, different setups, and different cartridges to plug in. If your MSX has 2 cartridge-slots, you might for example do it on one only: 1 slot with CPU clock signal (where you'd plug in external mappers), 1 slot with fixed 3.58 MHz. signal (where you'd plug in FM-PAC, Music Module or SCC).

Why did you slowed it down to 8 MHz?

At the time I had some cartridges (Gouda SCSI interface, external mapper?) that didn't work on 10 MHz, but DID work on 8 MHz. Giving me a choice between running at 10 without those cartridges plugged in, or slowing down a bit to make everything a big, happy family. And I prefer stability over top-speed anytime.

Also I used the turbo to cut down on edit-assemble-debug cycles. These days I don't code on MSX anymore, and if I would, I'd do the coding on PC (cross-assembler, emulator etc. all the way for 99% of development work, testing occasionally on real hardware). Simply put: the turbo is built into that machine, serves no purpose anymore, but also no reason to take it out. And the electronics are aging, read: get worse. What worked on 10 MHz once, may not do so anymore (reliably!) 10 years later.


I'm also thinking about implementing two different delay circuits: One for short delays (*1) and other for long delays (*2). Probably I'll have to switch the 7404 by a 7400 to NAND them before the 74175.

*1: The longer delay will be used for the FM chips, which are as slow as hell.
*2: The shorter delay will be used for faster I/O chips, like the VDP. (maybe all other I/O)

Why not? But IMHO that would be a lot of extra complexity for near-0 gain.


I noticed that the V9958 already has a 10MHz output on pin-2 and I believe its a high quality signal. Can I use that to the input clock of your superturbo? As the VDP uses TTL signal levels, probably I'll need to build the superturbo using HCT ICs instead of HC, right?

You mean #DHCLK? Are you sure that's a steady, square wave signal that never changes, meets Z80 voltage levels, duty-cycle, rise / fall times, is there before boot-up, and can't be switched off using software? Anyway, then it would still be half the VDP X-tal frequency, 10.74 MHz. That's pushing it even on one of those MSX2+ machines like mine (with Z80 built into engine). Oh and btw: datasheet says it's an open drain output...oO Ofcourse you could simply try... let us know what you do & whether it works?

Basically the Z80 CPU is very, very, VERY picky about what you put into it as a clock signal. And the MSX Super Turbo is designed to meet all those special requirements with a circuit that combines flexibility & (as far as possible) simplicity. Change anything, and you're on your own.

The circuit could use an overhaul though... I'd replace the FET / RC section with a counter (clocked with lower frequency), that runs up to a certain count & then halted. By choosing counter output you could have delays like 32, 64 or 128 clock cycles. Triggering any of the inputs would reset that counter = restart delay. Then use even faster logic (74AC family for example), and do a full SMD design (or put the whole circuit into a CPLD). Anyway, you're welcome to have a go at it LOL!


Could you please explain where do I connect "clock out" output and 6 irq diode inputs? To some pins of Z80? Or VDP?

I can reproduce your PCB and solder all components correctly, but I need to know how to connect it to MSX.

See these instructions (in Dutch only I'm afraid):
http://msx.retro8bits.com/msxdocs/turbo7mhz.pdf (published in a magazine once)
http://msx.retro8bits.com/msxdocs/turbo7mhzug.pdf (came with 7 MHz kits)
If you understand those, that is: how to build a 7 MHz. kit into an MSX machine, then you understand how to build MSX Super Turbo into same MSX machine. Also replacing 7 MHz. circuit with MSX Super Turbo is easy as pie.

By dhau

Paragon (1570)

dhau's picture

22-01-2009, 07:27

See these instructions (in Dutch only I'm afraid):
http://msx.retro8bits.com/msxdocs/turbo7mhz.pdf (published in a magazine once)
http://msx.retro8bits.com/msxdocs/turbo7mhzug.pdf (came with 7 MHz kits)
If you understand those, that is: how to build a 7 MHz. kit into an MSX machine, then you understand how to build MSX Super Turbo into same MSX machine. Also replacing 7 MHz. circuit with MSX Super Turbo is easy as pie.

Err, I really can't understand Dutch. I wish someone who knows Dutch could add instructions on how to connect Super Turbo 3 to some popular models of MSX2 :) I tried Google Translate, and it's still doesn't make much sense: "Fit a 40-foot pole on the position of IC145" :)