sburrow wrote:
I... do not know exactly how to read simplified block diagrams apparently. I get where you are going. I'll try my best.
in case the big "MUX" is a bit confusing, that thing basically just represents your Address/Data Bus Multiplexer.
sburrow wrote:
The User RAM and the Video RAM are separate. I would see this system something like 6502 + 32K User RAM + 32K User ROM + VIA I/O, and then I said, "Hey wouldn't it be nice to add VGA to this simple circuit?" So I put 3x 74HC244's on the address bus and data bus, and connected the other end to 32K Video RAM which 'shadows' the 32K ROM area (read comes from ROM, write goes to RAM). VGA reads from that Video RAM through shift registers.
oh wait, i'm stupid.
i just saw that you had an updated schematic further down the thread. i read through the whole thread but when doing the diagrams i used the one from your first post where it only had a single RAM IC, so your description here really confused me for a second.
sburrow wrote:
The problem is how do I set up the timing of the VGA? That's where the counters and Video ROM comes in. I programmed it in binary to send out signals at just the right time. So:
Counters -> Video ROM -> Sync Signals
and
Counters -> Video RAM -> Shift Registers -> RGB Signals
and
6502 -> Video RAM
yea looking at the correct schematic this time, i see what you mean. quite clever to use a ROM as replacement for logic!
sburrow wrote:
The only 'talking' the 6502 can do with this VGA system is through those 74HC244's and only at very specific times when the VGA circuit doesn't care (because it's shifting instead of loading). The rest of the time, this VGA circuit just does it's own thing.
I hope that answers some questions. I do not share any RAM or ROM, they are completely separate from one another. Only the 6502 has access to the VGA circuit, and only at very specific times.
EDIT: Yes, after looking over those diagrams again, I see that it is the SECOND one you have there. Yes exactly. Thank you!
yea, again sorry i looked at the wrong schematic... and the second diagram is closer to what you actually made.
and that makes me wonder if it would be possible to adjust your system to have the CPU and Video Circuit (VC) running at different clock speeds. it would likely require a few extra octal D latches between the CPU and VC, but it would allow you to run the CPU faster to do more work!
hmm, something to think about.
sburrow wrote:
I'm already thinking of modifying the circuit a tiny bit to include more colors. I am fixed on circuit's timing, because it works and I don't want to mess that up. But I'm seeing if I can squeeze more colors out somehow, perhaps through a color palette that is preloaded during the back porch time frame. Though, as George taught me, timing is very critical to making this all work nicely.
i assume you're using 640x480 as a base resolution, and then just draw every pixel twice, and every line twice to get 320x240 (that's how i do it atleast)
so standard 640x480 timings would give you 160 cycles @ ~25MHz or 20 cycles @ ~3.13MHz between each visible line (except the last one because that has all the vertical blanking).
question is, is that enough time for you to load a color palette for each line (or every n lines)?