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 Jul 2021, 3:02 pm   #21
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: Karen's PICL - PCB available

Yes, I had to tinker with the inter-character delay, and I haven't yet got a long program to try it on to see if the delays need increasing as the program size increases. However I have been having fun with it and the CH340G Board Phil uses is pretty neat (Its a sparkfun type, and there are also many clones available, just pay attention to the order of the pins on the header).
I'm trying to see if I can write a mini star trek program for it....
Slothie is offline  
Old 23rd Jul 2021, 5:38 pm   #22
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,085
Default Re: Karen's PICL - PCB available

These are the ones I use, they're widely available, if you look at:-

https://www.ebay.co.uk/sch/i.html?_f...68249&_sacat=0

you'll see its a typical CH360G board.

Re the handshaking, back in the DOS days we used Procomm and Telix, either of which allowed you to write a script that sent a line, waited for the ">" prompt from NIBL, then looped until done. Don't think Teraterm does that?
That's progress...
Phil__G is online now  
Old 23rd Jul 2021, 8:19 pm   #23
Mark1960
Octode
 
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,265
Default Re: Karen's PICL - PCB available

Teraterm does seem to support scripting. I never tried it myself but found this link.

https://ttssh2.osdn.jp/manual/4/en/m...tax/index.html
Mark1960 is offline  
Old 28th Jul 2021, 5:27 pm   #24
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,085
Default Re: Karen's PICL - PCB available

I wrote a simple monitor in NIBL, it has block copy, hex memory dump, modify memory, execute a machine-code program, convert hex-decimal and decimal-hex, memory fill, and a free memory display. I called it BASYS
It looks messy and its very slow, but string handing is minimal in NIBL so theres a lot of jiggery pokery going on. Theres no syntax checking so if you do anything wrong and it errors out, just type run again. Any hex input (addresses, data) is prefixed '#'.
The hex conversion method only works up to 32767 (at which point it goes negative) which I can live with as the PICL has only 8k of memory.
For clarity I left all the rems in and didnt abbreviate any commands, so it can be shortened a lot once you've had a read through.
Cheers
Phil
Attached Files
File Type: txt BASYS_NIBL_MONITOR.TXT (2.8 KB, 46 views)

Last edited by Phil__G; 28th Jul 2021 at 5:47 pm.
Phil__G is online now  
Old 3rd Aug 2021, 2:08 pm   #25
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,085
Default Re: Karen's PICL - PCB available

Karens PICL used an early implementation of her superb SC/MP emulation on the PIC16F877.
One of the differences between the emulation used in the PICL and her later machines is that the SC/MP DLY instruction wasnt implemented.
This was most probably because this was to be a dedicated NIBL machine, and DLY would only have been used for the serial I/O routines, which she'd extracted and given pseudo ops to PIC serial code. DLY would therefore never be used and perhaps, whilst under development, the memory space was more valuable than an unused routine.

This came to light when calling (LINK) machine-code routines from NIBL which would lock-up if they included any form of DLY - though these were taking the PICL outside its intended envelope, within which it works absolutely perfectly.
This, for example, should waggle the flag lines up and down continuously, but in practise, flips them once then locks up:

Code:
; Waggle flag lines continuously
;
LOOP:	06 	CAS	; GET STATUS
	E4 07	XRI 7	; FLIP FLAG BITS
	07 	CSA	; REPLACE STATUS
	C4 FF	LDI FF	; MAX COUNT IN ACC
	8F FF	DLY FF	; MAX DELAY
	90 F6	JMP LOOP
What I've done is to take Karens own DLY code from her later emulation, and patched it into PICL. The updated PICL code therefore remains entirely Karens own work and her name alone appears in the source credit.
With the update, NIBL operation is unaffected but DLY now works as intended, and machine-code programs using DLY now run properly and as far as I can tell, with the correct delays.
I do hope everyone approves of this change, I sincerely hope this doesnt appear disrespectful.

Many thanks
Phil
Attached Files
File Type: zip picl_03082021.zip (23.4 KB, 41 views)
Phil__G is online now  
Old 3rd Aug 2021, 5:07 pm   #26
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: Karen's PICL - PCB available

That is great work Phil and glad it was what you thought. I am sure she would be over the moon that this lives on.

No excuse not to build my board now. I will however leave the original machines as is, with the older firmware and add a post it note to the documentation about this issue.
Timbucus is offline  
Old 3rd Aug 2021, 8:40 pm   #27
ParcGwyn
Hexode
 
