Beeb FPGA

discuss both original and modern hardware for the bbc micro/electron
Post Reply
User avatar
TheCorfiot
Posts: 671
Joined: Mon Jan 08, 2007 5:22 pm
Contact:

Re: Beeb FPGA

Post by TheCorfiot » Thu Nov 19, 2015 12:57 pm

Will try later this afternoon guys and get back to you..

my suspicion is the MMC firmware..it's happy to transfer x amount of data, ie the menu or planetoid on its own but chaining the programs is causing it to hit some issues with it's buffer and falling over, could even be timing related.

The Amiga IDE port is notoriously similar in that you have to restrict it's max transfer speed to avoid corruption.


:)

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 1:57 pm

Hi Guys,

I've eventually tracked down and fixed the SD Card issue with MMFS.

It was something really stupid (and 100% my fault!). When I added SDHC card support to MMFS, I needed a memory location to store the card type (i.e. SD or SDHC). I temporarily picked &80 when I was testing, and, err, never remembered to change it to something more stable.

Before the BEEB.MMB menu program launches a program it clears memory, including &80, which sets the card type back to SDHC. This is why it was only causing problems with older non-SDHC cards.

There is an updated ROM image, containing a version 1.02 of MMFS that fixes this:
https://github.com/hoglet67/BeebFpga/tr ... ra/release

Dave

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 2:53 pm

One more small change just pushed - power-up CMOS config updated to *UNPLUG DFS by default, as more games seem to load with DFS disabled.

Dave

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 3:53 pm

Here's a couple of notes for getting the Music 5000 working:

1. Add the following SSD disk image into your BEEB.MMB archive file in a spare slot (I used disk 320)
m5000-4-patched.zip
(57.99 KiB) Downloaded 40 times
To manipulate the BEEB.MMB archive file (add disks, remove disks, etc) you need to use the MMBImager tool from here:
http://swhs.home.xs4all.nl/bbc/mmbeeb/windows.html

The above disk image has an edited RUNNER script with the lines that load the M2 and M4 modules removed. These modules hang if the Music 2000 and Music 4000 hardware is not present. This happens on real hardware as well, see this and this.

2. Boot Beeb Fpga in Master Mode

3. Load the Ample ROMS:

*INSERT 9
Control Break
*DIN 320
Shift Break

4. Start Music 5000

*DIN 320
Shift Break

5 Play some music:

Select the "Load program" menu, and enter "ppach" as the filename
Select the "Run program" menu

You should now get some nice Music coming out of the audio jack.

Dave

PhilYoung
Posts: 205
Joined: Sun Jun 12, 2011 5:55 pm
Contact:

Re: Beeb FPGA

Post by PhilYoung » Thu Nov 19, 2015 4:19 pm

hoglet wrote:Hi Guys,

I've eventually tracked down and fixed the SD Card issue with MMFS.

It was something really stupid (and 100% my fault!). When I added SDHC card support to MMFS, I needed a memory location to store the card type (i.e. SD or SDHC). I temporarily picked &80 when I was testing, and, err, never remembered to change it to something more stable.

Before the BEEB.MMB menu program launches a program it clears memory, including &80, which sets the card type back to SDHC. This is why it was only causing problems with older non-SDHC cards.

There is an updated ROM image, containing a version 1.02 of MMFS that fixes this:
https://github.com/hoglet67/BeebFpga/tr ... ra/release

Dave
Hi,

Just to confirm that works on my DE1, including the ROM flashing under linux

Cheers,

Phil Young

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 7:07 pm

I've been playing with the Music 5000 for the last couple of hours, and all I can say is it's a bloody amazing bit of (virtual) kit.

I recommend downloading the collection of Panda Discs:
http://www.stardot.org.uk/forums/viewto ... 612#p94115

There is an index here:
http://www.retro-kit.co.uk/user/custom/ ... -panda.pdf

The Jean Michel Jarre on Disc 13 is excellent.

Dave
Last edited by hoglet on Thu Nov 19, 2015 7:51 pm, edited 1 time in total.

User avatar
TheCorfiot
Posts: 671
Joined: Mon Jan 08, 2007 5:22 pm
Contact:

Re: Beeb FPGA

Post by TheCorfiot » Thu Nov 19, 2015 7:32 pm

Hi Dave

Master Mode is now fixed, SD works great :)
Model B mode seems fine so far.
No corruption found, will test further.


Thanks for everything mate :)


Edit.....
Is the CMOS RAM data stored in the ROM bin file or hard programmed into the FPGA core..
default CMOS settings are fine but i would set LOUD and CAPS too :)

