CAESAR Logo

Catalogue of Arcade Emulation Software - the Absolute Reference

Valid XHTML 1.0! Valid CSS!

X-Arcade

X-Arcade

Large CAESAR Logo

williams.c

0.24 [Marc LaFontaine, Steven Hugg]

0.23 [Steven Hugg]


VIDEO HARDWARE NOTES:

- The basic video system involves a 4-bit-per-pixel bitmap, oriented in inverted X/Y order. That is, pixels (0,0) and (1,0) come from the byte at offset 0. Pixels (2,0) and (3,0) come from the byte at offset 256. Pixels (4,0) and (5,0) come from the byte at offset 512 etc.

- Defender and Stargate simply draw graphics to the framebuffer directly with no extra intervention.

- Later games added a pair of "special chips" (SC-01) to the board which are special purpose blitters. During their operation they HALT the main CPU so that they can control the busses. The operation of the chips is described in detail below.

- The original SC-01 had a bug that forced an XOR of the width and height values with 4. This was fixed in the SC-02, which was used on several later games.

- Beginning with Sinistar, additional video tweaks were added.

- In Sinistar, a clipping window can be specified and enabled in order to prevent the blitter chip from drawing beyond a certain address. This clipping window can be switched on and off at will.

- In Blaster, a number of features were added. First, a fixed window can be enabled which cuts off blitter drawing at 0x9700. Second, on a per-scanline basis, an "erase behind" feature can be turned on which clears the video RAM to 0 after it is refreshed to the screen. Third, on a per-scanline basis, an alternate color can be latched as the new background color.

- For Mystic Marathon and the 3 other "2nd generation" Williams games, a tilemap background layer was added. This layer consisted of 24x16 tiles and only scrolled in the X direction. In addition, the palette was expanded to 1024 entries, some of which were used for the tilemap. The traditional foreground bitmap could be configured to use any bank of 16 colors from the full palette.


Blitter description from Sean Riddle's page:

- This page contains information about the Williams Special Chips, which were 'bit blitters'- block transfer chips that could move data around on the screen and in memory faster than the CPU. In fact, I've timed the special chips at 16 megs in 18.1 seconds. That's 910K/sec, not bad for the early 80s.

- The blitters were not used in Defender and Stargate, but were added to the ROM boards of the later games. Splat!, Blaster, Mystic Marathon and Joust 2 used Special Chip 2s. The only difference that I've seen is that SC1s have a small bug. When you tell the SC1 the size of the data to move, you have to exclusive-or the width and height with 2. The SC2s eliminate this bug.

- The blitters were accessed at memory location $CA00-CA06. CA01 is the mask, usually $FF to move all bits. CA02-3 is the source data location. CA04-5 is the destination data location. Writing to CA00 starts the blit, and the byte written determines how the data is blitted.

- Bit 0 indicates that the source data is either laid out linear, one pixel after the last, or in screen format, where there are 256 bytes from one pair of pixels to the next.

- Bit 1 indicates the same, but for the destination data.

- I'm not sure what bit 2 does. Looking at the image, I can't tell, but perhaps it has to do with the mask. My test files only used a mask of $FF.

- Bit 3 tells the blitter only to blit the foreground- that is, everything that is not color 0. Also known as transparency mode.

- Bit 4 is 'solid' mode. Only the color indicated by the mask is blitted. Note that this just creates a rectangle unless bit 3 is also set, in which case it blits the image, but in a solid color.

- Bit 5 shifts the image one pixel to the right. Any data on the far right jumps to the far left.

- Bits 6 and 7 only blit every other pixel of the image. Bit 6 says even only, while bit 7 says odd only.


WIP:

- 0.106u11: Aaron Giles added X and Y offset/scale controls for each screen. This allows you to control the actual position of the screen within its container. In order to see beyond the game-configured visible area, the game must have set up the screen size to be larger than the core visible area. The Williams drivers have been updated as an example. Eugene Jarvis mentioned that if you adjust your monitor, you can see the stack in Robotron off to the right, and now you can in MAME as well. The values configured in the OSD are saved in the config file for each game.

- 0.101u1: Aaron Giles added save state support to the classic Williams drivers, marking them as GAME_SUPPORTS_SAVE.

- 0.95u3: Williams driver rewrite [Aaron Giles]: Rederived all addressing from schematics, cleaned up banking mechanisms, fixed sound CPU clock in later games, simplified blitter code significantly, added timing to the blitter (just a guess right now), implemented clipping circuits correctly, simplified palette handling significantly and rewrote video system to use tilemaps for later games.

- 20th July 2004: Arthur Peale submitted a fix for the coin slots in the Williams driver.

- 8th December 2001: Aaron Giles fixed a bug in the Williams games' blitter, fixing Bubbles from crashing on startup.

- 0.37b10: Changed palettesize from 272 to 256 colors.

- 7th October 1999: Aaron Giles added Mayday to the Williams driver and improved the blitter for the Williams games.

- 0.35b11: Changed M6802 CPU2 clock speed to 894750 Hz.

- 0.35b10: Changed M6802 CPU2 clock speed to 3579000 Hz.

- 0.35b6: Replaced M6803 CPU2 with M6808.

- 9th March 1999: Michael Soderstrom has finally sent in the newest Williams driver with added support for Mystic Marathon, Turkey Shoot, Inferno and Joust 2.

- 0.33b4: Nicola Salmoria slightly reduced the visible area of the Williams games, he's not sure which would be the correct setting though.

- 0.31: Merged colony7.c with williams.c driver. Aaron Giles major cleanup the Williams drivers. Aaron Giles and Brad Oliver improved the blitter for the Williams games.

- 0.30: Added colony7.c driver. Tatsuyuki Satoh added cpu_setbankhandler_r() / cpu_setbankhandler_w() for better bank switching support. The Williams drivers take advantage of it. Aaron Giles added dirty rectangles support.

- 0.29: Steven Hugg, Mirko Buffoni and Nicola Salmoria added sound to all the Williams games. Samples are no longer needed and may be deleted. Aaron Giles made several fixes and enhancements to the Williams driver.

- 0.28: John Butler added optimizations to some Williams games.

- 0.26a: Sound is back on Williams games.

- 0.24: Marc LaFontaine provided drivers for Robotron, Splat, Defender, Joust, Stargate, Bubbles, Blaster and Sinistar. Bubbles doesn't start, and Sinistar do weird things at startup. The other games work very well, though. For this version I provide a set of fonts that can be used to avoid jerkiness in williams games. If you use zipped roms remember to include them in the ZIP files.

- 0.23: Added williams.c driver.