Jump to content



Keatah's Photo

Keatah

Member Since 16 Feb 2004
ONLINE Last Active Today, 1:18 PM

Topics I've Started

Rebuilding today's emulators - to perfection!

Thu May 24, 2012 3:24 AM

Rebuilding today's emulators - to perfection!
It's been a great many years of classic gaming emulation. For me it began with Microsoft Arcade and the Activision 2600 ActionPacks. Those and the likes of DASarcade and Sparcade. Not forgetting Digital Eclipse's 6-pack. Or how about Mike Cuddy's Gyruss audio emulator! Anybody remember that one? Well, just having the opportunity to bring home the classic games we played as kids it a wonder in and of itself! Or perhaps you've a love for the home systems such as Intellivision or the VCS or Colecovision. Same thing. So if you're an emulator author or a rom dumper; a tip of the hat for making it all happen.

A problem
One big stink I have with all emulators is how they are architected. On one hand we have the small operations like the now-defunt PCAE and z26 that are really just about bare-bones and would run on a fast 486. Then we have huge Department-of-Defense mainframe-sized code of MAME and MESS; both of which are a big mess in and of themselves.

Considering today's i7 processors (I'm sure we said the same thing in the Pentium MMX days too) this seemingly bloated code isn't much problem nowadays. Sure bloat is inelegant but who gives a rat's ass? It runs your games and that's good enough for me. But I think we can do better. Not in shrinking shit down, but by adding to it even more!

An emulator written in the 486 days was pretty bare bones, it only got the necessary things 100% right, like the core logic of the machine being emu'd. This would be like making sure the TIA and 6507 are doing things correctly. That's a requirement. If that isn't done right, shit, games won't really work will they? Next comes the output, sound is easy and few emulators have difficulty with it. So we won't touch on that.

And yet, at the same time, I like the modular approach of MESS and MAME. All the modules, the cpu cores, the input sub-routines, the sound modules, custom logic gate arrays. All defined as libraries. All that shit. I don't fully understand the inner workings of any emulator beyond pointing it to a rom and pressing the start button. Nor do I give a shit. As far I'm concerned the flowchart can deep-six itself and I'm just as happy. Get in, start the engine and peel out!

Don't get me started on JAVA based emulators. This is all the wrong language and way too high-level to do emulator development work in. I'm not a programmer and will never have the desire to learn beyond
10 A=A+1
20 Print A
30 Goto 10
..but I can tell you from using several Java and web-based emulators that they just plain suck. I don't care how you rationalize it, I don't care if you spent 3 years making it and it won the nobel prize because it can work on a machine no more powerful than a 4004 and emulate Crysis in DosBox. Just shut up about it. It can solve world hunger too! I don't wanna hear it!

But back on point. It is the modular approach which is of interest; and we need to expand it one more step. And a monumental step it would be.

Some things we need to look at
Like all the pre-made Z-80 cores and libraries used in modern-day emulators and what not - we need a CRT core. We need a real CRT emulator. This would be one chunk of code, completely separate and independent from any existing emulator. Totally stand alone. Stand-alone-enough that if you were to run it it would either give you a display full of black and white snow or a black screen. Don't insult me by flipping between a few screens of seemingly random dots at high speed. That is just lame.

This "module" if you will, that I am describing, is a standalone bit of code that simulates to the best of its ability all the characteristics of an analog CRT assembly. This would include simulating, in-depth, the following:

1- the standard faire of analog circuitry in a real TV chassis and assembly, the amplifiers & filters
2- flyback voltage and acceleration
3- horizontal and vertical amplifiers and drivers
4- electron gun operation
5- beam sweep
6- vertical freqencies of 30Hz to 250Hz with 0.1Hz granulation
7- color subcarrier of 3.57MHz
8- horizontal freqencies of 24kHz to perhaps 500kHz, again with 0.1Hz resolution
9- variable video bandwidth, beginning at 4.5MHz ranging to some big number like 50MHz or something
10- power supply variances
11- the various CRT geometry & picture adjustments we all know and love, like H.hold V.hold, contrast, color, tint, saturation, hue, convergence, pincusion, keystone, brightness, black level, gamma, tone, H.size, V.size, linearity, sharpness, bleeding, artifacting, fringing, resolution, color separation. All these things, and more!
12- a comprehensive examination and study of a selection of perhaps 50 different aperture grilles and phosphor masks
13- the same comprehensive exam of the phosphor chemistry itself, emission rates, phosphor persistence, glow, spill, color tone.
14- the nuances of how and where the input signal degrades and is "rebuilt" or amplified and reinforced
15- magnetic field interaction in the CRT tube, especially with the deflection coils and the point where the electrons leave the gun
16- the timings of the beam movement, the sweep, the retrace, or in the case of vector monitors the x,y movements and accelerations and delays
17- the interactions of the tube as a whole with its accompanying driving circuitry
18- as a catch all, consider the analog noise, hysteresis, instability, variances, all the things that must happen to a signal coming down the wire into the set.

