Oneironaut wrote:
So, I really do look forward to seeing what the 6502 programming gurus can make this thing do! My games and demos will be fairly basic until I get my 6502 Kung-Fu finely tuned. When I see a C64 pull off plasma effects, it is amazing considering the slow 1MHz speed and sharing of the bus, so I can't wait to see what will be possible here. Even my PC can't fly around a 1024x1024 bitmap with 80 sprites layed over it without some jitter. Seeing a 6502 do it at a perfect 60 frames per second is great.
Brad
Okay, some thoughts.
I'll write this much. From my point of view you need all the good information you can get:
With regard to learning new techniques, maybe let some of the 'demoscene' people find you, and let them program for the system. You'll soon be able to learn many techniques that way, if they choose to try out the system (I don't see why they wouldn't).
With regard to seeing what can be done with the system ===effectively===, from a game's perspective, I'd say make sure you have a pretty good and simple game running for it, and then see how it works and how it performs from a professional hardware-wise point of view. If it performs well, then the sky's the limit.
I'm sure my words won't ring well in the ears of those who swear by 'c' and the "oop" practice, but here's truth: The so-called "well behaved" style of programming is essentially the blight of 'political correctness' brought down into the essence of programming, in order to destroy it. Take for example changing opcodes 'on the fly'. Is it dangerous? Sure, it's "dangerous" to whomever is trying to control each byte of your program, or to the deficient programmer who tries to understand your work to ride on it and trash you along the way. They indoctrinated young programmers with this kind of misconception, and the indoctrination worked quite well for them. Look at things now, when 1MHz systems can not be matched by 2 or 3 GIGA Hz systems; and it's getting worse, but it's getting good for me.
So yeah, it's a fact that your 'pc' (running who knows what speed) can NOT outperform or even match to precision a simple 1MHz 6502 with good hardware, in terms of smoothness and perfect video display. It wouldn't outperform it even if they brought it up to a cpu clock speed of 10,000 GHz while keeping the 6502 under 1MHz. It can't do it because of principle. It's not the speed, it's something else. Solid principle. All "old school" professionals know this intrinsically, and I'm sure they laugh at hardware designers today as they come up with ridiculous ideas such as "adaptive vsync", to try and "correct" really basic hardware design flaws; I know I laugh at it myself.
The 'philosophy' of pc-style systems and those working for it has always been based on business without regard or respect for any truth outside of business-thinking. For example, we have 'folders' instead of directories, 'libraries' instead of kernals (not aimed at you by the way, just truth), 'notepad' instead of a text editor; web pages with dark text over a white background (instead of the smarter darker background/brighter text contrast -- brighter backgrounds being used, I'm almost sure, to resemble office paper, go figure); "opening" a program instead of running it, and "administrators" in our own personal home computers. And let's not even mention keyboards which come in different "flavors" and that sort of nonsense. Their 'philosophy' is different. Talk to them about 'objects', 'structures', 'classes', 'frameworks' and "privileges", and they'll like you if you're one of them. Dare to mention concepts like gate propagation delays, synchronized timing or even the word "assembly" itself, and you'll see what they're truly about. To them, JMP's are "illegal", "goto" commands were banned in college and 'good graphics' means nothing more than a flat static high resolution image on the screen; 'sound' is nothing more than a 'wave' file and games were silly things made just for children; and right up until they saw money in the word 'game' itself, that word was merely something to be avoided and despised in their "computer world" and in their eyes. But none of it changes the facts, though.
Now those same people are the ones making games and game consoles, if you can believe it, and they truly think they do make better games than the real thing just because they have smaller pixels, more colors and more RAM. And on top of it they really think that a high level language is better than the real thing and that using "drivers" is better than direct hardware access. Right.
The pc, as a computer, has always been a mediocre system from the ground up in terms of design, even with this day's improvements. It has always lacked. It has succeded in persistence, but it is lacking in technical terms. When the pc-xt ran at "4.77"MHz, for example, in truth it barely ran maybe a little over 1MHz because the clock had to be stupidly divided by four due to poor design choices. The pc keyboard is read serially through a microcontroller (talk about overkill), and this microcontroller can and in fact does interrupt the CPU when a 'key event' happens. NOT necessary, not good. I heard once that the reason they used a microcontroller for the keyboard was because they had a whole bunch of microcontrollers laying around and they wanted to find a market for it. Well, they found a market for it alright, but look at what cost.
So which method works better for a smooth game, would you say: Reading the keyboard serially through a middleman and compromising the entire architecture's and system's steadiness each and every time the player presses a single button, or peeking the state of the key matrix itself, straight from memory and directly from the 6502 without any unsync'd interruption? The latter, of course.
Furthermore, for a game and between two systems, how can the game response be comparable at any rate, when one system reads the input(s) serially, while the other one detects TTL changes in parallel, at the gate level itself and for each single button 'in real time'? The answer is there is no comparison there. How could the lower system ever hope to match the better system while working on that basis? It never could and it never would, that's the fact. The best it could hope for is to achieve some kind of approximation to the better system; it would be an emulation, that's all. Never the real thing.
The first time I looked into the pc to program it, I knew the design couldn't be very good when I saw that the system issued a hardware interrupt -of all things- if a division by zero was attempted. I remember that I laughed when I first saw it.
Here's a little test for you or for the reader, in order to help you open your eyes a little more to see what you're REALLY working with when you're working on any 'pc': Make a simple boot up program for it to run a loop, to flash a screen white and then black repeatedly, more or less let's say 700 times a second, and with each change send out a bit through some port (if there are any to be found still), TTL high for the screen white and then TTL low for the screen black, for example. If you do it correctly, you will see for yourself on the screen and on the oscilloscope why you can never get perfect true video display from a pc, not with the state of its hardware. Look at the waveform. Try pressing some keys too, for added effect. [To those without an oscilloscope: (not sure if this works still), run the same program and turn on a regular radio receiver set to FM and place it near the pc. Then tune in to different frequencies until you get a certain 'sound' which you will know comes from the pc. Once you get that sound, LISTEN. If you can, record the sound with any sound recorder and place the recording into some graphic audio editor. Examine what you get and think for yourself.]
Try the same, if you can, on a C64 or maybe an Atari 2600 and note the difference. HUGE difference; no comparison even.
So if you can't get true steadiness even without an operating system running (ruining it) on top of your program, how could you get it at all?
The pc is not a real time system and it is not steady. It lags everywhere. 'Everything' with regard to steadiness on the pc must be a simulation or an approximation of steadiness, and it all goes right down to the hardware itself, but there's hope. We have 'acceptable-to-good' sound from pc's because the ear would never accept the abuse that's constantly going to our eyes and brains (from unnecessarily unsync'd video -- on purpose?). To this day I'm still not sure what the real agenda of the pc video card industry is, because one single bit would have made all the difference in the world, and I'm sure they must know this themselves quite well. Maybe it's also about money after all. If lawmakers knew full well of the 'video assault' we're being subjected to, pc video output as it is would be illegal.
In turn, while the C64, for example, was built with the hope of selling well and making some money anyway, of course, the underlying philosophy and design concepts used to make it were all based on game-making first and foremost (as far as I know), with every possible respect for the truth of the hardware and for the truth of video and sound. All their design decisions seem to have been made with these things well in mind. The results speak for themselves right to this day.
Me? I don't want to go back to the '80s. I want to make it better for myself with today's good improvements. The higher they must push clock speeds in order to run their high level languages and feel good about themselves, and the more memory space they must come up with in order to store their wasteful programs, the better that it is for me. My programs and my hardware will always run faster and they'll be smaller. They'll always be better and run better and smoother as a matter of simple math. It's just the facts, just how it is. If someone ever bothers to make GHz 6502's, I'll be there just for the fun of it.
I (used to) program hardware games, mostly unknown but nevertheless they were there.
Sometime during the '90s, when I realized that pc's were getting fast enough in terms of effective clock speed, I saw that I could base my games on it and still have professional output; with a bit of 'tweaking' done to hack the hardware against its lackings I was set. So that's how I was able to overcome the pc's blunders with some internal and external circuitry attached to it, going from something as simple as the parallel port and the vga port itself. In terms of perfect output and gameplay, there was no difference between my systems made this way and the hardware I'd designed before. That's what the oscilloscope said as well. I achieved those results because I 'forced' the pc hardware to work for me instead of having my game work 'along' such a hardware while dragging its design errors left and right. It wasn't pretty or innovative in tems of design, surely enough, and the motherboard had wires coming from it like you wouldn't believe, but it was cost-effective and a very fast way to make games that worked. The competition was none the wiser. Little did they know they had a little neighbor right next to their expensive machines running from a cheap pc clone made in taiwan or somewhere like that, and outperforming them all the time. Of course, soon afterwards they started to get rid of the parallel port, so I used parallel cards instead. When parallel cards got scarce I used the PCI bus. Now they're getting rid of both the PCI bus and the vga port, switching them for some serial idiocy. So now once again I'm considering designing my hardware from the ground up but with today's technology. The times. Just a little reference.
Please excuse any error in the text. Quick run.