CAESAR Logo

Catalogue of Arcade Emulation Software - the Absolute Reference

Valid XHTML 1.0! Valid CSS!

X-Arcade

X-Arcade

Large CAESAR Logo

galaga.c

0.21 [Nicola Salmoria, Martin Scragg]


TODO:

- bosco & galaga: The starfield is wrong. The function of STARCLR is unknown. It is not latched and there are no data bits used...

- bosco: is the scrolling tilemap placement correct? It is currently aligned so that the test grid shown on startup is correct, but this way an unerased grey strip remains on the left of the screen during the title sequence.

- gallag/gatsbee: Explosions are not emulated since the bootleg board doesn't have the 54XX custom. Should probably use samples like Battles?

- Should Xevios have a 4th Z80 like the other bootlegs? We don't have a dump for that ROM.

- xevious: I haven't found any Easter egg in service mode. The main loop is very simple so there might just not be one, though this would be the only Namco game of that era to not have a service mode Easter egg. On the other hand, the service mode in this game is VERY spartan when compared to the other Namco games.

- dzigzag: emulate the 4th CPU (should be similar to battles)


NOTES:

- The Cabinet Type "dip switch" actually comes from the edge connector, but is mapped in memory in place of dip switch #8. dip switch #8 selects single/dual coin counters and is entirely handled by hardware.

- galaga: There is a bug in the sound CPU program. During initialization, it enables NMI before clearing RAM, but the NMI handler doesn't save the registers, so it cannot interrupt program execution. If the NMI happens before the LDIR that clears RAM has finished, the program will crash. To prevent this, I had to use a custom interrupt_gen, timing NMI generation appropriately.

- galaga: There were "fast shoot" hacks available, which are not supported. Their effects can be replicated with this line in cheat.dat: galaga:1:070D:0D:100:Fast Shoot

- bosco: There appears to be a bug in the code at 0BB1, which handles communication with the 06XX custom chip. First it saves in A' the command to write, then if a transfer is still in progress it jups to 0BC1, does other things, then restores the command from A' and stores it in RAM. At that point (0BE1) it checks again if a transfer is in progress. If the trasnfer has terminated, it jumps to 0BEB, which restores the command from RAM, and jumps back to 0BBA to send the command. However, the instruction at 0BBA is ex af,af', so the command is overwritten with garbage. There's also an exx at 0BBB which seems unnecessary but that's harmless. Anyway, what this bug means is that we must make sure that the 06XX generates NMIs quickly enough to ensure that 0BB1 is usually not called with a transfer still is progress. It doesn't seem possible to prevent it altogether though, so we can only hope that the transfer doesn't terminate in the middle of the function.

- bosco: We have two dumps of the sound shape ROM, "prom.1d" and "bosco.spr". Music changes a lot from one version to the other. I'm using the former because it is more similar to the other Namco games. The latter, after masking off the unused top 4 bits and inverting bit 3, matches the Galaga one, so it might have come from a (bootleg?) conversion.

- bosco & galaga: The Midway arcade cabinet had an optional rapid fire board, using a 556 to generate autofire while the button was held. That really makes little sense in Galaga! For Bosconian, I guess it was for the boscomdo set I, because the other sets have autofire built-in.

- The bosconian video system is (apart from the starfield) almost identical functionally to Rally X, but the hardware is quite different: Rally X has no custom ICs.

- digdug: If you enter service mode and press press service coin something like the following is written at the bottom of the screen: 99.9999.9999.9999.9999. This is explained in the manual: it is the number of games played, of points, etc. The counters start from 999 and count backwards.

- gallag is identical to galagao, apart from the title changed to "GALLAG" and the copyright notice changed from "(c) 1981 NAMCO LTD" to "1 9 8 2" (and the Namco logo removed from the gfx). The only interesting thing about it is the 4th Z80, used to simulate the custom 5xXX chips of the original. It also has different explosion and starfield circuitries, to do without the Namco custom chips.

