Beeb FPGA

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
hoglet
Posts: 6604
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Beeb FPGA

Postby hoglet » Fri Feb 24, 2017 12:14 pm

hoglet wrote:I'll try Bad Apple out on my BeebFPGA this morning, but that uses MMFS not SmartSPI.

I've tried both the 0.90 disk and MMC versions of Bad Apple with MMFS.

With the MMC version I needed to remove line 303 *CARD as this command does not exist in MMFS.

On the BeebFPGA both versions seem to work and run to completion.

On my real Model B, most of the time I get a Buffer Underflow at about 1 minute 10 seconds. It's always in exactly the same place.

Let me know if there's anything else I can do to help debug this.

Dave

Higgy
Posts: 22
Joined: Wed Jan 25, 2017 1:32 pm

Re: Beeb FPGA

Postby Higgy » Fri Feb 24, 2017 12:26 pm

Help shows:

DFS 0.90
DFS
UTILS
DUTILS

OS 1.20

User avatar
hoglet
Posts: 6604
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Beeb FPGA

Postby hoglet » Fri Feb 24, 2017 1:27 pm

Higgy wrote:Help shows:

DFS 0.90
DFS
UTILS
DUTILS

OS 1.20

I think SmartSPI is showing up as DFS (confusing, but that's how it is).

User avatar
fordp
Posts: 919
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Beeb FPGA

Postby fordp » Fri Feb 24, 2017 2:34 pm

No point having the real DFS there is no place to add the floppy drives ;)
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

squid
Posts: 6
Joined: Sun Feb 26, 2017 4:10 pm
Location: UK

Re: Beeb FPGA

Postby squid » Sun Feb 26, 2017 5:29 pm

I've applied hoglet's fixes to the MiST version of the Beeb FGA and have got Planetoid,Snapper working on it. Problem is whenever I press SHIFT or CONTROL keys these games just pause. Same with other Acornsoft games like Arcadians. As SHIFT is used in Planetoid and CONTROL is used in Arcadians it's problematic.

Any idea what could be happening? Does it happen with the other FPGAs?

User avatar
hoglet
Posts: 6604
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Beeb FPGA

Postby hoglet » Sun Feb 26, 2017 5:42 pm

squid wrote:Any idea what could be happening? Does it happen with the other FPGAs?

Sorry, that must be a MiST specific issue. I've just tried on BeebFpga (on the DE1) and shift works fine in Planetoids.

Does it do it at other times, or just in Planetoids and Snapper?

Dave

User avatar
ctr
Posts: 94
Joined: Wed Jul 16, 2014 2:53 pm

Re: Beeb FPGA

Postby ctr » Sun Feb 26, 2017 5:45 pm

squid wrote:Problem is whenever I press SHIFT or CONTROL keys these games just pause.


SHIFT and CTRL are the only two keys on the BBC keyboard that don't generate an interrupt. It's possible the FPGA isn't simulating this correctly, but I really don't know.

squid
Posts: 6
Joined: Sun Feb 26, 2017 4:10 pm
Location: UK

Re: Beeb FPGA

Postby squid » Sun Feb 26, 2017 6:07 pm

Actually it pauses on most games, only noticed it on Planetoids and Arcadians as they use CONTROL and SHIFT. Pausing on Snapper, Monsters, Castle Q but doesn't pause on Elite and Frak.

Interesting about the interrupt issue...

squid
Posts: 6
Joined: Sun Feb 26, 2017 4:10 pm
Location: UK

Re: Beeb FPGA

Postby squid » Sun Feb 26, 2017 7:15 pm

Thanks ctr, found the keyboard interrupt bug and fixed it. Now works fine.

User avatar
hoglet
Posts: 6604
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Beeb FPGA

Postby hoglet » Sun Feb 26, 2017 7:42 pm

squid wrote:Thanks ctr, found the keyboard interrupt bug and fixed it. Now works fine.

Was the bug MiST specific, or is it something I need to bring back into BeebFPGA?

