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.

Reply
 
Thread Tools
Old 20th Feb 2024, 4:04 pm   #1
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default NIBL 'helper' routines

I've started a bit of a helper/library thing for NIBL-E to add features it cant easily do... its a work in progress but so far it does these:
Print X as a byte 0-255 in hex 00-FF
Print Y as a word 0-65535 (actually 0-32767 then -32768 to -1) in hex 0000-FFFF
Clear the terminal screen (CLS)
Cursor movement - up, down, left, right
Delay Z seconds (can be interrupted)
Beep, Whoop, Laser & Tick sounds via a speaker on Flag 2.

LINK doesnt do parameter passing hence the use of X, Y & Z variables, doesnt mean you cant use them elsewhere.
I expect it will live somewhere in the vast emptiness of ROM space on the 'MGH8060' and 'SC/MP II Max' boards,
but for now, whilst its still a WIP, its in RAM. Its just a bit of fun, maybe has some application somewhere?

Heres a bit of a demo:
https://youtu.be/oD3vgFBTw4g

I'll post files including source when I cant think of any more to add... though it is really simple.

Is novelty stuff like this of any interest to NIBBLERS or is it just me?

Last edited by Phil__G; 20th Feb 2024 at 4:22 pm.
Phil__G is online now   Reply With Quote
Old 20th Feb 2024, 7:51 pm   #2
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

Posted the files at the bottom of the SC/MP page: https://philg.uk
Theres the library (if you can call it that!), the source, a brief doc, and the NIBL example program shown on the video above.
Its far from optimised, theres a fair bit of repetition in there not helped by the SC/MP's difficulties with nested subs.
Cheers
Phil

Last edited by Phil__G; 20th Feb 2024 at 8:01 pm.
Phil__G is online now   Reply With Quote
Old 22nd Feb 2024, 7:02 pm   #3
Realtime
Hexode
 
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 326
Default Re: NIBL 'helper' routines

Quote:
Originally Posted by Phil__G View Post
I've started a bit of a helper/library thing for NIBL-E to add features it cant easily do... its a work in progress but so far it does these:
Print X as a byte 0-255 in hex 00-FF
Print Y as a word 0-65535 (actually 0-32767 then -32768 to -1) in hex 0000-FFFF
Clear the terminal screen (CLS)
Cursor movement - up, down, left, right
Delay Z seconds (can be interrupted)
Beep, Whoop, Laser & Tick sounds via a speaker on Flag 2.
Is novelty stuff like this of any interest to NIBBLERS or is it just me?
Thanks Phil, just been running these to test my newly built MGH8060 PCB. All work perfectly. Love the cursor positioning routine. It's this kind of thing that make humble SC/MP boards interesting and usable. So, more please
Realtime is offline   Reply With Quote
Old 22nd Feb 2024, 9:15 pm   #4
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

Aw shucks
Phil__G is online now   Reply With Quote
Old 6th Mar 2024, 5:02 pm   #5
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

Still expanding the NIBL-E 'helper', it now supports the 9600 baud Aliexpress receipt printer, with print character, print string, and I'm just doing 'list NIBL program to printer' like the old microsoft basic 'LLIST' command. What it doesnt have yet is a name, not even a generic 'what is it' name
Cheers
Phil
PS the delay function is in tenths, not seconds, my typo sorry,
gives up to 25.5 seconds with Z=255 (interrupable)
Phil__G is online now   Reply With Quote
Old 8th Mar 2024, 4:22 pm   #6
Realtime
Hexode
 
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 326
Default Re: NIBL 'helper' routines

Quote:
Originally Posted by Phil__G View Post
Still expanding the NIBL-E 'helper', it now supports the 9600 baud Aliexpress receipt printer, with print character, print string, and I'm just doing 'list NIBL program to printer' like the old microsoft basic 'LLIST' command.
I received my receipt printer a week or so ago but haven't powered it as yet. I think I'll wait until Phil publishes the NIBL helper extension for it.

Any news Phil ?

