-
Added the Pixie chip CDP1861
01/22/2020 at 09:27 • 3 commentsToday I finished writing and testing the CDP1861 Video Display Controller. It was a addon for the Cosmac ELF, and was also used in the Cosmac VIP, and the RCA Studio II game console. It has a resolution of 64x128, with software you can change it by redrawing lines which can give you 64x64, and 64x32.
I was able to simulate both the 1802 CPU and 1861 VDC. and also have the CPU running the driver software for the VDC that help a lot with finale testing.
But most of the testing was done while feeding in simulated signals.
The chip are pretty simple, It uses two counters, one for counting lines(Line Counter) and the other for counting machine cycles (MC Counter).
- MC Counter is incremented by TPA(Rising Edge) and by TPB(Falling Edge) and holds a max count of 27 and overflows back to 0, which increments the Line Counter by 1.
- There are 14 machine cycle per line, 8 of which are DMA, and the other 6 available for CPU to run instructions.
- The Line Counter holds a max count of 262 and overflows back to 0. This gives a total of 524 lines, or 262 lines per NTSC field.
- Base off the counters, states are generated for the CPU flags Interrupt, DMA Out, and EFX. Along with the V Sync and H Sync signals, that get XOR together to make up the Comp Sync.
- The VDC relies on the CPU being in the right cycle when it starts the DMA transfer. If the state is not correct it will hold the MC Counter for one machine cycle, allowing the VDC to sync with the CPU.
- A shift register is user to shift out each pixel at a clock frequency of 1.764Mhz. it's also inverted from the same clock used by the CPU.
- Disp Off and Disp On allow for disabling and enabling the Interrupt, DMA Out, and EFX flags.
This is a picture of the video output from the 1861 VDC running on my FPGA, using the classic test program that was apart of the article on adding it to the Cosmac Elf in the Popular Electronics magazine. You can also see a video of the output on my instagram
-
Finished Interrupt Handling
01/18/2020 at 10:46 • 0 commentsThe 1802 CPU now supports Interrupt handling.
Added support for reading the serial RX, it also sets the interrupt flag when it's FIFO has data. You can use INP N1 to get bytes from the FIFO and check if it has data with BN2.
I also have the write button set the interrupt flag, and using BN4 you can check the state of it.
Here's a picture of the output from a terminal, of a program I made to test the functionality.
When you press the Write button it send you the current byte toggled into the switches in hex. "Button: 00"
And when you type on the terminal it stores the byte in a string buffer and when you hit enter it sends that buffer back to you. "Got: testing"