The VIP2K video is probably one of the most complex video systems emulated in Emma 02. Lee's design is genius but trying to understand and emulate it was rather difficult. The current implementation in Emma 02 is still not exactly the same as the real VIP2K. This is affecting the top 8 scan lines of the screen which in normal operation should be blank and as such this difference is not noticeable. If data is shown on those lines it will not match the real VIP2K.
The video system is using a similar set-up with DMA requests as the CDP 1861. Resolution is however higher, 192x192 visible black and white pixels which is realised by using a video sequencer. This video sequencer is a 2 KB EPROM containing the state machine SW. One byte is read out every 2 us, Each byte in the EPROM provides 8 control bits
- Bit 7 = VSYNC bank
- Bit 6 = RST 1 to reset video counter U6
- Bit 5 = /EF1 0 during lines 64-258
- Bit 4 = /SYNC 0 during HSYNC and VSYNC
- Bit 3 = /BLANK 0 before/after HSYNC and VSYNC
- Bit 2 = /INT 0 interrupts 1802
- Bit 1 = /DMA 0 requests DMA-OUT
- Bit 0 = ring counter inverter; D0=/A0
EPROM addressing is done via a video counter which is resulting in the following addressing:
- The state machine EPROM is divided into eight pages. Each page has 32 groups of 8 bytes, and so controls 64 scan lines.
- Every 8 bytes are read out in the order: 4 4 5 5 6 6 7 7 4 4 5 5 6 6 7 7 4 4 5 5 6 6 7 7 0 0 1 1 2 2 3 3, these 32 bytes define one scan line.
- Every scan line is repeated twice as address line Q4 from the video counter is not used.
- Every 0x800 bytes are repeated 4 times as Q10 and Q11 from the video counter are not used. For the state machine SW this means every page is repeated 4 times.
The VSYNC bank bit is used as A9 for the video sequencer, linking this bit to the video counter this bit can be seen as Q13. Setting VSYNC to 1 will select page 2, 3, 6 or 7 in the state machine. The TVON bit is used as A10 for the video sequencer, linking this bit to the video counter this bit can be seen as Q14. Setting TV-ON will select page 4, 5, 6 or 7 in the state machine.
After the interrupt is acknowledged DMA requests are generated when VSYNC is high and TVON is high, i.e. in page 6 and 7 of the state machine. Every scan line generates 26 DMA requests, the first and last requests are used for the 3 bit video border and as such should normally be 0. The 24 DMA requests in-between generate the 192 pixels.
/EF1 is LO only during the active interrupt and display when TVON = HI (TV ON). At all other times /EF1 is HI.