CAESAR Logo

Catalogue of Arcade Emulation Software - the Absolute Reference

Valid XHTML 1.0! Valid CSS!

X-Arcade

X-Arcade

Large CAESAR Logo

namcos22.c

0.62 [Phil Stroffolino, Bjoern Sunder, Team Vivanonno]


TODO:

- Victory Lap: No polygons.

- Ridge Racer: Bad initialization; splash screen missing without patch

- Ridge Racer 2: Passes POST but doesn't seem to want to go on

- Cyber Commando: Crashes after title screen in attract mode due to humongous invalid polygon. Gameplay appears OK whoever.

- Air Combat22: Bad initialization; polys missing in-game without patch

- Air Combat22: Eprom write error

- Air Combat22: Crash in attract mode

- Air Combat22: DSP ram memtest conflict

- Sprite problems in Alpine Racer, Cyber Cycles and Air Combat22

- Alpine Racer 2: missing gfx in the select screen (sprite problems?)

- Alpine Racer 2: flickery in attract mode

- Input ports require manual calibration through built-in diagnostics (or canned EEPROM)

- New input port type needed for bicycle pedal speed

- Nnew input port needed for multi-value stick shift

- Text layer row placement may be incorrect (emulated Prop Cycle differs from real game)

- Steer center values: Ridge Racer = 0x960 and Rave Racer = 0x20

- Prop Cycle fan (outputs noted at the right MCU port)

- Lamps/LEDs on some cabinets

- Time crisis has force feedback for the guns

- SCI (link) feature is not yet hooked up

- Slave DSP is not yet used in-game

- "point RAM" is not yet used in-game


NOTES:

- The "dipswitch" settings are ignored in many games - this isn't a bug. For example, Prop Cycle software explicitly clears the chunk of work RAM used to cache the 8 bit dipswitch value immediately after populating it. This is apparently done to hide secret debug routines from release versions of games.


IO MCU:

- Generates sound/music

- Provides input port management (copying to shared RAM)

- Coinage handling in most games

- Manages external physical devices (i.e. lamps, fans, force feedback)

- C74 is sound MCU, Mitsubishi M37702 MCU with mask ROM

- Some external subroutines for C74 are also embedded


Master DSP DSP:

- S22 has two TI320C25 DSP (printed as C71).

- The master DSP provides display list parsing


Slave DSP:

- Serves as a calculation engine for lighting


Communications RAM:

- Seen as 32 bit memory by main 68k CPU

- Seen as 16 bit memory by master DSP (addr 0x8000..0xffff); upper/lower word is selectable

- Not addressable by slave DSP


Point ROMs:

- Encodes 3d model data

- Not directly addressable by any CPU


Point RAM:

- Same address space as Point ROMs

- Not directly addressable by any CPU


Link Feature:

- Some (typically racing) games may be linked together

- Serial controller is C139 SCI (same as System21).


Namco Super System22

- Different memory map

- Different CPU controller register layout

- Sound CPU uses external ROM (i.e. pr1data.8k) instead of internal BIOS (C74)

- Additional 2d sprite layer

- Point RAM starts at 0xf80000 rather than 0xf00000

- "PDP" device, for automated block memory transfers (dsp ram, point ram)


Also:

- Communications doesn't work (endian problems?) and also there seems to be a way for the 68020 to shut off the MCU's vblank. Otherwise the MCU crashes when the 68020 overwrites it's work variables during the shared RAM test. (Prop Cycle has no such POST test and will actually run with SHARE_MCU_RAM on right now).


NOTES:

- Driver: This driver describes Namco's System22 and Super System 22 hardware. Currently, only Prop Cycle is fully playable.

- Hardware: Serial controller is C139 SCI (same as System21). S22 has two TI320C25 DSP (printed as C71). Main DSP performs handling display list and matrix operation, and kicks hardware. Sub DSP may calculates shadings and sub operations. Main CPU copies some DSP code to shared RAM on start. C74 is sound MCU, Mitsubishi M37702 MCU with mask ROM. Some external subroutines for C74 is also embedded. Super System22 has a different memory map, sound system, and an additional 2d sprite layer.


WIP:

- 0.108u1: Namco System 22 update [R. Belmont]: Fixed ROM loading problems reported by Guru and hooked up Prop Cycle fan and lamp to the new output system.

- 0.105u1: Added BIOS MCU rom c74.bin (cpu4 - nodump).

- 0.104u2: Updates to the Namco System 22 driver [R. Belmont]: Necessary changes to System 22 games to use the real C74 BIOS for music/sound. Added system controller register to boot the C74. Speedup cheat for the CPU board C74. Promoted Ace Driver from NO_SOUND to IMPERFECT_SOUND.