I believe that with this type of CRT module we could cover every game system and computer system safely and accurately. Every system that ever used glowing phosphors as a means of output. Once this massive work was completed (it could only be a team effort) it would be made available to every emulator author.

In a sense we have some of this already with the modern GPU and programming libraries like SDL, openGL, DDraw, DirectX, and others. But it is all in pieces and it doesn't address the workings of a CRT. We have the tools to *DO* these things. But none of it is packaged nicely, yet.

Why bother with this shit?
Understand that development of any emulator has to encompass game logic, I/O, memory and storage, processing, bus structure, and certainly custom chips.

A whole buncha that stuff translates nicely and cleanly into code that runs quickly and efficiently in today's systems. There's processing power to burn when you're running software originally intended for a 1MHz CPU on a chip that can give you 4,000MHz. All those things are merely translations and substitutions and different arrangements. They're just data bits in a memory cell or perhaps cruising through registers and accumulators or getting their jollies in a pop stack instruction! Ha! That's all under the hood..

A proposal
If it's one thing every emulator author needs to contend with (especially home consoles) is building up the image for display. The one thing in common back in the day was the NTSC television with it's associated RF signal cable. That was standard. Every console had to be built around that display interface. Today we have like 20 different ways to connect display devices together and 50 different resolutions. We need to simplify this. I say we get to work on engineering a CRT emulator. Write a universal module that will accept input from any emulator and simulate (you can't really emulate analog) what goes on inside the CRT and its circuitry.

This would be a separate process running on it's own cpu core. It would have a separate set of controls, just like on a real TV or arcade monitor. It would display static or a blank screen if there was no emulator attached to it.

It would eliminate having to build in TV effects to all emulators. It would make all of them (assuming they were updated) pretty much standard. It would simulate a few select brands of TV's, no need to do them all. It would be resolution independent. Just giving you the basic NTSC capability everybody had in their home at the time. It would include an arcade mode, taking into account characteristics of a variety of displays from the era. MAME does some of this. So does the newly-installed-in-Stella Blargg filter kit.

Blarrg filtering does not capture the inherent noise and shimmering of the image. Take a jewelr's loupe and go close to a real CRT. Look at all that activity going on! You've got dancing pixels, static, all kinds of analog noise, and different colors in different amounts in nearby pixels intending to be the same color. There's colors mixing with other colors. Almost a metallic quality. A visual hiss! Filtering kits, as they now stand, don't even consider this!

A CRT display simulator needs to be an entirely stand-alone module with a simple interface to whatever emulated game consoles you're playing. Let it worry about scaling and sizing and colors and phosphors and all the baggage that rolls with the display technology of yesteryear. It would provide all the distortions and imperfections by itself. Emulator authors could concentrate on game logic and getting that down pat.

I believe the CPU power of today in combination with the best graphics card can't handle this. To make it more difficult - if we're going to do this on CPU power alone, then, we'd better wait till Skylake rolls around. All this CPU power will be needed to scintillate each pixel individually and separately in a way that best replicates behavior of a real CRT.

Precisely what is wrong with VCS paddle emulation ..

Wed May 23, 2012 3:36 AM

THE PROBLEM
Breakout breaksdown, Kaboom! goes BOOM!, Video Olympics becomes the Special Olympics, Circus Atari is a real circus, and WarLords battle themselves like drunken soldiers. What the fuck is wrong with Paddle emulation??

Let us examine the problem in depth. We must also remain cognizant of the style of controller we are using. We grew up and learned to play Paddle games (not that whacking your sister in the ass game) with a real spinning knob, a real rotary knob. Making the jump to a straight-line type of motion dictated by the mouse is certainly going to be different. Yes. Though it's not as if we're playing tempest with a keyboard or flight simulator with a trackball. If done correctly the differences will be minimal and we can transition over nicely. It begs the question of purity. How pure of an emulation do you want? How pure of an original experience do you want? How much in-between?

If we stay with pure emulation, that means using PC hardware and only PC hardware to recreate the classic gaming experience. This means keyboard and mouse, box and monitor. Roms are to be loaded from your 12 terrabyte hard disk and you get upset when your I7 shows more than 2% usage while jamming Slot Racers or Math Grand Prix. Perhaps you might use a PC-style joystick. That's all you get. It's up to the programmer to re-create the Classic Gaming Experience using just that hardware. Nothing else. It's up to the programmer build the best possible emulator. The bit of software that makes your system think it's something else. The only "original" component allowed here is the ROM code or Game Program as I like to call it. And it must be loaded from some form of PC style storage, like that 12TB HDD!

If we go with 100% original experience, that will mean no emulation. This means effectively playing on a real VCS with a real glass non-flat CRT tuned not 100% accurately to channel-3, and a real Atari-factory-made Paddle or Joystick controller. No Harmony cartridge either - only real cartridges with original masked ROM chips, or the later-day variety that used fusable links or diodes, also known as PROM's. It also requires a shag-carpet floor and harvest-gold appliances in the kitchen and wood paneling in the basement. With 80's music being played on cassette or LP vinyl. That, my friends, is purity!

And there's the hybrid in-between experience. This usually involves a PC somehow, either for running emulation or stuffing a Harmony cart to be used in a real VCS connected to your computer monitor via a video mod. You might have built-in a pause circuit too. Perhaps it could be Stella running on a PC connecting to a CRT monitor. Or maybe running with a modern-day flatscreen and turning on Blargg effects. You might be using any number of various controllers, flightsticks, gamepads, through USB and bliss-a-boxes, the old-skool SoundBlaster analog port, or perhaps a Stelladapter with real VCS controllers. Shit, you might even have built an FPGA interface to a real TIA or RIOT and have re-wired the 6 control switches to the F1-12 keys somehow. Maybe you've even built your emulator into a real arcade console! Whatever the mix it's sure to consist of the old and new.

Tonight we will be concerning ourselves with 100% pure emulation and making sure we get the best possible experience with PC-only hardware.

Having said that, know there are are subtle, but very real, tracking errors in Mouse-Paddle emulation in Stella. This is disruptive to a positive experience when playing fast action Paddle games. There are FOUR distinct issues surrounding Paddle controller games we need to explore in response to gamers' statements citing "The emulation of the Paddle isn't right!" On the surface this manifests itself as lag-time; when in reality it is much more. In fact we will soon see that lag time is not significant at all!


BASIC TEST METHODOLOGY
Let's take it from the top and set some things straight. We will burn away the irrelevancies until the core failure modes become crystal clear. In visiting the phenomenon of lag it is important to know where it comes from. The lag in my particular monitor and rig is 8.6ms. This is not some figure I pulled out of my ass or came up with by reading by specification sheet that mentioned the monitor's refresh rate, but by actual measurement with an oscilloscope and timer/trigger. It corresponds nicely with the 125Hz standard refresh rate of a default Windows XP installation and standard Microsoft drivers. How? What? Let us take it apart and see what we can see. Be aware I'm describing a worst-case for anyone using a Windows XP based system.

Consider this measurement. It begins from the physical mouse movement, through the digital camera in the mouse optical pickup, though the usb cable, to the usb chip, to the ICH southbidge, to the northbridge & memory controller, then CPU & memory, then graphics chip, through the DAC, out the vga cable, to the monitor's ADC, internal conversion & scaling circuits, and then to the pixel array block, and it stops with the complete flipping of the LCD crystals. Your mileage may be different and your signal route may take slightly different steps. But the map is the same. Basically it's the whole path from Mouse to Pointer. This test takes into account all the interrupt delays, and usb polling delays, and software processing delays. You get the point - it measures the time of the whole chain of events beginning with the time you move the mouse till the time the cursor moves onscreen.

Let me comment that the monitor typically adds in another 1ms. My test monitor is spec'd for 8ms response time, but that is a complete change from black to white or vice versa. Partial changes may take longer to complete. Making your LCD monitor go from RGB 0,0,0 to RGB 255,255,255 it's gonna snap almost instantly. That's the factory spec, here, of 8ms. Going from RGB 120,120,120 to RGB 150,150,150 is going to take a lot longer. This is because the voltage difference isn't yanking the wanker as hard. It's a gentle change and the pixels tend to drift over to the new value. Some monitors will yank the pixels real hard in one direction and then upon arrival at the new color, stop and apply the correct voltage to maintain the new color.

The photodetector I am using to sense a pixel change is looking at any change, so it will consider the "job done" somewhat ahead of time. More like 1ms! It detects the pixel's intensity change before it's half-way-through the complete flip. But that is good enough for our testing. If not excellent! It also simulates results as if we had $4,000 state-of-the-art LCD display. Grand!

In slow response monitors you can observe the entire 8ms flip time as an ever so slight dimming of the edges of a moving object. This is the nature of LCD displays. This is not really relevant here. Nor is the time the monitor spends processing and flipping pixels. These little delays are not cumulative, they're not significant, they don't add up to anything affecting the operation of the Paddle controllers or how the onscreen game elements interact with your perception. If it helps to know, I tried the same suite of tests on an analog RGB monitor with no processing overhead and came up with similar results.


THE PERFORMANCE NUMBERS, WHAT THEY MEAN AND WHERE THEY COME FROM
Windows' specification has the mouse operating at 125Hz rate, or 8ms delay between mouse movements and pointer activity. Check.
Software watching the USBPORT.SYS polling activity sees a PEAK performance as fast as 130Hz & 7.65ms delay. Check.
The same software reports an Average time of 117Hz & 8.5ms. Check.
My test rig hardware reports an Average time of 104Hz & 9.6ms. And Check..?? Yes..

So I say all three sources, the mfg specification, hardware test, and software test are all in agreement regarding how long it takes to process the mouse movements. The 1.1ms difference between what is reported by my hardware test rig and the software also takes into account the monitor delay, including processing time onboard the monitor, and pixel flipping time. These are highly repeatable tests.

Let us be generous here and toss in 2ms of extra time so as to account for other system activities and disk access and shit like that, maybe some stretching by the monitor scaler. So as a raw baseline I've got 10ms inherent delay from the time the mouse is moved till the time something onscreen happens, that's what this specific system can offer to any program making use of mouse as an input device. 10ms! That's what the host system can advertise. And we are erring big-time on the slow side. I believe 8ms is constantly being achieved. But 10ms sounds good and accounts for minor system activities and housekeeping distractions..

Be aware that I didn't overclock the mouse, nor is it a special m0dDerZ BoISe "gaming" device festooned with 50 buttons and 6,000 dpi laser sensors. It's a shit-ass Microsoft business economy mouse. I believe that other systems more powerful or even older than this test system will have similar performance because this all low level and standard across the board for all Windows' systems. This 10ms delay is based on bus counters within the system. There is nothing special about my system. This is timing is sourced on fixed in hardware. It is known as the USB mouse polling rate. This rate, however, can be changed by editing the USBPORT.SYS file. I can set my mouse refresh rate to 1ms and 1,000Hz and get even better performance. In fact with the higher polling rate, we can bring the system's pointer response time way way below what the monitor can ever achieve. But for these tests, it's not beneficial or required to do so. By the way, I'm running the monitor at 60Hz refresh rate. I could go higher, but this seems to be average. This 60Hz rate is what the image and pixels are refreshed at. It is possible to set the monitor pixel refresh rate, and the image refresh rate to be different (or the same). This is similar to what you know as vsync. But with modern LCD's this can become ambiguous. As they may do processing and scaling, and in some designs the whole image may not even be updated; but only sections, and at different rates. A pseudo refresh-rate, if you will. Where the image is presented to you at a certain rate specified by your system, but not at the rate at which the monitor paints the picture. Vsync within vsync separated by a buffer! It also bears mentioning that the best of the best gamers can generally feel a lag time of 50ms between the time they do something and the time they note it on the screen. So that effectively eliminates LCD monitor processing time and system processing time from your perception. It's irrelevant here. And please don't spout off shit saying you can tell the difference between 5ms and 35ms ping times when playing online games. You can't. You may see differences when this time become cumulative and the "game" has made a number of calls to the server. When several packets have been sent and received and the game has to wait before updating the screen, THEN, and only then, do you complain about a slow internet connection. Many packets going back and forth with a 25ms lag will add-up. And they need to add up to about 50-60ms. Then you start whining to daddy about getting a deluxe internet package! Understand that the processor may need to complete many exchanges and the already-fast 5ms ping times now become multiplied perhaps 10 or 20 times before your screen gets an update. It's this multiplying effect and cumulative delay of those many packets that irritate your fragfest.

Well, the advantage here in Paddle emulation is that the cycle is what it is. There are no cumulative delays that build up and then get output all at once. No waiting. For all practical purposes, the lag and delays described above are fixed, and very short. The host SYSTEM won't magically insert 200ms mega-delays unless it's underpowered and has to service other interrupts. Monitor lag and polling rates are not like a network game, where communication lag can build quite quickly. So the point I'm making is the video hardware is providing a solid steady timebase from which to work, and that is 10ms!

Not a series of 10 5ms lags building up to to 50ms delay, or another series perhaps 16 35ms transmission lags topping out at 560ms! DEADLY! The most lamest gamer can easily discern 50ms from 560ms. Yeh?

I conducted these tests with reasonable accuracy and in the spirit of what I described above. But we are going to make this easier and look at it in a way that eliminates a lot of tech-speak and is easily doable by you, right now. This can be done by everyone with no additional hardware or software. We will test with Kaboom!, and Stella, and your mouse.. Kaboom! is an excellent choice here because it is the best of the Paddle controller games for going down the rabbit-hole of time. It tends to distort time perception and drills you down pretty hard. Milliseconds can feel like minutes during parts of the game. It is in this state that you can best get a feel for the unresponsive crap emulation of the Paddle controllers.

Now that the explanations of the sources of system delays are out of the way, we can now look into the four things that are wrong with Paddle emulation in Stella. Four things.. Let's take them one by one:


1- 1:1 PROPORTIONAL POSITION - The position of the game element(s) does not track linearly or reliably. I flicked the mouse back and forth within a clearly defined and specific area and eventually the game pieces, the buckets, end up on the left side of the playfield. Consistently. So I made a more accurate test instead of flicking around aimlessly on the desk. I dumped the mousepad and built a new one. I took a styrofoam block and covered it with a black cloth to ensure good tracking. Then at both left and right ends I set up some goal posts. So this is looking like a mini football field now. I put the mouse in the center and started the game. I first made sure the buckets were in the center of the screen more or less, by way of lining up the left edge of the bucket with the "n" in "Activision" as a reference. I moved the mouse left 3cm and then right by 6cm, then left 3cm, bringing it back to the starting point of 0cm. This should return the buckets to the center position. It did, almost, maybe a pixel off. In the left direction. I repeated the test a little bit faster. And it did it again. This time another pixel off. Cumulatively we're two pixels off-center now. Maybe that's not a big deal. It's getting there!

Hmm.. What's going on?? So I did it even faster! How much *is* faster? Level 2 or 3 on Kaboom! That's a good indicator. Ahh hah! It is then that I noted, again, clearly the buckets aren't returning to the exact center, but a pixel or two further to the left instead. Moving up to level 4 and 5 the effect is a little more pronounced. Understand I'm not playing the game for points. Just using the levels as references to illustrate the speed at which I am moving the mouse pointer. The rate of error accumulation is dependent on speed, and the error is cumulative. And if you constrain the mouse to an area like your mousepad, then eventually you need to pick up the mouse and recalibrate its position by starting at the left edge - because that's where the buckets eventually end up if you do a steady rhythmic left-right motion.

So if I was to play a game for real, eventually the mouse ends up knocking against the right "goal post" in my test fixture. This demonstrates less sensitivity on left-to-right movements.


2- ACCELERATION DELAYS - The mouse movements have a start up and slow down delay, almost as if the mouse is connected to on-screen game objects via rubber band. There is an 53ms delay (in Stella, on my test rig) from the time you move the mouse till the time something happens on-screen. This is the lag caused by the emulator alone. It's 63ms if I include the hardware delays and Windows processing time and monitor time. It is seemingly non-linear. The sharper the movement from stand-still the more noticeable the effect. And the buckets do not track exactly. Once you move the mouse, the buckets will accelerate up to tracking speed, and then move with a 1:1 velocity. And then when the mouse stops moving, the buckets will continue to carry on like an object with real mass & momentum that tends to keep moving once in motion. They slow down over a period of time and come to a stop. This is acceleration and deceleration period is typically 15ms - 33ms.

Problem is if this momentum is "active and happening" (within the 15 - 33ms) when you do an abrupt direction change, tracking is lost and your movements get thrown into a black hole, not registered. Not registered until the 15-33ms time elapses then a new tracking lock comes online. And the game element stops and reverses. Look at it this way - say if your moving the buckets left in a steady state motion and snap to the right, the initial snapping motion is lost while the buckets brake to a stop and then accelerate toward the right. Tracking is just not absolute. To make matters worse - this phenomenon is without a doubt biased, with left-to-right reversal movements being less accurate and sensitive than right-to-left. This means that moving left, stopping, then moving right is less accurately tracked. Moving right-stop-left is less likely to miss pixels. So the ultimate effect you notice is the game element creeps to the left! I will explain this and PROVE it in the next section as well as reveal another error in Paddle emulation.


3- SLOW MOVEMENTS - I connected the mouse to the minute hand of a clock with a bit of thread. And I put the clock near the left goal post of my test rig. So that as the minute hand moved, it pulled a string which dragged the mouse across the mini football field. With the clock on the left side goal post, mouse in the center, I watched and waited. Eventually the mouse and on-screen bucket moved left and that is to be expected, slow, yes, but it tracked it. I had started the minute hand at 4 and ran the test for 20 minutes, stopping it at 8. That gave nice slow almost linear movement, and the mouse covered 3.8cm distance. And the buckets onscreen moved from center to the left side of the screen. Just about perfect.

I redid this test on the right side, with the mouse being pulled the same distance of 3.8cm, but to the right this time. And this showed a problem. The clock hand pulled the mouse alright. But the onscreen buckets did not move one iota, zilch, nada, nothing!! They stayed right in the center. Apparently Stella cannot track slow left-to-right movements. It seems the mouse velocity needs to be higher when moving to the right as opposed to the left.

Again this shows how the left movements are accurately tracked. You could argue that the right direction movements are being tracked correctly and that there is some hysteresis present so as to ignore some noise. In that case, you are then required to say the left movements are introducing extra counts someplace. It's all relative.. Which one is really correct?


4- GETTING STUCK IN HARD STOPS - This is best described as stuffing the buffer. This is what you do. Position the buckets in the middle. Move them a bit left and right. Works? Good. Now. Move them gently and carefully to the left edge of the screen border. When they stop moving, you stop moving the mouse. Good. Now, move them right. As soon as you move the mouse, the buckets begin moving with you. Great! Just as it should be. Absolutely fantastic! Eh?

Now, let's do the test again. Start from the center and test your mouse, is it working? Perfect. Now, move the buckets to the left edge, just like before. But keep moving! Try as hard as you might to scroll them off the screen and into oblivion. Maybe if you try hard enough they'll pop out the side of the monitor! Wouldn't that be cool if our classic games could escape the confines of the on-screen playfield and spill out of the monitor into the real world? I once had a dream about that you know. Well.. Keep trying to scroll the buckets left for a moment. Pick your mouse up and do it again if you run out of desktop space. Once or twice is good. The point is to try and bury the buckets and make them get stuck. Then stop. And here's the PROBLEM part! Now try moving them right again. You will notice, quite distinctly I might add, that they do not move immediately. It's as if a buffer has to be emptied or "lost-ground" needs to be made up. It's as if they really did scroll off the playfield, way out of sight, and now you have to bring them back from the ether. The area outside the monitor. Once the invisible off-screen ones come back into the playfield, we can now resume the game.

Incidentally, the effect is more noticeable on the left side. But it still occurs on the right side. I'm tired of measurements and tests, so I'll just estimate an imbalance of 60/40. The left side has a bigger buffer that can hold 60 off-screen "clicks" whereas the right side can only do 40. Who gives a fuck?

Now, note in a real VCS that the Paddle controllers have a hard stop. They can move from the 7 o'clock position to the 5 o'clock position. And that's it. The position of the buckets are directly proportional and exact to the position of the paddle dial. That's a no-brainer. The game's edges correspond exactly with the Paddle stops. As it should be. If you were to magically increase the sensitivity of the real Paddles by changing the resistor values, you'd see a similar effect. You'd need "unwind" the "buildup" or recover the lost ground before bucket movement would begin.

I don't observe any of these 4 issues as being specific to any one game. It's across the board.


COMPARING AGAINST WINDOWS AND THE PLAIN POINTER
To be thorough, I repeated these tests with a plain desktop and white arrow windows pointer. I made a Target icon and put that on the desktop, and centered it. A good reference point, don't you say?

I moved the mouse seemingly 100 times in either direction. Never hitting a goal post to stay near center. There were no acceleration or tracking errors. I could move the mouse a hundred times, left to right, at any speed and I could always center mouse in the center - both on the field and onscreen simultaneously. Never did I have to pick the mouse up and reposition anything. I upped it to 200 times and it was still spot on. I upped the speed as much as I could and was whipping it back and forth with great velocity. With some imagination all this activity is akin to a good beat-off, don't you agree? Ahem! And still the pointer stayed absolute and "on track"..

Next, I shot a BB at it with an impromptu slingshot and the pointer instantly jumped x-distance away. Still onscreen though. I carefully backtracked the mouse to center, and pointer was exactly at center. I tried this in both directions. Good results. No discrepancies. Windows tracked fine at moderate and super high speeds. AND at high accelerations too. Trivia: By calculations it would have been 147 G's for a fraction of a second based on stroboscopic timing, mass and speed of the mouse and projectile and times to cover the distance. Physics lessons are also beyond the scope of this tech brief.

All well and good, I did the clock drag test twice. And 2 hours later came to conclusion that the pointer in Windows is spot-on. There were no lost movements. Windows is able to track the pointer seemingly absolutely and equally in both directions. Windows tracked fine at near impossibly slow speeds.

And to wrap up my testing. I scrolled the pointer of the mouse all the way to the edge of the screen. It stopped at the very edge. And as soon as you move the mouse in the other direction the pointer comes right back. There is no "buffer" to empty, no imaginary off-screen pointer that needs to "come back" to the desktop before pointer motion resumes. This works correctly.


NOTE
I used the default mouse settings and basic Microsoft Mouse driver. Changing the settings doesn't alter the behavior, it only reduces or increases the magnitude of the 4 issues. And the settings changes to the mouse control panel options necessary to note different behavior within the emulator need to be extreme to the point where the desktop is now "not-quite-right". Therefore adjusting things on your desktop control panel is not an option.

I also upped the USB polling rate to 1ms & 1,000Hz, thereby providing the smoothest and most frequent updates to the pointer position. There is no change in emulation behavior despite this. All this does is support the fact that the code within the emulator needs to be re-worked. It further strengthens the position that the system hardware is not at fault here.


SUMMARY
These four idiosyncrasies are key to making players complain that Paddle emulation is not-quite-right. For the involved and serious gamer these are show stoppers right here and now. These four factors best describe that ineffable quality that is lost in emulation.

I don't know the exact coding mechanics used in Stella, nor do I care to get involved with them. That is a good thing because I am not biased by what is happening under the hood. It would seem that a little fix'n up is needed to correct the deficiencies described above. Adding adjustments and sliders and tuning options may mask or reduce the problem to a point where problems won't be detected, but that's not elegant and is likely to fail other tests or still feel not-quite-right!

I have no clue what causes #'s 1, 2, and 3; Other than it might be related to how quickly (and where) the emulator polls Windows. I, somehow, think that the "coupling" of the desktop mouse pointer to the emulator is not done correctly. Perhaps the emulator needs to get positional information from a different part of Windows? Maybe it needs to get info from the hardware directly. I have no clue, this is up to the programmer.

Would a custom mouse calibration routine (similar to joystick calibration routines already used in Windows) be of help here? You know, move your mouse to all four corners of the screen and press a button to continue. This way the emulator will have better awareness of how to interpret mouse movements. What about when the emulator can't get pointer information during a cycle? Does it interpolate a position? Does it do nothing?

The emulator also needs to know the limits of movement and perhaps perform a reset of a counter when player objects meet edges - thereby addressing problem #4. This I think can be fixed right away. Without a major re-write of the Paddle emulation routines. I'm not talking about looking at game logic or the 4K Game Program itself. No. I mean the emulator should be endowed with a working knowledge of the range of motion of the Paddle controllers and set hard limits - just like real VCS Paddle controllers, and how they can only go from 7 o'clock to 5 o'clock.

It is these four factors that are conspiring to create the illusion of lag here. But if lag is the problem here, like so many think, then I invite someone to write a compensating routine and call it a day. That isn't going to fix the 4 issues described in this tech brief. Just remember that minimal processing is done on the image when it comes from the PC and goes through the monitor circuitry. Yes, an analog CRT will respond quicker but the difference here isn't as much as you'd think. And the little difference is definitely not the source of the problems of playability.


BUT WAIT THERE IS LAG!
If TV lag and processing *IS* a problem and you're being anal about this - I would invite someone to build a simple circuit with a photodetector, and a transistor, 3 or 4 parts at most. Maybe 10 bucks. Have the emulator flash a white screen a few times and measure the lag. Have the photodetector send a simple blip, a low-high transition, to the soundcard. The emulator would look at the time it took to send a white screen to the time it received a tick back over the sound card mic in port. And adjust itself from there.


AND HOW ABOUT SOUND?
But before we wrap this up let us address sound briefly. Sound is not the issue here right now, it has nothing to do with the mouse movement and Paddle emulation. No one has really complained about it ever. For now, I believe the adjustments and sample sizes and output rates are good enough, unless someone is actually complaining about sound delays and shit like that.

And if you want to get anal about this too, you can build in a lag detector for audio. Connect your microphone input to a real microphone (duhh!) and have the emulator send out a tone, when the tone is detected, count the time and adjust playback lead/lag time accordingly. Thereby giving the illusion of perfectly timed sound, another no brainer. And no special equipment is required other than a $10 microphone. Shit, you can plug in your iPod headphones and stuff them in the speaker cone for the same effect.

Perhaps as time goes on and display peripherals take more time for internal processing it may become de'rigueur to have calibration tools such as these. It would be nice to have a monitor report back it's lag time to the host system. But I don't believe mfg's have thought of that as being a critical feature.


EPILOGUE
Much of the essence of VCS gaming is based around the CRT beam and how closely the TIA is coupled to it. Graphics and controlling the electron beam are first and foremost when working with the VCS. Anything else is secondary. Look, programs are structured around how much time they have to work with while the beam is "re-tracing" and blanking. Not only that, of even greater importance is how small and responsive the Game Program code is. There is no room for bloat and useless garbage, every byte counts. It's these characteristics that make programming on the VCS as challenging as playing games on it is fun.

If we are to correctly emulate this unit it is important to capture all the nuances and behaviors. Signal propagation times, controller response times, IPC counts, internal delays, instruction execute times. How does analog translate to digital? How does digital simulate analog? TTL logic flow.. You get the point. There's just a ton of things that need to be synchronized. And no detail must be overlooked. It should be said that emulator authors have an understanding equal to that of the original designers when it comes to the machine they're trying to emulate. Top it off with added translational skills. Skills of being able to transplant all the behaviors of one machine into an entirely alien architecture. They have a knowledge beyond us mere gamers. And it is in *this* context which I criticize and complain about downright suck-ass shit hole Paddle emulation as it now stands; in hopes to make an already fantastically executed emulator project one step better.

I have purchased many bits of commercial work over the years. And a lot of it has changed and metamorphosed into something completely alien today. No longer is it an improvement on the original package. No longer is the original function present. Crap is so bloated and backward compatibility shot to hell. Ugh..

In contrast - this emulator, is what? 17 years, 18 years old? Wow! And its base function is intact. Like many other long lived SourceForge projects we now take it all for granted and just "expect" it to be be there, semi-regularly updated and everything else. It has (and continues) to be a cornerstone in the Classic Gaming hobby of today. It is but one of many tools that helps bind the community together. Numerous homebrews are developed with it. And and many fun times are relived with it. A lot of consideration is made in keeping it backward compatible with old hardware while at the same time adding new features like the Blargg filter set and all the bank switching schemes. That is mucho appreciated. Even insignificant snot nose shitbox users like us get to have some say in testing and developing. All these things (and more) combine to make it a shining example of how a project should play out. Commercial developers would do well to study projects like this and model their business around them.

About those Alien Radio productions..

Thu May 17, 2012 5:11 AM

They remind me of this!






Help me ID this console.

Sun Apr 29, 2012 10:56 PM

I have no pictures. I can't find any on the internet. Never seen it on ebay.
It is(was) from around 1975-1977 positively.
It was made out of seemingly air blown white thin fiberglass.
It had bare 70's hobbyist standard slide switches, black.
The bottom of the case was probably aluminum or that dense circuitboard material.
It had 4 black knobs at the each of the 4 corners.
The whole thing was single piece, and shaped like a chunky wedge or asymmetrical pyramid.
It had tennis and hockey for sure.
There were no, or small, labels.
It didn't use programming overlays, cartridges, or cards of any sort.
I don't know the company.
It might have had an attached power adapter. IDK, perhaps c-cells?
It had an unfinished prototype feel to it.
It was held together with phillips' screws.
It had only B/W games of course.
It had a base size about the size of an O^2.
It would have been about 1.3x the height perhaps.
Being wedge shaped, the front controls would be sloping down toward you. Like an angled control panel in a control room.
It was relatively light in construction and had a lot of open air inside.
It had one big white ceramic chip that was 1.2" x 1" in size.
The silicon substrates (2 of them) were on this white chip-carrier, and they were covered with a black rubber-like flexible material like silicone-sealant used in aquariums.

That is all I can tell you. So WTF is this console?

Help me ID this gaming console from the late 70's

Sun Apr 29, 2012 10:49 PM

I have no pictures. I can't find any on the internet.
It is(was) from around 1975-1977 positively.
It was made out of seemingly air blown white thin fiberglass.
It had bare 70's hobbyist standard slide switches, black.
The bottom of the case was probably aluminum or that dense circuitboard material.
It had 4 black knobs at the each of the 4 corners.
The whole thing was single piece, and shaped like a chunky wedge or asymmetrical pyramid.
It had tennis and hockey for sure.
There were no, or small, labels.
I don't know the company.
It might have had an attached power adapter.
It was held together with phillips' screws.
It had only B/W games of course.
It had a base size about the size of an O^2.
It would have been about 1.3x the height perhaps.
Being wedge shaped, the front controls would be sloping down toward you. Like an angled control panel.
It was relatively light in construction and had a lot of open air inside.
It had one big white ceramic chip that was 1.2" x 1" in size.
The silicon substrates (2 of them) were on this white chip-carrier, and they were covered with a black rubber-like flexible material like silicone-sealant used in aquariums.

That is all I can tell you. So WTF is this console?