Dave

Higgy
Posts: 22
Joined: Wed Jan 25, 2017 1:32 pm

Re: Beeb FPGA

Postby Higgy » Sun Feb 26, 2017 9:06 pm

I am glad @squid has joined up. As I am afraid I can't help on hardware/programming issues.

I just checked on ZX-Uno and Arcadians and Planetoids work fine. God those games being back memories. Although too many buttons for me now when trying to play Planetoids!!

squid
Posts: 6
Joined: Sun Feb 26, 2017 4:10 pm
Location: UK

Re: Beeb FPGA

Postby squid » Sun Feb 26, 2017 9:13 pm

hoglet wrote:Was the bug MiST specific, or is it something I need to bring back into BeebFPGA?


It was a bug in the MiST port.

squid
Posts: 6
Joined: Sun Feb 26, 2017 4:10 pm
Location: UK

Re: Beeb FPGA

Postby squid » Mon Feb 27, 2017 8:26 pm

I've come across another issue on the MiST port and that is the sound is terrible. I've checked the code and compared it to hoglet's but I don't see any issues. If you run the following you should get a nice two tone sound, i.e. it works fine on BeebEm, does it work fine on your FPGA versions?
10 SOUND 1,-15,68,40
20 SOUND 2,-15,80,40

On the MiST port it just a buzzing sound and most games have poor sound. Just running one SOUND command above it sounds fine.

User avatar
fordp
Posts: 919
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Beeb FPGA

Postby fordp » Mon Feb 27, 2017 9:17 pm

There have been scaling/ clipping issues in the past.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
hoglet
Posts: 6604
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Beeb FPGA

Postby hoglet » Mon Feb 27, 2017 9:45 pm

squid wrote:I've come across another issue on the MiST port and that is the sound is terrible. I've checked the code and compared it to hoglet's but I don't see any issues. If you run the following you should get a nice two tone sound, i.e. it works fine on BeebEm, does it work fine on your FPGA versions?
10 SOUND 1,-15,68,40
20 SOUND 2,-15,80,40

On the MiST port it just a buzzing sound and most games have poor sound. Just running one SOUND command above it sounds fine.

I don't get any issues with this on the Altera DE1, and I can't test the Papilio Duo at the moment as the hardware is indisposed.

Looking at your audio code, I'm wondering if you have an issue with conversion between signed and unsigned audio. I believe the 8-bit number coming out of the sn76489 is signed. If you are feeding this into a delta-sigma DAC, you need to invert the top bit as these expect an unsigned input. Otherwise you end up with a discontinuity around the zero crossing.

The Altera DE1 has a proper SPI DAC and this takes a signed value, so not such trickey is necessary.

The Papilio Duo uses a delta-sigma DAC on the FPGA, and so we do the following:
https://github.com/hoglet67/BeebFpga/bl ... o.vhd#L255

Code: Select all

-- Convert from signed to unsigned
dac_l_in <= (not audio_l(15)) & audio_l(14 downto 6);
dac_r_in <= (not audio_r(15)) & audio_r(14 downto 6);

On Mist you seems to be doing something different:
https://github.com/mist-devel/mist-boar ... bbc.v#L590

Code: Select all

