[MAME]


MPU4 with Video Add-on Board
If anything, MAME will only emulate the video based games,
AGEMAME may support the non-video titles at some point.

--- Board Setup ---

The MPU4 BOARD is the driver board, originally designed to run Fruit Machines made by the Barcrest Group, but later
licensed to other firms as a general purpose unit (even some old Photo-Me booths used the unit).

This original board uses a 1Mhz 6809 CPU, and a number of PIA6821 chips for multiplexing inputs and the like. (all wired
through the one IRQ)

A 6840PTM is used for internal timing, one of it's functions is to act with an AY8913 chip as a crude DAC device.

A MPU4 GAME CARD (cartridge) plugs into the MPU4 board containing the game, and a protection PAL (the 'characteriser').
This PAL, as well as protecting the games, also controlled some of the lamp address matrix for many games, and acted as
an anti-tampering device which helped to prevent the hacking of certain titles in a manner which broke UK gaming laws.

One of the advantages of the hardware setup was that the developer could change the nature of the game card
up to a point, adding extra lamp support, different amounts of RAM, and (in many cases) an OKI MSM6376 and related PIA for
improved ADPCM sample support (This was one of the most common modifications towards the end of the MPU4 era)

For the Barcrest MPU4 Video system, the cartridge contains the MPU4 video bios in the usual ROM space, interface chips to connect
an additional Video board, and a 6850 serial IO to communicate with the video board. This version of the game card does not
have the OKI chip.

The VIDEO BOARD is driven by a 10mhz 68000 processor, and contains a 6840PTM, 6850 serial IO (the other end of the
communications), an SAA1099 for stereo sound and SCN2674 gfx chip

