UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Vintage Computers

Notices

Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment.

Closed Thread
 
Thread Tools
Old 23rd Jun 2020, 8:52 pm   #61
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
Default Re: SC/MP timing and microcode information

The source of the NIBL source Slothie mentions and probably the most comprehensive look at NIBL on SC/MP and has another machine you can build...

https://www.dos4ever.com/SCMP/SCMP.html
Timbucus is offline  
Old 24th Jun 2020, 1:18 am   #62
Mark1960
Octode
 
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,294
Default Re: SC/MP timing and microcode information

Quote:
Originally Posted by Karen O View Post
What is less understood is F1, which is a hardware flow control signal. NIBL raises this flag to turn on a 'reader relay' which starts the transmission of a character from the terminal's paper tape reader. As soon as a character begins to come in, NIBL lowers F1 to prevent further transmission
That’s very useful info, thanks. It doesn’t seem to be shown in the introkit schematic. I guess I need to read the source code listing for details.

Do you know if it needs to be inverted to generate /RTS?

And is there an equivalent for /CTS using sense A?
Mark1960 is offline  
Old 24th Jun 2020, 5:54 am   #63
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: SC/MP timing and microcode information

F1 is of a polarity consistent with RTS, but perhaps I shouldn't have got your hopes up!

The NIBL flow control requires that the teletype send ONE character from its reader in response to F1. Precious few PC serial ports can respond that quickly (probably because hardware flow control is implemented in software). If you tried to lash F1 to RTS then it will almost certainly lose characters because the PC serial port will continue to send for some time after RTS has been deasserted.

There is no NIBL flow control in the other direction. Over-running the teletype is avoided by use of a Baud rate equivalent to printing speed.
Karen O is offline  
Old 24th Jun 2020, 10:58 am   #64
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: SC/MP timing and microcode information

Thanks for the further info, I have had similar problems with a filing system called hostfs for the bbc micro - that is running a bit faster at 38400 baud but the same applies - it tried to throttle with RTS which causes problems with regular usb serial ports. My development setup works by using a board developed by somebody which has a microcontroller doing the serial to USB and that can respond to RTS and with CTS quickly enough and buffer characters nicely so I'll probably use something like that if I interface with a PC. I may just hook it to one of my beebs and then I can write a simple program to do the flow control.

I got a spare hour yesterday evening and flushed out some bugs in my thinking of the internal busses of the SC/MP and implemented a few more instructions. I can now do LD,LDI,ST,ILD,DLD,JMP,JP,JZ and JNZ and run a very simple program in the simulator - doing the rest of the instructions should now be relatively simple.

I've still not tackled any of the bus control/arbitration signals and the microcode timings are all over the place but functionally it seems to do the right things.

I'll probably continue with my microcode coding until I've got most of the instructions working then when my chip arrives start looking at timing. I think what I'm going to try and do is run the SC/MP very slowly and use my logic analyzer to try and work out how signals relate to the clock first and then speed it up and see how for out of true it ends up. As the datasheets seem to not relate things to the clock other than Xout/ADS which has quite a range (100-225ns) I'm guessing that most applications aren't so bothered by the clock to signal skews but it will be informative for me to try and work out how it works internally...hopefully!

I've found a few assembler listings of NIBL and various monitors but not found a decent buildable/alterable source for NIBL so there's a canonical (preferably annotated) source for NIBL and/or a monitor I'd be grateful for a pointer and I'll use that as my starting point.

Also, I've been using the ASxxxx assembler for testing - is that the preferred one or do people tend to use something else (paper and pencil!)?

D
dominicbeesley is offline  
Old 24th Jun 2020, 9:27 pm   #65
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: SC/MP timing and microcode information

Hi Dom,

I've used the 'AS' assembler by Alfred Arnold et al for all of my SC/MP work. As for original NIBL source code, I don't think you can do better than that extracted by Roger Marin. All of this is on Ronald Dekker's 'dos4ever' site (under 'SC/MP revisited').

Good luck!
Karen O is offline  
Old 24th Jun 2020, 9:31 pm   #66
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
Default Re: SC/MP timing and microcode information

The one on the page I linked to above is both a source code and listing - just split it in half - and you are in luck it is designed for the AS assembler. Several here use SBASM but, I have AS as well and have hand assembled some...

https://www.dos4ever.com/SCMP/nibl_listing.zip
Timbucus is offline  
Old 24th Jun 2020, 9:41 pm   #67
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: SC/MP timing and microcode information