ParcGwyn's Avatar
 
Join Date: Jun 2005
Location: Aberystwyth, Wales, UK.
Posts: 358
Default Re: Karen's PICL - PCB available

Great work Phil, I will modify my PICL. It's nice to see Karen's work evolving.

Dave
GW7ONS
ParcGwyn is offline  
Old 3rd Aug 2021, 8:44 pm   #28
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
Default Re: Karen's PICL - PCB available

Nicely done, Phil.

It says something that eight months on, the current top two threads in this section both concern projects made by Karen.
SiriusHardware is offline  
Old 3rd Aug 2021, 9:18 pm   #29
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: Karen's PICL - PCB available

And she spent most of her time hiding in the HomeBrew section... when I close the shop I will retain the domain name to house the history of this stuff!
Timbucus is offline  
Old 3rd Aug 2021, 10:34 pm   #30
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,085
Default Re: Karen's PICL - PCB available

Thanks guys I should add that if the PICL is used only for NIBL basic programming, then the update is of no extra value,
it only comes into use with m/c routines since the PICL version of NIBL doesnt use DLY at all.
Hence it is not in any way a bug and Karens original code is flawless for its intended purpose
BTW I still have a few PCBs left if anyone wants one, at cost, non profit. Email рhіlg@tаlk21.соm (retype that as its not copyable)
Or you can do your own, the gerbers are on philg.uk
Cheers
Phil

Last edited by Phil__G; 3rd Aug 2021 at 10:42 pm.
Phil__G is online now  
Old 4th Aug 2021, 9:13 am   #31
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: Karen's PICL - PCB available

One change I would like to see is a more secure ability to upload/download programs, or some kind of mass storage (SD card, EEPROM) but this would probably be vastly out of scope for the intent of the original system. I'm still finding the upload process a bit random in reliability.
Slothie is offline  
Old 12th Aug 2021, 8:33 pm   #32
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,085
Default Re: Karen's PICL - PCB available

I may be the last NIBLer to realise this but I've discovered something rather neat

I've been using BASYS to play with machine code stuff on the PICL and of course I get the occasional lock-up where the only option is a hard reset.
This clears the current NIBL program and so I have to reload BASYS.
Or do I ?

I've found that both 'NEW' and hardware-reset only change the first couple of bytes of the program, the rest is intact, even through a brief power removal.
The two magic bytes hold the line number of the very first line of NIBL, which in the example shown is 10, hence the two bytes are '00' and '10' decimal, so against the > prompt I enter these two lines (ie in direct mode):

@#1120=0
@#1121=10

If you dont know the first line number, you can enter '00' and '01' to set it to line 1, then do another @#1121=nn later when you know what it should be.
Its a 'word' value so if your first line number is greater than 255 set #1120 to the MSB, for example if the first line is 1000 its 3 and 232 (#3E8)

Apologies if this is well known - it wasnt to me - I've not seen this NIBL trick documented anywhere, it reminds me of the 'OLD' command on NASCOM basic to restore a program after a 'NEW'

Cheers
Phil

PS regarding uploads, I use 3ms character delay &, 300ms line delay, never had a problem loading using those values. Even with the delays, its still faster than the original loading at 110 baud from paper tape
Attached Thumbnails
Click image for larger version

Name:	restore.jpg
Views:	45
Size:	71.2 KB
ID:	239351  
Phil__G is online now  
Old 16th Aug 2021, 2:57 pm   #33
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,085
Default Re: Karen's PICL - PCB available

Further to the 'restore' discovery, I've now swapped the PICL 6264 static ram with an M48Z08 NVRAM which is a direct replacement having the same 8k x 8 format and identical pinout. With the NVRAM, programs are now retained indefinitely through long power-off periods, which is handy. On powering up, NIBL having no 'warm-start' as such, the two direct commands @#1120=0 and @#1121=10 are typed, restoring everything exactly as it was before power down.

I've yet to experiment with the "auto-run a page 2 ROM program" feature of NIBL, that would turn the PICL into a useful stand-alone controller if sense and flags are sufficient.

The M48Z08 was £15 from RS, not too bad considering present day silicon prices:
https://uk.rs-online.com/web/p/nvram/1892428/

Heres the PICL board with its NVRAM:
Attached Thumbnails
Click image for larger version

Name:	picl_nvram.jpg
Views:	42
Size:	96.7 KB
ID:	239500  
Phil__G is online now  
Old 16th Aug 2021, 3:43 pm   #34
Mark1960
Octode
 
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,265
Default Re: Karen's PICL - PCB available

