Sunday, November 4, 2018

One step forward, two steps back

I spent some time on the video player tonight, finally going in to make the timing adjustments that I've been putting off for so long. After hours of cycle counting I finally got it going, and instead of 10% slow, it was running about 3% slow. Unfortunately the main copy loop is as tight as it's going to get, so I had to decide whether that was acceptable or not.

Finally, as an experiment, I did the math. The video was converted for a frame rate of 8.9132 fps, based on the theoretical loop times. Of course, since doing that, I learned that the sound chip halts the TI's CPU when writes happen, and writes happen pretty often. The difference only brought it down to 8.6458 fps, so I decided to see how that looked.

It took a bit of tweaking to update my toolchains, but I got the old Spaceballs video converted again, and then I needed to find a working console with an original video chip, because I hadn't ported the F18A playback code yet. That also took some doing...

But finally I was able to run it up. Both in Classic99 and on real hardware, it sounded almost perfect and the runtime was close enough that I couldn't differentiate from the source video with a manual stopwatch. Close enough for government work!

It was also interesting to compare to the old video - it looked a lot better. The converter updates over the last few years made a difference. I guess I'll go post a YouTube capture...

Of course, the audio is running at 13khz, and one might say that it doesn't need to run that high a frequency - why not turn down the audio and get back some video performance? I think that the eyes are much more forgiving than the ears, and the higher frequency playback helps downplay some of the many things against one playing back digital audio on the TI. It sounds pretty good, even on hardware, although it's fairly soft. People WILL have to turn up their volume a bit to hear it.

The difference of 1/4 of a frame per second seems to be worth it... it was great to hear the audio at the correct pitch. But it means I'll have to re-encode the Dragon's Lair video again, and re-sequence all the frames again, because the indexes will change. At least I got that extra daylight savings time hour!

No comments:

Post a Comment