Beeb FPGA

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

Re: Beeb FPGA

Post by hoglet » Tue Nov 17, 2015 9:13 pm

fordp wrote: I have cloned a few repositories now :D

but it looks like AtomBusMon/oho_dy1/OhoPack.vhd and AtomBusMon/oho_dy1/Oho_Dy1.vhd are missing!
Strange, I can see then here:
https://github.com/hoglet67/AtomBusMon/ ... rc/oho_dy1

Dave

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

Re: Beeb FPGA

Post by hoglet » Tue Nov 17, 2015 9:44 pm

Looks like there is some path confusion in the project file:

Warning (12019): Can't analyze file -- file ../src/common/AtomBusMon/oho_dy1/OhoPack.vhd is missing
Warning (12019): Can't analyze file -- file ../src/common/AtomBusMon/oho_dy1/Oho_Dy1.vhd is missing

Warning (12019): Can't analyze file -- file ../../AtomBusMon/src/AVR8/spi_mod/spi_slv_sel_comp_pack.vhd is missing
Warning (12019): Can't analyze file -- file ../../AtomBusMon/src/AVR8/Memory/XMemCompPack.vhd is missing

I'll try to clean this up tomorrow.

Dave

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

Re: Beeb FPGA

Post by fordp » Tue Nov 17, 2015 9:46 pm

It is down to how the path is quoted.

The ones that work have ../../AtomBusMon

and those two do not have it that way!

I have copied them over for now.
fpag.jpg
fpag.jpg (22.69 KiB) Viewed 985 times
I have it building now with 193 warnings!

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

User avatar
flynnjs
Posts: 830
Joined: Tue Jul 06, 2010 9:33 pm
Contact:

Re: Beeb FPGA

Post by flynnjs » Tue Nov 17, 2015 10:08 pm

hoglet wrote: On windows you will have to just create a directory in BeebFpga/src/common called AtomBusMon and copy the files from the src directory of the AtomBusMon project into it.
Or use an NTFS Junction

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

Re: Beeb FPGA

Post by fordp » Tue Nov 17, 2015 10:23 pm

I could not get my DE1 going yet but I have dug out my BBC MIDI interface:
IMG_20151117_221811.jpg
FordP
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

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

Re: Beeb FPGA

Post by TheCorfiot » Wed Nov 18, 2015 12:09 am

Hi Dave

Here's my results. MMC errors in Master mode for all revisions.

Model B

4ma
Boot=OK
Mode 7=OK
Snapper=No, hangs just after drawing Blue Borders
Sound=OK
Planetoid=No, No onscreen green nasties or ship appear

4ma_gc
Boot=OK
Mode7=OK
Snapper=No, some minor corruption on Blue border as game progresses.
Sound=OK
Planetoid=OK, seems fine

gc
Boot=OK
Mode7=OK
Snapper=OK
Sound=OK
Planetoid=OK

Current release from github, pof

Boot=irregular, games crash, random on screen corruption, sound is much louder but wrong, channels imbalanced and out of sync.

I have reverted back to the pof you suggested earlier and that does appear to run fine, since reflashing Mode7 now seems ok but???

Hope this helps...but I'm guessing it wont if my understanding of what you are testing is right.

Bas :)

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

Re: Beeb FPGA

Post by hoglet » Wed Nov 18, 2015 7:10 am

TheCorfiot wrote: Hope this helps...but I'm guessing it wont if my understanding of what you are testing is right.
It helps a lot - it points the finger at the output drive level rather than the gates WE signal.

Ultimately, down to getting the right timing on the SRAM interface that works in all cases.

Here's what I've concluded so far:
- What made it work for Phil with the EDBLL SRAMs was reducing the output drive to 4mA
- Unfortunately that seem to have made it unreliable on some original SRAMs (but not mine unfortunately)

Here's my plan:
1. Do the best job I can of accurately specifying input and output timings constraints for the SRAM interface in the .sdc file, which I'm not doing well at the moment.
2. Create a set of test builds that set the output drive at 4, 8, 12, 16, 20, 24mA and get both of you to quickly test each of these.

