Monday, November 5, 2007

EEPROM Support and Blackjack

Since the last time I posted, I worked on adding I2C EEPROM support to the driver. Initially I spent a bunch of time creating the code I needed from a couple different sources I found in the MAME code base. Once I got the code working, I began to test the driver and things looked pretty good. A couple of days later, another MAME developer (smf) produced a much better library then the one I had cobbled together and helped me hook it into my driver and replace the I2C code I had already in place. The newer I2C driver worked great too and is now part of the MAME core.

Now that the I2C code is in the driver, a lot of hacks have been removed. The following is the sequence of events that take place when you load a game for the first time.

  1. The first time in, the CMOS (battery-backed RAM) and the EEPROM will both be empty. You will get a "Call Attendant - CMOS Data" screen, and when you open the door and press the Self-Test button, it will attempt to load values from the EEPROM to the CMOS.
  2. The next time you start the game, you will get a "Call Attendant - EEPROM Data" screen. When you open the door and press the Self-Test button, it will attempt to load the EEPROM with default data found in the game code.
  3. At this point, both the CMOS and EEPROM contain some default values and you must enter operator mode to fill in any missing values such as denomination.
  4. From that point on, all restarts of the game will react properly and the game will display.

I have found a few games that are having issues when using the 8052 specific Timer 2. These games do not let you proceed past step 1 as of yet. I'm thinking the I8051 driver in MAME may not be working for this scenario, or I am missing some other piece in my driver.

Finally, as you can see from the picture above, I have included in the driver support for a new fully working clone (PEBE0014) which is the IGT Blackjack program that also runs on the PE+ platform.

No comments: