Hardware Design
This page was last modified 17:36, 24 November 2021 by Sd snatcher. Based on work by Gdx and Rderooy.


Designing MSX hardware

As it happens with programming MSX software, designing hardware for the MSX must take into consideration that the machines were produced by a multitude of makers, instead of being just clones of a single model. The MSX standard allowed a lot of variation on how the hardware would be designed and placed on the BIOS the burden of abstracting any hardware differences.

Do's and dont's when designing MSX hardware

Here are listed some guidelines for good practices when designing MSX hardware, and also some common mistakes that caused headaches for years.

  • The MSX BUS requires TTL signal levels to operate correctly. Some machines will accept CMOS signal levels, but other will just refuse this. Keep that in mind when designing your circuit. From wikipedia

The CMOS–TTL logic level problem Interconnecting any two logic families often required special techniques such as additional pull-up resistors, or purpose-built interface circuits, since the logic families may use different voltage levels to represent 1 and 0 states, and may have other interface requirements only met within the logic family. TTL logic levels are different from those of CMOS – generally a TTL output does not rise high enough to be reliably recognized as a logic 1 by a CMOS input. This problem was solved by the invention of the 74HCT family of devices that uses CMOS technology but TTL input logic levels.

The same problem applies to interfacing FPGA/CPLD chips with the MSX bus. Some FPGAs are "5V tolerant", but pull-up resistors on its input signals will still be required on all lines that receive data from the MSX bus.

  • The pin-42 of the MSX slot should be read as CPUCLOCK. This pin is meant to be used for circuits that require CPU synchronization, like DRAM controllers. Do not use this pin for fixed frequency reference, like sound generation or baudrate generation. Many MSX sound extensions incorrectly used it for this purpose and the result is that they don't work properly on turbo machines. If the cartridge you're designing requires a fixed frequency reference, you must include a clock crystal on the cartridge, just like Moonsound and Harukaze.
  • Remember to connect the INT signal from the chip to the MSX bus. Otherwise the device will only work on pooling mode, which is very inefficient and CPU intensive. (See Note-1)
  • If available, always to connect the WAIT signal from the chip to the MSX bus. Consequence: The much annoying software delays (like NOPs or EX SP,HL) will be required to synchronize with the said device and it will not support turbos properly. How to do it: If the device has a /WAIT or IOCHRDY pin, connect it to the pin-7 of the MSX BUS appropriately. (*1)
  • Always include a BIOS on the device. The MSX standard is meant to be flexible and hardware independent as much as possible. This is what allowed, for example, the disk interfaces to use a many different controllers without breaking compatibility. The same applied for the RS-232 interfaces. The entire standard is based on that premise, and this is why direct hardware access isn't allowed. For example, this also allowed two completely different network cards to be developed and be compatible with the same set of Internet tools. But be aware that this isn't only about disks and serial interfaces: every device connected to the MSX should have a built-in BIOS.
  • Don't forget to implement the BUSDIR signal. Can cause trouble when used on expanded slots. It is mandatory by the standard that any cartridge that writes on the databus when the /IORQ (pin-11) activate this signal. How to do it: The MSX Technical Handbook shows on page-35 how the circuit should be implemented both on the cartridge and the slot expander.
  • Don't forget to differentiate I/O operations from interrupt acknowledges. This a catch in the Z80 spec: I/O operations must have the /M1 pin high, and interrupt acknowledges will have both /RD and /WR high. If the /M1 pin is low at the same time as the /IORQ, this signals that the Z80 is in fact acknowledging an interrupt. So I/O decoders must also check either /RD, /WR or /M1 to be sure if it's really an I/O operation.
  • For system extension cartridges, keep any memory-mapped registers above the upper half of the memory frame. IOW, >1FFFh for the frame-0, >5FFFh for the frame-1, >9FFFh for the frame-2 and >DFFFh for the frame-3. Otherwise there's a risk that software that do dirty RAM search will inadvertently write to the registers of your cartridge and potentially freeze the machine.
  • If you need to add a MegaROM to the cartridge, it's highly advisable to use either ASCII8 or ASCII16 controllers, as those keep all control registers in the safe 6000h~7FFFh area, and allow full read/write access to the frame-2. This is very useful for easy flash updates or SRAM support. No need for complicated enable/disable register logic for the flash/SRAM updates.
  • The pins 44 and 46 (SW1 and SW2) must be interconnected, and the pad-44 (SW1) of the cartridge EDGE connector must be designed to be a bit shorter than the other pads. If it has the same length of the other pads, it becomes inutile as a protection measure it was meant. More details on this topic can be found at the page-33 of the MSX Datapack.
  • On motherboards, don't forget to include the circuitry for the SW1/SW2 protection switches of the EDGE connector. On the last days of the MSX system, a lot of manufacturers omitted this to cut costs. But it's a bad design decision.
  • Don't overload the power supply. The MSX Technical Handbook states the following current limits:
    • Slot
      • +5V: 300 mA/slot
      • +12V: 50 mA
      • -12V: 50 mA
    • Joystick ports: 50 mA/port
  • The cartridge male EDGE connector must have the following specifications:
    • Hard gold plated contacts. Tin and ENIG are unsuitable finishes that are too soft and leave residue on the connectors
    • Beveled finish, otherwise the insertion force must be much higher and there's always a risk of bending a slot connector pin inwards.
  • Do test your design with more than one MSX model. Some models are known to be more tolerant, while others are known to be very picky. Obviously, the pickiest models should be chosen for testing. Machines with discrete chips are known to be less tolerant than those with integrated MSX-engine designs, because the MSX-engines are built with CMOS technology.
    • Low tolerance models: Sony MSX2+ machines, Toshiba HX-10, Sharp Hotbit, Gradiente Expert Plus/DD-Plus, Victor HC9x, Panasonic CF-3000, CIEL ExpertTurbo/Expert3, Panasonic MSX Turbo-R machines.
    • High tolerance models: Panasonic, Sanyo and Philips MSX2/2+ machines with an integrated MSX-Engine.