Does anyone know of a source that describes the changes to the NIBL to make NIBL-E? I presume its in an issue of Elektor but which one? Aparrently ently there are a lot of them.
Slothie is offline  
Old 24th Jun 2020, 9:43 pm   #68
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
Default Re: SC/MP timing and microcode information

I think I have some links around that but just turned off the computer... if nobody else can link them quickly I will look tommorrow
Timbucus is offline  
Old 24th Jun 2020, 10:10 pm   #69
Mark1960
Octode
 
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,294
Default Re: SC/MP timing and microcode information

Quote:
Originally Posted by Slothie View Post
Does anyone know of a source that describes the changes to the NIBL to make NIBL-E? I presume its in an issue of Elektor but which one? Aparrently ently there are a lot of them.
Try May 1979 Elektor, Tim posted a link yesterday. Though I don’t think they would have printed the source code. I think there was a hex dump included.
Mark1960 is offline  
Old 27th Jun 2020, 3:17 pm   #70
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: SC/MP timing and microcode information

Thanks Timbucus, I'd somehow got hold of the wrong thing. The zip you linked is perfect!

I got the sc/mp chip through and it seems to work. So far I've hooked it up to a slow clock and a logic analyser with the various bus control and reset signals pulled to the correct levels and it is happily executing a load of 0's which has already given me some insights into how the timing works!

I'll try and blow an eeprom with NIBL and hook up a ram chip and see if I can get it to run BASIC after I've done a bit of gardening!

One question - the datasheet mentions in the pinout descriptions that NRDS and NWDS are tri-stated but not NADS is that right? For my simple lash-up I've just pulled all these high with 2k2 resistors does that sound correct.


D
dominicbeesley is offline  
Old 27th Jun 2020, 3:55 pm   #71
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: SC/MP timing and microcode information

If your not multiprocessing then pullups on NRDS, NWDS etc are fine. Something 3k-5k is typical but anything higher will probably work.
Slothie is offline  
Old 27th Jun 2020, 4:08 pm   #72
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,548
Default Re: SC/MP timing and microcode information

Quote:
Originally Posted by dominicbeesley View Post
...it is happily executing a load of 0's which has already given me some insights into how the timing works!
If you tie D3 high with a resistor that will give the uP a continuous supply of NOP (0x08) instructions to run.
SiriusHardware is online now  
Old 27th Jun 2020, 4:53 pm   #73
Mark1960
Octode
 
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,294
Default Re: SC/MP timing and microcode information

Quote:
Originally Posted by dominicbeesley View Post
One question - the datasheet mentions in the pinout descriptions that NRDS and NWDS are tri-stated but not NADS is that right? For my simple lash-up I've just pulled all these high with 2k2 resistors does that sound correct.
I was looking at that yesterday and the datasheet doesn’t say that NADS is tristate so it most likely isn’t. I was thinking to try and share the address latch between two SCMPII, so it probable needs another gate or a separate latch with tristate outputs to address.
Mark1960 is offline  
Old 27th Jun 2020, 10:53 pm   #74
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: SC/MP timing and microcode information

Thanks yes after some further testing it looks like it isn't tristated, at least not with the bus control (NENIN etc) held low.

I got a bit further, i rigged an eprom with NIBL but no RAM and it is doing much as I'd expect. I had a few set backs though 2hrs cleaning up the mess left by a RIFA that had let go in my scope which was wired across the mains unswitched. And now my 40pin ic test clamp has fallen into a disappointing and expensive pile of pins and plastic! Hopefully I'll have more luck tomorrow!
dominicbeesley is offline  
Old 28th Jun 2020, 10:42 am   #75
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
Default Re: SC/MP timing and microcode information

Glad the CPU is working - following progress with interest!

Some things falling out from multiple streams of discussion:

Indeed it is the May issue that has the second article and listing - there was an errata issued later:

"In NIBL-E Table 1 in line 1280 the second bytes should be 0E not 1E.
Means ERROR AT is displayed instead of BRK AT (at end of prog or on BREAK key)"

I have not checked if the dump available from Mr Dekker's site of this EPROM includes that correction - it would be interesting to compare the Hex dumps of the compiled version from source and his to see what areas need to be changed using IF statements - there would then be one definitive source for NIBL that could operate on Page 0 as original or on Page 1 as in NIBL-E!

Obviously to make it work with the SoC VDU it would need some extensive work...

