Welcome, Guest. Please login or register.


Author Topic: MSX slot (Read 2895 times)

Online gflorez

  • EP addict
  • *
  • Posts: 2231
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
MSX slot
« on: 2018.March.13. 11:13:48 »
I'm going to put here my thoughts about how to connect a MSX cartridge to the Enterprise expansion connector(Bridge or bus expander).


But first of all we must know what are the main facts, similarities, differences and lacks of the connectors and architectures:

Something about MSX interfacing has been written on the SymbOS thread, so I will put here only a link.

-We have been very fortunate that the Z80 ports used by the most interesting MSX I/O cartridges have not been used on Enterprise expansion projects, so there would be no collision there. Also, just because of this, Zozo says that 14 bit address could be used on this special case to preserve the Enterprise ports left of the bottom 256. We must return to think about this more deeply.

-The Enterprise uses a card style edge connector of 74(37x2) pins at 2,54mm pitch, while the MSX slot uses the very same connector but with only 50(25x2) pins. The original Enterprise bus expander had a 4 pin code on every bus slot to deal with Z80 ports collision, but it was never released nor its information distributed, so the Hungarian developers created their own parallel standard, similar to the PC slots arrangement or the MSX I/O slots. Curiously, the MSX cartridge slots are also coded, but only for memory, up to 4MB, the same limit as the Enterprise.

-Both connectors have the complete Z80 bus(address, data) and signals on them, so it is only a mater of rearranging the pins, but to have a working MSX slot we must also deal with the specificities.

For example, the Hungarians developers  based their bus expander on the EXDOS card, that doesn't make use of +12v and -12v(commonly used on amplifiers on audio cards), so they didn't populated pins A37 and B37 as was mandatory on the lost&found original project. But these are necessary for the MSX audio cartridges, so these voltages have to be implemented on a new project.

Also, every audio MSX cartridge returns mono sound to the main-board by a pin. We know that the EP has been provided with two pins for stereo audio return(and mix?), but, ¿does somebody know the level of the sound and how to protect the Enterprise?
« Last Edit: 2018.March.13. 20:11:03 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2231
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
Re: MSX slot
« Reply #1 on: 2018.March.13. 17:47:16 »
-The pins on the two connectors are numbered differently, as you know, on the Enterprise they go from 1 to 37 and A or B depending on the side of the card, but on the MSX slot they are numbered from 1 to 50 alternating sides, starting from the back and right side of the cartridge.

-Another difference is a protection on the MSX cartridge+slot for an accidental extraction while the computer is on. Pin 44 and 46 are joined internally on the cartridge, making a thick bridge track. Then pin 44 is about two mm shorter than the rest. All the 5v that feed the card are first passed by the two pins bridge, so before pin 44 connects to the PCB connector all the other 49 pins have been inserted at least 2mm.

The Enterprise cartridges also have a protection, the 4(2+2) GND and 5v pins  at the sides are longer than the rest, to assure that the cartridge is feed before being connected. But the Enterprise expansions don't need protection, because they aren't made for constant extraction, as the cartridges.

Offline BruceTanner

  • EP user
  • *
  • Posts: 445
  • Country: gb
  • OS:
  • Linux Linux
  • Browser:
  • Chrome 63.0.3239.111 Chrome 63.0.3239.111
    • View Profile
Re: MSX slot
« Reply #2 on: 2018.March.13. 20:18:44 »
On an unmodified EP you can be sitting at the IS-BASIC "ok" prompt and remove the BASIC cartridge. Then you can plug it in again and carry on as though nothing had happened. :mrgreen:

Online gflorez

  • EP addict
  • *
  • Posts: 2231
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
Re: MSX slot
« Reply #3 on: 2018.March.13. 23:15:04 »
Plug&play ten years before...

Online gflorez

  • EP addict
  • *
  • Posts: 2231
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
Re: MSX slot
« Reply #4 on: 2018.March.15. 11:30:44 »
-Pin 42 of the MSX slot brings the MSX CPU clock(3.579545MHz), needed by some of the video and sound cartridges.

The Enterprise doesn't have a similar signal, it uses the 8Mhz(system) signal instead. I don't know what is the solution to this on the AMSDAP(MSX slots for CPC), but that clock signal has to be created for the Enterprise.