As a last resort, I can rework the design to run the SRAM interface much slower. But I don't want to do this yet, because a fast SRAM interface opens up lots of interesting possibilities, like adding an internal second processor that uses "spare" slots.

Dave

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

Re: Beeb FPGA

Post by TheCorfiot » Wed Nov 18, 2015 8:04 am

Hi Dave

Thats great news mate..
Pls dont go crazy prepping these test builds as you do have life to get on with too buddy.
I'm happy to test and report back with whatever you need..whenever, so take your time ;)

I'm still freaked out with how good Mode 7 looks lol.
The sound quality is nigh on perfect too.

Bas :)

PhilYoung
Posts: 203
Joined: Sun Jun 12, 2011 4:55 pm
Contact:

Re: Beeb FPGA

Post by PhilYoung » Wed Nov 18, 2015 8:54 am

hoglet wrote:
Here's my plan:
1. Do the best job I can of accurately specifying input and output timings constraints for the SRAM interface in the .sdc file, which I'm not doing well at the moment.
2. Create a set of test builds that set the output drive at 4, 8, 12, 16, 20, 24mA and get both of you to quickly test each of these.

Dave
Hi Dave,

I can test any candidates at just about any time, I'll leave everything set up and ready to go. I'd like to avoid reflashing the Flash memory if possible, this seems to be a bit hit and miss using the DE1 control panel, but I'm assuming this won't be necessary (unless more people have trouble with SD cards on the Master possibly)

Thanks for all your efforts so far.

Cheers,

Phil Young

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

Re: Beeb FPGA

Post by hoglet » Wed Nov 18, 2015 9:07 am

PhilYoung wrote: I can test any candidates at just about any time, I'll leave everything set up and ready to go. I'd like to avoid reflashing the Flash memory if possible, this seems to be a bit hit and miss using the DE1 control panel, but I'm assuming this won't be necessary (unless more people have trouble with SD cards on the Master possibly)
I think the ROM Image in the parallel FLASH is quite stable, I wouldn't expect it to change at all during this exercise.

Dave

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

Re: Beeb FPGA

Post by hoglet » Wed Nov 18, 2015 5:25 pm

Hi Guys,

I've spent some time this afternoon improving the timings constraints, which should tighten up the timings around the SRAM Interface. They are still not perfect - it's complaining about one path, but on inspection it looks like a tool is getting confused.

Anyway, here is a set of test builds at the different possible output drive levels from 4mA to 24mA:
BeebFPGAAlteraDE1Test2.zip
(586.28 KiB) Downloaded 30 times
This is with the latest code, with the ICE disabled to make room for the SID and the Music 5000.

If you could do the following tests in BBC B mode, that would be great:
- Does it boot without obvious issues?
- Will it run Planetoids?
- Will it run Snapper V1?

All seem to be 100% stable on my system.

Dave

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

Re: Beeb FPGA

Post by hoglet » Wed Nov 18, 2015 5:53 pm

Hi Ford,
fordp wrote:It is down to how the path is quoted.
I've added AtomBusMon as a git subtree, so it should be included automatically now when you do a fetch. It lives at the top level of the BeebFpga repo, i.e. BeebFpga/AtomBusMon. All the paths in the Altera and Xilinx project files have been fixed to point to that location.

I've also just done a fresh clone of the project and confirmed it builds for me (and works!).

The default settings at the moment are to exclude the ICE, to make space for the SID and Music5000.

Dave

PhilYoung
Posts: 203
Joined: Sun Jun 12, 2011 4:55 pm
Contact:

Re: Beeb FPGA

Post by PhilYoung » Wed Nov 18, 2015 7:59 pm

hoglet wrote:Hi Guys,

I've spent some time this afternoon improving the timings constraints, which should tighten up the timings around the SRAM Interface. They are still not perfect - it's complaining about one path, but on inspection it looks like a tool is getting confused.

Anyway, here is a set of test builds at the different possible output drive levels from 4mA to 24mA:
BeebFPGAAlteraDE1Test2.zip
This is with the latest code, with the ICE disabled to make room for the SID and the Music 5000.

If you could do the following tests in BBC B mode, that would be great:
- Does it boot without obvious issues?
- Will it run Planetoids?
- Will it run Snapper V1?

All seem to be 100% stable on my system.

Dave
Hi Dave,

I've just tried this out on my DE1 which is the new/bad SRAM version.

All the files up to and including *20mA work fine - they boot OK and run both Planetoid and SnapperV1

*24mA boots but with slight screen corruption as before but to a lesser extent. Planetoid loads and runs up to the start screen then crashes. Didn't try snapper here.

So I've re-loaded the 20mA version and I'm leaving it running for a while to see if it survives for a couple of hours.

So that seems to be 95% there (or technically 87%). Sound still not connected yet.

Thanks,

Phil Young

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

Re: Beeb FPGA

Post by hoglet » Wed Nov 18, 2015 10:45 pm

PhilYoung wrote: I've just tried this out on my DE1 which is the new/bad SRAM version.

All the files up to and including *20mA work fine - they boot OK and run both Planetoid and SnapperV1
Thanks for trying these.

This gives us an upper bound for the EDBLL boards.

Hopefully TC and Ford can provide a lower bound for the non EDBLL board.

I'll then choose a value somewhere in between.

Dave

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

Re: Beeb FPGA

Post by TheCorfiot » Wed Nov 18, 2015 10:54 pm

Hi Dave

Here are my results :)

4mA was difficult to boot and various screen corruption.
8mA needed booting twice but all games,+rocket raid worked fine.
12mA,16mA,20mA,24mA All fine, clean boot too.

Would you please be kind enough to upload a pof file of either the 16 or 20mA version with Sid and Music 5000 so I can test other functions until the next official release.

** Regarding the Master Mode MMC issue, I have a possible clue for you...
In Master mode when encountering the MMC read failure error, pressing break & trying to re-read just hangs, now flip over to Model B mode & reset, Model B mode also hangs at Smart SPI text until you remove & re-insert the SD card then Model B mode works fine...
Hope this helps :)

Thanks again for all your hard work, I cant wait till this is finished with a copro too wow :D

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

Re: Beeb FPGA

Post by fordp » Wed Nov 18, 2015 11:06 pm

I am still struggling to get my DE1 talking to my Windows 10 PC :(
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

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

Re: Beeb FPGA

Post by TheCorfiot » Wed Nov 18, 2015 11:14 pm

fordp wrote:I am still struggling to get my DE1 talking to my Windows 10 PC :(
Have you tried downloading the standalone programmer application.
Install first then plug in the DE1 so the drivers are installed, then select the USB port that highlights the USB Blaster tag.

:)

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

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 8:23 am

TheCorfiot wrote: Here are my results :)

4mA was difficult to boot and various screen corruption.
8mA needed booting twice but all games,+rocket raid worked fine.
12mA,16mA,20mA,24mA All fine, clean boot too.
Thanks for doing the testing.

=D> =D> =D> =D> =D>

I'm pleased there is a happy middle ground.
TheCorfiot wrote: Would you please be kind enough to upload a pof file of either the 16 or 20mA version with Sid and Music 5000 so I can test other functions until the next official release.
The test build .sof files include both Sid and Music 5000.

I'll probably go for the 12mA drive, assuming that also proves stable for others. I'll update git later today.
TheCorfiot wrote: ** Regarding the Master Mode MMC issue, I have a possible clue for you...
In Master mode when encountering the MMC read failure error, pressing break & trying to re-read just hangs, now flip over to Model B mode & reset, Model B mode also hangs at Smart SPI text until you remove & re-insert the SD card then Model B mode works fine...
Hope this helps :)
Let me dig out a 256MB card and do some testing myself.

Exactly what manufacturer/model of card is it?

Did you format it from Windows?
TheCorfiot wrote: Thanks again for all your hard work, I cant wait till this is finished with a copro too wow :D
I think that will be a while in coming....

Dave

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

Re: Beeb FPGA

Post by TheCorfiot » Thu Nov 19, 2015 8:32 am

Hi Dave

I think the 12mA version is a good middle ground.

I appreciate the "fully loaded" sof file but the pof file allows me to permanently program the DE1 so the software is there on power up, if you have the file to hand it would be great....12mA as you have settled on that version :)