- Differences between versions of digdug: The background graphics are slightly different in the Atari version, the earth is less regular, "digdugb" and "digduga1" are identical, apart from the gfx and copyright notices changed from "NAMCO LTD." to "ATARI INC.". "digdug" is almost identical to "digdugat" (apart from the above changes), but there are three more instructions in the latter that change the code alignment. "dzigzag" and "digdugb" are identical, apart from the hacked gfx and the copyright notices changed from "NAMCO LTD." to "1 9 8 2". It's a bottleg of "digdugb", and not of "digduga1", because the hidden "NAMCO" string at offset 0x1eea of CPU2 is still present, while it is replaced by "ATARI" in digduga1. The only interesting thing about the bootleg is the 4th Z80, used to simulate the custom 5xXX chips of the original.

- The digitised speech in Bosconian is stored in the SOUND2 roms.


VIDEO HARDWARE NOTES:

- Galaga has one 32x8 palette PROM and two 256x4 color lookup table PROMs (one for characters, one for sprites). Only the first 128 bytes of the lookup tables seem to be used.

- Dig Dug has one 32x8 palette PROM and two 256x4 color lookup table PROMs (one for characters, one for sprites). Only the first 128 bytes of the lookup tables seem to be used.

- Xevious has three 256x4 palette PROMs (one per gun) and four 512x4 lookup table PROMs (two for sprites, two for background tiles; foreground characters map directly to a palette color without using a PROM).


WIP:

- 0.104u8: Andre Hufschmidt added save state support to the galaga.c games.

- 0.93: Added clock parameter to Namco sound (96000 Hz).

- 0.79u1: Merged digdug.c, bosco.c and xevious.c with galaga.c driver. Big 80s Namco Update [Nicola Salmoria]: This affects the first Namco games that used custom I/O chips. Files that are no longer needed and should be removed: drivers/bosco.c, drivers/xevious.c, drivers/digdug.c, machine/digdug.c, machine/galaga.c, machine/bosco.c, machine/polepos.c, sndhrdw/bosco.c. Added three new sound chips: Namco 15XX, Namco 52XX, Namco 54XX, and changed drivers to use them (Namco 54XX is just a placeholder playing samples, until the chip is reverse engineered), MAME testers bugs fixed: digdug063gre, galaga057gre, bosco071u2gre, poleposc059gra, added EAROM support to digdug, extensive documentation of ROM names and placement, and differences between Namco and licensed versions, converted all drivers to tilemaps, and made gfx emulation more accurate according to schematics, IP_KEY_PREVIOUS and IP_JOY_PREVIOUS are no longer used by any driver: they may be removed from the core, support for start lamps, coin counters and coin lockout (all internallyhandled by the custom I/O chip), toggling the test switch while the game is running enters test mode without need to manually reset, found and documented test mode Easter eggs in all games except Xevious, bosconian now uses a different sound PROM, which seems more correct, galaga uses better dumps of the PROMs, with the unused top 4 bits set to 0, correct handling of 52XX sample start/end pointers in ROM, better emulation of 50XX custom, no more need for hacks in bosconian, swapped digdug and digdugb, the main set should be the newer one, removed these galaga clones: nebulbee (copyright/name change), galagab2 (mix 'n match of ROMs from other sets), galaga84 (copyright/gfx change), galagads (1-byte hack to get fast shoot, reproducible with this line in cheat.dat: galaga:1:070D:0D:100:Fast Shoot), added Galaga rev. B, which is now the main set, renamed the other galagao, added galagamk, a different Midway version, removed various bad dumps from polepos2b and poleps2c, they turned out to be the same version so poleps2c is removed, drivers/locomotn.c is no longer needed and should be removed, converted to tilemaps, consolidated as much as I could, fixed: jungler37b3gre and correct tile/sprite priority handling (also in Bosconian).

- 2nd July 2001: SUZ updated the Xevious driver, adding two new samples and adjusting clock frequencies.

- 0.37b12: Changed VSync to 60.606060Hz.

- 0.27 Added bosco.c and xevious.c driver.

- 0.26: Added digdug.c driver.

- 0.25: Removed xevious.c driver.

- 0.23: Added xevious.c driver.

- 0.21: Added galaga.c driver.