Quote:
Originally Posted by Phil__G View Post
What it doesnt have yet is a name, not even a generic 'what is it' name
Starter for 10: NIBL Tiny Toolbox or Tiny Toolkit
Realtime is offline   Reply With Quote
Old 8th Mar 2024, 10:55 pm   #7
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

Quote:
Originally Posted by Realtime View Post
Any news Phil ?
... Real soon now ( © Microsoft ) (other late providers are available)
Phil__G is online now   Reply With Quote
Old 9th Mar 2024, 2:40 am   #8
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

Okay
The LLIST function wasnt as easy as it sounds and its been quite a learning exercise!
One problem is that the NIBL line buffer which we use for scratchpad ram is beyond the reach of P2 which NIBL points to the variables A-Z. There just arent enough pointer registers!
What I've done is to point to 0x2090 which is exactly midway between variables and a useful portion of the line buffer so with one pointer I can access from PAGE, through all the variables A-Z, and well into (but not all) the line buffer. Sounds obvious now but this was the eureka discovery Printing line numbers stored as inline hex was fun too.
Anywho its all good to go:
https://www.mccrash-racing.co.uk/phi...p.htm#basement

I do need to think of a better function table, this one is quite wasteful

Heres a short video of the LLIST function: https://youtu.be/gWpbZJP2Aas
Phil__G is online now   Reply With Quote
Old 10th Mar 2024, 1:03 pm   #9
Realtime
Hexode
 
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 326
Default Re: NIBL 'helper' routines

Thanks Phil, the mini-printer is now connected to the LCDS and printing perfectly. LLIST is great.
Realtime is offline   Reply With Quote
Old 10th Mar 2024, 1:32 pm   #10
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

Ian spotted a typo in the PDF regarding 'print-character' which uses Z not X
I've corrected the document and took the opportunity to update 'print-string' so it adds a LF when it sees a CR.
This stops the printer 'overprinting' consecutive strings Please download a fresh copy !
https://www.mccrash-racing.co.uk/phi...p.htm#basement

Another thing I forgot to mention, which I've also added to the doc, is that just once, or again after a hard reset, SOUT must be set using Z=0:LINK#8254
Forgetting to do this results in the printer missing the very first character of a print, but thereafter its fine, you dont need to set SOUT again unless you press 'reset'.
Phil__G is online now   Reply With Quote
Old 10th Mar 2024, 7:03 pm   #11
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

Quote:
Originally Posted by Realtime View Post
Thanks Phil, the mini-printer is now connected to the LCDS and printing perfectly. LLIST is great.
Presumably this is on your 4mhz SC/MP II card Ian?
LLIST was fun, not as straightforward as it might seem
Phil__G is online now   Reply With Quote
Old 10th Mar 2024, 10:42 pm   #12
Realtime
Hexode
 
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 326
Default Re: NIBL 'helper' routines

Indeed! I’m using the original SC/MP 1MHz card for running kitbug+ at 110 baud to test the TELEKIT interface.
Realtime is offline   Reply With Quote
Old 11th Mar 2024, 2:58 pm   #13
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

The "SC/MP II Max" uses a 128k nvram with A16 on a selection jumper - so I'm going to put a 110 baud version of everything in the 'unused' half just for giggles & nostalgia...

I wonder how practical it will be... Conways 'Life' at 3 frames per minute?

