Divmmc Future and Next?

The Speccy's spritely young offspring. Discuss everything from FPGA to ZX
Post Reply
OldGamer
Drutt
Posts: 34
Joined: Mon Jun 10, 2019 1:45 am

Divmmc Future and Next?

Post by OldGamer »

is it "okay" to plug a divmmc Future into a Spectrum Next and will it work?
User avatar
MrClump
Microbot
Posts: 112
Joined: Sun Aug 16, 2020 7:12 pm
Location: Torbay, Devon, UK

Re: Divmmc Future and Next?

Post by MrClump »

I believe so, but I think the Next will be limited to 3.5mhz mode only.
OldGamer
Drutt
Posts: 34
Joined: Mon Jun 10, 2019 1:45 am

Re: Divmmc Future and Next?

Post by OldGamer »

Yeah, I want to test the divmmc future but I don't want to risk plugging it in if it's going to damage itself or the Next.
User avatar
stupidget
Dynamite Dan
Posts: 1649
Joined: Wed Jan 24, 2018 2:09 pm
Location: Sunny Wolverhampton

Re: Divmmc Future and Next?

Post by stupidget »

Will it automatically recognise that it's plugged into a NEXT, with it being jumper less?

Actually would you need a DIVmmC Future as the NEXT already has an SD Slot with DivMMC-compatible protocol

Check the specs list here:

https://www.kickstarter.com/projects/sp ... xt-issue-2
User avatar
Szk
Drutt
Posts: 14
Joined: Mon Jun 21, 2021 3:39 pm
Location: São Paulo, Brazil
Contact:

Re: Divmmc Future and Next?

Post by Szk »

A DivMMC circuit is already reproduced in the Next's FPGA, so there's no reason at all to plug an external device.
If you really want to, you can setup the Next to disable the internal circuit so your external device should be recognized, but then it will be limited to 3.5MHz as noted.
Maybe [mention]Seven.FFF[/mention] or [mention]Alcoholics Anonymous[/mention] can give better advice ;)
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: Divmmc Future and Next?

Post by azesmbog »

Szk wrote: Wed Jul 14, 2021 5:15 am Maybe @Seven.FFF or @Alcoholics Anonymous can give better advice ;)
For them, I would ask a somewhat broader question:
Which of the existing devices will work on the edge partition in this Next?
The simplest, like a joystick controller and all ??
Specifically, I'm interested in the operation of the TR-DOS drive controller on the edge section, or a sound card with TSFM + SAA
Image
Well, at least SAA is part of it :))
OldGamer
Drutt
Posts: 34
Joined: Mon Jun 10, 2019 1:45 am

Re: Divmmc Future and Next?

Post by OldGamer »

The reason I want to plug it in is that I recently bought the divmmc Future and would like to see if it works, I have no other hardware to try it on. (bought it for a Harlequin kit which I'm still waiting to arrive)
Alcoholics Anonymous
Microbot
Posts: 194
Joined: Mon Oct 08, 2018 3:36 am

Re: Divmmc Future and Next?

Post by Alcoholics Anonymous »

Sorry just saw the notification for this.

The Next already has an enhanced divmmc built in so you shouldn't be attaching one to the expansion bus. The Next divmmc has extended capability and has been made compatible with the internal multiface so they can both operate at the same time. Because of the way the expansion bus works (being able to switch it on and off), the internal divmmc can also coexist with an external if1 interface, among other things, allowing transfer of data between microdrive carts and sd cards. There are a lot of reasons not to use an external one.

Having said that, theoretically you can attach an external divmmc and have it run if the internal divmmc and multiface are disabled. Because the expansion bus would be enabled, the cpu would be limited to 3.5MHz as already mentioned. NextZXOS depends on the extended features of the internal divmmc so the Next itself cannot run with an external divmmc; you'd have to run as a plain 48K or 128K personality using the original roms.

Divmmc and some disk interfaces are where we've had compatibility issues that are being worked on. When the next KS2 boards arrive we'll be testing peripheral compatibility again as some problems have been found and corrected. In the last testing, the external divmmc we had on hand worked but I don't recall which one it was although I am sure it wasn't a divmmc future. The divmmc future has clock detection logic in it which may or may not work as expected on a Next which has a sharp and clean 3.5MHz clock signal but only to 3.3V on KS1 machines. KS2 machines will go up to 5V.

Anyway there is no reason to attach an external divmmc other than for the sake of doing it :)
Alcoholics Anonymous
Microbot
Posts: 194
Joined: Mon Oct 08, 2018 3:36 am

Re: Divmmc Future and Next?

Post by Alcoholics Anonymous »