The other fix i would suggest involves Smart SPI and MMCFS..
When the system is booted or CTRL Break it seems to autoexecute a *DIN 0. Which is fine, ready to boot the menu, what is annoying though is that it also defaults to Disk slot zero if just Break is pressed..Can we change the behaviour so that the current loaded disc is preserved on Break but the default 0 inserted on CTRL Break only.....
Sorry to be a pain..but i actually plan to use the DE1 for Beeb programming too :)

The Music 50000 is indeed very impressive, for it's day, compared to the TRS80 Orchestra expansions it blows them out of the water..
Can we increase the output volume though so it's comparable to the Masters LOUD setting.

Amazing work Dave and in such a short time....you remind me of an Ian Dury and the Blockheads tune..

Thank you
Bas :)

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 9:49 pm

TheCorfiot wrote:Is the CMOS RAM data stored in the ROM bin file or hard programmed into the FPGA core..
default CMOS settings are fine but i would set LOUD and CAPS too :)
It's hard programmed into the FPGA core.

I'll update those settings in the next release.
TheCorfiot wrote: The other fix i would suggest involves Smart SPI and MMCFS..
When the system is booted or CTRL Break it seems to autoexecute a *DIN 0. Which is fine, ready to boot the menu, what is annoying though is that it also defaults to Disk slot zero if just Break is pressed..Can we change the behaviour so that the current loaded disc is preserved on Break but the default 0 inserted on CTRL Break only.....
Sorry to be a pain..but i actually plan to use the DE1 for Beeb programming too :)
MMFS on the Master already does exactly this.

For Smart SPI changes you'll have to speak nicely to Duikkie
TheCorfiot wrote: The Music 50000 is indeed very impressive, for it's day, compared to the TRS80 Orchestra expansions it blows them out of the water..
Can we increase the output volume though so it's comparable to the Masters LOUD setting.
I've struggled with trying to maximise the amplitude from the m5000. If I boost it any more then certain songs that use lots of voices, like In Concert (Pilgrim Beat) on the m5000 system disk, end up clipping. The problem is it's a 16 voice synth, and the voices just add together. So if only one voice is playing, its only 1/16 then maximum amplitude, maybe even quieter if that voice is not playing at full volume. Most songs only use a few voices, so the overall volume sounds quiet. I'm open to suggestions if anyone knows a way around this.

Also, comparing it to a loud ^G is not really a fair comparison, because that uses 100% of the available 16-bit range. Maybe the answer here is to actually reduce the level of the SN74689 into the mixer, so it isn't quite so loud in comparison.

What to you have the line out connected to?
TheCorfiot wrote: Amazing work Dave and in such a short time....you remind me of an Ian Dury and the Blockheads tune..
You're welcome!

Dave

User avatar
fordp
Posts: 1097
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: Beeb FPGA

Post by fordp » Thu Nov 19, 2015 9:59 pm

hoglet wrote:I've been playing with the Music 5000 for the last couple of hours, and all I can say is it's a bloody amazing bit of (virtual) kit.

I recommend downloading the collection of Panda Discs:
http://www.stardot.org.uk/forums/viewto ... 612#p94115

There is an index here:
http://www.retro-kit.co.uk/user/custom/ ... -panda.pdf

The Jean Michel Jarre on Disc 13 is excellent.

Dave
Will it match my CZ101 ?

I was busy today so just a few minutes for hacking and no actual FPGA work yet.

I did manage to preserve one of my favorite floppy disks. It has music on it and a BBC sound to midi conversion routing written by me and my brother in the 1980's. The bad news is it does not seem to work on the BBC Master. My BBC B is dead at the moment maybe I should dig it out and get it going. I think the 1770 disk interface was the issue last time I had it out. I am getting closer to my aim with my CZ101 out wired up with my MIDI Interface and I have found the correct disk.

Real computer preservation at work. I wonder if any of the music programs have been lost and I have the only copy?

I still have a few other disks with my own work on to find and capture.

I will be ready to bring them alive again on my DE1 if I ever get it working.

Thanks Dave for your amazing efforts and I will get to try it at some point.

Cheers.

FordP
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
fordp
Posts: 1097
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: Beeb FPGA

Post by fordp » Fri Nov 20, 2015 5:46 pm

hoglet wrote:
fordp wrote:My DE1 is not showing up as a USB device on my machine.

I am not sure if this a hardware or software issue at the moment.

I think I had this issue before.
Do you have a Linux machine you can plug it into?

Code: Select all

dmesg
lsusb | grep Altera
Should verify that the hardware is being recognised.