Quote:
Originally Posted by Phil__G View Post
I've yet to experiment with the "auto-run a page 2 ROM program" feature of NIBL, that would turn the PICL into a useful stand-alone controller if sense and flags are sufficient.
If its similar to 8073 NIBL you probably need to add a second write protected ram to act as rom. I think it looks to see if it can write over the rom area, if it can then its not rom so it doesn’t run it.
Mark1960 is offline  
Old 16th Aug 2021, 4:20 pm   #35
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,085
Default Re: Karen's PICL - PCB available

Hi Mark,
On the PICL, A12 splits the 8k SRAM into two pages, PAGE1 and PAGE2, so I think I can simply gate /WR with A12. I've done this before on write-protected monitor 'rom' that is physically in the same SRAM chip as the RAM, though thats a M6800 not a scamp

...or.... I could have the PIC code do the same thing in software...

I suspect its a once only test on startup, if subsequently PAGE2 became read-write, I think everything would still work. This also has the advantage of allowing self-modifying code in PAGE2 'ROM'

Last edited by Phil__G; 16th Aug 2021 at 4:26 pm.
Phil__G is online now  
Old 16th Aug 2021, 4:33 pm   #36
Mark1960
Octode
 
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,265
Default Re: Karen's PICL - PCB available

Is there any space left in the PIC that could be used for a rom page?
Mark1960 is offline  
Old 16th Aug 2021, 5:07 pm   #37
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: Karen's PICL - PCB available

Quote:
Originally Posted by Mark1960 View Post
Is there any space left in the PIC that could be used for a rom page?
I don't think there is, but there's nothing to stop you trying a different PIC with the same pinout but more ROM. I think there are several candidates for that,
I think Phil told me once there were a hundred bytes of ROM available in the code page, I don't know if there are other unused pages.
Slothie is offline  
Old 16th Aug 2021, 5:22 pm   #38
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,085
Default Re: Karen's PICL - PCB available

866 bytes so theres room for more code but not really enough free space for another sc/mp page... and it doesnt fall on a neat page boundary like the NIBL code does at 1000h
Also I think merging it with physical RAM would be much more involved than checking A12 in the RAM write routine
Phil__G is online now  
Old 21st Aug 2021, 10:24 pm   #39
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,085
Default Re: Karen's PICL - PCB available

An update for what its worth this has proven more troublesome than I expected! with added pic code to test sram A12 and only enable writes if its low, the PICL fails completely. After much testing it appears that within the 8k sram, the two halves (page 1 and page 2) are reversed, with A12 low its actually page 2 and with A12 set its page 1. With this patched so the real page 2 is read-only, on powering up, there is some success. Page 2 isnt cleared as it previously was, the PICL does retain the page 2 program (which is good) and actually selects page 2 as the current page (which is also good) but it doesnt auto-run the page 2 program as expected. It is recognising and switching to the 'rom' but not executing its program. After several evenings poring over pic and sc/mp code and much flashing of 877's, current thinking is to leave the PICL for what it is - a superbly minimal design that is a perfect introduction to NIBL - and to build Karens 'with page 2' project as well, maybe using my last remaining INS8060 with an M48Z35 32k x8 NVRAM
Phil__G is online now  
Old 21st Aug 2021, 11:09 pm   #40
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,085
Default Re: Karen's PICL - PCB available

..forgot to say, on the NIBL 'restore' idea, I've found that you usually get away with just the two bytes of the 1st line number, but strictly there are 4 bytes that could need resetting. Using the # prefix for hex, on page 1 its
@#111F = #0D (documented as a dummy line end)
@#1120 = msb of 1st line number, usually zero
@#1121 = lsb of 1st line number, usually 10 but use 1 if unsure
@#1122 = 1st line byte count including line number and CR, this is corrupted by a scmp DLD as part of the power-up page test

on page 2 its
@#2001 = #0D
@#2002 = msb of 1st line number
@#2003 = lsb of 1st line number
@#2004 = 1st line byte count including line number and CR, this is corrupted by a scmp DLD as part of the power-up page test

Also found that programs that make use of TOP dont work in rom, you need to run something in page 1 to establish TOP and variable/string storage, then switch to page 2 and continue with these values. The TOP value reported by page 2 cant be used for R/W storage if its in rom!
Phil__G is online now  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 12:14 am.


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.