azesmbog wrote: Wed Jul 14, 2021 7:35 am Which of the existing devices will work on the edge partition in this Next?
The simplest, like a joystick controller and all ??
Specifically, I'm interested in the operation of the TR-DOS drive controller on the edge section, or a sound card with TSFM + SAA
Well, at least SAA is part of it :))
We try to make them all work :) but it is still a work in progress. The last time things were tested about 6 months ago, some disk interfaces were not working. Since then several issues have been identified and fixed so hopefully the next time things are tested, progress will have been made.

Joysticks and other simple devices:

External joystick interfaces work including ones that work on the keys like the interface 2. As does simple devices like the zx printer.

ROM mappers:

Things like the if1, if2 cart, dandinator, currah uspeech, etc work. The if1 serial does not work as it needs 12VAC that the expansion bus does not supply.

/INT overriders:

The ram music machine overrides the ULA's /INT by forcing 5V on it. On KS1 machines, the fpga is too strong to be overridden by the ram music machine. On KS2 machines this has been fixed.

External BUS controllers

I think the only devices using an external bus controller is the datagear and the mb02/mb03 family which have z80 dma devices or clones. The mb03 dma is derived from the Next's dma. The KS1 machines have a bug that reverses the sense of the /busreq signal. The KS2 machines fix this. At the moment, the Next ignores busreq/busak coming from the expansion bus although this may be enabled for KS2 machines in the future. The Next's internal dma has a z80 dma mode on the same port as the mb02 so software written for the mb02 will work with the internal dma rather than the external one on the interface. That's how we're achieving compatibility with those few dma programs currently.

Powering through the expansion bus 9V

At least one disk interface replaces the sinclair power supply by physically block the dc jack and supplying 9V to the machine through the expansion bus 9V. KS2 machines are designed to allow this and I think this will work on KS1 machines too (I have to look).

NMI

There are two cases for nmi signals. One is pushbutton and the other is generated by logic. The pushbuttons (magic buttons) on things like the divmmc, multiface and some disk interfaces are very bouncy. The Next filters these to make sure the nmi is not generated more than once by a single push. Without filtering, the stack can fill up with return addresses as the nmi routine is entered many times. We found lack of filtering caused the machine to crash in some circumstances.

The opposite requirement comes when the nmi is generated by logic. The Opus Discovery connects its FDC ready output to the nmi so that it generates an nmi interrupt each time a byte is reading to be read or written to disk. The nmi signal must not be filtered in this case.

So there is a setting to determine if the external nmi should be filtered or not.

TRDOS controller:

The expansion bus does not supply +12V or 12VAC. We decided not to add these supplies to the KS2 machines because they are rarely required and because of concerns about project costs (there are many changes on the KS2 pcb already but I also mean costs outside just the increased BOM). This will place KS1 and KS2 machines on the same footing in this regard. Instead, optional aftermarket modules will appear that can be mounted on the pcb with supply wires soldered to holes on the relevant expansion bus pins to provide +12V and 12VAC if these are wanted. Such a module for 12V only is already sold by a third party for KS1 machines.

I mention this because the original Beta Disk interface was one of those interfaces that require +12V as it was using an old FDC controller. We don't have access to a beta disk interface but we had someone test a modern beta disk interface that did not require 12V. It did not work properly but this is something that needs to be tried again as fixes to the expansion bus logic have since been applied.

If you don't need the actual physical disks, trdos compatibility is supplied via esxdos using the internal divmmc.

TSFM + SAA

This should work but none of the core team has this interface to try; it was actually one of the use-cases used to design how the expansion bus on the Next would work.