Dave
I tried this on my Ubuntu machine and it does not show up :(

I may have to try and take it in to work and try and get it fixed.

I will study the circuit diagram and try and see what it is.

FordP
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Fri Nov 20, 2015 6:05 pm

fordp wrote: I tried this on my Ubuntu machine and it does not show up :(

I may have to try and take it in to work and try and get it fixed.

I will study the circuit diagram and try and see what it is.
What signs of life are there from the board?

Dave

User avatar
fordp
Posts: 1097
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: Beeb FPGA

Post by fordp » Fri Nov 20, 2015 7:07 pm

Hi Dave,

The FPGA is showing great signs of life as it is running a version of Minimig, which is working fine as far as I can tell.

The Power LED seems normal but the second LED is not a bright as I think it shout be. It may be a problem with one of the regulators or elsewhere in the PSU section. The other question mark is the circuit around the FTDI USB chip or somewhere else in the programming section. I note that the FTDI chip is clocked from the Altera Max device. I may get my scope out and have a prod about. I am mainly a softie these days but my work colleagues could fix most things. If the Max chip is dead then that will be problematic.

Cheers.

FordP
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

grannyg
Posts: 43
Joined: Tue Sep 10, 2013 4:06 pm
Contact:

Re: Beeb FPGA

Post by grannyg » Sun Nov 22, 2015 11:26 am

I'm having a weird problem in both BBC and Master mode. Random pixels appear on the screen. During gameplay they affect collision detection in the game. Bullets get blocked or walls appear/disappear. Repton 3 seems to be affected the most. This is on a Papilio Duo.

Mode 7 doesn't seem to be affected.

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Sun Nov 22, 2015 11:43 am

grannyg wrote:I'm having a weird problem in both BBC and Master mode. Random pixels appear on the screen. During gameplay they affect collision detection in the game. Bullets get blocked or walls appear/disappear. Repton 3 seems to be affected the most. This is on a Papilio Duo.
Looks like I need to put some work into defining timing constraints for the memory interface. I've not done this for the Papailio.

Dave

derekw
Posts: 6
Joined: Fri Nov 14, 2014 11:39 am
Contact:

Re: Beeb FPGA

Post by derekw » Sun Nov 22, 2015 12:22 pm

I've had a similar problem with screen corruption on a Duo with 2MB of RAM. However, modifying the drive to 8 for all SRAM signals solved the problem. A good test seems to be Snapper. When drive=2 the maze slowly becomes corrupted which then also affects collision detection, setting drive=8 and it worked for at least two hours.

Derek

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Sun Nov 22, 2015 12:38 pm

derekw wrote:I've had a similar problem with screen corruption on a Duo with 2MB of RAM. However, modifying the drive to 8 for all SRAM signals solved the problem. A good test seems to be Snapper. When drive=2 the maze slowly becomes corrupted which then also affects collision detection, setting drive=8 and it worked for at least two hours.

Derek
That's very likely to be the cause. DRIVE=2 is too low I think. I though I had increased that a while ago, but I'm probably getting confused with another project.

Dave

User avatar
fordp
Posts: 1097
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: Beeb FPGA

Post by fordp » Tue Nov 24, 2015 11:48 am

fordp wrote:
I tried this on my Ubuntu machine and it does not show up :(

I may have to try and take it in to work and try and get it fixed.

I will study the circuit diagram and try and see what it is.

FordP
I have a new FTDI chip on my DE1 and now when you plug it in a PC it asks for a driver :D

Oh and a Mist arrived from Poland today.

Hopefully I have gone from no useful FPGA boards to two with the 'Duo expected in a couple of weeks.

Fingers crossed!

FordP
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Tue Nov 24, 2015 11:57 am

fordp wrote: I have a new FTDI chip on my DE1 and now when you plug it in a PC it asks for a driver :D
Wow, I wonder what killed the old one. Any ideas?

Dave

paulb
Posts: 811
Joined: Mon Jan 20, 2014 9:02 pm
Contact:

Re: Beeb FPGA

Post by paulb » Tue Nov 24, 2015 12:11 pm

hoglet wrote:
fordp wrote: I have a new FTDI chip on my DE1 and now when you plug it in a PC it asks for a driver :D
Wow, I wonder what killed the old one. Any ideas?
Hopefully not the driver.

User avatar
sweh
Posts: 2228
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Beeb FPGA

Post by sweh » Tue Nov 24, 2015 1:52 pm

paulb wrote:
hoglet wrote:
fordp wrote: I have a new FTDI chip on my DE1 and now when you plug it in a PC it asks for a driver :D
Wow, I wonder what killed the old one. Any ideas?
Hopefully not the driver.
I believe they stopped that; it now just refuses to talk to the fake chip. In addition I think it never stopped the device showing on the bus, it just set the VID and PID to zero, so on Linux it still showed in "lsusb" output... and if you were clever enough you could reset the values.
Rgds
Stephen

User avatar
fordp
Posts: 1097
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: Beeb FPGA

Post by fordp » Tue Nov 24, 2015 6:41 pm

Looks like my DE1 is back from the dead. Working for an Electronics company has its uses.

Ford
14483903372011524518908.jpg
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Tue Nov 24, 2015 6:46 pm

fordp wrote:Looks like my DE1 is back from the dead. Working for an Electronics company has its uses.
=D> =D> =D> =D> =D>

If you have a few minutes, it would be great if you could run through the test builds in this ZIP file.
http://www.stardot.org.uk/forums/viewto ... 20#p125304

I'd like to just confirm that 12mA is not borderline for some people.

Dave

User avatar
fordp
Posts: 1097
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: Beeb FPGA

Post by fordp » Tue Nov 24, 2015 7:10 pm

Hard to be sure Dave as it is not working great.

BBC Master mode is really not working well for me.

BBC Micro mode works better but I am getting some strange text messages.

Some sof's are better than others.

I had a game of Acornsoft Snapper however, and the file loader is one written by me and my brother back in the day. So my first ancient code is running on an FPGA.

I am going out in a few minutes and may get more time later to play.

I will report back when I have solid things to report.

An epic day with a BBC core finally running on an FPGA of mine.

Thanks for your efforts.

FordP
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Tue Nov 24, 2015 7:19 pm

fordp wrote: I will report back when I have solid things to report.
OK.

The output drive was certainly one parameter we can play with, as is trying it with/without a gated WE clock.

The memory interface timing is pretty tight at 32MHz. I might spend some time tomorrow reworking things a bit so that this can be slowed down. Then we should be able to generate WE synchronously.

Dave

User avatar
fordp
Posts: 1097
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: Beeb FPGA

Post by fordp » Tue Nov 24, 2015 9:31 pm

Well I have some results.

My monitor which is an LCD TV works in both sRGB and VGA modes when in mode 7 straight in to the VGA port.

It blanks for a long time but then comes back. Mode 7 is best in sRGB mode on my screen for mode 7 but worse in the the other modes.

The Mist scan doubler picture quality is much worse than your scan doubler.

The sound varies in quality from quite good to buggy with something seriously wrong. I can send you some example files to try at your end if you like.
Sounds to me like it fails when 3 notes are playing at the same time or maybe the third channel is broken?

Try them on the real thing then on the DE1 and you will hear a massive difference.

Master mode seems to have a big issue with carriage returns. I can load programs and they run but the screen is way out.

I will try Re-Flashing and see if that helps.

I will let you know about RAM drive strength when things are a bit more stable.

May I suggest an auto boot option for a spare slide switch, this is done by forcing the shift pressed at boot and is in the Mist version.

I am very happy my DE1 is alive and very well!

Cheers.

FordP
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
fordp
Posts: 1097
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: Beeb FPGA

Post by fordp » Tue Nov 24, 2015 9:47 pm

A good example of very poor audio is in the game FLIP!. The timing of the opening credits may be off too. I seem to remember the timing was lumpy on the real Beeb too however!

FordP
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Tue Nov 24, 2015 9:54 pm

It's possible the poor audio is down to the audio mixer overflowing in certain cases, which will be easy to fix. I'll try FLIP in a minute when 24 hours in A&E is over :D

Dave

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Tue Nov 24, 2015 10:00 pm

fordp wrote: Master mode seems to have a big issue with carriage returns. I can load programs and they run but the screen is way out.
Can you post a photo?

Actually very little changes between Beeb and Master mode in hardware terms, so this is a bit weird.

Dave

User avatar
fordp
Posts: 1097
Joined: Sun Feb 12, 2012 9:08 pm
Location: Peterborough, England
Contact:

Re: Beeb FPGA

Post by fordp » Tue Nov 24, 2015 10:19 pm

I have fixed Master mode, the Flash was not programmed correctly, no idea why I used the same procedure as the first time!

I erased it and reflashed and it is working now.

I have loading the image built on my Quartus II (13.0.1) and that works too.

Just double checked "Flip!" and no change there. It is the same fault I get with a lot of my BBC music files where one channel is totally distorted while the others are fine.

I am quitting for the night now but I will be back on to it later on in the week.

Cheers.

FordP
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
hoglet
Posts: 9373
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Beeb FPGA

Post by hoglet » Tue Nov 24, 2015 10:24 pm

fordp wrote: Just double checked "Flip!" and no change there. It is the same fault I get with a lot of my BBC music files where one channel is totally distorted while the others are fine.
I've replicated this an it is definitely the mixer overflowing. It doesn't occur on the build without the SID and the M5K:
https://github.com/hoglet67/BeebFpga/bl ... ro_de1.sof

I need to pay a bit more attention to what the no-output levels are from each source.

Edit: Turns out there are a couple of errors in the mixer. The SID output is unsigned not signed, which is adding a big DC offset. I'm also attenuating it by a factor of two, which is why it doesn't overflow all the time. Should be easy to fix.

Dave

Post Reply

Return to “8-bit acorn hardware”