Connectors / Jumpers List

This section is for discussing everything about Next hardware and latest updates.
Szk
Posts: 36
Joined: Mon May 29, 2017 11:20 pm
Location: São Paulo, Brazil

Re: Connectors / Jumpers List

Post by Szk » Wed Sep 26, 2018 8:39 pm

PiyoTaro さん、

The MSX was indeed capable of I/O through the joystick ports, because they were driven by the AY3-8910 PSG's I/O ports. In the ZX Spectrum, there were several interface standards but all were only capable of reading (input) from, not writing to the joystick port(s).

In the ZX Spectrum Next, the joystick ports are driven from FPGA pins so theoretically bidirectional I/O is possible, but unless you modify it yourself, the current Core is based on legacy (input-only) standards, with the newly added feature of driving two SELECT pins high or low, so yes you can certainly repurpose these pins (1 in each joy port) as output lines, and develop something similar to the bit-banged RS-232 serial interfaces throug the joystick ports that alreaady exist for the MSX.

Here's some recently published information on how to drive the joy ports on the Next from the SD v0.8e Distro:
A second Kempston port (IN 55 – 0x37) has been added which follows the same format as port 31 (0x1F).
Supports Sega Megadrive 3 (and 6) button Joypads. Currently 4 buttons can be used at maximum. The buttons are returned by reading the Kempston joystick ports (IN 31 / IN 55). Sega 6 XYZ buttons are mirrored on ABC. The ‘MODE’ button on a Sega 6 pad cannot be read.
Bits 7..0 are as follows:
7: START
6: A / X
5: C / Z
4: B / Y
3: UP
2: DOWN
1: LEFT
0: RIGHT
The following register has been updated to include these extra joypad modes.(R/W) 0x05 (05) => Peripheral 1 setting:
bits 7-6 = joystick 1 mode (LSB)
bits 5-4 = joystick 2 mode (LSB)
bit 3 = joystick 1 mode (MSB)
bit 2 = 50/60 Hz mode (0 = 50Hz, 1 = 60Hz)(0 after a PoR or Hard-reset)
bit 1 = joystick 2 mode (MSB)
bit 0 = Enable Scandoubler (1 = enabled)(1 after a PoR or Hard-reset)
Joysticks modes:
000 = Sinclair 2 (67890)
001 = Kempston 1 (port 0x1F)
010 = Cursor (56780)
011 = Sinclair 1 (12345)
100 = Kempston 2 (port 0x37)
101 = MD 1 (3 or 6 button joystick port 0x1F)
110 = MD 2 (3 or 6 button joystick port 0x37)
Finally, remember that if a serial interface can meet your need, the ZX Next also have two powerful serial interfaces built-in: I2C (used on the RTC interface) and SPI (used by the SD storage and Raspberry Pi interfaces).

But if you really need a 8 or 16 bit parallel interface (as you first mentioned), it's still easier to use an external device on the Expansion Bus where you have access to the Z80 address and control lines.

Have fun ;)

PiyoTaro
Posts: 181
Joined: Thu Jun 01, 2017 11:13 am

Re: Connectors / Jumpers List

Post by PiyoTaro » Mon Oct 29, 2018 6:06 pm

Szk wrote:
Wed Sep 26, 2018 8:39 pm
PiyoTaro さん、
Thank you for the reply.
Joystick ports' Pinout & Usage Info
I also read your other threads.
NEXT SD CARD V.0.8E / NEXTZXOS V.1.99F / CORE 1.10.051 / FIRMWARE V.1.10
August 4, 2018 Phoebus Dokos
https://www.specnext.com/v-0-8e/

Supports Sega Megadrive 3 (and 6) button Joypads. Currently 4 buttons can be used at maximum. The buttons are returned by reading the Kempston joystick ports (IN 31 / IN 55). Sega 6 XYZ buttons are mirrored on ABC.

The following register has been updated to include these extra joypad modes.(R/W) 0x05 (05) => Peripheral 1 setting
In the article, it was written that if you set the joystick mode to "MD1" "MD2", MD's "6 button pad" can be used with SpectrumNext.
But it is written with a maximum of 4 buttons. The expression "mirrored" means that six buttons arranged in two groups can be read as three buttons, but it means "you can not specify a group to read".

Although "Next Joystick Port" can specify the type of joystick with the control register, it seems that it will be replaced internally and used as a Kempston interface. Similarly for PS/2 port. :(

Therefore, my hope of "if there is an output terminal even with 1 pin" has disappeared. :?

Szk wrote:
Wed Sep 26, 2018 8:39 pm
Finally, remember that if a serial interface can meet your need, the ZX Next also have two powerful serial interfaces built-in: I2C (used on the RTC interface) and SPI (used by the SD storage and Raspberry Pi interfaces).

But if you really need a 8 or 16 bit parallel interface (as you first mentioned), it's still easier to use an external device on the Expansion Bus where you have access to the Z80 address and control lines.

Have fun ;)
Parallel port communication is used for devices that send 8-bit register data.
PSG or OPLL(YM2413, YMF281, etc.) works just by sending a register number and data at a certain timing. I saw a demonstration to convert 4bit output to 8bit output with D-flop circuit. I wanted to make an inexpensive FM Sound device. ;)

If there is an output port even with 1 bit, serial communication can be performed by software, and it can be used as a MIDI output port or controlling an external microcomputer.

PiyoTaro
Posts: 181
Joined: Thu Jun 01, 2017 11:13 am

Re: Connectors / Jumpers List

Post by PiyoTaro » Mon Nov 12, 2018 12:30 pm

Image
"J15 - Next GPIO" has an 'I2c' terminal.

In the official WIKI's IO port map, the ports "I2C SCL" and "I2C SDA" are listed.
Does this correspond to Pin8 and Pin13?
Wiki: "Board feature control" http://devnext.referata.com/wiki/Board_feature_control

If the SPI communication port is available, we can connect "ATTiny etc's microcomputer" to make FIFO control and create a MIDI I/O interface. Moreover, it may be possible to control equipment by connecting "Parallel IO Expander IC".
If the signal of the pin is decoded directly to the IO port, we can use it also in "handshake communication". For example, can we retrieve an 8-bit parallel output with shift register IC (74HC164)?

PiyoTaro
Posts: 181
Joined: Thu Jun 01, 2017 11:13 am

Help: Re: Connectors / Jumpers List

Post by PiyoTaro » Sat May 04, 2019 9:12 am

Are there any voltages other than 5V at the edge connector?

Please tell me whether the voltage of "minus 5 volts" is supplied to "pin 39" of header CN5.

viewtopic.php?f=9&t=1365

Alcoholics Anonymous
Posts: 511
Joined: Mon May 29, 2017 7:00 pm

Re: Connectors / Jumpers List

Post by Alcoholics Anonymous » Mon May 27, 2019 5:31 pm

PiyoTaro wrote:
Mon Nov 12, 2018 12:30 pm
In the official WIKI's IO port map, the ports "I2C SCL" and "I2C SDA" are listed.
Does this correspond to Pin8 and Pin13?
Yes it's the same. i2c is also used to communicate with the rtc which sits on those lines.
If the SPI communication port is available, we can connect "ATTiny etc's microcomputer" to make FIFO control and create a MIDI I/O interface.
There are a bunch of spi peripherals in the next, including a new pair intended for the pi which will be on the accelerator gpio connector. The spi can only operate as master in mode 0.
Please tell me whether the voltage of "minus 5 volts" is supplied to "pin 39" of header CN5.
There is only +5v and +9v on the expansion connector.

Post Reply