assign AUDIO_L = {1'b0, sound_ao, sound_ao[7:1]};
assign AUDIO_R = {1'b0, sound_ao, sound_ao[7:1]};

Try changing this to:

Code: Select all

assign AUDIO_L = {not sound_ao[7], sound_ao[6:0], 8b'0};
assign AUDIO_R = {not sound_ao[7], sound_ao[6:0], 8b'0};

Let me know if this helps, and if not I'll have another think.

Dave

squid
Posts: 6
Joined: Sun Feb 26, 2017 4:10 pm
Location: UK

Re: Beeb FPGA

Postby squid » Mon Feb 27, 2017 10:38 pm

Hoglet, brilliant, that fixed it! Thanks so much, I've been racking my brains on this problem. :D

vanfanel
Posts: 21
Joined: Fri Mar 03, 2017 4:56 pm

Re: Beeb FPGA

Postby vanfanel » Fri Mar 03, 2017 5:22 pm

@hoglet:

In the first place, a huge THANKS for the FPGA implementation of the BBC MICRO!
I am using it both on the ZX-UNO and Altera DE-1 and almost everything seems fine.

However, "Speech!" from Superior Software shows an strange tone with the spoken words, and some of the demo phrases aren't read.
Is this somehow fixable? "Speech!" is without doubt one of the most awesome programs for the BBC Micro.

Thanks!

finisterre
Posts: 17
Joined: Thu Feb 23, 2017 1:07 pm

Re: Beeb FPGA

Postby finisterre » Fri Mar 03, 2017 6:02 pm

Does anybody know the reason that these FPGA boards generally don't seem to have HDMI out?

User avatar
hoglet
Posts: 6604
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Beeb FPGA

Postby hoglet » Fri Mar 03, 2017 6:05 pm

vanfanel wrote:However, "Speech!" from Superior Software shows an strange tone with the spoken words, and some of the demo phrases aren't read.
Is this somehow fixable? "Speech!" is without doubt one of the most awesome programs for the BBC Micro.

Maybe someone can help here... Does Speech use some of the "undocumented" behaviours of the SN76489 for playing back sampled data, as described here:
http://www.smspower.org/Development/SN7 ... esOnThePSG

User avatar
hoglet
Posts: 6604
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Beeb FPGA

Postby hoglet » Fri Mar 03, 2017 6:13 pm

finisterre wrote:Does anybody know the reason that these FPGA boards generally don't seem to have HDMI out?

I think it's for four reasons:
1 - Licensing
2 - It's tricky to design analog aspects of the PCB
3 - It's hardish to use from within the FPGA
4 - The boards are getting quite dated now

The current generation "kitchen sink" Altera dev board does actually have HDMI (and still includes SRAM):
cyclone5_1.jpg

cyclone5_2.jpg

http://www.terasic.com.tw/cgi-bin/page/ ... ish&No=830

If anyone wants to buy me one, I would be happy to port BeebFPGA :D

Dave

User avatar
fordp
Posts: 919
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Beeb FPGA

Postby fordp » Mon Mar 06, 2017 12:41 pm

hoglet wrote:
finisterre wrote:Does anybody know the reason that these FPGA boards generally don't seem to have HDMI out?

I think it's for four reasons:
1 - Licensing
2 - It's tricky to design analog aspects of the PCB
3 - It's hardish to use from within the FPGA
4 - The boards are getting quite dated now

The current generation "kitchen sink" Altera dev board does actually have HDMI (and still includes SRAM):
cyclone5_1.jpg
cyclone5_2.jpg
http://www.terasic.com.tw/cgi-bin/page/ ... ish&No=830

If anyone wants to buy me one, I would be happy to port BeebFPGA :D

Dave


I would buy you a Zturn 7020 (http://www.myirtech.com/list.asp?id=502), if you were up to port Beeb FPGA to it?
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
hoglet
Posts: 6604
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Beeb FPGA

Postby hoglet » Mon Mar 06, 2017 5:33 pm

fordp wrote:I would buy you a Zturn 7020 (http://www.myirtech.com/list.asp?id=502), if you were up to port Beeb FPGA to it?

Do actually you have one of these boards yourself yet? Just wondering how you are finding it and what you are doing with it.

I guess it would be interesting to try to use the ARM Cortex A9 processor as a second processor.

I think it would be quite a bit of work to port BeebFPGA, because it's only external memory is SDRAM. On the other hand, it does have about 512KB internal block RAM, compared to 64KB on the LX9, so possibly this could be used instead.

For me the other down side is it required Xilinx's Vivado tool set, rather the the older ISE. I've no experience with Vivado and I imagine the learning curve is steep.

I do seem to have rather a lot of projects on the go at the moment, so I'll probably decline your kind offer for now.

Dave

User avatar
fordp
Posts: 919
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Beeb FPGA

Postby fordp » Mon Mar 06, 2017 9:57 pm

That's fine Dave. I have wanted to play with a Zync based board for a while. I have not got one yet but the above just seemed the best out there right now. I would not get one without someone like you to help as the HDL would be much too hard for me right now. I had a tinker with Beeb FPGA on my DE1 and made some progress in adding a couple of simple features. I should get back to that really. Maybe I should do an add on PCB for the DE1 first. I still would like to tinker with some of the missing bits like Econet and real floppy. I need to find some time to play.

Cheers.
Last edited by fordp on Tue Aug 08, 2017 2:52 pm, edited 1 time in total.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
hoglet
Posts: 6604
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Beeb FPGA

Postby hoglet » Mon Mar 06, 2017 10:09 pm

fordp wrote:I had a tinker with Been FPGA on my DE1 and made some progress in adding a couple of simple features. I should get back to that really. Maybe I should do an add on PCB for the DE1 first. I still would like to tinker with some of the missing bits like Econet and real floppy. I need to find some time to play.

I still think the DE1 is a really nice board, especially for adding extra interfaces.

You added a Midi interface:
https://github.com/fordp2002/BeebFpga/commits/master

Did you have any success with this?

Was it for output (driving instruments) or input (keyboard)?

One thing I've always wanted to do was to learn to play a keyboard. I'm totally unmusical, but this somehow just appeals to me. I was thinking of building a MIDI Keyboard -> Music 4000 user port adaptor, so I could then use a cheap second hand midi keyboard as an input device to Music 5000.

http://www.retro-kit.co.uk/user/custom/ ... ematic.pdf

This is probably best developed first on BeebFPGA.

Dave

User avatar
fordp
Posts: 919
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Beeb FPGA

Postby fordp » Mon Mar 06, 2017 11:06 pm

It is a long time since I checked but I think my Midi interface works. I used to use my real Midi interface to drive a Casio CZ101. I have lots of MIDI instruments. The problem I had was I could not get my real interface working so had no test software. It should do both Midi Out and Midi In.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
fordp
Posts: 919
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Beeb FPGA

Postby fordp » Tue Aug 08, 2017 11:48 am

Hi Dave,

Any chance of NuLA support on Beeb FPGA?
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
hoglet
Posts: 6604
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Beeb FPGA

Postby hoglet » Tue Aug 08, 2017 2:47 pm

Maybe at some point. I do have rather a lot of other half finished projects to finish first!

Dave

vanfanel
Posts: 21
Joined: Fri Mar 03, 2017 4:56 pm

Re: Beeb FPGA

Postby vanfanel » Wed Aug 30, 2017 9:29 am

Hi, Dave!

Any chances the "Speech!" problem is solved? Have any idea on what the problem could be?

User avatar
fordp
Posts: 919
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Beeb FPGA

Postby fordp » Wed Aug 30, 2017 10:29 am

hoglet wrote:Maybe at some point. I do have rather a lot of other half finished projects to finish first!

Dave


No problem.

I saw your new ATOM project, nice. Maybe I should have a go at adding to the Beeb FPGA project.

I would like to run Beeb FPGA on my Spectrum Next when it turns up next year ;)
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
hoglet
Posts: 6604
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Beeb FPGA

Postby hoglet » Wed Aug 30, 2017 10:38 am

fordp wrote:No problem.

Regarding VideoNuLA support, from this post it doesn't seem Rob has any immediate plans to make his VHDL source available.
viewtopic.php?f=3&t=12150&p=155027#p155027

If he does, it shouldn't be too hard to add it in to BeebFPGA.

I'd rather not try to reverse engineer the design (which would be possible from Rob's excellent documentation).

Dave


Return to “hardware”

Who is online

Users browsing this forum: Google [Bot] and 6 guests