Monday, March 14, 2011

Hardware is waiting on software

I've got the hardware-side of my VLDP-HW project completed enough so I'm ready to plug it into my Dragon's Lair machine and see something awesome happen :)

Unfortunately, the software side of things is not done yet. I still need to write the interface between the AVR and the PC and this isn't as trivial as one might think. The interface will be through the serial port, running at 115200 bits per second and it will mainly consist of the AVR telling the PC which field it should be displaying at any given time. A conservative estimate of the bytes/second that this speed will provide is about 10,000 and each field changes at a rate of 60 fields per second, so I should have plenty of breathing room.

I have also been thinking about the following problem:
Real laserdisc players were pretty much ready once you powered them on. You could issue a play command and the disc would start spinning up.

My solution will only be partially ready when it is powered on. The AVR will be ready instantly to communicate with the arcade hardware, but the PC may have a potentially long boot-up time. But the AVR needs the PC to be up and running in order to know which kind of laserdisc player to emulate and what the VBI for the laserdisc will be.

Well I think I've come up with a pretty nifty solution to this problem. The AVR will simply remember its previous settings from the last time it talked to the PC (stored in its EEPROM) and until it hears from the PC, it will assume that those settings have not changed. The AVR can start communicating with the arcade hardware normally (including responding to seek requests) without being connected to the PC and then when the PC comes online, it can get "in sync". I could also make the AVR wait for the PC during its "disc spinning up" stage, but some games (ie Dragon's Lair) don't check to see if the disc has finished spinning up, they just delay a period of time and then assume that the disc must be playing (which is pretty lousy programming by the way hehehe).

So I say again, the communication between the AVR and the PC will need to have some cleverness built into it to solve the above problem.

No comments:

Post a Comment