Page 1 of 1

Emulated video or exact design

PostPosted: Dec Fri 28, 2012 4:14 pm
by vbriel
I'm working on a design and have been working on video emulation for a while. I ran into an issue with inverse mode and have problems emulating it. Would you rather a board use the original TTL video generation using character generator ROM or emulation to video done with a Parallax Propeller chip as done with the replica 1?

Re: Emulated video or exact design

PostPosted: Dec Fri 28, 2012 6:12 pm
by dessony
Vince,

I believe that I saw some video cards articles designed for the computers systems with their S100 bus in old two or three magazines. With some adjustments for the technology improvements (I.E., 1k RAM to 256k RAM or larger and newer 74xxx chips), you will have a fewer chips to worry over.

Re: Emulated video or exact design

PostPosted: Dec Fri 28, 2012 8:34 pm
by vbriel
Early results are enlightening. I have always thought that it was better to have a smaller board to build but I might be wrong.

Re: Emulated video or exact design

PostPosted: Jan Wed 16, 2013 8:28 pm
by jac_goudsmit
I don't know what project you're working on, but I believe it should be possible to emulate the video of most early 1980s computers with a Propeller.

Monochrome or color character mode is almost trivial. Graphics is more difficult but not impossible as long as the necessary memory stays below 32KB. As you know, my project will do memory-mapped character video, and I already proved that it can do Commodore PET video including reverse video and switching between lower case and graphics character sets.

It gets hard when you want to do complex video e.g. with sprites, or if you want to do an exact emulation of e.g. a 6845 or 6847 CRT controllers and their I/O registers. The VIC-1 and the VIC-II are probably too much for one Propeller (but I think it may be possible to do it with two Propellers working closely together).

In my own project, I can probably get away with emulating just the memory-mapped characters, without emulating the CRTC registers, and leaving the design open to add another Propeller in parallel to the one I already use, for future expansion. The nice thing about emulated video is that if you figure out that it doesn't work, you may be able to make it work by changing the software. That's much easier than making changes to the hardware, and dealing with chips that may not be available anymore.

===Jac

Re: Emulated video or exact design

PostPosted: Jan Fri 18, 2013 11:21 am
by danwerner
Over at the N8VEM project I have worked on video boards with the TMS9918 and the MOS 8563. Both are easy to use, not terribly hard to find, and have a very low chip count to impliment.

Dan Werner

Re: Emulated video or exact design

PostPosted: Feb Sun 10, 2013 9:19 pm
by vbriel
jac_goudsmit wrote:I don't know what project you're working on, but I believe it should be possible to emulate the video of most early 1980s computers with a Propeller.

Monochrome or color character mode is almost trivial. Graphics is more difficult but not impossible as long as the necessary memory stays below 32KB. As you know, my project will do memory-mapped character video, and I already proved that it can do Commodore PET video including reverse video and switching between lower case and graphics character sets.

It gets hard when you want to do complex video e.g. with sprites, or if you want to do an exact emulation of e.g. a 6845 or 6847 CRT controllers and their I/O registers. The VIC-1 and the VIC-II are probably too much for one Propeller (but I think it may be possible to do it with two Propellers working closely together).

In my own project, I can probably get away with emulating just the memory-mapped characters, without emulating the CRTC registers, and leaving the design open to add another Propeller in parallel to the one I already use, for future expansion. The nice thing about emulated video is that if you figure out that it doesn't work, you may be able to make it work by changing the software. That's much easier than making changes to the hardware, and dealing with chips that may not be available anymore.

===Jac

Hey Jac, didn't you send me your Pet code? I got tied up with some personal stuff and have not been able to do much lately. I'm curious how you did the graphics characters as well as the standard characters. I ran into an issue where I could do 256 character set but then I also need inverse mode as well. Can you send me your work again to look at?

Re: Emulated video or exact design

PostPosted: Feb Thu 14, 2013 3:28 pm
by jac_goudsmit
vbriel wrote:Hey Jac, didn't you send me your Pet code? I got tied up with some personal stuff and have not been able to do much lately. I'm curious how you did the graphics characters as well as the standard characters. I ran into an issue where I could do 256 character set but then I also need inverse mode as well. Can you send me your work again to look at?


As far as I can tell from my email archives, I offered to send the code and you never replied back :-)

Anyway, see the attached for the PETSCII driver I hacked together, based on the VGA_Hires_Text.spin driver from the Parallax OBEX. I used a small C program that I wrote myself (and that I don't have anymore) to generate the font data in the format that this driver requires, based on the 4032 CGROM dumps on zimmers.net.

It's currently configured to show 320x480, 70Hz, 40 lines, 25 characters. The video parameters near the top can be modified easily to change the display to 80x25 or even 80x40 or 128x64.

It supports color but to reduce the memory footprint, the color can only set once per row of characters, not once per character. For me this was no big deal because I didn't have enough pins for full color anyway; I just had all colors set to white-on-black and used the pin mask in the video register to make sure that only the green got out.

Reverse video is implemented in the same way as on the PET: if you set the high bit of a byte in the display buffer, the character's video is reversed (foreground and background color are swapped). If I would want to make a PET emulator, I would just create a buffer in hub memory and map that buffer into the 6502 memory space at $8000, and that's it.

I made some small tweaks and added some comments, but it should pretty much still work the way I showed in my proof-of-concept video from two years ago: http://www.youtube.com/watch?v=WBdACu4OK-s. Of course this file by itself is not enough; this is just the video driver. Just read through the comments (and take the numbers with a pinch of salt: for example you only need 1K, not 8K for a 40x25 screen of characters) and it should become (somewhat) clear how this can be used.

I'd be happy to help you write a Propeller video driver; just let me know. But you may want to send me an email if you're interested; I don't come here very often :-)

===Jac

Re: Emulated video or exact design

PostPosted: Apr Mon 29, 2013 9:02 am
by ralphw
There's another option, which might give the best of both worlds - using a smallish FPGA for just the video component.

This would allow exact replication of the video circuitry in most cases, so you could have one box be able to fulfil most
replica needs - from OSI to CBM to Apple to Atari...

There are products like the "DIPIO" - http://mdsinstruments.com/products/dipio.php to provide an FPGA in a DIP form factor.

Hassles would involve:
  • bring in yet another technology stack
  • lack of open source FPGA development tools
  • extra expense
  • limited alternative suppliers (shared with propeller)

There are some computers, like the MicroTan 65, or ECD Micromind, that didn't sell in large enough numbers
to have a viable replica community, most of the variation in these is in memory or I/O map, video, and sound.

Re: Emulated video or exact design

PostPosted: Aug Thu 01, 2013 9:49 pm
by dbvanhorn
Which video would you do if you did "the real thing"? I've always liked the Dazzler.