Topics

Todd's ELF-ish to get RCA BASIC3 #BASIC #Homebrew


taf123
 

Hi -

Although its been fun playing with the VP-701 Floating Point BASIC for the VIP, I've become interested in getting BASIC3 up on the ELF-ish.

To start, I need the software.  Herb Johnson has ROM dumps of BASIC3 V0.0 and UT62 and putting these together, I could get up and running fairly quickly.

But my intention is to go beyond just using the BASIC3 to porting it to some of the features of the ELF-ish.  So I needed source.

After contacting Lee Hart, he sent me his copy of RCA_BASIC3_V1.1.asm.  I understand that a number of people were involved in the resurrection of this file, and he did express a concern that there could be some "bit rot" that's been encountered along the way.

Not having an original V1.1 ROM dump to compare against, I decided to look into disassembling Herb's V0.0, using Lee's V1.1 as a guide.

Blind disassembly isn't all that useful, particularly with 1802 code since everything but a 68 is a valid op code, plus you have all of the fun of SEP's with in-line parameters, etc.

So I used DASMx 1.4, guiding it through it's threaded mode, to get a good working disassembly of V0.0.  One would expect some variation in the code between the versions, but still much of it should remain the same.  I quickly discovered that although much of the code is the same, they had to jump through some interesting hoops to get the variations to fit into the already packed 12k worth of ROMs while maintaining critical page boundaries.  Most of the routines where shuffled around so I had to do a bit of detective work to find things.

In the process, I restored labels and comments from V1.1 into the V0.0 disassembly.

While I was working on this, I was in contact with Ed Keefe.  He and his wife had worked together to re-create the early version of the V1.1 file by manual entry from a printout.   He was nice enough to supply me with this.

It had some of typos, as one would expect from such a massive endeavor, but the quality of the work was quite impressive.  The provided RCA listing is compatible with AMS8 from MircoDos, so I used that help find and clean up the obvious typos.  Once the errors where cleared, there were issues with alignment which I was able to resolve by using the listing files I had generated from both V0.0 and Lee's V1.1.  I got this to the point that the resulting HEX dump generated from Ed's source matched the HEX dump from Lee's source, except for a few points which were the "bit rot" mentioned earlier.

Phew.  I then used this version of Ed's source to finish out my disassembly of the V0.0 ROMs.

So, at this stage, I have a complete disassembly of the V0.0 ROMs which when assembled, match the original ROMs.  And a V1.1 source which I'm hoping is very close to the original source before modifications, etc, have happened.

Phew!  Just working through the source like this has been very educational.

Todd


taf123
 

Now that I have the software hopefully sorted, I need to get the ELF-ish ready to run UT62. The recently provided information about the CDP18S652 Memory and Tape I/O board show that the combined ROMs of UT62, the Assembler/Editor, and BASIC3, occupy 8000H - DFFFH, with a 2k hole for 2114 based RAM at 8800-8FFF, of which only the upper 1k at 8C00-8FFF is populated by default.  UT62 uses this 1k, so I need to add support for this to the ELF-ish.

The easiest way is to add another 74HC688 to my Memory3 board which would selecting a "RAM hole" to disable the 28C256 ROM and allow the upper RAM to be accessed instead.


The ROM_DIS line then goes to the !ENABLE pin of the ROM '688



taf123
 

In addition to the memory3 board change, I want to finish my adoption of the two-level I/O system.  The ELF-ish already uses the two-level I/O method to expand the N-line use, but as we saw in the FDC project, RCA also used the same group enable system to expand the EFx lines as well.

To add this functionality to the first expansion chassis, I need to add a 4016 quad Bilateral Switch to control access to the EFx lines.  Unfortunately, that chassis is already physically full, so something has to go.  I decided the AMD AM9511 APU would be sacrificed, which also frees up two 14-pin sockets used as support chips.




The 4016 will use the freed up socket from the 74HC74, lower left, and the socket for the 4011 and the space used by the AM9511 will be available for Future Expansion.

Don't be sad, though.  The AM9511 will make a reappearance in another upcoming expansion board.

The EFx control is then a simple addition, with the four 4016 gates being controlled by what I call in the IO0 enable, but which RCA would call Group 1.


Of course, all of the devices which use the EF lines will require re-wiring, so it's a bit of work.  Better get started.

Todd


taf123
 

Hi again -

As can happen when planning some mods, I decided to go further.  I wanted to free up memory space in the upper 32k by removing the remaining memory mapped I/O from the C000H-DFFFH space.  With the AM9511 removed, that left the CDP1879 Real Time Clock, and the CDP1824 32-byte SRAM used by UT4 (relocated, original was 8C00H).