- 12th February 2006: R. Belmont - I found the remaining M377xx core bug that was preventing System 22 games from using the dumped C74 BIOS. It's actually a difference from the 65C816: for anyone who's done any SNES hacking, you might find this interesting. Or not. Take this assembly program, which is the same on both processors (except the 7700 doesn't need the first two instructions - it has no 6502 emulation mode): CLC, XCE ; make sure we're in native mode - 65816 only, REP #$30 ; all registers to 16 bits, LDA #$0123, LDX #$4567, LDY #$89AB, SEP #$30 ; all registers to 8 bits and REP #$30 ; back to 16 again. Now, what are the 16-bit values of A, X, and Y at that point? On a real 65C816 (tested on an Apple IIgs) A is 0123, X is 0067, and Y is 00AB. On the M377xx (I can't test on one, but there's a routine at C881 in the C74 BIOS that makes this behavior extremely clear) A is 0123, X is 4567, and Y is 89AB. The upshot is that with this and some other fixes, the System 22 games (including Ace Driver!) now play music using their own real correct BIOSes. No more BAD DUMP and PR1DATA.8K tomfoolery.

- 4th February 2006: R. Belmont - The C74 BIOS for Namco's System 22 games is fun. And by 'fun' I mean (insert the Howard Dean scream here). It's found a few more lingering bugs in the M377xx core though, so that's always useful.

- 0.103u3: Major Namco System 22 update [Phil Stroffolino]: Hooked up the real master DSP BIOS. Many games are now working or displaying graphics that were having problems before; removed many hacks as a result. Hooked up the runtime-configurable interrupt handlers, removing more game-specific hacks. Some improvements and additional documentation of video hardware. Emulated Alpine Surfer protection and fixed bogus loading of Point ROMs, though the game still has problems. Added cpu2/3 and user1 roms.

- 0.103u2: Fixed some Endian issues in the Namco drivers [R. Belmont].

- 0.102u3: Major update to Namco System 22 [Phil Stroffolino]: Depth cueing support (fog); some open issues remain, depth bias improvements, zbuffer has been replaced with back-to-front rendering, sprite and text translucency, direct access to rendering device (used by video tests), preliminary support for spotlight feature, support for sprite bottom-alignment and support for sprite/polygon priority over text. Changed gfx1 roms to gfx5 and added gfx2 dispose flags to all games.

- 0.100u1: R. Belmont fixed reversed stereo channels for Super System 22 and added coinage for all (non-Super) System 22 games.

- 15th September 2005: R. Belmont - Added coinage handling to all the System 22 games so you can insert coins properly in Ridge Racer and friends now instead of having to hit '9'.

- 12th September 2005: R. Belmont - I've enabled full sound and music in the System 22 games.

- 0.99u10: Aaron Giles added some small optimizations to the Namco System 22 3D renderer.

- 0.99u9: Major Namco sound improvements [R. Belmont]: Added emulated sound and music to all NB-1, NB-2 and System 11 games, using Prop Cycle's MCU BIOS (pr1data.8k) as a substitute until the original can be trojaned or otherwise obtained. Hooked it up for plain System 22 games as well, but they're not interested in passing down proper commands for some reason. Speed-cheated all instances of the M37710/C352 sound system so CPU requirements don't go up much. This also helped back off the requirements a hair for Prop Cycle and Time Crisis. C352 now sets output pitch correctly by input clock. Added M37710 (16384000 Hz) and C352 (16384000 Hz) stereo sound.

- 0.99u7: Cync fixed several bugs in the Namco System 22 sound system.

- 0.99u1: Namco System 22 update [R. Belmont]: Hooked up MCU/CPU communications properly (the MCU now reads the controls in Prop Cycle, Alpine Racer and Cyber Cycles) and sound effects and music are now present in all Super System 22 games.

- 0.96u1: Brad Oliver fixed big endian issues in Namco System 22 driver.

- 26th January 2005: R. Belmont - Finishing the first pass of the Namco Super System 22 MCU integration, where the M37710 reads the controls.

- 19th September 2004: R. Belmont - Converting the Super System 22 games to read their inputs through the MCU.

- 0.86u1: Phil Stroffolino mapped input ports for most games, DSP communications RAM latch mode hooked up; fixes graphics for many titles, texture banking for old hardware hooked up, patches to tms32025 emulation (DSP math bugs) and preliminary dynamic lighting for system22 (rarely actually used - see Prop Cycle turning score/time digits).

- 0.86: Namco Super System 22 changes (R. Belmont): All CPU clocks changed to measured-by-Guru values, handle the changed M37710 bus width and temporarily disconnect shared RAM. There's a problem where the 68020's shared RAM test wipes out the 37710's work variables and causes it to crash. I suspect there's a register that halts or resets the 37710 (Note: Prop Cycle has no POST and doesn't cause this problem, but all the other games do). Changed 68EC020 CPU1 clock speed to 24576000Hz, the 2x TMS32025 to 49152000 Hz and M37710 to 16384000 Hz.

- 0.85u2: R. Belmont updated the Namco Super System 22 driver to use preliminary M37710 core, but it doesn't do anything useful yet.

- 0.82: R. Belmont fixed S22 crash (vidhrdw amcos22.c).

- 0.81u8: Phil Stroffolino updates the Namco System 22 driver: Display list processing is now done by the master DSP, the slave DSP's in-game graphics processing and "custom render devices" are currently simulated, which works only for Prop Cycle, support for PDP block-based memory transfers, support for DSP data/code uploads from main CPU, support for "Point RAM" and "Point ROM" access, most self tests are working in Prop Cycle and Ridge Racer (Japan), prelim hand-crafted "internal ROMs" for master and slave DSP and various notes regarding DSP ports/addressing.

- 11th October 2003: Phil Stroffolino sent in an update to the Namco System 22 driver, adding gouraud shading.

- 21st October 2002: Aaron Giles fixed some crashes that happened in the Namco 3D games.

- 15th October 2002: Aaron Giles converted the Namco 3D graphics emulation to use the generic triangle setup routines.

- 24th August 2002: Phil Stroffolino submitted the Namco System 21 and 22 drivers.

- 19th August 2002: Phil Stroffolino reported some progress with the Namco System 22 / Super System 22 driver. Rave Racer and Victory Lap were added, but the emulation is in no way complete yet and the playability status is unknown. The graphics emulation in Prop Cycle was also improved.

- 16th July 2002: Phil Stroffolino sent in a driver for Namco System 22, Prop Cycle is playable with a few small graphics glitches and missing sound.

- 6th July 2002: Phil Stroffolino sent in a very preliminary driver for Namco System 22 and updated the Namco System 21 driver, but the 3D graphics remain unemulated.