Phew... It has been too long since the last InterView and you may have thoughtI had run out of InterViewees. Well guess again, here is one, and I have some othersin the queue. This is one of the main features of EV and I won't let it slide. So thistime, the InterView is with Larry Bank, the soul of C.A.G.E. This is a very niceemulator which features speed, and an operating system support that not all emulatorshave wandered upon. Larry talks to us about theins and outs of working with his baby, C.A.G.E. I hope you enjoy it!
|Larry Bank from Cage InterViewed! - June 27,1998 by JoseQ
1. Can you tell us a little bit about yourself (age, school preparations,skills useful in C.A.G.E.)?
I am 32 years old and have a BS degree in electrical engineering. I havenever used my EE skills; I began programming at age 13 and continued untiltoday. I programmed all the early 8/16-bit microprocessors in assemblylanguage on the various PC's of that era (Apple ][, TRS-80, IBM-PC, AtariST). This knowledge of the various assembly languages has helped a littlein creating the emulator, but is not really a requirement. If you have thedata book and a general knowledge of how microprocessors work, then you canwrite an emulator. I have always been interested in computer graphics andthis skill has made writing the emulated graphics easier. Being able tothink in terms of bits, bytes and pixels is definitely a required skill foremulator authors.
2. What got you to start doing C.A.G.E.? What caused you say "Alright, it'stime to start"?
I started to see various emulators getting better and better, but none ofthem did a good job with Robotron, especially not running in a Window on NT.I decided that I could write a Robotron emulator for NT and it would be agood excuse to learn DirectX, Joystick support and Sound on Win32.
3. What kept you going the whole way through?
At times it was difficult to justify continuing. When my 6809 had bugsand I would waste hours trying to find them, I kept asking myself why am Ipouring tons of time into this thing. It was very satisfying to finally geteverything working and that made all the time spent worthwhile. This isbasically how most programming is - 90% frustration and 10% satisfaction.If you have the patience and tolerance for those odds, then you can be aprogrammer.
4. Did you ever think it was going to be this popular?
Part of my motivation was to lure away some of the MAME crowd who wereinterested in running a fast Windows-based emulator. I really had no ideahow many people would take an interest in CAGE.
5. Why did you choose Windows as your platform? Do you think your speedgains over MAME are maybe caused by Windows optimizations?
The choice of Windows as a platform was simple. I have programmed DOSapplications since the days of DOS version 1.1. DOS provides some benefits,but the main downside was having to support so many different hardwareplatforms. Besides the problems of video cards and modes, the sound andjoystick support meant either supporting a very limited set of hardware orwriting a whole lot of code. Writing an emulator as a side project meansthat I have to make every hour I spend as useful as possible. I have a fulltime job and a real life; time spent on the emulator has to be 'stolen' fromthe little free time that I have. If I get bogged down testing DOS soundcard code I might not finish doing the rest of the emulator. At this pointin my life, I really prefer doing Win32 programming anyway. Windows may notbe the best gaming platform, but I can be more productive, especially whencreating the user interface.
The speed gains I have over MAME really have nothing to do with theoperating system. The same code will run at basically the same speed on anyoperating system. Updating the video display used to be a performance issuein Windows, but DirectX mostly solves that problem. The reason my emulatoris much faster than MAME is due to my fast CPU emulators. More than halfthe time of any emulated game is spent in the CPU emulator and if you canspeed that up, then the whole thing goes faster. I rewrote my CPU's inassembler and then went back and optimized them some more.
6. What are your main goals with C.A.G.E.? Do you look to please the user,get quality game enjoyment, faithful emulation, speed?
Most of my goals with CAGE are quite selfish. I have tried to emulate myfavorite games to play well on Windows NT. The speed issue has two sides toit: on the one hand, I always look at maximum performance as a challenge; onthe other hand, I also try to get the most speed out of the code so thatpeople with older hardware will still be able to run it. I keep a 486-66test machine running just to do performance testing of CAGE.
I have a very short attention span and basically want to see progress in ashort time period. I have emulated some games extremely well (such as thePacMan series) and others poorly (such as ZooKeeper). So far, I haveavoided games with advanced sound chips, but that is my next area to workon. I want to improve the sound in all the games by using a 'Pull'technique instead of the 'Push' techique I am now using. My attentionbasically drifts from one area to another depending on how boring orinteresting it seems at the time.
7. Are you looking into adding network playability to C.A.G.E.? Howcomplicated do you think that might be?
I have thought about network play for CAGE, and it really doesn't seemtoo difficult. Keeping the two machines synchronized will be simple becauseI am using the high resolution internal timer. The only issue is how andwhen to transmit information about joystick and keyboard changes. When Ihave my home network back up and running (when I get the next NT 5.0 beta) Iwill start playing with this idea.
8. What do you think has been the hardest part about working with C.A.G.E.?
The hardest part of working with CAGE was at the very beginning when Iwas not sure if the bugs were in my CPU or in the rest of the emulator.When you can't rely on your CPU being accurate, it is much more difficult todebug the rest of the code. After I cleaned up the CPU code, adding moregame support and sound wasn't very difficult.
9. What should we expect in future versions?
In future versions I will keep trying to improve the quality of existinggames as I add new ones. In my last release, I cleaned up the joystick andsave/load code to a good level. Next comes re-doing all of the sound.There are just so many things that need attention, it is difficult toprioritize and divide up my time.
10. You have an area of your site devoted to coding... Have you gotten agood response from that? What are your thoughts regarding distributing codefreely?
I have received a few notes thanking me for the various articles andsource that I have posted, but I don't think there are a great number ofpeople doing programming. I started CAGE with the idea that maybe I couldmake money some time in the future. For this reason, I have not borrowedany emulator code and written everything from scratch. As this idea seemsmore and more remote, I have been releasing more and more of the sourcecode. There are some pieces that I consider trade secret and probably won'trelease, but a large portion of it is already on my site. I will continueto write new articles for my 'Code Corner' section because they also serveto document the work I've done. I'm not sure I will ever release thecomplete source to CAGE, but there's always a chance.
11. Any words you want to voice out to the public?
I'm going to continue with CAGE as long as I have some spare timebecause I am always learning new things and that's what makes programmingfun. There is probably another 1000 hours of stuff on my to-do list forCAGE, so I will be at it for a long time. Retrocade looks like it will bean excellent emulator and may completely overshadow CAGE, but I will stillcontinue to work on it.
On another topic, I have had very few lamers email me and I answer 100% ofmy email. Even if I don't have a good answer for someone, I think it's rudeto completely ignore email.
12. When will CAGE be "finished"?
CAGE will officially be finished when Ihave emulated all of my favorite games (about 40) to a quality level I amhappy with. Some of the games I want to see emulated use a 68000 whichmeans I have a lot of work ahead of me :(.
Thanks a lot go to Larryfor his time answering all these questions. We congratulate him on his workwhich is great (gives my dad a chance to play Joust (one of his favorites)on his old PC). You can email Me orLarry with comments. And you candownload his C.A.G.E. emulator at our Emulators Page.
One Article Up: EV News - Tiny Update
One Article Down: Rolling Thunder Emulator Page