-/CS1, /CS2 and /CS12, pins 1, 2 and 3, are intended for cartridge Rom access, not applicable here.

-Then only rest /SLTSL and /BUSDIR, pins 4 and 10.

/SLTSL is output, and when low marks the slot as selected. For our purpose I think it is better to put it always to ground, selected.

/BUSDIR is input, and when low marks the direction of the bus towards the processor. It is not present on all MSX computers, so I will leave it unconnected.

Offline Zozosoft

  • EP addict
  • *
  • Posts: 12854
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 59.0 Firefox 59.0
    • View Profile
    • http://enterprise.iko.hu/
Re: MSX slot
« Reply #5 on: 2018.March.15. 15:24:58 »
-Pin 42 of the MSX slot brings the MSX CPU clock(3.579545MHz), needed by some of the video and sound cartridges.

The Enterprise doesn't have a similar signal
It is have on A22 pin.

Online gflorez

  • EP addict
  • *
  • Posts: 2231
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
Re: MSX slot
« Reply #6 on: 2018.March.15. 16:44:01 »
Thanks Zozo for the hint... 4MHz on an stock Enterprise, I suppose.

But I think that the MSX chips need that precise 3.579545MHz frequency to properly work.

I have to search for a TTL oscillator.


Online gflorez

  • EP addict
  • *
  • Posts: 2231
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
Re: MSX slot
« Reply #7 on: 2018.March.17. 01:13:04 »
Observing the AMSDAP picture, it seems that TMTLogic have used a IH0512D, a 5v DC/DC converter for the +12v/-12v lines.

Also, they have used an 74hcxxx chip for buffering some Z80 lines.

I don't see the 3.579545MHz oscillator. Can it be they have used the CPC 4MHZ processor signal?.
« Last Edit: 2018.March.17. 01:16:43 by gflorez »

Offline lgb

  • EP addict
  • *
  • Posts: 3470
  • Country: hu
  • æðsta yfirmaður
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 59.0 Firefox 59.0
    • View Profile
    • http://lgb.hu/
Re: MSX slot
« Reply #8 on: 2018.March.19. 22:13:41 »
Observing the AMSDAP picture, it seems that TMTLogic have used a IH0512D, a 5v DC/DC converter for the +12v/-12v lines.

Also, they have used an 74hcxxx chip for buffering some Z80 lines.

I don't see the 3.579545MHz oscillator. Can it be they have used the CPC 4MHZ processor signal?.

I have absolutely no experience with these, but by just guessing, things "should" work on 4MHz too, unless if it's time critical for whatever reason. A stupid example: on PC, classic ISA bus has many bus frequencies and most card works just fine still. However, some cards (like what I had experience with - AdLib) uses a very precise frequency source needed for the correct audio to be generated for the OPL2 chip (YM3812). The ISA bus provides a 14.318Mhz signal (if I remember correctly) which is always that frequency regardless of the bus frequency itself, and it's used by the AdLib card to create the clock signal for the OPL2 chip (with dividing by 4, if I am right here). _MAYBE_ the situation is similar here, in most cases it does not matter too much, if 4MHz bus frequency is used instead of ~3.58MHz, but there can be cards which behaves "strangely" when a precise clock signal is needed for a special purpose like with my stupid PC example. Interstingly, 14.318 divided by 4 it's that 3.579, and divided by 3 is the "famous" 4.77Mhz used by default clock on old PCs, but anyway, it does not matter here too much, just an example, nothing PC is involved too much for sure (it's just a comment, that 4/3 of the colour burst frequency of NTSC is about 4.77MHz, and about 3.5795 is exactly that, maybe that is the reason of that clock used on MSX?).

