Chris Pile wrote: > For those interested I have made the Defender source code available. > > http://homepages.enterprise.net/pegasus/defender
I've only just got around to playing this - it's a superb port! I think a few of us will pay you back in beer or something :-) The difficulty is very authentic too as I've yet to get past the 2nd wave! We're you one of those people that could spend hours playing a single game?? I think I've tracked down some of the problems with it running under SimCoupe... I experienced the same running fast and slow when down to the last few landers. Seems to be to do with instruction timing, as after I added an approximate form of memory contention(*) and it seems to be fine now. I'm guessing it normally runs at 25fps, so the uncontended timings meant it could manage a frame in under 1/50th when there wasn't so much to do. Manic Miner doesn't seem to have much in the way of frame synchronisation and seemed to run too fast on SimCoupe, but the memory contention seem to bring it back to a normal speed, and even stabilise the border effect in the Cold Store! Your 'anti-emulation' code almost ran correctly because I've already implemented Ian Collier's 20us interrupt time, 17us of which it's visible on the status port. The value of IX after your timing loop was either 0xc0c0 (correct) or 0xc8c8, so it sometimes started the game ok! The fix for this was to re-align the LineCycleCounter value to the end of the line when it reached the end of the display, meaning the new frame always started with at the start of the first display line - sorta cheating but forgivable I hope! The 'fix' might also make other timing sensitive video effects a little more stable, but I've yet to try any. If only I could stop myself getting distracted by minor (but worthwhile, I suppose) details I might even get the Win32 to a releasable state. I seem to have a bad habit of chipping away at lots of bits instead of concentrating on each one and finishing them off. *sigh* Si ICQ: 9769343, Homepage: http://www.obobo.demon.co.uk/ (*) No contention when display is disabled (modes 3 and 4 only), or when outside the main 192 lines of the screen in modes 2, 3 and 4. It doesn't take into account the speed-up in the border areas of the main screen, but that doesn't affect most things and can be added in the future. Uncontended timings use the documented instruction timing, and contended timings use a rough formula of "((tstates + 7) & -7) - 1" (!) to give 8 t-state rounding. It's a start anyway...