Emulation: VecLink V1 + V2

These emulations can not be configured using the cartridge settings.

The reasoning is that as of now, the starting logic was not ment to ever start two vecx instantiations at the same time.

Thus - even if veclink would be "cartridge enabled", you would not be able to see any effects by only starting one emulator instance.

Nonetheless, veclink emulation IS supported, you just have to configure using it manually.

Manually meaning:

That should do it...

BerzerkArena

BerzerkArena uses veclink V2.

The following pieces are thoughts of Malban during the disassembly of said bin file.

  1. There is an initial syncing of several bytes. In game, only one byte is synced each WaitRecal cycle: Joystick Data (4 bit for the buttons, and 4 bit for the directions up/down, left/right).

  2. upon initializing the veclink, a synchronizing of the wait recal routine of both vectrex is done (Alex wait recal is customized, and has a specific counter and timing)

  3. since the swapping of the one byte is synchronized by each WR and the WR are also synchronized, no additional data is needed, everything else (shots, ammunition, teleports can be calculated from the one transfered byte)

Low Level

The used transfer protocoll:

The bits of port A used:

Control bit
Each byte is send in 4 "packages" of 2 bit. The first bit of such a package has the control bit set to 0 (zero), the second bit in such a package has the control bit set to 1 (one).

Data bit
This bit - as the name implies - carries the one bit of data used in one "transfer" round.

Acknowledge bit
The receiving vectrex must send an acknowledgement "message" in which the bit 6 must be set.

If any of the above is not true while the communication is done (actually there is a timer which waits for the appropriate resonse, one byte must be transfered in $ffff cycles (T1 Timer)), the communication is broken and a message is displayed.

Special
(See also Joyport Devices...)
The complete game BerzerkArena is played with PSG Port A set to output (on both ends of the serial cable), the serial communication still works in both directions.

Higher Level

One of the two vectrex must be the first, this is always the case :-).

Primary vectrex:
The first one obviously does not receive any data before. If no data is received, than a "$4d" is sent.

Secondary vectrex:
The secondary vectrex receives the above mentioned "$4d" and responds with sending a "$73".

If both above sendings and readings are aknowledged by both vectri, the primary starts the initial syncing sequence by transfering 7 bytes of data (amongst them the wait recal counters).

The primary vectrex sets its first indirect jumper in the main routine to:
linkPort0ExchangePrimary().

The secondary vectrex sets its first indirect jumper in the main routine to:
linkPort0ExchangeSecondary().

All other routines are henceforth the same on both vectri. The difference in the above two routines: