Proposed: "The Ultimate Electron Upgrade"

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
1024MAK
Posts: 6720
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...

Re: Proposed: "The Ultimate Electron Upgrade"

Postby 1024MAK » Mon Oct 03, 2016 12:08 pm

What, no proposal to add some nice new blue and violet LEDs to the poor under illuminated Elk? :lol:

I presume you are doing a quick check in case there are any other Beeb I/O addresses being used by the code?

Keep up the good work :D

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

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

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hoglet » Mon Oct 03, 2016 12:29 pm

1024MAK wrote:I presume you are doing a quick check in case there are any other Beeb I/O addresses being used by the code?

Indeed. It just seems to be that one that slipped under the net.

So, the good news is that I now have Joe Blade running.

I expect we'll need a few more iterations before this is done!

Based on Thomas's recommendation, I'll try Southern Belle next.

Dave

User avatar
danielj
Posts: 5216
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: Proposed: "The Ultimate Electron Upgrade"

Postby danielj » Mon Oct 03, 2016 12:45 pm

I've just had a response back from Steve Furber - unfortunately he doesn't have any of the plots of the elk ULA, it was the first layout they did using software on the bbc micro, largely by John Cox. He did say, however, that he'd be very happy to attempt to recall details to fill in the gaps -> so if you have anything specific around this I'm happy to put it to him by return?

Best,
Daniel

ThomasHarte
Posts: 340
Joined: Sat Dec 23, 2000 5:56 pm

Re: Proposed: "The Ultimate Electron Upgrade"

Postby ThomasHarte » Mon Oct 03, 2016 1:47 pm

hoglet wrote:Thanks Thomas,

I think where I'm coming unstuck that that the power on value of the TDE flag in my FPGA system is 0 , where as I think it should be 1.

Where I'm getting confused is understanding under what conditions this flag is set.

I'm wondering it's better to think of it as a "not sending" flag?

i.e. It's set at all times, apart from when a character is actually being transmitted.

That's almost certainly what should be happening; I'd never properly considered the initial condition. So my emulated one goes high nine shifted bits after the data register was last written to, regardless of the source of the shift register's clock, which I think is correct behaviour any time after a register write but fluffs the initial condition. It'll go high upon the very first read shift but won't initially be high. I think your version makes most sense.

It'd also explain why the pre-UEF Stairway to Hell archive has an SSD conversion of Joe Blade, but that does not seem to work in my emulator. I've been looking for something in the 1770 or in my particular ROM/slot combination that might have broken that particular conversion (as it's almost certainly by somebody at home, for their hardware) but this sounds like a more compelling answer to that.

User avatar
davidb
Posts: 1867
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Proposed: "The Ultimate Electron Upgrade"

Postby davidb » Mon Oct 03, 2016 1:57 pm

danielj wrote:I've just had a response back from Steve Furber - unfortunately he doesn't have any of the plots of the elk ULA, it was the first layout they did using software on the bbc micro, largely by John Cox. He did say, however, that he'd be very happy to attempt to recall details to fill in the gaps -> so if you have anything specific around this I'm happy to put it to him by return?

If he has contact details for Harry Barman, we might be able to make progress on the schematics, assuming that Harry still has them.

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

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hoglet » Mon Oct 03, 2016 1:59 pm

davidb wrote:If he has contact details for Harry Barman, we might be able to make progress on the schematics, assuming that Harry still has them.

BigEd contacted Harry quite recently about Electron ULA materials. I don't think he's had a definite response back yet.

Dave

User avatar
BigEd
Posts: 1435
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Proposed: "The Ultimate Electron Upgrade"

Postby BigEd » Mon Oct 03, 2016 2:15 pm

It's true! But we should wait a few more weeks.

Danielj: thanks for following up. It's a pity Steve has no materials for us. We know of two very large die photos of the Electron ULA, and we could possibly take more, if that would help. If we could capture the metallisation pattern from photos, we know how to reconstruct the logic.

User avatar
davidb
Posts: 1867
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Proposed: "The Ultimate Electron Upgrade"

Postby davidb » Mon Oct 03, 2016 2:26 pm

OK. I didn't realise BigEd was ahead of me there. At least I can cross that off my to-do list, then! :D

User avatar
danielj
Posts: 5216
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: Proposed: "The Ultimate Electron Upgrade"

Postby danielj » Mon Oct 03, 2016 2:28 pm

No problem, I'd been meaning to do it for ages, but just overthinking my wording each time I looked at the draft! I did specifically ask about the metal layer mentioning what had been done with the Tube ULA, but he said that was the only one of those big plots he had.

The really nice thing is he did go and have a look in his archive and is very happy to help where possible to fill in gaps. He also mentioned he has a fairly pristine electron still sitting in a cupboard.

d.

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

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hoglet » Mon Oct 03, 2016 3:17 pm

danielj wrote:No problem, I'd been meaning to do it for ages, but just overthinking my wording each time I looked at the draft! I did specifically ask about the metal layer mentioning what had been done with the Tube ULA, but he said that was the only one of those big plots he had.

The really nice thing is he did go and have a look in his archive and is very happy to help where possible to fill in gaps. He also mentioned he has a fairly pristine electron still sitting in a cupboard.

Thanks for trying, and thanks to Steve for taking the time to look.

Fingers crossed Harry manages to find something.

I wrote a small test program for the ULA cassette interrupts:

Code: Select all

   10  @%=4
   20  FOR I=0 TO 1
   30  FOR A=0 TO 6 STEP 2
   40  B=?&FE00
   50  ?&FE07=&B0+A
   60  C=?&FE00
   70  ?&FE04=65
   80  D=?&FE00
   90  FORJ=0 TO 1000:NEXT
  100  E=?&FE00
  110  PRINT~A,~B,~C,~D,~E
  120  NEXT
  130  NEXT

I'm seeing some slight differences between an Issue 4 and Issue 6 Electron....

On an Issue 4 after a soft break I get:

Code: Select all

>OLD
>RUN
   0  80  80  80  80
   2  80  80  80  B0
   4  B0  B0  80  B0
   6  B0  B0  80  80
   0  80  80  80  80
   2  80  80  80  B0
   4  B0  B0  80  B0
   6  B0  B0  80  80


On an Issue 6 after a soft break I get:

Code: Select all

>OLD
>RUN
   0  B0  B0  80  B0
   2  B0  B0  80  B0
   4  B0  B0  80  B0
   6  B0  B0  80  80
   0  80  80  80  B0
   2  B0  B0  80  B0
   4  B0  B0  80  B0
   6  B0  B0  80  80

Sometimes a 90 will appear in the third column, which I suspect is down to noise on the tape input.

What's interesting here is that PRINT ?&FE00 after a soft break seems to give different values for the Issue 4 (&80) and Issue 6 (&B0), which suggests subtle differences between the Ferranti and later Synertek ULA. Very interesting....

Dave

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

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hoglet » Mon Oct 03, 2016 3:31 pm

Here's the result from Elkulator 1.0:
elkulator.png


And from ElectrEm 0.6c:
electrem_0.6c.png


Here's my understanding of the bits in FE00:
- bit 7 - always read as 1
- bit 6 - high tone detect
- bit 5 - transmit data empty
- bit 4 - receive data full
- bit 3 - real time clock (line 100)
- bit 2 - display end (line 256)
- bit 1 - power on reset
- bit 0 - master interrupt (always matches ULA irq output)

Here's my test program if anyone wants to give it a whirl:
ulatest.zip
(589 Bytes) Downloaded 10 times


Dave

ThomasHarte
Posts: 340
Joined: Sat Dec 23, 2000 5:56 pm

Re: Proposed: "The Ultimate Electron Upgrade"

Postby ThomasHarte » Mon Oct 03, 2016 5:50 pm

Oh, then my latest emulator definitely forgets to set the high bit. Results aren't very good even if you allow for that:

Screen Shot 2016-10-03 at 13.43.15.png


I appear to be off 11 times out of 24. So, doing almost exactly as well as random selection. Good work, me!

I don't know how much value there is, if any, in trying to guess at this from the emulator side of the equation but I'll certainly try to find time when I'm next not at work.

ThomasHarte
Posts: 340
Joined: Sat Dec 23, 2000 5:56 pm

Re: Proposed: "The Ultimate Electron Upgrade"

Postby ThomasHarte » Mon Oct 03, 2016 11:56 pm

Well, I cracked that test! See image below. I'm even getting random 90s, so I think that issue is just the vicissitudes of timing, not noise on the bus.

My implementation is now:

Mode 0: tape hardware is clocked according to audio input.
Modes 2 and 4: tape hardware is clocked according to the fixed-speed output divider.
Mode 6: tape hardware isn't clocked.

... with all interrupt sources permanently attached.

Screen Shot 2016-10-03 at 19.52.39.png

User avatar
Elk Towers
Posts: 488
Joined: Sun Apr 23, 2006 2:10 am
Location: Kettering, Northants
Contact:

Re: Proposed: "The Ultimate Electron Upgrade"

Postby Elk Towers » Tue Oct 04, 2016 7:04 am

@ Dave(Hoglet)

If you look in the elk advanced user guide, page 150 iirc it tells you exactly what each bit of &FE00 does.

Hope this helps.

Nick
Attachments
Eaug_rtf.zip
(1.17 MiB) Downloaded 10 times
Nick

User avatar
daveejhitchins
Posts: 3661
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham

Re: Proposed: "The Ultimate Electron Upgrade"

Postby daveejhitchins » Tue Oct 04, 2016 7:33 am

daveejhitchins wrote:
hoglet wrote:[Do you know what speed the ROM is in the Electron?
No, sorry . . . What speed would you need? I may have some faster-than-normal 512's that would do. Packed away, at the moment. I may know where they are, though.

Dave H :D
Found them - they're 150ns parts. If they're any good, let me know.

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

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

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hoglet » Tue Oct 04, 2016 7:56 am

Hi Nick,
Elk Towers wrote:If you look in the elk advanced user guide, page 150 iirc it tells you exactly what each bit of &FE00 does.

Thanks for this. It's one of the reference I have been using.

Unfortunately it is known to be inaccurate in several places:
- The RxFull and TxEmpty interrupts are mixed up
- The direction of the data shift register is incorrect
- The diagram of FE07 is completely wrong

I think we do actually have a good understanding of how the bits in ULA registers are laid out.

It's some of the corner cases at the level below this that are proving implement accuratly, because these behaviours are not well documented anywhere.

Dave

User avatar
daveejhitchins
Posts: 3661
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham

Re: Proposed: "The Ultimate Electron Upgrade"

Postby daveejhitchins » Tue Oct 04, 2016 8:00 am

hoglet wrote:Unfortunately it is known to be inaccurate in several places:
- The RxFull and TxEmpty interrupts are mixed up
- The direction of the data shift register is incorrect
- The diagram of FE07 is completely wrong
Maybe we should be keeping a record of these errors and produce an updated AUG ?

Anyone have the time to handle this - in a new thread?

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

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

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hoglet » Tue Oct 04, 2016 8:49 am

daveejhitchins wrote:
hoglet wrote:Unfortunately it is known to be inaccurate in several places:
- The RxFull and TxEmpty interrupts are mixed up
- The direction of the data shift register is incorrect
- The diagram of FE07 is completely wrong
Maybe we should be keeping a record of these errors and produce an updated AUG ?

Anyone have the time to handle this - in a new thread?

I've started a new thread for this here:
viewtopic.php?f=3&t=11925&p=150749#p150747

ThomasHarte
Posts: 340
Joined: Sat Dec 23, 2000 5:56 pm

Re: Proposed: "The Ultimate Electron Upgrade"

Postby ThomasHarte » Tue Oct 04, 2016 10:39 am

With an extra night's sleep, it strikes me that the tape hardware could easily be in input mode if you set the 'unused' timer mode; there's no evidence either way. We'd need to play a cassette at it.

(EDIT: and, setting a proper initial condition for transmit data empty causes the Stairway to Hell Joe Blade 1/2 SSDs to work, seemingly without affecting anything else)

User avatar
davidb
Posts: 1867
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Proposed: "The Ultimate Electron Upgrade"

Postby davidb » Thu Oct 13, 2016 5:38 pm

hoglet wrote:New, improved, now with added MODE 7

Those screenshots look amazing with the output of the dedicated SAA5050 chip! :D

Perhaps in light of that, the following suggestion might be a bit redundant: is it possible for the new ULA to generate real teletext data for consumption by a television set by converting data stored above a fixed address in memory? That way, we could have a "secret" MODE 7 that the user would access by switching on teletext on their TV. We could even mix teletext and graphics from other modes if the user used the overlay feature of most (all?) teletext TVs.

People have already made teletext generators for AVR microcontrollers and for the Raspberry Pi (see here for a pure software version), so I wonder if it wouldn't be possible with an FPGA.

It also makes me wonder what the original ULA's output looks like outside the visible part of the signal. Would it be possible to modify the video circuitry or add an external circuit to insert teletext data? :-k

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

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hoglet » Thu Oct 13, 2016 6:19 pm

davidb wrote:People have already made teletext generators for AVR microcontrollers and for the Raspberry Pi (see here for a pure software version), so I wonder if it wouldn't be possible with an FPGA.

If there is space, I don't see why this would not be possible.

Dave

User avatar
hicks
Posts: 39
Joined: Fri Sep 29, 2017 10:39 am
Location: UK
Contact:

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hicks » Thu Oct 26, 2017 11:57 pm

hoglet wrote:I'm seeing some slight differences between an Issue 4 and Issue 6 Electron....

On an Issue 4 after a soft break I get:

Code: Select all

>OLD
>RUN
   0  80  80  80  80
   2  80  80  80  B0
   4  B0  B0  80  B0
   6  B0  B0  80  80
   0  80  80  80  80
   2  80  80  80  B0
   4  B0  B0  80  B0
   6  B0  B0  80  80


On an Issue 6 after a soft break I get:

Code: Select all

>OLD
>RUN
   0  B0  B0  80  B0
   2  B0  B0  80  B0
   4  B0  B0  80  B0
   6  B0  B0  80  80
   0  80  80  80  B0
   2  B0  B0  80  B0
   4  B0  B0  80  B0
   6  B0  B0  80  80

Sometimes a 90 will appear in the third column, which I suspect is down to noise on the tape input.

What's interesting here is that PRINT ?&FE00 after a soft break seems to give different values for the Issue 4 (&80) and Issue 6 (&B0), which suggests subtle differences between the Ferranti and later Synertek ULA. Very interesting....

Dave


Just ran this on my core after re-implementing the read/write logic based on the recent ULA schematics. Whilst I'm not confident the implementation is a full match, I get the following result which I've duplicated twice and placed asterisks next to the values that differ from the Ferranti and Synertek runs above

Code: Select all

Compared to Ferranti:
   0  B0* B0* 80  80
   2  80  80  80  B0
   4  B0  B0  80  B0
   6  B0  B0  80  80
   0  80  80  80  80
   2  80  80  80  B0
   4  B0  B0  80  B0
   6  B0  B0  80  80

Compared to Synertek:
   0  B0  B0  80  80*
   2  80* 80* 80  B0
   4  B0  B0  80  B0
   6  B0  B0  80  80
   0  80  80  80  80*
   2  80* 80* 80  B0
   4  B0  B0  80  B0
   6  B0  B0  80  80


My results appear to more closely match the Ferranti. With the only difference being the first too values after coming out of reset.

Is it possible this is down to a difference in the OS ROM rather than an implementation issue? *HELP shows "OS 1.00".

Edit: I incorrectly thought the schematics were for the Synertek, misread the post that menioned Harry originally worked on that but had the Ferranti schematics, so that explains why my results more closely match the Ferranti, it's what I based it on :) So just those first two values appear to be an "issue".

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

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hoglet » Fri Oct 27, 2017 7:38 am

hicks wrote:My results appear to more closely match the Ferranti. With the only difference being the first too values after coming out of reset.

Are the results consistent if you run the program a second time (without pressing break)?
hicks wrote:Is it possible this is down to a difference in the OS ROM rather than an implementation issue? *HELP shows "OS 1.00".

I think there is only one version of the OS ROM for the Electron: OS 1.00

User avatar
daveejhitchins
Posts: 3661
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham

Re: Proposed: "The Ultimate Electron Upgrade"

Postby daveejhitchins » Fri Oct 27, 2017 8:59 am

hoglet wrote:I think there is only one version of the OS ROM for the Electron: OS 1.00
Just the ones that have been 'slightly' modifies of purpose e.g. the Slogger MRB version . . . I don't, however, think these would affect what's been seen!

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
hicks
Posts: 39
Joined: Fri Sep 29, 2017 10:39 am
Location: UK
Contact:

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hicks » Fri Oct 27, 2017 10:43 am

hoglet wrote:Are the results consistent if you run the program a second time (without pressing break)?


If I run a second time (or more) without pressing break the first two values change to 80, the rest are consistent.

If there's not differing OS roms, then I guess there's something in my implementation regarding soft reset. I'll take another look at it later today.

User avatar
hicks
Posts: 39
Joined: Fri Sep 29, 2017 10:39 am
Location: UK
Contact:

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hicks » Fri Oct 27, 2017 8:23 pm

What I see on the scope is after coming out of soft reset, TX Empty goes high->low, then a short time later there's a write to the register "FE04" and ~160ms after that TX Empty goes low->high.

It makes sense that 2nd,3rd and subsequent runs of the program to have "80 80" at the start, as the comm mode is still "11" so no clocking of the counter occurs. But when coming out of reset and looking at the schematics, I'm not sure there's anything to stop clocking occurring so TX Empty will eventually go high?

Yet there must be something as clearly you see "80 80" after a reset with the an actual Ferranti.

Edit: Noticed the counter cycles several times post reset and it's in sound mode. That then made me realise that pressing break on my core brings up "Acorn Electron" then the acorn icon. That's only supposed to only occur on a power on or hard break? I'll have to dig into this more, but it seems promising.

Edit: I need to look into this more to determine why, but moving the BREAK key from PAUSE/BREAK to a regular key like NUM LOCK. Has made soft reset work as well as CTRL+NUM LOCK now doing a hard reset. Doing a soft reset and running the interrupt program my results now match your Ferranti results perfectly :)

User avatar
hicks
Posts: 39
Joined: Fri Sep 29, 2017 10:39 am
Location: UK
Contact:

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hicks » Sun Oct 29, 2017 4:59 pm

Quick question... If you run the above test program on a real Electron but _do not_ soft reset after loading the program and instead just run it. Do you get A0's rather than B0's in your output?

Reason I ask is when a load finishes it seems CDATA will hold a "1" bit in it (due to stop bit + following high tone). That then holds the frame counter in reset which should prevent anything the shared counter does from causing an RX Full interrupt. Once loading stops, CDATA will thus hold a "1" and only a "0" (start bit) can unlock the frame counter that's a pre-requisite for RX Full to ever fire. On soft-reset I assume CDATA ends up dropping to 0 although not sure why?

User avatar
CMcDougall
Posts: 5577
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland

Re: Proposed: "The Ultimate Electron Upgrade"

Postby CMcDougall » Mon Oct 30, 2017 1:28 pm

DaveB wrote:I think there is only one version of the OS ROM for the Electron: OS 1.00

correct, unless the Iss6 German ones are different :?
hicks wrote:above test program on a real Electron but _do not_ soft reset after loading the program and instead just run it

just done it on one of my bare Issue 2 elk after power on, after typing it in I get :
power on Iss2 bare.jpg

after soft reset :
soft reset Iss2 bare.jpg

PS it has a S on the SY6502A yr1983wk33
PPS can also try my Iss4s (can'y mind what 6502) & Iss6 (has a R6502AP / R6502-13 / yr84wk33) if need be....
ImageImageImage

User avatar
hicks
Posts: 39
Joined: Fri Sep 29, 2017 10:39 am
Location: UK
Contact:

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hicks » Mon Oct 30, 2017 2:02 pm

CMcDougall wrote:PPS can also try my Iss4s (can'y mind what 6502) & Iss6 (has a R6502AP / R6502-13 / yr84wk33) if need be....


If you can try the issue 4 that would be appreciated. Could you try it by doing a hard-reset, then chain loading the test program and seeing if your results include A0's or B0's. Then do the soft-reset, old, run too. The latter should give B0's, but I'm very curious if the run straight after loading includes B0's too.

If it does, I'm possibly overlooking something in my understanding of the schematics and need to take another look :)

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

Re: Proposed: "The Ultimate Electron Upgrade"

Postby hoglet » Mon Oct 30, 2017 2:04 pm

Also Col, do be careful not to make any typing errors, as the ^G Beep might invalidate the results.


Return to “hardware”

Who is online

Users browsing this forum: Bing [Bot] and 10 guests