The VIDEO CARTRIDGE plugs into the video board, and contains the program roms for the video based game. Like the MPU4 game
card, in some cases an extra OKI sound chip is added to the video board's game card,as well as extra RAM.
There is a protection chip (similar to and replacing the MPU4 Characteriser, which is often fed question data to descramble
(unknown how it works).

A decent schematic for the MPU4 board, is available, contact ElCondor of AGEMAME, for further details.

No video card schematics ever left the PCB factory, but the map we have seems pretty decent.

Additional: 68k HALT line is tied to the reset circuit of the MPU4.

I have an MPU4 manual, but no video card schematics were ever printed.

Fixing communications is a priority, ideally we need the two ACIAs talking to each other properly.

Everything here is preliminary...  the boards are quite fussy with regards their self tests
and the timing may have to be perfect for them to function correctly.  (as the comms are
timer driven, the video is capable of various raster effects etc.)

Datasheets are available for the main components, The AGEMAME site mirrors a few of the harder-to-find ones.

--- Preliminary MPU4 Memorymap  ---

(NV) indicates an item which is not present on the video version, which has a Comms card instead.

   hex     |r/w| D D D D D D D D |
 location  |   | 7 6 5 4 3 2 1 0 | function
-----------+---+-----------------+-----------------------------------------
 0000-07FF |R/W| D D D D D D D D | 2k RAM
-----------+---+-----------------+-----------------------------------------
 0800      | ? |                 | Characteriser (Security PAL) (NV)
-----------+---+-----------------+-----------------------------------------
 0880      |R/W| D D D D D D D D | PIA6821 on soundboard (Oki MSM6376@16MHz,(NV)
                                   port A = ??
                                   port B (882)
                                          b7 = 0 if OKI busy
                                               1 if OKI ready
                                          b6 = ??
                                          b5 = volume control clock
                                          b4 = volume control direction (0= up, 1 = down)
                                          b3 = ??
                                          b2 = ??
                                          b1 = ??
                                          b0 = ??
-----------+---+-----------------+-----------------------------------------
 0850 ?    | W | ??????????????? | page latch (NV?)
-----------+---+-----------------+-----------------------------------------
 08C0      |   |                 | MC6840 on sound board(NV?)
-----------+---+-----------------+-----------------------------------------
 0900-     |R/W| D D D D D D D D | MC6840 PTM IC2

                                     IRQ line connected to CPU
  Output1 ---> Clock2

               Output2 --+-> Clock3
                         |
                         |   Output3 ---> 'to audio amp' ??
                         |
                         +--------> CA1 IC3 (


-----------+---+-----------------+-----------------------------------------
 0A00-0A03 |R/W| D D D D D D D D | PIA6821 IC3 port A + B are datalines 0-15
                                            CA1 => alpha data
                                            CA2 <= output2 from PTM6840 (IC2)
                                            CB2 => alpha clock on dutch systems
-----------+---+-----------------+-----------------------------------------
 0B00-0B03 |R/W| D D D D D D D D | PIA6821 IC4 port A = data for 7seg leds

                                               CA1 INPUT, 50 Hz input (used to generate IRQ)
                                               CA2 OUTPUT, connected to pin2 74LS138 CE for multiplexer

                                               port B
                                                      PB7 = INPUT, serial port Receive data (Rx)
                                                      PB6 = INPUT, reel A sensor
                                                      PB5 = INPUT, reel B sensor
                                                      PB4 = INPUT, reel C sensor
                                                      PB3 = INPUT, reel D sensor
                                                      PB2 = INPUT, Connected to CA2 (50Hz signal)
                                                      PB1 = INPUT, undercurrent sense
                                                      PB0 = INPUT, overcurrent  sense

                                               CB1 INPUT,  used to generate IRQ on edge of serial input line
                                               CB2 OUTPUT, enable signal for reel optics
-----------+---+-----------------+-----------------------------------------
 0C00-0C03 |R/W| D D D D D D D D | PIA6821 IC5 port A

                                                      PA0-PA7, INPUT AUX1 connector

                                               CA2  OUTPUT, serial port Transmit line
                                               CA1  not connected
                                               IRQA connected to IRQ of CPU

                                               port B

                                                      PB0-PB7 INPUT, AUX2 connector

                                               CB1  INPUT,  connected to PB7 (Aux2 connector pin 4)

                                               CB2  OUTPUT, AY8910 chip select line
                                               IRQB connected to IRQ of CPU

-----------+---+-----------------+-----------------------------------------
 0D00-0D03 |R/W| D D D D D D D D | PIA6821 IC6

                                    port A

                                          PA0 - PA7 INPUT/OUTPUT) data port AY8910 sound chip

                                          CA1 INPUT,  not connected
                                          CA2 OUTPUT, BC1 pin AY8910 sound chip
                                          IRQA , connected to IRQ CPU

                                    port B

                                          PB0-PB3 OUTPUT, reel A
                                          PB4-PB7 OUTPUT, reel B

                                          CB1 INPUT,  not connected
                                          CB2 OUTPUT, B01R pin AY8910 sound chip
                                          IRQB , connected to IRQ CPU

-----------+---+-----------------+-----------------------------------------
 0E00-0E03 |R/W| D D D D D D D D | PIA6821 IC7

                                    port A

                                          PB0_PB7 OUTPUT, reel C + D
                                          CA1     INPUT, not connected
                                          CA2     OUTPUT   A on LED strobe multiplexer
                                          IRQA , connected to IRQ CPU

                                    port B

                                          PB0-BP7 OUTPUT  reel E + F or mech meter
                                          CB1     INPUT, not connected
                                          CB2     OUTPUT, output enable mech meter latch
                                          IRQB , connected to IRQ CPU

-----------+---+-----------------+-----------------------------------------
 0F00-0F03 |R/W| D D D D D D D D | PIA6821 IC8

                                   port A

                                          PA0-PA7 INPUT   multiplexed inputs data

                                          CA1     INPUT,  not connected
                                          CA2    OUTPUT, C on LED strobe multiplexer
                                          IRQA            connected to IRQ CPU

                                   port B

                                          PB0-PB7 OUTPUT  triacs outputs connector PL6
                                          used for slides / hoppers

                                          CB1     INPUT,  not connected
                                          CB2    OUTPUT, pin1 alpha display PL7 (clock signal)
                                          IRQB           connected to IRQ CPU

-----------+---+-----------------+-----------------------------------------
 1000-FFFF | R | D D D D D D D D | ROM (can be banked switched by ??? in 8 banks of 64 k )
-----------+---+-----------------+-----------------------------------------

 4000, appears to be something special?

-