Topics

Pixie Video Simulator using a Teensy 3.2 #MembershipCard #Pixie #Arduino


Gaston Williams
 

Hi,

I was able to come up with a much better 1861 Pixie Video simulator using a Teensy 3.2 micro-processor instead of an Arduino Pro-Mini.  The Teensy 3.2 is a much faster version of the Arduino that can be programmed with the same IDE as an Arduino.  It also has more memory and pins available.  The good news is that its fast enough to process a DMA_OUT request as an interrupt.   The Arduinos had too much interrupt latency time to do that, and would miss an entire DMA instruction cycle.

The basic circuit is fairly simple, just a 74LS374 to latch data from the U2 ROM on the 1802 Membership card, with the latched data lines connected to the Teensy pins for PORT D, pins 2, 14, 7, 8, 6, 20, 21, 5.  The Teensy pin numbers are  probably the oddest part of the design, but that allows the Teensy to read all the data in one pass as a single input byte.

I have posted the code to GitHub. in the github.com/fourstix/MCard1802TeensyPixieVideo repository.  There's a lot of documentation on the GitHub Readme page, as well as detailed comments in the code.

The simulator runs at the same speed as the 1861 chip and supports both 64 x 64 and 32 x 64 video resolutions. All of the control signals, /EF1, /INT, /DMA_OUT etc. should work the same so that programs written for the original 1861 Pixie Video should work with the simulator.  If not, please open up an issue.

Here's the schematic, and a picture of Richard's Sprite demo. I hope to add other photos to the Github webpage soon.


I hope this code is useful to others.  If anyone has a question feel free to ask here, or post an issue in git hub.  I will update GitHub with some more example pictures.

Have a great day,
Gaston (fourstix)


Kazuhiro Ouchi
 

Hello Gaston,

I connected your product to my homebrew COSMAC board and it worked fine.
I used 74HC573 instead of 74LS374.
It is a very good circuit, so I will try to make a PCB for my homebrew COSMAC board.
Thank you for a good product.

---
Kazuhiro Ouchi
https://kanpapa.com/cosmac


Gaston Williams
 

Hello Kazuhiro,
Wonderful!  It's so nice to see it working on someone else's elf!  Thank you very much for sharing that.

Please feel free to post any issues, comments or suggestions for the code on GitHub.  You're very welcome. 

Have a great day,
Gaston


Kazuhiro Ouchi
 

Hi,

I wrote this production article on my blog.
https://kanpapa.com/cosmac/blog/2020/08/teensy32-cdp1861-pixie-simulator.html

Please read it on the translation site because it is in Japanese.

Thanks,

Kazu


Gaston Williams
 

Hello Kazu,
Very nice write up.  I enjoyed reading it with Google Translate. 

I'm very interested if you make a STG1861 Display / Hex Keyboard based on the Teensy 3.2 Pixie Video code.

Thanks,
Gaston


Kazuhiro Ouchi
 

Hello Gaston,

I designed and ordered the Teensy Pixie Video/HEX Keyboard/Sound board to fit my homebrew COSMAC board.
I am looking forward to arrival.

Thanks,
Kazu


Gaston Williams
 

Hi Kazu,

Very nice!  I'd love to see a picture of the populated board when you're done.

Gaston

On 8/3/2020 6:08 PM, Kazuhiro Ouchi wrote:
Hello Gaston,

I designed and ordered the Teensy Pixie Video/HEX Keyboard/Sound board to fit my homebrew COSMAC board.
I am looking forward to arrival.

Thanks,
Kazu


Kazuhiro Ouchi
 

Hi Gaston,

I will send you a picture of the populated board.
I was able to put it together neatly.
I have also put together an article on my blog.
https://kanpapa.com/cosmac/blog/2020/08/teensy-pixie-hexkey-sound-rev01-assembly.html.html
Please read it on the translation site because it is in Japanese.

Thanks,
Kazu


Gaston Williams
 

Kazu,
It's so beautiful.  :-)  Thank you.  I enjoyed seeing the pictures and reading the write up. 

You mentioned a flicker problem when running the VIP OS.  I think the flickering could be caused by continuous updates.  There is logic to not update the OLED if all the video data is the same. But if the program changes any part of the video data, then the OLED is refreshed. 

If the display is updated faster than the OLED refresh rate, the OLED will update continuously.  Most 1802 graphics programs don't update the video data faster than the OLED refresh rate, so you don't see this issue.  But displaying something like a stack area that changes continuously, could cause a data change every 1861 refresh cycle. The graphics programs from Tom Pittman, Paul Moews and Joseph Weisbecker run okay because they update video data at most about every 1/2 second or so.  I don't have anything that can run the VIP OS, so I didn't see the flickering issue when testing.

On analog TV displays this didn't cause much of an issue, but redrawing the entire OLED display continuously can cause the flickering you see.  One possible fix would be to set a flag and not update the video data faster than the refresh rate of the OLED.  But then one is skipping video updates, but that may not be a problem since the flicker indicates we are lagging behind the updates anyway. 

If the flickering is a big problem for you, please up an issue on GitHub.  Or if you have a fix, please feel free to fork and modify the code and submit a pull request on GitHub.

Thanks again for sharing the photos and write up.

Have a great day,
Gaston


Kazuhiro Ouchi
 

Hi Gaston,

Thank you for reading my write up.
Applications other than the COSMAC VIP OS, such as graphic display and games on CHIP-8, are perfectly fine.
I think it's just that the fast drawing of the stack area and the refresh rate of the OLED are not compatible.
For example, moving the COSMAC VIP stack area to a location other than the video RAM would reduce the flicker.
I'd like to submit a pull request on GitHub for other ideas to improve the simulator.

Thanks,
Kazu


Kazuhiro Ouchi
 

Hi,

The schematics, Gerber data and BOM for this PCB are at the following URL.
https://kanpapa.com/cosmac/cosmac-mbc-main.html
Please read it on the translation site because it is in Japanese.

Thanks,
Kazu