Btw, some V9938 video chip interfaced with EP bus would be superb (and that chip requires only two I/O ports, and has private video RAM, not shared with CPU at all unlike Nick), so some SymbOS port can use "advanced" graphics, and also some ported MSX games for EP would be possible. Surely that would need an extra monitor connection then :(

Online gflorez

  • EP addict
  • *
  • Posts: 2231
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
Re: MSX slot
« Reply #9 on: 2018.March.20. 00:37:59 »
There are some MSX cartridges  that need that frequency, something to do with colour carrier on NTSC video.

Adding that frequency isn't  as difficult, I have ordered some oscillators. Maybe a jumper can be provided to switch from 3.58MHz to the real Z80 frequency if needed.

Today it is easier to buy a V9990 VDP based cartridge. But my dream is a way to inject that video using the colour inputs all Enterprise computers have.

Offline lgb

  • EP addict
  • *
  • Posts: 3470
  • Country: hu
  • æðsta yfirmaður
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 59.0 Firefox 59.0
    • View Profile
    • http://lgb.hu/
Re: MSX slot
« Reply #10 on: 2018.March.20. 01:31:11 »
There are some MSX cartridges  that need that frequency, something to do with colour carrier on NTSC video.

Yes, that was my (rather stupid, I admit) example with the OPL2/PC, etc.

Quote
Adding that frequency isn't  as difficult, I have ordered some oscillators. Maybe a jumper can be provided to switch from 3.58MHz to the real Z80 frequency if needed.

My only problem here, that I am not sure, if a card want to "align" Z80 signals (like RD, WR, MREQ etc) with clock signal, if any card do this, it won't work, if you "fake" another clock but leave the EP's Z80 do things on another clock rate. Though I think, this scenario sounds quite strange, if anybody would do this at all ... Worth to try :)

Quote
Today it is easier to buy a V9990 VDP based cartridge. But my dream is a way to inject that video using the colour inputs all Enterprise computers have.

Well, yes, but it's kinda hard. Especially if you want to explore the >16 colours stuff. With V9990 you can have even 32K colours (if I know well ...) but you have only four bits colour input. The other hard thing, I guess, is to keep V9990 and Nick in sync, you must force V9990 somehow to "follow" Nick's timing exactly at pixel precision. I would be even happy to do this with a very specific LPT for Nick, but surely, it cannot be done easily with the "freedom of LPT" of Nick when somebody uses a bit longer or shorter frame which more or less works with TVs/monitors but out of sync, strictly speaking ....

Online gflorez

  • EP addict
  • *
  • Posts: 2231
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
Re: MSX slot
« Reply #11 on: 2018.March.20. 10:59:57 »
It was also mentioned here, but the V9990 chip has sync inputs and a colour bus, probably not used on the cartridge approach:

20579-0

It also has 4 bit colour modes from a 32K palette.

----

But I don't want to build castles on the air, first of all the MSX slot has to work correctly...
« Last Edit: 2018.March.20. 11:51:08 by gflorez »

Offline Zozosoft

  • EP addict
  • *
  • Posts: 12854
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
    • http://enterprise.iko.hu/
Re: MSX slot
« Reply #12 on: 2018.March.20. 11:29:01 »
Just one idea: for a video thing, divide the Nick clock: 14237536.27 Hz / 4 = 3559384,0675 Hz

Online gflorez

  • EP addict
  • *
  • Posts: 2231
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
Re: MSX slot
« Reply #13 on: 2018.March.20. 12:07:00 »
Very good solution, but..... how can I do it?

Hans Tillema [TMTLOGIC] , the builder of the CPC MSX slot(AMSDAP) has confirmed he directly use the 4 or 8MHz Z80 clock on his approach, and says that only a few cartridges use the exact 3.579545MHz frequency.

Offline lgb

  • EP addict
  • *
  • Posts: 3470
  • Country: hu
  • æðsta yfirmaður
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 59.0 Firefox 59.0
    • View Profile
    • http://lgb.hu/
Re: MSX slot
« Reply #14 on: 2018.March.20. 16:15:03 »
Very good solution, but..... how can I do it?

Frequency divider with flips-flops maybe? Or a binary counter, etc. For example here is some slides describing the theory and some schematic how to realize: https://www.slideshare.net/DeepakFloria/divide-by-n-clock

Quote
Hans Tillema [TMTLOGIC] , the builder of the CPC MSX slot(AMSDAP) has confirmed he directly use the 4 or 8MHz Z80 clock on his approach, and says that only a few cartridges use the exact 3.579545MHz frequency.

Nice, so it's about as I thought, hopefully :-O