-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current state of PiTubeDirect on Spectrum Next #25
Comments
Although this feature is supported on other BeebFPGA builds, it has not been tested at all on the Spec Next, so no it's not supposed to work. The main reason being that the Spec Next Pi Accelerator uses GPIOs differently from PiTubeDirect (in terms of the ones used, and the direction). I was concerned about mis-configurations causing damage. For example, running the BeebFPGA core with external Tube support, but with the Spec Next Pi Accelerator present instead of PiTubeDirect. Also, as I don;'t actually own a Spec Next, and have to borrow one for testing, I really didn't want to risk damaging someone else's Spec Next. That said, in the BeebFPGA core the GPIOs that connect to the Pi are set to be current limited at 8mA, so I think the risk of damage is low, but it's possible..... On the black screen you see, is there a cursor flashing in the top left corner? |
Actually, looking at the .ucf file I left the drive strength at 2mA, which may not be enought to operate correctly. In the other BeebFPGA builds where this feature has been tested, the .ucf file includes
for each of the accel_io<> nets But honestly, I doubt this is the issue. |
Sorry for the deluge of questions.... Can you detail the steps you used to build the core? |
|
OK, you missed a crutial step which patches the BeebFPGA boot loader firmware into the .bit file. This is a 6502 program that produces the BeebFPGA splash screen and validates the ROM CRCs, prior to allowing the core to boot normally. I guess you never see this screen? When I package the core, I run a script called make_spec_next_release.sh: This has a couple of dependencies: Let me see if I can build a version with this setting. Testing would be at your own risk though! |
Regarding the risks here, there are two "mismatched" scenarios to consider:
The concern is, due to the different use of GPIOs, that both the FPGA and Pi end up configuring a particular GPIO as an output, and they end up fighting. By setting the DRIVE value to 2 in the UCF file, very little current should flow in this scenario. So no damage should result. I believe both the SpecNext and BeebFPGA cores use this setting. The main reason I haven't enabled this feature yet is I feel more investigation is needed. Particularly I would like to understand how the Spec Next firmware uses the accelerator GPIOs. So if you (or anyone else) is aware of any documentation on this that would be very helpful. |
I'm currently not aware exactly on how this works on the Spectrum Next side, but what i've found out is that NextPi uses the I2S protocol to communicate with the Next and that this is done by adding a device tree overlay during system startup. Then on the NextPi, one can simply play audio files back and they are sent via I2S Soundcard to the Next. NextPi also configures a UART terminal to let the Next control what the Pi should do (play). Will dig a little bit deeper into NextPi's source code at https://github.com/StalePixels/NextPi/ |
If you are up for trying this, here's a version of the cores that has the external tube enabled: The first build uses MMFS as the file system, the second uses MMFS2. I would suggest using the Master core, as this gives you more explicit control over tube selection. You would then need to
Followed by a Ctrl-BREAK |
One more thing.... I would recommend you add the following line to the config.txt file on the Pi:
This should greatly reduce the chance of problems when the Spec Next core is running. Dave |
We've just given this a try on my friends Spec Next, and it appears to be working nicely. To summarise the steps involved: Setup PiTubeDirect
Setup BeebFPGA Core on Spec Next
If you want the Pi Co Pro to be enabled by default, do the following: For the Model B Core:
For the Master Core:
Note:
|
Thank you very much for the fast response, will try that out on immediatly on tuesday morning, been on vacation for the next few days! |
There is now a official release of BeebFpga for the Spectrum Next that includes External PiTubeDirect Co Processor support: This adds one additional level of protection against conflicts between the FPGA and the Pi due to the wrong firmware on the Pi. During the boot stage the BeebFPGA core now passivly detects PiTubeDirect, and only if this is successful will the External Tube interface be enabled. The splash screen has been updated to indicate whether PiTubeDirect is detected: The passive detection needs the latest hognose-fixes release of PiTubeDirect to work: This works using weak pullups/pulldowns on the Pi. regards Dave |
Hi, can you please elaborate on the current state of using BeebFpga on the Spectrum Next in conjunction with a PiTubeDirect accelerator? I've managed to build a external coprocessor enabled bitstream by modifying the top-level component (bbc_micro_spec_next.vhd) to use the following configuration:
However, when flashing the core and running it, the display gets black after rom loading. PiTubeDirect seems to work, i've run the validation tests from https://github.com/hoglet67/PiTubeDirect/wiki/Validation and they look similar (at least they don't throw any obvious errors).
Is this supposed to work currently?
The text was updated successfully, but these errors were encountered: