Back in 1978 I built my first computer from a magazine article in Popular
Electronics. The computer was called the Cosmac Elf and was based on RCA's
CDP1802 microprocessor. There is a users group where the old timers and
some new kids are still active.
Recently, I wanted to build another Elf so that I could keep my existing
machine in it's original shape but thought about using a PIC instead of the
antique processor. The goal was to create a bus accurate full speed version
of the 1802. Also, RCA created the CDP1861 video display processor that
teamed up with the DMA features of the 1802 to produce low resolution video.
I wanted to emulate this chip as well with another PIC.
It seems that other antique processors could be emulated (6502, 6800, Z80
...) as well as creating new "processors" using the same techique.
Emulating the processors allows new instructions to be added as well as
adding debug features that would not be possible with the original
processors.
--
View this message in context: old.nabble.com/Retro-computing-with-PIC-processors-%28COSMAC-Elf-without-1802%29-tp28610048p28610048.html
Sent from the PIC - [PIC] mailing list archive at Nabble.com.
trossin wrote:
> Back in 1978 I built my first computer from a magazine article in Popular
> Electronics. The computer was called the Cosmac Elf and was based on RCA's
> CDP1802 microprocessor. There is a users group where the old timers and
> some new kids are still active.
>
> http://groups.yahoo.com/group/cosmacelf
>
> Recently, I wanted to build another Elf so that I could keep my existing
> machine in it's original shape but thought about using a PIC instead of the
> antique processor. The goal was to create a bus accurate full speed version
> of the 1802. Also, RCA created the CDP1861 video display processor that
> teamed up with the DMA features of the 1802 to produce low resolution video.
> I wanted to emulate this chip as well with another PIC.
>
> The results can be found here:
>
> www.tedrossin.atbhost.net/Electronics/RCA/RCA.html#ElfClone
>
I have a CDP1802. It controls spread spectrum secure SSB Military Radio.
1980s vintage designed by Racal. If someone wants some of these boards
it could maybe be arranged.
An 8bit PIC I think would be a poorer choice than an FPGA or ARM. Maybe
a 32F (MIPS) PIC if you feel you have to support microchip.
> It seems that other antique processors could be emulated (6502, 6800, Z80
> ...) as well as creating new "processors" using the same techique.
> Emulating the processors allows new instructions to be added as well as
> adding debug features that would not be possible with the original
> processors.
>
>
Yes. Though you can still buy Z80, 6502, 6800 and chips with them as
higher speed cores. Many of these can be downloaded as VHDL or Verilog
for FPGA.
Why would you do this on other than an FPGA or emulate on a PC if the
goal is to design an improved cpu?
I had the same idea a few years back, and I too wrote code to emulate an
1802. I was looking just now for it, but can't find it.
It was probably on the hard drive that crashed a few months or so ago, and
couldn't be recovered.
But my reasoning in response to the question...
An 8bit PIC I think would be a poorer choice than an FPGA or ARM. Maybe
a 32F (MIPS) PIC if you feel you have to support microchip.
Is...
You're probably correct in thinking it is a poorer choice than an FPGA or
ARM. But in my case, I emulated the
the 1802 just because I wanted to see if I could do it. As I found out, I
could, and it worked quite well.
And, my response to the question....
Why would you do this on other than an FPGA or emulate on a PC if the
goal is to design an improved cpu?
Is....
Because not everybody that works with, or dabbles with PIC's has the
knowledge, expertise, experience, hardware, software, etc. to work with
FPGA's.
A good number do, but I'd be willing to bet that there are more PIC
experimenters than there are PIC and FPGA experimenters.
Most FPGA's, (Not all), are significantly more expensive than PIC's. And if
you just want to see if something can be done, a PIC is less expensive than
going the FPGA route. In addition, learning VHDL and/or VERILOG is a steep
learning curve compared to PIC asm or hll's. So that would be another
reason.
>
> Back in 1978 I built my first computer from a magazine article in Popular
> Electronics. The computer was called the Cosmac Elf and was based on RCA's
> CDP1802 microprocessor. There is a users group where the old timers and
> some new kids are still active.
>
> http://groups.yahoo.com/group/cosmacelf
>
> Recently, I wanted to build another Elf so that I could keep my existing
> machine in it's original shape but thought about using a PIC instead of the
> antique processor. The goal was to create a bus accurate full speed version
> of the 1802. Also, RCA created the CDP1861 video display processor that
> teamed up with the DMA features of the 1802 to produce low resolution video.
> I wanted to emulate this chip as well with another PIC.
>
> The results can be found here:
>
> http://www.tedrossin.atbhost.net/Electronics/RCA/RCA.html#ElfClone
>
> It seems that other antique processors could be emulated (6502, 6800, Z80
> ...) as well as creating new "processors" using the same techique.
> Emulating the processors allows new instructions to be added as well as
> adding debug features that would not be possible with the original
> processors.
>
>
>
>
>
> --
> View this message in context: old.nabble.com/Retro-computing-with-PIC-processors-%28COSMAC-Elf-without-1802%29-tp28610048p28610048.html
> Sent from the PIC - [PIC] mailing list archive at Nabble.com.
>
> It seems that other antique processors could be emulated (6502, 6800, Z80
> ...) as well as creating new "processors" using the same techique.
> Emulating the processors allows new instructions to be added as well as
> adding debug features that would not be possible with the original
> processors.
On the 6800 you could make the processor emit REAL smoke and flames on
instruction $dd = 'Halt & Catch Fire".
(Also $4d mayhaps.)
Hmm.
How far back does an old brain reach?
Loop
86 00
4C
B7 80 02
4C
B7 80 02
26 02
20 F4
DD
Assumes
- B7 .. .. does not touch flags, which is almost certainly correct.
- PIA pre-setup.
Maybe not that far?
If it does work it does so crudely coz some related memory is
definitely in write only mode.
Once upon a time I could power up a D2 and hex-pad key an alpha (of
sorts) moving message display program for the 7 segment numeric
display, complete with message, from memory or BOTB calculation Those
days have gone :-) (At least for a 6800)
The 6800 seemed to have been made for hand or in-head assembly - equal
or better structured and with field bits grouped than anything else
I've seen. You really could create simple programs in your head in
machine language and key them in.
> On the 6800 you could make the processor emit REAL smoke and flames on
> instruction $dd = 'Halt & Catch Fire".
> (Also $4d mayhaps.)
I worked with an early transputer that had that instruction. I can't remember the actual instruction now but they had missed a transistor in a totem pole hence connecting the power rails, which stopped the processor. Then it was just a matter of time before the fire.
Veronica Merryfield ha scritto:
>> On the 6800 you could make the processor emit REAL smoke and flames on
>> instruction $dd = 'Halt & Catch Fire".
>> (Also $4d mayhaps.)
> I worked with an early transputer that had that instruction. I can't remember the actual instruction now but they had missed a transistor in a totem pole hence connecting the power rails, which stopped the processor. Then it was just a matter of time before the fire.
hey but this is wonderful :))
I probably only heard rumors of something alike, but this is spectacular :)
> Veronica Merryfield ha scritto:
> >> On the 6800 you could make the processor emit REAL smoke and flames on
> >> instruction $dd = 'Halt & Catch Fire".
> >> (Also $4d mayhaps.)
> > I worked with an early transputer that had that instruction. I can't remember the actual instruction now but they had missed a transistor in a totem pole hence connecting the power rails, which stopped the processor. Then it was just a matter of time before the fire.
>
> hey but this is wonderful :))
> I probably only heard rumors of something alike, but this is spectacular :)
The HCF on the the M6800 actually just cycled the address bus of the processor and did not silicon harm, it could only be stopped with a reset. Two opcodes would do that $DD and $4D. This was one of Gerry Wheelers midnight to morning projects that he later wrote up for
Byte Magazine along with some other gems he found like store immediate and more useful logical operations between the primary registers. The later was most likely just missing documentation.. Most of these including HCF were don't care conditions on the processor's
implementation. They did prove useful in proving at least one M6800 clone was actually a copy.
> The HCF on the the M6800 actually just cycled the address bus of the processor
> and did not silicon harm, it could only be stopped with a reset.
> Two opcodes would do that $DD and $4D.
<Uphill both ways in a cardboard box in the snow with no shoes mode on>
HCF was immensely useful for hardware testing. As Walter said, the
processor cycled the address lines sequentially & endlessly - at
about max clock rate AFAIR. All address decoders etc were accessed in
turn and could be checked with a scope.
HCF could be implemented as a trap if desired but run away programs
often seemed to find it by themselves. Filling unused memory with dd
made it more likely. That way, if it is in HCF you know something has
gone wrong as opposed to it sitting in some obscure loop without what
is happening being evident. This was when emulators and their ilk did
exist but were not something liable to be affordable or available.
Programs were usually run from RAM during development to both cut down
EPROM erase cycle time (30 minutes typical AFAIR with a small UV lamp,
5 minutes with a powerful enough one, a day in the sun), save precious
EPROM program/erase cycles and avoid use of costly EPROMS at all when
avoidable. >>$100 for 1k x 8 triple-supply 2708 AFAIR.
I have a friend who started with an 8008 and the horrendously nasty
expensive and largely unavailable 1702 EPROMS. He managed a
spectacular destruction event at one stage and AFAIR it took months to
get new ICs from the US.
Olin wrote:
> Peter wrote:
>> Looking forward for a MCS51 and a PIC emulator in JavaScript ...
>> Adding AVR to the bestiary would not be bad either :D
>
> Why? What are you going to do with those if you had them?
Scott Dattalo wrote:
>>> Looking forward for a MCS51 and a PIC emulator in JavaScript ...
>>> Adding AVR to the bestiary would not be bad either :D
>>
>> Why? What are you going to do with those if you had them?
>
> The same thing you'd do with any bestiary.