Various makes of card from Sansdisk to unbranded and SONY, they all work great in Model B mode.
Have formatted from Windows and standalone SD formatter program, using FAT 16 and various cluster sizes.

Thanks very much again...

Bas :)
Last edited by TheCorfiot on Thu Nov 19, 2015 8:33 am, edited 1 time in total.

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

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 8:39 am

fordp wrote:I am still struggling to get my DE1 talking to my Windows 10 PC :(
Did you see this thread?
http://www.alteraforum.com/forum/showthread.php?t=50080

BTW, the only thing you *need* windows for is flashing the BBC ROM image (the Altera Control Panel app is windows). I'm doing all the development and programming on Linux, and it's working flawlessly.

Dave

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

Re: Beeb FPGA

Post by fordp » Thu Nov 19, 2015 8:59 am

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.

I do hate the Plug and Pray that is Windows USB.

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

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

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 9:03 am

TheCorfiot wrote: I think the 12mA version is a good middle ground.

I appreciate the "fully loaded" sof file but the pof file allows me to permanently program the DE1 so the software is there on power up, if you have the file to hand it would be great....12mA as you have settled on that version :)
All the release files in git are now updated with the 12mA drive setting:
https://github.com/hoglet67/BeebFpga/tr ... ra/release
TheCorfiot wrote: Various makes of card from Sansdisk to unbranded and SONY, they all work great in Model B mode.
Have formatted from Windows and standalone SD formatter program, using FAT 16 and various cluster sizes.
Just to confirm, the problems you are having are in Master mode, not BBC B mode, correct?

Are you getting the following error:
Card format?

Is this happen on boot, or when you first try to access the card (e.g. with *DIN or *CAT)?

I'm getting this error with smaller cards, so I'll look into this today.

Dave

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

Re: Beeb FPGA

Post by TheCorfiot » Thu Nov 19, 2015 9:11 am

Hi Dave

Cheers for the updates :)

Model B SD functions perfectly with all cards, Problem only in Master mode.

Card format error only occoursif card is incorrectly formatted, eg fat32.

with card formatted to fat 16, the card is recognised and you can select discs and *cat them, it even loads the STH menu.
when you try to load a game though it starts loading it then either hangs or reports MMC read error, at this point any attempt to access the SD just hangs the system, even after break or DE1 reset or switching to Model B mode. You need to physically remove and reinsert the SD card to allow any access in either mode.

:)

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

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 9:40 am

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

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

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 9:44 am

TheCorfiot wrote: Model B SD functions perfectly with all cards, Problem only in Master mode.

Card format error only occoursif card is incorrectly formatted, eg fat32.

with card formatted to fat 16, the card is recognised and you can select discs and *cat them, it even loads the STH menu.
when you try to load a game though it starts loading it then either hangs or reports MMC read error, at this point any attempt to access the SD just hangs the system, even after break or DE1 reset or switching to Model B mode. You need to physically remove and reinsert the SD card to allow any access in either mode.
Hmm, this is different to what I'm seeing.

What capacity cards have you tried? Do they all behave the same?

Phil, is master mode working for you?

Dave

PhilYoung
Posts: 203
Joined: Sun Jun 12, 2011 4:55 pm
Contact:

Re: Beeb FPGA

Post by PhilYoung » Thu Nov 19, 2015 10:36 am

hoglet wrote:
TheCorfiot wrote: Model B SD functions perfectly with all cards, Problem only in Master mode.

Card format error only occoursif card is incorrectly formatted, eg fat32.

with card formatted to fat 16, the card is recognised and you can select discs and *cat them, it even loads the STH menu.
when you try to load a game though it starts loading it then either hangs or reports MMC read error, at this point any attempt to access the SD just hangs the system, even after break or DE1 reset or switching to Model B mode. You need to physically remove and reinsert the SD card to allow any access in either mode.
Hmm, this is different to what I'm seeing.

What capacity cards have you tried? Do they all behave the same?

Phil, is master mode working for you?

Dave
Hi,

Firstly, just to confirm, the 12mA version you've posted works fine (bbc_micro_de1.pof) as far as I can see.

