Portfix is an internal change that allows external interface to disable and use ports recognized internally. The main purpose is to connect AY-3-8910 into #FD port, where replaces MIDI. The idea is similar to /IORQGE signal in ZX Spectrum 48kB.
The matter is to separate /IORQ lines of Z80 and ASIC (the ULA in Sam). Then, the ASIC /IORQ can be locked by low level on /DBDIR input (unused before). This input normally gets low when
external port is addressed for reading. Is used by Sambus to switch direction of buffers, and isn't connected inside Sam.
In language of logic, the /DBDIR is inverted (NOT) and then added (OR) with /IORQ from Z80 and the result signal goes to ASIC. When using logic gates, the /DBDIR input must be pulled to +5V with 4.7kohm resistor.
There will be no side effects when using Sam with portfix both with portfix interfaces and standard ones. But portfix interfaces must be connected first, before Sambus. (Or the Sambus must be also upgrded to support portfix - its internal logic for buffers direction switching must include also /RD and /BUSACK signals.) Portfix interface connected to not updated Sam should work, however internal ports will not be disabled in this case.
The first solution was to put a 1kohm resistor between /IORQ of Z80CPU and the line that goes to ASIC, then add PNP transistor that can pull up this line. The 4.7kohm resistor on base limits current and the diode reduces voltage (without it Sam works unstable - use LED or Zener diode to get 2V).
The second solution was to use 74F00 in SMD. Under the Z80CPU are power lines, where the chip can be soldered. 3 short wires and one 10kohm resistor to pull up /DBDIR input for safety.
The third possible solution is the YABUS.Z80RTC.
Files for download
- portfix.jpg 60.0kB (2005-04-19 20:36)
- 74F00 monted under Z80CPU in Sam Coupé that gives portfix functionality. I used this to play AY-3-8910 music with external YAMOD.AYLPT.
- portfix2.png 4.2kB (2004-07-21 14:34), uploaded by Yarek
- Schematics with 7400 (Eagle picture). This worked in my Sam (see photo) till I replaced it with YABUS.Z80RTC..
- portfix1.png 4.0kB (2004-01-30 20:23)
- Schematics with PNP transistor and LED (Eagle picture). This should work, but in my Sam didn't. Probably because I have extra board inside with RS232 and Kempston Joystick.
Links to other pages
- Sam Coupé
- The Sam Coupé computer by MGT.
- Two YABUS slots for Sam Coupé.
- AY-3-8910 sound board (ZX Spectrum 128K and Timex 2068 compatibility) with printer slot and IIC magistral.
- Internal YABUS slot mounted in Z80CPU socket, includes also RTC. Mostly dedicated for Sam Coupé, but can be used in other machines.