Meanwhile I was thinking about CP/M 3 and its banked memory, (the BBC's side-ways ROM is another example) and realised that NIBL is the ideal platform for banked memory - one 4k 'hole' could be occupied by either ram or one of several rom images... just like we were saying that SIO/SIN/SOUT were almost made for SPI, it seems NIBL was made for paging... SC/MP page 3 is an ideal candidate for paging in either either RAM or PAGE3.SYS... although that could probably be done already via a GAL input... I'm going to ponder on it and maybe come up with something. Unless its already been done?

Last edited by Phil__G; 11th Mar 2024 at 3:05 pm.
Phil__G is online now   Reply With Quote
Old 11th Mar 2024, 4:40 pm   #14
Mark1960
Octode
 
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,317
Default Re: NIBL 'helper' routines

74LS612 memory mapper is also suitable for 4k pages. Also available as 74HCT612. It might be a bit complicated if only using it for 128k ram.
Mark1960 is offline   Reply With Quote
Old 12th Mar 2024, 11:16 pm   #15
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

Another sound effect for the toolkit, a ringing telephone:
https://youtu.be/DqF-xBpSmVE

https://www.mccrash-racing.co.uk/phi...p.htm#basement

Last edited by Phil__G; 12th Mar 2024 at 11:29 pm.
Phil__G is online now   Reply With Quote
Old 15th Mar 2024, 1:52 pm   #16
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

I added colour selection to the NIBL-E Toolkit.
The current functions are:

Print Hex Byte In X
Print Hex Word In Y
Clear Screen
Cursor Up
Cursor Down
Cursor Right
Cursor Left
Beep Speaker On Flag 2
Descending Sound (like a laser gun)
Ascending 'whoop' sound (these two together make a good wolf whistle!)
Tick Sound
Wait Z Tenths Of Seconds (interruptable with 'Break' ALT/B)
Print the ascii character in Z to the printer, ie Z=#41 prints 'A'
Print the string at address Y to the printer,
List the program in the current page to the printer
Phone ringing sound on Flag 2
Set colour to value in Z, zero to 7

work-in-progress...

https://www.mccrash-racing.co.uk/phi...p.htm#basement


.
Attached Thumbnails
Click image for larger version

Name:	nibl_colour.jpg
Views:	27
Size:	73.6 KB
ID:	294765  

Last edited by Phil__G; 15th Mar 2024 at 2:18 pm.
Phil__G is online now   Reply With Quote
Old 15th Mar 2024, 5:58 pm   #17
Realtime
Hexode
 
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 326
Default Re: NIBL 'helper' routines

Very nice. I’ll try that later. Does that work on a per character basis, i.e colour can be changed for each character output?
Realtime is offline   Reply With Quote
Old 15th Mar 2024, 6:05 pm   #18
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

Not really Ian but you could print a character, change colour, print the next, change colour... a bit long winded
Phil__G is online now   Reply With Quote
Old 15th Mar 2024, 7:03 pm   #19
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

Havent tried this but straight off-the-top of my noggin...

100 T=TOP:B=TOP+10
110 $T="COLOURS"
120 $B=" "
130 FOR Z=0 TO 6
140 LINK#8270
150 @(B)=@(T+Z)
160 PRINT $B;
170 NEXT Z
180 PRINT ""


Edit: couldnt resist, had to try it and yes it works. To explain, theres very little string handling in NIBL, so $B is an empty character slot
into which we sequentially copy characters from the "COLOURS" string.
so
150 @(B)=@(T+Z)
is like the MID$(T$,Z,1) that we're all familiar with.

You could do much longer strings with Z>7 as the colour is set by the least significant 3 bits (0-7) so 8=0=16=32=64 etc, see 2nd pic
(I swapped B & T around so as not to limit the string length)
Attached Thumbnails
Click image for larger version

Name:	EXAMPLE.jpg
Views:	27
Size:	44.1 KB
ID:	294792   Click image for larger version

Name:	nibl_colour_long.jpg
Views:	36
Size:	48.2 KB
ID:	294793  

Last edited by Phil__G; 15th Mar 2024 at 7:32 pm.
Phil__G is online now   Reply With Quote
Old 18th Mar 2024, 3:03 pm   #20
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,151
Default Re: NIBL 'helper' routines

Here's my old BASYS monitor with the hex conversions replaced by toolkit calls.
The difference in speed is remarkable!
Attached Files
File Type: txt BASYS_NIBLT.TXT (2.2 KB, 23 views)

Last edited by Phil__G; 18th Mar 2024 at 3:28 pm.
Phil__G is online now   Reply With Quote
Reply

Thread Tools



All times are GMT +1. The time now is 12:22 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.