Welcome, Guest. Please login or register.


Author Topic: Questions about SymbiFace3 (Read 2957 times)

Online gflorez

  • EP addict
  • *
  • Posts: 2934
  • Country: es
  • OS:
  • Windows NT 6.3 Windows NT 6.3
  • Browser:
  • Firefox 79.0 Firefox 79.0
    • View Profile
Re: Questions about SymbiFace3
« Reply #45 on: 2020.August.15. 19:53:06 »
Ok. Now that we have totally configured the SymbiFace3 card to boot, we can start playing with its long list of functions. A right... Let's ask the question:

How can I start managing the SF3's functions?

Every little aspect of the SF3 can be managed through reading and writing Z80 ports.

Ports are the way the processor has to communicate with external hardware devices, this is, external to the Z80. For example, Nick, Dave, EXDOS are all external devices for the Z80, but they have been integrated on EXOS, so you can manage them easily by commands from machine code, Basic or other programs.

SF3 is still very new to the Enterprise so, by now, we will manage it with IN and OUT simply commands. But even so, SF3 has some modes of control that can make very easy to interact with it.

The card uses two ranges of ports, 40h-4Fh(64-79 decimal) for the main card functions, and 20h-2Fh(32-47 decimal) to control the sound/storage side, inherited from the MSX SE-ONE cartridge.

Sadly, the 40h-44h range of z80 ports is also used by the Hardware Spectrum Emulator, so the two cards are by now incompatible. Zozo says that it is possible to move the port range on the Spectrum emulator to other zone, better than to move the SF3 ports range, which the Enterprise shares(more or less...) with MSX, CPC and PCW.

On the SF3 manual(Enterprise downloading area  on Hans Page) you can read all the command definitions with examples attached. Some will give sense to you, but others are intended only for very lower level configuration. Let see one example on how to manage the SF3:


Observe: by now MIDI and SYNTH modes can only be set with AT commands. Explanation: later.

The SF3 heart is an Arm processor, a lot more faster than the Z80 so, what we do with a SF3 command is like ordering the Arm a task. An SF3 command starts usually as this, first write a 0 to port 65(41h) to signal it that a command is being ordered.

Now, one or more parameters are sent, writing them in a row to port 66(42h) .

To end, the command number is written to port 65(41h), in  this case 40 decimal.

But the Arm always needs to parse the command to be syntactically correct, is for that we must wait for an "Arm response" reading port 65(41h) until it returns a 0. 1 is idle and 2 is an error.

Imagine we want to select the MP3B SF3 Sound mode(default is MP3A). We can order it as this on Basic:

100 OUT 65,0 ! Start command
110 OUT 66,2 ! Parameter:   MP3B mode
120 OUT 65,40 ! Command: Set sound mode
130 A=IN(65)
140 IF A=1 THEN GOTO 130 !wait for Arm response
150 IF A=2 THEN GOTO ERR
.... continue program.

Usually "Arm response" is put on a subroutine to not repeat the same lines on every SF3 command.

As you can see, "doing something" on the SF3 is not so overwhelming than it can appear.....