On the subject of simple SC/MP machines not sure if anyone has linked to the one from Radio & Electronics Constructor which begins in August 1980 by Ian Sinclair available from the now renamed world radio history:

https://worldradiohistory.com/UK/Rad...RC-1980-08.pdf

This series was close to the swansong of the magazine before it became Radio and Electronics World...
Timbucus is offline  
Old 28th Jun 2020, 11:56 pm   #76
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: SC/MP timing and microcode information

Well I've got it working (and I seem to be getting BRK AT) but there's something up with my serial set up.

Most things seem to work ok, I can enter simple programs and LIST them but the echoing of characters seems to be a bit off and I'm getting random ?'s every now and again. I've tried twiddling the baud rate and various settings but with the chip at 4MHz 220baud 8N1 seems to more or less work.

I'm using an Arduino to pass through characters to my PC - not sure why it prints some things and not others!

Anyway it looks like the chip is a good 'un!

The lash up consists:

- 8MHz TTL vxo with a pair of 74LS163's so I can try lower clock speeds
- 8 bit latch on D during ADS the lower 3 bits fed to a 74LS138 for chip selects
- a 27128 eeprom in page 0
- 65256 RAM chip in page 1

It was surprisingly easy to get the hardware working. I've spent more time on the serial stuff and getting the ASL assembler to compile on cygwin!

Great fun, I'll start scoping and try and get more insights into timings and then crack on with the Verilog but it might have to wait until next week as I've got other stuff I've promised to look at this week.

Any ideas to try with the serial port welcome, though I don't want to get bogged down in that too much at this stage though, this was really just an exercise in proving I'd understood the chip and that I'd got a working one!

Thanks again for all the help so far!

D
Attached Thumbnails
Click image for larger version

Name:	temp.jpg
Views:	58
Size:	31.9 KB
ID:	209782   Click image for larger version

Name:	20200628_233000.jpg
Views:	63
Size:	117.6 KB
ID:	209783  
dominicbeesley is offline  
Old 29th Jun 2020, 8:53 pm   #77
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
Default Re: SC/MP timing and microcode information

Nice one Dominic - that is an impressive jumper wire setup...

The only thing perhaps on the serial is it seems to be the echo back only I wonder if it is the send rate of characters - in Minicom you can set a delay between characters? The other possibility is the receive loops need to be slightly varied to the send ones due to the way the arduino UART is not exact on any Baud rate but, will be more tolerant on receive as it will average sample during the pulse - I have not checked the NIBL code but, I bet it looks once at roughly the center only so any noise might affect it (and off timing may miss the pulse) - perhaps a small CAP 22nF to GND on the RX line would help?
Timbucus is offline  
Old 29th Jun 2020, 10:36 pm   #78
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: SC/MP timing and microcode information

Thanks... i was surprised it was so easy to get anything.

Going in to NIBL seems ok, ive not lost anything going in but as you note echoed characters seem to get mangled. Im also not sure about the question marks in the error messages.

I tried a resistor and cap filter but it didnt change things but did look right on the scope. I'm now wondering if it is sonething to do with the arduino receiving on one port while sending on the other. Its a sam3x board so as far as i know it should be using proper uarts.

I looked at the nibl code and it looks like it is sendin 8n1 packets and it adds a decentish delay between characters.

If i get a chance this week ill try hooking it up to my bbc micro...i understand the serial chip on that!
dominicbeesley is offline  
Old 30th Jun 2020, 11:31 am   #79
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: SC/MP timing and microcode information

I had another look at the Arduino stuff before starting work this morning and it looks as if the Arduino libraries and the hardware UARTs of the board I'm using don't work properly at such low baud rates which would explain the problems I'm having.

It looks like I've got this afternoon free so I'll try and grab an hour to have another look at this - it would be nice to get it working for others to use.

What is the general preference for microcontrollers, Arduino, PIC, FT245, other? I used the Arduino because it came to hand easily and I've not done any USB stuff with PIC for nearly 20 years - I'm sure it is easier these days. The FT245 is probably the easiest (but requires code changes to NIBL and hardware changes to the board), Arduino second easiest (built in USB serial).

D
dominicbeesley is offline  
Old 30th Jun 2020, 11:42 am   #80
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: SC/MP timing and microcode information

I tend to use Arduino because of its software support, or PIC assembler if timing is crucial. That said its been 7ish years since ive fired up the PIC development envirinment!
Slothie is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 12:16 pm.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.