Flying Shark for Cave CV1000-B
==============================

Toaplan's Flying Shark (1987), running on a Cave CV1000-B arcade board: the
original 68000 program under emulation, with the Toaplan video, sound and
coprocessor rebuilt around it. It replaces the board's U4 boot flash.

This package holds only the port. Flying Shark's own code and graphics, and
Cave's FPGA bitstream, come from ROM sets you already have, and
build_fshark.py puts it together from them - an image for the board, and a
complete ibara set to play it in MAME.


WHAT YOU NEED

  - Python 3. Nothing else.
  - Flying Shark, the fsharkb set (World, bootleg), as a MAME zip or a folder.
    In a split set the clone zip only holds the files that differ from the
    parent: give both fshark.zip and fsharkb.zip.
  - ibara: its U4 boot flash holds the FPGA bitstream, and its U2, U23 and
    U24 complete the MAME set. Give ibarao.zip, the original release: its
    bitstream is the one the port was tested with on a board. MAME's later
    ibara revision carries a newer FPGA firmware that has not been tested,
    and builds with a warning. A dump of an ibara board's own U4 is enough
    for the board image, but makes no MAME set.
  - An ibara board to run it on. The port plays ibara's sound samples from the
    board's own U23/U24 sound flashes, so another CV1000 game's board will
    play the wrong sounds.


BUILDING

    python3 build_fshark.py fshark.zip fsharkb.zip ibarao.zip

writes, into out/ (--out picks another folder):

    out/fshark_u4.bin   the image for the board's U4
    out/ibara.zip       a complete ibara set for MAME, with that image as U4

Files are found by their CRC, so their names do not matter, and every input
is checked. The image is checked too, against the one that was tested on a
board. Given only MAME's later ibara set, the image is still made with that
set's newer FPGA firmware, and a warning that the board image differs from
the tested one in the bitstream alone. MAME ignores the bitstream.


FLASHING

Write fshark_u4.bin to U4, the board's 2MB boot flash, over JTAG - for
example with UrJTAG:

    jtag> cable UsbBlaster
    jtag> detect
    jtag> detectflash 0
    jtag> readmem 0 0x200000 before.bin      (keep this: it is the board's
                                              original U4)
    jtag> flashmem 0 fshark_u4.bin

Leave U2, U23 and U24 as they are.


IN MAME

It runs in MAME's cv1k driver as ibara, from the set build_fshark.py made:

    mame ibara -rompath out

MAME warns that ibara_u4 has the wrong checksum; that is this image. Keep it
apart from your real ibara set - a rompath that finds that one first plays
ibara.


CONTROLS

Stick, button 1 to fire, button 2 to bomb, for both players. Button 3 is
autofire at 10Hz and button 4 at 30Hz.


LICENCES

The port includes the Musashi 68000 core and a Z80 core, both under the MIT
licence; see LICENSES/. 
