Sampling at an odd frequency?
MarkS
Posts: 342
I have a project I'd like to start working on. I have an old Macintosh Plus with a bad analog board.
The oscillator on the original Macs (128K, 512K and Plus) is 15.6672 MHz and is is divided in half for the processor. The video signal on the motherboard is clocked at the full 15.6672 MHz. What I want to do is read that signal with a Prop and output a VGA signal. My concern is that I'm not going to be able to sample that frequency accurately. It would be easier if it were 16 MHz, but Apple has never been known to make their hardware easy to access. The video signal is a 5v TTL pulse, with a low representing a white pixel and a high representing a black pixel.
Will this be possible with the Prop? One option I'm considering is swapping the oscillator with a 16 MHz version, but I cannot find information on exactly why Apple chose such an odd frequency in the first place and I'm not sure what, if anything, the increase in frequency will do.
My reasons for doing this project are basically sentimental, but it should also be fun.
The oscillator on the original Macs (128K, 512K and Plus) is 15.6672 MHz and is is divided in half for the processor. The video signal on the motherboard is clocked at the full 15.6672 MHz. What I want to do is read that signal with a Prop and output a VGA signal. My concern is that I'm not going to be able to sample that frequency accurately. It would be easier if it were 16 MHz, but Apple has never been known to make their hardware easy to access. The video signal is a 5v TTL pulse, with a low representing a white pixel and a high representing a black pixel.
Will this be possible with the Prop? One option I'm considering is swapping the oscillator with a 16 MHz version, but I cannot find information on exactly why Apple chose such an odd frequency in the first place and I'm not sure what, if anything, the increase in frequency will do.
My reasons for doing this project are basically sentimental, but it should also be fun.
Comments
-Phil
Anyway, this is a problem. I cannot simply read the signal and act upon it since each pulse represents one pixel. Anything other than a 50% grey pattern will throw this off. I must sample it with a generated pulse.
It is. My plan is to read the pulses and set the pixels, possibly using Kye's bitmap generator. The signal will be interpreted, not fed directly through. This will affect the speed, but not too badly if the Prop is running at 80 MHz.
Run the prop at 7.8326MHz with PLLx8 for 62.6608MHz clock rate.
Use a Kurenko's 20Mbit receive (that uses counters), it will now receive at 15.6672Mbps. Use WAITPEQ to synchronize the reads to Mac's HSync and Vsync. You need 3 pins for input.
Receive the 512x384 bitmap into hub memory, it takes 24576 bytes.
Run another cog generating XGA-like timing with at 31.3304MHz clock, ie double wide pixels. Display each scan line twice.
Presto, scan converter from original Mac!
Its actually pretty easy.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
Actually, the screen is smaller on the Plus. It is 512x342, or 21888 bytes (if it really matters...).