Note-1: Remember that MSX requires a open-collector active-low signal on this pin. To convert a non-open collector to open-collector, a single diode can be used. Chips designed for the ISA BUS will usually require the following logic for this signal: CHIP_signal -> NOT -> diode -> MSX_slot

Cartridge case recommendations

If you're designing a hardware to be connected on the cartridge slot, it's always advisable to make sure that it fits inside a cartridge case.

While the MSX Datapack shows the external dimensions of the standard MSX cartridge, it doesn't state anything about the cartridge interior. This resulted that cartridge boards are not interchangeable from one case to another.

It's not advisable to design any new hardware meant to cannibalize cases from older cartridges, because those are getting rarer every day. Also, these days there are few makers of MSX cartridge that still produce them. So it's better to target one of the following still in production cases:

  • Patola: MSX cartridges produced by Patola in Brazil, following the "Konami standard" for the internal guide pins. It support boards with components on both sides. The only special care required for this case is to leave space for the two screws that are used to close the cartridge.
  • Sunrise: MSX cartridge cases produced by Sunrise following the "T&E soft standard" for the internal guide pins. It supports boards only with components on the upper side. It uses pressure clamps to close the cartridge.
  • Overrich: MSX cartridge cases produced by the user Overrich in Korea, following the "Konami standard" for the internal guide pins. They support boards with components on both sides and are closed by one screw inside each guide pin.

Other design recommendations

MSX is a hobbyst machine. Always design the hardware to be as hackeable as possible, allowing the user to do his own enhancements easily. This can be accomplished by:

  • Don't eliminate the unused pads on the EDGE slot connector. Leave enough space for the owner to solder wires on it if needed.
  • If you don't use some features on a SMD chip, leave a small pad for each unused pin, where the user can solder wires instead of directly solding on small pins.
  • For ISA chips that have their own built in memory bank controller, be creative: it's better to split the banking register in half (treat it as two nibbles) and offer the MSX two frames of 16KB (4000h/8000h) than a big ROM that can only be paged at 4000h. Two frames makes the programmers life much easier than a single one.
  • Always ask advice of some programmer friend on what thinks that could be enhanced on the design for the software programming.