For the RTC I decided to convert it to I/O-space.  But as I was doing this, I realized that I was running low on available I/O levels (groups) using my single bit decoding.  I decided to borrow another idea from RCA and further decode the upper bits fro the I/O level latch.  However, since I already have bit 4 assigned to the CDP1878 Programmable Timer on the VIS board, I decided to only decode the upper 3 bits for 8 levels using a 74HC138.  But I put bit 4 on !E1 so I could change my mind and decode all four bits later.  I decided to label these additional levels as IO2[1-7], and assign IO21 and IO27 to the RTC.




The RTC_EN line is connected to the big OR gate which enables the CDP1857 I/O memory buffer for the expansion chassis.




This reduced the memory mapped I/O requirement to just the upper 8k with E000 (CDP1877 Programmable Interrupt Controller) and F000 (VIS).

I then updated the Memory3 mod to allow the MMIO to select either the upper 16k or just the upper 8k.


Finally, I allow either the MMIO or the new "Hole" '688 to disable the ROM




Now I think I'm ready to get building.


taf123
 

Oops - I did mention the CDP1824 used by UT4, but then didn't show it.  I decided to leave it in place, but with a simple jumper to enable/disable it.  This allows me to switch back to a more minimal UT4 environment if I want.

That makes the upper memory decoder and Memory bus buffer stage a bit over-kill now, but it is what it is.


Todd


taf123
 

Sigh.  Looks like I missed two connection changes required to move the CDP1879 from memory-mapped I/O to 1802 I/O (N-line) mapping.




Now I should be ready to build.

Cheers,
Todd


Jeff Truck
 

Todd,

Does your RTC 1879 keep time while your system is powered down?   

Jeff


Gregg Levine
 

Hello!
Todd, I'll take it a step or six further, where did you find an AM9511
part? Those things are practically scarce. I originally wanted to
track one down some twenty years earlier, when I got an urge to
assemble a reasonably simple I8080 system following the guides in a
book that I'd read about that many years earlier.
-----
Gregg C Levine gregg.drwho8@...
"This signature fought the Time Wars, time and again."

On Wed, Sep 2, 2020 at 10:53 PM Jeff Truck <jeff.truck@...> wrote:

Todd,

Does your RTC 1879 keep time while your system is powered down?

Jeff
_._,_._,_
This space is reserved for future comments by the Rebel Alliance.


Jeff Truck
 

Greg,

I can't speak for Todd's source, but I was able to obtain multiple working versions of the 9511, both 3Mhz and 4Mhz versions from this EBAY seller:

https://www.ebay.com/usr/funkward-tech?_trksid=p2047675.l2559

Be forewarned however that you need to specify at time of order the speed otherwise it is at the seller's discretion what you actually receive.

I had to create a special IO board for the 9511 because I found that the 1802 system I have running at 4MHz didn't have much patience for waiting on the 9511 to place the answer on the data bus.

Jeff


taf123
 

Hi Jeff -

The CDP1879 data sheet has a section on "Standby (Timekeeping) Voltage Operation", which operates at reduced voltage for battery backup.  Based upon that, with a little tweaking, I had ended up with the following circuit, using DS1321 to control the CS line and access to the battery.


But I found that during the reduced voltage operation, the oscillator frequency changed so the clock wasn't that accurate.  I've since removed the battery stuff and switched to a 8-pin oscillator to save space on the board, so no more battery backup.

Now that I've freed up a bit of space by removing the AM9511, I may revisit this.

Any suggestions welcome.
Todd


Gregg Levine
 

Jeff, I plugged the part number into Google and the bot found me, an
Amazon seller who's going to ship me one of the little buggers in a
long while. And I found the Wikipedia page which I'd read the first
time that part was discussed, it turns out that the AM9511 was
originally an AMD part, but that Intel spun up a second source of it
as an I82xx part number, which was the I8231 for the AM9511 and the
AM9512 had the I8232. In fact before the I8087 came out, Intel wanted
people to use the AM9511. See here
https://en.wikipedia.org/wiki/Intel_8231/8232 for clews.

Oh and my name is spelled the same as it shows in the signature.
Please don't allow autocorrect to change it, those tools don't know
real names.
-----
Gregg C Levine gregg.drwho8@...
"This signature fought the Time Wars, time and again."

On Wed, Sep 2, 2020 at 11:18 PM Jeff Truck <jeff.truck@...> wrote:

Greg,

I can't speak for Todd's source, but I was able to obtain multiple working versions of the 9511, both 3Mhz and 4Mhz versions from this EBAY seller:

https://www.ebay.com/usr/funkward-tech?_trksid=p2047675.l2559

Be forewarned however that you need to specify at time of order the speed otherwise it is at the seller's discretion what you actually receive.

I had to create a special IO board for the 9511 because I found that the 1802 system I have running at 4MHz didn't have much patience for waiting on the 9511 to place the answer on the data bus.

Jeff

_._,_._,_
And this space is still reserved for the Rebel Alliance.


taf123
 

Hi Greg -

I ordered a few from https://www.ebay.co.uk/itm/1PCS-New-AM9511A-AM9511A-1DC-CDIP-ARITHMETIC-PROCESSOR/203000468623, which seem to work.

Note that the -1DC is the 3Mhz version.  There are also -4DC, 4MHz, or without a number is 2Mz.

I haven't tried the 4Mhz versions, but think I'll give one a go.

Cheers,
Todd


taf123
 

I've purchased a few used CDP18xx parts from this seller and they seemed to work fine.

Todd


Gregg Levine
 

Hello!
And then had an Amazon associate cancel things out because the reviews
on the seller were suspect.
-----
Gregg C Levine gregg.drwho8@...
"This signature fought the Time Wars, time and again."

On Thu, Sep 3, 2020 at 12:51 AM Gregg Levine via groups.io
<gregg.drwho8=gmail.com@groups.io> wrote:

Jeff, I plugged the part number into Google and the bot found me, an
Amazon seller who's going to ship me one of the little buggers in a
long while. And I found the Wikipedia page which I'd read the first
time that part was discussed, it turns out that the AM9511 was
originally an AMD part, but that Intel spun up a second source of it
as an I82xx part number, which was the I8231 for the AM9511 and the
AM9512 had the I8232. In fact before the I8087 came out, Intel wanted
people to use the AM9511. See here
https://en.wikipedia.org/wiki/Intel_8231/8232 for clews.

Oh and my name is spelled the same as it shows in the signature.
Please don't allow autocorrect to change it, those tools don't know
real names.
-----
Gregg C Levine gregg.drwho8@...
"This signature fought the Time Wars, time and again."

On Wed, Sep 2, 2020 at 11:18 PM Jeff Truck <jeff.truck@...> wrote:

Greg,

I can't speak for Todd's source, but I was able to obtain multiple working versions of the 9511, both 3Mhz and 4Mhz versions from this EBAY seller:

https://www.ebay.com/usr/funkward-tech?_trksid=p2047675.l2559

Be forewarned however that you need to specify at time of order the speed otherwise it is at the seller's discretion what you actually receive.

I had to create a special IO board for the 9511 because I found that the 1802 system I have running at 4MHz didn't have much patience for waiting on the 9511 to place the answer on the data bus.

Jeff

_._,_._,_
And this space is still reserved for the Rebel Alliance.



taf123
 

Hi Gregg -

The link on that WiKi page to http://ep.homeserver.hu/PDF/AM9511A-9512.pdf is full of good info - check it out if you don't already have it.

The slightly newer AM9512 seems to be unobtainium, but it also doesn't have the derived functions of the 9511.

Have fun. 
Todd


thinkpast
 

Todd. Thank you for kindly referencing me, as supplying you with a "BASIC 3 V0.0" ROM image - and by the way that's on my Web page at

http://www.retrotechnology.com/memship/cosmac_dev_sys.html

The Web page provides all the details, and also has a reference to a BASIC 3 V1.1 binary.

Since you report quote "I have a complete disassembly of the V0.0 ROMs which when assembled, match the original ROMs"; would you be so kind as to contact me
and consider offering those sources for further distribution on my Web page? Since you were "very educated" by working through those sources, it's fair for me to
agree and say I'd like to educate other people with those same disassembled sources. If you've already provided that disassembly to say the groups.io archive, then I'm
asking permission to make that content available on my Web site. Please contact me privately about this. Thank you.

You collaborated with many other people regarding BASIC3 V1.1. I won't ask about that work as it's up to those persons and yourself, as to what might be with your results.

As for UT62, the source listings for that were "recovered" this calendar year from an RCA manual. Details of that are also on my Web page, and also covered in
a previous discussion thread in this group. If you find any errors in the source I provide versus any of your results, please inform me accordingly.

Thanks for discussing your work here in cosmacelf. I'm glad people have found my Web page and made use of my physical recovery of those ROMS. That is why the Web page is there, and why I'm interested in results obtained accordingly.

Regards, Herb Johnson
retrotechnology.com


thinkpast
 

This thread is discussing the AMD and Intel math coprocessors of the late 1970's I haven't considered them in several years, but some time ago I made a Web page which discusses them a bit. Let's clarify what was produced by whom:

http://www.retrotechnology.com/herbs_stuff/float.html

AMD 9511, 9511A - compatible with Intel 8231; probably announced & produced in 1978-79
AMD 9512 - compatible with Intel 8232, IEEE floating point
Intel 8231, 8231A - non-IEEE floating point format, supported sine, cosine, tangent, etc.
Intel 8232 - IEEE floating point format but no sine, cosine, tan, etc.

The details are, of course, in their datasheets. But generally, all four IC's are electrically cross-compatible I believe, or at worse may need a minor wiring change. They perform one of two sets of floating point operations as I mention above briefly. So your software must be compatible with one or the other.

My Web page describes Intel-world applications of these math coprocessors; COSMAC interests may want to look up that code and see how these processors were operated with 8080/Z80 processors. In recent years there's various GitHub pages and Web pages about use of these math processors, again with Intel or maybe Motorola processors. I don't think any COSMAC computers were in production with these math coprocessors - is that right?

One other thing. These take a LONG time to produce a result. They are not fast at all. The longest execution may be in milliseconds. Again the data sheets are your friends.

Regards, Herb Johnson


taf123
 

Hi Herb -

On Fri, Sep 4, 2020 at 07:37 PM, thinkpast wrote:
Todd. Thank you for kindly referencing me, as supplying you with a "BASIC 3 V0.0" ROM image - and by the way that's on my Web page at

http://www.retrotechnology.com/memship/cosmac_dev_sys.html
That is where I got the ROM images - sorry I didn't post the link.  Your web site is full of very useful stuff and I've enjoyed working through it as I've been on my ELF-ish journey.

The Web page provides all the details, and also has a reference to a BASIC 3 V1.1 binary.
Could you clarify this?  When I use the RCA MCDS under Emma, I seem to get the V0.0 BASIC3.  Or are you referring to another emulator?

Since you report quote "I have a complete disassembly of the V0.0 ROMs which when assembled, match the original ROMs";
To get to the final result, I used the V1.1 sources as a cheat sheet in the disassembly, and even worked in all of the labels from that source.  I haven't posted any of the V1.1 or resulting V0.0 source since I'm not clear on the copyright status.  BASIC3, along with some other 1802 BASICs, was written by Ron Cenker.  If anyone knows the current copyright status of this stuff, please let us know.

I used DASMx v1.40.  It's threaded option is much better than just blind disassembly, but it doesn't know what to do with the bytes following a SEP, BR, or LBR, so you need to tell it were the code continues.  SEP R4 is usually, but not always, a SCRT, so the following word can be assumed to be the address of a subroutine, but what about in-line parameters and things, or SEPs with other registers?  At first one can guess or start to recognize patterns, particularly if the disassembly starts to look like gibberish or leads to an IDL. I made quite a bit of headway into the disassembly without using the V1.1 source, but there were areas that I couldn't crack without looking at V1.1 source (at least not without doing some serious reverse-engineering and manual emulations, which I wasn't up for).  So the resulting source is at least a derived work of the V1.1 source.

You collaborated with many other people regarding BASIC3 V1.1. I won't ask about that work as it's up to those persons and yourself, as to what might be with your results.
This was summarized in my first posting in this thread.  I know there was a lot of work to recover the V1.1 source, but that's not my story to tell. There are posting on this forum about some of it - just do a search for BASIC3.

As for UT62, the source listings for that were "recovered" this calendar year from an RCA manual. Details of that are also on my Web page, and also covered in
a previous discussion thread in this group. If you find any errors in the source I provide versus any of your results, please inform me accordingly.
I had a minor part in that work, using ASM8 under Microdos to catch a couple errors in the transcribed code.  See https://groups.io/g/cosmacelf/message/27471

Using the corrected source, posted to the the ASM8 output matches that of your ut62_rev2.bin ROM dump.  I uploaded the results to the UT62 folder in the files area.

Thanks for discussing your work here in cosmacelf. I'm glad people have found my Web page and made use of my physical recovery of those ROMS. That is why the Web page is there, and why I'm interested in results obtained accordingly.
I really enjoy the exchange of information and ideas on this forum and some of it has made some of my work on the ELF-ish possible.  So thanks to everyone.

Todd


taf123
 

Hello ELF-ish Fans!

Spot the obvious error inserted to see if the audience was paying attention.  Bzzzt!  Times up!

In further decoding the upper 3 bits of the I/O-level latch, I used a 74HC138.  Clearly I needed active high selects - sigh.

Fortunately, a CDP1853 fits the bill nicely, and has the bonus of being a CDP1800 series part.  Yeah!


Now for some quick re-wiring...


 

Just curious if you could have kept the 74HC138 and simply moved the U36A inverter?