The Next filters i/o cycles (and memory cycles but this doesn't apply here) going out to the expansion bus. If an internal device is responding on a particular port, external devices will see an i/o cycle with /iorq held high so that an external device on the same port will not be written to.

In this case here we are talking about the AY ports FFFD and BFFD. The three internal AY chips respond on these ports. So if the expansion bus is on with the TSFM plugged in, i/o to ports FFFD and BFFD would go to the internal AY chips. However if you disable the internal AY chips, i/o to ports FFFD and BFFD will go the external TSFM.

The best way to operate as the Next, as opposed to a 48k or 128k personality, would be to set up the two hardware profiles the Next supports. One hardware profile determines what internal peripherals will be enabled with the expansion bus off (likely all of them). The other hardware profile determines what internal peripherals will be enabled with the expansion bus on (all except the internal AY eg). Then you could do this:

1. Expansion bus off, cpu at 28MHz
2. IO to BFFD and FFFD go to the three internal AYs
3. Expansion bus on, cpu automatically limited to 3.5MHz by hardware
4. IO to BFFD and FFFD go to the external TSFM
5. Expansion bus off, cpu returns to 28MHz
6. Do non-music stuff
7. Goto 1

By limiting the time spent in steps 3 & 4 you can still keep the machine running at 28MHz most of the time and still take advantage of the external TSFM. The amount of time spent in 3 & 4 could be as little as the OUTs needed to write the TSFM register state if the music driver itself is allowed to run at 28MHz.

KS2 machines fix a few expansion bus problems. The idea will be to fix those problems the same way on KS1 machines through an add-on. Anyway, that's long enough.
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: Divmmc Future and Next?

Post by azesmbog »

In principle, a pretty clear explanation.
about TR-DOS - there are users who would like to run real floppies. (I'm not one of them :))
I was more interested in musical possibilities. For myself, I have added SAA1099 already.
TSFM, of course, I can also try to add, but it is less interesting to me, if only an experiment for the sake of experiment. Like hardware SID
And I understand that in the second version KS2 for the external bus they made a level converter for all signals of the edge bus ??
User avatar
Luzie
Manic Miner
Posts: 913
Joined: Fri May 01, 2020 2:07 pm

Re: Divmmc Future and Next?

Post by Luzie »

Maybe one time we can have an extended version of the Nexts .config DOT-command to directly enable and disabled specific hardware ports (listed here: https://gitlab.com/SpectrumNext/ZX_Spec ... /ports.txt ) .

Like .config microdrive enable

This would be nice.

btw. Instructions from [mention]Alcoholics Anonymous[/mention] on howto enable specific hardware can be found here: "RAM Music Machine interface [Aphex twin's first sampling drum machine]" https://www.specnext.com/forum/viewtopic.php?f=6&t=1482
Alcoholics Anonymous
Microbot
Posts: 194
Joined: Mon Oct 08, 2018 3:36 am

Re: Divmmc Future and Next?

Post by Alcoholics Anonymous »

azesmbog wrote: Tue Aug 31, 2021 5:56 pm In principle, a pretty clear explanation.
about TR-DOS - there are users who would like to run real floppies. (I'm not one of them :))
Yeah I know it's quite important to have all the disk interfaces working. This is one of the reasons many people want the expansion bus, if only just to fire it up for nostalgiac reasons. I don't think anyone would actually use the old storage devices day to day when an instant sd card is there. If we can make it so that files can be transferred to and from the internal sd card, then that gives the zx next another purpose in backing up old software.

There is no reason (known to me) why any interface should not be working so it is an indication of hardware bugs in the zx next that need to be found.
And I understand that in the second version KS2 for the external bus they made a level converter for all signals of the edge bus ??
Yes the level converters are there.
Luzie wrote: Tue Aug 31, 2021 6:21 pm Maybe one time we can have an extended version of the Nexts .config DOT-command to directly enable and disabled specific hardware ports
Yes that is the plan.

So there are a number of usability issues that still need to be written into the system software:

One is the personalities need to have independent hardware configuration. Right now there is a global hardware configuration that applies to all personalities. Among these configurations, the default state of the expansion bus needs to be specified too. Then you can just pick the 48K spectrum personality and have it power up with the expansion bus ready to go as if it were a 48K.

The config dot command badly needs updating. It needs to be able to run under esxdos and it should be able to do as you suggest being able to configure the expansion bus for specific peripherals by name. One of the things that has happened recently in nextzxos is that directories have been made executable if a program named "run.bas" is in the directory. So, eg, you could have a directory dedicated to Old Tower (and you'll see why I pick on this in a moment). Inside the Old Tower directory you'd have the normal Old Tower tap file but also the run.bas file. From nextzxos if you click on the Old Tower directory, then it is run.bas that gets run. run.bas is a basic program that would take care of machine configuration using things like .config. Old Tower is a program whose music is written for ACB (or is it ABC) stereo, anyway the opposite of the default in the Next. So to run Old Tower properly, run.bas could configure the correct stereo setting before starting up Old Tower. For a long time we've been trying to figure out the best way to automatically launch programs without users having to be geniuses to do it properly and it looks like this will be the best way to do it. Configuration will do things like enable / disable ula+, turn on dacs, switch stereo mode, choose model and so on. The current interface can still be used by clicking on the original tap file but this other method will be able to address programs that require manual configuration to run properly on the Next.

There will also be a good way to launch programs for other computers using nextzxos by simply browsing to a file and clicking on it. Imagine just browsing to an Atari 2600 game and having nextzxos automatically reconfigure the Next as an atari 2600 to allow the game to play in a matter of seconds. Then you reset back to the browser. As far as I know this will be a unique and more seamless way to reconfigure the hardware than any other fpga computer and all done from the Spectrum.

The hdmi timing is very important to tackle. There is an idea of how to do it and it will probably be tested on another simpler core first.
User avatar
cha05e90
Dizzy
Posts: 66
Joined: Sun Nov 19, 2017 7:02 pm

Re: Divmmc Future and Next?

Post by cha05e90 »

Alcoholics Anonymous wrote: Tue Aug 31, 2021 5:58 am ... Instead, optional aftermarket modules will appear that can be mounted on the pcb with supply wires soldered to holes on the relevant expansion bus pins to provide +12V and 12VAC if these are wanted. Such a module for 12V only is already sold by a third party for KS1 machines...
Just for the record: Does this "expansion" enable my attached ZX Interface 1 to handle the serial port in the right way? And if the answer is "yes", where should this module be available? (I've not seen this yet...). Ta!

P.S.: ...and it is needed for the KS2 machines as well, doesn't it?
48K/+/+/+/+128K/Vega/Next&80/81&88
Alcoholics Anonymous
Microbot
Posts: 194
Joined: Mon Oct 08, 2018 3:36 am

Re: Divmmc Future and Next?

Post by Alcoholics Anonymous »

cha05e90 wrote: Wed Sep 01, 2021 7:14 am Just for the record: Does this "expansion" enable my attached ZX Interface 1 to handle the serial port in the right way? And if the answer is "yes", where should this module be available? (I've not seen this yet...). Ta!
The IF1 microdrives and network work fine on KS1 machines. The serial interface part needs 12VAC which is not present on either the KS1 or KS2 machines. For that part to work, an extra power supply module will have to be mounted inside the machine as a DIY upgrade. This module would provide both missing 12V and 12VAC supplies on the expansion bus.

12V is sometimes needed by disk interfaces with older FDC controllers and 12VAC I have only ever seen used by the IF1. It's possible it was used on other third party serial interfaces since it gets you +/-12V for rs232 signals, which is what the IF1 is using it for. There is a much better hardware uart in the Next that is accessible through the joystick port that can run at up to 2Mbps and has 512 byte (Rx) and 64 byte (Tx) FIFOs as well as interrupt ability, so using the IF1's serial would only be for running old software and not for new uses.

But if you want to use the IF1's serial, yes, you will need a power supply module and that applies to both KS1 and KS2 machines. It is not available now and I am hoping the community will be the one that provides it but if not we will probably do a reference design and interest someone in making them. It may require a little more skill than a lot of things that are sold because, although 12V modules are commonplace, something that produces 12VAC is not. Right now a 12V module can be bought through activeconsult but that does not help with the IF1 as it requires 12VAC.
User avatar
cha05e90
Dizzy
Posts: 66
Joined: Sun Nov 19, 2017 7:02 pm

Re: Divmmc Future and Next?

Post by cha05e90 »

Alcoholics Anonymous wrote: Wed Sep 01, 2021 8:18 pm But if you want to use the IF1's serial, yes, you will need a power supply module and that applies to both KS1 and KS2 machines. It is not available now and I am hoping the community will be the one that provides it but if not we will probably do a reference design and interest someone in making them. It may require a little more skill than a lot of things that are sold because, although 12V modules are commonplace, something that produces 12VAC is not. Right now a 12V module can be bought through activeconsult but that does not help with the IF1 as it requires 12VAC.
Indeed - the main "use" of the IF1 serial port would be the operating of a serial Sinclair QL SP-1000 printer, that is attached to the IF1 serial port - while running in "classic" 48 or 128k mode. I remember something that was called the "ZX Interface 3" that was planned (?) to show the missing 12V capability. So I still hope something like that (or variant) will materialize one day...

Thanks for your infos!
48K/+/+/+/+128K/Vega/Next&80/81&88
Alcoholics Anonymous
Microbot
Posts: 194
Joined: Mon Oct 08, 2018 3:36 am

Re: Divmmc Future and Next?

Post by Alcoholics Anonymous »

cha05e90 wrote: Thu Sep 02, 2021 7:37 am I remember something that was called the "ZX Interface 3" that was planned (?) to show the missing 12V capability. So I still hope something like that (or variant) will materialize one day...
The interface 3 is supposed to combine expansion bus fixes with some extra goodies which you may be able to guess from the name. However now the KS2 machines are getting the expansion bus fixes included so I think the way to go is to offer the expansion bus fix plug in for the KS1 machines separately. Then new devices like the interface 3 can be plugged into either machine.

This KS1 plug in could also provide 12V and 12VAC but I think it would be safer if both KS1 and KS2 used the separate power module. Otherwise you may end up with people doing both the KS1 plug in and the power module which could be bad.
Post Reply