|
Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment. |
|
Thread Tools |
26th Mar 2024, 6:54 pm | #1 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,122
|
A Toolkit for NIBL-E
I was never happy with the interface to my first attempt at a toolkit, having to remember or look up the address of each routine.
It worked fine but it wasnt 'intuitive' as the popular phrase goes. After a lot of pondering over alternatives and I've chosen to use one fixed address for everything - which is easily remembered - with a two-character 'mnemonic' identifier which is also easy to remember... CU for Cursor Up, SO for sound, HX to display X in Hex, CS for Clear Screen etc. Theres a full list of the 26 commands in the document, though its likely to expand - the most recent addition being XY cursor positioning. X and Y are like Row & Column in DEC-VT100-speak, so X can be 1 to 24 and Y can be 1 to 79 (though IIRC, NIBL has a 67 character width limitation). Since this is a 'cursor command' its identifier is "CX" and X=12:Y=35:LINK#8000:CX for example will put the cursor right in the centre of the screen. In a nutshell you use LINK#8000:xx where xx is the two-character identifier for the required function. For example, say you want a 5 second delay: Code:
10 REM DELAY EXAMPLE 20 LINK#8000:CS:REM CLEAR SCREEN 30 Z=50:LINK#8000:DE:REM DELAY IS TENTHS 40 PRINT"DONE!" The NIBL function "LINK" doesnt pass parameters so where required these are set up in variables before the toolkit call - X, Y & Z are used but not exclusively, you can still use X, Y & Z in your programs. The Toolkit is written in assembler using SBASM and suits several similar hardware platforms - the MGH8060 and modded builds, the MGH8060GAL, the "SC/MP II Max" and Ronald Deckers design which is pretty much a 'standard'. It resides at 0x8000 and is ROMable. The "LINK#8000:xx" interface syntax is rigid, there is no error checking other than for non-existent identifiers. Forgetting the ":xx" or using anything other than a 2 character identifier will definitely trip it up! I would love to hear from anyone who makes use of this - we're seeing a lot of interest in the SC/MP now, as we approach its half-century anniversary! The files and docs will be on https://philg.uk shortly. Heres the obligatory demo video: https://youtu.be/zA0KELDL2HI Cheers Phil PS I havent actually uploaded the files yet but I will when the doc has been checked. Last edited by Phil__G; 26th Mar 2024 at 7:19 pm. |
26th Mar 2024, 10:01 pm | #2 |
Hexode
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 320
|
Re: A Toolkit for NIBL-E
Phil, that's amazing. I think 'NIBL-Extreme' is the correct term for this package Looking forward to getting it on the LCDS at some point.
|
26th Mar 2024, 10:03 pm | #3 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,122
|
Re: A Toolkit for NIBL-E
Files are up.
https://www.mccrash-racing.co.uk/phi...p.htm#basement |
27th Mar 2024, 6:48 am | #4 |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,447
|
Re: A Toolkit for NIBL-E
I'll have to have a go at patching the version of this into the MGH8060 multi-OS etc image you'd previous done (If not done already)
- as I'd been planning on updating that to a more recent enhanced version you'd done. And I wonder if having a command to return a 'version' number of this might be useful, in case further routines are added - Not sure what happens if you send an invalid not-recognised command to it. I also wonder if it would be possible to have a 'help' command (or upon receipt of an invalid command) where it returns a list of accepted valid commands ? (Not sure if calling it via a NIBL program, makes it difficult for it to return text directly to the screen?) |
27th Mar 2024, 11:14 am | #5 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,122
|
Re: A Toolkit for NIBL-E
Good idea Owen, for the next issue I'll add a brief help function with a version number.
It was always going to be an 'ongoing WIP as new ideas surfaced so no problems. I'd like to keep it below the 4k page threshold though. I'll do a new image for Kris, Mikes & Ronalds boards but if you want to DIY, I would suggest you read your current ROM and overlay the Toolkit hexfile, after clearing any option to initialise the buffer area, then blow the EEPROM. |
27th Mar 2024, 1:34 pm | #6 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,122
|
Re: A Toolkit for NIBL-E
Okay we have an extra command "LINK#8000:HE" for a help screen. Its uploaded to the usual spot: https://www.mccrash-racing.co.uk/phi...p.htm#basement
Code:
>LINK#8000:HE NIBL-E Toolkit Format: LINK#8000:xx or LINK#8000:xx:LINK#8000:xx:LINK#8000:xx CS - Clear Screen HX - Print Hex byte In X To console CU - Cursor Up HY - Print Hex word In Y To console CD - Cursor Down PC - Print ASCII char In Z to printer CR - Cursor Right PS - Print String @ address Y to printer CL - Cursor Left PL - Print Listing To printer (or LP) CX - Cursor to X-Y (down,across) C0 - Set Colour 0 Grey SO - Sound Beep via Flag 2 C1 - Set Colour 1 Red SD - Sound Descending (Laser) C2 - Set Colour 2 Green SA - Sound Ascending whistle C3 - Set Colour 3 Yellow ST - Sound Tick C4 - Set Colour 4 Purple SR - Sound Ringing phone C5 - Set Colour 5 Magenta SX - Sound eXplosion C6 - Set Colour 6 Cyan DE - Delay Z Tenths of seconds C7 - Set Colour 7 White (interrupt with 'break') HE - This help screen [Version 27/03/24 11:46] > |
27th Mar 2024, 3:13 pm | #7 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,122
|
Re: A Toolkit for NIBL-E
(Sorry posted, deleted, reposted due me missing a file out)
A complete image file is ready, this suits both the MGH8060GAL and MGH8060 boards with the GAL mod. Its the file "MGH8060GAL files - GAL, sources, docs" https://www.mccrash-racing.co.uk/phi...htm#mgh8060gal Note a GAL-modded-MGH8060 is identical to the later MGH8060GAL. It also suits Mikes "SC/MP II Max" with my version of its gal file. Theres a lot of stuff in the zip all you need is either mgh8060gal_with_menu_2703.hex or mgh8060gal_no_menu_2703.hex ...depending on whether you want the boot-menu or not. Also done the image for the older unmodified MGH8060 (although I think everyone has done the mod!). https://www.mccrash-racing.co.uk/phi...mp.htm#mgh8060 Last edited by Phil__G; 27th Mar 2024 at 3:25 pm. |
28th Mar 2024, 6:33 am | #8 |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,447
|
Re: A Toolkit for NIBL-E
Thanks for these updates. I originally thought I could just add the extra routines to the EPROM I've used on this, without needing to erase it
- if it was just a matter of appending bytes into 'blank' un-programmed left-erased at FFh locations. But I imagine there is now quite a bit changed in the existing, earlier, part of this extension area in order to support passing of command to a standard 'Call' address via the 'Link' command. So will probably be easiest to erase my UV-PROM and re-program it. - I just need to sort out the reprogramming of the GAL, after I made some pin-swaps / additions to unused ones on this, to add more features from the new MGH8060GAL version. However, finding a 'compiler' / assembler for the .EQN file, into a .JED file, that runs natively on a 32/64bit Windows PC is proving to be rather more-difficult than hacking the .EQN file around should be! |
28th Mar 2024, 12:19 pm | #9 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,122
|
Re: A Toolkit for NIBL-E
You're right Owen in that its not just 'extra' code in previously empty space, because the growing command-table
is right at the start of the Toolkit. I'm a huge fan of EEPROMs. So quick & easy, a Winbond 27C512 in this case. Mine were just over a quid each from China, these are so commonplace they are most unlikely to be faked, they are 'recovered' (which is fine by me) and come with some sort of video BIOS code I forget which. |
28th Mar 2024, 1:21 pm | #10 |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,447
|
Re: A Toolkit for NIBL-E
Yes, I thought there'd now have to be a common command-parse routine for thee, now they aren't directly called, which would change every time more routines/commands were added.
I also bought some of those non-conventionally numbered (as 27xx typres are usually (OTP) EPROM in plastic packages) Winbond W27C512's EEPROM's, that came with data already in but erased OK. And were a bargain at aound 2 for £1 when I got these - mainly for use as Commodore C64 PLA replacements, due to their very-fast 45ns access time. But Ididn't have them to hand at the time, so just used a 27C512 I'd recently-bought one v.cheap from Aliexpress to see what they were like as (LAKE Store) were selling them v.cheap (26p+VAT, with 89p+VAT delivery spread across many items). And I found it worked OK, whereas Chris has had quite a few bad EPROM's (Mainly older / smaller 2732's?) from China, so save going through my boxes of EPROM's to find something suitable. Last edited by ortek_service; 28th Mar 2024 at 1:26 pm. |
28th Mar 2024, 6:59 pm | #11 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,599
|
Re: A Toolkit for NIBL-E
We used Winbond 27E512s (note 'E', not 'C') as '512 EPROM' substitutes in a popular product, the product is now long obsolete but I must have dozens of used-but-good ones lying around at work, if anyone needs three or four to play with drop me a PM - just make sure your programmer can handle them first.
|
28th Mar 2024, 7:30 pm | #12 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,122
|
Re: A Toolkit for NIBL-E
G, without poring over side-by-side data sheets, any idea how the E and C differ?
|
29th Mar 2024, 12:10 pm | #13 | ||
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,447
|
Re: A Toolkit for NIBL-E
Quote:
Quote:
So I wondered if it was just that they rebranded it as an 'E' rather than a 'C' (There is also an 'L' version, but that is a Low Voltage rather than 5V type) ? However, after resorting to looking at the (separate for each) datasheets (attached) for these, there is a large overlap in the revision records, with the 'E' seemingly being released a year later and last-updated a year later? The datasheets are basically word-for-word identical, just that the 'E' has extra (intermediate) speed options and an extra TSSOP package. The only real difference seems to be in the Max. ratings, where the 'C' says: Operation Temperature 0 to +70 °C Whereas the 'E' version specifies this differently as: Ambient Temperature with Power Applied -55 to +125 °C So at first glance, you'd think that the 'E' was an Extended temperature operating version of the ('standard'?) 'Commercial' (0 to +70 degC) temperature version. However, the 'E' versions specs are all only listed as being over the 0 to +70degC operating range - just as with the 'C' version! (With Prog. & Erase only specified at +25degC +/-5degC). So all rather strange, unless they made a mistake in the 'E' version datasheet when quote 0 +70degC, and had just copied this from the 'C' version datasheet. There are quite a few places on eBay / Aliexpress etc selling (usually old stock / used?) 'E' version ones for not that much more than 'C' version were, so it seems it's perfectly OK to use either version and as prigramming is the same then as long as a programmer list at least one version then it should work for both. |
||
29th Mar 2024, 3:03 pm | #14 |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,447
|
Re: A Toolkit for NIBL-E
Now actually attached! (Seems they disappeared from previous post, after I had attached these)
|
29th Mar 2024, 8:17 pm | #15 | |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,599
|
Re: A Toolkit for NIBL-E
Quote:
(Thanks, Owen). TBH I'm surprised that the '27C...' prefix was used by any manufacturer for an EEPROM as you could be misled into thinking that it was an old-school EPROM. Maybe it was meant to reinforce the idea that they were completely compatible with 27C512s, at least in read mode. As I said, it's the 'E' variant that we have lying around here and from what Owen found they just seem to be extended operating temperature versions of the 'C' variant. I'm surprised the company shelled out for the 'E' versions because the application we used them in was nothing special, nothing that the 'C' version couldn't have done just as well. |
|
1st Apr 2024, 6:01 pm | #16 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,122
|
Re: A Toolkit for NIBL-E
Back to NIBL utilities... I've found a great renumbering program that works with NIBL or any text-format BASIC file.
The only thing it doesnt catch is "GOTO variable" which I think would fool any renumberer. It works independently, outside BASIC on the textfile itself which makes it ideal for us - its a utility we've been missing when compared to other BASICs. Its Javascript, so if you dont already have it, you'll need to install 'Node' (its in the zip) To run, you open a CMD command window, navigate to your NIBL stash, and enter: node renumber.js myniblprog.bas ...and the magic happens. The filename is kept but the output file extension becomes '.bas.new' which you might want to rename - some systems expect only one extension. Your NIBL program filename & extension can be anything - it doesnt care - I often use '.nib' for mine. The 'Renumber' zip is too big to attach so its here: https://www.mccrash-racing.co.uk/phi...s/renumber.zip Cheers Phil Last edited by Phil__G; 1st Apr 2024 at 6:27 pm. |
3rd Apr 2024, 3:54 pm | #17 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,122
|
Re: A Toolkit for NIBL-E
NIBL-E Toolkit update: added integer square root.
Code:
>100 Y=3249:PRINT"The square-root of",Y;:PRINT"is";:LINK#8000:SQ:PRINT Y >RUN The square-root of 3249 is 57 |
4th Apr 2024, 1:43 pm | #18 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,122
|
Re: A Toolkit for NIBL-E
Another update to the NIBL-E Toolkit, drives a servo via Flag 1. The video is a summary of the most recent changes:
https://youtu.be/gddH_3zaXxw Files here: https://www.mccrash-racing.co.uk/phi...p.htm#basement |