As to the SD card, I'm getting on slightly better than reported above. The card (128MB microSD card in an adaptor, formatted as FAT16, no manufacturer markings, hdparm -I produces gibberish for Model Number) is recognised and runs the STH menu, but trying to run eg Snapper gives me:

>PA.=&1900
>CH."SNAPPER"

MMC Read fault 20/00003E

Bad program
>

Same type of error for Planetoid.

But after that the system works as normal otherwise - so I can still *CAT disks, *DCAT and *DIN still work as normal and CTRL-BREAK followed by SHIFT-BREAK gets me back to the menu without needing to power off

Does SnapperV1 even work on a Master in any case, I thought games are often BBC B only ? Is it working on your setup under Master Mode.

Cheers,

Phil Young

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

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 10:41 am

I'm also able to reproduce the SD Read Error.

I'm only seeing it with older SD Cards (e.g. 256MB in capacity)

Modern SDHC (8GB, 16GB) cards are working, as long they have a FAT image on them.

I'll see if I can reproduce this on real hardware (to exclude any FPGA subtleties).

Dave

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

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 10:57 am

I'm getting some quite weird results.....

Slightly of topic, but it seems many of these games rely on the User 6522's T1 counter power up with a random value in the latch. The FPGA is powering up with 0 in the latch, which means the IC69 detect code in many Acornsoft games is failing 50% of the time (because the counter value is just alternating between 0000 and FFFF).

Can you both do a quick test for me please...

- Power down the board
- Power up the board in M128 mode
- *DIN 40
- CHAIN "PLANETO"

If you get IC69 not detected, just type RUN again. You might have to do this a few times.

Once past the IC69 test, this works 100% of the time for me with the Bad Card.

Now, trying to launch the same program through the MMC Menu program fails 100% of the time.

It looks to me like we need to understand if the MMC Menu is fiddling with the user via in any way.

Dave

PhilYoung
Posts: 203
Joined: Sun Jun 12, 2011 4:55 pm
Contact:

Re: Beeb FPGA

Post by PhilYoung » Thu Nov 19, 2015 11:45 am

hoglet wrote:I'm getting some quite weird results.....

Slightly of topic, but it seems many of these games rely on the User 6522's T1 counter power up with a random value in the latch. The FPGA is powering up with 0 in the latch, which means the IC69 detect code in many Acornsoft games is failing 50% of the time (because the counter value is just alternating between 0000 and FFFF).

Can you both do a quick test for me please...

- Power down the board
- Power up the board in M128 mode
- *DIN 40
- CHAIN "PLANETO"

If you get IC69 not detected, just type RUN again. You might have to do this a few times.

Once past the IC69 test, this works 100% of the time for me with the Bad Card.

Now, trying to launch the same program through the MMC Menu program fails 100% of the time.

It looks to me like we need to understand if the MMC Menu is fiddling with the user via in any way.

Dave
Hi,

That (*DIN 40 and manually chaining) seems to work for me 100% of the time - tried about 10 times. I never saw 'IC69 not detected'. I did get the game to freeze once though, probably unrelated. I'm rubbish at games so these are only short tests of course.

So you must be on the right track.

Secondly, it does seem to be possible to program the DE1 Flash chip under linux, see http://www.zytor.com/pub/fpga/de1flash/ and follow the README.

I've not tried flashing it in case I break something but I can read the contents of the flash chip back without problems and it matches the ROM file. I also discovered that if you program a *pof into the serial flash, you need to power cycle the board before the programmer will allow you to program anything else - otherwise it somehow detects the wrong device ID on the JTAG and aborts.

Cheers,

Phil Young

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

Re: Beeb FPGA

Post by hoglet » Thu Nov 19, 2015 11:56 am

Right, I've managed replicate the problem on my Master Compact using MMFS, so that rules out it being some subtlety of the FPGA.

Also, if I just boot to the MMC Card Menu, then hit escape and try *CAT, I get an MMC Card Error straight away (but only with the older 256MB card). If I do a second *CAT it's fine, so it's a very transient issue in my case.

I've got the source code for the menu, so I can look for anything suspicious.

Dave

Post Reply